:root {
  --bg: #0a0c08;
  --panel: #12150e;
  --text: #d9ddc4;
  --text-dim: #7d8468;
  --accent: #a9c93a;
  --warm: #d98b3a;
  --line: #262a1c;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  min-height: 100vh;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

/* CRT / scanline wrapper */
.crt {
  position: relative;
  width: 100%;
  max-width: 640px;
}

.crt::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.03) 0px,
    rgba(255, 255, 255, 0.03) 1px,
    transparent 1px,
    transparent 3px
  );
  z-index: 5;
  border-radius: 8px;
}

.terminal {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 0 0 1px #000, 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(169, 201, 58, 0.05);
  overflow: hidden;
}

.titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #0d0f0a;
  border-bottom: 1px solid var(--line);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  background: #33361f;
}

.dot-a { background: #6e3626; }
.dot-b { background: #6e5a26; }
.dot-c { background: #2e5a2b; }

.titlebar-label {
  margin-left: 8px;
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

.screen {
  padding: 28px 26px 20px;
  min-height: 340px;
}

.scene {
  display: none;
  animation: flicker-in 0.35s steps(3, end);
}

.scene#start {
  display: block;
}

body:has(.scene:target) .scene#start {
  display: none;
}

.scene:target {
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  .scene { animation: none; }
}

@keyframes flicker-in {
  0%   { opacity: 0; }
  40%  { opacity: 0.4; }
  60%  { opacity: 0.15; }
  100% { opacity: 1; }
}

.prompt {
  font-family: 'VT323', monospace;
  font-size: 26px;
  color: var(--accent);
  margin: 0 0 10px;
}

.tagline {
  color: var(--warm);
  font-size: 14px;
  font-style: italic;
  margin: 0 0 18px;
}

.log-line {
  color: var(--text-dim);
  font-size: 13px;
  margin: 4px 0;
}

.log-ok {
  color: var(--text-dim);
}

.log-ok .accent {
  color: var(--accent);
  font-weight: 700;
}

.accent {
  color: var(--accent);
}

.nav-hint {
  margin-top: 22px;
  color: var(--text-dim);
  font-size: 13px;
}

.timestamp {
  font-family: 'VT323', monospace;
  font-size: 22px;
  color: var(--warm);
  letter-spacing: 0.03em;
  margin: 0 0 16px;
}

.scene p {
  font-size: 15px;
  line-height: 1.65;
  margin: 0 0 14px;
  color: var(--text);
}

.choice {
  display: inline-block;
  margin: 14px 12px 4px 0;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--accent);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  background: rgba(169, 201, 58, 0.04);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}

.choice:hover,
.choice:focus-visible {
  border-color: var(--accent);
  background: rgba(169, 201, 58, 0.12);
  transform: translateX(2px);
}

.choice:focus-visible {
  outline: 2px solid var(--warm);
  outline-offset: 2px;
}

#end .choice {
  color: var(--warm);
  border-color: var(--line);
}

#end .choice:hover,
#end .choice:focus-visible {
  border-color: var(--warm);
  background: rgba(217, 139, 58, 0.12);
}

.statusbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  border-top: 1px solid var(--line);
  background: #0d0f0a;
  font-size: 12px;
  color: var(--text-dim);
}

.blink-cursor {
  color: var(--accent);
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .blink-cursor { animation: none; }
}

@media (max-width: 480px) {
  .screen { padding: 22px 18px 16px; }
  .prompt { font-size: 22px; }
  .timestamp { font-size: 19px; }
  .scene p { font-size: 14px; }
}