:root {
  --text-scale: 1;
  font-size: calc(150% * var(--text-scale));
  --ink: #f4eddd;
  --muted: #e5dbc4;
  --gold: #e3c989;
  --paper: #f1e8d4;
  --line: #8d8060;
  --sans: Arial, Helvetica, sans-serif;
  --serif: Georgia, 'Times New Roman', serif;
  --ease: cubic-bezier(.22,1,.36,1);
}
* { box-sizing: border-box; }
body { margin: 0; background: #10211e; color: var(--ink); font-family: var(--sans); line-height: 1.65; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; line-height: 1.45; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid var(--gold); outline-offset: 5px; }
button:disabled { cursor: default; opacity: .5; }
button:active:not(:disabled) { transform: scale(.98); }
[hidden] { display: none !important; }
h1,h2,h3,h4,p,blockquote,figure { margin: 0; }
h1,h2,h3,h4 { font-weight: 400; line-height: 1.2; }
h1:focus,h2:focus,main:focus { outline: none; }
h1,h2,h3,h4,p,span,button,a,li { overflow-wrap: anywhere; }
.serif { font-family: var(--serif); font-weight: 400; font-style: italic; letter-spacing: -.025em; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; background: var(--paper); color: #173026; padding: 12px 20px; transform: translateY(-180%); }
.skip-link:focus { transform: none; }
.preview-banner { background: #07100e; color: #ede4ce; padding: 10px 22px; display: flex; gap: 10px 22px; justify-content: center; flex-wrap: wrap; font-size: .85rem; line-height: 1.45; }
.story { min-height: 100svh; display: flex; flex-direction: column; background: #122720; position: relative; }
.story[data-palette='cover'] { background: #0b171b url('assets/enchanted-journey.png') 65% center/cover no-repeat; }
.story[data-palette='heaven'] { background: #242035; --gold: #e8cba5; }
.story[data-palette='midnight'] { background: #18212d; }
.story[data-palette='teal'] { background: #132d32; }
.story[data-palette='wine'] { background: #2d1e23; --gold: #efd395; }
.story[data-palette='paper'] { background: #e7ebd9; color: #25382c; --muted: #344635; --gold: #59602b; --line: #85916b; }

.story[data-palette='daylight'] { background: #e9e2cd; color: #293d39; --muted: #364b43; --gold: #596330; --line: #829074; }
.story[data-palette='notebook'] { background: #ded8ca; color: #273b36; --muted: #30463d; --gold: #476150; --line: #819181; }
.story[data-palette='bedside'] { background: #352c32; --gold: #e8cbaa; }

.story[data-palette='departure'] { background: #172832; }
.story[data-palette='mirror-night'] { background: #172a32; --gold: #d3d6b9; }
.masthead,.progress,.navigation { --gold: #e3c989; color: #f4eddd; background: #10211ef7; }
.masthead { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 24px max(24px,4vw) 10px; gap: 18px 28px; position: relative; z-index: 5; }
.wordmark { display: inline-flex; align-items: center; min-height: 54px; font-family: var(--serif); font-style: italic; font-size: 1.65rem; text-decoration: none; line-height: 1; }
.wordmark span { font-style: normal; margin-left: 10px; color: var(--gold); }
.edition { font-size: .85rem; line-height: 1.4; flex: 1; min-width: 160px; color: #ece1c9; }
.header-controls { display: flex; gap: 12px; flex-wrap: wrap; }
.font-controls { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.font-controls button { min-width: 66px; font-weight: 600; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.utility-button,.nav-button { font-size: .9rem; background: transparent; border: 1px solid currentColor; padding: 12px 18px; min-height: 54px; border-radius: 5px; max-width: 100%; transition: transform 160ms var(--ease); }
.progress { display: flex; gap: 6px; padding: 0 max(24px,4vw); position: relative; z-index: 5; }
.progress button { flex: 1; min-width: 0; min-height: 44px; padding: 20px 0; background: transparent; }
.progress button::after { content: ''; display: block; height: 3px; background: #8a978d; border-radius: 3px; }
.progress button.passed::after { background: #ebe0c9; }
.progress button[aria-current='step']::after { background: #f0cf82; height: 5px; margin-top: -1px; }
main { flex: 1; position: relative; isolation: isolate; }
.scene { width: 100%; max-width: 1480px; margin: 0 auto; padding: clamp(44px,5vw,80px) max(24px,6vw); min-height: 660px; }
.scene>* { min-width: 0; }
.scene h2 { font-family: var(--serif); font-size: clamp(2.05rem,4.7vw,3.35rem); letter-spacing: -.035em; }
.scene h2 .serif { color: var(--gold); line-height: 1.18; }
.eyebrow { font-size: .85rem; line-height: 1.5; color: var(--gold); }
.body-copy { font-size: 1rem; line-height: 1.75; max-width: 46ch; color: var(--muted); }
.small-note { font-size: .95rem; line-height: 1.6; text-align: center; color: var(--muted); }
.scene-heading { text-align: center; max-width: 1100px; margin: auto; }
.scene-heading .eyebrow { margin-bottom: 20px; }
.scene-heading .body-copy { margin: 24px auto 0; }
.navigation { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; padding: 18px max(24px,4vw); border-top: 1px solid #7e8f7f; position: sticky; bottom: 0; z-index: 10; box-shadow: 0 -8px 25px #0002; }
.nav-button { display: flex; justify-content: center; align-items: center; gap: 14px; width: max-content; min-width: 118px; border-color: #b2baa3; }
#next { justify-self: end; }
.chapter-status { display: flex; justify-content: center; gap: 10px; font-size: .9rem; }
.chapter-name { display: none; }
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 18px; border-radius: 5px; font-size: .95rem; padding: 17px 24px; min-height: 60px; line-height: 1.5; position: relative; max-width: 100%; transition: transform 160ms var(--ease); }
.pill>span { font-size: 1.25rem; line-height: 1; }
.primary { background: var(--gold); color: #14261e; }
.memory-button { margin-top: 28px; border: 1px solid var(--gold); background: #0e1b1988; color: var(--gold); }
.text-button { background: transparent; font-size: .95rem; padding: 16px 0; margin-top: 12px; color: var(--gold); min-height: 56px; }
.spark-field { position: absolute; left: 50%; top: 45%; width: 1px; height: 1px; pointer-events: none; z-index: 6; }
.spark-field>span { position: absolute; font-size: 20px; color: var(--gold); line-height: 1; }

/* 01 — the cover, with distant fireflies. */
.cover { display: flex; align-items: center; min-height: 760px; padding-bottom: 115px; gap: 40px; position: relative; }
.cover-copy { position: relative; z-index: 2; width: 65%; max-width: 850px; padding: 38px; background: #0b1917ef; border: 1px solid #b7a47166; box-shadow: 0 15px 70px #0003; }
.cover h1 { margin: 25px 0; }
.you { font-family: var(--serif); font-size: clamp(2.6rem,7.5vw,4.6rem); line-height: 1.05; letter-spacing: -.04em; display: block; color: #f5ebd5; }
.cover-script { display: block; font-size: clamp(1.85rem,4.4vw,2.65rem); line-height: 1.15; margin-top: 14px; color: var(--gold); }
.intro { font-size: 1rem; line-height: 1.65; margin-bottom: 28px; color: #f0e5cd; }
.cover-art { position: absolute; right: 9%; bottom: 150px; color: #eed6a0; }
.keepsake-seal { height: 150px; width: 150px; display: grid; place-items: center; border: 1px solid #e3c989; outline: 1px solid #d8bc7d77; outline-offset: 7px; border-radius: 50%; background: #0b171be0; transform: rotate(8deg); }
.keepsake-seal b { font-family: var(--serif); font-size: 2.4rem; font-weight: 400; }
.cover-footer { position: absolute; left: max(24px,6vw); right: max(24px,6vw); bottom: 28px; display: flex; justify-content: space-between; flex-wrap: wrap; font-size: .85rem; line-height: 1.5; gap: 12px; background: #0b1917ed; padding: 12px 18px; }
.fireflies { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 1; }
.fireflies i { position: absolute; left: 18%; top: 14%; width: 5px; height: 5px; border-radius: 50%; background: #eacd8e; box-shadow: 0 0 12px 3px #e9bc6a44; opacity: .45; animation: drift 14s ease-in-out infinite alternate; }
.fireflies i:nth-child(2) { left: 43%; top: 68%; animation-delay: -3s; }
.fireflies i:nth-child(3) { left: 60%; top: 48%; animation-delay: -1s; }
.fireflies i:nth-child(4) { left: 72%; top: 25%; animation-delay: -5s; }
.fireflies i:nth-child(5) { left: 87%; top: 74%; animation-delay: -2s; }
.fireflies i:nth-child(6) { left: 7%; top: 65%; animation-delay: -6s; }
.fireflies i:nth-child(7) { left: 49%; top: 26%; animation-delay: -4s; }
.fireflies i:nth-child(8) { left: 95%; top: 53%; animation-delay: -1.5s; }

/* 02 — a doorway opens onto the beginning. */
.origin { display: grid; grid-template-columns: 1.15fr .85fr; gap: 6vw; align-items: center; }
.origin-copy>.eyebrow,.home-copy>.eyebrow,.journey-copy>.eyebrow,.ingredients-copy>.eyebrow,.sorting-copy>.eyebrow,.boarding-copy>.eyebrow,.moment-copy>.eyebrow,.mirror-copy>.eyebrow { margin-bottom: 24px; }
.origin-copy>.body-copy,.home-copy>.body-copy,.journey-copy>.body-copy,.ingredients-copy>.body-copy,.boarding-copy>.body-copy,.moment-copy>.body-copy,.mirror-copy>.body-copy { margin-top: 28px; }
.origin-copy>.origin-love { color: var(--gold); font-size: 1.1rem; }
.memory-reveal { margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--line); }
.memory-reveal h3 { font-size: 1.15rem; line-height: 1.5; color: var(--gold); }
.memory-reveal .body-copy { margin-top: 22px; }
.heaven-door { position: relative; isolation: isolate; height: 470px; max-width: 340px; width: 100%; justify-self: center; border: 2px solid #c0a990; border-radius: 50% 50% 3px 3px / 32% 32% 3px 3px; overflow: hidden; perspective: 900px; background: #473a51; box-shadow: 0 0 60px #d9ae7420; }
.door-light { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 30%,#f4dca9,#b38b81 45%,#614b6c); opacity: .25; transition: opacity 900ms ease; }
.door-leaf { position: absolute; top: 0; bottom: 0; width: 50%; z-index: 2; background: linear-gradient(90deg,#2a243c,#37304b); border: 1px solid #a99a8466; transition: transform 1200ms var(--ease); backface-visibility: hidden; }
.leaf-left { left: 0; transform-origin: left center; }
.leaf-right { right: 0; transform-origin: right center; }
.door-name { position: absolute; top: 85px; z-index: 3; left: 0; width: 100%; text-align: center; font-family: var(--serif); font-size: 26px; letter-spacing: .12em; color: #f5dcb6; }
.door-words { position: absolute; z-index: 1; left: 15%; width: 70%; top: 220px; text-align: center; color: #221d2a; font-family: var(--serif); font-size: 30px; line-height: 1.5; }
.heaven-door[data-open='true'] .leaf-left { transform: rotateY(-76deg); }
.heaven-door[data-open='true'] .leaf-right { transform: rotateY(76deg); }
.heaven-door[data-open='true'] .door-light { opacity: 1; }

/* 03 — ink and an unreliable wand. */
.number-layout { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 6vw; }
.number-copy .body-copy { margin-top: 28px; }
.number-copy .eyebrow { margin-bottom: 24px; }
.stamp { display: block; border-top: 1px solid var(--line); padding-top: 20px; color: var(--gold); line-height: 1.6; font-size: .95rem; margin-top: 26px; }
.name-spell { text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 34px 24px; border: 1px solid #9aa77a; background: #10211e; min-width: 0; position: relative; border-radius: 50% 50% 6px 6px / 14% 14% 6px 6px; }
.name-wand { width: 200px; height: 80px; position: relative; transform-origin: 25% 80%; margin: 15px 0 24px; }
.name-wand i { display: block; position: absolute; width: 155px; height: 6px; border-radius: 8px; top: 45px; left: 20px; background: linear-gradient(90deg,#86684e 30%,#c8aa71 75%,#f4dfab); transform: rotate(-15deg); }
.name-wand b { position: absolute; right: 0; top: 0; font-size: 35px; font-weight: 400; color: #e8d491; }
.name-spell .eyebrow { max-width: 24ch; }
.spell-name { overflow-wrap: anywhere; font-family: var(--serif); font-size: clamp(2.5rem,5vw,3.5rem); color: #f0deba; line-height: 1.2; margin: 24px 0 15px; max-width: 100%; }
.spell-caption { font-size: 1rem; color: #eee1c8; line-height: 1.5; }
.spell-button { background: var(--gold); color: #13251e; margin-top: 26px; }

/* 04 — two lights settle together. */
.home { display: grid; grid-template-columns: .85fr 1.15fr; align-items: center; gap: 6vw; }
.hug-orbit { width: min(100%,360px); aspect-ratio: 1; position: relative; justify-self: center; pointer-events: none; }
.hug-ring { position: absolute; inset: 8%; border: 1px solid #b3b6c577; border-radius: 50%; }
.hug-dot { position: absolute; top: 48%; width: 24px; height: 24px; border-radius: 50%; transition: transform 1200ms var(--ease); }
.dot-you { left: calc(50% - 12px); transform: translateX(-100px); background: #eccfa0; box-shadow: 0 0 40px 13px #eccfa033; }
.dot-me { left: calc(50% - 12px); transform: translateX(100px); background: #bbccde; box-shadow: 0 0 40px 13px #bbccde33; }
.hug-centre { position: absolute; top: 18%; left: 40%; font-size: 75px; color: #e3d6b9; }
.hug-ripple { position: absolute; inset: 34%; border: 1px solid #eed2a6; border-radius: 50%; opacity: 0; transition: opacity 900ms ease,transform 1500ms var(--ease); }
.hug-orbit[data-hugged='true'] .dot-you { transform: translateX(-10px); }
.hug-orbit[data-hugged='true'] .dot-me { transform: translateX(10px); }
.hug-orbit[data-hugged='true'] .hug-ripple { opacity: .55; transform: scale(1.5); }
.hug-note { margin-top: 22px; font-size: 1rem; color: #e8d8b9; }

/* 05 — the world passes the window. */
.journeys { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 6vw; }
.travel-switch { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.travel-switch button { flex: 1; background: transparent; padding: 15px 22px; font-size: .95rem; border-radius: 5px; border: 1px solid #b9c2af; min-height: 58px; }
.travel-switch button[aria-pressed='true'] { background: var(--gold); color: #16291f; border-color: var(--gold); }
.journey-window { position: relative; min-width: 0; min-height: 490px; padding: 55px 24px 65px; border: 12px solid #bcc4b3; outline: 1px solid #ebddba; border-radius: 44% 44% 25px 25px / 20% 20% 25px 25px; overflow: hidden; background: #c6d2c3; color: #263a32; box-shadow: inset 0 0 0 5px #627d73,0 18px 40px #0003; display: flex; flex-direction: column; justify-content: center; }
.window-scenery { position: absolute; inset: 6px; overflow: hidden; border-radius: inherit; pointer-events: none; }
.window-scenery i { position: absolute; width: 150px; height: 50px; border-radius: 50%; background: #e4e9d8; opacity: .8; top: 20%; left: -30%; animation: window-cloud 22s linear infinite; }
.window-scenery i:nth-child(2) { top: 32%; animation-delay: -9s; width: 100px; }
.window-scenery i:nth-child(3) { top: 12%; animation-delay: -17s; width: 125px; }
.passing-land { position: absolute; width: 200%; height: 130px; bottom: 0; background: repeating-linear-gradient(112deg,#7e997e 0 70px,#94aa85 70px 135px); border-radius: 45% 30% 0 0; animation: passing-land 9s linear infinite; }
.journey-window[data-mode='plane'] .passing-land { opacity: 0; }
.journey-window[data-mode='plane'] { background: #bcced9; }
.transport-picture { height: 190px; display: grid; place-items: center; margin: 25px 0; position: relative; overflow: hidden; z-index: 1; }
.transport-picture svg { width: 270px; height: 170px; max-width: 100%; fill: none; stroke: #344f45; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }
.transport-picture[data-mode='train'] .plane-icon,.transport-picture[data-mode='plane'] .train-icon { display: none; }
.ticket-route { font-family: var(--serif); font-size: 1.25rem; text-align: center; line-height: 1.5; position: relative; z-index: 1; background: #dbe3d1ed; padding: 12px; border-radius: 3px; }
.window-ledge { position: absolute; bottom: 0; left: 0; width: 100%; height: 22px; background: #879c8c; border-top: 3px solid #e4e8d7; }

/* 06 — an ingredient at a time. */
.ingredients { display: grid; grid-template-columns: 1fr 1fr; gap: 6vw; align-items: center; }
.ingredient-list { list-style: none; margin: 0; padding: 0; }
.ingredient-list li { border-bottom: 1px solid #8a9877; }
.ingredient-list button { display: flex; text-align: left; gap: 20px; align-items: center; font-size: 1rem; line-height: 1.5; padding: 22px 12px; width: 100%; background: transparent; border-radius: 4px; }
.ingredient-list button>span:last-child { min-width: 0; }
.ingredient-mark { flex-shrink: 0; width: 38px; height: 38px; border: 1px solid #647349; border-radius: 50%; display: grid; place-items: center; font-size: 25px; transition: transform 350ms var(--ease); }
.ingredient-list button[aria-pressed='true'] { background: #c8d6af; }
.ingredient-list button[aria-pressed='true'] .ingredient-mark { background: #485f38; color: #f5f0d5; transform: rotate(45deg); }
.ingredient-list .secret-ingredient { border-bottom: 0; margin-top: 24px; }
.ingredient-list .secret-ingredient button { position: relative; isolation: isolate; padding: 24px 18px; border: 2px solid #94712d; border-radius: 16px; color: #493511; background: #f4e5bc; box-shadow: 0 6px 24px #77551d12; }
.secret-ingredient-heading { display: block; font-size: 1rem; line-height: 1.5; }
#secret-ingredient-name { display: block; font-family: var(--serif); font-size: 1.35rem; line-height: 1.3; margin-top: 8px; }
.secret-ingredient .ingredient-mark { border-color: #94712d; color: #684d1b; }
.ingredient-list .secret-ingredient button[aria-pressed='true'] { background: #f2d9dd; border-color: #805265; color: #532e40; }
.ingredient-list .secret-ingredient button[aria-pressed='true'] .ingredient-mark { background: #805265; color: #fff1e3; border-color: #805265; transform: none; }
.secret-ingredient .spark-field>span { color: #805265; }
.potion-art { position: relative; width: 195px; margin: 30px 0 18px; color: #617042; }
.potion-art::after { content: '♡'; position: absolute; left: 50%; top: 64%; font-size: 54px; line-height: 1; color: #65364d; opacity: 0; transform: translate(-50%,-50%) scale(.85); transition: opacity 260ms ease, transform 260ms var(--ease); }
.potion-art svg { display: block; width: 100%; fill: none; stroke: currentColor; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }
.potion-fill { fill: #a5b77f; stroke: none; transform-box: fill-box; transform-origin: bottom; transform: scaleY(.08); transition: transform 750ms var(--ease); }
.potion-bubble { fill: #e4edcc; stroke: #7e945b; opacity: .65; animation: potion-bubble 4s ease-in-out infinite; }
.potion-bubble:nth-child(3) { animation-delay: -1.2s; }
.potion-bubble:nth-child(4) { animation-delay: -2.4s; }
.potion-art[data-full='true'] .potion-fill { fill: #789359; }
.potion-art[data-secret='true'] { color: #805265; }
.potion-art[data-secret='true']::after { opacity: 1; transform: translate(-50%,-50%) scale(1); }
.potion-art[data-secret='true'] .potion-fill { fill: #cc879c; }
.potion-art[data-secret='true'] .potion-bubble { fill: #fff1dc; stroke: #805265; }
.potion-status { max-width: 32ch; font-size: 1rem; line-height: 1.6; color: #435c35; }
.potion-reset { color: #435c35; }

/* 07 — the Sorting Hat and its verdict. */
.sorting { display: grid; grid-template-columns: 1fr 1fr; gap: 5vw; align-items: center; }
.sorting-invitation { margin-top: 26px; }
.sorting-whisper { font-family: var(--serif); font-style: italic; font-size: 1rem; line-height: 1.5; color: var(--gold); margin-top: 24px; }
.sorting-ceremony { position: relative; isolation: isolate; overflow: clip; width: min(100%,400px); height: 480px; justify-self: center; align-self: center; }
.sorting-hat { position: absolute; z-index: 2; top: 0; left: 5%; width: 90%; height: 300px; overflow: visible; filter: drop-shadow(0 12px 20px #0004); transform-origin: 50% 80%; }
.hat-crown { fill: url(#hat-shade); stroke: #d0a977; stroke-width: 2; stroke-linejoin: round; }
.hat-brim { fill: #624730; stroke: #b68d59; stroke-width: 2; }
.hat-stitch { fill: none; stroke: #d5b17c; stroke-width: 2; stroke-linecap: round; }
.hat-face { fill: none; stroke: #30281f; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.hat-orbit { position: absolute; inset: 18px 0 45px; border: 1px solid #d8bc7d55; border-radius: 50%; transform: rotate(-12deg); }
.hat-orbit span { position: absolute; font-size: 30px; color: var(--gold); animation: drift 10s ease-in-out infinite alternate; }
.hat-orbit span:first-child { top: 6%; left: 10%; }
.hat-orbit span:nth-child(2) { right: 5%; top: 30%; font-size: 20px; animation-delay: -3s; }
.hat-orbit span:last-child { bottom: 8%; left: 12%; font-size: 24px; animation-delay: -5s; }
.house-crest { background: #722f36; clip-path: polygon(0 0,100% 0,100% 66%,94% 79%,80% 90%,50% 100%,20% 90%,6% 79%,0 66%); display: flex; align-items: center; flex-direction: column; justify-content: center; color: #ecd093; border-top: 5px solid #dfbf76; }
.house-crest::before { content: ''; position: absolute; inset: 15px; border: 1px solid #e8c989; clip-path: polygon(0 0,100% 0,100% 68%,82% 89%,50% 100%,18% 89%,0 68%); }
.sorting-crest { position: absolute; top: 215px; left: calc(50% - 110px); width: 220px; min-height: 245px; gap: 10px; opacity: 0; visibility: hidden; }
.crest-star { font-size: 24px; line-height: 1; }
#crest-letter { font-family: var(--serif); font-size: 90px; line-height: 1; }
.crest-ribbon { font-family: var(--serif); font-size: 23px; line-height: 1.5; }
.sorting-ceremony[data-sorted='true'] .sorting-crest { opacity: 1; visibility: visible; }
.sorting-result { grid-column: 1/-1; width: 100%; border-top: 1px solid #b6a373; padding-top: 40px; }
.house-verdict { font-family: var(--serif); font-size: clamp(1.8rem,4.7vw,3rem); line-height: 1.3; margin-top: 18px; color: #f4e8ce; }
.house-verdict .serif { color: var(--gold); }
.sorting-prompt { margin-top: 24px; max-width: none; }
.house-reasons { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 18px; margin: 34px 0; }
.house-reason { display: flex; align-items: center; flex-direction: column; gap: 18px; border: 1px solid #bca575; background: #241e19; color: #f4e8ce; padding: 24px 16px; font-size: 1rem; line-height: 1.5; position: relative; border-radius: 5px; min-width: 0; }
.reason-charm { display: grid; place-items: center; border: 1px solid #bca575; border-radius: 50%; color: #efd395; width: 64px; height: 64px; font-size: 30px; line-height: 1; }
.house-reason[aria-pressed='true'] { background: #722f36; border-color: #efd395; }
.house-reason[aria-pressed='true'] .reason-charm { background: #e3c989; color: #532528; box-shadow: 0 0 28px #edce8530; }
.house-reason-detail { display: grid; grid-template-columns: .75fr 1.25fr; gap: 40px; padding: 36px; background: #24191d; border: 1px solid #a89976; align-items: start; }
.hat-thought { font-family: var(--serif); font-size: 1.35rem; font-style: italic; color: #ecd093; line-height: 1.55; }
.hat-thought::before { content: '“'; }.hat-thought::after { content: '”'; }
.reason-from-me { min-width: 0; }
.reason-from-me h4 { font-size: 1.1rem; line-height: 1.5; margin-bottom: 20px; color: var(--gold); }

/* Living photographs. */
.living-photo { width: 100%; }
.portrait-media { position: relative; width: 100%; aspect-ratio: 1; background: #202e26; isolation: isolate; overflow: hidden; }
.portrait-media>img,.portrait-media>video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.portrait-media>video { opacity: 0; pointer-events: none; }
.portrait-toggle { width: 100%; margin-top: 12px; background: #10211ef5; border: 1px solid #dacaab; color: #f4eddd; padding: 13px; font-size: .9rem; min-height: 54px; border-radius: 4px; }

/* 08 — the most memorable stack of boarding passes. */
.boarding { display: grid; grid-template-columns: 1.1fr .9fr; gap: 5vw; align-items: center; }
.boarding-art { min-width: 0; max-width: 500px; width: 100%; justify-self: center; }
.boarding-stack { position: relative; height: 480px; isolation: isolate; }
.boarding-pass { position: absolute; top: 65px; left: 12%; width: 76%; height: 190px; background: #f1e8d4; color: #334435; border: 1px solid #96835a; box-shadow: 0 8px 18px #0003; padding: 16px 22px; display: flex; justify-content: space-between; align-items: flex-start; transform: translate(calc((var(--pass) - 2.5) * 3px),calc(var(--pass) * 6px)) rotate(calc((var(--pass) - 2.5) * 1deg)); transition: transform 650ms var(--ease); }
.boarding-pass::after { content: ''; position: absolute; left: 0; right: 0; bottom: 44px; border-top: 2px dashed #8e7b53; }
.boarding-pass b,.boarding-pass i { font-family: var(--serif); font-size: 32px; line-height: 1.2; font-weight: 400; font-style: normal; }
.boarding-stack[data-open='true'] .boarding-pass { transform: translate(calc((var(--pass) - 2.5) * 5px),calc(var(--pass) * 43px)) rotate(calc((var(--pass) - 2.5) * 3deg)); }

/* 09 — a sundial walks through an imagined day. */
.perfect-day { display: grid; grid-template-columns: .9fr 1.1fr; gap: 6vw; align-items: start; }
.day-heading .eyebrow { margin-bottom: 24px; }
.day-dial { width: min(100%,300px); aspect-ratio: 1; position: relative; margin: 38px auto 24px; overflow: hidden; border-radius: 50%; background: #d4d3b5; border: 1px solid #7d916b; box-shadow: inset 0 0 0 14px #e7e2c7,inset 0 0 0 15px #a6ac83; }
.dial-track { position: absolute; inset: 22%; border: 1px dashed #718568; border-radius: 50%; }
.dial-hand { position: absolute; top: 50%; left: 50%; width: 37%; height: 2px; background: #5c7556; transform: rotate(-90deg); transform-origin: left center; transition: transform 1000ms var(--ease); }
.dial-hand::after { content: ''; position: absolute; right: -14px; top: -14px; width: 30px; height: 30px; background: #c49648; border: 5px double #eee1b2; border-radius: 50%; box-shadow: 0 0 20px #b6934c44; }
.dial-sun { position: absolute; inset: 42%; border: 2px solid #8d834f; border-radius: 50%; background: #f0deaa; transition: opacity 600ms ease; }
.dial-moon { position: absolute; inset: 30%; display: grid; place-items: center; font-size: 75px; color: #425955; opacity: 0; transition: opacity 700ms ease; }
.day-dial[data-night='true'] .dial-moon { opacity: 1; }.day-dial[data-night='true'] .dial-sun { opacity: 0; }
.day-timeline { list-style: none; padding: 0; margin: 0; }
.day-timeline li { position: relative; display: grid; grid-template-columns: 60px minmax(0,1fr); gap: 26px; padding-bottom: 32px; }
.day-timeline li:last-child { padding-bottom: 0; }
.day-timeline li:not(:last-child)::after { content: ''; position: absolute; left: 29px; top: 67px; bottom: 6px; border-left: 1px solid #8a9879; }
.day-marker { width: 60px; height: 60px; display: grid; place-items: center; border: 1px solid #708566; border-radius: 50%; color: #40573c; background: #e7e2ca; font-size: .95rem; line-height: 1; }
.day-marker[aria-pressed='true'] { background: #455f43; color: #f2ebd0; }
.day-timeline h3 { font-family: var(--serif); font-size: 1.25rem; line-height: 1.4; color: #455d40; margin: 7px 0 16px; }
.day-timeline .body-copy { max-width: 45ch; }

/* 10 — an intimate notebook, not another set of magical badges. */
.observation-choices { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin: 36px auto 0; max-width: 1100px; }
.observation-choices button { font-size: .95rem; line-height: 1.5; padding: 18px 16px; border: 1px solid #869383; color: #304d41; background: #d4d8c6; border-radius: 8px 8px 0 0; min-height: 75px; min-width: 0; }
.observation-choices button[aria-pressed='true'] { background: #faf0d9; border-bottom-color: #faf0d9; }
.observation-detail { display: flex; align-items: flex-start; gap: 30px; max-width: 1100px; margin: auto; padding: 45px 45px 70px; background: #faf0d9; border: 1px solid #9aa085; position: relative; box-shadow: 6px 7px 0 #c2c8b3,6px 7px 0 1px #9aa085; }
.observation-detail>span:first-child { flex: 0 0 auto; white-space: nowrap; font-family: var(--serif); font-size: 2rem; color: #8d7050; line-height: 1.3; }
.observation-detail>div { min-width: 0; }
.observation-detail h3 { font-size: 1.2rem; line-height: 1.5; color: #49614d; margin-bottom: 22px; }
.observation-detail .body-copy { max-width: 48ch; color: #304d41; }
.notebook-heart { position: absolute; right: 30px; bottom: 20px; font-size: 30px; color: #8a6c51; transform: rotate(10deg); }

/* 11 — a blanket, a pillow, somewhere soft to land. */
.moment { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 6vw; }
.moment-photo { min-width: 0; width: 100%; max-width: 480px; justify-self: center; border: 1px solid #bca28a; padding: 12px; border-radius: 46% 46% 12px 12px / 22% 22% 12px 12px; background: #4a3a3a; overflow: hidden; }
.sleepy-room { width: 100%; height: 430px; position: relative; overflow: hidden; border-radius: inherit; background: linear-gradient(#28283d,#65504b); }
.sleepy-window { position: absolute; width: 115px; height: 155px; top: 25px; left: calc(50% - 57px); border: 8px solid #937c67; border-radius: 50% 50% 0 0 / 30% 30% 0 0; background: #14232d; display: grid; place-items: center; color: #e5d2ac; }
.sleepy-window span { font-size: 75px; }
.sleepy-pillow { position: absolute; bottom: 108px; width: 66%; height: 95px; left: 17%; border-radius: 30px; background: #eddbbb; box-shadow: inset 0 -7px 20px #be9b7555; transform: rotate(-3deg); }
.sleepy-blanket { position: absolute; bottom: -65px; left: 0; width: 100%; height: 220px; border-radius: 20% 20% 0 0; background: #71877c; border-top: 12px solid #b5c0a1; transform: translateY(35px); transition: transform 1100ms var(--ease); }
.sleepy-blanket i { position: absolute; width: 2px; height: 100%; left: 25%; background: #acb79b88; transform: rotate(-6deg); }.sleepy-blanket i:nth-child(2) { left: 50%; }.sleepy-blanket i:nth-child(3) { left: 75%; }
.sleepy-z { position: absolute; top: 50%; right: 15%; font-family: var(--serif); font-style: italic; color: #e5d2b6; font-size: 45px; opacity: 0; transform: translateY(20px); transition: transform 1200ms var(--ease),opacity 1000ms ease; }
.sleepy-room[data-tucked='true'] .sleepy-blanket { transform: translateY(-45px); }
.sleepy-room[data-tucked='true'] .sleepy-z { opacity: 1; transform: translateY(0); }
.moment-photo .portrait-media { aspect-ratio: 4/5; border-radius: 4px; }
.tuck-button { background: #e3ceb0; color: #403032; margin-top: 28px; }
.hand-note { display: block; font-family: var(--serif); font-style: italic; font-size: 1.15rem; margin-top: 25px; color: #ead2b5; line-height: 1.6; }

/* 12 — the mist lifts from a wish. */
.mirror { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 6vw; }
.wish-mirror { position: relative; width: 100%; max-width: 530px; justify-self: center; padding: 20px; border: 2px solid #ac8d55; border-radius: 50% 50% 12px 12px / 26% 26% 12px 12px; box-shadow: inset 0 0 0 5px #2a2a26,inset 0 0 0 7px #a18a59,0 12px 50px #0003; background: #292b2b; margin-top: 28px; }
.mirror-crown { position: absolute; top: -32px; left: calc(50% - 32px); font-size: 46px; line-height: 64px; color: #ebd193; background: #172a32; width: 64px; text-align: center; z-index: 2; }
.mirror-surface { position: relative; isolation: isolate; overflow: hidden; min-height: 570px; padding: 105px 28px 46px; border: 1px solid #d5bc80; border-radius: 50% 50% 4px 4px / 26% 26% 4px 4px; background: radial-gradient(ellipse at 50% 10%,#415e62,#172e36 55%,#13252c); display: flex; flex-direction: column; justify-content: center; text-align: center; color: #f8eed7; }
.mirror-mist { position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 1; transition: opacity 1100ms ease,transform 1600ms var(--ease); }
.mirror-mist i { position: absolute; width: 140%; height: 65%; left: -20%; top: -5%; background: radial-gradient(ellipse,#cddcdb22,transparent 65%); animation: drift 13s ease-in-out infinite alternate; }
.mirror-mist i:nth-child(2) { top: 30%; left: -45%; animation-delay: -4s; }.mirror-mist i:nth-child(3) { top: 50%; left: 0; animation-delay: -7s; }
.mirror-answer { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line); max-width: 42ch; }
.mirror-answer h3 { font-size: 1.2rem; color: var(--gold); margin-bottom: 16px; }
.mirror-answer .body-copy { font-size: 1rem; }
.mirror-waiting { position: relative; z-index: 2; font-family: var(--serif); font-size: 1.4rem; line-height: 1.6; color: #f3e8d3; }
.mirror-reflection { position: relative; z-index: 2; pointer-events: none; }
.mirror-reflection .eyebrow { color: #eddaaa; }
.mirror-reflection h3 { font-family: var(--serif); font-size: 1.9rem; line-height: 1.2; margin: 30px 0; }
.mirror-reflection .serif { color: #f1d89e; }
.mirror-heart { font-size: 1.6rem; display: block; color: #e3c989; margin-bottom: 25px; }
.mirror-photo { position: absolute; inset: 0; opacity: 0; transition: opacity 1200ms ease; z-index: 0; }
.mirror-photo::after { content: ''; position: absolute; inset: 0; background: #081a23b8; pointer-events: none; }
.mirror-photo .living-photo,.mirror-photo .portrait-media { height: 100%; aspect-ratio: auto; }
.wish-mirror[data-revealed='true'] .mirror-mist { opacity: 0; transform: translateY(-70px) scale(1.15); }
.wish-mirror[data-revealed='true'] .mirror-photo { opacity: 1; }
.mirror-photo-controls { margin-top: 22px; }
.mirror-photo-controls .portrait-toggle { margin-top: 0; }

/* 13 — a sealed letter. */
.finale { text-align: center; display: flex; align-items: center; flex-direction: column; justify-content: center; }
.finale-intro .eyebrow { margin-bottom: 24px; }
.letter-invitation { margin: 26px auto 0; }
.envelope { width: min(100%,490px); min-height: 310px; padding: 28px 20px; background: #f1e4c8; color: #402f1c; position: relative; box-shadow: 0 15px 30px #0004; margin: 42px 0; border: 1px solid #d2bb90; display: flex; flex-direction: column; align-items: center; gap: 24px; transition: transform 220ms var(--ease); }
.envelope-flap { position: absolute; inset: 0; background: #dfca9f; clip-path: polygon(0 0,100% 0,50% 58%); pointer-events: none; }
.envelope-address { font-size: 1.25rem; position: relative; line-height: 1.5; z-index: 1; }
.wax-seal { position: relative; width: 65px; height: 65px; min-height: 65px; display: grid; place-items: center; background: #743539; color: #f1c6a3; border: 5px double #a96f61; border-radius: 50%; font-size: 1rem; box-shadow: 1px 3px 6px #49271f55; z-index: 1; }
.envelope-hint { position: relative; font-size: 1rem; line-height: 1.4; z-index: 1; }
.finale .small-note { max-width: 43ch; }

/* Dialogs and the letter remain plain, generous reading surfaces. */
.dialog-top { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 22px; }
.close-button { min-height: 54px; border: 1px solid #715934; border-radius: 4px; background: transparent; font-size: .95rem; padding: 12px 18px; flex-shrink: 0; color: #253b2d; }
.dialog-top .eyebrow { font-size: .85rem; color: #65491b; max-width: 24ch; }
dialog { background: var(--paper); color: #23372c; border: 1px solid #a78d5d; padding: clamp(22px,4vw,44px); width: 900px; max-width: calc(100vw - 24px); max-height: calc(100svh - 24px); border-radius: 5px; box-shadow: 0 25px 100px #0005; overflow: auto; overscroll-behavior: contain; --gold: #664718; --muted: #334a3a; }
dialog::backdrop { background: #07100de8; }
dialog h2 { font-family: var(--serif); font-size: 1.85rem; line-height: 1.25; letter-spacing: -.025em; margin: 28px 0; }
.chapter-link { width: 100%; display: flex; text-align: left; gap: 18px; border-top: 1px solid #8d7955; background: transparent; padding: 22px 4px; font-size: 1rem; align-items: center; line-height: 1.5; }
.chapter-link span:first-child { font-size: .85rem; color: #664718; flex-shrink: 0; }
.chapter-link span:last-child { margin-left: auto; }.chapter-link[aria-current='page'] { font-weight: 700; }
.letter { padding: 10px 4px 20px; max-width: 46ch; margin: auto; }
.letter-monogram { font-family: var(--serif); font-style: italic; font-size: 1.8rem; color: #715321; display: block; margin-top: 18px; }
.letter h2 { font-family: var(--serif); font-size: 1.8rem; }
.letter p { font-size: 1rem; line-height: 1.8; margin: 25px 0; white-space: pre-line; }
.letter .letter-signoff { font-size: 1.2rem; line-height: 1.6; margin-top: 36px; color: #513c1d; }
#voice-note { border-top: 1px solid #8d7955; border-bottom: 1px solid #8d7955; padding: 25px 0; margin: 28px 0; }
#voice-note h3 { font-size: 1.2rem; margin-bottom: 20px; }
audio { display: block; width: 100%; min-height: 60px; }
.letter .audio-note { font-size: .95rem; margin: 18px 0 0; }
.noscript { padding: 24px; background: var(--paper); color: #23372c; text-align: center; }

@keyframes drift { from { transform: translate(0,8px); } to { transform: translate(18px,-24px); } }
@keyframes window-cloud { from { transform: translateX(0); } to { transform: translateX(630px); } }
@keyframes passing-land { from { transform: translateX(0); } to { transform: translateX(-40%); } }
@keyframes potion-bubble { 0%,100% { transform: translateY(8px); opacity: .2; } 50% { transform: translateY(-12px); opacity: .8; } }
@media (hover:hover) and (pointer:fine) {
  .utility-button:hover,.nav-button:hover { background: #bdaa722b; }
  .pill:hover { transform: translateY(-2px); }
  .envelope:hover { transform: translateY(-6px) rotate(-1deg); }
  .chapter-link:hover { background: #71593412; }
  .ingredient-list button:hover { background: #d0dcc0; }
}
@media (max-width:1080px) {
  .cover-copy { width: 78%; padding: 30px; }.cover-art { right: 6%; bottom: 120px; }
  .keepsake-seal { width: 105px; height: 105px; }.keepsake-seal b { font-size: 1.8rem; }
  .perfect-day { grid-template-columns: 1fr; }
  
  .day-heading { text-align: center; }.day-timeline { max-width: 880px; margin: 20px auto 0; }
  
  
}
@media (max-width:760px), (pointer:coarse) and (max-width:1024px) {
  :root { font-size: calc(175% * var(--text-scale)); }
  .preview-banner { justify-content: flex-start; font-size: .9rem; padding: 12px 20px; }.preview-banner span { width: 100%; }
  .masthead { padding: max(20px,env(safe-area-inset-top)) max(20px,env(safe-area-inset-right)) 20px max(20px,env(safe-area-inset-left)); gap: 16px; }.wordmark { font-size: 1.5rem; }.edition { min-width: 180px; font-size: .9rem; }
  .header-controls { display: grid; grid-template-columns: minmax(0,1fr); width: 100%; gap: 10px; }.header-controls button { padding: 12px 16px; font-size: 1rem; min-height: 60px; }
  .progress { display: none; }
  .scene { padding: 36px max(20px,env(safe-area-inset-right)) 44px max(20px,env(safe-area-inset-left)); min-height: 0; }.scene h2 { font-size: 1.75rem; line-height: 1.25; letter-spacing: -.02em; }
  .eyebrow,.small-note,.stamp,.cover-footer { font-size: .9rem; }
  .body-copy,.letter p { line-height: 1.65; }
  .pill,.text-button,.utility-button,.close-button,.portrait-toggle { font-size: 1rem; min-height: 60px; }
  .pill { gap: 12px; padding: 16px; width: 100%; }
  .navigation { position: static; grid-template-columns: repeat(2,minmax(0,1fr)); padding: 16px max(20px,env(safe-area-inset-right)) max(20px,env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left)); gap: 12px; box-shadow: none; }.chapter-status { grid-column: 1/-1; grid-row: 1; }
  .nav-button { width: 100%; min-width: 0; padding: 12px; gap: 10px; min-height: 60px; font-size: 1rem; }.nav-button span { display: none; }
  .cover { padding: 30px max(16px,env(safe-area-inset-right)) 36px max(16px,env(safe-area-inset-left)); min-height: 0; align-items: flex-start; flex-direction: column; gap: 28px; }
  .cover-copy { width: 100%; padding: 26px 18px; background: #0b1917f5; }.cover h1 { margin: 24px 0; }.you { font-size: 2.2rem; }.cover-script { font-size: 1.6rem; }
  .cover .pill { width: 100%; padding: 16px; }.cover-art { position: relative; right: auto; bottom: auto; align-self: center; margin: 15px 0 5px; }
  .cover-footer { position: relative; left: auto; right: auto; bottom: auto; width: 100%; gap: 12px; padding: 15px; }.cover-footer span { width: 100%; }
  .origin,.number-layout,.home,.journeys,.ingredients,.sorting,.boarding,.moment,.mirror { display: flex; flex-direction: column; gap: 38px; align-items: stretch; }
  .heaven-door { width: 260px; height: 385px; align-self: center; max-width: 100%; }.door-name { top: 65px; font-size: 23px; }.door-words { top: 175px; font-size: 28px; }
  .name-spell { width: 100%; padding: 24px 18px; }.spell-name { font-size: 2.4rem; }.spell-button { width: 100%; padding: 16px; }
  .home { flex-direction: column-reverse; }.hug-orbit { width: 260px; max-width: 100%; align-self: center; }.hug-centre { font-size: 58px; }
  .journey-window { min-height: 410px; padding: 35px 16px 55px; border-width: 10px; }.transport-picture { height: 150px; }.transport-picture svg { height: 145px; }.ticket-route { font-size: 1.1rem; }
  .travel-switch button { padding: 14px 16px; font-size: 1rem; flex-basis: 100%; min-height: 60px; }.potion-art { width: 155px; margin-top: 25px; }.ingredient-list button { padding: 20px 5px; gap: 16px; }
  .sorting-ceremony { height: 420px; max-width: 340px; align-self: center; }.sorting-hat { height: 270px; }.sorting-crest { top: 195px; width: 190px; left: calc(50% - 95px); min-height: 220px; }
  .sorting-result { padding-top: 32px; }.house-reasons { grid-template-columns: minmax(0,1fr); gap: 12px; }.house-reason { flex-direction: row; text-align: left; padding: 18px 14px; gap: 16px; }.reason-charm { flex-shrink: 0; width: 52px; height: 52px; font-size: 26px; }
  .house-reason-detail { display: flex; flex-direction: column; gap: 24px; padding: 24px 18px; }.hat-thought { font-size: 1.2rem; }
  .perfect-day { display: block; }
  
  
  .boarding-stack { height: 410px; }.boarding-pass { top: 30px; height: 170px; padding: 14px 16px; }  .day-heading { text-align: left; }.day-dial { width: 250px; max-width: 100%; }.day-timeline { margin-top: 40px; }.day-timeline li { grid-template-columns: 60px minmax(0,1fr); gap: 16px; }
  .day-marker { width: 60px; height: 60px; font-size: .9rem; }.day-timeline li:not(:last-child)::after { left: 29px; top: 67px; }.day-timeline h3 { margin-top: 2px; font-size: 1.2rem; }
  .observation-choices { gap: 10px; grid-template-columns: minmax(0,1fr); }.observation-choices button { font-size: 1rem; padding: 18px 14px; }
  .observation-detail { padding: 28px 18px 48px; gap: 18px; flex-direction: column; }.observation-detail>span:first-child { font-size: 1.3rem; }
  .moment { flex-direction: column-reverse; }.moment-photo { align-self: center; }.sleepy-room { height: 380px; }.sleepy-window { height: 125px; width: 95px; left: calc(50% - 47px); }
  .sleepy-window span { font-size: 62px; }.sleepy-pillow { height: 80px; bottom: 100px; }.sleepy-blanket { height: 200px; }.hand-note { font-size: 1.1rem; }
  
  .wish-mirror { align-self: center; padding: 12px; }.mirror-surface { padding: 85px 14px 36px; min-height: 490px; }.mirror-reflection h3 { font-size: 1.5rem; }
  .finale { text-align: left; align-items: flex-start; }.envelope { width: 100%; margin: 36px 0; }.small-note { text-align: left; }
  dialog { padding: max(20px,env(safe-area-inset-top)) max(18px,env(safe-area-inset-right)) max(20px,env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left)); max-width: calc(100vw - 12px); max-height: calc(100dvh - 12px); }dialog h2 { font-size: 1.45rem; }.dialog-top { gap: 18px; }
  .dialog-top .eyebrow,.chapter-link span:first-child { font-size: .9rem; }
  .chapter-link { gap: 12px; padding: 23px 0; }.chapter-link span:last-child { display: none; }.letter { padding: 8px 0 15px; }.letter-monogram { font-size: 1.3rem; }.letter h2 { font-size: 1.45rem; }.letter .letter-signoff { font-size: 1.1rem; }
}
html[data-text-size='large'] .masthead { flex-direction: column; align-items: stretch; }
html[data-text-size='large'] .header-controls { display: grid; grid-template-columns: minmax(0,1fr); width: 100%; }html[data-text-size='large'] .header-controls button { min-width: 0; }
html[data-text-size='large'] .origin,html[data-text-size='large'] .number-layout,html[data-text-size='large'] .home,html[data-text-size='large'] .journeys,html[data-text-size='large'] .ingredients,html[data-text-size='large'] .sorting,html[data-text-size='large'] .boarding,html[data-text-size='large'] .perfect-day,html[data-text-size='large'] .moment,html[data-text-size='large'] .mirror { display: flex; flex-direction: column; align-items: stretch; }
html[data-text-size='large'] .cover-copy { width: 100%; }html[data-text-size='large'] .cover { flex-direction: column; padding-bottom: 40px; align-items: stretch; }html[data-text-size='large'] .cover-art { display: none; }html[data-text-size='large'] .cover-footer { position: static; margin-top: 28px; }
html[data-text-size='large'] .house-reasons,html[data-text-size='large'] .observation-choices { grid-template-columns: 1fr; }

html[data-text-size='large'] .house-reason-detail { display: flex; flex-direction: column; }
html[data-text-size='large'] .navigation { position: static; grid-template-columns: minmax(0,1fr); }html[data-text-size='large'] .chapter-status { grid-column: 1/-1; grid-row: 1; }html[data-text-size='large'] .nav-button { width: 100%; min-width: 0; }html[data-text-size='large'] .nav-button span { display: none; }
html[data-text-size='large'] .pill>[aria-hidden='true'] { display: none; }
html[data-text-size='large'] .day-timeline li { display: flex; flex-direction: column; gap: 16px; }
html[data-text-size='large'] .day-timeline li::after { display: none; }
html[data-text-size='large'] .day-marker { width: 1.8em; height: 1.8em; min-width: 60px; min-height: 60px; font-size: 1rem; }
html[data-text-size='large'] .house-reason,html[data-text-size='large'] .secret-ingredient button { flex-direction: column; align-items: flex-start; }
html[data-text-size='large'] .ingredient-mark { width: 1.2em; height: 1.2em; font-size: 1rem; }
html[data-text-size='large'] .chapter-link { flex-wrap: wrap; }
html[data-text-size='large'] .chapter-link span:nth-child(2) { flex-basis: 100%; }
html[data-magnified='true'] .navigation { position: static; }
@media (max-width:760px), (pointer:coarse) and (max-width:1024px) {
  html[data-text-size='large'] .scene h2 { font-size: 1.35rem; }
  html[data-text-size='large'] .you { font-size: 1.6rem; }
  html[data-text-size='large'] .cover-script { font-size: 1.15rem; }
  html[data-text-size='large'] .ingredient-list button { flex-direction: column; align-items: flex-start; }
  html[data-text-size='large'] .mirror-reflection h3 { font-size: 1.15rem; }
  html[data-text-size='large'] .mirror-surface { border-radius: 40% 40% 4px 4px / 70px 70px 4px 4px; }
  html[data-text-size='large'] .letter-monogram { display: none; }
  html[data-text-size='large'] dialog h2 { font-size: 1.2rem; }
}
@media (max-height:500px) { .navigation { position: static; } }
html[data-motion='still'] *,html[data-motion='still'] *::before,html[data-motion='still'] *::after,html[data-input='keyboard'] *,html[data-input='keyboard'] *::before,html[data-input='keyboard'] *::after { animation: none !important; transition: none !important; }
html[data-motion='still'] .fireflies,html[data-motion='still'] .spark-field { display: none; }
html[data-motion='still'] button:hover,html[data-motion='still'] button:active { transform: none !important; }
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }.fireflies,.spark-field { display: none; }button:hover,button:active { transform: none !important; } }
