/* Palette comes from platform/tokens.css via <html data-shelf="story">.
   These are case-file aliases only — never new colour values. */
:root {
  --panel: color-mix(in srgb, var(--ink) 6%, var(--bg));
  --panel-2: color-mix(in srgb, var(--ink) 9%, var(--bg));
  --text: var(--ink);
  --dim: var(--muted);
  --amber: var(--brand);
  --red: #c9563f;
  --green: #5fa88a;
  --serif: var(--font-serif);
  --sans: var(--font-sans);
  --mono: var(--font-mono);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

/* case backdrop: one image per case file, always behind a scrim */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 42%;
  filter: brightness(.92) saturate(.92) blur(.4px);
  transform: scale(1.06);
}
.backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg,
      rgba(12, 11, 15, .56) 0%,
      rgba(12, 11, 15, .32) 20%,
      rgba(12, 11, 15, .22) 48%,
      rgba(12, 11, 15, .56) 74%,
      rgba(12, 11, 15, .96) 100%),
    radial-gradient(130% 75% at 50% 8%, transparent 35%, rgba(12, 11, 15, .6) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(227, 180, 105, .10), transparent 60%),
    radial-gradient(90% 60% at 50% 110%, rgba(88, 74, 120, .12), transparent 70%);
}

.app {
  position: relative;
  z-index: 2;
  max-width: 680px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 0 18px calc(16px + env(safe-area-inset-bottom));
}

/* ---------- top bar ---------- */
.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0 12px;
  background: linear-gradient(to bottom, var(--bg) 70%, transparent);
  backdrop-filter: blur(6px);
}
.filing { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--amber);
  opacity: .85;
}
.filing strong {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ghost-btn {
  margin-left: auto;
  flex: 0 0 auto;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 13px;
  cursor: pointer;
}
.ghost-btn span { color: var(--amber); font-family: var(--mono); font-size: 11px; }
.ghost-btn:hover { border-color: #3d3648; }

/* ---------- screens ---------- */
#stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-bottom: 8px;
}

/* transform-only: an interrupted animation must never leave text invisible */
.screen { flex: 1; display: flex; flex-direction: column; animation: rise .3s ease both; }
@keyframes rise {
  from { transform: translateY(8px); }
  to { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .screen { animation: none; }
}

.screen.center { justify-content: center; }

.prose p {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.68;
  color: #e6ded2;
  text-shadow: 0 1px 12px rgba(8, 7, 11, .9), 0 0 2px rgba(8, 7, 11, .8);
  margin: 0 0 15px;
}
.prose p:last-child { margin-bottom: 0; }

.speaker {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 16px;
}
.avatar {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .04em;
  color: #0c0b0f;
  background: linear-gradient(140deg, var(--amber), #b98a49);
}
.speaker h2 { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.speaker span { font-size: 12px; color: var(--dim); }

.kicker {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 10px;
}

.prompt {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  line-height: 1.5;
  color: var(--amber);
  margin: 0 0 14px;
}

.actions { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.action {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  font-family: var(--sans);
  font-size: 14.5px;
  font-weight: 550;
  color: var(--text);
  background: rgba(21, 19, 26, .72);
  backdrop-filter: blur(9px) saturate(1.05);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 15px;
  cursor: pointer;
  transition: border-color .15s, transform .12s, background .15s;
}
.action:hover { border-color: #3f374c; background: var(--panel-2); }
.action:active { transform: scale(.99); }
.action .arrow { margin-left: auto; color: var(--dim); font-size: 17px; }
.action.primary { border-color: rgba(227, 180, 105, .5); background: linear-gradient(180deg, rgba(227, 180, 105, .12), rgba(227, 180, 105, .04)); }
.action.primary .arrow { color: var(--amber); }
.action[disabled] { opacity: .42; cursor: default; }
.action small { color: var(--dim); font-size: 11.5px; font-weight: 500; }

/* ---------- choice deck ---------- */
.deck {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  touch-action: pan-y;
  user-select: none;
  transition: transform .18s ease;
  will-change: transform;
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: space-between;
  min-height: 158px;
  padding: 16px 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(28, 25, 34, .78), rgba(21, 19, 26, .72));
  backdrop-filter: blur(10px) saturate(1.05);
  color: var(--text);
  font-family: var(--sans);
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.card strong { font-family: var(--serif); font-size: 16px; font-weight: 600; line-height: 1.35; }
.card em { font-style: normal; font-size: 12px; line-height: 1.45; color: var(--dim); }
.card .dir {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--dim);
  text-transform: uppercase;
}
.card.lit { border-color: rgba(227, 180, 105, .75); box-shadow: 0 0 0 1px rgba(227, 180, 105, .35), 0 12px 34px rgba(227, 180, 105, .14); }
.card.lit .dir { color: var(--amber); }
.card.picked { transform: scale(.97); }

.hint {
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dim);
  text-align: center;
}

/* ---------- accuse ---------- */
.suspects { display: grid; gap: 7px; margin-bottom: 14px; }
.suspect {
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  padding: 10px 13px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(21, 19, 26, .72);
  backdrop-filter: blur(9px);
  color: var(--text);
  cursor: pointer;
  font-family: var(--sans);
}
.suspect:hover { border-color: #3f374c; }
.suspect.sel { border-color: var(--amber); background: rgba(227, 180, 105, .08); }
.suspect .avatar { width: 34px; height: 34px; flex-basis: 34px; font-size: 12px; border-radius: 10px; }
.suspect h3 { margin: 0; font-size: 14px; font-weight: 650; }
.suspect p { margin: 2px 0 0; font-size: 11.5px; color: var(--dim); }

.cta {
  width: 100%;
  padding: 15px;
  border-radius: 14px;
  border: 0;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 700;
  color: #14100a;
  background: linear-gradient(180deg, #edc27c, var(--amber));
  cursor: pointer;
}
.cta[disabled] { background: var(--panel-2); color: var(--dim); cursor: default; }

/* ---------- verdict ---------- */
/* the verdict reads the same section language as the night and the accusation */
.ledger h2.pane-label,
.traps h2.pane-label { margin-top: 0; }
.verdict-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.rating {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 700;
  border: 2px solid var(--amber);
  color: var(--amber);
}
.rating.b { border-color: var(--red); color: var(--red); }
.verdict-head h2 { margin: 0; font-size: 20px; letter-spacing: -.02em; }
.verdict-head p { margin: 3px 0 0; font-size: 12px; color: var(--dim); font-family: var(--mono); letter-spacing: .08em; text-transform: uppercase; }

/* the filed accusation: every link of the proof, proved or missed, then the traps */
.ledger { margin: 20px 0 6px; border-top: 1px solid var(--line); padding-top: 14px; }
.ledger ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 11px; }
.link { display: grid; grid-template-columns: 16px 1fr; column-gap: 8px; }
.link .mark { font-size: 12px; line-height: 1.6; color: var(--dim); }
.link.proved .mark { color: var(--green); }
.link.missed .mark { color: var(--red); }
.link .proves { grid-column: 2; margin: 0; font-size: 13.5px; line-height: 1.55; }
.link.missed .proves { color: var(--dim); }
.link .with {
  grid-column: 2;
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dim);
}
.link.proved .with { color: var(--amber); opacity: .8; }

.traps { margin: 20px 0 6px; border-top: 1px solid var(--line); padding-top: 14px; }
.traps ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.trap b { display: block; font-size: 12.5px; font-weight: 650; }
.trap .looks,
.trap .actually { display: block; margin-top: 4px; font-size: 12.5px; line-height: 1.5; color: var(--dim); }
.trap .actually { color: var(--text); opacity: .86; }
.trap .tag {
  display: inline-block;
  margin-right: 6px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dim);
}

/* the one forward step sits above the row on a line of its own */
.next-case { margin-top: 20px; }

.row { display: flex; gap: 10px; margin-top: 20px; }
.row .cta, .row .ghost-btn { flex: 1; }
.row .ghost-btn { margin: 0; text-align: center; padding: 15px; border-radius: 14px; font-size: 14px; }

/* ---------- footer ---------- */
.foot { padding: 14px 0 4px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stamp { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; color: #514a5e; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* the way out, and the next case beside it: same tone as .shelf-back, which stays untouched */
.foot-nav { display: flex; align-items: center; gap: 14px; flex: none; }
.shelf-next {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: color-mix(in srgb, currentColor 64%, transparent);
  text-decoration: none;
  padding: 3px 0;
  border-bottom: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.shelf-next:hover { color: currentColor; border-bottom-color: color-mix(in srgb, currentColor 45%, transparent); }
.shelf-next:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 3px; }
.shelf-next[hidden] { display: none; }

/* ---------- drawer ---------- */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(6, 5, 9, .66);
  display: flex;
  align-items: flex-end;
  backdrop-filter: blur(2px);
}
.drawer[hidden] { display: none; }
.drawer-panel {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  max-height: 82dvh;
  overflow: auto;
  background: var(--panel);
  border-top: 1px solid var(--line);
  border-radius: 20px 20px 0 0;
  padding: 18px 18px calc(24px + env(safe-area-inset-bottom));
  animation: sheet .26s ease both;
}
@keyframes sheet { from { transform: translateY(30px); opacity: .6; } to { transform: none; opacity: 1; } }
.drawer-head { display: flex; align-items: center; margin-bottom: 12px; }
.drawer-head h2 { margin: 0; font-family: var(--mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--dim); }
.ev-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ev-list li {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: var(--panel-2);
}
.ev-list h3 { margin: 0; font-size: 13.5px; font-weight: 650; }
.ev-list .where { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--amber); opacity: .8; }
.ev-list p { margin: 7px 0 0; font-family: var(--serif); font-size: 14px; line-height: 1.6; color: var(--dim); }
.ev-list .empty { border: 1px dashed var(--line); background: transparent; color: var(--dim); font-size: 13px; font-family: var(--serif); }

@media (max-width: 380px) {
  .card { min-height: 176px; padding: 14px 12px; }
  .card strong { font-size: 15px; }
  /* two people a row even here: the cards get tighter, not stacked */
  .cast { gap: 6px; }
  .cast-person { grid-template-columns: 26px minmax(0, 1fr); gap: 7px; padding: 8px 9px; }
  .cast-person .avatar { width: 26px; height: 26px; flex-basis: 26px; font-size: 10px; }
  .cast-body b { font-size: 12px; }
  .cast-body p { font-size: 11px; line-height: 1.45; }
}

/* ---------- narrow / portrait: let the scene read through ---------- */
@media (max-aspect-ratio: 3 / 4) {
  .backdrop img { filter: brightness(1.18) saturate(1.05) blur(.3px); }
  .backdrop::after {
    background:
      linear-gradient(180deg,
        rgba(12, 11, 15, .52) 0%,
        rgba(12, 11, 15, .22) 18%,
        rgba(12, 11, 15, .08) 46%,
        rgba(12, 11, 15, .52) 76%,
        rgba(12, 11, 15, .95) 100%),
      radial-gradient(120% 70% at 50% 0%, transparent 45%, rgba(12, 11, 15, .5) 100%);
  }
  .action { background: rgba(18, 16, 22, .56); }
  .card { background: linear-gradient(180deg, rgba(30, 27, 36, .72), rgba(20, 18, 25, .62)); }
  .suspect { background: rgba(18, 16, 22, .58); }
}

/* ==========================================================================
   The night: clock in the header, the hub as a place, the file as a desk
   ========================================================================== */

/* ---------- clock ---------- */
.bar .night {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(227, 180, 105, .28);
  background: rgba(227, 180, 105, .09);
  color: var(--amber);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .08em;
  font-variant-numeric: tabular-nums;
}
.bar .night i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 9px currentColor;
}
.bar .ghost-btn { margin-left: 8px; }
.night.bump { animation: tick .5s ease; }
@keyframes tick {
  0% { transform: none; }
  40% { transform: translateY(-1px); border-color: rgba(227, 180, 105, .7); }
  100% { transform: none; }
}

/* ---------- the investigation: the brief, the night's log, the foot ---------- */
.board-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.board-head .kicker { margin-bottom: 10px; }
.board-clock { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; color: var(--amber); opacity: .8; }

/* how much night is left: one line, read before anything is touched */
.board-budget {
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--dim);
}
.board-budget b { font-weight: 600; color: var(--amber); letter-spacing: .06em; }
.board-budget.shut { opacity: .6; }
.board-budget.shut b { color: var(--dim); }

/* the three acts: every screen says which act of the night it is */
.act-tag {
  margin: 0 0 8px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--amber);
  opacity: .75;
}

/* the checkpoint: the door between the night and the name */
.checkpoint-list { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 8px; }
.check {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(21, 19, 26, .55);
}
.check .mark { font-family: var(--mono); font-size: 11px; color: var(--dim); }
.check b { font-size: 13px; font-weight: 550; }
.check.done { border-color: color-mix(in srgb, var(--green) 35%, transparent); }
.check.done .mark { color: var(--green); }
.check.soft { opacity: .78; }
.check-open { display: flex; flex-wrap: wrap; gap: 5px; width: 100%; padding-left: 21px; }
.check-open em {
  font-style: normal;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--dim);
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.checkpoint-close[disabled] { opacity: .55; }

.pane-label {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 20px 0 10px;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--dim);
}
.pane-count { margin-left: auto; color: var(--amber); opacity: .8; letter-spacing: .1em; }

/* the brief: where this is, what happened, who is here, what you owe the file */
.brief { margin: 0 0 8px; }
.brief-setting {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.75;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--dim);
}
.brief-logline { margin: 0 0 14px; font-family: var(--serif); font-size: 17px; line-height: 1.6; }
.brief-incident { margin: 0 0 6px; padding-left: 13px; border-left: 1px solid var(--line); }
.brief-incident p { margin: 0 0 9px; font-family: var(--serif); font-size: 14px; line-height: 1.65; color: var(--dim); }

.cast { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cast-person {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(21, 19, 26, .55);
}
.cast-person .avatar { width: 30px; height: 30px; flex-basis: 30px; font-size: 11px; border-radius: 9px; }
.cast-body b { display: block; font-size: 12.5px; font-weight: 600; }
.cast-role {
  display: block;
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--amber);
  opacity: .8;
}
.cast-body p { margin: 6px 0 0; font-family: var(--serif); font-size: 12.5px; line-height: 1.55; color: var(--dim); }
.brief-job {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-left: 2px solid var(--amber);
  background: rgba(227, 180, 105, .06);
  font-family: var(--serif);
  font-size: 13.5px;
  line-height: 1.6;
}

/* the night: one entry per question asked, stamped with the hour it cost */
.log { list-style: none; margin: 0; padding: 0; }
/* the sticky header must not swallow the entry the page scrolled to */
.moment { padding: 16px 0 6px; border-top: 1px solid var(--line); scroll-margin-top: 78px; }
.moment:first-child { border-top: none; padding-top: 4px; }
.moment-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.moment-at { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; color: var(--amber); }
.moment-label { font-family: var(--mono); font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
.moment-body { display: grid; gap: 14px; }
.room p { margin: 0 0 12px; font-family: var(--serif); font-size: 16px; line-height: 1.68; color: #e6ded2; }
.room p:last-child { margin-bottom: 0; }
.room .speaker { margin-bottom: 10px; }

.moment-filed {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 16px;
  margin: 12px 0 4px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}
.filed-tag { font-family: var(--mono); font-size: 9px; letter-spacing: .16em; text-transform: uppercase; color: var(--green); }
.filed-item { font-size: 12px; font-weight: 550; }
.filed-item em {
  display: block;
  margin-top: 1px;
  font-style: normal;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--dim);
}

/* the fork: the only thing on the page that waits */
.fork { padding: 12px 14px; border: 1px solid rgba(227, 180, 105, .28); border-radius: 14px; background: rgba(227, 180, 105, .05); }
.fork .prompt { margin: 0 0 10px; }
.fork-options { display: grid; gap: 8px; }
.fork-option {
  display: grid;
  gap: 4px;
  text-align: left;
  padding: 11px 13px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(21, 19, 26, .7);
  color: var(--text);
  font-family: var(--sans);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.fork-option:hover { border-color: rgba(227, 180, 105, .6); background: var(--panel-2); }
.fork-option strong { font-size: 13.5px; font-weight: 600; }
.fork-option span { font-family: var(--serif); font-size: 12px; line-height: 1.5; color: var(--dim); }
.fork-taken { margin: 0; font-family: var(--serif); font-size: 13.5px; color: var(--amber); }

/* the foot: the only strip that spends the night, and the one way into the accusation */
.night-foot { margin-top: 22px; padding-top: 6px; border-top: 1px solid var(--line); }
.foot-hint { margin: 0 0 10px; font-family: var(--serif); font-size: 12.5px; line-height: 1.5; color: var(--dim); }
.enquiries { display: flex; flex-wrap: wrap; gap: 7px; }
.enquiry {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 11px;
  font-family: var(--sans);
  text-align: left;
  color: var(--text);
  background: rgba(21, 19, 26, .6);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.enquiry:hover { border-color: #3f374c; background: var(--panel-2); }
.enquiry-kind { font-family: var(--mono); font-size: 10px; color: var(--amber); }
.enquiry-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.enquiry-body b { font-size: 12.5px; font-weight: 550; }
.enquiry-body em {
  font-style: normal;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--dim);
}
/* Asked once, still open to a second go: dimmed, not dead — the other branch may still pay. */
.enquiry.opened:not(.read):not(.blocked) { opacity: .58; }
.enquiry.opened:not(.read):not(.blocked):hover { opacity: 1; }
.enquiry.read { opacity: .55; cursor: default; }
.enquiry.blocked { opacity: .38; cursor: not-allowed; }
.enquiry.blocked:hover { border-color: var(--line); background: rgba(21, 19, 26, .6); }
.night-close { display: block; width: 100%; margin-top: 12px; }
.night-foot .hint { margin-top: 10px; }
.foot-note {
  margin: 10px 0 0;
  font-family: var(--serif);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--dim);
  opacity: .85;
}

/* ---------- the accusation: five questions, opened one at a time ---------- */
.questions { list-style: none; margin: 0 0 6px; padding: 0; }
.q-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}
.q-item:first-child { border-top: none; }
.q-no { padding-top: 3px; font-family: var(--mono); font-size: 10px; letter-spacing: .08em; color: var(--amber); opacity: .7; }
.q-main { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.q-label { font-family: var(--serif); font-size: 15.5px; line-height: 1.45; color: var(--text); }
.q-item:not(.answered) .q-label { opacity: .72; }
.q-open {
  padding: 4px 0;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--amber);
  background: none;
  border: none;
  border-bottom: 1px dashed rgba(227, 180, 105, .45);
  cursor: pointer;
}
.q-open:hover { color: var(--text); }
.q-claim {
  display: flex;
  align-items: baseline;
  gap: 9px;
  max-width: 100%;
  padding: 7px 10px;
  text-align: left;
  color: var(--text);
  font-family: var(--sans);
  background: rgba(227, 180, 105, .09);
  border: 1px solid rgba(227, 180, 105, .38);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .15s;
}
.q-claim:hover { border-color: rgba(227, 180, 105, .72); }
.q-claim b { font-size: 12.5px; font-weight: 600; }
.q-claim span { font-family: var(--serif); font-size: 12px; color: var(--dim); }
.q-claim i { margin-left: auto; font-style: normal; font-size: 11px; color: var(--dim); }
.q-empty {
  margin: 0;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dim);
  opacity: .6;
}
.q-picker {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 10px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: rgba(21, 19, 26, .5);
}
.q-picker-hint { margin: 0 0 2px; font-family: var(--serif); font-size: 12px; color: var(--dim); }
.q-choice {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 8px 10px;
  text-align: left;
  color: var(--text);
  font-family: var(--sans);
  background: rgba(21, 19, 26, .7);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .15s;
}
.q-choice:hover { border-color: rgba(227, 180, 105, .6); }
.q-choice b { font-size: 12.5px; font-weight: 600; }
.q-choice span { font-family: var(--serif); font-size: 11.5px; line-height: 1.45; color: var(--dim); }
.q-choice em {
  font-style: normal;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--dim);
  opacity: .8;
}
.q-choice.taken { opacity: .6; }
.accusation-back, .checkpoint-back { display: block; width: 100%; margin: 14px 0 0; }

/* ---------- reading a scene ---------- */
.prose.reading p { animation: line-in .46s ease backwards; }
.prose.reading p:nth-child(2) { animation-delay: .08s; }
.prose.reading p:nth-child(3) { animation-delay: .16s; }
.prose.reading p:nth-child(4) { animation-delay: .24s; }
.prose.reading p:nth-child(n + 5) { animation-delay: .32s; }
@keyframes line-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.continue {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 22px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(21, 19, 26, .55);
  backdrop-filter: blur(8px);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.continue:hover { border-color: #3f374c; background: var(--panel-2); }
.continue .arrow { margin-left: auto; color: var(--amber); font-size: 17px; }
.continue kbd {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dim);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 2px 5px;
}

.kicker .count {
  margin-left: 7px;
  font-size: 9.5px;
  letter-spacing: .14em;
  color: var(--amber);
}

.ghost-btn.reopen { grid-column: 2; justify-self: start; margin: 6px 0 0; padding: 6px 10px; font-size: 11px; }

/* ---------- the case board, in the drawer ---------- */
.board-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.board-tab {
  flex: 1;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
}
.board-tab.sel { color: var(--amber); border-color: rgba(227, 180, 105, .5); background: rgba(227, 180, 105, .08); }
.board-empty { margin: 0; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; color: var(--dim); }
.board-minute {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.board-minute .at { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; color: var(--amber); }
.at-item { display: grid; gap: 2px; margin-bottom: 8px; }
.at-item:last-child { margin-bottom: 0; }
.at-item b { font-size: 12.5px; font-weight: 650; }
.at-item span {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--dim);
}
.board-foot {
  margin: 14px 0 0;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--dim);
}
.board-person { padding: 10px 0 14px; border-bottom: 1px solid var(--line); }
.board-person h3 { margin: 0 0 8px; font-size: 13px; font-weight: 650; }
.board-person h3 span { display: block; margin-top: 2px; font-size: 11px; font-weight: 400; color: var(--dim); }
.said { margin-bottom: 10px; }
.said .at { font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; color: var(--amber); }
.said p { margin: 4px 0 0; font-family: var(--serif); font-size: 13px; line-height: 1.55; color: var(--text); }
.board-exhibit { padding: 10px 0 14px; border-bottom: 1px solid var(--line); }
.board-exhibit .where {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--dim);
}
.board-exhibit h3 { margin: 5px 0 4px; font-size: 13px; font-weight: 650; }
.board-exhibit p { margin: 0; font-size: 12.5px; line-height: 1.55; color: var(--dim); }

/* the story clock: the case's own axis, one minute per row, sources named */
.story-point {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  padding: 9px 0;
  border-top: 1px dashed var(--line);
}
.story-point:first-of-type { border-top: none; }
.story-point .at { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; color: var(--amber); }
.story-item { margin: 0 0 7px; }
.story-item:last-child { margin-bottom: 0; }
.story-item .story-kind {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dim);
  margin-right: 7px;
}
.story-item b { font-size: 12.5px; font-weight: 650; }
.story-item p { margin: 3px 0 0; font-family: var(--serif); font-size: 12.5px; line-height: 1.55; color: var(--dim); }
.story-point.busy { border-left: 2px solid var(--amber); padding-left: 9px; }
.story-flag {
  grid-column: 2;
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--amber);
  opacity: .85;
}
.story-night-head {
  margin: 16px 0 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--dim);
}
.story-night { display: flex; gap: 10px; padding: 4px 0; font-size: 12px; color: var(--dim); }
.story-night .at { font-family: var(--mono); font-size: 11px; color: var(--amber); }

.closing {
  margin: 18px 0 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dim);
}

/* ---------- evidence drawer count ---------- */
.ev-total {
  margin-left: 10px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .1em;
  color: var(--dim);
  text-transform: uppercase;
}

/* ---------- the toast when something is filed ---------- */
.filed {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 11px 16px;
  border-radius: 12px;
  border: 1px solid rgba(227, 180, 105, .42);
  background: rgba(18, 16, 22, .95);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.filed.show { opacity: 1; transform: translate(-50%, 0); }
.filed b { font-family: var(--sans); font-size: 13px; font-weight: 650; color: var(--text); }
.filed b::before {
  content: "Filed · ";
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--amber);
}
.filed span {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dim);
}

.ghost-btn.ping { animation: ping .72s ease; }
@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(227, 180, 105, .45); }
  100% { box-shadow: 0 0 0 12px rgba(227, 180, 105, 0); }
}

/* ---------- the building breathes ---------- */
.backdrop img { animation: drift 52s ease-in-out infinite alternate; }
@keyframes drift {
  from { transform: scale(1.06) translate3d(0, 0, 0); }
  to { transform: scale(1.10) translate3d(-1.2%, -1.4%, 0); }
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: .05;
  background-image: radial-gradient(rgba(255, 255, 255, .85) .5px, transparent .5px);
  background-size: 3px 3px;
}

@media (prefers-reduced-motion: reduce) {
  .backdrop img,
  .prose.reading p,
  .night,
  .continue,
  .filed,
  .ghost-btn { animation: none !important; transition: none !important; }
  .filed { transform: translate(-50%, 0); }
}
