:root {
  color-scheme: dark;
  --ink: #f2eee3;
  --muted: #aebdb8;
  --dim: #73847f;
  --night: #050b0d;
  --deep: #071416;
  --panel: rgba(11, 28, 29, 0.93);
  --panel-2: #102526;
  --line: rgba(198, 222, 211, 0.16);
  --line-strong: rgba(208, 180, 117, 0.46);
  --gold: #d7b977;
  --gold-bright: #f1d89c;
  --teal: #77b7a6;
  --teal-deep: #285d57;
  --danger: #d26d61;
  --success: #82b98a;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.44);
  --safe-bottom: max(14px, env(safe-area-inset-bottom));
  --case-cover: linear-gradient(145deg, #15302f, #050b0d);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: var(--night);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 72% -10%, rgba(41, 96, 89, 0.35), transparent 36rem),
    linear-gradient(155deg, #081516 0%, #050a0c 58%, #090e10 100%);
  font-family: Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", system-ui, sans-serif;
  word-break: keep-all;
}

button,
select,
input {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
select:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(241, 216, 156, 0.88);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 200;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  transform: translateY(-160%);
  border-radius: 7px;
  color: #081516;
  background: var(--gold-bright);
}

.skip-link:focus {
  transform: translateY(0);
}

.loading-screen {
  display: grid;
  min-height: 100vh;
  place-content: center;
  justify-items: center;
  gap: 18px;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.loading-mark {
  width: 48px;
  height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 5px, rgba(119, 183, 166, 0.28) 6px 7px);
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  50% { opacity: 0.42; transform: scale(0.93); }
}

.app {
  min-height: 100vh;
}

.app-header {
  position: sticky;
  z-index: 50;
  top: 0;
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px clamp(18px, 4vw, 54px);
  border-bottom: 1px solid var(--line);
  background: rgba(5, 13, 14, 0.88);
  backdrop-filter: blur(18px);
}

.brand-lockup {
  display: grid;
  gap: 3px;
}

.brand-kicker,
.eyebrow {
  color: var(--gold);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.brand-lockup strong {
  font-family: Georgia, "Noto Serif KR", serif;
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 600;
}

.header-actions,
.progress-chip {
  display: flex;
  align-items: center;
}

.header-actions {
  gap: 12px;
}

.progress-chip {
  min-width: 140px;
  gap: 10px;
  color: var(--gold-bright);
  font-size: 0.76rem;
  font-weight: 750;
}

.progress-track {
  width: 92px;
  height: 3px;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--gold));
  transition: width 300ms ease;
}

.icon-button {
  display: grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  text-decoration: none;
}

.icon-button:hover,
.icon-button:focus-visible {
  border-color: var(--line-strong);
  color: var(--gold-bright);
}

#main-view {
  width: min(1180px, 100%);
  min-height: calc(100vh - 72px);
  margin: 0 auto;
  padding: 36px clamp(18px, 4vw, 54px) 120px;
}

.intro-screen {
  position: relative;
  display: grid;
  min-height: 100vh;
  overflow: hidden;
  place-items: center;
  padding: 44px clamp(18px, 5vw, 72px);
  isolation: isolate;
}

.intro-screen::before {
  position: absolute;
  z-index: -2;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(3, 8, 9, 0.96) 0%, rgba(4, 12, 13, 0.78) 48%, rgba(4, 11, 12, 0.58) 100%),
    var(--case-cover) center / cover no-repeat;
  filter: saturate(0.6) contrast(1.08);
}

.intro-screen::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background:
    linear-gradient(180deg, rgba(5, 11, 12, 0.15), rgba(5, 11, 12, 0.88)),
    repeating-linear-gradient(90deg, transparent 0 119px, rgba(220, 195, 138, 0.035) 120px);
}

.intro-card {
  width: min(760px, 100%);
  padding: clamp(28px, 6vw, 66px);
  border: 1px solid var(--line-strong);
  background: linear-gradient(145deg, rgba(7, 20, 22, 0.94), rgba(10, 23, 24, 0.82));
  box-shadow: var(--shadow);
}

.intro-case-number {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--gold);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.intro-case-number::after {
  width: 74px;
  height: 1px;
  content: "";
  background: var(--line-strong);
}

.intro-card h1 {
  margin: 26px 0 10px;
  font-family: Georgia, "Noto Serif KR", serif;
  font-size: clamp(3rem, 10vw, 6.8rem);
  font-weight: 500;
  letter-spacing: -0.07em;
  line-height: 0.95;
}

.intro-subtitle {
  margin: 0;
  color: var(--teal);
  font-size: clamp(1rem, 2vw, 1.2rem);
  letter-spacing: 0.12em;
}

.intro-synopsis {
  max-width: 58ch;
  margin: 30px 0 24px;
  color: #d7dfdc;
  font-size: clamp(0.96rem, 2vw, 1.08rem);
  line-height: 1.85;
}

.case-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 34px;
}

.case-facts span,
.status-pill,
.category-tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
}

.case-facts span {
  min-height: 30px;
  padding: 5px 11px;
  font-size: 0.75rem;
}

.primary-button,
.secondary-button,
.quiet-button,
.danger-button {
  min-height: 46px;
  padding: 11px 20px;
  border-radius: 5px;
  font-weight: 750;
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.primary-button:hover,
.secondary-button:hover,
.quiet-button:hover {
  transform: translateY(-1px);
}

.primary-button {
  border: 1px solid var(--gold-bright);
  color: #111a18;
  background: linear-gradient(135deg, var(--gold-bright), #c3a45f);
}

.secondary-button {
  border: 1px solid rgba(119, 183, 166, 0.55);
  color: #dcece7;
  background: rgba(40, 93, 87, 0.32);
}

.quiet-button {
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
}

.danger-button {
  border: 1px solid rgba(210, 109, 97, 0.5);
  color: #ffd8d2;
  background: rgba(121, 47, 42, 0.28);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.section-heading {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 20px;
  margin-bottom: 26px;
}

.section-heading h1,
.section-heading h2 {
  margin: 5px 0 0;
  font-family: Georgia, "Noto Serif KR", serif;
  font-size: clamp(1.9rem, 4vw, 3.1rem);
  font-weight: 500;
  letter-spacing: -0.04em;
}

.section-copy {
  max-width: 62ch;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.scene-tabs,
.suspect-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 12px;
  scrollbar-width: thin;
}

.scene-tabs button,
.suspect-tabs button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.scene-tabs button[aria-selected="true"],
.suspect-tabs button[aria-selected="true"] {
  border-color: var(--gold);
  color: var(--gold-bright);
  background: rgba(215, 185, 119, 0.1);
}

.scene-frame {
  position: relative;
  min-height: 540px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background-color: #0c1718;
  box-shadow: var(--shadow);
  isolation: isolate;
}

.scene-frame::before {
  position: absolute;
  z-index: -2;
  inset: 0;
  content: "";
  background-image: linear-gradient(180deg, rgba(2, 7, 8, 0.08), rgba(2, 8, 9, 0.54)), var(--scene-image);
  background-position: center;
  background-size: cover;
  filter: saturate(0.72) contrast(1.08) brightness(0.82);
  transform: scale(1.015);
}

.scene-frame::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  content: "";
  background: radial-gradient(circle at 50% 48%, transparent 30%, rgba(2, 7, 8, 0.35) 100%);
}

.scene-caption {
  position: absolute;
  top: 22px;
  left: 22px;
  width: min(410px, calc(100% - 44px));
  padding: 15px 17px;
  border-left: 3px solid var(--gold);
  background: rgba(4, 13, 14, 0.82);
  backdrop-filter: blur(10px);
}

.scene-caption strong {
  display: block;
  margin-bottom: 4px;
  font-family: Georgia, "Noto Serif KR", serif;
  font-size: 1.18rem;
}

.scene-caption p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.hotspot {
  position: absolute;
  z-index: 4;
  display: grid;
  width: 46px;
  height: 46px;
  padding: 0;
  transform: translate(-50%, -50%);
  place-items: center;
  border: 1px solid rgba(241, 216, 156, 0.9);
  border-radius: 50%;
  color: transparent;
  background: rgba(6, 20, 20, 0.48);
  box-shadow: 0 0 0 7px rgba(215, 185, 119, 0.12), 0 0 28px rgba(235, 207, 143, 0.34);
  cursor: pointer;
  animation: hotspot 2.1s ease-in-out infinite;
}

.hotspot::before,
.hotspot::after {
  position: absolute;
  content: "";
  background: var(--gold-bright);
}

.hotspot::before { width: 13px; height: 1px; }
.hotspot::after { width: 1px; height: 13px; }

.hotspot.found {
  border-color: var(--teal);
  background: rgba(21, 79, 71, 0.62);
  box-shadow: 0 0 0 6px rgba(119, 183, 166, 0.1);
  animation: none;
}

.hotspot.found::before,
.hotspot.found::after { background: #bfe9dc; }

@keyframes hotspot {
  50% { box-shadow: 0 0 0 11px rgba(215, 185, 119, 0.04), 0 0 36px rgba(235, 207, 143, 0.46); }
}

.scene-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 17px;
  border: 1px solid var(--line);
  border-top: 0;
  color: var(--muted);
  background: rgba(12, 28, 29, 0.86);
  font-size: 0.82rem;
}

.investigation-tip,
.unlock-banner,
.empty-state,
.case-note {
  border: 1px solid var(--line);
  background: rgba(14, 33, 34, 0.68);
}

.investigation-tip,
.unlock-banner,
.case-note {
  margin-top: 18px;
  padding: 16px 18px;
  color: var(--muted);
  line-height: 1.65;
}

.unlock-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-color: rgba(119, 183, 166, 0.4);
}

.unlock-banner strong {
  display: block;
  margin-bottom: 3px;
  color: #dcece7;
}

.evidence-grid,
.contradiction-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.evidence-card,
.contradiction-card {
  position: relative;
  min-width: 0;
  padding: 19px;
  overflow: hidden;
  border: 1px solid var(--line);
  color: inherit;
  text-align: left;
  background: linear-gradient(145deg, rgba(17, 39, 40, 0.92), rgba(9, 23, 24, 0.92));
}

button.evidence-card {
  cursor: pointer;
}

button.evidence-card:hover {
  border-color: var(--line-strong);
}

.evidence-index {
  position: absolute;
  top: 12px;
  right: 15px;
  color: rgba(215, 185, 119, 0.25);
  font-family: Georgia, serif;
  font-size: 2.2rem;
}

.category-tag,
.status-pill {
  width: max-content;
  padding: 4px 9px;
  font-size: 0.68rem;
}

.evidence-card h3,
.contradiction-card h3,
.suspect-profile h2,
.statement-card h3 {
  margin: 14px 0 8px;
  font-family: Georgia, "Noto Serif KR", serif;
  font-weight: 600;
}

.evidence-card p,
.contradiction-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.65;
}

.empty-state {
  display: grid;
  min-height: 280px;
  padding: 32px;
  place-content: center;
  justify-items: center;
  text-align: center;
  color: var(--muted);
}

.empty-state strong {
  margin-bottom: 8px;
  color: var(--ink);
  font-family: Georgia, "Noto Serif KR", serif;
  font-size: 1.3rem;
}

.suspect-layout {
  display: grid;
  grid-template-columns: minmax(230px, 0.72fr) minmax(0, 1.28fr);
  gap: 18px;
}

.suspect-profile,
.statements-panel,
.deduction-workbench,
.accusation-group {
  border: 1px solid var(--line);
  background: var(--panel);
}

.suspect-profile {
  min-height: 420px;
  padding: 26px;
}

.suspect-monogram {
  display: grid;
  width: 92px;
  height: 108px;
  margin-bottom: 24px;
  place-items: center;
  border: 1px solid var(--line-strong);
  color: var(--gold-bright);
  background:
    linear-gradient(145deg, transparent 48%, rgba(215, 185, 119, 0.12) 49% 51%, transparent 52%),
    rgba(37, 76, 71, 0.28);
  font-family: Georgia, "Noto Serif KR", serif;
  font-size: 2.4rem;
}

.suspect-profile h2 { font-size: 1.8rem; }
.suspect-role { color: var(--teal); }
.suspect-summary { color: var(--muted); line-height: 1.7; }

.alibi-box {
  margin-top: 24px;
  padding: 15px;
  border-left: 2px solid var(--gold);
  color: #d2dcda;
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.87rem;
  line-height: 1.65;
}

.alibi-box strong { display: block; margin-bottom: 4px; color: var(--gold-bright); }

.statements-panel {
  padding: 20px;
}

.statement-card {
  padding: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.statement-card + .statement-card { margin-top: 12px; }
.statement-card h3 { margin-top: 7px; font-size: 1rem; }
.statement-card blockquote {
  margin: 0;
  color: #dfe6e3;
  line-height: 1.75;
}

.statement-card.challenged { border-color: rgba(119, 183, 166, 0.48); }
.statement-card.follow-up { border-color: rgba(215, 185, 119, 0.38); background: rgba(79, 63, 34, 0.13); }

.evidence-presenter {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 16px;
}

select {
  width: 100%;
  min-height: 44px;
  padding: 9px 36px 9px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  background: #102526;
}

.feedback {
  margin: 12px 0 0;
  padding: 10px 12px;
  color: #ffd3cd;
  background: rgba(121, 47, 42, 0.22);
  font-size: 0.8rem;
}

.deduction-workbench {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto;
  align-items: end;
  gap: 12px;
  margin-bottom: 20px;
  padding: 20px;
}

.field-label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.76rem;
}

.link-mark {
  padding-bottom: 12px;
  color: var(--gold);
  font-size: 1.35rem;
}

.contradiction-card.solved {
  border-color: rgba(119, 183, 166, 0.48);
}

.contradiction-card.locked {
  min-height: 150px;
  border-style: dashed;
  opacity: 0.62;
}

.contradiction-number {
  color: var(--gold);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.accusation-form {
  display: grid;
  gap: 18px;
}

.accusation-group {
  padding: 22px;
}

.accusation-group legend {
  padding: 0 8px;
  color: var(--gold-bright);
  font-family: Georgia, "Noto Serif KR", serif;
  font-size: 1.1rem;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.choice-card {
  position: relative;
  display: grid;
  min-height: 84px;
  padding: 15px 15px 15px 44px;
  align-content: center;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
}

.choice-card input {
  position: absolute;
  top: 50%;
  left: 16px;
  width: 17px;
  height: 17px;
  transform: translateY(-50%);
  accent-color: var(--gold);
}

.choice-card:has(input:checked) {
  border-color: var(--gold);
  color: var(--ink);
  background: rgba(215, 185, 119, 0.1);
}

.choice-card strong { display: block; margin-bottom: 3px; color: var(--ink); font-size: 0.9rem; }
.choice-card small { line-height: 1.45; }

.accusation-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid var(--line-strong);
  background: rgba(83, 64, 32, 0.13);
}

.accusation-submit p { margin: 0; color: var(--muted); font-size: 0.84rem; }

.ending-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 48px clamp(18px, 5vw, 72px);
  background:
    radial-gradient(circle at 50% 15%, rgba(57, 112, 102, 0.32), transparent 38rem),
    linear-gradient(160deg, #061112, #05090b 70%);
}

.ending-card {
  width: min(820px, 100%);
  padding: clamp(28px, 6vw, 64px);
  border: 1px solid var(--line-strong);
  background: rgba(9, 23, 24, 0.94);
  box-shadow: var(--shadow);
}

.ending-mark {
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--gold-bright);
  font-family: Georgia, serif;
  font-size: 1.35rem;
}

.ending-card h1 {
  margin: 24px 0 14px;
  font-family: Georgia, "Noto Serif KR", serif;
  font-size: clamp(2.4rem, 7vw, 4.7rem);
  font-weight: 500;
  letter-spacing: -0.06em;
}

.ending-lead { color: #dfe7e4; font-size: 1.05rem; line-height: 1.8; }
.ending-reconstruction {
  margin: 28px 0;
  padding: 20px;
  border-left: 2px solid var(--gold);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.028);
  line-height: 1.8;
}

.ending-score {
  display: flex;
  gap: 9px;
  margin: 24px 0;
}

.ending-score span {
  flex: 1;
  padding: 10px;
  border: 1px solid var(--line);
  color: var(--dim);
  text-align: center;
  font-size: 0.74rem;
}

.ending-score span.correct { border-color: rgba(130, 185, 138, 0.6); color: #bfe6c5; background: rgba(57, 107, 66, 0.18); }

.app-nav {
  position: fixed;
  z-index: 60;
  right: max(16px, env(safe-area-inset-right));
  bottom: var(--safe-bottom);
  left: max(16px, env(safe-area-inset-left));
  width: min(630px, calc(100% - 32px));
  min-height: 66px;
  margin: 0 auto;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: rgba(6, 17, 18, 0.94);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.54);
  backdrop-filter: blur(20px);
}

.app-nav button {
  position: relative;
  display: grid;
  flex: 1;
  min-width: 0;
  padding: 6px 3px;
  place-items: center;
  gap: 2px;
  border: 0;
  border-radius: 7px;
  color: var(--dim);
  background: transparent;
  font-size: 0.66rem;
  cursor: pointer;
}

.app-nav button.active { color: var(--gold-bright); background: rgba(215, 185, 119, 0.09); }
.app-nav button.locked { opacity: 0.36; }
.nav-icon { color: currentColor; font-family: Georgia, serif; font-size: 0.68rem; letter-spacing: 0.08em; }
.nav-badge {
  position: absolute;
  top: 4px;
  right: calc(50% - 18px);
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 99px;
  color: #071416;
  background: var(--gold-bright);
  font-size: 0.58rem;
  font-weight: 800;
  line-height: 15px;
}

.app-nav[hidden],
.app-header[hidden] { display: none; }
.app-nav:not([hidden]) { display: flex; }

.dialog-backdrop {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: grid;
  padding: 20px;
  place-items: center;
  background: rgba(2, 7, 8, 0.78);
  backdrop-filter: blur(8px);
}

.dialog {
  width: min(620px, 100%);
  max-height: min(720px, calc(100vh - 40px));
  padding: clamp(22px, 5vw, 38px);
  overflow-y: auto;
  border: 1px solid var(--line-strong);
  background: #0b2021;
  box-shadow: var(--shadow);
}

.dialog h2 {
  margin: 14px 0 8px;
  font-family: Georgia, "Noto Serif KR", serif;
  font-size: clamp(1.6rem, 5vw, 2.3rem);
  font-weight: 500;
}

.dialog-copy { color: var(--muted); line-height: 1.75; }
.dialog-analysis {
  margin: 20px 0;
  padding: 15px;
  border-left: 2px solid var(--teal);
  color: #dce9e5;
  background: rgba(40, 93, 87, 0.18);
  line-height: 1.7;
}

.dialog-close {
  float: right;
  width: 35px;
  height: 35px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.toast {
  position: fixed;
  z-index: 160;
  top: 90px;
  left: 50%;
  width: min(430px, calc(100% - 32px));
  padding: 13px 17px;
  transform: translateX(-50%);
  border: 1px solid var(--line-strong);
  color: #f4ead2;
  text-align: center;
  background: rgba(16, 39, 39, 0.96);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  font-size: 0.84rem;
}

.toast[hidden] { display: none; }

.narrative-notebook-trigger {
  display: inline-flex;
  width: auto;
  min-width: 68px;
  padding: 0 11px;
  gap: 7px;
  border-radius: 999px;
  color: var(--gold-bright);
  font-size: 0.7rem;
  font-weight: 800;
}

.narrative-notebook-trigger span {
  display: grid;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  place-items: center;
  border-radius: 999px;
  color: #071416;
  background: var(--gold-bright);
  font-size: 0.62rem;
}

.narrative-intro-card {
  width: min(820px, 100%);
}

.narrative-intro-card h1 {
  font-size: clamp(2.7rem, 9vw, 6.2rem);
  line-height: 1.02;
}

.narrative-intro-note {
  max-width: 62ch;
  margin: 0 0 28px;
  padding: 14px 16px;
  border-left: 2px solid var(--teal);
  color: #c3d2ce;
  background: rgba(40, 93, 87, 0.16);
  font-size: 0.86rem;
  line-height: 1.7;
}

.narrative-screen {
  display: grid;
  gap: 0;
}

.narrative-scene {
  position: relative;
  min-height: clamp(330px, 47vw, 520px);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: linear-gradient(145deg, #15302f, #050b0d);
  box-shadow: var(--shadow);
  isolation: isolate;
}

.narrative-scene-image {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.68) contrast(1.08) brightness(0.78);
}

.narrative-scene-shade {
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(3, 9, 10, 0.08) 30%, rgba(3, 10, 11, 0.82) 100%),
    radial-gradient(circle at 64% 30%, transparent, rgba(2, 7, 8, 0.3));
}

.narrative-scene-meta {
  position: absolute;
  bottom: 96px;
  left: clamp(20px, 4vw, 50px);
  display: grid;
  gap: 6px;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.88);
}

.narrative-scene-meta span {
  color: var(--gold-bright);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.17em;
}

.narrative-scene-meta strong {
  font-family: Georgia, "Noto Serif KR", serif;
  font-size: clamp(1.8rem, 5vw, 3.6rem);
  font-weight: 500;
  letter-spacing: -0.045em;
}

.narrative-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.37fr);
  align-items: start;
  gap: 18px;
  margin: -72px clamp(18px, 3vw, 36px) 0;
}

.narrative-dialogue,
.narrative-notebook-summary {
  border: 1px solid var(--line);
  background: rgba(8, 23, 24, 0.97);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(16px);
}

.narrative-dialogue {
  min-width: 0;
  padding: clamp(22px, 4vw, 42px);
}

.narrative-speaker {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.narrative-portrait {
  display: grid;
  flex: 0 0 auto;
  width: 92px;
  height: 108px;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--line-strong);
  color: var(--gold-bright);
  background:
    linear-gradient(145deg, transparent 48%, rgba(215, 185, 119, 0.13) 49% 51%, transparent 52%),
    rgba(37, 76, 71, 0.34);
  font-family: Georgia, "Noto Serif KR", serif;
  font-size: 2rem;
}

.narrative-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.74) contrast(1.05);
}

.narrative-speaker-role {
  color: var(--teal);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.narrative-speaker h1 {
  margin: 5px 0 0;
  font-family: Georgia, "Noto Serif KR", serif;
  font-size: clamp(1.65rem, 4vw, 2.55rem);
  font-weight: 500;
  letter-spacing: -0.04em;
}

.narrative-copy {
  margin: 26px 0 30px;
}

.narrative-copy p {
  margin: 0;
  color: #dce5e2;
  font-family: Georgia, "Noto Serif KR", serif;
  font-size: clamp(1rem, 1.8vw, 1.1rem);
  line-height: 1.95;
}

.narrative-copy p + p {
  margin-top: 1.1em;
}

.narrative-chat {
  min-width: 0;
  margin: 0 0 28px;
  padding: clamp(16px, 2.4vw, 22px);
  border: 1px solid rgba(119, 183, 166, 0.3);
  background:
    linear-gradient(145deg, rgba(40, 93, 87, 0.1), transparent 55%),
    rgba(4, 14, 15, 0.72);
}

.narrative-chat-heading {
  display: grid;
  gap: 5px;
  margin-bottom: 15px;
}

.narrative-chat-heading h2 {
  margin: 0;
  font-family: Georgia, "Noto Serif KR", serif;
  font-size: clamp(1.08rem, 2.2vw, 1.35rem);
  font-weight: 500;
}

.narrative-chat-log {
  display: grid;
  max-height: min(48vh, 430px);
  min-height: 92px;
  gap: 12px;
  padding: 2px 4px 16px 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(119, 183, 166, 0.48) rgba(255, 255, 255, 0.04);
}

.narrative-chat-message {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  min-width: 0;
  align-items: end;
  gap: 9px;
}

.narrative-chat-message.player {
  grid-template-columns: minmax(0, 1fr);
  justify-items: end;
  padding-left: clamp(28px, 12%, 82px);
}

.narrative-chat-avatar {
  display: grid;
  width: 36px;
  height: 42px;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--line-strong);
  color: var(--gold-bright);
  background: rgba(40, 93, 87, 0.28);
  font-family: Georgia, "Noto Serif KR", serif;
  font-size: 0.78rem;
}

.narrative-chat-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.72) contrast(1.05);
}

.narrative-chat-bubble {
  width: fit-content;
  max-width: min(86%, 44rem);
  min-width: 0;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 3px 14px 14px;
  color: #dce8e4;
  background: rgba(25, 53, 51, 0.84);
  font-size: 0.84rem;
  line-height: 1.72;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.narrative-chat-message-name {
  display: block;
  margin-bottom: 3px;
  color: var(--teal);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.035em;
}

.narrative-chat-bubble p {
  margin: 0;
}

.narrative-chat-message.player .narrative-chat-bubble {
  border-color: rgba(215, 185, 119, 0.32);
  border-radius: 14px 3px 14px 14px;
  color: #f2ead8;
  background: rgba(104, 82, 40, 0.36);
}

.narrative-chat-message.player .narrative-chat-message-name { color: var(--gold); }

.narrative-chat-message[data-chat-message="locked"] .narrative-chat-bubble {
  border-style: dashed;
  color: #aebbb7;
  background: rgba(255, 255, 255, 0.035);
}

.narrative-chat-typing {
  display: inline-flex;
  width: max-content;
  min-height: 34px;
  align-items: center;
  gap: 5px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 3px 14px 14px;
  background: rgba(25, 53, 51, 0.68);
}

.narrative-chat-typing span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--teal);
  animation: narrative-chat-dot 900ms ease-in-out infinite;
}

.narrative-chat-typing span:nth-child(2) { animation-delay: 120ms; }
.narrative-chat-typing span:nth-child(3) { animation-delay: 240ms; }

@keyframes narrative-chat-dot {
  0%, 65%, 100% { opacity: 0.35; transform: translateY(0); }
  32% { opacity: 1; transform: translateY(-3px); }
}

.narrative-chat-suggestions {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 15px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.narrative-chat-chip {
  max-width: 100%;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid rgba(119, 183, 166, 0.36);
  border-radius: 999px;
  color: #c9ddd7;
  background: rgba(40, 93, 87, 0.16);
  font-size: 0.72rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition: border-color 150ms ease, color 150ms ease, background 150ms ease;
}

.narrative-chat-chip:hover {
  border-color: var(--gold);
  color: var(--gold-bright);
  background: rgba(215, 185, 119, 0.08);
}

.narrative-chat-chip[data-heard="true"] {
  border-color: rgba(198, 222, 211, 0.12);
  color: var(--dim);
  background: rgba(255, 255, 255, 0.018);
}

.narrative-chat-chip[data-heard="true"]::before {
  content: "✓ ";
  color: var(--teal);
}

.narrative-chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-width: 0;
  align-items: end;
  gap: 8px;
  margin-top: 12px;
}

.narrative-chat-label {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.025em;
}

.narrative-chat-input {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 10px 13px;
  border: 1px solid rgba(198, 222, 211, 0.22);
  border-radius: 3px;
  color: var(--ink);
  background: rgba(3, 11, 12, 0.88);
  outline: 0;
}

.narrative-chat-input::placeholder { color: var(--dim); }

.narrative-chat-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(215, 185, 119, 0.1);
}

.narrative-chat-submit {
  min-width: 78px;
  min-height: 46px;
  padding: 10px 15px;
  border: 1px solid var(--gold);
  border-radius: 3px;
  color: #081516;
  background: var(--gold-bright);
  font-size: 0.78rem;
  font-weight: 850;
  cursor: pointer;
}

.narrative-chat-submit:disabled {
  border-color: var(--line);
  color: var(--dim);
  background: rgba(255, 255, 255, 0.045);
  cursor: wait;
}

.narrative-choices {
  display: grid;
  gap: 9px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.narrative-choice {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  min-height: 66px;
  padding: 12px 16px;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(119, 183, 166, 0.35);
  color: #e0ebe7;
  text-align: left;
  background: rgba(40, 93, 87, 0.16);
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.narrative-choice:not(.locked):hover {
  transform: translateX(2px);
  border-color: var(--gold);
  background: rgba(215, 185, 119, 0.09);
}

.narrative-choice.locked {
  border-style: dashed;
  color: var(--dim);
  background: rgba(255, 255, 255, 0.018);
  cursor: not-allowed;
}

.narrative-choice-mark {
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: 1.25rem;
}

.narrative-choice strong,
.narrative-choice small {
  display: block;
}

.narrative-choice strong {
  font-size: 0.9rem;
  line-height: 1.55;
}

.narrative-choice small {
  margin-top: 3px;
  color: var(--dim);
  font-size: 0.7rem;
  line-height: 1.5;
}

.narrative-notebook-summary {
  position: sticky;
  top: 92px;
  padding: 22px;
}

.narrative-notebook-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.narrative-notebook-heading h2 {
  margin: 6px 0 0;
  font-family: Georgia, "Noto Serif KR", serif;
  font-size: 1.35rem;
  font-weight: 500;
}

.narrative-clue-preview {
  display: grid;
  gap: 0;
  margin: 8px 0 18px;
  padding: 0;
  list-style: none;
}

.narrative-clue-preview li {
  display: grid;
  gap: 3px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.narrative-clue-preview strong {
  color: #dfe8e5;
  font-size: 0.79rem;
  line-height: 1.45;
}

.narrative-clue-preview span,
.narrative-notebook-empty {
  color: var(--dim);
  font-size: 0.7rem;
  line-height: 1.55;
}

.narrative-notebook-empty {
  margin: 18px 0;
}

.narrative-notebook-summary .secondary-button {
  width: 100%;
}

.narrative-notebook-list {
  display: grid;
  gap: 11px;
  margin-top: 20px;
}

.narrative-notebook-clue {
  padding: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.narrative-notebook-clue > span {
  color: var(--gold);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.09em;
}

.narrative-notebook-clue h3 {
  margin: 8px 0 6px;
  font-family: Georgia, "Noto Serif KR", serif;
  font-size: 1.08rem;
  font-weight: 600;
}

.narrative-notebook-clue p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.75;
}

.narrative-verdict {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--line-strong);
}

.narrative-verdict h2 {
  margin: 8px 0 10px;
  font-family: Georgia, "Noto Serif KR", serif;
  font-size: clamp(1.6rem, 4vw, 2.25rem);
  font-weight: 500;
}

.narrative-verdict > p {
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.7;
}

.narrative-suspect-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.narrative-suspect-card {
  position: relative;
  display: grid;
  min-height: 78px;
  padding: 13px 14px 13px 42px;
  align-content: center;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
}

.narrative-suspect-card input {
  position: absolute;
  top: 50%;
  left: 15px;
  width: 17px;
  height: 17px;
  transform: translateY(-50%);
  accent-color: var(--gold);
}

.narrative-suspect-card:has(input:checked) {
  border-color: var(--gold);
  color: var(--ink);
  background: rgba(215, 185, 119, 0.1);
}

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

.narrative-suspect-card strong {
  color: var(--ink);
  font-size: 0.9rem;
}

.narrative-suspect-card small {
  margin-top: 3px;
  font-size: 0.7rem;
  line-height: 1.45;
}

.narrative-verdict-submit {
  width: 100%;
  margin-top: 16px;
}

.narrative-ending-card {
  width: min(860px, 100%);
}

.narrative-ending-selection {
  width: max-content;
  max-width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
  font-size: 0.78rem;
}

.narrative-ending-selection strong {
  color: var(--gold-bright);
}

.narrative-ending-copy {
  margin: 25px 0 30px;
  padding: 20px;
  border-left: 2px solid var(--gold);
  color: #d9e2df;
  background: rgba(255, 255, 255, 0.025);
}

.narrative-ending-copy p {
  margin: 0;
  line-height: 1.85;
}

.narrative-ending-copy p + p {
  margin-top: 1em;
}

.narrative-list-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.catalog-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 84% 4%, rgba(41, 96, 89, 0.4), transparent 32rem),
    linear-gradient(155deg, #081516 0%, #050a0c 58%, #090e10 100%);
}

.catalog-header {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px clamp(18px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
  background: rgba(5, 13, 14, 0.82);
}

.catalog-home-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 0 14px;
  border: 1px solid var(--line);
  color: var(--gold-bright);
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-decoration: none;
  white-space: nowrap;
}

.catalog-home-link:hover,
.catalog-home-link:focus-visible {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
}

.catalog-main {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: clamp(52px, 8vw, 96px) clamp(18px, 5vw, 54px) 96px;
}

.catalog-intro {
  max-width: 780px;
  margin-bottom: 42px;
}

.catalog-intro h1 {
  margin: 12px 0 18px;
  font-family: Georgia, "Noto Serif KR", serif;
  font-size: clamp(2.8rem, 8vw, 5.7rem);
  font-weight: 500;
  letter-spacing: -0.065em;
  line-height: 1;
}

.catalog-intro p {
  max-width: 64ch;
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.95rem, 2vw, 1.08rem);
  line-height: 1.8;
}

.catalog-status {
  margin: 0 0 16px;
  color: var(--dim);
  font-size: 0.78rem;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.catalog-card {
  display: grid;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  color: inherit;
  background: linear-gradient(145deg, rgba(17, 39, 40, 0.94), rgba(8, 20, 21, 0.96));
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.3);
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.catalog-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.catalog-card-cover {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-bottom: 1px solid var(--line);
  object-fit: cover;
  filter: saturate(0.72) contrast(1.08) brightness(0.78);
}

.catalog-card-content {
  display: flex;
  padding: clamp(22px, 4vw, 34px);
  flex-direction: column;
}

.catalog-case-number {
  color: var(--gold);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.17em;
}

.catalog-card h2 {
  margin: 15px 0 7px;
  font-family: Georgia, "Noto Serif KR", serif;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 500;
  letter-spacing: -0.04em;
}

.catalog-card-subtitle {
  min-height: 3.2em;
  margin: 0;
  color: var(--teal);
  line-height: 1.6;
}

.catalog-card-synopsis {
  margin: 20px 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.75;
}

.catalog-card .case-facts {
  margin: auto 0 22px;
}

.catalog-card-action {
  color: var(--gold-bright);
  font-size: 0.84rem;
  font-weight: 800;
}

@media (max-width: 760px) {
  .app-header { min-height: 62px; padding: 9px 14px; }
  .brand-kicker { display: none; }
  .progress-chip { min-width: auto; }
  .progress-track { width: 58px; }
  #main-view { min-height: calc(100vh - 62px); padding: 25px 14px 112px; }
  .intro-screen { padding: 20px 14px; }
  .intro-card { padding: 28px 22px; }
  .intro-card h1 { font-size: clamp(3.2rem, 19vw, 5rem); }
  .section-heading { grid-template-columns: 1fr; align-items: start; }
  .scene-frame { min-height: min(64vh, 520px); }
  .scene-caption { top: 12px; left: 12px; width: calc(100% - 24px); padding: 11px 13px; }
  .scene-caption p { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .hotspot { width: 42px; height: 42px; }
  .scene-footer { align-items: flex-start; flex-direction: column; }
  .evidence-grid,
  .contradiction-grid,
  .choice-grid { grid-template-columns: 1fr; }
  .suspect-layout { grid-template-columns: 1fr; }
  .suspect-profile { min-height: 0; }
  .suspect-monogram { width: 64px; height: 72px; font-size: 1.8rem; }
  .evidence-presenter { grid-template-columns: 1fr; }
  .deduction-workbench { grid-template-columns: 1fr; align-items: stretch; }
  .link-mark { display: none; }
  .unlock-banner,
  .accusation-submit { align-items: stretch; flex-direction: column; }
  .app-nav { min-height: 62px; }
  .app-nav button { font-size: 0.62rem; }
  .ending-screen { padding: 24px 14px; }
  .ending-card { padding: 28px 22px; }
  .ending-score { flex-direction: column; }
  .catalog-header { min-height: 62px; padding: 9px 18px; }
  .catalog-main { padding-top: 48px; padding-bottom: 64px; }
  .catalog-grid { grid-template-columns: 1fr; }
  .catalog-card-subtitle { min-height: 0; }
  .narrative-notebook-trigger { min-width: 54px; padding: 0 8px; font-size: 0.62rem; }
  .narrative-screen { margin: -25px -14px 0; }
  .narrative-scene { min-height: 360px; border-right: 0; border-left: 0; }
  .narrative-scene-meta { bottom: 58px; left: 20px; }
  .narrative-layout { grid-template-columns: 1fr; gap: 12px; margin: -38px 14px 0; }
  .narrative-dialogue { padding: 22px 18px; }
  .narrative-speaker { gap: 13px; padding-bottom: 17px; }
  .narrative-portrait { width: 68px; height: 80px; font-size: 1.55rem; }
  .narrative-copy { margin: 21px 0 24px; }
  .narrative-copy p { line-height: 1.85; }
  .narrative-chat { margin-bottom: 22px; padding: 16px; }
  .narrative-chat-log { max-height: 390px; }
  .narrative-choice { min-height: 62px; padding: 11px 12px; }
  .narrative-notebook-summary { position: static; padding: 18px; }
  .narrative-suspect-grid { grid-template-columns: 1fr; }
  .narrative-ending-card .button-row { align-items: stretch; flex-direction: column; }
  .narrative-ending-card .button-row > * { justify-content: center; width: 100%; }
}

@media (max-width: 410px) {
  .brand-lockup strong { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .progress-track { display: none; }
  .case-facts span { font-size: 0.68rem; }
  .scene-frame { min-height: 470px; }
  .scene-caption strong { font-size: 1rem; }
  .intro-synopsis { line-height: 1.7; }
  .narrative-notebook-trigger { min-width: 38px; padding: 0 7px; font-size: 0; }
  .narrative-notebook-trigger::before { content: "첩"; font-size: 0.72rem; }
  .narrative-notebook-trigger span { min-width: 16px; height: 16px; padding: 0 3px; font-size: 0.56rem; }
  .narrative-intro-card h1 { font-size: clamp(2.5rem, 15vw, 4rem); }
  .narrative-scene { min-height: 330px; }
  .narrative-dialogue { padding: 19px 15px; }
  .narrative-chat { padding: 13px; }
  .narrative-chat-log { max-height: 350px; gap: 10px; }
  .narrative-chat-message { grid-template-columns: 30px minmax(0, 1fr); gap: 7px; }
  .narrative-chat-message.player { grid-template-columns: minmax(0, 1fr); padding-left: 22px; }
  .narrative-chat-avatar { width: 30px; height: 36px; font-size: 0.68rem; }
  .narrative-chat-bubble { max-width: 92%; padding: 9px 11px; font-size: 0.8rem; }
  .narrative-chat-suggestions { gap: 6px; }
  .narrative-chat-chip { min-height: 32px; padding: 6px 9px; font-size: 0.68rem; }
  .narrative-chat-form { gap: 6px; }
  .narrative-chat-input { min-height: 44px; padding: 9px 10px; font-size: 0.82rem; }
  .narrative-chat-submit { min-width: 66px; min-height: 44px; padding: 9px 10px; font-size: 0.72rem; }
  body[data-solo-mode="narrative"] .app-header { gap: 6px; }
  body[data-solo-mode="narrative"] .brand-lockup strong { max-width: 82px; }
  body[data-solo-mode="narrative"] .header-actions { gap: 6px; }
  body[data-solo-mode="narrative"] .progress-chip { font-size: 0.62rem; }
  body[data-solo-mode="narrative"] .icon-button { width: 34px; height: 34px; }
  /* The trigger holds a label plus a count badge, so it must size to its content —
     pinning it to the 34px icon circle pushed the badge onto the menu button. */
  body[data-solo-mode="narrative"] .narrative-notebook-trigger {
    width: auto;
    min-width: 0;
    gap: 5px;
    padding: 0 9px;
    font-size: 0.66rem;
  }
  body[data-solo-mode="narrative"] .narrative-notebook-trigger::before { content: none; }
}

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