:root {
  --ink: #151512;
  --paper: #f0ede6;
  --paper-2: #e7e2d8;
  --paper-3: #dad4c8;
  --muted: #79766f;
  --line: rgba(21, 21, 18, 0.14);
  --red: #7f1d1d;
  --red-bright: #a22c2c;
  --night: #10100f;
  --night-2: #191917;
  --green: #33594b;
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  background: #090909;
  color: var(--ink);
  font-family: var(--sans);
}

body {
  min-height: 100dvh;
  overflow-x: hidden;
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--red-bright);
  outline-offset: 2px;
}

.desktop-stage {
  display: none;
}

#game-shell {
  position: relative;
  width: 100%;
  min-height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--paper);
}

#game-shell::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}

.screen {
  min-height: 100dvh;
}

.is-hidden {
  display: none !important;
}

.intro-screen {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  color: #f5f0e7;
  background: #0d0e0d;
  overflow: hidden;
}

.intro-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 48% center;
  filter: saturate(0.72) contrast(1.08) brightness(0.72);
  animation: slowReveal 12s ease-out both;
}

.intro-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(6, 7, 6, 0.18) 0%, rgba(6, 7, 6, 0.12) 26%, rgba(6, 7, 6, 0.78) 73%, #090a09 100%),
    linear-gradient(90deg, rgba(5, 6, 5, 0.45), transparent 58%);
}

.intro-header,
.case-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 84px;
  padding: max(20px, env(safe-area-inset-top)) 22px 12px;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: 0.16em;
}

.brand-glyph {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.55);
  font-family: var(--serif);
  font-size: 14px;
}

.sound-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: rgba(8, 8, 8, 0.24);
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.sound-toggle i {
  display: block;
  width: 2px;
  height: 5px;
  background: currentColor;
  transition: height 180ms ease;
}

.sound-toggle.is-on i:nth-child(1) { height: 9px; animation: bars 0.9s infinite alternate; }
.sound-toggle.is-on i:nth-child(2) { height: 15px; animation: bars 0.7s 0.1s infinite alternate; }
.sound-toggle.is-on i:nth-child(3) { height: 7px; animation: bars 0.8s 0.2s infinite alternate; }

.intro-copy {
  position: relative;
  z-index: 2;
  align-self: flex-end;
  width: 100%;
  margin-top: auto;
  padding: 0 25px max(30px, env(safe-area-inset-bottom));
  animation: riseIn 900ms 160ms cubic-bezier(.2,.72,.2,1) both;
}

.eyebrow {
  margin: 0 0 13px;
  color: rgba(244, 239, 230, 0.62);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.25em;
}

.intro-copy h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(58px, 18vw, 86px);
  font-weight: 500;
  line-height: 0.88;
  letter-spacing: 0.05em;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.case-hook {
  margin: 22px 0 25px;
  color: rgba(245, 240, 231, 0.78);
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.8;
}

.primary-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 58px;
  padding: 0 8px 0 20px;
  border: 0;
  background: #efeae0;
  color: #141412;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.12em;
  cursor: pointer;
}

.button-arrow {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  background: var(--red);
  color: #fff;
  font-size: 18px;
}

.intro-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 15px;
  color: rgba(244, 239, 230, 0.45);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.case-screen {
  position: relative;
  padding-bottom: calc(78px + env(safe-area-inset-bottom));
  background: var(--paper);
}

.case-header {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 82px;
  color: var(--ink);
  background: rgba(240, 237, 230, 0.88);
  border-bottom: 1px solid rgba(21, 21, 18, 0.08);
  backdrop-filter: blur(18px);
}

.case-header p {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.24em;
}

.case-header h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.header-actions {
  display: flex;
  gap: 8px;
}

.sound-toggle.compact {
  width: 38px;
  height: 38px;
  color: var(--ink);
  border-color: var(--line);
  background: transparent;
}

.intel-button {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.intel-button span {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: conic-gradient(var(--red) calc(var(--progress) * 1%), var(--paper-3) 0);
  -webkit-mask: radial-gradient(transparent 58%, #000 60%);
  mask: radial-gradient(transparent 58%, #000 60%);
  transition: background 400ms ease;
}

.intel-button b {
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 9px;
}

.view-root {
  min-height: calc(100dvh - 160px);
  padding: 18px 18px 26px;
  animation: viewIn 280ms ease both;
}

.bottom-nav {
  position: fixed;
  z-index: 15;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: calc(68px + env(safe-area-inset-bottom));
  padding: 5px 8px env(safe-area-inset-bottom);
  border-top: 1px solid rgba(21, 21, 18, 0.1);
  background: rgba(236, 232, 223, 0.94);
  backdrop-filter: blur(22px);
}

.nav-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #8b877e;
  font-size: 9px;
  cursor: pointer;
}

.nav-item.is-active {
  color: var(--ink);
}

.nav-item.is-active::after {
  content: "";
  position: absolute;
  bottom: 1px;
  width: 18px;
  height: 2px;
  background: var(--red);
}

.nav-icon {
  height: 24px;
  font-family: var(--serif);
  font-size: 20px;
  line-height: 22px;
}

.nav-badge {
  position: absolute;
  top: 6px;
  left: calc(50% + 8px);
  display: grid;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  place-items: center;
  border-radius: 10px;
  background: var(--red);
  color: #fff;
  font-size: 8px;
  font-style: normal;
}

.section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 2px 0 10px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.18em;
}

.section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  margin-left: 12px;
  background: var(--line);
}

.scene-card {
  position: relative;
  height: 242px;
  margin-bottom: 18px;
  overflow: hidden;
  background: #161615;
}

.scene-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 69%;
  filter: saturate(0.65) contrast(1.08) brightness(0.78);
}

.scene-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 48%, rgba(8, 8, 7, 0.84));
}

.scene-index {
  position: absolute;
  z-index: 2;
  top: 14px;
  left: 14px;
  padding: 5px 7px;
  background: rgba(12, 12, 11, 0.68);
  color: #f2ede4;
  font-family: ui-monospace, monospace;
  font-size: 8px;
  letter-spacing: 0.14em;
}

.scene-caption {
  position: absolute;
  z-index: 2;
  right: 15px;
  bottom: 13px;
  left: 15px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  color: #f4efe6;
}

.scene-caption h3 {
  margin: 0 0 2px;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
}

.scene-caption p {
  margin: 0;
  color: rgba(244, 239, 230, 0.55);
  font-size: 9px;
}

.scene-caption span {
  font-family: ui-monospace, monospace;
  font-size: 10px;
}

.brief-card {
  padding: 20px;
  background: #e9e4da;
  border: 1px solid rgba(21, 21, 18, 0.08);
}

.brief-card .quote-mark {
  color: var(--red);
  font-family: var(--serif);
  font-size: 32px;
  line-height: 1;
}

.brief-card blockquote {
  margin: -8px 0 17px;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.8;
}

.brief-card p {
  margin: 0;
  color: #66625b;
  font-size: 12px;
  line-height: 1.9;
}

.facts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin: 18px 0;
  background: var(--line);
  border: 1px solid var(--line);
}

.fact-cell {
  min-height: 84px;
  padding: 14px;
  background: var(--paper);
}

.fact-cell span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.16em;
}

.fact-cell strong {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
}

.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 54px 1fr;
  min-height: 58px;
  padding-bottom: 16px;
}

.timeline li::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: -2px;
  left: 45px;
  width: 1px;
  background: var(--line);
}

.timeline li:last-child::before { display: none; }

.timeline time {
  position: relative;
  font-family: ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
}

.timeline time::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 5px;
  width: 6px;
  height: 6px;
  border: 1px solid var(--red);
  border-radius: 50%;
  background: var(--paper);
}

.timeline h4 {
  margin: 0 0 5px;
  font-family: var(--serif);
  font-size: 14px;
}

.timeline p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.suspect-strip {
  display: flex;
  gap: 9px;
  margin: 0 -18px 14px;
  padding: 0 18px 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.suspect-strip::-webkit-scrollbar { display: none; }

.suspect-tab {
  position: relative;
  flex: 0 0 96px;
  padding: 11px 10px 10px;
  border: 1px solid var(--line);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: 180ms ease;
}

.suspect-tab.is-active {
  background: var(--night);
  color: #f0ebe2;
  border-color: var(--night);
}

.suspect-tab small,
.suspect-tab strong {
  display: block;
}

.suspect-tab small {
  margin-bottom: 12px;
  color: var(--muted);
  font-family: ui-monospace, monospace;
  font-size: 7px;
  letter-spacing: 0.12em;
}

.suspect-tab.is-active small { color: rgba(240, 235, 226, 0.45); }
.suspect-tab strong { font-family: var(--serif); font-size: 14px; }
.suspect-tab em { font-size: 8px; font-style: normal; opacity: 0.55; }

.suspect-avatar {
  position: relative;
  display: grid;
  width: 34px;
  height: 34px;
  margin-bottom: 9px;
  place-items: center;
  overflow: hidden;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 14px;
}

.suspect-profile {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: end;
  padding: 16px;
  background: #e8e3d9;
  border-left: 2px solid var(--red);
}

.suspect-profile .micro-label,
.pressure-box .micro-label {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.16em;
}

.suspect-profile h3 {
  margin: 0 0 5px;
  font-family: var(--serif);
  font-size: 22px;
}

.suspect-profile p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.pressure-box {
  min-width: 78px;
  text-align: right;
}

.pressure-track {
  width: 78px;
  height: 3px;
  margin-top: 8px;
  overflow: hidden;
  background: var(--paper-3);
}

.pressure-track i {
  display: block;
  width: var(--pressure);
  height: 100%;
  background: var(--red);
  transition: width 400ms ease;
}

.chat-window {
  display: flex;
  flex-direction: column;
  gap: 13px;
  min-height: 250px;
  max-height: calc(100dvh - 420px);
  margin: 14px 0;
  padding: 2px 3px 12px;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.message {
  max-width: 86%;
  animation: messageIn 260ms ease both;
}

.message p {
  margin: 0;
  padding: 11px 13px;
  font-size: 12px;
  line-height: 1.7;
}

.message small {
  display: block;
  margin: 5px 4px 0;
  color: var(--muted);
  font-size: 8px;
}

.message.suspect p {
  background: #e2ddd2;
  border-radius: 0 12px 12px 12px;
}

.message.player {
  align-self: flex-end;
}

.message.player p {
  background: var(--night);
  color: #f0ece4;
  border-radius: 12px 0 12px 12px;
}

.message.player small { text-align: right; }

.message.system {
  max-width: 100%;
  align-self: stretch;
  border: 1px solid rgba(127, 29, 29, 0.18);
  color: var(--red);
  text-align: center;
}

.message.system p {
  padding: 8px;
  background: rgba(127, 29, 29, 0.04);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.typing {
  display: flex;
  gap: 4px;
  width: 48px;
  padding: 13px !important;
}

.typing i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--muted);
  animation: typing 0.8s infinite alternate;
}

.typing i:nth-child(2) { animation-delay: 0.2s; }
.typing i:nth-child(3) { animation-delay: 0.4s; }

.prompt-chips {
  display: flex;
  gap: 7px;
  margin: 0 -18px 10px;
  padding: 0 18px;
  overflow-x: auto;
  scrollbar-width: none;
}

.prompt-chips::-webkit-scrollbar { display: none; }

.prompt-chip {
  flex: 0 0 auto;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.28);
  color: #5f5c56;
  font-size: 10px;
  cursor: pointer;
}

.chat-compose {
  display: grid;
  grid-template-columns: 1fr 43px;
  gap: 8px;
  padding: 6px;
  background: #e4dfd5;
  border: 1px solid rgba(21, 21, 18, 0.08);
}

.chat-compose input {
  width: 100%;
  height: 41px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
}

.chat-compose input::placeholder { color: #9a968d; }

.send-button {
  width: 43px;
  height: 41px;
  padding: 0;
  border: 0;
  background: var(--red);
  color: #fff;
  cursor: pointer;
}

.ai-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 9px 3px 0;
  color: #8b877f;
  font-size: 8px;
  line-height: 1.6;
}

.ai-note::before {
  content: "AI";
  padding: 2px 4px;
  background: var(--ink);
  color: var(--paper);
  font-family: ui-monospace, monospace;
  font-size: 7px;
}

.evidence-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 16px;
}

.evidence-intro h3 {
  margin: 0 0 5px;
  font-family: var(--serif);
  font-size: 21px;
}

.evidence-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.link-counter {
  flex: 0 0 auto;
  padding: 7px 8px;
  border: 1px solid var(--line);
  font-family: ui-monospace, monospace;
  font-size: 9px;
}

.evidence-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.evidence-card {
  position: relative;
  min-height: 155px;
  padding: 13px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.2);
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.evidence-card:active { transform: scale(0.98); }
.evidence-card.is-selected { border-color: var(--red); background: rgba(127, 29, 29, 0.06); }
.evidence-card.is-locked { cursor: default; opacity: 0.46; filter: grayscale(1); }

.evidence-number {
  display: block;
  margin-bottom: 18px;
  color: var(--red);
  font-family: ui-monospace, monospace;
  font-size: 8px;
  letter-spacing: 0.12em;
}

.evidence-visual {
  position: absolute;
  top: 10px;
  right: 9px;
  width: 48px;
  height: 42px;
  opacity: 0.6;
}

.evidence-visual.wave {
  background: repeating-linear-gradient(90deg, transparent 0 3px, var(--red) 3px 4px);
  clip-path: polygon(0 45%, 8% 38%, 14% 55%, 22% 20%, 30% 75%, 38% 45%, 46% 55%, 54% 10%, 62% 80%, 70% 38%, 78% 58%, 86% 30%, 94% 52%, 100% 45%, 100% 55%, 94% 48%, 86% 70%, 78% 42%, 70% 62%, 62% 20%, 54% 90%, 46% 45%, 38% 55%, 30% 25%, 22% 80%, 14% 45%, 8% 62%, 0 55%);
}

.evidence-visual.rings {
  border: 1px solid var(--ink);
  border-radius: 50%;
  box-shadow: inset 0 0 0 8px var(--paper), inset 0 0 0 9px var(--ink);
}

.evidence-visual.log {
  border-left: 1px solid var(--ink);
  background: repeating-linear-gradient(180deg, transparent 0 7px, var(--ink) 7px 8px);
}

.evidence-visual.doc::before,
.evidence-visual.doc::after {
  content: "";
  position: absolute;
  inset: 5px 7px;
  border: 1px solid var(--ink);
}

.evidence-visual.doc::after {
  inset: 10px 13px 1px 1px;
  background: var(--paper);
}

.evidence-card h4 {
  position: relative;
  margin: 0 0 7px;
  font-family: var(--serif);
  font-size: 15px;
}

.evidence-card p {
  position: relative;
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

.evidence-card .lock-note {
  position: absolute;
  right: 10px;
  bottom: 9px;
  color: var(--ink);
  font-size: 8px;
}

.evidence-card .detail-note {
  position: absolute;
  right: 10px;
  bottom: 9px;
  color: var(--red);
  font-size: 8px;
}

.analysis-dock {
  position: sticky;
  bottom: 77px;
  z-index: 4;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
  padding: 12px;
  background: rgba(16, 16, 15, 0.94);
  color: #f1ece3;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(12px);
}

.analysis-dock p {
  margin: 0 0 3px;
  color: rgba(241, 236, 227, 0.55);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.analysis-dock strong {
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 500;
}

.analysis-dock button {
  height: 38px;
  padding: 0 13px;
  border: 0;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  cursor: pointer;
}

.analysis-dock button:disabled { opacity: 0.35; cursor: default; }

.insight-card {
  position: relative;
  margin-bottom: 10px;
  padding: 15px 14px 15px 38px;
  background: #e6e0d5;
  border: 1px solid rgba(21, 21, 18, 0.08);
}

.insight-card::before {
  content: attr(data-index);
  position: absolute;
  top: 15px;
  left: 13px;
  color: var(--red);
  font-family: ui-monospace, monospace;
  font-size: 9px;
}

.insight-card strong {
  display: block;
  margin-bottom: 5px;
  font-family: var(--serif);
  font-size: 14px;
}

.insight-card p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}

.verdict-hero {
  padding: 9px 0 22px;
  border-bottom: 1px solid var(--line);
}

.verdict-hero .case-seal {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 16px;
  place-items: center;
  border: 1px solid var(--red);
  color: var(--red);
  font-family: var(--serif);
}

.verdict-hero h3 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.35;
}

.verdict-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.verdict-section {
  margin-top: 22px;
}

.verdict-section h4 {
  margin: 0 0 11px;
  font-size: 10px;
  letter-spacing: 0.12em;
}

.choice-list {
  display: grid;
  gap: 8px;
}

.choice-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: transparent;
  text-align: left;
  font-size: 11px;
  cursor: pointer;
}

.choice-button::after {
  content: "";
  width: 10px;
  height: 10px;
  border: 1px solid #a19c93;
  border-radius: 50%;
}

.choice-button.is-selected {
  border-color: var(--red);
  background: rgba(127, 29, 29, 0.04);
}

.choice-button.is-selected::after {
  border-color: var(--red);
  box-shadow: inset 0 0 0 2px var(--paper);
  background: var(--red);
}

.submit-verdict {
  width: 100%;
  height: 55px;
  margin-top: 24px;
  border: 0;
  background: var(--night);
  color: #f2ede4;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  cursor: pointer;
}

.submit-verdict:disabled { opacity: 0.35; cursor: default; }

.verdict-hint {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 8px;
  text-align: center;
}

.result-view {
  margin: -18px;
  min-height: calc(100dvh - 150px);
  background: var(--night);
  color: #f1ece3;
}

.result-top {
  padding: 34px 24px 30px;
  background:
    linear-gradient(rgba(9,9,8,.44), rgba(9,9,8,.93)),
    url("assets/studio-noir.png") center 64% / cover;
}

.result-kicker {
  margin: 0 0 18px;
  color: rgba(241, 236, 227, 0.5);
  font-size: 8px;
  letter-spacing: 0.2em;
}

.result-score {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.result-score strong {
  font-family: var(--serif);
  font-size: 62px;
  font-weight: 400;
}

.result-score span { color: rgba(241, 236, 227, 0.5); font-size: 10px; }

.result-top h3 {
  margin: 5px 0 7px;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 500;
}

.result-top > p:last-child {
  margin: 0;
  color: rgba(241, 236, 227, 0.62);
  font-size: 10px;
}

.result-body {
  padding: 23px 21px 32px;
}

.truth-statement {
  margin: 0 0 23px;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.9;
}

.truth-statement b { color: #bc4c47; font-weight: 500; }

.truth-timeline {
  padding-left: 12px;
  border-left: 1px solid rgba(241, 236, 227, 0.16);
}

.truth-beat {
  position: relative;
  padding: 0 0 19px 14px;
}

.truth-beat::before {
  content: "";
  position: absolute;
  top: 5px;
  left: -16px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9c302e;
}

.truth-beat time {
  color: #b74b47;
  font-family: ui-monospace, monospace;
  font-size: 9px;
}

.truth-beat h4 { margin: 4px 0; font-family: var(--serif); font-size: 14px; }
.truth-beat p { margin: 0; color: rgba(241,236,227,.5); font-size: 10px; line-height: 1.7; }

.result-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.result-actions button {
  min-height: 48px;
  border: 1px solid rgba(241, 236, 227, 0.2);
  background: transparent;
  color: #f1ece3;
  font-size: 10px;
  cursor: pointer;
}

.result-actions button:first-child { background: #eee8dd; color: var(--ink); border-color: #eee8dd; }

.sheet-backdrop {
  position: fixed;
  z-index: 30;
  inset: 0;
  background: rgba(7, 7, 6, 0.5);
  backdrop-filter: blur(3px);
}

.intel-sheet {
  position: fixed;
  z-index: 31;
  right: 0;
  bottom: 0;
  left: 0;
  max-height: 76dvh;
  padding: 9px 20px calc(28px + env(safe-area-inset-bottom));
  overflow-y: auto;
  background: #ece7dd;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.28);
  animation: sheetUp 280ms cubic-bezier(.2,.72,.2,1) both;
}

.sheet-handle {
  width: 35px;
  height: 3px;
  margin: 0 auto 22px;
  border-radius: 4px;
  background: #b8b2a8;
}

.intel-sheet h3 { margin: 0 0 5px; font-family: var(--serif); font-size: 23px; }
.intel-sheet > div > p { margin: 0 0 21px; color: var(--muted); font-size: 10px; }

.intel-progress {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 15px;
  align-items: center;
  margin-bottom: 20px;
  padding: 15px;
  background: var(--night);
  color: #f0ebe2;
}

.intel-progress strong { font-family: var(--serif); font-size: 28px; font-weight: 400; }
.intel-progress p { margin: 0 0 6px; font-size: 10px; }
.intel-progress span { color: rgba(240,235,226,.48); font-size: 8px; line-height: 1.5; }

.intel-task {
  display: grid;
  grid-template-columns: 17px 1fr;
  gap: 10px;
  margin-bottom: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.intel-task i {
  display: grid;
  width: 16px;
  height: 16px;
  place-items: center;
  border: 1px solid #9e9990;
  border-radius: 50%;
  font-size: 8px;
  font-style: normal;
}

.intel-task.is-done i { border-color: var(--green); background: var(--green); color: white; }
.intel-task strong { display: block; margin-bottom: 3px; font-size: 11px; }
.intel-task span { color: var(--muted); font-size: 9px; }

.toast {
  position: fixed;
  z-index: 50;
  right: 22px;
  bottom: calc(88px + env(safe-area-inset-bottom));
  left: 22px;
  padding: 12px 15px;
  transform: translateY(18px);
  opacity: 0;
  pointer-events: none;
  background: rgba(15, 15, 14, 0.94);
  color: #f0ebe2;
  font-size: 10px;
  line-height: 1.6;
  transition: 220ms ease;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
}

.toast.is-visible { transform: translateY(0); opacity: 1; }

@keyframes slowReveal { from { transform: scale(1.05); filter: saturate(.4) contrast(1.12) brightness(.5); } to { transform: scale(1); } }
@keyframes riseIn { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes viewIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes messageIn { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
@keyframes typing { to { opacity: .2; transform: translateY(-2px); } }
@keyframes bars { to { height: 3px; } }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

@media (min-width: 620px) {
  body {
    display: grid;
    place-items: center;
    padding: 24px;
    background:
      radial-gradient(circle at 18% 18%, rgba(127, 29, 29, 0.11), transparent 24%),
      #0a0a09;
  }

  .desktop-stage {
    position: fixed;
    inset: 30px 40px;
    display: flex;
    justify-content: space-between;
    color: rgba(255, 255, 255, 0.18);
    font-family: ui-monospace, monospace;
    font-size: 9px;
    letter-spacing: 0.18em;
    pointer-events: none;
  }

  #game-shell {
    width: 430px;
    min-height: min(900px, calc(100dvh - 48px));
    height: min(900px, calc(100dvh - 48px));
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 26px;
    box-shadow: var(--shadow);
  }

  .screen { min-height: 100%; height: 100%; overflow-y: auto; }
  .intro-screen { min-height: 100%; }
  .case-screen { min-height: 100%; }
  .case-header { top: 0; }
  .bottom-nav { position: absolute; width: 100%; }
  .sheet-backdrop { position: absolute; }
  .intel-sheet { position: absolute; }
  .toast { position: absolute; }
}

@media (max-height: 690px) and (max-width: 619px) {
  .intro-copy h1 { font-size: 56px; }
  .case-hook { margin: 15px 0 18px; line-height: 1.55; }
  .intro-meta { display: none; }
  .intro-header { height: 68px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
