/* ===== Speakor — design system ===== */
:root {
  --bg: #070b09;
  --bg2: #0c130e;
  --panel: rgba(16, 26, 20, 0.66);
  --panel-solid: #10160f;
  --stroke: rgba(180, 230, 200, 0.12);
  --stroke-strong: rgba(126, 214, 160, 0.6);
  --accent: #6ee7a0;          /* leaf green */
  --accent2: #9b8cff;         /* dusk violet */
  --gold: #ffce5c;            /* sunlit */
  --danger: #ff6a4d;
  --good: #6affb0;
  --text: #eef6ee;
  --muted: #93a79a;
  --r: 16px;
  --shadow: 0 6px 18px rgba(0,0,0,.38), 0 18px 48px rgba(0,0,0,.44);
  --glow: 0 0 0 1px rgba(126,214,160,.18), 0 8px 28px rgba(40,90,60,.28);
  --font: "Orbitron", system-ui, -apple-system, "Segoe UI", "Helvetica Neue", sans-serif;
  --font-display: "Orbitron", system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body {
  margin: 0; height: 100%; overflow: hidden;
  background: radial-gradient(130% 120% at 50% -10%, #14241a 0%, #0a120c 55%, var(--bg) 100%);
  font-family: var(--font); color: var(--text); user-select: none; touch-action: none;
  letter-spacing: .1px; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, .logo, .pill, .lb-title, .ab-name, .btn { font-family: var(--font-display); }
input, button, select, textarea { font-family: inherit; }   /* form controls don't inherit the page font by default */
#game { display: block; width: 100vw; height: 100vh; touch-action: none; }

/* glass panel helper */
.glass {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--r);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

/* ===== HUD ===== */
.hud { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
.hud-top { position: absolute; top: clamp(8px, 1.4vw, 14px); left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: flex-start; padding: 0 clamp(8px, 1.6vw, 16px); gap: 10px; }

.pill {
  background: var(--panel); border: 1px solid var(--stroke); border-radius: 999px;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  padding: 8px 18px; font-weight: 800; font-size: clamp(14px, 1.6vw, 18px); letter-spacing: .3px;
  box-shadow: var(--shadow); font-variant-numeric: tabular-nums;
}

.leaderboard {
  background: var(--panel); border: 1px solid var(--stroke); border-radius: var(--r);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  padding: 8px 10px; font-size: 13px; min-width: 178px; box-shadow: var(--shadow);
}
.lb-title { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted);
  padding: 2px 4px 6px; border-bottom: 1px solid var(--stroke); margin-bottom: 4px; font-weight: 800; }
.lb-row { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 8px; padding: 3px 4px; border-radius: 8px; }
.lb-row .lb-rank { text-align: center; font-size: 13px; color: var(--muted); font-weight: 800; }
.lb-row .lb-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.lb-row .lb-score { color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 800; }
.lb-row.me { background: rgba(124, 139, 255, 0.16); }
.lb-row.me .lb-score { color: var(--text); }

/* magnifier / zoom control (left edge) */
.zoom { position: absolute; left: clamp(8px, 1.4vw, 14px); top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 8px; pointer-events: auto; }
.zoom button { width: 40px; height: 40px; border-radius: 50%; font-size: 22px; font-weight: 800; line-height: 1;
  background: var(--panel); border: 1px solid var(--stroke); color: #cdd3e6; cursor: pointer;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: var(--shadow); }
.zoom button:hover { border-color: var(--stroke-strong); }
.zoom button:active { transform: scale(.92); }
@media (max-width: 480px) { .zoom button { width: 34px; height: 34px; font-size: 18px; } }

/* ===== coach / suggestions ===== */
.coach {
  position: absolute; top: clamp(102px, 15vw, 122px); left: 50%; transform: translate(-50%, -8px);   /* sits BELOW the round banner */
  background: var(--panel); border: 1px solid var(--stroke-strong); border-radius: 999px;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  padding: 8px 18px; font-size: clamp(12px, 1.5vw, 14px); font-weight: 700; color: #eaf0ff;
  white-space: nowrap; box-shadow: var(--shadow); opacity: 0;
  transition: opacity .25s, transform .25s; pointer-events: none; max-width: 92vw; overflow: hidden; text-overflow: ellipsis;
}
.coach.show { opacity: 1; transform: translate(-50%, 0); }
.coach.warn { border-color: rgba(255, 120, 120, 0.7); color: #ffd9d9; }

/* ===== bomb-barrage alarm ===== */
.bomb-alert {
  position: absolute; top: clamp(150px, 22vw, 180px); left: 50%; transform: translateX(-50%);   /* below the coach line */
  background: rgba(60, 8, 8, 0.92); border: 2px solid var(--danger); border-radius: 12px;
  padding: 10px 22px; font-size: clamp(15px, 2.4vw, 20px); font-weight: 900; letter-spacing: 1px;
  color: #ffd9c2; text-shadow: 0 0 12px rgba(255, 90, 60, 0.8); box-shadow: 0 0 30px rgba(255, 60, 30, 0.5);
  pointer-events: none; animation: bombFlash .5s steps(1) infinite; white-space: nowrap; max-width: 94vw;
}
@keyframes bombFlash { 0% { opacity: 1; } 50% { opacity: .4; } 100% { opacity: 1; } }

/* ===== first-run interactive tutorial banner ===== */
.tut-banner {
  position: absolute; top: clamp(54px, 9vw, 74px); left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 8px; align-items: center; width: min(440px, 92vw);
  background: linear-gradient(180deg, rgba(20,28,44,0.95), rgba(12,16,28,0.96));
  border: 1px solid rgba(110,231,160,0.35); border-radius: 16px;
  box-shadow: 0 18px 50px -12px rgba(0,0,0,0.72); padding: 12px 16px 14px;
  pointer-events: auto; z-index: 6; animation: tutIn .35s ease; }
@keyframes tutIn { from { opacity: 0; transform: translate(-50%, -10px); } to { opacity: 1; transform: translate(-50%, 0); } }
.tut-head { display: flex; align-items: center; justify-content: center; gap: 10px; }
.tut-tag { font-size: 10.5px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--accent); }
.tut-dots { display: flex; gap: 6px; }
.tut-dots span { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.18); transition: background .2s, transform .2s; }
.tut-dots span.now { background: var(--accent); transform: scale(1.3); box-shadow: 0 0 8px rgba(110,231,160,0.7); }
.tut-dots span.done { background: rgba(110,231,160,0.55); }
.tut-text { font-size: clamp(14px, 2vw, 16px); font-weight: 700; color: #eef2ff; text-align: center; line-height: 1.35; }
.tut-text b { color: #fff; }
.tut-skip { position: absolute; top: 7px; right: 10px; background: none; border: none; color: var(--muted);
  font-size: 11px; font-weight: 700; cursor: pointer; }
.tut-skip:hover { color: #eef2ff; }

/* ===== battle-royale round banner + eliminated note ===== */
.round-banner {
  position: absolute; top: clamp(54px, 9vw, 72px); left: 50%; transform: translateX(-50%);
  padding: 7px 16px; border-radius: 999px; font-size: clamp(12px, 1.6vw, 14px); font-weight: 700;
  white-space: nowrap; pointer-events: none; max-width: 94vw; overflow: hidden; text-overflow: ellipsis;
  background: rgba(12,16,28,0.82); border: 1px solid var(--stroke-strong); color: #eaf0ff;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: var(--shadow); }
.round-banner b { color: #fff; }
.round-banner.lobby  { border-color: rgba(110,231,160,0.55); }
.round-banner.active { border-color: rgba(255,140,90,0.6); color: #ffe7da; }
.round-banner.ended  { border-color: var(--gold); color: #ffeec2; background: rgba(40,30,6,0.85); }
.dead-note {
  position: absolute; top: 38%; left: 50%; transform: translate(-50%, -50%);
  padding: 16px 26px; border-radius: 18px; text-align: center; line-height: 1.4;
  font-size: clamp(16px, 2.6vw, 22px); font-weight: 800; color: #fff; pointer-events: none;
  background: rgba(10,12,20,0.86); border: 1px solid var(--stroke-strong); box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); animation: tutIn .3s ease; }
.dead-note.win { border-color: var(--gold); background: rgba(36,28,6,0.9); }
.dead-note .dead-sub { display: block; margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }

/* ===== victory celebration ===== */
.win-banner {
  position: absolute; top: 34%; left: 50%; transform: translate(-50%, -50%) scale(.6);
  text-align: center; pointer-events: none; opacity: 0; z-index: 6;
  transition: opacity .4s ease, transform .55s cubic-bezier(.2,1.5,.4,1);
}
.win-banner.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.win-trophy { font-size: clamp(54px, 12vw, 104px); line-height: 1; filter: drop-shadow(0 0 22px rgba(255,206,92,.8)); animation: winBob 1.6s ease-in-out infinite; }
.win-title {
  font-family: "Orbitron", system-ui, sans-serif; font-weight: 900; letter-spacing: 3px;
  font-size: clamp(34px, 8vw, 76px); margin-top: 6px;
  background: linear-gradient(180deg, #fff6d0, #ffce5c 55%, #ffa128);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 30px rgba(255,180,60,.45); animation: winPulse 1.2s ease-in-out infinite;
}
.win-sub { margin-top: 8px; font-size: clamp(13px, 2.2vw, 19px); font-weight: 700; color: #ffeec2; text-shadow: 0 2px 10px rgba(0,0,0,.6); }
@keyframes winBob { 0%,100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-10px) rotate(4deg); } }
@keyframes winPulse { 0%,100% { filter: brightness(1); } 50% { filter: brightness(1.18); } }
@media (prefers-reduced-motion: reduce) { .win-trophy, .win-title { animation: none; } }

/* ===== bottom HUD: dust + abilities ===== */
.hud-bottom { position: absolute; left: 0; right: 0; bottom: clamp(10px, 1.8vw, 16px);
  display: flex; flex-direction: column; align-items: center; gap: 10px; pointer-events: none; }
.dust { display: flex; align-items: center; gap: 8px;
  background: var(--panel); border: 1px solid var(--stroke); border-radius: 999px;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  padding: 6px 14px; font-size: 13px; box-shadow: var(--shadow); }
.dust-label { color: #cbd2ff; font-weight: 800; }
.dust-bar { width: clamp(90px, 18vw, 140px); height: 8px; background: #1b2030; border-radius: 999px; overflow: hidden; }
.dust-bar i { display: block; height: 100%; width: 30%;
  background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width .12s ease; }
#dustNum { font-weight: 800; font-variant-numeric: tabular-nums; min-width: 16px; text-align: right; }

.abilities { display: flex; gap: 8px; pointer-events: auto; flex-wrap: wrap; justify-content: center; max-width: 96vw; }
.ab {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px;
  width: clamp(58px, 11vw, 78px);
  background: linear-gradient(180deg, rgba(30,36,58,.9), rgba(18,22,34,.9));
  border: 1px solid var(--stroke); border-radius: 12px; padding: 8px 6px;
  color: #8b93ad; cursor: pointer; transition: transform .08s, border-color .12s, color .12s, box-shadow .12s;
}
.ab.ready { color: var(--text); border-color: var(--stroke-strong); box-shadow: 0 0 0 1px rgba(124,139,255,.18), var(--shadow); }
.ab.ready:hover { transform: translateY(-2px); }
.ab.ready:active { transform: scale(.95); }
.ab-key { font-size: 10px; opacity: .65; background: rgba(255,255,255,.08); border-radius: 5px; padding: 0 5px; }
.ab-name { font-size: clamp(11px, 1.4vw, 13px); font-weight: 800; }
.ab-cost { font-size: 11px; color: var(--accent2); font-weight: 700; }
.throw-ab { border-color: rgba(170,165,155,.4); }
.throw-ab.ready { color: var(--text); border-color: rgba(200,195,185,.7); box-shadow: 0 0 0 1px rgba(200,195,185,.2), var(--shadow); }
.throw-ab .ab-cost { color: #d8d3c8; }
/* one-handed combat action bar */
.autofire-tag { align-self: center; font-size: 11px; font-weight: 800; letter-spacing: .5px; color: #ffcaa8;
  background: rgba(255,120,90,.12); border: 1px solid rgba(255,120,90,.4); border-radius: 999px; padding: 5px 12px; white-space: nowrap; }
.fire-ab { border-color: rgba(255,120,90,.6); color: #ffd9cc; touch-action: none; }
.fire-ab:active { transform: scale(.95); background: rgba(255,120,90,.15); }
.dash-ab { border-color: rgba(120,200,255,.45); touch-action: none; }
.dash-ab.ready { color: var(--text); border-color: rgba(120,200,255,.85); box-shadow: 0 0 0 1px rgba(120,200,255,.25), var(--shadow); }
.dash-ab:active { transform: scale(.95); }
.dash-ab .ab-cost { color: #8fd0ff; }

/* ===== persistent controls reference ===== */
.controls-hint { position: absolute; left: clamp(8px, 1.4vw, 12px); bottom: clamp(10px, 1.8vw, 14px);
  display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); pointer-events: none; max-width: 46vw; }
.controls-hint b { color: #cdd3e6; }
.controls-hint span { background: rgba(0, 0, 0, 0.32); border-radius: 7px; padding: 3px 9px; width: fit-content; }

/* ===== utility buttons (voice / emote / music / sfx / help) ===== */
/* desktop: a row pinned bottom-right. mobile: a side rail (see media queries),
   so they never collide with the centered ability bar. */
.util-bar { position: absolute; bottom: clamp(10px, 1.8vw, 14px); right: clamp(8px, 1.4vw, 14px);
  display: flex; gap: 8px; pointer-events: none; z-index: 7; }
.help-btn { position: relative; flex: none; width: 40px; height: 40px; border-radius: 50%;
  background: var(--panel); border: 1px solid var(--stroke); color: #cdd3e6; font-size: 16px; font-weight: 900;
  cursor: pointer; pointer-events: auto; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: var(--shadow); display: flex; align-items: center; justify-content: center; transition: transform .08s, border-color .12s; }
#helpBtn { font-size: 18px; }
.voice-btn { touch-action: none; }
.help-btn:hover { border-color: var(--stroke-strong); }
.help-btn:active { transform: scale(.92); }
.voice-btn.talking { border-color: var(--good); color: var(--good);
  box-shadow: 0 0 0 3px rgba(106,255,176,.35), var(--shadow); animation: micPulse .7s ease-in-out infinite; }
@keyframes micPulse { 0%,100% { box-shadow: 0 0 0 3px rgba(106,255,176,.30), var(--shadow); }
  50% { box-shadow: 0 0 0 7px rgba(106,255,176,0), var(--shadow); } }
.help-btn.off { opacity: .45; }
.help-btn.off::after { content: ""; position: absolute; left: 8px; right: 8px; top: 50%; height: 2px;
  background: var(--danger); transform: rotate(-20deg); border-radius: 2px; }

/* ===== emote / speak wheel ===== */
.emote-wheel {
  position: absolute; right: clamp(8px, 1.4vw, 14px); bottom: 64px; width: 196px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 10px;
  background: var(--panel-solid); border: 1px solid var(--stroke); border-radius: var(--r);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  pointer-events: auto; box-shadow: var(--shadow); z-index: 30;
}
.emote-wheel button { background: rgba(40, 48, 72, 0.6); border: 1px solid var(--stroke); border-radius: 10px;
  font-size: 22px; padding: 9px 0; cursor: pointer; line-height: 1; transition: transform .08s, background .12s; }
.emote-wheel button:hover { background: rgba(60, 70, 104, 0.8); }
.emote-wheel button:active { transform: scale(.9); }

/* ===== ability cast feedback ===== */
@keyframes castPulse { 0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(124,139,255,.6); }
  50% { transform: scale(1.08); box-shadow: 0 0 0 8px rgba(124,139,255,0); } 100% { transform: scale(1); } }
.ab.cast { animation: castPulse .35s ease; border-color: var(--accent2); }
@keyframes castDenied { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.ab.denied { animation: castDenied .25s ease; }

/* ===== overlays ===== */
.overlay { position: fixed; inset: 0; z-index: 20; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px; padding: 24px; overflow-y: auto;
  background: radial-gradient(circle at 50% 32%, rgba(28, 34, 58, 0.95), rgba(7, 9, 16, 0.98)); }

/* start screen: let the live arena play behind it (attract mode), dimmed for readability */
#start.overlay {
  justify-content: flex-start;          /* center via .hero margin:auto so tall content scrolls instead of clipping */
  padding: 0; gap: 0;
  background:
    radial-gradient(120% 90% at 50% 30%, rgba(12,16,28,0.30), rgba(6,8,14,0.86));
  -webkit-backdrop-filter: blur(3px) saturate(1.12); backdrop-filter: blur(3px) saturate(1.12);
}

/* the hero: one composed card so the page reads as a designed surface, not floating text */
.hero {
  margin: auto;
  width: min(540px, 94vw);
  display: flex; flex-direction: column; align-items: center;
  gap: clamp(8px, 1.2vh, 13px);
  padding: clamp(16px, 3vh, 30px) clamp(20px, 5vw, 40px);
  background: linear-gradient(180deg, rgba(24,30,50,0.74), rgba(11,15,27,0.80));
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 28px;
  box-shadow: 0 30px 80px -22px rgba(0,0,0,0.72), inset 0 1px 0 rgba(255,255,255,0.07);
  -webkit-backdrop-filter: blur(12px) saturate(1.18); backdrop-filter: blur(12px) saturate(1.18);
}
.hero-head { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.brand { display: flex; flex-direction: row; align-items: center; justify-content: center; gap: clamp(0px, 0.6vw, 6px); }
.hero-bird {
  width: clamp(54px, 8vh, 80px); height: auto; user-select: none; -webkit-user-drag: none;
  filter: drop-shadow(0 6px 16px rgba(124,139,255,0.45));
  animation: heroBob 4s ease-in-out infinite;
}
@keyframes heroBob { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(-7px) } }
@media (prefers-reduced-motion: reduce) { .hero-bird { animation: none } }

.logo { margin: 0; position: relative; font-size: clamp(30px, 7vw, 50px); font-weight: 800; letter-spacing: 1px; line-height: 1;
  display: inline-block; white-space: nowrap; padding-right: 3px;
  filter: drop-shadow(0 4px 18px rgba(110,231,160,0.30)) drop-shadow(0 6px 30px rgba(124,139,255,0.32));
  animation: logoGlow 3.4s ease-in-out infinite; }
/* each glyph carries the gradient itself (clip-on-parent breaks through inline-block children);
   letters stream out of the bird's beak (left), flowing rightward into place, then a sheen waves across */
.logo .l { display: inline-block;
  background: linear-gradient(100deg, var(--accent) 0%, #6fd0ff 30%, var(--accent2) 72%, #8b6cf0 100%);
  background-size: 200% auto; -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  animation: letterFlow .6s cubic-bezier(.2,.8,.3,1.05) both, logoSheen 3.6s linear infinite; }
.logo .l:nth-child(1){ animation-delay: .04s, 0s }   .logo .l:nth-child(2){ animation-delay: .10s, .12s }
.logo .l:nth-child(3){ animation-delay: .16s, .24s }  .logo .l:nth-child(4){ animation-delay: .22s, .36s }
.logo .l:nth-child(5){ animation-delay: .28s, .48s }  .logo .l:nth-child(6){ animation-delay: .34s, .60s }
.logo .l:nth-child(7){ animation-delay: .40s, .72s }
@keyframes letterFlow { from { opacity: 0; transform: translate(-0.85em, 0.14em) scale(.42); } 55% { opacity: 1; } to { opacity: 1; transform: none; } }
@keyframes logoSheen { 0% { background-position: 0% center; } 100% { background-position: -200% center; } }
@keyframes logoGlow {
  0%, 100% { filter: drop-shadow(0 4px 16px rgba(110,231,160,0.22)) drop-shadow(0 6px 26px rgba(124,139,255,0.26)); }
  50%      { filter: drop-shadow(0 4px 22px rgba(110,231,160,0.42)) drop-shadow(0 8px 38px rgba(124,139,255,0.50)); }
}
@media (prefers-reduced-motion: reduce) { .logo, .logo .l { animation: none } }

/* nature theme: a small flock of birds flying across the wordmark */
.logo .flyer { position: absolute; left: 0; height: auto; pointer-events: none; z-index: 1;
  animation: flyAcross 9s ease-in-out infinite; }
.logo .flyer .wings { transform-box: fill-box; transform-origin: center bottom; animation: wingFlap .34s ease-in-out infinite; }
/* depth: nearer birds bigger/lower & flapping a touch slower, distant ones small/high/quicker */
.logo .flyer.f1 { top: -.46em; width: 1.05em; animation-duration: 9s;  animation-delay: -1s; }
.logo .flyer.f2 { top: -.04em; width: .82em;  animation-duration: 11s; animation-delay: -4.5s; }
.logo .flyer.f3 { top: -.82em; width: .64em;  animation-duration: 13s; animation-delay: -7.5s; }
.logo .flyer.f1 .wings { animation-duration: .36s; }
.logo .flyer.f2 .wings { animation-duration: .30s; }
.logo .flyer.f3 .wings { animation-duration: .26s; }
@keyframes wingFlap { 0%,100% { transform: scaleY(1) } 50% { transform: scaleY(.34) } }
/* undulating, eased flight path: push up on the downstroke, dip on the glide, banking into turns */
@keyframes flyAcross {
  0%   { transform: translate(-.7em, 16px) scale(.6) rotate(6deg);  opacity: 0 }
  9%   { opacity: .95 }
  22%  { transform: translate(.7em, -2px)  scale(.85) rotate(-4deg) }
  36%  { transform: translate(1.7em, 7px)  scale(.95) rotate(5deg) }
  52%  { transform: translate(3em, -6px)   scale(1)   rotate(-5deg) }
  68%  { transform: translate(4.2em, 5px)  scale(.98) rotate(4deg) }
  84%  { transform: translate(5.2em, -3px) scale(.9)  rotate(-3deg) }
  93%  { opacity: .85 }
  100% { transform: translate(6.4em, 14px) scale(.6)  rotate(7deg);  opacity: 0 }
}
@media (prefers-reduced-motion: reduce) { .logo .flyer, .logo .flyer .wings { animation: none } }
.tag { margin: 0; color: #b6bedb; font-size: clamp(13px, 2vw, 15px); text-align: center; max-width: 32ch; line-height: 1.45; }
.hint { color: var(--muted); font-size: 12px; margin: 2px 0 0; text-align: center; max-width: 420px; line-height: 1.5; }
.conn { color: #e0b07a; font-size: 12px; min-height: 16px; }
#nameInput { background: rgba(8,11,18,0.7); border: 1px solid rgba(255,255,255,0.10); color: var(--text); border-radius: 14px;
  padding: 11px 16px; font-size: 16px; width: min(320px, 100%); text-align: center; outline: none; transition: border-color .12s, box-shadow .12s; }
#nameInput::placeholder { color: #6b7390; }
#nameInput:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(110,231,160,0.16); }

/* form picker */
.forms { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; max-width: 480px; }
.form { width: clamp(120px, 40vw, 144px); background: rgba(18, 22, 34, 0.8); border: 2px solid #2a3040; border-radius: var(--r);
  padding: 12px 10px; color: #cdd3e6; cursor: pointer; text-align: center; transition: border-color .12s, transform .08s, background .12s; }
.form:hover { border-color: var(--stroke-strong); }
.form:active { transform: scale(.97); }
.form.sel { border-color: var(--accent); background: rgba(44, 52, 88, 0.9); box-shadow: 0 0 0 1px rgba(124,139,255,.25); }
.form-icon { font-size: 30px; line-height: 1; }
.form-name { font-weight: 800; margin-top: 4px; }
.form-desc { font-size: 11px; color: var(--muted); margin-top: 4px; min-height: 28px; }

/* evolution explainer — one compact inline strip */
.evolve-note { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 7px;
  width: 100%; padding: 7px 10px; background: rgba(0,0,0,0.16);
  border: 1px solid rgba(255,255,255,0.06); border-radius: 14px; }
.evolve-lead { font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-right: 1px; }
.echip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #eaeefb;
  background: rgba(110,231,160,0.07); border: 1px solid rgba(110,231,160,0.18); border-radius: 999px; padding: 5px 11px; font-weight: 600; }
.echip .ic { font-size: 13px; line-height: 1; }

/* buttons */
.btn { border: none; border-radius: 14px; padding: 15px 22px; font-size: 16px; font-weight: 700; cursor: pointer;
  width: min(320px, 100%); transition: transform .08s, filter .12s, box-shadow .12s; }
.btn.primary { background: linear-gradient(96deg, #34c98a, #4f9bf0 52%, #8b6cf0); color: #fff;
  letter-spacing: 2px; text-shadow: 0 1px 2px rgba(0,0,0,0.25);
  box-shadow: 0 14px 32px -8px rgba(79,155,240,0.55), inset 0 1px 0 rgba(255,255,255,0.30); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.ghost { background: transparent; border: 1px solid #2a3040; color: var(--text); }
.btn.ghost:hover { border-color: var(--stroke-strong); }
.btn.reward { background: linear-gradient(90deg, #d7a33a, #f0cf73); color: #1a1300; box-shadow: 0 8px 24px rgba(220, 170, 60, 0.35); }
.btn:active { transform: scale(.97); }
.death-score { font-size: clamp(18px, 3vw, 22px); font-weight: 800; color: #d8def2; }
.best-tag { font-size: 15px; font-weight: 800; color: var(--gold); }
.best-dim { font-size: 14px; font-weight: 700; color: var(--muted); }

/* account / login on the start screen */
.account { display: flex; flex-direction: column; align-items: center; gap: 9px; min-height: 24px; width: 100%; }
.acct-label { font-size: 12px; color: var(--muted); }
.acct-guest { font-size: 13px; color: #cdd3e6; }
.acct-dim { color: var(--muted); font-weight: 400; }
.acct-btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; align-items: center; }
.acct-btn { display: inline-flex; align-items: center; gap: 7px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.10); color: #eef1fb; border-radius: 12px;
  height: 42px; padding: 0 16px; font-size: 13px; font-weight: 700; cursor: pointer; transition: border-color .12s, background .12s, transform .08s; }
.acct-btn:hover { border-color: var(--stroke-strong); background: rgba(255,255,255,.07); }
.acct-btn:active { transform: scale(.96); }
.acct-status { font-size: 12px; color: #e0b07a; min-height: 14px; }
.gbtn { display: flex; align-items: center; min-height: 42px; color-scheme: light; }
.link-dialog { margin-top: 6px; font-size: 13px; color: #cdd3e6; background: rgba(18,22,34,.9);
  border: 1px solid var(--stroke); border-radius: 12px; padding: 10px 14px; max-width: 360px; }
.link-actions { display: flex; gap: 8px; justify-content: center; margin-top: 8px; }
.acct-chip { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center;
  background: rgba(124,139,255,.12); border: 1px solid var(--stroke); border-radius: 999px; padding: 7px 14px; font-size: 13px; }
.acct-chip .acct-best { color: var(--gold); font-weight: 800; }
.acct-link { background: none; border: none; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: 12px; }
#death h2 { font-size: clamp(22px, 5vw, 30px); margin: 0; }

/* help overlay → friendly "how to play" card (first-run tutorial + H-key reference) */
.help-overlay { justify-content: flex-start; gap: 0; padding: 16px; z-index: 40; }   /* above the start screen when shown pre-join */
.howto {
  margin: auto;   /* center when it fits, scroll cleanly when tall — no clipped title */
  width: min(440px, 94vw); display: flex; flex-direction: column; gap: 14px;
  padding: clamp(20px, 4vh, 30px) clamp(20px, 5vw, 30px);
  background: linear-gradient(180deg, rgba(24,30,50,0.92), rgba(11,15,27,0.95));
  border: 1px solid rgba(255,255,255,0.10); border-radius: 24px;
  box-shadow: 0 30px 80px -22px rgba(0,0,0,0.75);
}
.howto h2 { margin: 0; text-align: center; font-size: clamp(20px, 5vw, 26px); }
.howto-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.howto-steps li { display: flex; align-items: center; gap: 12px; font-size: 14px; color: #d3d9ea; line-height: 1.35; text-align: left; }
.howto-steps .hi { flex: none; width: 38px; height: 38px; display: grid; place-items: center; font-size: 20px;
  background: rgba(110,231,160,0.10); border: 1px solid rgba(110,231,160,0.20); border-radius: 12px; }
.howto-steps b { color: #fff; }
.howto-more { font-size: 13px; color: #c2c8db; }
.howto-more summary { cursor: pointer; color: var(--accent); font-weight: 600; padding: 4px 0; list-style-position: inside; }
.howto-abilities { margin: 8px 0 6px; padding-left: 18px; }
.howto-abilities li { font-size: 12.5px; color: #c2c8db; margin: 4px 0; line-height: 1.4; }
.howto-abilities b { color: var(--text); }
.howto-keys { margin: 6px 0 0; font-size: 12px; color: var(--muted); line-height: 1.6; }
.howto-keys b { color: #d3d9ea; }
.howto .btn { width: 100%; margin-top: 2px; }

/* dev ad overlay */
.ad-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.9); z-index: 100;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; }
.ad-overlay .ad-box { width: min(300px, 86vw); height: min(250px, 50vh); background: #1b1b1b; border: 2px dashed #555;
  display: flex; align-items: center; justify-content: center; color: #666; font-size: 22px; letter-spacing: 4px; }

/* ===== responsive ===== */
/* The centered ability bar can collide with the bottom-left controls-hint until
   the screen is wide; only show that hint on roomy desktops. */
@media (max-width: 960px) { .controls-hint { display: none; } }

/* Phones/tablets: move the utility buttons off the bottom (where the ability bar
   lives) onto a vertical side rail, and pop the emote wheel above the bar. */
@media (max-width: 760px) {
  .leaderboard { min-width: 132px; font-size: 12px; }
  .ab { padding: 6px 4px; }
  .util-bar { flex-direction: column; bottom: auto; right: clamp(6px, 1.6vw, 12px); top: 50%; transform: translateY(-50%); }
  .emote-wheel { right: auto; left: 50%; transform: translateX(-50%); bottom: 150px; }
}
@media (max-width: 480px) {
  .leaderboard { min-width: 112px; padding: 6px 7px; }
  .lb-title { font-size: 10px; }
  .dust-label { display: none; }
  .help-btn { width: 36px; height: 36px; }
  .zoom button { width: 34px; height: 34px; font-size: 18px; }
  .abilities { gap: 6px; }
  .ab { width: clamp(52px, 17vw, 64px); }
}
@media (max-height: 540px) {
  /* short / landscape: tighten the bottom stack; the right rail would hit the
     leaderboard, so move the utility buttons to a top row between score+board */
  .hud-bottom { gap: 5px; bottom: 6px; }
  .ab { padding: 5px 4px; }
  .help-btn { width: 34px; height: 34px; }
  .util-bar { flex-direction: row; gap: 6px; top: 6px; bottom: auto; right: auto; left: 50%; transform: translateX(-50%); }
  .emote-wheel { bottom: auto; top: 48px; }
}

/* ═══════════ Season 0: voice & social + staking UI ═══════════ */

/* A7 kill feed (top-right, under the leaderboard) */
.kill-feed { position: fixed; top: 10px; right: 10px; margin-top: 118px; display: flex; flex-direction: column; gap: 4px; align-items: flex-end; pointer-events: none; z-index: 30; }
.kf-row { background: rgba(10, 14, 24, .72); border: 1px solid rgba(255, 255, 255, .08); border-radius: 8px; padding: 3px 10px; font-size: 12px; color: #dfe6f5; animation: kfIn .25s ease-out; }
.kf-seeds { color: #ffd24a; font-weight: 700; }
@keyframes kfIn { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }

/* B4 money pills */
.pill.money { background: rgba(38, 30, 8, .8); border-color: rgba(255, 210, 74, .45); color: #ffe6a1; }
.pill.money b { color: #ffd24a; }
.pill .up { color: #9dffb0; } .pill .down { color: #ff8d8d; }
.pill.ghosts { background: rgba(24, 18, 40, .8); border-color: rgba(190, 160, 255, .4); color: #d9c9ff; }
.dead-took { color: #ffb1b1; font-size: 13px; }

/* A4 ghost banner */
.ghost-banner { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); background: rgba(22, 16, 40, .88); border: 1px solid rgba(190, 160, 255, .5); border-radius: 12px; padding: 8px 14px; color: #e7dcff; font-size: 14px; z-index: 40; display: flex; gap: 10px; align-items: center; }
.gh-tag { font-weight: 800; letter-spacing: .06em; color: #c9a8ff; }
.gh-next { background: #7c5cff; color: #fff; border: 0; border-radius: 9px; padding: 6px 12px; font-weight: 700; cursor: pointer; }
.gh-next:hover { filter: brightness(1.15); }

/* A3 tap-a-bird mute / report */
.bird-panel { position: fixed; z-index: 60; background: rgba(12, 16, 28, .95); border: 1px solid rgba(255, 255, 255, .14); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 6px; min-width: 150px; }
.bird-panel .bp-name { font-weight: 800; font-size: 14px; margin-bottom: 2px; }
.bird-panel button { background: rgba(255, 255, 255, .08); color: #e8edf8; border: 1px solid rgba(255, 255, 255, .12); border-radius: 8px; padding: 7px 10px; cursor: pointer; font-size: 13px; text-align: left; }
.bird-panel button:hover { background: rgba(255, 255, 255, .16); }
.bird-panel #bpClose { position: absolute; top: 6px; right: 6px; border: 0; background: none; padding: 2px 6px; }

/* A2 whisper button mirrors the mic button states */
.whisper-btn.talking { background: #6b4bd6 !important; box-shadow: 0 0 14px rgba(150, 110, 255, .8); }

/* B2 tier picker on the start screen */
.tier-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.tier-btn { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); color: #dfe6f5; border-radius: 12px; padding: 8px 14px; cursor: pointer; font-weight: 700; font-size: 13px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.tier-btn span { font-weight: 500; font-size: 11px; opacity: .75; }
.tier-btn.sel { border-color: #ffd24a; background: rgba(255, 210, 74, .12); color: #ffe6a1; }
.tier-btn:hover { border-color: rgba(255, 255, 255, .4); }

/* B6 season leaderboard panel */
.season-board { margin: 10px auto 0; max-width: 320px; background: rgba(10, 14, 24, .6); border: 1px solid rgba(255, 255, 255, .1); border-radius: 12px; padding: 10px 14px; font-size: 13px; }
.sb-title { font-weight: 800; margin-bottom: 6px; color: #ffe6a1; }
.sb-row { display: flex; justify-content: space-between; padding: 2px 0; color: #cfd8ea; }
.sb-row .up { color: #9dffb0; } .sb-row .down { color: #ff8d8d; }

/* B1 seed balance chip in the account box */
.seed-chip { color: #ffd24a; font-weight: 700; margin-left: 8px; }

/* Robinhood Chain deposit UI */
.chain-note { font-size: 11px; color: #9aa7bd; margin: 4px 0 8px; }
.chain-note a { color: #7ec8ff; }

/* ═══ $SPEAK contract-address chip + compact start screen (no scroll) ═══ */
.ca-chip { display: flex; align-items: center; gap: 7px; font-size: 12px; margin-top: 2px;
  background: rgba(255, 210, 74, .07); border: 1px solid rgba(255, 210, 74, .3);
  border-radius: 999px; padding: 3px 12px; color: #ffe6a1; }
.ca-chip .ca-tick { font-weight: 800; letter-spacing: .04em; }
.ca-chip code { font-family: Consolas, monospace; color: #fff; font-size: 11px; }
.ca-chip button { background: none; border: 0; color: #ffd24a; cursor: pointer; font-size: 14px; padding: 0 2px; line-height: 1; }
.ca-chip button:hover { color: #fff; }
.ca-chip a { color: #7ec8ff; text-decoration: none; font-weight: 700; }
.ca-chip a:hover { text-decoration: underline; }

/* compact hero: the whole start screen fits a viewport without scrolling */
.hero { gap: clamp(5px, 0.9vh, 10px); padding: clamp(12px, 2vh, 22px) clamp(18px, 4vw, 34px); }
.hero-bird { width: clamp(44px, 6.5vh, 64px); }
.logo { font-size: clamp(26px, 5.5vh, 42px); }
.tag { font-size: clamp(12px, 1.6vh, 14px); line-height: 1.3; max-width: 42ch; }
.season-board { margin-top: 2px; padding: 6px 12px; font-size: 12px; }
.sb-title { margin-bottom: 3px; }
.tier-row { margin-top: 2px; gap: 6px; }
.tier-btn { padding: 6px 10px; font-size: 12px; }
.account { gap: 6px; }
.hint { margin: 0; }
@media (max-height: 720px) {
  .hint { display: none; }
  .season-board { display: none; }
  .hero-bird { width: 40px; }
  .acct-label { display: none; }
  .hero { gap: 5px; }
}

/* in-UI amount / confirm dialog (replaces browser prompt/confirm) */
.amt-modal { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center;
  background: rgba(6, 9, 16, .68); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: amtIn .14s ease-out; }
@keyframes amtIn { from { opacity: 0 } to { opacity: 1 } }
.amt-card { width: min(340px, 92vw); background: linear-gradient(180deg, rgba(26, 32, 52, .96), rgba(12, 16, 28, .98));
  border: 1px solid rgba(255, 210, 74, .28); border-radius: 18px; padding: 20px; box-shadow: 0 24px 60px -18px rgba(0, 0, 0, .8);
  font-family: var(--font-ui, "Inter", system-ui, sans-serif); }
.amt-title { font-family: var(--font-display); font-weight: 800; font-size: 19px; color: #fff; }
.amt-sub { font-size: 12px; color: #9aa7bd; margin-top: 4px; line-height: 1.4; }
.amt-inputrow { display: flex; align-items: center; gap: 8px; margin-top: 14px;
  background: rgba(0, 0, 0, .35); border: 1px solid rgba(255, 255, 255, .14); border-radius: 12px; padding: 10px 14px; }
.amt-inputrow:focus-within { border-color: rgba(255, 210, 74, .6); }
.amt-input { flex: 1; background: none; border: 0; outline: 0; color: #fff; font-size: 22px; font-weight: 700; min-width: 0; }
.amt-unit { color: #ffd24a; font-weight: 800; font-size: 14px; }
.amt-conv { min-height: 18px; margin-top: 8px; font-size: 13px; color: #9dffb0; }
.amt-conv b { color: #cffcd8; }
.amt-presets { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.amt-presets button { flex: 1; min-width: 56px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12);
  color: #dfe6f5; border-radius: 9px; padding: 7px 4px; font-size: 12px; font-weight: 700; cursor: pointer; }
.amt-presets button:hover { border-color: rgba(255, 210, 74, .5); color: #ffe6a1; }
.amt-actions { display: flex; gap: 8px; margin-top: 16px; }
.amt-actions button { flex: 1; border-radius: 11px; padding: 11px; font-weight: 800; font-size: 14px; cursor: pointer; border: 1px solid transparent; }
.amt-cancel { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .12) !important; color: #cfd8ea; }
.amt-cancel:hover { background: rgba(255, 255, 255, .13); }
.amt-ok { background: linear-gradient(180deg, #ffd76a, #ffb020); color: #201400; }
.amt-ok:hover { filter: brightness(1.08); }
