:root {
  --ink: #050913;
  --panel: #07111f;
  --panel-2: #0b1729;
  --blue: #0b86ff;
  --electric: #27b8ff;
  --orange: #ff4a0a;
  --orange-hot: #ff1f00;
  --gold: #ffd72e;
  --text: #f5f7fb;
  --muted: #aeb8c8;
  --line: rgba(255, 255, 255, .14);
  --danger: #ff2f22;
  font-family: "Arial Narrow", "Roboto Condensed", Impact, system-ui, sans-serif;
  color: var(--text);
  background: #02050b;
}

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

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background: #02050b;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.game-app {
  position: relative;
  display: grid;
  min-height: 100dvh;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(rgba(4, 12, 24, .58), rgba(0, 3, 10, .9)),
    radial-gradient(circle at 48% 20%, rgba(18, 75, 126, .62), transparent 35%),
    radial-gradient(circle at 80% 78%, rgba(124, 25, 14, .2), transparent 28%),
    #030a14;
}

.game-app::before,
.game-app::after {
  position: absolute;
  content: "";
  inset: 0;
  pointer-events: none;
}

.game-app::before {
  opacity: .3;
  background-image:
    linear-gradient(25deg, transparent 47%, rgba(255,255,255,.09) 48%, transparent 49%),
    linear-gradient(155deg, transparent 52%, rgba(255,255,255,.06) 53%, transparent 54%);
  background-size: 360px 270px, 460px 310px;
}

.game-app::after {
  top: auto;
  height: 28vh;
  opacity: .35;
  background:
    linear-gradient(90deg, transparent 0 3%, #07101d 3% 8%, transparent 8% 10%, #0a1422 10% 18%, transparent 18% 21%, #060d18 21% 29%, transparent 29% 31%, #09111c 31% 44%, transparent 44% 48%, #050b14 48% 59%, transparent 59% 62%, #07111d 62% 73%, transparent 73% 77%, #050b14 77% 91%, transparent 91% 94%, #07101b 94%);
  clip-path: polygon(0 25%, 4% 25%, 4% 0, 8% 0, 8% 43%, 12% 43%, 12% 12%, 19% 12%, 19% 48%, 24% 48%, 24% 26%, 30% 26%, 30% 52%, 35% 52%, 35% 6%, 42% 6%, 42% 44%, 49% 44%, 49% 18%, 55% 18%, 55% 52%, 61% 52%, 61% 30%, 68% 30%, 68% 50%, 74% 50%, 74% 8%, 82% 8%, 82% 38%, 87% 38%, 87% 22%, 94% 22%, 94% 45%, 100% 45%, 100% 100%, 0 100%);
}

.ambient {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
}

.ambient-one {
  top: -240px;
  left: -180px;
  background: rgba(24, 117, 214, .17);
}

.ambient-two {
  right: -190px;
  bottom: -240px;
  background: rgba(255, 63, 14, .12);
}

.phone-shell {
  position: relative;
  z-index: 1;
  width: min(100vw, 440px);
  height: min(100dvh, 920px);
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 50% 42%, rgba(18, 78, 135, .3), transparent 38%),
    linear-gradient(180deg, #06101d 0%, #030812 70%, #02050b 100%);
  box-shadow: 0 24px 90px rgba(0, 0, 0, .8);
}

.phone-shell::before {
  position: absolute;
  z-index: 40;
  content: "";
  inset: 0;
  border: 1px solid rgba(255, 255, 255, .18);
  pointer-events: none;
}

.auth-guard {
  position: absolute;
  z-index: 180;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  background: #030913;
  color: #b9c6d7;
  font-size: 10px;
  letter-spacing: 2px;
  transition: opacity .25s ease, visibility .25s ease;
}

.auth-guard.ready {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.auth-spinner {
  width: 38px;
  height: 38px;
  border: 3px solid rgba(255,255,255,.13);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: auth-spin .8s linear infinite;
}

@keyframes auth-spin { to { transform: rotate(360deg); } }

.top-bar {
  position: absolute;
  z-index: 55;
  top: max(9px, env(safe-area-inset-top));
  left: 0;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  pointer-events: none;
}

.top-bar > * {
  pointer-events: auto;
}

.mini-brand,
.menu-brand {
  font-family: Impact, sans-serif;
  font-size: 24px;
  font-style: italic;
  letter-spacing: -3px;
  text-shadow: 0 2px 10px rgba(255, 255, 255, .15);
}

.mini-brand span,
.menu-brand span {
  display: inline-block;
  margin-left: -1px;
  font-size: .72em;
  transform: translateY(6px);
}

.icon-button,
.close-button {
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 50%;
  background: rgba(3, 9, 18, .72);
  font-size: 18px;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.pause-trigger {
  visibility: hidden;
  font-weight: 900;
}

.gameplay-active .pause-trigger {
  visibility: visible;
}

.screen {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: none;
  overflow: hidden;
  padding: 62px 22px max(22px, env(safe-area-inset-bottom));
}

.screen.active {
  display: block;
  animation: screen-in .38s ease both;
}

@keyframes screen-in {
  from { opacity: 0; transform: scale(1.015); }
  to { opacity: 1; transform: scale(1); }
}

.screen::before {
  position: absolute;
  z-index: -2;
  content: "";
  inset: 0;
  background:
    radial-gradient(circle at 50% 56%, rgba(0, 86, 171, .23), transparent 33%),
    linear-gradient(rgba(1, 8, 18, .08), rgba(0, 3, 10, .65));
}

.screen::after {
  position: absolute;
  z-index: -1;
  content: "";
  inset: 0;
  opacity: .1;
  background-image: repeating-linear-gradient(0deg, transparent 0 3px, rgba(255,255,255,.2) 4px);
  pointer-events: none;
  mix-blend-mode: overlay;
}

.start-content {
  display: flex;
  height: 100%;
  align-items: center;
  flex-direction: column;
  text-align: center;
}

.brand-lockup {
  position: relative;
  z-index: 2;
  margin-top: 25px;
}

.brand-lockup .eyebrow {
  margin-bottom: -5px;
  font-family: Impact, sans-serif;
  font-size: clamp(25px, 7vw, 34px);
  font-style: italic;
  letter-spacing: 1px;
  transform: rotate(-2deg);
  text-shadow: 0 4px 9px #000;
}

.brand-lockup h1 {
  margin: 0;
  transform: skewX(-8deg);
  color: #d10d16;
  font-family: Impact, sans-serif;
  font-size: clamp(64px, 18vw, 88px);
  font-style: italic;
  line-height: .95;
  letter-spacing: -3px;
  -webkit-text-stroke: 1px #ff2432;
  text-shadow: 0 5px 0 #420006, 0 0 22px rgba(255, 0, 19, .65), 8px 8px 18px #000;
}

.brand-lockup p {
  margin: 11px 0 0;
  color: #d5dbe5;
  font-size: 10px;
  letter-spacing: 5px;
}

.spider-mark {
  position: absolute;
  right: 2px;
  bottom: 7px;
  color: #ff1a0a;
  font-size: 20px;
  text-shadow: 0 0 12px red;
}

.hero-paddle-wrap {
  position: relative;
  width: min(62%, 245px);
  min-height: 0;
  margin: 15px auto 8px;
  flex: 1;
}

.hero-glow,
.reward-fire {
  position: absolute;
  top: 34%;
  left: 50%;
  width: 140%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 135, 255, .74), rgba(0, 105, 255, .22) 32%, transparent 68%);
  filter: blur(4px);
}

.hero-paddle {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 50%;
  width: 100%;
  max-height: 100%;
  object-fit: contain;
  transform: translateX(-50%) rotate(-3deg);
  filter: drop-shadow(0 10px 10px #000) drop-shadow(0 0 14px rgba(22, 139, 255, .5));
}

.start-tagline {
  margin: 0 0 15px;
  font-family: Impact, sans-serif;
  font-size: 13px;
  font-style: italic;
  line-height: 1.45;
  letter-spacing: .5px;
}

.start-tagline strong {
  color: #ff3328;
}

.primary-button,
.secondary-button {
  width: 100%;
  min-height: 49px;
  border-radius: 9px;
  font-family: Impact, "Arial Narrow", sans-serif;
  font-size: 17px;
  font-style: italic;
  letter-spacing: .6px;
  cursor: pointer;
}

.primary-button {
  border: 0;
  background: linear-gradient(180deg, #ff5b16, #f01905 76%, #bc0d00);
  box-shadow: inset 0 1px rgba(255,255,255,.32), 0 8px 25px rgba(255, 42, 0, .24);
}

.primary-button:active {
  transform: translateY(1px);
}

.secondary-button {
  border: 1px solid rgba(255,255,255,.62);
  background: rgba(4, 8, 15, .7);
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}

.quick-nav {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 13px;
}

.quick-nav button {
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 50%;
  background: rgba(2, 7, 14, .72);
  font-size: 17px;
  cursor: pointer;
}

.web-decoration {
  position: absolute;
  z-index: -1;
  top: 0;
  width: 52%;
  height: 42%;
  opacity: .36;
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
}

.web-decoration-left {
  left: 0;
  background-image: url("assets/cobweb.png");
  background-position: top left;
  transform: translate(-28%, -24%) rotate(-16deg);
}

.web-decoration-right {
  right: 0;
  background-image: url("assets/cobweb.png");
  background-position: top right;
  transform: translate(28%, -24%) rotate(16deg);
}

.modal-screen,
.leaderboard-screen,
.reward-screen,
.result-screen {
  background: linear-gradient(170deg, rgba(8, 18, 34, .98), rgba(1, 5, 12, .99));
}

.modal-screen::before,
.leaderboard-screen::before,
.reward-screen::before,
.result-screen::before {
  opacity: .5;
  background-image: url("assets/cobweb.png"), url("assets/cobweb.png");
  background-position: top right, bottom left;
  background-repeat: no-repeat;
  background-size: 58%, 48%;
}

.close-button {
  position: absolute;
  z-index: 4;
  top: 17px;
  right: 15px;
  font-size: 26px;
}

.panel-heading {
  margin: 28px 0 18px;
  text-align: center;
}

.section-kicker {
  color: var(--orange);
  font-family: Impact, sans-serif;
  font-size: 13px;
  font-style: italic;
  letter-spacing: 2px;
}

.panel-heading h2,
.overlay-card h2,
.reward-copy h2 {
  margin: 5px 0 0;
  font-family: Impact, sans-serif;
  font-size: clamp(31px, 9vw, 44px);
  font-style: italic;
  letter-spacing: .5px;
  text-shadow: 0 4px 10px #000;
}

.instruction-list {
  display: grid;
  gap: 9px;
  margin-bottom: 17px;
}

.instruction-card {
  display: grid;
  min-height: 91px;
  grid-template-columns: 76px 1fr;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(94, 128, 173, .32);
  border-radius: 10px;
  background: linear-gradient(105deg, rgba(17, 31, 51, .86), rgba(5, 11, 21, .72));
  box-shadow: inset 0 1px rgba(255,255,255,.03);
}

.instruction-visual {
  display: grid;
  height: 68px;
  place-items: center;
  font-size: 41px;
}

.instruction-visual img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 4px 6px #000);
}

.instruction-visual.paddle-mini img {
  height: 64px;
  transform: rotate(-13deg);
}

.instruction-visual.web-target-mini img {
  filter: drop-shadow(0 0 9px rgba(101, 195, 255, .85));
}

.instruction-card p {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
}

.instruction-card strong,
.instruction-card span {
  display: block;
}

.instruction-card strong {
  margin-bottom: 4px;
  color: #fff;
  font-size: 14px;
  font-style: italic;
}

.instruction-card span {
  color: var(--muted);
}

.power-icon {
  color: var(--gold);
  text-shadow: 0 0 14px #ff4b00;
}

.gameplay-screen {
  padding: 56px 0 0;
  touch-action: none;
  background: #06111f;
}

.gameplay-screen::before {
  background:
    linear-gradient(180deg, rgba(0, 5, 14, .2), rgba(0, 9, 24, .08) 64%, rgba(0, 10, 24, .83)),
    radial-gradient(circle at 50% 55%, rgba(0, 103, 218, .22), transparent 35%);
}

.hud {
  position: absolute;
  z-index: 12;
  top: 56px;
  left: 14px;
  display: grid;
  width: calc(100% - 28px);
  grid-template-columns: 1fr 1.18fr 1fr;
  gap: 9px;
}

.hud-box {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border: 1px solid rgba(255, 45, 31, .47);
  border-radius: 10px;
  background: rgba(4, 10, 21, .73);
  box-shadow: 0 4px 16px #0008, inset 0 0 15px rgba(255, 28, 0, .04);
  backdrop-filter: blur(8px);
}

.hud-box span {
  color: #ff8a6f;
  font-size: 8px;
  letter-spacing: 1px;
}

.hud-box strong {
  font-size: 19px;
  font-style: italic;
  line-height: 1.05;
}

.web-meter-wrap {
  position: absolute;
  z-index: 12;
  top: 111px;
  left: 24px;
  width: calc(100% - 48px);
}

.web-meter-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
  color: #dce7f7;
  font-size: 8px;
  letter-spacing: 1.5px;
}

.web-meter-label strong {
  color: #80d0ff;
  font-size: 10px;
}

.web-meter {
  height: 5px;
  overflow: hidden;
  border-radius: 9px;
  background: rgba(255,255,255,.14);
  box-shadow: 0 0 0 1px #000;
}

.web-meter span {
  display: block;
  width: 18%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0b9cff, #ffc400 62%, #ff270b);
  box-shadow: 0 0 10px currentColor;
  transition: width .18s ease;
}

#gameCanvas {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.web-layer {
  position: absolute;
  z-index: 6;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  transition: opacity .25s ease;
}

.web-haze {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: rgba(205, 228, 244, .33);
  backdrop-filter: blur(1.5px);
  transition: opacity .25s ease;
}

.combo-toast,
.power-toast {
  position: absolute;
  z-index: 15;
  left: 50%;
  transform: translateX(-50%) scale(.7);
  opacity: 0;
  pointer-events: none;
  font-family: Impact, sans-serif;
  font-style: italic;
  text-align: center;
}

.combo-toast {
  top: 28%;
  color: var(--gold);
  font-size: 32px;
  text-shadow: 0 2px 0 #8f2500, 0 0 18px #ff4d00;
}

.power-toast {
  top: 39%;
  width: 82%;
  padding: 12px;
  border: 1px solid #ff5a15;
  color: #fff;
  background: rgba(48, 10, 3, .78);
  font-size: 22px;
  box-shadow: 0 0 18px #ff3c0088, inset 0 0 18px #ff3c0044;
}

.combo-toast.show,
.power-toast.show {
  animation: toast-pop 1.1s ease both;
}

@keyframes toast-pop {
  0% { opacity: 0; transform: translateX(-50%) scale(.6); }
  17%, 70% { opacity: 1; transform: translateX(-50%) scale(1); }
  100% { opacity: 0; transform: translateX(-50%) scale(1.1); }
}

.control-hint {
  position: absolute;
  z-index: 14;
  bottom: 24px;
  left: 50%;
  margin: 0;
  transform: translateX(-50%);
  color: rgba(255,255,255,.6);
  font-size: 10px;
  letter-spacing: 2px;
  pointer-events: none;
  animation: hint-fade 4s 1s both;
}

@keyframes hint-fade {
  0%, 50% { opacity: 1; }
  100% { opacity: 0; }
}

.overlay-screen {
  z-index: 30;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 5, 13, .72);
  backdrop-filter: blur(11px);
}

.overlay-screen.active {
  display: flex;
}

.overlay-card {
  width: 100%;
  padding: 31px 24px;
  border: 1px solid rgba(75, 139, 207, .34);
  border-radius: 18px;
  background: linear-gradient(165deg, rgba(13, 29, 51, .96), rgba(3, 8, 17, .97));
  box-shadow: 0 25px 70px #000;
  text-align: center;
}

.pause-paddle {
  height: 235px;
  margin: 15px 0;
}

.pause-paddle img {
  height: 100%;
  filter: drop-shadow(0 10px 12px #000) drop-shadow(0 0 20px #087bd777);
  transform: rotate(-8deg);
}

.overlay-card .primary-button,
.overlay-card .secondary-button {
  margin-top: 9px;
}

.overlay-card .text-button {
  margin-top: 18px;
}

.result-content {
  display: flex;
  height: 100%;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.result-title span {
  display: block;
  font-family: Impact, sans-serif;
  font-size: 27px;
  font-style: italic;
}

.result-title h2 {
  margin: -2px 0 21px;
  transform: rotate(-3deg);
  color: var(--orange);
  font-family: Impact, sans-serif;
  font-size: clamp(45px, 13vw, 62px);
  font-style: italic;
  line-height: .94;
  text-shadow: 3px 5px #430a00, 0 0 17px #ff2a0044;
}

.score-label {
  color: #bfc9d8;
  font-size: 11px;
  letter-spacing: 2px;
}

.final-score {
  font-family: Impact, sans-serif;
  font-size: 64px;
  font-style: italic;
  line-height: 1;
  text-shadow: 0 5px 12px #000;
}

.best-badge {
  margin: 7px 0 18px;
  padding: 5px 10px;
  transform: rotate(-2deg);
  border-radius: 4px;
  color: #261b00;
  background: var(--gold);
  font-weight: 1000;
  font-style: italic;
}

.best-badge.hidden {
  visibility: hidden;
}

.stats-grid {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
  margin-bottom: 20px;
}

.stats-grid article {
  display: flex;
  min-height: 67px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border: 1px solid rgba(87, 120, 165, .36);
  border-radius: 9px;
  background: rgba(10, 20, 36, .76);
}

.stats-grid strong {
  font-size: 23px;
  font-style: italic;
}

.stats-grid span {
  color: #aab5c5;
  font-size: 9px;
  letter-spacing: 1px;
}

.result-content > button {
  margin-top: 8px;
}

.result-content .text-button {
  margin-top: 15px;
}

.score-save-status {
  min-height: 14px;
  margin: 8px 0 0;
  color: #8eddb7;
  font-size: 10px;
}

.score-save-status.error { color: #ff9c88; }

.leaderboard-screen,
.reward-screen {
  padding-top: 67px;
}

.leaderboard-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  margin-bottom: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(2, 7, 15, .8);
}

.leaderboard-tabs button {
  min-height: 40px;
  border: 0;
  background: transparent;
  color: #7d899a;
  font-size: 12px;
  font-style: italic;
  font-weight: 900;
  cursor: pointer;
}

.leaderboard-tabs button.active {
  color: white;
  background: linear-gradient(#ff5614, #ef2507);
}

.leaderboard-list {
  display: grid;
  min-height: 0;
  max-height: calc(100% - 255px);
  gap: 7px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  counter-reset: rank;
  list-style: none;
}

.leaderboard-list li {
  display: grid;
  min-height: 49px;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  padding: 0 13px 0 8px;
  border: 1px solid rgba(75, 105, 145, .3);
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(19, 32, 51, .88), rgba(6, 12, 22, .85));
  font-size: 13px;
}

.leaderboard-list li.you {
  border-color: #ff671b;
  color: #ffd02b;
  box-shadow: inset 0 0 15px rgba(255, 75, 0, .08);
}

.rank-medal {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50%;
  background: #101b2b;
  font-weight: 900;
}

.leaderboard-list li:nth-child(1) .rank-medal { color: #2a2100; background: #ffd51e; }
.leaderboard-list li:nth-child(2) .rank-medal { color: #1c2430; background: #c8d1dd; }
.leaderboard-list li:nth-child(3) .rank-medal { color: #271207; background: #d87936; }

.leaderboard-list .leader-score {
  font-weight: 900;
  font-style: italic;
}

.leaderboard-note {
  margin: 13px 0;
  color: #798596;
  font-size: 10px;
  text-align: center;
}

.reward-screen {
  display: none;
  text-align: center;
}

.reward-screen.active {
  display: flex;
  align-items: center;
  flex-direction: column;
}

.reward-copy {
  position: relative;
  z-index: 3;
  margin-top: 35px;
}

.reward-copy h2 {
  margin-top: 10px;
  font-size: clamp(29px, 8vw, 39px);
  line-height: 1.05;
}

.reward-copy h2 em {
  color: var(--gold);
}

.reward-copy p {
  margin: 13px 0 0;
  color: #c1c9d4;
  font-size: 12px;
}

.reward-paddle-wrap {
  position: relative;
  width: 220px;
  min-height: 0;
  margin: 2px auto;
  flex: 1;
}

.reward-paddle {
  position: absolute;
  z-index: 2;
  top: 8%;
  left: 50%;
  height: 90%;
  max-width: 100%;
  object-fit: contain;
  transform: translateX(-50%) rotate(-13deg);
  filter: drop-shadow(0 12px 13px #000) drop-shadow(0 0 18px #ff4c0066);
}

.reward-fire {
  top: 50%;
  background: radial-gradient(circle, #ffb21c88 0, #ff3c0055 32%, transparent 65%);
}

.code-card {
  display: grid;
  width: 100%;
  min-height: 51px;
  grid-template-columns: 1fr auto;
  align-items: center;
  margin: 7px 0 10px;
  padding-left: 15px;
  overflow: hidden;
  border: 1px dashed var(--gold);
  border-radius: 8px;
  background: rgba(255, 196, 0, .08);
  color: var(--gold);
  font-weight: 900;
  letter-spacing: 1px;
}

.code-card.locked {
  border-color: #687180;
  color: #929aaa;
  background: rgba(255,255,255,.04);
}

.code-card button {
  align-self: stretch;
  padding: 0 16px;
  border: 0;
  color: #211600;
  background: var(--gold);
  font-weight: 900;
  cursor: pointer;
}

.code-card button:disabled {
  color: #5f6670;
  background: #282d35;
  cursor: not-allowed;
}

.side-menu {
  position: absolute;
  z-index: 90;
  inset: 0;
  visibility: hidden;
  pointer-events: none;
}

.side-menu.open {
  visibility: visible;
  pointer-events: auto;
}

.menu-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: rgba(0, 4, 11, .76);
  backdrop-filter: blur(4px);
  transition: opacity .3s ease;
}

.side-menu.open .menu-backdrop {
  opacity: 1;
}

.menu-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: 78%;
  height: 100%;
  padding: 58px 20px 24px;
  transform: translateX(-102%);
  border-right: 1px solid rgba(255,255,255,.15);
  background: linear-gradient(110deg, rgba(5, 13, 24, .99), rgba(2, 7, 15, .97));
  box-shadow: 20px 0 50px #000b;
  transition: transform .32s cubic-bezier(.2,.8,.2,1);
}

.side-menu.open .menu-panel {
  transform: translateX(0);
}

.menu-brand {
  margin: 0 0 15px 8px;
  font-size: 36px;
}

.player-identity {
  margin-bottom: 17px;
  padding: 12px 13px;
  border: 1px solid rgba(68, 139, 210, .3);
  border-radius: 9px;
  background: rgba(13, 32, 54, .7);
}

.player-identity span,
.player-identity strong,
.player-identity small { display: block; }
.player-identity span { color: #ff6727; font-size: 8px; font-weight: 900; letter-spacing: 1.2px; }
.player-identity strong { margin: 4px 0 2px; overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.player-identity small { color: #8796aa; font-size: 10px; }

.menu-close {
  top: 17px;
  right: 14px;
}

.menu-panel nav {
  display: grid;
}

.menu-panel nav button {
  display: grid;
  min-height: 57px;
  grid-template-columns: 38px 1fr;
  align-items: center;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.14);
  background: transparent;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
}

.menu-panel nav button span {
  color: var(--orange);
  font-size: 20px;
  text-align: center;
}

.menu-footer {
  position: absolute;
  bottom: 28px;
  left: 28px;
  color: #e6eaf0;
  font-size: 8px;
  letter-spacing: 1.2px;
}

.menu-footer i {
  display: inline-block;
  width: 16px;
  height: 2px;
  margin-left: 5px;
  background: var(--orange);
  vertical-align: middle;
}

.rotate-message {
  position: absolute;
  z-index: 200;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 30px;
  background: #030913;
  text-align: center;
}

.rotate-message span {
  color: var(--orange);
  font-size: 60px;
}

.rotate-message strong {
  margin-top: 15px;
  font-family: Impact, sans-serif;
  font-size: 28px;
  font-style: italic;
}

.rotate-message p {
  color: var(--muted);
}

@media (min-width: 560px) and (min-height: 760px) {
  .phone-shell {
    height: min(92dvh, 920px);
    border: 7px solid #242a32;
    border-radius: 42px;
    box-shadow: 0 30px 100px #000, inset 0 0 0 2px #82878e;
  }

  .phone-shell::before {
    border-radius: 35px;
  }
}

@media (max-height: 740px) {
  .brand-lockup { margin-top: 7px; }
  .brand-lockup .eyebrow { font-size: 24px; }
  .brand-lockup h1 { font-size: 61px; }
  .hero-paddle-wrap { margin-top: 6px; }
  .start-tagline { margin-bottom: 9px; }
  .quick-nav { margin-top: 8px; }
  .instruction-card { min-height: 75px; grid-template-columns: 64px 1fr; }
  .instruction-visual { height: 55px; }
  .instruction-visual img { width: 45px; height: 45px; }
  .instruction-visual.paddle-mini img { height: 52px; }
  .panel-heading { margin: 8px 0 10px; }
  .pause-paddle { height: 160px; }
  .result-title h2 { margin-bottom: 10px; }
  .final-score { font-size: 51px; }
  .best-badge { margin-bottom: 10px; }
  .stats-grid { margin-bottom: 9px; }
  .stats-grid article { min-height: 52px; }
  .result-content > button { min-height: 42px; }
  .reward-copy { margin-top: 5px; }
}

@media (orientation: landscape) and (max-height: 560px) {
  .rotate-message { display: flex; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
