:root {
  color-scheme: dark;
  --stage-w: min(100vw, calc(100svh * 0.5625));
  --stage-h: min(100svh, calc(100vw * 1.7778));
  --green: #20b92d;
  --blue: #0878ff;
  --orange: #ff5a16;
  --yellow: #ffe14d;
  --ink: #08110b;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", Arial, sans-serif;
}

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

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #030503;
}

button,
input {
  font: inherit;
}

.phone-shell {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 20%, rgba(37, 185, 49, 0.22), transparent 36%),
    #020402;
}

.screen,
.rules-dialog {
  width: var(--stage-w);
  height: var(--stage-h);
  max-width: 100vw;
  max-height: 100svh;
}

.screen {
  position: absolute;
  display: none;
  overflow: hidden;
  background: #071907;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 24px 80px rgba(0, 0, 0, 0.75);
}

.screen.is-active {
  display: block;
}

.screen-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  user-select: none;
}

.image-button {
  position: absolute;
  z-index: 4;
  display: block;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  transform-origin: 50% 50%;
}

.image-button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  user-select: none;
}

.image-button:active {
  transform: scale(0.965);
}

.music-toggle {
  position: fixed;
  z-index: 70;
  left: calc(50% + var(--stage-w) / 2 - clamp(48px, calc(var(--stage-w) * 0.108), 78px));
  top: calc(50% - var(--stage-h) / 2 + max(9px, env(safe-area-inset-top)));
  width: clamp(36px, calc(var(--stage-w) * 0.088), 60px);
  height: clamp(36px, calc(var(--stage-w) * 0.088), 60px);
  display: grid;
  place-items: center;
  border: clamp(2px, calc(var(--stage-w) * 0.006), 5px) solid #07130a;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #19b7ff 0%, #0869d8 58%, #063aa0 100%);
  box-shadow:
    inset 0 0 clamp(3px, calc(var(--stage-w) * 0.012), 9px) rgba(255, 255, 255, 0.48),
    0 clamp(3px, calc(var(--stage-w) * 0.009), 7px) 0 #07130a;
  cursor: pointer;
}

.music-toggle span {
  display: grid;
  place-items: center;
  width: 72%;
  height: 72%;
  border-radius: 50%;
  font-family: Arial, sans-serif;
  font-size: clamp(20px, calc(var(--stage-w) * 0.054), 38px);
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 2px 0 #07130a;
}

.music-toggle.is-playing span {
  animation: musicSpin 1.35s linear infinite;
}

.music-toggle.is-pending span {
  animation: musicReadyPulse 1.15s ease-in-out infinite;
}

.music-toggle.is-muted {
  filter: grayscale(0.26) brightness(0.9);
  opacity: 0.9;
}

.music-toggle.is-muted::after {
  content: "";
  position: absolute;
  width: 72%;
  height: clamp(2px, calc(var(--stage-w) * 0.007), 5px);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 1px 0 rgba(7, 19, 10, 0.62);
  transform: rotate(-45deg);
}

.music-toggle:active {
  transform: scale(0.94);
}

.home-start-button {
  left: calc(158 / 1080 * 100%);
  top: calc(1451 / 1920 * 100%);
  width: calc(764 / 1080 * 100%);
  height: calc(207 / 1920 * 100%);
  animation: startButtonPulse 1.75s ease-in-out infinite;
}

.home-rules-button {
  left: calc(375 / 1080 * 100%);
  top: calc(1655 / 1920 * 100%);
  width: calc(369 / 1080 * 100%);
  height: calc(111 / 1920 * 100%);
  animation: rulesButtonFloat 2.25s ease-in-out infinite;
}

.loading-track {
  position: absolute;
  z-index: 3;
  left: calc(31 / 1080 * 100%);
  top: calc(782 / 1920 * 100%);
  width: calc(1017 / 1080 * 100%);
  height: calc(264 / 1920 * 100%);
}

.loading-road {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  user-select: none;
}

.loading-motion {
  --progress: 0;
  --ball-rotation: 0deg;
  position: absolute;
  left: calc(12 / 1017 * 100%);
  top: calc(66 / 264 * 100%);
  width: calc(590 / 1017 * 100%);
  height: calc(150 / 264 * 100%);
  transition: transform 220ms cubic-bezier(0.2, 0.9, 0.25, 1);
}

.loading-car,
.loading-football,
.loading-ball-effect {
  position: absolute;
  display: block;
  object-fit: fill;
  pointer-events: none;
  user-select: none;
}

.loading-car {
  left: calc(48 / 590 * 100%);
  top: 0;
  width: calc(399 / 590 * 100%);
  height: calc(142 / 150 * 100%);
}

.loading-football {
  left: calc(512 / 590 * 100%);
  top: calc(84 / 150 * 100%);
  width: calc(60 / 590 * 100%);
  height: calc(59 / 150 * 100%);
  transform: rotate(var(--ball-rotation));
  transition: transform 220ms cubic-bezier(0.2, 0.9, 0.25, 1);
}

.loading-ball-effect {
  left: calc(466 / 590 * 100%);
  top: calc(100 / 150 * 100%);
  width: calc(46 / 590 * 100%);
  height: calc(26 / 150 * 100%);
  opacity: 0.82;
  animation: speedFlicker 0.32s linear infinite reverse;
}

.hotspot {
  position: absolute;
  z-index: 6;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.hotspot:focus-visible,
.mini-button:focus-visible,
.shoot-button:focus-visible,
.arrow-control:focus-visible,
.primary-action:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.loading-percent {
  position: absolute;
  left: 0;
  right: 12%;
  top: calc(1079 / 1920 * 100%);
  z-index: 25;
  color: white;
  font-size: clamp(22px, calc(var(--stage-w) * 0.07), 62px);
  line-height: 1;
  text-align: center;
  text-shadow: 0 4px 0 #000, 0 0 18px rgba(0, 0, 0, 0.65);
}

.rules-dialog {
  position: fixed;
  inset: 0;
  z-index: 20;
  margin: auto;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: transparent;
}

.rules-dialog::backdrop {
  background: rgba(0, 0, 0, 0.68);
}

.rules-panel {
  position: absolute;
  z-index: 2;
  left: calc(85 / 1080 * 100%);
  top: calc(218 / 1920 * 100%);
  width: calc(910 / 1080 * 100%);
  height: calc(1445 / 1920 * 100%);
  object-fit: fill;
  pointer-events: none;
  user-select: none;
  animation: panelEnter 360ms cubic-bezier(0.18, 0.9, 0.2, 1.2) both;
}

.rules-left-button {
  z-index: 3;
  left: 50%;
  top: calc(1521 / 1920 * 100%);
  width: calc(359 / 1080 * 100%);
  height: calc(132 / 1920 * 100%);
  transform: translateX(-50%);
  animation: panelEnterCentered 420ms 80ms cubic-bezier(0.18, 0.9, 0.2, 1.2) both;
}

.rules-left-button:active {
  transform: translateX(-50%) scale(0.965);
}

.rules-right-button {
  display: none;
}

.game-hud {
  position: absolute;
  z-index: 10;
  left: calc(118 / 1080 * 100%);
  top: calc(18 / 1920 * 100%);
  width: calc(844 / 1080 * 100%);
  height: calc(290 / 1920 * 100%);
  color: #fff;
  text-shadow:
    0 calc(var(--stage-w) * 0.008) 0 #03120a,
    calc(var(--stage-w) * 0.006) 0 0 #03120a,
    calc(var(--stage-w) * -0.006) 0 0 #03120a,
    0 calc(var(--stage-w) * -0.006) 0 #03120a;
}

.game-hud-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  user-select: none;
}

.game-hud-level,
.game-hud-attempts,
.game-hud-time {
  position: absolute;
  z-index: 2;
}

.game-hud-level {
  left: calc(104 / 844 * 100%);
  top: calc(48 / 290 * 100%);
  width: calc(142 / 844 * 100%);
  height: calc(86 / 290 * 100%);
}

.game-hud-attempts {
  left: calc(104 / 844 * 100%);
  top: calc(151 / 290 * 100%);
  width: calc(146 / 844 * 100%);
  height: calc(90 / 290 * 100%);
}

.game-hud-time {
  left: calc(268 / 844 * 100%);
  top: calc(83 / 290 * 100%);
  width: calc(292 / 844 * 100%);
  height: calc(126 / 290 * 100%);
  text-align: center;
}

.game-hud-icon {
  position: absolute;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  z-index: 3;
  filter: drop-shadow(0 calc(var(--stage-w) * 0.004) 0 #06130b);
}

.game-hud-level-icon {
  left: 0;
  top: calc(43 / 86 * 100%);
  width: calc(var(--stage-w) * 0.025);
  height: auto;
}

.game-hud-attempts-icon {
  left: 0;
  top: calc(34 / 90 * 100%);
  width: calc(var(--stage-w) * 0.041);
  height: auto;
}

.game-hud span {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  font-family: Arial, sans-serif;
  font-weight: 900;
  font-size: clamp(10px, calc(var(--stage-w) * 0.028), 27px);
  line-height: 0.95;
  letter-spacing: 0;
}

.game-hud strong {
  position: absolute;
  display: block;
  color: #9dff4d;
  margin-top: 0;
  font-size: clamp(15px, calc(var(--stage-w) * 0.031), 33px);
  line-height: 0.9;
  letter-spacing: 0;
  -webkit-text-stroke: clamp(1.2px, calc(var(--stage-w) * 0.0045), 4px) #03120a;
  paint-order: stroke fill;
  text-shadow:
    0 calc(var(--stage-w) * 0.005) 0 #03120a,
    0 0 calc(var(--stage-w) * 0.008) rgba(0, 0, 0, 0.55);
}

.game-hud strong b:first-child {
  display: inline-block;
  font-size: clamp(23px, calc(var(--stage-w) * 0.05), 53px);
  line-height: 0.78;
}

.game-hud-time strong {
  left: 0;
  right: 0;
  top: calc(56 / 126 * 100%);
  font-size: clamp(22px, calc(var(--stage-w) * 0.054), 57px);
  line-height: 0.86;
  white-space: nowrap;
}

.game-hud-level strong {
  color: #fff45a;
}

.game-hud-time span {
  left: 0;
  right: 0;
  font-size: clamp(10px, calc(var(--stage-w) * 0.028), 27px);
  white-space: nowrap;
}

.game-hud-level strong {
  left: calc(39 / 142 * 100%);
  top: calc(36 / 86 * 100%);
}

.game-hud-attempts strong {
  left: calc(47 / 146 * 100%);
  top: calc(34 / 90 * 100%);
}

.game-hud-level strong,
.game-hud-attempts strong {
  white-space: nowrap;
}

.game-hud-button {
  position: absolute;
  z-index: 3;
  left: calc(596 / 844 * 100%);
  width: calc(181 / 844 * 100%);
  height: calc(78 / 290 * 100%);
}

.game-rules-button {
  top: calc(64 / 290 * 100%);
}

.game-restart-button {
  top: calc(148 / 290 * 100%);
}

.game-net-wrap {
  position: absolute;
  z-index: 3;
  left: calc(88 / 1080 * 100%);
  top: calc(292 / 1920 * 100%);
  width: calc(907 / 1080 * 100%);
  height: calc(430 / 1920 * 100%);
}

.game-net {
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: calc(358 / 430 * 100%);
  object-fit: fill;
  pointer-events: none;
}

.game-keeper {
  --keeper-x: 50%;
  position: absolute;
  z-index: 4;
  left: var(--keeper-x);
  top: calc(118 / 430 * 100%);
  width: calc(261 / 907 * 100%);
  height: auto;
  transform: translateX(-50%);
  opacity: 0;
  transition: left 55ms linear, opacity 160ms ease;
  pointer-events: none;
}

.game-keeper[data-color="red"] {
  width: calc(271 / 907 * 100%);
}

.game-keeper.is-visible {
  opacity: 1;
}

.game-trajectory {
  --angle: 0deg;
  --aim-x: 50%;
  position: absolute;
  z-index: 5;
  left: calc(var(--aim-x) - (39 / 1080 * 100%));
  top: calc(780 / 1920 * 100%);
  width: calc(78 / 1080 * 100%);
  height: calc(600 / 1920 * 100%);
  transform-origin: 50% 100%;
  transform: rotate(var(--angle));
  display: grid;
  justify-items: center;
  align-content: space-between;
  pointer-events: none;
}

.game-trajectory span {
  width: clamp(9px, calc(var(--stage-w) * 0.026), 20px);
  height: clamp(9px, calc(var(--stage-w) * 0.026), 20px);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.62);
}

.game-trajectory i {
  width: 0;
  height: 0;
  border-left: calc(var(--stage-w) * 0.055) solid transparent;
  border-right: calc(var(--stage-w) * 0.055) solid transparent;
  border-bottom: calc(var(--stage-w) * 0.072) solid #ffc529;
  filter: drop-shadow(0 4px 0 #35bd33);
}

.game-ball {
  --ball-x: 50%;
  --ball-y: 59%;
  --ball-scale: 1;
  --ball-spin: 0deg;
  position: absolute;
  z-index: 7;
  left: var(--ball-x);
  top: var(--ball-y);
  width: calc(143 / 1080 * 100%);
  height: auto;
  transform: translate(-50%, -50%) scale(var(--ball-scale)) rotate(var(--ball-spin));
  transform-origin: 50% 50%;
  transition:
    left var(--shot-duration, 620ms) cubic-bezier(0.18, 0.86, 0.24, 1),
    top var(--shot-duration, 620ms) cubic-bezier(0.18, 0.86, 0.24, 1),
    transform var(--shot-duration, 620ms) cubic-bezier(0.18, 0.86, 0.24, 1),
    opacity 120ms ease;
  pointer-events: none;
}

.game-ball.is-caught {
  opacity: 0;
}

.steering-control {
  --wheel-angle: 0deg;
  position: absolute;
  z-index: 8;
  left: calc(350 / 1080 * 100%);
  top: calc(1338 / 1920 * 100%);
  width: calc(381 / 1080 * 100%);
  height: calc(381 / 1920 * 100%);
  border: 0;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: 0 0 0 calc(var(--stage-w) * 0.025) rgba(255, 255, 255, 0.24);
  cursor: grab;
  touch-action: none;
}

.steering-control.is-dragging {
  cursor: grabbing;
}

.steering-control img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: rotate(var(--wheel-angle));
  transition: transform 80ms linear;
  pointer-events: none;
  user-select: none;
}

.game-notification {
  position: absolute;
  z-index: 30;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}

.game-notification.is-visible {
  opacity: 1;
  transform: scale(1);
}

.game-notification img {
  display: block;
  width: min(94%, calc(var(--stage-h) * 0.56));
  max-height: 58%;
  object-fit: contain;
  filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.36));
}

@keyframes startButtonPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.025);
  }
}

@keyframes rulesButtonFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

@keyframes speedFlicker {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 0.95;
  }
}

@keyframes ballSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes musicSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes musicReadyPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.78;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

@keyframes panelEnter {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes panelEnterCentered {
  from {
    opacity: 0;
    transform: translate(-50%, 18px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

.hotspot-got-it {
  left: 17%;
  top: 84.3%;
  width: 34%;
  height: 7.6%;
}

.hotspot-close-rules {
  left: 53%;
  top: 84.3%;
  width: 34%;
  height: 7.6%;
}

.field-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(1, 11, 22, 0.82) 0 18%, rgba(4, 67, 57, 0.16) 32%, transparent 46%),
    radial-gradient(ellipse at 50% 35%, rgba(124, 255, 98, 0.95) 0 12%, rgba(48, 165, 35, 0.88) 28%, rgba(18, 78, 20, 0.9) 60%, rgba(5, 28, 7, 1) 100%);
}

.field-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.72;
  background-image:
    repeating-linear-gradient(102deg, rgba(255, 255, 255, 0.1) 0 1px, transparent 1px 7px),
    repeating-linear-gradient(20deg, rgba(0, 0, 0, 0.22) 0 2px, transparent 2px 11px);
  mix-blend-mode: overlay;
}

.field-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 54%, rgba(0, 0, 0, 0.28) 100%);
}

.hud {
  position: absolute;
  z-index: 3;
  left: 5%;
  right: 5%;
  top: 3.2%;
  display: grid;
  grid-template-columns: 0.85fr 0.95fr 1.45fr 1fr;
  gap: clamp(5px, calc(var(--stage-w) * 0.014), 12px);
  align-items: start;
  color: #fff;
  text-shadow: 0 3px 0 #001121;
}

.hud-card {
  min-height: calc(var(--stage-w) * 0.13);
  padding: clamp(5px, calc(var(--stage-w) * 0.018), 13px);
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: 7px;
  background: linear-gradient(135deg, rgba(2, 120, 255, 0.9), rgba(1, 26, 84, 0.72));
  box-shadow: inset 0 0 16px rgba(44, 222, 255, 0.5), 0 4px 0 rgba(0, 0, 0, 0.45);
}

.hud-card span {
  display: block;
  margin-bottom: 2px;
  font-family: Arial, sans-serif;
  font-size: clamp(8px, calc(var(--stage-w) * 0.027), 22px);
  font-weight: 900;
}

.hud-card strong {
  display: block;
  color: var(--yellow);
  font-size: clamp(18px, calc(var(--stage-w) * 0.056), 48px);
  line-height: 0.95;
}

.hud-time strong {
  color: #b7ff30;
}

.hud-actions {
  display: grid;
  gap: 6px;
}

.mini-button {
  min-height: calc(var(--stage-w) * 0.07);
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 7px;
  color: #fff;
  background: linear-gradient(#197eff, #0736b2);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.24), 0 3px 0 rgba(0, 0, 0, 0.35);
  font-family: Arial, sans-serif;
  font-size: clamp(10px, calc(var(--stage-w) * 0.033), 24px);
  font-weight: 900;
}

.mini-button-green {
  background: linear-gradient(#67d93c, #178b21);
}

.goal-area {
  position: absolute;
  z-index: 2;
  left: 6%;
  right: 6%;
  top: 18%;
  height: 28%;
  perspective: 600px;
}

.stadium-light {
  position: absolute;
  top: -30%;
  width: 25%;
  height: 40%;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.95) 0 3px, transparent 4px) 0 0 / 18px 18px,
    radial-gradient(ellipse, rgba(75, 209, 255, 0.75), transparent 65%);
  filter: blur(0.5px);
  opacity: 0.88;
}

.stadium-light-left {
  left: -8%;
  transform: rotate(24deg);
}

.stadium-light-right {
  right: -8%;
  transform: rotate(-24deg);
}

.goal-frame {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 80%;
  border: clamp(7px, calc(var(--stage-w) * 0.018), 16px) solid white;
  border-bottom-width: clamp(5px, calc(var(--stage-w) * 0.012), 10px);
  border-radius: 8px 8px 2px 2px;
  box-shadow: 0 0 16px rgba(120, 235, 255, 0.95), inset 0 0 18px rgba(255, 255, 255, 0.5);
  transform: rotateX(6deg);
}

.goal-net {
  position: absolute;
  inset: 3%;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.85) 0 3px, transparent 3px 28px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.85) 0 3px, transparent 3px 32px);
}

.keeper {
  --x: 50%;
  position: absolute;
  left: var(--x);
  bottom: 4%;
  width: 16%;
  aspect-ratio: 0.65;
  transform: translateX(-50%);
  border-radius: 48% 48% 25% 25%;
  background:
    radial-gradient(circle at 50% 10%, #f0b170 0 9%, transparent 10%),
    linear-gradient(90deg, transparent 0 20%, #082947 21% 36%, transparent 37% 63%, #082947 64% 79%, transparent 80%),
    linear-gradient(#072f58 0 44%, #101317 45% 53%, #072f58 54% 100%);
  box-shadow: 0 0 0 3px rgba(1, 5, 9, 0.65), 0 7px 12px rgba(0, 0, 0, 0.38);
  transition: left 80ms linear, opacity 180ms ease, transform 180ms ease;
}

.keeper::before,
.keeper::after {
  content: "";
  position: absolute;
  top: 36%;
  width: 42%;
  height: 12%;
  border-radius: 999px;
  background: #f6a35d;
}

.keeper::before {
  left: -28%;
  transform: rotate(34deg);
}

.keeper::after {
  right: -28%;
  transform: rotate(-34deg);
}

.keeper-two {
  background:
    radial-gradient(circle at 50% 10%, #f0b170 0 9%, transparent 10%),
    linear-gradient(90deg, transparent 0 20%, #b5141f 21% 36%, transparent 37% 63%, #b5141f 64% 79%, transparent 80%),
    linear-gradient(#e6222e 0 44%, #101317 45% 53%, #e6222e 54% 100%);
}

.keeper:not(.is-visible) {
  opacity: 0;
  transform: translateX(-50%) scale(0.8);
}

.aim-path {
  --angle: -8deg;
  position: absolute;
  z-index: 2;
  left: calc(50% - 24px);
  bottom: 37%;
  width: 7px;
  height: 27%;
  transform-origin: 50% 100%;
  transform: translateX(-50%) rotate(var(--angle));
  display: grid;
  justify-items: center;
  align-content: space-between;
  pointer-events: none;
}

.aim-path span {
  width: clamp(7px, calc(var(--stage-w) * 0.018), 18px);
  height: clamp(7px, calc(var(--stage-w) * 0.018), 18px);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.72);
}

.aim-path::after {
  content: "";
  width: 0;
  height: 0;
  border-left: calc(var(--stage-w) * 0.04) solid transparent;
  border-right: calc(var(--stage-w) * 0.04) solid transparent;
  border-bottom: calc(var(--stage-w) * 0.065) solid #ffc52b;
  filter: drop-shadow(0 3px 0 #19b53d);
}

.ball {
  --ball-x: 50%;
  --ball-y: 69%;
  position: absolute;
  z-index: 4;
  left: var(--ball-x);
  top: var(--ball-y);
  width: clamp(54px, calc(var(--stage-w) * 0.18), 156px);
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(var(--ball-scale, 1));
  background:
    radial-gradient(circle at 50% 50%, #111 0 13%, transparent 14%),
    conic-gradient(from 18deg, #111 0 9%, #fff 9% 18%, #111 18% 29%, #fff 29% 43%, #111 43% 55%, #fff 55% 70%, #111 70% 82%, #fff 82% 100%);
  border: 5px solid #f6f6f6;
  box-shadow: inset -8px -10px 0 rgba(0, 0, 0, 0.22), 0 12px 18px rgba(0, 0, 0, 0.45);
  transition: left 560ms cubic-bezier(0.2, 0.9, 0.25, 1), top 560ms cubic-bezier(0.2, 0.9, 0.25, 1), transform 560ms ease;
}

.feedback {
  position: absolute;
  z-index: 7;
  left: 4%;
  right: 8%;
  top: 49%;
  min-height: 52px;
  display: grid;
  place-items: center;
  padding: 8px 14px;
  color: #fff;
  text-align: center;
  font-family: Arial, sans-serif;
  font-size: clamp(15px, calc(var(--stage-w) * 0.047), 36px);
  font-weight: 900;
  text-shadow: 0 3px 0 #000;
  opacity: 0;
  transform: scale(0.94);
  transition: opacity 160ms ease, transform 160ms ease;
  pointer-events: none;
}

.feedback.is-visible {
  opacity: 1;
  transform: scale(1);
}

.controls {
  position: absolute;
  z-index: 5;
  left: 6%;
  right: 6%;
  bottom: max(3.8%, env(safe-area-inset-bottom));
  height: 27%;
  display: grid;
  grid-template-columns: 0.27fr 1fr 0.27fr;
  grid-template-rows: 1fr auto;
  align-items: center;
  gap: clamp(8px, calc(var(--stage-w) * 0.03), 24px);
}

.arrow-control {
  width: 100%;
  aspect-ratio: 1;
  border: 4px solid rgba(255, 255, 255, 0.82);
  border-radius: 50%;
  color: white;
  background: linear-gradient(#b8dbe5, #668993);
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.22), 0 5px 0 rgba(0, 0, 0, 0.35);
  font-size: clamp(36px, calc(var(--stage-w) * 0.13), 98px);
  line-height: 0.7;
  text-shadow: 0 2px 0 #3d4b50;
}

.wheel-wrap {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
}

.angle-value {
  position: absolute;
  top: -15%;
  z-index: 3;
  min-width: 72px;
  padding: 4px 12px;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  font-family: Arial, sans-serif;
  font-size: clamp(12px, calc(var(--stage-w) * 0.038), 28px);
  font-weight: 900;
  text-align: center;
}

.steering-wheel {
  position: relative;
  width: min(72%, calc(var(--stage-h) * 0.16));
  aspect-ratio: 1;
  border: clamp(13px, calc(var(--stage-w) * 0.035), 34px) solid rgba(185, 198, 191, 0.8);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(30, 44, 43, 0.95) 0 28%, transparent 29%),
    linear-gradient(135deg, rgba(8, 22, 25, 0.9), rgba(153, 170, 161, 0.62));
  box-shadow: inset 0 0 24px rgba(255, 255, 255, 0.2), 0 13px 24px rgba(0, 0, 0, 0.5);
  transform: rotate(var(--angle, -8deg));
  transition: transform 120ms ease;
}

.wheel-spoke {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12%;
  height: 42%;
  transform-origin: 50% 0;
  border-radius: 999px;
  background: #1a2526;
}

.wheel-spoke-top {
  transform: translate(-50%, 0) rotate(180deg);
}

.wheel-spoke-left {
  transform: translate(-50%, 0) rotate(58deg);
}

.wheel-spoke-right {
  transform: translate(-50%, 0) rotate(-58deg);
}

.wheel-hub {
  position: absolute;
  inset: 34%;
  border-radius: 50%;
  background: #202f31;
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.2);
}

.angle-range {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: ew-resize;
}

.shoot-button {
  grid-column: 1 / -1;
  justify-self: center;
  width: min(46%, 270px);
  min-height: clamp(44px, calc(var(--stage-h) * 0.055), 82px);
  border: 4px solid rgba(255, 235, 181, 0.96);
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(#ff7b32, #e8321f);
  box-shadow: inset 0 -5px 0 rgba(80, 0, 0, 0.34), 0 6px 0 rgba(0, 0, 0, 0.45);
  font-family: Arial, sans-serif;
  font-size: clamp(17px, calc(var(--stage-w) * 0.053), 40px);
  font-weight: 900;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.38);
}

.shoot-button:disabled {
  filter: grayscale(0.6) brightness(0.72);
}

.result-panel {
  position: absolute;
  z-index: 3;
  left: 7%;
  right: 7%;
  top: 9%;
  display: grid;
  gap: clamp(14px, calc(var(--stage-h) * 0.018), 26px);
  color: #fff;
  text-align: center;
  text-shadow: 0 3px 0 #000;
}

.eyebrow {
  margin: 0;
  color: #9cf944;
  font-family: Arial, sans-serif;
  font-size: clamp(15px, calc(var(--stage-w) * 0.04), 32px);
  font-weight: 900;
}

.result-panel h1 {
  margin: 0;
  color: var(--yellow);
  font-size: clamp(36px, calc(var(--stage-w) * 0.11), 92px);
  line-height: 0.98;
}

.result-poster {
  display: grid;
  gap: clamp(10px, calc(var(--stage-h) * 0.013), 18px);
  justify-items: center;
  min-height: calc(var(--stage-h) * 0.48);
  padding: 8% 7%;
  border: 5px solid #fff;
  border-radius: 8px;
  color: #061006;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(245, 255, 218, 0.9)),
    radial-gradient(circle at 30% 10%, rgba(255, 224, 43, 0.45), transparent 40%);
  text-shadow: none;
  box-shadow: 10px 12px 0 #071907, 0 0 0 8px #0587ff;
  font-family: Arial, sans-serif;
  font-weight: 900;
}

.poster-ball {
  width: 30%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #111 0 13%, transparent 14%),
    conic-gradient(from 18deg, #111 0 9%, #fff 9% 18%, #111 18% 29%, #fff 29% 43%, #111 43% 55%, #fff 55% 70%, #111 70% 82%, #fff 82% 100%);
  border: 5px solid #f6f6f6;
  box-shadow: inset -8px -10px 0 rgba(0, 0, 0, 0.22);
}

.result-poster p {
  margin: 0;
  color: #18a523;
  font-size: clamp(20px, calc(var(--stage-w) * 0.057), 44px);
}

.result-poster strong,
.result-poster span {
  display: block;
  font-size: clamp(18px, calc(var(--stage-w) * 0.05), 40px);
}

.result-poster span {
  color: #ff5a16;
}

.share-copy {
  margin: 0;
  font-family: Arial, sans-serif;
  font-size: clamp(14px, calc(var(--stage-w) * 0.04), 30px);
  font-weight: 900;
}

.primary-action {
  justify-self: center;
  width: min(64%, 380px);
  min-height: clamp(46px, calc(var(--stage-h) * 0.06), 86px);
  border: 4px solid rgba(255, 255, 255, 0.88);
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(#ff8b36, #ef3a1f);
  box-shadow: inset 0 -5px 0 rgba(80, 0, 0, 0.34), 0 6px 0 rgba(0, 0, 0, 0.45);
  font-family: Arial, sans-serif;
  font-size: clamp(18px, calc(var(--stage-w) * 0.052), 42px);
  font-weight: 900;
}

.screen-result {
  background: #071907;
}

.result-bg {
  z-index: 1;
}

.result-time-value {
  position: absolute;
  z-index: 2;
  left: calc(155 / 1080 * 100%);
  top: calc(1280 / 1920 * 100%);
  width: calc(770 / 1080 * 100%);
  height: calc(150 / 1920 * 100%);
  display: grid;
  place-items: center;
  color: transparent;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", Arial, sans-serif;
  font-size: clamp(62px, calc(var(--stage-w) * 0.156), 168px);
  font-weight: 900;
  line-height: 0.8;
  letter-spacing: 0;
  text-align: center;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
}

.result-time-value::before,
.result-time-value::after {
  content: attr(data-time-text);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font: inherit;
  line-height: inherit;
  letter-spacing: inherit;
}

.result-time-value::before {
  z-index: 0;
  color: #fff200;
  -webkit-text-fill-color: #fff200;
  -webkit-text-stroke: clamp(5px, calc(var(--stage-w) * 0.018), 18px) #07130a;
  text-shadow: none;
}

.result-time-value::after {
  z-index: 1;
  background: linear-gradient(
    #fff8bf 0 39%,
    #f5ef9c 40% 48%,
    #f4ed00 49% 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.result-play-button {
  left: calc(176 / 1080 * 100%);
  top: calc(1608 / 1920 * 100%);
  width: calc(338 / 1080 * 100%);
  height: calc(127 / 1920 * 100%);
}

.result-share-button {
  left: calc(566 / 1080 * 100%);
  top: calc(1608 / 1920 * 100%);
  width: calc(338 / 1080 * 100%);
  height: calc(128 / 1920 * 100%);
}

.result-rank-card {
  position: absolute;
  z-index: 3;
  left: calc(220 / 1080 * 100%);
  top: calc(1456 / 1920 * 100%);
  width: calc(640 / 1080 * 100%);
  height: calc(104 / 1920 * 100%);
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: 1fr;
  gap: calc(18 / 1080 * var(--stage-w));
  align-items: center;
  padding: 0 calc(36 / 1080 * var(--stage-w));
  border: clamp(3px, calc(var(--stage-w) * 0.008), 8px) solid #07130a;
  border-radius: clamp(14px, calc(var(--stage-w) * 0.032), 34px);
  color: #07130a;
  background: linear-gradient(112deg, #ffe94f 0%, #ffffff 48%, #14b9ff 100%);
  box-shadow: clamp(3px, calc(var(--stage-w) * 0.01), 10px) clamp(5px, calc(var(--stage-h) * 0.006), 12px) 0 #07130a;
  font-family: Arial, sans-serif;
  line-height: 1;
  text-shadow: none;
}

.result-rank-label {
  grid-column: 1;
  color: #07130a;
  font-size: clamp(11px, calc(var(--stage-w) * 0.029), 32px);
  font-weight: 900;
  white-space: nowrap;
}

.result-rank-card strong {
  grid-column: 2;
  justify-self: center;
  color: #fff;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", Arial, sans-serif;
  font-size: clamp(28px, calc(var(--stage-w) * 0.064), 68px);
  font-weight: 900;
  letter-spacing: 0;
  -webkit-text-stroke: clamp(1.5px, calc(var(--stage-w) * 0.0048), 5px) #07130a;
  paint-order: stroke fill;
  text-shadow: none;
}

.result-rank-meta {
  grid-column: 3;
  justify-self: end;
  color: #07130a;
  font-size: clamp(13px, calc(var(--stage-w) * 0.034), 38px);
  font-weight: 900;
  white-space: nowrap;
}

.app-toast {
  position: fixed;
  z-index: 60;
  left: 50%;
  top: calc(50% - min(100svh, 760px) * 0.28);
  max-width: min(82vw, 360px);
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  color: #fff;
  background: rgba(7, 19, 10, 0.9);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  font-family: Arial, sans-serif;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, -8px);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}

.app-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.task-dialog {
  position: fixed;
  inset: 0;
  z-index: 30;
  width: 100vw;
  height: 100svh;
  max-width: 100vw;
  max-height: 100svh;
  margin: auto;
  padding: 0;
  border: 0;
  overflow: visible;
  background: transparent;
  color: #07130a;
}

.task-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

.task-panel {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(86vw, calc(var(--stage-w) * 0.86));
  max-height: calc(var(--stage-h) * 0.8);
  overflow-y: auto;
  padding: clamp(14px, calc(var(--stage-w) * 0.04), 28px);
  transform: translate(-50%, -50%);
  border: clamp(2px, calc(var(--stage-w) * 0.006), 5px) solid rgba(255, 255, 255, 0.82);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 250, 255, 0.96)),
    linear-gradient(135deg, rgba(8, 120, 255, 0.1), rgba(32, 185, 45, 0.08));
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.55),
    0 0 0 clamp(4px, calc(var(--stage-w) * 0.013), 10px) rgba(8, 120, 255, 0.9);
  font-family: Arial, sans-serif;
  text-align: center;
}

.task-burst {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  min-height: clamp(42px, calc(var(--stage-w) * 0.12), 68px);
  margin: 0 0 clamp(10px, calc(var(--stage-h) * 0.018), 20px);
  padding: 0 clamp(40px, calc(var(--stage-w) * 0.12), 76px);
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(180deg, #123b86 0%, #0b2360 100%);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.16), 0 4px 0 #07130a;
}

.task-burst::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255, 230, 0, 0.16), transparent 42%, rgba(8, 120, 255, 0.18));
  pointer-events: none;
}

.task-burst h2 {
  position: relative;
  z-index: 2;
  margin: 0;
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: clamp(19px, calc(var(--stage-w) * 0.052), 38px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.55);
}

.task-title-ball {
  display: none;
}

.task-close {
  position: absolute;
  z-index: 5;
  top: clamp(10px, calc(var(--stage-w) * 0.03), 20px);
  right: clamp(10px, calc(var(--stage-w) * 0.03), 20px);
  width: clamp(34px, calc(var(--stage-w) * 0.09), 60px);
  aspect-ratio: 1;
  border: 2px solid #07130a;
  border-radius: 50%;
  color: #07130a;
  background: #fff;
  box-shadow: 0 3px 0 rgba(7, 19, 10, 0.35);
  cursor: pointer;
  font-size: clamp(18px, calc(var(--stage-w) * 0.05), 34px);
  font-weight: 900;
  line-height: 1;
}

.task-copy,
.task-status {
  margin: 0;
}

.task-copy {
  color: #142016;
  font-size: clamp(15px, calc(var(--stage-w) * 0.039), 30px);
  font-weight: 800;
  line-height: 1.28;
}

.task-copy b {
  color: #075bff;
}

.task-social-list {
  position: relative;
  z-index: 2;
  display: grid;
  gap: clamp(10px, calc(var(--stage-h) * 0.014), 18px);
  margin: clamp(18px, calc(var(--stage-h) * 0.026), 34px) 0;
}

.task-social-card {
  display: grid;
  grid-template-columns: clamp(32px, calc(var(--stage-w) * 0.09), 46px) minmax(0, 1fr) clamp(112px, calc(var(--stage-w) * 0.32), 148px);
  gap: clamp(8px, calc(var(--stage-w) * 0.022), 14px);
  align-items: center;
  min-height: clamp(58px, calc(var(--stage-h) * 0.078), 86px);
  padding: clamp(7px, calc(var(--stage-w) * 0.02), 12px);
  border: 2px solid #dce4ec;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 3px 0 rgba(7, 19, 10, 0.08);
  text-align: left;
}

.task-social-card.is-complete {
  border-color: #23ad2f;
  background: #f1fff2;
}

.task-social-icon {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  color: #fff;
  font-size: clamp(17px, calc(var(--stage-w) * 0.048), 32px);
  font-weight: 900;
  line-height: 1.2;
}

.task-social-icon-facebook {
  background: linear-gradient(145deg, #1492ff, #0962e8);
}

.task-social-icon-instagram {
  background:
    radial-gradient(circle at 30% 105%, #ffd44f 0 18%, transparent 19%),
    radial-gradient(circle at 20% 15%, #7a42ff 0 18%, transparent 19%),
    linear-gradient(145deg, #8d31ff 0%, #ff2a8e 54%, #ff8f1f 100%);
  font-size: clamp(10px, calc(var(--stage-w) * 0.03), 22px);
}

.task-social-icon-tiktok {
  background: #040404;
  color: #00f4ea;
  text-shadow: 4px 0 0 #ff1f62;
}

.task-social-copy {
  display: grid;
  gap: 0.28em;
  min-width: 0;
}

.task-social-copy strong {
  color: #111;
  font-size: clamp(16px, calc(var(--stage-w) * 0.044), 28px);
  font-weight: 900;
  line-height: 1;
}

.task-social-copy small {
  color: #111;
  font-size: clamp(9px, calc(var(--stage-w) * 0.025), 17px);
  font-weight: 500;
  line-height: 1.15;
}

.task-social-button {
  grid-column: auto;
  width: 100%;
  display: grid;
  gap: 4px;
  justify-items: stretch;
  align-items: center;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.task-social-button span {
  width: 100%;
  min-width: 0;
  padding: clamp(5px, calc(var(--stage-w) * 0.015), 8px) 6px;
  border: 2px solid #07130a;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(#c642ff, #7b17e9);
  box-shadow: inset 0 -5px 0 rgba(42, 0, 98, 0.35), 0 3px 0 #07130a;
  font-size: clamp(11px, calc(var(--stage-w) * 0.031), 20px);
  font-weight: 900;
  text-shadow: 0 2px 0 #07130a;
  text-align: center;
}

.task-social-button em {
  color: #249d18;
  font-size: clamp(9px, calc(var(--stage-w) * 0.027), 18px);
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  margin-left: 0;
  text-align: center;
}

.task-social-card.is-complete .task-social-button span {
  background: linear-gradient(#28c842, #149a23);
}

.task-social-card.is-complete .task-social-button em {
  color: #149a23;
}

.task-social-button:active,
.task-close:active {
  transform: translateY(2px);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.22), 0 2px 0 #07130a;
}

.task-bonus-strip {
  position: relative;
  z-index: 2;
  display: flex;
  gap: clamp(8px, calc(var(--stage-w) * 0.024), 16px);
  align-items: center;
  justify-content: center;
  min-height: clamp(44px, calc(var(--stage-h) * 0.06), 72px);
  padding: 8px 14px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, #0878ff, #0052cc);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.22);
  text-align: center;
}

.task-bonus-strip img {
  width: 100%;
  max-width: clamp(30px, calc(var(--stage-w) * 0.085), 52px);
  aspect-ratio: 1;
  object-fit: contain;
}

.task-bonus-strip strong {
  font-size: clamp(14px, calc(var(--stage-w) * 0.038), 26px);
  font-weight: 900;
  line-height: 1.05;
  text-shadow: 0 2px 0 #07130a;
}

.task-bonus-strip b {
  color: #ffe600;
}

.task-bonus-strip span {
  color: #baff48;
}

.task-bonus-strip.is-complete {
  background: linear-gradient(135deg, #20b92d, #0878ff);
}

.task-bonus-strip::after {
  content: attr(data-progress);
  display: inline-grid;
  place-items: center;
  min-width: 2.7em;
  min-height: 2em;
  padding: 0 0.65em;
  border-radius: 999px;
  color: #baff48;
  background: rgba(7, 19, 10, 0.65);
  font-size: clamp(12px, calc(var(--stage-w) * 0.032), 22px);
  font-weight: 900;
  text-shadow: 0 2px 0 #07130a;
}

.task-bonus-strip.is-complete::after {
  content: "DONE";
  color: #ffe600;
}

.task-car {
  display: none;
}

.task-status {
  min-height: 1.2em;
  color: #0878ff;
  font-size: clamp(12px, calc(var(--stage-w) * 0.033), 28px);
  font-weight: 900;
  line-height: 1.2;
  margin-top: calc(11 / 1920 * var(--stage-h));
}

@media (max-width: 420px) {
  .hud {
    left: 4%;
    right: 4%;
    grid-template-columns: 0.8fr 0.95fr 1.35fr 0.95fr;
  }

  .controls {
    left: 5%;
    right: 5%;
  }
}
