:root {
  color-scheme: dark;
  --night: #101722;
  --night-soft: #1b2233;
  --paper: #f2e6cf;
  --paper-muted: #cfc4b0;
  --amber: #e8a34a;
  --coral: #ff5a4e;
  --steel: #8da0ae;
  --green: #2f5d50;
  --glass: rgba(15, 21, 31, 0.74);
  --safe-top: max(18px, env(safe-area-inset-top));
  --safe-bottom: max(18px, env(safe-area-inset-bottom));
  --app-height: 100svh;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background: var(--night);
  overscroll-behavior: none;
}

body {
  display: grid;
  place-items: center;
  min-height: 100svh;
  color: var(--paper);
  background:
    radial-gradient(circle at 20% 10%, rgba(232, 163, 74, 0.1), transparent 28rem),
    linear-gradient(135deg, #0a1019, #1b2233 55%, #0c131e);
}

button {
  color: inherit;
  font: inherit;
}

button:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: 3px;
}

.app-shell {
  position: relative;
  width: min(100vw, 460px);
  height: var(--app-height);
  max-height: 960px;
  overflow: hidden;
  isolation: isolate;
  background: var(--night-soft);
}

.boot-screen {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 100%;
  padding: 32px;
  text-align: center;
  background:
    linear-gradient(rgba(10, 15, 23, 0.76), rgba(10, 15, 23, 0.94)),
    url("/media/intro-03.jpg") center / cover;
}

.boot-screen h1 {
  margin: 10px 0 12px;
  font: 500 clamp(40px, 12vw, 58px)/0.98 Georgia, serif;
}

.boot-copy {
  margin: 0;
  color: var(--paper-muted);
}

.brand-mark {
  display: flex;
  align-items: end;
  gap: 5px;
  height: 50px;
  margin-bottom: 22px;
}

.brand-mark i {
  display: block;
  width: 18px;
  border: 1px solid rgba(242, 230, 207, 0.72);
  border-bottom: 3px solid var(--amber);
  background: rgba(242, 230, 207, 0.08);
}

.brand-mark i:nth-child(1) { height: 31px; }
.brand-mark i:nth-child(2) { height: 41px; }
.brand-mark i:nth-child(3) {
  height: 49px;
  border-color: var(--coral);
  box-shadow: inset 5px 0 12px rgba(255, 90, 78, 0.28), 0 0 22px rgba(255, 90, 78, 0.18);
}

.eyebrow {
  margin: 0;
  color: var(--amber);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.22em;
}

.library-screen {
  overflow-x: hidden;
  overflow-y: auto;
  padding: calc(var(--safe-top) + 2px) 20px calc(var(--safe-bottom) + 18px);
  background:
    radial-gradient(circle at 82% 13%, rgba(232, 163, 74, 0.14), transparent 31%),
    radial-gradient(circle at 8% 52%, rgba(47, 93, 80, 0.2), transparent 32%),
    linear-gradient(160deg, #111a27 0%, #0a1019 78%);
  scrollbar-width: none;
}

.library-screen::-webkit-scrollbar {
  display: none;
}

.library-screen::before {
  position: absolute;
  top: -50px;
  right: -86px;
  width: 230px;
  height: 310px;
  border: 1px solid rgba(232, 163, 74, 0.1);
  border-radius: 120px 120px 0 0;
  content: "";
  transform: rotate(16deg);
}

.library-header {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
}

.free-chip,
.lock-chip {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid rgba(232, 163, 74, 0.32);
  border-radius: 999px;
  background: rgba(232, 163, 74, 0.08);
  color: var(--amber);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.library-copy {
  position: relative;
  z-index: 1;
  padding: 28px 2px 20px;
}

.library-copy h1 {
  margin: 7px 0 10px;
  max-width: 390px;
  font: 500 clamp(31px, 8.7vw, 42px)/1.02 Georgia, serif;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.library-copy > p:last-child {
  max-width: 380px;
  margin: 0;
  color: var(--paper-muted);
  font: 14px/1.48 Georgia, serif;
}

.story-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 13px;
}

.feedback-card {
  position: relative;
  z-index: 1;
  margin-top: 16px;
  padding: 22px 20px;
  border: 1px solid rgba(242, 230, 207, 0.15);
  border-radius: 22px;
  background: rgba(9, 15, 23, 0.78);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.22);
}

.feedback-card h2 {
  margin: 7px 0 8px;
  font: 500 29px/1.05 Georgia, serif;
}

.feedback-card > p:not(.eyebrow) {
  margin: 0 0 18px;
  color: var(--paper-muted);
  font: 13px/1.5 Georgia, serif;
}

.feedback-card label,
.feedback-card label span {
  display: block;
}

.feedback-card label span {
  margin-bottom: 8px;
  color: rgba(242, 230, 207, 0.82);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.feedback-card textarea {
  display: block;
  width: 100%;
  min-height: 128px;
  resize: vertical;
  padding: 13px 14px;
  border: 1px solid rgba(232, 163, 74, 0.45);
  border-radius: 15px;
  outline: 0;
  background: rgba(4, 8, 13, 0.68);
  color: var(--paper);
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.feedback-card textarea:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 2px rgba(232, 163, 74, 0.18);
}

.feedback-card textarea::placeholder { color: rgba(242, 230, 207, 0.38); }
.feedback-card .primary-button { width: 100%; margin-top: 14px; }

.feedback-trigger {
  display: grid;
  gap: 3px;
  width: calc(100% - 36px);
  margin: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(242, 230, 207, .18);
  border-radius: 16px;
  background: rgba(242, 230, 207, .045);
  color: var(--paper);
  text-align: left;
}
.feedback-trigger span { color: var(--amber); font-size: 9px; font-weight: 760; letter-spacing: .14em; text-transform: uppercase; }
.feedback-trigger strong { font-size: 14px; }
.feedback-modal { position: fixed; z-index: 80; inset: 0; display: grid; align-items: end; padding: 18px; background: rgba(2, 5, 9, .76); }
.feedback-modal .feedback-card { position: relative; width: 100%; max-height: 85svh; overflow-y: auto; margin: 0; }
.feedback-limit { margin-top: 8px; color: rgba(242, 230, 207, 0.48); font-size: 10px; }
.feedback-result { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; font-size: 12px; }
.feedback-result.is-success { background: rgba(65, 156, 109, 0.14); color: #a9e2c3; }
.feedback-result.is-error { background: rgba(193, 74, 64, 0.15); color: #efb1aa; }

.story-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(242, 230, 207, 0.15);
  border-radius: 24px;
  background: rgba(242, 230, 207, 0.045);
}

.story-card-primary {
  min-height: 390px;
  box-shadow: 0 24px 52px rgba(0, 0, 0, 0.3);
}

.story-card-primary.is-confirming { min-height: 545px; }

.story-card-primary > img,
.story-card-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.story-card-primary > img {
  object-fit: cover;
  object-position: center;
  filter: saturate(0.82) brightness(0.84);
  transform: scale(1.025);
  animation: library-cover-drift 14s ease-in-out infinite alternate;
}

.story-card-shade {
  background:
    linear-gradient(to bottom, rgba(5, 8, 13, 0.08) 8%, rgba(5, 8, 13, 0.22) 36%, rgba(6, 10, 16, 0.98) 82%),
    linear-gradient(120deg, transparent 45%, rgba(232, 163, 74, 0.1));
}

.story-card-copy {
  position: absolute;
  z-index: 1;
  right: 18px;
  bottom: 18px;
  left: 18px;
}

.story-card-copy h2,
.story-card-locked h2 {
  margin: 5px 0 8px;
  font: 500 34px/1 Georgia, serif;
  letter-spacing: -0.025em;
}

.story-card-copy > p:not(.eyebrow) {
  margin: 0 0 14px;
  color: rgba(242, 230, 207, 0.82);
  font: 13px/1.45 Georgia, serif;
}

.story-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: rgba(242, 230, 207, 0.72);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.story-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 11px rgba(232, 163, 74, 0.72);
}

.tester-access {
  display: grid;
  gap: 3px;
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid rgba(232, 163, 74, 0.42);
  border-radius: 13px;
  background: rgba(232, 163, 74, 0.1);
}

.tester-access strong { color: var(--amber); font-size: 12px; }
.tester-access span { color: var(--paper-muted); font-size: 10px; line-height: 1.4; }

.story-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px;
}

.story-actions .primary-button,
.story-actions .secondary-button {
  min-height: 48px;
}

.story-actions .secondary-button {
  padding-inline: 14px;
  font-size: 11px;
}

.restart-confirm {
  margin-top: 12px;
  padding: 13px;
  border: 1px solid rgba(255, 90, 78, 0.38);
  border-radius: 14px;
  background: rgba(35, 16, 18, 0.92);
}

.restart-confirm > strong { font-size: 13px; }
.restart-confirm > p { margin: 6px 0 11px; color: var(--paper-muted); font-size: 10px; line-height: 1.45; }
.restart-confirm > .restart-error { color: #ff9b91; }
.restart-confirm > div { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.restart-confirm button { min-height: 42px; padding-inline: 12px; font-size: 10px; }
.danger-button { border: 1px solid rgba(255, 90, 78, 0.6); border-radius: 12px; background: rgba(170, 48, 43, 0.78); color: #fff3ee; }
.danger-button:disabled { opacity: 0.55; }

.story-card-locked {
  display: grid;
  grid-template-columns: 1fr auto;
  min-height: 112px;
  align-items: center;
  gap: 6px 14px;
  padding: 17px 18px;
  opacity: 0.68;
}

.story-card-locked h2 {
  margin-bottom: 0;
  font-size: 22px;
}

.story-card-locked > p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--paper-muted);
  font-size: 11px;
  line-height: 1.45;
}

.lock-chip {
  color: var(--paper-muted);
  border-color: rgba(242, 230, 207, 0.2);
  background: rgba(242, 230, 207, 0.05);
}

.local-progress-note {
  margin: 14px 0 0;
  color: rgba(242, 230, 207, 0.42);
  font-size: 9px;
  letter-spacing: 0.04em;
  text-align: center;
}

.screen {
  position: absolute;
  inset: 0;
  animation: screen-in 440ms cubic-bezier(.22,.9,.3,1) both;
}

.scene-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
  animation: slow-push 9s ease-out both;
}

.scene-effects {
  position: absolute;
  z-index: 2;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.scene-effects.rain::before,
.scene-effects.rain::after {
  position: absolute;
  inset: -22% -18%;
  content: "";
  opacity: 0.34;
  transform: rotate(4deg);
  background-image: repeating-linear-gradient(
    102deg,
    transparent 0,
    transparent 16px,
    rgba(214, 231, 242, 0.52) 17px,
    transparent 18px,
    transparent 35px
  );
  background-size: 38px 86px;
  animation: rain-fall 760ms linear infinite;
}

.scene-effects.window-rain span,
.scene-effects.window-rain em {
  position: absolute;
  content: "";
  opacity: 0.28;
  background-image: repeating-linear-gradient(
    102deg,
    transparent 0,
    transparent 14px,
    rgba(214, 231, 242, 0.58) 15px,
    transparent 16px,
    transparent 33px
  );
  background-size: 36px 82px;
  animation: room-window-rain 900ms linear infinite;
  will-change: background-position, opacity;
}

.scene-effects.window-rain em {
  opacity: 0.12;
  background-size: 51px 117px;
  filter: blur(0.6px);
  animation-duration: 1.25s;
  animation-delay: -540ms;
}

.scene-effects.cabinet-window span,
.scene-effects.cabinet-window em {
  top: 1%;
  left: 0;
  width: 39%;
  height: 29%;
  overflow: hidden;
  clip-path: polygon(1% 0, 96% 0, 94% 98%, 3% 98%);
}

.scene-effects.tower-window span,
.scene-effects.tower-window em {
  top: 0;
  left: 0;
  width: 73.5%;
  height: 74%;
  clip-path: polygon(0 0, 98% 0, 96% 96%, 1% 100%);
}

.scene-effects.rain::after {
  opacity: 0.16;
  background-size: 53px 122px;
  filter: blur(0.6px);
  animation-duration: 1040ms;
  animation-delay: -620ms;
}

.scene-effects.dust::before,
.scene-effects.dust::after,
.scene-effects.dust-soft::before,
.scene-effects.dust-soft::after {
  position: absolute;
  inset: 8% 5% 23%;
  content: "";
  opacity: 0.62;
  background-image:
    radial-gradient(circle, rgba(255, 225, 168, 0.75) 0 1px, transparent 1.6px),
    radial-gradient(circle, rgba(255, 225, 168, 0.55) 0 0.8px, transparent 1.3px),
    radial-gradient(circle, rgba(255, 225, 168, 0.5) 0 1px, transparent 1.6px);
  background-position: 14% 24%, 71% 13%, 42% 73%;
  background-size: 73px 89px, 111px 131px, 137px 97px;
  animation: dust-float 12s ease-in-out infinite alternate;
}

.scene-effects.dust::after,
.scene-effects.dust-soft::after {
  opacity: 0.34;
  filter: blur(0.7px);
  transform: scale(1.15);
  animation-duration: 17s;
  animation-direction: alternate-reverse;
}

.scene-effects.dust-soft::before { opacity: 0.22; }
.scene-effects.dust-soft::after { opacity: 0.12; }

.scene-effects.phone-glow i,
.scene-effects.warm-light i,
.scene-effects.page-light i,
.scene-effects.doorway-light i,
.scene-effects.tower-light i {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 52% 48%, rgba(232, 163, 74, 0.14), transparent 35%);
  mix-blend-mode: screen;
  animation: light-breathe 5.8s ease-in-out infinite alternate;
}

.scene-effects.phone-glow i {
  background: radial-gradient(circle at 47% 35%, rgba(147, 202, 255, 0.25), transparent 23%);
}

.scene-effects.phone-glow b {
  position: absolute;
  inset: 0;
  background: url("/media/intro-01.jpg") center / cover no-repeat;
  clip-path: polygon(21% 18%, 63% 17%, 73% 67%, 4% 76%, 3% 58%);
  transform-origin: 39% 45%;
  animation: phone-vibration 4.2s ease-in-out infinite;
}

.scene-effects.warm-light b,
.scene-effects.page-light b,
.scene-effects.doorway-light b,
.scene-effects.tower-light b {
  position: absolute;
  pointer-events: none;
  mix-blend-mode: screen;
  will-change: transform, opacity;
}

.scene-effects.warm-light b {
  inset: 0;
  background:
    radial-gradient(circle at 9% 38%, rgba(255, 188, 86, 0.38), transparent 13%),
    radial-gradient(circle at 76% 29%, rgba(255, 181, 77, 0.28), transparent 12%);
  animation: lamp-flicker 3.8s ease-in-out infinite;
}

.scene-effects.page-light b {
  top: 12%;
  left: -28%;
  width: 38%;
  height: 58%;
  background: linear-gradient(102deg, transparent, rgba(255, 224, 164, 0.46), transparent);
  filter: blur(4px);
  transform: rotate(10deg);
  animation: page-sheen 5.6s ease-in-out infinite;
}

.scene-effects.doorway-light b {
  top: 4%;
  left: 31%;
  width: 43%;
  height: 78%;
  background: linear-gradient(96deg, transparent 2%, rgba(141, 190, 226, 0.08) 42%, rgba(255, 190, 102, 0.24) 100%);
  clip-path: polygon(8% 0, 100% 0, 82% 100%, 0 100%);
  filter: blur(2px);
  animation: doorway-pulse 4.4s ease-in-out infinite;
}

.scene-effects.tower-light b {
  display: none;
}

.cinematic.phone-glow .scene-image {
  animation: none;
  transform: none;
}

.scene-effects.rain::before,
.scene-effects.rain::after,
.scene-effects.dust::before,
.scene-effects.dust::after,
.scene-effects.dust-soft::before,
.scene-effects.dust-soft::after,
.scene-effects.phone-glow b,
.cabinet-effects i,
.case-effects.has-leak::before,
.case-effects.has-leak b {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  will-change: transform, opacity, background-position;
}

.scene-effects.page-light i {
  background: radial-gradient(ellipse at 63% 26%, rgba(255, 202, 104, 0.34), transparent 39%);
  animation: page-flicker 4.8s ease-in-out infinite;
}

.scene-effects.doorway-light i {
  background: linear-gradient(102deg, transparent 36%, rgba(232, 163, 74, 0.08) 53%, transparent 72%);
  animation: light-sweep 9s ease-in-out infinite alternate;
}

.scene-effects.tower-light i {
  background: radial-gradient(ellipse at 53% 32%, rgba(255, 90, 78, 0.14), transparent 23%);
  animation-duration: 8.5s;
}

.cinematic::before,
.cabinet::before,
.case-screen::before {
  position: absolute;
  z-index: 1;
  inset: 0;
  content: "";
  pointer-events: none;
}

.case-screen .scene-image {
  animation: none;
  transform: none;
}

.case-effects.has-leak::before {
  position: absolute;
  top: 5.4%;
  left: 0;
  width: 30.5%;
  height: 36.8%;
  content: "";
  opacity: 0.3;
  background-image: repeating-linear-gradient(
    101deg,
    transparent 0,
    transparent 13px,
    rgba(211, 231, 242, 0.58) 14px,
    transparent 15px,
    transparent 31px
  );
  background-size: 34px 82px;
  clip-path: polygon(7% 1%, 99% 1%, 97% 94%, 8% 96%);
  animation: case-window-rain 920ms linear infinite;
}

.case-effects.has-leak b {
  position: absolute;
  top: 1.5%;
  left: 29.8%;
  width: 3px;
  height: 10px;
  border-radius: 50% 50% 55% 55%;
  background: linear-gradient(to bottom, rgba(225, 241, 249, 0.28), rgba(225, 241, 249, 0.9));
  box-shadow: 0 0 3px rgba(205, 231, 246, 0.42);
  opacity: 0;
  animation: ceiling-drop 2.35s cubic-bezier(.32,.02,.76,.72) infinite;
}

.case-effects.has-leak::after {
  position: absolute;
  top: 40.8%;
  left: 16.8%;
  width: 10%;
  height: 1.8%;
  border: 1px solid rgba(219, 237, 246, 0.46);
  border-radius: 50%;
  content: "";
  opacity: 0;
  transform: scale(0.25);
  animation: bucket-ripple 2.35s ease-out infinite;
}

.cinematic::before {
  background:
    linear-gradient(to bottom, rgba(6, 10, 17, 0.38) 0%, transparent 32%),
    linear-gradient(to top, rgba(7, 11, 18, 0.97) 0%, rgba(7, 11, 18, 0.7) 32%, transparent 64%);
}

.topline {
  position: absolute;
  z-index: 4;
  top: var(--safe-top);
  left: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topline-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  color: rgba(242, 230, 207, 0.86);
  font: 600 12px/1 Georgia, serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.door-glyph {
  width: 13px;
  height: 19px;
  border: 1px solid var(--amber);
  border-radius: 6px 6px 1px 1px;
  box-shadow: inset -3px 0 6px rgba(232, 163, 74, 0.22);
  animation: glyph-glow 4.8s ease-in-out infinite alternate;
}

.quiet-button {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid rgba(242, 230, 207, 0.25);
  border-radius: 999px;
  background: rgba(8, 12, 18, 0.36);
  backdrop-filter: blur(10px);
  color: rgba(242, 230, 207, 0.85);
  font-size: 12px;
  cursor: pointer;
}

.cinematic-copy {
  position: absolute;
  z-index: 3;
  right: 22px;
  bottom: calc(var(--safe-bottom) + 20px);
  left: 22px;
  max-height: calc(100% - var(--safe-top) - 68px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  touch-action: pan-y;
}

.cinematic-copy::-webkit-scrollbar { display: none; }

.intro-points {
  display: grid;
  gap: 8px;
  margin: -8px 0 20px;
  padding: 0;
  list-style: none;
}

.intro-points li {
  position: relative;
  padding-left: 22px;
  color: rgba(242, 230, 207, 0.87);
  font-size: 13px;
  line-height: 1.35;
}

.intro-points li::before {
  position: absolute;
  top: 0.48em;
  left: 2px;
  width: 7px;
  height: 7px;
  border: 1px solid var(--amber);
  border-radius: 50% 50% 2px 50%;
  content: "";
  transform: rotate(-45deg);
}

.briefing-screen .scene-image {
  filter: brightness(0.72) saturate(0.78);
}

.briefing-screen .cinematic-copy h1 {
  font-size: clamp(36px, 10vw, 50px);
}

.briefing-screen .cinematic-copy > p:not(.eyebrow) {
  min-height: auto;
  margin-bottom: 18px;
  font-size: 15px;
}

.cinematic-copy h1 {
  max-width: 360px;
  margin: 8px 0 12px;
  font: 500 clamp(38px, 11vw, 54px)/0.98 Georgia, serif;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.cinematic-copy > p:not(.eyebrow) {
  max-width: 370px;
  min-height: 52px;
  margin: 0 0 25px;
  color: rgba(242, 230, 207, 0.82);
  font: 17px/1.5 Georgia, serif;
}

.progress-row {
  display: flex;
  gap: 7px;
  margin-bottom: 20px;
}

.progress-row i {
  display: block;
  width: 26px;
  height: 2px;
  border: 0;
  border-radius: 2px;
  background: rgba(242, 230, 207, 0.26);
  transition: width 220ms ease, background 220ms ease;
}

.progress-row i.is-active {
  width: 42px;
  background: var(--amber);
  box-shadow: 0 0 10px rgba(232, 163, 74, 0.28);
  animation: progress-glow 2.6s ease-in-out infinite alternate;
}

.action-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.primary-button,
.secondary-button {
  min-height: 54px;
  border-radius: 16px;
  cursor: pointer;
}

.primary-button {
  padding: 0 22px;
  border: 1px solid #f2bb70;
  background: linear-gradient(145deg, #efb462, #d88c34);
  box-shadow: 0 13px 34px rgba(232, 163, 74, 0.24);
  color: #17202b;
  font-size: 14px;
  font-weight: 780;
  transition: transform 140ms ease, filter 140ms ease;
}

.primary-button:active,
.secondary-button:active,
.quiet-button:active {
  transform: scale(0.975);
  filter: brightness(1.08);
}

.secondary-button {
  padding: 0 18px;
  border: 1px solid rgba(242, 230, 207, 0.22);
  background: rgba(242, 230, 207, 0.07);
  color: var(--paper);
  font-size: 13px;
}

.rules-screen {
  display: grid;
  grid-template-rows: minmax(210px, 42%) 1fr;
  background: #121b28;
}

.vera-panel {
  position: relative;
  overflow: hidden;
  background: var(--green);
}

.vera-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
  filter: saturate(0.86) contrast(1.04);
  transform: scale(1.035);
  animation: portrait-drift 12s ease-in-out infinite alternate;
}

.vera-panel::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(to top, #121b28 0%, transparent 42%);
}

.vera-label {
  position: absolute;
  z-index: 2;
  right: 20px;
  bottom: 25px;
  left: 20px;
  display: flex;
  align-items: end;
  justify-content: space-between;
}

.vera-label h1 {
  margin: 6px 0 0;
  font: 500 36px/1 Georgia, serif;
}

.rule-count {
  color: var(--amber);
  font: 500 26px/1 Georgia, serif;
}

.rule-copy {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 8px 24px var(--safe-bottom);
}

.rule-card {
  position: relative;
  flex: 1;
  margin: 0 0 18px;
  padding: 24px 23px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(232, 163, 74, 0.42) transparent;
  touch-action: pan-y;
  border: 1px solid rgba(242, 230, 207, 0.14);
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0%, rgba(232, 163, 74, 0.12), transparent 50%),
    rgba(242, 230, 207, 0.045);
}

.rule-card::-webkit-scrollbar { width: 3px; }
.rule-card::-webkit-scrollbar-thumb { border-radius: 3px; background: rgba(232, 163, 74, 0.42); }

.rule-card::after {
  position: absolute;
  right: -15px;
  bottom: -34px;
  width: 110px;
  height: 150px;
  border: 1px solid rgba(232, 163, 74, 0.19);
  border-radius: 58px 58px 0 0;
  content: "";
  box-shadow: inset 8px 0 22px rgba(232, 163, 74, 0.04);
  animation: rule-door-glow 4.6s ease-in-out infinite alternate;
  pointer-events: none;
}

.rule-card h2 {
  max-width: 320px;
  margin: 4px 0 14px;
  font: 500 clamp(28px, 8vw, 36px)/1.05 Georgia, serif;
  letter-spacing: -0.025em;
}

.rule-card p {
  max-width: 330px;
  margin: 0;
  color: var(--paper-muted);
  font-size: 15px;
  line-height: 1.58;
}

.rule-card .rule-hint {
  margin-top: 17px;
  padding-top: 14px;
  border-top: 1px solid rgba(232, 163, 74, 0.24);
  color: var(--amber);
  font: italic 14px/1.45 Georgia, serif;
}

.rule-footer {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
}

.mini-progress {
  display: flex;
  gap: 6px;
}

.mini-progress i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(242, 230, 207, 0.2);
}

.mini-progress i.is-active {
  background: var(--amber);
  box-shadow: 0 0 12px rgba(232, 163, 74, 0.6);
}

.cabinet::before {
  background: linear-gradient(to bottom, rgba(7, 11, 17, 0.52), transparent 24%, transparent 64%, rgba(7, 11, 17, 0.64));
}

.cabinet .scene-image {
  animation-duration: 14s;
}

.cabinet-effects,
.case-effects {
  position: absolute;
  z-index: 2;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.cabinet-effects i {
  position: absolute;
  top: 0;
  left: 0;
  width: 39.5%;
  height: 30%;
  content: "";
  opacity: 0.18;
  background-image: repeating-linear-gradient(
    100deg,
    transparent 0,
    transparent 19px,
    rgba(196, 216, 228, 0.4) 20px,
    transparent 21px,
    transparent 43px
  );
  background-size: 47px 104px;
  clip-path: polygon(1% 0, 98% 0, 96% 91%, 2% 92%);
  animation: cabinet-rain 1.35s linear infinite;
}

.cabinet-effects b {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 39%, rgba(255, 195, 103, 0.17), transparent 20%),
    radial-gradient(circle at 84% 31%, rgba(255, 190, 89, 0.12), transparent 18%);
  mix-blend-mode: screen;
  animation: cabinet-lamps 6.4s ease-in-out infinite alternate;
}

.cabinet-hud {
  position: absolute;
  z-index: 4;
  top: var(--safe-top);
  right: 16px;
  left: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.day-chip,
.bureau-chip {
  min-height: 40px;
  padding: 8px 13px;
  border: 1px solid rgba(242, 230, 207, 0.2);
  border-radius: 14px;
  background: rgba(7, 11, 17, 0.54);
  backdrop-filter: blur(14px);
}

.day-chip strong,
.bureau-chip strong {
  display: block;
  font-size: 12px;
  line-height: 1.1;
}

.day-chip span,
.bureau-chip span {
  color: var(--paper-muted);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hotspot {
  position: absolute;
  z-index: 3;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(242, 230, 207, 0.74);
  border-radius: 50%;
  background: rgba(14, 20, 28, 0.47);
  box-shadow: 0 0 0 6px rgba(242, 230, 207, 0.07);
  backdrop-filter: blur(6px);
  cursor: pointer;
}

.hotspot::before,
.hotspot::after {
  position: absolute;
  top: 50%;
  left: 50%;
  content: "";
  background: rgba(242, 230, 207, 0.88);
  transform: translate(-50%, -50%);
}

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

.hotspot:active {
  transform: scale(0.86);
  background: rgba(232, 163, 74, 0.55);
  transition: transform 100ms ease, background 100ms ease;
}

.hotspot.is-primary {
  top: 41%;
  left: 27%;
  border-color: var(--amber);
  background: rgba(90, 52, 15, 0.62);
  box-shadow: 0 0 0 8px rgba(232, 163, 74, 0.11), 0 0 30px rgba(232, 163, 74, 0.64);
  animation: breathe 2.1s ease-in-out infinite;
}

.hotspot > span {
  position: absolute;
  top: 48px;
  left: 50%;
  width: max-content;
  max-width: 90px;
  padding: 3px 6px;
  border-radius: 7px;
  background: rgba(8, 13, 20, 0.78);
  color: var(--paper);
  font-size: 9px;
  transform: translateX(-50%);
}

.hotspot.phone { top: 36%; left: 42%; }
.hotspot.door { top: 25%; left: 56%; }
.hotspot.board { top: 25%; right: 7%; }
.hotspot.tower { top: 15%; left: 19%; }

.cabinet-detail {
  position: absolute;
  z-index: 9;
  right: 18px;
  bottom: calc(var(--safe-bottom) + 20px);
  left: 18px;
  max-height: calc(100% - var(--safe-top) - var(--safe-bottom) - 40px);
  padding: 22px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  border: 1px solid rgba(232, 163, 74, 0.35);
  border-radius: 22px;
  background: rgba(8, 13, 20, 0.96);
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(22px);
}

.cabinet-detail h2 { margin: 7px 0 9px; font: 500 28px/1.08 Georgia, serif; }
.cabinet-detail > p:not(.eyebrow) { margin: 0 0 18px; color: var(--paper-muted); font: 15px/1.5 Georgia, serif; }
.cabinet-detail .primary-button, .cabinet-detail .secondary-button { width: 100%; }
.cabinet-detail-close { position: absolute; top: 10px; right: 12px; border: 0; background: transparent; color: var(--paper-muted); font-size: 26px; }

.cabinet-detail.is-materials {
  top: max(calc(var(--safe-top) + 140px), 24%);
  display: flex;
  flex-direction: column;
  min-height: 52%;
  max-height: calc(100% - var(--safe-top) - var(--safe-bottom) - 165px);
}

.case-materials {
  min-height: 0;
  margin: 2px -5px 18px 0;
  padding-right: 8px;
  overflow-y: auto;
  color: var(--paper-muted);
  font: 14px/1.48 Georgia, serif;
}

.case-materials p { margin: 0 0 11px; }
.case-materials p:first-child { color: var(--paper); font-size: 16px; }
.materials-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
  margin-top: auto;
}

.materials-actions:has(.is-read) { grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr); }
.materials-actions .primary-button, .materials-actions .secondary-button { min-width: 0; padding-inline: 12px; }
.materials-actions .is-read { color: #9fd6ae; opacity: 1; }

.toast {
  position: absolute;
  z-index: 8;
  top: calc(var(--safe-top) + 58px);
  right: 18px;
  left: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(242, 230, 207, 0.2);
  border-radius: 16px;
  background: rgba(9, 14, 22, 0.88);
  box-shadow: 0 12px 38px rgba(0, 0, 0, 0.35);
  color: var(--paper);
  font: 14px/1.45 Georgia, serif;
  backdrop-filter: blur(18px);
  animation: toast-in 240ms ease-out both;
}

.case-screen::before {
  background:
    linear-gradient(to bottom, rgba(8, 12, 18, 0.3), transparent 30%),
    linear-gradient(to top, #0d141e 0%, rgba(13, 20, 30, 0.92) 28%, transparent 68%);
}

.case-effects i {
  position: absolute;
  inset: -15%;
  background: linear-gradient(112deg, transparent 38%, rgba(232, 163, 74, 0.1) 50%, transparent 61%);
  mix-blend-mode: screen;
  animation: case-light-pass 10s ease-in-out infinite;
}

.back-button {
  position: absolute;
  z-index: 4;
  top: var(--safe-top);
  left: 18px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(242, 230, 207, 0.23);
  border-radius: 50%;
  background: rgba(7, 11, 17, 0.52);
  backdrop-filter: blur(12px);
  cursor: pointer;
}

.case-copy {
  position: absolute;
  z-index: 3;
  right: 22px;
  bottom: calc(var(--safe-bottom) + 12px);
  left: 22px;
  max-height: calc(100% - var(--safe-top) - 70px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  touch-action: pan-y;
}

.case-copy::-webkit-scrollbar { display: none; }

.case-copy h1 {
  margin: 7px 0 2px;
  font: 500 clamp(48px, 14vw, 66px)/0.95 Georgia, serif;
  letter-spacing: -0.04em;
}

.case-subtitle {
  margin: 0 0 22px;
  color: var(--amber);
  font: italic 17px/1.4 Georgia, serif;
}

.case-meta {
  display: grid;
  gap: 12px;
  margin: 0 0 20px;
  padding: 17px 0;
  border-top: 1px solid rgba(242, 230, 207, 0.18);
  border-bottom: 1px solid rgba(242, 230, 207, 0.18);
}

.case-meta div {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
}

.case-meta dt {
  color: var(--steel);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.case-meta dd {
  margin: 0;
  color: rgba(242, 230, 207, 0.88);
  font-size: 13px;
  line-height: 1.42;
}

.preview-note {
  margin: 10px 0 0;
  color: rgba(242, 230, 207, 0.5);
  font-size: 10px;
  text-align: center;
}

.notebook-screen,
.scene-map-screen {
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
}

.notebook-screen::-webkit-scrollbar,
.scene-map-screen::-webkit-scrollbar {
  display: none;
}

.notebook-screen {
  padding: var(--safe-top) 18px var(--safe-bottom);
  background:
    radial-gradient(circle at 50% 12%, rgba(232, 163, 74, 0.18), transparent 35%),
    linear-gradient(160deg, #182130, #0a1019 74%);
}

.flow-header {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: auto 1fr auto;
  min-height: 48px;
  align-items: center;
  gap: 12px;
}

.flow-header strong {
  display: block;
  margin-top: 3px;
  font: 500 15px/1.1 Georgia, serif;
}

.flow-back {
  position: static;
  width: 40px;
  height: 40px;
}

.page-side,
.day-number {
  color: var(--paper-muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.notebook-visual {
  position: relative;
  display: grid;
  height: 235px;
  place-items: start center;
  margin: 4px -26px -42px;
  overflow: hidden;
  pointer-events: none;
}

.notebook-visual::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(to bottom, transparent 55%, #121925 94%);
}

.notebook-visual::before {
  position: absolute;
  z-index: 2;
  top: 7%;
  bottom: 18%;
  left: -35%;
  width: 34%;
  content: "";
  background: linear-gradient(104deg, transparent, rgba(255, 221, 157, 0.3), transparent);
  filter: blur(5px);
  animation: notebook-sheen 6.5s ease-in-out infinite;
}

.notebook-book {
  position: relative;
  width: min(100%, 353px);
  aspect-ratio: 820 / 546;
  transform: rotate(-1deg) scale(1.08);
  transform-origin: top center;
  animation: notebook-drift 8s ease-in-out infinite alternate;
}

.notebook-book img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  filter: drop-shadow(0 20px 35px rgba(0, 0, 0, 0.45));
}

.notebook-ink {
  position: absolute;
  z-index: 3;
  color: rgba(56, 43, 30, 0.78);
  font: 600 clamp(10px, 3vw, 14px)/1.28 "Bradley Hand", "Segoe Print", cursive;
  overflow-wrap: anywhere;
  text-align: center;
  transform: rotate(-3deg);
  text-shadow: 0 1px rgba(255, 255, 255, 0.24);
}

.notebook-ink.ink-left {
  top: 36%;
  left: 14%;
  width: 29%;
}

.notebook-ink.ink-right {
  top: 39%;
  left: 55%;
  width: 25%;
  transform: rotate(2deg);
}

.notebook-sheet {
  position: relative;
  z-index: 2;
  min-height: 475px;
  padding: 26px 23px 20px;
  border: 1px solid rgba(100, 67, 31, 0.38);
  border-radius: 7px 18px 18px 7px;
  background:
    repeating-linear-gradient(to bottom, transparent 0 30px, rgba(92, 69, 42, 0.1) 31px),
    linear-gradient(105deg, #e8d5b3, #f3e6ca 52%, #dfc49b);
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.4), inset 12px 0 24px rgba(99, 67, 35, 0.09);
  color: #352a20;
}

.notebook-sheet, .notebook-sheet * { min-width: 0; overflow-wrap: anywhere; }
.notebook-sheet p, .notebook-sheet li, .notebook-sheet blockquote { max-width: 100%; }

.notebook-sheet::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 18px;
  width: 1px;
  content: "";
  background: rgba(143, 72, 53, 0.18);
}

.notebook-sheet .eyebrow {
  color: #8a5324;
}

.notebook-sheet h1 {
  margin: 8px 0 16px;
  font: 500 clamp(31px, 9vw, 42px)/1 Georgia, serif;
  letter-spacing: -0.035em;
}

.lesson-lead {
  margin: 0 0 17px;
  font: italic 16px/1.48 Georgia, serif;
}

.notebook-sheet ul {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
  padding-left: 20px;
  font-size: 13px;
  line-height: 1.42;
}

.lesson-rule {
  margin: 0;
  padding: 13px 15px;
  border-left: 3px solid #a66a2e;
  background: rgba(107, 70, 35, 0.08);
  font: 600 16px/1.35 Georgia, serif;
}

.lesson-details {
  display: grid;
  gap: 12px;
}

.lesson-details p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.notebook-sheet blockquote {
  margin: 17px 0 0;
  padding: 13px 15px;
  border-left: 3px solid #8a5324;
  background: rgba(107, 70, 35, 0.08);
  font: italic 13px/1.48 Georgia, serif;
}

.notebook-actions {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 9px;
  margin-top: 20px;
}

.notebook-actions .primary-button,
.notebook-actions .secondary-button {
  min-height: 48px;
}

.paper-button {
  border-color: rgba(67, 44, 24, 0.25);
  background: rgba(70, 45, 22, 0.08);
  color: #493725;
}

.scene-map-screen {
  background: #0b111a;
}

.scene-map-screen > .scene-image {
  position: sticky;
  inset: auto;
  top: 0;
  display: block;
  width: 100%;
  height: 100svh;
  max-height: 960px;
  margin-bottom: max(-100svh, -960px);
  filter: brightness(0.62) saturate(0.75);
  animation: none;
}

.scene-map-shade {
  position: sticky;
  z-index: 1;
  top: 0;
  display: block;
  width: 100%;
  height: 100svh;
  max-height: 960px;
  margin-bottom: max(-100svh, -960px);
  background:
    linear-gradient(to bottom, rgba(7, 11, 17, 0.18), rgba(7, 11, 17, 0.72) 34%, #0b111a 92%),
    radial-gradient(circle at 12% 30%, rgba(232, 163, 74, 0.11), transparent 25%);
}

.scene-map-effects {
  position: sticky;
  z-index: 2;
  top: 0;
  display: block;
  width: 100%;
  height: 100svh;
  max-height: 960px;
  margin-bottom: max(-100svh, -960px);
  overflow: hidden;
  pointer-events: none;
}

.scene-map-effects.has-rain i {
  position: absolute;
  top: 3%;
  left: 0;
  width: 49%;
  height: 35%;
  opacity: 0.24;
  content: "";
  background-image: repeating-linear-gradient(101deg, transparent 0 14px, rgba(210, 232, 244, 0.58) 15px, transparent 16px 34px);
  background-size: 37px 86px;
  clip-path: polygon(2% 0, 99% 0, 97% 98%, 2% 98%);
  animation: map-window-rain 1.15s linear infinite;
}

.scene-map-effects b {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 9% 27%, rgba(255, 188, 91, 0.2), transparent 18%);
  mix-blend-mode: screen;
  animation: lamp-flicker 4.4s ease-in-out infinite;
}

.scene-map-copy { z-index: 3; }

.map-header {
  position: sticky;
  top: 0;
  margin: 0;
  padding: var(--safe-top) 18px 12px;
  background: linear-gradient(to bottom, rgba(7, 11, 17, 0.92), rgba(7, 11, 17, 0.58), transparent);
  backdrop-filter: blur(5px);
}

.scene-map-copy {
  position: relative;
  z-index: 2;
  padding: 160px 20px calc(var(--safe-bottom) + 16px);
}

.scene-map-copy > h1 {
  margin: 0 0 12px;
  font: 500 clamp(46px, 14vw, 64px)/0.95 Georgia, serif;
  letter-spacing: -0.04em;
}

.scene-map-copy > blockquote {
  margin: 0 0 18px;
  padding: 13px 15px;
  border: 1px solid rgba(232, 163, 74, 0.24);
  border-radius: 15px;
  background: rgba(8, 13, 20, 0.68);
  color: rgba(242, 230, 207, 0.84);
  font: italic 14px/1.48 Georgia, serif;
  backdrop-filter: blur(12px);
}

.briefing-grid {
  display: grid;
  gap: 9px;
}

.briefing-grid article {
  padding: 14px 15px;
  border: 1px solid rgba(242, 230, 207, 0.14);
  border-radius: 15px;
  background: rgba(9, 14, 22, 0.74);
  backdrop-filter: blur(14px);
}

.briefing-grid span {
  color: var(--steel);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.briefing-grid p {
  margin: 5px 0 0;
  color: rgba(242, 230, 207, 0.88);
  font-size: 13px;
  line-height: 1.42;
}

.briefing-grid .locked-dossier {
  border-color: rgba(232, 163, 74, 0.22);
}

.outcome-ladder {
  display: grid;
  gap: 8px;
  margin: 22px 0 18px;
}

.outcome-ladder > .eyebrow {
  margin-bottom: 2px;
}

.outcome-step {
  display: grid;
  grid-template-columns: 25px 68px 1fr;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(242, 230, 207, 0.12);
  border-radius: 13px;
  background: rgba(9, 14, 22, 0.76);
}

.outcome-step i {
  width: 14px;
  height: 20px;
  border: 1px solid rgba(242, 230, 207, 0.48);
  border-radius: 7px 7px 1px 1px;
}

.outcome-step span {
  color: var(--steel);
  font-size: 9px;
  text-transform: uppercase;
}

.outcome-step strong {
  font-size: 11px;
  line-height: 1.35;
}

.outcome-step.is-secret {
  border-color: rgba(255, 90, 78, 0.3);
  background: linear-gradient(90deg, rgba(255, 90, 78, 0.09), rgba(9, 14, 22, 0.8));
}

.outcome-step.is-secret i {
  border-color: var(--coral);
  box-shadow: inset 4px 0 8px rgba(255, 90, 78, 0.16), 0 0 13px rgba(255, 90, 78, 0.13);
}

.map-start {
  width: 100%;
}

.quiz-screen {
  overflow-y: auto;
  padding-bottom: var(--safe-bottom);
  background:
    radial-gradient(circle at 82% 18%, rgba(232, 163, 74, 0.15), transparent 34%),
    linear-gradient(155deg, #111a27, #090f18 74%);
}

.quiz-copy {
  padding: 30px 22px 28px;
}

.quiz-mark {
  display: grid;
  width: 58px;
  height: 58px;
  margin-bottom: 24px;
  place-items: center;
  border: 1px solid rgba(232, 163, 74, 0.44);
  border-radius: 18px 18px 4px 18px;
  color: var(--amber);
  font: 500 34px/1 Georgia, serif;
  box-shadow: inset 0 0 22px rgba(232, 163, 74, 0.08);
}

.quiz-copy h1 {
  margin: 8px 0 24px;
  font: 500 clamp(30px, 8.5vw, 40px)/1.08 Georgia, serif;
}

.quiz-answers {
  display: grid;
  gap: 10px;
}

.quiz-answer {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 10px;
  padding: 13px;
  border: 1px solid rgba(242, 230, 207, 0.16);
  border-radius: 16px;
  background: rgba(242, 230, 207, 0.055);
  text-align: left;
}

.quiz-answer i {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 10px;
  background: rgba(242, 230, 207, 0.08);
  color: var(--amber);
  font-style: normal;
  font-weight: 750;
}

.quiz-answer span { font-size: 13px; line-height: 1.4; }
.quiz-answer.is-correct { border-color: rgba(93, 190, 151, 0.7); background: rgba(47, 93, 80, 0.45); }
.quiz-answer.is-wrong { border-color: rgba(255, 90, 78, 0.55); }

.quiz-feedback {
  margin-top: 14px;
  padding: 14px;
  border-left: 3px solid var(--coral);
  border-radius: 3px 12px 12px 3px;
  background: rgba(255, 90, 78, 0.08);
}

.quiz-feedback.is-correct { border-color: #5dbe97; background: rgba(47, 93, 80, 0.26); }
.quiz-feedback p { margin: 5px 0 0; color: var(--paper-muted); font-size: 12px; line-height: 1.5; }
.quiz-next { width: 100%; margin-top: 14px; }

.conversation-screen {
  display: grid;
  grid-template-rows: auto 1fr auto;
  background:
    linear-gradient(rgba(10, 15, 23, 0.42), rgba(10, 15, 23, 0.78)),
    var(--location-image) center / cover;
}

.conversation-character {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border-bottom: 1px solid rgba(242, 230, 207, 0.1);
  background: #0c121c;
}

.conversation-character img,
.conversation-character > div {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.conversation-character img {
  object-fit: cover;
  object-position: 50% 24%;
  transform: scale(1.04);
  transition: opacity 420ms ease, transform 2.8s ease;
}

.conversation-character > div {
  background:
    linear-gradient(90deg, rgba(8, 13, 20, 0.72), transparent 40%, rgba(8, 13, 20, 0.25)),
    linear-gradient(to top, rgba(8, 13, 20, 0.8), transparent 55%);
}

.conversation-character p {
  position: absolute;
  z-index: 1;
  bottom: 10px;
  left: 16px;
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--paper-muted);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.conversation-character p i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 11px rgba(232, 163, 74, 0.6);
}

.conversation-character.mood-irritated p i {
  background: var(--coral);
  box-shadow: 0 0 12px rgba(255, 90, 78, 0.65);
}

.conversation-header {
  z-index: 2;
  display: grid;
  grid-template-columns: 42px 46px minmax(0, 1fr) auto;
  min-height: 86px;
  align-items: center;
  gap: 10px;
  padding: var(--safe-top) 16px 10px;
  border-bottom: 1px solid rgba(242, 230, 207, 0.12);
  background: rgba(9, 14, 22, 0.86);
  backdrop-filter: blur(16px);
}

.conversation-header .conversation-back {
  position: static;
  width: 40px;
  height: 40px;
}

.conversation-header img {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(232, 163, 74, 0.5);
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 27%;
}

.conversation-header h1 {
  margin: 3px 0 0;
  font: 500 24px/1 Georgia, serif;
}

.conversation-header > span {
  color: var(--paper-muted);
  font-size: 11px;
}

.inspect-room-button {
  display: grid;
  width: 76px;
  min-height: 43px;
  place-items: center;
  align-content: center;
  gap: 1px;
  border: 1px solid rgba(232, 163, 74, 0.34);
  border-radius: 13px;
  background: rgba(232, 163, 74, 0.08);
  color: var(--amber);
  font-size: 16px;
}

.inspect-room-button small {
  color: var(--paper-muted);
  font-size: 6.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dialogue-stage {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
  padding: 12px 14px 0;
}

.dialogue-character-image,
.dialogue-character-shade {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.dialogue-character-image {
  object-fit: cover;
  object-position: 50% 12%;
  opacity: 0.94;
  filter: saturate(0.9) brightness(0.82);
}

.dialogue-character-shade {
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(8, 13, 20, 0.08), rgba(8, 13, 20, 0.28)),
    linear-gradient(to bottom, rgba(8, 13, 20, 0.02), rgba(8, 13, 20, 0.58));
}

.dialogue-intro {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 8px;
  margin: 0 4px 12px;
  padding: 9px 11px;
  border: 1px solid rgba(232, 163, 74, 0.2);
  border-radius: 12px;
  background: rgba(9, 14, 22, 0.72);
  font-size: 10px;
  line-height: 1.4;
}

.dialogue-intro strong { color: var(--amber); text-transform: uppercase; }
.dialogue-intro span { color: var(--paper-muted); }

.relationship-meter {
  position: relative;
  z-index: 2;
  margin: 0 4px 9px;
  padding: 9px 11px 10px;
  border-radius: 12px;
  background: rgba(9, 14, 22, 0.82);
}

.relationship-meter-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.relationship-meter-head strong {
  color: var(--paper-muted);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.relationship-meter-head span {
  min-width: 0;
  overflow: hidden;
  color: #f0d0aa;
  font-size: 10px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.relationship-meter-head em {
  color: rgba(242, 230, 207, 0.48);
  font-size: 9px;
  font-style: normal;
  white-space: nowrap;
}

.relationship-meter-track {
  --relationship-progress: 0%;
  position: relative;
  height: 5px;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(90deg, #b44f49 0%, #d88949 40%, #8eae92 70%, #f5f0e7 100%);
}

.relationship-meter-track i {
  position: absolute;
  inset: 0 0 0 var(--relationship-progress);
  background: #303640;
  transition: left 360ms ease;
}

.dialogue-list {
  position: relative;
  z-index: 2;
  min-height: 0;
  height: auto;
  overflow-y: auto;
  padding: 0 4px 18px;
  scrollbar-width: none;
}

.room-inspection {
  background: #080d14;
}

.room-inspection > img,
.room-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.room-inspection > img { object-fit: cover; object-position: center top; }
.room-shade { background: linear-gradient(to bottom, rgba(7, 11, 18, 0.42), transparent 42%, rgba(7, 11, 18, 0.9)); }

.room-inspection header {
  position: absolute;
  z-index: 3;
  top: var(--safe-top);
  right: 16px;
  left: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.room-inspection header .back-button { position: static; }
.room-inspection header strong { display: block; margin-top: 3px; font: 500 22px/1 Georgia, serif; }

.room-clue {
  position: absolute;
  z-index: 3;
  display: grid;
  justify-items: center;
  gap: 5px;
  border: 0;
  background: transparent;
  color: var(--paper);
  font-size: 9px;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 160ms ease;
}

.room-inspection.has-positioned-clues .room-clue { opacity: 1; }

.room-clue i {
  width: 28px;
  height: 28px;
  border: 2px solid var(--amber);
  border-radius: 50%;
  background: rgba(8, 13, 20, 0.42);
  box-shadow: 0 0 0 7px rgba(232, 163, 74, 0.12), 0 0 24px rgba(232, 163, 74, 0.42);
  animation: breathe 1.8s ease-in-out infinite;
}

.room-clue.is-artifact i {
  border-radius: 7px;
  border-color: #8fd4a8;
  background: rgba(30, 91, 57, 0.46);
  box-shadow: 0 0 0 7px rgba(85, 197, 135, 0.12), 0 0 24px rgba(85, 197, 135, 0.42);
}

.case-rail {
  position: absolute;
  z-index: 5;
  top: calc(var(--safe-top) + 58px);
  right: 12px;
  left: 12px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
}

.case-rail button {
  min-width: 0;
  padding: 6px 2px;
  border: 1px solid rgba(242, 230, 207, 0.16);
  border-radius: 10px;
  background: rgba(8, 13, 20, 0.7);
  backdrop-filter: blur(10px);
}

.case-rail span,
.case-rail small { display: block; }
.case-rail span { color: var(--amber); font-size: 12px; }
.case-rail small { overflow: hidden; color: var(--paper-muted); font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.case-rail .is-complete { border-color: rgba(232, 163, 74, 0.48); }
.case-rail .is-locked { opacity: 0.45; }

.trump-preview {
  margin: 16px 0;
  padding: 14px;
  border: 1px solid rgba(232, 163, 74, 0.25);
  border-radius: 16px;
  background: rgba(8, 13, 20, 0.72);
}

.trump-preview img {
  width: 56px;
  height: 78px;
  margin: 10px 6px 0 0;
  border-radius: 7px;
  object-fit: cover;
}

.conversation-trumps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 14px;
}

.conversation-trumps button {
  padding: 7px 9px;
  border: 1px solid rgba(232, 163, 74, 0.35);
  border-radius: 999px;
  background: rgba(8, 13, 20, 0.84);
  color: var(--amber);
  font-size: 9px;
}

.trump-earned img {
  width: 92px;
  height: 128px;
  border-radius: 10px;
  object-fit: cover;
}

.trump-earned p { margin: 8px 0 0; color: var(--paper-muted); font-size: 12px; }

.epilogue-screen { background: #080d14; }
.epilogue-screen .scene-image { filter: brightness(0.8) saturate(0.86); animation-duration: 12s; }
.epilogue-shade { position: absolute; z-index: 1; inset: 0; background: linear-gradient(to bottom, rgba(6, 9, 14, 0.08) 20%, rgba(6, 9, 14, 0.92) 82%); }
.epilogue-copy { position: absolute; z-index: 2; right: 22px; bottom: calc(var(--safe-bottom) + 8px); left: 22px; max-height: calc(100% - var(--safe-top) - 48px); overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; touch-action: pan-y; }
.epilogue-copy::-webkit-scrollbar { display: none; }
.epilogue-copy h1 { margin: 8px 0 10px; font: 500 clamp(38px, 12vw, 58px)/0.98 Georgia, serif; }
.epilogue-copy > p:not(.eyebrow) { margin: 0 0 18px; color: var(--paper-muted); font: 16px/1.5 Georgia, serif; }
.epilogue-copy .primary-button { width: 100%; margin-top: 18px; }

.season-end-screen {
  display: grid;
  align-content: safe center;
  justify-items: start;
  overflow-y: auto;
  padding: 30px;
  background:
    linear-gradient(rgba(7, 11, 17, 0.62), rgba(7, 11, 17, 0.95)),
    url('/media/epilogue-97-northern-bridge-photo.jpg') center / cover;
}
.season-end-screen h1 { margin: 10px 0 18px; font: 500 clamp(42px, 12vw, 60px)/0.98 Georgia, serif; }
.season-end-screen > p:not(.eyebrow) { margin: 0 0 16px; color: var(--paper-muted); font: 16px/1.5 Georgia, serif; }
.season-end-screen > span { margin-bottom: 24px; color: var(--amber); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; }
.season-end-screen .primary-button { width: 100%; }
.season-end-actions { display: grid; width: 100%; gap: 10px; }
.season-end-actions .secondary-button { width: 100%; }

.room-note {
  position: absolute;
  z-index: 3;
  right: 18px;
  bottom: calc(var(--safe-bottom) + 6px);
  left: 18px;
  padding: 15px;
  border: 1px solid rgba(242, 230, 207, 0.15);
  border-radius: 18px;
  background: rgba(9, 14, 22, 0.88);
  backdrop-filter: blur(14px);
}

.room-note p { margin: 0 0 12px; color: var(--paper-muted); font: 13px/1.45 Georgia, serif; }
.room-note .primary-button { width: 100%; }

.debrief-screen {
  overflow-y: auto;
  background: linear-gradient(160deg, #111a27, #080d14 76%);
}

.debrief-hero {
  position: relative;
  min-height: 220px;
  display: flex;
  align-items: end;
  gap: 15px;
  padding: var(--safe-top) 22px 24px;
  overflow: hidden;
  background: #151b25;
}

.debrief-hero::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(to top, #101722 0%, transparent 70%);
}

.debrief-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 24%;
  opacity: 0.7;
}

.debrief-hero > div { position: relative; z-index: 1; }
.debrief-hero h1 { margin: 5px 0 0; font: 500 42px/1 Georgia, serif; }

.debrief-copy { padding: 22px 20px calc(var(--safe-bottom) + 22px); }
.debrief-copy > h2 { margin: 7px 0 14px; font: 500 31px/1.08 Georgia, serif; }
.debrief-copy blockquote { margin: 0 0 18px; padding: 14px; border-left: 3px solid var(--amber); background: rgba(232, 163, 74, 0.07); color: var(--paper-muted); font: 15px/1.5 Georgia, serif; }
.debrief-copy section { margin-top: 12px; padding: 15px; border: 1px solid rgba(242, 230, 207, 0.12); border-radius: 16px; background: rgba(242, 230, 207, 0.04); }
.debrief-copy h3 { margin: 0 0 9px; color: var(--amber); font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; }
.debrief-copy ul { display: grid; gap: 8px; margin: 0; padding-left: 18px; color: var(--paper-muted); font-size: 12px; line-height: 1.48; }
.debrief-quotes p { margin: 8px 0 0; color: var(--coral); font: 13px/1.45 Georgia, serif; }
.debrief-actions { display: grid; gap: 9px; margin-top: 18px; }
.debrief-actions .primary-button, .debrief-actions .secondary-button { width: 100%; }

.dialogue-list::-webkit-scrollbar { display: none; }

.dialogue-message {
  width: fit-content;
  max-width: 88%;
  margin: 0 0 11px;
  padding: 10px 12px 11px;
  border: 1px solid rgba(242, 230, 207, 0.12);
  border-radius: 5px 17px 17px 17px;
  background: rgba(21, 30, 43, 0.88);
  box-shadow: 0 9px 24px rgba(0, 0, 0, 0.24);
}

.dialogue-message.is-player {
  margin-left: auto;
  border-color: rgba(232, 163, 74, 0.3);
  border-radius: 17px 5px 17px 17px;
  background: rgba(87, 60, 28, 0.88);
}

.dialogue-message.is-system {
  width: 100%;
  max-width: none;
  border-color: rgba(232, 163, 74, 0.28);
  border-radius: 14px;
  background: rgba(8, 13, 20, 0.88);
}

.season-artifact-links { margin-top: 11px; }
.season-artifact-links button { width: 100%; min-height: 38px; padding: 8px 12px; border: 1px solid rgba(143, 212, 168, 0.48); border-radius: 11px; background: rgba(30, 91, 57, 0.24); color: #a9e1bb; font-size: 11px; font-weight: 700; }

.dialogue-message > span {
  display: block;
  margin-bottom: 4px;
  color: var(--amber);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.dialogue-message p {
  margin: 0;
  color: var(--paper);
  font: 15px/1.42 Georgia, serif;
  white-space: pre-wrap;
}

.dialogue-message.is-typing i {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 4px;
  border-radius: 50%;
  background: var(--paper-muted);
  animation: typing-dot 900ms ease-in-out infinite alternate;
}

.dialogue-message.is-typing i:nth-child(2) { animation-delay: 180ms; }
.dialogue-message.is-typing i:nth-child(3) { animation-delay: 360ms; }

.dialogue-error {
  margin: 10px 4px;
  padding: 10px;
  border-radius: 10px;
  background: rgba(124, 35, 31, 0.78);
  font-size: 11px;
  line-height: 1.45;
}

.dialogue-result {
  display: grid;
  gap: 6px;
  margin-top: 15px;
  padding: 18px;
  border: 1px solid rgba(232, 163, 74, 0.36);
  border-radius: 18px;
  background: rgba(9, 14, 22, 0.9);
}

.dialogue-result span { color: var(--amber); font-size: 9px; letter-spacing: 0.14em; }
.dialogue-result strong { font: 500 20px/1.25 Georgia, serif; }

.dialogue-composer {
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 48px;
  gap: 9px;
  padding: 11px 14px var(--safe-bottom);
  border-top: 1px solid rgba(242, 230, 207, 0.13);
  background: rgba(8, 13, 20, 0.94);
  backdrop-filter: blur(18px);
}

.dialogue-composer textarea {
  min-height: 48px;
  max-height: 110px;
  resize: none;
  padding: 12px 14px;
  border: 1px solid rgba(242, 230, 207, 0.2);
  border-radius: 16px;
  outline: none;
  background: rgba(242, 230, 207, 0.07);
  color: var(--paper);
  font: 14px/1.35 inherit;
}

.dialogue-composer textarea:focus { border-color: rgba(232, 163, 74, 0.6); }
.dialogue-composer textarea::placeholder { color: rgba(242, 230, 207, 0.42); }

.dialogue-composer button {
  width: 48px;
  height: 48px;
  align-self: end;
  border: 0;
  border-radius: 16px;
  background: var(--amber);
  color: #111925;
  font-size: 25px;
  font-weight: 800;
}

.dialogue-composer button:disabled,
.dialogue-composer textarea:disabled { opacity: 0.5; }

.onboarding-screen {
  overflow-y: auto;
  padding: calc(var(--safe-top) + 34px) 20px calc(var(--safe-bottom) + 24px);
  background:
    radial-gradient(circle at 80% 10%, rgba(232, 163, 74, 0.12), transparent 34%),
    linear-gradient(155deg, #131c29, #070c13 75%);
}

.onboarding-card {
  max-width: 520px;
  margin: 0 auto;
  padding: 24px;
  border: 1px solid rgba(242, 230, 207, 0.15);
  border-radius: 24px;
  background: rgba(8, 13, 20, 0.72);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.35);
}

.onboarding-card h1 { margin: 8px 0 13px; font: 500 40px/1.02 Georgia, serif; }
.onboarding-card > p:not(.eyebrow), .legal-copy { color: var(--paper-muted); font: 15px/1.55 Georgia, serif; }
.legal-copy { margin: 20px 0; padding: 14px; border-left: 2px solid var(--amber); background: rgba(242, 230, 207, 0.04); }
.legal-copy p { margin: 0 0 10px; }
.legal-copy p:last-child { margin-bottom: 0; }
.legal-document-links { display: grid; gap: 6px; margin: -4px 0 14px; }
.legal-details-link { display: block; width: max-content; max-width: 100%; padding: 6px 0; border: 0; border-bottom: 1px solid rgba(232, 163, 74, 0.55); background: transparent; color: var(--amber); font-size: 13px; text-align: left; }
.consent-row { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; margin: 12px 0; color: var(--paper); font-size: 13px; line-height: 1.45; }
.consent-row input { width: 20px; height: 20px; accent-color: var(--amber); }
.onboarding-card .primary-button { width: 100%; }
.identity-screen form label { display: grid; gap: 8px; margin: 24px 0 16px; color: var(--paper-muted); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }
.identity-screen input { min-height: 52px; padding: 0 15px; border: 1px solid rgba(242, 230, 207, 0.25); border-radius: 15px; outline: 0; background: rgba(242, 230, 207, 0.06); color: var(--paper); font-size: 18px; text-transform: none; }
.identity-screen input:focus { border-color: var(--amber); }
.role-options { display: grid; gap: 12px; margin-top: 24px; }
.role-card { display: grid; gap: 7px; width: 100%; padding: 18px; border: 1px solid rgba(242, 230, 207, 0.18); border-radius: 18px; background: rgba(242, 230, 207, 0.05); color: var(--paper); text-align: left; }
.role-card.is-tester { border-color: rgba(232, 163, 74, 0.44); background: rgba(232, 163, 74, 0.08); }
.role-card strong { font-size: 16px; }
.role-card span { color: var(--paper-muted); font-size: 12px; line-height: 1.45; }

.legal-details-modal {
  position: absolute;
  z-index: 20;
  inset: 0;
  display: grid;
  align-items: end;
  padding: calc(var(--safe-top) + 18px) 18px calc(var(--safe-bottom) + 18px);
  background: rgba(2, 5, 9, 0.82);
  backdrop-filter: blur(10px);
}

.legal-details-modal > article {
  position: relative;
  display: flex;
  flex-direction: column;
  max-height: 88%;
  padding: 24px;
  border: 1px solid rgba(232, 163, 74, 0.38);
  border-radius: 24px;
  background: #0b121c;
  box-shadow: 0 22px 80px rgba(0, 0, 0, 0.58);
}

.legal-details-modal h2 { margin: 7px 24px 14px 0; font: 500 30px/1.06 Georgia, serif; }
.legal-document-subtitle { margin: -7px 0 16px; color: var(--paper-muted); font-size: 11px; line-height: 1.4; }
.legal-details-sections { min-height: 0; margin-bottom: 18px; overflow-y: auto; }
.legal-details-sections section { padding: 12px 0; border-bottom: 1px solid rgba(242, 230, 207, 0.1); }
.legal-details-sections section:first-child { padding-top: 0; }
.legal-details-sections h3 { margin: 0 0 5px; color: var(--paper); font-size: 14px; }
.legal-details-sections p { margin: 0; color: var(--paper-muted); font: 13px/1.48 Georgia, serif; }
.legal-details-modal .primary-button { flex: none; width: 100%; }

.epilogue-copy .epilogue-actions { margin-top: 18px; }
.epilogue-actions { display: grid; grid-template-columns: 1fr auto; gap: 12px; }
.epilogue-copy .epilogue-actions > .primary-button,
.epilogue-copy .epilogue-actions > .secondary-button { align-self: end; height: 54px; min-height: 54px; margin: 0; }
.epilogue-actions .secondary-button { min-width: 64px; padding-inline: 18px; }

.season-artifact-modal {
  position: absolute;
  z-index: 24;
  inset: 0;
  display: grid;
  align-items: end;
  padding: 20px 20px calc(var(--safe-bottom) + 18px);
  background: rgba(2, 5, 9, 0.76);
  backdrop-filter: blur(9px);
}

.season-artifact-modal > article { position: relative; padding: 24px; border: 1px solid rgba(143, 212, 168, 0.42); border-radius: 22px; background: #0c1720; box-shadow: 0 22px 70px rgba(0, 0, 0, 0.58); }
.season-artifact-modal h2 { margin: 7px 26px 8px 0; font: 500 30px/1.08 Georgia, serif; }
.season-artifact-modal .artifact-lead { margin: 0 0 15px; color: #a9e1bb; font: 14px/1.45 Georgia, serif; }
.artifact-details { margin-bottom: 17px; }
.artifact-details p { margin: 0; padding: 10px 0; border-top: 1px solid rgba(242, 230, 207, 0.1); color: var(--paper-muted); font: 13px/1.48 Georgia, serif; }
.season-artifact-modal .primary-button { width: 100%; }

.conversation-utilities { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 16px; }
.conversation-utilities button { padding: 8px 11px; border: 1px solid rgba(242, 230, 207, 0.24); border-radius: 999px; background: rgba(8, 13, 20, 0.8); color: var(--paper-muted); font-size: 11px; }
.conversation-utilities .tester-skip { border-color: rgba(232, 163, 74, 0.5); color: var(--amber); }

.finish-confirm {
  position: absolute;
  z-index: 12;
  inset: 0;
  display: grid;
  align-items: end;
  padding: 20px;
  background: rgba(2, 5, 9, 0.72);
  backdrop-filter: blur(8px);
}

.finish-confirm > div { max-height: calc(100% - var(--safe-top) - var(--safe-bottom) - 24px); padding: 22px; overflow-y: auto; overscroll-behavior: contain; border: 1px solid rgba(232, 163, 74, 0.4); border-radius: 22px; background: #101722; touch-action: pan-y; }
.finish-confirm h2 { margin: 7px 0 8px; font: 500 27px/1.12 Georgia, serif; }
.finish-confirm p:not(.eyebrow) { color: var(--paper-muted); font: 14px/1.48 Georgia, serif; }
.finish-confirm button { width: 100%; margin-top: 9px; }

.vera-impression blockquote { margin-bottom: 0; }
.debrief-facts article { padding: 10px 0; border-bottom: 1px solid rgba(242, 230, 207, 0.1); }
.debrief-facts article:last-child { border-bottom: 0; }
.debrief-facts strong { color: #9fd6ae; font-size: 13px; line-height: 1.45; }
.debrief-facts p { margin: 6px 0 0; color: var(--paper-muted); font: 12px/1.45 Georgia, serif; }

.training-summary-screen {
  overflow-y: auto;
  padding: calc(var(--safe-top) + 28px) 20px calc(var(--safe-bottom) + 28px);
  background:
    radial-gradient(circle at 20% 5%, rgba(52, 126, 90, 0.2), transparent 30%),
    linear-gradient(160deg, #111b27, #070c13 75%);
}

.training-summary-copy { max-width: 560px; margin: 0 auto; }
.training-summary-copy h1 { margin: 9px 0 22px; font: 500 42px/1.02 Georgia, serif; }
.learned-list { display: grid; gap: 10px; }
.learned-list p { display: grid; grid-template-columns: 26px 1fr; gap: 10px; margin: 0; padding: 14px; border: 1px solid rgba(104, 190, 134, 0.24); border-radius: 15px; background: rgba(47, 112, 73, 0.12); font: 14px/1.45 Georgia, serif; }
.learned-list i { display: grid; width: 23px; height: 23px; place-items: center; border-radius: 50%; background: #3a8b5a; color: white; font-style: normal; font-weight: 800; }
.future-kicker { margin-top: 30px; }
.future-season-list { display: grid; gap: 9px; margin: 12px 0 22px; }
.future-season-list article { display: grid; gap: 4px; padding: 13px 14px; border-left: 2px solid var(--amber); background: rgba(242, 230, 207, 0.045); }
.future-season-list span { color: var(--amber); font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; }
.future-season-list strong { font: 500 18px/1.2 Georgia, serif; }
.future-season-list p { margin: 0; color: var(--paper-muted); font-size: 11px; line-height: 1.4; }
.training-summary-copy > .primary-button { width: 100%; }

.library-screen,
.onboarding-screen,
.notebook-screen,
.scene-map-screen,
.quiz-screen,
.dialogue-list,
.debrief-screen,
.training-summary-screen,
.season-end-screen,
.case-materials,
.legal-details-sections,
.season-artifact-modal > article {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.season-artifact-modal > article {
  max-height: calc(100% - var(--safe-top) - var(--safe-bottom) - 24px);
  overflow-y: auto;
}

.error-screen {
  display: grid;
  align-content: safe center;
  min-height: 100%;
  overflow-y: auto;
  padding: 28px;
  background: #111925;
}

.error-screen h1 {
  margin: 8px 0 12px;
  font: 500 42px/1 Georgia, serif;
}

@keyframes screen-in {
  from { opacity: 0; transform: scale(1.012); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes library-cover-drift {
  from { transform: scale(1.025) translate3d(-0.3%, 0, 0); }
  to { transform: scale(1.075) translate3d(0.5%, -0.5%, 0); }
}

@keyframes slow-push {
  from { transform: scale(1.035) translate3d(0, 0, 0); }
  to { transform: scale(1.09) translate3d(-0.45%, -0.28%, 0); }
}

@keyframes rain-fall {
  from { transform: translate3d(0, -8%, 0) rotate(4deg); }
  to { transform: translate3d(-2%, 8%, 0) rotate(4deg); }
}

@keyframes room-window-rain {
  from { background-position: 0 -117px; }
  to { background-position: -17px 117px; }
}

@keyframes phone-vibration {
  0%, 58%, 82%, 100% { transform: translate3d(0, 0, 0) rotate(0); }
  61% { transform: translate3d(-4px, 0, 0) rotate(-0.34deg); }
  64% { transform: translate3d(5px, 1px, 0) rotate(0.4deg); }
  67% { transform: translate3d(-5px, -1px, 0) rotate(-0.42deg); }
  70% { transform: translate3d(5px, 0, 0) rotate(0.36deg); }
  73% { transform: translate3d(-4px, 1px, 0) rotate(-0.3deg); }
  76% { transform: translate3d(3px, 0, 0) rotate(0.22deg); }
  79% { transform: translate3d(-1px, 0, 0) rotate(-0.1deg); }
}

@keyframes page-flicker {
  0%, 18%, 22%, 68%, 100% { opacity: 0.48; transform: scale(0.99); }
  20%, 70% { opacity: 1; transform: scale(1.035); }
  21%, 71% { opacity: 0.7; }
}

@keyframes lamp-flicker {
  0%, 19%, 23%, 71%, 100% { opacity: 0.52; transform: scale(0.99); }
  21%, 73% { opacity: 1; transform: scale(1.035); }
  22%, 74% { opacity: 0.7; }
}

@keyframes page-sheen {
  0%, 18% { opacity: 0; transform: translateX(0) rotate(10deg); }
  42%, 58% { opacity: 0.9; }
  82%, 100% { opacity: 0; transform: translateX(410%) rotate(10deg); }
}

@keyframes doorway-pulse {
  0%, 100% { opacity: 0.28; transform: translateX(-1.5%) scaleX(0.98); }
  50% { opacity: 0.9; transform: translateX(1%) scaleX(1.04); }
}

@keyframes dust-float {
  from { transform: translate3d(-1%, 1.5%, 0); }
  to { transform: translate3d(2%, -2.2%, 0); }
}

@keyframes light-breathe {
  from { opacity: 0.36; transform: scale(0.98); }
  to { opacity: 0.92; transform: scale(1.035); }
}

@keyframes light-sweep {
  from { opacity: 0.28; transform: translateX(-2%); }
  to { opacity: 0.88; transform: translateX(2%); }
}

@keyframes glyph-glow {
  from { box-shadow: inset -3px 0 6px rgba(232, 163, 74, 0.18), 0 0 0 rgba(232, 163, 74, 0); }
  to { box-shadow: inset -3px 0 8px rgba(232, 163, 74, 0.45), 0 0 12px rgba(232, 163, 74, 0.28); }
}

@keyframes progress-glow {
  from { box-shadow: 0 0 5px rgba(232, 163, 74, 0.14); }
  to { box-shadow: 0 0 15px rgba(232, 163, 74, 0.46); }
}

@keyframes portrait-drift {
  from { transform: scale(1.035) translate3d(-0.3%, 0, 0); }
  to { transform: scale(1.075) translate3d(0.5%, -0.6%, 0); }
}

@keyframes rule-door-glow {
  from { opacity: 0.5; border-color: rgba(232, 163, 74, 0.15); }
  to { opacity: 1; border-color: rgba(232, 163, 74, 0.34); }
}

@keyframes cabinet-rain {
  from { background-position: 0 -104px; }
  to { background-position: -18px 104px; }
}

@keyframes cabinet-lamps {
  from { opacity: 0.42; transform: scale(0.985); }
  to { opacity: 1; transform: scale(1.025); }
}

@keyframes case-light-pass {
  0%, 18% { opacity: 0; transform: translateX(-22%); }
  43%, 58% { opacity: 0.9; }
  82%, 100% { opacity: 0; transform: translateX(25%); }
}

@keyframes case-window-rain {
  from { transform: translate3d(0, -9%, 0) rotate(2deg); }
  to { transform: translate3d(-2%, 10%, 0) rotate(2deg); }
}

@keyframes ceiling-drop {
  0%, 16% { top: 1.5%; left: 29.8%; opacity: 0; transform: scaleY(0.65); }
  20% { opacity: 0.85; }
  78% { opacity: 0.85; }
  88%, 100% { top: 40.5%; left: 21.8%; opacity: 0; transform: scaleY(1.12); }
}

@keyframes bucket-ripple {
  0%, 82% { opacity: 0; transform: scale(0.2); }
  88% { opacity: 0.52; }
  100% { opacity: 0; transform: scale(1.2); }
}

@keyframes notebook-sheen {
  0%, 18% { opacity: 0; transform: translateX(0) rotate(4deg); }
  42%, 58% { opacity: 0.75; }
  84%, 100% { opacity: 0; transform: translateX(470%) rotate(4deg); }
}

@keyframes notebook-drift {
  from { transform: rotate(-1.4deg) scale(1.075) translateY(1px); }
  to { transform: rotate(-0.4deg) scale(1.105) translateY(-3px); }
}

@keyframes map-window-rain {
  from { background-position: 0 -86px; }
  to { background-position: -15px 86px; }
}

@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.11); }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes typing-dot {
  from { opacity: 0.3; transform: translateY(1px); }
  to { opacity: 1; transform: translateY(-2px); }
}

@media (min-width: 620px) and (min-height: 720px) {
  .app-shell {
    height: min(92svh, 900px);
    border: 1px solid rgba(242, 230, 207, 0.14);
    border-radius: 28px;
    box-shadow: 0 34px 90px rgba(0, 0, 0, 0.48);
  }
}

@media (max-height: 700px) {
  .rules-screen { grid-template-rows: minmax(180px, 38%) 1fr; }
  .rule-card { padding: 18px 20px; }
  .rule-card h2 { font-size: 28px; }
  .rule-copy { padding-inline: 18px; }
  .case-meta { margin-bottom: 12px; padding-block: 12px; }
  .case-copy h1 { font-size: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .scene-image,
  .story-card-primary > img,
  .vera-panel img {
    animation: none !important;
    transform: none !important;
  }

  .scene-effects.rain::before { animation-duration: 1.5s; opacity: 0.2; }
  .scene-effects.rain::after { animation-duration: 2.2s; opacity: 0.09; }
  .scene-effects.window-rain span { animation-duration: 1.8s; opacity: 0.18; }
  .scene-effects.window-rain em { animation-duration: 2.6s; opacity: 0.07; }
  .scene-effects.dust::before,
  .scene-effects.dust::after,
  .scene-effects.dust-soft::before,
  .scene-effects.dust-soft::after { animation-duration: 24s; }
  .scene-effects.phone-glow b { animation: reduced-phone-pulse 2.8s ease-in-out infinite; }
}

@keyframes reduced-phone-pulse {
  0%, 100% { opacity: 0.72; }
  50% { opacity: 1; }
}

/* Season 2 catalog card */
.season-two-card {
  display: grid;
  gap: 12px;
  min-height: 190px;
  padding: 20px;
  border-color: rgba(232, 163, 74, 0.38);
  background:
    linear-gradient(135deg, rgba(232, 163, 74, 0.12), rgba(17, 26, 39, 0.92)),
    url("/media/epilogue-97-northern-bridge-photo.jpg") center / cover;
}

.season-two-card h2 { margin: 6px 0 0; font: 500 30px/1 Georgia, serif; }
.season-two-card > p { margin: 0; color: var(--paper-muted); font-size: 12px; line-height: 1.5; }
.season-two-card .primary-button { width: 100%; }
.season-two-card.is-locked {
  min-height: 190px;
  filter: grayscale(1);
  border-color: rgba(242, 230, 207, .2);
  background:
    linear-gradient(135deg, rgba(12, 17, 24, .82), rgba(17, 24, 34, .96)),
    url("/media/epilogue-97-northern-bridge-photo.jpg") center / cover;
}
.season-two-card.is-locked .eyebrow,
.season-two-card.is-locked h2,
.season-two-card.is-locked > p { color: rgba(242, 242, 242, .68); }

.owner-preview-chip {
  display: inline-flex;
  width: fit-content;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid rgba(232, 163, 74, 0.38);
  border-radius: 999px;
  background: rgba(232, 163, 74, 0.12);
  color: #f1bf7e;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.s2-showcase,
.s2-preview-end,
.s2-hub,
.s2-cinematic { background: #0a1019; }

.s2-full-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(7, 11, 17, .14), rgba(7, 11, 17, .45) 44%, rgba(7, 11, 17, .98) 88%);
}

.s2-close {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(242, 230, 207, .22);
  border-radius: 50%;
  background: rgba(6, 10, 16, .46);
  font-size: 25px;
}

.s2-showcase .topline,
.s2-preview-end .topline,
.s2-cinematic .topline {
  grid-template-columns: auto 1fr auto;
  gap: 10px;
}

.s2-showcase-copy {
  position: absolute;
  z-index: 3;
  right: 22px;
  bottom: calc(var(--safe-bottom) + 18px);
  left: 22px;
}

.s2-showcase-copy h1 {
  margin: 8px 0 14px;
  font: 500 clamp(43px, 12vw, 62px)/.94 Georgia, serif;
  letter-spacing: -.04em;
}

.s2-showcase-copy > p:not(.eyebrow) { margin: 0 0 18px; color: var(--paper-muted); font: 17px/1.52 Georgia, serif; }
.s2-showcase-copy .primary-button { width: 100%; margin-top: 18px; }
.s2-status { display: flex; align-items: center; gap: 9px; color: var(--paper-muted); font-size: 11px; }
.s2-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 12px rgba(232, 163, 74, .72); }

.s2-cinematic-copy {
  display: grid;
  max-height: 57svh;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
}
.s2-cinematic-scroll { min-height: 0; overflow-y: auto; padding-right: 3px; touch-action: pan-y; scrollbar-width: none; }
.s2-cinematic-scroll::-webkit-scrollbar { display: none; }
.s2-cinematic-scroll > p:not(.eyebrow) { font-size: clamp(17px, 4.8vw, 21px); }
.s2-cinematic-copy .action-row { padding-top: 12px; background: linear-gradient(to bottom, transparent, rgba(8, 13, 21, .96) 24%); }

.s2-rules-screen {
  overflow-x: hidden;
  overflow-y: auto;
  padding: var(--safe-top) 18px calc(var(--safe-bottom) + 24px);
  background: radial-gradient(circle at 50% 12%, rgba(232, 163, 74, .16), transparent 32%), #0e1622;
  scrollbar-width: none;
  touch-action: pan-y;
}

.s2-flow-header { min-height: 58px; }
.s2-rule-card,
.s2-reading-card,
.s2-paper-card,
.s2-quiz-card,
.s2-map-copy {
  position: relative;
  z-index: 2;
  padding: 24px;
  border: 1px solid rgba(242, 230, 207, .16);
  border-radius: 24px;
  background: rgba(12, 18, 28, .96);
  box-shadow: 0 18px 46px rgba(0, 0, 0, .3);
}

.s2-rule-card { margin-top: 18px; overflow: hidden; }
.s2-rule-card > *:not(.s2-rule-number) { position: relative; z-index: 1; }
.s2-rule-number { position: absolute; top: -28px; right: 10px; color: rgba(232, 163, 74, .075); font: 500 150px/1 Georgia, serif; pointer-events: none; }

.s2-rule-card h1,
.s2-paper-card h1,
.s2-quiz-card h1,
.s2-map-copy h1 { margin: 8px 0 16px; font: 500 clamp(31px, 8.8vw, 43px)/1.03 Georgia, serif; }
.s2-rule-card > p:not(.eyebrow), .s2-paper-card > p { color: var(--paper-muted); font: 17px/1.55 Georgia, serif; }
.s2-rule-card blockquote,
.s2-paper-card blockquote,
.s2-map-copy blockquote { margin: 20px 0; padding: 15px 0 15px 16px; border-left: 2px solid var(--amber); color: #edc58e; font: italic 16px/1.45 Georgia, serif; }
.s2-rule-example { margin-top: 12px; padding: 14px; border: 1px solid rgba(242,230,207,.12); border-radius: 14px; background: rgba(242,230,207,.035); }
.s2-rule-example span { color: var(--paper-muted); font-size: 9px; font-weight: 780; letter-spacing: .15em; }
.s2-rule-example p { margin: 7px 0 0; color: var(--paper); font-size: 13px; line-height: 1.48; }
.s2-rule-example.is-bad { border-color: rgba(255, 106, 91, .22); }
.s2-rule-example.is-bad span { color: #eaa39c; }
.s2-rule-example.is-good { border-color: rgba(92, 184, 132, .28); background: rgba(92, 184, 132, .065); }
.s2-rule-example.is-good span { color: #9fd6ae; }
.s2-rule-signal, .s2-rule-new-phrase { margin-top: 14px; padding: 15px; border: 1px solid rgba(242,230,207,.14); border-radius: 14px; background: rgba(242,230,207,.035); }
.s2-rule-signal > span, .s2-rule-new-phrase > span { color: var(--paper-muted); font-size: 9px; font-weight: 780; letter-spacing: .15em; }
.s2-rule-signal p, .s2-rule-new-phrase p { margin: 8px 0 0; color: var(--paper); font-size: 14px; line-height: 1.5; }
.s2-rule-changes { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 12px; }
.s2-rule-changes > div { display: grid; grid-template-columns: 25px 1fr; gap: 8px; padding: 12px; border: 2px solid currentColor; border-radius: 13px; background: color-mix(in srgb, currentColor 13%, transparent); box-shadow: inset 4px 0 0 currentColor; }
.s2-rule-changes i { display: grid; width: 23px; height: 23px; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-style: normal; font-size: 10px; }
.s2-rule-changes p { margin: 0; color: var(--paper); font-size: 11px; line-height: 1.4; }
.s2-rule-changes strong { color: currentColor; font-size: 9px; letter-spacing: .1em; }
.s2-rule-changes .is-amber, .s2-rule-new-phrase .is-amber { color: #efac50; }
.s2-rule-changes .is-blue, .s2-rule-new-phrase .is-blue { color: #79b8f2; }
.s2-rule-phrase-part { color: var(--paper); }
.s2-rule-phrase-part.is-amber, .s2-rule-phrase-part.is-blue { padding-bottom: 2px; font-weight: 750; text-decoration-line: underline; text-decoration-color: currentColor; text-decoration-thickness: 3px; text-underline-offset: 4px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.s2-rule-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 12px; }
.s2-rule-legend span { display: inline-flex; align-items: center; gap: 6px; color: var(--paper-muted); font-size: 9px; font-weight: 740; letter-spacing: .08em; text-transform: uppercase; }
.s2-rule-legend span::before { width: 18px; height: 2px; background: currentColor; content: ""; }
.s2-rule-legend .is-amber { color: #efac50; }
.s2-rule-legend .is-blue { color: #79b8f2; }
.s2-rule-lesson { margin: 16px 0 0; color: #edc58e !important; font-size: 14px !important; font-style: italic; }
.s2-rule-card footer { display: grid; gap: 16px; margin-top: 26px; }
.s2-rule-actions { display: grid; grid-template-columns: minmax(0, 1fr) 62px; gap: 10px; }
.s2-rule-actions button { height: 58px; min-height: 58px; margin: 0; }
.s2-rule-actions .secondary-button { padding: 0; font-size: 18px; }

.s2-hub-header {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 11px;
  padding: var(--safe-top) 18px 0;
}

.s2-hub-header strong { display: block; margin-top: 4px; font: 500 18px/1.05 Georgia, serif; }
.s2-hub-header > span { color: var(--paper-muted); font-size: 10px; }
.s2-hub-summary { position: absolute; z-index: 2; top: 21%; right: 18px; left: 18px; padding: 14px; border: 1px solid rgba(242, 230, 207, .16); border-radius: 16px; background: rgba(8, 13, 21, .76); }
.s2-hub-summary p { margin: 0; color: var(--paper-muted); font-size: 12px; line-height: 1.45; }
.s2-case-tabs { position: absolute; z-index: 3; top: 36%; right: 18px; left: 18px; display: flex; gap: 7px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; scroll-snap-type: x proximity; }
.s2-case-tabs::-webkit-scrollbar { display: none; }
.s2-case-tabs button { flex: 0 0 126px; min-width: 126px; min-height: 70px; padding: 8px 9px; border: 1px solid rgba(242,230,207,.16); border-radius: 14px; background: rgba(8,13,21,.76); color: var(--paper-muted); text-align: left; scroll-snap-align: start; }
.s2-case-tabs button.is-active { border-color: rgba(232,163,74,.58); background: rgba(111,67,24,.58); color: var(--paper); }
.s2-case-tabs button:disabled { opacity: .42; }
.s2-case-tabs small, .s2-case-tabs span { display: block; overflow: hidden; font-size: 7px; line-height: 1.25; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.s2-case-tabs strong { display: block; margin: 4px 0; overflow: hidden; font: 500 12px/1.1 Georgia, serif; text-overflow: ellipsis; white-space: nowrap; }
.s2-hub-objects { position: absolute; z-index: 3; right: 18px; bottom: 150px; left: 18px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.s2-hub-objects button { min-height: 72px; padding: 8px; border: 1px solid rgba(242, 230, 207, .22); border-radius: 16px; background: rgba(8, 13, 21, .76); }
.s2-hub-objects i { display: block; margin-bottom: 5px; color: var(--amber); font-style: normal; font-size: 19px; }
.s2-hub-objects span { font-size: 10px; line-height: 1.2; }
.s2-hub-objects .s2-artem-tile img { display: block; width: 31px; height: 31px; margin: 0 auto 5px; border: 1px solid rgba(232,163,74,.55); border-radius: 50%; object-fit: cover; object-position: center 30%; }
.s2-hub-primary { position: absolute; z-index: 3; right: 18px; bottom: var(--safe-bottom); left: 18px; }
.s2-hub-primary .primary-button { width: 100%; }
.s2-hub-primary small { display: block; margin-top: 7px; color: rgba(242,230,207,.5); font-size: 9px; text-align: center; }

.cabinet-detail.is-style-guide { top: max(calc(var(--safe-top) + 12px), 16px); bottom: calc(var(--safe-bottom) + 12px); max-height: none; }
.cabinet-detail.is-messages { top: max(calc(var(--safe-top) + 70px), 80px); bottom: calc(var(--safe-bottom) + 18px); max-height: none; }
.s2-message-history { display: grid; gap: 9px; margin: 16px 0; }
.s2-message-history details { border: 1px solid rgba(242,230,207,.14); border-radius: 14px; background: rgba(242,230,207,.035); }
.s2-message-history summary { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 13px; cursor: pointer; list-style: none; }
.s2-message-history summary::-webkit-details-marker { display: none; }
.s2-message-history time { color: var(--amber); font-size: 10px; }
.s2-message-history p { margin: 0; padding: 0 13px 14px; color: var(--paper-muted); font: 14px/1.5 Georgia, serif; }
.cabinet-detail.is-style-guide > p:not(.eyebrow) { padding-right: 18px; font-size: 13px; }
.s2-style-list { display: grid; gap: 9px; margin: 16px 0; }
.s2-style-list details { border: 1px solid rgba(242,230,207,.14); border-radius: 14px; background: rgba(242,230,207,.035); }
.s2-style-list summary { display: grid; grid-template-columns: 30px 1fr; align-items: center; gap: 8px; min-height: 52px; padding: 10px 13px; cursor: pointer; list-style: none; }
.s2-style-list summary::-webkit-details-marker { display: none; }
.s2-style-list summary i { color: var(--amber); font: 500 17px/1 Georgia, serif; }
.s2-style-list summary strong { font-size: 14px; }
.s2-style-list dl { display: grid; gap: 10px; margin: 0; padding: 0 13px 14px; }
.s2-style-list dl > div { padding-top: 9px; border-top: 1px solid rgba(242,230,207,.1); }
.s2-style-list dt { margin-bottom: 4px; color: var(--amber); font-size: 8px; font-weight: 780; letter-spacing: .14em; text-transform: uppercase; }
.s2-style-list dd { margin: 0; color: var(--paper-muted); font-size: 12px; line-height: 1.45; }
.s2-style-list .is-probe dd { color: #edc58e; font: italic 13px/1.45 Georgia, serif; }

.s2-scroll-screen {
  overflow-x: hidden;
  overflow-y: auto;
  padding: var(--safe-top) 18px calc(var(--safe-bottom) + 24px);
  background: radial-gradient(circle at 80% 5%, rgba(232, 163, 74, .1), transparent 30%), #0c131e;
  scrollbar-width: none;
  touch-action: pan-y;
}

.s2-scroll-screen::-webkit-scrollbar,
.s2-rules-screen::-webkit-scrollbar { display: none; }
.s2-scroll-screen:not(.s2-map) > .s2-flow-header { position: sticky; z-index: 10; top: 0; margin: 0 -18px; padding: 0 18px; background: rgba(12, 19, 30, .92); box-shadow: 0 10px 24px rgba(0,0,0,.18); backdrop-filter: blur(14px); }
.s2-case-hero { position: relative; height: 310px; margin: 8px -18px -42px; overflow: hidden; }
.s2-case-hero::after { position: absolute; inset: 0; content: ""; background: linear-gradient(to bottom, transparent 25%, #0c131e 96%); }
.s2-case-hero img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
.s2-case-hero > div { position: absolute; z-index: 2; right: 24px; bottom: 58px; left: 24px; }
.s2-case-hero h1 { margin: 5px 0 0; font: 500 34px/1 Georgia, serif; }
.s2-reading-card > p { margin: 0 0 16px; color: var(--paper-muted); font: 16px/1.55 Georgia, serif; }
.s2-fact-card { margin-top: 14px; padding: 15px; border: 1px solid rgba(232, 163, 74, .26); border-radius: 16px; background: rgba(232, 163, 74, .07); }
.s2-fact-card.is-style { border-color: rgba(109, 156, 214, .28); background: rgba(109, 156, 214, .07); }
.s2-fact-card.is-risk { border-color: rgba(255, 90, 78, .24); background: rgba(255, 90, 78, .06); }
.s2-fact-card span, .s2-known > span, .s2-outcomes > span { color: var(--amber); font-size: 9px; font-weight: 760; letter-spacing: .18em; }
.s2-fact-card p { margin: 8px 0 0; color: var(--paper); font-size: 14px; line-height: 1.48; }
.s2-flow-actions { display: grid; gap: 8px; margin: 16px 0 0; }
.s2-flow-actions .primary-button, .s2-flow-actions .secondary-button { width: 100%; min-height: 58px; }
.s2-flow-actions.is-pair { grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); }
.s2-flow-actions.is-pair button { height: 100%; padding: 8px 12px; font-size: 12px; }

.s2-notebook-cover { height: 215px; margin: 6px -18px -44px; overflow: hidden; }
.s2-notebook-cover img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.68); }
.s2-paper-card { color: #2d251d; background: #e5d5b8; }
.s2-paper-card .eyebrow { color: #9b5e25; }
.s2-paper-card > p { color: #4d4134; }
.s2-paper-card blockquote { color: #8f5324; }
.s2-paper-card ul { padding-left: 20px; }
.s2-paper-card li { margin-bottom: 10px; line-height: 1.45; }

.s2-quiz-card { margin-top: 24px; }
.s2-quiz-card h1 { font-size: clamp(26px, 7.2vw, 35px); }
.s2-quiz-card > p { color: var(--paper-muted); font-size: 13px; line-height: 1.45; }
.quiz-answers.is-style-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; align-items: stretch; }
.quiz-answers.is-style-grid .quiz-answer { width: 100%; min-width: 0; min-height: 74px; height: 100%; padding: 11px 10px; }
.quiz-answers.is-style-grid .quiz-answer span { min-width: 0; overflow-wrap: anywhere; hyphens: auto; line-height: 1.2; }
.s2-second-part { margin-top: 32px; }
.s2-style-analysis { padding: 18px; border: 1px solid rgba(232,163,74,.28); border-radius: 18px; background: rgba(232,163,74,.07); }
.s2-style-analysis h3 { margin: 0 0 10px; font: 500 28px/1 Georgia, serif; }
.s2-style-analysis p { color: var(--paper-muted); font-size: 13px; line-height: 1.5; }
.s2-conversation .dialogue-character-image { object-position: center 18%; }
.dialogue-message.is-evidence { align-self: stretch; border-color: rgba(232, 163, 74, .38); background: rgba(24, 19, 16, .94); }
.evidence-chat-button { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 12px; padding: 11px 13px; border: 1px solid rgba(255, 91, 80, .55); border-radius: 12px; background: rgba(139, 36, 31, .22); color: #ffd8d1; font-weight: 760; }
.evidence-chat-button i { width: 9px; height: 9px; border-radius: 50%; background: #ff5b50; box-shadow: 0 0 0 0 rgba(255, 91, 80, .7); }
.evidence-chat-button.is-pulsing i { animation: evidence-pulse 1.35s infinite; }
.evidence-chat-button.is-seen { border-color: rgba(242,230,207,.22); background: rgba(242,230,207,.06); color: var(--paper); }
.evidence-monitor { position: absolute; z-index: 12; top: 82px; right: 13px; display: flex; align-items: center; gap: 7px; max-width: 132px; padding: 9px 11px; border: 1px solid rgba(255,91,80,.62); border-radius: 13px; background: rgba(53,10,13,.92); color: #ffd8d1; font-size: 9px; font-weight: 790; letter-spacing: .07em; text-transform: uppercase; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.evidence-monitor i { width: 9px; height: 9px; border-radius: 50%; background: #ff5b50; animation: evidence-pulse 1.35s infinite; }
@keyframes evidence-pulse { 70% { box-shadow: 0 0 0 9px rgba(255, 91, 80, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 91, 80, 0); } }
.s2-evidence-backdrop, .consultant-backdrop { position: fixed; z-index: 90; inset: 0; display: grid; align-items: end; padding: max(12px, var(--safe-top)) 12px max(12px, var(--safe-bottom)); overflow: hidden; background: rgba(2,5,9,.82); }
.s2-evidence-modal { position: relative; width: 100%; max-height: calc(100svh - max(24px, var(--safe-top)) - max(24px, var(--safe-bottom))); overflow-y: auto; overscroll-behavior: contain; padding: 20px; border: 1px solid rgba(242,230,207,.2); border-radius: 24px; background: #0d1520; }
.s2-evidence-modal h2 { margin: 7px 36px 15px 0; font: 500 32px/1.05 Georgia, serif; }
.s2-evidence-modal img { width: 100%; max-height: 60svh; object-fit: contain; border: 1px solid rgba(242,230,207,.16); border-radius: 15px; background: #080d13; }
.s2-evidence-modal > p:not(.eyebrow) { color: var(--paper-muted); font-size: 13px; line-height: 1.5; }
.s2-evidence-modal .primary-button { width: 100%; }
.s2-transition article { position: absolute; z-index: 4; right: 20px; bottom: calc(var(--safe-bottom) + 18px); left: 20px; padding: 23px; border: 1px solid rgba(242,230,207,.18); border-radius: 24px; background: rgba(8,13,21,.94); }
.s2-transition article h1 { margin: 7px 0 13px; font: 500 42px/1 Georgia, serif; }
.s2-transition article > p:not(.eyebrow) { color: var(--paper-muted); font: 16px/1.5 Georgia, serif; }
.s2-transition article .primary-button { width: 100%; }
.transition-date { display: flex; align-items: center; gap: 10px; margin: 18px 0; color: var(--paper-muted); font-size: 12px; }
.transition-date strong { color: var(--amber); }
.consultant-sheet { position: relative; max-height: 90svh; overflow: hidden; padding: 20px; border: 1px solid rgba(242,230,207,.2); border-radius: 24px; background: #101925; }
.consultant-sheet > header { display: flex; align-items: center; gap: 12px; padding-right: 34px; }
.consultant-avatar { display: block; flex: 0 0 56px; width: 56px; height: 56px; border: 1px solid rgba(232,163,74,.5); border-radius: 50%; background: rgba(232,163,74,.12); object-fit: cover; object-position: center 28%; }
.consultant-sheet h2 { margin: 2px 0; font: 500 25px/1 Georgia, serif; }
.consultant-sheet header span, .consultant-note, .consultant-empty { color: var(--paper-muted); font-size: 11px; line-height: 1.45; }
.consultant-history { display: grid; gap: 9px; max-height: 48svh; overflow-y: auto; margin: 14px 0; }
.consultant-chat { height: min(78svh, calc(100svh - max(24px, var(--safe-top)) - max(24px, var(--safe-bottom)))); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.consultant-chat .consultant-history { min-height: 0; max-height: none; align-content: start; grid-auto-rows: max-content; }
.consultant-message { padding: 12px; border: 1px solid rgba(242,230,207,.14); border-radius: 14px; background: rgba(242,230,207,.04); }
.consultant-message.is-player { margin-left: 18%; border-color: rgba(232,163,74,.3); background: rgba(232,163,74,.08); }
.consultant-message > span { color: var(--amber); font-size: 8px; font-weight: 780; letter-spacing: .12em; text-transform: uppercase; }
.consultant-message p { margin: 6px 0 0; font-size: 12px; line-height: 1.48; }
.consultant-message details { margin-top: 9px; color: var(--paper-muted); font-size: 10px; }
.consultant-message ul { padding-left: 18px; }
.consultant-sheet form { display: grid; grid-template-columns: 1fr 48px; gap: 8px; }
.consultant-sheet textarea { min-height: 64px; resize: none; padding: 11px; border: 1px solid rgba(242,230,207,.18); border-radius: 13px; background: #080e16; color: var(--paper); }
.consultant-sheet form button { border: 0; border-radius: 13px; background: var(--amber); color: #15100a; font-size: 23px; font-weight: 800; }
.consultant-profile { overflow-y: auto; }
.consultant-profile > p { color: var(--paper-muted); font-size: 13px; line-height: 1.55; }
.consultant-topics { margin: 16px 0; padding: 15px; border: 1px solid rgba(232,163,74,.25); border-radius: 15px; background: rgba(232,163,74,.06); }
.consultant-topics > span { color: var(--amber); font-size: 9px; font-weight: 780; letter-spacing: .15em; }
.consultant-topics ul { margin: 10px 0 0; padding-left: 19px; color: var(--paper-muted); font-size: 12px; line-height: 1.5; }
.consultant-profile > .primary-button { width: 100%; }
.s2-restart-mode { width: 100%; margin-top: 9px; color: var(--paper); background: rgba(8,13,21,.58); }
.s2-role-restart { width: 100%; margin-top: 14px; }
.s2-restart-dialog { max-height: none; overflow: visible; }
.s2-restart-dialog h2 { margin: 7px 30px 10px 0; font: 500 30px/1.05 Georgia, serif; }
.s2-restart-dialog > p:not(.eyebrow) { color: var(--paper-muted); font-size: 13px; line-height: 1.5; }
.s2-restart-dialog > div { display: grid; gap: 8px; margin-top: 18px; }
.s2-restart-dialog button { min-height: 50px; }
.s2-diagnostics .s2-reading-card { margin-top: 18px; }
.s2-diagnostic-list { display: grid; gap: 10px; margin: 18px 0; }
.s2-diagnostic-list article { padding: 14px; border: 1px solid rgba(242,230,207,.14); border-radius: 14px; }
.s2-diagnostic-list strong, .s2-diagnostic-list span { display: block; }
.s2-diagnostic-list span { margin-top: 4px; color: var(--amber); font-size: 10px; }
.s2-diagnostic-list p { margin: 8px 0 0; color: var(--paper-muted); font-size: 12px; }

.s2-map { padding-top: 0; background: #090f17; }
.s2-map-image { position: absolute; inset: 0 0 auto; height: 47svh; }
.s2-map-image img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.s2-map .s2-flow-header { position: relative; padding-top: var(--safe-top); }
.s2-map-copy { margin-top: 34svh; }
.s2-known { margin: 20px 0; }
.s2-known ul { padding-left: 18px; color: var(--paper-muted); }
.s2-known li { margin-bottom: 9px; font-size: 13px; line-height: 1.45; }
.s2-outcomes { display: grid; gap: 8px; margin-top: 22px; }
.s2-outcomes > div { display: grid; grid-template-columns: 18px 1fr; align-items: start; gap: 7px; min-height: 48px; padding: 10px; border: 1px solid rgba(242,230,207,.12); border-radius: 12px; }
.s2-outcomes i { width: 10px; height: 10px; border: 1px solid var(--amber); border-radius: 50%; }
.s2-outcomes small { display: block; margin-bottom: 3px; color: var(--paper-muted); font-size: 8px; text-transform: uppercase; }
.s2-outcomes strong { display: block; font-size: 12px; }
.s2-outcomes p { margin: 4px 0 0; color: var(--paper-muted); font-size: 11px; line-height: 1.4; }

.s2-end-card { position: absolute; z-index: 4; right: 20px; bottom: var(--safe-bottom); left: 20px; max-height: 73svh; overflow-y: auto; padding: 23px; border: 1px solid rgba(242,230,207,.18); border-radius: 24px; background: rgba(8,13,21,.94); touch-action: pan-y; }
.s2-end-card h1 { margin: 7px 0 12px; font: 500 42px/1 Georgia, serif; }
.s2-end-card > p:not(.eyebrow) { color: var(--paper-muted); font-size: 14px; line-height: 1.5; }
.s2-end-checks { display: grid; gap: 9px; margin: 18px 0; color: #a9e2c3; font-size: 12px; }
.s2-end-card .primary-button, .s2-end-card .secondary-button { width: 100%; margin-top: 8px; }

.s2-finale { overflow: hidden; background: #080d14; }
.s2-finale .scene-image { filter: brightness(.62) saturate(.82); }
.s2-finale-card { position: absolute; z-index: 4; right: 18px; bottom: max(12px, var(--safe-bottom)); left: 18px; max-height: calc(100svh - var(--safe-top) - 88px); overflow-y: auto; overscroll-behavior: contain; padding: 22px; border: 1px solid rgba(242,230,207,.2); border-radius: 24px; background: rgba(8,13,21,.95); box-shadow: 0 20px 60px rgba(0,0,0,.44); }
.s2-finale-card h1 { margin: 7px 0 13px; font: 500 clamp(34px, 9vw, 46px)/1 Georgia, serif; }
.s2-finale-card h2 { margin: 22px 0 12px; font: 500 22px/1.15 Georgia, serif; }
.s2-finale-card > p:not(.eyebrow) { color: var(--paper-muted); font: 15px/1.5 Georgia, serif; }
.s2-finale-choices { display: grid; gap: 9px; }
.s2-finale-choices button { display: grid; gap: 5px; min-height: 72px; padding: 13px; border: 1px solid rgba(242,230,207,.18); border-radius: 14px; background: rgba(242,230,207,.045); color: var(--paper); text-align: left; }
.s2-finale-choices button:disabled { opacity: .55; }
.s2-finale-choices strong { color: #edc58e; font-size: 13px; }
.s2-finale-choices span { color: var(--paper-muted); font-size: 12px; line-height: 1.4; }
.s2-finale-epilogue, .s2-finale-learned { margin: 16px 0; padding: 14px; border: 1px solid rgba(232,163,74,.24); border-radius: 15px; background: rgba(232,163,74,.06); }
.s2-finale-epilogue > span { color: var(--amber); font-size: 9px; font-weight: 780; letter-spacing: .16em; }
.s2-finale-epilogue p, .s2-finale-learned li { color: var(--paper-muted); font-size: 12px; line-height: 1.5; }
.s2-finale-learned ul { margin-bottom: 0; padding-left: 18px; }
.s2-finale-card > .primary-button { width: 100%; }

@media (max-height: 700px) {
  .s2-showcase-copy h1 { font-size: 40px; }
  .s2-showcase-copy > p:not(.eyebrow) { font-size: 15px; }
  .s2-hub-summary { top: 17%; }
  .s2-hub-objects { bottom: 138px; }
  .s2-case-hero { height: 250px; }
}

@media (max-width: 430px) {
  .s2-rule-changes { grid-template-columns: 1fr; }
  .s2-hub-objects { grid-template-columns: repeat(2, 1fr); bottom: 145px; }
}

@media (max-width: 350px) {
  .quiz-answers.is-style-grid { grid-template-columns: 1fr; }
}
