:root {
  --navy-0: #0a1330;
  --navy-1: #0e1c44;
  --navy-2: #13245a;
  --gold: #e8a93a;
  --gold-2: #f3c563;
  --orange: #f08a24;
  --orange-2: #ff9d33;
  --green: #54c14e;
  --green-d: #2f7a2c;
  --red: #e23b3b;
  --ink: #0a0f1f;
  --panel: rgba(10, 16, 34, 0.72);
  --stroke: rgba(232, 169, 58, 0.4);
  font-size: 16px;
}

* {
  box-sizing: border-box; margin: 0; padding: 0;
  /* no text selection / long-press callout anywhere in the game */
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

html, body {
  height: 100%;
  background: #05070f;
  color: #fff;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: manipulation;
  /* no text selection / long-press callout anywhere in the game (inherits) */
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* ====== Phone frame (portrait 9:16) ====== */
.phone {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 56.25vh; /* keep ~9:16 on wide screens */
  margin: 0 auto;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--navy-0);
  user-select: none;
}
@media (max-aspect-ratio: 9/16) { .phone { max-width: 100%; } }

/* ====== Scene background ====== */
.scene {
  position: absolute; inset: 0; z-index: 0;
  background: #16306e url("bg.webp") center / cover no-repeat;
}
/* subtle vignette so the HUD/controls read over the painting */
.scene::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(8,14,34,0.35) 0%, rgba(8,14,34,0) 22%,
      rgba(8,14,34,0) 60%, rgba(8,14,34,0.55) 100%);
}

/* ====== HUD ====== */
.hud {
  position: relative; z-index: 5;
  display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 8px;
  padding: 10px 12px 0;
}
.hud-plate {
  position: relative;
  background: linear-gradient(180deg, rgba(20,30,60,0.92), rgba(8,14,32,0.92));
  border: 1px solid var(--stroke);
  border-radius: 4px;
  /* beveled corners */
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  padding: 7px 6px 9px;
  text-align: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.06);
}
.hud-plate--center { padding-top: 6px; }
.hud-label {
  display: block; font-size: 0.62rem; letter-spacing: 0.16em; font-weight: 700;
  color: #9fb0d6; text-transform: uppercase;
}
.hud-value {
  display: block; font-size: 1.5rem; font-weight: 800; line-height: 1.05;
  color: var(--gold-2); text-shadow: 0 1px 2px rgba(0,0,0,0.6); font-variant-numeric: tabular-nums;
}
.hud-plate--center .hud-value { font-size: 1.9rem; color: #fff; }

.hud-row {
  position: relative; z-index: 5;
  display: flex; align-items: center; justify-content: center;
  padding: 8px 14px 0; min-height: 30px;
}
.phases { display: flex; align-items: center; gap: 4px; }
.phases .dot { width: 9px; height: 9px; border-radius: 50%; background: #2a3a63; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08); }
.phases .dot.is-active { background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.phases .bar { width: 26px; height: 3px; border-radius: 2px; background: #2a3a63; }
.phases .bar.is-active { background: var(--gold); }
.pause-btn {
  position: absolute; right: 12px; top: 4px;
  width: 76px; height: 76px; border-radius: 50%;
  background: var(--panel); border: 1px solid var(--stroke); color: var(--gold-2);
  display: grid; place-items: center; cursor: pointer; z-index: 6;
}
.pause-btn svg { width: 36px; height: 36px; fill: currentColor; }

/* ====== Play area ====== */
.play { position: relative; z-index: 4; flex: 1; min-height: 0; }
.stage {
  position: absolute; left: 10%; bottom: 0; width: 70%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  padding-bottom: 6px;
}
.hero {
  position: relative; width: 67%; max-width: 222px; margin-bottom: -44px;
}
.fig {
  display: block; width: 100%; height: auto;
  filter: drop-shadow(0 16px 20px rgba(0,0,0,0.5));
  transform-origin: 50% 100%; will-change: transform, opacity;
}
/* idle pose — gentle breathing */
.fig-idle { animation: breathe 3.8s ease-in-out infinite; transition: opacity 160ms; }
@keyframes breathe {
  0%, 100% { transform: translateY(0) scaleY(1) scaleX(1); }
  50% { transform: translateY(-0.8%) scaleY(1.022) scaleX(0.996); }
}
/* action poses — hidden until a hit/miss */
.fig-broke, .fig-miss {
  position: absolute; left: 0; bottom: 0; width: 100%; opacity: 0;
  transition: opacity 120ms ease;
}
/* HIT (broke the bone): swap to "сломал" pose + downward punch */
.hero.hit .fig-idle { opacity: 0; }
.hero.hit .fig-broke {
  opacity: 1; transform: translateY(10px) scale(1.04);
  transition: opacity 40ms ease, transform 90ms cubic-bezier(.6,0,.9,.3);
}
.hero.recover .fig-broke { opacity: 0; }
/* MISS (didn't break): swap to "удар" pose + recoil shake */
.hero.miss .fig-idle { opacity: 0; }
.hero.miss .fig-miss { opacity: 1; }
.hero.miss { animation: heroShake 0.34s ease; }
@keyframes heroShake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-8px) rotate(-2deg); }
  60% { transform: translateX(7px) rotate(2deg); }
}

/* broken bone flying off to the upper-left, spinning + growing */
.bone-fly {
  position: absolute; left: 0; bottom: 0; width: 100%; opacity: 0;
  transform-origin: 59.4% 63.4%;   /* the bone's spot on the shared canvas */
  pointer-events: none; will-change: transform, opacity;
}
.bone-fly.fly { animation: boneFly 0.8s cubic-bezier(.25,.6,.4,1) forwards; }
@keyframes boneFly {
  0%   { opacity: 0; transform: translate(0,0) rotate(0deg) scale(0.95); }
  12%  { opacity: 1; }
  100% { opacity: 0; transform: translate(-62%, -120%) rotate(700deg) scale(1.6); }
}

/* impact flash where the strike lands */
.impact-flash {
  position: absolute; bottom: 12%; left: 50%; transform: translate(-50%, 0) scale(0.2);
  width: 150px; height: 150px; border-radius: 50%; pointer-events: none; opacity: 0; z-index: 5;
  background: radial-gradient(circle, rgba(255,235,170,0.95) 0%, rgba(240,138,36,0.5) 40%, transparent 70%);
}
.impact-flash.show { animation: flash 0.4s ease-out; }
@keyframes flash {
  0% { opacity: 0; transform: translate(-50%,0) scale(0.2); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%,0) scale(1.5); }
}

/* floating combat text */
.hit-text {
  position: absolute; top: 22%; left: 50%; transform: translateX(-50%);
  font-size: 1.7rem; font-weight: 900; letter-spacing: 0.04em; opacity: 0; pointer-events: none;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6); white-space: nowrap; z-index: 6;
}
.hit-text.go { animation: floatText 0.85s ease-out; }
.hit-text.perfect { color: var(--gold-2); }
.hit-text.bad { color: #ff6b6b; }
@keyframes floatText {
  0% { opacity: 0; transform: translate(-50%, 10px) scale(0.7); }
  25% { opacity: 1; transform: translate(-50%, -6px) scale(1.1); }
  100% { opacity: 0; transform: translate(-50%, -42px) scale(1); }
}

/* ====== Accuracy meter ====== */
.meter {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  width: 60px; z-index: 5;
}
.meter-cap { font-size: 0.62rem; font-weight: 800; letter-spacing: 0.1em; color: #c8d4ef; }
.meter-cap--top { color: #ff8a6b; }
.meter-cap--bottom { color: #7e8db0; }
.meter-track {
  position: relative; width: 30px; height: 46vh; max-height: 360px; border-radius: 16px;
  overflow: visible; border: 2px solid rgba(232,169,58,0.5);
  box-shadow: 0 6px 18px rgba(0,0,0,0.45), inset 0 0 12px rgba(0,0,0,0.5);
  background: #0a1330;
}
.zone { position: absolute; left: 0; right: 0; border-radius: 12px; }
.zone--early   { top: 0; height: 38%; background: linear-gradient(180deg, #e2452f, #b73221); }
.zone--perfect { top: 38%; height: 24%; background: linear-gradient(180deg, #6cd35f, #2f8a2c);
  box-shadow: 0 0 14px rgba(84,193,78,0.55); }
.zone--late    { top: 62%; bottom: 0; background: linear-gradient(180deg, #1c2c52, #0b1430); }
.perfect-tag {
  position: absolute; right: 36px; top: 50%; transform: translateY(-50%);
  font-size: 0.6rem; font-weight: 800; color: var(--green); white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}
.perfect-tag::after { content: ""; }
.needle {
  position: absolute; left: -7px; right: -7px; top: 50%; height: 8px; transform: translateY(-50%);
  background: linear-gradient(90deg, var(--gold-2), var(--gold));
  border-radius: 3px; box-shadow: 0 0 10px rgba(243,197,99,0.8); pointer-events: none;
}
.needle::after {
  content: ""; position: absolute; right: -10px; top: 50%; transform: translateY(-50%);
  border: 6px solid transparent; border-right-color: var(--gold-2);
}

/* ====== Controls ====== */
.controls { position: relative; z-index: 6; padding: 0 14px calc(14px + env(safe-area-inset-bottom)); }
.tip {
  display: flex; align-items: center; gap: 10px; justify-content: center;
  background: var(--panel); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px; padding: 7px 14px; margin: 0 auto 10px; width: fit-content;
}
.tip-ic { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--orange-2); stroke-width: 2; }
.tip span { font-size: 0.62rem; line-height: 1.25; letter-spacing: 0.06em; color: #b9c4e0; text-transform: uppercase; }
.tip b { color: #fff; }

.strike {
  width: 100%; height: 76px; border: none; cursor: pointer;
  touch-action: none; -webkit-user-select: none; user-select: none;
  display: flex; align-items: center; justify-content: center; gap: 18px;
  font-size: 2.1rem; font-weight: 900; letter-spacing: 0.08em; color: #fff;
  text-shadow: 0 2px 3px rgba(120,50,0,0.7);
  border-radius: 18px;
  background: linear-gradient(180deg, var(--orange-2) 0%, var(--orange) 55%, #d9760f 100%);
  box-shadow: 0 8px 0 #a85507, 0 12px 22px rgba(0,0,0,0.45),
    inset 0 2px 0 rgba(255,255,255,0.4), inset 0 0 0 2px rgba(255,210,130,0.6);
  transition: transform 0.06s ease, box-shadow 0.06s ease;
}
.strike .strike-glyph { color: rgba(255,240,210,0.9); font-size: 1.3rem; }
.strike:active, .strike.press {
  transform: translateY(6px);
  box-shadow: 0 2px 0 #a85507, 0 6px 14px rgba(0,0,0,0.45),
    inset 0 2px 0 rgba(255,255,255,0.3), inset 0 0 0 2px rgba(255,210,130,0.5);
}

/* music toggle (top-right of start screen) */
.music-btn {
  position: absolute; right: 16px; top: 16px; z-index: 30; cursor: pointer;
  width: 50px; height: 50px; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.4rem; line-height: 1;
  background: var(--panel); border: 1px solid var(--stroke);
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.music-btn.muted { opacity: 0.65; filter: grayscale(0.5); }
.music-btn:active { transform: scale(0.94); }

/* ====== Overlays / screens ====== */
.overlay {
  position: absolute; inset: 0; z-index: 20;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background: radial-gradient(120% 90% at 50% 0%, #1a3a86 0%, #0a1330 70%, #05070f 100%);
}
.overlay--dim { background: rgba(5,8,18,0.82); backdrop-filter: blur(3px); }
.overlay.hidden { display: none; }

/* intro / sound-gate modal — sits above every other overlay */
.overlay--intro { z-index: 40; }
.panel--intro { display: flex; flex-direction: column; align-items: center; }
.intro-sound {
  font-size: 2.4rem; margin: 18px 0 4px;
  filter: drop-shadow(0 0 10px rgba(232,169,58,0.45));
  animation: introPulse 1.8s ease-in-out infinite;
}
@keyframes introPulse {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.12); opacity: 1; }
}
.intro-text { color: #c8d2ec; font-size: 0.92rem; line-height: 1.5; margin: 6px 4px 20px; }
.panel--intro .btn-primary { width: 100%; }
.intro-disclaimer {
  margin-top: 22px; padding-top: 14px;
  border-top: 1px solid rgba(232,169,58,0.18);
  display: flex; flex-direction: column; gap: 8px; text-align: center; width: 100%;
}

.panel {
  width: 100%; max-width: 340px; text-align: center;
  background: linear-gradient(180deg, rgba(20,32,66,0.95), rgba(9,15,33,0.97));
  border: 1px solid var(--stroke); border-radius: 22px; padding: 28px 22px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.08);
}
.logo {
  font-size: 2.6rem; font-weight: 900; letter-spacing: 0.04em;
  background: linear-gradient(180deg, #ffe6a8, var(--gold) 70%, #b97c14);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}
.logo-sub { color: #9fb0d6; font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; margin-top: 4px; }
.rules { color: #c8d2ec; font-size: 0.92rem; line-height: 1.5; margin: 18px 4px 22px; }
.rules b { color: var(--gold-2); }
.panel-title { font-size: 1.3rem; font-weight: 800; letter-spacing: 0.12em; color: var(--gold-2); margin-bottom: 16px; }
.result-score { font-size: 4rem; font-weight: 900; color: #fff; line-height: 1; text-shadow: 0 3px 10px rgba(0,0,0,0.5); }
.result-rows { margin: 18px 0 22px; display: flex; flex-direction: column; gap: 8px; }
.result-rows div { display: flex; justify-content: space-between; padding: 10px 14px; background: rgba(255,255,255,0.05); border-radius: 10px; }
.result-rows span { color: #9fb0d6; font-size: 0.85rem; }
.result-rows b { color: var(--gold-2); font-size: 1.05rem; }
.result-rank {
  min-height: 1.2em; margin: 6px 0 12px; text-align: center;
  font-size: 0.92rem; font-weight: 800; letter-spacing: 0.04em; color: var(--gold-2);
}

/* auth gate (start screen) */
.auth-note {
  margin: 4px 0 14px; font-size: 0.9rem; line-height: 1.4; color: #c8d2ec;
  min-height: 1.2em;
}
.auth-note b { color: var(--gold-2); }
.auth-note.warn { color: #ffcf8a; }

/* leaderboard */
.lb-title {
  margin: 18px 0 8px; font-size: 0.74rem; font-weight: 800; letter-spacing: 0.12em;
  text-transform: uppercase; color: #9fb0d6; text-align: left;
}
.lb-title #rankNote { color: var(--gold-2); }
.lb { list-style: none; margin: 0 0 4px; padding: 0; max-height: 230px; overflow-y: auto; text-align: left; }
.lb li {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 9px;
  background: rgba(255,255,255,0.04); margin-bottom: 5px; font-size: 0.92rem;
}
.lb li.me { background: rgba(232,169,58,0.16); box-shadow: inset 0 0 0 1px rgba(232,169,58,0.4); }
.lb .lb-rank { width: 1.6em; text-align: center; font-weight: 800; color: #9fb0d6; }
.lb li:nth-child(1) .lb-rank { color: #f3c563; }
.lb li:nth-child(2) .lb-rank { color: #cfd6e6; }
.lb li:nth-child(3) .lb-rank { color: #d9974a; }
.lb .lb-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #eef2fb; }
.lb .lb-sub { font-size: 0.72rem; color: #8b97b5; white-space: nowrap; }
.lb .lb-score { font-weight: 800; color: var(--gold-2); font-variant-numeric: tabular-nums; }
.lb-empty { color: #9fb0d6; font-size: 0.86rem; padding: 10px; text-align: center; }
/* empty placeholder slot (when fewer than 10 players yet) */
.lb li.lb-ph { background: rgba(255,255,255,0.02); }
.lb li.lb-ph .lb-rank,
.lb li.lb-ph .lb-name,
.lb li.lb-ph .lb-score { color: #5d6884; font-weight: 600; }

/* compact scrollable ТОП-10 on the start / pause screens */
#lbStart, #lbPause {
  max-height: 116px;            /* ~3 rows visible (of 5), the rest scrolls down */
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(232,169,58,0.5) transparent;
}
#lbStart::-webkit-scrollbar, #lbPause::-webkit-scrollbar { width: 6px; }
#lbStart::-webkit-scrollbar-track, #lbPause::-webkit-scrollbar-track { background: transparent; }
#lbStart::-webkit-scrollbar-thumb, #lbPause::-webkit-scrollbar-thumb {
  background: rgba(232,169,58,0.45); border-radius: 6px;
}

.lb-block { margin-top: 16px; }
.lb-title { display: flex; align-items: center; gap: 8px; }
.lb-cap {
  display: flex; align-items: center; gap: 8px; margin: 16px 0 8px;
  font-size: 0.74rem; font-weight: 800; letter-spacing: 0.12em;
  text-transform: uppercase; color: #9fb0d6; text-align: left;
}
.lb-cap #rankNote { color: var(--gold-2); }

/* mission + authorship disclaimer at the foot of the start panel */
.disclaimer {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(232, 169, 58, 0.18);
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: center;
}
.disclaimer-mission {
  font-size: 0.72rem;
  line-height: 1.45;
  color: #8e9ec4;
  letter-spacing: 0.01em;
}
.disclaimer-mission b { color: var(--gold-2); font-weight: 700; }
.disclaimer-credits {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 18px;
  font-size: 0.72rem;
  color: #c8d2ec;
}
.disclaimer-credits > span { display: inline-flex; align-items: baseline; gap: 6px; }
.disclaimer-role {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7e8db0;
}

/* convenient full-width button to open the leaderboard */
.btn-lb {
  width: 100%; height: 50px; margin-top: 10px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 1rem; font-weight: 800; letter-spacing: 0.04em; color: var(--gold-2);
  border-radius: 13px; background: rgba(232,169,58,0.12);
  border: 1px solid rgba(232,169,58,0.5);
  transition: transform 0.06s ease, background 0.15s;
}
.btn-lb:active { transform: translateY(3px); background: rgba(232,169,58,0.22); }

/* sort tabs in the full leaderboard */
.lb-tabs {
  display: flex; gap: 4px; margin-bottom: 12px; padding: 4px;
  background: rgba(0,0,0,0.3); border-radius: 12px;
}
.lb-tab {
  flex: 1; cursor: pointer; border: none; background: none; padding: 9px 6px;
  font: inherit; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.06em;
  color: #9fb0d6; border-radius: 9px; transition: background 0.15s, color 0.15s;
}
.lb-tab.is-active { background: linear-gradient(180deg, var(--orange-2), var(--orange)); color: #fff; }
.save-note {
  margin: 10px 0 2px; font-size: 0.85rem; line-height: 1.4; color: #ffcf8a; text-align: center;
}
.save-note a { color: var(--gold-2); font-weight: 700; }

/* full-screen leaderboard */
.panel--lb {
  max-width: 380px; display: flex; flex-direction: column;
  max-height: 100%;            /* fit inside the padded overlay (top/bottom gaps) */
  min-height: 0;               /* allow the column to shrink so the list can scroll */
}
.panel--lb .panel-title,
.panel--lb .lb-tabs,
.panel--lb .my-rank,
.panel--lb #lbCloseBtn { flex: 0 0 auto; }   /* fixed parts; only the list scrolls */
.my-rank {
  margin-bottom: 12px; padding: 10px 14px; border-radius: 12px; text-align: center;
  background: rgba(232,169,58,0.14); box-shadow: inset 0 0 0 1px rgba(232,169,58,0.35);
  color: #fff; font-size: 0.95rem; font-weight: 700;
}
.my-rank b { color: var(--gold-2); }
.my-rank.guest { background: rgba(255,255,255,0.05); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12); color: #ffcf8a; font-weight: 600; }
.lb--full {
  flex: 1 1 auto; min-height: 0;   /* min-height:0 is what lets it scroll instead of stretching */
  max-height: none; overflow-y: auto; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.lb--full .lb-loading { text-align: center; color: #9fb0d6; font-size: 0.85rem; padding: 12px; }

.btn-primary {
  width: 100%; height: 58px; border: none; cursor: pointer; margin-top: 4px;
  display: flex; align-items: center; justify-content: center; text-decoration: none;
  font-size: 1.25rem; font-weight: 800; letter-spacing: 0.06em; color: #fff; border-radius: 14px;
  background: linear-gradient(180deg, var(--orange-2), var(--orange) 60%, #d9760f);
  box-shadow: 0 6px 0 #a85507, 0 10px 18px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.35);
  transition: transform 0.06s ease, box-shadow 0.06s ease;
}
.btn-primary:active { transform: translateY(5px); box-shadow: 0 1px 0 #a85507, 0 5px 12px rgba(0,0,0,0.4); }
.btn-ghost {
  width: 100%; height: 50px; margin-top: 12px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; text-decoration: none;
  font-size: 1rem; font-weight: 700; color: #c8d2ec; border-radius: 12px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.14);
}
.btn-exit {
  width: 100%; height: 52px; margin-top: 12px; cursor: pointer; border: none;
  display: flex; align-items: center; justify-content: center; text-decoration: none;
  font-size: 1.05rem; font-weight: 800; letter-spacing: 0.04em; color: #fff; border-radius: 12px;
  background: linear-gradient(180deg, #ec5a5a, #d63232 60%, #b41f1f);
  box-shadow: 0 5px 0 #8e1818, 0 8px 16px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.25);
  transition: transform 0.06s ease, box-shadow 0.06s ease;
}
.btn-exit:active { transform: translateY(4px); box-shadow: 0 1px 0 #8e1818, 0 4px 10px rgba(0,0,0,0.4); }

/* screen-shake on perfect hit */
.phone.shake { animation: shake 0.3s ease; }
@keyframes shake {
  0%,100% { transform: translate(0,0); }
  20% { transform: translate(-4px, 3px); }
  40% { transform: translate(5px, -2px); }
  60% { transform: translate(-3px, -3px); }
  80% { transform: translate(3px, 2px); }
}

/* hide gameplay chrome before start */
.phone.prestart .hud,
.phone.prestart .hud-row,
.phone.prestart .play,
.phone.prestart .controls { visibility: hidden; }
