:root {
  --pl-purple: #37003c;
  --pl-deep: #16001a;
  --pl-teal: #00ffbf;
  --pl-pink: #ff2882;
  --pl-blue: #04f5ff;
  --white: #ffffff;
  --grass-1: #28b84a;
}

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

html,
body {
  width: 100%;
  min-width: 100%;
  height: 100%;
  min-height: 100svh;
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 12%, rgba(4,245,255,0.24), transparent 24%),
    radial-gradient(circle at 50% 35%, rgba(255,40,130,0.22), transparent 35%),
    linear-gradient(180deg, #56105e 0%, var(--pl-purple) 44%, #23a94a 100%);
  background-attachment: fixed;
  font-family: Inter, ui-rounded, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--white);
  touch-action: manipulation;
  overscroll-behavior: none;
  overscroll-behavior-y: none;
}


#game-wrap {
  position: fixed;
  inset: 0;
  width: 100vw;
  width: 100dvw;
  height: 100svh;
  height: 100svh;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 15%, rgba(4,245,255,0.18), transparent 30%),
    radial-gradient(circle at 80% 18%, rgba(255,40,130,0.15), transparent 24%),
    linear-gradient(180deg, #56105e 0%, var(--pl-purple) 45%, #5dcc71 45%, var(--grass-1) 100%);
}

body.play-background-sky #game-wrap {
  background:
    radial-gradient(circle at 20% 15%, rgba(255,255,255,0.48), transparent 28%),
    radial-gradient(circle at 80% 18%, rgba(255,255,255,0.30), transparent 24%),
    linear-gradient(180deg, #72d8ff 0%, #c9f3ff 45%, #7be083 45%, var(--grass-1) 100%);
}

canvas {
  touch-action: none;
  display: block;
  width: 100%;
  height: 100%;
}

.brand-badge {
  position: fixed;
  top: calc(18px + env(safe-area-inset-top, 0));
  left: 50%;
  z-index: 11;
  transform: translateX(-50%);
  padding: 8px 14px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  background: rgba(0,0,0,0.18);
  color: var(--white);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  pointer-events: none;
  white-space: nowrap;
}

.brand-badge span { color: var(--pl-teal); }

.hud {
  position: fixed;
  top: env(safe-area-inset-top, 0);
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  pointer-events: none;
}

.pill {
  min-width: 96px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 18px;
  background: rgba(55,0,60,0.78);
  box-shadow: 0 12px 28px rgba(0,0,0,0.28);
  backdrop-filter: blur(8px);
  text-align: center;
}

.pill-mode {
  min-width: 88px;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.mode-value {
  color: var(--pl-green);
  font-size: 20px;
}

.pill-golden {
  border-color: rgba(255,214,90,0.72);
  box-shadow:
    0 12px 28px rgba(0,0,0,0.28),
    0 0 24px rgba(255,214,90,0.32);
  animation: goldenHudPulse 760ms ease-in-out infinite alternate;
}

.pill-golden .mode-value {
  color: #ffd65a;
}

.label {
  display: block;
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.75;
}

.value {
  display: block;
  margin-top: 4px;
  color: var(--pl-blue);
  font-size: 24px;
  line-height: 1;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.menu {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  width: 100vw;
  width: 100dvw;
  height: 100svh;
  height: 100svh;
  max-height: 100svh;
  padding: max(10px, env(safe-area-inset-top, 0)) max(10px, env(safe-area-inset-right, 0)) max(10px, env(safe-area-inset-bottom, 0)) max(10px, env(safe-area-inset-left, 0));
  overflow-y: auto;
  overscroll-behavior: none;
  overscroll-behavior-y: none;
  background: transparent;
  isolation: isolate;
  -webkit-overflow-scrolling: auto;
  touch-action: manipulation;
  animation: none !important;
  transform: none !important;
}

.menu::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 12%, rgba(4,245,255,0.28), transparent 24%),
    radial-gradient(circle at 50% 35%, rgba(255,40,130,0.24), transparent 35%),
    linear-gradient(180deg, rgba(86,16,94,0.995) 0%, rgba(55,0,60,0.995) 44%, rgba(36,169,74,0.98) 100%);
}

.panel {
  width: min(460px, calc(100dvw - 20px));
  max-width: 100%;
  margin: auto 0;
  padding: 10px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(86,16,94,0.99), rgba(55,0,60,0.99));
  box-shadow: 0 30px 90px rgba(0,0,0,0.38);
  text-align: center;
  align-content: center;
  position: relative;
  z-index: 1;
  overscroll-behavior: none;
  overscroll-behavior-y: none;
  animation: none !important;
  transform: none !important;
  backface-visibility: hidden;
}

.panel-logo-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 14px;
  min-height: 235px;
  overflow: visible;
  isolation: isolate;
}

.panel-logo {
  position: relative;
  z-index: 2;
  display: block;
  width: min(250px, 88vw);
  max-height: 217px;
  object-fit: contain;
  filter: drop-shadow(0 12px 22px rgba(0,0,0,0.28));
}

.panel-kicker-gif {
  position: absolute;
  top: 6px;
  left: 12px;
  z-index: 0;
  width: clamp(92px, 26vw, 132px);
  height: auto;
  object-fit: contain;
  pointer-events: none;
  opacity: 0.98;
  filter: drop-shadow(0 8px 14px rgba(0,0,0,0.22));
}

.logo-ball {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--size, 42px);
  height: var(--size, 42px);
  margin-left: calc(var(--size, 42px) / -2);
  margin-top: calc(var(--size, 42px) / -2);
  border-radius: 50%;
  background-image: url('ball.png');
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transform: translate3d(0, 0, 0) scale(0.18) rotate(0deg);
  transform-origin: center;
  z-index: 1;
  pointer-events: none;
  will-change: transform, opacity;
  backface-visibility: hidden;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,0.22));
  animation: logo-ball-burst var(--dur, 3.7s) linear var(--delay, 0s) infinite;
}

.logo-ball-1 { --size: 38px; --x: -120px; --y: -70px; --rot: -220deg; --delay: 0s; --dur: 3.9s; }
.logo-ball-2 { --size: 34px; --x: 128px; --y: -62px; --rot: 190deg; --delay: .32s; --dur: 3.5s; }
.logo-ball-3 { --size: 46px; --x: -146px; --y: 10px; --rot: -260deg; --delay: .78s; --dur: 4.1s; }
.logo-ball-4 { --size: 36px; --x: 144px; --y: 8px; --rot: 230deg; --delay: 1.12s; --dur: 3.8s; }
.logo-ball-5 { --size: 40px; --x: -108px; --y: 88px; --rot: -210deg; --delay: 1.48s; --dur: 3.9s; }
.logo-ball-6 { --size: 34px; --x: 116px; --y: 94px; --rot: 200deg; --delay: 1.86s; --dur: 4s; }
.logo-ball-7 { --size: 30px; --x: 0px; --y: -112px; --rot: -180deg; --delay: .18s; --dur: 3.3s; }
.logo-ball-8 { --size: 32px; --x: 0px; --y: 116px; --rot: 180deg; --delay: .95s; --dur: 3.7s; }

@media (max-height: 780px) {
  .menu {
    place-items: start center;
  }

  .panel {
    margin: max(18px, env(safe-area-inset-top, 0)) 0 26px;
  }

  .panel-logo {
    width: min(250px, 88vw);
    max-height: 217px;
  }
}

@media (max-width: 540px) {
  .menu {
    place-items: stretch;
    align-items: stretch;
    justify-items: stretch;
    padding: 0;
    overflow: hidden;
    overscroll-behavior: none;
    overscroll-behavior-y: none;
  }

  .panel {
    position: fixed;
    inset: 0;
    width: 100vw;
    width: 100dvw;
    max-width: none;
    min-height: 0;
    height: 100svh;
    max-height: 100svh;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow-y: auto;
    overscroll-behavior: none;
    overscroll-behavior-y: none;
    -webkit-overflow-scrolling: auto;
    touch-action: pan-y;
    transform: none;
    background: linear-gradient(180deg, #56105e 0%, #37003c 72%, #2aba4d 100%);
    padding: max(12px, env(safe-area-inset-top, 0)) max(12px, env(safe-area-inset-right, 0)) max(18px, env(safe-area-inset-bottom, 0)) max(12px, env(safe-area-inset-left, 0));
  }

  .panel-logo-wrap {
    min-height: 210px;
  }

  .panel-logo {
    width: min(230px, 76vw);
    max-height: 190px;
  }

  .hero-title {
    font-size: clamp(30px, 10.5vw, 44px);
  }

  .subtitle {
    max-width: 100%;
  }
}

@media (max-width: 380px) {
  .panel {
    padding-left: max(10px, env(safe-area-inset-left, 0));
    padding-right: max(10px, env(safe-area-inset-right, 0));
  }

  .panel-logo-wrap {
    min-height: 190px;
  }

  .panel-logo {
    width: min(205px, 72vw);
    max-height: 170px;
  }

  .hero-title {
    font-size: clamp(28px, 10vw, 38px);
  }

  .controls,
  .form-grid {
  scroll-margin-top: 0;
    gap: 8px;
  }
}

.hero-title {
  position: relative;
  display: grid;
  gap: 2px;
  margin: -4px auto 0;
  font-size: clamp(34px, 9.5vw, 58px);
  line-height: 0.9;
  letter-spacing: -0.07em;
  font-weight: 950;
  text-transform: uppercase;
  transform-origin: center;
  animation: hero-pop-in 520ms ease-out both;
}

.hero-line {
  display: block;
  position: relative;
  color: #ffffff;
  text-shadow:
    0 4px 0 #37003c,
    0 8px 0 #111827,
    0 12px 22px rgba(0,0,0,0.34);
  -webkit-text-stroke: 1px rgba(55,0,60,0.65);
  transform: translateY(18px) scale(0.94) rotate(-1deg);
  opacity: 0;
  animation: hero-line-in 560ms ease-out forwards,
             hero-float 3.2s ease-in-out 1.1s infinite;
}

.hero-line-one {
  animation-delay: 90ms, 1.1s;
}

.hero-line-two {
  color: #c8ff2e;
  text-shadow:
    0 4px 0 #37003c,
    0 8px 0 #0d8292,
    0 12px 24px rgba(0,0,0,0.36);
  animation-delay: 230ms, 1.24s;
}


.hero-title::before {
  content: '';
  position: absolute;
  inset: -12px -18px;
  z-index: -1;
  border-radius: 999px;
  background:
    radial-gradient(circle at 20% 45%, rgba(0,255,191,0.46), transparent 30%),
    radial-gradient(circle at 78% 44%, rgba(255,40,130,0.44), transparent 34%);
  filter: blur(10px);
  opacity: 0;
  transform: scale(0.75);
  animation: hero-glow-in 900ms ease-out 280ms forwards,
             hero-glow-pulse 2.8s ease-in-out 1.2s infinite;
}

@keyframes logo-ball-burst {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.18) rotate(0deg);
  }
  8% {
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.18) rotate(0deg);
  }
  18% {
    opacity: 0.92;
    transform: translate3d(calc(var(--x) * 0.12), calc(var(--y) * 0.12), 0) scale(0.42) rotate(calc(var(--rot) * 0.12));
  }
  42% {
    opacity: 0.96;
    transform: translate3d(calc(var(--x) * 0.46), calc(var(--y) * 0.46), 0) scale(0.78) rotate(calc(var(--rot) * 0.46));
  }
  68% {
    opacity: 0.88;
    transform: translate3d(calc(var(--x) * 0.78), calc(var(--y) * 0.78), 0) scale(0.98) rotate(calc(var(--rot) * 0.78));
  }
  88% {
    opacity: 0.18;
    transform: translate3d(var(--x), var(--y), 0) scale(1.06) rotate(var(--rot));
  }
  100% {
    opacity: 0;
    transform: translate3d(calc(var(--x) * 1.04), calc(var(--y) * 1.04), 0) scale(1.08) rotate(calc(var(--rot) * 1.04));
  }
}

@keyframes hero-pop-in {
  0% { transform: scale(0.82) rotate(-2deg); filter: saturate(0.65); }
  70% { transform: scale(1.01) rotate(0.2deg); filter: saturate(1.1); }
  100% { transform: scale(1) rotate(0deg); filter: saturate(1); }
}

@keyframes hero-line-in {
  0% { opacity: 0; transform: translateY(22px) scale(0.92) rotate(-2deg); filter: blur(5px); }
  62% { opacity: 1; transform: translateY(0) scale(1.01) rotate(0.2deg); filter: blur(0); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(0deg); filter: blur(0); }
}

@keyframes hero-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-3px) rotate(-0.45deg); }
}

@keyframes hero-glow-in {
  to { opacity: 1; transform: scale(1); }
}

@keyframes hero-glow-pulse {
  0%, 100% { opacity: 0.72; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}


@media (max-width: 520px) {
  .hud {
    gap: 7px;
    padding: 9px 9px;
  }

  .pill {
    min-width: 0;
    flex: 1 1 0;
    padding: 8px 7px;
    border-radius: 15px;
  }

  .value {
    font-size: 21px;
  }

  .mode-value {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .legal-consent-error {
    animation: none;
  }

  .logo-ball {
    animation: none;
    opacity: 0.18;
    transform: translate3d(calc(var(--x) * 0.72), calc(var(--y) * 0.72), 0) scale(0.92) rotate(0deg);
  }
  .hero-title,
  .hero-line,
  .hero-title::before {
    animation: none !important;
    opacity: 1;
    transform: none;
    filter: none;
  }
}

.subtitle {
  margin: 12px auto 0;
  max-width: 34ch;
  color: rgba(255,255,255,0.88);
  font-size: 15px;
  line-height: 1.45;
}

.form-grid {
  scroll-margin-top: 0;
  display: grid;
  gap: 10px;
  margin-top: 18px;
  text-align: left;
}

.identity-summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid rgba(0,255,191,0.20);
  border-radius: 20px;
  background: rgba(0,255,191,0.09);
  text-align: left;
}

.identity-summary strong {
  display: block;
  margin-bottom: 4px;
  color: var(--pl-teal);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.summary-meta {
  color: rgba(255,255,255,0.86);
  font-size: 14px;
  line-height: 1.45;
}

.ghost-button {
  min-height: 38px;
  width: auto;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 14px;
  background: rgba(255,255,255,0.10);
  color: var(--white);
  box-shadow: none;
  font-size: 13px;
}

.ghost-button:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: none;
}

.ghost-button.full-width {
  width: 100%;
  margin-top: 10px;
}

.field label {
  display: block;
  margin: 0 0 6px 2px;
  color: rgba(255,255,255,0.76);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

input[type="text"],
input[type="email"] {
  width: 100%;
  height: 48px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 16px;
  background: rgba(255,255,255,0.10);
  color: var(--white);
  padding: 0 14px;
  font: inherit;
  font-size: 16px;
  outline: none;
  user-select: text;
}

input::placeholder { color: rgba(255,255,255,0.46); }

input:focus {
  border-color: rgba(0,255,191,0.78);
  box-shadow: 0 0 0 4px rgba(0,255,191,0.14);
}

.field-note {
  margin: 6px 2px 0;
  color: rgba(255,255,255,0.64);
  font-size: 12px;
  line-height: 1.35;
}

.legal-consent {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 13px;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 18px;
  background: rgba(0,0,0,0.16);
  text-align: left;
}

.checkbox-row {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 9px;
  align-items: start;
  color: rgba(255,255,255,0.84);
  font-size: 12px;
  line-height: 1.35;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--pl-teal);
  user-select: auto;
}


.inline-consent-label {
  display: inline;
  margin: 0;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: none;
  cursor: pointer;
  user-select: none;
}

.checkbox-row a,
.disclaimer a,
.legal-modal-close,
input,
button {
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-user-select: auto;
  user-select: auto;
}

.checkbox-row a,
.disclaimer a,
.legal-page a {
  color: var(--pl-teal);
  font-weight: 800;
  text-decoration: none;
}

.checkbox-row a:hover,
.disclaimer a:hover,
.legal-page a:hover {
  text-decoration: underline;
}

.required-consent {
  font-weight: 800;
}

.consent-note {
  margin: -2px 0 0 31px;
  color: rgba(255,255,255,0.56);
  font-size: 11px;
  line-height: 1.35;
}

.consent-warning {
  margin: -2px 0 0 31px;
  padding: 9px 10px;
  border: 1px solid rgba(255, 225, 0, 0.52);
  border-radius: 12px;
  background: rgba(255, 199, 0, 0.16);
  color: #fff2a8;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
  box-shadow: 0 0 18px rgba(255, 210, 0, 0.16);
}

.legal-consent-error {
  border-color: rgba(255, 225, 0, 0.74);
  box-shadow:
    0 0 0 4px rgba(255, 214, 0, 0.12),
    0 0 24px rgba(255, 214, 0, 0.14);
  animation: consent-warning-pulse 1.15s ease-in-out 0s 2;
}

@keyframes consent-warning-pulse {
  0%, 100% {
    transform: translate3d(0, 0, 0);
  }
  35% {
    transform: translate3d(-2px, 0, 0);
  }
  70% {
    transform: translate3d(2px, 0, 0);
  }
}

.legal-page {
  min-height: 100svh;
  overflow-y: auto;
  padding: 24px 14px;
  background:
    radial-gradient(circle at 50% 12%, rgba(4,245,255,0.28), transparent 24%),
    radial-gradient(circle at 50% 35%, rgba(255,40,130,0.24), transparent 35%),
    linear-gradient(180deg, rgba(86,16,94,0.995) 0%, rgba(55,0,60,0.995) 44%, rgba(36,169,74,0.98) 100%);
  color: var(--white);
  touch-action: pan-y;
  user-select: text;
}

.legal-document {
  width: min(760px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 24px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 24px;
  background: rgba(22,0,26,0.88);
  box-shadow: 0 24px 72px rgba(0,0,0,0.36);
}

.legal-document h1,
.legal-document h2 {
  color: var(--pl-teal);
  letter-spacing: -0.03em;
}

.legal-document h1 { margin-top: 0; }
.legal-document p,
.legal-document li {
  color: rgba(255,255,255,0.84);
  line-height: 1.6;
}

.legal-back {
  display: inline-block;
  margin-bottom: 18px;
}

.legal-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: stretch;
  padding: max(10px, env(safe-area-inset-top, 0)) max(10px, env(safe-area-inset-right, 0)) max(10px, env(safe-area-inset-bottom, 0)) max(10px, env(safe-area-inset-left, 0));
  overscroll-behavior: contain;
  touch-action: none;
}

.legal-modal[hidden] {
  display: none;
}

.legal-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 0, 16, 0.74);
  backdrop-filter: blur(10px);
}

.legal-modal-panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto 1fr;
  width: min(860px, 100%);
  min-height: 0;
  margin: auto;
  height: min(820px, calc(100svh - 20px));
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 26px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(86,16,94,0.99), rgba(36,0,42,0.99));
  box-shadow: 0 30px 100px rgba(0,0,0,0.58);
  touch-action: pan-y;
}

.legal-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  background: rgba(22,0,26,0.88);
}

.legal-modal-header h2 {
  margin: 0;
  color: var(--pl-teal);
  font-size: 16px;
  letter-spacing: -0.02em;
}

.legal-modal-close {
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  padding: 0 16px;
  background: linear-gradient(135deg, var(--pl-teal), #7CFFCB);
  color: var(--pl-purple);
  font-weight: 900;
  cursor: pointer;
}

.legal-modal-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
}

body.legal-modal-open {
  overflow: hidden;
  overscroll-behavior: none;
}

body.legal-modal-open .menu {
  overflow: hidden;
}

@media (max-width: 540px) {
  .legal-modal {
    padding: 0;
  }

  .legal-modal-panel {
    width: 100%;
    height: 100svh;
    max-height: 100svh;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  .legal-modal-header {
    padding-top: max(12px, env(safe-area-inset-top, 0));
  }
}

.team-box {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(0,255,191,0.20);
  border-radius: 20px;
  background: rgba(0,255,191,0.09);
  text-align: left;
}

.team-box strong {
  display: block;
  margin-bottom: 4px;
  color: var(--pl-teal);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.team-meta {
  color: rgba(255,255,255,0.86);
  font-size: 14px;
  line-height: 1.45;
}

.share-line {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  margin-top: 10px;
}

.share-line input { height: 42px; font-size: 13px; }

@media (max-width: 430px) {
  .share-line {
    grid-template-columns: 1fr 1fr;
  }

  .share-line input {
    grid-column: 1 / -1;
  }

  .share-line .mini-button {
    width: 100%;
  }
}

.mini-button {
  min-height: 42px;
  width: auto;
  padding: 0 14px;
  border-radius: 14px;
  font-size: 14px;
  box-shadow: 0 6px 0 #00b8c0, 0 12px 20px rgba(0,0,0,0.24);
}

.mini-button.with-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.button-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1em;
  line-height: 1;
  font-size: 14px;
  font-weight: 800;
}


.challenge-card {
  margin-top: 14px;
  padding: 13px;
  border: 1px solid rgba(183,255,34,0.24);
  border-radius: 22px;
  background:
    radial-gradient(circle at 8% 0%, rgba(183,255,34,0.18), transparent 12rem),
    radial-gradient(circle at 98% 15%, rgba(4,245,255,0.16), transparent 11rem),
    rgba(0,0,0,0.16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 18px 36px rgba(0,0,0,0.18);
  text-align: left;
}

.challenge-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 10px;
}

.challenge-kicker {
  color: var(--pl-teal);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.challenge-head strong {
  color: #c8ff2e;
  font-size: 15px;
  text-transform: uppercase;
}

.challenge-grid {
  display: grid;
  gap: 9px;
}

.challenge-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 17px;
  background: rgba(255,255,255,0.075);
}

.challenge-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--pl-teal), var(--pl-blue));
  box-shadow: 0 8px 18px rgba(4,245,255,0.16);
}

.challenge-item b,
.challenge-item span:not(.challenge-icon):not(.challenge-progress) {
  display: block;
}

.challenge-item b {
  color: #fff;
  font-size: 13px;
  line-height: 1.15;
}

.challenge-item span:not(.challenge-icon):not(.challenge-progress) {
  margin-top: 2px;
  color: rgba(255,255,255,0.72);
  font-size: 11px;
  line-height: 1.25;
  font-weight: 760;
}

.challenge-progress {
  display: block;
  height: 7px;
  margin-top: 7px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,0.12);
}

.challenge-progress i {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--pl-teal), #c8ff2e);
  box-shadow: 0 0 18px rgba(183,255,34,0.28);
  transition: width 360ms ease;
}

.controls {
  display: grid;
  gap: 10px;
  margin: 18px 0;
  text-align: left;
}

.control-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 18px;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.92);
  font-size: 14px;
  line-height: 1.35;
}

.icon {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--pl-teal), var(--pl-blue));
  color: var(--pl-purple);
  font-weight: 900;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,0.12);
}

button {
  width: 100%;
  min-height: 56px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(180deg, var(--pl-teal), var(--pl-blue));
  color: var(--pl-purple);
  font: inherit;
  font-size: 24px;
  font-weight: 900;
  box-shadow: 0 10px 0 #00b8c0, 0 18px 32px rgba(0,0,0,0.3);
  cursor: pointer;
  touch-action: manipulation;
  text-transform: uppercase;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

button:active:not(:disabled) {
  transform: translateY(5px);
  box-shadow: 0 5px 0 #00b8c0, 0 12px 20px rgba(0,0,0,0.24);
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 18px;
}

.tab {
  min-height: 42px;
  border-radius: 14px;
  background: rgba(255,255,255,0.10);
  color: var(--white);
  box-shadow: none;
  font-size: 14px;
}

.tab.active {
  background: linear-gradient(180deg, var(--pl-teal), var(--pl-blue));
  color: var(--pl-purple);
}

.leaderboard {
  margin-top: 10px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  background: rgba(0,0,0,0.16);
  text-align: left;
}

.leaderboard h2 {
  margin: 0 0 10px;
  color: var(--pl-teal);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.score-row {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 14px;
}


.score-row:first-of-type { border-top: 0; }

.podium-row {
  position: relative;
  isolation: isolate;
  grid-template-columns: 46px 1fr auto;
  margin: 3px -5px;
  padding: 10px 8px;
  border-top: 0;
  border-radius: 15px;
  overflow: hidden;
  background: rgba(255,255,255,0.08);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.10), 0 10px 24px rgba(0,0,0,0.18);
  animation: podium-row-lift 2.2s ease-in-out infinite;
}

.podium-row::before,
.podium-row::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
}

.podium-row::before {
  opacity: 0.86;
  animation: podium-row-glow 2.2s ease-in-out infinite;
}

.podium-row::after {
  width: 42%;
  transform: translateX(-150%) skewX(-16deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.34), transparent);
  animation: podium-row-shine 3.1s ease-in-out infinite;
}

.podium-gold::before {
  background:
    radial-gradient(circle at 14% 50%, rgba(255,231,0,0.58), transparent 34%),
    linear-gradient(90deg, rgba(255,225,0,0.26), rgba(0,255,191,0.16));
}

.podium-silver::before {
  background:
    radial-gradient(circle at 14% 50%, rgba(255,255,255,0.42), transparent 34%),
    linear-gradient(90deg, rgba(224,242,255,0.20), rgba(4,245,255,0.14));
}

.podium-bronze::before {
  background:
    radial-gradient(circle at 14% 50%, rgba(255,162,83,0.44), transparent 34%),
    linear-gradient(90deg, rgba(255,136,60,0.19), rgba(255,40,130,0.12));
}

.podium-gold { animation-delay: 0s; }
.podium-silver { animation-delay: 0.16s; }
.podium-bronze { animation-delay: 0.32s; }
.podium-silver::after { animation-delay: 0.4s; }
.podium-bronze::after { animation-delay: 0.8s; }

.podium-row .rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 30px;
  border-radius: 999px;
  background: rgba(22,0,26,0.42);
  color: #ffffff;
  font-weight: 1000;
  text-shadow: 0 1px 6px rgba(0,0,0,0.30);
}

.podium-gold .rank::before { content: '🥇'; margin-right: 3px; }
.podium-silver .rank::before { content: '🥈'; margin-right: 3px; }
.podium-bronze .rank::before { content: '🥉'; margin-right: 3px; }

.podium-row .score-name,
.podium-row .score-points {
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.22);
}

.podium-gold .score-points { color: #fff48a; }
.podium-silver .score-points { color: #e6fbff; }
.podium-bronze .score-points { color: #ffd1a1; }

@keyframes podium-row-lift {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-2px) scale(1.012); }
}

@keyframes podium-row-glow {
  0%, 100% { opacity: 0.64; filter: saturate(1); }
  50% { opacity: 1; filter: saturate(1.28); }
}

@keyframes podium-row-shine {
  0% { transform: translateX(-160%) skewX(-16deg); opacity: 0; }
  18% { opacity: 0.85; }
  46% { transform: translateX(260%) skewX(-16deg); opacity: 0; }
  100% { transform: translateX(260%) skewX(-16deg); opacity: 0; }
}

.rank { color: var(--pl-blue); font-weight: 900; }

.score-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.score-sub {
  display: block;
  margin-top: 2px;
  color: rgba(255,255,255,0.58);
  font-size: 11px;
  font-weight: 700;
}

.score-points {
  color: var(--white);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.empty-board,
.save-status,
.disclaimer {
  color: rgba(255,255,255,0.72);
  font-size: 12px;
  line-height: 1.4;
}

.save-status {
  margin-top: 12px;
  min-height: 17px;
  text-align: center;
}

.disclaimer { margin-top: 14px; }
.hidden,
[hidden] { display: none !important; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom, 0));
  z-index: 12;
  transform: translateX(-50%);
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  background: rgba(55,0,60,0.82);
  color: var(--white);
  font-size: 13px;
  opacity: 0;
  transition: opacity 180ms ease;
  pointer-events: none;
}

.toast.show { opacity: 1; }


@keyframes goldenHudPulse {
  from { transform: translateY(0) scale(1); filter: brightness(1); }
  to { transform: translateY(-1px) scale(1.035); filter: brightness(1.14); }
}

/* Strong continuous Kick Off attention animation.
   This block is intentionally last so it wins over the base button styles. */
#start-btn {
  position: relative;
  isolation: isolate;
  overflow: visible;
  transform-origin: 50% 70%;
  background: linear-gradient(180deg, var(--pl-teal), var(--pl-blue));
  animation:
    kickoff-button-bounce 820ms cubic-bezier(.2,.85,.24,1.35) infinite,
    kickoff-button-shadow 820ms ease-in-out infinite;
  will-change: transform, box-shadow;
}

#start-btn::before {
  content: none;
}

#start-btn::after {
  content: '';
  position: absolute;
  inset: -9px;
  z-index: -1;
  border-radius: 26px;
  background:
    radial-gradient(circle at 22% 50%, rgba(0,255,191,0.95), transparent 36%),
    radial-gradient(circle at 78% 50%, rgba(255,40,130,0.85), transparent 38%),
    radial-gradient(circle at 50% 50%, rgba(4,245,255,0.80), transparent 58%);
  filter: blur(14px);
  opacity: 0.85;
  animation: kickoff-button-halo 820ms ease-in-out infinite;
  pointer-events: none;
}

#start-btn:hover:not(:disabled) {
  animation-duration: 620ms, 620ms;
}

#start-btn:active:not(:disabled) {
  transform: translateY(5px) scale(0.97);
}

#start-btn:disabled,
#start-btn:disabled::before,
#start-btn:disabled::after {
  animation: none !important;
}

@keyframes kickoff-button-bounce {
  0%, 100% {
    transform: translateY(0) scale(1) rotate(0deg);
  }
  16% {
    transform: translateY(-8px) scale(1.075) rotate(-1deg);
  }
  32% {
    transform: translateY(2px) scale(0.985) rotate(1deg);
  }
  48% {
    transform: translateY(-4px) scale(1.035) rotate(0deg);
  }
  64% {
    transform: translateY(0) scale(1.01) rotate(0deg);
  }
}


@keyframes kickoff-button-shadow {
  0%, 100% {
    box-shadow:
      0 10px 0 #00b8c0,
      0 18px 32px rgba(0,0,0,0.30),
      0 0 0 0 rgba(0,255,191,0.0),
      0 0 0 rgba(4,245,255,0.0);
  }
  42% {
    box-shadow:
      0 16px 0 #00b8c0,
      0 30px 48px rgba(0,0,0,0.42),
      0 0 0 9px rgba(0,255,191,0.18),
      0 0 46px rgba(4,245,255,0.82),
      0 0 64px rgba(255,40,130,0.40);
  }
}


@keyframes kickoff-button-halo {
  0%, 100% {
    opacity: 0.48;
    transform: scale(0.94);
  }
  45% {
    opacity: 1;
    transform: scale(1.12);
  }
}

@media (prefers-reduced-motion: reduce) {
  #start-btn {
    animation: kickoff-reduced-attention 2.2s ease-in-out infinite;
  }

  #start-btn::before,
  #start-btn::after {
    animation: none !important;
  }
}

@keyframes kickoff-reduced-attention {
  0%, 100% {
    box-shadow: 0 10px 0 #00b8c0, 0 18px 32px rgba(0,0,0,0.30);
  }
  50% {
    box-shadow:
      0 10px 0 #00b8c0,
      0 18px 32px rgba(0,0,0,0.30),
      0 0 0 8px rgba(0,255,191,0.20),
      0 0 38px rgba(4,245,255,0.74);
  }
}



.orientation-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 18%, rgba(4,245,255,0.28), transparent 26%),
    radial-gradient(circle at 50% 55%, rgba(255,40,130,0.22), transparent 36%),
    linear-gradient(180deg, #56105e 0%, #37003c 100%);
  color: #ffffff;
  text-align: center;
}

.orientation-card {
  width: min(360px, 88vw);
  padding: 28px 22px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 28px;
  background: rgba(22,0,26,0.86);
  box-shadow: 0 24px 72px rgba(0,0,0,0.42);
  backdrop-filter: blur(12px);
}

.orientation-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 14px;
  border-radius: 24px;
  background: linear-gradient(180deg, var(--pl-teal), var(--pl-blue));
  color: var(--pl-purple);
  font-size: 42px;
  font-weight: 900;
  animation: rotateHint 1.4s ease-in-out infinite;
}

.orientation-card h2 {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.orientation-card p {
  margin: 0;
  color: rgba(255,255,255,0.82);
  font-size: 15px;
  line-height: 1.4;
}

body.orientation-blocked {
  overflow: hidden;
}

body.orientation-blocked .orientation-overlay {
  display: grid;
}

body.orientation-blocked #game-wrap,
body.orientation-blocked .menu,
body.orientation-blocked .hud,
body.orientation-blocked .brand-badge,
body.orientation-blocked .toast {
  pointer-events: none;
}

@keyframes rotateHint {
  0%, 100% { transform: rotate(-8deg) scale(1); }
  50% { transform: rotate(8deg) scale(1.06); }
}

@media (orientation: landscape) and (max-height: 540px) {
  html,
  body {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
  }
}

@media (prefers-reduced-motion: reduce) {
  .orientation-icon {
    animation: none;
  }
}


@media (max-width: 540px) {
  .panel-kicker-gif {
    top: 10px;
    left: -40px;
    width: clamp(200px, 30vw, 300px);
  }
}

@media (max-width: 380px) {
  .panel-kicker-gif {
    top: 10px;
    left: -40px;
    width: clamp(200px, 30vw, 300px);
  }
}


@media (prefers-reduced-motion: reduce) {
  .podium-row,
  .podium-row::before,
  .podium-row::after {
    animation: none !important;
  }
}
