/*
 * Cinematic UI v3
 * A clean, isolated design system layered above the legacy structural CSS.
 * The film remains primary; interface appears only where the player needs it.
 */

.cinema-v3 {
  --film-ink: #f1eadc;
  --film-muted: rgba(235, 230, 219, 0.62);
  --film-faint: rgba(235, 230, 219, 0.34);
  --film-gold: #e8c98f;
  --film-line: rgba(241, 234, 220, 0.16);
  --film-glass: rgba(4, 12, 14, 0.42);
  --film-deep: #050b0d;
  --film-serif: "Noto Serif CJK SC", "Songti SC", "STSong", serif;
  --film-sans: "Noto Sans CJK SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --story-font-size: clamp(20px, 1.8vw, 24px);
  --body-font-size: 15px;
  --meta-font-size: 11px;
  --action-font-size: 14px;
  margin: 0;
  overflow: hidden;
  background: #020607;
  color: var(--film-ink);
  font-family: var(--film-sans);
}

.cinema-v3[data-text-size="standard"] {
  --story-font-size: clamp(18px, 1.55vw, 21px);
  --body-font-size: 13px;
  --meta-font-size: 10px;
  --action-font-size: 13px;
}

.cinema-v3[data-text-size="large"] {
  --story-font-size: clamp(20px, 1.8vw, 24px);
  --body-font-size: 15px;
  --meta-font-size: 11px;
  --action-font-size: 14px;
}

.cinema-v3[data-text-size="xlarge"] {
  --story-font-size: clamp(23px, 2.1vw, 28px);
  --body-font-size: 18px;
  --meta-font-size: 13px;
  --action-font-size: 16px;
}

.cinema-v3 *,
.cinema-v3 *::before,
.cinema-v3 *::after {
  box-sizing: border-box;
}

.cinema-v3 [hidden] {
  display: none !important;
}

.cinema-v3 button,
.cinema-v3 a,
.cinema-v3 input {
  font: inherit;
}

.cinema-v3 button,
.cinema-v3 a {
  -webkit-tap-highlight-color: transparent;
}

.cinema-v3 button:focus-visible,
.cinema-v3 a:focus-visible,
.cinema-v3 input:focus-visible {
  outline: 1px solid var(--film-gold);
  outline-offset: 4px;
}

.cinema-v3 .app,
.cinema-v3 .game,
.cinema-v3 .intro {
  width: 100vw;
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
  background: #020607;
}

/* Opening frame */

.cinema-v3 .intro {
  position: relative;
  display: block;
  isolation: isolate;
  background: #071014 url("../assets/images/cinematic/source/bg-outside-2026-v2.png") center / cover no-repeat;
}

.cinema-v3 .intro__poster {
  position: absolute;
  z-index: 0;
  inset: -1.5%;
  width: 103%;
  height: 103%;
  object-fit: cover;
  filter: saturate(0.82) contrast(1.04) brightness(0.78);
  pointer-events: none;
}

.cinema-v3 .intro__video {
  position: absolute;
  z-index: 1;
  inset: -1.5%;
  width: 103%;
  height: 103%;
  object-fit: cover;
  filter: saturate(0.82) contrast(1.04) brightness(0.78);
}

.cinema-v3 .intro__video[data-motion-source="preview"] {
  display: none;
}

.cinema-v3 .intro__shade {
  position: absolute;
  z-index: 2;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(1, 6, 8, 0.88) 0%, rgba(1, 6, 8, 0.38) 47%, rgba(1, 6, 8, 0.1) 78%),
    linear-gradient(0deg, rgba(1, 6, 8, 0.72), transparent 45%);
}

.cinema-v3 .intro__worldmark {
  position: absolute;
  z-index: 4;
  top: max(26px, env(safe-area-inset-top));
  right: max(30px, env(safe-area-inset-right));
  display: flex;
  gap: 10px;
  align-items: center;
  color: rgba(242, 235, 221, 0.58);
  font-size: 10px;
  letter-spacing: 0.2em;
}

.cinema-v3 .live-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #d9b87e;
  box-shadow: 0 0 15px rgba(230, 194, 131, 0.65);
}

.cinema-v3 .intro__content {
  position: absolute;
  z-index: 4;
  right: auto;
  bottom: max(9vh, calc(env(safe-area-inset-bottom) + 52px));
  left: max(7vw, calc(env(safe-area-inset-left) + 32px));
  width: min(660px, 82vw);
  padding: 0;
  text-align: left;
}

.cinema-v3 .eyebrow {
  display: block;
  margin: 0 0 14px;
  color: var(--film-gold);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.cinema-v3 .key-mark {
  display: none;
}

.cinema-v3 .intro h1 {
  margin: 0;
  color: #f5eee1;
  font-family: var(--film-serif);
  font-size: clamp(50px, 7vw, 98px);
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.03;
  text-shadow: 0 6px 40px rgba(0, 0, 0, 0.42);
}

.cinema-v3 .intro__subtitle {
  margin: 15px 0 0;
  color: rgba(245, 238, 225, 0.42);
  font-size: 10px;
  letter-spacing: 0.28em;
}

.cinema-v3 .intro__line {
  margin: 34px 0 0;
  color: rgba(245, 238, 225, 0.82);
  font-family: var(--film-serif);
  font-size: clamp(18px, 2vw, 27px);
  line-height: 1.75;
}

.cinema-v3 .intro__modes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 34px 0 28px;
  color: rgba(245, 238, 225, 0.56);
  font-size: 10px;
  letter-spacing: 0.1em;
}

.cinema-v3 .intro__modes span {
  padding: 0;
  border: 0;
  background: none;
}

.cinema-v3 .intro__modes span::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 1px;
  margin: 0 8px 3px 0;
  background: rgba(232, 201, 143, 0.52);
}

.cinema-v3 .primary-button,
.cinema-v3 .quiet-action {
  display: inline-flex;
  gap: 28px;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 2px 8px;
  border: 0;
  border-bottom: 1px solid rgba(232, 201, 143, 0.58);
  border-radius: 0;
  background: transparent;
  color: var(--film-ink);
  box-shadow: none;
  cursor: pointer;
  font-size: var(--action-font-size);
  letter-spacing: 0.12em;
  transition: color 180ms ease, border-color 180ms ease, gap 180ms ease;
}

.cinema-v3 .primary-button:hover,
.cinema-v3 .quiet-action:hover {
  gap: 36px;
  border-color: var(--film-gold);
  color: var(--film-gold);
  transform: none;
}

.cinema-v3 .primary-button:disabled {
  opacity: 0.28;
  cursor: not-allowed;
}

.cinema-v3 .intro__hint {
  margin: 15px 0 0;
  color: rgba(245, 238, 225, 0.35);
  font-size: 9px;
  letter-spacing: 0.09em;
}

/* Minimal HUD */

.cinema-v3 .topbar {
  position: fixed;
  z-index: 80;
  top: max(18px, env(safe-area-inset-top));
  right: max(24px, env(safe-area-inset-right));
  left: max(24px, env(safe-area-inset-left));
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  opacity: 0.48;
  transition: opacity 220ms ease;
}

.cinema-v3 .topbar:hover,
.cinema-v3 .topbar:focus-within {
  opacity: 1;
}

.cinema-v3 .brand {
  display: flex;
  gap: 10px;
  align-items: center;
}

.cinema-v3 .brand__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--film-gold);
}

.cinema-v3 .brand strong {
  display: block;
  color: rgba(245, 238, 225, 0.88);
  font-family: var(--film-serif);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
}

.cinema-v3 .brand span:not(.brand__dot) {
  display: block;
  margin-top: 2px;
  color: rgba(245, 238, 225, 0.32);
  font-size: 7px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.cinema-v3 .topbar__actions {
  display: flex;
  gap: 5px;
}

.cinema-v3 .icon-button {
  min-width: 0;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(244, 237, 224, 0.1);
  border-radius: 999px;
  background: rgba(3, 9, 11, 0.2);
  color: rgba(245, 238, 225, 0.68);
  box-shadow: none;
  backdrop-filter: blur(12px);
  cursor: pointer;
  font-size: var(--meta-font-size);
  letter-spacing: 0.08em;
}

.cinema-v3 .icon-button:hover {
  border-color: rgba(232, 201, 143, 0.45);
  background: rgba(3, 9, 11, 0.5);
  color: var(--film-ink);
  transform: none;
}

.cinema-v3 .icon-button:disabled {
  display: none;
}

/* Film viewport */

.cinema-v3 .scene {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  isolation: isolate;
  background: #050a0c;
}

.cinema-v3 .scene::before {
  content: "";
  position: absolute;
  z-index: -3;
  inset: -1.5%;
  background-image: var(--scene-image);
  background-position: center;
  background-size: cover;
  filter: saturate(0.86) contrast(1.03) brightness(0.86);
  transform: scale(1.015);
  transition: opacity 700ms ease;
}

.cinema-v3 .scene__image {
  position: absolute;
  z-index: 0;
  inset: -1.5%;
  width: 103%;
  height: 103%;
  object-fit: cover;
  opacity: 1;
  filter: saturate(0.86) contrast(1.03) brightness(0.86);
  transform: scale(1.015);
  transition: opacity 700ms ease;
  pointer-events: none;
}

.cinema-v3 .scene__video {
  position: absolute;
  z-index: 1;
  inset: -1.5%;
  width: 103%;
  height: 103%;
  object-fit: cover;
  opacity: 0;
  filter: saturate(0.86) contrast(1.03) brightness(0.86);
  transform: scale(1.005);
  transition: opacity 700ms ease;
}

.cinema-v3 .scene--video-ready .scene__video {
  opacity: 1;
}

.cinema-v3 .scene--video-ready .scene__image {
  opacity: 0.16;
}

.cinema-v3 .scene__sky,
.cinema-v3 .scene__sea,
.cinema-v3 .scene__island,
.cinema-v3 .scene__house,
.cinema-v3 .scene--storm::after {
  display: none !important;
  animation: none !important;
}

.cinema-v3 .scene__vignette {
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
  animation: none;
  background:
    linear-gradient(180deg, rgba(1, 5, 7, 0.34), transparent 22%, transparent 67%, rgba(1, 5, 7, 0.62)),
    linear-gradient(90deg, rgba(1, 5, 7, 0.2), transparent 24%, transparent 78%, rgba(1, 5, 7, 0.12));
  mix-blend-mode: normal;
}

.cinema-v3 .cinema-frame {
  display: none;
}

.cinema-v3 .world-status {
  position: absolute;
  z-index: 9;
  top: max(77px, calc(env(safe-area-inset-top) + 66px));
  right: auto;
  left: max(28px, calc(env(safe-area-inset-left) + 18px));
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  color: rgba(245, 238, 225, 0.58);
  backdrop-filter: none;
}

.cinema-v3 .world-status strong {
  display: block;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.16em;
}

.cinema-v3 .world-status small {
  display: block;
  margin-top: 4px;
  color: rgba(245, 238, 225, 0.34);
  font-size: 8px;
  letter-spacing: 0.06em;
}

.cinema-v3 .scene-caption {
  position: absolute;
  z-index: 9;
  right: max(28px, calc(env(safe-area-inset-right) + 18px));
  bottom: max(63px, calc(env(safe-area-inset-bottom) + 48px));
  left: auto;
  padding: 0;
  border: 0;
  background: none;
  text-align: right;
  backdrop-filter: none;
}

.cinema-v3 .scene-caption span {
  color: var(--film-gold);
  font-family: var(--film-serif);
  font-size: 18px;
  letter-spacing: 0.08em;
}

.cinema-v3 .scene-caption p {
  margin: 5px 0 0;
  color: rgba(245, 238, 225, 0.43);
  font-size: 8px;
  letter-spacing: 0.12em;
}

/* Objective is a whisper, not a dashboard */

.cinema-v3 .objective {
  position: absolute;
  z-index: 12;
  top: max(120px, calc(env(safe-area-inset-top) + 104px));
  right: max(30px, calc(env(safe-area-inset-right) + 18px));
  bottom: auto;
  left: auto;
  width: min(310px, 48vw);
  padding: 0 0 0 16px;
  border: 0;
  border-left: 1px solid rgba(232, 201, 143, 0.42);
  border-radius: 0;
  background: linear-gradient(90deg, rgba(2, 8, 10, 0.36), transparent);
  box-shadow: none;
  backdrop-filter: blur(3px);
  transition: opacity 250ms ease, transform 250ms ease;
}

.cinema-v3 .objective--hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(10px);
}

.cinema-v3 #objective-kicker {
  color: rgba(232, 201, 143, 0.58);
  font-size: 8px;
  letter-spacing: 0.16em;
}

.cinema-v3 #objective-title {
  display: block;
  margin-top: 7px;
  color: rgba(245, 238, 225, 0.9);
  font-family: var(--film-serif);
  font-size: clamp(14px, 1.35vw, 18px);
  font-weight: 500;
  line-height: 1.55;
}

.cinema-v3 #objective-progress {
  margin: 5px 0 0;
  color: rgba(245, 238, 225, 0.38);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.cinema-v3 #objective-action {
  margin-top: 13px;
  padding: 0 0 5px;
  border: 0;
  border-bottom: 1px solid rgba(232, 201, 143, 0.5);
  border-radius: 0;
  background: none;
  color: var(--film-gold);
  cursor: pointer;
  font-size: 10px;
}

/* Environmental interaction */

.cinema-v3 .hotspots {
  position: absolute;
  z-index: 15;
  inset: 0;
  pointer-events: none;
}

.cinema-v3 .hotspot {
  position: absolute;
  width: 76px;
  height: 76px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  pointer-events: auto;
  transform: translate(-50%, -50%);
}

.cinema-v3 .hotspot::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 226, 176, 0.94);
  border-radius: 50%;
  background: rgba(4, 11, 12, 0.28);
  box-shadow: 0 0 9px rgba(239, 204, 145, 0.68), 0 0 28px rgba(239, 204, 145, 0.46);
  transform: translate(-50%, -50%);
  animation: cinema-hotspot-breathe 2.6s ease-in-out infinite;
}

.cinema-v3 .hotspot::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 226, 176, 0.28);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.cinema-v3 .hotspot span {
  position: absolute;
  top: 63px;
  left: 50%;
  width: max-content;
  max-width: 160px;
  padding: 5px 8px;
  border: 0;
  border-radius: 2px;
  background: rgba(2, 8, 10, 0.56);
  color: rgba(245, 238, 225, 0.88);
  font-size: var(--meta-font-size);
  letter-spacing: 0.08em;
  opacity: 0;
  backdrop-filter: blur(8px);
  transform: translate(-50%, 4px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.cinema-v3 .hotspot:hover span,
.cinema-v3 .hotspot:focus-visible span,
.cinema-v3 .hotspot--selected span,
.cinema-v3 .hotspot--found span {
  opacity: 1;
  transform: translate(-50%, 0);
}

.cinema-v3 .hotspot--selected::before,
.cinema-v3 .hotspot--found::before {
  background: var(--film-gold);
}

/* Film subtitles */

.cinema-v3 .dialogue {
  position: fixed;
  z-index: 55;
  right: auto;
  bottom: max(62px, calc(env(safe-area-inset-bottom) + 46px));
  left: max(32px, 4vw);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 22px;
  width: min(640px, 52vw);
  min-height: 0;
  margin: 0;
  padding: 14px 18px 15px;
  border: 0;
  border-left: 1px solid rgba(232, 201, 143, 0.46);
  border-radius: 0;
  background: linear-gradient(90deg, rgba(2, 8, 10, 0.76), rgba(2, 8, 10, 0.3) 78%, transparent);
  box-shadow: none;
  opacity: 1;
  backdrop-filter: blur(14px) saturate(0.84);
  transform: none;
  transition: opacity 220ms ease, transform 220ms ease;
}

.cinema-v3 .dialogue--hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}

.cinema-v3 .dialogue--chat-paused {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}

.cinema-v3 .dialogue-toggle {
  position: absolute;
  top: -31px;
  left: 0;
  min-width: 82px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(232, 201, 143, 0.24);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: rgba(2, 8, 10, 0.68);
  color: rgba(245, 238, 225, 0.62);
  cursor: pointer;
  font-size: 10px;
  letter-spacing: 0.08em;
  backdrop-filter: blur(12px);
}

.cinema-v3 .dialogue-toggle:hover,
.cinema-v3 .dialogue-toggle:focus-visible {
  border-color: rgba(232, 201, 143, 0.58);
  color: var(--film-gold);
}

.cinema-v3 .dialogue--minimized {
  width: auto;
  padding: 0;
  border-left: 0;
  background: transparent;
  backdrop-filter: none;
}

.cinema-v3 .dialogue--minimized .dialogue-toggle {
  position: static;
  min-width: 108px;
  height: 38px;
  border: 1px solid rgba(232, 201, 143, 0.32);
  border-radius: 999px;
  background: rgba(2, 8, 10, 0.64);
}

.cinema-v3 .dialogue--minimized .dialogue__body,
.cinema-v3 .dialogue--minimized .continue-button {
  display: none;
}

.cinema-v3 .dialogue .portrait {
  display: none;
}

.cinema-v3 .dialogue__body {
  min-width: 0;
}

.cinema-v3 .dialogue__meta {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 0 0 6px;
}

.cinema-v3 .dialogue__meta strong {
  color: var(--film-gold);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
}

.cinema-v3 .dialogue__meta span {
  padding: 0;
  border: 0;
  background: none;
  color: rgba(245, 238, 225, 0.32);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.cinema-v3 .dialogue__body > p {
  min-height: 0;
  margin: 0;
  color: rgba(250, 244, 233, 0.96);
  font-family: var(--film-serif);
  font-size: var(--story-font-size);
  letter-spacing: 0.035em;
  line-height: 1.58;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55);
}

.cinema-v3 .continue-button {
  align-self: end;
  min-width: 92px;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid rgba(232, 201, 143, 0.3);
  border-radius: 999px;
  background: rgba(3, 10, 12, 0.44);
  color: rgba(245, 238, 225, 0.54);
  cursor: pointer;
  font-size: var(--action-font-size);
}

.cinema-v3 .continue-button:hover {
  border-color: var(--film-gold);
  color: var(--film-gold);
  transform: none;
}

.cinema-v3 .dialogue__choices button {
  margin: 12px 12px 0 0;
  padding: 7px 0;
  border: 0;
  border-bottom: 1px solid var(--film-line);
  border-radius: 0;
  background: none;
  color: var(--film-ink);
}

@media (min-width: 821px) {
  .cinema-v3 .dialogue:has(.dialogue__choices:not(:empty)) {
    width: min(560px, 44vw);
  }

  .cinema-v3 .dialogue__choices:not(:empty) {
    position: fixed;
    top: 50%;
    right: max(32px, 4vw);
    display: grid;
    width: min(330px, 30vw);
    margin: 0;
    padding: 16px 18px;
    border: 1px solid rgba(232, 201, 143, 0.22);
    border-radius: 12px;
    background: rgba(2, 8, 10, 0.7);
    backdrop-filter: blur(18px) saturate(0.82);
    transform: translateY(-50%);
  }

  .cinema-v3 .dialogue__choices:not(:empty) button {
    width: 100%;
    margin: 0;
    padding: 12px 4px;
    text-align: left;
  }

  .cinema-v3 .dialogue:has(.dialogue__choices:not(:empty)) .continue-button {
    display: none;
  }
}

/* Thin pre-completion time rail */

.cinema-v3 .tide-nav {
  position: fixed;
  z-index: 50;
  right: auto;
  bottom: max(14px, env(safe-area-inset-bottom));
  left: 50%;
  display: grid;
  grid-template-columns: auto minmax(120px, 320px) auto;
  gap: 14px;
  align-items: center;
  width: min(690px, calc(100% - 48px));
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  backdrop-filter: none;
  transform: translateX(-50%);
}

.cinema-v3 .tide-nav__label {
  color: rgba(245, 238, 225, 0.38);
  font-size: 8px;
  letter-spacing: 0.15em;
}

.cinema-v3 .tide-nav__label small {
  display: none;
}

.cinema-v3 .tide-track {
  height: 1px;
  background: rgba(245, 238, 225, 0.13);
}

.cinema-v3 .tide-track__fill {
  display: block;
  height: 1px;
  background: rgba(232, 201, 143, 0.72);
  transition: width 800ms ease;
}

.cinema-v3 .tide-years {
  display: flex;
  gap: 8px;
}

.cinema-v3 .tide-year {
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  color: rgba(245, 238, 225, 0.28);
  cursor: pointer;
}

.cinema-v3 .tide-year strong {
  font-size: 8px;
  font-weight: 500;
}

.cinema-v3 .tide-year span {
  display: none;
}

.cinema-v3 .tide-year--active {
  color: var(--film-gold);
}

/* Chapter title: a cut, not a card */

.cinema-v3 .chapter-card {
  position: absolute;
  z-index: 60;
  top: 50%;
  left: 50%;
  width: auto;
  max-width: 75vw;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  text-align: center;
  backdrop-filter: none;
  transform: translate(-50%, -50%);
  transition: opacity 400ms ease;
}

.cinema-v3 .chapter-card span {
  color: var(--film-gold);
  font-size: 9px;
  letter-spacing: 0.22em;
}

.cinema-v3 .chapter-card h2 {
  margin: 12px 0 0;
  color: #fff8ea;
  font-family: var(--film-serif);
  font-size: clamp(28px, 4vw, 54px);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-shadow: 0 6px 40px rgba(0, 0, 0, 0.7);
}

.cinema-v3 .chapter-card--hidden {
  opacity: 0;
  pointer-events: none;
}

/* Historical freeze frame */

.cinema-v3 .history-interlude {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  background: transparent;
}

.cinema-v3 .history-interlude__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 8, 10, 0.94) 0%, rgba(2, 8, 10, 0.7) 45%, rgba(2, 8, 10, 0.18) 78%);
  backdrop-filter: blur(5px) saturate(0.7);
}

.cinema-v3 .history-interlude__sheet {
  position: relative;
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 34px;
  align-self: center;
  width: min(760px, 78vw);
  margin-left: max(7vw, calc(env(safe-area-inset-left) + 28px));
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}

.cinema-v3 .history-interlude__index {
  padding-top: 5px;
  border-right: 1px solid rgba(232, 201, 143, 0.28);
  color: rgba(245, 238, 225, 0.38);
}

.cinema-v3 .history-interlude__index span,
.cinema-v3 .history-interlude__index strong {
  display: block;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.14em;
}

.cinema-v3 .history-interlude__index strong {
  margin-top: 9px;
  color: var(--film-gold);
}

.cinema-v3 .history-interlude h2 {
  max-width: 620px;
  margin: 0;
  color: #f6efe2;
  font-family: var(--film-serif);
  font-size: clamp(30px, 4.3vw, 58px);
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.24;
}

.cinema-v3 .history-interlude__body > p {
  max-width: 650px;
  margin: 25px 0 0;
  color: rgba(245, 238, 225, 0.7);
  font-size: clamp(13px, 1.2vw, 16px);
  line-height: 1.9;
}

.cinema-v3 .history-interlude__sources {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
  margin-top: 24px;
}

.cinema-v3 .history-interlude__sources a {
  padding: 0 0 6px;
  border-bottom: 1px solid rgba(245, 238, 225, 0.16);
  color: rgba(245, 238, 225, 0.68);
  text-decoration: none;
}

.cinema-v3 .history-interlude__sources span,
.cinema-v3 .history-interlude__sources strong {
  display: block;
  font-size: 8px;
  font-weight: 500;
}

.cinema-v3 .history-interlude__sources span {
  margin-bottom: 4px;
  color: var(--film-gold);
  letter-spacing: 0.1em;
}

.cinema-v3 .history-interlude .quiet-action {
  margin-top: 34px;
}

/* Matching-cut montage */

.cinema-v3 .montage,
.cinema-v3 .echo,
.cinema-v3 .ending-choice,
.cinema-v3 .ending {
  position: fixed;
  z-index: 100;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
}

.cinema-v3 .montage {
  display: grid;
  grid-template-columns: minmax(240px, 0.72fr) minmax(0, 1.6fr);
  gap: 5vw;
  align-items: center;
  padding: max(8vh, 72px) max(6vw, 44px);
  background:
    linear-gradient(90deg, rgba(2, 8, 10, 0.88), rgba(2, 8, 10, 0.48)),
    url("../assets/images/cinematic/bg-arrival-1956-v2.webp") center / cover no-repeat;
  backdrop-filter: none;
}

.cinema-v3 .montage__header {
  align-self: end;
  padding: 0 0 6vh;
  text-align: left;
}

.cinema-v3 .montage__header span {
  color: var(--film-gold);
  font-size: 9px;
  letter-spacing: 0.18em;
}

.cinema-v3 .montage__header h2 {
  margin: 12px 0 0;
  font-family: var(--film-serif);
  font-size: clamp(42px, 6vw, 82px);
  font-weight: 500;
}

.cinema-v3 .montage__header p {
  max-width: 330px;
  color: rgba(245, 238, 225, 0.54);
  font-size: 12px;
  line-height: 1.8;
}

.cinema-v3 .montage__pairs {
  display: flex;
  flex-direction: column;
  align-self: center;
  gap: 0;
  width: 100%;
}

.cinema-v3 .montage-pair {
  display: grid;
  grid-template-columns: 1fr 50px 1fr;
  gap: 16px;
  align-items: center;
  width: 100%;
  padding: 20px 0;
  border: 0;
  border-top: 1px solid rgba(245, 238, 225, 0.14);
  border-radius: 0;
  background: transparent;
  color: var(--film-ink);
  text-align: left;
  backdrop-filter: none;
  cursor: pointer;
  transition: color 180ms ease, padding 180ms ease;
}

.cinema-v3 .montage-pair:last-child {
  border-bottom: 1px solid rgba(245, 238, 225, 0.14);
}

.cinema-v3 .montage-pair:hover {
  padding-left: 10px;
  border-color: rgba(232, 201, 143, 0.42);
  background: transparent;
  transform: none;
}

.cinema-v3 .montage-pair span,
.cinema-v3 .montage-pair strong,
.cinema-v3 .montage-pair small {
  display: block;
}

.cinema-v3 .montage-pair strong {
  font-family: var(--film-serif);
  font-size: 16px;
  font-weight: 500;
}

.cinema-v3 .montage-pair small {
  margin-top: 7px;
  color: rgba(245, 238, 225, 0.42);
  font-size: 9px;
  line-height: 1.6;
}

.cinema-v3 .montage-pair i {
  color: rgba(232, 201, 143, 0.5);
  font-size: 8px;
  font-style: normal;
  text-align: center;
}

.cinema-v3 .montage-pair--seen {
  color: var(--film-gold);
}

.cinema-v3 .montage > .primary-button {
  position: absolute;
  right: max(6vw, 44px);
  bottom: max(5vh, 34px);
}

/* Constrained AI listening room */

.cinema-v3 .echo {
  display: flex;
  align-items: flex-end;
  padding: 8vh max(7vw, 46px) max(7vh, 44px);
  background:
    linear-gradient(90deg, rgba(2, 7, 9, 0.76), rgba(2, 7, 9, 0.26)),
    url("../assets/images/cinematic/bg-cave-2026-v2.webp") center / cover no-repeat;
}

.cinema-v3 .echo__content {
  width: min(1080px, 88vw);
  max-height: 78vh;
  overflow: auto;
  padding: 28px 32px;
  border: 0;
  border-left: 1px solid rgba(232, 201, 143, 0.38);
  border-radius: 0;
  background: linear-gradient(90deg, rgba(2, 8, 10, 0.74), rgba(2, 8, 10, 0.26));
  box-shadow: none;
  backdrop-filter: blur(18px) saturate(0.8);
}

.cinema-v3 .echo h2 {
  margin: 0;
  font-family: var(--film-serif);
  font-size: clamp(30px, 4vw, 54px);
  font-weight: 500;
}

.cinema-v3 #echo-instruction {
  margin: 10px 0 20px;
  color: rgba(245, 238, 225, 0.5);
  font-size: 11px;
}

.cinema-v3 .echo__sources {
  display: grid;
  grid-auto-columns: minmax(190px, 1fr);
  grid-auto-flow: column;
  gap: 0;
  overflow-x: auto;
  border-top: 1px solid var(--film-line);
  border-bottom: 1px solid var(--film-line);
  scrollbar-width: thin;
}

.cinema-v3 .echo-source {
  min-height: 118px;
  padding: 16px 18px;
  border: 0;
  border-right: 1px solid var(--film-line);
  border-radius: 0;
  background: transparent;
  color: var(--film-ink);
  text-align: left;
  backdrop-filter: none;
  cursor: pointer;
}

.cinema-v3 .echo-source:hover,
.cinema-v3 .echo-source--selected {
  background: rgba(232, 201, 143, 0.08);
  transform: none;
}

.cinema-v3 .echo-source--selected {
  box-shadow: inset 0 -1px var(--film-gold);
}

.cinema-v3 .echo-source span,
.cinema-v3 .echo-source strong,
.cinema-v3 .echo-source small {
  display: block;
}

.cinema-v3 .echo-source span {
  color: var(--film-gold);
  font-size: 8px;
}

.cinema-v3 .echo-source strong {
  margin-top: 9px;
  font-family: var(--film-serif);
  font-size: 14px;
  font-weight: 500;
}

.cinema-v3 .echo-source small {
  margin-top: 7px;
  color: rgba(245, 238, 225, 0.38);
  font-size: 8px;
  line-height: 1.55;
}

.cinema-v3 .echo__listening {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 20px 0;
  padding: 0;
  border: 0;
}

.cinema-v3 .echo__listening legend {
  width: 100%;
  margin-bottom: 5px;
  color: rgba(245, 238, 225, 0.38);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.cinema-v3 .echo__listening label {
  padding: 0 0 5px;
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  background: none;
  color: rgba(245, 238, 225, 0.62);
  font-size: 10px;
}

.cinema-v3 .echo__listening label:has(input:checked) {
  border-color: var(--film-gold);
  color: var(--film-ink);
}

.cinema-v3 .echo__listening input {
  width: 10px;
  height: 10px;
  accent-color: #d4b474;
}

.cinema-v3 .echo-result {
  margin-top: 22px;
  padding: 22px 0 0;
  border: 0;
  border-top: 1px solid var(--film-line);
  background: none;
  box-shadow: none;
}

.cinema-v3 .echo-result__meta {
  display: flex;
  gap: 14px;
  color: var(--film-gold);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.cinema-v3 .echo-result > p {
  max-width: 780px;
  margin: 13px 0;
  font-family: var(--film-serif);
  font-size: clamp(17px, 1.8vw, 24px);
  line-height: 1.75;
}

.cinema-v3 .echo-result > small {
  display: block;
  color: rgba(245, 238, 225, 0.38);
  font-size: 8px;
}

.cinema-v3 .echo-result > button {
  margin-top: 20px;
  padding: 0 0 6px;
  border: 0;
  border-bottom: 1px solid var(--film-gold);
  border-radius: 0;
  background: none;
  color: var(--film-ink);
  cursor: pointer;
}

/* Ending choice: decisions as lines, never cards */

.cinema-v3 .ending-choice {
  display: flex;
  align-items: flex-end;
  padding: 8vh max(7vw, 46px) max(8vh, 52px);
  background:
    linear-gradient(90deg, rgba(2, 7, 9, 0.86), rgba(2, 7, 9, 0.18)),
    url("../assets/images/cinematic/bg-outside-2026-v2.webp") center / cover no-repeat;
}

.cinema-v3 .ending-choice__content {
  width: min(1080px, 90vw);
}

.cinema-v3 .ending-choice h2 {
  max-width: 850px;
  margin: 0;
  font-family: var(--film-serif);
  font-size: clamp(30px, 4.2vw, 58px);
  font-weight: 500;
  line-height: 1.25;
}

.cinema-v3 .ending-choice__content > p {
  max-width: 660px;
  margin: 15px 0 26px;
  color: rgba(245, 238, 225, 0.55);
  font-size: 11px;
  line-height: 1.8;
}

.cinema-v3 .ending-choice__options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--film-line);
  border-bottom: 1px solid var(--film-line);
}

.cinema-v3 .ending-choice__option {
  min-height: 132px;
  padding: 18px 20px;
  border: 0;
  border-right: 1px solid var(--film-line);
  border-radius: 0;
  background: transparent;
  color: var(--film-ink);
  text-align: left;
  cursor: pointer;
  transition: background 180ms ease, padding 180ms ease;
}

.cinema-v3 .ending-choice__option:last-child {
  border-right: 0;
}

.cinema-v3 .ending-choice__option:hover {
  padding-left: 26px;
  background: rgba(232, 201, 143, 0.08);
  transform: none;
}

.cinema-v3 .ending-choice__option:disabled {
  background: rgba(245, 238, 225, 0.025);
  color: rgba(245, 238, 225, 0.34);
  cursor: not-allowed;
  filter: grayscale(0.7);
}

.cinema-v3 .ending-choice__option:disabled:hover {
  padding-left: 20px;
  background: rgba(245, 238, 225, 0.025);
}

.cinema-v3 .ending-choice__option span,
.cinema-v3 .ending-choice__option strong,
.cinema-v3 .ending-choice__option small {
  display: block;
}

.cinema-v3 .ending-choice__option span {
  color: rgba(245, 238, 225, 0.32);
  font-size: 10px;
  letter-spacing: 0.1em;
}

.cinema-v3 .ending-choice__option--recommended span {
  color: var(--film-gold);
}

.cinema-v3 .ending-choice__option strong {
  margin-top: 12px;
  font-family: var(--film-serif);
  font-size: 18px;
  font-weight: 500;
}

.cinema-v3 .ending-choice__option small {
  margin-top: 9px;
  color: rgba(245, 238, 225, 0.44);
  font-size: 11px;
  line-height: 1.6;
}

.cinema-v3 #ending-recommendation {
  display: block;
  margin-top: 13px;
  color: rgba(245, 238, 225, 0.35);
  font-size: 11px;
}

@media (max-width: 1180px) and (min-width: 821px) {
  .cinema-v3 .ending-choice__options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cinema-v3 .ending-choice__option:nth-child(2) {
    border-right: 0;
  }

  .cinema-v3 .ending-choice__option:nth-child(-n + 2) {
    border-bottom: 1px solid var(--film-line);
  }
}

/* Ending frame */

.cinema-v3 .ending {
  display: flex;
  align-items: center;
  padding: max(7vh, 58px) max(7vw, 46px);
  background:
    linear-gradient(90deg, rgba(2, 7, 9, 0.9), rgba(2, 7, 9, 0.22)),
    url("../assets/images/cinematic/bg-outside-2026-v2.webp") center / cover no-repeat;
  text-align: left;
}

.cinema-v3 .ending__content {
  width: min(750px, 88vw);
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}

.cinema-v3 .ending h2 {
  margin: 0;
  font-family: var(--film-serif);
  font-size: clamp(48px, 7vw, 92px);
  font-weight: 500;
  letter-spacing: 0.03em;
  line-height: 1.12;
}

.cinema-v3 .ending__content > p:not(.ending__progress) {
  max-width: 600px;
  margin: 22px 0 0;
  color: rgba(245, 238, 225, 0.64);
  font-family: var(--film-serif);
  font-size: clamp(15px, 1.6vw, 21px);
  line-height: 1.8;
}

.cinema-v3 .ending__progress {
  margin: 18px 0 0;
  color: rgba(245, 238, 225, 0.35);
  font-size: 9px;
}

.cinema-v3 .ending__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: flex-start;
  margin-top: 34px;
}

.cinema-v3 .ending__actions a,
.cinema-v3 .ending__actions button {
  padding: 0 0 6px;
  border: 0;
  border-bottom: 1px solid rgba(245, 238, 225, 0.2);
  border-radius: 0;
  background: none;
  color: rgba(245, 238, 225, 0.65);
  text-decoration: none;
  cursor: pointer;
  font-size: 9px;
}

.cinema-v3 .ending__actions a:hover,
.cinema-v3 .ending__actions button:hover {
  border-color: var(--film-gold);
  color: var(--film-gold);
  transform: none;
}

.cinema-v3 .ending__content > small {
  display: block;
  max-width: 620px;
  margin-top: 26px;
  color: rgba(245, 238, 225, 0.28);
  font-size: 8px;
  line-height: 1.7;
}

/* Side sheets and tide reel */

.cinema-v3 .side-panel {
  position: fixed;
  z-index: 210;
  top: 0;
  right: 0;
  bottom: 0;
  left: auto;
  width: min(500px, 92vw);
  padding: max(34px, calc(env(safe-area-inset-top) + 24px)) 34px max(30px, env(safe-area-inset-bottom));
  overflow: auto;
  border: 0;
  border-left: 1px solid rgba(245, 238, 225, 0.1);
  background: rgba(3, 10, 12, 0.76);
  box-shadow: -30px 0 90px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(28px) saturate(0.72);
  transform: translateX(102%);
  transition: transform 280ms cubic-bezier(0.2, 0.75, 0.2, 1);
}

.cinema-v3 .side-panel--open {
  transform: translateX(0);
}

.cinema-v3 .side-panel--reel {
  width: min(650px, 94vw);
}

.cinema-v3 .side-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 0 0 20px;
  border-bottom: 1px solid var(--film-line);
}

.cinema-v3 .side-panel h2 {
  margin: 0;
  font-family: var(--film-serif);
  font-size: 32px;
  font-weight: 500;
}

.cinema-v3 .close-button {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(245, 238, 225, 0.06);
  color: rgba(245, 238, 225, 0.58);
  cursor: pointer;
}

.cinema-v3 .side-panel__lead {
  margin: 20px 0 25px;
  color: rgba(245, 238, 225, 0.44);
  font-size: 10px;
  line-height: 1.8;
}

.cinema-v3 .archive-list {
  display: block;
}

.cinema-v3 .archive-card {
  padding: 20px 0;
  border: 0;
  border-bottom: 1px solid var(--film-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.cinema-v3 .archive-card__meta {
  display: flex;
  gap: 12px;
  color: var(--film-gold);
  font-size: 8px;
}

.cinema-v3 .archive-card h3 {
  margin: 9px 0 0;
  font-family: var(--film-serif);
  font-size: 16px;
  font-weight: 500;
}

.cinema-v3 .archive-card p,
.cinema-v3 .about-copy,
.cinema-v3 .settings-form {
  color: rgba(245, 238, 225, 0.5);
  font-size: 10px;
  line-height: 1.8;
}

.cinema-v3 .archive-card a,
.cinema-v3 .about-copy a {
  display: inline-block;
  margin-top: 10px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--film-line);
  color: rgba(245, 238, 225, 0.6);
  text-decoration: none;
  font-size: 8px;
}

.cinema-v3 .reel-checkpoints {
  border-top: 1px solid var(--film-line);
}

.cinema-v3 .reel-checkpoints button {
  position: relative;
  display: grid;
  grid-template-columns: 120px 1fr;
  width: 100%;
  padding: 17px 0 17px 22px;
  border: 0;
  border-bottom: 1px solid var(--film-line);
  background: transparent;
  color: var(--film-ink);
  text-align: left;
  cursor: pointer;
  transition: padding 160ms ease, background 160ms ease;
}

.cinema-v3 .reel-checkpoints button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 6px;
  height: 6px;
  border: 1px solid var(--film-gold);
  border-radius: 50%;
  transform: translateY(-50%);
}

.cinema-v3 .reel-checkpoints button:hover {
  padding-left: 29px;
  background: rgba(232, 201, 143, 0.05);
}

.cinema-v3 .reel-checkpoints button:disabled {
  padding-left: 22px;
  background: transparent;
  color: rgba(245, 238, 225, 0.28);
  cursor: not-allowed;
  opacity: 0.58;
}

.cinema-v3 .reel-checkpoints button:disabled::before {
  border-color: rgba(245, 238, 225, 0.2);
  box-shadow: none;
}

.cinema-v3 .reel-checkpoint--current {
  background: rgba(232, 201, 143, 0.07) !important;
}

.cinema-v3 .reel-checkpoint--current::before {
  background: var(--film-gold);
  box-shadow: 0 0 16px rgba(232, 201, 143, 0.5);
}

.cinema-v3 .reel-checkpoints span,
.cinema-v3 .reel-checkpoints strong,
.cinema-v3 .reel-checkpoints small {
  display: block;
}

.cinema-v3 .reel-checkpoints span {
  grid-row: span 2;
  color: var(--film-gold);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.cinema-v3 .reel-checkpoints strong {
  font-family: var(--film-serif);
  font-size: 14px;
  font-weight: 500;
}

.cinema-v3 .reel-checkpoints small {
  margin-top: 4px;
  color: rgba(245, 238, 225, 0.34);
  font-size: 8px;
}

.cinema-v3 .reel-endings {
  display: flex;
  gap: 8px;
  margin-top: 24px;
}

.cinema-v3 .reel-ending {
  flex: 1;
  padding: 10px 8px;
  border: 1px solid rgba(245, 238, 225, 0.08);
  color: rgba(245, 238, 225, 0.22);
  font-size: 8px;
  text-align: center;
}

.cinema-v3 .reel-ending--unlocked {
  border-color: rgba(232, 201, 143, 0.3);
  color: var(--film-gold);
}

.cinema-v3 .panel-scrim {
  position: fixed;
  z-index: 200;
  inset: 0;
  background: rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(2px);
}

.cinema-v3 .settings-form fieldset,
.cinema-v3 .setting-toggle {
  margin: 0;
  padding: 18px 0;
  border: 0;
  border-bottom: 1px solid var(--film-line);
}

.cinema-v3 .danger-button {
  margin-top: 28px;
  padding: 0 0 5px;
  border: 0;
  border-bottom: 1px solid rgba(201, 119, 104, 0.45);
  border-radius: 0;
  background: none;
  color: rgba(230, 169, 156, 0.7);
}

/* Readability, guided forward actions, and constrained player questions */

.cinema-v3 .world-status strong,
.cinema-v3 #objective-kicker,
.cinema-v3 #objective-progress,
.cinema-v3 .dialogue__meta strong,
.cinema-v3 .dialogue__meta span,
.cinema-v3 .tide-nav__label,
.cinema-v3 .tide-year strong,
.cinema-v3 .echo-source span,
.cinema-v3 .echo-source small,
.cinema-v3 .echo__listening legend,
.cinema-v3 .echo-result__meta,
.cinema-v3 .archive-card__meta,
.cinema-v3 .reel-checkpoints span,
.cinema-v3 .reel-checkpoints small,
.cinema-v3 .reel-ending {
  font-size: var(--meta-font-size);
}

.cinema-v3 .world-status small,
.cinema-v3 .scene-caption p,
.cinema-v3 .side-panel__lead,
.cinema-v3 .archive-card p,
.cinema-v3 .about-copy,
.cinema-v3 .settings-form,
.cinema-v3 #echo-instruction,
.cinema-v3 .echo__listening label,
.cinema-v3 .history-interlude__body > p,
.cinema-v3 .reel-checkpoints strong,
.cinema-v3 .toast {
  font-size: var(--body-font-size);
}

.cinema-v3 #objective-title,
.cinema-v3 .echo-source strong {
  font-size: var(--body-font-size);
}

.cinema-v3 #objective-action,
.cinema-v3 #history-continue,
.cinema-v3 #montage-continue,
.cinema-v3 #echo-generate,
.cinema-v3 #echo-finish {
  display: inline-flex;
  gap: 18px;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid rgba(232, 201, 143, 0.34);
  border-radius: 999px;
  background: rgba(3, 10, 12, 0.5);
  color: var(--film-ink);
  cursor: pointer;
  font-size: var(--action-font-size);
  letter-spacing: 0.06em;
  backdrop-filter: blur(14px);
}

.cinema-v3 #objective-action:hover,
.cinema-v3 #history-continue:hover,
.cinema-v3 #montage-continue:hover,
.cinema-v3 #echo-generate:hover,
.cinema-v3 #echo-finish:hover,
.cinema-v3 .continue-button:hover {
  border-color: var(--film-gold);
  background: rgba(20, 23, 20, 0.7);
  color: var(--film-gold);
}

.cinema-v3 #objective-action {
  position: fixed;
  right: max(32px, calc(env(safe-area-inset-right) + 20px));
  bottom: max(72px, calc(env(safe-area-inset-bottom) + 60px));
  z-index: 54;
  margin: 0;
}

.cinema-v3 .echo-question {
  margin: 22px 0 18px;
  padding-top: 20px;
  border-top: 1px solid var(--film-line);
}

.cinema-v3 .echo-question__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
  color: rgba(245, 238, 225, 0.72);
  font-size: var(--body-font-size);
}

.cinema-v3 .echo-question__heading > span {
  color: rgba(245, 238, 225, 0.38);
  font-size: var(--meta-font-size);
}

.cinema-v3 #echo-question {
  display: block;
  width: 100%;
  min-height: 72px;
  resize: vertical;
  padding: 13px 15px;
  border: 1px solid rgba(245, 238, 225, 0.14);
  border-radius: 4px;
  background: rgba(1, 6, 8, 0.42);
  color: var(--film-ink);
  font-family: var(--film-serif);
  font-size: var(--body-font-size);
  line-height: 1.65;
}

.cinema-v3 #echo-question::placeholder {
  color: rgba(245, 238, 225, 0.3);
}

.cinema-v3 .echo-question__prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 14px;
  margin-top: 10px;
}

.cinema-v3 .echo-question__prompts button {
  padding: 5px 0;
  border: 0;
  border-bottom: 1px solid rgba(232, 201, 143, 0.22);
  background: transparent;
  color: rgba(245, 238, 225, 0.58);
  cursor: pointer;
  font-size: var(--meta-font-size);
}

.cinema-v3 .echo-question__prompts button:hover {
  border-color: var(--film-gold);
  color: var(--film-gold);
}

.cinema-v3 #echo-question-help {
  display: block;
  margin-top: 10px;
  color: rgba(245, 238, 225, 0.38);
  font-size: var(--meta-font-size);
  line-height: 1.6;
}

.cinema-v3 #echo-question-help.echo-question__help--error {
  color: #e6ae9d;
}

.cinema-v3 .toast {
  position: fixed;
  z-index: 54;
  top: max(84px, calc(env(safe-area-inset-top) + 70px));
  right: auto;
  bottom: auto;
  left: max(28px, calc(env(safe-area-inset-left) + 18px));
  width: fit-content;
  max-width: min(280px, calc(100vw - 36px));
  padding: 10px 13px;
  border: 1px solid rgba(232, 201, 143, 0.24);
  border-left-color: rgba(232, 201, 143, 0.62);
  border-radius: 10px;
  background: rgba(2, 8, 10, 0.74);
  color: rgba(245, 238, 225, 0.78);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.24);
  font-size: var(--meta-font-size);
  line-height: 1.55;
  opacity: 0;
  backdrop-filter: blur(12px);
  transform: translateY(-6px);
  transition: opacity 180ms ease, transform 180ms ease;
}

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

@keyframes cinema-hotspot-breathe {
  0%, 100% { opacity: 0.45; transform: translate(-50%, -50%) scale(0.85); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.12); }
}

@media (max-width: 820px) {
  .cinema-v3 .topbar {
    top: max(10px, env(safe-area-inset-top));
    right: 12px;
    left: 12px;
    opacity: 0.82;
  }

  .cinema-v3 .brand span:not(.brand__dot),
  .cinema-v3 #about-button,
  .cinema-v3 #audio-button {
    display: none;
  }

  .cinema-v3 .icon-button {
    padding: 0 9px;
  }

  .cinema-v3 .intro__content {
    bottom: max(6vh, calc(env(safe-area-inset-bottom) + 36px));
    left: max(24px, env(safe-area-inset-left));
    width: calc(100% - 48px);
  }

  .cinema-v3 .intro h1 {
    font-size: clamp(44px, 14vw, 72px);
  }

  .cinema-v3 .intro__line {
    margin-top: 25px;
    font-size: 17px;
  }

  .cinema-v3 .intro__modes {
    gap: 7px 14px;
    margin: 25px 0 20px;
  }

  .cinema-v3 .world-status {
    top: 65px;
    left: 18px;
  }

  .cinema-v3 .world-status small {
    display: none;
  }

  .cinema-v3 .objective {
    top: 90px;
    right: 18px;
    width: min(270px, 68vw);
  }

  .cinema-v3 .scene-caption {
    right: 18px;
    bottom: 48px;
  }

  .cinema-v3 .dialogue {
    right: 14px;
    bottom: max(49px, calc(env(safe-area-inset-bottom) + 38px));
    left: 14px;
    grid-template-columns: 1fr;
    gap: 8px;
    width: auto;
    max-height: min(38svh, 320px);
    padding: 14px 16px 15px;
    overflow: auto;
    transform: none;
  }

  .cinema-v3 .dialogue--hidden {
    transform: translateY(8px);
  }

  .cinema-v3 .dialogue__body > p {
    font-size: var(--story-font-size);
    line-height: 1.65;
  }

  .cinema-v3 .continue-button {
    justify-self: end;
  }

  .cinema-v3 #objective-action {
    right: max(16px, calc(env(safe-area-inset-right) + 10px));
    bottom: max(58px, calc(env(safe-area-inset-bottom) + 48px));
  }

  .cinema-v3 .tide-nav {
    bottom: max(10px, env(safe-area-inset-bottom));
    grid-template-columns: 42px 1fr auto;
    width: calc(100% - 28px);
  }

  .cinema-v3 .history-interlude__sheet {
    grid-template-columns: 1fr;
    gap: 20px;
    width: calc(100% - 48px);
    margin: auto 24px max(9vh, 50px);
  }

  .cinema-v3 .history-interlude__index {
    padding: 0 0 12px;
    border-right: 0;
    border-bottom: 1px solid rgba(232, 201, 143, 0.25);
  }

  .cinema-v3 .history-interlude__index span,
  .cinema-v3 .history-interlude__index strong {
    display: inline;
    margin: 0 12px 0 0;
  }

  .cinema-v3 .history-interlude h2 {
    font-size: clamp(28px, 9vw, 42px);
  }

  .cinema-v3 .montage {
    display: block;
    padding: 80px 22px 90px;
  }

  .cinema-v3 .montage__header {
    padding: 0 0 20px;
  }

  .cinema-v3 .montage__header h2 {
    font-size: 44px;
  }

  .cinema-v3 .montage-pair {
    grid-template-columns: 1fr 28px 1fr;
    gap: 7px;
    padding: 16px 0;
  }

  .cinema-v3 .montage-pair strong {
    font-size: 12px;
  }

  .cinema-v3 .montage-pair small {
    font-size: 8px;
  }

  .cinema-v3 .echo {
    padding: 70px 15px max(40px, env(safe-area-inset-bottom));
  }

  .cinema-v3 .echo__content {
    width: 100%;
    max-height: 84vh;
    padding: 20px 18px;
  }

  .cinema-v3 .echo__sources {
    grid-auto-columns: 70vw;
  }

  .cinema-v3 .ending-choice {
    padding: 80px 22px max(44px, env(safe-area-inset-bottom));
  }

  .cinema-v3 .ending-choice__options {
    display: block;
    max-height: 42vh;
    overflow: auto;
  }

  .cinema-v3 .ending-choice__option {
    width: 100%;
    min-height: 104px;
    border-right: 0;
    border-bottom: 1px solid var(--film-line);
  }

  .cinema-v3 .ending {
    align-items: flex-end;
    padding: 80px 24px max(52px, env(safe-area-inset-bottom));
  }

  .cinema-v3 .ending h2 {
    font-size: clamp(46px, 15vw, 70px);
  }

  .cinema-v3 .reel-checkpoints button {
    grid-template-columns: 90px 1fr;
  }
}

/* Play loop v10 · seven cinematic minigames, card book and mutual-aid counter. */
.cinema-v3 .minigame-layer {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  overflow: auto;
  color: #f7f0e3;
  background: #071318;
}

.cinema-v3 .minigame-layer[hidden] {
  display: none !important;
}

.cinema-v3 .minigame-layer__art,
.cinema-v3 .minigame-layer__veil {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}

.cinema-v3 .minigame-layer__art {
  object-fit: cover;
  filter: saturate(0.72) brightness(0.66);
}

.cinema-v3 .minigame-layer__veil {
  background:
    linear-gradient(90deg, rgba(3, 12, 16, 0.94) 0%, rgba(3, 12, 16, 0.66) 46%, rgba(3, 12, 16, 0.84) 100%),
    linear-gradient(180deg, rgba(4, 15, 20, 0.25), rgba(4, 15, 20, 0.88));
  backdrop-filter: blur(2px);
}

.cinema-v3 .minigame-shell {
  position: relative;
  width: min(980px, 96vw);
  min-height: min(760px, calc(100dvh - 40px));
  padding: clamp(24px, 4vw, 52px);
  border: 1px solid rgba(233, 207, 158, 0.2);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(7, 23, 29, 0.9), rgba(4, 13, 17, 0.76));
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.48), inset 0 1px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(30px) saturate(0.82);
}

.cinema-v3 .minigame-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(238, 217, 179, 0.14);
}

.cinema-v3 .minigame-header > div:first-child {
  max-width: 700px;
}

.cinema-v3 #minigame-index,
.cinema-v3 #minigame-chapter,
.cinema-v3 .minigame-wallet span {
  color: #d8b779;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.cinema-v3 .minigame-header h2 {
  margin: 8px 0 5px;
  font-family: var(--film-serif);
  font-size: clamp(30px, 5vw, 52px);
  font-weight: 500;
  line-height: 1.15;
}

.cinema-v3 .minigame-header p {
  margin: 0;
  color: rgba(248, 241, 228, 0.67);
  font-size: clamp(14px, 1.8vw, 17px);
  line-height: 1.7;
}

.cinema-v3 .minigame-wallet {
  display: grid;
  min-width: 86px;
  padding: 12px 16px;
  border: 1px solid rgba(216, 183, 121, 0.22);
  border-radius: 16px;
  background: rgba(216, 183, 121, 0.07);
  text-align: right;
}

.cinema-v3 .minigame-wallet strong {
  margin-top: 3px;
  color: #f3dba8;
  font-size: 24px;
}

.cinema-v3 .minigame-progress-row {
  display: flex;
  justify-content: space-between;
  padding: 16px 2px 0;
  color: rgba(248, 241, 228, 0.62);
  font-size: 12px;
}

.cinema-v3 #minigame-progress {
  color: #f1d498;
}

.cinema-v3 .minigame-stage {
  display: grid;
  align-content: center;
  min-height: 475px;
  padding: 24px 0 20px;
}

.cinema-v3 .mini-copy {
  display: grid;
  gap: 5px;
  margin-bottom: 18px;
}

.cinema-v3 .mini-copy strong {
  font-family: var(--film-serif);
  font-size: 23px;
  font-weight: 500;
}

.cinema-v3 .mini-copy span {
  color: rgba(248, 241, 228, 0.58);
  font-size: 13px;
  line-height: 1.65;
}

.cinema-v3 .photo-game-layout {
  display: grid;
  grid-template-columns: minmax(210px, 0.76fr) minmax(330px, 1fr);
  gap: clamp(18px, 4vw, 42px);
  align-items: center;
}

.cinema-v3 .photo-preview,
.cinema-v3 .photo-puzzle {
  overflow: hidden;
  border: 1px solid rgba(240, 218, 178, 0.2);
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
}

.cinema-v3 .photo-preview {
  position: relative;
  aspect-ratio: 4 / 3;
  background-position: center;
  background-size: cover;
  filter: sepia(0.18) saturate(0.74);
}

.cinema-v3 .photo-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(3, 12, 16, 0.78));
}

.cinema-v3 .photo-preview span {
  position: absolute;
  z-index: 1;
  right: 14px;
  bottom: 12px;
  color: rgba(255, 244, 221, 0.78);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.cinema-v3 .photo-puzzle {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  aspect-ratio: 4 / 3;
  background: rgba(2, 9, 12, 0.82);
}

.cinema-v3 .photo-piece {
  min-width: 0;
  min-height: 0;
  border: 1px solid rgba(250, 235, 207, 0.14);
  border-radius: 0;
  background-size: 300% 300%;
  cursor: pointer;
  filter: saturate(0.75) brightness(0.92);
  transition: filter 160ms ease, box-shadow 160ms ease;
}

.cinema-v3 .photo-piece:hover,
.cinema-v3 .photo-piece:focus-visible,
.cinema-v3 .photo-piece.is-selected {
  z-index: 1;
  outline: none;
  filter: saturate(0.95) brightness(1.08);
  box-shadow: inset 0 0 0 3px rgba(239, 204, 139, 0.82);
}

.cinema-v3 .mini-sequence-line {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 7px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.cinema-v3 .mini-sequence-line li {
  min-height: 42px;
  padding: 8px;
  border: 1px solid rgba(248, 241, 228, 0.1);
  border-radius: 10px;
  color: rgba(248, 241, 228, 0.38);
  font-size: 10px;
  text-align: center;
}

.cinema-v3 .mini-sequence-line li.is-current {
  border-color: rgba(231, 194, 126, 0.45);
  color: #f0d59d;
  background: rgba(231, 194, 126, 0.09);
}

.cinema-v3 .mini-sequence-line li.is-done {
  border-color: rgba(138, 189, 164, 0.3);
  color: #b9d9c8;
  background: rgba(100, 162, 132, 0.08);
}

.cinema-v3 .mini-option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.cinema-v3 .mini-option-grid--quiz,
.cinema-v3 .mini-option-grid--outcomes {
  grid-template-columns: 1fr;
}

.cinema-v3 .mini-option {
  display: grid;
  gap: 5px;
  min-height: 66px;
  padding: 14px 17px;
  border: 1px solid rgba(247, 233, 205, 0.16);
  border-radius: 14px;
  background: rgba(247, 233, 205, 0.055);
  color: #f7f0e3;
  text-align: left;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.cinema-v3 .mini-option:hover,
.cinema-v3 .mini-option:focus-visible {
  outline: none;
  border-color: rgba(234, 199, 134, 0.6);
  background: rgba(234, 199, 134, 0.11);
  transform: translateY(-1px);
}

.cinema-v3 .mini-option.is-hint {
  border-color: rgba(244, 208, 139, 0.9);
  background: rgba(244, 208, 139, 0.16);
  box-shadow: 0 0 0 3px rgba(244, 208, 139, 0.08);
}

.cinema-v3 .mini-option strong {
  font-size: 15px;
  font-weight: 560;
}

.cinema-v3 .mini-option span {
  color: rgba(248, 241, 228, 0.52);
  font-size: 11px;
  line-height: 1.5;
}

.cinema-v3 .mini-question-card,
.cinema-v3 .mini-outcome-choice {
  width: min(700px, 100%);
  margin: 0 auto;
  padding: clamp(20px, 4vw, 34px);
  border: 1px solid rgba(240, 216, 172, 0.18);
  border-radius: 22px;
  background: rgba(5, 18, 23, 0.72);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
}

.cinema-v3 .mini-question-card > span {
  color: #d8b779;
  font-size: 11px;
  letter-spacing: 0.12em;
}

.cinema-v3 .mini-question-card h3,
.cinema-v3 .mini-outcome-choice h3 {
  margin: 10px 0 22px;
  font-family: var(--film-serif);
  font-size: clamp(23px, 3.5vw, 32px);
  font-weight: 500;
  line-height: 1.45;
}

.cinema-v3 .mini-outcome-choice p {
  margin: -10px 0 22px;
  color: rgba(248, 241, 228, 0.64);
  font-size: 14px;
  line-height: 1.7;
}

.cinema-v3 .mini-option--outcome {
  display: block;
  min-height: 56px;
  font-size: 15px;
}

.cinema-v3 .minigame-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(238, 217, 179, 0.12);
}

.cinema-v3 #minigame-feedback {
  margin: 0;
  color: rgba(248, 241, 228, 0.62);
  font-size: 13px;
  line-height: 1.55;
}

.cinema-v3 #minigame-feedback[data-tone="good"] {
  color: #c4ddcf;
}

.cinema-v3 #minigame-feedback[data-tone="wrong"] {
  color: #ebc5ad;
}

.cinema-v3 .minigame-footer > div,
.cinema-v3 .mini-result__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}

.cinema-v3 .minigame-quiet,
.cinema-v3 .minigame-primary {
  min-height: 42px;
  padding: 10px 15px;
  border-radius: 999px;
  cursor: pointer;
}

.cinema-v3 .minigame-quiet {
  border: 1px solid rgba(244, 229, 201, 0.16);
  background: rgba(244, 229, 201, 0.05);
  color: rgba(248, 241, 228, 0.7);
}

.cinema-v3 .minigame-primary {
  border: 1px solid rgba(236, 203, 142, 0.65);
  background: rgba(236, 203, 142, 0.18);
  color: #fff4dc;
}

.cinema-v3 .mini-result {
  display: grid;
  justify-items: center;
  width: min(680px, 100%);
  margin: 0 auto;
  text-align: center;
}

.cinema-v3 .mini-result__stamp {
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  border: 1px solid rgba(232, 194, 123, 0.7);
  border-radius: 50%;
  color: #f0cf8f;
  box-shadow: inset 0 0 0 6px rgba(232, 194, 123, 0.07);
}

.cinema-v3 .mini-result__stamp span,
.cinema-v3 .mini-result__stamp small {
  font-size: 10px;
  letter-spacing: 0.12em;
}

.cinema-v3 .mini-result__stamp strong {
  margin: -7px 0;
  font-family: var(--film-serif);
  font-size: 38px;
  font-weight: 500;
}

.cinema-v3 .mini-result h3 {
  margin: 22px 0 8px;
  font-family: var(--film-serif);
  font-size: clamp(25px, 4vw, 36px);
  font-weight: 500;
}

.cinema-v3 .mini-result > p {
  margin: 0;
  color: rgba(248, 241, 228, 0.66);
  font-size: 14px;
  line-height: 1.7;
}

.cinema-v3 .mini-result__rewards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  width: 100%;
  margin: 25px 0 18px;
}

.cinema-v3 .mini-result__rewards div {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid rgba(235, 205, 149, 0.16);
  border-radius: 14px;
  background: rgba(235, 205, 149, 0.055);
}

.cinema-v3 .mini-result__rewards span {
  color: rgba(248, 241, 228, 0.44);
  font-size: 10px;
}

.cinema-v3 .mini-result__rewards strong {
  color: #efd39c;
  font-size: 14px;
}

.cinema-v3 .side-panel#archive-panel {
  width: min(650px, 96vw);
}

.cinema-v3 .archive-wallet {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 15px;
}

.cinema-v3 .archive-wallet > div {
  display: grid;
  gap: 3px;
  padding: 11px 12px;
  border: 1px solid rgba(234, 207, 157, 0.13);
  border-radius: 12px;
  background: rgba(234, 207, 157, 0.045);
}

.cinema-v3 .archive-wallet span {
  color: rgba(245, 238, 225, 0.44);
  font-size: 9px;
}

.cinema-v3 .archive-wallet strong {
  color: #edd09a;
  font-size: 16px;
  font-style: normal;
}

.cinema-v3 .archive-wallet i {
  font-style: normal;
}

.cinema-v3 .archive-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 5px;
  border: 1px solid rgba(244, 228, 198, 0.11);
  border-radius: 14px;
  background: rgba(2, 9, 12, 0.34);
}

.cinema-v3 .archive-tabs button {
  min-height: 38px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(245, 238, 225, 0.5);
  font-size: 11px;
  cursor: pointer;
}

.cinema-v3 .archive-tabs button[aria-pressed="true"] {
  background: rgba(231, 198, 135, 0.13);
  color: #f1d69f;
}

.cinema-v3 .archive-page-note {
  margin: 14px 1px;
  color: rgba(245, 238, 225, 0.48);
  font-size: 11px;
  line-height: 1.65;
}

.cinema-v3 .archive-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.cinema-v3 .archive-card {
  position: relative;
  display: grid;
  align-content: end;
  min-height: 185px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid rgba(242, 222, 183, 0.15);
  border-radius: 15px;
  background-color: rgba(8, 25, 31, 0.74);
  background-position: center;
  background-size: cover;
  color: #f8f0e1;
  text-align: left;
  cursor: pointer;
  box-shadow: none;
}

.cinema-v3 .archive-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 13, 17, 0.05) 12%, rgba(4, 13, 17, 0.93) 86%);
}

.cinema-v3 .archive-card > * {
  position: relative;
  z-index: 1;
}

.cinema-v3 .archive-card:hover,
.cinema-v3 .archive-card:focus-visible {
  outline: none;
  border-color: rgba(234, 199, 134, 0.58);
}

.cinema-v3 .archive-card--locked {
  cursor: default;
  filter: grayscale(0.8) brightness(0.58);
}

.cinema-v3 .archive-card--locked::after {
  background: rgba(4, 13, 17, 0.84);
}

.cinema-v3 .archive-card__meta {
  display: flex;
  gap: 8px;
  color: #e8c985;
  font-size: 9px;
}

.cinema-v3 .archive-card h3 {
  margin: 7px 0 4px;
  font-size: 17px;
  line-height: 1.35;
}

.cinema-v3 .archive-card p {
  margin: 0;
  color: rgba(248, 241, 228, 0.62);
  font-size: 10px;
  line-height: 1.45;
}

.cinema-v3 .archive-reader__back {
  margin: 16px 0 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(245, 238, 225, 0.58);
  cursor: pointer;
}

.cinema-v3 .archive-reader-card {
  position: relative;
  min-height: 480px;
  overflow: hidden;
  border: 1px solid rgba(238, 210, 160, 0.22);
  border-radius: 22px;
  background: #07161c;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.32);
}

.cinema-v3 .archive-reader-card > img,
.cinema-v3 .archive-reader-card__shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.cinema-v3 .archive-reader-card > img {
  object-fit: cover;
  filter: saturate(0.72) brightness(0.74);
}

.cinema-v3 .archive-reader-card__shade {
  background: linear-gradient(180deg, rgba(3, 12, 16, 0.08) 20%, rgba(3, 12, 16, 0.94) 82%);
}

.cinema-v3 .archive-reader-card__face {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: end;
  min-height: 480px;
  padding: clamp(24px, 5vw, 42px);
}

.cinema-v3 .archive-reader-card__face > span {
  color: #e3bf79;
  font-size: 10px;
  letter-spacing: 0.14em;
}

.cinema-v3 .archive-reader-card__face h3 {
  margin: 10px 0 12px;
  font-family: var(--film-serif);
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 500;
  line-height: 1.25;
}

.cinema-v3 .archive-reader-card__face p {
  margin: 0;
  color: rgba(248, 241, 228, 0.74);
  font-size: 14px;
  line-height: 1.75;
}

.cinema-v3 .archive-reader-card__face small {
  margin-top: 18px;
  color: rgba(248, 241, 228, 0.45);
  font-size: 10px;
  line-height: 1.55;
}

.cinema-v3 .archive-reader-card__reverse {
  align-content: center;
  background: linear-gradient(145deg, rgba(10, 34, 41, 0.97), rgba(4, 15, 20, 0.98));
}

.cinema-v3 .archive-reader-card__reverse a {
  justify-self: start;
  margin-top: 18px;
  padding: 9px 13px;
  border: 1px solid rgba(227, 191, 121, 0.26);
  border-radius: 999px;
  color: #edcf94;
  font-size: 11px;
  text-decoration: none;
}

.cinema-v3 .archive-reader__controls {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.cinema-v3 .archive-reader__controls button {
  min-height: 42px;
  border: 1px solid rgba(241, 222, 184, 0.14);
  border-radius: 999px;
  background: rgba(241, 222, 184, 0.055);
  color: rgba(248, 241, 228, 0.68);
  cursor: pointer;
}

.cinema-v3 #archive-reader-flip {
  border-color: rgba(232, 194, 123, 0.45);
  color: #efd49c;
}

.cinema-v3 .arcade-list,
.cinema-v3 .shop-list {
  display: grid;
  gap: 9px;
}

.cinema-v3 .arcade-game,
.cinema-v3 .shop-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px 18px;
  align-items: center;
  padding: 15px;
  border: 1px solid rgba(243, 226, 193, 0.12);
  border-radius: 15px;
  background: rgba(243, 226, 193, 0.035);
}

.cinema-v3 .arcade-game h3,
.cinema-v3 .shop-item h3 {
  margin: 0 0 5px;
  font-family: var(--film-serif);
  font-size: 17px;
  font-weight: 500;
}

.cinema-v3 .arcade-game p,
.cinema-v3 .shop-item p {
  margin: 0;
  color: rgba(245, 238, 225, 0.5);
  font-size: 10px;
  line-height: 1.55;
}

.cinema-v3 .arcade-game small,
.cinema-v3 .shop-item small {
  color: #d8b779;
  font-size: 9px;
}

.cinema-v3 .arcade-game button,
.cinema-v3 .shop-item button {
  min-width: 92px;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid rgba(231, 194, 126, 0.35);
  border-radius: 999px;
  background: rgba(231, 194, 126, 0.09);
  color: #edcf94;
  font-size: 10px;
  cursor: pointer;
}

.cinema-v3 .arcade-game button:disabled,
.cinema-v3 .shop-item button:disabled {
  border-color: rgba(245, 238, 225, 0.08);
  color: rgba(245, 238, 225, 0.3);
  cursor: default;
}

.cinema-v3 .shop-item--owned {
  border-color: rgba(132, 185, 158, 0.26);
  background: rgba(102, 157, 130, 0.06);
}

.cinema-v3 .history-interlude__sources button.history-source-card {
  display: grid;
  gap: 4px;
  width: 100%;
  min-height: 72px;
  padding: 13px 15px;
  border: 1px solid rgba(234, 204, 149, 0.2);
  border-radius: 13px;
  background: rgba(234, 204, 149, 0.06);
  color: #f7ecda;
  text-align: left;
  cursor: pointer;
}

.cinema-v3 .history-interlude__sources button.history-source-card span {
  color: #d9b877;
  font-size: 9px;
  letter-spacing: 0.1em;
}

.cinema-v3 .history-interlude__sources button.history-source-card strong {
  font-family: var(--film-serif);
  font-size: 16px;
  font-weight: 500;
}

@media (max-width: 760px) {
  .cinema-v3 .minigame-layer {
    place-items: stretch;
    padding: 0;
  }

  .cinema-v3 .minigame-shell {
    width: 100%;
    min-height: 100dvh;
    padding: max(19px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom));
    border: 0;
    border-radius: 0;
  }

  .cinema-v3 .minigame-header h2 {
    font-size: 30px;
  }

  .cinema-v3 .minigame-wallet {
    min-width: 70px;
    padding: 9px 11px;
  }

  .cinema-v3 .minigame-stage {
    min-height: 430px;
    padding-top: 18px;
  }

  .cinema-v3 .photo-game-layout {
    grid-template-columns: 1fr;
  }

  .cinema-v3 .photo-preview {
    display: none;
  }

  .cinema-v3 .photo-puzzle {
    width: min(100%, 480px);
    margin: 0 auto;
  }

  .cinema-v3 .mini-option-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .cinema-v3 .mini-option {
    min-height: 54px;
    padding: 11px 13px;
  }

  .cinema-v3 .mini-sequence-line {
    grid-template-columns: repeat(3, 1fr);
  }

  .cinema-v3 .minigame-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .cinema-v3 .minigame-footer > div {
    justify-content: flex-start;
  }

  .cinema-v3 .mini-result__rewards {
    grid-template-columns: 1fr;
  }

  .cinema-v3 .archive-list {
    grid-template-columns: 1fr;
  }

  .cinema-v3 .archive-card {
    min-height: 150px;
  }

  .cinema-v3 .archive-reader-card,
  .cinema-v3 .archive-reader-card__face {
    min-height: 420px;
  }

  .cinema-v3 .arcade-game,
  .cinema-v3 .shop-item {
    grid-template-columns: 1fr;
  }

  .cinema-v3 .arcade-game button,
  .cinema-v3 .shop-item button {
    justify-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cinema-v3 .photo-piece,
  .cinema-v3 .mini-option {
    transition: none;
  }
}

.cinema-v3 .reel-branch {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(245, 238, 225, 0.11);
}

.cinema-v3 .reel-branch h3 {
  margin: 7px 0 14px;
  font-family: var(--film-serif);
  font-size: 20px;
  font-weight: 500;
}

.cinema-v3 .reel-branch-map {
  display: grid;
  gap: 6px;
}

.cinema-v3 .reel-branch-map article {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 4px 10px;
  padding: 12px 13px;
  border: 1px solid rgba(232, 201, 143, 0.18);
  border-radius: 7px;
  background: rgba(232, 201, 143, 0.045);
}

.cinema-v3 .reel-branch-map article > span {
  grid-row: 1 / 4;
  color: var(--film-gold);
  font-size: 10px;
}

.cinema-v3 .reel-branch-map article strong {
  font-family: var(--film-serif);
  font-size: 14px;
  font-weight: 500;
}

.cinema-v3 .reel-branch-map article small {
  color: rgba(245, 238, 225, 0.48);
  font-size: 10px;
  line-height: 1.45;
}

.cinema-v3 .reel-branch-map article em {
  color: rgba(245, 238, 225, 0.38);
  font-size: 9px;
  font-style: normal;
  letter-spacing: 0.04em;
}

.cinema-v3 .reel-branch-map article.reel-branch-node--ending em {
  color: var(--film-gold);
}

.cinema-v3 .reel-branch-map > i {
  margin-left: 27px;
  color: rgba(232, 201, 143, 0.5);
  font-style: normal;
}

.cinema-v3 .reel-endings__label {
  display: block;
  margin-top: 28px;
}

.cinema-v3 .reel-endings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.cinema-v3 .reel-ending {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(245, 238, 225, 0.1);
  border-radius: 7px;
  color: rgba(245, 238, 225, 0.48);
}

.cinema-v3 .reel-ending strong {
  color: rgba(245, 238, 225, 0.78);
  font-family: var(--film-serif);
  font-size: 14px;
  font-weight: 500;
}

.cinema-v3 .reel-ending small {
  font-size: 10px;
  line-height: 1.45;
}

.cinema-v3 .reel-ending span {
  align-self: flex-start;
  color: rgba(245, 238, 225, 0.35);
  font-size: 9px;
}

.cinema-v3 .reel-ending--unlocked,
.cinema-v3 .reel-ending--current,
.cinema-v3 .reel-ending--available {
  border-color: rgba(232, 201, 143, 0.42);
}

.cinema-v3 .reel-ending--current span,
.cinema-v3 .reel-ending--available span {
  color: var(--film-gold);
}

.cinema-v3 .reel-ending--closed {
  opacity: 0.72;
}

@media (max-width: 520px) {
  .cinema-v3 .reel-endings {
    grid-template-columns: 1fr;
  }
}

/* Four-corner story HUD: context, time, action and conversation never compete. */

.cinema-v3 .zhilan-presence,
.cinema-v3 .objective {
  display: none !important;
}

.cinema-v3 .story-dock {
  display: contents;
}

/* Top left · the person currently speaking and the one short story beat. */
.cinema-v3 .dialogue {
  top: max(82px, calc(env(safe-area-inset-top) + 70px));
  right: auto;
  bottom: auto;
  left: max(28px, calc(env(safe-area-inset-left) + 18px));
  display: block;
  width: min(570px, 43vw);
  max-height: min(27svh, 230px);
  padding: 15px 18px 17px;
  overflow: auto;
  border: 1px solid rgba(245, 238, 225, 0.1);
  border-left: 2px solid rgba(232, 201, 143, 0.68);
  border-radius: 9px;
  background: linear-gradient(105deg, rgba(2, 8, 10, 0.82), rgba(2, 8, 10, 0.46) 78%, rgba(2, 8, 10, 0.18));
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.23);
  backdrop-filter: blur(18px) saturate(0.78);
}

.cinema-v3 .dialogue--hidden,
.cinema-v3 .dialogue--chat-paused {
  display: none;
}

.cinema-v3 .dialogue-toggle,
.cinema-v3 .dialogue__choices,
.cinema-v3 .continue-button {
  display: none !important;
}

.cinema-v3 .dialogue__meta {
  align-items: baseline;
  margin-bottom: 8px;
}

.cinema-v3 .dialogue__meta strong {
  font-size: 16px;
  letter-spacing: 0.035em;
}

.cinema-v3 .dialogue__meta span {
  font-size: 10px;
  letter-spacing: 0.055em;
}

.cinema-v3 .dialogue__body > p {
  font-size: clamp(17px, 1.38vw, 21px);
  line-height: 1.58;
}

/* Top right · where and when this memory is taking place. */
.cinema-v3 .scene-caption {
  top: max(82px, calc(env(safe-area-inset-top) + 70px));
  right: max(28px, calc(env(safe-area-inset-right) + 18px));
  bottom: auto;
  max-width: min(430px, 38vw);
}

.cinema-v3 .scene-caption span {
  font-size: 20px;
}

.cinema-v3 .scene-caption p {
  margin-top: 3px;
  color: rgba(245, 238, 225, 0.64);
  font-size: 10px;
  line-height: 1.45;
}

.cinema-v3 .world-status {
  top: max(134px, calc(env(safe-area-inset-top) + 122px));
  right: max(28px, calc(env(safe-area-inset-right) + 18px));
  left: auto;
  width: min(390px, 36vw);
  justify-content: flex-end;
  padding: 8px 11px 8px 18px;
  border: 0;
  border-right: 2px solid rgba(232, 201, 143, 0.55);
  background: linear-gradient(270deg, rgba(2, 8, 10, 0.68), rgba(2, 8, 10, 0.12));
  text-align: right;
}

.cinema-v3 .world-status .live-dot {
  order: 2;
  margin-top: 6px;
}

.cinema-v3 .world-status strong {
  font-size: 14px;
}

.cinema-v3 .world-status small {
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.42;
}

.cinema-v3 .tide-nav {
  top: max(201px, calc(env(safe-area-inset-top) + 189px));
  right: max(28px, calc(env(safe-area-inset-right) + 18px));
  bottom: auto;
  left: auto;
  grid-template-columns: 36px minmax(90px, 150px) auto;
  gap: 10px;
  width: min(365px, 34vw);
  transform: none;
}

.cinema-v3 .tide-years {
  gap: 5px;
}

.cinema-v3 .tide-year {
  min-width: 43px;
  padding: 4px 3px;
}

.cinema-v3 .tide-year strong {
  font-size: 9px;
}

.cinema-v3 .tide-year span {
  display: none;
}

/* Bottom left · what Chen Zhilan chooses to do. */
.cinema-v3 .story-input {
  right: auto;
  bottom: max(28px, calc(env(safe-area-inset-bottom) + 18px));
  left: max(28px, calc(env(safe-area-inset-left) + 18px));
  width: min(590px, 45vw);
  padding: 11px 13px 10px;
  border-color: rgba(232, 201, 143, 0.24);
  border-left-color: rgba(232, 201, 143, 0.72);
  border-radius: 9px;
  background: linear-gradient(120deg, rgba(2, 8, 10, 0.86), rgba(2, 8, 10, 0.58));
}

.cinema-v3 .story-input__heading {
  gap: 10px;
  align-items: flex-start;
}

.cinema-v3 .story-input__heading span {
  font-size: 9px;
}

.cinema-v3 .story-input__heading strong {
  display: -webkit-box;
  margin-top: 1px;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.cinema-v3 #objective-action {
  min-height: 30px;
  padding: 0 10px;
  font-size: 10px;
}

.cinema-v3 .story-input__suggestions {
  gap: 6px;
  margin-top: 7px;
  padding-bottom: 2px;
}

.cinema-v3 .story-input__suggestions button {
  min-height: 30px;
  max-width: 245px;
  padding: 4px 10px;
  font-size: 11px;
  white-space: nowrap;
}

.cinema-v3 .story-input__form {
  grid-template-columns: minmax(0, 1fr) 62px;
  gap: 6px;
  margin-top: 7px;
}

.cinema-v3 #story-input-field {
  height: 38px;
  font-size: 13px;
}

.cinema-v3 #story-input-send {
  min-width: 0;
  font-size: 11px;
}

.cinema-v3 #story-input-feedback {
  min-height: 1.35em;
  max-height: 3.15em;
  margin-top: 5px;
  overflow-y: auto;
  color: rgba(245, 238, 225, 0.68);
  font-size: 11px;
  line-height: 1.4;
  white-space: pre-line;
}

/* Bottom right · a dedicated, free-form conversation with the current NPC. */
.cinema-v3 .scene-chat-open {
  top: auto;
  right: max(28px, calc(env(safe-area-inset-right) + 18px));
  bottom: max(28px, calc(env(safe-area-inset-bottom) + 18px));
  min-width: 0;
  padding: 9px 14px;
}

.cinema-v3 .scene-chat-open span {
  font-size: 8px;
}

.cinema-v3 .scene-chat-open strong {
  font-size: 13px;
}

.cinema-v3 .game--chat-open .scene-chat-open {
  opacity: 0;
  pointer-events: none;
}

.cinema-v3 .scene-chat {
  top: auto;
  right: max(28px, calc(env(safe-area-inset-right) + 18px));
  bottom: max(28px, calc(env(safe-area-inset-bottom) + 18px));
  left: auto;
  width: min(460px, 40vw);
  height: min(48svh, 440px);
  padding: 16px;
  border-radius: 10px;
  background: linear-gradient(150deg, rgba(3, 11, 13, 0.91), rgba(3, 10, 12, 0.72));
}

.cinema-v3 .scene-chat__header span {
  font-size: 9px;
}

.cinema-v3 .scene-chat__header span i {
  font-style: normal;
}

.cinema-v3 .scene-chat__header h2 {
  margin-top: 3px;
  font-size: 20px;
}

.cinema-v3 #scene-chat-close {
  width: 30px;
  height: 30px;
}

.cinema-v3 .scene-chat__intro {
  margin: 7px 0 9px;
  overflow: hidden;
  font-size: 10px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cinema-v3 .scene-chat__log {
  min-height: 100px;
  padding-right: 4px;
}

.cinema-v3 .scene-chat__turn {
  margin-bottom: 10px;
  padding-bottom: 10px;
}

.cinema-v3 .scene-chat__turn p {
  font-size: 13px;
  line-height: 1.58;
}

.cinema-v3 .scene-chat__reply {
  margin-top: 4px !important;
  font-size: 14px !important;
}

.cinema-v3 .scene-chat__ask {
  padding-top: 9px;
}

.cinema-v3 .scene-chat__free-form {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.cinema-v3 .scene-chat__free-form label {
  margin-bottom: 5px;
  font-size: 9px;
}

.cinema-v3 #scene-chat-free-input {
  height: 38px;
  font-size: 13px;
}

.cinema-v3 #scene-chat-free-send {
  min-width: 58px;
  font-size: 11px;
}

.cinema-v3 #scene-chat-free-help {
  min-height: 1.3em;
  margin-top: 4px;
  overflow: hidden;
  font-size: 9px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 820px) {
  .cinema-v3 .scene-caption {
    top: max(69px, calc(env(safe-area-inset-top) + 58px));
    right: 12px;
    max-width: calc(100vw - 24px);
  }

  .cinema-v3 .scene-caption span {
    font-size: 16px;
  }

  .cinema-v3 .scene-caption p {
    font-size: 8px;
  }

  .cinema-v3 .world-status {
    top: max(111px, calc(env(safe-area-inset-top) + 100px));
    right: 12px;
    left: auto;
    width: min(270px, calc(100vw - 24px));
    padding: 5px 9px;
  }

  .cinema-v3 .world-status strong {
    font-size: 11px;
  }

  .cinema-v3 .world-status small {
    display: none;
  }

  .cinema-v3 .tide-nav {
    display: none;
  }

  .cinema-v3 .dialogue {
    top: max(150px, calc(env(safe-area-inset-top) + 139px));
    right: 10px;
    bottom: auto;
    left: 10px;
    width: auto;
    max-height: min(25svh, 205px);
    padding: 12px 14px 13px;
  }

  .cinema-v3 .dialogue__meta strong {
    font-size: 14px;
  }

  .cinema-v3 .dialogue__body > p {
    font-size: 16px;
  }

  .cinema-v3 .story-input {
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 10px;
    width: auto;
    padding: 10px 11px 9px;
  }

  .cinema-v3 .story-input__heading strong {
    font-size: 12px;
  }

  .cinema-v3 .story-input__suggestions button {
    max-width: 210px;
  }

  .cinema-v3 .scene-chat-open {
    right: 12px;
    bottom: max(191px, calc(env(safe-area-inset-bottom) + 181px));
  }

  .cinema-v3 .scene-chat {
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 10px;
    width: auto;
    height: min(56svh, 480px);
    padding: 14px;
  }

  .cinema-v3 .game--chat-open .story-input,
  .cinema-v3 .game--chat-open .dialogue {
    display: none !important;
  }
}

@media (max-height: 690px) and (min-width: 821px) {
  .cinema-v3 .dialogue {
    max-height: 23svh;
  }

  .cinema-v3 .story-input {
    bottom: 16px;
  }

  .cinema-v3 .scene-chat,
  .cinema-v3 .scene-chat-open {
    bottom: 16px;
  }
}

/* Story briefing and in-world conversations */

.cinema-v3 .story-brief {
  position: fixed;
  z-index: 190;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 7vh 6vw;
  overflow: auto;
}

.cinema-v3 .story-brief[hidden] {
  display: none;
}

.cinema-v3 .story-brief__veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 22%, rgba(178, 140, 88, 0.13), transparent 34%),
    linear-gradient(105deg, rgba(2, 7, 9, 0.94) 18%, rgba(2, 8, 10, 0.72) 62%, rgba(2, 7, 9, 0.9));
  backdrop-filter: blur(13px) saturate(0.75);
}

.cinema-v3 .story-brief__card {
  position: relative;
  width: min(1120px, 92vw);
  padding: clamp(30px, 5vw, 62px);
  border: 1px solid rgba(232, 201, 143, 0.22);
  border-left-color: rgba(232, 201, 143, 0.66);
  background: linear-gradient(115deg, rgba(5, 13, 15, 0.84), rgba(7, 15, 16, 0.48));
  box-shadow: 0 36px 110px rgba(0, 0, 0, 0.42);
}

.cinema-v3 .story-brief h2 {
  max-width: 760px;
  margin: 10px 0 16px;
  font-family: var(--film-serif);
  font-size: clamp(38px, 6vw, 76px);
  font-weight: 500;
  line-height: 1.05;
}

.cinema-v3 .story-brief__lead {
  max-width: 760px;
  margin: 0;
  color: rgba(245, 238, 225, 0.76);
  font-size: clamp(15px, 1.45vw, 20px);
  line-height: 1.9;
}

.cinema-v3 .story-brief__portrait {
  position: absolute;
  top: 34px;
  right: 34px;
  width: 220px;
  margin: 0;
}

.cinema-v3 .story-brief__portrait img {
  display: block;
  width: 100%;
  height: 286px;
  border: 1px solid rgba(232, 201, 143, 0.28);
  object-fit: cover;
  object-position: center 30%;
  filter: saturate(0.82) contrast(1.03);
}

.cinema-v3 .story-brief__portrait figcaption {
  padding: 11px 2px 0;
}

.cinema-v3 .story-brief__portrait strong,
.cinema-v3 .story-brief__portrait span {
  display: block;
}

.cinema-v3 .story-brief__portrait strong {
  color: var(--film-gold);
  font-family: var(--film-serif);
  font-size: 16px;
  font-weight: 500;
}

.cinema-v3 .story-brief__portrait span {
  margin-top: 5px;
  color: rgba(245, 238, 225, 0.5);
  font-size: var(--meta-font-size);
  line-height: 1.55;
}

.cinema-v3 .story-brief__reason {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 24px;
  max-width: 760px;
  margin-top: 20px;
  padding: 17px 0;
  border-top: 1px solid rgba(245, 238, 225, 0.1);
  border-bottom: 1px solid rgba(245, 238, 225, 0.1);
}

.cinema-v3 .zhilan-presence {
  position: fixed;
  z-index: 52;
  top: max(94px, calc(env(safe-area-inset-top) + 80px));
  left: max(28px, calc(env(safe-area-inset-left) + 18px));
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  width: min(360px, calc(100vw - 56px));
  padding: 8px 11px 8px 8px;
  border: 1px solid rgba(232, 201, 143, 0.2);
  border-radius: 10px;
  background: rgba(2, 8, 10, 0.58);
  color: var(--film-ink);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(16px) saturate(0.78);
}

.cinema-v3 .zhilan-presence img {
  width: 46px;
  height: 46px;
  border-radius: 7px;
  object-fit: cover;
  object-position: center 24%;
}

.cinema-v3 .zhilan-presence div {
  min-width: 0;
}

.cinema-v3 .zhilan-presence span,
.cinema-v3 .zhilan-presence strong {
  display: block;
}

.cinema-v3 .zhilan-presence span {
  color: var(--film-gold);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.cinema-v3 .zhilan-presence strong {
  margin-top: 3px;
  overflow: hidden;
  color: rgba(245, 238, 225, 0.65);
  font-size: 11px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cinema-v3 .zhilan-presence b {
  color: rgba(232, 201, 143, 0.68);
  font-size: 10px;
  font-weight: 500;
}

.cinema-v3 .story-brief__reason strong,
.cinema-v3 .story-brief__route > strong {
  color: var(--film-gold);
  font-size: var(--meta-font-size);
  font-weight: 500;
  letter-spacing: 0.12em;
}

.cinema-v3 .story-brief__reason p {
  margin: 0;
  color: rgba(245, 238, 225, 0.69);
  font-size: var(--body-font-size);
  line-height: 1.8;
}

.cinema-v3 .story-brief__people {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: clamp(25px, 4vh, 42px) 0 22px;
  border-top: 1px solid rgba(245, 238, 225, 0.13);
  border-bottom: 1px solid rgba(245, 238, 225, 0.13);
}

.cinema-v3 .story-brief__people > div {
  min-height: 154px;
  padding: 21px 24px 20px 0;
}

.cinema-v3 .story-brief__people > div + div {
  padding-left: 24px;
  border-left: 1px solid rgba(245, 238, 225, 0.13);
}

.cinema-v3 .story-brief__people span,
.cinema-v3 .story-brief__people strong {
  display: block;
}

.cinema-v3 .story-brief__people span {
  margin-bottom: 10px;
  color: var(--film-gold);
  font-size: var(--meta-font-size);
  letter-spacing: 0.12em;
}

.cinema-v3 .story-brief__people strong {
  font-family: var(--film-serif);
  font-size: clamp(18px, 1.8vw, 24px);
  font-weight: 500;
}

.cinema-v3 .story-brief__people p,
.cinema-v3 .story-brief__goal {
  color: rgba(245, 238, 225, 0.58);
  font-size: var(--body-font-size);
  line-height: 1.75;
}

.cinema-v3 .story-brief__goal {
  max-width: 860px;
  margin: 0 0 24px;
}

.cinema-v3 .story-brief__goal strong {
  color: var(--film-ink);
}

.cinema-v3 .story-brief__route {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 24px;
  max-width: 990px;
  margin: 0 0 24px;
}

.cinema-v3 .story-brief__route ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cinema-v3 .story-brief__route li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 12px;
  color: rgba(245, 238, 225, 0.72);
  font-size: var(--body-font-size);
  line-height: 1.68;
}

.cinema-v3 .story-brief__route li span {
  color: rgba(232, 201, 143, 0.52);
  font-size: var(--meta-font-size);
  letter-spacing: 0.08em;
}

.cinema-v3 .scene-chat-open {
  position: fixed;
  z-index: 72;
  top: auto;
  right: max(28px, calc(env(safe-area-inset-right) + 18px));
  bottom: max(142px, calc(env(safe-area-inset-bottom) + 132px));
  min-width: 156px;
  padding: 11px 17px;
  border: 1px solid rgba(232, 201, 143, 0.28);
  border-radius: 999px;
  background: rgba(3, 10, 12, 0.48);
  color: var(--film-ink);
  text-align: left;
  backdrop-filter: blur(18px) saturate(0.8);
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, opacity 180ms ease;
}

.cinema-v3 .scene-chat-open:hover {
  border-color: rgba(232, 201, 143, 0.72);
  background: rgba(7, 16, 17, 0.72);
}

.cinema-v3 .scene-chat-open span,
.cinema-v3 .scene-chat-open strong {
  display: block;
}

.cinema-v3 .scene-chat-open span {
  color: rgba(245, 238, 225, 0.42);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.cinema-v3 .scene-chat-open strong {
  margin-top: 2px;
  font-family: var(--film-serif);
  font-size: 15px;
  font-weight: 500;
}

.cinema-v3 .scene-chat {
  position: fixed;
  z-index: 82;
  top: 94px;
  right: max(26px, calc(env(safe-area-inset-right) + 16px));
  bottom: 88px;
  display: flex;
  flex-direction: column;
  width: min(430px, calc(100vw - 48px));
  padding: 22px;
  border: 1px solid rgba(232, 201, 143, 0.26);
  background: linear-gradient(150deg, rgba(4, 12, 14, 0.88), rgba(4, 11, 13, 0.66));
  color: var(--film-ink);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(24px) saturate(0.74);
}

.cinema-v3 .scene-chat[hidden] {
  display: none;
}

.cinema-v3 .scene-chat__header,
.cinema-v3 .scene-chat__ask-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.cinema-v3 .scene-chat__header span {
  color: var(--film-gold);
  font-size: var(--meta-font-size);
  letter-spacing: 0.1em;
}

.cinema-v3 .scene-chat__header h2 {
  margin: 6px 0 0;
  font-family: var(--film-serif);
  font-size: 28px;
  font-weight: 500;
}

.cinema-v3 #scene-chat-close {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(245, 238, 225, 0.14);
  border-radius: 50%;
  background: transparent;
  color: rgba(245, 238, 225, 0.62);
  cursor: pointer;
}

.cinema-v3 .scene-chat__intro,
.cinema-v3 #scene-chat-note {
  color: rgba(245, 238, 225, 0.5);
  font-size: var(--meta-font-size);
  line-height: 1.7;
}

.cinema-v3 .scene-chat__intro {
  margin: 12px 0 15px;
}

.cinema-v3 .scene-chat__log {
  flex: 1;
  min-height: 120px;
  overflow-y: auto;
  padding: 2px 6px 6px 0;
  scrollbar-width: thin;
}

.cinema-v3 .scene-chat__empty,
.cinema-v3 .scene-chat__waiting {
  margin: 12px 0;
  color: rgba(245, 238, 225, 0.42);
  font-family: var(--film-serif);
  font-size: 15px;
  line-height: 1.7;
}

.cinema-v3 .scene-chat__turn {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(245, 238, 225, 0.1);
}

.cinema-v3 .scene-chat__turn p {
  margin: 0;
  font-size: var(--body-font-size);
  line-height: 1.75;
}

.cinema-v3 .scene-chat__question {
  color: rgba(245, 238, 225, 0.5);
}

.cinema-v3 .scene-chat__reply {
  margin-top: 7px !important;
  color: rgba(245, 238, 225, 0.9);
  font-family: var(--film-serif);
}

.cinema-v3 .scene-chat__ask {
  padding-top: 15px;
  border-top: 1px solid rgba(232, 201, 143, 0.2);
}

.cinema-v3 .scene-chat__ask-heading {
  color: rgba(245, 238, 225, 0.74);
  font-size: var(--meta-font-size);
}

.cinema-v3 .scene-chat__ask-heading span {
  color: var(--film-gold);
}

.cinema-v3 .scene-chat__prompts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 11px;
}

.cinema-v3 .scene-chat__prompt {
  min-height: 52px;
  padding: 9px 11px;
  border: 1px solid rgba(245, 238, 225, 0.13);
  border-radius: 3px;
  background: rgba(245, 238, 225, 0.035);
  color: rgba(245, 238, 225, 0.76);
  font-size: var(--meta-font-size);
  line-height: 1.45;
  text-align: left;
  cursor: pointer;
}

.cinema-v3 .scene-chat__prompt:hover:not(:disabled) {
  border-color: rgba(232, 201, 143, 0.58);
  color: var(--film-gold);
}

.cinema-v3 .scene-chat__prompt:disabled {
  color: rgba(245, 238, 225, 0.28);
  cursor: default;
}

.cinema-v3 .scene-chat__free-form {
  margin-top: 11px;
  padding-top: 11px;
  border-top: 1px solid rgba(245, 238, 225, 0.1);
}

.cinema-v3 .scene-chat__free-form label {
  display: block;
  margin-bottom: 7px;
  color: rgba(245, 238, 225, 0.66);
  font-size: var(--meta-font-size);
}

.cinema-v3 .scene-chat__free-form > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.cinema-v3 #scene-chat-free-input {
  min-width: 0;
  height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(245, 238, 225, 0.14);
  border-radius: 4px;
  outline: none;
  background: rgba(1, 7, 9, 0.48);
  color: var(--film-ink);
  font: inherit;
  font-size: var(--body-font-size);
}

.cinema-v3 #scene-chat-free-input:focus {
  border-color: rgba(232, 201, 143, 0.64);
  box-shadow: 0 0 0 2px rgba(232, 201, 143, 0.08);
}

.cinema-v3 #scene-chat-free-send {
  min-width: 70px;
  border: 1px solid rgba(232, 201, 143, 0.34);
  border-radius: 999px;
  background: rgba(232, 201, 143, 0.08);
  color: var(--film-gold);
  cursor: pointer;
}

.cinema-v3 #scene-chat-free-send:disabled,
.cinema-v3 #scene-chat-free-input:disabled {
  opacity: 0.42;
  cursor: default;
}

.cinema-v3 #scene-chat-free-help {
  min-height: 1.5em;
  margin: 7px 0 0;
  color: rgba(245, 238, 225, 0.42);
  font-size: var(--meta-font-size);
  line-height: 1.5;
}

.cinema-v3 #scene-chat-free-help.scene-chat__help--error {
  color: #e5ad99;
}

.cinema-v3 #scene-chat-note {
  display: block;
  margin-top: 11px;
}

/* Keep the historical listening room readable without horizontal card strips. */

.cinema-v3 .echo__content {
  width: min(1240px, 92vw);
  max-height: 84vh;
}

.cinema-v3 .echo__workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
  gap: 26px;
}

.cinema-v3 .echo__library,
.cinema-v3 .echo__composer {
  min-width: 0;
}

.cinema-v3 .echo__composer {
  padding-left: 26px;
  border-left: 1px solid rgba(245, 238, 225, 0.13);
}

.cinema-v3 .echo-step-heading {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}

.cinema-v3 .echo-step-heading span,
.cinema-v3 .echo-step-heading em {
  color: rgba(245, 238, 225, 0.42);
  font-size: var(--meta-font-size);
  font-style: normal;
}

.cinema-v3 .echo-step-heading em {
  margin-left: auto;
  color: var(--film-gold);
}

.cinema-v3 .echo__sources {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-flow: row;
  grid-auto-columns: auto;
  gap: 8px;
  max-height: 52vh;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 8px 6px 8px 0;
  border: 0;
}

.cinema-v3 .echo-source {
  min-height: 132px;
  border: 1px solid rgba(245, 238, 225, 0.11);
  border-radius: 3px;
}

.cinema-v3 .echo-source small {
  font-size: var(--meta-font-size);
}

@media (max-width: 820px) {
  .cinema-v3 .story-brief {
    place-items: start center;
    padding: 76px 16px 38px;
  }

  .cinema-v3 .story-brief__card {
    width: 100%;
    padding: 25px 21px;
  }

  .cinema-v3 .story-brief__portrait {
    position: static;
    width: 100%;
    margin: 20px 0 4px;
  }

  .cinema-v3 .story-brief__portrait img {
    height: min(48vh, 430px);
    object-position: center 28%;
  }

  .cinema-v3 .story-brief__people {
    display: block;
  }

  .cinema-v3 .story-brief__people > div {
    min-height: 0;
    padding: 16px 0;
  }

  .cinema-v3 .story-brief__people > div + div {
    padding-left: 0;
    border-top: 1px solid rgba(245, 238, 225, 0.1);
    border-left: 0;
  }

  .cinema-v3 .story-brief__reason,
  .cinema-v3 .story-brief__route {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .cinema-v3 .story-brief__reason {
    margin-top: 16px;
  }

  .cinema-v3 .story-brief__route {
    margin-top: 4px;
  }

  .cinema-v3 .toast {
    top: max(72px, calc(env(safe-area-inset-top) + 60px));
    right: 14px;
    left: 14px;
    width: fit-content;
    max-width: calc(100vw - 28px);
  }

  .cinema-v3 .scene-chat-open {
    top: auto;
    right: 15px;
    bottom: max(132px, calc(env(safe-area-inset-bottom) + 122px));
  }

  .cinema-v3 .zhilan-presence {
    top: max(70px, calc(env(safe-area-inset-top) + 58px));
    left: 14px;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    width: min(330px, calc(100vw - 28px));
  }

  .cinema-v3 .zhilan-presence img {
    width: 38px;
    height: 38px;
  }

  .cinema-v3 .scene-chat {
    top: auto;
    right: 10px;
    bottom: max(64px, calc(env(safe-area-inset-bottom) + 54px));
    left: 10px;
    width: auto;
    max-height: min(68vh, 650px);
    padding: 18px;
  }

  .cinema-v3 .echo__workspace {
    display: block;
  }

  .cinema-v3 .echo__composer {
    margin-top: 18px;
    padding: 18px 0 0;
    border-top: 1px solid rgba(245, 238, 225, 0.13);
    border-left: 0;
  }

  .cinema-v3 .echo__sources {
    grid-template-columns: 1fr;
    max-height: 32vh;
  }

  .cinema-v3 .echo-source {
    min-height: 110px;
  }
}

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

  .cinema-v3 .intro__video,
  .cinema-v3 .scene__video {
    display: none !important;
  }
}

/* Player-led interaction: one clear speaker, one clear story, one input dock. */

.cinema-v3 .world-status {
  top: max(164px, calc(env(safe-area-inset-top) + 150px));
  width: min(380px, calc(100vw - 56px));
  align-items: flex-start;
  padding: 10px 13px;
  border-left: 2px solid rgba(232, 201, 143, 0.55);
  background: linear-gradient(90deg, rgba(2, 8, 10, 0.68), rgba(2, 8, 10, 0.12));
  backdrop-filter: blur(10px);
}

.cinema-v3 .world-status .live-dot {
  margin-top: 6px;
}

.cinema-v3 .world-status strong {
  color: var(--film-gold);
  font-family: var(--film-serif);
  font-size: 15px;
  letter-spacing: 0.04em;
}

.cinema-v3 .world-status small {
  margin-top: 5px;
  color: rgba(245, 238, 225, 0.72);
  font-size: 13px;
  letter-spacing: 0.02em;
  line-height: 1.55;
}

.cinema-v3 .zhilan-presence {
  top: max(88px, calc(env(safe-area-inset-top) + 74px));
}

.cinema-v3 .dialogue {
  bottom: max(224px, calc(env(safe-area-inset-bottom) + 208px));
}

.cinema-v3 .dialogue__meta strong {
  font-family: var(--film-serif);
  font-size: 15px;
  letter-spacing: 0.04em;
}

.cinema-v3 .dialogue__meta span {
  color: rgba(245, 238, 225, 0.62);
  font-size: 10px;
}

.cinema-v3 .dialogue[data-speaker="zhilan"] {
  border-left-color: rgba(151, 196, 209, 0.82);
}

.cinema-v3 .dialogue[data-speaker="zhilan"] .dialogue__meta strong {
  color: #b8d9df;
}

.cinema-v3 .dialogue[data-speaker="guizhi"] {
  border-left-color: rgba(157, 193, 155, 0.78);
}

.cinema-v3 .dialogue[data-speaker="guizhi"] .dialogue__meta strong {
  color: #c5dfbd;
}

.cinema-v3 .dialogue__choices,
.cinema-v3 .continue-button {
  display: none !important;
}

.cinema-v3 .story-input {
  position: fixed;
  z-index: 71;
  bottom: max(64px, calc(env(safe-area-inset-bottom) + 52px));
  left: max(32px, calc(env(safe-area-inset-left) + 20px));
  width: min(690px, 62vw);
  padding: 13px 15px 12px;
  border: 1px solid rgba(232, 201, 143, 0.28);
  border-left: 2px solid rgba(232, 201, 143, 0.72);
  border-radius: 10px;
  background: linear-gradient(120deg, rgba(2, 8, 10, 0.88), rgba(2, 8, 10, 0.62));
  color: var(--film-ink);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(22px) saturate(0.78);
}

.cinema-v3 .story-input[hidden] {
  display: none;
}

.cinema-v3 .story-input__heading {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.cinema-v3 .story-input__heading span,
.cinema-v3 .story-input__heading strong {
  display: block;
}

.cinema-v3 .story-input__heading span {
  color: var(--film-gold);
  font-size: 11px;
  letter-spacing: 0.1em;
}

.cinema-v3 .story-input__heading strong {
  margin-top: 2px;
  color: rgba(245, 238, 225, 0.78);
  font-family: var(--film-serif);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
}

.cinema-v3 #objective-action {
  position: static;
  flex: 0 0 auto;
  min-height: 38px;
  margin: 0;
  padding: 0 15px;
  border: 1px solid rgba(232, 201, 143, 0.48);
  border-radius: 999px;
  background: rgba(232, 201, 143, 0.1);
  color: var(--film-gold);
  font-size: 11px;
  backdrop-filter: none;
}

.cinema-v3 .story-input__suggestions {
  display: flex;
  gap: 7px;
  margin-top: 9px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.cinema-v3 .story-input__suggestions:empty {
  display: none;
}

.cinema-v3 .story-input__suggestions button {
  flex: 0 0 auto;
  min-height: 38px;
  max-width: 310px;
  padding: 6px 11px;
  border: 1px solid rgba(245, 238, 225, 0.14);
  border-radius: 999px;
  background: rgba(245, 238, 225, 0.045);
  color: rgba(245, 238, 225, 0.8);
  cursor: pointer;
  font-size: 12.5px;
  line-height: 1.35;
  text-align: left;
}

.cinema-v3 .story-input__suggestions button:hover {
  border-color: rgba(232, 201, 143, 0.62);
  color: var(--film-gold);
}

.cinema-v3 .story-input__form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 9px;
}

.cinema-v3 #story-input-field {
  min-width: 0;
  height: 43px;
  padding: 0 13px;
  border: 1px solid rgba(245, 238, 225, 0.18);
  border-radius: 6px;
  outline: none;
  background: rgba(1, 6, 8, 0.58);
  color: var(--film-ink);
  font: inherit;
  font-size: 14px;
}

.cinema-v3 #story-input-field:focus {
  border-color: rgba(232, 201, 143, 0.7);
  box-shadow: 0 0 0 2px rgba(232, 201, 143, 0.09);
}

.cinema-v3 #story-input-send {
  min-width: 126px;
  border: 1px solid rgba(232, 201, 143, 0.46);
  border-radius: 999px;
  background: rgba(232, 201, 143, 0.1);
  color: var(--film-gold);
  cursor: pointer;
  font-size: 12px;
}

.cinema-v3 #story-input-send:disabled,
.cinema-v3 #story-input-field:disabled {
  opacity: 0.48;
  cursor: wait;
}

.cinema-v3 #story-input-feedback {
  min-height: 1.4em;
  margin: 6px 2px 0;
  color: rgba(245, 238, 225, 0.48);
  font-size: 11.5px;
  line-height: 1.4;
}

.cinema-v3 #story-input-feedback.story-input__feedback--error {
  color: #e5ad99;
}

.cinema-v3 .echo-source {
  min-height: 164px;
  padding: 22px 20px;
  border-width: 1px;
  background: rgba(2, 8, 10, 0.42);
}

.cinema-v3 .echo-source span {
  font-size: 11px;
  letter-spacing: 0.08em;
}

.cinema-v3 .echo-source strong {
  margin-top: 11px;
  font-family: var(--film-serif);
  font-size: clamp(17px, 1.45vw, 21px);
  font-weight: 500;
  line-height: 1.45;
}

.cinema-v3 .echo-source small {
  margin-top: 10px;
  color: rgba(245, 238, 225, 0.58);
  font-size: 12px;
  line-height: 1.5;
}

.cinema-v3 .echo-source--selected {
  border-color: rgba(232, 201, 143, 0.72);
  box-shadow: inset 0 0 0 1px rgba(232, 201, 143, 0.22);
}

.cinema-v3 .history-interlude__sources a {
  min-height: 76px;
  padding: 15px 17px;
  border: 1px solid rgba(245, 238, 225, 0.15);
  border-radius: 6px;
  background: rgba(2, 8, 10, 0.44);
}

.cinema-v3 .history-interlude__sources a span {
  font-size: 11px;
}

.cinema-v3 .history-interlude__sources a strong {
  margin-top: 7px;
  font-family: var(--film-serif);
  font-size: 18px;
  line-height: 1.4;
}

.cinema-v3 .ending-reset-button {
  border-color: rgba(211, 145, 126, 0.28) !important;
  color: rgba(235, 186, 173, 0.72) !important;
}

.cinema-v3 .ending-reset-button--armed {
  border-color: rgba(224, 131, 108, 0.72) !important;
  background: rgba(152, 62, 46, 0.2) !important;
  color: #f0b2a2 !important;
}

@media (max-width: 820px) {
  .cinema-v3 .zhilan-presence {
    top: max(68px, calc(env(safe-area-inset-top) + 56px));
  }

  .cinema-v3 .world-status {
    top: max(128px, calc(env(safe-area-inset-top) + 116px));
    left: 14px;
    width: min(340px, calc(100vw - 28px));
  }

  .cinema-v3 .world-status strong {
    font-size: 14px;
  }

  .cinema-v3 .world-status small {
    font-size: 11px;
  }

  .cinema-v3 .story-input {
    right: 10px;
    bottom: max(50px, calc(env(safe-area-inset-bottom) + 42px));
    left: 10px;
    width: auto;
    padding: 11px 12px 10px;
  }

  .cinema-v3 .story-input__heading strong {
    max-width: none;
    white-space: normal;
  }

  .cinema-v3 .story-input__suggestions {
    margin-top: 7px;
  }

  .cinema-v3 .story-input__form {
    grid-template-columns: minmax(0, 1fr) 96px;
    margin-top: 7px;
  }

  .cinema-v3 #story-input-send {
    min-width: 0;
  }

  .cinema-v3 #story-input-feedback {
    white-space: normal;
  }

  .cinema-v3 .dialogue {
    bottom: max(244px, calc(env(safe-area-inset-bottom) + 230px));
    max-height: min(28svh, 230px);
  }

  .cinema-v3 .scene-chat-open {
    bottom: max(224px, calc(env(safe-area-inset-bottom) + 210px));
  }

  .cinema-v3 .echo-source {
    min-height: 150px;
    padding: 18px 16px;
  }
}

/* Final cascade · keep the four interaction zones stable after legacy overrides. */

.cinema-v3 .hotspot {
  opacity: 0;
  pointer-events: none;
}

.cinema-v3 .zhilan-presence,
.cinema-v3 .objective {
  display: none !important;
}

.cinema-v3 .story-dock {
  display: contents;
}

.cinema-v3 .dialogue {
  top: max(82px, calc(env(safe-area-inset-top) + 70px));
  right: auto;
  bottom: auto;
  left: max(28px, calc(env(safe-area-inset-left) + 18px));
  width: min(570px, 43vw);
  max-height: min(27svh, 230px);
}

.cinema-v3 .dialogue--hidden,
.cinema-v3 .dialogue--chat-paused {
  display: none;
}

.cinema-v3 .dialogue-toggle,
.cinema-v3 .dialogue__choices,
.cinema-v3 .continue-button {
  display: none !important;
}

.cinema-v3 .scene-caption {
  top: max(82px, calc(env(safe-area-inset-top) + 70px));
  right: max(28px, calc(env(safe-area-inset-right) + 18px));
  bottom: auto;
}

.cinema-v3 .world-status {
  top: max(134px, calc(env(safe-area-inset-top) + 122px));
  right: max(28px, calc(env(safe-area-inset-right) + 18px));
  left: auto;
  width: min(390px, 36vw);
  justify-content: flex-end;
  border-right: 2px solid rgba(232, 201, 143, 0.55);
  border-left: 0;
  text-align: right;
}

.cinema-v3 .tide-nav {
  top: max(201px, calc(env(safe-area-inset-top) + 189px));
  right: max(28px, calc(env(safe-area-inset-right) + 18px));
  bottom: auto;
  left: auto;
  width: min(365px, 34vw);
  transform: none;
}

.cinema-v3 .story-input {
  right: auto;
  bottom: max(28px, calc(env(safe-area-inset-bottom) + 18px));
  left: max(28px, calc(env(safe-area-inset-left) + 18px));
  width: min(590px, 45vw);
  padding: 11px 13px 10px;
}

.cinema-v3 .story-input__suggestions button {
  min-height: 30px;
  max-width: 245px;
  padding: 4px 10px;
  font-size: 11px;
  white-space: nowrap;
}

.cinema-v3 .story-input__form {
  grid-template-columns: minmax(0, 1fr) 62px;
  margin-top: 7px;
}

.cinema-v3 #story-input-send {
  min-width: 0;
}

.cinema-v3 #story-input-feedback {
  max-height: 3.15em;
  overflow-y: auto;
  white-space: pre-line;
}

.cinema-v3 .scene-chat-open {
  right: max(28px, calc(env(safe-area-inset-right) + 18px));
  bottom: max(28px, calc(env(safe-area-inset-bottom) + 18px));
}

/* Completion review: history → choices → ending → achievement. */

.cinema-v3 .ending {
  align-items: center;
  justify-content: center;
  padding: max(72px, 8vh) max(24px, 5vw) max(28px, 4vh);
  overflow-y: auto;
  background:
    linear-gradient(120deg, rgba(2, 7, 9, 0.94), rgba(2, 7, 9, 0.52)),
    url("../assets/images/cinematic/bg-outside-2026-v2.webp") center / cover no-repeat;
}

.cinema-v3 .ending__content {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(1060px, 92vw);
  height: min(780px, 84svh);
  padding: 28px 32px 24px;
  border: 1px solid rgba(232, 201, 143, 0.2);
  border-radius: 14px;
  background: rgba(2, 8, 10, 0.72);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(24px) saturate(0.76);
}

.cinema-v3 .ending-review__progress {
  display: flex;
  gap: 8px 22px;
  padding-right: 245px;
  border-bottom: 1px solid rgba(245, 238, 225, 0.11);
}

.cinema-v3 .ending-review__progress span {
  padding: 0 0 13px;
  color: rgba(245, 238, 225, 0.34);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.cinema-v3 .ending-review__progress .ending-review__dot--active {
  border-bottom: 1px solid var(--film-gold);
  color: var(--film-gold);
}

.cinema-v3 .ending-review__progress .ending-review__dot--done {
  color: rgba(245, 238, 225, 0.68);
}

.cinema-v3 .ending-review__archive {
  position: absolute;
  z-index: 2;
  top: 18px;
  right: 24px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(232, 201, 143, 0.56);
  border-radius: 999px;
  background: rgba(232, 201, 143, 0.1);
  color: var(--film-gold);
  cursor: pointer;
  font-size: 12px;
}

.cinema-v3 .ending-review__step {
  min-height: 0;
  padding: 28px 4px 18px;
  overflow-y: auto;
}

.cinema-v3 .ending-review__step[hidden] {
  display: none !important;
}

.cinema-v3 .ending-review__step h2 {
  max-width: 880px;
  margin: 8px 0 20px;
  font-size: clamp(30px, 4vw, 50px);
  line-height: 1.15;
}

.cinema-v3 .ending-history-timeline,
.cinema-v3 .ending-choice-recap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cinema-v3 .ending-history-timeline li,
.cinema-v3 .ending-choice-recap li {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 14px;
  padding: 15px 16px;
  border: 1px solid rgba(245, 238, 225, 0.1);
  border-radius: 8px;
  background: rgba(245, 238, 225, 0.035);
}

.cinema-v3 .ending-history-timeline li > span,
.cinema-v3 .ending-choice-recap li > span {
  color: var(--film-gold);
  font-family: var(--film-serif);
  font-size: 14px;
}

.cinema-v3 .ending-history-timeline strong,
.cinema-v3 .ending-choice-recap strong {
  display: block;
  font-family: var(--film-serif);
  font-size: 16px;
  font-weight: 500;
}

.cinema-v3 .ending-history-timeline p,
.cinema-v3 .ending-choice-recap p {
  margin: 6px 0 0;
  color: rgba(245, 238, 225, 0.58);
  font-size: 12px;
  line-height: 1.55;
}

.cinema-v3 .ending-history-timeline button {
  margin-top: 9px;
  padding: 5px 0;
  border: 0;
  border-bottom: 1px solid rgba(232, 201, 143, 0.4);
  background: transparent;
  color: var(--film-gold);
  cursor: pointer;
  font-size: 10px;
}

.cinema-v3 .ending-choice-impact {
  max-width: 850px !important;
  margin: 18px 0 0 !important;
  padding: 13px 16px;
  border-left: 2px solid var(--film-gold);
  background: rgba(232, 201, 143, 0.07);
  color: rgba(245, 238, 225, 0.82) !important;
  font-size: 15px !important;
  line-height: 1.6 !important;
}

.cinema-v3 #ending-step-result {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.cinema-v3 #ending-step-result[hidden] {
  display: none !important;
}

.cinema-v3 #ending-step-result h2 {
  max-width: 920px;
  font-size: clamp(46px, 7vw, 86px);
}

.cinema-v3 #ending-step-result > p:not(.ending__progress) {
  max-width: 720px;
  margin: 18px 0 0;
  color: rgba(245, 238, 225, 0.7);
  font-family: var(--film-serif);
  font-size: clamp(16px, 1.7vw, 22px);
  line-height: 1.7;
}

.cinema-v3 .ending-achievement {
  text-align: center;
}

.cinema-v3 .ending-achievement > p:first-of-type {
  margin: 46px 0 0;
  color: var(--film-gold);
  font-size: 14px;
  letter-spacing: 0.24em;
}

.cinema-v3 .ending-achievement h2 {
  margin: 12px auto 18px;
  font-size: clamp(50px, 7vw, 88px);
}

.cinema-v3 .ending-achievement > p:not(:first-of-type) {
  max-width: 680px;
  margin: 0 auto;
  color: rgba(245, 238, 225, 0.68);
  font-size: 16px;
  line-height: 1.7;
}

.cinema-v3 .ending-achievement .ending__actions {
  justify-content: center;
  margin-top: 34px;
}

.cinema-v3 .ending-review__navigation {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 14px;
  border-top: 1px solid rgba(245, 238, 225, 0.11);
}

.cinema-v3 .ending-review__navigation button {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(245, 238, 225, 0.16);
  border-radius: 999px;
  background: rgba(245, 238, 225, 0.05);
  color: rgba(245, 238, 225, 0.76);
  cursor: pointer;
}

.cinema-v3 #ending-review-next {
  border-color: rgba(232, 201, 143, 0.52);
  color: var(--film-gold);
}

.cinema-v3 #archive-button {
  border-color: rgba(232, 201, 143, 0.5);
  background: rgba(232, 201, 143, 0.09);
  color: var(--film-gold);
}

@media (max-width: 820px) {
  .cinema-v3 .dialogue {
    top: max(150px, calc(env(safe-area-inset-top) + 139px));
    right: 10px;
    bottom: auto;
    left: 10px;
    width: auto;
  }

  .cinema-v3 .world-status {
    top: max(111px, calc(env(safe-area-inset-top) + 100px));
    right: 12px;
    left: auto;
    width: min(270px, calc(100vw - 24px));
  }

  .cinema-v3 .tide-nav {
    display: none;
  }

  .cinema-v3 .story-input {
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 10px;
    width: auto;
  }

  .cinema-v3 .scene-chat-open {
    right: 12px;
    bottom: max(191px, calc(env(safe-area-inset-bottom) + 181px));
  }

  .cinema-v3 .game--chat-open .story-input,
  .cinema-v3 .game--chat-open .dialogue {
    display: none !important;
  }

  .cinema-v3 .ending {
    align-items: flex-start;
    padding: 68px 10px 10px;
  }

  .cinema-v3 .ending__content {
    width: 100%;
    height: calc(100svh - 80px);
    padding: 18px 14px 14px;
  }

  .cinema-v3 .ending-review__progress {
    gap: 8px 12px;
    padding: 0 0 54px;
  }

  .cinema-v3 .ending-review__progress span {
    font-size: 8px;
  }

  .cinema-v3 .ending-review__archive {
    top: 49px;
    right: 14px;
    left: 14px;
  }

  .cinema-v3 .ending-review__step {
    padding-top: 18px;
  }

  .cinema-v3 .ending-review__step h2 {
    font-size: 30px;
  }

  .cinema-v3 .ending-history-timeline,
  .cinema-v3 .ending-choice-recap {
    grid-template-columns: 1fr;
  }

  .cinema-v3 .ending-history-timeline li,
  .cinema-v3 .ending-choice-recap li {
    grid-template-columns: 68px minmax(0, 1fr);
    padding: 12px;
  }

  .cinema-v3 #ending-step-result h2,
  .cinema-v3 .ending-achievement h2 {
    font-size: 44px;
  }
}

/* History appears as a compact glass card over the living scene, not a slide. */
.cinema-v3 .history-interlude {
  align-items: center;
  justify-content: flex-end;
  padding: 88px max(4vw, 28px) 56px;
}

.cinema-v3 .history-interlude__veil {
  background: linear-gradient(90deg, rgba(2, 8, 10, 0.08) 0%, rgba(2, 8, 10, 0.32) 48%, rgba(2, 8, 10, 0.82) 100%);
  backdrop-filter: blur(2px) saturate(0.82);
}

.cinema-v3 .history-interlude__sheet {
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 18px;
  width: min(590px, 47vw);
  max-height: calc(100svh - 144px);
  margin: 0;
  padding: 24px;
  overflow: auto;
  border: 1px solid rgba(245, 238, 225, 0.16);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(8, 16, 18, 0.82), rgba(4, 10, 12, 0.68));
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(24px) saturate(1.08);
}

.cinema-v3 .history-interlude h2 {
  font-size: clamp(25px, 2.4vw, 38px);
  line-height: 1.22;
}

.cinema-v3 .history-interlude__body > p {
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.7;
}

.cinema-v3 .history-interlude__sources {
  gap: 8px;
  margin-top: 15px;
}

.cinema-v3 .history-interlude__sources a {
  min-height: 0;
  padding: 10px 12px;
}

.cinema-v3 .history-interlude__sources a strong {
  margin-top: 4px;
  font-size: 14px;
}

.cinema-v3 .history-interlude .quiet-action {
  min-height: 42px;
  margin-top: 18px;
}

@media (max-width: 820px) {
  .cinema-v3 .history-interlude {
    align-items: flex-end;
    padding: 72px 10px 10px;
  }

  .cinema-v3 .history-interlude__veil {
    background: linear-gradient(180deg, rgba(2, 8, 10, 0.08), rgba(2, 8, 10, 0.82) 48%);
  }

  .cinema-v3 .history-interlude__sheet {
    grid-template-columns: 1fr;
    gap: 12px;
    width: 100%;
    max-height: min(72svh, 680px);
    margin: 0;
    padding: 18px;
  }

  .cinema-v3 .history-interlude__index {
    padding: 0 0 9px;
    border-right: 0;
    border-bottom: 1px solid rgba(232, 201, 143, 0.25);
  }
}

/* Final override · manual story pacing in the top-left subtitle card. */
.cinema-v3 .dialogue {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 12px;
}

.cinema-v3 .dialogue.dialogue--hidden,
.cinema-v3 .dialogue.dialogue--chat-paused {
  display: none;
}

.cinema-v3 .dialogue__body {
  grid-column: 1 / -1;
}

.cinema-v3 .dialogue .continue-button {
  display: inline-flex !important;
  grid-column: 2;
  align-items: center;
  justify-content: center;
  justify-self: end;
  min-width: 104px;
  min-height: 34px;
  margin-top: 10px;
  padding: 0 14px;
  border: 1px solid rgba(232, 201, 143, 0.45);
  border-radius: 999px;
  background: rgba(232, 201, 143, 0.09);
  color: var(--film-gold);
  font-size: 12px;
  letter-spacing: 0.05em;
}

.cinema-v3 .dialogue .continue-button:hover,
.cinema-v3 .dialogue .continue-button:focus-visible {
  border-color: rgba(232, 201, 143, 0.82);
  background: rgba(232, 201, 143, 0.16);
}

.cinema-v3 .dialogue .continue-button[hidden],
.cinema-v3 .dialogue--hidden .continue-button,
.cinema-v3 .dialogue--chat-paused .continue-button,
.cinema-v3 .dialogue--minimized .continue-button {
  display: none !important;
}

@media (max-width: 820px) {
  .cinema-v3 .dialogue .continue-button {
    min-height: 38px;
    margin-top: 8px;
  }
}

/* Readability pass · choices and character replies are primary gameplay text. */
.cinema-v3 .story-input__suggestions {
  align-items: stretch;
  gap: 9px;
}

.cinema-v3 .story-input__suggestions button {
  min-height: 46px;
  max-width: 340px;
  padding: 9px 15px;
  font-size: 14px;
  font-weight: 520;
  line-height: 1.42;
  white-space: normal;
}

.cinema-v3 #story-input-feedback {
  min-height: 1.55em;
  max-height: 5.1em;
  margin-top: 8px;
  color: rgba(245, 238, 225, 0.8);
  font-size: 14px;
  line-height: 1.55;
}

.cinema-v3 .scene-chat__question {
  font-size: 14px !important;
  line-height: 1.6 !important;
}

.cinema-v3 .scene-chat__reply {
  margin-top: 8px !important;
  color: rgba(250, 244, 232, 0.96);
  font-size: 17px !important;
  line-height: 1.68 !important;
}

@media (max-width: 820px) {
  .cinema-v3 .story-input__suggestions button {
    min-height: 48px;
    max-width: min(78vw, 330px);
    font-size: 14px;
  }

  .cinema-v3 #story-input-feedback {
    font-size: 13.5px;
  }

  .cinema-v3 .scene-chat__reply {
    font-size: 16.5px !important;
  }
}

/* Keep the play-loop components above all earlier archive overrides. */
.cinema-v3 #archive-panel.side-panel--over-game {
  z-index: 290;
}

.cinema-v3 #archive-panel .archive-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.cinema-v3 #archive-panel .archive-card {
  display: grid;
  min-height: 185px;
  padding: 16px;
  border: 1px solid rgba(242, 222, 183, 0.15);
  border-radius: 15px;
  background-position: center;
  background-size: cover;
}

.cinema-v3 #archive-panel .archive-card p {
  color: rgba(248, 241, 228, 0.68);
  font-size: 11px;
  line-height: 1.5;
}

@media (max-width: 760px) {
  .cinema-v3 #archive-panel .archive-list {
    grid-template-columns: 1fr;
  }

  .cinema-v3 #archive-panel .archive-card {
    min-height: 150px;
  }
}

/* Visual minigames v12 · photographic props inside the same cinematic world. */
.cinema-v3 .minigame-layer[data-visual-ui="v2"] {
  --visual-accent: #d8bb82;
  --visual-ink: #f3ecde;
  --visual-muted: rgba(236, 231, 219, 0.58);
  --visual-line: rgba(225, 204, 164, 0.2);
}

.cinema-v3 .minigame-layer[data-visual-ui="v2"] .minigame-shell {
  isolation: isolate;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  width: min(1120px, 96vw);
  max-height: calc(100dvh - 40px);
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(7, 24, 29, 0.91), rgba(4, 13, 17, 0.78)),
    radial-gradient(circle at 72% 18%, rgba(216, 187, 130, 0.06), transparent 38%);
}

.cinema-v3 .minigame-layer[data-visual-ui="v2"] .minigame-stage {
  min-height: 0;
  align-content: stretch;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.cinema-v3 .minigame-layer[data-minigame-id="storm_shelter"] { --visual-accent: #9fb9bd; }
.cinema-v3 .minigame-layer[data-minigame-id="home_rebuild"],
.cinema-v3 .minigame-layer[data-minigame-id="ginger_soup"] { --visual-accent: #c2a27e; }
.cinema-v3 .minigame-layer[data-minigame-id="weather_reading"] { --visual-accent: #9eb9aa; }

.cinema-v3 .visual-game {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 16px;
  min-height: 100%;
}

.cinema-v3 .visual-instruction {
  display: grid;
  gap: 4px;
  max-width: 760px;
  color: var(--visual-muted);
  font-size: 13px;
  line-height: 1.6;
}

.cinema-v3 .visual-instruction strong {
  color: var(--visual-ink);
  font-family: var(--film-serif);
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 500;
}

.cinema-v3 .visual-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 13px;
  min-height: 390px;
}

.cinema-v3 .visual-scene {
  position: relative;
  isolation: isolate;
  min-height: 330px;
  overflow: hidden;
  border: 1px solid var(--visual-line);
  border-radius: 20px;
  background:
    linear-gradient(150deg, rgba(20, 35, 37, 0.5), rgba(4, 14, 18, 0.72)),
    repeating-linear-gradient(96deg, rgba(222, 202, 165, 0.025) 0 1px, transparent 1px 13px);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.035), 0 22px 55px rgba(0, 0, 0, 0.28);
}

.cinema-v3 .visual-tray {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  min-height: 64px;
  padding: 10px;
  border: 1px solid rgba(225, 204, 164, 0.12);
  border-radius: 15px;
  background: rgba(3, 12, 15, 0.5);
}

.cinema-v3 .visual-piece,
.cinema-v3 .visual-letter,
.cinema-v3 .visual-mailbox {
  position: relative;
  min-width: 54px;
  min-height: 54px;
  border: 1px solid rgba(232, 220, 197, 0.18);
  border-radius: 11px;
  background:
    var(--prop-image, none) center / contain no-repeat,
    linear-gradient(145deg, rgba(91, 78, 61, 0.2), rgba(21, 31, 31, 0.66));
  color: var(--visual-ink);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
  cursor: grab;
  touch-action: none;
  user-select: none;
  transition: border-color 150ms ease, box-shadow 150ms ease, opacity 150ms ease, transform 150ms ease;
}

.cinema-v3 .visual-piece > span,
.cinema-v3 .visual-letter > span,
.cinema-v3 .visual-mailbox > span {
  display: block;
  color: rgba(244, 236, 220, 0.86);
  font-family: var(--film-serif);
  font-size: 12px;
  line-height: 1.25;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

.cinema-v3 .visual-piece:focus-visible,
.cinema-v3 .visual-letter:focus-visible,
.cinema-v3 .visual-mailbox:focus-visible,
.cinema-v3 .visual-outcome:focus-visible,
.cinema-v3 .visual-target:focus-visible {
  outline: 2px solid var(--visual-accent);
  outline-offset: 3px;
}

.cinema-v3 .visual-piece.is-selected,
.cinema-v3 .visual-letter.is-selected {
  border-color: var(--visual-accent);
  box-shadow: 0 0 0 3px rgba(216, 187, 130, 0.1), 0 12px 28px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

.cinema-v3 .visual-piece.is-dragging {
  z-index: 8;
  opacity: 0.78;
  cursor: grabbing;
  transform: scale(1.025);
}

.cinema-v3 .visual-piece.is-placed,
.cinema-v3 .visual-piece.is-correct {
  border-color: rgba(168, 197, 180, 0.68);
  box-shadow: inset 0 0 0 1px rgba(168, 197, 180, 0.18);
}

.cinema-v3 .visual-target {
  position: relative;
  min-width: 54px;
  min-height: 54px;
  border: 1px dashed rgba(216, 187, 130, 0.28);
  border-radius: 12px;
  background: rgba(216, 187, 130, 0.025);
  color: rgba(244, 236, 220, 0.58);
  transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.cinema-v3 .visual-target.is-valid-target,
.cinema-v3 .visual-target.is-hint {
  border-color: rgba(216, 187, 130, 0.78);
  background: rgba(216, 187, 130, 0.08);
  box-shadow: 0 0 0 4px rgba(216, 187, 130, 0.055);
  animation: visual-soft-pulse 1.35s ease-in-out infinite;
}

.cinema-v3 .visual-target.is-filled {
  border-style: solid;
  border-color: rgba(168, 197, 180, 0.58);
  background: rgba(130, 165, 146, 0.07);
}

.cinema-v3 .visual-target.is-wrong,
.cinema-v3 .visual-piece.is-shaking {
  border-color: rgba(198, 160, 140, 0.7);
  animation: visual-soft-shake 260ms ease;
}

.cinema-v3 .visual-meter {
  height: 10px;
  overflow: hidden;
  border: 1px solid rgba(231, 218, 193, 0.14);
  border-radius: 999px;
  background: rgba(2, 9, 12, 0.66);
}

.cinema-v3 .visual-meter__fill {
  width: var(--visual-progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(159, 185, 174, 0.72), var(--visual-accent));
  box-shadow: 0 0 16px rgba(216, 187, 130, 0.16);
  transition: width 220ms ease;
}

.cinema-v3 .visual-stir-pad {
  position: relative;
  width: min(250px, 68vw);
  aspect-ratio: 1;
  margin: auto;
  border: 1px solid rgba(216, 187, 130, 0.32);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 55%, rgba(218, 205, 174, 0.2), transparent 48%), rgba(5, 17, 20, 0.58);
  touch-action: none;
  user-select: none;
}

.cinema-v3 .visual-clue {
  opacity: 0.35;
  filter: saturate(0.55);
  transition: opacity 180ms ease, filter 180ms ease, box-shadow 180ms ease;
}

.cinema-v3 .visual-clue.is-found {
  opacity: 1;
  filter: saturate(0.8);
  box-shadow: 0 0 0 2px rgba(216, 187, 130, 0.44);
}

.cinema-v3 .visual-outcome-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.cinema-v3 .visual-outcome {
  min-height: 72px;
  padding: 15px 17px;
  border: 1px solid rgba(232, 220, 197, 0.17);
  border-radius: 14px;
  background: rgba(232, 220, 197, 0.045);
  color: var(--visual-ink);
  font-size: 15px;
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
}

@media (hover: hover) {
  .cinema-v3 .visual-piece:not(:disabled):hover,
  .cinema-v3 .visual-outcome:not(:disabled):hover,
  .cinema-v3 .visual-target:not(:disabled):hover {
    border-color: rgba(216, 187, 130, 0.64);
    background-color: rgba(216, 187, 130, 0.07);
  }
}

@keyframes visual-soft-pulse {
  50% {
    border-color: rgba(216, 187, 130, 0.46);
    box-shadow: 0 0 0 7px rgba(216, 187, 130, 0.025);
  }
}

@keyframes visual-soft-shake {
  35% { transform: translateX(-4px); }
  70% { transform: translateX(3px); }
}

@media (max-width: 760px) {
  .cinema-v3 .minigame-layer[data-visual-ui="v2"] .minigame-shell {
    width: 100%;
    height: 100dvh;
    max-height: none;
  }

  .cinema-v3 .visual-game { gap: 11px; }
  .cinema-v3 .visual-workspace,
  .cinema-v3 .visual-scene { min-height: 290px; }

  .cinema-v3 .visual-tray {
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
  }

  .cinema-v3 .visual-piece,
  .cinema-v3 .visual-target,
  .cinema-v3 .visual-letter,
  .cinema-v3 .visual-mailbox {
    min-width: 56px;
    min-height: 56px;
  }

  .cinema-v3 .visual-outcome-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .cinema-v3 .visual-piece,
  .cinema-v3 .visual-target,
  .cinema-v3 .visual-meter__fill,
  .cinema-v3 .visual-clue {
    transition: none;
    animation: none !important;
  }
}

/* Visual minigames v12.1 · tangible photographic objects, not text cards. */
.cinema-v3 .minigame-layer[data-visual-ui="v2"] .minigame-shell {
  padding: clamp(18px, 2.6vw, 34px);
}

.cinema-v3 .minigame-layer[data-visual-ui="v2"] .minigame-header {
  padding-bottom: 14px;
}

.cinema-v3 .minigame-layer[data-visual-ui="v2"] .minigame-header h2 {
  font-size: clamp(28px, 4vw, 43px);
}

.cinema-v3 .minigame-layer[data-visual-ui="v2"] .minigame-stage {
  min-height: min(500px, 60dvh);
  padding: 16px 0 12px;
}

.cinema-v3 .visual-tray:not(:empty) {
  align-items: stretch;
  min-height: 108px;
  padding: 9px 11px;
}

.cinema-v3 .visual-tray:empty {
  display: none;
}

.cinema-v3 .visual-tray .visual-piece,
.cinema-v3 .visual-tray .visual-letter {
  flex: 0 0 108px;
  width: 108px;
  height: 88px;
  padding: 8px 8px 25px;
  background-position: center 42%;
  background-size: 78% auto, auto;
}

.cinema-v3 .visual-piece > span,
.cinema-v3 .visual-letter > span,
.cinema-v3 .visual-mailbox > span {
  position: absolute;
  right: 5px;
  bottom: 4px;
  left: 5px;
  z-index: 3;
  padding: 4px 6px;
  overflow: hidden;
  border-radius: 7px;
  background: linear-gradient(90deg, rgba(3, 12, 15, 0.86), rgba(3, 12, 15, 0.56));
  font-size: 13px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cinema-v3 .visual-target {
  display: grid;
  place-items: center;
  overflow: visible;
  padding: 0;
  cursor: pointer;
}

.cinema-v3 .visual-target > span {
  position: absolute;
  right: 4px;
  bottom: 4px;
  left: 4px;
  z-index: 4;
  padding: 3px 5px;
  border-radius: 7px;
  background: rgba(3, 12, 15, 0.66);
  color: rgba(248, 241, 228, 0.76);
  font-size: 11px;
  line-height: 1.25;
  text-align: center;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
}

.cinema-v3 .visual-target__prop {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: 96%;
  height: 96%;
  object-fit: contain;
  pointer-events: none;
  transform: translate(-50%, -52%);
  filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.46));
}

.cinema-v3 .visual-target__prop:nth-of-type(3) {
  width: 76%;
  transform: translate(-41%, -45%) rotate(7deg);
}

.cinema-v3 .visual-target__prop:nth-of-type(2) {
  width: 84%;
  transform: translate(-59%, -48%) rotate(-6deg);
}

.cinema-v3 .visual-target.is-filled > span {
  opacity: 0.35;
}

.cinema-v3 .visual-target.visual-mailbox {
  background: linear-gradient(180deg, rgba(18, 27, 27, 0.42), rgba(3, 12, 15, 0.72));
  cursor: pointer;
}

.cinema-v3 .visual-letter {
  background-size: 88% auto, auto !important;
}

.cinema-v3 .photo-game-layout.visual-workspace {
  grid-template-columns: minmax(210px, 0.76fr) minmax(330px, 1fr);
  align-items: center;
  min-height: 0;
}

.cinema-v3 .photo-game-layout .visual-scene {
  min-height: 0;
}

.cinema-v3 .photo-preview.visual-scene {
  background-position: center !important;
  background-size: cover !important;
}

.cinema-v3 .photo-piece.visual-piece {
  min-width: 0;
  min-height: 0;
  padding: 0;
  border-radius: 0;
  background-repeat: no-repeat !important;
  background-size: 300% 300% !important;
}

.cinema-v3 .visual-workspace--choice {
  min-height: 280px;
  place-items: center;
}

.cinema-v3 .visual-choice {
  width: min(760px, 100%);
  padding: clamp(22px, 4vw, 36px);
  border: 1px solid rgba(232, 214, 180, 0.17);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(8, 25, 29, 0.82), rgba(3, 12, 15, 0.7));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.cinema-v3 .visual-choice h3 {
  margin: 0 0 9px;
  font-family: var(--film-serif);
  font-size: clamp(24px, 3.4vw, 34px);
  font-weight: 500;
  line-height: 1.35;
}

.cinema-v3 .visual-choice > p {
  margin: 0 0 22px;
  color: var(--visual-muted);
  font-size: 14px;
  line-height: 1.65;
}

.cinema-v3 .visual-workspace--cooking .visual-scene {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 16px;
  padding: 24px;
}

.cinema-v3 .visual-cooking-focus {
  display: grid;
  place-items: center;
  width: min(260px, 52vw);
  aspect-ratio: 1.5;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(205, 139, 72, 0.18), transparent 65%);
}

.cinema-v3 .visual-cooking-focus img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 16px 20px rgba(0, 0, 0, 0.52));
}

.cinema-v3 .visual-action-label {
  color: rgba(249, 237, 214, 0.84);
  font-family: var(--film-serif);
  font-size: 15px;
  letter-spacing: 0.06em;
}

.cinema-v3 .visual-heat-slider {
  width: min(420px, 78vw);
  accent-color: #d29d61;
}

.cinema-v3 .visual-workspace--cooking .visual-meter {
  width: min(420px, 78vw);
}

.cinema-v3 .visual-stir-pad {
  display: grid;
  place-items: center;
  overflow: visible;
  background: radial-gradient(circle at 50% 52%, rgba(191, 143, 86, 0.2), rgba(5, 17, 20, 0.7) 64%);
}

.cinema-v3 .visual-stir-pad img:first-of-type {
  width: 92%;
  height: 92%;
  object-fit: contain;
  filter: drop-shadow(0 16px 18px rgba(0, 0, 0, 0.5));
}

.cinema-v3 .visual-stir-pad img:nth-of-type(2) {
  position: absolute;
  z-index: 2;
  width: 62%;
  height: 62%;
  object-fit: contain;
  transform: translate(15%, -12%) rotate(-24deg);
  transform-origin: 48% 78%;
  transition: transform 180ms ease;
}

.cinema-v3 .visual-stir-pad:active img:nth-of-type(2) {
  transform: translate(10%, -8%) rotate(28deg);
}

.cinema-v3 .visual-stir-pad > span {
  position: absolute;
  right: 0;
  bottom: -35px;
  left: 0;
  color: rgba(247, 237, 218, 0.8);
  font-size: 13px;
}

.cinema-v3 .visual-workspace--observe .visual-letter {
  z-index: 7;
  width: 116px;
  height: 96px;
  background-size: contain, auto;
}

.cinema-v3 .visual-clue {
  border-color: rgba(225, 213, 184, 0.2);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(231, 215, 179, 0.11), transparent 67%);
  opacity: 0.24;
}

.cinema-v3 .visual-clue > span {
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.cinema-v3 .visual-clue:hover > span,
.cinema-v3 .visual-clue.is-hint > span,
.cinema-v3 .visual-clue.is-found > span {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 760px) {
  .cinema-v3 .minigame-layer[data-visual-ui="v2"] .minigame-header p {
    display: none;
  }

  .cinema-v3 .minigame-layer[data-visual-ui="v2"] .minigame-stage {
    min-height: 0;
  }

  .cinema-v3 .photo-game-layout.visual-workspace {
    grid-template-columns: 1fr;
  }

  .cinema-v3 .visual-tray .visual-piece,
  .cinema-v3 .visual-tray .visual-letter {
    flex-basis: 96px;
    width: 96px;
    height: 78px;
  }

  .cinema-v3 .visual-piece > span,
  .cinema-v3 .visual-letter > span {
    font-size: 12px;
  }

  .cinema-v3 .visual-choice {
    padding: 20px;
  }
}
