/* ==========================================================================
   핏빛 비가 내린 날 — Interactive Prologue · v02
   Immediate VN story screen → scrolling official release page.
   Burgundy / near-black / ivory, moonlight silver-blue for Gahee.
   Serif for dialogue, heavy system sans for release editorial. System fonts only.
   ========================================================================== */

/* Contract: hidden screens must never render. */
[hidden] { display: none !important; }

:root {
  --ink: #0a0709;
  --ink-2: #120a0e;
  --wine: #2a0a13;
  --wine-2: #3d0e1b;
  --blood: #a8122c;          /* fills (ivory text on top ≈ 6.4:1) */
  --blood-hover: #c01a37;
  --crimson: #ef5068;        /* text accent on ink (≈ 5.6:1) */
  --ivory: #f3ece0;
  --ivory-2: rgba(243, 236, 224, 0.84);
  --ivory-3: rgba(243, 236, 224, 0.66);
  --hair: rgba(243, 236, 224, 0.22);
  --hair-strong: rgba(243, 236, 224, 0.42);
  --hair-blood: rgba(239, 80, 104, 0.55);
  --frost: #bcd0ec;          /* Gahee accent — moonlit silver-blue */
  --navy: #0b1424;

  --serif: "AppleMyungjo", "Apple Myungjo", "Nanum Myeongjo", "NanumMyeongjo",
           "Noto Serif KR", "Noto Serif CJK KR", "Source Han Serif K",
           "Batang", "바탕", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --serif-latin: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
                 Georgia, var(--serif);
  --sans: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard",
          "Malgun Gothic", "맑은 고딕", "Noto Sans KR", system-ui, sans-serif;
  /* Heavy editorial display: Apple SD Gothic Neo ships Heavy/ExtraBold. */
  --display: "Apple SD Gothic Neo", "Pretendard", "Malgun Gothic", "맑은 고딕",
             "Noto Sans KR", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  --gutter: clamp(20px, 6vw, 112px);
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-slow: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-wipe: cubic-bezier(0.77, 0, 0.18, 1);
}

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

html {
  background: var(--ink);
  color: var(--ivory);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--ink);
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: break-word;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; -webkit-user-drag: none; }
p, h1, h2, h3, figure, ul { margin: 0; }
ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
a { color: inherit; }

/* Keep drag gestures from highlighting the illustrated landing. */
body { -webkit-user-select: none; user-select: none; }
input, textarea, [contenteditable="true"] { -webkit-user-select: text; user-select: text; }

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

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   Top bar — official game-site header
   Logo left · release-only nav + sound + skip right.
   The whole bar intercepts clicks so it never advances the VN.
   ========================================================================== */

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 30;
  isolation: isolate;
  height: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: env(safe-area-inset-top, 0px) var(--gutter) 0;
  pointer-events: auto;
}
/* Resting state: soft fade so the art reads through. */
.topbar::before,
.topbar::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.topbar::before {
  background: linear-gradient(180deg, rgba(10, 7, 9, 0.78), rgba(10, 7, 9, 0));
}
/* Scrolled state (motion.js toggles .is-scrolled): solid, blurred, crimson hairline. */
.topbar::after {
  background: rgba(10, 7, 9, 0.9);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: inset 0 -1px 0 rgba(239, 80, 104, 0.3), 0 18px 40px -24px rgba(0, 0, 0, 0.9);
  opacity: 0;
  transition: opacity 0.45s var(--ease);
}
.topbar.is-scrolled::after { opacity: 1; }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

/* logo-ko.webp is 730×417 with transparent margins. */
.brand__logo {
  width: 108px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.75));
}

.age-badge {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-family: var(--display);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  color: var(--ivory);
  background: var(--blood);
  box-shadow: 0 0 0 1px rgba(239, 80, 104, 0.6);
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

/* Release-only character nav */
.topnav {
  display: none;
  align-items: center;
  gap: 4px;
  margin-right: 10px;
}
body[data-screen="release"] .topnav { display: flex; }

.topnav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  font-family: var(--display);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--ivory-2);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.3s var(--ease);
}
.topnav__link::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 8px;
  height: 2px;
  background: var(--crimson);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.topnav__link:hover { color: var(--ivory); }
.topnav__link:hover::after { transform: scaleX(1); }

.topnav__cta {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  margin-left: 6px;
  padding: 0 16px;
  background: var(--blood);
  color: var(--ivory);
  font-family: var(--display);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.3s var(--ease);
}
.topnav__cta:hover { background: var(--blood-hover); }

.ui-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--hair);
  border-radius: 0;
  background: rgba(10, 7, 9, 0.42);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--ivory-2);
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease), background-color 0.3s var(--ease);
}
.ui-btn:hover {
  border-color: var(--hair-strong);
  color: var(--ivory);
  background: rgba(42, 10, 19, 0.6);
}

/* Sound indicator — drawn in CSS so JS can freely rewrite the label text. */
.ui-btn--sound::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border: 1px solid currentColor;
  border-radius: 50%;
  transition: background-color 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.ui-btn--sound[aria-pressed="true"] {
  color: var(--ivory);
  border-color: var(--hair-blood);
}
.ui-btn--sound[aria-pressed="true"]::before {
  background: var(--crimson);
  border-color: var(--crimson);
  box-shadow: 0 0 0 0 rgba(239, 80, 104, 0.6);
  animation: sound-pulse 2.4s var(--ease) infinite;
}

.ui-btn--skip::after {
  content: "";
  width: 14px;
  height: 1px;
  background: currentColor;
  transition: width 0.3s var(--ease);
}
.ui-btn--skip:hover::after { width: 22px; }

/* Fallback: never show skip on the final screen, even before JS hides it. */
body:has(#release:not([hidden])) #skip { display: none; }

/* ==========================================================================
   Shared screen primitives
   ========================================================================== */

.screen {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  animation: screen-in 1.1s var(--ease-slow) both;
}

.eyebrow {
  font-family: var(--serif-latin);
  font-size: 11.5px;
  letter-spacing: 0.42em;
  color: var(--ivory-3);
  display: flex;
  align-items: center;
  gap: 14px;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--crimson);
}

.rule {
  display: block;
  width: 56px;
  height: 1px;
  background: linear-gradient(90deg, var(--crimson), transparent);
}

.veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* ==========================================================================
   Rain — pure CSS, three parallax sheets, pointer-events none
   ========================================================================== */

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

.rain__sheet {
  position: absolute;
  inset: -30%;
  transform: rotate(9deg);
}

.rain__layer {
  --h: 300px;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--h) * -1);
  bottom: 0;
  display: block;
  will-change: transform;
  animation: rain-fall var(--speed, 0.8s) linear infinite;
}

.rain__layer--far {
  --h: 240px;
  --speed: 1.15s;
  --d: rgba(205, 212, 232, 0.16);
  background-image:
    radial-gradient(1px 16px at 50% 50%, var(--d), transparent),
    radial-gradient(1px 14px at 50% 50%, var(--d), transparent),
    radial-gradient(1px 18px at 50% 50%, var(--d), transparent),
    radial-gradient(1px 12px at 50% 50%, var(--d), transparent);
  background-size: 37px 240px, 53px 240px, 71px 240px, 43px 240px;
  background-position: 0 0, 17px 70px, 31px 150px, 9px 205px;
  opacity: 0.9;
}

.rain__layer--mid {
  --h: 320px;
  --speed: 0.82s;
  --d: rgba(222, 226, 240, 0.2);
  background-image:
    radial-gradient(1px 26px at 50% 50%, var(--d), transparent),
    radial-gradient(1px 22px at 50% 50%, var(--d), transparent),
    radial-gradient(1px 30px at 50% 50%, var(--d), transparent);
  background-size: 89px 320px, 113px 320px, 67px 320px;
  background-position: 11px 30px, 53px 140px, 29px 250px;
}

.rain__layer--near {
  --h: 460px;
  --speed: 0.56s;
  --d: rgba(238, 232, 236, 0.24);
  background-image:
    radial-gradient(1.4px 48px at 50% 50%, var(--d), transparent),
    radial-gradient(1.2px 40px at 50% 50%, var(--d), transparent);
  background-size: 157px 460px, 211px 460px;
  background-position: 23px 60px, 97px 290px;
  filter: blur(0.4px);
}

/* ==========================================================================
   01 · INTRO (retained for the app contract; hidden on load)
   ========================================================================== */

.intro {
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 40px) var(--gutter) 72px;
  background: var(--ink);
}

.intro__art {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.intro__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 30%;
  filter: saturate(0.92) contrast(1.04);
  transform-origin: 62% 35%;
  animation: slow-push 26s var(--ease) both;
}

.veil--intro {
  background:
    linear-gradient(90deg,
      rgba(10, 7, 9, 0.96) 0%,
      rgba(10, 7, 9, 0.88) 22%,
      rgba(18, 7, 12, 0.6) 40%,
      rgba(18, 7, 12, 0.08) 60%,
      transparent 72%),
    linear-gradient(180deg,
      rgba(10, 7, 9, 0.7) 0%,
      transparent 18%,
      transparent 72%,
      rgba(10, 7, 9, 0.92) 100%),
    radial-gradient(120% 90% at 70% 40%, transparent 55%, rgba(42, 10, 19, 0.55) 100%);
}

.intro__content {
  position: relative;
  z-index: 3;
  width: min(100%, 520px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 26px;
}
.intro__content > * { animation: rise-in 1.2s var(--ease-slow) both; }
.intro__content > :nth-child(1) { animation-delay: 0.15s; }
.intro__content > :nth-child(2) { animation-delay: 0.3s; }
.intro__content > :nth-child(3) { animation-delay: 0.5s; }
.intro__content > :nth-child(4) { animation-delay: 0.6s; }
.intro__content > :nth-child(5) { animation-delay: 0.75s; }
.intro__content > :nth-child(n+6) { animation-delay: 0.9s; }

.intro__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(46px, 6.4vw, 96px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--ivory);
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.55);
}
.intro__title-accent {
  color: var(--crimson);
  text-shadow: 0 0 24px rgba(168, 18, 44, 0.55), 0 2px 30px rgba(0, 0, 0, 0.6);
}

.intro__hook {
  font-family: var(--serif);
  font-size: clamp(19px, 1.7vw, 26px);
  line-height: 1.75;
  letter-spacing: 0.02em;
  color: var(--ivory);
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.7);
}

.intro__copy {
  max-width: 30em;
  font-size: 15px;
  line-height: 1.85;
  color: var(--ivory-2);
}
.intro__copy em {
  font-style: normal;
  color: var(--crimson);
}

.intro__cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
  margin-top: 6px;
}

.btn-start {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 18px;
  min-height: 58px;
  padding: 0 28px 0 32px;
  border: 1px solid rgba(239, 80, 104, 0.6);
  border-radius: 0;
  background: var(--blood);
  color: var(--ivory);
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: 0.12em;
  cursor: pointer;
  box-shadow: 0 18px 50px -18px rgba(168, 18, 44, 0.8);
  transition: background-color 0.35s var(--ease), box-shadow 0.35s var(--ease), transform 0.35s var(--ease);
}
.btn-start:hover {
  background: var(--blood-hover);
  box-shadow: 0 22px 60px -16px rgba(192, 26, 55, 0.95);
}
.btn-start:active { transform: translateY(1px); }
.btn-start__arrow {
  width: 40px;
  height: 12px;
  transition: transform 0.4s var(--ease);
}
.btn-start:hover .btn-start__arrow { transform: translateX(6px); }

.intro__meta {
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ivory-3);
}

.intro__disclaimer {
  padding-top: 18px;
  border-top: 1px solid var(--hair);
  font-size: 13px;
  line-height: 1.6;
  color: var(--ivory-3);
}

.chapter-mark {
  position: absolute;
  z-index: 3;
  right: var(--gutter);
  bottom: 56px;
  writing-mode: vertical-rl;
  font-family: var(--serif-latin);
  font-size: 11px;
  letter-spacing: 0.4em;
  color: var(--ivory-3);
  display: flex;
  align-items: center;
  gap: 14px;
  animation: rise-in 1.4s 1.1s var(--ease-slow) both;
}
.chapter-mark::after {
  content: "";
  width: 1px;
  height: 64px;
  background: linear-gradient(180deg, var(--hair-strong), transparent);
}
.chapter-mark__num {
  color: var(--crimson);
  writing-mode: horizontal-tb;
  font-size: 13px;
  letter-spacing: 0.1em;
}

/* ==========================================================================
   02 · STORY — full-bleed scene + VN dialogue (unchanged behaviour)
   ========================================================================== */

.story {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 16px;
  padding:
    calc(var(--header-h) + 4px)
    var(--gutter)
    max(28px, env(safe-area-inset-bottom, 0px));
  background: var(--ink);
}
body[data-screen="story"] .story { cursor: pointer; }

.scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--ink-2);
}
.scene__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 30%;
  filter: brightness(0.8) saturate(0.86) contrast(1.06);
  transition: opacity 0.7s var(--ease), filter 0.7s var(--ease);
  animation: scene-breathe 30s ease-in-out infinite alternate;
}

.scene__shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg,
      rgba(10, 7, 9, 0.82) 0%,
      rgba(10, 7, 9, 0.2) 16%,
      transparent 30%,
      transparent 52%,
      rgba(10, 7, 9, 0.6) 74%,
      rgba(10, 7, 9, 0.94) 100%),
    radial-gradient(130% 95% at 55% 38%, transparent 50%, rgba(10, 7, 9, 0.72) 100%),
    linear-gradient(0deg, rgba(61, 14, 27, 0.28), rgba(61, 14, 27, 0.28));
}

.story__hud {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding-top: 6px;
  border-top: 1px solid var(--hair);
}
.story__chapter,
.story__progress {
  font-family: var(--serif-latin);
  font-size: 11.5px;
  letter-spacing: 0.32em;
  color: var(--ivory-2);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
}
.story__chapter::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 12px;
  vertical-align: 2px;
  background: var(--crimson);
  transform: rotate(45deg);
}
.story__progress {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.2em;
}
.story__progress:empty { display: none; }

.story__stage {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  min-height: 0;
}

.choices {
  width: min(100%, 520px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: rise-in 0.7s var(--ease-slow) both;
}

.choice {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 56px;
  padding: 12px 28px;
  border: 1px solid var(--hair-strong);
  border-radius: 0;
  background: linear-gradient(90deg, rgba(10, 7, 9, 0.55), rgba(26, 8, 14, 0.82) 50%, rgba(10, 7, 9, 0.55));
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: var(--ivory);
  font-family: var(--serif);
  font-size: clamp(16px, 1.3vw, 19px);
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease), color 0.3s var(--ease);
}
.choice::before,
.choice::after {
  content: "";
  width: 5px;
  height: 5px;
  border: 1px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.5;
  transition: opacity 0.3s, background-color 0.3s;
}
.choice:hover,
.choice:focus-visible {
  border-color: var(--crimson);
  background: linear-gradient(90deg, rgba(42, 10, 19, 0.7), rgba(120, 14, 34, 0.75) 50%, rgba(42, 10, 19, 0.7));
}
.choice:hover::before,
.choice:hover::after,
.choice:focus-visible::before,
.choice:focus-visible::after {
  opacity: 1;
  background: var(--crimson);
  border-color: var(--crimson);
}

.dialogue {
  position: relative;
  z-index: 3;
  justify-self: center;
  width: min(100%, 980px);
  padding: 22px clamp(20px, 3vw, 40px) 16px;
  border: 1px solid var(--hair);
  border-top-color: var(--hair-blood);
  background: linear-gradient(180deg, rgba(18, 8, 12, 0.8), rgba(10, 7, 9, 0.9));
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
  backdrop-filter: blur(10px) saturate(1.1);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.9);
}
.dialogue::before {
  content: "";
  position: absolute;
  inset: -1px;
  pointer-events: none;
  background:
    linear-gradient(var(--crimson), var(--crimson)) left top / 18px 1px no-repeat,
    linear-gradient(var(--crimson), var(--crimson)) left top / 1px 18px no-repeat,
    linear-gradient(var(--hair-strong), var(--hair-strong)) right bottom / 18px 1px no-repeat,
    linear-gradient(var(--hair-strong), var(--hair-strong)) right bottom / 1px 18px no-repeat;
}

.dialogue__speaker {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 1.6em;
  margin-bottom: 10px;
  font-family: var(--serif);
  font-size: clamp(15px, 1.2vw, 18px);
  letter-spacing: 0.14em;
  color: var(--crimson);
}
.dialogue__speaker:not(:empty)::after {
  content: "";
  flex: 0 1 64px;
  height: 1px;
  background: linear-gradient(90deg, var(--hair-blood), transparent);
}

.dialogue__text {
  min-height: calc(1.85em * 3);
  font-family: var(--serif);
  font-size: clamp(16px, 0.55vw + 13.5px, 22px);
  line-height: 1.85;
  letter-spacing: 0.015em;
  color: var(--ivory);
  white-space: pre-line;
}

.dialogue__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(243, 236, 224, 0.1);
}

.dialogue__hint {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ivory-3);
}
.dialogue__hint kbd {
  display: inline-block;
  min-width: 2.2em;
  padding: 1px 6px;
  margin-right: 2px;
  border: 1px solid var(--hair);
  font-family: var(--sans);
  font-size: 11px;
  text-align: center;
  color: var(--ivory-2);
}
.dialogue__adapted { display: block; margin-top: 4px; font-size: 11px; opacity: 0.8; }

.dialogue__next {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 6px 0 18px;
  border: 0;
  background: none;
  color: var(--ivory);
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0.2em;
  cursor: pointer;
}
.dialogue__next::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 7px solid var(--crimson);
  animation: next-bob 1.4s ease-in-out infinite;
}
.dialogue__next:hover { color: var(--crimson); }
.dialogue__next[hidden] { display: none !important; }

/* ==========================================================================
   03 · RELEASE — a block-flow page, not a single flex screen.
   Hero (one viewport) → 신서아 → 설가희 → final CTA → footer.
   ========================================================================== */

.release {
  display: block;
  padding: 0;
  background: var(--ink);
}

/* ---------- 3-1 · Hero ---------- */

.release-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  padding: calc(var(--header-h) + 28px) var(--gutter) 28px;
}

.release__art {
  position: absolute;
  inset: -12% 0;
  z-index: 0;
  overflow: hidden;
}
.release__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 68% 30%;
  filter: saturate(0.92);
  transform-origin: 70% 30%;
  animation: slow-push 30s var(--ease) both;
}

.veil--release {
  background:
    linear-gradient(90deg,
      rgba(12, 6, 10, 0.97) 0%,
      rgba(14, 6, 11, 0.9) 28%,
      rgba(22, 7, 14, 0.55) 46%,
      rgba(22, 7, 14, 0.06) 64%,
      transparent 76%),
    linear-gradient(180deg,
      rgba(10, 7, 9, 0.55) 0%,
      transparent 20%,
      transparent 70%,
      var(--ink) 100%),
    radial-gradient(90% 70% at 0% 100%, rgba(61, 14, 27, 0.6), transparent 70%);
}

.release__content {
  position: relative;
  z-index: 3;
  align-self: center;
  width: min(100%, 780px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.release__logo {
  width: clamp(190px, 19vw, 300px);
  height: auto;
  object-fit: contain;
  margin: 0 0 6px -3%;
  filter: drop-shadow(0 4px 22px rgba(0, 0, 0, 0.85));
}

.release__eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.3em;
  color: var(--ivory-2);
}
.release__eyebrow-mark {
  width: 10px;
  height: 10px;
  background: var(--crimson);
  transform: rotate(45deg);
  box-shadow: 0 0 14px rgba(239, 80, 104, 0.8);
}
.release__eyebrow--center { justify-content: center; }

/* Giant release headline — heavy sans, tight tracking. */
.release__title {
  margin: 0.1em 0 0 -0.04em;
  padding: 0.04em 0.04em 0.08em 0;
  overflow: hidden;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(56px, 9.2vw, 168px);
  line-height: 1;
  letter-spacing: -0.055em;
  color: var(--ivory);
  /* A large glow is clipped by the headline reveal box. */
  text-shadow: none;
  white-space: nowrap;
}
.release__title:focus { outline: none; }
.ch { display: inline-block; }
.ch--accent {
  color: var(--crimson);
  text-shadow: none;
}

.release__hook {
  margin-top: 14px;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(26px, 3vw, 48px);
  line-height: 1.2;
  letter-spacing: -0.035em;
  color: var(--ivory);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.7);
}

.release__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(26px, 4vh, 40px);
}
.release__ctas--center { justify-content: center; }

/* Store buttons — cut-corner game-site plates */
.btn-store {
  --cut: 14px;
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-width: 250px;
  min-height: 68px;
  padding: 0 22px 0 24px;
  font-family: var(--display);
  text-decoration: none;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%);
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease);
}
.btn-store:focus-visible { outline-offset: -5px; }
.btn-store::before {
  /* sheen sweep */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.22) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.8s var(--ease);
  pointer-events: none;
}
.btn-store:hover::before { transform: translateX(120%); }
.btn-store:active { transform: translateY(1px); }
.btn-store__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-align: left;
}
.btn-store__kicker {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.3em;
  opacity: 0.78;
}
.btn-store__label {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.btn-store svg {
  width: 16px;
  height: 16px;
  flex: none;
  transition: transform 0.35s var(--ease);
}
.btn-store:hover svg { transform: translate(3px, -3px); }

.btn-store--steam {
  background: linear-gradient(135deg, #c2173a, var(--blood) 55%, #7c0b20);
  color: var(--ivory);
  box-shadow: inset 0 0 0 1px rgba(239, 80, 104, 0.7);
}
.btn-store--steam:hover { background-color: var(--blood-hover); color: #fff; }

.btn-store--rplay {
  background: var(--ivory);
  color: #1a0b10;
}
.btn-store--rplay:hover { background: #fff; }

/* Secondary row: separate audio content + restart */
.release__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  margin-top: 26px;
}

.extra {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 14px;
}
.extra__label {
  padding: 3px 8px;
  border: 1px solid var(--hair);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ivory-3);
  white-space: nowrap;
}
.extra__link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  font-family: var(--sans);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ivory-2);
  text-decoration: underline;
  text-decoration-color: var(--hair-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
  transition: color 0.3s, text-decoration-color 0.3s;
}
.extra__link:hover {
  color: var(--ivory);
  text-decoration-color: var(--crimson);
}
.extra__icon {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--crimson);
}

.btn-restart {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0;
  border: 0;
  background: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ivory-3);
  cursor: pointer;
  transition: color 0.3s;
}
.btn-restart svg { width: 14px; height: 14px; transition: transform 0.5s var(--ease); }
.btn-restart:hover { color: var(--ivory); }
.btn-restart:hover svg { transform: rotate(-200deg); }

/* Scroll anchor */
.scroll-cue {
  position: relative;
  z-index: 3;
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  margin-top: 28px;
  padding: 0 22px 0 26px;
  border: 1px solid var(--hair-strong);
  border-radius: 999px;
  background: rgba(10, 7, 9, 0.5);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-family: var(--display);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--ivory);
  text-decoration: none;
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}
.scroll-cue:hover { border-color: var(--crimson); background: rgba(42, 10, 19, 0.7); }
.scroll-cue__arrow {
  display: inline-block;
  color: var(--crimson);
  font-size: 16px;
  animation: cue-bob 1.8s ease-in-out infinite;
}

/* ---------- 3-2 / 3-3 · Character sections ---------- */

.chara {
  --accent: var(--crimson);
  --art-from: -90px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 24px) var(--gutter) clamp(48px, 8vh, 96px);
  background: var(--ink);
}

.chara__bg {
  position: absolute;
  inset: -14% 0;
  z-index: -4;
  overflow: hidden;
}
.chara__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.chara__tint {
  position: absolute;
  inset: 0;
  z-index: -3;
  pointer-events: none;
}

.chara .rain { z-index: -2; opacity: 0.5; }

/* Giant muted background lettering */
.chara__ghost {
  position: absolute;
  z-index: -1;
  top: 50%;
  left: -0.03em;
  margin-top: -0.42em;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(170px, 27vw, 520px);
  line-height: 0.84;
  letter-spacing: -0.04em;
  white-space: nowrap;
  color: rgba(168, 18, 44, 0.07);
  -webkit-text-stroke: 1.5px rgba(239, 80, 104, 0.2);
  pointer-events: none;
  user-select: none;
}
.chara__ghost span { display: block; }

.chara__side {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: calc(var(--gutter) / 3);
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  font-family: var(--display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.42em;
  color: var(--ivory-3);
  white-space: nowrap;
}

.chara__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  gap: clamp(24px, 5vw, 96px);
}

.chara__stage {
  position: relative;
  display: flex;
  justify-content: center;
  min-width: 0;
}
/* Floor shadow under the feet */
.chara__stage::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: -1.5%;
  height: 7%;
  z-index: -1;
  background: radial-gradient(50% 50% at 50% 50%, rgba(0, 0, 0, 0.75), transparent 70%);
  pointer-events: none;
}

.chara__figure {
  position: relative;
  max-width: 100%;
}
.chara__art {
  width: auto;
  height: min(84vh, 1040px);
  height: min(84svh, 1040px);
  max-width: 100%;
  object-fit: contain;
  object-position: center bottom;
}

.chara__body {
  min-width: 0;
  max-width: 660px;
}

.chara__index {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.34em;
  color: var(--ivory-3);
}
.chara__num {
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--accent);
}
.chara__rule {
  width: 48px;
  height: 1px;
  background: var(--accent);
}

.chara__tagline {
  display: inline-block;
  margin-top: 28px;
  padding: 7px 16px 8px;
  background: var(--blood);
  color: var(--ivory);
  font-family: var(--display);
  font-size: clamp(15px, 1.2vw, 19px);
  font-weight: 800;
  letter-spacing: 0.04em;
  clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  padding-right: 24px;
}

.chara__name {
  margin: 0.08em 0 0 -0.05em;
  padding: 0.04em 0.06em 0.06em 0;
  overflow: hidden;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(84px, 12vw, 220px);
  line-height: 1;
  letter-spacing: -0.06em;
  color: var(--ivory);
  text-shadow: 0 6px 50px rgba(0, 0, 0, 0.55);
  white-space: nowrap;
}

.chara__roman {
  font-family: var(--display);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.56em;
  color: var(--ivory-3);
}

.chara__headline {
  margin-top: clamp(28px, 4vh, 44px);
  padding-left: 20px;
  border-left: 3px solid var(--accent);
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(26px, 2.7vw, 44px);
  line-height: 1.24;
  letter-spacing: -0.035em;
  color: var(--ivory);
}

.chara__bio {
  max-width: 31em;
  margin-top: 22px;
  font-size: 16px;
  line-height: 1.9;
  color: var(--ivory-2);
}

.chara__next {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-top: 28px;
  font-family: var(--display);
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--ivory-2);
  text-decoration: underline;
  text-decoration-color: var(--hair-strong);
  text-underline-offset: 7px;
  transition: color 0.3s, text-decoration-color 0.3s;
}
.chara__next:hover { color: var(--ivory); text-decoration-color: var(--accent); }
.chara__next span { color: var(--accent); }

/* 신서아 — rain, crimson, black */
.chara--seoa .chara__bg img {
  object-position: 50% 40%;
  filter: grayscale(0.5) brightness(0.36) contrast(1.1) blur(2px);
}
.chara--seoa .chara__tint {
  background:
    radial-gradient(34% 52% at 27% 50%, rgba(168, 18, 44, 0.5), transparent 72%),
    radial-gradient(22% 30% at 27% 30%, rgba(243, 236, 224, 0.1), transparent 70%),
    linear-gradient(180deg, var(--ink) 0%, rgba(10, 7, 9, 0.2) 18%, rgba(10, 7, 9, 0.2) 80%, var(--ink) 100%),
    linear-gradient(90deg, rgba(10, 7, 9, 0.2) 40%, rgba(20, 6, 11, 0.85) 100%);
}
.chara--seoa .chara__art {
  filter: drop-shadow(0 0 1px rgba(243, 236, 224, 0.35)) drop-shadow(0 0 36px rgba(239, 80, 104, 0.28)) drop-shadow(0 30px 40px rgba(0, 0, 0, 0.6));
}

/* 설가희 — moonlit field, silver-blue; mirrored layout */
.chara--gahee {
  --accent: var(--frost);
  --art-from: 90px;
  background: var(--navy);
}
.chara--gahee .chara__bg img {
  object-position: 50% 60%;
  filter: brightness(0.62) saturate(0.85);
}
.chara--gahee .chara__tint {
  background:
    radial-gradient(34% 52% at 73% 50%, rgba(188, 208, 236, 0.22), transparent 72%),
    linear-gradient(180deg, var(--ink) 0%, rgba(11, 20, 36, 0.25) 18%, rgba(11, 20, 36, 0.3) 80%, var(--ink) 100%),
    linear-gradient(270deg, rgba(11, 20, 36, 0.15) 40%, rgba(8, 13, 26, 0.88) 100%);
}
.chara--gahee .chara__ghost {
  left: auto;
  right: -0.03em;
  color: rgba(188, 208, 236, 0.06);
  -webkit-text-stroke-color: rgba(188, 208, 236, 0.24);
}
.chara--gahee .chara__side { right: auto; left: calc(var(--gutter) / 3); writing-mode: vertical-lr; }
.chara--gahee .chara__inner { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.chara--gahee .chara__stage { order: 2; }
.chara--gahee .chara__tagline { background: var(--frost); color: var(--navy); }
.chara--gahee .chara__name .ch {
  background: linear-gradient(180deg, #ffffff 30%, var(--frost));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.chara--gahee .chara__art {
  filter: drop-shadow(0 0 30px rgba(188, 208, 236, 0.25)) drop-shadow(0 30px 40px rgba(0, 0, 0, 0.55));
}

/* ---------- 3-4 · Final CTA ---------- */

.finale {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(96px, 16vh, 168px) var(--gutter);
  text-align: center;
  background: var(--ink);
}
.finale__art {
  position: absolute;
  inset: -12% 0;
  z-index: -1;
  overflow: hidden;
}
.finale__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 35%;
  filter: brightness(0.32) saturate(0.8);
}
.finale::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, var(--ink) 0%, rgba(10, 7, 9, 0.35) 30%, rgba(10, 7, 9, 0.35) 70%, var(--ink) 100%),
    radial-gradient(60% 60% at 50% 50%, rgba(168, 18, 44, 0.28), transparent 70%);
}
.finale__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.finale__title {
  margin-top: 22px;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(32px, 4.6vw, 72px);
  line-height: 1.14;
  letter-spacing: -0.045em;
  color: var(--ivory);
  text-shadow: 0 4px 40px rgba(0, 0, 0, 0.6);
}
.finale__extra {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px 14px;
  margin-top: 22px;
}
.finale__extra-label {
  padding: 3px 8px;
  border: 1px solid var(--hair);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ivory-3);
}
.finale__top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  margin-top: 30px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--ivory-3);
  text-decoration: none;
}
.finale__top:hover { color: var(--ivory); }

/* ---------- 3-5 · Official footer ---------- */

.site-footer {
  position: relative;
  z-index: 3;
  padding: 64px var(--gutter) max(40px, env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(239, 80, 104, 0.22);
  background: #070506;
  color: var(--ivory-3);
  text-align: center;
}
.site-footer__logo {
  width: 168px;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
}

.ratings {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 14px;
  margin-top: 30px;
}
.ratings__icon {
  width: auto;
  height: 72px;
  object-fit: contain;
}
.ratings__text {
  margin-top: 14px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ivory-2);
}
.ratings__reg {
  margin-top: 6px;
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--ivory-3);
}

.partners {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 20px 48px;
  max-width: 640px;
  margin: 36px auto 0;
  padding-top: 28px;
  border-top: 1px solid rgba(243, 236, 224, 0.1);
}
.partners__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.partners__logo {
  width: auto;
  height: 28px;
  max-width: 180px;
  object-fit: contain;
  opacity: 0.92;
}
.partners__label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--ivory-3);
}

/* ---------- Grain ---------- */

.grain {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ==========================================================================
   Motion layer (motion.js)
   Nothing here hides content until motion.js adds html.motion-ready,
   which it does only after the IntersectionObserver is in place.
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  [data-parallax] {
    transform: translate3d(0, var(--py, 0px), 0);
  }
  .release__art,
  .chara__bg,
  .finale__art { will-change: transform; }

  /* Default: rise */
  .motion-ready [data-reveal] {
    transition:
      opacity 0.9s var(--ease-slow) var(--d, 0ms),
      transform 1.2s var(--ease-slow) var(--d, 0ms);
  }
  .motion-ready [data-reveal]:not(.is-in) {
    opacity: 0;
    transform: translate3d(0, 36px, 0);
  }

  /* Standing art: curtain wipe from the head down + slide + settle scale */
  .motion-ready [data-reveal="art"] {
    clip-path: inset(-20% -20% -20% -20%);
    transition:
      opacity 0.8s var(--ease) var(--d, 0ms),
      transform 1.8s var(--ease-slow) var(--d, 0ms),
      clip-path 1.5s var(--ease-wipe) var(--d, 0ms);
  }
  .motion-ready [data-reveal="art"]:not(.is-in) {
    opacity: 0;
    transform: translate3d(var(--art-from, -90px), 0, 0) scale(1.08);
    clip-path: inset(-20% -20% 100% -20%);
  }

  /* Giant names: each glyph rises out of a mask */
  .motion-ready [data-reveal="name"],
  .motion-ready [data-reveal="name"]:not(.is-in) {
    opacity: 1;
    transform: none;
  }
  .motion-ready [data-reveal="name"] .ch {
    transition:
      transform 1.15s var(--ease-slow) calc(var(--d, 0ms) + var(--i, 0) * 90ms),
      opacity 0.7s var(--ease) calc(var(--d, 0ms) + var(--i, 0) * 90ms);
  }
  .motion-ready [data-reveal="name"]:not(.is-in) .ch {
    opacity: 0;
    transform: translate3d(0, 105%, 0) rotate(5deg);
  }

  /* Ghost lettering: tracks in from wide spacing */
  .motion-ready [data-reveal="ghost"] {
    transition:
      opacity 1.6s var(--ease) var(--d, 0ms),
      letter-spacing 2s var(--ease-slow) var(--d, 0ms);
  }
  .motion-ready [data-reveal="ghost"]:not(.is-in) {
    opacity: 0;
    transform: none;
    letter-spacing: 0.3em;
  }

  /* Tagline plates wipe in sideways */
  .motion-ready .chara__tagline[data-reveal] {
    transition:
      opacity 0.6s var(--ease) var(--d, 0ms),
      transform 1s var(--ease-slow) var(--d, 0ms),
      clip-path 0.9s var(--ease-wipe) var(--d, 0ms);
  }
  .motion-ready .chara__tagline[data-reveal]:not(.is-in) {
    transform: translate3d(-24px, 0, 0);
    clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
  }
}

/* ==========================================================================
   Keyframes
   ========================================================================== */

@keyframes screen-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes rise-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
@keyframes slow-push {
  from { transform: scale(1.08); }
  to   { transform: scale(1); }
}
@keyframes scene-breathe {
  from { transform: scale(1.02); }
  to   { transform: scale(1.07); }
}
@keyframes rain-fall {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(0, var(--h), 0); }
}
@keyframes next-bob {
  0%, 100% { transform: translateY(-2px); opacity: 0.6; }
  50%      { transform: translateY(2px);  opacity: 1; }
}
@keyframes cue-bob {
  0%, 100% { transform: translateY(-3px); }
  50%      { transform: translateY(3px); }
}
@keyframes sound-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(239, 80, 104, 0.55); }
  70%  { box-shadow: 0 0 0 7px rgba(239, 80, 104, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 80, 104, 0); }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1100px) {
  .br-wide { display: none; }
  .chara__side { display: none; }
}

/* Tablet / portrait: art occupies the upper band, text below */
@media (max-width: 860px), (max-aspect-ratio: 4/5) {
  :root { --header-h: 64px; }

  .intro {
    align-items: flex-end;
    padding-top: 46svh;
    padding-bottom: 40px;
  }
  .intro__art {
    inset: 0 0 auto 0;
    height: 74svh;
  }
  .intro__art img { object-position: 58% 22%; }
  .veil--intro {
    height: 74svh;
    bottom: auto;
    background:
      linear-gradient(180deg,
        rgba(10, 7, 9, 0.7) 0%,
        transparent 14%,
        transparent 32%,
        rgba(10, 7, 9, 0.55) 48%,
        rgba(10, 7, 9, 0.94) 66%,
        var(--ink) 76%),
      radial-gradient(120% 60% at 60% 30%, transparent 50%, rgba(42, 10, 19, 0.5) 100%);
  }
  .intro__content { gap: 20px; width: 100%; }

  .chapter-mark {
    right: var(--gutter);
    top: calc(var(--header-h) + 12px);
    bottom: auto;
    writing-mode: horizontal-tb;
    font-size: 10.5px;
    letter-spacing: 0.3em;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
  }
  .chapter-mark::after { display: none; }

  .story { gap: 12px; }
  .scene__image { object-position: 60% 28%; }

  .topnav__cta { display: none; }
  .topnav { margin-right: 2px; }

  /* Hero: art band on top, copy flows beneath */
  .release-hero {
    padding-top: 34svh;
    padding-bottom: 32px;
  }
  .release__art {
    inset: 0 0 auto 0;
    height: 66svh;
  }
  .release__art img { object-position: 70% 20%; }
  .veil--release {
    height: 66svh;
    bottom: auto;
    background:
      linear-gradient(180deg,
        rgba(10, 7, 9, 0.6) 0%,
        transparent 16%,
        transparent 34%,
        rgba(10, 7, 9, 0.7) 62%,
        var(--ink) 100%),
      radial-gradient(120% 60% at 60% 30%, transparent 50%, rgba(42, 10, 19, 0.5) 100%);
  }
  .release-hero::after {
    /* solid base under the copy column below the art band */
    content: "";
    position: absolute;
    inset: 66svh 0 0 0;
    z-index: 0;
    background: var(--ink);
  }
  .release__content { width: 100%; align-self: end; }
  .release__title { font-size: clamp(54px, 15vw, 120px); }

  /* Characters: stacked, full figure first, text below. No sticky. */
  .chara {
    display: block;
    min-height: 0;
    padding-top: calc(var(--header-h) + 16px);
  }
  .chara__inner,
  .chara--gahee .chara__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
  .chara--gahee .chara__stage { order: 0; }
  .chara__art {
    height: min(72vh, 150vw, 860px);
    height: min(72svh, 150vw, 860px);
  }
  .chara__ghost {
    top: calc(var(--header-h) + 16%);
    margin-top: 0;
    font-size: 40vw;
  }
  .chara__body { max-width: none; }
  .chara__tagline { margin-top: 20px; }
  .chara__name { font-size: clamp(76px, 22vw, 150px); }
  .chara--seoa .chara__tint {
    background:
      radial-gradient(60% 34% at 50% 30%, rgba(168, 18, 44, 0.5), transparent 72%),
      linear-gradient(180deg, var(--ink) 0%, rgba(10, 7, 9, 0.2) 12%, rgba(10, 7, 9, 0.55) 55%, var(--ink) 100%);
  }
  .chara--gahee .chara__tint {
    background:
      radial-gradient(60% 34% at 50% 30%, rgba(188, 208, 236, 0.2), transparent 72%),
      linear-gradient(180deg, var(--ink) 0%, rgba(11, 20, 36, 0.25) 12%, rgba(8, 13, 26, 0.7) 55%, var(--ink) 100%);
  }
}

@media (max-width: 560px) {
  :root { --gutter: 20px; }

  .brand__logo { width: 84px; }

  .intro__title { font-size: clamp(42px, 13vw, 56px); }
  .intro__hook { font-size: 19px; }
  .intro__copy { font-size: 14.5px; }
  .intro__cta-row { width: 100%; }
  .btn-start { width: 100%; justify-content: space-between; }

  .dialogue { padding: 18px 18px 12px; }
  .dialogue__hint { display: block; font-size: 11px; }
  .dialogue__keys { display: none; }
  .dialogue__footer { justify-content: space-between; }
  .choice { min-height: 52px; padding: 12px 18px; }

  .topnav__link { padding: 0 8px; font-size: 13px; }
  .topnav__link::after { left: 8px; right: 8px; }

  .release__logo { width: 168px; }
  .release__eyebrow { font-size: 10.5px; letter-spacing: 0.2em; }
  .release__hook { font-size: 26px; }
  .release__ctas { width: 100%; flex-direction: column; }
  .btn-store { width: 100%; min-width: 0; }
  .release__meta { gap: 6px 20px; }

  .chara { padding-bottom: 64px; }
  .chara__headline { font-size: 25px; padding-left: 16px; }
  .chara__bio { font-size: 15px; line-height: 1.85; }
  .chara__roman { font-size: 11.5px; letter-spacing: 0.44em; }

  .finale { padding-top: 88px; padding-bottom: 88px; }
  .finale__title { font-size: clamp(28px, 8.4vw, 40px); }

  .site-footer { padding-top: 52px; }
  .ratings__icon { height: 62px; }
}

@media (max-width: 400px) {
  .topbar { gap: 8px; }
  .brand { gap: 6px; }
  .brand__logo { width: 70px; }
  .age-badge { width: 22px; height: 22px; font-size: 10px; }
  .topbar__actions { gap: 4px; }
  .topnav { margin-right: 0; gap: 0; }
  .topnav__link { padding: 0 6px; }
  .ui-btn { padding: 0 10px; font-size: 12px; letter-spacing: 0.02em; gap: 6px; }
  .ui-btn--skip::after { display: none; }
}

@media (max-width: 360px) {
  .brand__logo { width: 60px; }
  body[data-screen="release"] .topnav__link { font-size: 12px; padding: 0 5px; }
}

/* Short landscape screens (phones sideways): keep things scrollable, compact */
@media (max-height: 520px) and (orientation: landscape) {
  .intro { padding-top: calc(var(--header-h) + 16px); padding-bottom: 32px; }
  .intro__content { gap: 14px; }
  .intro__title { font-size: 40px; }
  .chapter-mark { display: none; }
  .dialogue__text { min-height: calc(1.85em * 2); }

  .release__title { font-size: 64px; }
  .release__logo { width: 150px; }
  .chara__art { height: 86vh; }
}

@media (forced-colors: active) {
  .btn-start,
  .btn-store,
  .choice,
  .ui-btn,
  .scroll-cue { border: 1px solid ButtonText; }
  .veil,
  .grain,
  .rain,
  .chara__tint,
  .chara__ghost { display: none; }
  .chara--gahee .chara__name .ch { color: CanvasText; background: none; }
}

/* ==========================================================================
   Reduced motion — static, fully visible
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rain__layer { animation-play-state: paused; }
  .rain { opacity: 0.6; }

  .screen,
  .intro__content > *,
  .chapter-mark,
  .choices,
  .intro__art img,
  .release__art img,
  .scene__image,
  .scroll-cue__arrow,
  .dialogue__next::after,
  .ui-btn--sound[aria-pressed="true"]::before {
    animation: none !important;
  }

  [data-parallax] { transform: none !important; }
  [data-reveal],
  [data-reveal] .ch {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

/* Display the supplied RXZ artwork at readable scale, cropping only its empty border. */
.partners__crop { display:block; position:relative; width:160px; height:48px; overflow:hidden; }
.partners__crop .partners__logo--redxzone { position:absolute; width:240px; height:auto; max-width:none; left:-40px; top:-112px; }

@media (max-width: 400px) {
  .dialogue__next { flex-shrink:0; white-space:nowrap; letter-spacing:0.02em; gap:6px; padding-left:6px; font-size:13px; }
  .dialogue__footer { gap:8px; }
  .dialogue__hint { min-width:0; font-size:10px; }
}

/* Same-page header navigation, available from the opening VN. */
.topnav { display:flex; }
#skip { display:none !important; }
.topnav__link[aria-current="location"] { color:var(--ivory); }
.topnav__link[aria-current="location"]::after { transform:scaleX(1); }
#release-top, #seoa, #gahee, #play { scroll-margin-top:calc(var(--header-h) + env(safe-area-inset-top, 0px)); }
@media (max-width: 700px) {
  :root { --header-h:108px; }
  .topbar { display:grid; grid-template-columns:1fr auto; grid-template-rows:60px 48px; gap:0; }
  .brand { grid-row:1; grid-column:1; }
  .brand__logo { width:78px; }
  .topbar__actions { display:contents; }
  #sound-toggle { grid-row:1; grid-column:2; }
  .topnav { grid-row:2; grid-column:1 / -1; align-self:stretch; justify-content:space-between; margin:0; gap:0; border-top:1px solid var(--hair); }
  .topnav__link, body[data-screen="release"] .topnav__link { flex:1; justify-content:center; padding:0 8px; font-size:13px; }
  .topnav__link::after { left:8px; right:8px; bottom:3px; }
  .topbar::before { background:rgba(10,7,9,.94); }
}
