/* =====================================================================
   Pastel princess design system
   - one sans font (Inter) for reading; Caveat only for titles and 1–3 word labels
   - each section picks a pastel theme: --tint (background), --accent (buttons, links, AA on white),
     --accent-soft (chips, rings), --ink stays dark for readability
   ===================================================================== */
:root {
  --ink: #33243a; --ink-soft: #5e4d66; --white: #fff; --line: #ecdff0;
  --cherry: #d1123a;
  --pink-50: #fff6fa; --pink-100: #ffe4ef; --pink-300: #f9a8c9; --pink-700: #b02a66;
  --lilac-50: #faf6ff; --lilac-100: #efe7ff; --lilac-300: #c9b6f2; --lilac-700: #6643b0;
  --mint-50: #f3fbf7; --mint-100: #def5ea; --mint-300: #a6dec4; --mint-700: #23704f;
  --butter-50: #fffcef; --butter-100: #fff3c4; --butter-300: #ffe08a; --butter-700: #7a5c00;
  --sky-50: #f4f9ff; --sky-100: #e2efff; --sky-300: #a9cdf5; --sky-700: #275a91;
  --tint: var(--pink-50); --tint-2: var(--pink-100); --accent: var(--pink-700); --accent-soft: var(--pink-300);
  --radius: 22px; --radius-sm: 14px;
  --shadow: 0 2px 4px #4a2c5512, 0 12px 28px #4a2c551c;
  --font: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --hand: "Caveat", "Segoe Print", cursive;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; scroll-padding-bottom: 96px; overflow-x: hidden; overflow-x: clip; }
body { margin: 0; color: var(--ink); background: var(--pink-50); font: 400 1.0625rem/1.65 var(--font); overflow-x: hidden; overflow-x: clip; -webkit-font-smoothing: antialiased; }
img, video { max-width: 100%; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -80px; z-index: 100; background: var(--white); padding: 10px 16px; border-radius: 12px; box-shadow: var(--shadow); }
.skip:focus { top: 12px; }
[hidden] { display: none !important; }

/* icons: Fluent 3D (MIT) as images, sized in em so they follow the text */
.ico { width: 1.35em; height: 1.35em; vertical-align: -.3em; object-fit: contain; flex: none; }
.ico.lg { width: 2em; height: 2em; } .ico.xl { width: 3.2em; height: 3.2em; }

/* ---------------------------------------------------------------- themes */
section[data-theme] { background: var(--tint); box-shadow: 0 0 0 100vmax var(--tint); clip-path: inset(0 -100vmax); }
[data-theme="pink"]   { --tint: var(--pink-50);   --tint-2: var(--pink-100);   --accent: var(--pink-700);   --accent-soft: var(--pink-300); }
[data-theme="lilac"]  { --tint: var(--lilac-50);  --tint-2: var(--lilac-100);  --accent: var(--lilac-700);  --accent-soft: var(--lilac-300); }
[data-theme="mint"]   { --tint: var(--mint-50);   --tint-2: var(--mint-100);   --accent: var(--mint-700);   --accent-soft: var(--mint-300); }
[data-theme="butter"] { --tint: var(--butter-50); --tint-2: var(--butter-100); --accent: var(--butter-700); --accent-soft: var(--butter-300); }
[data-theme="sky"]    { --tint: var(--sky-50);    --tint-2: var(--sky-100);    --accent: var(--sky-700);    --accent-soft: var(--sky-300); }
/* a soft dotted sparkle on every themed section */
section[data-theme]::before { content: ""; position: absolute; inset: 0 -100vmax; z-index: -1; pointer-events: none; opacity: .6;
  background: radial-gradient(circle, var(--accent-soft) 1.4px, #0000 2px) 0 0 / 46px 46px; }

/* ---------------------------------------------------------------- layout + type */
section { position: relative; max-width: 880px; margin: 0 auto; padding: 72px 20px; text-align: center; }
h1, h2, h3 { line-height: 1.15; margin: 0; }
h2 { font: 700 clamp(2.3rem, 7vw, 3.1rem)/1.05 var(--hand); color: var(--accent); }
.sub { font: 600 1.35rem/1.2 var(--hand); color: var(--ink-soft); margin: 6px 0 32px; }
.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 36em; margin: 18px auto 0; }
.muted { color: var(--ink-soft); }
.label { font: 600 .82rem/1.3 var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); margin: 0; }
.hint { font-size: .95rem; color: var(--ink-soft); margin: 6px 0 14px; }
.quote { font-size: clamp(1.2rem, 3.6vw, 1.45rem); font-weight: 600; line-height: 1.45; margin: 10px 0 18px; }
.note { color: var(--ink-soft); margin: 12px 0 0; }
.msg { min-height: 1.6em; font-weight: 600; margin: 14px 0 0; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.row.center { justify-content: center; }
.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; text-align: left; }

/* ---------------------------------------------------------------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 22px; border: 0; border-radius: 999px;
  background: var(--accent); color: var(--white); font-weight: 700; text-decoration: none; box-shadow: 0 4px 0 color-mix(in srgb, var(--accent) 70%, #000), 0 8px 18px #0002; transition: transform .12s, box-shadow .12s; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 color-mix(in srgb, var(--accent) 70%, #000); }
.btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.btn.soft { background: var(--tint-2); color: var(--accent); box-shadow: 0 3px 0 var(--accent-soft); }
.btn.big { min-height: 56px; padding: 12px 28px; font-size: 1.1rem; }
.link { border: 0; background: none; color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; padding: 10px; min-height: 44px; }
.more-btn { margin: 22px auto 0; }

/* ---------------------------------------------------------------- lock */
#lock { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(circle at 20% 10%, var(--lilac-100), #0000 50%), radial-gradient(circle at 80% 90%, var(--mint-100), #0000 50%), var(--pink-100); transition: opacity 1s, transform 1s; }
#lock.gone { opacity: 0; transform: scale(1.06); pointer-events: none; }
.lock-card { max-width: 430px; width: 100%; text-align: center; padding: 34px 26px; }
.lock-card h1 { font: 700 2.4rem/1.05 var(--hand); color: var(--pink-700); margin: 10px 0 8px; }
#pw { width: 100%; margin: 14px 0; padding: 14px 16px; text-align: center; font-size: 1.15rem; border: 2px solid var(--pink-300); border-radius: 16px; background: var(--pink-50); }
#pw:focus { border-color: var(--pink-700); outline: none; box-shadow: 0 0 0 4px var(--pink-100); }
.lock-card .btn { width: 100%; }
#lockMsg { min-height: 1.5em; color: var(--pink-700); font-weight: 600; margin: 12px 0 0; }
.shake { animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }

/* ---------------------------------------------------------------- navigation */
.topnav { position: fixed; top: 0; left: 0; right: 0; z-index: 60; padding: 8px 0 8px env(safe-area-inset-left); background: #fff8; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line); transform: translateY(-110%); transition: transform .35s; }
.topnav.on { transform: none; }
.topnav ul { display: flex; gap: 6px; margin: 0; padding: 0 12px; list-style: none; overflow-x: auto; scrollbar-width: none; }
.topnav ul::-webkit-scrollbar { display: none; }
.topnav a { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; padding: 8px 14px; min-height: 44px; border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .92rem; background: #fff; box-shadow: 0 1px 0 var(--line); }
.topnav a[aria-current="true"] { background: var(--pink-700); color: #fff; }
.crumbs { position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 60; display: flex; align-items: center; gap: 4px; padding: 6px; border-radius: 999px;
  background: #fffe; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: var(--shadow); translate: -50% 0; transform: translateY(150%); transition: transform .35s; max-width: calc(100vw - 24px); }
.crumbs.on { transform: none; }
.crumbs > a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--pink-100); color: var(--pink-700); font-size: 1.5rem; font-weight: 700; text-decoration: none; flex: none; }
.crumb-path { display: flex; align-items: center; gap: 6px; padding: 0 8px; font-size: .92rem; white-space: nowrap; overflow: hidden; color: var(--ink-soft); }
.crumb-path a { color: var(--ink-soft); }
.crumb-path b { color: var(--ink); overflow: hidden; text-overflow: ellipsis; }

/* ---------------------------------------------------------------- hero + cake */
.hero { min-height: 100svh; display: grid; place-content: center; gap: 14px; padding-top: 40px;
  isolation: isolate; clip-path: inset(0 -100vmax); }
.hero::before { content: ""; position: absolute; inset: 0 -100vmax; z-index: -1; background: radial-gradient(ellipse 60% 50% at 25% 20%, var(--lilac-100), #0000), radial-gradient(ellipse 60% 50% at 75% 35%, var(--mint-100), #0000), radial-gradient(ellipse 80% 50% at 50% 100%, var(--pink-100), #0000), var(--pink-50); }
.hero-photo { width: min(220px, 56vw); aspect-ratio: 1; margin: 0 auto; border-radius: 50%; padding: 6px; background: conic-gradient(var(--pink-300), var(--lilac-300), var(--mint-300), var(--butter-300), var(--pink-300)); box-shadow: var(--shadow); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; border: 5px solid #fff; display: block; }
.kicker { font-weight: 600; letter-spacing: .1em; text-transform: uppercase; font-size: .82rem; color: var(--ink-soft); margin: 0; }
.hero-title { display: grid; gap: 2px; }
.hero-title span { font-size: clamp(1.1rem, 4vw, 1.4rem); font-weight: 600; color: var(--ink-soft); }
.hero-title b { font: 700 clamp(4rem, 19vw, 7.5rem)/.9 var(--hand); color: var(--pink-700); }
.cake-wrap { width: min(400px, 92vw); margin: 0 auto; }
.cake { width: 100%; height: auto; display: block; overflow: visible; }
.candle .flame { transform-box: fill-box; transform-origin: 50% 90%; animation: flicker .18s ease-in-out infinite alternate; }
.candle:nth-child(2n) .flame { animation-duration: .23s; }
.candle .smoke { opacity: 0; }
.candle.out .flame, .candle.out .halo { opacity: 0; transition: opacity .25s; }
.candle.out .smoke { animation: smoke 1.6s ease-out forwards; }
@keyframes flicker { from { transform: scale(1, 1) rotate(-2deg); } to { transform: scale(.92, 1.12) rotate(2deg); } }
@keyframes smoke { 0% { opacity: .7; transform: translateY(0); } 100% { opacity: 0; transform: translateY(-26px) scaleX(2.4); } }
#wish { font: 700 clamp(1.5rem, 5vw, 2rem)/1.2 var(--hand); color: var(--pink-700); min-height: 1.2em; margin: 6px 0 0; }
.scroll-hint { font: 700 1.3rem var(--hand); color: var(--ink-soft); text-decoration: none; animation: bob 2s infinite; justify-self: center; padding: 8px; }
@keyframes bob { 50% { transform: translateY(6px); } }

/* ---------------------------------------------------------------- letter */
.envelope { position: relative; width: min(360px, 100%); aspect-ratio: 3/2; margin: 0 auto 40px; border: 0; padding: 0; border-radius: 18px; display: block;
  background: linear-gradient(160deg, #fff, var(--sky-100)); box-shadow: var(--shadow); }
.envelope::before { content: ""; position: absolute; inset: 0 0 36% 0; border-radius: 18px 18px 0 0; background: linear-gradient(#fff, var(--pink-100)); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.envelope .seal { position: absolute; left: 50%; top: 64%; translate: -50% -50%; width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 40% 35%, #ff7aa2, #d63f7a 60%, #a3245a); box-shadow: 0 4px 12px #a3245a55; }
.envelope .tap { position: absolute; bottom: -34px; left: 0; right: 0; font: 700 1.3rem var(--hand); color: var(--accent); }
.letter { max-width: 640px; margin: 0 auto; padding: 34px clamp(20px, 5vw, 44px); font-size: 1.1rem; line-height: 1.75; animation: rise .8s ease-out; }
.letter h3 { font: 700 2.2rem var(--hand); color: var(--accent); margin: 0 0 14px; }
.letter .sign { font: 700 1.8rem var(--hand); color: var(--accent); text-align: right; margin: 0; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }

/* ---------------------------------------------------------------- timeline: see "story scrapbook" below */
}
#zoom { position: fixed; inset: 0; z-index: 95; background: #2a1830ee; display: grid; place-items: center; align-content: center; gap: 12px; padding: 16px; }
#zoom img { max-height: 80vh; border-radius: 16px; border: 6px solid #fff; }
#zoomCap { color: #fff; font-weight: 600; max-width: 34em; text-align: center; margin: 0; }
.zoom-close { position: absolute; top: 12px; right: 12px; width: 48px; height: 48px; border: 0; border-radius: 50%; background: #fff; font-size: 1.8rem; line-height: 1; }

/* ---------------------------------------------------------------- last year + clips */
.lastyear { max-width: 560px; margin: 0 auto; display: grid; gap: 16px; text-align: center; }
.lastyear blockquote { margin: 0; font-size: 1.15rem; font-weight: 600; font-style: italic; line-height: 1.55; }
.lastyear video { width: min(300px, 100%); margin: 0 auto; display: block; border-radius: 16px; }
.lastyear .lead { margin: 0 auto; }
.clips { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.clip { margin: 0; padding: 10px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.clip video { width: 100%; aspect-ratio: 9/16; object-fit: cover; border-radius: 14px; display: block; background: #000; cursor: pointer; }
.clip figcaption { font-weight: 600; font-size: .95rem; margin-top: 8px; }

/* ---------------------------------------------------------------- 22 cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.flip { display: block; width: 100%; perspective: 900px; height: 170px; border: 0; padding: 0; background: none; }
.flip-inner { display: block; position: relative; width: 100%; height: 100%; transition: transform .6s; transform-style: preserve-3d; }
.flip[aria-pressed="true"] .flip-inner { transform: rotateY(180deg); }
.face { position: absolute; inset: 0; backface-visibility: hidden; border-radius: var(--radius); display: grid; place-items: center; align-content: center; gap: 4px; padding: 14px; box-shadow: var(--shadow); }
.front { background: linear-gradient(150deg, var(--pink-100), var(--lilac-100)); color: var(--pink-700); font: 700 1.6rem var(--hand); }
.flip:nth-child(3n+2) .front { background: linear-gradient(150deg, var(--mint-100), var(--sky-100)); color: var(--mint-700); }
.flip:nth-child(3n) .front { background: linear-gradient(150deg, var(--butter-100), var(--pink-100)); color: var(--butter-700); }
.back { background: #fff; transform: rotateY(180deg); font-weight: 600; font-size: 1rem; line-height: 1.4; color: var(--ink); }

/* ---------------------------------------------------------------- element */
.element { display: inline-grid; width: 210px; height: 230px; padding: 16px 18px; text-align: left; grid-template-rows: auto 1fr auto auto; border-radius: var(--radius); background: #fff; box-shadow: 0 0 0 6px var(--mint-100), var(--shadow); }
.element .num { font-weight: 700; color: var(--ink-soft); }
.element .sym { font: 800 5.4rem/1 var(--font); color: var(--accent); align-self: center; letter-spacing: -.04em; }
.element small { color: var(--ink-soft); }

/* ---------------------------------------------------------------- open when */
.openwhen { display: grid; gap: 12px; max-width: 640px; margin: 0 auto; }
details { text-align: left; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); overflow: hidden; }
summary { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 14px 20px; cursor: pointer; font-weight: 700; font-size: 1.05rem; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; margin-left: auto; font-size: 1.5rem; color: var(--accent); transition: transform .2s; }
details[open] summary::after { transform: rotate(45deg); }
details[open] summary { background: var(--tint-2); }
details p { padding: 16px 22px 20px; margin: 0; white-space: pre-line; line-height: 1.7; }

/* ---------------------------------------------------------------- tabs + games */
.tabs { display: flex; gap: 8px; margin: 0 -20px 20px; padding: 4px 20px 10px; overflow-x: auto; scrollbar-width: none; justify-content: safe center; }
.tabs::-webkit-scrollbar { display: none; }
[role="tab"] { display: inline-flex; align-items: center; gap: 8px; flex: none; min-height: 48px; padding: 8px 16px; border: 2px solid #0000; border-radius: 999px; background: #fff; font-weight: 600; box-shadow: var(--shadow); }
[role="tab"][aria-selected="true"] { background: var(--accent); color: #fff; }
.game { display: none; } .game.on { display: block; animation: rise .35s ease-out; }
.game-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.bar { position: relative; height: 16px; border-radius: 999px; background: var(--tint-2); overflow: hidden; margin: 16px 0 6px; }
.bar.small { height: 10px; flex: 1 1 120px; margin: 0; max-width: 220px; }
.bar span { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--pink-300), var(--accent)); transition: width .8s ease-out; }
.bar-label { font-weight: 700; color: var(--accent); margin: 0; }
.scoreboard { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 0 0 22px; }
.score { display: grid; gap: 2px; padding: 10px 16px; border-radius: var(--radius-sm); background: #fff; box-shadow: var(--shadow); min-width: 150px; text-align: center; }
.score b { font-size: .95rem; } .score span { font-variant-numeric: tabular-nums; } .score small { color: var(--ink-soft); font-size: .8rem; }

/* kitchen */
.kit-screen { position: relative; max-width: 460px; margin: 0 auto; padding: 12px; border-radius: 28px; background: linear-gradient(170deg, var(--sky-100), var(--lilac-100) 50%, var(--pink-100)); box-shadow: inset 0 0 0 3px #fff, var(--shadow); }
.kit-hud { display: flex; align-items: center; gap: 8px; }
.kit-hud .bar.small { max-width: none; height: 12px; background: #fff; }
.pill { display: inline-flex; align-items: center; gap: 2px; padding: 4px 12px 4px 6px; border-radius: 999px; background: #fff; font-weight: 800; font-size: .95rem; color: var(--ink); box-shadow: 0 2px 0 #0000000f; white-space: nowrap; }
.pill .ico { width: 24px; height: 24px; }
.kit-trip { display: flex; align-items: center; gap: 8px; margin: 10px 4px 8px; }
.kit-trip .label { font-size: .75rem; flex: 0 1 auto; }
.kit-trip .bar.small { background: #fff9; }
.orders { display: flex; gap: 8px; margin: 0 0 10px; }
.order { flex: 1 1 0; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; padding: 8px; border-radius: 18px; background: #fffd; box-shadow: inset 0 0 0 2px var(--accent-soft); }
.order .customer { width: 50px; height: 50px; object-fit: contain; border-radius: 12px; background: #fff; box-shadow: var(--shadow); padding: 1px; }
.order .dish { width: 44px; height: 44px; }
.order .what { flex: 1 1 60px; min-width: 0; display: grid; line-height: 1.2; }
.order small { font-weight: 700; font-size: .85rem; overflow-wrap: anywhere; }
.order .pay { display: inline-flex; align-items: center; gap: 2px; font-size: .8rem; font-weight: 800; color: var(--butter-700); }
.order .pay .ico { width: 16px; height: 16px; }
.order .btn { flex: 1 0 100%; min-height: 44px; padding: 4px 12px; font-size: .95rem; }
.order.ready { box-shadow: inset 0 0 0 3px var(--mint-700); animation: glow 1.4s ease-in-out infinite; }
.kit-bar { display: flex; gap: 8px; margin-top: 10px; }
.kit-bar .btn.gen { flex: 1 1 0; min-width: 0; white-space: nowrap; min-height: 56px; margin: 0; font-size: 1rem; padding: 6px 10px; }
.kit-bar small { display: inline-flex; align-items: center; font-size: .8rem; font-weight: 800; opacity: .9; }
.kit-bar small .ico { width: 18px; height: 18px; }
.kit-bar .btn:disabled { opacity: .55; cursor: not-allowed; }
.kit-screen .msg { height: 2.9em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.45; text-align: center; margin: 8px 0 0; font-size: .95rem; }
.kit-screen .board { max-width: none; padding: 8px; background: #ffffffb0; }
.kit-screen .reveal { padding: 8px 0; }
.hint.center { text-align: center; margin-top: 12px; }
@keyframes glow { 50% { box-shadow: inset 0 0 0 3px var(--mint-700), 0 0 0 5px #23704f33; } }
.board { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; max-width: 440px; margin: 0 auto; padding: 10px; border-radius: var(--radius); background: var(--tint-2); touch-action: none; }
.cell { position: relative; aspect-ratio: 1; border: 0; padding: 4px; border-radius: 12px; background: #fff9; display: grid; place-items: center; box-shadow: inset 0 -3px 0 #0000000d; }
.cell img { width: 88%; height: 88%; object-fit: contain; pointer-events: none; transition: transform .15s; }
.cell.want { background: #fff; box-shadow: inset 0 0 0 3px var(--mint-300); }
.cell.sel { background: #fff; box-shadow: inset 0 0 0 3px var(--accent); }
.cell.sel img { transform: scale(1.12); }
.cell.over { background: var(--butter-100); }
.cell.popped img { animation: pop .35s cubic-bezier(.3, 1.8, .5, 1); }
.cell .lvl { position: absolute; right: 3px; bottom: 2px; font-size: .75rem; font-weight: 800; color: var(--accent); }
@keyframes pop { from { transform: scale(.3); } }
.ghost { position: fixed; z-index: 99; width: 64px; height: 64px; pointer-events: none; translate: -50% -60%; filter: drop-shadow(0 8px 10px #0004); }
.btn.gen { min-height: 60px; margin-top: 14px; font-size: 1.1rem; }
.reveal { text-align: center; }
.reveal img { width: min(320px, 100%); border-radius: 18px; border: 8px solid #fff; box-shadow: var(--shadow); rotate: -2deg; margin: 8px 0 12px; }

/* gaby sort */

/* who said it */
.streak { margin: 0; font-weight: 800; color: var(--accent); display: inline-flex; align-items: center; gap: 4px; }
.btn.who { min-width: 130px; font-size: 1.1rem; }
.btn.who.efe { --accent: var(--sky-700); }
.btn.who.right { --accent: var(--mint-700); } .btn.who.wrong { --accent: #8a8a8a; }

/* memory */
.memory { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; max-width: 460px; margin: 10px auto; }
.mcard { aspect-ratio: 1; border: 0; padding: 0; border-radius: 14px; overflow: hidden; background: linear-gradient(150deg, var(--lilac-300), var(--pink-300)); display: grid; place-items: center; }
.mcard img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity .3s; }
.mcard::after { content: "?"; position: absolute; font: 700 2rem var(--hand); color: #fff; }
.mcard { position: relative; }
.mcard.up::after, .mcard.done::after { content: none; }
.mcard.up img, .mcard.done img { opacity: 1; }
.mcard.done { box-shadow: 0 0 0 3px var(--mint-700); }

/* teleport */
.teleport { width: 210px; height: 210px; border-radius: 50%; border: 0; margin: 16px auto 0; display: grid; place-items: center; touch-action: none; user-select: none; -webkit-user-select: none;
  background: conic-gradient(var(--accent) var(--p, 0%), var(--tint-2) 0); box-shadow: var(--shadow); }
.teleport span { width: 170px; height: 170px; border-radius: 50%; display: grid; place-items: center; align-content: center; gap: 4px; background: #fff; font-weight: 700; line-height: 1.2; padding: 16px; }
#g-tp { text-align: center; }

/* ---------------------------------------------------------------- our little life */
.add { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin: 4px 0 20px; }
.add label { flex: 1 1 160px; display: grid; gap: 4px; font-size: .85rem; font-weight: 600; color: var(--ink-soft); }
.add input { width: 100%; min-height: 48px; padding: 10px 14px; border: 2px solid var(--line); border-radius: 14px; background: var(--tint); font-size: 1rem; color: var(--ink); }
.add input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 4px var(--tint-2); }
.items { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.items li { position: relative; display: grid; gap: 6px; padding: 16px 52px 16px 16px; border-radius: var(--radius-sm); background: var(--tint); }
.items li b { font-size: 1.1rem; }
.items li small { color: var(--ink-soft); }
.items li.done b { text-decoration: line-through; color: var(--ink-soft); }
.items li.empty { text-align: center; color: var(--ink-soft); padding: 20px; }
.items .del { position: absolute; right: 8px; top: 8px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: #fff; color: var(--ink-soft); font-size: 1.3rem; }
.items .tick { justify-self: start; min-height: 40px; border: 2px solid var(--accent-soft); background: #fff; border-radius: 999px; padding: 4px 14px; color: var(--accent); font-weight: 600; font-size: .9rem; }
.stars { display: grid; gap: 8px; margin-top: 4px; }
.star-row { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; padding: 8px 12px; border-radius: 12px; background: #fff; }
.star-row .who { font-weight: 700; font-size: .9rem; min-width: 110px; }
.star-row.gabi .who { color: var(--pink-700); } .star-row.efe .who { color: var(--sky-700); }
.star-row .note { flex-basis: 100%; }
input.note { min-height: 44px; padding: 8px 12px; border: 2px solid var(--line); border-radius: 12px; font-size: .95rem; }
q.note { font-style: italic; color: var(--ink-soft); }
.star { color: #d8cddc; font-size: 1.35rem; line-height: 1; }
button.star { border: 0; background: none; padding: 0; min-width: 40px; min-height: 40px; }
.star.on { color: #f2a900; }
.avg { font-weight: 700; color: var(--accent); }
#lifeMsg { min-height: 1.4em; color: var(--accent); font-weight: 600; margin-top: 12px; }
.picker { text-align: center; padding: 8px 0 20px; margin-bottom: 18px; border-bottom: 2px solid var(--line); }

/* ---------------------------------------------------------------- coupons */
.coupons { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.coupon { position: relative; display: grid; gap: 10px; align-content: start; min-height: 170px; padding: 22px 20px; border: 0; border-radius: var(--radius); text-align: left; cursor: pointer;
  background: radial-gradient(circle at 0 50%, var(--tint) 12px, #0000 13px), radial-gradient(circle at 100% 50%, var(--tint) 12px, #0000 13px), linear-gradient(150deg, #fff, var(--pink-100)); box-shadow: var(--shadow); }
.coupon:nth-child(3n+2) { background: radial-gradient(circle at 0 50%, var(--tint) 12px, #0000 13px), radial-gradient(circle at 100% 50%, var(--tint) 12px, #0000 13px), linear-gradient(150deg, #fff, var(--lilac-100)); }
.coupon:nth-child(3n) { background: radial-gradient(circle at 0 50%, var(--tint) 12px, #0000 13px), radial-gradient(circle at 100% 50%, var(--tint) 12px, #0000 13px), linear-gradient(150deg, #fff, var(--mint-100)); }
.coupon .title { font-weight: 700; font-size: 1.08rem; line-height: 1.35; }
.coupon small { color: var(--ink-soft); }
.coupon .code { justify-self: start; padding: 8px 14px; border-radius: 12px; border: 2px dashed var(--accent); font: 800 1.1rem/1 ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: .08em; color: var(--accent); background: #fff; }
.coupon .tapme { font-weight: 600; color: var(--accent); }
.coupon.used { filter: grayscale(.5); opacity: .8; }
.coupon.used::after { content: "REDEEMED"; position: absolute; right: 14px; top: 14px; padding: 4px 10px; border: 3px solid var(--mint-700); border-radius: 8px; color: var(--mint-700); font-weight: 800; font-size: .8rem; rotate: 8deg; }

/* ---------------------------------------------------------------- music */
.music { max-width: 560px; margin: 0 auto; display: grid; gap: 18px; }
.player-row { display: flex; align-items: center; gap: 18px; }
.player-row p { margin: 0; }
.record { flex: none; width: 92px; height: 92px; border-radius: 50%; border: 0; padding: 0; background: radial-gradient(circle, var(--accent) 0 22%, #222 23% 26%, #2d2d2d 27% 100%); box-shadow: var(--shadow); }
.record::after { content: ""; display: block; width: 100%; height: 100%; border-radius: 50%; background: repeating-radial-gradient(circle, #0000 0 3px, #ffffff12 3px 4px); }
.record.playing { animation: spin 2.5s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.tracks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tracks button { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 14px; border: 0; border-radius: 14px; background: var(--tint); text-align: left; }
.tracks button[aria-current="true"] { background: var(--accent); color: #fff; }
.tracks small { display: block; opacity: .75; font-size: .82rem; }
.spot { width: 100%; height: 152px; border: 0; border-radius: 14px; }

/* ---------------------------------------------------------------- stickers */
.falling { position: fixed; top: -60px; font-size: 1.8rem; pointer-events: none; z-index: 80; animation: fall linear forwards; }
.falling.sticker, .falling.ico { width: 60px; height: 60px; object-fit: contain; }
@keyframes fall { to { transform: translateY(115vh) rotate(540deg); } }
.pop { position: fixed; right: 14px; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 85; display: flex; align-items: flex-end; gap: 8px; pointer-events: none; animation: popin .4s cubic-bezier(.3, 1.6, .5, 1) both; }
.pop img { width: 180px; height: 180px; object-fit: contain; border-radius: 22px; background: #fff; padding: 6px; box-shadow: var(--shadow); }
.pop span { order: -1; margin-bottom: 120px; padding: 8px 14px; border-radius: 16px 16px 4px 16px; background: #fff; box-shadow: var(--shadow); font: 700 1.4rem var(--hand); color: var(--ink); }
@keyframes popin { from { transform: translateY(160px) rotate(12deg); } }
.peek { position: absolute; top: 8px; width: 156px; height: 156px; border: 0; padding: 0; background: none; z-index: 3; transition: transform .3s; filter: drop-shadow(0 6px 8px #0003); }
.peek img { width: 100%; height: 100%; object-fit: contain; }
.peek:hover { transform: scale(1.08) rotate(-4deg); }
.peek.l { left: 4px; rotate: -10deg; } .peek.r { right: 4px; rotate: 8deg; }
.peek.boing { animation: boing .6s; }
@keyframes boing { 30% { transform: scale(1.25) rotate(12deg); } 60% { transform: scale(.92) rotate(-8deg); } }
.peek-say { position: absolute; top: calc(100% + 6px); white-space: nowrap; padding: 6px 12px; border-radius: 14px; background: #fff; box-shadow: var(--shadow); font: 700 1.25rem var(--hand); color: var(--ink); rotate: 0deg; }
.peek.l .peek-say { left: 0; } .peek.r .peek-say { right: 0; }
@media (max-width: 600px) { .peek { width: 112px; height: 112px; top: 4px; } .pop img { width: 140px; height: 140px; } section { padding-top: 124px; } .hero { padding-top: 40px; } }

footer { display: grid; justify-items: center; gap: 18px; text-align: center; padding: 40px 16px 120px; font: 700 1.7rem var(--hand); color: var(--pink-700); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media (forced-colors: active) { .btn, [role="tab"], .card, .coupon, .cell, .shelf, .flip, .mcard, .clip-snd, .snap, .chip, .tool, .switch { border: 2px solid CanvasText; } .hero-title span { text-shadow: none; line-height: 1.2; } }

/* ---------------------------------------------------------------- added with the app.js rewrite */
.ico.emoji { display: inline-block; width: auto; font-size: 1.15em; line-height: 1; }
.ico.dim { filter: grayscale(1); opacity: .35; }
.items .del.sure { width: auto; padding: 0 12px; border-radius: 999px; background: var(--pink-700); color: #fff; font-size: .85rem; font-weight: 700; }
.order .dish { object-fit: contain; }
@media (min-width: 900px) { .tabs { flex-wrap: wrap; justify-content: center; overflow: visible; } }

/* ---------------------------------------------------------------- accessibility audit fixes */
.cell.want { box-shadow: inset 0 0 0 3px var(--mint-700); }
.cell.want::after { content: "★"; position: absolute; left: 4px; top: 1px; font-size: .8rem; color: var(--mint-700); }
.star { color: #9a8aa3; }
.star.on { color: #b07a00; }
.mcard::after { color: var(--ink); }
.mcard.done { outline: 3px solid var(--mint-700); outline-offset: -3px; }
.crumb-path a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; }
.items .del, button.star { min-width: 44px; min-height: 44px; }
.items .del { width: 44px; height: 44px; }
.items .tick { min-height: 44px; }

/* ---------------------------------------------------------------- the Gabi dictionary */
.words { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; text-align: left; }
.word { padding: 18px 20px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); border-top: 6px solid var(--butter-300); }
.word:nth-child(3n+2) { border-top-color: var(--pink-300); } .word:nth-child(3n) { border-top-color: var(--mint-300); }
.word h3 { margin: 0; font: 700 2rem/1.1 var(--hand); color: var(--accent); }
.word small { font-style: italic; color: var(--ink-soft); }
.word p { margin: 8px 0; }
.word q { display: block; font-size: .92rem; color: var(--ink-soft); }

/* ---------------------------------------------------------------- date kinds, guide, places */
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 12px 0; }
.chip { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 4px 14px 4px 8px; border: 2px solid var(--accent-soft); border-radius: 999px; background: #fff; font-weight: 600; font-size: .9rem; }
.chip .ico { width: 24px; height: 24px; }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip:disabled { opacity: .5; }
.add select { width: 100%; min-height: 48px; padding: 10px 12px; border: 2px solid var(--line); border-radius: 14px; background: var(--tint); font: inherit; font-size: 1rem; color: var(--ink); }
.items li b .ico { width: 24px; height: 24px; vertical-align: -5px; }

/* ---------------------------------------------------------------- 17 Nov: nav button, cake depth, full screen games, Cherrypie Express */
.nav-toggle { position: fixed; top: calc(10px + env(safe-area-inset-top)); right: 12px; z-index: 63; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 16px; border: 0; border-radius: 999px;
  background: #fffe; color: var(--pink-700); font-weight: 700; box-shadow: var(--shadow); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); transform: translateY(-160%); transition: transform .35s; }
.nav-toggle.on { transform: none; }
.nav-toggle span { font-size: 1.2rem; line-height: 1; }
.topnav { z-index: 62; }
.topnav ul { padding-right: 120px; }
body.game-full { overflow: hidden; }
body.game-full .crumbs, body.game-full .nav-toggle, body.game-full .topnav { display: none; }

.cake { filter: drop-shadow(0 22px 22px #6b2a4a2e); }
.cake-wrap { perspective: 900px; }
.cake-wrap .cake { animation: cakefloat 6s ease-in-out infinite; transform-origin: 50% 80%; }
@keyframes cakefloat { 50% { transform: translateY(-6px) rotateX(4deg); } }

.word { position: relative; }
.word-stickers { position: absolute; right: 10px; top: -18px; display: flex; }
.word-stickers .ico { width: 54px; height: 54px; filter: drop-shadow(0 4px 5px #0003); rotate: 10deg; }
.word-stickers .ico + .ico { width: 40px; height: 40px; margin-left: -12px; margin-top: 22px; rotate: -12deg; }
.word h3 { padding-right: 90px; }

.shuffle { justify-self: start; min-height: 44px; }
.to-top { font-family: var(--font); font-size: 1rem; }
footer p { margin: 0; }

.game-tools { display: flex; justify-content: flex-end; gap: 8px; margin: -8px -8px 12px; }
.tool { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 14px; border: 0; border-radius: 999px; background: var(--tint-2); color: var(--accent); font-weight: 700; font-size: .9rem; }
.tool .ico { width: 22px; height: 22px; }
.tool .glyph { font-size: 1.15rem; line-height: 1; }
.game.full { position: fixed; inset: 0; z-index: 70; overflow: auto; overscroll-behavior: contain; border-radius: 0; margin: 0; padding: max(14px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom));
  background: radial-gradient(circle at 15% 10%, var(--lilac-100), #0000 45%), radial-gradient(circle at 90% 90%, var(--pink-100), #0000 45%), var(--tint); animation: none; }
.game.full .game-tools { margin: 0 auto 12px; max-width: 640px; }
.game.full .kit-screen { max-width: min(560px, 100%); }
.game.full .memory { max-width: min(560px, 70vh); }

/* Cherrypie Express: a little game console inside the page */
#g-kit { padding: 18px; }
.kit-screen { padding: 14px; border-radius: 30px; background: linear-gradient(175deg, #bfe3ff, #e9ddff 45%, #ffd9ea); box-shadow: inset 0 0 0 4px #fff, inset 0 -6px 0 #0000000d, 0 10px 0 #d9b8e6, var(--shadow); }
.kit-logo { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0 2px 10px; }
.kit-badge { position: relative; flex: none; width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #ff8fb1, var(--cherry) 70%); box-shadow: inset 0 -4px 0 #0003, 0 4px 0 #8f0d2a, 0 8px 14px #d1123a55; rotate: -6deg; }
.kit-badge .ico { width: 38px; height: 38px; }
.kit-badge .plane { position: absolute; right: -12px; top: -10px; width: 30px; height: 30px; animation: hover 2.4s ease-in-out infinite; }
@keyframes hover { 50% { transform: translate(3px, -4px) rotate(6deg); } }
.kit-name { display: grid; line-height: .85; text-align: left; flex: 1; }
.kit-name b { font: 700 2.1rem var(--hand); color: var(--cherry); text-shadow: 2px 2px 0 #fff, -2px 2px 0 #fff, 2px -2px 0 #fff, -2px -2px 0 #fff, 0 5px 0 #f4a3bd; }
.kit-name i { font-style: normal; font-weight: 800; font-size: .78rem; letter-spacing: .32em; text-transform: uppercase; color: var(--sky-700); margin-left: 4px; }
.map-btn { border: 0; min-height: 44px; cursor: pointer; }
.kit-howto { margin: 0 4px 10px; font-size: .88rem; line-height: 1.4; color: var(--ink-soft); text-align: left; }
.kit-screen .board { background: repeating-linear-gradient(45deg, #fff7ec 0 14px, #fff0de 14px 28px); box-shadow: inset 0 0 0 3px #fff, inset 0 -5px 0 #0000000f; }
.kit-screen .cell { background: #fffc; box-shadow: inset 0 -4px 0 #0000001a, 0 1px 0 #fff; }
.btn.fly { min-height: 64px; padding: 10px 26px; font-size: 1.2rem; gap: 12px; background: linear-gradient(180deg, #3f8fd8, var(--sky-700)); box-shadow: 0 5px 0 #1b3f66, 0 10px 22px #275a9155; }
.btn.fly .ico { width: 36px; height: 36px; }
.btn.fly .plane { animation: hover 2.4s ease-in-out infinite; }
.kit-map { position: absolute; inset: 0; z-index: 5; display: grid; align-content: center; justify-items: center; gap: 10px; padding: 16px; border-radius: 30px; background: #fffffff2; text-align: center; animation: rise .3s ease-out; }
.kit-map svg { width: 100%; height: auto; border-radius: 22px; box-shadow: var(--shadow); }
.kit-map-title { margin: 0; font: 700 2rem var(--hand); color: var(--sky-700); }
.kit-map-msg { margin: 0; min-height: 1.5em; font-weight: 700; }
.leg { stroke: #ffffffcc; stroke-width: 4; stroke-dasharray: 2 9; }
.leg.done { stroke: var(--cherry); stroke-dasharray: none; opacity: .7; }
.leg.flight { stroke: var(--cherry); stroke-width: 4; }
.pin circle { fill: #fff; stroke: var(--lilac-300); stroke-width: 3; }
.pin.here circle { stroke: var(--cherry); stroke-width: 4; }
.pin.done circle { stroke: var(--mint-700); }
.pin text { font: 800 12px var(--font); fill: var(--ink); paint-order: stroke; stroke: #fff; stroke-width: 4px; }
#kitPlane image { filter: drop-shadow(0 4px 3px #0004); }
body.game-full #games { clip-path: none; z-index: 70; } /* the section clip would cut the fixed game and let later sections paint over it */

/* Gaby sort: a shelf-stocking console (same frame language as Cherrypie Express) */
.sg-screen { --s: 48px; position: relative; max-width: 780px; margin: 0 auto; padding: 14px; border-radius: 30px; background: linear-gradient(175deg, #bfe3ff, #e9ddff 45%, #ffd9ea); box-shadow: inset 0 0 0 4px #fff, inset 0 -6px 0 #0000000d, 0 10px 0 #d9b8e6, var(--shadow); }
.game.full .sg-screen { --s: clamp(46px, 7.2vw, 70px); max-width: min(1000px, 100%); }
@media (max-width: 520px) { .sg-screen { --s: 32px; padding: 10px; border-radius: 24px; } }
.sg-logo { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 0 2px 10px; }
.sg-badge { position: relative; flex: none; width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, var(--butter-300), #f59a1f 70%); box-shadow: inset 0 -4px 0 #0003, 0 4px 0 #b4690c, 0 8px 14px #f59a1f55; rotate: -6deg; }
.sg-badge .ico { width: 40px; height: 40px; }
.sg-badge .star { position: absolute; right: -12px; top: -10px; width: 28px; height: 28px; animation: hover 2.4s ease-in-out infinite; }
.sg-name { display: grid; line-height: .85; text-align: left; }
.sg-name b { font: 700 2.3rem var(--hand); color: var(--lilac-700); text-shadow: 2px 2px 0 #fff, -2px 2px 0 #fff, 2px -2px 0 #fff, -2px -2px 0 #fff, 0 5px 0 #cbb8f1; }
.sg-name i { font-style: normal; font-weight: 800; font-size: .78rem; letter-spacing: .32em; text-transform: uppercase; color: var(--sky-700); margin-left: 4px; }
.sg-playing .sg-logo { zoom: .7; margin-bottom: 4px; }
.sg-howto { margin: 14px auto 0; max-width: 34em; padding: 12px 16px; border-radius: 18px; background: #ffffffc0; font-size: .95rem; line-height: 1.5; }
.sg-path { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 4px auto 18px; max-width: 30em; padding: 12px; border-radius: 20px; background: #ffffffa0; box-shadow: inset 0 -4px 0 #0000000d; }
.sg-lvl { width: 40px; height: 40px; border: 0; border-radius: 50%; font: 800 .95rem var(--font); background: #e6e0ee; color: #6f6379; box-shadow: inset 0 -3px 0 #0000001a; }
.sg-lvl:disabled { cursor: not-allowed; }
.sg-lvl.done { background: var(--mint-300); color: var(--mint-700); cursor: pointer; }
.sg-lvl.cur { background: var(--pink-700); color: #fff; box-shadow: 0 3px 0 #7d1b48, 0 0 0 4px #fff; cursor: pointer; animation: sgPulse 1.6s ease-in-out infinite; }
@keyframes sgPulse { 50% { scale: 1.12; } }
.sg-hud { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin-bottom: 10px; }
.sg-stars { display: inline-flex; padding: 2px 8px; border-radius: 999px; background: #fff; box-shadow: 0 2px 0 #0000000f; }
.sg-stars .ico { width: 24px; height: 24px; }
.sg-stage { position: relative; }
.sg-shelves { display: grid; grid-template-columns: repeat(auto-fit, calc(var(--s) * 3 + 34px)); justify-content: center; gap: 18px 12px; padding: 4px 0 10px; }
.sg-shelf { position: relative; display: grid; gap: 4px; padding: 8px 8px 0; border-radius: 14px 14px 6px 6px; background: linear-gradient(#fff6e6, #fbe2bf); box-shadow: inset 0 0 0 3px #e9c999, inset 0 10px 14px #0000001c; transition: box-shadow .15s, background .15s; }
.sg-shelf.can { box-shadow: inset 0 0 0 3px var(--mint-700), inset 0 10px 14px #0000001c; background: linear-gradient(#f0fff6, #d6f6e2); }
.sg-shelf.over { box-shadow: inset 0 0 0 4px var(--accent), inset 0 10px 14px #0000001c; }
.sg-back { display: flex; justify-content: center; align-items: center; gap: 4px; height: calc(var(--s) * .5); }
.sg-mini { width: calc(var(--s) * .42); height: calc(var(--s) * .42); padding: 2px; border-radius: 8px; background: #fff9; opacity: .55; filter: saturate(.7) brightness(.96); }
.sg-mini > * { width: 100%; height: 100%; object-fit: contain; display: block; }
.sg-row { display: flex; justify-content: center; gap: 4px; height: calc(var(--s) + 4px); align-items: flex-end; }
.sg-plank { height: 12px; margin: 0 -8px; border-radius: 4px; background: linear-gradient(#e6b27a, #b97f45); box-shadow: 0 4px 0 #8a5a2b, 0 8px 8px #0002; }
.sg-count { position: absolute; top: -9px; right: -7px; min-width: 28px; height: 24px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center; font: 800 .78rem var(--font); color: #fff; background: var(--lilac-700); box-shadow: 0 2px 0 #3d2575; }
.sg-count.zero { background: #bfb4c8; box-shadow: 0 2px 0 #968ca0; }
.sg-slot { position: relative; width: var(--s); height: var(--s); padding: 3px; border: 0; border-radius: 12px; background: #fff; box-shadow: 0 2px 6px #0002, inset 0 -3px 0 #0000000f; cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; transition: transform .15s, box-shadow .15s; }
.sg-slot > * { width: 100%; height: 100%; object-fit: contain; display: block; pointer-events: none; border-radius: 8px; }
.sg-slot.empty { background: #fff5; border: 2px dashed #d3b283; box-shadow: none; touch-action: auto; }
.sg-slot.sel { transform: translateY(-10px) scale(1.08); box-shadow: 0 0 0 3px var(--accent), 0 8px 14px #0003; }
.sg-slot.slide { animation: sgSlide .38s cubic-bezier(.2, 1.3, .4, 1) both; }
.sg-slot.dropped { animation: sgDrop .22s ease-out; }
.sg-slot.clearing { animation: sgClear .34s ease-in forwards; }
@keyframes sgSlide { from { transform: translateY(-70%) scale(.45); opacity: 0; } }
@keyframes sgDrop { from { transform: scale(.7); } }
@keyframes sgClear { 40% { transform: scale(1.25); background: #fff3b0; } to { transform: scale(0); opacity: 0; } }
.sg-over { position: absolute; inset: 0; z-index: 3; display: grid; align-content: center; justify-items: center; gap: 6px; padding: 16px; text-align: center; border-radius: 22px; background: #ffffffe6; backdrop-filter: blur(3px); animation: rise .3s ease-out; }
.sg-over[hidden] { display: none; }
.sg-over h3 { margin: 0; font: 700 2.4rem/1 var(--hand); color: var(--accent); }
.sg-over p { margin: 0; }
.sg-ostars { display: flex; gap: 4px; } .sg-ostars[hidden] { display: none; }
.sg-screen .msg { height: 1.6em; overflow: hidden; text-align: center; margin: 4px 0 6px; font-size: .95rem; }
.sg-bar { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.sg-bar .btn { min-height: 44px; padding: 6px 16px; }
.sg-screen .btn.fly { margin: 0; }
@media (prefers-reduced-motion: reduce) { .sg-slot, .sg-lvl, .sg-over { animation: none !important; transition: none; } }


/* ---------------------------------------------------------------- Cherrypie Express start screen */
.kit-intro { position: absolute; inset: 0; z-index: 8; display: grid; grid-template-rows: auto 1fr; align-items: start; justify-items: center; gap: 8px; padding: 26px 18px 20px; border-radius: 30px; overflow: hidden; text-align: center;
  background: var(--art, none) center / cover, linear-gradient(180deg, #8fd0ff 0%, #c7e6ff 38%, #ffe0ef 78%, #ffd1e3 100%); animation: rise .35s ease-out; }
.kit-intro .sky { position: absolute; inset: 0; pointer-events: none; }
.kit-intro .sun { position: absolute; right: 12%; top: 7%; width: 74px; height: 74px; border-radius: 50%; background: radial-gradient(circle, #fff6c4, #ffd56b 60%, #ffd56b00 72%); }
.kit-intro .cloud { position: absolute; width: 120px; height: 38px; border-radius: 40px; background: #fff; opacity: .9; box-shadow: 30px -16px 0 6px #fff, 64px -6px 0 2px #fff; animation: drift 28s linear infinite; }
.kit-intro .c1 { top: 16%; left: -30%; } .kit-intro .c2 { top: 34%; left: -50%; animation-duration: 40s; animation-delay: -14s; transform: scale(.7); } .kit-intro .c3 { top: 62%; left: -40%; animation-duration: 34s; animation-delay: -24s; opacity: .7; }
@keyframes drift { to { translate: 180vw 0; } }
.kit-intro .flyer { position: absolute; left: 6%; top: 40%; width: 46px; height: 46px; animation: loop 9s ease-in-out infinite; filter: drop-shadow(0 6px 4px #0002); }
@keyframes loop { 0% { transform: translate(0, 0) rotate(0); } 50% { transform: translate(min(60vw, 300px), -30px) rotate(8deg); } 100% { transform: translate(0, 0) rotate(0); } }
.kit-intro .hills { position: absolute; left: -10%; right: -10%; bottom: -40px; height: 150px; border-radius: 50% 50% 0 0; background: radial-gradient(ellipse at 30% 0, #d5f3c4, #b6e6a3); box-shadow: 140px 30px 0 -10px #c8edb5; }
.kit-intro[style*="--art"] .sky { display: none; }
.intro-logo { position: relative; display: grid; justify-items: center; gap: 2px; margin-top: 6px; }
.logo-art { width: min(320px, 80%); height: auto; filter: drop-shadow(0 8px 10px #0002); }
.kit-badge.big { width: 92px; height: 92px; border-radius: 28px; rotate: -8deg; animation: bob 3s ease-in-out infinite; }
.kit-badge.big .ico { width: 62px; height: 62px; } .kit-badge.big .plane { width: 44px; height: 44px; right: -18px; top: -16px; }
.kit-name.big { margin: 6px 0 0; text-align: center; justify-items: center; line-height: .8; }
.kit-name.big b { font-size: clamp(3rem, 12vw, 3.8rem); }
.kit-name.big i { font-size: 1rem; margin: 6px 0 0; }
.tagline { margin: 6px 0 0; font: 700 1.4rem var(--hand); color: var(--sky-700); }
.intro-panel { position: relative; display: none; width: min(330px, 100%); gap: 10px; align-self: center; padding: 16px; border-radius: 26px; background: #ffffffd9; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 8px 0 #0000000d, var(--shadow); }
.intro-panel.on { display: grid; animation: rise .3s ease-out; }
.panel-title { margin: 0 0 4px; font: 700 1.9rem var(--hand); color: var(--cherry); }
.gbtn { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 58px; padding: 8px 18px; border: 0; border-radius: 20px; font: 800 1.15rem var(--font); color: #fff;
  background: linear-gradient(180deg, #a98ef0, var(--lilac-700)); box-shadow: inset 0 2px 0 #ffffff55, 0 5px 0 #4a2f86, 0 10px 18px #6643b044; transition: transform .1s, box-shadow .1s; }
.gbtn:active { transform: translateY(4px); box-shadow: inset 0 2px 0 #ffffff55, 0 1px 0 #4a2f86; }
.gbtn.primary { min-height: 68px; font-size: 1.35rem; background: linear-gradient(180deg, #ff7aa2, var(--cherry)); box-shadow: inset 0 2px 0 #ffffff66, 0 6px 0 #8f0d2a, 0 12px 22px #d1123a55; }
.gbtn.primary:active { box-shadow: inset 0 2px 0 #ffffff66, 0 1px 0 #8f0d2a; }
.gbtn .ico { width: 30px; height: 30px; }
.gbtn span { display: grid; line-height: 1.1; text-align: left; }
.gbtn small { font-size: .75rem; font-weight: 700; opacity: .9; }
.gbtn-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gbtn.small { min-height: 64px; padding: 6px 4px; flex-direction: column; gap: 2px; font-size: .78rem; border-radius: 18px; background: linear-gradient(180deg, #fff, #f1e9ff); color: var(--lilac-700); box-shadow: inset 0 0 0 2px #e4d8ff, 0 4px 0 #d3c3f5; }
.gbtn.small span { text-align: center; }
.gbtn.small.goback { min-height: 48px; flex-direction: row; font-size: .95rem; }
.chefs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chef { display: grid; justify-items: center; gap: 2px; padding: 12px 6px 10px; border: 0; border-radius: 20px; background: linear-gradient(180deg, #fff, #ffe4ef); box-shadow: inset 0 0 0 3px #ffc2d6, 0 5px 0 #f4a3bd; transition: transform .15s; }
.chef:hover, .chef:focus-visible { transform: translateY(-4px) rotate(-1deg); }
.chef[data-chef="Efe"] { background: linear-gradient(180deg, #fff, #e2efff); box-shadow: inset 0 0 0 3px #b9d8f7, 0 5px 0 var(--sky-300); }
.chef-pic { position: relative; width: 92px; height: 92px; }
.chef-pic > img:first-child { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 4px 4px #0002); }
.chef-pic .hat { position: absolute; right: -8px; bottom: -4px; width: 40px; height: 40px; }
.chef b { font: 700 1.5rem var(--hand); color: var(--ink); }
.chef small { color: var(--ink-soft); font-size: .78rem; }
.switch { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 6px 8px 6px 16px; border: 0; border-radius: 16px; background: #fff; font-weight: 700; box-shadow: inset 0 0 0 2px var(--line); }
.switch i { position: relative; width: 56px; height: 32px; border-radius: 999px; background: #8a7a94; transition: background .2s; }
.switch i::after { content: ""; position: absolute; left: 4px; top: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px #0003; transition: transform .2s; }
.switch[aria-checked="true"] i { background: var(--mint-700); } .switch[aria-checked="true"] i::after { transform: translateX(24px); }
.credits { margin: 0; line-height: 1.5; } .credits.small { font-size: .82rem; color: var(--ink-soft); }
.chef-pill img { width: 30px; height: 30px; object-fit: contain; border-radius: 50%; background: #fff; }
.chef-pill { font-size: .85rem; }
.kit-logo .map-btn { padding: 4px 8px; }
.kit-screen.no-hints .cell.want { box-shadow: inset 0 -4px 0 #0000001a; } .kit-screen.no-hints .cell.want::after { content: none; }
.kit-screen { min-height: 640px; }
.kit-logo .kit-name b { font-size: 1.8rem; }

/* ---------------------------------------------------------------- date picker: − / + and quick chips */
.when { flex: 1 1 100%; display: grid; gap: 6px; }
.when-row { display: flex; align-items: center; gap: 6px; }
.when .step { flex: none; width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--accent); color: #fff; font-size: 1.6rem; font-weight: 700; line-height: 1; box-shadow: 0 3px 0 color-mix(in srgb, var(--accent) 70%, #000); }
.when .step:disabled { opacity: .35; }
.when-label { flex: 1; min-height: 48px; padding: 6px 12px; border: 2px solid var(--line); border-radius: 14px; background: var(--tint); font-weight: 700; color: var(--ink); text-align: center; }
.when-chips { justify-content: flex-start; margin: 0; }
.when-chips .chip { min-height: 44px; padding: 2px 12px; font-size: .85rem; }
.when.compact .step { width: 40px; height: 40px; font-size: 1.3rem; }
.when.compact .when-label { min-height: 40px; font-size: .9rem; background: #fff; }
.items li .when { max-width: 380px; }

/* trash, toast, photos, history */
.items .del { display: grid; place-items: center; font-size: 1rem; }
.items .del .ico { width: 24px; height: 24px; }
.items .del.sure { width: auto; }
.toasts { position: fixed; left: 50%; bottom: calc(88px + env(safe-area-inset-bottom)); translate: -50% 0; z-index: 90; display: grid; gap: 8px; justify-items: center; }
.toast { display: flex; align-items: center; gap: 14px; max-width: calc(100vw - 24px); padding: 10px 10px 10px 18px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 600; box-shadow: var(--shadow); animation: rise .25s ease-out; }
.toast span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast button { flex: none; min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--pink-300); color: var(--ink); font-weight: 800; }
.photos { display: flex; flex-wrap: wrap; gap: 8px; }
.ph { position: relative; width: 96px; height: 96px; }
.ph-open { width: 100%; height: 100%; padding: 0; border: 4px solid #fff; border-radius: 14px; overflow: hidden; background: var(--tint-2); box-shadow: var(--shadow); cursor: zoom-in; }
.ph-open img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph:nth-child(odd) { rotate: -2deg; } .ph:nth-child(even) { rotate: 2deg; }
.ph-del { position: absolute; right: -8px; top: -8px; min-width: 32px; height: 32px; padding: 0 8px; border: 0; border-radius: 999px; background: #fff; color: var(--ink-soft); font-weight: 800; box-shadow: var(--shadow); }
.ph-del.sure { background: var(--pink-700); color: #fff; font-size: .75rem; }
.ph.broken .ph-open { opacity: .4; }
.ph-add { display: grid; place-items: center; align-content: center; gap: 2px; width: 96px; height: 96px; border: 2px dashed var(--accent-soft); border-radius: 14px; background: #fff; color: var(--accent); font-size: .78rem; font-weight: 700; text-align: center; cursor: pointer; }
.ph-add .ico { width: 30px; height: 30px; }
.ph-add.busy { opacity: .6; pointer-events: none; }
.ph-add:focus-within { outline: 3px solid var(--accent); outline-offset: 3px; }
#l-history li { background: linear-gradient(160deg, #fff, var(--tint)); }

/* birthday archive + the calm hero the rest of the year */
.archive { display: grid; gap: 22px; max-width: 640px; margin: 0 auto; }
.archive-item { padding: 22px 16px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.archive-item h3 { font: 700 2rem var(--hand); color: var(--accent); margin: 0 0 10px; }
.archive-item .envelope { margin-top: 10px; }
.hero.calm-hero { min-height: 72svh; }

/* audit fixes: phones */
body:has(input:focus, textarea:focus, select:focus) .crumbs { opacity: 0; pointer-events: none; } /* the pill must not cover the keyboard-side form */
@media (max-width: 600px) {
  section { padding-bottom: 104px; } /* room for the fixed breadcrumb pill */
  .tabs { mask-image: linear-gradient(90deg, #000 85%, #0000); -webkit-mask-image: linear-gradient(90deg, #000 85%, #0000); } /* hint: more tabs to the right */
}
@media (max-width: 420px) {
  .chef-pill { font-size: 0; gap: 0; } /* avatar only (the name stays for screen readers), so Map and Home fit */
  .kit-bar .btn.gen { font-size: .9rem; padding: 6px; gap: 6px; }
}

/* ---------------------------------------------------------------- story scrapbook: one look per kind of moment */
.timeline { list-style: none; margin: 0 auto; padding: 0; position: relative; max-width: 720px; display: grid; gap: 26px; }
.timeline::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 0; border-left: 3px dashed var(--pink-300); translate: -1px 0; }
.s-item { position: relative; text-align: left; }
.s-year { position: relative; display: grid; place-items: center; list-style: none; }
.s-year span { padding: 6px 22px; border-radius: 999px; background: var(--accent); color: #fff; font: 700 1.8rem var(--hand); box-shadow: var(--shadow); rotate: -3deg; }
.s-month { position: relative; width: max-content; margin: 0 auto 10px; padding: 3px 14px; border-radius: 999px; background: #fff; color: var(--accent); font-weight: 800; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; box-shadow: var(--shadow); }
.s-card { position: relative; display: grid; gap: 10px; max-width: 460px; margin: 0 auto; padding: 18px 18px 16px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.s-item:nth-of-type(odd) .s-card { rotate: -1deg; } .s-item:nth-of-type(even) .s-card { rotate: 1deg; }
.s-item.big .s-card { max-width: 600px; }
.s-card header { display: flex; align-items: center; gap: 10px; }
.s-card header .ico { flex: none; }
.s-card h3 { margin: 0; font: 700 1.7rem/1.05 var(--hand); color: var(--ink); }
.s-when { margin: 0 0 2px; font-size: .8rem; font-weight: 700; letter-spacing: .04em; color: var(--ink-soft); text-transform: uppercase; }
.s-text { margin: 0; line-height: 1.55; }
.s-text.hand { font: 600 1.3rem/1.35 var(--hand); }
.snaps { display: grid; gap: 10px; grid-template-columns: repeat(var(--c, 1), 1fr); padding-top: 4px; }
.snaps.n2 { --c: 2; } .snaps.n3 { --c: 3; }
.snap { position: relative; border: 0; padding: 8px 8px 22px; background: #fff; border-radius: 4px; box-shadow: 0 6px 16px #4a2c5526; cursor: zoom-in; transition: transform .25s; }
.snap::before { content: ""; position: absolute; top: -9px; left: 50%; width: 56px; height: 18px; translate: -50% 0; rotate: -4deg; background: #f9a8c9b3; } /* washi tape */
.snap:first-child { rotate: -2deg; } .snap:nth-child(2) { rotate: 3deg; } .snap:nth-child(3) { rotate: -2deg; }
.snap:hover, .snap:focus-visible { transform: translateY(-4px) rotate(2deg); z-index: 2; }
.snap img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 2px; }
.snaps.n1 { width: min(100%, 300px); justify-self: center; margin-inline: auto; } .snaps.n1 .snap img { aspect-ratio: auto; } /* one photo: uncropped, at a size the 360px thumb stays sharp */

/* sticky note */
.s-note .s-card { max-width: 340px; background: linear-gradient(#fff6b8, #ffef8a); border-radius: 4px 4px 22px 4px; box-shadow: 0 10px 18px #7a5c0026; }
.s-note .s-card::before { content: ""; position: absolute; top: -10px; left: 50%; width: 70px; height: 20px; translate: -50% 0; background: #a6dec4b3; rotate: 3deg; }
.s-note h3 { font-size: 1.5rem; }
/* pink notebook page with a sticker */
.s-notebook .s-card { display: block; background: repeating-linear-gradient(#fff2f8 0 30px, #f7c6dc 30px 31px); border-left: 14px solid var(--pink-300); border-radius: 6px 22px 22px 6px; padding-left: 26px; }
.s-notebook .s-card > * + * { margin-top: 10px; }
.s-notebook .s-card::after { content: ""; position: absolute; left: -10px; top: 18px; bottom: 18px; width: 6px; background: radial-gradient(circle, #fff 0 3px, #0000 4px) 0 0 / 6px 26px; }
.s-sticker { float: right; width: 128px; margin: -40px -26px 4px 10px; rotate: 8deg; filter: drop-shadow(0 6px 6px #0003); transition: rotate .3s; }
.s-sticker:hover { rotate: -4deg; }
.s-notebook .snaps { clear: both; }
/* receipt */
.s-receipt .s-card { max-width: 300px; font-family: "Courier New", ui-monospace, monospace; background: #fffdf7; border-radius: 2px; padding-bottom: 26px;
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 18px 100%; mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 18px 100%; }
.s-receipt h3 { font-family: inherit; font-size: 1.1rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.rcpt-head { margin: 0; text-align: center; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; border-bottom: 2px dashed #c9bfae; padding-bottom: 8px; }
.rcpt { width: 100%; border-collapse: collapse; font-size: .9rem; } .rcpt td { padding: 3px 0; } .rcpt td:last-child { text-align: right; }
.rcpt-total { margin: 0; padding-top: 8px; border-top: 2px dashed #c9bfae; font-weight: 700; }
/* boarding pass */
.s-ticket .s-card { background: linear-gradient(90deg, #fff 0 74%, var(--sky-100) 74%) top / 100% 120px no-repeat, #fff; border: 2px solid var(--sky-300); }
.pass { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; color: var(--sky-700); }
.leg-end { display: grid; } .leg-end b { font-size: 2rem; font-weight: 800; line-height: 1; } .leg-end small { font-size: .78rem; color: var(--ink-soft); }
.leg-end:last-child { text-align: right; }
.leg-mid { position: relative; display: grid; place-items: center; height: 2px; background: repeating-linear-gradient(90deg, var(--sky-300) 0 8px, #0000 8px 14px); }
.leg-mid .ico { width: 34px; height: 34px; translate: 0 -2px; }
.pass-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; } .pass-meta span { display: grid; } .pass-meta small { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); } .pass-meta b { color: var(--sky-700); }
/* postcard */
.s-postcard .s-card { background: #fffaf0; border: 10px solid #fff; outline: 2px dashed var(--pink-300); outline-offset: -16px; padding: 22px; }
.stamp { position: absolute; top: 12px; right: 14px; display: grid; place-items: center; width: 54px; height: 62px; background: var(--butter-100); border: 3px dotted #fff; outline: 2px solid var(--butter-300); rotate: 6deg; }
.stamp .ico { width: 34px; height: 34px; }
.postmark { margin: 0; justify-self: end; padding: 4px 10px; border: 2px solid #b4a5bd; border-radius: 999px; color: #75667f; font-size: .75rem; font-weight: 800; letter-spacing: .12em; rotate: -6deg; }
.s-postcard header { padding-right: 60px; }
/* milestone: gold */
.s-milestone .s-card { text-align: center; justify-items: center; background: radial-gradient(circle at 50% 0, #fff8dc, #fff 60%); border: 3px solid #f1cf6b; }
.s-milestone header { flex-direction: column; } .s-milestone header .ico { width: 64px; height: 64px; }
.s-milestone h3 { font-size: 2.1rem; color: var(--accent); }
.s-milestone .s-card::before, .s-milestone .s-card::after { content: "✦"; position: absolute; top: 14px; font-size: 1.4rem; color: #e8b84a; }
.s-milestone .s-card::before { left: 18px; } .s-milestone .s-card::after { right: 18px; }

/* Gabi & Efe, little characters talking */
.duo { display: grid; gap: 8px; max-width: 460px; margin: 4px auto 0; }
.duo-line { display: flex; align-items: flex-end; gap: 8px; margin: 0; opacity: 0; translate: 0 10px; transition: opacity .4s, translate .4s; }
.duo.on .duo-line { opacity: 1; translate: 0 0; } .duo.on .duo-line:nth-child(2) { transition-delay: .8s; } .duo.on .duo-line:nth-child(3) { transition-delay: 1.6s; }
.duo-line.efe { flex-direction: row-reverse; }
.duo-face { flex: none; width: 56px; height: 56px; object-fit: contain; filter: drop-shadow(0 3px 3px #0002); }
.duo.on .duo-face { animation: bob 2.8s ease-in-out infinite; }
.duo-bubble { position: relative; max-width: 78%; padding: 8px 14px; border-radius: 18px 18px 18px 4px; background: #fff; box-shadow: var(--shadow); font: 700 1.25rem/1.2 var(--hand); color: var(--ink); text-align: left; }
.duo-line.gabi .duo-bubble { background: var(--pink-100); }
.duo-line.efe .duo-bubble { border-radius: 18px 18px 4px 18px; background: var(--sky-100); }
.duo.interlude { max-width: 560px; padding: 0 20px; margin: 0 auto; }
@media (prefers-reduced-motion: reduce) { .duo-line { opacity: 1; translate: 0 0; transition: none; } .duo.on .duo-face { animation: none; } }

@media (max-width: 600px) {
  .timeline::before { left: 18px; }
  .s-card, .s-item.big .s-card { margin-left: 30px; }
  .s-month { margin-left: 30px; }
  .s-year { justify-items: start; }
  .s-sticker { width: 96px; margin: -34px -14px 4px 8px; }
  .snaps.n3 { --c: 2; }
}

/* ---------------------------------------------------------------- Christmas (1 Dec – 4 Jan): snow, fairy lights, candy-cane photo ring */
body.xmas::after { content: ""; position: fixed; inset: -10vh 0 0; z-index: 70; pointer-events: none; opacity: .75;
  background-image: radial-gradient(3px 3px at 20px 30px, #fff, #0000), radial-gradient(2px 2px at 90px 120px, #fff, #0000), radial-gradient(4px 4px at 160px 60px, #fff, #0000), radial-gradient(2px 2px at 230px 170px, #fff, #0000), radial-gradient(3px 3px at 60px 210px, #fff, #0000);
  background-size: 260px 240px; filter: drop-shadow(0 0 1.5px #7f9cc4) drop-shadow(0 0 1px #9fb6d6); animation: snow 14s linear infinite; }
@keyframes snow { to { background-position: 40px 240px, -30px 240px, 20px 240px, -20px 240px, 30px 240px; } }
.fairy-lights { position: absolute; top: 0; left: 50%; width: 100vw; height: 34px; translate: -50% 0; pointer-events: none;
  background: radial-gradient(circle at 50% 70%, var(--c1) 0 5px, #0000 6px) 0 0 / 60px 34px, radial-gradient(circle at 50% 70%, var(--c2) 0 5px, #0000 6px) 30px 4px / 60px 34px;
  --c1: #ff5c8a; --c2: #ffd36b; animation: twinkle 1.6s steps(2) infinite; }
.fairy-lights::before { content: ""; position: absolute; inset: 0 0 auto; height: 22px; border-bottom: 2px solid #4a6b4a; border-radius: 0 0 50% 50% / 0 0 100% 100%; opacity: .5; }
@keyframes twinkle { 50% { --c1: #7bd389; --c2: #6ec6ff; } }
.xmas .hero-photo { background: repeating-linear-gradient(45deg, #e8304a 0 12px, #fff 12px 24px); cursor: pointer; }
.xmas .hero-photo:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
@media (prefers-reduced-motion: reduce) { body.xmas::after, .fairy-lights { animation: none; } }
.cherry-btn { border: 0; background: none; padding: 6px; margin: -6px; cursor: pointer; border-radius: 50%; transition: transform .2s; }
.cherry-btn:hover, .cherry-btn:focus-visible { transform: rotate(-15deg) scale(1.25); }
.pop img[src*="img/t/"] { object-fit: cover; padding: 0; border: 6px solid #fff; }
/* ---- games v2 */
/* Gaby sort: shelves stacked into bookcases (units), stock beside the front row */
.sg-screen, .game.full .sg-screen { --s: 44px; }
.game.full .sg-screen { --s: clamp(46px, 7.2vw, 64px); }
@media (max-width: 340px) { .sg-screen { --s: 40px; padding: 8px; } }
.sg-shelves { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 18px; padding: 8px 0 10px; }
.sg-unit { display: grid; gap: 6px; padding: 10px 10px 0; border-radius: 12px 12px 4px 4px; background: linear-gradient(#d9a468, #c58c50); box-shadow: inset 0 0 0 3px #a8733b, 0 6px 0 #8a5a2b, 0 10px 14px #0002; }
.sg-unit .sg-shelf { grid-template-columns: auto calc(var(--s) * .95); align-items: end; gap: 6px; padding: 6px 6px 0; border-radius: 8px 8px 0 0; }
.sg-unit .sg-plank { grid-column: 1 / -1; height: 8px; margin: 0 -6px; box-shadow: 0 2px 0 #8a5a2b; }
.sg-unit .sg-back { flex-wrap: wrap; align-content: center; height: calc(var(--s) + 4px); gap: 3px; }
.sg-unit .sg-mini { width: calc(var(--s) * .4); height: calc(var(--s) * .4); }
.sg-unit .sg-count { top: 2px; right: 0; min-width: 24px; height: 20px; font-size: .7rem; }
.sg-slot.hint, .sg-shelf.hint { box-shadow: 0 0 0 3px var(--mint-700), 0 0 14px 2px #3cc98b99; }
.sg-slot:focus-visible { outline: 3px solid var(--lilac-700); outline-offset: 2px; }
.sg-lvl { position: relative; width: 44px; height: 44px; }
.sg-lvl[data-st]::after { content: attr(data-st); position: absolute; left: 50%; bottom: -9px; transform: translateX(-50%); font-size: .55rem; line-height: 1; color: #e29a00; text-shadow: 0 0 2px #fff, 0 0 2px #fff; white-space: nowrap; }
.sg-path { gap: 12px 8px; padding-bottom: 16px; }
.sg-bar .btn, .sg-bar .tool { min-height: 44px; min-width: 44px; }
/* settings dialog */
.gset-dlg { width: min(92vw, 420px); max-height: 90vh; overflow: auto; padding: 18px; border: 0; border-radius: 24px; background: var(--cream, #fff8f0); color: inherit; box-shadow: 0 20px 60px #0006; }
.gset-dlg::backdrop { background: #2a1b4a99; }
.gset-dlg h3 { margin: 0 0 12px; font: 700 1.8rem var(--hand); color: var(--lilac-700); }
.gset-dlg .switch { width: 100%; gap: 12px; margin-bottom: 8px; text-align: left; cursor: pointer; }
.gset-vol { display: grid; gap: 6px; margin: 4px 0 12px; font-weight: 800; }
.gset-vol input { width: 100%; min-height: 44px; accent-color: var(--lilac-700); }
.gset-dlg .btn, .gset-dlg .gbtn { width: 100%; margin-top: 4px; }
/* memory: roomy touch targets, no overflow */
.mem-grid, #memGrid { max-width: 100%; }
.mcard { min-width: 0; min-height: 44px; }
/* game toolbar buttons keep a 44px target */
.tool { min-width: 44px; min-height: 44px; }
.gbtn-row { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); }
@media (max-width: 340px) { .gbtn { padding: 8px 10px; font-size: 1rem; } }
/* settings: reduce motion and bigger text */
body.g-calm .game *, body.g-calm .game *::before, body.g-calm .game *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
body.g-big .game { font-size: 1.15rem; }
body.g-big .game .msg, body.g-big .game small, body.g-big .sg-howto { font-size: 1.1rem; color: #1d1230; }
body.g-big .game button, body.g-big .game .btn { border: 2px solid #1d1230; }
body.g-big .sg-slot { outline: 2px solid #1d1230; }
@media (prefers-reduced-motion: reduce) { .gset-dlg *, .sg-unit * { transition: none; } }

/* ---- cards + candles v2 */
/* flip cards (22 things + dictionary). The button is always the click target (children ignore the pointer), so a flipped,
   mirrored face can never swallow a tap. The hidden face is also visibility:hidden, so no browser can show both faces,
   and screen readers only reach the face that is showing. */
.flip { -webkit-tap-highlight-color: transparent; touch-action: manipulation; cursor: pointer; font: inherit; color: inherit; }
.flip * { pointer-events: none; }
.flip:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: var(--radius); }
.flip-inner { -webkit-transform-style: preserve-3d; }
.face { -webkit-backface-visibility: hidden; transition: visibility 0s linear .3s; }
.flip .back { visibility: hidden; }
.flip[aria-pressed="true"] .back { visibility: visible; }
.flip[aria-pressed="true"] .front { visibility: hidden; }
.back { -webkit-transform: rotateY(180deg); }
/* dictionary: both faces share one grid cell, so the card is as tall as its back */
.flip.word { height: auto; padding: 0; background: none; box-shadow: none; border-top: 0; text-align: left; display: block; }
.word .flip-inner { display: grid; height: auto; }
.word .face { position: relative; inset: auto; grid-area: 1 / 1; display: block; padding: 18px 20px; min-height: 150px; background: #fff; border-top: 6px solid var(--butter-300); }
.word:nth-child(3n+2) .face { border-top-color: var(--pink-300); } .word:nth-child(3n) .face { border-top-color: var(--mint-300); }
.word .front { display: grid; align-content: center; background: linear-gradient(150deg, #fff, var(--butter-100)); }
.word:nth-child(3n+2) .front { background: linear-gradient(150deg, #fff, var(--pink-100)); } .word:nth-child(3n) .front { background: linear-gradient(150deg, #fff, var(--mint-100)); }
.word .back { display: grid; align-content: center; gap: 4px; }
.word .front h3 { font-size: 2.3rem; }
.word-small { font: 700 1.5rem/1.1 var(--hand); color: var(--accent); padding-right: 80px; }
.word-def { display: block; margin: 4px 0; }
.word-say { display: block; font-weight: 600; color: var(--ink); }
.word .back .word-stickers .ico { width: 44px; height: 44px; } .word .back .word-stickers .ico + .ico { width: 32px; height: 32px; }
@media (prefers-reduced-motion: reduce) { /* no spin: the two faces crossfade */
  .flip-inner { transform: none !important; }
  .back { transform: none; opacity: 0; }
  .flip[aria-pressed="true"] .back { opacity: 1; } .flip[aria-pressed="true"] .front { opacity: 0; }
  .face { transition: opacity .25s, visibility 0s linear .25s !important; }
}

/* element: the heart on fire when she melts it */
.melt-heart { width: 1.5em; height: 1.5em; animation: meltbeat 1.4s ease-in-out infinite; }
.melt-heart.sm { width: 1.1em; height: 1.1em; }
@keyframes meltbeat { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.18) rotate(-4deg); } }

/* candles light the room */
@property --lit { syntax: "<number>"; inherits: true; initial-value: 1; }
.archive-item.room { position: relative; isolation: isolate; overflow: hidden; }
.room { transition: --lit .5s; }
.hero.room::before { z-index: -3; }
.room-dark { position: absolute; inset: 0 -100vmax; z-index: -2; pointer-events: none; opacity: 1; transition: opacity 1s, background-color .5s;
  background: rgb(26 9 36 / calc(.74 + .2 * (1 - var(--lit)))); }
.archive-item .room-dark { inset: 0; }
.room.snuffed .room-dark { background: rgb(12 4 18 / .97); }
.room.bright .room-dark { opacity: 0; transition: opacity 2.4s ease-in-out; }
.room-glow, .room-shadow { position: absolute; z-index: -1; pointer-events: none; left: 50%; }
.room-glow { top: 36%; width: 150%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%;
  background: radial-gradient(circle, rgb(255 196 110 / .6), rgb(255 150 70 / .2) 38%, #0000 66%); opacity: var(--lit); animation: glowflick .23s ease-in-out infinite alternate; }
@keyframes glowflick { from { scale: .96; opacity: calc(var(--lit) * .82); } to { scale: 1.04; opacity: var(--lit); } }
/* the cake's shadow on the wall behind it, swaying with the flames; it fades as the candles go */
.room-shadow { top: 24%; width: 74%; height: 66%; translate: -46% 0; border-radius: 42% 42% 28% 28%; filter: blur(16px);
  background: rgb(8 2 14 / .55); opacity: calc(var(--lit) * .7); animation: shadowsway 1.7s ease-in-out infinite alternate; }
@keyframes shadowsway { from { translate: -48% 0; } to { translate: -44% 1%; } }
.room:not(.bright) :is(.kicker, .hero-title span, #wish, .hint, .scroll-hint, .archive-item > h3) { color: #fff1e3; text-shadow: 0 1px 8px rgb(20 6 30 / .8); transition: color .8s; }
.room:not(.bright) .hero-title b { color: #ffc2da; text-shadow: 0 2px 12px rgb(20 6 30 / .8); }
.room :is(.kicker, .hero-title, #wish, .hint, .hero-photo, .row, .scroll-hint, h3) { position: relative; z-index: 1; }
@media (prefers-reduced-motion: reduce) { /* simple fades, no flicker */
  .room-glow, .room-shadow { animation: none !important; }
  .room { transition: --lit .6s !important; }
  .room-dark { transition: opacity .8s, background-color .6s !important; }
  .room.bright .room-dark { transition: opacity 1.2s !important; }
}
/* ---- story v2: bubbles always on top, side photo, the kept card, cry button */
.duo { position: relative; z-index: 4; } /* above corner stickers (3) and lifted photos (2) */
.duo-bubble { overflow-wrap: anywhere; }
.duo.interlude { padding-block: 22px 6px; }
.snaps.side { float: left; width: 132px; margin: 4px 16px 8px 0; display: block; padding: 0; }
.snaps.side .snap { padding: 6px 6px 16px; rotate: -4deg; }
.snaps.side .snap img { aspect-ratio: 3 / 4; }
.s-notebook .s-card::after { content: none; } /* the ring holes clashed with the side photo */
.s-notebook .duo { clear: both; padding-top: 6px; }
.s-handnote { justify-self: center; max-width: 320px; margin: 2px auto 0; padding: 14px 18px; background: #fff; border: 1px solid #f3d7e3; box-shadow: 0 6px 14px #4a2c5520; rotate: -2deg; font: 600 1.3rem/1.3 var(--hand); color: var(--ink); text-align: left; }
.cry-btn { justify-self: start; }
@media (max-width: 600px) { .snaps.side { width: 104px; margin-right: 12px; } }

/* ---- moments + food v2 */
.clip { position: relative; }
.clip-snd { position: absolute; top: 18px; right: 18px; display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 4px 10px; border: 0; border-radius: 999px; background: #000a; color: #fff; font: 600 .8rem/1 var(--font); cursor: pointer; }
.clip-snd[aria-pressed="true"] { background: var(--pink-700); }
.clip-snd .ico { width: 1.1em; height: 1.1em; }
.clips + .more-btn { margin-top: 14px; }
.items li.fixed .photos { margin-top: 8px; }
.items li.fixed .ph { width: 72px; height: 72px; }
.s-notebook .s-sticker { width: 150px; } @media (max-width: 600px) { .s-notebook .s-sticker { width: 108px; } }

/* a11y audit fixes */
@media (max-width: 600px) { .s-notebook .s-sticker { float: none; display: block; margin: 8px auto; width: 96px; } }
.tool { white-space: nowrap; }
/* long unbroken text in a list item must wrap, not push the controls off screen */
.items { grid-template-columns: minmax(0, 1fr); }
.items li { grid-template-columns: minmax(0, 1fr); overflow-wrap: anywhere; }
