:root {
  --table: #1238d6; --table-deep: #0c2699; --ink: #16123a; --sheet: #fffdf6;
  --marigold: #ffb400; --pink: #ff6db3; --mint: #2fd69b; --tomato: #ff6f4d; --sky: #86d6ff;
  --display: 'Shrikhand', 'Georgia', serif; --hand: 'Kalam', 'Comic Sans MS', cursive; --type: 'Special Elite', 'Courier New', monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0; min-height: 100vh; color: #fff; font: 400 19px/1.45 var(--hand);
  background-color: var(--table); background-image: var(--tex-grain, none); overflow-x: clip;
}
a { color: inherit; }
:focus-visible { outline: 3px solid #fff; outline-offset: 3px; border-radius: 4px; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px clamp(16px, 4vw, 44px); position: relative; z-index: 5; }
.logo { font: 26px/1 var(--display); color: var(--marigold); text-decoration: none; white-space: nowrap; }
.top nav { display: flex; gap: clamp(10px, 2.4vw, 24px); align-items: center; font-size: 18px; }
.top nav a { text-underline-offset: 4px; white-space: nowrap; }
main { padding: 0 clamp(16px, 4vw, 44px) 80px; overflow-x: clip; position: relative; z-index: 1; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; margin: 0; line-height: 1.02; }

button, .btn { font: 400 21px/1 var(--display); border: 0; cursor: pointer; text-decoration: none; display: inline-block; text-align: center; }
.btn, button.btn { background: var(--marigold); color: var(--ink); padding: 15px 26px 17px; border-radius: 40px 34px 42px 30px; box-shadow: 0 5px 0 var(--ink); transition: transform .08s, box-shadow .08s; }
.btn:hover { transform: translateY(-2px) rotate(-1deg); box-shadow: 0 7px 0 var(--ink); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.btn[disabled] { filter: brightness(.82); cursor: wait; }
.btn.alt { background: #fff; }
.btn.hot { background: var(--pink); }
button.ghost, .linkish { background: none; color: inherit; font: 400 18px/1.2 var(--hand); text-decoration: underline; text-underline-offset: 4px; padding: 4px 2px; white-space: nowrap; }

input[type=text], input[type=email], input[type=url], input[type=date], textarea {
  font: 400 21px/1.35 var(--hand); color: var(--ink); background: var(--sheet); border: 3px solid var(--ink); border-radius: 12px 9px 14px 8px; padding: 11px 14px; width: 100%;
}
label { display: block; }
.err { background: var(--tomato); color: var(--ink); padding: 12px 16px; border-radius: 10px; margin: 14px 0; max-width: 60ch; }
.note { max-width: 56ch; }
.muted { opacity: .85; font-size: 17px; }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 56px); align-items: center; min-height: min(78vh, 760px); }
.hero h1 { font-size: clamp(66px, 12.5vw, 188px); color: var(--marigold); line-height: .9; letter-spacing: -.01em; transform: rotate(-3deg); transform-origin: left bottom; }
.when-form { margin-top: clamp(16px, 3vw, 34px); }
input.when-input { background: none; border: 0; border-bottom: 5px solid #fff; border-radius: 0; color: #fff; font: 700 clamp(30px, 4.6vw, 62px)/1.15 var(--hand); padding: 2px 0 6px; width: 100%; }
input.when-input::placeholder { color: #fff; opacity: .72; }
input.when-input:focus { outline: 0; border-color: var(--marigold); }
.when-row { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-top: 22px; }
.hero p.pitch { font-size: clamp(20px, 2.1vw, 26px); max-width: 30ch; margin: 0; line-height: 1.25; }
.hero-env { transform: rotate(5deg); animation: breathe 5s ease-in-out infinite; }
@keyframes breathe { 50% { transform: rotate(3deg) translateY(-10px); } }
.borrow { display: block; margin-top: 12px; text-align: center; font-size: 20px; text-underline-offset: 4px; overflow-wrap: anywhere; }
.demo-link { display: block; margin-top: 22px; text-align: center; font-size: 20px; text-underline-offset: 4px; }

/* Envelope */
.env { --c: var(--marigold); container-type: inline-size; position: relative; width: 100%; aspect-ratio: 3 / 2; }
.ritual .env, .open-stage .env { perspective: 1100px; }
.env.c-marigold { --c: var(--marigold); } .env.c-pink { --c: var(--pink); } .env.c-mint { --c: var(--mint); } .env.c-tomato { --c: var(--tomato); } .env.c-sky { --c: var(--sky); }
.env-back, .env-pocket, .env-flap { position: absolute; inset: 0; background-color: var(--c); background-image: var(--tex-paper, none); background-size: 340px; background-blend-mode: multiply; }
.env-back { border-radius: 5px; filter: brightness(.72); box-shadow: 0 14px 26px rgb(5 12 70 / .5); }
.env-pocket { clip-path: polygon(0 0, 50% 54%, 100% 0, 100% 100%, 0 100%); z-index: 3; border-radius: 5px; color: var(--ink); }
.env-flapwrap { position: absolute; inset: 0; z-index: 4; transform-origin: 50% 0; transform-style: flat; transition: transform .75s cubic-bezier(.4, 0, .2, 1); filter: drop-shadow(0 3px 2px rgb(10 10 50 / .34)); pointer-events: none; }
.env-flap { clip-path: polygon(0 0, 100% 0, 50% 58%); filter: brightness(1.05); }
.env.flap-open .env-flapwrap { transform: rotateX(178deg); z-index: 1; }
.env-text { position: absolute; left: 7%; right: 7%; bottom: 5%; height: 37%; display: flex; align-items: flex-end; justify-content: center; text-align: center; margin: 0; z-index: 5; color: var(--ink); font: 700 6.1cqw/1.08 var(--hand); overflow-wrap: anywhere; }
.env-text.long { font-size: 4.8cqw; }
.env-seal { position: absolute; left: 50%; top: 56%; width: 24%; aspect-ratio: 1; transform: translate(-50%, -50%); z-index: 6; }
.env-seal img, .env-seal canvas { width: 100%; height: 100%; display: block; }
.postmark { position: absolute; right: 4%; top: 6%; z-index: 7; font: 3.1cqw/1.05 var(--type); color: var(--ink); text-align: center; border: 2px solid var(--ink); border-radius: 50%; width: 19%; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; transform: rotate(14deg); opacity: .78; padding: 2px; }
.opened-tag { position: absolute; left: 3%; top: 7%; z-index: 7; background: var(--ink); color: #fff; font: 3.6cqw/1 var(--type); padding: 1.2cqw 2cqw; transform: rotate(-8deg); }
.env.is-open .env-flapwrap { transform: rotateX(178deg); z-index: 1; }

/* Floating mail */
.floaters { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; contain: strict; transition: transform .5s ease-out; }
@media (pointer: fine) { .floaters { inset: -24px; } }
.floater { position: absolute; top: 0; width: var(--size); animation: drift linear infinite; will-change: transform; }
@keyframes drift {
  from { transform: translate3d(0, 112vh, 0) rotate(var(--r0)); }
  to { transform: translate3d(var(--dx), -18vh, 0) rotate(var(--r1)); }
}
.f-env { aspect-ratio: 3 / 2; border-radius: 3px; background-image: linear-gradient(to bottom right, rgb(0 0 0 / .17) 49.5%, transparent 50%), linear-gradient(to bottom left, rgb(0 0 0 / .17) 49.5%, transparent 50%); background-size: 50% 60%; background-position: left top, right top; background-repeat: no-repeat; box-shadow: 0 6px 12px rgb(5 12 70 / .35); }
.f-wax { width: 62%; display: block; filter: drop-shadow(0 4px 5px rgb(5 12 70 / .4)); }
.f-stamp { width: 72%; aspect-ratio: 4 / 5; background: var(--sheet); border: 4px dotted var(--table); display: flex; align-items: center; justify-content: center; font: calc(var(--size) * .42)/1 var(--display); }
.f-scrap { aspect-ratio: 1; width: 58%; background-image: var(--tex-paper, none); background-blend-mode: multiply; }

/* Live counters */
.pulse { background: var(--ink); border-radius: 18px 12px 22px 10px; padding: 18px clamp(16px, 3vw, 30px); margin: 18px 0 8px; transform: rotate(-.5deg); }
.stats { display: flex; flex-wrap: wrap; align-items: center; gap: 12px clamp(20px, 4vw, 48px); }
.live-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--mint); animation: live 1.6s ease-in-out infinite; margin-right: -8px; }
@keyframes live { 50% { opacity: .35; transform: scale(.7); } }
.stat b { font: clamp(34px, 5vw, 54px)/1 var(--display); color: var(--marigold); display: inline-block; margin-right: 8px; }
.stat b.bump { animation: bump .5s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes bump { 40% { transform: scale(1.35) rotate(-4deg); color: var(--pink); } }
.feed { margin: 10px 0 0; font: 17px/1.3 var(--type); min-height: 1.3em; }
#sky { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 25; }
.flyer { position: absolute; left: 0; top: 0; width: 74px; height: 50px; border-radius: 3px; z-index: 25; pointer-events: none; box-shadow: 0 8px 14px rgb(5 12 70 / .45); background-image: linear-gradient(to bottom right, rgb(0 0 0 / .16) 49.5%, transparent 50%), linear-gradient(to bottom left, rgb(0 0 0 / .16) 49.5%, transparent 50%); background-size: 50% 62%; background-position: left top, right top; background-repeat: no-repeat; }

/* Next to open */
.countdown { margin: 34px 0 0; }
.countdown h2 { font-size: clamp(30px, 4vw, 46px); color: var(--marigold); transform: rotate(-1deg); transform-origin: left bottom; margin-bottom: 14px; }
.tickets { display: flex; gap: 16px; overflow-x: auto; padding: 8px clamp(16px, 4vw, 44px) 14px; margin: 0 calc(-1 * clamp(16px, 4vw, 44px)); scrollbar-color: var(--marigold) transparent; }
.ticket { flex: 1 0 clamp(220px, 22vw, 300px); color: var(--ink); text-decoration: none; padding: 16px 18px 14px; border-radius: 4px; box-shadow: 0 8px 16px rgb(5 12 70 / .4); transition: transform .18s cubic-bezier(.3, 1.6, .5, 1); background-image: radial-gradient(circle at 0 50%, var(--table) 9px, transparent 10px), radial-gradient(circle at 100% 50%, var(--table) 9px, transparent 10px); }
.ticket:nth-child(odd) { transform: rotate(-1.2deg); } .ticket:nth-child(even) { transform: rotate(1deg); }
.ticket:hover { transform: rotate(0) translateY(-5px); }
.ticket b { font: clamp(34px, 3.6vw, 48px)/1 var(--display); display: block; }
.ticket-clock { font: 22px/1.3 var(--type); display: block; font-variant-numeric: tabular-nums; }
.ticket p { margin: 8px 0 0; font-weight: 700; line-height: 1.15; }

/* Gifts */
.head-side { display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: center; }
.btn.small { font-size: 18px; padding: 11px 18px 13px; }
.gift-cta { display: block; background: var(--pink); color: var(--ink); text-decoration: none; padding: 18px clamp(18px, 3vw, 30px); border-radius: 16px 24px 14px 26px; margin: 26px 0 0; transform: rotate(.5deg); box-shadow: 0 6px 0 var(--ink); transition: transform .15s; }
.gift-cta:hover { transform: rotate(-.5deg) translateY(-3px); }
.gift-cta b { font: clamp(24px, 3.4vw, 38px)/1.05 var(--display); display: block; font-weight: 400; margin-bottom: 4px; }
.handover { width: min(92vw, 560px); }
.handover input { font: 17px/1.3 var(--type); }

/* Races */
.races { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 26px; }
.race-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.race-side { color: var(--ink); font: 700 clamp(19px, 2vw, 23px)/1.12 var(--hand); padding: 18px 14px; min-height: 124px; border-radius: 5px; display: flex; flex-direction: column; justify-content: center; gap: 8px; box-shadow: 0 6px 12px rgb(5 12 70 / .4); transition: transform .15s cubic-bezier(.3, 1.6, .5, 1); }
.race-side:nth-child(1) { transform: rotate(-1.4deg); } .race-side:nth-child(2) { transform: rotate(1.2deg); }
.race-side:not(:disabled):hover { transform: scale(1.04) rotate(-2deg); }
.race-side:disabled { cursor: default; color: var(--ink); }
.race.voted .race-side:not(.mine):not(.won) { filter: saturate(.55) brightness(.85); }
.race-side.mine { outline: 4px solid #fff; outline-offset: 2px; }
.race-side b { font: 32px/1 var(--display); font-weight: 400; }
.race-bar { display: flex; height: 16px; margin-top: 16px; border-radius: 9px; overflow: hidden; border: 3px solid var(--ink); }
.race-bar i { display: block; transition: width .5s cubic-bezier(.3, 1.4, .5, 1); }
.race-bar i:last-child { flex: 1; }
.race-note { margin: 10px 0 0; font-size: 17px; }

/* Shelf and table */
.wall-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px; margin: 38px 0 24px; scroll-margin-top: 20px; }
.wall-head h2 { font-size: clamp(38px, 6vw, 76px); color: var(--pink); transform: rotate(-1.5deg); }
.shelf { display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x proximity; padding: 12px 6px 16px; margin: 0 calc(-1 * clamp(16px, 4vw, 44px)); padding-inline: clamp(16px, 4vw, 44px); scrollbar-color: var(--marigold) transparent; }
.take { flex: 0 0 clamp(230px, 24vw, 280px); scroll-snap-align: start; transform: rotate(var(--tilt)); transition: transform .18s cubic-bezier(.3, 1.6, .5, 1); }
.take:hover { transform: rotate(0deg) translateY(-6px); }
.take-env { display: block; text-decoration: none; color: inherit; }
.take-check { margin: 12px 2px 2px; font-weight: 700; }
.take-count { margin: 0 2px; font-size: 16px; opacity: .85; }
.table { position: relative; margin-bottom: 20px; }
.table-card { position: absolute; left: 0; top: 0; width: var(--card-w, 270px); display: block; text-decoration: none; color: inherit; cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; will-change: transform; }
.table-card.held { cursor: grabbing; filter: drop-shadow(0 22px 18px rgb(5 12 70 / .5)); }
.table-card.dealing { transition: transform .75s cubic-bezier(.2, 1.1, .35, 1), opacity .2s; }
.table-card img { pointer-events: none; }
.table .env.is-open .env-flapwrap, .mine .env.is-open .env-flapwrap { transform: none; }
.watch { background: var(--ink); border-radius: 16px 12px 18px 10px; padding: 18px; margin: 22px auto 6px; max-width: 460px; }
.watch h3 { font-size: 26px; color: var(--marigold); margin-bottom: 10px; }
.watch p { margin: 4px 0 12px; }
.empty { background: rgb(255 255 255 / .12); border: 3px dashed #fff; border-radius: 16px; padding: 34px; max-width: 60ch; }

/* Writing */
.flow { max-width: 840px; margin: 0 auto; }
.flow h1 { font-size: clamp(54px, 9vw, 112px); color: var(--marigold); transform: rotate(-2deg); transform-origin: left bottom; margin-bottom: 16px; }
.flow h2 { font-size: clamp(36px, 6vw, 62px); color: var(--marigold); transform: rotate(-1.5deg); transform-origin: left bottom; margin-bottom: 18px; }
.steps { font: 17px var(--type); margin-bottom: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.chip { font: 700 19px/1.15 var(--hand); background: #fff; color: var(--ink); padding: 10px 15px; border-radius: 22px 18px 24px 16px; text-align: left; }
.chip:hover { background: var(--marigold); }
.say { background: var(--sheet); color: var(--ink); border-radius: 4px 14px 12px 14px; padding: 13px 18px; margin: 18px 0; max-width: 56ch; transform: rotate(-.6deg); }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; cursor: pointer; }
.check input { width: 24px; height: 24px; flex: none; margin-top: 2px; accent-color: var(--marigold); }
.actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-top: 26px; }

.desk-paper { background-color: var(--sheet); background-image: var(--tex-paper, none); background-size: 620px; background-blend-mode: multiply; color: var(--ink); padding: clamp(18px, 4vw, 40px); border-radius: 3px; box-shadow: 0 16px 34px rgb(5 12 70 / .5); transform: rotate(-.7deg); }
.desk-paper textarea { background: transparent; border: 0; min-height: 170px; font-size: 24px; padding: 0; resize: vertical; border-radius: 0; }
.desk-paper textarea:focus { outline: 0; }
.tools { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 8px; }
.tool { font: 400 19px/1 var(--display); padding: 12px 17px 14px; border-radius: 26px 20px 28px 18px; color: var(--ink); }
.tool:nth-child(1) { background: var(--pink); } .tool:nth-child(2) { background: var(--mint); } .tool:nth-child(3) { background: var(--sky); } .tool:nth-child(4) { background: var(--marigold); } .tool:nth-child(5) { background: var(--tomato); }
.tool:hover { transform: rotate(-3deg) scale(1.05); }
.taped { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 18px; }
.tape-item { position: relative; background: #fff; padding: 9px 9px 12px; box-shadow: 0 4px 12px rgb(0 0 0 / .28); max-width: 100%; color: var(--ink); }
.tape-item::before { content: ''; position: absolute; top: -11px; left: 50%; width: 76px; height: 24px; transform: translateX(-50%) rotate(-3deg); background: rgb(255 218 92 / .78); }
.tape-item:nth-child(even) { transform: rotate(1.8deg); } .tape-item:nth-child(odd) { transform: rotate(-1.6deg); }
.tape-item img, .tape-item video { display: block; max-width: 100%; max-height: 240px; }
.tape-item audio { width: 250px; max-width: 100%; display: block; }
.tape-item .rm { display: block; margin: 7px auto 0; color: var(--ink); font: 16px var(--hand); background: none; text-decoration: underline; }
.doodle-wrap { background: var(--sheet); padding: 12px; border-radius: 6px; margin-top: 16px; color: var(--ink); }
.doodle-wrap canvas { width: 100%; max-width: 620px; aspect-ratio: 3 / 2; background: #fff; touch-action: none; display: block; cursor: crosshair; border: 2px solid var(--ink); }
.pens { display: flex; flex-wrap: wrap; gap: 9px; margin: 10px 0; align-items: center; }
.pen { width: 34px; height: 34px; border-radius: 50%; border: 3px solid transparent; }
.pen[aria-pressed=true] { border-color: var(--ink); }
.rec-dot { display: inline-block; width: 15px; height: 15px; background: var(--tomato); border-radius: 50%; margin-right: 8px; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .2; } }

.dress { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(22px, 4vw, 46px); align-items: start; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 18px; }
.swatch { width: 46px; height: 46px; border-radius: 50%; border: 4px solid transparent; box-shadow: 0 0 0 2px rgb(255 255 255 / .55); }
.swatch[aria-pressed=true] { border-color: #fff; transform: scale(1.14); }
.field { margin-bottom: 15px; }
.field > span { display: block; margin-bottom: 5px; }

/* Ritual */
.ritual { position: relative; display: flex; flex-direction: column; align-items: center; min-height: 72vh; justify-content: center; text-align: center; overflow: visible; }
.ritual-stage { position: relative; width: min(92vw, 520px); margin-top: clamp(190px, 32vh, 270px); }
.ritual-title { font: clamp(32px, 6vw, 56px)/1.04 var(--display); color: var(--marigold); min-height: 2.1em; transform: rotate(-1.5deg); max-width: 17ch; position: relative; z-index: 12; text-shadow: 0 3px 0 var(--ink); }
.ritual-actions { min-height: 86px; margin-top: 32px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.env-sheet { position: absolute; left: 7%; right: 7%; top: -60%; height: 120%; z-index: 2; transition: top .8s cubic-bezier(.5, 0, .3, 1); transform-style: preserve-3d; perspective: 900px; }
.fold { position: absolute; left: 0; right: 0; height: calc(100% / 3); background-color: var(--sheet); background-image: var(--tex-paper, none); background-size: 460px; background-blend-mode: multiply; transition: transform .55s cubic-bezier(.5, 0, .2, 1), filter .55s; box-shadow: inset 0 0 12px rgb(30 20 60 / .14); }
.fold.a { top: 0; transform-origin: 50% 100%; z-index: 3; } .fold.b { top: calc(100% / 3); z-index: 1; } .fold.c { top: calc(200% / 3); transform-origin: 50% 0; z-index: 2; }
.env-sheet.folded-c .fold.c { transform: rotateX(178deg); filter: brightness(.9); }
.env-sheet.folded-a .fold.a { transform: rotateX(-178deg); filter: brightness(.95); }
.fold-lines { position: absolute; inset: 12% 10%; color: var(--ink); font: 700 4cqw/1.3 var(--hand); text-align: left; overflow: hidden; }
.env-sheet.in { top: -22%; }
.env-sheet.folded-a .fold-lines { opacity: 0; transition: opacity .2s .15s; }
.wax-grow { transition: transform .12s linear; transform-origin: center; }
.wax-grow.hidden-wax { opacity: 0; }
.hold { touch-action: none; user-select: none; -webkit-user-select: none; position: relative; overflow: hidden; }
.hold .fill { position: absolute; inset: 0 auto 0 0; width: 0; background: rgb(240 55 30 / .6); }
.hold span { position: relative; }
.stamp-tool { position: absolute; left: 50%; top: 56%; width: 21%; aspect-ratio: 1 / 2; z-index: 9; transform: translate(-50%, -135%); transition: transform .14s cubic-bezier(.7, 0, 1, .6); pointer-events: none; }
.stamp-tool::before { content: ''; position: absolute; left: 30%; right: 30%; top: 0; height: 66%; background: linear-gradient(90deg, #4c2a12, #99592a 40%, #5c3416); border-radius: 40% 40% 8% 8%; }
.stamp-tool::after { content: ''; position: absolute; left: 3%; right: 3%; bottom: 0; height: 37%; background: linear-gradient(90deg, #8d6b18, #f0cf63 40%, #8d6b18); border-radius: 12% 12% 50% 50% / 12% 12% 22% 22%; }
.stamp-tool.down { transform: translate(-50%, -57%); }
.shake { animation: shake .3s linear; }
@keyframes shake { 20% { transform: translate(-7px, 4px) rotate(-1deg); } 45% { transform: translate(6px, -4px) rotate(1deg); } 70% { transform: translate(-3px, 2px); } }
.jiggle { animation: jiggle .42s ease-in-out; }
@keyframes jiggle { 25% { transform: rotate(-4deg) translateX(-4px); } 60% { transform: rotate(4deg) translateX(5px); } 85% { transform: rotate(-1.5deg); } }
.big-postmark { position: absolute; right: -5%; top: -13%; z-index: 12; width: 39%; aspect-ratio: 1; border-radius: 50%; border: 5px double var(--ink); color: var(--ink); background: var(--marigold); display: flex; flex-direction: column; align-items: center; justify-content: center; font: clamp(12px, 2.8vw, 18px)/1.1 var(--type); transform: rotate(13deg); animation: slam .28s cubic-bezier(.3, 1.5, .5, 1); padding: 8px; }
@keyframes slam { 0% { transform: rotate(32deg) scale(3); opacity: 0; } }
.fly { transition: transform .9s cubic-bezier(.6, -.2, .7, .2), opacity .9s; transform: translateY(-120vh) rotate(-16deg) scale(.6); opacity: 0; }

/* Opening */
.opening { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 8px; }
.proof-slip { background: var(--sheet); background-image: var(--tex-paper, none); background-size: 400px; background-blend-mode: multiply; color: var(--ink); max-width: 500px; padding: 13px 20px 15px; font: 18px/1.32 var(--type); transform: rotate(-1.4deg); box-shadow: 0 8px 18px rgb(5 12 70 / .45); margin-bottom: clamp(26px, 6vh, 56px); }
.proof-slip strong { font: 25px/1.05 var(--display); display: block; margin-bottom: 5px; }
.open-stage { width: min(92vw, 540px); position: relative; }
.open-stage .env-seal { width: 27%; top: 44%; cursor: pointer; background: none; padding: 0; border-radius: 50%; }
.open-stage .env-seal:hover { transform: translate(-50%, -50%) scale(1.06); }
.crack-layer { position: absolute; inset: 0; pointer-events: none; }
.shard { position: absolute; inset: 0; background-size: 100% 100%; transition: transform .8s cubic-bezier(.2, .7, .4, 1), opacity .8s; }
.hint { font: clamp(26px, 4.5vw, 40px)/1.1 var(--display); color: var(--marigold); margin-top: 28px; transform: rotate(-1deg); }
.letter-reveal { width: min(100%, 720px); margin: 0 auto; animation: rise .9s cubic-bezier(.2, 1, .3, 1); position: relative; z-index: 2; }
@keyframes rise { from { transform: translateY(70vh) rotate(5deg); } }
.letter-paper { background-color: var(--sheet); background-image: var(--tex-paper, none); background-size: 620px; background-blend-mode: multiply; color: var(--ink); padding: clamp(22px, 5vw, 52px); box-shadow: 0 22px 44px rgb(5 12 70 / .55); transform: rotate(-.6deg); border-radius: 3px; }
.letter-paper h1 { font-size: clamp(32px, 6vw, 56px); color: var(--table); margin-bottom: 8px; }
.letter-ago { font: 18px var(--type); margin: 0 0 24px; }
.letter-text { font-size: 25px; line-height: 1.38; white-space: pre-wrap; overflow-wrap: anywhere; margin: 20px 0; }
.letter-link { font-size: 22px; font-weight: 700; color: var(--table); overflow-wrap: anywhere; display: block; margin: 16px 0; }
.letter-paper .tape-item { display: inline-block; margin: 18px 8px; }
.letter-paper .tape-item img, .letter-paper .tape-item video { max-height: 480px; }
.after { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; margin: 34px 0 16px; align-items: center; }
.receipts { max-width: 720px; margin: 22px auto 0; font: 16px/1.4 var(--type); }
.receipts a { overflow-wrap: anywhere; }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 20; width: 100%; height: 100%; }

.back-link { display: inline-block; font-size: 19px; text-underline-offset: 4px; padding: 8px 0; margin-bottom: 10px; }
.center-card .back-link, .opening-back { display: block; text-align: left; align-self: flex-start; }
.letter-reveal > .back-link { position: relative; z-index: 3; }

/* The phone wall */
.deck { max-width: 420px; margin: 0 auto; }
.deck-pile { position: relative; aspect-ratio: 3 / 2; margin: 18px 0 58px; }
.deck-card { position: absolute; inset: 0; display: block; color: inherit; text-decoration: none; touch-action: pan-y; user-select: none; -webkit-user-select: none; rotate: var(--tilt); translate: calc(var(--o) * 5px) calc(var(--o) * 7px); }
.deck-card img { pointer-events: none; }
.deck-nav, .race-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.deck-count { font: 17px var(--type); }
.race-nav, .swipe-hint { display: none; }

/* Lists */
.mine { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 42px 30px; margin-top: 24px; }
.mine-item p { margin: 14px 0 8px; font-size: 18px; }
.mine-actions { display: flex; flex-wrap: wrap; gap: 13px; align-items: center; }
.mine-actions .btn { font-size: 18px; padding: 11px 18px 13px; }
.center-card { max-width: 560px; margin: 2vh auto 0; text-align: center; }
.center-card h1 { font-size: clamp(40px, 7vw, 74px); color: var(--marigold); margin: 26px 0 14px; transform: rotate(-1.5deg); }
.center-card input { margin-bottom: 14px; }
.mail { background: var(--sheet); color: var(--ink); padding: 15px 18px; margin: 12px 0; border-radius: 4px; overflow-wrap: anywhere; white-space: pre-wrap; font-size: 18px; }
.mail strong { font: 20px var(--display); display: block; }

.chars-left { font: 400 16px/1.3 var(--hand); color: var(--marigold); margin: 8px 0 0; min-height: 1em; text-align: right; }
.maker-wrap { display: flex; justify-content: center; padding: 56px 16px 72px; }
.maker-front { background: none; padding: 0; font: inherit; color: inherit; }
.maker { background: var(--sheet); color: var(--ink); font: 400 17px/1.35 var(--hand); padding: 8px 16px 10px; border-radius: 3px; transform: rotate(-3deg); box-shadow: 0 3px 0 var(--ink); max-width: 34ch; transition: transform .25s; }
.maker:hover { transform: rotate(2deg) scale(1.05); }
.maker .maker-back { display: none; }
.maker.flipped { transform: rotate(1.5deg); }
.maker.flipped .maker-front { display: none; }
.maker.flipped .maker-back { display: inline; }
.maker a { color: inherit; font-weight: 700; }
/* iPhones only send a real click from things that look clickable, and music can only start on a click. */
@media (hover: none) { body { cursor: pointer; -webkit-tap-highlight-color: transparent; } }
.music-hint { position: fixed; left: 50%; bottom: 18px; translate: -50% 0; z-index: 28; background: var(--marigold); color: var(--ink); font: 400 17px/1 var(--display); padding: 11px 18px 13px; border-radius: 24px 18px 26px 16px; box-shadow: 0 4px 0 var(--ink); white-space: nowrap; pointer-events: none; animation: hint-bob 1.5s ease-in-out infinite; }
@keyframes hint-bob { 50% { transform: translateY(-5px) rotate(-1.5deg); } }

#toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, calc(100% + 40px)); visibility: hidden; background: var(--ink); color: #fff; padding: 11px 19px; border-radius: 22px; transition: transform .25s, visibility 0s .25s; z-index: 30; max-width: calc(100vw - 32px); }
#toast.show { transform: translate(-50%, 0); visibility: visible; transition: transform .25s; }

@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 12px; }
  .hero-env { max-width: 400px; width: 88%; margin: 16px auto 0; }
  .dress { grid-template-columns: 1fr; }
  .dress-preview { order: -1; }
  .top nav { font-size: 16px; }
  .logo { font-size: 21px; }
}
@media (max-width: 699px) {
  .wall-head { margin: 30px 0 16px; gap: 10px; }
  .pulse, .gift-cta, .desk-paper, .letter-paper { transform: none; }
  .pulse { position: relative; padding: 16px; }
  .stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 10px; text-align: center; }
  .stat b { display: block; margin: 0 0 2px; font-size: 36px; }
  .stat span { display: block; font-size: 15px; line-height: 1.1; }
  .live-dot { position: absolute; top: 12px; right: 12px; margin: 0; }
  .feed { font-size: 15px; min-height: 3.9em; }
  .countdown { margin-top: 26px; }
  .tickets { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; overflow: visible; padding: 4px 0; margin: 0; }
  .ticket { padding: 12px 14px; min-width: 0; }
  .ticket b { font-size: 28px; }
  .ticket-clock { font-size: 16px; }
  .ticket p { font-size: 16px; overflow-wrap: anywhere; }
  .take { flex-basis: 76vw; max-width: 320px; }
  .swipe-hint { display: block; margin: 0; font-size: 16px; opacity: .85; }
  .races .race { display: none; }
  .races .race.on { display: block; }
  .race-nav { display: flex; margin-top: 16px; }
  .race-side { min-height: 112px; }
  .big-postmark { right: 0; }
  .ritual { min-height: 0; justify-content: flex-start; padding-top: 10px; }
  .ritual-stage { margin-top: 46vw; }
  .ritual-title { min-height: 0; }
}
@media (max-width: 480px) {
  .top { padding-inline: 16px; gap: 8px; }
  .top nav { gap: 10px; }
  .top nav a { padding-block: 10px; }
  .logo { font-size: 18px; }
}
@media (max-width: 380px) {
  .top nav { gap: 8px; font-size: 15px; }
  .top nav a[href="/#wall"] { display: none; }
  .logo { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
.spam-tip { font-size: .9em; margin: 10px auto 0; max-width: 34em; }
.privacy { text-align: left; max-width: 640px; }
.privacy h2 { font: 24px/1.2 var(--display); color: var(--marigold); margin: 26px 0 6px; }
.privacy p { margin: 0 0 10px; }
.fine-print { text-align: center; margin: -48px 0 40px; font-size: 16px; opacity: .8; }
.see-all { display: flex; justify-content: center; margin: 18px 0 8px; }

/* On wide screens the live line sits beside the numbers, so the bar has no empty half. */
@media (min-width: 1000px) {
  .pulse { display: flex; align-items: center; gap: 32px; }
  .pulse .stats { flex: none; flex-wrap: nowrap; }
  .pulse .feed { flex: 1; margin: 0; padding-left: 28px; border-left: 2px dashed rgba(255, 255, 255, .25); }
}
a.hero-env { display: block; cursor: pointer; text-decoration: none; color: inherit; -webkit-tap-highlight-color: transparent; }
a.hero-env:hover { animation-play-state: paused; transform: rotate(3deg) scale(1.03); transition: transform .2s; }
a.hero-env:active { transform: rotate(3deg) scale(.98); }
p.demo-link { margin: 18px 0 0; font-weight: 700; }
.credit { text-align: center; margin: 34px 0 0; font-size: 16px; opacity: .85; }
