:root {
  color-scheme: light;
  --linen: #efe6da;
  --paper: #f8f2e9;
  --ink: #3f2d26;
  --mute: #8c7566;
  --line: #dccbb9;
  --rose: #c98499;
  --rose-deep: #a9657c;
  --sun: #d9a13a;
  --serif: "Cormorant Garamond", Georgia, serif;
  --body: "Jost", system-ui, sans-serif;
  --pixel: "Pixelify Sans", monospace;
  --weave: repeating-linear-gradient(0deg, rgb(63 45 38 / 0.035) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgb(63 45 38 / 0.03) 0 1px, transparent 1px 3px);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
/* A mouse drag over a photo starts a native image drag, which cancels our pointer drag. */
img { -webkit-user-drag: none; }

body {
  margin: 0;
  background: var(--weave), var(--linen);
  color: var(--ink);
  font: 400 1rem/1.5 var(--body);
}

[hidden] { display: none !important; }

.serif { font-family: var(--serif); font-style: italic; font-weight: 500; }
.pixel { font-family: var(--pixel); }
.emo { font-family: var(--body); font-size: 0.95em; }

button { font: inherit; color: inherit; min-height: 44px; min-width: 44px; }
:focus-visible { outline: 2px solid var(--rose-deep); outline-offset: 3px; }

.screen {
  min-height: 100dvh;
  padding: max(1.25rem, env(safe-area-inset-top)) max(1.25rem, env(safe-area-inset-right))
    max(1.25rem, env(safe-area-inset-bottom)) max(1.25rem, env(safe-area-inset-left));
  overflow-x: clip;
}

/* Screens share one grid cell so the reveal can run #inside under #box. */
main { display: grid; grid-template-columns: minmax(0, 1fr); }
main > .screen { grid-area: 1 / 1; }

#overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--weave), var(--linen);
}

/* gate */
#gate { position: relative; display: grid; place-items: center; }
#gate .petals { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
#gate .petal { position: absolute; width: clamp(5rem, 28vw, 12rem); height: auto; opacity: 0.4; pointer-events: none; }
.p1 { left: -6%; top: 14%; transform: rotate(20deg); }
.p2 { right: -4%; top: 8%; transform: rotate(-30deg); }
.p3 { right: 6%; bottom: 10%; transform: rotate(40deg); }
.p4 { left: 4%; bottom: 6%; transform: rotate(-12deg); }
.p5 { left: 38%; top: -5%; width: clamp(4rem, 20vw, 8rem); transform: rotate(8deg); }
/* Hidden until gate.js reveals it; the class comes from a head script so nothing flashes. */
.js-anim #gate .rv { visibility: hidden; }
#gate .tag {
  position: absolute;
  top: max(1.5rem, env(safe-area-inset-top));
  left: max(1.75rem, env(safe-area-inset-left));
  margin: 0; font-size: 0.75rem; color: var(--mute);
}
#gate-form {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 1.25rem;
  width: min(100%, 20rem);
  margin-top: -8vh;
}
#gate .name {
  margin: 0 0 -0.25rem; padding-bottom: 0.08em;
  font-size: clamp(2.6rem, 11vw, 4.4rem); line-height: 0.95; letter-spacing: -0.01em; color: var(--ink);
}
#gate .hint { font-size: clamp(0.875rem, 3.7vw, 0.95rem); letter-spacing: 0.03em; line-height: 1.4; text-align: center; text-wrap: balance; }
.field { position: relative; width: 100%; }
.rule { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--ink); transform-origin: left; }
#line {
  width: 100%; min-height: 44px;
  border: 0; border-radius: 0;
  background: transparent; color: var(--ink);
  font: 400 18px/1.4 var(--body); text-align: center;
}
#line:focus-visible { outline: none; }
.field:has(#line:focus-visible) .rule { background: var(--rose-deep); height: 3px; }
#open {
  padding: 0.6rem 1.4rem; border: 0; border-radius: 4px;
  background: var(--rose-deep); color: var(--paper);
  font-size: 0.85rem; cursor: pointer;
}
#open:disabled, #line:disabled { opacity: 0.6; }
#gate .miss { min-height: 1.3em; margin: 0; font-size: 0.8rem; color: var(--rose-deep); text-align: center; }
#gate-form .miss { order: 3; margin-top: -0.75rem; }
#open { order: 4; }

#gate-form.shake { animation: shake 300ms ease-in-out; }
@keyframes shake {
  20% { transform: translateX(-8px); }
  40% { transform: translateX(7px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(3px); }
}
@media (prefers-reduced-motion: reduce) { #gate-form.shake { animation: none; } }

/* variant b: a short chat column, the hint is received, the field is the reply */
#gate[data-variant="b"] #gate-form { align-items: stretch; width: min(100%, 22rem); margin-top: 0; gap: 0.75rem; }
#gate[data-variant="b"] .hint {
  align-self: flex-start; max-width: 80%; padding: 0.7rem 0.9rem;
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px 14px 14px 3px;
  text-align: left;
}
#gate[data-variant="b"] .field { align-self: flex-end; width: 85%; }
#gate[data-variant="b"] .rule { display: none; }
#gate[data-variant="b"] #line:focus-visible { outline: 2px solid var(--rose-deep); outline-offset: 3px; }
#gate[data-variant="b"] #line {
  width: 100%; padding: 0.5rem 0.9rem;
  border: 2px solid var(--rose); border-radius: 14px 14px 3px 14px;
  background: var(--paper); text-align: left;
}
#gate[data-variant="b"] .miss { order: 2; margin: 0; text-align: left; }
#gate[data-variant="b"] #open { align-self: flex-end; }

/* box. Lengths inside .stage are cqw, 1 design px at 412 wide = 0.2427cqw. */
:root { --drop: color-mix(in srgb, var(--ink) 28%, transparent); }
.sticker {
  filter: drop-shadow(3px 0 0 var(--paper)) drop-shadow(-3px 0 0 var(--paper)) drop-shadow(0 3px 0 var(--paper)) drop-shadow(0 -3px 0 var(--paper)) drop-shadow(0 var(--sy, 10px) var(--sb, 18px) var(--drop));
}
.paper {
  background: repeating-linear-gradient(0deg, color-mix(in srgb, var(--ink) 3%, transparent) 0 1px, transparent 1px 3px), var(--paper);
  border-radius: 2px;
}
#box, #inside { padding: 0; display: grid; justify-items: center; align-items: center; }
#box { z-index: 2; }
.stage {
  position: relative; overflow: clip; container-type: inline-size; --p: 0;
  width: min(100vw, calc(100dvh * 412 / 915)); aspect-ratio: 412 / 915;
}
#box .stage > *, #box .rig > * { position: absolute; margin: 0; }
#box .gift {
  left: 13.6cqw; top: 72.8cqw; width: 72.8cqw; height: auto;
  transform: translate(var(--gx, 0), var(--gy, 0)) rotate(var(--gr, -4deg));
}
#box .label {
  left: 68cqw; top: 134cqw; padding: 1.5cqw 2.4cqw;
  transform: translate(var(--gx, 0), var(--gy, 0)) rotate(5deg);
  box-shadow: 0 1cqw 1.5cqw var(--drop);
}
#box .label p { margin: 0; font-size: max(0.7rem, 2.7cqw); line-height: 1.3; white-space: nowrap; }
#box .hint { left: 0; right: 0; top: 165cqw; text-align: center; font-size: max(0.8rem, 3.2cqw); }
#box .rig { left: 38.3cqw; top: 119.4cqw; width: 29.1cqw; aspect-ratio: 721 / 705; --ux: 0; --uy: 1; }
#box[data-variant="b"] .rig { --ux: 1; --uy: 0; }
#box .bow {
  inset: 0; padding: 0; border: 0; background: none; cursor: grab; touch-action: none;
  transform: translate(calc(var(--p) * var(--ux) * 34cqw), calc(var(--p) * var(--uy) * 34cqw)) rotate(calc(14deg + var(--p) * 25deg));
}
#box .bow:active { cursor: grabbing; }
#box .bow img { display: block; width: 100%; height: auto; pointer-events: none; }
/* c: the whole box tilts and lifts with the drag */
#box[data-variant="c"] .gift {
  --gr: calc(-4deg - var(--p) * 6deg); --gy: calc(var(--p) * -3cqw);
}
#box.snap .bow, #box.snap .gift { transition: transform 180ms ease-out, opacity 180ms; }

#box.untied .hint { opacity: 0; transition: opacity 300ms; }
#box.untied .bow { transform: translateY(130cqw) rotate(60deg); transition: transform 400ms ease-in; }
#box.untied .gift, #box.untied .label {
  --gx: 3.4cqw; --gy: 120.6cqw; --gr: 12deg;
  transition: transform 600ms cubic-bezier(0.3, 0.7, 0.2, 1);
}
@media (prefers-reduced-motion: reduce) {
  #box.untied .bow { transform: translate(calc(var(--ux) * 34cqw), calc(var(--uy) * 34cqw)) rotate(39deg); opacity: 0; transition: opacity 400ms; }
  #box.untied .gift, #box.untied .label { transition: none; animation: fade-in 400ms; }
}
@keyframes fade-in { from { opacity: 0; } }

#box.untied.leave .gift, #box.untied.leave .label { --gy: 200cqw; transition-duration: 400ms; }
#box.untied.leave .bow { opacity: 0; transition: opacity 200ms; }
@media (prefers-reduced-motion: reduce) {
  #box.untied.leave { opacity: 0; transition: opacity 150ms; }
}

/* inside. Same cqw units as the box stage; every object keeps its spot from reveal to home. */
.soft { filter: drop-shadow(0 10px 18px color-mix(in srgb, var(--ink) 28%, transparent)); }
.crop { border-radius: 2px; box-shadow: 0 var(--sy, 10px) var(--sb, 18px) var(--drop); }
#inside .stage > * { position: absolute; margin: 0; }
#inside.rising .hello-text > *, #inside.rising .petal, #inside.rising #objects > * { visibility: hidden; }
main[data-step="birthday"] .homeline { visibility: hidden; }
main:not([data-step="birthday"]) .hello { display: none; }

.hello { inset: 0; pointer-events: none; }
.hello-text {
  position: absolute; left: 0; right: 0; top: 6cqw;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.hello-text p { margin: 0; }
.hello-text .serif { font-size: clamp(2.4rem, 10vw, 4rem); line-height: 1.05; }
#hello-sub { margin-top: 2.4cqw; font-size: max(0.8rem, 3.6cqw); color: var(--ink); }
.petal { position: absolute; opacity: 0.4; height: auto; }
.hello .petal:nth-of-type(1) { left: 76cqw; top: 8cqw; width: 22cqw; rotate: 25deg; }
.hello .petal:nth-of-type(2) { left: 2cqw; top: 22cqw; width: 20cqw; rotate: -20deg; }
.hello .petal:nth-of-type(3) { left: 78cqw; top: 30cqw; width: 18cqw; rotate: 50deg; }

.homeline { left: 0; right: 0; top: 30cqw; text-align: center; font-size: max(0.85rem, 3.6cqw); color: var(--mute); }

#objects { inset: 0; }
#objects > * { position: absolute; margin: 0; height: auto; }
#objects img { display: block; height: auto; }
.wrapped img, .zen img { width: 100%; }
#objects > img { rotate: var(--r, 0deg); }
.wrapped, .zen {
  padding: 0; border: 0; background: none; cursor: pointer;
  min-width: 0; min-height: 56px;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.wrapped { rotate: var(--r); }
.wrapped img, .zen img { transition: translate 160ms cubic-bezier(0.23, 1, 0.32, 1), filter 160ms, box-shadow 160ms; }
.wrapped:active img { scale: 0.97; }
@media (hover: hover) and (pointer: fine) {
  .wrapped:hover img { translate: 0 -4px; --sy: 14px; --sb: 24px; }
}

[data-keep="letter"] { left: 6cqw; top: 50cqw; width: 30cqw; --r: -6deg; }
[data-keep="movie"] { left: 60cqw; top: 52cqw; width: 30cqw; --r: 6deg; }
[data-keep="music"] { left: 31cqw; top: 84cqw; width: 38cqw; --r: -5deg; }
.pochita { left: 71cqw; top: 87cqw; width: 17cqw; --r: 8deg; }
[data-keep="dinner"] { left: 4cqw; top: 108cqw; width: 31cqw; --r: -3deg; }
[data-keep="cake"] { left: 56cqw; top: 106cqw; width: 40cqw; --r: 4deg; }
[data-keep="cup"] { left: 29cqw; top: 148cqw; width: 34cqw; --r: 4deg; }
.poodle { left: 4cqw; top: 146cqw; width: 26.7cqw; }
.zen { left: 68cqw; top: 143cqw; width: 29cqw; rotate: -4deg; }
.zzz { position: absolute; left: 62%; top: -5cqw; font-size: max(0.75rem, 3.9cqw); color: var(--mute); white-space: nowrap; pointer-events: none; }

/* keepsake overlay */
#overlay { width: 100%; overflow-x: clip; }
.panel { position: relative; display: flow-root; min-height: 100dvh; padding: 0; outline: none; }
.close {
  position: sticky; top: max(1rem, env(safe-area-inset-top)); z-index: 5;
  display: block; width: fit-content; height: 44px; margin: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) -44px auto;
  padding: 0 1rem; border: 0; border-radius: 4px;
  background: var(--rose-deep); color: var(--paper); font-size: 0.9rem; cursor: pointer;
}
.wrap {
  container-type: inline-size;
  width: min(100%, 26rem); min-height: calc(100dvh - max(1rem, env(safe-area-inset-top))); margin-inline: auto;
  padding: 4.5rem 1.5rem 2.5rem;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.5rem;
}
.wrap h2 { margin: 0; font-weight: 500; }
.wrap img { display: block; height: auto; }
.pixel-btn, .btns button {
  display: grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0 0.75rem;
  background: var(--paper); border: 2px solid var(--ink); border-radius: 6px; box-shadow: 0 3px 0 var(--ink);
  font-size: 0.8rem; cursor: pointer; touch-action: manipulation;
}
.btns button:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.btns button[aria-pressed="true"] { background: var(--rose-deep); color: var(--paper); }

/* letter */
.letter { gap: 0; }
.sheet-slot { position: relative; z-index: 1; width: min(100%, 22rem); }
.letter.opened { justify-content: flex-end; }
.letter .env { position: relative; z-index: 2; width: min(100%, 16.25rem); display: flex; flex-direction: column; align-items: center; gap: 0.75rem; }
.env-art { position: relative; width: 100%; }
.letter.opened .env { margin-top: -2.5rem; }
.env-img { width: 100%; rotate: -3deg; }
.seal {
  /* Centered on the wax seal baked into letter.webp (202, 268 of 380x560); 31% of the width is 80px at full size (72px left a pink rim). */
  position: absolute; left: 53.2%; top: 47.5%; width: 31%; min-width: 0; min-height: 56px; padding: 0; border: 0; background: none;
  translate: -50% -50%; cursor: grab; touch-action: none; filter: drop-shadow(0 2px 3px var(--drop));
}
.seal:active { cursor: grabbing; }
.seal img { width: 100%; pointer-events: none; }
.seal-half { position: absolute; width: 31%; pointer-events: none; filter: drop-shadow(0 2px 3px var(--drop)); }
/* 2% overlap keeps the seam from opening while the halves tilt. */
.seal-half.l { clip-path: inset(0 48% 0 0); }
.seal-half.r { clip-path: inset(0 0 0 48%); }
.seal-hint { margin: 0; font-size: 0.85rem; color: var(--mute); text-align: center; }
.sheet { padding: 2.2rem 1.5rem 3.4rem; box-shadow: 0 2cqw 4.4cqw var(--drop); transform-style: preserve-3d; }
.sheet h2 { margin-bottom: 1.25rem; font-size: clamp(2.4rem, 10vw, 3.4rem); line-height: 1; }
.sheet .body p { margin: 0 0 0.85rem; font: 500 20px/1.3 "Caveat", cursive; }
.sheet .sign { margin: 1.4rem 0 0; text-align: right; font: 500 20px/1.3 "Caveat", cursive; }
.sun { position: absolute; right: -0.5rem; top: -2.25rem; width: 90px; rotate: 8deg; pointer-events: none; }

/* dinner */
.card { position: relative; width: min(100%, 22rem); border: 1px solid var(--line); border-radius: 1.1rem; padding: 1.2rem; box-shadow: 0 3cqw 5.3cqw var(--drop); }
.reveal { position: relative; overflow: clip; border-radius: 0.6rem; min-height: 15rem; padding: 0.9rem 0.25rem 7.5rem; }
.reveal h2 { font-size: clamp(2.2rem, 9vw, 2.9rem); line-height: 1; margin-top: 1.4rem; }
.reveal .lines { margin-top: 1rem; max-width: 55%; }
.reveal .lines p { margin: 0 0 0.5rem; font-size: 0.85rem; line-height: 1.3; }
.tea { position: absolute; right: 0.4rem; bottom: 0.4rem; width: 120px; rotate: 4deg; }
.daisy { rotate: -10deg; }
.card > .daisy { position: absolute; left: -0.9rem; top: -1.4rem; width: 70px; pointer-events: none; }
.foil {
  position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 0.6rem;
  touch-action: none; cursor: crosshair; transition: opacity 500ms ease-out;
}
.foil.cleared { opacity: 0; pointer-events: none; }

/* movie */
.tix { position: relative; display: flex; width: min(calc(100% - 1.5rem), 24rem); translate: -0.5rem 0; --p: 0; --t: 0; filter: drop-shadow(0 0.6rem 0.6rem var(--drop)); }
.tix .stub { position: relative; padding: 0; border: 0; background: none; min-width: 0; min-height: 0; }
.tix .in { display: flex; height: 100%; --r: 0.55rem; }
.stub-l { flex: 1 1 auto; transform: translateX(calc(var(--p) * -4px - var(--t) * 4px)); }
.stub-r { flex: 0 0 26%; display: block; cursor: grab; touch-action: none; text-align: center;
  transform: translate(calc(var(--p) * 14px + var(--t) * 10px), calc(var(--p) * 3px + var(--t) * 3px)) rotate(calc(var(--p) * 3.5deg + var(--t) * 2.5deg)); }
.stub-r:active { cursor: grabbing; }
.tix .stub-l .in {
  --notch: radial-gradient(circle at 100% 0, transparent var(--r), #000 calc(var(--r) + 0.5px)), radial-gradient(circle at 100% 100%, transparent var(--r), #000 calc(var(--r) + 0.5px));
  -webkit-mask: var(--notch); -webkit-mask-composite: source-in; mask: var(--notch); mask-composite: intersect;
  border-radius: 2px 0 0 2px;
}
.tix .stub-r .in {
  display: block; position: relative; width: 100%; min-height: 100%;
  --notch: radial-gradient(circle at 0 0, transparent var(--r), #000 calc(var(--r) + 0.5px)), radial-gradient(circle at 0 100%, transparent var(--r), #000 calc(var(--r) + 0.5px));
  -webkit-mask: var(--notch); -webkit-mask-composite: source-in; mask: var(--notch); mask-composite: intersect;
  border-left: 2px dashed var(--line); border-radius: 0 2px 2px 0;
}
/* torn state: saw teeth on the two facing edges, built once as an SVG alpha mask */
.tix.ripping .stub-l .in {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='12'%3E%3Cpath d='M0 0V12L6 6Z'/%3E%3C/svg%3E") right top / 6px 12px repeat-y, linear-gradient(#000, #000) left top / calc(100% - 6px) 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='12'%3E%3Cpath d='M0 0V12L6 6Z'/%3E%3C/svg%3E") right top / 6px 12px repeat-y, linear-gradient(#000, #000) left top / calc(100% - 6px) 100% no-repeat;
  -webkit-mask-composite: source-over; mask-composite: add;
}
.tix.ripping .stub-r .in {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='12'%3E%3Cpath d='M6 0V12L0 6Z'/%3E%3C/svg%3E") left top / 6px 12px repeat-y, linear-gradient(#000, #000) right top / calc(100% - 6px) 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='12'%3E%3Cpath d='M6 0V12L0 6Z'/%3E%3C/svg%3E") left top / 6px 12px repeat-y, linear-gradient(#000, #000) right top / calc(100% - 6px) 100% no-repeat;
  -webkit-mask-composite: source-over; mask-composite: add;
  border-left-color: transparent;
}
.stub-l .in { gap: 0.9rem; padding: 0.9rem 0.8rem 0.9rem 0.9rem; min-height: 11.5rem; }
.poster { flex: 0 0 auto; width: clamp(4.5rem, 33%, 7.5rem); height: auto; align-self: stretch; object-fit: cover; rotate: -2deg; border-radius: 2px; box-shadow: 0 0.4rem 0.7rem var(--drop); }
.info { display: flex; flex-direction: column; min-width: 0; }
.info p { margin: 0; font-size: 0.8rem; line-height: 1.3; }
.info .adm { color: var(--rose-deep); }
.info h2 { margin: 0.5rem 0 auto; font-size: clamp(1.7rem, 7vw, 2.2rem); line-height: 1; overflow-wrap: anywhere; }
.info .when { margin-top: 0.8rem; }
.info .seat { color: var(--mute); margin-top: 0.3rem; }
.stub-r .in { padding: 0.9rem 0.3rem; }
.stub-r .rz { display: block; margin-top: 2.2rem; font-size: 0.75rem; }
.pin { position: absolute; left: 50%; top: 0.9rem; translate: -50% 0; width: 16px; height: 16px; border: 2px solid var(--rose-deep); border-radius: 50%; border-right-color: transparent; }
.pin::after { content: ""; position: absolute; right: -6px; top: -2px; width: 6px; height: 4px; background: var(--rose-deep); border-radius: 1px; }
.stub-r .dot { position: absolute; left: 0.45rem; width: 5px; height: 5px; border-radius: 50%; background: var(--rose); }
.stub-r .dot:nth-child(1) { top: 28%; } .stub-r .dot:nth-child(2) { top: 44%; } .stub-r .dot:nth-child(3) { top: 60%; }
.stub-r .daisy { position: absolute; right: -0.25rem; bottom: -0.1rem; width: 48px; rotate: 10deg; }
.tear-line { display: grid; margin: 0.75rem 0 0; font-size: 0.85rem; text-align: center; }
.tear-line > * { grid-area: 1 / 1; }
.tear-line .tear { color: var(--mute); }
.tear-line .note { visibility: hidden; }

/* music */
.music { gap: 1.25rem; }
.deck { position: relative; width: min(260px, 72cqw); }
.tape { width: 100%; rotate: 3deg; }
.deck .label { position: absolute; left: 50%; top: 52%; translate: -50% -50%; rotate: -2deg; padding: 0.5rem; box-shadow: 0 0.3rem 0.6rem var(--drop); }
.deck .cover { width: 56px; height: 56px; object-fit: cover; image-rendering: auto; }
.strip { width: 100%; padding: 1.1rem 1.2rem 0.8rem; box-shadow: 0 2cqw 4.4cqw var(--drop); }
.strip .np { font-size: 0.75rem; font-weight: 400; color: var(--mute); }
.strip .tr { margin: 0.4rem 0 0; font: 500 17px/1.2 var(--body); }
.strip .ar { margin: 0.2rem 0 0; font: 400 14px/1.2 var(--body); color: var(--mute); }
.bar { height: 6px; margin: 0.9rem 0; background: var(--line); border-radius: 3px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--rose); transform-origin: left; transform: scaleX(0); }
.btns { display: flex; gap: 0.7rem; }
.tl { margin: 0.9rem 0 0; padding: 0; list-style: none; }
.tl li { border-bottom: 1px solid var(--line); }
.tl button {
  display: flex; align-items: center; gap: 0.7rem; width: 100%; min-height: 44px; padding: 0.25rem 0.1rem;
  border: 0; background: none; text-align: left; font: 400 14px/1.2 var(--body); cursor: pointer;
}
.tl .th { flex: 0 0 28px; width: 28px; height: 28px; object-fit: cover; border-radius: 2px; background: var(--line); }
.tl .nm { flex: 1; min-width: 0; }
.tl .nm span { color: var(--mute); }
.tl button[aria-current="true"]::after { content: ""; flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--rose-deep); }

/* cake */
.slab { position: relative; width: min(260px, 72cqw); touch-action: none; cursor: grab; --p: 0; }
.slab img { width: 100%; pointer-events: none; }
.pieces { position: relative; }
.piece-l img { clip-path: polygon(0 0, 62.3% 0, 62.3% 100%, 0 100%); }
.piece-r { position: absolute; inset: 0; }
.piece-r img { clip-path: polygon(62% 0, 100% 0, 100% 100%, 62% 100%); }
.cut { position: absolute; top: 0; bottom: 0; left: calc(8% + var(--p) * 54%); border-left: 2px dashed var(--rose-deep); opacity: min(1, calc(var(--p) * 4)); pointer-events: none; }
.blue { position: absolute; left: 1.5rem; bottom: 3.5rem; width: 70px; rotate: -8deg; pointer-events: none; }
.cake { gap: 1.75rem; }
.cake h2, .cup h2 { font-size: 0.95rem; text-align: center; font-weight: 400; }
.wrap .hint { margin: 0; font-size: 0.85rem; color: var(--mute); text-align: center; }
/* Out of flow so the level meter keeps measuring against the mug alone. */
.cup .pour { margin-bottom: 1.25rem; }
.cup .pour .hint { position: absolute; left: 0; right: 0; top: 100%; margin-top: 0.4rem; }

/* cup */
.pour { position: relative; width: min(230px, 62cqw); margin-right: 3.5rem; }
.mug { display: block; width: 100%; padding: 0; border: 0; background: none; min-width: 0; min-height: 56px; touch-action: none; cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
.mug img { width: 100%; rotate: -3deg; pointer-events: none; }
.lvl { position: absolute; left: calc(100% + 1.1rem); top: 10%; width: 14px; height: 80%; border: 2px solid var(--ink); border-radius: 7px; background: var(--paper); overflow: hidden; }
.lvl i { position: absolute; inset: 0; background: var(--rose); transform-origin: 50% 100%; transform: scaleY(0); }
.steam { position: absolute; left: 28%; bottom: 74%; width: 50%; height: auto; overflow: visible; visibility: hidden; pointer-events: none; }
.steam path { fill: none; stroke: var(--mute); stroke-width: 1.5; stroke-linecap: round; stroke-dasharray: 1; }
.other { display: flex; align-items: center; gap: 0.75rem; align-self: flex-start; }
.other img { width: 90px; rotate: -6deg; }
.other p { margin: 0; font-size: 0.85rem; color: var(--mute); }

@media (hover: hover) and (pointer: fine) {
  body { cursor: url(stickers/pochita_cursor.png) 6 2, auto; }
}
@media (prefers-reduced-motion: reduce) {
  .foil { transition-duration: 150ms; }
}
