:root {
  --bg: #0a0a0a;
  --fg: #d8d4cc;
  --dim: #6e6a63;
  --whisper: #1a1917;
  --accent: #c7a97b;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}

body {
  display: flex;
  justify-content: center;
  padding: 24px 16px 40px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

#stage {
  width: 100%;
  max-width: 68ch;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

#screen {
  margin: 0;
  padding: 0;
  font-family: var(--mono);
  font-size: clamp(12px, 2.6vw, 15px);
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 60vh;
}

.line {
  margin: 0;
  padding: 0;
  opacity: 0;
  animation: fade .9s ease-out forwards;
}

.ascii-block {
  display: block;
  white-space: pre;
  color: var(--fg);
  margin: 1em 0;
  font-size: clamp(11px, 2.4vw, 15px);
  line-height: 1.2;
  overflow-x: auto;
}

.narration { color: var(--fg); }
.prompt    { color: var(--accent); margin-top: 1em; }
.sys       { color: var(--dim); font-style: italic; }
.echo      { color: var(--dim); }

@keyframes fade { to { opacity: 1; } }

/* The whisper — barely visible, no cursor hint. Hidden details and service doors. */
.whisper {
  color: var(--whisper);
  cursor: default;
  user-select: none;
}
.whisper:hover { color: var(--whisper); }
.whisper.found { color: var(--accent); }

/* Input zone */
#input-zone {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.choice {
  font-family: var(--mono);
  font-size: clamp(13px, 2.8vw, 15px);
  color: var(--fg);
  background: transparent;
  border: 1px solid var(--dim);
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
  min-height: 44px;
  transition: border-color .2s ease, color .2s ease;
}
.choice:hover,
.choice:focus { border-color: var(--fg); outline: none; }
.choice:active { color: var(--accent); }

.text-input-form {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--dim);
  padding-bottom: 4px;
}
.text-input-caret { color: var(--accent); }
.text-input {
  flex: 1;
  font-family: var(--mono);
  font-size: clamp(13px, 2.8vw, 15px);
  color: var(--fg);
  background: transparent;
  border: none;
  outline: none;
  padding: 6px 0;
  min-height: 36px;
}

/* Reduce visual noise on mobile */
@media (max-width: 480px) {
  body { padding: 16px 12px 32px; }
  #stage { gap: 14px; }
}

/* Honor reduced motion */
@media (prefers-reduced-motion: reduce) {
  .line { animation: none; opacity: 1; }
}
