:root {
  --bg: #14213A; --dots: #22335A; --card: #1F2E4D; --raised: #2C3E63; --sheet: #1A2742;
  --ink: #0A1222; --shadow: #070D1A; --text: #FFF1D6; --muted: #A9B4CA; --soft: #C3CCDD;
  --coral: #F2715E; --gold: #F5B83D; --teal: #3FA7A3; --sea: #0F3340; --on-accent: #14213A;
  --display: 'Fredoka', ui-rounded, system-ui, sans-serif; --body: 'Nunito', system-ui, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px); --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--body); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
body { background-image: radial-gradient(var(--dots) 1.3px, transparent 1.3px); background-size: 22px 22px; }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
h1, h2, h3, h4, p { margin: 0; }
.ic { flex-shrink: 0; }
.gold { color: var(--gold); }
.fill path { fill: currentColor; }
.caps { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.muted { color: var(--muted); }
.small { font-size: 13px; font-weight: 700; }
.spacer { flex: 1 1 auto; min-height: 8px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.screen { position: relative; margin: 0 auto; max-width: 480px; min-height: 100dvh; display: flex; flex-direction: column; gap: 14px; padding: calc(16px + var(--safe-top)) 18px calc(22px + var(--safe-bottom)); }
.screen.play { padding: 0; height: 100dvh; min-height: 0; overflow: hidden; gap: 0; }

/* buttons */
.icon-btn { width: 46px; height: 46px; flex-shrink: 0; border-radius: 50%; background: var(--card); border: 2.5px solid var(--ink); box-shadow: 0 3px 0 var(--shadow); display: inline-flex; align-items: center; justify-content: center; padding: 0; color: var(--text); }
.icon-btn.sq { border-radius: 0; box-shadow: none; border: 0; width: 44px; height: 44px; background: transparent; }
.icon-btn.big { width: 64px; height: 64px; border-radius: 20px; border-width: 3px; box-shadow: 0 6px 0 var(--shadow); }
.icon-btn:disabled, .icon-btn.used { opacity: .45; }
.icon-btn:active, .btn-primary:active, .btn-secondary:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--shadow); }
.btn-primary { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 62px; border-radius: 20px; background: var(--coral); border: 3px solid var(--ink); box-shadow: 0 6px 0 var(--shadow); color: var(--on-accent); font-family: var(--display); font-weight: 600; font-size: 22px; padding: 0 16px; }
.btn-primary:disabled { background: #26324A; border-color: #3A4866; color: #8E9AB3; box-shadow: none; font-size: 19px; }
.btn-secondary { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; border-radius: 16px; background: var(--card); border: 2.5px solid var(--ink); box-shadow: 0 4px 0 var(--shadow); font-family: var(--display); font-weight: 600; font-size: 17px; }
.mini-btn { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 0 12px; border-radius: 12px; background: var(--raised); border: 2px solid var(--ink); font-weight: 800; font-size: 13px; }
.link-btn { background: none; border: 0; color: var(--muted); font-weight: 800; font-size: 14px; min-height: 44px; text-decoration: underline; text-underline-offset: 3px; }
.pill { display: inline-flex; align-items: center; gap: 6px; background: var(--raised); color: var(--text); border-radius: 999px; padding: 8px 14px; font-family: var(--display); font-weight: 600; font-size: 14px; letter-spacing: .06em; white-space: nowrap; }
.card { background: var(--card); border: 2.5px solid var(--ink); border-radius: 22px; box-shadow: 0 5px 0 var(--shadow); padding: 16px; }

/* top bars */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.topbar.left { justify-content: flex-start; gap: 12px; }
.title { font-family: var(--display); font-weight: 700; font-size: 30px; line-height: 1.05; }

/* loading */
.loading { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; text-align: center; font-weight: 800; color: var(--soft); padding: 24px; min-height: 80dvh; }
.loading > svg:first-child { animation: spin 2.4s linear infinite; }
.loading .gaven { animation: none; }

/* home */
.logo { display: flex; flex-direction: column; align-items: center; margin-top: 4px; }
.logo-row { display: flex; align-items: center; gap: 10px; }
.logo h1 { font-family: var(--display); font-weight: 700; font-size: 40px; line-height: 1; }
.logo-tag { font-family: var(--display); font-weight: 700; font-size: 40px; line-height: 1; color: var(--on-accent); background: var(--coral); border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--shadow); padding: 4px 16px 8px; border-radius: 14px; transform: rotate(-3deg); margin-top: 8px; }
.hero { position: relative; height: 196px; display: flex; align-items: center; justify-content: center; }
.trail { position: absolute; inset: 0; width: 100%; height: 100%; }
.gaven-btn { position: relative; background: none; border: 0; padding: 0; border-radius: 50%; }
.bubble { position: absolute; left: 0; top: 6px; background: var(--card); border: 2.5px solid var(--ink); border-radius: 16px 16px 16px 4px; padding: 8px 12px; font-weight: 800; font-size: 14px; line-height: 1.25; box-shadow: 0 3px 0 var(--shadow); transform: rotate(-4deg); max-width: 50%; }
.journey h2 { font-family: var(--display); font-weight: 600; font-size: 20px; }
.stamps5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-top: 14px; }
.mini-stamp { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.mini-stamp span { width: 52px; height: 52px; max-width: 100%; aspect-ratio: 1; border-radius: 50%; border: 2.5px dashed var(--ink); display: flex; align-items: center; justify-content: center; color: var(--text); }
.mini-stamp small { font-size: 10.5px; font-weight: 800; letter-spacing: .03em; }
.chips { display: flex; gap: 10px; }
.chip { flex: 1; display: flex; align-items: center; gap: 8px; background: var(--card); border: 2px solid var(--ink); border-radius: 14px; padding: 10px 12px; }
.chip b { display: block; font-weight: 800; font-size: 14px; }
.chip span { font-weight: 600; font-size: 14px; color: var(--muted); }
.foot { text-align: center; font-size: 13px; font-weight: 700; color: var(--muted); }

/* how to */
.steps { display: flex; flex-direction: column; gap: 12px; }
.step { display: flex; gap: 14px; align-items: center; padding: 12px 14px; }
.step h3 { font-family: var(--display); font-weight: 600; font-size: 19px; margin-bottom: 3px; }
.step p { font-size: 14px; line-height: 1.4; color: var(--soft); }
.step-art { position: relative; width: 86px; height: 76px; flex-shrink: 0; border-radius: 14px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.map-art { background: var(--sea); }
.map-art svg { position: absolute; inset: 0; }
.drop-demo { position: absolute; left: 30px; top: 14px; transform: scale(.6); transform-origin: top left; animation: dropdemo 3s cubic-bezier(.3,1.3,.5,1) infinite; }
.mini-card { width: 62px; height: 46px; background: var(--card); border: 2px solid var(--ink); border-radius: 8px; padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.mini-card i { width: 22px; height: 7px; border-radius: 4px; background: var(--coral); }
.mini-card b { height: 4px; border-radius: 2px; background: var(--text); }
.mini-card b.short { width: 70%; }
.slam-demo { width: 58px; height: 58px; border-radius: 50%; border: 3px solid var(--ink); outline: 2px dashed var(--ink); outline-offset: -9px; background: var(--gold); color: var(--on-accent); display: flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 700; font-size: 15px; animation: slamdemo 3s cubic-bezier(.2,1.4,.5,1) infinite; }
.legend { background: var(--raised); border-radius: 20px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.legend h3 { font-family: var(--display); font-weight: 600; font-size: 17px; }
.legend-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; font-size: 13px; font-weight: 700; }
.legend-grid div { display: flex; align-items: center; gap: 8px; }
.legend-grid span { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--text); flex-shrink: 0; }
.legend p { font-size: 13px; line-height: 1.45; color: #D9D2C2; }
.legend b { color: var(--gold); }

/* play */
.map { position: absolute; inset: 0; background: var(--sea); touch-action: none; }
.map-canvas { position: absolute; inset: 0; display: block; touch-action: none; cursor: crosshair; }
.map-overlay { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.marker { position: absolute; left: 0; top: 0; will-change: transform; }
.topbar.overlay { position: absolute; left: 0; right: 0; top: 0; padding: calc(14px + var(--safe-top)) 16px 0; z-index: 3; pointer-events: none; }
.topbar.overlay > * { pointer-events: auto; }
.progress { display: flex; flex-direction: column; align-items: center; gap: 5px; background: rgba(20,33,58,.85); border-radius: 14px; padding: 7px 12px; }
.dots { display: flex; align-items: center; gap: 8px; }
.dot { width: 15px; height: 15px; border-radius: 50%; background: var(--card); border: 2.5px dashed var(--text); }
.dot.now { background: var(--coral); border: 2.5px solid var(--ink); animation: pulse 1.6s ease-in-out infinite; }
.pill.score { font-size: 16px; letter-spacing: 0; background: rgba(44,62,99,.95); }

.clue { position: absolute; left: 16px; right: 16px; top: calc(84px + var(--safe-top)); z-index: 2; padding: 26px 18px 14px; display: flex; flex-direction: column; gap: 12px; }
.clue .prompt { font-family: var(--display); font-weight: 600; font-size: 26px; line-height: 1.15; }
.cat-stamp { position: absolute; left: 14px; top: -16px; display: flex; align-items: center; gap: 6px; border: 2.5px solid var(--ink); border-radius: 10px; padding: 5px 10px; font-size: 12px; font-weight: 800; letter-spacing: .08em; transform: rotate(-6deg); }
.clue.collapsed { padding: 0; border-radius: 16px; }
.clue-bar { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 50px; padding: 0 12px; background: none; border: 0; text-align: left; }
.clue-text { flex: 1; font-family: var(--display); font-weight: 600; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-sq { width: 28px; height: 28px; flex-shrink: 0; border-radius: 8px; border: 2px solid var(--ink); display: flex; align-items: center; justify-content: center; }
.map-ctrls { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); z-index: 2; display: flex; flex-direction: column; background: var(--card); border: 2.5px solid var(--ink); border-radius: 14px; box-shadow: 0 3px 0 var(--shadow); overflow: hidden; }
.map-ctrls .sq + .sq { border-top: 2px solid var(--ink); }
.tap-hint { position: absolute; left: 50%; top: 58%; transform: translateX(-50%); z-index: 2; pointer-events: none; white-space: nowrap; background: var(--raised); color: var(--text); border-radius: 999px; padding: 9px 15px; font-weight: 800; font-size: 14px; box-shadow: 0 3px 0 var(--shadow); }
.tap-hint .ripple { position: absolute; left: 50%; top: -46px; width: 44px; height: 44px; margin-left: -22px; border-radius: 50%; border: 3px solid var(--text); animation: ripple 1.6s ease-out infinite; }
.tap-hint .r2 { animation-delay: .8s; }
.hidden { display: none !important; }
.bottom { position: absolute; left: 16px; right: 16px; bottom: calc(20px + var(--safe-bottom)); z-index: 2; display: flex; gap: 10px; }
.bottom .btn-primary { min-height: 64px; }

.pin .pin-body { position: absolute; left: -19px; top: -50px; transform-origin: 50% 100%; animation: pindrop .55s cubic-bezier(.4,0,.6,1) both; }
.pin .pin-shadow { position: absolute; left: -12px; top: -4px; width: 24px; height: 9px; border-radius: 50%; background: var(--ink); opacity: .45; animation: pinshadow .55s ease-out both; }
.pin .land-ring { position: absolute; left: -20px; top: -15px; width: 40px; height: 30px; border-radius: 50%; border: 3px solid var(--coral); animation: landring .8s ease-out .25s both; }
.pin-chip { position: absolute; left: 0; top: -96px; white-space: nowrap; display: flex; align-items: center; gap: 6px; background: var(--raised); border: 2px solid var(--ink); border-radius: 12px; padding: 6px 11px; font-weight: 800; font-size: 14px; translate: -50% 0; animation: chip .4s cubic-bezier(.3,1.5,.5,1) .3s both; }
.flag .flag-body { position: absolute; left: -18px; top: -50px; transform-origin: 50% 100%; animation: ansdrop .5s cubic-bezier(.3,1.4,.5,1) both; }
.flag .glow { position: absolute; left: -20px; top: -20px; width: 40px; height: 40px; border-radius: 50%; background: var(--gold); animation: glow 1.4s ease-out infinite; }
.flag-label { position: absolute; left: 12px; top: 4px; white-space: nowrap; background: var(--gold); color: var(--on-accent); border: 2.5px solid var(--ink); border-radius: 10px; padding: 3px 9px; font-family: var(--display); font-weight: 600; font-size: 15px; box-shadow: 0 3px 0 var(--shadow); animation: ansdrop .5s cubic-bezier(.3,1.4,.5,1) .1s both; }
.dist-chip { position: absolute; left: 0; top: 0; translate: -50% -50%; background: var(--raised); border: 2px solid var(--ink); color: var(--text); border-radius: 999px; padding: 5px 12px; font-family: var(--display); font-weight: 600; font-size: 16px; white-space: nowrap; animation: chip .4s cubic-bezier(.3,1.5,.5,1) both; }

.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; max-height: 62%; background: var(--sheet); border-top: 3px solid var(--ink); border-radius: 30px 30px 0 0; padding: 24px 20px calc(22px + var(--safe-bottom)); display: flex; flex-direction: column; gap: 14px; transform: translateY(105%); transition: transform .45s cubic-bezier(.25,1.2,.4,1); overflow-y: auto; }
.sheet.open { transform: translateY(0); overflow: visible; }
.rank-stamp { position: absolute; right: 18px; top: -42px; width: 96px; height: 96px; border-radius: 50%; border: 3px solid var(--ink); outline: 2.5px dashed rgba(255,251,242,.85); outline-offset: -11px; box-shadow: 0 4px 0 var(--shadow); display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--ink); text-align: center; padding: 0 10px; }
.rank-stamp b { font-family: var(--display); font-weight: 700; font-size: 17px; line-height: 1; }
.rank-stamp small { font-size: 10px; font-weight: 800; letter-spacing: .1em; margin-top: 3px; }
.ans { padding-right: 104px; }
.ans h2 { font-family: var(--display); font-weight: 700; font-size: 24px; line-height: 1.1; margin-top: 2px; }
.pts-row { display: flex; align-items: center; gap: 14px; }
.pts { font-family: var(--display); font-weight: 700; font-size: 44px; line-height: 1; min-width: 118px; }
.pts-break { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 700; color: var(--soft); }
.pts-break div { display: flex; align-items: center; gap: 6px; }
.pts-break i { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.fact { display: flex; gap: 12px; align-items: flex-start; background: var(--card); border: 2.5px solid var(--ink); border-radius: 18px; padding: 12px 14px; }
.fact h4 { font-family: var(--display); font-weight: 600; font-size: 15px; margin-bottom: 3px; }
.fact p { font-size: 14px; line-height: 1.4; color: var(--soft); }
.fact-gaven { flex-shrink: 0; }

/* summary */
.confetti { position: absolute; inset: 0 0 auto 0; height: 300px; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: 0; width: 8px; height: 14px; border-radius: 2px; animation: fall 3.2s linear infinite; }
.summary-head { display: flex; align-items: center; gap: 12px; position: relative; }
.total-row { align-items: flex-end; }
.total { display: flex; align-items: baseline; gap: 6px; }
.total b { font-family: var(--display); font-weight: 700; font-size: 54px; line-height: 1; }
.total span { font-family: var(--display); font-weight: 500; font-size: 20px; color: var(--muted); }
.passport { position: relative; background: var(--card); border: 2.5px solid var(--ink); border-radius: 10px 22px 22px 10px; box-shadow: 0 5px 0 var(--shadow); padding: 14px 14px 18px 26px; background-image: repeating-linear-gradient(0deg, transparent 0 27px, #26365A 27px 28px); }
.passport::before { content: ''; position: absolute; left: 10px; top: 14px; bottom: 14px; border-left: 2.5px dashed #D9B77A; }
.passport h3 { font-family: var(--display); font-weight: 600; font-size: 15px; letter-spacing: .12em; }
.pp-stamps { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 6px; margin-top: 10px; }
.pp-stamp { width: 100px; height: 100px; border-radius: 50%; border: 4px solid; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; position: relative; animation: stamp .45s cubic-bezier(.2,1.4,.5,1) both; padding: 0 8px; }
.pp-stamp::after { content: ''; position: absolute; inset: 5px; border-radius: 50%; border: 1.5px dashed currentColor; opacity: .35; }
.pp-stamp small { font-size: 10px; font-weight: 800; line-height: 1.1; max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-stamp b { font-family: var(--display); font-weight: 700; font-size: 18px; line-height: 1.15; }
.pp-stamp em { font-style: normal; font-size: 9px; font-weight: 800; letter-spacing: .06em; }
.row2 { display: flex; gap: 10px; }
.countdown { flex: 1.4; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 52px; border-radius: 16px; background: var(--raised); }
.countdown .caps { font-size: 11px; color: #B9C3D6; }
.countdown b { font-family: var(--display); font-weight: 600; font-size: 18px; letter-spacing: .04em; }

/* stats */
.streak-card { display: flex; align-items: center; gap: 14px; background: var(--raised); border-radius: 22px; padding: 14px 18px; box-shadow: 0 5px 0 var(--shadow); }
.streak-card b { display: block; font-family: var(--display); font-weight: 700; font-size: 34px; line-height: 1; }
.streak-card span { font-size: 13px; font-weight: 700; color: #B9C3D6; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.tiles div { background: var(--card); border: 2.5px solid var(--ink); border-radius: 16px; padding: 10px 4px; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.tiles b { font-family: var(--display); font-weight: 700; font-size: 21px; }
.tiles span { font-size: 11px; font-weight: 800; color: var(--muted); }
.card h3 { font-family: var(--display); font-weight: 600; font-size: 17px; }
.hist { display: grid; grid-template-columns: 48px 1fr; align-items: center; gap: 7px 10px; font-size: 13px; font-weight: 800; margin-top: 10px; }
.bar-track { height: 24px; }
.bar-track.thin { height: 10px; border-radius: 6px; background: var(--raised); overflow: hidden; }
.bar { height: 100%; min-width: 0; border-radius: 8px; background: var(--teal); border: 2px solid var(--ink); color: var(--on-accent); display: flex; align-items: center; justify-content: flex-end; padding-right: 8px; font-size: 13px; }
.bar.today { background: var(--coral); }
.thin .bar { border: 0; border-radius: 0; background: var(--gold); padding: 0; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-top: 10px; }
.week > div { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.wk { width: 38px; height: 38px; max-width: 100%; border-radius: 50%; border: 3px dashed #3A4866; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 800; }
.wk.today { outline: 2px dashed var(--coral); outline-offset: 2px; }
.week small { font-size: 11px; font-weight: 800; color: var(--muted); }
.cats { display: grid; grid-template-columns: 104px 1fr 36px; align-items: center; gap: 8px 10px; font-size: 13px; font-weight: 800; margin-top: 8px; }
.cats b { text-align: right; }

.toast { position: fixed; left: 50%; bottom: calc(100px + var(--safe-bottom)); transform: translateX(-50%); z-index: 50; background: var(--text); color: var(--on-accent); font-weight: 800; padding: 10px 16px; border-radius: 12px; box-shadow: 0 4px 0 var(--shadow); animation: chip .35s cubic-bezier(.3,1.5,.5,1) both; }

/* animations */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-8px) rotate(2deg); } }
@keyframes march { to { stroke-dashoffset: -40; } }
@keyframes nudge { 0%,80%,100% { transform: translateY(0); } 86% { transform: translateY(-5px); } 92% { transform: translateY(0); } 96% { transform: translateY(-2px); } }
@keyframes flicker { 0%,100% { transform: scale(1) rotate(-3deg); } 50% { transform: scale(1.12) rotate(3deg); } }
@keyframes popin { 0% { transform: scale(.4) rotate(-20deg); opacity: 0; } 60% { transform: scale(1.12) rotate(4deg); opacity: 1; } 100% { transform: scale(1) rotate(var(--r, 0deg)); opacity: 1; } }
@keyframes cardin { 0% { transform: translateY(-24px) rotate(-2deg); opacity: 0; } 70% { transform: translateY(4px) rotate(.5deg); opacity: 1; } 100% { transform: none; opacity: 1; } }
@keyframes stampin { 0% { transform: scale(2) rotate(-30deg); opacity: 0; } 70% { transform: scale(.95) rotate(-6deg); opacity: 1; } 100% { transform: scale(1) rotate(-6deg); opacity: 1; } }
@keyframes ripple { 0% { transform: scale(.3); opacity: .9; } 100% { transform: scale(2.2); opacity: 0; } }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(242,113,94,.55); } 50% { box-shadow: 0 0 0 7px rgba(242,113,94,0); } }
@keyframes pindrop { 0% { transform: translateY(-140px); opacity: 0; } 55% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(-14px) scaleY(1.04); } 85% { transform: translateY(0) scaleY(.92); } 100% { transform: none; } }
@keyframes pinshadow { 0% { transform: scale(.2); opacity: 0; } 55%,100% { transform: scale(1); opacity: .45; } }
@keyframes landring { 0% { transform: scale(.2); opacity: .9; } 100% { transform: scale(2.4); opacity: 0; } }
@keyframes chip { 0% { transform: translateY(8px) scale(.6); opacity: 0; } 70% { transform: scale(1.08); opacity: 1; } 100% { transform: none; opacity: 1; } }
@keyframes ansdrop { 0% { transform: translateY(-60px) scale(.6); opacity: 0; } 70% { transform: scale(1.1); opacity: 1; } 100% { transform: none; opacity: 1; } }
@keyframes glow { 0%,100% { transform: scale(1); opacity: .5; } 50% { transform: scale(1.5); opacity: 0; } }
@keyframes slam { 0% { transform: scale(2.6) rotate(-30deg); opacity: 0; } 65% { transform: scale(.9) rotate(-8deg); opacity: 1; } 100% { transform: scale(1) rotate(-12deg); opacity: 1; } }
@keyframes stamp { 0% { transform: scale(2.4) rotate(-35deg); opacity: 0; } 70% { transform: scale(.9) rotate(var(--r)); opacity: 1; } 100% { transform: scale(1) rotate(var(--r)); opacity: 1; } }
@keyframes cheer { 0%,100% { transform: translateY(0) rotate(0); } 25% { transform: translateY(-8px) rotate(-8deg); } 50% { transform: translateY(0) rotate(6deg); } 75% { transform: translateY(-4px) rotate(0); } }
@keyframes jump { 0%,100% { transform: translateY(0); } 20% { transform: translateY(-14px) rotate(-5deg); } 40% { transform: translateY(0); } 55% { transform: translateY(-7px) rotate(4deg); } 70% { transform: translateY(0); } }
@keyframes fall { 0% { transform: translateY(-40px) rotate(0); opacity: 0; } 10% { opacity: 1; } 100% { transform: translateY(300px) rotate(540deg); opacity: 0; } }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes wiggle { 0%,70%,100% { transform: rotate(-4deg); } 78% { transform: rotate(4deg); } 86% { transform: rotate(-6deg); } 93% { transform: rotate(2deg); } }
@keyframes dropdemo { 0%,8% { transform: scale(.6) translateY(-50px); opacity: 0; } 20% { transform: scale(.6) translateY(0); opacity: 1; } 26% { transform: scale(.6) translateY(-10px); } 32%,100% { transform: scale(.6) translateY(0); opacity: 1; } }
@keyframes slamdemo { 0%,10% { transform: scale(2.2) rotate(-25deg); opacity: 0; } 22% { transform: scale(.92) rotate(-8deg); opacity: 1; } 28%,100% { transform: scale(1) rotate(-10deg); opacity: 1; } }
@keyframes jointpop { 0% { transform: scale(0) rotate(-40deg); opacity: 0; } 60% { transform: scale(1.2) rotate(6deg); opacity: 1; } 100% { transform: none; opacity: 1; } }
@keyframes emberglow { 0%,100% { opacity: .25; transform: scale(1); } 50% { opacity: .8; transform: scale(1.6); } }
@keyframes wisp { 0% { transform: translate(0,0) scale(.6); opacity: 0; } 15% { opacity: .85; } 100% { transform: translate(-6px,-46px) scale(2.6); opacity: 0; } }
@keyframes exhale { 0%,45% { transform: translate(0,0) scale(.3); opacity: 0; } 55% { opacity: .9; } 100% { transform: translate(-26px,-30px) scale(1.8); opacity: 0; } }

.bob { animation: bob 2.6s ease-in-out infinite; transform-origin: 50% 90%; }
.march { animation: march 1.6s linear infinite; }
.nudge { animation: nudge 3.2s ease-in-out infinite; }
.flicker { animation: flicker .9s ease-in-out infinite; transform-origin: 50% 80%; }
.pop { animation: popin .6s cubic-bezier(.3,1.6,.5,1) both; }
.cardin { animation: cardin .5s cubic-bezier(.3,1.3,.5,1) both; }
.stampin { animation: stampin .5s cubic-bezier(.2,1.4,.5,1) .15s both; }
.slam { animation: slam .45s cubic-bezier(.2,1.4,.5,1) .2s both; }
.cheer { animation: cheer 1.2s ease-in-out .6s 2; }
.jump { animation: jump 2.4s ease-in-out infinite; }
.grow { animation: grow .9s cubic-bezier(.2,.9,.3,1) both; transform-origin: 0 50%; }
.wiggle { animation: wiggle 3s ease-in-out infinite; }
.jointpop { animation: jointpop .45s cubic-bezier(.3,1.6,.5,1) both; transform-box: fill-box; transform-origin: 0% 50%; }
.emberglow { animation: emberglow 1.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.wisp { animation: wisp 2.4s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.wisp2 { animation-delay: .8s; } .wisp3 { animation-delay: 1.6s; }
.exhale { animation: exhale 3s ease-out 1s infinite; transform-box: fill-box; transform-origin: center; }

@media (max-height: 700px) {
  .hero { height: 150px; } .hero .gaven { width: 130px; height: 130px; }
  .logo h1, .logo-tag { font-size: 34px; }
  .clue .prompt { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
