:root {
  color-scheme: dark;
  --night: #02060c;
  --deep: #07131f;
  --ivory: #f4efe5;
  --mist: rgba(231, 239, 240, .58);
  --dim: rgba(244, 239, 229, .34);
  --gold: #d8bb83;
  --gold-soft: rgba(216, 187, 131, .2);
  --ice: #a9d5e2;
  --line: rgba(255, 255, 255, .12);
  --bass: .16;
  --mid: .12;
  --high: .1;
}

* { box-sizing: border-box; }
html, body { width: 100%; min-height: 100%; margin: 0; }
html { background: var(--night); }
body {
  overflow: hidden;
  background: var(--night);
  color: var(--ivory);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
body.dialog-open { overflow: hidden; }
button, a { color: inherit; font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible { outline: 1px solid var(--gold); outline-offset: 5px; }
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: 99px; background: var(--ivory); color: var(--night); text-decoration: none; transition: top .2s; }
.skip-link:focus { top: 16px; }

#starfield { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; }
.aurora {
  position: fixed;
  inset: -20%;
  z-index: 1;
  pointer-events: none;
  opacity: .8;
  background:
    radial-gradient(ellipse at 22% 18%, rgba(31, 93, 122, .18), transparent 34%),
    radial-gradient(ellipse at 84% 67%, rgba(137, 95, 57, .1), transparent 32%),
    linear-gradient(180deg, transparent 45%, rgba(2, 6, 12, .72));
  animation: auroraDrift 18s ease-in-out infinite alternate;
}
.frequency-wash { position: fixed; inset: 0; z-index: 2; pointer-events: none; opacity: 0; background: radial-gradient(circle at 65% 45%, rgba(169, 213, 226, .22), transparent 50%); mix-blend-mode: screen; }
.grain {
  position: fixed;
  inset: -50%;
  z-index: 70;
  pointer-events: none;
  opacity: .028;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
  animation: grainMove .25s steps(2) infinite;
}

.intro {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: radial-gradient(circle at 50% 42%, rgba(15, 37, 55, .66), transparent 32%), #02050a;
  transition: opacity 1.15s ease, visibility 1.15s;
}
.intro::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(78vw, 780px);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, .035);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.intro.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.intro-copy { position: relative; z-index: 2; width: min(88vw, 720px); text-align: center; }
.micro, .eyebrow { margin: 0; color: rgba(216, 187, 131, .74); font-size: 10px; letter-spacing: .29em; }
.intro h1, .sky-copy h2, .room-copy h2, .finale-copy h2, .memory-story h2 {
  font-family: Georgia, "Songti SC", "STSong", serif;
  font-weight: 400;
  letter-spacing: -.055em;
}
.intro h1 { margin: 28px 0 0; font-size: clamp(47px, 7.2vw, 104px); line-height: 1.02; }
.intro h1 em, .sky-copy h2 em, .room-copy h2 em, .finale-copy h2 em { color: rgba(244, 239, 229, .57); font-style: normal; }
.intro-lead { margin: 26px 0 0; color: var(--mist); font-family: Georgia, "Songti SC", serif; font-size: 15px; letter-spacing: .08em; }
.round-action, .room-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-width: 178px;
  height: 58px;
  margin-top: 38px;
  padding: 0 22px 0 26px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  background: rgba(255, 255, 255, .035);
  color: rgba(255, 255, 255, .82);
  cursor: pointer;
  font-size: 12px;
  letter-spacing: .14em;
  backdrop-filter: blur(14px);
  transition: border-color .35s, background .35s, transform .35s;
}
.round-action:hover, .room-action:hover { border-color: rgba(216, 187, 131, .52); background: rgba(216, 187, 131, .08); transform: translateY(-2px); }
.round-action svg, .room-action svg { width: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.sound-note { margin: 14px 0 0; color: rgba(255,255,255,.23); font-size: 9px; letter-spacing: .12em; }
.intro-orbit { position: absolute; inset: 0; pointer-events: none; }
.intro-orbit i { position: absolute; display: block; width: 4px; height: 4px; border-radius: 50%; background: white; box-shadow: 0 0 18px 5px rgba(169,213,226,.38); }
.intro-orbit i:nth-child(1) { left: 18%; top: 28%; animation: starBreath 3.2s ease-in-out infinite; }
.intro-orbit i:nth-child(2) { right: 22%; top: 24%; animation: starBreath 4s .8s ease-in-out infinite; }
.intro-orbit i:nth-child(3) { right: 16%; bottom: 22%; animation: starBreath 3.6s 1.4s ease-in-out infinite; }

.app { position: relative; z-index: 5; min-height: 100dvh; opacity: 0; visibility: hidden; transition: opacity 1.1s .25s ease, visibility 1.1s; }
.app.is-visible { opacity: 1; visibility: visible; }
.chrome {
  position: fixed;
  left: clamp(22px, 4vw, 64px);
  right: clamp(22px, 4vw, 64px);
  top: max(22px, env(safe-area-inset-top));
  z-index: 25;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  pointer-events: none;
}
.brand { display: inline-flex; width: max-content; align-items: center; gap: 11px; color: rgba(255,255,255,.48); font: 9px/1.28 Georgia, serif; letter-spacing: .18em; text-decoration: none; pointer-events: auto; }
.brand-star { color: var(--gold); font-size: 17px; }
.chapter-label { justify-self: center; color: rgba(255,255,255,.28); font-size: 9px; letter-spacing: .28em; }
.chrome-actions { justify-self: end; display: flex; align-items: center; gap: 14px; pointer-events: auto; }
.memory-count { color: rgba(255,255,255,.32); font: 10px/1 Georgia, serif; letter-spacing: .14em; }
.memory-count b { color: var(--gold); font-size: 14px; font-weight: 400; }
.icon-button { width: 38px; height: 38px; padding: 0; border: 1px solid rgba(255,255,255,.09); border-radius: 50%; background: rgba(4,9,15,.28); cursor: pointer; backdrop-filter: blur(12px); }
.icon-button svg { width: 17px; fill: none; stroke: rgba(255,255,255,.58); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.sound-button.is-muted .sound-wave { opacity: .15; }

.scene-nav {
  position: fixed;
  left: clamp(22px, 4vw, 64px);
  bottom: max(26px, env(safe-area-inset-bottom));
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 13px;
}
.scene-nav-button { display: flex; align-items: baseline; gap: 7px; padding: 0; border: 0; background: none; color: rgba(255,255,255,.22); cursor: pointer; }
.scene-nav-button span { font: 9px/1 Georgia, serif; }
.scene-nav-button b { font-size: 10px; font-weight: 400; letter-spacing: .16em; }
.scene-nav-button.is-active { color: rgba(255,255,255,.78); }
.scene-nav-button.is-active span { color: var(--gold); }
.scene-nav-button:disabled { cursor: not-allowed; opacity: .55; }
.scene-nav > i { width: 36px; height: 1px; background: rgba(255,255,255,.13); }
.scene-nav small { position: absolute; left: 0; bottom: 23px; width: max-content; color: rgba(255,255,255,.2); font-size: 8px; letter-spacing: .08em; opacity: 0; transition: opacity .2s; }
.scene-nav:has(.scene-nav-button:disabled:hover) small { opacity: 1; }

.scenes, .scene { position: absolute; inset: 0; }
.scene { visibility: hidden; opacity: 0; pointer-events: none; transition: opacity 1s ease, visibility 1s; }
.scene.is-active { visibility: visible; opacity: 1; pointer-events: auto; }
.sky-scene { overflow: hidden; }
.sky-copy { position: absolute; left: clamp(28px, 7vw, 112px); top: 50%; z-index: 4; width: min(34vw, 460px); transform: translateY(-50%); }
.sky-copy h2 { margin: 24px 0 0; font-size: clamp(48px, 5.5vw, 84px); line-height: 1.03; }
.sky-copy > p:not(.eyebrow) { margin: 28px 0 0; color: var(--mist); font-size: 13px; line-height: 2; letter-spacing: .04em; }
.progress-copy { width: min(270px, 100%); margin-top: 36px; color: rgba(255,255,255,.3); font-size: 9px; letter-spacing: .12em; }
.progress-track { display: block; width: 100%; height: 1px; margin-top: 13px; overflow: hidden; background: rgba(255,255,255,.09); }
.progress-track i { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--ice), var(--gold)); box-shadow: 0 0 10px var(--ice); transition: width .6s ease; }

.constellation-field { position: absolute; right: clamp(3vw, 6vw, 94px); top: 50%; width: min(58vw, 880px); height: min(78vh, 720px); transform: translateY(-50%); }
.constellation { position: absolute; width: clamp(330px, 31vw, 470px); aspect-ratio: 1.4; }
.constellation-leo { right: 0; top: 0; }
.constellation-pisces { left: 0; bottom: 0; transform: scale(.9); transform-origin: left bottom; }
.constellation-heading { position: absolute; left: 3%; top: 1%; z-index: 2; pointer-events: none; }
.constellation-heading span { display: block; color: rgba(255,255,255,.44); font: 13px/1 Georgia, serif; letter-spacing: .32em; }
.constellation-heading small { display: block; margin-top: 8px; color: rgba(255,255,255,.22); font-size: 8px; letter-spacing: .17em; }
.constellation-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.constellation-lines path { fill: none; stroke: rgba(169,213,226,.14); stroke-width: .8; stroke-dasharray: 2 4; vector-effect: non-scaling-stroke; transition: stroke 1s, filter 1s; }
.constellation:has(.memory-star.is-lit) .constellation-lines path { stroke: rgba(169,213,226,.28); }
.memory-star {
  --band-energy: .1;
  --star-scale: 1.18;
  --glow-small: 16px;
  --glow-large: 34px;
  --glow-spread: 7px;
  position: absolute;
  z-index: 3;
  width: 66px;
  height: 66px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(255,255,255,.32);
  cursor: pointer;
  transform: translate(-50%, -50%);
}
.constellation-leo .star-1 { left: 13.6%; top: 62.6%; }
.constellation-leo .star-2 { left: 54.8%; top: 23.7%; }
.constellation-leo .star-3 { left: 86%; top: 77%; }
.constellation-pisces .star-1 { left: 13%; top: 25%; }
.constellation-pisces .star-2 { left: 49.5%; top: 58.7%; }
.constellation-pisces .star-3 { left: 86.7%; top: 86%; }
.memory-star span { position: absolute; left: 31px; top: 31px; width: 4px; height: 4px; border-radius: 50%; background: #eefafd; box-shadow: 0 0 9px 2px rgba(169,213,226,.58); transition: background .45s, box-shadow .45s, transform .45s; }
.memory-star::before { content: ""; position: absolute; inset: 15px; border: 1px solid rgba(169,213,226,.11); border-radius: 50%; transform: scale(.72); opacity: 0; transition: transform .45s, opacity .45s; }
.memory-star:hover::before, .memory-star:focus-visible::before { transform: scale(1); opacity: 1; }
.memory-star b, .memory-star em { position: absolute; left: 46px; white-space: nowrap; opacity: 0; transform: translateX(-4px); transition: opacity .35s, transform .35s; }
.memory-star b { top: 19px; color: rgba(216,187,131,.76); font: 8px/1 Georgia, serif; letter-spacing: .12em; }
.memory-star em { top: 32px; color: rgba(255,255,255,.38); font-size: 8px; font-style: normal; letter-spacing: .14em; }
.memory-star:hover b, .memory-star:hover em, .memory-star:focus-visible b, .memory-star:focus-visible em, .memory-star.is-lit b, .memory-star.is-lit em { opacity: 1; transform: translateX(0); }
.memory-star.is-lit span { background: #fff4d7; box-shadow: 0 0 9px 3px rgba(255,244,215,.9), 0 0 28px 8px rgba(216,187,131,.42); transform: scale(1.35); }
.memory-star.is-lit::before { border-color: rgba(216,187,131,.25); transform: scale(1.05); opacity: 1; }
.memory-star.is-new::after { content: ""; position: absolute; inset: 20px; border: 1px solid rgba(216,187,131,.7); border-radius: 50%; animation: starReveal 1.2s ease-out forwards; }
.celebrating .constellation-lines path { stroke: rgba(216,187,131,.46); filter: drop-shadow(0 0 5px rgba(216,187,131,.32)); stroke-dasharray: none; }
.celebrating .memory-star.is-lit span { transform: scale(var(--star-scale)); box-shadow: 0 0 var(--glow-small) 4px rgba(255,244,215,.95), 0 0 var(--glow-large) var(--glow-spread) rgba(216,187,131,.52); }
.gesture-hint { position: absolute; right: clamp(26px, 5vw, 76px); bottom: max(28px, env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 11px; color: rgba(255,255,255,.28); font-size: 9px; letter-spacing: .15em; }
.gesture-hint i { width: 30px; height: 1px; background: rgba(255,255,255,.25); }
.text-button { padding: 4px; border: 0; border-bottom: 1px solid rgba(255,255,255,.18); background: none; color: rgba(255,255,255,.45); cursor: pointer; font-size: 9px; letter-spacing: .14em; }
.text-button:hover { color: rgba(255,255,255,.8); border-color: var(--gold); }
.reset-button { position: absolute; right: clamp(26px, 5vw, 76px); bottom: max(54px, calc(env(safe-area-inset-bottom) + 28px)); }

.memory-dialog { width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; color: var(--ivory); overflow: hidden; }
.memory-dialog::backdrop { background: rgba(1, 4, 8, .78); backdrop-filter: blur(16px) saturate(.75); animation: backdropIn .45s ease both; }
.memory-dialog[open] { display: grid; place-items: center; animation: dialogIn .55s cubic-bezier(.2,.75,.2,1) both; }
.memory-card { display: grid; grid-template-columns: minmax(0, 1.34fr) minmax(300px, .86fr); width: min(1040px, 90vw); height: min(680px, 82dvh); overflow: hidden; border: 1px solid rgba(255,255,255,.12); border-radius: 4px; background: #091018; box-shadow: 0 40px 120px rgba(0,0,0,.58); }
.memory-image-button { position: relative; min-width: 0; height: 100%; padding: 0; overflow: hidden; border: 0; background: #05090e; cursor: zoom-out; }
.memory-image-button img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.045); animation: photoDrift 9s ease-out both; }
.image-shade { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(2,5,8,.38)); pointer-events: none; }
.tap-back { position: absolute; left: 22px; bottom: 20px; color: rgba(255,255,255,.5); font-size: 9px; letter-spacing: .16em; opacity: .55; }
.memory-story { display: flex; min-width: 0; flex-direction: column; justify-content: center; padding: clamp(32px, 5vw, 72px); background: radial-gradient(circle at 70% 16%, rgba(53,81,91,.16), transparent 36%), #0a1118; }
.memory-meta { display: flex; justify-content: space-between; gap: 16px; color: rgba(255,255,255,.3); font: 9px/1.4 Georgia, serif; letter-spacing: .12em; }
.memory-meta span:first-child { color: rgba(216,187,131,.74); }
.memory-story h2 { margin: 46px 0 0; font-size: clamp(34px, 3.6vw, 56px); line-height: 1.08; }
.memory-story > p { margin: 28px 0 0; color: rgba(235,238,235,.55); font: 14px/2 Georgia, "Songti SC", serif; }
.memory-footer { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: auto; padding-top: 28px; border-top: 1px solid rgba(255,255,255,.08); color: rgba(255,255,255,.22); font-size: 8px; letter-spacing: .19em; }
.close-memory { display: flex; align-items: center; gap: 10px; padding: 0; border: 0; background: none; color: rgba(255,255,255,.45); cursor: pointer; font-size: 9px; letter-spacing: .08em; }
.close-memory i { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; color: rgba(255,255,255,.64); font: 16px/1 sans-serif; }

.finale { position: fixed; inset: 0; z-index: 45; display: grid; place-items: center; visibility: hidden; opacity: 0; background: radial-gradient(circle at 50% 43%, rgba(12,31,43,.42), rgba(2,6,12,.76) 62%); backdrop-filter: blur(4px); pointer-events: none; transition: opacity 1s ease, visibility 1s; }
.finale.is-visible { visibility: visible; opacity: 1; pointer-events: auto; }
.finale-copy { position: relative; z-index: 2; width: min(90vw, 720px); text-align: center; }
.finale-copy > p:first-child { margin: 0; color: rgba(216,187,131,.72); font: 9px/1 Georgia, serif; letter-spacing: .3em; }
.finale-copy h2 { margin: 26px 0 0; font-size: clamp(46px, 6.8vw, 92px); line-height: 1.03; }
.finale-note { width: min(92%, 460px); margin: 24px auto 0; color: rgba(255,255,255,.42); font-size: 10px; line-height: 1.8; letter-spacing: .08em; }
.room-action { margin-top: 34px; }
.finale-copy > .text-button { display: block; margin: 18px auto 0; }
.finale-ring { position: absolute; left: 50%; top: 50%; width: min(70vw, 680px); aspect-ratio: 1; transform: translate(-50%,-50%); pointer-events: none; }
.finale-ring i { position: absolute; inset: 0; border: 1px solid rgba(169,213,226,.07); border-radius: 50%; animation: finalePulse 3s ease-out infinite; }
.finale-ring i:nth-child(2) { animation-delay: 1s; }
.finale-ring i:nth-child(3) { animation-delay: 2s; }

.room-scene { overflow: hidden; background: #150f0b; }
.room-blur { position: absolute; inset: -4%; background: linear-gradient(90deg, rgba(7,5,4,.42), transparent 42%, rgba(2,3,5,.08)), url("assets/images/room-scene.jpg?v=3") center/cover no-repeat; filter: blur(18px) brightness(.7); transform: scale(1.06); }
.room-frame { position: absolute; left: 50%; top: 50%; width: min(100vw, 150.24dvh); aspect-ratio: 1920 / 1278; transform: translate(-50%,-50%); overflow: hidden; box-shadow: 0 0 90px rgba(0,0,0,.55); }
.room-art { display: block; width: 100%; height: 100%; object-fit: fill; animation: roomBreathe 14s ease-in-out infinite alternate; }
.tv-screen { position: absolute; left: 3.2%; top: 6.4%; width: 28%; height: 23.7%; overflow: hidden; border: 2px solid rgba(28,22,19,.72); border-radius: 3px; background: #02070c; box-shadow: 0 8px 30px rgba(0,0,0,.42), 0 0 18px rgba(52,93,110,.12) inset; }
.tv-screen video { display: none; width: 100%; height: 100%; background: #000; object-fit: cover; }
.tv-screen.has-video video { display: block; }
.tv-placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 100%; border: 0; background: radial-gradient(circle, rgba(25,48,61,.6), #02070c 70%); color: rgba(232,242,244,.45); cursor: default; }
.tv-placeholder.is-playable { cursor: pointer; }
.tv-placeholder b { font-size: clamp(6px, .7vw, 10px); font-weight: 400; letter-spacing: .12em; }
.tv-placeholder small { font-size: clamp(5px, .55vw, 8px); opacity: .5; }
.tv-play { display: grid; width: clamp(20px, 2.2vw, 34px); height: clamp(20px, 2.2vw, 34px); place-items: center; margin-bottom: 3px; border: 1px solid rgba(255,255,255,.17); border-radius: 50%; font-size: clamp(7px, .7vw, 10px); text-indent: 2px; }
.room-vignette { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(3,5,7,.7) 0%, rgba(3,5,7,.18) 41%, transparent 64%), linear-gradient(180deg, rgba(2,3,5,.15), transparent 55%, rgba(2,3,5,.48)); pointer-events: none; }
.room-copy { position: absolute; left: clamp(28px, 6vw, 96px); top: 50%; z-index: 4; width: min(34vw, 470px); transform: translateY(-42%); text-shadow: 0 2px 18px rgba(0,0,0,.45); }
.room-copy h2 { margin: 22px 0 0; font-size: clamp(42px, 5vw, 78px); line-height: 1.03; }
.room-copy > p:not(.eyebrow) { margin: 26px 0 0; color: rgba(247,238,225,.58); font-size: 12px; line-height: 2; letter-spacing: .04em; }
.line-action { display: flex; align-items: center; gap: 13px; margin-top: 28px; padding: 0; border: 0; background: none; color: rgba(255,255,255,.62); cursor: pointer; font-size: 10px; letter-spacing: .15em; }
.line-action:disabled { cursor: default; opacity: .35; }
.line-action i { width: 42px; height: 1px; background: currentColor; transition: width .25s; }
.line-action:not(:disabled):hover i { width: 58px; }
.room-caption { position: absolute; right: clamp(24px, 4vw, 62px); bottom: max(24px, env(safe-area-inset-bottom)); z-index: 4; margin: 0; color: rgba(255,255,255,.3); font: 8px/1 Georgia, serif; letter-spacing: .22em; }

.toast { position: fixed; left: 50%; top: max(74px, calc(env(safe-area-inset-top) + 50px)); z-index: 80; max-width: min(88vw, 420px); padding: 9px 14px; border: 1px solid rgba(255,255,255,.1); border-radius: 999px; background: rgba(4,9,14,.72); color: rgba(255,255,255,.65); font-size: 9px; letter-spacing: .08em; opacity: 0; transform: translate(-50%,-8px); backdrop-filter: blur(14px); transition: opacity .25s, transform .25s; pointer-events: none; }
.toast.is-visible { opacity: 1; transform: translate(-50%,0); }

@keyframes auroraDrift { to { transform: translate3d(3%, -2%, 0) scale(1.04); } }
@keyframes grainMove { 0% { transform: translate(0,0); } 25% { transform: translate(2%,-1%); } 50% { transform: translate(-1%,2%); } 75% { transform: translate(1%,1%); } }
@keyframes starBreath { 50% { transform: scale(1.7); opacity: .44; } }
@keyframes starReveal { to { inset: -7px; opacity: 0; } }
@keyframes backdropIn { from { opacity: 0; } }
@keyframes dialogIn { from { opacity: 0; transform: scale(.97) translateY(14px); } }
@keyframes photoDrift { to { transform: scale(1); } }
@keyframes finalePulse { 0% { transform: scale(.65); opacity: 0; } 28% { opacity: .5; } 100% { transform: scale(1.18); opacity: 0; } }
@keyframes roomBreathe { to { transform: scale(1.012); } }

@media (max-width: 900px) {
  .chrome { grid-template-columns: 1fr auto; }
  .chapter-label { display: none; }
  .sky-copy { top: 19%; width: calc(100% - 56px); transform: none; }
  .sky-copy h2 { font-size: clamp(42px, 9vw, 66px); }
  .sky-copy > p:not(.eyebrow) { margin-top: 18px; line-height: 1.8; }
  .progress-copy { margin-top: 20px; }
  .constellation-field { left: 50%; right: auto; top: auto; bottom: 7%; width: min(96vw, 680px); height: 50vh; transform: translateX(-50%); }
  .constellation { width: min(65vw, 380px); }
  .constellation-leo { right: 0; top: 0; }
  .constellation-pisces { left: 0; bottom: -2%; transform: scale(.78); }
  .gesture-hint { display: none; }
  .memory-card { grid-template-columns: minmax(0,1.05fr) minmax(280px,.95fr); width: 94vw; }
  .room-copy { top: auto; left: 28px; right: 28px; bottom: 12%; width: auto; transform: none; }
  .room-copy h2 { font-size: clamp(38px, 8vw, 62px); }
  .room-vignette { background: linear-gradient(180deg, rgba(2,3,5,.08) 24%, rgba(2,3,5,.22) 54%, rgba(2,3,5,.85) 100%); }
}

@media (max-width: 660px) {
  .intro-copy { transform: translateY(-2vh); }
  .intro h1 { margin-top: 22px; font-size: clamp(43px, 13vw, 64px); }
  .intro-lead { font-size: 13px; }
  .chrome { left: 20px; right: 20px; }
  .brand { font-size: 8px; }
  .scene-nav { left: 20px; bottom: max(20px, env(safe-area-inset-bottom)); }
  .scene-nav small { display: none; }
  .sky-copy { left: 24px; right: 24px; top: 13%; width: auto; }
  .sky-copy .eyebrow { font-size: 8px; }
  .sky-copy h2 { margin-top: 16px; font-size: clamp(39px, 11.4vw, 55px); }
  .sky-copy > p:not(.eyebrow) { margin-top: 14px; font-size: 11px; }
  .progress-copy { width: 220px; margin-top: 14px; }
  .constellation-field { bottom: 7%; height: 46vh; }
  .constellation { width: min(77vw, 335px); }
  .constellation-heading span { font-size: 10px; }
  .constellation-heading small { font-size: 7px; }
  .constellation-leo { right: -8%; top: 0; transform: scale(.82); transform-origin: right top; }
  .constellation-pisces { left: -7%; bottom: 2%; transform: scale(.72); }
  .memory-star { width: 58px; height: 58px; }
  .memory-star span { left: 27px; top: 27px; }
  .memory-star b, .memory-star em { left: 39px; }
  .memory-star b { top: 16px; }
  .memory-star em { top: 28px; }
  .reset-button { right: 20px; bottom: max(44px, calc(env(safe-area-inset-bottom) + 22px)); }

  .memory-dialog[open] { align-items: end; }
  .memory-card { grid-template-columns: 1fr; grid-template-rows: 58dvh minmax(0,1fr); width: 100%; height: 100dvh; border: 0; border-radius: 0; }
  .memory-story { padding: 24px 24px max(26px, env(safe-area-inset-bottom)); }
  .memory-meta { font-size: 8px; }
  .memory-story h2 { margin-top: 18px; font-size: 34px; }
  .memory-story > p { margin-top: 13px; font-size: 12px; line-height: 1.75; }
  .memory-footer { margin-top: 18px; padding-top: 14px; }
  .tap-back { left: 16px; bottom: 14px; }
  .finale-copy h2 { font-size: clamp(42px, 12vw, 62px); }
  .finale-note { font-size: 9px; }

  .room-frame { top: 31%; width: 100vw; }
  .room-blur { background-position: 68% center; filter: blur(12px) brightness(.62); }
  .room-copy { left: 24px; right: 24px; bottom: 13%; }
  .room-copy .eyebrow { font-size: 8px; }
  .room-copy h2 { margin-top: 14px; font-size: clamp(36px, 10.4vw, 50px); }
  .room-copy > p:not(.eyebrow) { margin-top: 14px; font-size: 10px; }
  .line-action { margin-top: 17px; }
  .room-caption { display: none; }
  .tv-placeholder small { display: none; }
}

@media (max-height: 700px) and (min-width: 661px) {
  .sky-copy h2 { font-size: 54px; }
  .constellation-field { height: 84vh; transform: translateY(-45%) scale(.85); transform-origin: right center; }
  .memory-card { height: 88dvh; }
}

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