/* Larpie. Every colour, font and chunky edge here comes straight from the game's ui_kit.gd. */

@font-face { font-family: 'Lilita One'; src: url('../assets/fonts/LilitaOne-Regular.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Fredoka'; src: url('../assets/fonts/Fredoka.woff2') format('woff2'); font-weight: 300 700; font-display: swap; }
@font-face { font-family: 'Playfair Display'; src: url('../assets/fonts/PlayfairDisplay-Italic.woff2') format('woff2'); font-style: italic; font-weight: 400 900; font-display: swap; }

:root {
  --ink: #3a2a26; --cream: #fff3df; --paper: #fff9ee;
  --coral: #f2604c; --coral-dk: #c23f30;
  --butter: #ffc43d; --butter-dk: #d6962a;
  --teal: #3fb8a6; --teal-dk: #2a8778;
  --sky: #5ba8e5; --sky-dk: #3b7cb5;
  --muted: #8d7468; --line: #e7d8c0;
  --s-top: #6fbde8; --s-mid: #a9dcf2; --s-hor: #ffe9c7; --s-sun: #ffe07a; --stars: 0;
  --display: 'Lilita One', 'Arial Rounded MT Bold', system-ui, sans-serif;
  --body: 'Fredoka', ui-rounded, system-ui, sans-serif;
  --docu: 'Playfair Display', Georgia, serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-l: env(safe-area-inset-left, 0px);   /* the notch, on a phone turned sideways */
  --safe-r: env(safe-area-inset-right, 0px);  /* and the iPhone Duo's status column, on its cover */
  --bar: 0px;                                 /* how much of the screen the browser's own toolbar is sitting on */
}
@supports (height: 100lvh) { :root { --bar: calc(100lvh - 100dvh); } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; color-scheme: only light; background: var(--s-mid); touch-action: manipulation; }
body { margin: 0; font-family: var(--body); font-size: 18px; line-height: 1.5; color: var(--ink); -webkit-tap-highlight-color: transparent; }
@supports not (overflow: clip) { body { overflow-x: hidden; } }
.paused { overflow: hidden; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; padding: 0; }
ol, ul { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
a { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 8px; }
.on-dark :focus-visible { outline-color: var(--butter); }
[hidden] { display: none !important; }

/* ------------------------------ the set ------------------------------ */

#sky { position: fixed; inset: 0; height: 100vh; height: 100lvh; z-index: 0; overflow: hidden; pointer-events: none;
  background: linear-gradient(180deg, var(--s-top) 0%, var(--s-mid) 48%, var(--s-hor) 100%); }
.stars { position: absolute; inset: -20% 0 0; opacity: var(--stars); background-size: 460px 460px;
  background-image:
    radial-gradient(1.6px 1.6px at 30px 60px, #fff, transparent), radial-gradient(1.2px 1.2px at 120px 210px, #ffeec8, transparent),
    radial-gradient(2px 2px at 220px 110px, #fff, transparent), radial-gradient(1.3px 1.3px at 300px 330px, #fff, transparent),
    radial-gradient(1.8px 1.8px at 380px 40px, #cfd7ff, transparent), radial-gradient(1.2px 1.2px at 420px 260px, #fff, transparent),
    radial-gradient(1.5px 1.5px at 70px 390px, #ffeec8, transparent), radial-gradient(1.2px 1.2px at 180px 300px, #fff, transparent); }
.sun { position: absolute; right: 9vw; top: 11vh; width: clamp(84px, 12vw, 170px); aspect-ratio: 1; border-radius: 50%;
  background: var(--s-sun); box-shadow: 0 0 110px 34px rgba(255, 224, 122, .42); box-shadow: 0 0 110px 34px color-mix(in srgb, var(--s-sun) 42%, transparent); opacity: calc(1 - var(--stars) * .35); }
.hanging { position: absolute; top: 0; width: var(--w); height: calc(var(--y) + var(--w) * .46); opacity: calc(.95 - var(--stars)); }
.hanging::before { content: ''; position: absolute; left: 50%; top: 0; width: 1px; height: var(--y); background: rgba(58, 42, 38, .22); }
.hanging::after { content: ''; position: absolute; left: 0; bottom: 0; width: 100%; aspect-ratio: 2 / 1; background: url('../assets/img/cloud.webp') center / contain no-repeat; }
.hanging.c1 { --w: clamp(120px, 15vw, 230px); --y: 14vh; left: -4vw; animation: sway 9s ease-in-out infinite; transform-origin: top; }
.hanging.c2 { --w: clamp(90px, 11vw, 170px); --y: 30vh; left: 39vw; animation: sway 12s ease-in-out -4s infinite; transform-origin: top; }
.hanging.c3 { --w: clamp(100px, 12vw, 190px); --y: 9vh; right: 21vw; animation: sway 11s ease-in-out -7s infinite; transform-origin: top; }
@keyframes sway { 0%, 100% { transform: rotate(-1.4deg); } 50% { transform: rotate(1.4deg); } }

#stage { position: fixed; left: 0; top: 0; width: 100vw; height: 100vh; height: 100lvh; z-index: 1; pointer-events: none; opacity: 0; transition: opacity .6s; }
.stage-ready #stage { opacity: 1; }
main { position: relative; z-index: 2; overflow-x: clip; }

/* ------------------------------ shared type ------------------------------ */

.shout { font-family: var(--display); font-weight: 400; color: #fff; letter-spacing: .01em; line-height: 1.02; text-transform: uppercase;
  -webkit-text-stroke: calc(.16em) var(--ink); paint-order: stroke fill; text-wrap: balance; }
.xl { font-size: clamp(40px, 6.4vw, 84px); }
.doc { font-family: var(--docu); font-style: italic; font-size: clamp(20px, 2.3vw, 30px); line-height: 1.3; }
.eyebrow { font-family: var(--display); letter-spacing: .08em; text-transform: uppercase; font-size: clamp(14px, 1.3vw, 17px); opacity: .72; margin-bottom: 10px; }
.lede { font-size: clamp(18px, 1.8vw, 23px); font-weight: 500; line-height: 1.42; margin-top: 22px; max-width: 34em; }
.center { text-align: center; margin-inline: auto; }
.hint { font-family: var(--docu); font-style: italic; opacity: .78; margin-top: 16px; text-align: center; }
.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; position: relative; }
.wrap.narrow { width: min(780px, 100% - 40px); }
.wrap.two { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 6vw, 84px); align-items: center; }
.wrap.two.reverse .col { order: 1; }
.wrap.two.reverse .phone { order: 2; justify-self: start; }
.block { position: relative; padding-block: clamp(70px, 12vh, 150px); padding-inline: var(--safe-l) var(--safe-r); }
.on-dark { color: var(--cream); }

/* ------------------------------ buttons ------------------------------ */

.btn { --b: var(--coral); --e: var(--coral-dk); display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-family: var(--display); letter-spacing: .02em; text-transform: uppercase; text-decoration: none; font-size: 20px; line-height: 1.1;
  padding: .78em 1.25em; border-radius: 1.05em; color: #fff; background: var(--b); box-shadow: 0 .3em 0 var(--e); user-select: none;
  transition: transform .09s ease, box-shadow .09s ease, filter .12s; }
.btn img { width: 1.3em; height: 1.3em; object-fit: contain; }
@media (hover: hover) { .btn:hover { filter: brightness(1.06); transform: translateY(-1px); } }
.btn:active { transform: translateY(.22em); box-shadow: 0 .08em 0 var(--e); }
.btn.coral { --b: var(--coral); --e: var(--coral-dk); }
.btn.butter { --b: var(--butter); --e: var(--butter-dk); color: var(--ink); }
.btn.teal { --b: var(--teal); --e: var(--teal-dk); }
.btn.sky { --b: var(--sky); --e: var(--sky-dk); }
.btn.ink { --b: #4a3832; --e: #2b1e1a; }
.btn.wide { width: 100%; }
.btn.big-btn { font-size: clamp(26px, 4vw, 36px); }
.btn.huge { font-size: clamp(26px, 3.4vw, 40px); padding: .7em 1.2em; white-space: nowrap; }
.btn.small { font-size: 15px; padding: .68em .9em; min-height: 44px; }

.round { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--c, #4a3832); box-shadow: 0 5px 0 var(--ce, #2b1e1a); transition: transform .09s; flex: none; }
.round img { width: 54%; height: 54%; object-fit: contain; }
.round:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ce, #2b1e1a); }
.round.teal { --c: var(--teal); --ce: var(--teal-dk); }

.stores { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.center .stores { justify-content: center; }
.store { display: inline-flex; align-items: center; gap: 12px; padding: 10px 20px 10px 16px; min-width: 190px; min-height: 44px; border-radius: 18px; text-decoration: none;
  color: var(--cream); background: var(--ink); box-shadow: 0 6px 0 #231713; font-family: var(--body); line-height: 1.1; transition: transform .09s, box-shadow .09s; }
@media (hover: hover) { .store:hover { transform: translateY(-1px); } }
.store:active { transform: translateY(5px); box-shadow: 0 1px 0 #231713; }
.store svg { width: 30px; height: 30px; fill: currentColor; flex: none; }
.store small { display: block; font-size: 12.5px; font-weight: 500; opacity: .8; letter-spacing: .02em; }
.store b { display: block; font-family: var(--display); font-weight: 400; font-size: 23px; letter-spacing: .01em; }
.store.is-soon small { color: var(--butter); opacity: 1; }
.store.official { background: none; box-shadow: none; padding: 0; min-width: 0; }
.store.official img { height: 62px; width: auto; }

/* ------------------------------ HUD ------------------------------ */

#hud { position: fixed; z-index: 40; left: 0; right: 0; top: calc(var(--safe-t) + 14px); padding-inline: calc(var(--safe-l) + 16px) calc(var(--safe-r) + 16px); display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; pointer-events: none; }
#hud > *, .hud-right > * { pointer-events: auto; }
.round.pause { width: 52px; height: 52px; }
.aura { display: flex; flex-direction: column; align-items: center; pointer-events: none; opacity: 0; transform: translateY(-12px) scale(.9); transition: opacity .3s, transform .3s; }
.scrolled .aura, .demo-hud .aura { opacity: 1; transform: none; }
.aura-num { font-family: var(--display); font-size: clamp(52px, 7vw, 76px); line-height: .96; color: #fff; -webkit-text-stroke: 11px var(--ink); paint-order: stroke fill; display: block; transition: transform .1s; }
.aura-num.bump { animation: bump .26s cubic-bezier(.3, 1.8, .6, 1); }
.aura-tag { font-family: var(--display); font-size: 21px; line-height: 1; color: var(--butter); -webkit-text-stroke: 6px var(--ink); paint-order: stroke fill; margin-top: -2px; }
@keyframes bump { 0% { transform: scale(1.34); } 100% { transform: scale(1); } }
.hud-right { justify-self: end; display: flex; align-items: center; gap: 10px; }
.corn-chip { display: flex; align-items: center; gap: 3px; padding: 7px 8px 7px 15px; border-radius: 26px; background: var(--ink); color: var(--butter); font-family: var(--display); font-size: 22px; line-height: 1; box-shadow: 0 5px 0 #231713; }
.corn-chip img { width: 28px; height: 28px; object-fit: contain; }
.corn-chip.bump img { animation: bump .3s; }
.round.rot { --c: #fff3df; --ce: #d9c5a4; width: 52px; height: 52px; font-size: 25px; }
.round.rot { position: relative; }
.rot-hint { position: absolute; top: calc(100% + 11px); right: -2px; font-family: var(--display); font-style: normal; font-size: 13px; letter-spacing: .03em; white-space: nowrap; color: #fff; background: var(--coral); padding: 4px 10px; border-radius: 10px; box-shadow: 0 3px 0 var(--coral-dk); animation: hint-bob 1.2s ease-in-out infinite; transition: opacity .25s; }
.rot-hint::before { content: ''; position: absolute; right: 18px; top: -6px; width: 12px; height: 12px; background: var(--coral); transform: rotate(45deg); }
@keyframes hint-bob { 50% { transform: translateY(4px); } }
html[data-brainrot="2"] .round.rot { --c: var(--butter); --ce: var(--butter-dk); }
html[data-brainrot="3"] .round.rot { --c: var(--coral); --ce: var(--coral-dk); animation: shake .4s infinite; }

/* ------------------------------ word pops, toasts, narrator ------------------------------ */

#toasts { position: fixed; z-index: 95; top: calc(var(--safe-t) + 118px); left: 50%; transform: translateX(-50%); width: min(460px, 100% - 28px); display: grid; gap: 8px; pointer-events: none; }
.toast { background: var(--ink); color: var(--cream); padding: 10px 22px; border-radius: 20px; text-align: center; box-shadow: 0 10px 28px rgba(30, 16, 10, .3); animation: toast-in .3s cubic-bezier(.3, 1.6, .6, 1); line-height: 1.25; }
.toast b { display: block; font-family: var(--display); font-weight: 400; letter-spacing: .04em; color: var(--tone, var(--butter)); text-transform: uppercase; font-size: 16px; }
.toast span { font-weight: 600; font-size: 16px; }
.toast.out { opacity: 0; transition: opacity .2s; }
@keyframes toast-in { from { transform: translateY(-20px); opacity: 0; } }

#words, #fx { position: fixed; inset: 0; z-index: 90; pointer-events: none; overflow: hidden; }
.word { position: absolute; font-family: var(--display); color: var(--butter); font-size: clamp(38px, 6vw, 72px); line-height: 1; white-space: nowrap; -webkit-text-stroke: 12px var(--ink); paint-order: stroke fill;
  transform: translate(-50%, -50%) rotate(var(--r)); animation: word .8s cubic-bezier(.3, 1.7, .5, 1) forwards; }
.word.shouted { color: #fff; -webkit-text-stroke-color: #a53427; }
@keyframes word {
  0% { transform: translate(-50%, -50%) rotate(var(--r)) scale(.4); opacity: 1; }
  24% { transform: translate(-50%, -50%) rotate(var(--r)) scale(1); opacity: 1; }
  70% { transform: translate(-50%, -50%) rotate(var(--r)) scale(1); opacity: 1; }
  100% { transform: translate(-50%, calc(-50% - 60px)) rotate(var(--r)) scale(1); opacity: 0; }
}
.feather { position: absolute; width: 16px; height: 34px; border-radius: 60% 60% 55% 55% / 80% 80% 30% 30%; background: linear-gradient(90deg, #fffaf0 48%, #efe0c8 50%, #fff6e6 54%); box-shadow: 0 1px 2px rgba(60, 40, 30, .22); animation: feather var(--t) ease-out forwards; }
@keyframes feather { to { transform: translate(var(--dx), var(--dy)) rotate(var(--spin)); opacity: 0; } }
.sparkle { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: #ffdb52; animation: feather .5s ease-out forwards; }

#narrator { position: fixed; z-index: 45; left: calc(var(--safe-l) + 18px); bottom: calc(var(--safe-b) + 18px); width: min(430px, 100% - 36px); background: rgba(23, 15, 13, .88); color: var(--cream); border-radius: 22px; padding: 12px 20px 15px;
  box-shadow: 0 12px 34px rgba(20, 10, 6, .32); transform: translateY(16px); opacity: 0; transition: opacity .3s, transform .3s; pointer-events: none; }
#narrator.on { opacity: 1; transform: none; }
.cam { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; letter-spacing: .06em; color: var(--butter); margin-bottom: 3px; }
.cam i { width: 11px; height: 11px; background: var(--coral); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .15; } }
#narrator .line, .tv-caption .line, .demo-caption .line { font-family: var(--docu); font-style: italic; font-size: 20px; line-height: 1.26; }

/* ------------------------------ hero ------------------------------ */

/* The app's menu screen, stood up on a wider stage: logo in the sky, chicken on the bale. */
#hero { position: relative; isolation: isolate; min-height: 100vh; min-height: 100svh; display: block; text-align: center; padding: calc(var(--safe-t) + clamp(64px, 8vh, 84px)) calc(var(--safe-r) + 20px) 0 calc(var(--safe-l) + 20px); overflow: hidden; }
.hero-poster { position: absolute; inset: 0; z-index: -1; background: url('../assets/img/hero_wide.webp') center bottom / cover no-repeat; transition: opacity .7s; }
.stage-ready:not(.stage-lite):not(.stage-lost) .hero-poster { opacity: 0; }
.hero-copy h1 { width: min(46vw, 520px, 56vh); margin: 0 auto; animation: bob 3.2s ease-in-out infinite; }
.hero-copy h1 img { filter: drop-shadow(0 7px 0 rgba(58, 42, 38, .16)); }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(8px); } }
.tagline { font-family: var(--docu); font-style: italic; font-size: clamp(25px, 2.7vw, 36px); line-height: 1.15; margin-top: 8px; min-height: 1.2em; }
.hero-sub { font-size: clamp(16px, 1.4vw, 19px); font-weight: 500; margin: 4px auto 0; max-width: 34em; }
.hero-copy .stores { justify-content: center; margin-top: 16px; }
.hero-note { position: absolute; left: calc(var(--safe-l) + clamp(18px, 3vw, 44px)); bottom: 3.4vh; font-weight: 600; font-size: 15px; opacity: .78; }
.tap-to-fly { position: absolute; left: 50%; bottom: 4.2vh; transform: translateX(-50%); display: grid; justify-items: center; gap: 2px; animation: breathe 1.3s ease-in-out infinite; }
.tap-to-fly .shout { font-size: clamp(38px, 5vw, 66px); -webkit-text-stroke-width: 12px; white-space: nowrap; }
.tap-to-fly small { font-family: var(--docu); font-style: italic; font-size: 17px; color: var(--ink); background: rgba(255, 249, 238, .88); padding: 1px 12px; border-radius: 14px; }
@media (hover: hover) { .tap-to-fly:hover { animation-duration: .5s; } }
@keyframes breathe { 0%, 100% { transform: translateX(-50%) scale(1); } 50% { transform: translateX(-50%) scale(1.045); } }
.scroll-hint { position: absolute; right: calc(var(--safe-r) + clamp(18px, 3vw, 44px)); bottom: 3.4vh; max-width: calc(50% - 210px); text-align: right; font-family: var(--display); font-size: 15px; letter-spacing: .05em; opacity: .74; }
.scroll-hint::after { content: ' \2193'; }

.ticker { position: relative; display: flex; align-items: stretch; background: var(--ink); color: var(--cream); font-family: var(--display); letter-spacing: .03em; overflow: hidden; transform: rotate(-.6deg) scale(1.02); box-shadow: 0 8px 0 rgba(58, 42, 38, .18); }
.ticker-tag { position: relative; z-index: 1; flex: none; padding: 12px 18px 12px calc(var(--safe-l) + 18px); background: var(--coral); color: #fff; }
.ticker-track { overflow: hidden; display: flex; align-items: center; flex: 1; }
.ticker-run { display: flex; flex: none; white-space: nowrap; animation: slide 70s linear infinite; }
.ticker-run span { padding-inline: 22px; }
.ticker-run span::after { content: '\2605'; color: var(--butter); margin-left: 44px; }
@keyframes slide { to { transform: translateX(-50%); } }

/* Corn hidden around the page. Eagles forage. Go and forage. */
.cob { position: absolute; z-index: 3; width: 58px; height: 58px; margin: -29px; animation: cob 2.6s ease-in-out infinite; filter: drop-shadow(0 5px 0 rgba(58, 42, 38, .2)); }
.cob img { width: 100%; height: 100%; object-fit: contain; }
@media (hover: hover) { .cob:hover { scale: 1.18; } }
@keyframes cob { 0%, 100% { transform: translateY(-5px) rotate(-14deg); } 50% { transform: translateY(5px) rotate(14deg); } }

/* ------------------------------ chapter one ------------------------------ */

.big { font-family: var(--display); font-weight: 400; font-size: clamp(46px, 6.8vw, 92px); line-height: 1.04; }
.crossed { position: relative; display: inline-block; white-space: nowrap; }
.crossed svg { position: absolute; left: -4%; top: 44%; width: 108%; height: .34em; overflow: visible; }
.crossed path { fill: none; stroke: var(--coral); stroke-width: 7; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-dasharray: 400; stroke-dashoffset: 400; transition: stroke-dashoffset .7s .3s ease-out; }
.crossed em { position: absolute; left: 50%; top: -.56em; font-style: normal; font-size: .62em; color: var(--coral); transform: translateX(-50%) rotate(-7deg) scale(.5); opacity: 0; transition: transform .3s 1s cubic-bezier(.3, 1.8, .5, 1), opacity .1s 1s; }
.seen .crossed path { stroke-dashoffset: 0; }
.seen .crossed em { opacity: 1; transform: translateX(-50%) rotate(-7deg) scale(1); }
.small-after { display: inline-block; color: var(--coral-dk); }

.form { position: relative; width: min(880px, 100%); margin-inline: auto; background: var(--paper); border-radius: 26px; padding: clamp(22px, 4vw, 48px); box-shadow: 0 14px 0 rgba(58, 42, 38, .14), 0 26px 50px rgba(58, 42, 38, .14); transform: rotate(-.7deg);
  background-image: repeating-linear-gradient(0deg, transparent 0 39px, rgba(91, 168, 229, .07) 39px 40px); }
.form-no { font-size: 14px; font-weight: 600; letter-spacing: .05em; color: var(--muted); text-transform: uppercase; }
.form h3 { font-family: var(--display); font-weight: 400; font-size: clamp(30px, 4.4vw, 50px); line-height: 1.05; margin-top: 2px; }
.form-sub { font-family: var(--docu); font-style: italic; font-size: 20px; color: var(--muted); }
.form table { width: 100%; border-collapse: collapse; margin-top: 18px; font-size: clamp(15px, 1.7vw, 19px); }
.form th, .form td { text-align: left; padding: 10px 12px; vertical-align: top; }
.form thead th { font-family: var(--display); font-weight: 400; font-size: clamp(16px, 2vw, 21px); border-bottom: 3px solid var(--ink); }
.form tbody th { font-weight: 600; color: var(--muted); white-space: nowrap; }
.form tbody tr + tr > * { border-top: 2px dashed var(--line); }
.form td:last-child { font-weight: 600; color: var(--coral-dk); }
.stamp { position: absolute; right: clamp(10px, 5vw, 56px); bottom: clamp(52px, 10vw, 96px); font-family: var(--display); font-size: clamp(26px, 5vw, 50px); line-height: .98; text-align: center; color: rgba(194, 63, 48, .82); border: 6px solid currentColor; outline: 2px solid currentColor; outline-offset: 3px; border-radius: 14px; padding: 8px 16px; transform: rotate(-13deg) scale(3); opacity: 0; mix-blend-mode: multiply; pointer-events: none; }
.seen .stamp { animation: stamp .34s .5s cubic-bezier(.2, 1.4, .5, 1) forwards; }
@keyframes stamp { to { transform: rotate(-13deg) scale(1); opacity: 1; } }
.crayon { position: absolute; left: clamp(14px, 5vw, 48px); bottom: 12px; font-family: var(--display); color: var(--coral); font-size: clamp(19px, 2.6vw, 26px); line-height: 1; transform: rotate(-3deg); filter: url(#rough); }
.crayon span { font-size: .7em; }
.form { padding-bottom: clamp(70px, 9vw, 90px); }

.howto .doc { margin-top: 8px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 44px; counter-reset: s; }
.steps li { --c: var(--coral); --e: var(--coral-dk); position: relative; color: #fff; background: var(--c); border-radius: 30px; padding: 24px 26px 26px; box-shadow: 0 10px 0 var(--e); counter-increment: s; }
.steps li:nth-child(2) { --c: var(--teal); --e: var(--teal-dk); transform: rotate(.8deg); }
.steps li:nth-child(3) { --c: var(--sky); --e: var(--sky-dk); transform: rotate(-.8deg); }
.steps b { display: block; font-family: var(--display); font-weight: 400; font-size: clamp(24px, 2.7vw, 34px); line-height: 1.05; }
.steps b::before { content: counter(s) '.'; opacity: .55; margin-right: .3em; }
.steps span { display: block; font-weight: 500; font-size: 18px; line-height: 1.3; margin-top: 8px; }
.sample { display: flex; align-items: center; justify-content: space-between; gap: 26px; margin-top: 50px; background: var(--ink); color: var(--cream); border-radius: 34px; padding: clamp(24px, 3.6vw, 44px); box-shadow: 0 12px 0 #231713; }
.sample h3 { font-family: var(--display); font-weight: 400; color: var(--butter); font-size: clamp(30px, 3.8vw, 46px); line-height: 1.04; }
.sample p { margin-top: 8px; max-width: 34em; }
.numbers { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-top: 46px; text-align: center; }
.numbers dt { font-family: var(--display); font-size: clamp(44px, 5.4vw, 72px); line-height: 1; color: #fff; -webkit-text-stroke: 9px var(--ink); paint-order: stroke fill; }
.numbers dd { font-weight: 600; font-size: 15px; line-height: 1.2; margin-top: 8px; }

/* ------------------------------ creature cards ------------------------------ */

.brain-head { text-align: center; margin-bottom: 40px; }
.also { font-size: clamp(20px, 2.2vw, 28px); margin-bottom: 26px; opacity: .9; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 430px)); gap: clamp(24px, 4vw, 54px); justify-content: center; perspective: 1400px; }
.cards.solo { grid-template-columns: minmax(0, 430px); margin-top: clamp(24px, 4vw, 54px); }
.c-card { --c1: #62b8e6; --c2: #fff1cf; --c3: #3b7cb5; position: relative; aspect-ratio: 5 / 7.2; transform-style: preserve-3d; transition: transform .16s ease-out; will-change: transform; }
.c-card[data-world="farm"] { --c1: #6fbd5a; --c2: #fff1b8; --c3: #3c8a3e; }
.c-card[data-world="town"] { --c1: #f2845e; --c2: #ffe0a6; --c3: #b84a30; }
.c-card[data-world="clouds"] { --c1: #8d88ea; --c2: #ffd9ec; --c3: #5a55b8; }
.c-card[data-world="space"] { --c1: #4d2a8a; --c2: #2dd6b5; --c3: #1f1250; }
.c-card.secret { --c1: #ffbe33; --c2: #fff6c4; --c3: #c88a12; }
.c-inner { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .6s cubic-bezier(.3, 1.3, .5, 1); }
.c-card.flipped .c-inner { transform: rotateY(180deg); }
.c-face { position: absolute; inset: 0; border-radius: 30px; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; padding: 10px; background: var(--c3); box-shadow: 0 12px 0 rgba(30, 16, 10, .28), 0 24px 44px rgba(30, 16, 10, .2); display: flex; flex-direction: column; color: var(--ink); }
.c-back { transform: rotateY(180deg); background: var(--paper); padding: 26px; border: 10px solid var(--c3); overflow: hidden auto; }
.c-back > * { flex: none; }
/* Whichever face is turned away is taken off the page, so its buttons can't be tabbed to or hit. */
.c-face { transition: visibility 0s .13s; }
.c-back, .c-card.flipped .c-front { visibility: hidden; }
.c-card.flipped .c-back { visibility: visible; }
.c-top { display: flex; justify-content: space-between; align-items: center; padding: 4px 12px 9px; color: #fff; font-family: var(--display); font-size: 14px; letter-spacing: .05em; text-transform: uppercase; }
.c-art { position: relative; flex: 1; min-height: 0; border-radius: 22px; overflow: hidden; background: var(--c1); background: repeating-conic-gradient(from 8deg at 50% 62%, var(--c1) 0 11deg, color-mix(in srgb, var(--c1) 80%, white) 11deg 22deg); display: grid; place-items: center; }
.c-art::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 34%; background: linear-gradient(0deg, var(--c2), transparent); opacity: .7; }
.c-art img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; padding: 5%; object-fit: contain; filter: drop-shadow(0 12px 0 rgba(30, 16, 10, .18)); transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
@media (hover: hover) { .c-card:hover .c-art img { transform: scale(1.06) rotate(-2deg); } }
.c-card.shout-now .c-art img { animation: shake .3s 3; }
.c-shout { position: absolute; z-index: 2; left: 50%; top: 12%; transform: translateX(-50%) rotate(-5deg); font-family: var(--display); color: #fff; font-size: clamp(34px, 4vw, 48px); line-height: 1; white-space: nowrap; -webkit-text-stroke: 10px #a53427; paint-order: stroke fill; opacity: 0; pointer-events: none; }
.c-card.shout-now .c-shout { animation: c-shout 1.3s ease-out; }
@keyframes c-shout { 0% { opacity: 1; transform: translateX(-50%) rotate(-5deg) scale(.4); } 16% { opacity: 1; transform: translateX(-50%) rotate(-5deg) scale(1.1); } 80% { opacity: 1; transform: translateX(-50%) rotate(-5deg) scale(1); } 100% { opacity: 0; } }
.c-plate { background: var(--paper); border-radius: 18px; padding: 12px 14px 13px; margin-top: 9px; text-align: center; }
.c-name { font-family: var(--display); font-weight: 400; font-size: clamp(23px, 2.5vw, 31px); line-height: 1.02; letter-spacing: .01em; }
.c-line { font-family: var(--docu); font-style: italic; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.2; color: var(--muted); margin-top: 3px; min-height: 1.2em; }
.c-actions { display: flex; gap: 8px; margin-top: 10px; justify-content: center; }
.c-actions .btn { flex: 1; min-width: 0; padding-inline: .3em; }
.c-foil { position: absolute; inset: 0; border-radius: 30px; pointer-events: none; opacity: 0; mix-blend-mode: color-dodge; transition: opacity .25s;
  background: linear-gradient(115deg, transparent 20%, rgba(255, 90, 180, .38) 36%, rgba(120, 240, 255, .4) 48%, rgba(255, 240, 120, .38) 60%, transparent 76%);
  background-size: 240% 240%; background-position: var(--mx, 50%) var(--my, 50%); }
@media (hover: hover) { .c-card:hover .c-foil { opacity: .8; } }
.c-card.secret .c-foil { opacity: .55; }
.c-back h4 { font-family: var(--display); font-weight: 400; font-size: 28px; line-height: 1; margin: 0; color: var(--c3); }
.c-back .c-no { font-size: 13px; font-weight: 600; letter-spacing: .05em; color: var(--muted); text-transform: uppercase; }
.c-back .c-habit { font-weight: 500; font-size: 16.5px; line-height: 1.3; margin-top: 10px; }
.c-back ul { margin-top: 12px; display: grid; gap: 9px; align-content: start; }
.c-it { font-family: var(--docu); font-style: italic; font-size: 16px; line-height: 1.25; color: var(--muted); margin-top: 12px; }
.c-yell { font-family: var(--display); color: #fff; font-size: clamp(30px, 3.4vw, 40px); line-height: 1; text-align: center; -webkit-text-stroke: 8px var(--c3); paint-order: stroke fill; transform: rotate(-3deg); margin: auto 0; padding-block: 6px; }
.c-back li { font-family: var(--docu); font-style: italic; font-size: 17.5px; line-height: 1.22; padding-left: 14px; border-left: 4px solid var(--c1); }
.c-back .btn { align-self: center; margin-top: 12px; position: sticky; bottom: 2px; }
@keyframes shake { 0%, 100% { transform: translate(0, 0) rotate(0); } 20% { transform: translate(-4px, 2px) rotate(-1.4deg); } 40% { transform: translate(4px, -2px) rotate(1.4deg); } 60% { transform: translate(-3px, -2px) rotate(-1deg); } 80% { transform: translate(3px, 2px) rotate(1deg); } }

/* ------------------------------ chapter cards ------------------------------ */

.chapter { position: relative; height: 240vh; }
.pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: grid; place-items: center; pointer-events: none; }
.bar { position: absolute; left: 0; right: 0; height: 13vh; background: #120c0a; transform: scaleY(var(--bars, 0)); }
.bar.top { top: 0; transform-origin: top; }
.bar.bottom { bottom: 0; transform-origin: bottom; }
.card-text { position: relative; text-align: center; padding-inline: 18px; opacity: var(--card, 0); transform: translateY(calc((1 - var(--card, 0)) * 14px)); margin-top: -22vh; }
.ch-num, .ch-sub { font-family: var(--docu); font-style: italic; color: var(--cream); text-shadow: 0 2px 10px rgba(0, 0, 0, .55); }
.ch-num { font-size: clamp(24px, 3vw, 38px); }
.ch-title { font-size: clamp(58px, 11vw, 150px); -webkit-text-stroke-width: .15em; }
.ch-sub { font-size: clamp(21px, 2.5vw, 32px); margin-top: 6px; }

/* ------------------------------ the town ------------------------------ */

.phone { width: min(320px, 76vw); justify-self: center; border: 11px solid var(--ink); border-radius: 44px; overflow: hidden; background: var(--ink); box-shadow: 0 14px 0 rgba(30, 16, 10, .22), 0 30px 54px rgba(30, 16, 10, .2); transform: rotate(-2.4deg); }
.phone img { width: 100%; }
.hecklers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(8px, 3vw, 40px); margin-top: clamp(40px, 7vw, 76px); align-items: end; max-width: 900px; margin-inline: auto; }
.heckler { position: relative; display: grid; justify-items: center; }
.heckler img { width: 100%; max-width: 250px; pointer-events: none; }
.heckler[data-kind="pigeon"] img { width: 72%; }
.sign { position: relative; display: grid; place-items: center; width: min(100%, 240px); aspect-ratio: 2 / 1; background: #f5e6cc; border-radius: 10px; box-shadow: 0 6px 0 #c6a57b, 0 12px 20px rgba(30, 16, 10, .16); padding: 6px 10px; transform: rotate(var(--tilt, -3deg)); transition: transform .2s cubic-bezier(.3, 1.8, .5, 1); margin-bottom: 26px; }
.sign::after { content: ''; position: absolute; left: 50%; top: 100%; width: 12px; height: 34px; margin-left: -6px; background: #a57d52; z-index: -1; }
.sign b { font-family: var(--display); font-weight: 400; color: var(--sc, var(--ink)); font-size: clamp(13px, 2.9vw, 30px); line-height: 1.02; text-align: center; min-width: 0; overflow-wrap: anywhere; }
@media (hover: hover) { .heckler:hover .sign { transform: rotate(calc(var(--tilt, -3deg) * -1)) scale(1.04); } }
.heckler:active .sign { transform: scale(.96); }
.heckler.moo img { animation: shake .3s 2; }

.street { position: relative; padding-block: 16px 30px; }
.street-track { overflow: hidden; padding-block: 10px; }
.street-run { display: flex; gap: 16px; width: max-content; animation: slide 90s linear infinite; }
.street-track.rev .street-run { animation-direction: reverse; animation-duration: 110s; }
.shop { font-family: var(--display); font-size: clamp(20px, 2.8vw, 34px); white-space: nowrap; padding: 12px 24px; border-radius: 8px; background: var(--bg); color: var(--fg); outline: 3px solid var(--fg); outline-offset: -8px; box-shadow: 0 6px 0 rgba(30, 16, 10, .2); }

/* ------------------------------ the documentary ------------------------------ */

.docu .doc { max-width: 34em; margin-top: 12px; }
.tv { width: min(900px, 100%); margin: 40px auto 0; }
.tv-screen { position: relative; aspect-ratio: 16 / 9; border-radius: 26px; overflow: hidden; background: #120c0a; border: 12px solid var(--ink); box-shadow: 0 14px 0 rgba(30, 16, 10, .3), 0 30px 56px rgba(30, 16, 10, .22); }
.tv-screen img { width: 100%; height: 100%; object-fit: cover; }
.tv-screen .bar { --bars: 1; height: 8%; z-index: 1; }
.tv-screen.hit { animation: shake .35s; }
.tv-caption { position: absolute; z-index: 2; left: 4%; right: 4%; top: 11%; background: rgba(23, 15, 13, .86); color: var(--cream); border-radius: 18px; padding: 11px 20px 14px; }
.tv-caption .line { font-size: clamp(18px, 2.4vw, 29px); min-height: 1.26em; }
.tv-controls { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 24px; }
.tv-count { font-family: var(--docu); font-style: italic; font-size: 19px; }

/* ------------------------------ the closet ------------------------------ */

.closet-slot { min-height: 480px; position: relative; }
.closet-slot::after { content: ''; position: absolute; left: 12%; right: 12%; bottom: 0; height: 26px; border-radius: 50%; background: rgba(58, 42, 38, .16); filter: blur(5px); }
.sign-board { display: inline-block; font-family: var(--display); font-size: clamp(16px, 1.7vw, 20px); padding: 8px 20px; border-radius: 6px; background: #fff8ec; color: #b49646; outline: 2px solid #b49646; outline-offset: -6px; margin-bottom: 18px; transform: rotate(-1.5deg); box-shadow: 0 5px 0 rgba(30, 16, 10, .16); }
.costumes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; margin-top: 22px; }
.costume { width: 100%; text-align: left; background: var(--cream); border-radius: 22px; padding: 11px 15px 12px; box-shadow: 0 6px 0 var(--line); transition: transform .09s, box-shadow .09s, background .12s; }
@media (hover: hover) { .costume:hover { transform: translateY(-2px); } }
.costume:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--line); }
.costume b { display: block; font-family: var(--display); font-weight: 400; font-size: 20px; line-height: 1.05; }
.costume span { display: block; font-size: 14.5px; line-height: 1.2; color: var(--muted); margin-top: 2px; font-weight: 500; }
.costume em { display: block; font-family: var(--display); font-style: normal; font-size: 13.5px; color: var(--butter-dk); margin-top: 5px; letter-spacing: .03em; text-transform: uppercase; }
.costume.on { background: #ffe7b0; box-shadow: 0 6px 0 var(--butter-dk); }
.costume.on em { color: var(--teal-dk); }

/* ------------------------------ ranks and quests ------------------------------ */

.ladder { margin-top: 24px; display: grid; gap: 3px; max-width: 480px; }
.ladder li { display: flex; align-items: center; gap: 12px; padding: 6px 16px 6px 10px; border-radius: 16px; font-weight: 600; font-size: 19px; color: rgba(255, 243, 223, .62); }
.ladder img { width: 27px; height: 27px; }
.ladder .n { flex: 1; }
.ladder .t { font-family: var(--display); color: var(--butter-dk); }
.ladder li.earned { color: var(--cream); }
.ladder li.earned .t { color: var(--butter); }
.ladder li.mine { background: #ffe7b0; color: var(--ink); }
.ladder li.mine .t { color: var(--butter-dk); }
.ladder li.mine .n::after { content: 'you are here. sorry.'; font-family: var(--docu); font-style: italic; font-weight: 500; font-size: 15px; margin-left: 10px; opacity: .75; }

.quests .doc { max-width: 32em; margin-top: 12px; }
.quests ul.quests, #quest-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(290px, 100%), 1fr)); gap: 14px; margin-top: 36px; }
.quest { background: var(--cream); color: var(--ink); border-radius: 26px; padding: 16px 20px 15px; box-shadow: 0 8px 0 var(--line); }
.quest .q-top { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; font-weight: 600; font-size: 19px; line-height: 1.22; }
.quest .q-top b { font-family: var(--display); font-weight: 400; color: var(--butter-dk); font-size: 22px; }
.quest .bar-track { height: 14px; border-radius: 8px; background: #e7d8c0; overflow: hidden; margin-top: 11px; }
.quest .bar-fill { height: 100%; width: var(--p, 0%); background: var(--butter); border-radius: 8px; transition: width .3s; }
.quest.done .bar-fill { background: var(--teal); }
.quest .q-state { font-weight: 600; font-size: 15px; color: var(--muted); margin-top: 6px; }
.quest.done .q-state { color: var(--teal-dk); }

/* ------------------------------ re-entry and results ------------------------------ */

.reentry { position: relative; height: 170vh; }
.reentry .pin { align-content: center; gap: 8px; text-align: center; padding-inline: 20px; }
.huge-doc { font-size: clamp(30px, 5vw, 64px); color: var(--reentry-ink, var(--cream)); opacity: var(--re1, 0); }
.quickly { font-size: clamp(60px, 11vw, 150px); opacity: var(--re2, 0); transform: scale(calc(.6 + var(--re2, 0) * .4)); }

.result .wrap { width: min(560px, 100% - 40px); display: grid; gap: 22px; justify-items: center; }
.crash-site { height: clamp(90px, 16vh, 170px); }
.result-card { width: 100%; background: var(--paper); border-radius: 36px; padding: 22px 26px 24px; text-align: center; box-shadow: 0 12px 0 rgba(58, 42, 38, .16), 0 26px 50px rgba(58, 42, 38, .16); position: relative; }
.badge { font-family: var(--display); color: var(--coral); font-size: 22px; line-height: 1.1; }
.r-aura { font-family: var(--display); color: var(--muted); font-size: 26px; line-height: 1.1; }
.r-score { font-family: var(--display); font-size: 104px; line-height: 1; }
.r-rank { font-weight: 600; color: var(--teal-dk); font-size: 28px; line-height: 1.15; }
.r-next { color: var(--muted); font-size: 19px; margin-top: 2px; }
.r-row { display: flex; gap: 22px; justify-content: center; font-weight: 600; font-size: 20px; color: var(--muted); margin-top: 6px; }
.gold { color: var(--butter-dk); }
.r-actions { display: flex; justify-content: center; gap: 14px; }

.review-wall { columns: 3 300px; column-gap: 18px; margin-top: 36px; }
.review { break-inside: avoid; background: var(--paper); border-radius: 24px; padding: 16px 20px 15px; margin-bottom: 18px; box-shadow: 0 7px 0 rgba(58, 42, 38, .12); transform: rotate(var(--r, 0deg)); }
.rating { color: var(--butter-dk); letter-spacing: .08em; font-size: 20px; line-height: 1.2; }
.review q { display: block; quotes: none; font-family: var(--display); font-size: clamp(22px, 2.3vw, 28px); line-height: 1.12; margin-top: 3px; }
.review cite { display: block; font-family: var(--docu); font-size: 17px; color: var(--muted); margin-top: 6px; }

.faq-list { margin-top: 32px; display: grid; gap: 11px; }
.faq-list details { background: var(--paper); border-radius: 22px; box-shadow: 0 6px 0 rgba(58, 42, 38, .12); }
.faq-list summary { font-family: var(--display); font-size: clamp(20px, 2.2vw, 25px); padding: 13px 22px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 14px; align-items: center; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: '+'; color: var(--coral); font-size: 1.3em; line-height: 1; transition: transform .2s; }
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list p { padding: 0 22px 16px; font-size: 19px; line-height: 1.4; }

.download { padding-bottom: clamp(100px, 18vh, 180px); }
.end-logo { width: min(460px, 86%); margin: 0 auto 16px; }
.download .doc { margin-top: 12px; }

#footer { position: relative; z-index: 2; background: var(--ink); color: var(--cream); text-align: center; padding: 34px calc(var(--safe-r) + 20px) calc(30px + var(--safe-b)) calc(var(--safe-l) + 20px); }
.foot-a { font-family: var(--docu); font-style: italic; font-size: 22px; }
#footer nav { display: flex; justify-content: center; gap: 8px; margin-top: 4px; font-family: var(--display); letter-spacing: .03em; }
#footer nav a { color: var(--butter); text-decoration: none; padding: 10px 8px; }
.foot-b { font-size: 13.5px; opacity: .62; margin-top: 14px; }

/* ------------------------------ pause menu ------------------------------ */

.overlay { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: rgba(30, 18, 12, .6); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); padding: calc(var(--safe-t) + 18px) calc(var(--safe-r) + 18px) calc(var(--safe-b) + var(--bar) + 18px) calc(var(--safe-l) + 18px); overflow: auto; overscroll-behavior: contain; }
@supports (height: 100lvh) { .overlay { bottom: auto; height: 100lvh; } }
.pause-col { width: min(430px, 100%); min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 15px; text-align: center; color: var(--cream); }
.pause-title { font-size: clamp(64px, 12vw, 96px); }
.switches { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(136px, 100%), 1fr)); gap: 10px; }
.switch { display: flex; align-items: center; justify-content: space-between; background: var(--paper); color: var(--ink); border-radius: 18px; padding: 9px 13px 9px 17px; font-weight: 600; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch i { width: 56px; height: 31px; border-radius: 16px; background: #d8c9b3; position: relative; transition: background .15s; flex: none; }
.switch i::after { content: ''; position: absolute; left: 4px; top: 4px; width: 23px; height: 23px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked + i { background: var(--teal); }
.switch input:checked + i::after { transform: translateX(25px); }
.switch input:focus-visible + i { outline: 3px solid var(--butter); outline-offset: 2px; }
.dial { background: var(--paper); color: var(--ink); border-radius: 20px; padding: 13px 18px 13px; }
.dial-name { font-weight: 600; }
.dial-name b { font-family: var(--display); font-weight: 400; color: var(--coral); font-size: 21px; margin-left: 2px; }
.dial input { width: 100%; accent-color: var(--coral); margin: 8px 0 4px; height: 26px; }
.dial-note { font-family: var(--docu); font-style: italic; color: var(--muted); font-size: 17px; line-height: 1.22; }

/* ------------------------------ the demo ------------------------------ */

.overlay.demo { z-index: 70; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 34px; padding: 2.5vh 24px calc(2.5vh + var(--bar)); background: rgba(30, 18, 12, .74); justify-items: center; }
.in-demo { overflow: hidden; }
.in-demo #hud, .in-demo #narrator { display: none; }
.demo-side { color: var(--cream); max-width: 300px; display: grid; gap: 12px; }
.demo-side.left { justify-self: end; text-align: right; }
.demo-side.right { justify-self: start; }
.demo-side .shout { font-size: clamp(26px, 2.6vw, 40px); }
.demo-side .doc { font-size: 20px; }
.demo-side .stores { flex-direction: column; margin-top: 8px; }
.phone-frame { position: relative; height: min(95vh, 900px); height: min(95dvh, 900px); aspect-ratio: 9 / 19.2; border: 12px solid #120c0a; border-radius: 50px; overflow: hidden; background: linear-gradient(180deg, #6fbde8, #a9dcf2 50%, #ffe9c7); box-shadow: 0 0 0 3px #4a3832, 0 34px 70px rgba(0, 0, 0, .5); touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; cursor: pointer; outline: none; }
.phone-frame #stage { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 1; transition: none; z-index: 1; }
.demo-hud { position: absolute; z-index: 3; top: 12px; left: 12px; right: 12px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; }
.demo-hud .corn-chip { justify-self: end; font-size: 19px; padding: 5px 6px 5px 12px; }
.demo-hud .corn-chip img { width: 24px; height: 24px; }
.demo-hud .round { width: 44px; height: 44px; }
.demo-hud .aura-num { font-size: 66px; -webkit-text-stroke-width: 10px; }
.demo-hud .aura-tag { font-size: 18px; }
.demo-words { position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; }
.demo-words .word { font-size: 40px; -webkit-text-stroke-width: 9px; }
.demo-hint { position: absolute; z-index: 3; left: 0; right: 0; bottom: 19%; text-align: center; pointer-events: none; animation: breathe2 1.1s ease-in-out infinite; }
.demo-hint .shout { font-size: 46px; -webkit-text-stroke-width: 11px; }
.pill { display: inline-block; background: rgba(58, 42, 38, .86); color: var(--cream); font-weight: 600; font-size: 17px; padding: 3px 15px; border-radius: 16px; margin-top: 6px; }
@keyframes breathe2 { 50% { transform: scale(1.04); } }
.demo-loading { position: absolute; z-index: 4; inset: 0; display: grid; place-items: center; color: var(--ink); background: linear-gradient(180deg, #6fbde8, #a9dcf2 50%, #ffe9c7); transition: opacity .4s; }
.demo-loading.gone { opacity: 0; pointer-events: none; }
.demo-caption { position: absolute; z-index: 4; left: 12px; right: 12px; top: 92px; background: rgba(23, 15, 13, .86); color: var(--cream); border-radius: 20px; padding: 10px 18px 13px; pointer-events: none; }
.demo-result { position: absolute; z-index: 5; left: 14px; right: 14px; bottom: 16px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 11px; align-items: center; justify-items: center; animation: result-in .34s cubic-bezier(.3, 1.5, .5, 1); cursor: default; }
.demo-result .result-card, .demo-result #d-get { grid-column: 1 / -1; }
@keyframes result-in { from { transform: translateY(110px); opacity: 0; } }
.demo-result .result-card { padding: 13px 18px 15px; border-radius: 28px; }
.demo-result .r-score { font-size: 72px; }
.demo-result .r-rank { font-size: 22px; }
.demo-result .r-next { font-size: 16px; }
.demo-result .r-row { font-size: 17px; }
.demo-result .badge { font-size: 18px; }
.demo-result .r-aura { font-size: 20px; }
.demo-result .btn.big-btn { font-size: 26px; }
.demo-result .btn { font-size: 17px; }
.demo-result .round { width: 46px; height: 46px; }

/* Up in the HUD's row, between the close button and the corn, clear of the result card. */
.in-demo #toasts { top: calc(var(--safe-t) + 10px); width: min(320px, 100% - 138px); }
.in-demo .toast { padding: 5px 12px 7px; border-radius: 15px; }
.in-demo .toast b { font-size: 13.5px; }
.in-demo .toast span { font-size: 13.5px; line-height: 1.15; display: block; }

/* ------------------------------ brainrot dial ------------------------------ */

html[data-brainrot="0"] .word, html[data-brainrot="0"] .c-foil { display: none; }
html[data-brainrot="2"] h2.shout { transform: rotate(-1.2deg); }
html[data-brainrot="2"] .btn.coral, html[data-brainrot="2"] .btn.butter { animation: wiggle 1.4s ease-in-out infinite; }
html[data-brainrot="3"] h2.shout { animation: rot-hue 1.8s linear infinite, wiggle .7s ease-in-out infinite; }
html[data-brainrot="3"] .block { animation: wobble 4s ease-in-out infinite; }
html[data-brainrot="3"] .btn, html[data-brainrot="3"] .c-card { animation: wiggle .55s ease-in-out infinite; }
html[data-brainrot="3"] .ticker-run, html[data-brainrot="3"] .street-run { animation-duration: 12s; }
html[data-brainrot="3"] .sun { animation: throb .5s ease-in-out infinite; }
@keyframes wiggle { 0%, 100% { rotate: -1.3deg; } 50% { rotate: 1.3deg; } }
@keyframes wobble { 0%, 100% { rotate: -.35deg; } 50% { rotate: .35deg; } }
@keyframes rot-hue { to { filter: hue-rotate(360deg); } }
@keyframes throb { 50% { scale: 1.3; } }

/* ------------------------------ no 3D: the page still has to stand up by itself ------------------------------ */

:is(.no-3d, .no-js) .chapter { height: 100vh; }
:is(.no-3d, .no-js) .card-text { --card: 1; margin-top: 0; }
:is(.no-3d, .no-js) .bar { --bars: 1; }
:is(.no-3d, .no-js) .pin { position: relative; background: center / cover no-repeat; }
:is(.no-3d, .no-js) #town .pin { background-image: url('../assets/img/shot_fly_town.webp'); }
:is(.no-3d, .no-js) #clouds .pin { background-image: url('../assets/img/shot_fly_clouds.webp'); }
:is(.no-3d, .no-js) #space .pin { background-image: url('../assets/img/shot_fly_space.webp'); }
:is(.no-3d, .no-js) .reentry { height: 80vh; }
:is(.no-3d, .no-js) .huge-doc, :is(.no-3d, .no-js) .quickly { --re1: 1; --re2: 1; }
.no-3d .closet-slot { background: url('../assets/img/costume_eagle.webp') center / contain no-repeat; }
.no-js #hud, .no-js .tap-to-fly, .no-js .scroll-hint, .no-js .sample, .no-js .brain, .no-js #closet, .no-js #ranks, .no-js #quests, .no-js #result, .no-js #reviews, .no-js #faq, .no-js .street, .no-js .ticker, .no-js .hint, .no-js .tv-controls { display: none; }
.file-note { position: fixed; z-index: 99; left: 50%; bottom: 14px; transform: translateX(-50%); width: min(520px, 100% - 24px); background: var(--ink); color: var(--cream); padding: 10px 16px; border-radius: 14px; font-size: 15px; text-align: center; }
.file-note code { color: var(--butter); }
.noscript { position: fixed; z-index: 99; left: 0; right: 0; bottom: 0; background: var(--ink); color: var(--cream); text-align: center; padding: 10px; }

/* ------------------------------ phones ------------------------------ */

@media (max-width: 1100px) {
  .hero-note { display: none; }
  .demo-side { display: none; }
  .overlay.demo { grid-template-columns: 1fr; }
  .scrolled .rot-hint { opacity: 0; pointer-events: none; }
}

@media (max-width: 900px) {
  body { font-size: 17px; }
  .wrap.two { grid-template-columns: 1fr; }
  .wrap.two.reverse .col { order: 0; }
  .wrap.two.reverse .phone { order: 1; justify-self: center; margin-top: 16px; }
  .steps { grid-template-columns: 1fr; }
  .sample { flex-direction: column; align-items: stretch; text-align: center; }
  .sample p { margin-inline: auto; }
  .numbers { grid-template-columns: repeat(3, 1fr); row-gap: 22px; }
  .closet-slot { min-height: 42vh; order: -1; }
  #closet .wrap.two { gap: 0; }
  #closet .col { min-width: 0; }
  /* One swipeable row, so the chicken stays in sight above it while it gets dressed. */
  .costumes { display: flex; overflow-x: auto; margin-inline: -20px; padding: 2px 20px 10px; scroll-snap-type: x proximity; scroll-padding-inline: 20px; scrollbar-width: none; overscroll-behavior-x: contain; }
  .costumes::-webkit-scrollbar { display: none; }
  .costumes li { display: flex; flex: 0 0 min(66%, 230px); scroll-snap-align: start; }
  .cards { grid-template-columns: minmax(0, 420px); }
  .tap-to-fly { bottom: calc(var(--safe-b) + 6vh); }
  .scroll-hint { left: 0; right: 0; max-width: none; text-align: center; bottom: calc(var(--safe-b) + 1.6vh); }
}

@media (max-width: 760px) {
  #hero { padding: calc(var(--safe-t) + 96px) calc(var(--safe-r) + 14px) 0 calc(var(--safe-l) + 14px); }
  .hero-poster { background-image: url('../assets/img/hero_tall.webp'); }
  .hero-copy h1 { width: min(82vw, 400px); }
  .tagline { font-size: clamp(22px, 6.2vw, 30px); margin-top: 11px; }
  .hero-sub, .hero-note { display: none; }
  .hero-copy .stores { position: absolute; left: calc(var(--safe-l) + 14px); right: calc(var(--safe-r) + 14px); bottom: calc(var(--safe-b) + 32px); margin: 0; }
  .tap-to-fly { bottom: calc(var(--safe-b) + 104px); }
  .tap-to-fly .shout { font-size: 46px; }
  .tap-to-fly small { font-size: 15px; white-space: nowrap; }
  .scroll-hint { left: 0; right: 0; text-align: center; bottom: calc(var(--safe-b) + 7px); font-size: min(13px, 3.3vw); padding-inline: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #narrator { left: calc(var(--safe-l) + 10px); right: calc(var(--safe-r) + 10px); width: auto; bottom: calc(var(--safe-b) + 10px); padding: 9px 15px 11px; }
  #narrator .line { font-size: 17.5px; }
  #toasts { top: calc(var(--safe-t) + 92px); }
  .aura-num { font-size: 46px; -webkit-text-stroke-width: 8px; }
  .aura-tag { font-size: 15px; -webkit-text-stroke-width: 5px; }
  .round.pause, .round.rot { width: 46px; height: 46px; }
  .round.rot { font-size: 21px; }
  .corn-chip { font-size: 19px; padding: 5px 6px 5px 12px; }
  .corn-chip img { width: 24px; height: 24px; }
  .stores { justify-content: center; flex-wrap: nowrap; gap: 10px; }
  .store { min-width: 0; flex: 1 1 0; padding: 8px 10px 8px 12px; gap: 8px; border-radius: 15px; text-align: left; }
  .store svg { width: 24px; height: 24px; }
  .store small { font-size: clamp(9px, 2.8vw, 10.5px); white-space: nowrap; }
  .store b { font-size: clamp(14px, 4.8vw, 19px); white-space: nowrap; }
  .store.official { flex: 0 1 auto; padding: 0; }
  .store.official img { height: auto; max-height: 48px; width: 100%; object-fit: contain; }
  .btn.wide { font-size: 18px; }
  .btn.wide.big-btn { font-size: 28px; }
  .form table { font-size: 14.5px; }
  .form th, .form td { padding: 8px 6px; }
  .form tbody th { white-space: normal; }
  .costumes { grid-template-columns: 1fr 1fr; gap: 9px; }
  .costume { padding: 9px 12px 10px; }
  .costume b { font-size: 17.5px; }
  .costume span { font-size: 13.5px; }
  .tv-screen { border-width: 8px; border-radius: 20px; }
  .tv-caption { padding: 7px 13px 9px; top: 10%; left: 3%; right: 3%; border-radius: 13px; }
  .tv-caption .cam { font-size: 10.5px; margin-bottom: 0; }
  .tv-caption .line { font-size: 15.5px; }
  .tv-controls { flex-direction: column; }
  .chapter { height: 200vh; }
  .bar { height: 10vh; }
}

/* The demo is the whole screen wherever a phone frame would be a sliver: phones, a phone on
   its side, and the short wide screen of an open foldable. A mouse on a laptop keeps the frame. */
@media (max-width: 760px), (max-height: 520px), (pointer: coarse) and (max-height: 720px) {
  .overlay.demo { grid-template-columns: 1fr; padding: 0; background: #6fbde8; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .demo-side { display: none; }
  .in-demo main, .in-demo #footer, .in-demo #sky { visibility: hidden; } /* nothing back there to paint */
  .phone-frame { position: fixed; left: 0; top: 0; width: 100%; height: 100%; height: 100lvh; aspect-ratio: auto; border: 0; border-radius: 0; box-shadow: none; }
  .demo-hud { top: calc(var(--safe-t) + 10px); left: calc(var(--safe-l) + 12px); right: calc(var(--safe-r) + 12px); }
  .demo-caption { top: calc(var(--safe-t) + 92px); left: calc(var(--safe-l) + 12px); right: calc(var(--safe-r) + 12px); max-width: 520px; margin-inline: auto; }
  .demo-result { bottom: calc(var(--safe-b) + var(--bar) + 14px); left: calc(var(--safe-l) + 14px); right: calc(var(--safe-r) + 14px); max-width: 440px; margin-inline: auto; }
}

/* On a screen wider than it is tall the chicken sits lower, right where the hint would go. */
@media (pointer: coarse) and (max-height: 720px) and (min-aspect-ratio: 1/1) { .demo-hint { bottom: 4%; } }

/* The result card has to share a screen with the caption above it. */
@media (max-height: 800px) {
  .demo-result { gap: 9px; }
  .demo-result .result-card { padding: 9px 16px 11px; }
  .demo-result .r-score { font-size: 54px; }
  .demo-result .r-aura { font-size: 16px; }
  .demo-result .r-rank { font-size: 19px; }
  .demo-result .btn.big-btn { font-size: 22px; padding-block: .55em; }
  .demo-caption .line { font-size: 17px; }
  .demo-caption { padding: 7px 14px 9px; }
}

/* ------------------------------ phones on their side, the Duo open wide ------------------------------ */

@media (max-height: 520px) and (min-aspect-ratio: 5/4) {
  body { font-size: 16px; }
  .block { padding-block: 44px; }
  .xl { font-size: clamp(30px, 5.2vw, 44px); }
  .big { font-size: clamp(32px, 5.4vw, 46px); }
  .doc { font-size: clamp(18px, 2.6vw, 22px); }
  .lede { font-size: 16px; margin-top: 12px; }
  .wrap.two { grid-template-columns: 1fr 1fr; gap: 28px; }
  .wrap.two.reverse .col { order: 1; }
  .wrap.two.reverse .phone { order: 2; margin-top: 0; }
  .phone { width: min(190px, 28vw); border-width: 7px; border-radius: 26px; }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
  .steps li { padding: 14px 14px 16px; border-radius: 20px; }
  .steps b { font-size: 19px; }
  .steps span { font-size: 15px; }
  .sample { flex-direction: row; align-items: center; text-align: left; margin-top: 30px; }
  .numbers { grid-template-columns: repeat(6, minmax(0, 1fr)); margin-top: 26px; }
  .numbers dt { font-size: 34px; -webkit-text-stroke-width: 6px; }
  .numbers dd { font-size: 12.5px; }
  .tv { width: min(58vw, 460px); margin-top: 20px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 250px)); gap: 24px; }
  .cards.solo { grid-template-columns: minmax(0, 250px); margin-top: 24px; }
  .c-card { aspect-ratio: 5 / 7.4; }
  .c-face { border-radius: 22px; padding: 7px; }
  .c-top { font-size: 11px; padding: 2px 8px 5px; }
  .c-art { border-radius: 16px; }
  .c-plate { padding: 6px 8px 8px; margin-top: 6px; border-radius: 14px; }
  .c-name { font-size: 18px; }
  .c-line { font-size: 14px; }
  .c-actions { margin-top: 5px; gap: 5px; }
  .c-actions .btn { font-size: 12px; min-height: 40px; padding-block: .3em; }
  .c-back { padding: 11px; border-width: 7px; }
  .c-back h4 { font-size: 20px; }
  .c-back .c-no { font-size: 11px; }
  .c-back .c-habit { font-size: 14px; margin-top: 3px; line-height: 1.22; }
  .c-back ul { margin-top: 6px; gap: 4px; }
  .c-back li { font-size: 13.5px; line-height: 1.16; padding-left: 9px; }
  .c-it, .c-yell { display: none; }
  .c-back .btn { margin-top: auto; }
  .hecklers { max-width: 520px; margin-top: 24px; }
  .closet-slot { min-height: 0; order: 0; }
  #closet .wrap.two { gap: 28px; }
  .costumes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 14px 0 0; padding: 0; overflow: visible; }
  .costumes li { display: list-item; }
  .chapter { height: 200vh; }
  .card-text { margin-top: -6vh; }
  .ch-num { font-size: 20px; }
  .ch-sub { font-size: 18px; }
  .ch-title { font-size: clamp(46px, 16vh, 86px); }

  #hud { top: calc(var(--safe-t) + 8px); }
  .round.pause, .round.rot { width: 42px; height: 42px; }
  .round.rot { font-size: 19px; }
  .aura-num { font-size: 34px; -webkit-text-stroke-width: 7px; }
  .aura-tag { font-size: 12px; -webkit-text-stroke-width: 4px; margin-top: 0; }
  .corn-chip { font-size: 17px; padding: 4px 5px 4px 11px; }
  .corn-chip img { width: 22px; height: 22px; }
  .rot-hint { display: none; }
  #toasts { top: calc(var(--safe-t) + 6px); width: min(300px, 42vw); }
  .toast { padding: 4px 14px 6px; border-radius: 14px; }
  .toast b, .toast span { font-size: 13px; }
  #narrator { width: min(380px, 52vw); left: calc(var(--safe-l) + 10px); right: auto; bottom: calc(var(--safe-b) + 8px); padding: 5px 12px 7px; border-radius: 16px; }
  #narrator .cam { font-size: 10.5px; margin-bottom: 0; }
  #narrator .line { font-size: 15px; }

  /* Words on the left, chicken in the middle, button on the right. */
  #hero { padding: calc(var(--safe-t) + 58px) calc(var(--safe-r) + 16px) 0 calc(var(--safe-l) + 18px); text-align: left; }
  .hero-poster { background-image: url('../assets/img/hero_wide.webp'); }
  .hero-copy { width: min(36vw, 330px); }
  .hero-copy h1 { width: min(100%, 56vh); margin: 0; }
  .tagline { font-size: clamp(16px, 5.4vh, 23px); margin-top: 10px; }
  .hero-sub { display: none; }
  .hero-copy .stores { position: static; flex-wrap: wrap; justify-content: flex-start; gap: 8px; margin: 10px 0 0; }
  .store { min-width: 0; flex: 0 1 auto; padding: 6px 12px 6px 10px; gap: 7px; border-radius: 13px; box-shadow: 0 4px 0 #231713; text-align: left; }
  .store svg { width: 20px; height: 20px; }
  .store small { font-size: 9.5px; white-space: nowrap; }
  .store b { font-size: 15px; white-space: nowrap; }
  .store.official { padding: 0; }
  .store.official img { height: 36px; max-height: none; width: auto; }
  .tap-to-fly { left: auto; right: calc(var(--safe-r) + 3vw); bottom: calc(var(--safe-b) + 22vh); transform: none; animation-name: breathe2; }
  .tap-to-fly .shout { font-size: clamp(28px, 11vh, 44px); -webkit-text-stroke-width: 8px; }
  .tap-to-fly small { font-size: 13px; }
  .scroll-hint { left: auto; right: calc(var(--safe-r) + 3vw); bottom: calc(var(--safe-b) + 7px); max-width: 44vw; text-align: right; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  /* Pause in two columns, because there is no height to stack it in. */
  .overlay { padding-block: calc(var(--safe-t) + 8px) calc(var(--safe-b) + var(--bar) + 8px); }
  .pause-col { width: min(700px, 100%); grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 18px; align-items: center; }
  .pause-col > * { grid-column: 1; }
  .pause-title { font-size: 46px; }
  #pause-line { font-size: 16px; }
  .pause-col .btn.big-btn { font-size: 23px; padding-block: .5em; }
  .pause-col .btn.wide { font-size: 16px; padding-block: .55em; }
  .switches { grid-column: 2; grid-row: 1 / span 2; align-self: end; grid-template-columns: 1fr 1fr; }
  .dial { grid-column: 2; grid-row: 3 / span 2; padding: 8px 14px; }
  .dial input { margin: 3px 0 0; }
  .dial-note { font-size: 14px; }

  /* The result card beside its buttons. */
  .demo-hint { bottom: 4%; }
  .demo-hint .shout { font-size: 34px; -webkit-text-stroke-width: 8px; }
  .demo-hint .pill { font-size: 14px; margin-top: 3px; }
  .demo-hud .round { width: 42px; height: 42px; }
  .demo-hud .aura-num { font-size: 40px; -webkit-text-stroke-width: 8px; }
  .demo-hud .aura-tag { font-size: 13px; }
  .demo-caption { top: calc(var(--safe-t) + 58px); max-width: min(420px, 64vw); padding: 4px 13px 6px; }
  .demo-caption .cam { display: none; }
  .demo-caption .line { font-size: 15px; }
  .demo-result { bottom: calc(var(--safe-b) + var(--bar) + 8px); max-width: 600px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 42px; gap: 8px 10px; align-items: center; }
  .demo-result .result-card { grid-column: 1; grid-row: 1 / span 2; padding: 3px 12px 6px; border-radius: 20px; }
  .demo-result #d-get { grid-column: 2 / -1; grid-row: 1; }
  .demo-result #d-again { grid-column: 2; grid-row: 2; }
  .demo-result #d-share { grid-column: 3; grid-row: 2; }
  .demo-result .badge { font-size: 12px; }
  .demo-result .r-aura { display: none; }
  .demo-result .r-score { font-size: 38px; }
  .demo-result .r-rank { font-size: 15px; }
  .demo-result .r-next { font-size: 12.5px; line-height: 1.2; }
  .demo-result .r-row { font-size: 13px; margin-top: 2px; gap: 12px; }
  .demo-result .btn { font-size: 14px; padding: .55em .7em; }
  .demo-result .btn.big-btn { font-size: 18px; }
  .demo-result .round { width: 42px; height: 42px; }
}

/* ------------------------------ the narrowest covers: the first Galaxy Fold is 280px wide ------------------------------ */

@media (max-width: 480px) {
  .c-card { aspect-ratio: 5 / 8; }
  .c-back { padding: 18px 16px; }
  .sign { padding-inline: 6px; }
}

@media (max-width: 380px) {
  .c-card { aspect-ratio: 5 / 8.8; }
  .c-back { padding: 16px 14px; }
  .c-back .c-habit { font-size: 15.5px; }
  .c-back li { font-size: 16px; }
  .c-yell { font-size: 26px; }
}

@media (max-width: 340px) {
  .wrap, .wrap.narrow { width: calc(100% - 24px); }
  .result .wrap { width: calc(100% - 24px); }
  .c-card { aspect-ratio: 5 / 10; }
  .c-face { border-radius: 24px; padding: 8px; }
  .c-back { padding: 13px 11px; border-width: 7px; }
  .c-it { display: none; }
  .form { padding-inline: 11px; }
  .hecklers { gap: 5px; }
  .sign { padding-inline: 4px; }
  .sign b { font-size: 11.5px; }
  .form table { font-size: 12.5px; }
  .form thead th { font-size: 14px; }
  .form th, .form td { padding: 7px 3px; }
  .stores { gap: 7px; }
  .store { padding: 7px 7px 7px 8px; gap: 5px; border-radius: 13px; }
  .store svg { width: 19px; height: 19px; }
  .tap-to-fly .shout { font-size: 40px; -webkit-text-stroke-width: 10px; }
  .tap-to-fly small { font-size: 13.5px; }
  .numbers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps li { padding: 18px 18px 20px; }
  .round.pause, .round.rot { width: 42px; height: 42px; }
  .corn-chip { font-size: 16px; padding: 4px 4px 4px 9px; }
  .corn-chip img { width: 20px; height: 20px; }
  .hud-right { gap: 6px; }
  #hud { padding-inline: calc(var(--safe-l) + 10px) calc(var(--safe-r) + 10px); }
  .costumes li { flex-basis: 78%; }
  .tv-caption .line { font-size: 14px; }
  .r-score { font-size: 84px; }
  .c-actions .btn { font-size: 13.5px; }
}

/* ------------------------------ two screens with a hinge between them ------------------------------ */

/* Surface Duo and any foldable reporting a split: the page lives in the first pane, where no
   word lands in the hinge, and the chicken gets the second to itself. */
@media (horizontal-viewport-segments: 2) {
  :root { --pane: env(viewport-segment-width 0 0, 50vw); --off: calc(100vw - var(--pane)); }
  .block { padding-right: var(--off); }
  .wrap.two { grid-template-columns: minmax(0, 1fr); }
  .wrap.two.reverse .col { order: 0; }
  .wrap.two.reverse .phone { order: 1; justify-self: center; }
  .closet-slot { display: none; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .sample { flex-direction: column; align-items: stretch; text-align: center; }
  .numbers { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cards { grid-template-columns: minmax(0, 420px); }
  #hud { right: var(--off); }
  #toasts { left: calc(var(--pane) / 2); width: calc(var(--pane) - 28px); }
  #narrator { width: calc(var(--pane) - 36px); }
  #hero { padding-right: calc(var(--off) + 20px); }
  .hero-copy h1 { width: min(70%, 420px); }
  .hero-copy .stores { position: static; }
  .tap-to-fly { left: calc(var(--pane) / 2); }
  .hero-note, .scroll-hint { display: none; }
  .pin { padding-right: var(--off); }
  #footer { padding-right: calc(var(--off) + 20px); }
  .overlay.demo { grid-template-columns: var(--pane) minmax(0, 1fr); gap: 0; padding: 0; column-gap: calc(env(viewport-segment-left 1 0, 50vw) - var(--pane)); background: rgba(30, 18, 12, .86); }
  .demo-side.left { display: grid; justify-self: center; text-align: center; }
  .demo-side.right { display: none; }
  .phone-frame { position: relative; width: 100%; height: 100vh; height: 100dvh; aspect-ratio: auto; border: 0; border-radius: 0; box-shadow: none; }
}

/* The other way up, like a tiny laptop: the game plays on the flat half. */
@media (vertical-viewport-segments: 2) {
  .overlay.demo { padding: 0; }
  .phone-frame { position: fixed; left: 0; right: 0; top: env(viewport-segment-top 0 1, 50vh); bottom: 0; width: 100%; height: auto; aspect-ratio: auto; border: 0; border-radius: 0; box-shadow: none; }
}

/* ------------------------------ older Chrome ------------------------------ */

/* See the note in index.html. Without paint-order the stroke eats the letters, so it's shadows here. */
.old-stroke .shout, .old-stroke .aura-num, .old-stroke .aura-tag, .old-stroke .word, .old-stroke .numbers dt, .old-stroke .c-shout, .old-stroke .c-yell {
  -webkit-text-stroke-width: 0 !important;
  text-shadow: .05em .05em 0 var(--ink), -.05em .05em 0 var(--ink), .05em -.05em 0 var(--ink), -.05em -.05em 0 var(--ink), .07em 0 0 var(--ink), -.07em 0 0 var(--ink), 0 .07em 0 var(--ink), 0 -.07em 0 var(--ink);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .ticker-run, .street-run { animation: none !important; }
}
