:root {
  --ink: #1f2a37;
  --muted: #5b6b7c;
  --card: #ffffff;
  --card-2: #eef3f8;
  --line: #e1e8f0;
  --accent: #ff7a2f;
  --accent-2: #ffe3d1;
  --good: #2fb36d;
  --warn: #f2b632;
  --bad: #e8505b;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(20, 40, 70, .18);

  --sky-top: #6ec1ff;
  --sky-bottom: #d4efff;
  --sun: #ffd54a;
  --hill-1: #9bd873;
  --hill-2: #7cc85a;
  --ground: #6dbb4d;
  --ground-2: #579f3c;
  --bush: #4aa043;
  --bush-2: #2f7a2e;
  --cloud: #ffffff;
  --mtn-1: #9db3d0;
  --mtn-2: #839dc0;
  --snow: #ffffff;
  --pond: radial-gradient(ellipse at 40% 35%, #c9eeff, #63b9e8 55%, #3d8fc4);

  font-family: ui-rounded, "SF Pro Rounded", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, sans-serif;
  color-scheme: light;
}
body[data-theme="ocean"] {
  --sky-top: #0f5ea8; --sky-bottom: #4fc0e8; --sun: #c9f6ff;
  --hill-1: #f5e2ad; --hill-2: #ecd08c; --ground: #f0d796; --ground-2: #dcbd72;
  --bush: #2fae86; --bush-2: #1d7c5f; --cloud: rgba(255,255,255,.35);
  --mtn-1: #1d6a9c; --mtn-2: #175a88; --snow: #1d6a9c;
}
body[data-theme="forest"] {
  --sky-top: #6fb8e0; --sky-bottom: #d6efe9; --sun: #fff1a8;
  --hill-1: #4f9a55; --hill-2: #3f8748; --ground: #4a9150; --ground-2: #3a7a41;
  --bush: #2f7d3d; --bush-2: #1d5e2b; --cloud: rgba(255,255,255,.85);
  --mtn-1: #6d9a86; --mtn-2: #5c8a76; --snow: #eef6f2;
  --pond: radial-gradient(ellipse at 40% 35%, #c3ecff, #4ea8d8 55%, #2f80b3);
}

body[data-theme="space"] {
  --sky-top: #04051a; --sky-bottom: #2a1d5c; --sun: #ffb36b;
  --hill-1: #9597ab; --hill-2: #7f8196; --ground: #a3a5b8; --ground-2: #7f8199;
  --bush: #767990; --bush-2: #50536b; --cloud: transparent;
  --mtn-1: #4f5270; --mtn-2: #43465f; --snow: #4f5270;
  --pond: radial-gradient(ellipse at 50% 35%, #6c6e85, #8b8da2 60%, #aeb0c1);
}
body[data-theme="desert"] {
  --sky-top: #4fa6e6; --sky-bottom: #ffe0a6; --sun: #fff3a8;
  --hill-1: #f3c47c; --hill-2: #e9b164; --ground: #f0c680; --ground-2: #dcaa5e;
  --bush: #98b24f; --bush-2: #6d8a33; --cloud: rgba(255,255,255,.7);
  --mtn-1: #c8683f; --mtn-2: #b35a35; --snow: #c8683f;
  --pond: radial-gradient(ellipse at 40% 35%, #b9f0ff, #3fb3d9 55%, #2789b3);
}
body[data-theme="arctic"] {
  --sky-top: #16305e; --sky-bottom: #a9daf0; --sun: #f4f8ff;
  --hill-1: #f2f9ff; --hill-2: #dfeefa; --ground: #f4faff; --ground-2: #d3e6f5;
  --bush: #d8ebf8; --bush-2: #a5c6e0; --cloud: rgba(255,255,255,.8);
  --mtn-1: #a6c1db; --mtn-2: #8eaecd; --snow: #ffffff;
  --pond: radial-gradient(ellipse at 40% 35%, #ffffff, #bfe7f7 50%, #8ccbe6);
}
body[data-theme="city"] {
  --sky-top: #4766c9; --sky-bottom: #ffc59c; --sun: #ffcf73;
  --hill-1: #93d26e; --hill-2: #7cc35a; --ground: #7ec45c; --ground-2: #62a845;
  --bush: #4aa043; --bush-2: #2f7a2e; --cloud: rgba(255,255,255,.85);
}
body[data-theme="jungle"] {
  --sky-top: #5fc2a6; --sky-bottom: #dcf8c8; --sun: #fff3a0;
  --hill-1: #55ab4c; --hill-2: #449a41; --ground: #4f9f40; --ground-2: #3b8431;
  --bush: #2f8f3c; --bush-2: #1b6a2a; --cloud: rgba(255,255,255,.75);
  --mtn-1: #74b394; --mtn-2: #61a382; --snow: #74b394;
  --pond: radial-gradient(ellipse at 40% 35%, #b9f3e6, #3fb3a0 55%, #2a8a7b);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body { background: var(--sky-bottom); color: var(--ink); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }

/* ---------- Scene ---------- */
.scene { position: fixed; inset: 0; overflow: hidden; }
.sky { position: absolute; inset: 0; background: linear-gradient(var(--sky-top), var(--sky-bottom) 60%); }
.land { position: absolute; left: 0; right: 0; bottom: 0; height: 58%; }
.layer { position: absolute; inset: 0; pointer-events: none; }

/* Time of day (works on top of any scene) and the "too loud" dimming combine here. */
.sky, .land, .layer, .bushes {
  filter: brightness(calc(var(--tb, 1) * var(--sb, 1))) saturate(calc(var(--ts, 1) * var(--ss, 1))) sepia(var(--tsep, 0)) hue-rotate(var(--thue, 0deg));
  transition: filter 1.2s ease;
}
.is-shy, .is-scatter { --sb: .82; --ss: .55; }
body[data-time="sunset"] { --tb: .9; --ts: 1.3; --tsep: .38; --thue: -14deg; }
body[data-time="night"] { --tb: .4; --ts: .7; --thue: 12deg; }
body[data-time="sunset"] .sun { transform: translateY(160%) scale(1.15); background: #ff9a4a; box-shadow: 0 0 80px 30px rgba(255,140,60,.55); }
body[data-time="night"] .sun { opacity: 0; }
.sun { transition: transform 1.4s ease, opacity 1s, background 1s; }

.nightsky { position: absolute; inset: 0; pointer-events: none; }
.nightsky > * { opacity: 0; transition: opacity 1.4s ease; }
.n-glow { position: absolute; left: 0; right: 0; top: 22%; height: 36%; background: linear-gradient(transparent, rgba(255,128,64,.38) 60%, transparent); }
.n-stars { position: absolute; inset: 0 0 60% 0; background-size: 600px 340px;
  background-image:
    radial-gradient(2px 2px at 8% 20%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 19% 62%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 31% 12%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 44% 48%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 57% 26%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 66% 78%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 79% 8%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 88% 54%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 95% 30%, #fff 50%, transparent 51%); }
.moon { position: absolute; top: 11%; right: 12%; width: clamp(60px, 7vw, 100px); aspect-ratio: 1; border-radius: 50%;
  box-shadow: 18px -8px 0 0 #fff4cf; filter: drop-shadow(0 0 18px rgba(255,244,200,.7)); }
.n-flies { position: absolute; inset: 0; }
.n-tint { position: absolute; inset: 0; background: linear-gradient(rgba(12,18,70,.6), rgba(20,24,80,.35) 50%, rgba(10,20,50,.2)); }
body[data-time="night"] .n-tint { opacity: 1; }
body[data-time="sunset"] .n-glow { opacity: 1; }
body[data-time="night"] .n-stars { opacity: .95; animation: twinkle 4s ease-in-out infinite; }
body[data-time="night"] .moon, body[data-time="night"] .n-flies { opacity: 1; }

/* Scenery */
.mountains { position: absolute; left: 0; right: 0; bottom: 49%; height: 24%; }
.mtn { position: absolute; bottom: 0; clip-path: polygon(0 100%, 50% 0, 100% 100%);
  background: linear-gradient(var(--snow) 0 15%, var(--mtn-1) 15.5%); }
.m1 { left: -6%; width: 36%; height: 80%; }
.m2 { left: 20%; width: 34%; height: 100%; background: linear-gradient(var(--snow) 0 14%, var(--mtn-2) 14.5%); }
.m3 { left: 50%; width: 28%; height: 66%; }
.m4 { left: 68%; width: 42%; height: 90%; background: linear-gradient(var(--snow) 0 14%, var(--mtn-2) 14.5%); }
.decor { position: absolute; line-height: 1; user-select: none; }
.decor.back { transform: translate(-50%, -90%); filter: saturate(.9) drop-shadow(0 4px 2px rgba(0,0,0,.12)); }
.decor.small { transform: translate(-50%, -50%); opacity: .95; }
.pond { position: absolute; left: 4%; top: 58%; width: 17vw; height: 4.8vw; border-radius: 50%; background: var(--pond);
  box-shadow: inset 0 .5vw 0 rgba(0,0,0,.08), 0 0 0 .5vw rgba(255,255,255,.18); }
.pond::after { content: ""; position: absolute; left: 22%; top: 30%; width: 26%; height: 14%; border-radius: 50%; background: rgba(255,255,255,.45); animation: shimmer 4s ease-in-out infinite; }
.backdrop { position: absolute; inset: 0; pointer-events: none; }
.bld { position: absolute; bottom: 48%; border-radius: 3px 3px 0 0;
  background:
    repeating-linear-gradient(180deg, var(--bld) 0 7px, transparent 7px 13px),
    repeating-linear-gradient(90deg, var(--bld) 0 6px, rgba(255,222,140,.85) 6px 11px),
    var(--bld);
  background-position: 0 10px, 0 0, 0 0; }
.bld::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 10px; background: var(--bld); border-radius: 3px 3px 0 0; }
.planet { position: absolute; line-height: 1; filter: drop-shadow(0 0 18px rgba(120,170,255,.5)); }
.crater { box-shadow: inset 0 .6vw .4vw rgba(0,0,0,.22), 0 -2px 0 rgba(255,255,255,.35); }
.prop { filter: drop-shadow(0 4px 2px rgba(0,0,0,.15)); }
.road { position: absolute; left: 0; right: 0; top: 51.6%; height: 26px; background: #5d6470; border-top: 2px solid #8a919c; border-bottom: 2px solid #474d57; }
.road::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px;
  background: repeating-linear-gradient(90deg, #ffd75e 0 18px, transparent 18px 38px); }
.car { line-height: 1; animation: driveL linear infinite; }
.car.r { animation-name: fly; }
.car.r > span { transform: scaleX(-1); }
.ship > span { transform: rotate(45deg); }
.launch { left: 88%; top: 44%; font-size: 30px; opacity: 0; animation: launch 18s ease-in infinite; }
.mover { position: absolute; left: 0; will-change: transform; }
.mover > span { display: inline-block; }
.cross { animation: fly linear infinite; }
.ufo > span { animation: wobble 2.4s ease-in-out infinite; }
.plane > span { transform: rotate(45deg); }
.balloon { bottom: -12%; font-size: 30px; animation: rise linear infinite; }
.flake { top: -5%; color: #fff; text-shadow: 0 0 4px rgba(90,140,190,.7); animation: snow linear infinite; }
.tumble { width: 38px; height: 38px; border-radius: 50%; border: 3px dotted #9a7040; box-shadow: inset 0 0 0 6px rgba(154,112,64,.35); animation: roll linear infinite; }
.aurora { position: absolute; left: -10%; right: -10%; top: 2%; height: 34%; filter: blur(18px);
  background:
    radial-gradient(ellipse 30% 55% at 22% 50%, rgba(90,255,170,.6), transparent 70%),
    radial-gradient(ellipse 34% 45% at 55% 40%, rgba(80,225,255,.5), transparent 70%),
    radial-gradient(ellipse 26% 55% at 85% 58%, rgba(175,125,255,.45), transparent 70%);
  animation: sway 11s ease-in-out infinite alternate, glow 7s ease-in-out infinite; }
.bird { width: 34px; animation: fly linear infinite; }
.bird svg { display: block; animation: flap .45s ease-in-out infinite alternate; }
.petal { font-size: 18px; animation: breeze linear infinite; }
.fish { width: 64px; opacity: .3; animation: swim linear infinite; }
.bubble { bottom: -30px; border-radius: 50%; border: 2px solid rgba(255,255,255,.65); background: rgba(255,255,255,.12); animation: rise linear infinite; }
.rays { position: absolute; inset: 0 0 30% 0; background: repeating-linear-gradient(100deg, rgba(255,255,255,.08) 0 50px, transparent 50px 150px);
  -webkit-mask-image: linear-gradient(#000, transparent); mask-image: linear-gradient(#000, transparent); animation: sway 9s ease-in-out infinite alternate; }
.firefly { width: 6px; height: 6px; border-radius: 50%; background: #fff6a8; box-shadow: 0 0 10px 4px rgba(255,236,120,.65);
  animation: glow 3s ease-in-out infinite, wander 10s ease-in-out infinite alternate; }
.shooting { top: 8%; left: 15%; width: 140px; height: 2px; background: linear-gradient(270deg, #fff, transparent); opacity: 0; animation: shoot 13s linear infinite; }

.sun {
  position: absolute; top: 12%; right: 11%; width: clamp(70px, 9vw, 130px); aspect-ratio: 1; border-radius: 50%;
  background: var(--sun); box-shadow: 0 0 60px 10px color-mix(in srgb, var(--sun) 60%, transparent);
  transition: transform 1.2s ease;
}
.is-shy .sun { transform: translateY(40%) scale(.85); }
.is-full .sun { animation: pulse 1.6s ease-in-out infinite; }

.stars { position: absolute; inset: 0 0 40% 0; opacity: 0; transition: opacity 1s;
  background-image:
    radial-gradient(2px 2px at 10% 20%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 25% 8%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 38% 30%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 52% 14%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 63% 34%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 72% 6%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 84% 26%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 93% 12%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 5% 40%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 46% 44%, #fff 50%, transparent 51%);
}
body[data-theme="space"] .stars { opacity: .9; animation: twinkle 4s ease-in-out infinite; }
body[data-theme="space"] .stars { inset: 0 0 45% 0; background-size: 520px 300px; }
body[data-theme="arctic"] .stars { opacity: .45; }
body[data-theme="space"] .sun { background: radial-gradient(circle at 35% 35%, #ffd6a8, #e07a3f 70%, #b4532a); box-shadow: none; }
body[data-theme="space"] .sun::after { content: ""; position: absolute; left: -38%; right: -38%; top: 40%; height: 22%;
  border: 5px solid rgba(255,214,170,.85); border-radius: 50%; transform: rotate(-16deg); }
body[data-theme="desert"] .sun { width: clamp(90px, 11vw, 160px); }
body[data-theme="desert"] .mtn { clip-path: polygon(0 100%, 10% 32%, 14% 0, 86% 0, 90% 32%, 100% 100%);
  background: linear-gradient(#d4774c 0 30%, #bf6339 30% 60%, #a9542f 60%); }
body[data-theme="desert"] .m3 { display: none; }
body[data-theme="city"] .mountains { display: none; }

.cloud { position: absolute; left: 0; width: 160px; height: 46px; border-radius: 50px; background: var(--cloud);
  animation: drift 120s linear infinite; }
.cloud::before, .cloud::after { content: ""; position: absolute; background: var(--cloud); border-radius: 50%; }
.cloud::before { width: 70px; height: 70px; left: 22px; top: -34px; }
.cloud::after { width: 54px; height: 54px; left: 78px; top: -22px; }
.c1 { top: 16%; --sc: 1; animation-delay: -20s; }
.c2 { top: 9%; --sc: .7; animation-duration: 160s; animation-delay: -90s; }
.c3 { top: 27%; --sc: .85; animation-duration: 140s; animation-delay: -50s; }
body[data-theme="ocean"] .cloud { border-radius: 50%; width: 40px; height: 40px; }
body[data-theme="ocean"] .cloud::before, body[data-theme="ocean"] .cloud::after { width: 18px; height: 18px; left: 44px; top: -20px; }
body[data-theme="ocean"] .cloud::after { width: 12px; height: 12px; left: 20px; top: -34px; }

.hill { position: absolute; bottom: 0; border-radius: 50% 50% 0 0 / 100% 100% 0 0; }
.h1 { left: -15%; width: 75%; height: 100%; background: var(--hill-1); }
.h2 { right: -20%; width: 85%; height: 90%; background: var(--hill-2); }
.ground { position: absolute; left: 0; right: 0; bottom: 0; height: 86%; background: linear-gradient(var(--ground), var(--ground-2)); }

.bushes { position: absolute; left: -3%; right: -3%; bottom: -34px; height: 96px; display: flex; justify-content: space-between; z-index: 2000; pointer-events: none; }
.bush { flex: 0 0 auto; width: clamp(90px, 11vw, 170px); height: 96px; margin: 0 -20px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--bush), var(--bush-2)); transform-origin: bottom center; }
.is-shy .bush { animation: rustle .5s ease-in-out 2; }

/* ---------- Zoo ---------- */
.zoo { position: absolute; left: 3%; right: 3%; top: 50%; bottom: 100px; }
.zoo-empty { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); background: rgba(255,255,255,.9);
  padding: 16px 24px; border-radius: 20px; font-weight: 700; font-size: clamp(16px, 1.8vw, 24px); text-align: center; box-shadow: var(--shadow); pointer-events: auto; }

.critter { position: absolute; transform: translate(-50%, -78%); display: flex; flex-direction: column; align-items: center;
  font-size: min(150px, calc(var(--cell, 120px) * .56 * var(--s, 1))); pointer-events: none; }
.pop { position: relative; }
.pop::before { content: ""; position: absolute; left: 50%; bottom: -.04em; width: .8em; height: .14em; transform: translateX(-50%);
  border-radius: 50%; background: rgba(0,0,0,.16); transition: opacity .4s; }
.duck { transform-origin: bottom center; transition: transform .35s ease-in, opacity .3s; transition-delay: var(--hd, 0s); }
.face { display: block; }
.face.right { transform: scaleX(-1); }
.emoji { display: block; line-height: 1.05; animation: bob 3.2s ease-in-out infinite; animation-delay: var(--d, 0s);
  filter: drop-shadow(0 .05em .03em rgba(0,0,0,.18)); }
.hide { position: absolute; left: 50%; bottom: -.08em; width: 1.25em; height: .78em; transform: translateX(-50%) scale(0);
  transform-origin: bottom center; border-radius: 50% 50% 44% 44% / 62% 62% 38% 38%;
  background: radial-gradient(circle at 35% 30%, var(--bush), var(--bush-2)); box-shadow: inset 0 -.06em 0 rgba(0,0,0,.14);
  transition: transform .35s cubic-bezier(.3,1.5,.5,1); transition-delay: var(--hd, 0s); }
.eyes { position: absolute; left: 50%; top: 14%; font-size: .28em; transform: translateX(-50%); opacity: 0; transition: opacity .3s .45s; }
.tag { margin-top: .14em; font-size: max(13px, .2em); font-weight: 800; background: rgba(255,255,255,.94); color: var(--ink);
  padding: .14em .65em; border-radius: 999px; white-space: nowrap; max-width: 9em; overflow: hidden; text-overflow: ellipsis;
  box-shadow: 0 2px 6px rgba(0,0,0,.15); transition: opacity .4s; }

.is-shy .duck { transform: translateY(.4em) scale(.55); opacity: 0; }
.is-shy .hide { transform: translateX(-50%) scale(1); }
.is-shy .eyes { opacity: 1; animation: peek 3s ease-in-out infinite; animation-delay: var(--d, 0s); }
.is-shy .tag { opacity: .6; }
.is-shy .pop::before { opacity: 0; }
/* order matters: later rules win ties */
.is-full:not(.is-shy) .emoji { animation: dance .7s ease-in-out infinite; animation-delay: var(--d, 0s); }
.zoo .critter.walking .emoji { animation: hop .45s ease-in-out infinite; }
.zoo .critter.fleeing .emoji { animation: hop .2s ease-in-out infinite; }
/* Activities at play spots (see SCENERY in app.js) */
.zoo .critter.act-splash .emoji { animation: dip 1.1s ease-in-out infinite; }
.zoo .critter.act-skate .emoji { animation: glide 2.2s ease-in-out infinite alternate; }
.zoo .critter.act-hop .emoji { animation: moonhop 1.8s ease-in-out infinite; }
.zoo .critter.act-sniff .emoji { animation: sniff 1.3s ease-in-out infinite; transform-origin: bottom center; }
.zoo .critter.act-nap .emoji { animation: nap 3s ease-in-out infinite; transform-origin: bottom center; }
.zoo .critter.act-eat .emoji { animation: munch .38s ease-in-out infinite; transform-origin: bottom center; }
.zoo .critter.act-warm .emoji { animation: warm 2s ease-in-out infinite; transform-origin: bottom center; }
.zoo .critter.act-dig .emoji { animation: dig .32s ease-in-out infinite; transform-origin: bottom center; }
.zoo .critter.act-play .emoji { animation: bounce .6s ease-in-out infinite; }
.zoo .critter.greet .emoji { animation: wave .25s ease-in-out 5; transform-origin: bottom center; }
.critter.act-splash .pop::before, .critter.act-skate .pop::before { background: rgba(255,255,255,.6); animation: ripple 1.1s ease-out infinite; }
.fx { position: absolute; font-size: max(14px, calc(var(--cell, 120px) * .2)); line-height: 1; pointer-events: none; transform: translate(-50%, -150%);
  animation: fxrise 1.6s ease-out forwards; }

.is-nervous:not(.is-shy) .emoji { animation: shiver .22s linear infinite; }
.critter.fleeing .tag { opacity: 0; }

.critter.new::after { content: "✨"; position: absolute; top: -.25em; right: -.3em; font-size: .4em; animation: sparkle 1.8s ease-out forwards; }

/* ---------- Shy message ---------- */
.shy-msg { position: fixed; left: 50%; top: 22%; transform: translateX(-50%); z-index: 40; background: rgba(255,255,255,.95);
  padding: 14px 26px; border-radius: 999px; font-size: clamp(18px, 2.3vw, 34px); font-weight: 800; box-shadow: var(--shadow);
  text-align: center; animation: floaty 3s ease-in-out infinite; max-width: calc(100vw - 32px); }
.shy-msg b { display: block; }
.shy-msg span { display: block; font-size: .6em; font-weight: 700; color: var(--muted); }

/* ---------- Top bar ---------- */
.topbar { position: fixed; top: 12px; left: 12px; right: 12px; z-index: 50; display: flex; align-items: center; gap: 8px;
  padding: 7px 8px 7px 14px; background: rgba(255,255,255,.86); backdrop-filter: blur(10px); border-radius: 999px; box-shadow: var(--shadow); }
.brand { display: flex; align-items: center; gap: 6px; font-weight: 900; font-size: 19px; white-space: nowrap; }
.brand-logo { font-size: 24px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--card-2);
  border: 0; font-weight: 700; white-space: nowrap; font-size: 15px; }
.pill b { font-variant-numeric: tabular-nums; }
.mic { cursor: pointer; }
.mic .dot { width: 10px; height: 10px; border-radius: 50%; background: #9aa6b2; }
.mic.ok .dot { background: var(--good); box-shadow: 0 0 0 0 rgba(47,179,109,.6); animation: ping 2s infinite; }
.mic.warn .dot { background: var(--warn); }
.mic.bad { background: #fde6e8; }
.mic.bad .dot { background: var(--bad); }
.next { flex: 1; min-width: 120px; display: flex; align-items: center; gap: 10px; }
.next-bar { flex: 1; height: 12px; border-radius: 999px; background: var(--card-2); overflow: hidden; }
.next-fill { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #ffb347, var(--accent)); transition: width .25s linear; }
.is-shy .next-fill, .is-scatter .next-fill { background: #b7c2cf; }
.next-text { font-weight: 700; color: var(--muted); font-size: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; min-width: 9.5em; }
.icon-btn { border: 0; width: 38px; height: 38px; border-radius: 50%; background: var(--card-2); cursor: pointer; font-size: 17px;
  display: inline-grid; place-items: center; flex: 0 0 auto; }
.icon-btn:hover { background: var(--line); }
.is-paused #pauseBtn, .is-muted #muteBtn { background: var(--accent); color: #fff; }
.is-muted #muteBtn { animation: pulse 1.6s ease-in-out infinite; }
.is-muted .meter-fill { background: #b7c2cf !important; }

/* ---------- Dock ---------- */
.dock { position: fixed; bottom: 12px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; gap: 4px; padding: 6px;
  background: rgba(255,255,255,.88); backdrop-filter: blur(10px); border-radius: 22px; box-shadow: var(--shadow); max-width: calc(100vw - 24px); overflow-x: auto; }
.dock-btn { border: 0; background: none; border-radius: 16px; padding: 6px 10px; cursor: pointer; display: flex; flex-direction: column; align-items: center;
  min-width: 64px; font-size: 12px; font-weight: 700; color: var(--muted); }
.dock-btn span:first-child { font-size: 24px; line-height: 1.15; }
.dock-btn span:last-child { line-height: 16px; } /* same label height for all, so a smaller label sits on the same line */
.dock-btn:hover { background: var(--card-2); }
.dock-btn.on { background: var(--accent-2); color: var(--ink); }

/* ---------- Widgets ---------- */
.widget { position: fixed; z-index: 100; background: var(--card); border-radius: var(--radius); box-shadow: 0 14px 40px rgba(20,40,70,.25);
  scale: var(--ui, 1); transform-origin: top left;
  max-height: calc((100vh - 170px) / var(--ui, 1)); overflow: auto; resize: both; min-width: 160px; min-height: 90px; display: flex; flex-direction: column; }
.widget.dragging { opacity: .92; box-shadow: 0 24px 60px rgba(20,40,70,.35); }
.widget.flash { animation: flash .5s; }
.widget.ringing { animation: ring .5s ease-in-out 6; outline: 4px solid var(--accent); }
.w-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 8px 6px 14px; cursor: grab;
  user-select: none; touch-action: none; font-weight: 800; position: sticky; top: 0; background: var(--card); z-index: 1; }
.dragging .w-head { cursor: grabbing; }
.w-close { width: 30px; height: 30px; font-size: 14px; }
.w-body { padding: 4px 14px 14px; display: flex; flex-direction: column; gap: 10px; flex: 1; }

.btn { border: 0; border-radius: 12px; padding: 9px 14px; background: var(--card-2); font-weight: 700; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--line); }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(.95); background: var(--accent); }
.btn.danger { background: #fde6e8; color: #b42332; }
.btn.sm { padding: 6px 10px; font-size: 14px; }
.btn.big { padding: 12px 18px; font-size: 18px; }
button:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid #4a90e2; outline-offset: 2px; }
.row { display: flex; gap: 8px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row.end { justify-content: flex-end; flex-wrap: wrap; }
.row.center { justify-content: center; flex-wrap: wrap; }
.hint { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.4; }
.hint.warn { color: #9a5b00; }
.center { text-align: center; }
.input { border: 2px solid var(--line); border-radius: 12px; padding: 8px 10px; background: #fff; }
.input.slim { padding: 6px 8px; border-radius: 10px; max-width: 180px; }
.input.num { width: 70px; }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 14px; }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; font-weight: 600; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
input[type=range] { accent-color: var(--accent); width: 100%; }

/* Noise meter */
.meter { position: relative; height: 34px; border-radius: 12px; background: var(--card-2); overflow: hidden; }
.meter-fill { height: 100%; width: 0; background: var(--good); border-radius: 12px; transition: width .08s linear, background .3s; }
.meter-mark { position: absolute; top: -4px; bottom: -4px; width: 4px; margin-left: -2px; background: var(--ink); border-radius: 2px; }
.meter-mark::after { content: "limit"; position: absolute; top: 6px; left: 7px; font-size: 11px; font-weight: 800; color: var(--ink); opacity: .7; }
.meter-status { font-size: 20px; font-weight: 800; text-align: center; }

/* Timer & clock */
.big-time { font-size: 64px; font-weight: 900; text-align: center; font-variant-numeric: tabular-nums; line-height: 1.05; letter-spacing: -.02em; }
.clock-date { text-align: center; color: var(--muted); font-weight: 700; }
.tbar { height: 8px; border-radius: 99px; background: var(--card-2); overflow: hidden; }
.tbar div { height: 100%; width: 100%; background: var(--accent); border-radius: 99px; }

/* Picker */
.pick-stage { text-align: center; padding: 8px 0; border-radius: 16px; background: var(--card-2); }
.pick-emoji { font-size: 64px; line-height: 1.1; }
.pick-name { font-size: 30px; font-weight: 900; min-height: 1.2em; }
.pick-stage.win { animation: winpop .5s cubic-bezier(.2,1.6,.4,1); background: var(--accent-2); }

/* Groups */
.groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.group { background: var(--card-2); border-radius: 14px; padding: 8px 10px; }
.group-title { font-weight: 900; margin-bottom: 4px; }
.gchip { font-weight: 600; padding: 2px 0; }

/* Voice level */
.voice-big { font-size: 26px; font-weight: 900; text-align: center; }
.voice-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.voice-btn { border: 0; border-radius: 14px; background: var(--card-2); padding: 8px 2px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.voice-btn b { font-size: 18px; }
.voice-btn .vi { font-size: 24px; }
.voice-btn small { font-size: 11px; font-weight: 700; color: var(--muted); text-align: center; line-height: 1.1; }
.voice-btn.on { background: var(--accent); color: #fff; }
.voice-btn.on small { color: #fff; }

/* Traffic light */
.traffic { display: flex; flex-direction: column; gap: 10px; align-items: center; background: #2b3440; border-radius: 22px; padding: 14px; }
.light { width: 72px; height: 72px; border-radius: 50%; border: 0; cursor: pointer; opacity: .22; transition: opacity .2s, box-shadow .2s; }
.light.red { background: #ff4d4d; } .light.yellow { background: #ffd23f; } .light.green { background: #3ddc84; }
.light.on { opacity: 1; box-shadow: 0 0 28px currentColor; }
.light.red.on { color: #ff4d4d; } .light.yellow.on { color: #ffd23f; } .light.green.on { color: #3ddc84; }

/* Note */
.note { width: 100%; min-height: 140px; flex: 1; border: 0; resize: none; background: #fffbe6; border-radius: 12px; padding: 12px; font-weight: 700; line-height: 1.25; }

/* Extras tray */
.dock-sep { width: 2px; align-self: stretch; margin: 6px 4px; background: var(--line); border-radius: 2px; flex: 0 0 auto; }
.extras-btn.open, .extras-btn.has { background: var(--accent-2); color: var(--ink); }
.extras-tray { position: fixed; z-index: 70; bottom: 96px; left: 50%; transform: translateX(-50%); width: min(420px, calc(100vw - 24px));
  background: rgba(255,255,255,.97); backdrop-filter: blur(10px); border-radius: 22px; box-shadow: var(--shadow); padding: 10px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px; animation: winpop .25s cubic-bezier(.2,1.4,.4,1); }
.tray-title { grid-column: 1 / -1; font-weight: 900; padding: 4px 8px 2px; }
.tray-item { border: 0; background: var(--card-2); border-radius: 14px; padding: 10px; display: flex; gap: 10px; align-items: center; text-align: left; cursor: pointer; }
.tray-item:hover { background: var(--line); }
.tray-item.on { background: var(--accent-2); outline: 2px solid var(--accent); }
.ti-icon { font-size: 28px; line-height: 1; }
.ti-text { display: flex; flex-direction: column; }
.ti-text small { color: var(--muted); font-weight: 600; font-size: 12px; }

/* Draw (whiteboard): one simple toolbar row */
.draw-body { padding-bottom: 10px; gap: 8px; }
.draw-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.dsep { width: 1px; align-self: stretch; background: var(--line); margin: 2px 4px; }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 3px solid #fff; background: var(--sw); cursor: pointer;
  box-shadow: 0 0 0 1px var(--line); padding: 0; flex: none; }
.swatch.on { box-shadow: 0 0 0 3px var(--accent); transform: scale(1.12); }
.swatch.custom { background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); -webkit-appearance: none; appearance: none; }
.swatch.custom::-webkit-color-swatch-wrapper { padding: 0; }
.swatch.custom::-webkit-color-swatch { border: 0; border-radius: 50%; opacity: 0; }
.swatch.custom.on::-webkit-color-swatch { opacity: 1; }
.size-btn { width: 38px; height: 34px; padding: 0; display: inline-grid; place-items: center; }
.size-btn i { width: var(--d); height: var(--d); border-radius: 50%; background: var(--dc, #1d2433); }
.size-btn.ring i { border: 2px solid #000; }
.paper-sel { width: auto; padding: 5px 8px; font-size: 14px; font-weight: 700; }
.draw-tools .btn.on { background: var(--accent-2); outline: 2px solid var(--accent); }
.draw-tools .btn:disabled { opacity: .45; cursor: default; }
.draw-board { position: relative; flex: 1; min-height: 200px; display: flex; flex-direction: column; border-radius: 12px; overflow: hidden; }
.draw-canvas { flex: 1; width: 100%; min-height: 0; display: block; background-color: #fff; border-radius: 12px;
  box-shadow: inset 0 0 0 1px var(--line); touch-action: none; cursor: crosshair; }
.draw-canvas[data-tool="erase"] { cursor: none; }
/* Paper: 40px steps; keep in step with paintPaper() in app.js (used by Save). */
.draw-canvas[data-paper="grid"] { background-image: linear-gradient(#c7d6ea 1px, transparent 1px), linear-gradient(90deg, #c7d6ea 1px, transparent 1px);
  background-size: 40px 40px; background-position: -1px -1px; }
.draw-canvas[data-paper="lined"] { background-image: linear-gradient(90deg, transparent 69px, #f2a3a3 69px 71px, transparent 71px),
  linear-gradient(transparent 39px, #c7d6ea 39px 40px); background-size: 100% 100%, 100% 40px; }
.draw-canvas[data-paper="dots"] { background-image: radial-gradient(circle, #c7d6ea 2.5px, transparent 3px); background-size: 40px 40px; background-position: 20px 20px; }
.erase-ring { position: absolute; left: 0; top: 0; border-radius: 50%; border: 3px solid #000; background: rgba(255,255,255,.25);
  box-shadow: 0 0 0 2px #fff, inset 0 0 0 1px #fff; pointer-events: none; }
.erase-ring[hidden] { display: none; }
.widget.w-max { max-height: none; resize: none; }

/* Document & video */
.w-fill { min-height: 0; }
.frame { flex: 1; width: 100%; min-height: 220px; border: 0; border-radius: 12px; background: #f1f4f8; }
.frame.video { background: #000; }
.media-bar { justify-content: space-between; }
.media-name { font-weight: 700; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 70%; }
.grow { flex: 1; }
.media-setup { display: flex; flex-direction: column; gap: 10px; align-items: stretch; justify-content: center; flex: 1; padding: 8px 6px; }
.media-setup .input { flex: 1; min-width: 0; }
.media-icon { font-size: 54px; text-align: center; }
.or { text-align: center; color: var(--muted); font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .1em; }

/* Poll */
.seg { display: flex; background: var(--card-2); border-radius: 12px; padding: 4px; gap: 4px; }
.seg-btn { flex: 1; border: 0; background: none; border-radius: 9px; padding: 8px; font-weight: 700; cursor: pointer; color: var(--muted); }
.seg-btn.on { background: #fff; color: var(--ink); box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.poll-opts { display: flex; flex-direction: column; gap: 6px; }
.poll-opts .input { flex: 1; min-width: 0; }
.letter { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 14px; flex: 0 0 auto; }
.poll-q { font-size: 24px; font-weight: 900; text-align: center; line-height: 1.2; }
.poll-row { display: flex; gap: 6px; align-items: center; }
.poll-opt { position: relative; flex: 1; display: flex; align-items: center; gap: 10px; border: 2px solid var(--line); background: #fff; border-radius: 14px;
  padding: 10px 12px; font-size: 18px; font-weight: 800; cursor: pointer; overflow: hidden; text-align: left; }
.poll-opt:active { transform: scale(.98); }
.poll-fill { position: absolute; inset: 0 auto 0 0; background: var(--accent-2); transition: width .5s ease; z-index: 0; }
.poll-opt > :not(.poll-fill) { position: relative; z-index: 1; }
.poll-label { flex: 1; }
.poll-count { font-size: 15px; color: var(--muted); font-variant-numeric: tabular-nums; }
.poll-minus { width: 32px; height: 32px; font-size: 18px; font-weight: 900; }
.tf-true .letter { background: var(--good); } .tf-false .letter { background: var(--bad); }
.tf-true .poll-fill { background: #d4f3e2; } .tf-false .poll-fill { background: #fbdcdf; }
.poll-row.top .poll-opt { border-color: var(--accent); }

/* Scoreboard */
.score-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.team { position: relative; border-radius: 16px; padding: 10px 8px; background: color-mix(in srgb, var(--team) 14%, #fff); border: 3px solid var(--team);
  display: flex; flex-direction: column; gap: 6px; align-items: center; }
.score-name { width: 100%; border: 0; background: transparent; text-align: center; font-weight: 900; font-size: 17px; color: var(--ink); padding: 2px 22px; }
.team-score { position: relative; border: 0; background: none; font-size: 52px; font-weight: 900; line-height: 1; color: var(--team); cursor: pointer; font-variant-numeric: tabular-nums; }
.crown { position: absolute; top: -.45em; left: 50%; transform: translateX(-50%); font-size: .45em; }
.team-x { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; font-size: 11px; }

/* Dice */
.tray { display: flex; gap: 12px; justify-content: center; padding: 6px 0; }
.die { width: 72px; height: 72px; border-radius: 16px; background: #fff; border: 3px solid var(--ink); display: grid; grid-template-columns: repeat(3, 1fr); padding: 8px; gap: 2px; }
.die i { display: block; border-radius: 50%; margin: 3px; }
.die i.p { background: var(--ink); }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 104px; transform: translate(-50%, 20px); z-index: 300; background: var(--ink); color: #fff;
  padding: 10px 18px; border-radius: 999px; font-weight: 700; font-size: 18px; opacity: 0; transition: opacity .3s, transform .3s; pointer-events: none; max-width: calc(100vw - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Party ---------- */
.party { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; background: rgba(20,30,60,.25); padding: 16px; }
.party-card { background: #fff; border-radius: 28px; padding: 28px 36px; text-align: center; box-shadow: 0 30px 80px rgba(0,0,0,.35); animation: winpop .6s cubic-bezier(.2,1.6,.4,1); max-width: 520px; }
.party-card h2 { margin: 4px 0; font-size: 36px; }
.party-card p { color: var(--muted); font-size: 18px; font-weight: 600; }
.party-emoji { font-size: 72px; }
.confetti { position: fixed; top: -24px; width: 10px; height: 16px; z-index: 401; border-radius: 2px; pointer-events: none; animation: fall linear forwards; }

/* ---------- Modals ---------- */
.modal { border: 0; border-radius: 24px; padding: 0; width: 100%; max-width: min(560px, calc(100vw - 32px)); color: var(--ink); background: var(--card); box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.modal.wide { max-width: min(860px, calc(100vw - 32px)); }
.modal::backdrop { background: rgba(15,25,50,.45); backdrop-filter: blur(3px); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 4px; }
.modal-head h2 { margin: 0; }
.modal-body { padding: 16px 22px 22px; max-height: 72vh; overflow: auto; }
.tabs { display: flex; gap: 4px; padding: 4px 16px 0; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.tab { border: 0; background: none; padding: 10px 12px; font-weight: 700; color: var(--muted); border-bottom: 3px solid transparent; cursor: pointer; }
.tab[aria-selected="true"] { color: var(--ink); border-color: var(--accent); }
.panel { display: flex; flex-direction: column; gap: 14px; }
.panel h3 { margin: 6px 0 0; }
.panel p { margin: 0; line-height: 1.5; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.names { font-weight: 600; resize: vertical; min-height: 120px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 2px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 12px 4px 6px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.chip.on { border-color: var(--accent); background: var(--accent-2); }
.chip-emoji { font-size: 22px; }
.animal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 4px; background: var(--card-2); border-radius: 16px; padding: 10px; }
.grid-title { grid-column: 1 / -1; font-weight: 800; margin-bottom: 4px; }
.ag { border: 0; background: #fff; border-radius: 12px; font-size: 28px; padding: 4px; cursor: pointer; }
.ag.taken { opacity: .45; }
.ag.on { outline: 3px solid var(--accent); }
.welcome h1 { margin: 4px 0 8px; font-size: 30px; }
.welcome .lead { font-size: 17px; line-height: 1.5; margin: 0 0 8px; }
.welcome .field { margin: 10px 0; }
.hero-emoji { font-size: 40px; letter-spacing: 4px; }
.steps { margin: 8px 0; padding-left: 22px; line-height: 1.7; font-weight: 600; }
.kbd { display: inline-block; border: 2px solid var(--line); border-bottom-width: 3px; border-radius: 7px; padding: 0 7px; font-weight: 800; font-size: 13px; background: #fff; }
.panel a:not(.btn) { color: #c4531a; font-weight: 700; }
.tipjar { display: flex; gap: 14px; align-items: flex-start; background: #fff6e8; border: 2px solid #ffe0b8; border-radius: 16px; padding: 14px 16px; }
.tipjar .hint { margin: 4px 0 10px; }
.tipjar a.btn, .media-bar a.btn, .media-setup a.btn { display: inline-block; text-decoration: none; color: inherit; }
.tip-emoji { font-size: 34px; line-height: 1; }
.theme-row { display: flex; gap: 8px; flex-wrap: wrap; }
.theme-opt { border: 3px solid transparent; border-radius: 14px; padding: 10px 16px; cursor: pointer; font-weight: 800; background: var(--card-2); }
.theme-opt.on { border-color: var(--accent); }

/* ---------- Animations ---------- */
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6%); } }
@keyframes shiver { 0%, 100% { transform: translateX(0) rotate(0); } 25% { transform: translateX(-3%) rotate(-3deg); } 75% { transform: translateX(3%) rotate(3deg); } }
@keyframes dance { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-14%) rotate(6deg); } }
@keyframes arrive { 0% { transform: translateY(-80%) scale(.2); opacity: 0; } 55% { opacity: 1; } 100% { transform: none; opacity: 1; } }
@keyframes sparkle { 0% { opacity: 0; transform: scale(.3); } 30% { opacity: 1; transform: scale(1.3); } 100% { opacity: 0; transform: scale(.8) translateY(-60%); } }
@keyframes peek { 0%, 70%, 100% { transform: translateX(-50%); } 80% { transform: translateX(-80%); } 90% { transform: translateX(-20%); } }
@keyframes rustle { 0%, 100% { transform: rotate(0); } 33% { transform: rotate(-2deg) scaleY(1.04); } 66% { transform: rotate(2deg); } }
@keyframes drift { from { transform: translateX(-30vw) scale(var(--sc, 1)); } to { transform: translateX(130vw) scale(var(--sc, 1)); } }
@keyframes twinkle { 50% { opacity: .55; } }
@keyframes pulse { 50% { transform: scale(1.08); } }
@keyframes floaty { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -8px); } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(47,179,109,.55); } 80%, 100% { box-shadow: 0 0 0 8px rgba(47,179,109,0); } }
@keyframes flash { 30% { transform: scale(1.03); } }
@keyframes ring { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-1.5deg); } 75% { transform: rotate(1.5deg); } }
@keyframes winpop { 0% { transform: scale(.7); } 100% { transform: scale(1); } }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }
@keyframes hop { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-12%) rotate(4deg); } }
@keyframes fly { from { transform: translateX(-10vw); } to { transform: translateX(110vw); } }
@keyframes flap { to { transform: scaleY(.35); } }
@keyframes breeze { 0% { transform: translate(-5vw, 0) rotate(0); } 25% { transform: translate(25vw, -6vh) rotate(90deg); }
  50% { transform: translate(55vw, 2vh) rotate(180deg); } 75% { transform: translate(80vw, -4vh) rotate(270deg); } 100% { transform: translate(110vw, 3vh) rotate(360deg); } }
@keyframes swim { from { transform: translateX(110vw); } to { transform: translateX(-15vw); } }
@keyframes rise { to { transform: translate(24px, -115vh); } }
@keyframes sway { from { transform: translateX(-3%); } to { transform: translateX(3%); } }
@keyframes glow { 0%, 100% { opacity: .15; } 50% { opacity: 1; } }
@keyframes wander { from { transform: translate(0, 0); } to { transform: translate(60px, -40px); } }
@keyframes shoot { 0%, 88% { opacity: 0; transform: translate(0, 0) rotate(18deg); } 90% { opacity: 1; } 100% { opacity: 0; transform: translate(45vw, 15vh) rotate(18deg); } }
@keyframes shimmer { 50% { transform: translateX(40%); opacity: .2; } }
@keyframes dip { 0%, 100% { transform: translateY(0); } 35% { transform: translateY(22%) scaleY(.88); } 65% { transform: translateY(-16%) rotate(4deg); } }
@keyframes glide { from { transform: translateX(-28%) rotate(-9deg); } to { transform: translateX(28%) rotate(9deg); } }
@keyframes moonhop { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-60%) rotate(8deg); } }
@keyframes sniff { 0%, 100% { transform: rotate(0); } 40% { transform: rotate(12deg) translateY(5%); } 60% { transform: rotate(8deg) translateY(4%); } }
@keyframes nap { 0%, 100% { transform: rotate(-12deg) scaleY(.92); } 50% { transform: rotate(-12deg) scaleY(.86); } }
@keyframes munch { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.06, .92); } }
@keyframes warm { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
@keyframes dig { 0%, 100% { transform: rotate(-14deg); } 50% { transform: rotate(10deg) translateY(4%); } }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-24%); } }
@keyframes wave { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-12deg); } }
@keyframes ripple { 0% { transform: translateX(-50%) scale(.6); opacity: .9; } 100% { transform: translateX(-50%) scale(1.8); opacity: 0; } }
@keyframes fxrise { 0% { opacity: 0; transform: translate(-50%, -120%) scale(.6); } 20% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx, 0px)), -360%) scale(1.1); } }
@keyframes driveL { from { transform: translateX(110vw); } to { transform: translateX(-12vw); } }
@keyframes launch { 0%, 70% { opacity: 0; transform: translate(0, 0); } 72% { opacity: 1; transform: translate(0, 0); }
  100% { opacity: 0; transform: translate(14vw, -52vh); } }
@keyframes wobble { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-10px) rotate(6deg); } }
@keyframes snow { to { transform: translate(50px, 110vh) rotate(360deg); } }
@keyframes roll { 0% { transform: translateX(-10vw) rotate(0); } 25% { transform: translate(18vw, -14px) rotate(270deg); } 50% { transform: translate(46vw, 0) rotate(540deg); }
  75% { transform: translate(74vw, -10px) rotate(810deg); } 100% { transform: translateX(110vw) rotate(1080deg); } }

@media (prefers-reduced-motion: reduce) {
  .emoji, .cloud, .shy-msg, .eyes, .bush, .stars, .mover, .mover > span, .rays, .aurora { animation: none !important; }
  .fx { display: none; }
}

/* ---------- Small screens ---------- */
@media (max-width: 980px) {
  .brand-name, .next-text { display: none; }
  .topbar { border-radius: 22px; flex-wrap: wrap; }
}
@media (max-width: 820px) {
  #micText { display: none; }
  .topbar .pill { padding: 6px 10px; }
  .topbar { gap: 6px; }
}
@media (max-width: 600px) {
  .dock-btn { min-width: 54px; padding: 6px; }
  .dock-btn span:last-child { display: none; }
  .voice-row { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
