:root {
  --ink: #f8fafc;
  --muted: rgba(248, 250, 252, 0.68);
  --street: #232323;
  --teal: #14b8a6;
  --green: #22c55e;
  --red: #ef4444;
  --gold: #facc15;
  --pink: #ec4899;
  --ad-height: 90px;
  --ad-gap: 8px;
  --catch-bottom: calc(var(--ad-height) + 86px);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow: hidden;
  background: #111827;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  touch-action: none;
}

body.admin-page {
  min-height: 100svh;
  overflow: hidden;
  touch-action: auto;
}

button {
  font: inherit;
}

.game {
  position: fixed;
  inset: 0;
  min-height: 100svh;
  overflow: hidden;
  background:
    radial-gradient(circle at 22% 18%, rgba(20, 184, 166, 0.18), transparent 28%),
    radial-gradient(circle at 72% 14%, rgba(250, 204, 21, 0.16), transparent 24%),
    linear-gradient(180deg, #17314a 0%, #28385a 48%, #62372a 100%);
  user-select: none;
  touch-action: none;
  transition: background 900ms ease, filter 900ms ease;
}

.game.phase-sunset {
  background:
    radial-gradient(circle at 74% 16%, rgba(250, 204, 21, 0.26), transparent 24%),
    radial-gradient(circle at 22% 18%, rgba(20, 184, 166, 0.12), transparent 28%),
    linear-gradient(180deg, #23385a 0%, #6d3d48 48%, #8a4a2b 100%);
}

.game.phase-night {
  background:
    radial-gradient(circle at 18% 15%, rgba(248, 250, 252, 0.14), transparent 12%),
    radial-gradient(circle at 74% 22%, rgba(20, 184, 166, 0.14), transparent 24%),
    linear-gradient(180deg, #091525 0%, #16213c 52%, #2a1d2e 100%);
}

.game.phase-rain {
  filter: saturate(0.92) brightness(0.9);
}

.hud {
  position: absolute;
  z-index: 10;
  top: max(14px, env(safe-area-inset-top));
  left: 12px;
  right: 62px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.info-button,
.mute-button {
  position: absolute;
  z-index: 11;
  top: max(14px, env(safe-area-inset-top));
  display: grid;
  width: 42px;
  height: 54px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(8, 13, 25, 0.58);
  color: var(--gold);
  font-size: 1.3rem;
  font-weight: 950;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.info-button {
  right: 12px;
}

.mute-button {
  top: calc(max(14px, env(safe-area-inset-top)) + 62px);
  right: 12px;
  width: 42px;
  height: 42px;
  color: var(--ink);
  font-size: 1.15rem;
}

.mute-button.is-muted {
  color: var(--red);
}

.admin-button {
  position: absolute;
  z-index: 11;
  top: calc(max(14px, env(safe-area-inset-top)) + 62px);
  right: 12px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(8, 13, 25, 0.58);
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 950;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.hud > div {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(8, 13, 25, 0.58);
  backdrop-filter: blur(12px);
}

.hud-label {
  display: block;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hud strong {
  display: block;
  margin-top: 1px;
  overflow: hidden;
  font-size: clamp(1rem, 5vw, 1.25rem);
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.ad-slot {
  position: absolute;
  z-index: 18;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  height: var(--ad-height);
  place-items: center;
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 13, 25, 0.82);
  color: rgba(248, 250, 252, 0.46);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  pointer-events: auto;
}

.ad-slot .adsbygoogle {
  display: block;
  width: min(100%, 480px);
  height: var(--ad-height);
  max-height: var(--ad-height);
  margin: 0 auto;
}

body > .google-auto-placed,
body > .adsbygoogle-noablate,
body > ins.adsbygoogle,
body > iframe[id^="google_ads_iframe"] {
  pointer-events: none !important;
  visibility: hidden !important;
}

.ad-slot ins.adsbygoogle,
.ad-slot iframe[id^="google_ads_iframe"] {
  pointer-events: auto !important;
  visibility: visible !important;
}

body.game-active .ad-slot {
  pointer-events: none;
  visibility: hidden;
}

body.game-active > .adsbygoogle,
body.game-active > ins.adsbygoogle,
body.game-active .google-auto-placed,
body.game-active iframe[id^="google_ads_iframe"] {
  pointer-events: none !important;
  visibility: hidden !important;
}

.skyline {
  position: absolute;
  right: -5vw;
  bottom: 21svh;
  left: -5vw;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  opacity: 0.5;
}

.skyline span {
  display: block;
  width: 15vw;
  max-width: 90px;
  min-height: 88px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.2), rgba(15, 23, 42, 0.9));
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.stadium {
  position: absolute;
  right: 4vw;
  bottom: 24svh;
  left: 4vw;
  height: 112px;
  opacity: 0.42;
  pointer-events: none;
}

.stadium::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(76vw, 360px);
  height: 76px;
  border: 3px solid rgba(248, 250, 252, 0.2);
  border-bottom: 0;
  border-radius: 50% 50% 0 0 / 72% 72% 0 0;
  background:
    repeating-linear-gradient(90deg, rgba(248, 250, 252, 0.13) 0 5px, transparent 5px 16px),
    linear-gradient(180deg, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.82));
  transform: translateX(-50%);
}

.stadium::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 46px;
  width: min(64vw, 310px);
  height: 10px;
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.24);
  box-shadow: 0 0 28px rgba(250, 204, 21, 0.22);
  transform: translateX(-50%);
}

.stadium span {
  position: absolute;
  bottom: 56px;
  width: 2px;
  height: 42px;
  background: rgba(248, 250, 252, 0.22);
  transform-origin: bottom;
}

.stadium span:nth-child(1) {
  left: 18%;
  transform: rotate(-18deg);
}

.stadium span:nth-child(2) {
  left: 36%;
  transform: rotate(-7deg);
}

.stadium span:nth-child(3) {
  right: 36%;
  transform: rotate(7deg);
}

.stadium span:nth-child(4) {
  right: 18%;
  transform: rotate(18deg);
}

.skyline span:nth-child(2) {
  min-height: 130px;
}

.skyline span:nth-child(3) {
  min-height: 102px;
}

.skyline span:nth-child(4) {
  min-height: 154px;
}

.paper {
  position: absolute;
  width: 10px;
  height: 15px;
  border-radius: 2px;
  opacity: 0.82;
  animation: floatPaper 4s linear infinite;
}

.paper-a {
  top: 23%;
  left: 18%;
  background: var(--green);
}

.paper-b {
  top: 17%;
  right: 23%;
  background: var(--gold);
  animation-delay: -1.4s;
}

.paper-c {
  top: 37%;
  right: 12%;
  background: var(--pink);
  animation-delay: -2.3s;
}

.weather-layer {
  position: absolute;
  z-index: 2;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 800ms ease;
}

.weather-layer::before {
  content: "";
  position: absolute;
  inset: -25% 0 0;
  background: repeating-linear-gradient(105deg, transparent 0 18px, rgba(248, 250, 252, 0.24) 18px 20px, transparent 20px 44px);
  animation: rainFall 520ms linear infinite;
}

.game.phase-rain .weather-layer {
  opacity: 0.26;
}

.altitude-trail {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: var(--catch-bottom);
  width: 2px;
  height: 0;
  background: linear-gradient(180deg, transparent, rgba(250, 204, 21, 0.78));
  transform: translateX(-50%);
  transform-origin: bottom;
}

.objects-layer {
  position: absolute;
  z-index: 4;
  inset: 0;
  pointer-events: none;
}

.air-object {
  position: absolute;
  left: 50%;
  bottom: var(--catch-bottom);
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.62);
  border-radius: 50%;
  color: #111827;
  font-size: 1rem;
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3);
  transform: translate3d(-50%, 0, 0);
  will-change: transform, opacity;
}

.air-object.points {
  border-color: rgba(255, 255, 255, 0.76);
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.72), transparent 18%),
    radial-gradient(circle at 50% 50%, #fde68a 0 48%, #facc15 50% 100%);
  color: #713f12;
}

.air-object.wide {
  background: var(--green);
}

.air-object.narrow {
  background: #f97316;
  color: #fff;
}

.air-object.heavy {
  width: 46px;
  border-radius: 48% 52% 44% 56%;
  background:
    linear-gradient(115deg, transparent 0 28%, rgba(120, 53, 15, 0.32) 28% 34%, transparent 34% 52%, rgba(120, 53, 15, 0.28) 52% 58%, transparent 58%),
    linear-gradient(180deg, #f8d49b, #c97b35);
  color: #78350f;
  font-size: 0.52rem;
  text-transform: uppercase;
}

.air-object.float {
  border-color: rgba(255, 255, 255, 0.86);
  background:
    radial-gradient(circle at 30% 42%, #fbcfe8 0 30%, transparent 31%),
    radial-gradient(circle at 54% 28%, #f9a8d4 0 34%, transparent 35%),
    radial-gradient(circle at 68% 52%, #f0abfc 0 32%, transparent 33%),
    linear-gradient(180deg, #fdf2f8, #f9a8d4);
  color: #86198f;
}

.air-object.bump {
  background: var(--teal);
}

.air-object.rare {
  animation: objectPulse 760ms ease-in-out infinite alternate;
}

.air-object.collected {
  opacity: 0;
  transform: translate3d(-50%, -18px, 0) scale(1.45);
  transition: opacity 180ms ease, transform 180ms ease;
}

.target-band {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: calc(var(--catch-bottom) - 29px);
  left: 0;
  height: 58px;
  border-block: 1px dashed rgba(250, 204, 21, 0.55);
  background: rgba(250, 204, 21, 0.08);
  opacity: 0.85;
  transition: opacity 180ms ease, transform 180ms ease, background 180ms ease;
}

.target-band span {
  position: absolute;
  right: 16px;
  top: 50%;
  color: rgba(250, 204, 21, 0.86);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
  transform: translateY(-50%);
}

.target-band i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 4px;
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.28);
  opacity: 0;
  transform: translate(-50%, -50%) scaleX(0.5);
  transition: opacity 160ms ease;
}

.target-band i::after {
  content: "";
  position: absolute;
  right: -2px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-top: 3px solid rgba(248, 250, 252, 0.42);
  border-right: 3px solid rgba(248, 250, 252, 0.42);
  transform: translateY(-50%) rotate(45deg);
}

.target-band.hot {
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(34, 197, 94, 0.8);
}

.target-band.boost {
  background: rgba(250, 204, 21, 0.2);
  border-color: rgba(250, 204, 21, 0.95);
  box-shadow: inset 0 0 26px rgba(250, 204, 21, 0.18);
}

.fan {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: var(--catch-bottom);
  width: 54px;
  height: 104px;
  transform: translate3d(-50%, 0, 0) rotate(0deg);
  transform-origin: 50% 74%;
  will-change: transform;
}

.fan.heavy-mode {
  filter: saturate(1.2);
}

.fan.float-mode {
  filter: drop-shadow(0 0 12px rgba(56, 189, 248, 0.5)) saturate(1.16);
}

.fan > div:not(.fan-shadow) {
  position: absolute;
}

.fan i {
  position: absolute;
  display: block;
}

.fan-shadow {
  display: none;
}

.head {
  top: 4px;
  left: 15px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #f2c59f;
  box-shadow: inset -5px -3px rgba(0, 0, 0, 0.09);
}

.cap {
  z-index: 2;
  top: -1px;
  left: 12px;
  width: 33px;
  height: 17px;
  border-radius: 16px 16px 7px 7px;
  background:
    linear-gradient(90deg, transparent 0 41%, rgba(255, 255, 255, 0.85) 41% 58%, transparent 58%),
    linear-gradient(180deg, #16a34a 0 56%, #dc2626 56% 100%);
  box-shadow: inset -4px -3px rgba(0, 0, 0, 0.14);
}

.cap::after {
  content: "";
  position: absolute;
  right: -9px;
  bottom: 1px;
  width: 16px;
  height: 7px;
  border-radius: 999px;
  background: #16a34a;
  transform: rotate(10deg);
}

.eye {
  top: 10px;
  width: 4px;
  height: 5px;
  border-radius: 50%;
  background: #172033;
}

.eye-left {
  left: 7px;
}

.eye-right {
  right: 7px;
}

.smile {
  left: 8px;
  bottom: 6px;
  width: 11px;
  height: 6px;
  border-bottom: 2px solid #8f3f2a;
  border-radius: 0 0 999px 999px;
}

.torso {
  top: 29px;
  left: 12px;
  width: 31px;
  height: 40px;
  border-radius: 8px 8px 10px 10px;
  background:
    radial-gradient(circle at 74% 26%, rgba(250, 204, 21, 0.95) 0 9%, transparent 10%),
    linear-gradient(90deg, transparent 44%, rgba(255, 255, 255, 0.88) 44% 56%, transparent 56%),
    linear-gradient(180deg, #16a34a 0 50%, #dc2626 50% 100%);
  box-shadow: inset -4px -5px rgba(0, 0, 0, 0.1);
}

.badge {
  top: 8px;
  right: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 1px rgba(31, 41, 55, 0.24);
}

.belt {
  right: 2px;
  bottom: 8px;
  left: 2px;
  height: 4px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.58);
}

.arm,
.leg {
  width: 11px;
  border-radius: 999px;
  background: #f2c59f;
  transform-origin: top center;
}

.arm {
  top: 34px;
  height: 35px;
}

.arm-left {
  left: 8px;
  transform: rotate(132deg);
}

.arm-right {
  right: 7px;
  transform: rotate(-132deg);
}

.leg {
  top: 66px;
  height: 32px;
  background: #1d4ed8;
  box-shadow: inset -3px -3px rgba(0, 0, 0, 0.12);
}

.leg-left {
  left: 17px;
  transform: rotate(16deg);
}

.leg-right {
  right: 14px;
  transform: rotate(-16deg);
}

.shoe {
  top: 92px;
  width: 16px;
  height: 8px;
  border-radius: 999px;
  background: #f8fafc;
  box-shadow: inset -3px -2px rgba(0, 0, 0, 0.12);
  transform-origin: center left;
}

.shoe-left {
  left: 11px;
  transform: rotate(18deg);
}

.shoe-right {
  right: 8px;
  transform: rotate(-18deg);
}

.fan.launched .arm-left {
  animation: waveLeft 340ms ease-in-out infinite alternate;
}

.fan.launched .arm-right {
  animation: waveRight 340ms ease-in-out infinite alternate;
  animation-delay: -170ms;
}

.fan.launched .leg-left {
  animation: kickLeft 390ms ease-in-out infinite alternate;
}

.fan.launched .leg-right {
  animation: kickRight 390ms ease-in-out infinite alternate;
  animation-delay: -195ms;
}

.fan.launched .shoe-left {
  animation: shoeLeft 390ms ease-in-out infinite alternate;
}

.fan.launched .shoe-right {
  animation: shoeRight 390ms ease-in-out infinite alternate;
  animation-delay: -195ms;
}

.impact {
  position: absolute;
  z-index: 7;
  left: 50%;
  bottom: calc(var(--catch-bottom) - 20px);
  width: 120px;
  height: 42px;
  border: 2px solid rgba(250, 204, 21, 0);
  border-radius: 50%;
  transform: translateX(-50%) scale(0.4);
  pointer-events: none;
}

.impact.burst {
  animation: burst 360ms ease-out;
}

.street {
  position: absolute;
  z-index: 3;
  right: 0;
  bottom: var(--ad-height);
  left: 0;
  height: 20svh;
  min-height: 124px;
  background:
    linear-gradient(90deg, transparent 0 18%, rgba(255, 255, 255, 0.16) 18% 20%, transparent 20% 80%, rgba(255, 255, 255, 0.16) 80% 82%, transparent 82%),
    linear-gradient(180deg, rgba(78, 62, 42, 0.82), #252525 30%, var(--street));
  border-top: 2px solid rgba(255, 255, 255, 0.12);
}

.lights {
  position: absolute;
  top: 7px;
  left: 0;
  width: 100%;
  height: 12px;
  height: 18px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.22), transparent 70%),
    repeating-linear-gradient(90deg, #16a34a 0 18px, #f8fafc 18px 36px, #dc2626 36px 54px);
  clip-path: polygon(0 0, 100% 0, 96% 76%, 92% 42%, 88% 76%, 84% 42%, 80% 76%, 76% 42%, 72% 76%, 68% 42%, 64% 76%, 60% 42%, 56% 76%, 52% 42%, 48% 76%, 44% 42%, 40% 76%, 36% 42%, 32% 76%, 28% 42%, 24% 76%, 20% 42%, 16% 76%, 12% 42%, 8% 76%, 4% 42%, 0 76%);
  opacity: 0.86;
}

.facades {
  position: absolute;
  right: 0;
  bottom: 58px;
  left: 0;
  display: flex;
  justify-content: space-between;
  opacity: 0.62;
  pointer-events: none;
}

.facades span {
  display: block;
  width: 30%;
  height: 56px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 0;
  background:
    linear-gradient(90deg, transparent 0 18%, rgba(250, 204, 21, 0.26) 18% 29%, transparent 29% 58%, rgba(20, 184, 166, 0.22) 58% 70%, transparent 70%),
    linear-gradient(180deg, rgba(190, 87, 45, 0.56), rgba(72, 45, 45, 0.3));
}

.facades span:nth-child(2) {
  width: 24%;
  background:
    linear-gradient(90deg, transparent 0 22%, rgba(248, 250, 252, 0.22) 22% 35%, transparent 35% 64%, rgba(220, 38, 38, 0.28) 64% 78%, transparent 78%),
    linear-gradient(180deg, rgba(20, 184, 166, 0.42), rgba(45, 57, 72, 0.28));
}

.facades span:nth-child(3) {
  width: 28%;
  background:
    linear-gradient(90deg, transparent 0 26%, rgba(250, 204, 21, 0.22) 26% 38%, transparent 38% 68%, rgba(248, 250, 252, 0.22) 68% 82%, transparent 82%),
    linear-gradient(180deg, rgba(185, 88, 108, 0.48), rgba(72, 45, 55, 0.28));
}

.game.phase-night .lights,
.game.phase-night .stadium::after {
  opacity: 1;
  filter: brightness(1.4);
}

.game.phase-night .facades {
  opacity: 0.82;
}

.crowd {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 12px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 160px;
  height: 82px;
  gap: 5px;
  padding: 17px 8px 0;
  border-radius: 46px 46px 14px 14px;
  background:
    linear-gradient(180deg, rgba(250, 204, 21, 0.18), rgba(250, 204, 21, 0.03) 38%, transparent 39%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.42));
  border: 1px solid rgba(250, 204, 21, 0.22);
  border-bottom: 0;
  transform: translate3d(-50%, 0, 0);
  transition: filter 120ms ease;
  will-change: transform;
}

.crowd.power-wide {
  filter: brightness(1.18) saturate(1.18);
}

.crowd.power-narrow {
  filter: hue-rotate(-18deg) brightness(0.92);
}

.crowd::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 8px;
  width: 116px;
  height: 6px;
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.86);
  transform: translateX(-50%);
  box-shadow: 0 0 18px rgba(250, 204, 21, 0.42);
}

.crowd::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 7px;
  width: 108px;
  height: 17px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.22);
  transform: translateX(-50%);
  filter: blur(4px);
}

.crowd span {
  position: relative;
  z-index: 1;
  flex: 0 0 10px;
  height: 58px;
  border-radius: 999px;
  background: #f2c59f;
  box-shadow: inset -2px -5px rgba(0, 0, 0, 0.12);
  transform: rotate(-14deg);
  transform-origin: bottom center;
  animation: handsBounce 620ms ease-in-out infinite alternate;
}

.crowd span::before,
.crowd span::after {
  content: "";
  position: absolute;
  left: 50%;
  background: #f2c59f;
  transform: translateX(-50%);
}

.crowd span::before {
  top: -10px;
  width: 19px;
  height: 18px;
  border-radius: 50% 50% 44% 44%;
  box-shadow: inset -3px -2px rgba(0, 0, 0, 0.11);
}

.crowd span::after {
  top: 20px;
  width: 13px;
  height: 36px;
  border-radius: 999px 999px 5px 5px;
  background: #14b8a6;
}

.crowd span:nth-child(even) {
  height: 51px;
  transform: rotate(12deg);
  animation-delay: -190ms;
}

.crowd span:nth-child(3n)::after {
  background: #ef4444;
}

.crowd span:nth-child(3n + 1)::after {
  background: #f8fafc;
}

.crowd span:nth-child(5n) {
  height: 64px;
  animation-delay: -320ms;
}

.crowd.cheer span {
  animation-duration: 120ms;
}

.crowd.cheer {
  filter: brightness(1.28) saturate(1.16);
}

.overlay {
  position: absolute;
  z-index: 20;
  inset: auto 18px calc(var(--ad-height) + var(--ad-gap) + max(24px, env(safe-area-inset-bottom))) 18px;
  display: grid;
  gap: 10px;
  justify-items: stretch;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(8, 13, 25, 0.76);
  backdrop-filter: blur(18px);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}

.overlay-ready {
  inset: auto 14px calc(var(--ad-height) + var(--ad-gap) + max(18px, env(safe-area-inset-bottom))) 14px;
  gap: 13px;
  padding: 20px;
  background: rgba(8, 13, 25, 0.82);
}

.overlay-ready .leaderboard,
.overlay-ready .leaderboard-form,
.overlay-ready .best {
  display: none;
}

.overlay-ended {
  inset: auto 12px calc(var(--ad-height) + var(--ad-gap) + max(14px, env(safe-area-inset-bottom))) 12px;
  gap: 8px;
  padding: 14px;
  background: rgba(8, 13, 25, 0.88);
}

.overlay.hidden {
  visibility: hidden;
  opacity: 0;
  transform: translateY(12px);
}

.info-panel {
  position: absolute;
  z-index: 30;
  inset: 0;
  display: grid;
  align-items: end;
  padding: 18px 18px calc(var(--ad-height) + var(--ad-gap) + max(24px, env(safe-area-inset-bottom)));
  background: rgba(3, 7, 18, 0.48);
  backdrop-filter: blur(5px);
}

.info-panel.hidden {
  display: none;
}

.admin-panel {
  position: absolute;
  z-index: 32;
  inset: 0;
  display: grid;
  align-items: stretch;
  padding: max(16px, env(safe-area-inset-top)) 12px max(16px, env(safe-area-inset-bottom));
  background: rgba(3, 7, 18, 0.62);
  backdrop-filter: blur(6px);
}

.admin-panel.hidden {
  display: none;
}

.admin-shell,
.admin-login-shell {
  display: grid;
  min-height: 100svh;
  padding: max(16px, env(safe-area-inset-top)) 12px max(16px, env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 22% 18%, rgba(20, 184, 166, 0.18), transparent 28%),
    radial-gradient(circle at 72% 14%, rgba(250, 204, 21, 0.16), transparent 24%),
    linear-gradient(180deg, #17314a 0%, #28385a 48%, #62372a 100%);
}

.admin-shell {
  align-items: stretch;
  height: 100svh;
  overflow: hidden;
}

.admin-login-shell {
  align-items: center;
}

.info-dialog {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(8, 13, 25, 0.9);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
}

.admin-dialog {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 12px;
  width: min(100%, 760px);
  height: 100%;
  max-height: calc(100svh - max(32px, env(safe-area-inset-top)) - max(16px, env(safe-area-inset-bottom)));
  margin: 0 auto;
  padding: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(8, 13, 25, 0.94);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
}

.admin-page .admin-dialog {
  min-height: 0;
}

.admin-header,
.admin-actions,
.progression-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.admin-header h2 {
  margin: 0;
  font-size: 1.6rem;
  line-height: 1;
}

.admin-header h1 {
  margin: 0;
  font-size: clamp(1.8rem, 8vw, 2.8rem);
  line-height: 0.95;
}

.admin-back {
  display: grid;
  min-width: 72px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
}

#closeAdminButton {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.admin-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.admin-tabs button,
.progression-toolbar button,
.admin-actions button,
.progression-table button {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--ink);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.admin-tabs button.active,
.admin-actions button {
  background: var(--gold);
  color: #1f1600;
}

.admin-section {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}

.admin-section.hidden {
  display: none;
}

.phrase-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.phrase-fields label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.phrase-fields input,
.progression-table input {
  width: 100%;
  min-width: 0;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
}

.phrase-fields input {
  padding: 0 10px;
}

.progression-toolbar {
  margin-bottom: 8px;
}

.progression-toolbar span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.progression-toolbar button {
  padding: 0 12px;
  background: var(--teal);
  color: #04111a;
}

.progression-table-wrap {
  max-height: 100%;
  overflow: auto;
  overscroll-behavior: contain;
}

.progression-table {
  width: 100%;
  min-width: 650px;
  border-spacing: 0 6px;
}

.progression-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding-block: 6px;
  background: rgba(8, 13, 25, 0.96);
  color: var(--gold);
  font-size: 0.72rem;
  text-align: left;
  text-transform: uppercase;
}

.progression-table td {
  padding-right: 6px;
}

.progression-table td:first-child {
  width: 110px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
  white-space: nowrap;
}

.progression-table input {
  padding: 0 6px;
  text-align: center;
}

.progression-table button {
  width: 38px;
  min-height: 38px;
  background: rgba(239, 68, 68, 0.18);
  color: #fecaca;
}

.admin-actions {
  align-items: end;
}

.admin-actions small {
  color: var(--muted);
  font-size: 0.78rem;
}

.admin-actions button {
  min-width: 176px;
  padding: 0 14px;
}

.admin-login {
  display: grid;
  gap: 10px;
  width: min(100%, 380px);
  margin: 0 auto;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(8, 13, 25, 0.92);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
}

.admin-login h1 {
  margin: 0;
  font-size: clamp(2rem, 12vw, 3.4rem);
  line-height: 0.95;
}

.admin-login label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-login input {
  height: 48px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  font: inherit;
  font-weight: 900;
}

.admin-login button {
  min-height: 50px;
  border: 0;
  border-radius: 8px;
  background: var(--gold);
  color: #1f1600;
  font: inherit;
  font-weight: 950;
  cursor: pointer;
}

.admin-login small {
  min-height: 1em;
  color: var(--muted);
  font-size: 0.82rem;
}

.info-dialog h2,
.info-dialog p,
.info-dialog ul {
  margin: 0;
}

@media (max-width: 520px) {
  .phrase-fields {
    grid-template-columns: 1fr;
  }

  .admin-actions {
    display: grid;
    justify-items: stretch;
  }

  .admin-actions button {
    width: 100%;
  }
}

.info-dialog h2 {
  font-size: clamp(1.6rem, 8vw, 2.3rem);
  line-height: 1;
}

.info-dialog p,
.info-dialog li {
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.32;
}

.info-dialog ul {
  display: grid;
  gap: 7px;
  padding-left: 20px;
}

.info-dialog strong {
  color: var(--gold);
}

#resumeButton {
  min-height: 50px;
  border: 0;
  border-radius: 8px;
  background: var(--gold);
  color: #1f1600;
  font-weight: 950;
  cursor: pointer;
}

.eyebrow {
  margin: 0;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 12vw, 3.6rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.overlay-ready h1 {
  max-width: 7ch;
  font-size: clamp(3rem, 18vw, 5rem);
}

.overlay-ended h1 {
  font-size: clamp(2.6rem, 14vw, 4.4rem);
}

.overlay p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.94rem, 4.2vw, 1.08rem);
  line-height: 1.35;
}

.overlay-ready #message {
  color: rgba(248, 250, 252, 0.82);
  font-size: clamp(1rem, 4.5vw, 1.12rem);
  line-height: 1.36;
}

.overlay-ended #message {
  font-size: 0.88rem;
  line-height: 1.28;
}

.leaderboard-form {
  display: grid;
  gap: 6px;
}

.leaderboard-form.hidden {
  display: none;
}

.leaderboard-form label {
  color: var(--gold);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.leaderboard-form div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.leaderboard-form input {
  min-width: 0;
  height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
}

.overlay-ended .leaderboard-form {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 6px 8px;
}

.overlay-ended .leaderboard-form label {
  align-self: center;
}

.overlay-ended .leaderboard-form div {
  gap: 6px;
}

.overlay-ended .leaderboard-form input {
  height: 36px;
  padding: 0 9px;
  font-size: 0.9rem;
}

.overlay-ended .leaderboard-form button {
  min-width: 76px;
  height: 36px;
  font-size: 0.86rem;
}

.overlay-ended .leaderboard-form small {
  grid-column: 1 / -1;
  min-height: 0;
  font-size: 0.72rem;
}

.leaderboard-form input::placeholder {
  color: rgba(248, 250, 252, 0.48);
}

.leaderboard-form button,
.leaderboard > div button {
  border: 0;
  border-radius: 8px;
  background: var(--teal);
  color: #04111a;
  font: inherit;
  font-weight: 950;
  cursor: pointer;
}

.leaderboard-form button {
  min-width: 92px;
  height: 44px;
}

.leaderboard-form small {
  min-height: 1em;
  color: var(--muted);
  font-size: 0.78rem;
}

#primaryButton {
  min-height: 52px;
  border: 0;
  border-radius: 8px;
  background: var(--gold);
  color: #1f1600;
  font-weight: 950;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.24);
}

.overlay-ready #primaryButton {
  min-height: 58px;
  font-size: 1.08rem;
}

.overlay-ended #primaryButton {
  min-height: 44px;
}

.leaderboard {
  display: grid;
  gap: 8px;
  padding-top: 2px;
}

.overlay-ready .leaderboard {
  opacity: 0.9;
}

.overlay-ended .leaderboard {
  gap: 9px;
  padding: 10px 0 2px;
}

.leaderboard > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.leaderboard h2 {
  margin: 0;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.overlay-ended .leaderboard h2 {
  font-size: 0.88rem;
}

.leaderboard > div button {
  display: grid;
  width: 34px;
  height: 30px;
  place-items: center;
  line-height: 1;
}

.leaderboard ol {
  display: grid;
  max-height: 116px;
  margin: 0;
  padding: 0;
  gap: 5px;
  overflow: auto;
  list-style: none;
}

.overlay-ended .leaderboard ol {
  max-height: min(30svh, 220px);
  gap: 7px;
}

.leaderboard li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 26px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.overlay-ended .leaderboard li {
  grid-template-columns: 30px minmax(0, 1fr) auto;
  min-height: 34px;
  padding: 0 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.98rem;
}

.leaderboard li span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard li span:last-child {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.best {
  text-align: center;
}

.feedback {
  position: absolute;
  z-index: 12;
  top: 22%;
  right: 16px;
  left: 16px;
  color: var(--gold);
  font-size: clamp(1.6rem, 11vw, 3.2rem);
  font-weight: 950;
  line-height: 1;
  text-align: center;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  transform: translateY(14px) scale(0.96);
  opacity: 0;
  pointer-events: none;
}

.feedback.show {
  animation: feedback 620ms ease-out;
}

@media (min-width: 680px) {
  .game {
    left: 50%;
    width: min(100vw, 480px);
    transform: translateX(-50%);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 80px rgba(0, 0, 0, 0.42);
  }
}

@keyframes handsBounce {
  from {
    translate: 0 3px;
  }

  to {
    translate: 0 -13px;
  }
}

@keyframes waveLeft {
  from {
    transform: rotate(104deg) translateY(-2px);
  }

  to {
    transform: rotate(166deg) translateY(3px);
  }
}

@keyframes waveRight {
  from {
    transform: rotate(-166deg) translateY(3px);
  }

  to {
    transform: rotate(-104deg) translateY(-2px);
  }
}

@keyframes kickLeft {
  from {
    transform: rotate(-22deg) translateY(2px);
  }

  to {
    transform: rotate(42deg) translateY(-3px);
  }
}

@keyframes kickRight {
  from {
    transform: rotate(-42deg) translateY(-3px);
  }

  to {
    transform: rotate(22deg) translateY(2px);
  }
}

@keyframes shoeLeft {
  from {
    transform: rotate(-12deg) translate(1px, 5px);
  }

  to {
    transform: rotate(34deg) translate(-3px, -4px);
  }
}

@keyframes shoeRight {
  from {
    transform: rotate(-34deg) translate(3px, -4px);
  }

  to {
    transform: rotate(12deg) translate(-1px, 5px);
  }
}

@keyframes burst {
  from {
    border-color: rgba(250, 204, 21, 0.9);
    opacity: 1;
    transform: translateX(-50%) scale(0.35);
  }

  to {
    border-color: rgba(250, 204, 21, 0);
    opacity: 0;
    transform: translateX(-50%) scale(1.6);
  }
}

@keyframes feedback {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.92);
  }

  18% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  100% {
    opacity: 0;
    transform: translateY(-28px) scale(1.05);
  }
}

@keyframes floatPaper {
  from {
    transform: translate3d(0, -25px, 0) rotate(0deg);
  }

  to {
    transform: translate3d(22px, 70px, 0) rotate(270deg);
  }
}

@keyframes rainFall {
  from {
    transform: translate3d(0, -34px, 0);
  }

  to {
    transform: translate3d(-18px, 34px, 0);
  }
}

@keyframes objectPulse {
  from {
    scale: 1;
  }

  to {
    scale: 1.16;
  }
}
