/* Black & white, monospaced, terminal-style layout */
:root {
  --bg: #000;
  --fg: #fff;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  font-size: clamp(12px, 2.9vw, 14px);
  line-height: 1.25;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-variant-ligatures: none;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.header {
  position: sticky;
  top: 0;
  background: var(--bg);
  color: var(--fg);
  border-bottom: 0;
  padding: 0;
  height: 0; /* keep element for dblclick target if needed, but remove the visible line/space */
  letter-spacing: 0.12em;
  font-weight: 600;
}

.stream {
  flex: 1 1 auto;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 10px 12px;
  white-space: pre;           /* preserve column spacing */
  font-feature-settings: "tnum";
  tab-size: 2;
}

/* Each row is just text, but a hook for future tweaks */
.row { }

/* Invisible 10x10 hotspot bottom-right to open overlay */
#hotspot {
  position: fixed;
  right: 6px;
  bottom: 6px;
  width: 44px;
  height: 44px;
  background: var(--fg);  /* still B/W; we hide via opacity */
  border: none;
  padding: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
#hotspot:focus-visible {
  outline: 2px dotted #fff;
  outline-offset: 2px;
  opacity: 0.2; /* briefly reveal on keyboard nav */
}

/* Minimal overlay with monochrome styling */
#overlay[hidden] { display: none !important; }

#overlay {
  position: fixed;
  inset: 0;
  background: #000;      /* pure black backdrop */
  color: var(--fg);
  display: grid;
  place-items: center;
  z-index: 9999;
}

#overlay .panel {
  background: transparent;
  border: 1px solid var(--fg);
  padding: 16px;
  width: min(520px, 92vw);
}

#overlay .title {
  font-weight: 700;
  margin-bottom: 10px;
}

#overlay .actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

#overlay .actions button {
  appearance: none;
  background: #000;
  color: #fff;
  border: 1px solid #fff;
  padding: 8px 10px;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

#overlay .actions button:focus {
  outline: 2px dotted #fff;
  outline-offset: 2px;
}

#overlay .hint {
  color: #fff;
  opacity: 0.8;  /* still white; slightly translucent for hierarchy */
  font-size: 12px;
}

/* When user is at bottom, show a subtle caret block at the very bottom-left */
.stream::after {
  content: " ";
  display: block;
  height: 2px;
  width: 8px;
  background: #fff;
  margin-top: 6px;
}

@media (max-width: 600px) {
  .header { letter-spacing: 0.08em; }
  #overlay .actions { grid-template-columns: 1fr; }
  #overlay .actions button { padding: 10px 12px; font-size: 16px; }
}
