:root {
  --paper: #f8f3ea;
  --paper-deep: #efe6d8;
  --ink: #344039;
  --ink-soft: #667068;
  --sage: #88a898;
  --sage-deep: #607e70;
  --peach: #eeb9a2;
  --butter: #f2d48b;
  --lilac: #c8bfd9;
  --sky: #bcd2d8;
  --white: #fffdf9;
  --line: rgba(70, 85, 76, 0.16);
  --shadow: 0 22px 55px rgba(83, 73, 59, 0.12);
  font-family: Inter, ui-rounded, "Avenir Next", Avenir, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 12% 4%, rgba(244, 211, 147, 0.48), transparent 31rem),
    radial-gradient(circle at 91% 18%, rgba(185, 211, 216, 0.52), transparent 34rem),
    linear-gradient(145deg, #f8f1e5 0%, #f5f0ec 48%, #eef3ef 100%);
}

button, a { font: inherit; }
button { color: inherit; }

button:focus-visible, a:focus-visible {
  outline: 3px solid rgba(96, 126, 112, 0.42);
  outline-offset: 3px;
}

.paper-grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.22;
  background-image:
    repeating-linear-gradient(7deg, transparent 0 9px, rgba(74, 63, 51, 0.025) 10px 11px),
    repeating-linear-gradient(91deg, transparent 0 13px, rgba(255, 255, 255, 0.3) 14px 15px);
}

.app-shell {
  width: min(100%, 590px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(22px, env(safe-area-inset-top)) 22px max(28px, env(safe-area-inset-bottom));
  background: rgba(255, 253, 249, 0.9);
  box-shadow: 0 0 70px rgba(72, 72, 62, 0.08);
  backdrop-filter: blur(12px);
}

.topbar {
  display: flex;
  align-items: center;
  min-height: 48px;
}

.brand {
  color: #32363a;
  font-weight: 760;
  font-size: 21px;
  letter-spacing: -0.6px;
  text-decoration: none;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 13px;
  padding: 50px 10px 4px;
  color: #798078;
  font-size: 11px;
  text-align: center;
}

.site-footer p { margin: 0; }
.site-footer a { color: inherit; text-underline-offset: 3px; }

.boot-landing.screen { animation: none; }
.boot-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 61px;
  margin-top: 22px;
  border: 1px solid rgba(47, 73, 60, 0.2);
  border-radius: 19px;
  background: rgba(239, 235, 222, 0.72);
  color: #667068;
  font-size: 13px;
  font-weight: 700;
}
.boot-pulse {
  width: 9px;
  height: 9px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--sage-deep);
  box-shadow: 0 0 0 0 rgba(96, 126, 112, 0.34);
  animation: boot-pulse 1.45s ease-out infinite;
}
.boot-progress.boot-delayed .boot-pulse {
  background: var(--peach);
  animation: none;
}
.boot-retry { margin-top: 11px; }

.screen { animation: page-in 0.68s cubic-bezier(.22, .7, .28, 1) both; }
.screen h1[tabindex="-1"]:focus, .screen h2[tabindex="-1"]:focus { outline: none; }

.soft-label {
  margin: 0 0 10px;
  color: var(--sage-deep);
  font-size: 12px;
  font-weight: 780;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

h1, h2, p { text-wrap: pretty; }

.primary-button, .portal-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 61px;
  padding: 0 22px;
  border: 1px solid rgba(47, 73, 60, 0.35);
  border-radius: 19px;
  background: var(--sage-deep);
  box-shadow: 0 8px 0 #d5c9b9, 0 13px 26px rgba(66, 77, 66, 0.16);
  color: #fffdf8;
  cursor: pointer;
  font-size: 16px;
  font-weight: 750;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.primary-button:hover, .portal-button:hover { background: #557264; transform: translateY(-2px); }
.primary-button:active, .portal-button:active { transform: translateY(4px); box-shadow: 0 3px 0 #d5c9b9; }
.primary-button span, .portal-button span { font-size: 23px; font-weight: 400; }

/* Landing */
.landing-screen { padding-top: 12px; }

.invitation-note {
  margin-bottom: 20px;
  padding: 13px 16px;
  border: 1px solid rgba(96, 126, 112, 0.24);
  border-radius: 17px;
  background: #edf4ef;
  color: #50665b;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.landing-world {
  position: relative;
  height: 258px;
  margin: 9px 0 28px;
  overflow: hidden;
  border: 1px solid rgba(77, 91, 82, 0.15);
  border-radius: 38% 38% 28px 28px / 22% 22% 28px 28px;
  background: linear-gradient(#dce9e7 0 61%, #e7dec7 61%);
  box-shadow: inset 0 -15px 30px rgba(103, 88, 63, 0.06), var(--shadow);
}

.sun-glow {
  position: absolute;
  top: -100px;
  left: -80px;
  width: 270px;
  height: 270px;
  border-radius: 50%;
  background: rgba(249, 225, 160, 0.68);
  filter: blur(15px);
}

.window-frame {
  position: absolute;
  top: 25px;
  right: 28px;
  width: 178px;
  height: 146px;
  overflow: hidden;
  border: 8px solid #fffaf1;
  border-radius: 70px 70px 18px 18px;
  background: linear-gradient(#b9d5dc, #e7e5d6);
  box-shadow: 0 4px 0 rgba(91, 82, 70, 0.08);
}

.window-frame::before, .window-frame::after {
  content: "";
  position: absolute;
  z-index: 4;
  background: #fffaf1;
}
.window-frame::before { top: 0; bottom: 0; left: 50%; width: 6px; transform: translateX(-50%); }
.window-frame::after { top: 55%; right: 0; left: 0; height: 6px; }
.window-sun { position: absolute; top: 18px; right: 19px; width: 32px; height: 32px; border-radius: 50%; background: var(--butter); animation: breathe 4s ease-in-out infinite; }
.window-cloud { position: absolute; width: 47px; height: 13px; border-radius: 20px; background: rgba(255,255,255,.75); animation: cloud-drift 9s linear infinite; }
.cloud-one { top: 45px; left: 15px; }
.cloud-two { top: 73px; left: 92px; animation-duration: 12s; animation-delay: -5s; }
.window-hill { position: absolute; bottom: -23px; width: 128px; height: 72px; border-radius: 50% 50% 0 0; background: #9bb7a1; }
.hill-one { left: -28px; }
.hill-two { right: -30px; bottom: -32px; background: #799887; }

.little-person { position: absolute; bottom: -4px; left: 51px; width: 145px; height: 175px; animation: person-sway 4.8s ease-in-out infinite; transform-origin: bottom center; }
.person-face { position: absolute; z-index: 3; top: 5px; left: 25px; width: 91px; height: 89px; border: 3px solid #4b514c; border-radius: 49% 47% 46% 45%; background: #efc2a8; }
.person-face i { position: absolute; top: 43px; width: 5px; height: 7px; border-radius: 50%; background: #4b514c; }
.person-face i:first-child { left: 28px; }
.person-face i:nth-child(2) { right: 28px; }
.person-face b { position: absolute; bottom: 19px; left: 39px; width: 13px; height: 6px; border-bottom: 2px solid #4b514c; border-radius: 50%; }
.person-hair { position: absolute; z-index: 4; top: -1px; left: 24px; width: 96px; height: 54px; border-radius: 50px 50px 22px 20px; background: #69655c; transform: rotate(-4deg); }
.person-hair::after { content:""; position:absolute; right:-2px; bottom:-25px; width:20px; height:50px; border-radius:0 0 20px 20px; background:inherit; }
.person-body { position: absolute; bottom: 0; left: 7px; width: 132px; height: 93px; border: 3px solid #4b514c; border-radius: 58px 58px 12px 12px; background: #bcaaa7; }
.floating-leaf { position: absolute; color: #708e76; font-size: 23px; animation: leaf-float 5s ease-in-out infinite; }
.leaf-one { top: 37px; left: 25px; }
.leaf-two { top: 190px; right: 25px; animation-delay: -2.4s; }

.landing-screen h1 {
  margin: 0 0 17px;
  color: #3e4942;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(41px, 9vw, 58px);
  font-weight: 500;
  letter-spacing: -2.6px;
  line-height: 0.98;
}
.landing-screen h1 em { color: #748f81; font-weight: 400; }
.lead { margin: 0 0 26px; color: var(--ink-soft); font-size: 16px; line-height: 1.7; }
.landing-details { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 9px; margin-top: 25px; color: #788078; font-size: 11px; font-weight: 650; }
.landing-details i { width: 4px; height: 4px; border-radius: 50%; background: var(--peach); }

/* Story scenes */
.scene-screen { padding-top: 12px; }
.day-path { margin: 1px 0 34px; }
.day-path-line { position: relative; height: 7px; border-radius: 99px; background: #e9e4db; }
.day-path-line span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #e6bc77, #d7ab95 45%, #94aaa2 75%, #8c87a5); transition: width 650ms ease; }
.day-path-line i { position: absolute; top: 50%; left: 0; color: #a56e45; font-size: 20px; font-style: normal; filter: drop-shadow(0 2px 1px #fff); transform: translate(-50%, -50%); transition: left 650ms ease; }
.day-labels { display: flex; justify-content: space-between; margin-top: 9px; color: #92948e; font-family: Georgia, serif; font-size: 11px; font-style: italic; }
.scene-story h2 { margin: 0 0 12px; color: #3b463f; font-family: Georgia, serif; font-size: clamp(29px, 7.2vw, 41px); font-weight: 500; letter-spacing: -1.3px; line-height: 1.06; }
.scene-story > p:last-child { margin: 0 0 22px; color: var(--ink-soft); font-size: 15px; line-height: 1.65; }

.life-scene {
  position: relative;
  height: 225px;
  margin: 0 0 25px;
  overflow: hidden;
  border: 1px solid rgba(61, 73, 65, 0.2);
  border-radius: 27px;
  background: #dce9e6;
  box-shadow: inset 0 -20px 50px rgba(63, 66, 57, 0.07), 0 13px 32px rgba(69, 68, 57, 0.09);
  transition: background 650ms ease;
}
.sky-layer, .landscape-layer, .room-layer { position: absolute; inset: 0; }
.sky-layer { overflow: hidden; }
.sky-layer > i { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,.75); animation: twinkle 2.8s ease-in-out infinite; }
.sky-layer > i:nth-of-type(1) { top: 35px; left: 18%; }
.sky-layer > i:nth-of-type(2) { top: 57px; right: 18%; animation-delay: -1s; }
.sky-layer > i:nth-of-type(3) { top: 26px; right: 39%; animation-delay: -2s; }
.scene-sun, .scene-moon { position: absolute; top: 25px; right: 32px; width: 42px; height: 42px; border-radius: 50%; }
.scene-sun { background: #efd087; box-shadow: 0 0 0 14px rgba(239, 208, 135, .18); animation: breathe 4s ease-in-out infinite; }
.scene-moon { display: none; background: #eee3bf; box-shadow: -10px 0 0 #72778f; }
.landscape-layer span { position: absolute; bottom: -46px; width: 70%; height: 127px; border-radius: 50% 50% 0 0; background: #a8bd9d; }
.landscape-layer span:first-child { left: -25%; }
.landscape-layer span:last-child { right: -19%; bottom: -63px; background: #88a28f; }
.room-layer { display: none; }
.room-object { position: absolute; display: block; }
.scene-character { position: absolute; z-index: 5; bottom: -10px; left: 50%; width: 128px; height: 145px; transform: translateX(-50%); animation: character-idle 3.8s ease-in-out infinite; }
.character-head { position: absolute; z-index: 3; top: 0; left: 29px; width: 69px; height: 69px; border: 2px solid #4b514c; border-radius: 48%; background: #efc4aa; }
.character-head::before { content:""; position:absolute; top:-6px; left:-3px; width:73px; height:34px; border-radius:50px 50px 12px 12px; background:#66645f; transform:rotate(-3deg); }
.character-head i { position:absolute; z-index:2; top:34px; width:4px; height:6px; border-radius:50%; background:#495049; }
.character-head i:first-child { left:21px; }
.character-head i:nth-child(2) { right:21px; }
.character-head b { position:absolute; z-index:2; bottom:13px; left:29px; width:10px; height:5px; border-bottom:1.7px solid #495049; border-radius:50%; }
.character-body { position:absolute; bottom:0; left:14px; width:100px; height:82px; border:2px solid #4b514c; border-radius:45px 45px 12px 12px; background:#c0b0b4; }
.character-arm { position:absolute; z-index:3; top:81px; width:48px; height:18px; border:2px solid #4b514c; border-radius:20px; background:#c0b0b4; transform-origin:8px 9px; }
.character-arm.left { left:5px; transform:rotate(25deg); }
.character-arm.right { right:5px; transform:rotate(-25deg); }
.scene-whisper { position: absolute; z-index: 7; top: 16px; left: 17px; max-width: 45%; padding: 8px 12px; border-radius: 15px 15px 15px 3px; background: rgba(255,253,249,.9); color: #667269; font-family: Georgia, serif; font-size: 12px; font-style: italic; box-shadow: 0 5px 14px rgba(67, 70, 60, .08); animation: whisper-in 1s .35s both; }

.life-scene[data-scene="wake"] { background: linear-gradient(#cbe0df 0 65%, #e7d9bd 65%); }
.life-scene[data-scene="wake"] .room-layer { display:block; }
.life-scene[data-scene="wake"] .room-object.object-a { left:13px; bottom:16px; width:105px; height:46px; border-radius:8px 8px 2px 2px; background:#d4aa91; box-shadow:0 7px 0 #9a7e6d; }
.life-scene[data-scene="wake"] .room-object.object-b { right:20px; bottom:16px; width:62px; height:92px; border:5px solid #f9f2e6; border-radius:30px 30px 4px 4px; background:#b9d3d2; }
.life-scene[data-scene="wake"] .landscape-layer { display:none; }
.life-scene[data-scene="start"] { background: linear-gradient(#ece1cd 0 65%, #cbb996 65%); }
.life-scene[data-scene="start"] .room-layer { display:block; }
.life-scene[data-scene="start"] .room-object.object-a { left:20px; bottom:22px; width:145px; height:14px; border-radius:8px; background:#997b64; box-shadow:22px 38px 0 -3px #997b64; }
.life-scene[data-scene="start"] .room-object.object-b { right:25px; bottom:22px; width:55px; height:82px; border-radius:50% 50% 10px 10px; background:#89a68f; clip-path:polygon(45% 0,57% 40%,100% 19%,65% 55%,96% 64%,59% 70%,60% 100%,34% 100%,38% 71%,0 61%,38% 53%,7% 27%,43% 41%); }
.life-scene[data-scene="start"] .landscape-layer { display:none; }
.life-scene[data-scene="signals"] { background:linear-gradient(#c4d7dc 0 68%,#bdad92 68%); }
.life-scene[data-scene="signals"] .scene-character { left:45%; }
.life-scene[data-scene="signals"]::before, .life-scene[data-scene="signals"]::after { content:""; position:absolute; z-index:3; width:60px; height:60px; border:2px solid rgba(65,83,75,.24); border-radius:50%; animation:ripple 3s infinite; }
.life-scene[data-scene="signals"]::before { top:38px; left:18px; }
.life-scene[data-scene="signals"]::after { right:28px; bottom:48px; animation-delay:-1.5s; }
.life-scene[data-scene="connect"] { background:linear-gradient(#d8ddcf 0 69%,#d7b799 69%); }
.life-scene[data-scene="connect"] .scene-character { left:38%; }
.life-scene[data-scene="connect"]::after { content:"♡"; position:absolute; z-index:4; top:51px; right:76px; color:#b27673; font-size:34px; animation:heart-float 2.8s ease-in-out infinite; }
.life-scene[data-scene="change"] { background:linear-gradient(#c3d5d5 0 67%,#b5bd9b 67%); }
.life-scene[data-scene="change"] .landscape-layer span { transform:skewX(-18deg); }
.life-scene[data-scene="change"]::after { content:"↝"; position:absolute; z-index:4; top:70px; right:52px; color:#657d73; font-size:50px; animation:arrow-wander 3.4s ease-in-out infinite; }
.life-scene[data-scene="unfinished"] { background:linear-gradient(#d4c9cb 0 65%,#b99f89 65%); }
.life-scene[data-scene="unfinished"] .scene-sun { top:67px; right:26px; background:#e6ad79; box-shadow:0 0 0 12px rgba(230,173,121,.16); }
.life-scene[data-scene="unfinished"] .room-layer { display:block; }
.life-scene[data-scene="unfinished"] .room-object.object-a { left:28px; bottom:16px; width:75px; height:86px; border-radius:8px 8px 0 0; background:#806d64; box-shadow:inset 0 15px #f0e1c0; }
.life-scene[data-scene="night"] { background:linear-gradient(#74798e 0 67%,#798b7b 67%); }
.life-scene[data-scene="night"] .scene-sun { display:none; }
.life-scene[data-scene="night"] .scene-moon { display:block; }
.life-scene[data-scene="night"] .scene-character { filter:saturate(.85) brightness(.93); }
.life-scene[data-scene="night"] .scene-whisper { background:rgba(246,242,231,.88); }

.gentle-prompt { margin: 0 0 14px; color: #566258; font-family: Georgia, serif; font-size: 18px; font-style: italic; line-height: 1.45; }
.world-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.world-choice {
  position: relative;
  min-height: 132px;
  padding: 17px 14px 15px;
  overflow: hidden;
  border: 1px solid rgba(65, 78, 69, .17);
  border-radius: 22px;
  background: #fffdf9;
  box-shadow: 0 6px 15px rgba(63,65,56,.06);
  cursor: pointer;
  text-align: left;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, opacity 180ms ease;
}
.world-choice::after { content:""; position:absolute; right:-17px; bottom:-22px; width:67px; height:67px; border-radius:50%; background:var(--choice-tint, #edf2ed); opacity:.7; }
.world-choice:hover { transform:translateY(-3px) rotate(-.3deg); border-color:rgba(96,126,112,.48); }
.world-choice:nth-child(even):hover { transform:translateY(-3px) rotate(.3deg); }
.choice-icon { display:block; margin-bottom:10px; font-size:28px; line-height:1; transition:transform 200ms ease; }
.world-choice:hover .choice-icon { transform:translateY(-2px) rotate(-5deg) scale(1.05); }
.choice-name { position:relative; z-index:1; display:block; margin-bottom:5px; color:#424c45; font-size:14px; font-weight:760; line-height:1.25; }
.choice-note { position:relative; z-index:1; display:block; color:#7b827b; font-family:Georgia,serif; font-size:11.5px; font-style:italic; line-height:1.3; }
.world-choice.selected { border-color:#6e8d7d; background:#eaf2ed; transform:translateY(-2px); }
.world-choice.selected .choice-icon { animation:choice-pop .55s ease both; }
.world-choice:disabled:not(.selected) { opacity:.38; cursor:default; }
.reflection-panel { margin-top:18px; padding:18px; border:1px solid rgba(88,112,98,.25); border-radius:23px; background:#edf4ef; animation:reflection-in .55s cubic-bezier(.2,.75,.3,1) both; }
.reflection-panel p { margin:0 0 16px; color:#536258; font-family:Georgia,serif; font-size:15px; line-height:1.55; }
.reflection-mark { display:block; float:left; margin:1px 9px 0 0; color:#779786; font-size:18px; }
.continue-button { width:100%; min-height:47px; border:0; border-radius:15px; background:#688779; color:#fff; cursor:pointer; font-size:13px; font-weight:740; }
.continue-button span { margin-left:7px; }

/* Transition */
.transition-screen { display:flex; min-height:72vh; flex-direction:column; align-items:center; justify-content:center; text-align:center; }
.transition-sky { position:relative; width:220px; height:220px; margin-bottom:30px; border-radius:50%; background:linear-gradient(#c7d9d8,#eed0ad 65%,#9db09b 66%); box-shadow:0 20px 60px rgba(75,73,62,.16); overflow:hidden; }
.transition-orb { position:absolute; top:50px; left:88px; width:44px; height:44px; border-radius:50%; background:#f3d491; box-shadow:0 0 0 19px rgba(243,212,145,.17); animation:orb-set 2.1s ease-in-out both; }
.transition-sky i { position:absolute; bottom:-30px; width:120px; height:90px; border-radius:50%; background:#9cb19a; }
.transition-sky i:nth-of-type(1) { left:-25px; }
.transition-sky i:nth-of-type(2) { right:-25px; bottom:-42px; background:#7f9a88; }
.transition-sky i:nth-of-type(3), .transition-sky i:nth-of-type(4) { width:5px; height:5px; bottom:auto; border-radius:50%; background:#fff; animation:twinkle 1.8s infinite; }
.transition-sky i:nth-of-type(3) { top:43px; left:45px; }
.transition-sky i:nth-of-type(4) { top:72px; right:47px; animation-delay:-.8s; }
.transition-screen h2 { max-width:420px; margin:0; font-family:Georgia,serif; font-size:32px; font-weight:500; line-height:1.2; }

/* Results */
.result-screen { padding-top:17px; }
.result-hero { text-align:center; }
.result-symbol { display:grid; width:112px; height:112px; margin:15px auto 20px; place-items:center; border:1px solid rgba(60,74,65,.19); border-radius:50% 47% 52% 46%; background:var(--result-soft,#edf3ee); box-shadow:0 14px 31px rgba(72,72,62,.11); font-size:49px; animation:symbol-arrive .8s cubic-bezier(.2,.8,.25,1) both; }
.result-hero h1 { margin:0 0 13px; color:var(--result-color,#607e70); font-family:Georgia,serif; font-size:clamp(41px,10vw,58px); font-weight:500; letter-spacing:-2px; line-height:1; }
.result-poem { max-width:400px; margin:0 auto 30px; color:#687269; font-family:Georgia,serif; font-size:17px; font-style:italic; line-height:1.55; }
.portrait-card, .ritual-card, .pairing-card, .share-section, .care-card { border:1px solid rgba(65,79,69,.15); border-radius:26px; }
.portrait-card { padding:24px; background:#fffdf9; box-shadow:var(--shadow); }
.portrait-intro { margin:0 0 20px; color:#536057; font-size:15px; line-height:1.7; }
.gentle-traits { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:22px; }
.gentle-traits span { padding:8px 11px; border-radius:999px; background:var(--result-soft,#edf3ee); color:var(--result-color,#607e70); font-size:11px; font-weight:750; }
.two-sides { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.two-sides > div { padding:15px; border-radius:18px; background:#f7f3eb; }
.two-sides span { display:block; margin-bottom:6px; color:#7b817a; font-size:10px; font-weight:750; letter-spacing:.7px; text-transform:uppercase; }
.two-sides p { margin:0; color:#505c53; font-family:Georgia,serif; font-size:13px; line-height:1.45; }
.ritual-card { display:flex; align-items:center; gap:16px; margin-top:14px; padding:18px; background:var(--result-soft,#edf3ee); }
.ritual-icon { display:grid; flex:0 0 50px; height:50px; place-items:center; border-radius:17px; background:#fffdf9; font-size:24px; }
.ritual-card .soft-label { margin-bottom:5px; font-size:10px; }
.ritual-card strong { display:block; color:#4d5a50; font-family:Georgia,serif; font-size:14px; font-weight:500; line-height:1.5; }
.friction-card { margin-top:14px; padding:24px; border:1px solid rgba(65,79,69,.15); border-radius:26px; background:linear-gradient(145deg,#f6f1e7,#edf3ef); box-shadow:var(--shadow); }
.friction-card h2 { margin:0 0 9px; color:#435148; font-family:Georgia,serif; font-size:27px; font-weight:500; line-height:1.14; }
.friction-intro { margin:0 0 18px; color:#717a73; font-size:12.5px; line-height:1.55; }
.friction-map { display:grid; gap:9px; }
.friction-item { display:grid; grid-template-columns:43px 1fr; gap:12px; align-items:start; padding:14px; border:1px solid rgba(68,84,74,.12); border-radius:18px; background:rgba(255,253,248,.82); animation:friction-item-in .55s cubic-bezier(.2,.72,.22,1) both; }
.friction-icon { display:grid; width:43px; height:43px; place-items:center; border-radius:14px; background:#e4ede7; color:#587365; font-family:Georgia,serif; font-size:21px; }
.friction-item strong { display:block; margin:1px 0 4px; color:#46544b; font-size:12.5px; }
.friction-item p { margin:0; color:#747d76; font-family:Georgia,serif; font-size:10.5px; line-height:1.42; }
.friction-item i { display:block; height:4px; margin-top:10px; overflow:hidden; border-radius:99px; background:rgba(89,116,101,.12); }
.friction-item i b { display:block; width:var(--friction-strength); height:100%; border-radius:inherit; background:linear-gradient(90deg,#789888,#d8aa8e); animation:friction-meter 1s .2s cubic-bezier(.2,.72,.22,1) both; transform-origin:left; }
.pairing-card { margin-top:28px; padding:24px; background:linear-gradient(135deg,#f1ece1,#edf3ef); }
.pairing-card h2, .share-section h2, .care-card h2 { margin:0 0 10px; font-family:Georgia,serif; font-size:27px; font-weight:500; line-height:1.15; }
.pairing-card p:last-child, .share-section > p:not(.soft-label), .care-card > p:not(.soft-label) { margin:0; color:#687169; font-size:14px; line-height:1.6; }
.share-section { margin-top:28px; padding:25px; background:#f2ede3; }
.share-main { margin-top:20px; }
.share-actions { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin-top:15px; }
.share-actions button { min-height:47px; padding:7px; border:1px solid rgba(65,79,69,.16); border-radius:14px; background:#fffdf9; cursor:pointer; color:#5c675f; font-size:11px; font-weight:730; }
.share-actions button:hover { border-color:#88a898; background:#f7faf8; }
.care-card { margin-top:15px; padding:25px; background:#e5efea; }
.portal-button { margin-top:20px; background:#4f7061; box-shadow:0 7px 0 #c5d3cb; font-size:14px; }
.care-card small { display:block; margin-top:16px; color:#788079; font-size:10px; line-height:1.5; }
.retake-button { display:block; margin:28px auto 0; padding:10px; border:0; background:transparent; color:#6f7971; cursor:pointer; font-size:12px; text-decoration:underline; text-underline-offset:4px; }

/* Non-diagnostic bridge from a shareable portrait to an appropriate care CTA. */
.impact-bridge {
  position:relative;
  margin-top:28px;
  padding:25px;
  overflow:hidden;
  border:1px solid rgba(65,79,69,.16);
  border-radius:26px;
  background:
    radial-gradient(circle at 100% 0,rgba(231,195,154,.3),transparent 34%),
    linear-gradient(145deg,#edf3ef,#f8f2e8 67%,#f2e8da);
  box-shadow:var(--shadow);
}
.impact-bridge::before { content:""; position:absolute; top:-45px; right:-38px; width:125px; height:125px; border:1px solid rgba(85,110,96,.16); border-radius:50%; box-shadow:0 0 0 18px rgba(255,255,255,.12),0 0 0 38px rgba(255,255,255,.08); }
.impact-heading { position:relative; z-index:1; }
.impact-heading h2 { margin:0 0 10px; color:#405047; font-family:Georgia,serif; font-size:27px; font-weight:500; line-height:1.13; }
.impact-heading > p:last-child { margin:0; color:#69736c; font-size:13.5px; line-height:1.6; }
.impact-progress { position:relative; z-index:1; display:flex; gap:7px; margin:22px 0 16px; }
.impact-progress span { width:25px; height:5px; border-radius:99px; background:rgba(88,112,98,.17); transition:width .35s ease,background .35s ease; }
.impact-progress span.active { width:42px; background:#6c8c7c; }
.impact-question { position:relative; z-index:1; transition:opacity .2s ease,transform .2s ease; }
.impact-question.changing { opacity:0; transform:translateX(-12px); }
.impact-step { margin:0 0 7px; color:#758178; font-size:9px; font-weight:800; letter-spacing:1.1px; text-transform:uppercase; }
.impact-question h3 { margin:0 0 14px; color:#3f4d45; font-family:Georgia,serif; font-size:21px; font-weight:500; line-height:1.2; }
.impact-options { display:grid; gap:8px; }
.impact-option { position:relative; display:grid; min-height:64px; grid-template-columns:1fr auto; align-items:center; padding:11px 40px 11px 13px; border:1px solid rgba(67,84,73,.16); border-radius:16px; background:rgba(255,253,248,.78); color:#46534b; cursor:pointer; text-align:left; transition:transform .18s ease,border-color .18s ease,background .18s ease; }
.impact-option:hover { border-color:rgba(89,119,102,.46); background:#fffdf8; transform:translateY(-2px); }
.impact-option:disabled { cursor:default; }
.impact-option.selected { border-color:#6d8d7d; background:#e7f0ea; transform:scale(.985); }
.impact-option strong { display:block; font-size:12.5px; line-height:1.25; }
.impact-option small { display:block; grid-column:1; margin-top:3px; color:#7a827c; font-family:Georgia,serif; font-size:10px; font-style:italic; line-height:1.3; }
.impact-option > span { position:absolute; right:14px; top:50%; color:#6a8979; font-size:18px; transform:translateY(-50%); }
.impact-skip { display:block; position:relative; z-index:1; margin:15px auto 0; padding:6px; border:0; background:transparent; color:#788079; cursor:pointer; font-size:10.5px; text-decoration:underline; text-underline-offset:3px; }
.impact-note { position:relative; z-index:1; margin:14px 0 0; padding-top:13px; border-top:1px solid rgba(70,88,77,.12); color:#858b85; font-size:9.5px; line-height:1.5; }
.impact-bridge.completed { background:linear-gradient(145deg,#edf3ef,#f8f2e8); }
.impact-bridge.completed .impact-note { margin-top:16px; }
.care-card.care-arriving { animation:care-arrive .65s cubic-bezier(.2,.75,.25,1) both; }

/* Modal and toast */
.hidden { display:none !important; }
.toast { position:fixed; z-index:50; bottom:max(25px,env(safe-area-inset-bottom)); left:50%; width:max-content; max-width:calc(100vw - 40px); padding:12px 17px; border-radius:13px; background:#3d4a42; box-shadow:0 13px 35px rgba(40,48,43,.25); color:#fff; font-size:12px; transform:translateX(-50%); animation:toast-in .3s ease both; }
.story-modal { position:fixed; z-index:60; inset:0; display:grid; place-items:center; padding:18px; }
.modal-backdrop { position:absolute; inset:0; background:rgba(50,57,52,.58); backdrop-filter:blur(7px); }
.story-modal-panel { position:relative; width:min(100%,460px); max-height:92vh; padding:20px; overflow:auto; border-radius:27px; background:#fffdf9; box-shadow:0 30px 90px rgba(31,40,34,.3); }
.modal-header { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; margin-bottom:15px; }
.modal-header h2 { margin:0; font-family:Georgia,serif; font-size:24px; font-weight:500; }
.close-button { display:grid; flex:0 0 36px; height:36px; place-items:center; border:0; border-radius:50%; background:#efeae0; cursor:pointer; font-size:20px; }
.story-preview-wrap { display:flex; justify-content:center; padding:11px; border-radius:20px; background:#eee8de; }
.story-preview-wrap img { width:min(100%,250px); height:auto; border-radius:13px; box-shadow:0 13px 30px rgba(57,62,57,.2); }
.save-help { color:#747d75; font-size:11px; line-height:1.5; text-align:center; }
.story-download { min-height:49px; border-radius:15px; font-size:13px; }

@keyframes page-in { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:none; } }
@keyframes boot-pulse {
  70% { box-shadow: 0 0 0 9px rgba(96, 126, 112, 0); }
  100% { box-shadow: 0 0 0 0 rgba(96, 126, 112, 0); }
}
@keyframes breathe { 50% { transform:scale(1.08); } }
@keyframes cloud-drift { 0% { transform:translateX(-15px); } 50% { transform:translateX(20px); } 100% { transform:translateX(-15px); } }
@keyframes person-sway { 0%,100% { transform:rotate(-1.5deg); } 50% { transform:rotate(1.5deg) translateY(-2px); } }
@keyframes leaf-float { 0%,100% { transform:translate(0,0) rotate(-15deg); } 50% { transform:translate(7px,-9px) rotate(10deg); } }
@keyframes character-idle { 0%,100% { transform:translateX(-50%) translateY(0); } 50% { transform:translateX(-50%) translateY(-3px); } }
@keyframes whisper-in { from { opacity:0; transform:translate(-5px,8px); } to { opacity:1; transform:none; } }
@keyframes twinkle { 50% { opacity:.25; transform:scale(.55); } }
@keyframes ripple { 0% { transform:scale(.5); opacity:.55; } 70%,100% { transform:scale(1.5); opacity:0; } }
@keyframes heart-float { 0%,100% { transform:translateY(5px) rotate(-5deg); } 50% { transform:translateY(-8px) rotate(4deg); } }
@keyframes arrow-wander { 0%,100% { transform:translateX(-10px) rotate(-8deg); } 50% { transform:translateX(10px) rotate(7deg); } }
@keyframes choice-pop { 0% { transform:scale(.8) rotate(-7deg); } 55% { transform:scale(1.25) rotate(5deg); } 100% { transform:none; } }
@keyframes reflection-in { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:none; } }
@keyframes orb-set { from { transform:translateY(-20px); } to { transform:translateY(76px); background:#e9ad83; } }
@keyframes symbol-arrive { from { opacity:0; transform:translateY(18px) rotate(-8deg) scale(.8); } to { opacity:1; transform:none; } }
@keyframes toast-in { from { opacity:0; transform:translate(-50%,8px); } to { opacity:1; transform:translate(-50%,0); } }
@keyframes care-arrive { from { opacity:0; transform:translateY(18px); } to { opacity:1; transform:none; } }
@keyframes friction-item-in { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:none; } }
@keyframes friction-meter { from { transform:scaleX(0); } to { transform:scaleX(1); } }

@media (max-width: 430px) {
  .app-shell { padding-right:16px; padding-left:16px; }
  .landing-world { height:235px; }
  .little-person { left:35px; }
  .window-frame { right:17px; width:162px; }
  .world-choice { min-height:126px; padding:15px 12px; }
  .two-sides { grid-template-columns:1fr; }
  .share-actions { grid-template-columns:1fr; }
  .share-actions button { min-height:43px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior:auto !important; animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; }
  .scene-object, .immersive-narration, .scene-guidance, .scene-reveal { animation-delay:0ms !important; }
}

/* Interactive comic edition */
.cover-edition {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 3px 0 10px;
  padding: 7px 10px;
  border-top: 2px solid #455248;
  border-bottom: 2px solid #455248;
  color: #455248;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 1.1px;
}

.cover-edition span:first-child { font-family: Georgia, serif; font-size: 11px; }
.landing-world { border: 2px solid #455248; border-radius: 2px; box-shadow: 7px 7px 0 #d7d0c3, var(--shadow); }
.landing-world::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .17;
  background-image: radial-gradient(#435248 .75px, transparent .8px);
  background-size: 6px 6px;
  mix-blend-mode: multiply;
}

.comic-page-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 13px;
  padding: 7px 2px;
  border-top: 2px solid #445148;
  border-bottom: 1px solid #445148;
  color: #536058;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 1.5px;
}

.comic-page-meta span:last-child {
  padding: 3px 7px;
  background: #445148;
  color: #fffdf8;
  letter-spacing: .8px;
}

.opening-comic-panel {
  position: relative;
  overflow: hidden;
  border: 3px solid #445148;
  border-radius: 3px;
  background: #fffaf0;
  box-shadow: 7px 7px 0 #d8d0c3;
}

.opening-comic-panel .scene-story {
  position: relative;
  z-index: 8;
  padding: 18px 20px 17px;
  border-bottom: 3px solid #445148;
  background: #fffdf8;
}

.panel-caption {
  display: inline-block;
  margin: 0 0 10px !important;
  padding: 5px 8px;
  background: #607e70;
  color: #fffdf8 !important;
  font-size: 9px !important;
  font-weight: 850;
  letter-spacing: 1.2px;
  line-height: 1 !important;
  text-transform: uppercase;
  transform: rotate(-.6deg);
}

.opening-comic-panel .scene-story h2 {
  margin-bottom: 9px;
  font-size: clamp(27px, 6.8vw, 37px);
  line-height: 1.03;
}

.opening-comic-panel .scene-story > p:last-child { margin-bottom: 0; font-size: 13px; line-height: 1.55; }

.opening-comic-panel .life-scene {
  height: 258px;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.comic-rays {
  position: absolute;
  z-index: 1;
  inset: 0;
  opacity: .14;
  background-image: repeating-conic-gradient(from 73deg at 78% 32%, transparent 0deg 9deg, #fff 9.5deg 10.2deg);
}

.opening-comic-panel .life-scene::after {
  content: "";
  position: absolute;
  z-index: 6;
  inset: 0;
  pointer-events: none;
  opacity: .13;
  background-image: radial-gradient(#37483e .75px, transparent .85px);
  background-size: 7px 7px;
  mix-blend-mode: multiply;
}

.opening-comic-panel .scene-whisper {
  max-width: 52%;
  border: 2px solid #445148;
  border-radius: 18px;
  background: #fffdf8;
  box-shadow: 3px 3px 0 rgba(68,81,72,.18);
  color: #4e5c53;
  font-size: 12px;
}

.opening-comic-panel .scene-whisper::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 24px;
  width: 15px;
  height: 15px;
  border-right: 2px solid #445148;
  border-bottom: 2px solid #445148;
  background: #fffdf8;
  transform: rotate(45deg);
}

.next-frame-heading {
  position: relative;
  margin: 35px 0 14px;
  padding-left: 15px;
  border-left: 5px solid #e4ae91;
}

.next-frame-heading > span {
  display: block;
  margin-bottom: 5px;
  color: #607e70;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1.4px;
}

.next-frame-heading .gentle-prompt { margin: 0; color: #435047; font-size: 20px; line-height: 1.2; }

.world-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  counter-reset: panel;
}

.world-choice {
  counter-increment: panel;
  display: flex;
  min-height: 218px;
  padding: 0;
  flex-direction: column;
  overflow: hidden;
  border: 2px solid #445148;
  border-radius: 3px;
  background: #fffdf8;
  box-shadow: 4px 4px 0 #d9d1c5;
  transform: none;
}

.world-choice::before {
  content: counter(panel);
  position: absolute;
  z-index: 8;
  top: 7px;
  left: 7px;
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
  border: 1.5px solid #445148;
  border-radius: 50%;
  background: #fffdf8;
  color: #445148;
  font-family: Georgia, serif;
  font-size: 10px;
  font-style: italic;
  font-weight: 700;
}

.world-choice::after { display: none; }
.world-choice:hover, .world-choice:nth-child(even):hover { border-color: #445148; box-shadow: 7px 7px 0 #c9c1b5; transform: translate(-2px, -2px) rotate(-.25deg); }
.world-choice:nth-child(even):hover { transform: translate(-2px, -2px) rotate(.25deg); }

.choice-panel-art {
  position: relative;
  display: block;
  flex: 0 0 126px;
  overflow: hidden;
  border-bottom: 2px solid #445148;
  background: var(--choice-tint, #edf2ed);
}

.choice-panel-art::after {
  content: "";
  position: absolute;
  z-index: 5;
  inset: 0;
  opacity: .15;
  background-image: radial-gradient(#425047 .7px, transparent .8px);
  background-size: 5px 5px;
}

.panel-sky, .panel-ground { position: absolute; display: block; }
.panel-sky { inset: 0; background: linear-gradient(150deg, rgba(255,255,255,.48), transparent 58%); }
.panel-ground { right: -18%; bottom: -53px; left: -12%; height: 91px; border-radius: 50%; background: rgba(113,147,125,.38); transform: rotate(-4deg); }
.panel-motion { position: absolute; top: 15px; right: 12px; color: rgba(68,81,72,.55); font-family: Georgia,serif; font-size: 17px; font-style: normal; letter-spacing: 3px; transform: rotate(-14deg); }

.mini-character {
  position: absolute;
  z-index: 3;
  bottom: -6px;
  left: 29%;
  width: 62px;
  height: 80px;
  transform: rotate(-2deg);
  transition: transform 250ms ease;
}

.mini-character > i {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 13px;
  width: 37px;
  height: 37px;
  border: 2px solid #445148;
  border-radius: 48%;
  background: #efc2a8;
  box-shadow: inset 0 12px #68655f;
}

.mini-character > b { position:absolute; bottom:0; left:3px; width:58px; height:49px; border:2px solid #445148; border-radius:25px 25px 4px 4px; background:#b9aaaf; }
.choice-icon { position:absolute; z-index:6; top:25px; right:16px; display:grid; width:54px; height:48px; margin:0; place-items:center; border:2px solid #445148; border-radius:50%; background:#fffdf8; box-shadow:3px 3px 0 rgba(68,81,72,.18); color:#435047; font-size:27px; }
.choice-icon::after { content:""; position:absolute; bottom:-6px; left:7px; width:10px; height:10px; border-right:2px solid #445148; border-bottom:2px solid #445148; background:#fffdf8; transform:rotate(45deg); }
.world-choice:hover .mini-character { transform: translateX(4px) rotate(2deg); }
.world-choice:hover .choice-icon { transform: translateY(-2px) rotate(-4deg); }

.world-choice:nth-child(2) .mini-character { left: 53%; transform: rotate(2deg); }
.world-choice:nth-child(3) .mini-character { left: 17%; }
.world-choice:nth-child(4) .mini-character { left: 47%; transform: rotate(-3deg); }
.world-choice:nth-child(2) .panel-ground { background: rgba(170,142,157,.3); transform:rotate(5deg); }
.world-choice:nth-child(3) .panel-ground { background: rgba(218,180,108,.25); }
.world-choice:nth-child(4) .panel-ground { background: rgba(115,151,165,.26); transform:rotate(3deg); }

.choice-panel-caption { position: relative; z-index: 6; display: flex; min-height: 88px; padding: 12px 12px 11px; flex-direction: column; justify-content: center; background: #fffdf8; }
.choice-name { margin-bottom: 5px; color: #3f4b43; font-family: Georgia, serif; font-size: 14px; font-weight: 700; line-height: 1.15; }
.choice-note { color: #747c75; font-family: Georgia, serif; font-size: 10.5px; font-style: italic; line-height: 1.3; }

.world-choice.selected { border-color:#445148; background:#fffdf8; box-shadow:7px 7px 0 #b9cbbf; transform:translate(-2px,-2px); }
.world-choice.selected::before { content:"YOUR PANEL"; width:auto; padding:0 8px; border-radius:2px; background:#607e70; color:#fff; font-family:inherit; font-size:8px; font-style:normal; letter-spacing:.7px; }
.world-choice.selected .choice-icon { animation: choice-pop .55s ease both; }
.world-choice:disabled:not(.selected) { opacity:.26; }

.scene-screen.has-selection .next-frame-heading { display: none; }
.scene-screen.has-selection .world-choice:not(.selected) { display: none; }
.scene-screen.has-selection .world-choices { grid-template-columns: 1fr; margin-top: 32px; }
.scene-screen.has-selection .world-choice.selected { min-height: 250px; cursor: default; }
.scene-screen.has-selection .world-choice.selected .choice-panel-art { flex-basis: 158px; }
.scene-screen.has-selection .world-choice.selected .mini-character { left:42%; transform:scale(1.25); transform-origin:bottom center; }
.scene-screen.has-selection .world-choice.selected .choice-icon { right:24%; top:31px; transform:scale(1.1); }
.scene-screen.has-selection .world-choice.selected .choice-panel-caption { min-height:90px; padding-left:20px; }
.scene-screen.has-selection .world-choice.selected .choice-name { font-size:18px; }
.scene-screen.has-selection .world-choice.selected .choice-note { font-size:12px; }

.reflection-panel {
  position: relative;
  margin-top: 18px;
  padding: 0;
  overflow: visible;
  border: 2px solid #445148;
  border-radius: 3px;
  background: #eef4ef;
  box-shadow: 5px 5px 0 #d4ccc0;
}

.reflection-frame-label {
  position: absolute;
  z-index: 4;
  top: -11px;
  left: 14px;
  padding: 5px 9px;
  border: 2px solid #445148;
  background: #efd190;
  color: #445148;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1px;
  transform: rotate(-1deg);
}

.reflection-story { min-height: 92px; padding: 29px 22px 15px; }
.reflection-panel .reflection-mark { margin-right:10px; color:#607e70; font-size:22px; }
.reflection-panel .reflection-story p { margin:0; color:#46534a; font-family:Georgia,serif; font-size:16px; line-height:1.5; }
.reflection-panel .continue-button { min-height:52px; border:0; border-top:2px solid #445148; border-radius:0; background:#607e70; font-size:12px; letter-spacing:.25px; }
.reflection-panel .continue-button:hover { background:#526f61; }

@media (max-width: 430px) {
  .cover-edition span:last-child { font-size: 7px; }
  .opening-comic-panel .scene-story { padding: 16px; }
  .opening-comic-panel .life-scene { height: 230px; }
  .world-choices { gap: 9px; }
  .world-choice { min-height: 207px; }
  .choice-panel-art { flex-basis: 116px; }
  .choice-panel-caption { min-height: 89px; padding: 10px; }
  .choice-name { font-size: 12.5px; }
  .choice-note { font-size: 9.5px; }
  .choice-icon { right:10px; width:47px; height:43px; font-size:23px; }
}

/* Full-screen illustrated journey */
.sound-promise { display:flex; align-items:center; justify-content:center; gap:7px; margin:19px 0 0; color:#747d75; font-family:Georgia,serif; font-size:11px; font-style:italic; }
.sound-promise span { color:#607e70; font-size:16px; }

body[data-view="story"] { overflow:hidden; overscroll-behavior:none; }
body[data-view="story"] .app-shell { width:min(100%,590px); height:100dvh; min-height:0; padding:0; overflow:hidden; background:#dbe7e3; }
body[data-view="story"] .screen { animation:none; }
body[data-view="story"] .app-shell::before { content:""; position:absolute; z-index:35; top:0; right:0; left:0; height:92px; pointer-events:none; background:linear-gradient(to bottom,rgba(18,29,24,.5),rgba(18,29,24,.16) 54%,transparent); }
body[data-view="story"] .topbar,
body[data-view="story"] .site-footer { display:none; }
body[data-view="story"] #app { height:100%; }

.immersive-scene { position:relative; width:100%; height:100%; min-height:600px; overflow:hidden; background:#dbe7e3; }
.immersive-chrome { position:absolute; z-index:40; top:max(18px,env(safe-area-inset-top)); right:17px; left:17px; display:flex; align-items:center; justify-content:space-between; pointer-events:none; }
.story-wordmark { color:#fffdf7; font-size:18px; font-weight:850; letter-spacing:-.5px; line-height:1; text-shadow:0 1px 2px rgba(15,25,20,.95),0 2px 10px rgba(11,20,16,.8); }
.memory-trail { display:flex; align-items:center; gap:5px; padding:6px 8px; border:1px solid rgba(59,77,66,.17); border-radius:99px; background:rgba(255,253,248,.6); backdrop-filter:blur(8px); }
.memory-bead { display:grid; width:12px; height:12px; place-items:center; border:1px solid rgba(64,79,70,.32); border-radius:50%; color:#486054; font-size:8px; transition:all .4s ease; }
.memory-bead.gathered { width:18px; height:18px; border-color:#607e70; background:#fffaf0; box-shadow:0 2px 6px rgba(52,68,58,.14); animation:memory-arrive .55s ease both; }
.sound-toggle { position:relative; display:grid; width:38px; height:38px; place-items:center; border:1px solid rgba(53,73,61,.24); border-radius:50%; background:rgba(255,253,248,.76); box-shadow:0 4px 12px rgba(51,64,56,.11); color:#496255; cursor:pointer; font-family:Georgia,serif; font-size:17px; pointer-events:auto; backdrop-filter:blur(8px); }
.sound-toggle::before, .sound-toggle::after { content:""; position:absolute; border:1px solid rgba(73,98,85,.28); border-left:0; border-radius:0 20px 20px 0; animation:sound-wave 1.7s ease-out infinite; }
.sound-toggle::before { right:5px; width:7px; height:13px; }
.sound-toggle::after { right:1px; width:11px; height:21px; animation-delay:-.4s; }
.sound-toggle.muted::before, .sound-toggle.muted::after { display:none; }
.sound-toggle.muted i { position:absolute; width:24px; height:1.5px; background:#9a6f6b; transform:rotate(-45deg); }

.immersive-stage { position:absolute; inset:0; width:100%; height:100%; min-height:600px; margin:0; overflow:hidden; border:0; border-radius:0; box-shadow:none; transition:background 1.2s ease, filter .8s ease; }
.immersive-stage::before { content:""; position:absolute; z-index:2; inset:0; pointer-events:none; background:linear-gradient(to bottom,rgba(255,255,255,.18),transparent 37%,rgba(38,53,45,.07)); }
.immersive-stage::after { content:""; position:absolute; z-index:4; inset:0; pointer-events:none; opacity:.12; background-image:radial-gradient(#3f5147 .6px,transparent .7px); background-size:7px 7px; mix-blend-mode:multiply; }
.ambient-wash { position:absolute; z-index:1; inset:-15%; opacity:.52; background:radial-gradient(circle at 78% 26%,rgba(255,226,156,.78),transparent 26%),radial-gradient(circle at 18% 78%,rgba(154,190,171,.5),transparent 30%); animation:ambient-breathe 7s ease-in-out infinite; transition:background 1s ease,opacity 1s ease; }

.immersive-stage .sky-layer,
.immersive-stage .landscape-layer,
.immersive-stage .room-layer { z-index:3; }
.immersive-stage .scene-character { z-index:10; bottom:7%; width:158px; height:181px; transition:left 1s cubic-bezier(.2,.7,.25,1),transform .8s ease,filter .8s ease; }
.immersive-stage .character-head { left:42px; width:78px; height:78px; }
.immersive-stage .character-body { left:15px; width:128px; height:105px; }
.immersive-stage .character-arm { top:92px; }

.immersive-narration { position:absolute; z-index:25; top:82px; right:20px; left:20px; padding:18px 19px 17px; border:1px solid rgba(58,75,64,.19); border-radius:22px; background:rgba(255,253,248,.82); box-shadow:0 13px 34px rgba(54,66,59,.1); backdrop-filter:blur(12px); transition:opacity .55s ease,transform .55s ease; }
.immersive-narration .scene-time { margin:0 0 7px; color:#607e70; font-size:9px; font-weight:850; letter-spacing:1.35px; text-transform:uppercase; }
.immersive-narration h2 { margin:0 0 7px; color:#3f4b43; font-family:Georgia,serif; font-size:clamp(27px,7vw,38px); font-weight:500; letter-spacing:-1.1px; line-height:1.03; }
.immersive-narration > p:last-child { margin:0; color:#687168; font-size:12.5px; line-height:1.5; }

.scene-hotspots { position:absolute; z-index:22; inset:0; display:block; pointer-events:none; }
.scene-object { --drag-x:0px; --drag-y:0px; position:absolute; display:block; width:74px; height:74px; min-height:0; padding:0; overflow:visible; border:0; border-radius:50%; background:transparent; box-shadow:none; cursor:pointer; pointer-events:auto; touch-action:manipulation; transform:translate(var(--drag-x),var(--drag-y)); transition:opacity .4s ease,filter .4s ease,transform .35s cubic-bezier(.2,.75,.25,1); }
.scene-object::before { display:none; }
.scene-object::after { content:""; position:absolute; inset:-7px; display:block; border:1px solid rgba(255,255,255,.68); border-radius:50%; animation:object-ripple 2.3s ease-out infinite; }
.scene-object:hover,
.scene-object:nth-child(even):hover { border:0; box-shadow:none; transform:translate(var(--drag-x),calc(var(--drag-y) - 5px)) scale(1.06); }
.scene-object .object-aura { position:absolute; inset:0; border:1.5px solid rgba(55,74,62,.45); border-radius:50%; background:rgba(255,253,248,.82); box-shadow:0 8px 22px rgba(51,66,56,.15),inset 0 0 0 7px var(--choice-tint,#edf2ed); backdrop-filter:blur(5px); }
.scene-object .choice-icon { position:absolute; z-index:3; inset:0; display:grid; width:auto; height:auto; margin:0; place-items:center; border:0; border-radius:0; background:transparent; box-shadow:none; color:#3f5046; font-size:30px; transition:transform .25s ease; }
.scene-object .choice-icon::after { display:none; }
.scene-object:hover .choice-icon { transform:scale(1.08) rotate(-4deg); }
.scene-object .choice-tooltip { position:absolute; z-index:5; top:80px; left:50%; display:block; width:max-content; max-width:145px; padding:7px 10px; border:1px solid rgba(55,72,62,.22); border-radius:12px; background:rgba(255,253,248,.9); box-shadow:0 6px 14px rgba(49,62,54,.1); color:#445148; text-align:center; transform:translateX(-50%); backdrop-filter:blur(7px); }
.scene-object .choice-tooltip strong { display:block; font-family:Georgia,serif; font-size:11px; font-weight:600; white-space:nowrap; }
.scene-object .choice-tooltip small { display:block; max-width:135px; max-height:0; overflow:hidden; opacity:0; color:#747c75; font-family:Georgia,serif; font-size:9px; font-style:italic; line-height:1.25; transition:max-height .3s ease,opacity .3s ease,margin .3s ease; }
.scene-object:hover .choice-tooltip small,
.scene-object:focus-visible .choice-tooltip small { max-height:42px; margin-top:3px; opacity:1; }
.scene-object.can-drag { touch-action:none; }
.scene-object.can-drag .object-aura::after { content:"drag or tap"; position:absolute; top:-13px; left:50%; width:max-content; padding:2px 5px; border-radius:6px; background:#607e70; color:white; font-size:7px; font-weight:800; letter-spacing:.4px; transform:translateX(-50%); }
.scene-object.dragging { z-index:20; transition:none; filter:drop-shadow(0 12px 12px rgba(44,58,49,.22)); }

.scene-object:nth-child(1) { top:49%; left:8%; }
.scene-object:nth-child(2) { top:45%; right:8%; }
.scene-object:nth-child(3) { bottom:19%; left:15%; }
.scene-object:nth-child(4) { right:13%; bottom:18%; }
.immersive-stage[data-scene="wake"] .scene-object:nth-child(1) { top:48%; right:8%; left:auto; }
.immersive-stage[data-scene="wake"] .scene-object:nth-child(2) { top:52%; left:8%; right:auto; }
.immersive-stage[data-scene="wake"] .scene-object:nth-child(3) { bottom:16%; left:12%; }
.immersive-stage[data-scene="wake"] .scene-object:nth-child(4) { right:10%; bottom:13%; }
.immersive-stage[data-scene="start"] .scene-object:nth-child(1) { top:51%; left:7%; }
.immersive-stage[data-scene="start"] .scene-object:nth-child(2) { top:46%; right:9%; }
.immersive-stage[data-scene="start"] .scene-object:nth-child(3) { bottom:14%; left:12%; }
.immersive-stage[data-scene="start"] .scene-object:nth-child(4) { right:11%; bottom:16%; }
.immersive-stage[data-scene="signals"] .scene-object:nth-child(1) { top:46%; left:7%; }
.immersive-stage[data-scene="signals"] .scene-object:nth-child(2) { top:48%; right:7%; }
.immersive-stage[data-scene="signals"] .scene-object:nth-child(3) { bottom:16%; left:9%; }
.immersive-stage[data-scene="signals"] .scene-object:nth-child(4) { right:8%; bottom:15%; }

.scene-guidance { position:absolute; z-index:29; right:16px; bottom:max(17px,env(safe-area-inset-bottom)); left:16px; display:flex; align-items:center; justify-content:center; gap:9px; pointer-events:none; }
.scene-guidance p { margin:0; padding:9px 13px; border:1px solid rgba(54,72,61,.16); border-radius:99px; background:rgba(255,253,248,.72); color:#56645a; font-family:Georgia,serif; font-size:11px; font-style:italic; text-align:center; backdrop-filter:blur(9px); }
.guidance-pulse { width:8px; height:8px; border-radius:50%; background:#e5af91; box-shadow:0 0 0 0 rgba(229,175,145,.5); animation:guidance-pulse 1.8s ease-out infinite; }

.immersive-reflection { position:absolute; z-index:32; right:18px; bottom:max(24px,env(safe-area-inset-bottom)); left:18px; margin:0; padding:18px 18px 14px; overflow:visible; border:1px solid rgba(56,75,63,.24); border-radius:22px; background:rgba(255,253,248,.9); box-shadow:0 18px 42px rgba(43,57,48,.17); backdrop-filter:blur(14px); }
.immersive-reflection.arriving { animation:immersive-reflection-in .65s cubic-bezier(.2,.75,.3,1) both; }
.immersive-reflection .reflection-mark { float:left; margin:1px 9px 0 0; color:#607e70; font-size:20px; }
.immersive-reflection > p { margin:0 0 14px; color:#47564c; font-family:Georgia,serif; font-size:15px; line-height:1.48; }
.immersive-reflection .continue-button { min-height:44px; border:0; border-radius:14px; background:#607e70; font-size:11px; }
.reflection-auto { position:relative; height:29px; overflow:hidden; border-radius:10px; background:rgba(91,119,104,.11); }
.reflection-auto > span { position:absolute; inset:0 auto 0 0; width:0; border-radius:inherit; background:linear-gradient(90deg,rgba(105,142,122,.26),rgba(105,142,122,.55)); animation:reflection-auto-fill 2.3s linear both; }
.reflection-auto small { position:absolute; inset:0; display:grid; place-items:center; color:#52675b; font-family:Georgia,serif; font-size:9.5px; font-style:italic; letter-spacing:.25px; }

.immersive-scene.has-selection .immersive-narration { opacity:.28; transform:translateY(-8px); }
.immersive-scene.has-selection .scene-hotspots { margin-top:0; }
.immersive-scene.has-selection .scene-object:not(.selected) { opacity:0; pointer-events:none; transform:scale(.65); }
.immersive-scene.has-selection .world-choice.scene-object.selected { width:74px; height:74px; min-height:0; padding:0; opacity:1; filter:drop-shadow(0 13px 16px rgba(45,60,50,.18)); pointer-events:none; transform:scale(1.17); }
.immersive-scene.has-selection .world-choice.scene-object.selected .choice-icon { inset:0; width:auto; height:auto; transform:none; }
.immersive-scene.has-selection .world-choice.scene-object.selected .choice-tooltip { display:none; }
.immersive-scene.has-selection .world-choice.scene-object.selected .object-aura::after { display:none; }
.immersive-scene.has-selection .scene-object.selected::after { animation-duration:.8s; }
.immersive-stage[data-chosen="dawn-keeper"] .ambient-wash { background:radial-gradient(circle at 78% 26%,rgba(255,221,135,.95),transparent 32%),linear-gradient(rgba(255,246,215,.2),rgba(255,246,215,.2)); }
.immersive-stage[data-chosen="curious-firefly"] .ambient-wash { background:radial-gradient(circle at 50% 55%,rgba(255,219,119,.82),transparent 25%),radial-gradient(circle at 20% 80%,rgba(219,179,235,.5),transparent 28%); }
.immersive-stage[data-chosen="quiet-lighthouse"] .ambient-wash { background:radial-gradient(circle at 50% 60%,rgba(181,222,215,.78),transparent 35%); }
.immersive-stage[data-chosen="gentle-gardener"] .ambient-wash { background:radial-gradient(circle at 25% 75%,rgba(177,211,157,.8),transparent 33%); }
.immersive-stage[data-chosen="warm-compass"] .ambient-wash { background:radial-gradient(circle at 73% 61%,rgba(241,177,167,.72),transparent 31%); }
.immersive-stage[data-chosen="tide-listener"] .ambient-wash { background:radial-gradient(circle at 62% 76%,rgba(148,201,218,.82),transparent 35%); }
.immersive-stage[data-chosen="soft-wayfinder"] .ambient-wash { background:radial-gradient(circle at 63% 69%,rgba(190,178,218,.78),transparent 34%); }
.immersive-stage[data-chosen="dream-collector"] .ambient-wash { background:radial-gradient(circle at 50% 65%,rgba(173,165,213,.76),transparent 38%); }
.immersive-scene.has-selection .scene-character { left:58%; transform:translateX(-50%) translateY(-10px) rotate(2deg); }

body[data-view="story"] .transition-screen { min-height:100dvh; padding:26px; background:linear-gradient(#dbe8e5,#faf3e7); }

.collected-moments { display:flex; align-items:center; justify-content:center; gap:7px; margin:-10px auto 9px; }
.collected-moments span { display:grid; width:31px; height:31px; place-items:center; border:1px solid rgba(71,88,77,.2); border-radius:50%; background:#fffdf8; box-shadow:0 5px 13px rgba(66,75,68,.08); color:var(--result-color,#607e70); font-size:14px; animation:memory-arrive .55s ease both; }
.collected-caption { margin:0 auto 28px; color:#858b85; font-family:Georgia,serif; font-size:10px; font-style:italic; text-align:center; }

@keyframes sound-wave { 0%,100% { opacity:.15; transform:scale(.75); } 45% { opacity:.65; transform:scale(1); } }
@keyframes object-ripple { 0% { opacity:.55; transform:scale(.75); } 75%,100% { opacity:0; transform:scale(1.28); } }
@keyframes guidance-pulse { 70%,100% { box-shadow:0 0 0 10px rgba(229,175,145,0); } }
@keyframes ambient-breathe { 0%,100% { transform:translate(0,0) scale(1); } 50% { transform:translate(-2%,1%) scale(1.04); } }
@keyframes memory-arrive { from { opacity:0; transform:scale(.3) rotate(-15deg); } to { opacity:1; transform:none; } }
@keyframes immersive-reflection-in { from { opacity:0; transform:translateY(24px); } to { opacity:1; transform:none; } }
@keyframes reflection-auto-fill { to { width:100%; } }

@media (max-height: 690px) {
  .immersive-narration { top:67px; padding:13px 15px; }
  .immersive-narration h2 { font-size:26px; }
  .immersive-narration > p:last-child { font-size:11px; }
  .immersive-stage .scene-character { bottom:4%; transform:translateX(-50%) scale(.86); transform-origin:bottom center; }
  .scene-object { width:64px; height:64px; }
  .scene-object .choice-tooltip { top:68px; }
}

@media (max-width: 370px) {
  .immersive-narration { right:13px; left:13px; }
  .scene-object { width:64px; height:64px; }
  .scene-object .choice-tooltip { top:68px; }
  .scene-object .choice-tooltip strong { font-size:10px; }
  .memory-trail { gap:3px; }
}

/* Cinematic watercolour edition */
.landing-world {
  height: 340px;
  border: 1px solid rgba(44, 55, 49, .3);
  border-radius: 28px 28px 8px 8px;
  background: #cbd7d2;
  box-shadow: 0 22px 50px rgba(44, 52, 46, .18);
}
.landing-world > :not(.landing-artwork) { display: none; }
.landing-world::after {
  display: block;
  z-index: 3;
  opacity: .12;
  background-image: radial-gradient(rgba(38, 47, 42, .8) .55px, transparent .65px);
  background-size: 7px 7px;
}
.landing-artwork,
.scene-artwork {
  position: absolute;
  inset: -2.5%;
  width: 105%;
  height: 105%;
  object-fit: cover;
  transform: translate(calc(var(--look-x, 0) * -7px), calc(var(--look-y, 0) * -5px)) scale(1.025);
  transition: transform 1.1s cubic-bezier(.2, .72, .22, 1);
  animation: artwork-arrive 1.15s cubic-bezier(.2, .72, .22, 1) both, artwork-breathe 13s 1.15s ease-in-out infinite;
}
.landing-artwork { z-index: 1; object-position: 50% 53%; }

.immersive-stage.has-art .sky-layer,
.immersive-stage.has-art .landscape-layer,
.immersive-stage.has-art .room-layer,
.immersive-stage.has-art .scene-character { display: none; }
.scene-artwork { z-index: 1; object-position: 50% 50%; }
.scene-artwork { opacity:1; animation:artwork-breathe 13s ease-in-out infinite; }
.scene-reveal { position:absolute; z-index:5; inset:-2%; pointer-events:none; background-position:center; background-size:cover; opacity:1; transform:scale(1.018); animation:scene-reveal-away .72s cubic-bezier(.22,.7,.24,1) both; }
.immersive-stage.has-art::before {
  z-index: 3;
  background:
    linear-gradient(to bottom, rgba(16, 28, 24, .21), transparent 13%, transparent 68%, rgba(18, 24, 22, .2)),
    radial-gradient(circle at 75% 18%, rgba(255, 229, 166, .16), transparent 35%);
}
.immersive-stage.has-art::after { z-index: 4; opacity: .08; }
.immersive-stage.has-art .ambient-wash { z-index: 2; opacity: .15; mix-blend-mode: screen; }

.immersive-narration {
  top: 72px;
  border-color: rgba(255, 255, 255, .38);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(250, 247, 239, .9), rgba(246, 243, 234, .72));
  box-shadow: 0 17px 45px rgba(24, 33, 29, .18);
  backdrop-filter: blur(15px) saturate(.9);
  animation:narrative-stage-in .64s .12s cubic-bezier(.2,.72,.22,1) both;
}
.immersive-narration h2 { color: #36423c; font-size: clamp(25px, 6.6vw, 36px); }

.scene-object { width: 58px; height: 58px; filter: drop-shadow(0 7px 13px rgba(21, 30, 26, .22)); }
.scene-object { animation:hotspot-stage-in .54s var(--choice-delay,.3s) cubic-bezier(.2,.72,.22,1) both; }
.scene-object::after { inset: -9px; border-color: rgba(255, 246, 219, .86); }
.scene-object .object-aura {
  border-color: rgba(255, 253, 245, .9);
  background: rgba(246, 242, 230, .48);
  box-shadow: 0 0 0 1px rgba(51, 63, 56, .34), inset 0 0 0 5px rgba(255, 252, 241, .26), 0 8px 22px rgba(23, 32, 27, .24);
  backdrop-filter: blur(6px) saturate(.8);
}
.scene-object .choice-icon { color: #33453c; font-size: 24px; text-shadow: 0 1px rgba(255,255,255,.65); }
.scene-object .choice-tooltip { top: 66px; width:max-content; max-width:128px; border-color: rgba(255,255,255,.52); background: rgba(250,247,239,.88); box-shadow: 0 9px 24px rgba(22,30,26,.2); pointer-events:none; }
.scene-object .choice-tooltip strong { font-size: 10.5px; line-height:1.18; white-space:normal; }
.scene-object .choice-tooltip[data-laid-out="true"] { left:var(--layout-left) !important; top:var(--layout-top) !important; right:auto !important; bottom:auto !important; transform:none !important; }
.scene-object.can-drag .object-aura::after { top: -15px; background: rgba(53, 72, 62, .82); }
.immersive-scene.has-selection .world-choice.scene-object.selected { width: 58px; height: 58px; }

/* Hotspots sit on illustrated objects rather than in a questionnaire grid. */
.immersive-stage[data-scene="wake"] .scene-object:nth-child(1) { top:29%; right:8%; left:auto; }
.immersive-stage[data-scene="wake"] .scene-object:nth-child(2) { top:35%; left:18%; right:auto; }
.immersive-stage[data-scene="wake"] .scene-object:nth-child(3) { bottom:9%; left:39%; }
.immersive-stage[data-scene="wake"] .scene-object:nth-child(4) { right:10%; bottom:12%; }

.immersive-stage[data-scene="start"] .scene-object:nth-child(1) { top:auto; bottom:8%; left:10%; }
.immersive-stage[data-scene="start"] .scene-object:nth-child(2) { top:40%; right:8%; }
.immersive-stage[data-scene="start"] .scene-object:nth-child(3) { bottom:25%; right:8%; left:auto; }
.immersive-stage[data-scene="start"] .scene-object:nth-child(4) { right:22%; bottom:8%; }

.immersive-stage[data-scene="signals"] .scene-object:nth-child(1) { top:auto; right:12%; bottom:19%; left:auto; }
.immersive-stage[data-scene="signals"] .scene-object:nth-child(2) { top:43%; right:7%; }
.immersive-stage[data-scene="signals"] .scene-object:nth-child(3) { right:21%; bottom:7%; left:auto; }
.immersive-stage[data-scene="signals"] .scene-object:nth-child(4) { bottom:25%; left:7%; }

.immersive-stage[data-scene="connect"] .scene-object:nth-child(1) { top:50%; left:43%; }
.immersive-stage[data-scene="connect"] .scene-object:nth-child(2) { top:62%; right:11%; }
.immersive-stage[data-scene="connect"] .scene-object:nth-child(3) { right:8%; bottom:16%; }
.immersive-stage[data-scene="connect"] .scene-object:nth-child(4) { right:31%; bottom:10%; }

.immersive-stage[data-scene="change"] .scene-object:nth-child(1) { top:auto; bottom:13%; left:8%; }
.immersive-stage[data-scene="change"] .scene-object:nth-child(2) { top:56%; right:9%; }
.immersive-stage[data-scene="change"] .scene-object:nth-child(3) { bottom:5%; left:9%; }
.immersive-stage[data-scene="change"] .scene-object:nth-child(4) { right:10%; bottom:8%; }

.immersive-stage[data-scene="unfinished"] .scene-object:nth-child(1) { top:62%; right:28%; left:auto; }
.immersive-stage[data-scene="unfinished"] .scene-object:nth-child(2) { top:71%; right:9%; }
.immersive-stage[data-scene="unfinished"] .scene-object:nth-child(3) { right:8%; bottom:4%; }
.immersive-stage[data-scene="unfinished"] .scene-object:nth-child(4) { top:55%; right:24%; }

.immersive-stage[data-scene="night"] .scene-object:nth-child(1) { top:auto; bottom:14%; left:8%; }
.immersive-stage[data-scene="night"] .scene-object:nth-child(2) { bottom:7%; left:27%; }
.immersive-stage[data-scene="night"] .scene-object:nth-child(3) { bottom:8%; left:35%; }
.immersive-stage[data-scene="night"] .scene-object:nth-child(4) { right:7%; bottom:7%; }

/* Keep captions inside the phone frame and lift the lowest ones above their object. */
.immersive-stage[data-scene="start"] .scene-object:nth-child(1) .choice-tooltip,
.immersive-stage[data-scene="signals"] .scene-object:nth-child(4) .choice-tooltip,
.immersive-stage[data-scene="change"] .scene-object:nth-child(1) .choice-tooltip,
.immersive-stage[data-scene="change"] .scene-object:nth-child(3) .choice-tooltip,
.immersive-stage[data-scene="night"] .scene-object:nth-child(1) .choice-tooltip { left:0; transform:none; }

.immersive-stage[data-scene="wake"] .scene-object:nth-child(1) .choice-tooltip,
.immersive-stage[data-scene="wake"] .scene-object:nth-child(4) .choice-tooltip,
.immersive-stage[data-scene="start"] .scene-object:nth-child(2) .choice-tooltip,
.immersive-stage[data-scene="start"] .scene-object:nth-child(3) .choice-tooltip,
.immersive-stage[data-scene="signals"] .scene-object:nth-child(1) .choice-tooltip,
.immersive-stage[data-scene="signals"] .scene-object:nth-child(2) .choice-tooltip,
.immersive-stage[data-scene="connect"] .scene-object:nth-child(2) .choice-tooltip,
.immersive-stage[data-scene="connect"] .scene-object:nth-child(3) .choice-tooltip,
.immersive-stage[data-scene="change"] .scene-object:nth-child(2) .choice-tooltip,
.immersive-stage[data-scene="change"] .scene-object:nth-child(4) .choice-tooltip,
.immersive-stage[data-scene="unfinished"] .scene-object:nth-child(2) .choice-tooltip,
.immersive-stage[data-scene="unfinished"] .scene-object:nth-child(3) .choice-tooltip,
.immersive-stage[data-scene="night"] .scene-object:nth-child(4) .choice-tooltip { right:0; left:auto; transform:none; }

.immersive-stage[data-scene="wake"] .scene-object:nth-child(3) .choice-tooltip,
.immersive-stage[data-scene="wake"] .scene-object:nth-child(4) .choice-tooltip,
.immersive-stage[data-scene="start"] .scene-object:nth-child(1) .choice-tooltip,
.immersive-stage[data-scene="start"] .scene-object:nth-child(3) .choice-tooltip,
.immersive-stage[data-scene="start"] .scene-object:nth-child(4) .choice-tooltip,
.immersive-stage[data-scene="signals"] .scene-object:nth-child(1) .choice-tooltip,
.immersive-stage[data-scene="signals"] .scene-object:nth-child(3) .choice-tooltip,
.immersive-stage[data-scene="signals"] .scene-object:nth-child(4) .choice-tooltip,
.immersive-stage[data-scene="connect"] .scene-object:nth-child(3) .choice-tooltip,
.immersive-stage[data-scene="connect"] .scene-object:nth-child(4) .choice-tooltip,
.immersive-stage[data-scene="change"] .scene-object:nth-child(1) .choice-tooltip,
.immersive-stage[data-scene="change"] .scene-object:nth-child(3) .choice-tooltip,
.immersive-stage[data-scene="change"] .scene-object:nth-child(4) .choice-tooltip,
.immersive-stage[data-scene="unfinished"] .scene-object:nth-child(3) .choice-tooltip,
.immersive-stage[data-scene="night"] .scene-object .choice-tooltip { top:auto; bottom:66px; }

.scene-guidance p { color:#3f4f46; background:rgba(250,247,238,.82); box-shadow:0 7px 22px rgba(28,37,32,.14); }
.scene-guidance { animation:guidance-stage-in .5s .58s ease both; }
.immersive-reflection { border-color:rgba(255,255,255,.48); background:rgba(249,246,237,.91); box-shadow:0 22px 55px rgba(18,25,21,.26); }
.immersive-scene.has-selection .scene-artwork { transform: translate(calc(var(--look-x, 0) * -5px), calc(var(--look-y, 0) * -3px)) scale(1.07); filter:saturate(.82) brightness(.92); }

/* Seven short visual bridges. The outgoing scene physically becomes the next one. */
body[data-view="story"] .transition-screen {
  position: relative;
  display: flex;
  min-height: 100dvh;
  padding: 0 30px 68px;
  overflow: hidden;
  justify-content: flex-end;
  isolation: isolate;
  background: #18231f;
  color: #fffaf0;
}
.transition-scene { position:absolute; z-index:-2; inset:0; overflow:hidden; }
.transition-frame { position:absolute; inset:-3%; background-position:center; background-size:cover; }
.frame-before { z-index:1; animation:frame-before-out 1.55s cubic-bezier(.55,.05,.45,.95) both; }
.frame-after { z-index:0; transform:scale(1.08); animation:frame-after-in 1.55s cubic-bezier(.2,.72,.2,1) both; }
.transition-scene::after { content:""; position:absolute; z-index:8; inset:0; background:linear-gradient(transparent 36%,rgba(14,21,18,.2) 60%,rgba(12,18,15,.84)); }
.transition-screen .soft-label,
.transition-screen h2 { position:relative; z-index:12; color:#fffaf0; text-shadow:0 2px 15px rgba(0,0,0,.4); }
.transition-screen .soft-label { margin-bottom:9px; font-size:10px; letter-spacing:1.7px; }
.transition-screen h2 { max-width:440px; margin:0; font-size:clamp(30px,8vw,42px); line-height:1.05; }
.transition-orb { z-index:7; top:18%; left:-22%; width:145%; height:25%; border-radius:50%; background:linear-gradient(90deg,transparent,rgba(255,229,162,.6),transparent); filter:blur(22px); box-shadow:none; animation:light-cross 1.45s ease-in-out both; }
.transition-paper { position:absolute; z-index:6; display:none; width:76%; height:58%; border:1px solid rgba(63,68,61,.18); border-radius:6px; background:rgba(246,238,219,.72); box-shadow:0 18px 60px rgba(0,0,0,.24); transform-origin:bottom left; }
.transition-route { position:absolute; z-index:7; inset:0; display:none; width:100%; height:100%; }
.transition-route path { fill:none; stroke:rgba(255,239,194,.9); stroke-width:3; stroke-linecap:round; stroke-dasharray:720; stroke-dashoffset:720; filter:drop-shadow(0 2px 5px rgba(0,0,0,.3)); }
.transition-memories { position:absolute; z-index:10; inset:0; pointer-events:none; }
.transition-memories span { position:absolute; display:grid; width:38px; height:38px; place-items:center; border:1px solid rgba(255,255,255,.62); border-radius:50%; background:rgba(252,246,230,.84); box-shadow:0 8px 22px rgba(0,0,0,.22); color:#486054; opacity:0; }

[data-transition="paper-ripple"] .transition-paper { display:block; }
[data-transition="paper-ripple"] .paper-one { top:16%; left:-8%; animation:paper-one-turn 1.5s ease-in-out both; }
[data-transition="paper-ripple"] .paper-two { top:26%; right:-17%; animation:paper-two-turn 1.5s .08s ease-in-out both; }
[data-transition="signal-float"] .transition-memories span,
[data-transition="constellation"] .transition-memories span { opacity:1; animation:memory-float-in 1.35s cubic-bezier(.2,.72,.2,1) both; }
[data-transition="signal-float"] .transition-memories span { left:var(--memory-left); top:calc(var(--memory-top) + 17%); }
[data-transition="thread-connect"] .transition-route,
[data-transition="route-redraw"] .transition-route { display:block; }
[data-transition="thread-connect"] .transition-route path,
[data-transition="route-redraw"] .transition-route path { animation:route-draw 1.35s ease-in-out both; }
[data-transition="route-redraw"] .frame-before { animation-name:route-peel; }
[data-transition="sunset-fold"] .frame-before { clip-path:polygon(0 0,100% 0,100% 100%,0 100%); animation:sunset-fold 1.55s cubic-bezier(.55,.05,.45,.95) both; transform-origin:bottom; }
[data-transition="constellation"] .frame-before { animation:night-dim 2.25s ease both; }
[data-transition="constellation"] .frame-after { animation:night-breathe 2.25s ease both; }
[data-transition="constellation"] .transition-memories span { left:var(--memory-left); top:var(--memory-top); animation-name:constellation-gather; animation-duration:2s; }
[data-transition="constellation"] .transition-orb { top:8%; height:48%; opacity:.34; animation-duration:2s; }

@keyframes artwork-arrive { from { opacity:0; transform:scale(1.09); filter:blur(7px); } to { opacity:1; transform:scale(1.025); filter:none; } }
@keyframes artwork-breathe { 0%,100% { scale:1; } 50% { scale:1.018; } }
@keyframes scene-reveal-away { 0%,18% { opacity:1; transform:scale(1.018); } 100% { opacity:0; transform:scale(1.045); } }
@keyframes narrative-stage-in { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:none; } }
@keyframes hotspot-stage-in { from { opacity:0; filter:blur(3px) drop-shadow(0 7px 13px rgba(21,30,26,.22)); } to { opacity:1; filter:blur(0) drop-shadow(0 7px 13px rgba(21,30,26,.22)); } }
@keyframes guidance-stage-in { from { opacity:0; transform:translateY(7px); } to { opacity:1; transform:none; } }
@keyframes frame-before-out { 0%,28% { opacity:1; transform:scale(1); filter:none; } 100% { opacity:0; transform:scale(1.09); filter:blur(8px); } }
@keyframes frame-after-in { from { transform:scale(1.12); filter:blur(11px); } to { transform:scale(1.025); filter:none; } }
@keyframes light-cross { from { transform:translateX(-55%) rotate(-8deg); opacity:0; } 45% { opacity:1; } to { transform:translateX(45%) rotate(-8deg); opacity:0; } }
@keyframes paper-one-turn { from { transform:translate(-80%,24%) rotate(-16deg); } to { transform:translate(150%,-36%) rotate(21deg); } }
@keyframes paper-two-turn { from { transform:translate(65%,30%) rotate(13deg); } to { transform:translate(-155%,-42%) rotate(-18deg); } }
@keyframes memory-float-in { from { opacity:0; transform:translateY(80px) scale(.35) rotate(-20deg); } 55% { opacity:1; } to { opacity:.7; transform:translateY(-45px) scale(.85); } }
@keyframes route-draw { 0% { stroke-dashoffset:720; } 70%,100% { stroke-dashoffset:0; } }
@keyframes route-peel { 0%,25% { clip-path:polygon(0 0,100% 0,100% 100%,0 100%); } 100% { clip-path:polygon(100% 0,100% 0,100% 100%,86% 100%); filter:saturate(.5); } }
@keyframes sunset-fold { 0%,25% { clip-path:polygon(0 0,100% 0,100% 100%,0 100%); transform:scaleY(1); } 100% { clip-path:polygon(0 87%,100% 72%,100% 100%,0 100%); transform:scaleY(.84); opacity:.25; } }
@keyframes night-dim { from { opacity:1; filter:brightness(1); } to { opacity:.26; filter:brightness(.55) blur(3px); transform:scale(1.05); } }
@keyframes night-breathe { from { filter:brightness(.55) blur(8px); transform:scale(1.08); } to { filter:brightness(.82); transform:scale(1.02); } }
@keyframes constellation-gather { from { opacity:0; transform:translateY(90px) scale(.25) rotate(-18deg); } 60% { opacity:1; } to { opacity:.88; transform:translateY(-18px) scale(.9); } }

@media (max-width:430px) {
  .landing-world { height:310px; }
  .scene-object { width:54px; height:54px; }
  .scene-object .choice-tooltip { top:62px; }
  .immersive-scene.has-selection .world-choice.scene-object.selected { width:54px; height:54px; }
}

@media (max-height:720px) {
  .immersive-narration { top:63px; padding:12px 14px; }
  .immersive-narration h2 { font-size:24px; }
  .immersive-narration > p:last-child { font-size:10.5px; }
  .scene-object { width:50px; height:50px; }
  .scene-object .choice-tooltip { top:57px; padding:5px 7px; }
  .immersive-scene.has-selection .world-choice.scene-object.selected { width:50px; height:50px; }
}
