:root {
  color-scheme: dark;
  --night: #080b1d;
  --night-soft: #10142e;
  --night-raised: #171b39;
  --ink: #f1efff;
  --muted: #a6a8c4;
  --subtle: #747995;
  --line: rgba(196, 184, 255, .18);
  --violet: #ad8cff;
  --pink: #e4a3dc;
  --mint: #9ce5d3;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  font-family: var(--sans);
  background: var(--night);
  color: var(--ink);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
body { margin: 0; background: var(--night); color: var(--ink); }
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }
::selection { color: var(--night); background: #c8aaff; }
:focus-visible { outline: 2px solid #d6c6ff; outline-offset: 4px; }

.skip-link {
  position: fixed; z-index: 20; top: -4rem; left: 1rem; padding: .8rem 1rem;
  border-radius: .5rem; background: #f1efff; color: var(--night);
}
.skip-link:focus { top: 1rem; }
.site-header {
  position: absolute; z-index: 10; top: 0; left: 0; width: 100%; height: 82px;
  display: flex; align-items: center; justify-content: space-between; padding: 0 6vw;
  border-bottom: 1px solid rgba(200, 190, 255, .1);
}
.wordmark { display: inline-flex; align-items: center; gap: .6rem; font-size: 1.12rem; font-weight: 700; letter-spacing: -.055em; }
.wordmark-mark {
  display: grid; place-items: center; width: 29px; height: 29px; border: 1px solid rgba(194, 171, 255, .55);
  border-radius: 10px 10px 10px 4px; color: #c1a6ff; font-size: 1rem; font-weight: 800;
}
.site-header nav { display: flex; gap: clamp(1rem, 2.6vw, 2.6rem); color: #b2b4cd; font-size: .72rem; }
.site-header nav a, .site-footer > a:last-child { transition: color .2s ease; }
.site-header nav a:hover, .site-footer > a:last-child:hover { color: #d4bfff; }
.header-cta, .closing-cta, .dialog-action {
  border: 1px solid rgba(206, 189, 255, .43); border-radius: 99px; background: rgba(139, 105, 225, .15);
  color: #eee8ff; padding: .72rem 1.1rem; font-size: .71rem; cursor: pointer; transition: background .2s, border-color .2s, transform .2s;
}
.header-cta:hover, .closing-cta:hover, .dialog-action:hover { transform: translateY(-2px); border-color: #c8adff; background: rgba(156, 119, 243, .3); }
.header-cta span, .closing-cta span { margin-left: .4rem; }

.hero {
  position: relative; min-height: min(900px, 100svh); min-height: max(720px, 100svh); overflow: hidden;
  display: grid; grid-template-columns: 1fr 1fr; align-items: center; padding: 6rem 10vw 5.5rem;
  background: radial-gradient(ellipse at 76% 48%, rgba(96, 59, 173, .21), transparent 36%), var(--night);
}
.hero-grid, .scene-grid {
  position: absolute; inset: 0; pointer-events: none; opacity: .23;
  background-image: linear-gradient(rgba(151, 137, 214, .1) 1px, transparent 1px), linear-gradient(90deg, rgba(151, 137, 214, .1) 1px, transparent 1px);
  background-size: 72px 72px; mask-image: linear-gradient(90deg, transparent, #000 70%);
}
.hero-copy { position: relative; z-index: 1; max-width: 600px; padding-top: 2rem; }
.eyebrow { margin: 0; color: #a99ed0; font-size: .64rem; font-weight: 600; letter-spacing: .17em; text-transform: uppercase; }
.status-dot { display: inline-block; width: 7px; height: 7px; margin-right: .55rem; border-radius: 50%; background: #bd9bff; box-shadow: 0 0 15px #a580ff; vertical-align: 1px; }
.hero h1, .story-intro h2, .chapter-card h2, .closing h2, .status-dialog h2 {
  margin: 1.6rem 0 1.35rem; font-size: clamp(4rem, 7.6vw, 7.8rem); font-weight: 520; line-height: .92; letter-spacing: -.085em;
}
.hero h1 em, .story-intro h2 em, .chapter-card h2 em, .closing h2 em, .status-dialog h2 em {
  color: #c1a3ff; font-family: var(--serif); font-weight: 400; letter-spacing: -.075em;
}
.hero h1 em { background: linear-gradient(100deg, #d0b8ff 5%, #a480f0 65%, #df9fdf); background-clip: text; color: transparent; }
.hero-intro { max-width: 390px; color: #b5b6cf; font-size: .94rem; line-height: 1.8; }
.text-link { display: inline-flex; gap: .9rem; align-items: center; margin-top: 1.8rem; padding-bottom: .45rem; border-bottom: 1px solid rgba(206, 189, 255, .48); font-size: .73rem; }
.text-link span { color: #c2a8ff; }
.hero-art { position: relative; min-height: min(580px, 72vh); display: grid; place-items: center; }
.hero-octopus { z-index: 1; width: min(100%, 550px); overflow: visible; filter: drop-shadow(0 24px 48px rgba(106, 68, 201, .24)); }
.hero-orbit { position: absolute; width: min(91%, 570px); aspect-ratio: 1; border: 1px solid rgba(180, 160, 235, .18); border-radius: 50%; }
.hero-orbit-one::before, .hero-orbit-two::before { content: ""; position: absolute; top: 11%; left: 18%; width: 5px; height: 5px; border-radius: 50%; background: #d3baff; box-shadow: 0 0 15px #c099ff; }
.hero-orbit-two { width: min(66%, 410px); border-style: dashed; border-color: rgba(199, 174, 255, .22); transform: rotate(26deg); }
.hero-orbit-two::before { top: 70%; left: 93%; background: #f4b4df; }
.hero-caption { position: absolute; right: 1%; bottom: 11%; color: #969ab9; font-size: .61rem; letter-spacing: .12em; text-transform: uppercase; }
.hero-caption i { display: inline-block; width: 5px; height: 5px; margin-right: .5rem; border-radius: 50%; background: #ae91ff; }
.hero-foot { position: absolute; right: 10vw; bottom: 2.2rem; left: 10vw; display: flex; justify-content: space-between; padding-top: .8rem; border-top: 1px solid var(--line); color: #737995; font-size: .63rem; letter-spacing: .04em; }

.story-intro { min-height: 54vh; display: grid; align-content: center; justify-items: center; padding: 7rem 1.5rem 5rem; text-align: center; background: linear-gradient(180deg, var(--night), #0b0d23); }
.story-intro h2 { margin: 1.25rem 0; font-size: clamp(3rem, 5.8vw, 5.6rem); }
.story-intro > p:last-child { max-width: 420px; margin: 0; color: var(--muted); font-size: .82rem; line-height: 1.75; }

.story-stage { position: relative; isolation: isolate; background: #0b0d22; }
.scene-pin { position: sticky; z-index: 0; top: 0; height: 100svh; min-height: 590px; margin-bottom: -100svh; overflow: hidden; background: radial-gradient(ellipse at 50% 53%, rgba(70, 48, 130, .34), transparent 42%), #0b0d22; }
.scene-grid { opacity: .18; background-size: 56px 56px; mask-image: radial-gradient(ellipse at center, #000, transparent 78%); }
.scene-halo { position: absolute; top: 50%; left: 50%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%); pointer-events: none; }
.halo-outer { width: min(77vh, 64vw); background: radial-gradient(circle, rgba(111, 69, 205, .14), rgba(111, 69, 205, .04) 52%, transparent 72%); }
.halo-inner { width: min(41vh, 34vw); border: 1px solid rgba(195, 172, 255, .14); box-shadow: 0 0 65px rgba(134, 84, 240, .1), inset 0 0 48px rgba(134, 84, 240, .08); }
.scene-orbit { position: absolute; top: 50%; left: 50%; width: min(57vh, 48vw); aspect-ratio: 1; border: 1px solid rgba(196, 174, 255, .22); border-radius: 50%; transform: translate(-50%, -50%) rotate(-22deg); }
.orbit-b { width: min(69vh, 57vw); border-color: rgba(164, 136, 240, .11); border-style: dashed; transform: translate(-50%, -50%) rotate(51deg) scaleY(.75); }
.scene-orbit::after { content: ""; position: absolute; top: 7%; right: 18%; width: 5px; height: 5px; border-radius: 50%; background: #d4b5ff; box-shadow: 0 0 14px #a980ff; }
.orbit-b::after { top: 73%; right: 2%; background: #f3aadd; }
.scene-crosshair { position: absolute; top: 50%; left: 50%; width: min(82vh, 80vw); height: 1px; background: linear-gradient(90deg, transparent, rgba(172, 149, 235, .18), transparent); transform: translate(-50%, -50%) rotate(45deg); }
.crosshair-b { transform: translate(-50%, -50%) rotate(-45deg); opacity: .48; }
.scene-octopus-wrap { position: absolute; top: 50%; left: 50%; width: min(62vh, 49vw); aspect-ratio: 1; transform: translate(-50%, -50%); }
.scene-octopus { display: block; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 16px 28px rgba(127, 87, 232, .22)); }
.scene-octopus [data-tentacles] { transform-box: view-box; transform-origin: 50% 50%; }
.scene-octopus [data-octopus-face] { transform-box: view-box; transform-origin: 50% 50%; }
.scene-readout { position: absolute; right: 6vw; bottom: 3rem; display: flex; align-items: center; gap: .7rem; color: #777d9e; font-size: .57rem; letter-spacing: .15em; }
.scene-readout span:first-child { color: #d1b7ff; }
.scene-readout i { width: 32px; height: 1px; background: #5c4b84; }
.scene-progress { position: absolute; bottom: 0; left: 0; width: 100%; height: 2px; background: rgba(174, 150, 233, .13); }
.scene-progress span { display: block; width: 100%; height: 100%; background: linear-gradient(90deg, #8a66e5, #d7a4e8); transform: scaleX(var(--story-progress, 0)); transform-origin: left; }

.chapter-track { position: relative; z-index: 1; }
.mobile-octopus-interlude { display: none; }
.story-chapter { position: relative; min-height: 100svh; min-height: max(640px, 100svh); display: grid; align-items: center; padding: 5rem 7vw; scroll-margin-top: 0; }
.chapter-card { width: min(32vw, 430px); padding: clamp(1.5rem, 3.1vw, 3rem); border: 1px solid rgba(193, 176, 255, .24); background: linear-gradient(145deg, rgba(20, 23, 50, .96), rgba(14, 16, 37, .91)); box-shadow: 0 26px 80px rgba(2, 3, 14, .32); }
.chapter-face { display: contents; }
.chapter-example-heading, .chapter-example-context { display: none; }
.visually-hidden { display: block; position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
html.scene-enhanced .chapter-card { position: fixed; z-index: 3; top: clamp(3.5rem, calc((100svh - 34rem) / 2), 10rem); transform: translate3d(var(--card-offset, 0vw), 0, 0); opacity: var(--card-opacity, 1); }
html.scene-enhanced .story-chapter[data-card-side="left"] .chapter-card { right: auto; left: 7vw; }
html.scene-enhanced .story-chapter[data-card-side="right"] .chapter-card { right: 7vw; left: auto; }
html.scene-enhanced .story-chapter[inert] .chapter-card { pointer-events: none; }
.story-chapter[data-card-side="right"] { justify-items: end; }
.chapter-index { display: flex; align-items: center; gap: .55rem; margin: 0 0 1.8rem; color: #8287a7; font-size: .58rem; letter-spacing: .15em; }
.chapter-index span { color: #d1b4ff; font-size: .73rem; }
.chapter-index i { width: 26px; height: 1px; margin-left: .25rem; background: #725ba5; }
.chapter-card h2 { margin: 0 0 1.1rem; font-size: clamp(2.55rem, 4.1vw, 4.35rem); line-height: .99; }
.chapter-card h2 em { color: #c2a6ff; }
.story-chapter:nth-child(2) .chapter-card h2 em { color: #f0b1df; }
.story-chapter:nth-child(3) .chapter-card h2 em { color: #a8dcca; }
.story-chapter:nth-child(4) .chapter-card h2 em { color: #f0c787; }
.chapter-face-front > p:not(.chapter-index) { max-width: 390px; margin: 0; color: #b4b6cf; font-size: .78rem; line-height: 1.8; }
.chapter-visual { margin-top: 1.45rem; padding: 1.05rem 1.15rem; border: 1px solid rgba(191, 177, 245, .16); background: rgba(101, 79, 163, .1); }
.account-visual > span { display: flex; align-items: center; min-height: 37px; gap: .55rem; color: #ded9f3; font-size: .67rem; }
.account-visual > span b { margin-left: auto; color: #aaa0cc; letter-spacing: .1em; }
.visual-icon { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; background: rgba(160, 132, 226, .2); color: #d1b4ff; font-style: normal; }
.chapter-visual small { display: block; margin-top: .65rem; color: #898da9; font-size: .55rem; }
.category-visual { display: grid; gap: .8rem; }
.category-visual > span { display: grid; grid-template-columns: 95px 1fr 20px; gap: .6rem; align-items: center; color: #dcd8ef; font-size: .62rem; }
.category-visual > span i { height: 4px; border-radius: 4px; background: linear-gradient(90deg, #c698ec var(--fill), rgba(198, 152, 236, .15) var(--fill)); }
.category-visual > span b { color: #797f9d; font-size: .52rem; font-weight: 500; }
.goal-visual > span { display: flex; justify-content: space-between; color: #ded8ef; font-size: .6rem; letter-spacing: .08em; }
.goal-visual > span i { color: #a5e0d2; font-size: 1rem; font-style: normal; }
.goal-visual > div { height: 5px; margin: 1.1rem 0 .7rem; border-radius: 5px; background: rgba(173, 151, 221, .16); }
.goal-visual > div b { display: block; width: 64%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #7c67de, #b89aff); }
.goal-visual small { display: flex; justify-content: space-between; margin: 0; }
.goal-visual strong { color: #a4dfd0; font-weight: 500; }
.perspective-visual { display: flex; align-items: flex-start; gap: .85rem; }
.perspective-mark { color: #f0c787; font-size: 1.35rem; }
.perspective-visual p { margin: 0; color: #d1cee3; font-size: .65rem; line-height: 1.7; }
.chapter-next { display: inline-flex; align-items: center; gap: .65rem; margin-top: 1.35rem; color: #c2b0ec; font-size: .62rem; }
.chapter-next span { color: #e4c2ec; transition: transform .2s ease; }
.chapter-next:hover span { transform: translateX(4px); }

@media (min-width: 1001px) and (prefers-reduced-motion: no-preference) {
  .story-chapter { min-height: 200svh; min-height: max(1200px, 200svh); align-items: start; padding-top: clamp(3.5rem, calc((100svh - 34rem) / 2), 10rem); }
  .chapter-card { position: sticky; top: clamp(3.5rem, calc((100svh - 34rem) / 2), 10rem); }
}

.story-stage[data-active-chapter="1"] { --chapter-glow: rgba(137, 76, 169, .15); }
.story-stage[data-active-chapter="2"] { --chapter-glow: rgba(70, 142, 126, .15); }
.story-stage[data-active-chapter="3"] { --chapter-glow: rgba(165, 120, 68, .16); }
.story-stage[data-active-chapter] .scene-pin { background-image: radial-gradient(ellipse at 50% 53%, var(--chapter-glow, rgba(70, 48, 130, .34)), transparent 45%); }

.closing { position: relative; overflow: hidden; padding: 8rem 1.5rem 7rem; border-top: 1px solid var(--line); background: #0c0f26; text-align: center; }
.closing-glow { position: absolute; top: -220px; left: 50%; width: 500px; height: 430px; border-radius: 50%; background: rgba(111, 74, 191, .12); transform: translateX(-50%); pointer-events: none; }
.closing > *:not(.closing-glow) { position: relative; }
.closing .eyebrow { color: #b69be9; }
.closing h2 { margin: 1.4rem 0; font-size: clamp(3.35rem, 6vw, 6.3rem); }
.closing h2 em { color: #d1a7e3; }
.closing > p:not(.eyebrow) { max-width: 410px; margin: 0 auto 1.6rem; color: #aaadc6; font-size: .77rem; line-height: 1.8; }
.closing-cta { margin-top: .25rem; }
.honesty-note { margin-top: 1.15rem !important; color: #7e829e !important; font-size: .61rem !important; }
.site-footer { display: flex; align-items: center; justify-content: space-between; padding: 1.6rem 6vw; border-top: 1px solid rgba(197, 185, 245, .12); color: #7e829e; font-size: .61rem; }
.site-footer p { margin: 0; }
.site-footer .wordmark { color: #e8e5f7; }

.status-dialog { position: fixed; width: min(500px, calc(100% - 2rem)); padding: 3rem; border: 1px solid rgba(203, 185, 255, .28); background: #14172f; color: var(--ink); box-shadow: 0 32px 100px rgba(0, 0, 0, .6); }
.status-dialog::backdrop { background: rgba(3, 4, 16, .78); }
.dialog-close { position: absolute; top: 1rem; right: 1rem; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; background: transparent; font-size: 1.3rem; cursor: pointer; }
.dialog-spark { color: #c3a3ff; font-size: 1.35rem; }
.status-dialog .eyebrow { margin-top: 1rem; }
.status-dialog h2 { margin: 1rem 0; font-size: clamp(2.7rem, 6vw, 4.1rem); }
.status-dialog h2 em { color: #d2a9e6; }
.status-dialog > p:not(.eyebrow) { color: #afb1ca; font-size: .78rem; line-height: 1.8; }
.dialog-action { margin-top: .8rem; }
.noscript-note { position: fixed; z-index: 12; right: 1rem; bottom: 1rem; max-width: 300px; padding: .8rem 1rem; border: 1px solid var(--line); background: #171a34; color: #b8b9cf; font-size: .63rem; line-height: 1.6; }

@media (max-width: 900px) {
  .site-header { padding: 0 4vw; }
  .site-header nav { gap: 1rem; }
  .hero { padding-right: 6vw; padding-left: 6vw; }
  .hero h1 { font-size: clamp(4rem, 9vw, 6.2rem); }
  .scene-octopus-wrap { width: min(62vh, 53vw); }
  .chapter-card { width: min(33vw, 370px); padding: 1.3rem; }
  .chapter-card h2 { font-size: clamp(2.4rem, 4.4vw, 3.65rem); }
}

@media (min-width: 901px) and (max-width: 1000px) {
  .chapter-card { width: min(33vw, 370px); padding: 1.35rem; }
}

@media (min-width: 681px) and (max-width: 1000px) {
  .scene-pin { position: relative; top: auto; height: min(65vw, 430px); min-height: 320px; margin: 0; }
  .story-chapter, .story-chapter[data-card-side="right"] { min-height: 85svh; align-items: center; justify-items: center; padding: 3rem 5vw; }
  .chapter-card { width: min(100%, 600px); }
}

@media (min-width: 1001px) {
  .chapter-card { width: min(28vw, 380px); padding: clamp(1.35rem, 2.5vw, 2.4rem); }
}

@media (max-width: 680px) {
  html { scroll-padding-top: 4rem; }
  .site-header { height: 68px; padding: 0 1.15rem; }
  .site-header nav { display: none; }
  .header-cta { padding: .62rem .8rem; font-size: .62rem; }
  .hero { min-height: 860px; grid-template-columns: 1fr; align-content: start; padding: 7.5rem 1.45rem 4.2rem; }
  .hero-copy { padding: 0; }
  .hero h1 { margin: 1.4rem 0 1rem; font-size: clamp(3.7rem, 16vw, 5.7rem); }
  .hero-intro { max-width: 330px; font-size: .81rem; }
  .text-link { margin-top: 1.2rem; }
  .hero-art { min-height: 380px; margin-top: .5rem; }
  .hero-octopus { width: min(94%, 410px); }
  .hero-orbit { width: min(100%, 390px); }
  .hero-orbit-two { width: min(71%, 280px); }
  .hero-caption { right: 0; bottom: 4%; font-size: .5rem; }
  .hero-foot { right: 1.45rem; bottom: 1.2rem; left: 1.45rem; font-size: .55rem; }
  .story-intro { min-height: 440px; padding: 5.5rem 1.5rem; }
  .story-intro h2 { font-size: clamp(2.8rem, 13vw, 4.3rem); }
  .story-stage { padding-top: 0; }
  .scene-pin { position: relative; top: auto; height: min(74vw, 310px); min-height: 250px; margin: 0; }
  .scene-halo { top: 50%; width: 72vw; }
  .halo-inner { width: 40vw; }
  .scene-orbit { width: 56vw; }
  .orbit-b { width: 68vw; }
  .scene-octopus-wrap { width: min(69vw, 280px); }
  .scene-readout { right: 1.2rem; bottom: 1rem; font-size: .49rem; }
  .scene-progress { position: absolute; }
  .story-chapter, .story-chapter[data-card-side="right"] { min-height: 0; min-height: max(590px, 87svh); align-items: center; justify-items: center; padding: 1rem 1.1rem 3rem; scroll-margin-top: 0; }
  .chapter-card { width: min(100%, 470px); padding: 1.5rem; background: rgba(19, 22, 47, .97); }
  .chapter-index { margin-bottom: 1.25rem; }
  .chapter-card h2 { font-size: clamp(2.8rem, 12vw, 4rem); }
  .chapter-face-front > p:not(.chapter-index) { font-size: .75rem; }
  .chapter-visual { margin-top: 1.15rem; }
  .chapter-next { margin-top: 1.05rem; }
  .closing { padding: 6rem 1.4rem 5rem; }
  .closing h2 { font-size: clamp(3.1rem, 13vw, 4.7rem); }
  .site-footer { display: grid; grid-template-columns: 1fr auto; gap: .8rem; padding: 1.5rem 1.2rem; }
  .site-footer p { grid-column: 1 / -1; grid-row: 2; }
  .status-dialog { padding: 2.4rem 1.55rem; }
}

@media (max-width: 1000px) {
  .scene-pin { position: relative; top: auto; display: block; height: min(35svh, 260px); min-height: 210px; margin: 0; }
  .scene-octopus-wrap { top: 50%; width: min(58vw, 220px, 30svh); }
  .story-chapter, .story-chapter[data-card-side="right"] { min-height: 0; align-items: center; justify-items: center; padding: 3rem 1.4rem 4rem; scroll-margin-top: 0; }
  .chapter-card { width: min(100%, 600px); }
      .chapter-example-context { display: block; max-width: 42ch; margin: 0 0 .85rem; color: #b4b6cf; font-size: .8rem; line-height: 1.45; }
  html.scene-mobile-layout .scene-pin { position: sticky; top: 0; z-index: 0; height: 100svh; min-height: 0; margin-bottom: -100svh; }
  html.scene-mobile-layout .scene-octopus-wrap { top: 23svh; width: min(56vw, 220px, 28svh); }
  html.scene-mobile-layout .story-chapter { min-height: 100svh; padding: 0; }
  html.scene-mobile-layout .chapter-card { position: sticky; top: 38svh; align-self: start; height: var(--mobile-card-height); max-height: none; overflow: visible; padding: 0; border: 0; box-shadow: none; perspective: 1000px; transform-style: preserve-3d; background: transparent; }
  html.scene-mobile-layout .chapter-index { margin-bottom: .75rem; }
  html.scene-mobile-layout .chapter-card h2 { margin-bottom: .7rem; font-size: clamp(1.85rem, 8vw, 2.7rem); line-height: 1.02; }
  html.scene-mobile-layout .chapter-face-front > p:not(.chapter-index) { font-size: .88rem; line-height: 1.5; }
  html.scene-mobile-layout .chapter-next { margin-top: .85rem; }
  @media (prefers-reduced-motion: no-preference) {
    html.scene-mobile-layout .chapter-face { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: stretch; padding: 1rem; overflow: hidden; border: 1px solid rgba(193, 176, 255, .24); border-radius: 2px; background: rgba(19, 22, 47, .98); backface-visibility: hidden; -webkit-backface-visibility: hidden; transform-style: preserve-3d; transition: transform .48s cubic-bezier(.2,.7,.2,1); }
    html.scene-mobile-layout .chapter-face-front { transform: rotateY(0deg); }
    html.scene-mobile-layout .chapter-face-back { transform: rotateY(180deg); }
    html.scene-mobile-layout .chapter-card[data-mobile-face="back"] .chapter-face-front { transform: rotateY(-180deg); }
    html.scene-mobile-layout .chapter-card[data-mobile-face="back"] .chapter-face-back { transform: rotateY(0deg); }
    html.scene-mobile-layout .chapter-visual { margin-top: auto; }
    html.scene-mobile-layout .chapter-face-back .chapter-visual { margin-top: .2rem; }
    html.scene-mobile-layout .chapter-next { display: none; }
    html.scene-mobile-layout.scene-mobile-measuring .chapter-card { position: fixed; z-index: 3; top: 38svh; left: 50%; width: min(calc(100% - 2.2rem), 600px); height: auto; min-height: 0; padding: 1rem; border: 1px solid rgba(193, 176, 255, .24); background: rgba(19, 22, 47, .98); transform: translate(-50%, 0); }
    html.scene-mobile-layout.scene-mobile-measuring .chapter-face { position: static; inset: auto; transform: none; }
    html.scene-mobile-enhanced .chapter-card { position: fixed; z-index: 3; top: 38svh; right: auto; bottom: auto; left: 50%; width: min(calc(100% - 2.2rem), 600px); transform: translate(-50%, 0); opacity: 1; transition: opacity .18s ease, transform .18s ease; }
    html.scene-mobile-enhanced .chapter-example-context { display: block; max-width: 42ch; margin: 0 0 .85rem; color: #b4b6cf; font-size: .8rem; line-height: 1.45; }
    html.scene-mobile-enhanced .story-chapter[inert] .chapter-card { pointer-events: none; opacity: 0; transform: translate(-50%, 12px); }
  }
}

@media (max-width: 680px) {
  .story-chapter, .story-chapter[data-card-side="right"] { padding: 2rem 1.1rem 3.2rem; }
  .chapter-card { width: min(100%, 470px); }
}

@media (prefers-reduced-motion: reduce) {
  html.scene-mobile-layout .scene-pin { position: relative; top: auto; height: min(35svh, 260px); min-height: 210px; margin-bottom: 0; }
  html.scene-mobile-enhanced .chapter-card { position: static; transform: none; opacity: 1; }
  html.scene-mobile-enhanced .chapter-face { position: static; display: contents; transform: none; }
}

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

@media (prefers-reduced-motion: reduce) {
  .scene-octopus [data-tentacles] { transform: none !important; }
}
