:root {
  --bg-1: #12041b;
  --bg-2: #1d0f2f;
  --panel: #1e1838;
  --panel-2: #2b2350;
  --ink: #120a22;
  --line: #0a0612;
  --cream: #fff4c2;
  --mint: #7cf0d0;
  --cyan: #49c9ff;
  --orange: #ff8a30;
  --gold: #ffcb47;
  --red: #ff5e57;
  --purple: #7b5dff;
  --pink: #ff65a8;
  --shadow: 6px 6px 0 var(--line);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Trebuchet MS", "Verdana", sans-serif;
  color: var(--cream);
  background:
    radial-gradient(circle at top, rgba(73, 201, 255, 0.18), transparent 28%),
    radial-gradient(circle at bottom right, rgba(255, 101, 168, 0.22), transparent 30%),
    linear-gradient(180deg, var(--bg-2), var(--bg-1));
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: 0.5;
}

.app-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 24px;
  width: min(1540px, calc(100% - 24px));
  margin: 0 auto;
  padding: 18px 0 28px;
}

.pixel-panel {
  position: relative;
  border: 4px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 22%),
    linear-gradient(180deg, var(--panel-2), var(--panel));
  box-shadow: var(--shadow);
}

.pixel-panel::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 2px solid rgba(255, 244, 194, 0.18);
  pointer-events: none;
}

.status-panel,
.screen-panel {
  padding: 18px;
}

.status-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.panel-kicker,
.preview-label,
.screen-tag {
  margin: 0 0 6px;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mint);
}

.logo {
  margin: 0;
  font-family: "Arial Black", Impact, Haettenschweiler, sans-serif;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  letter-spacing: 0.01em;
  text-transform: none;
  color: #fff58d;
  -webkit-text-stroke: 3px #0d0718;
  text-shadow:
    0 4px 0 #ff7f38,
    0 8px 0 #ff4f7b,
    4px 12px 0 rgba(8, 4, 18, 0.45);
  transform: rotate(-2deg);
}

.preview-card,
.hud-panel,
.choice-card,
.design-card,
.court,
.type-card {
  border: 4px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 24%),
    #241e44;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.38);
}

.preview-card,
.hud-panel {
  padding: 14px;
}

.preview-card-button {
  width: 100%;
  color: var(--cream);
  text-align: left;
  cursor: pointer;
}

.preview-card-button:hover {
  transform: translate(-2px, -2px);
}

body.tutorial-mode {
  overflow-x: hidden;
  overflow-y: auto;
}

.status-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(9, 6, 20, 0.72);
}

.status-popup {
  width: min(100%, 440px);
  display: grid;
  gap: 18px;
  padding: 24px;
  text-align: center;
}

.status-popup-message {
  margin: 0;
  color: #fff4c2;
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1.4;
}

.tutorial-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  background: radial-gradient(circle at center, rgba(255, 203, 71, 0.06), rgba(10, 6, 18, 0.12));
}

.tutorial-overlay.is-finish-screen {
  background:
    radial-gradient(circle at top, rgba(255, 241, 132, 0.24), transparent 34%),
    radial-gradient(circle at bottom, rgba(255, 95, 127, 0.18), transparent 42%),
    rgba(10, 6, 18, 0.26);
}

.tutorial-card {
  position: absolute;
  left: 50%;
  right: auto;
  bottom: 24px;
  top: auto;
  width: min(980px, calc(100vw - 48px));
  max-height: min(280px, 38vh);
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  padding: 18px 20px 20px;
  text-align: left;
  pointer-events: none;
  overflow: hidden;
  touch-action: pan-y;
  transform: translateX(-50%);
}

.tutorial-card.is-top-docked {
  top: 24px;
  bottom: auto;
}

.tutorial-card.is-center-docked {
  top: 50%;
  bottom: auto;
  transform: translate(-50%, -50%);
}

.tutorial-card.is-finish-screen {
  width: min(860px, calc(100vw - 42px));
  max-height: min(360px, 56vh);
  padding: 26px 28px 24px;
  text-align: center;
}

.tutorial-card.pixel-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.054), transparent 22%),
    linear-gradient(180deg, rgba(43, 35, 80, 0.6), rgba(30, 24, 56, 0.6));
  border: 4px solid var(--line);
  box-shadow: var(--shadow);
}

.tutorial-card.pixel-panel.is-finish-screen {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 20%),
    linear-gradient(180deg, rgba(255, 208, 94, 0.88), rgba(255, 123, 79, 0.78) 56%, rgba(86, 37, 122, 0.84));
  box-shadow:
    0 0 0 5px rgba(255, 244, 194, 0.18),
    0 0 32px rgba(255, 203, 71, 0.28),
    8px 8px 0 rgba(10, 6, 18, 0.42);
}

.tutorial-card::after {
  display: block;
}

.tutorial-card > * {
  pointer-events: auto;
}

.tutorial-text {
  margin: 0;
  min-height: 0;
  max-height: min(150px, 22vh);
  overflow-y: scroll;
  padding-right: 8px;
  color: #fff8d6;
  font-size: clamp(1.1rem, 1.9vw, 1.45rem);
  font-weight: 900;
  line-height: 1.6;
  text-shadow: 0 2px 0 rgba(10, 6, 18, 0.45);
  pointer-events: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  scrollbar-width: thin;
  scrollbar-color: #ffcb47 rgba(10, 6, 18, 0.25);
}

.tutorial-card.is-finish-screen .tutorial-text {
  max-height: min(198px, 30vh);
  padding-right: 2px;
  color: #fffdf1;
  font-size: clamp(1.2rem, 2.15vw, 1.7rem);
  line-height: 1.7;
  text-align: center;
  text-shadow:
    0 2px 0 rgba(120, 36, 0, 0.28),
    0 4px 0 rgba(51, 18, 80, 0.28);
  scrollbar-color: rgba(255, 244, 194, 0.92) rgba(66, 22, 72, 0.26);
}

.tutorial-text::-webkit-scrollbar {
  width: 10px;
}

.tutorial-text::-webkit-scrollbar-track {
  background: rgba(10, 6, 18, 0.22);
}

.tutorial-text::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #ffee72, #ffba38);
  border: 2px solid rgba(10, 6, 18, 0.28);
}

.tutorial-actions {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  min-height: 58px;
  margin-top: 14px;
  pointer-events: auto;
  gap: 10px;
}

.tutorial-card.is-finish-screen .tutorial-actions {
  align-items: center;
  margin-top: 18px;
}

.tutorial-actions * {
  pointer-events: auto;
}

.tutorial-controls-visual {
  position: absolute;
  left: 50%;
  top: calc(50% + 124px);
  pointer-events: none;
  transform: translateX(-50%);
}

.tutorial-arrow-pad {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.tutorial-arrow-row {
  display: flex;
  gap: 10px;
}

.tutorial-keycap {
  min-width: 58px;
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 4px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(58, 44, 102, 0.88));
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.34);
  color: #fff4c2;
  font: 900 1.6rem "Arial Black", Impact, sans-serif;
  text-shadow: 0 2px 0 rgba(10, 6, 18, 0.4);
}

.tutorial-arrow-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.tutorial-arrow {
  position: fixed;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border: 4px solid var(--line);
  border-radius: 50%;
  background: linear-gradient(180deg, #ffee72, #ffba38);
  color: var(--ink);
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.38);
  animation: tutorial-arrow-bob 900ms ease-in-out infinite;
  pointer-events: none;
}

.tutorial-confetti {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.tutorial-confetti span {
  position: absolute;
  top: -14%;
  width: 14px;
  height: 26px;
  border: 3px solid rgba(18, 10, 34, 0.48);
  box-shadow: 3px 3px 0 rgba(10, 6, 18, 0.24);
  animation: tutorial-confetti-fall 2.4s linear infinite;
}

.tutorial-confetti span:nth-child(1) {
  left: 7%;
  background: #ffef78;
  animation-delay: 0s;
}

.tutorial-confetti span:nth-child(2) {
  left: 14%;
  background: #49c9ff;
  animation-delay: 0.22s;
}

.tutorial-confetti span:nth-child(3) {
  left: 23%;
  background: #ff5e57;
  animation-delay: 0.42s;
}

.tutorial-confetti span:nth-child(4) {
  left: 31%;
  background: #7cf0d0;
  animation-delay: 0.12s;
}

.tutorial-confetti span:nth-child(5) {
  left: 40%;
  background: #ffcb47;
  animation-delay: 0.62s;
}

.tutorial-confetti span:nth-child(6) {
  left: 49%;
  background: #ff65a8;
  animation-delay: 0.3s;
}

.tutorial-confetti span:nth-child(7) {
  left: 58%;
  background: #fff4c2;
  animation-delay: 0.52s;
}

.tutorial-confetti span:nth-child(8) {
  left: 66%;
  background: #7b5dff;
  animation-delay: 0.82s;
}

.tutorial-confetti span:nth-child(9) {
  left: 74%;
  background: #ff8a30;
  animation-delay: 0.18s;
}

.tutorial-confetti span:nth-child(10) {
  left: 82%;
  background: #49c9ff;
  animation-delay: 0.72s;
}

.tutorial-confetti span:nth-child(11) {
  left: 89%;
  background: #ffef78;
  animation-delay: 0.48s;
}

.tutorial-confetti span:nth-child(12) {
  left: 95%;
  background: #ff5e57;
  animation-delay: 0.9s;
}

.tutorial-complete {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(520px, calc(100vw - 32px));
  padding: 30px 28px;
  text-align: center;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.tutorial-complete-title {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: clamp(2rem, 3vw, 2.8rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tutorial-complete-copy {
  margin: 0 0 22px;
  color: #fff8d6;
  font-size: 1.2rem;
  line-height: 1.5;
}

.tutorial-target-highlight {
  position: relative;
  z-index: 61;
  box-shadow:
    0 0 0 5px rgba(255, 203, 71, 0.35),
    0 0 24px rgba(255, 203, 71, 0.38),
    4px 4px 0 rgba(0, 0, 0, 0.38);
  animation: tutorial-target-pulse 1s ease-in-out infinite;
}

.hud-panel {
  width: 100%;
  color: var(--cream);
  text-align: left;
}

.scores-launch {
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}

.scores-launch:hover {
  transform: translate(-2px, -2px);
  background:
    linear-gradient(180deg, rgba(124, 240, 208, 0.18), transparent 24%),
    #30285b;
}

.scores-launch-title {
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.scores-launch-run {
  position: relative;
  display: inline-block;
}

.scores-launch-run::before {
  content: "🧮";
  position: absolute;
  top: -0.95em;
  left: 1.05em;
  font-size: 0.9em;
  line-height: 1;
}

.type-card {
  max-width: 760px;
  padding: 20px;
}

.player-name-card,
.scores-screen-card {
  margin: 0 auto;
}

.is-hidden {
  display: none !important;
}

.player-name-card {
  min-height: 500px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.type-input {
  width: min(100%, 420px);
  margin-top: 16px;
  padding: 16px 18px;
  border: 4px solid var(--line);
  background: #f6f2ea;
  color: var(--ink);
  font: 900 1.1rem "Trebuchet MS", "Verdana", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.3);
}

.type-input:focus {
  outline: 4px solid var(--mint);
  outline-offset: 3px;
}

.type-response {
  min-height: 72px;
  margin: 18px 0 0;
  padding: 16px;
  border: 4px solid var(--line);
  background: rgba(12, 8, 27, 0.68);
  color: #fff4c2;
  font-size: 1.02rem;
  line-height: 1.5;
}

.player-name-input {
  text-align: center;
  text-transform: none;
}

.player-name-play-tab {
  min-width: 176px;
  margin-top: -4px;
  padding: 10px 26px 12px;
  border: 4px solid var(--line);
  border-top: 0;
  background:
    linear-gradient(180deg, rgba(255, 225, 123, 0.18), rgba(124, 240, 208, 0.12)),
    #2c875d;
  color: #fff8d6;
  font: 900 1rem "Trebuchet MS", "Verdana", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.28);
  cursor: pointer;
  transition: transform 160ms ease, opacity 160ms ease, background 160ms ease, color 160ms ease;
}

.player-name-play-tab:hover {
  transform: translate(-2px, -2px);
}

.player-name-play-tab.is-inactive {
  background: rgba(176, 184, 198, 0.24);
  color: rgba(255, 248, 214, 0.58);
  opacity: 0.7;
}

.player-name-response {
  max-width: 520px;
}

.type-command-copy {
  margin: 6px 0 0;
}

.type-command-panel {
  margin-top: 18px;
  padding: 18px;
  border: 3px solid var(--line);
  background: rgba(13, 8, 27, 0.82);
  box-shadow: inset 0 0 0 2px rgba(255, 214, 90, 0.16);
}

.type-command-panel-head {
  margin-bottom: 14px;
}

.type-command-tabs {
  display: grid;
  gap: 12px;
}

.type-command-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  align-items: center;
  width: 100%;
  padding: 16px 18px;
  border: 3px solid var(--line);
  background: linear-gradient(135deg, rgba(255, 214, 90, 0.2), rgba(92, 48, 156, 0.18));
  color: #fff8d6;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.type-command-row:hover,
.type-command-row:focus-visible {
  transform: translateY(-2px);
  border-color: #ffd65a;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.28);
  outline: none;
}

.type-command-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 10px 12px;
  border: 3px solid rgba(255, 214, 90, 0.72);
  background: rgba(255, 214, 90, 0.14);
  color: #ffe58a;
  font-size: 1.12rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.type-command-details {
  display: grid;
  gap: 4px;
}

.type-command-title {
  font-size: 1rem;
  font-weight: 800;
  color: #fff8d6;
}

.type-command-description {
  color: #e7dcff;
  line-height: 1.45;
}

.preview-name {
  margin: 0 0 6px;
  font-size: 1.1rem;
  font-weight: 800;
}

.preview-copy,
.choice-copy {
  margin: 0;
  color: #e1d7ff;
  line-height: 1.45;
}

.player-preview,
.ball-preview-row,
.hud-row,
.action-row,
.menu-buttons,
.top-bar,
.screen-head {
  display: flex;
  align-items: center;
}

.player-preview,
.ball-preview-row {
  gap: 14px;
}

.status-panel .player-preview {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: start;
  column-gap: 10px;
}

#preview-player {
  width: 92px;
  height: 124px;
  transform: scale(0.72);
  transform-origin: top left;
}

.menu-buttons {
  gap: 10px;
  flex-wrap: wrap;
}

.hud-row {
  justify-content: space-between;
  gap: 16px;
}

.action-row {
  gap: 12px;
  margin-top: 14px;
}

.time-circle {
  width: 88px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  text-align: center;
  border: 4px solid var(--line);
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ffd974, #ff8d3c 70%);
  color: var(--ink);
  font-weight: 800;
}

.score-stack {
  display: flex;
  gap: 8px;
}

.score-box,
.sound-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  height: 52px;
  padding: 0 12px;
  border: 4px solid var(--line);
  background: #f4f1e1;
  color: var(--ink);
  font-weight: 900;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.35);
}

.jackpot {
  background: #ffdd6e;
}

.shot-btn,
.pixel-button,
.choice-card,
.design-card {
  cursor: pointer;
}

.shot-btn,
.pixel-button {
  border: 4px solid var(--line);
  color: var(--ink);
  background: linear-gradient(180deg, #ffee72, #ffba38);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.38);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.shot-btn {
  height: 48px;
  padding: 0 18px;
}

.pixel-button {
  min-height: 58px;
  padding: 0 26px;
  font-size: 1rem;
}

.pixel-button.small {
  min-height: 48px;
  min-width: 56px;
  padding: 0 14px;
}

.settings-icon-button {
  font-size: 1.35rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.info-center-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
}

.tutorial-launch-button {
  min-width: 0;
  padding: 0 12px;
  line-height: 1;
  overflow: visible;
}

.tutorial-launch-word {
  display: inline-block;
  font-family: "Arial Black", Impact, Haettenschweiler, sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  color: #fff4a6;
  background: linear-gradient(90deg, #49c9ff 0%, #5d9cff 24%, #fff58d 52%, #ffcb47 74%, #ff8a30 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 1px #120a22;
  text-shadow:
    0 2px 0 #2f86ff,
    0 4px 0 #ffb13b,
    0 6px 0 rgba(18, 10, 34, 0.34);
  transform: rotate(-3deg) skewX(-4deg);
}

.info-center-icon {
  position: relative;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #231433;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #fffbe0 0, #ffe16a 44%, #ffb938 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.38);
}

.info-center-dot,
.info-center-stem {
  position: absolute;
  display: block;
  background: #231433;
  border-radius: 999px;
}

.info-center-dot {
  top: 4px;
  width: 5px;
  height: 5px;
}

.info-center-stem {
  top: 10px;
  width: 5px;
  height: 9px;
}

.screen-panel {
  overflow: hidden;
  padding: 14px;
}

.screen {
  display: none;
  min-height: 720px;
}

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

.top-bar,
.screen-head {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.screen-head h2,
.top-copy h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.screen-head h2 {
  max-width: 620px;
}

.start-stage {
  display: flex;
  align-items: stretch;
}

.court {
  position: relative;
  width: 100%;
  min-height: 620px;
  padding: 20px 20px 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 20%),
    linear-gradient(180deg, #2f9f82 0 18%, #3fa86d 18% 100%);
}

.title-block {
  position: relative;
  display: inline-grid;
  grid-template-columns: max-content;
  grid-template-rows: auto auto;
  row-gap: 8px;
  margin-bottom: 18px;
}

.maker-credit {
  position: absolute;
  top: 34px;
  right: 40px;
  margin: 0;
  color: #ffe25a;
  font: 900 1.05rem "Arial Black", Impact, sans-serif;
  letter-spacing: 0.04em;
  text-transform: none;
  -webkit-text-stroke: 1px #8a5a00;
  text-shadow:
    0 2px 0 #b87800,
    0 4px 0 rgba(18, 10, 34, 0.28);
  z-index: 2;
}

.title-primary,
.title-secondary {
  position: relative;
  display: inline-grid;
  width: max-content;
  transform-origin: left bottom;
  opacity: 0;
}

.title-primary {
  grid-column: 1;
  grid-row: 1;
  animation: title-primary-cycle 5.5s ease-out infinite;
}

.title-secondary {
  grid-column: 1;
  grid-row: 2;
  margin-left: 16px;
  animation: title-secondary-cycle 5.5s ease-out infinite;
}

.title-shadow,
.title-main,
.title-sub-shadow,
.title-sub {
  grid-area: 1 / 1;
  font-family: "Arial Black", Impact, Haettenschweiler, sans-serif;
  font-size: clamp(3rem, 8vw, 5.4rem);
  line-height: 0.9;
  text-transform: none;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.title-shadow {
  transform: translate(10px, 10px) rotate(-3deg) skewX(-5deg);
  color: #180b24;
  text-shadow:
    0 0 0 #180b24,
    6px 6px 0 rgba(0, 0, 0, 0.28);
}

.title-main {
  transform: rotate(-3deg) skewX(-5deg);
  color: #fff58d;
  -webkit-text-stroke: 4px #120a22;
  text-shadow:
    0 5px 0 #ff9738,
    0 10px 0 #ff5f7f,
    0 14px 0 #2ad8d8,
    6px 18px 0 rgba(18, 10, 34, 0.32);
}

.title-sub-shadow,
.title-sub {
  font-size: clamp(2rem, 5vw, 3.2rem);
}

.title-sub-shadow {
  transform: translate(8px, 8px) rotate(-2deg) skewX(-5deg);
  color: #180b24;
  text-shadow:
    0 0 0 #180b24,
    5px 5px 0 rgba(0, 0, 0, 0.24);
}

.title-sub {
  transform: rotate(-2deg) skewX(-5deg);
  color: #fff58d;
  -webkit-text-stroke: 4px #120a22;
  text-shadow:
    0 4px 0 #ff9738,
    0 8px 0 #ff5f7f,
    0 12px 0 #2ad8d8,
    6px 16px 0 rgba(18, 10, 34, 0.28);
}

.court-scene {
  position: relative;
  height: 420px;
  border: 4px solid var(--line);
  background:
    linear-gradient(180deg, #60b9ff 0 54%, #d9a05f 54% 100%);
  overflow: hidden;
}

.court-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 24% 20%, rgba(255, 255, 255, 0.2), transparent 18%),
    radial-gradient(circle at 74% 18%, rgba(255, 255, 255, 0.18), transparent 14%);
  pointer-events: none;
}

.court-scene::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 30%;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 231, 158, 0.22) 0 24px,
      rgba(0, 0, 0, 0.04) 24px 28px
    );
}

.hoop {
  position: absolute;
  top: 62px;
  right: 88px;
  width: 120px;
  height: 130px;
  z-index: 4;
}

.pole {
  position: absolute;
  top: 56px;
  left: 86px;
  width: 14px;
  height: 214px;
  background: #aeb6c2;
  border: 4px solid var(--line);
}

.base {
  position: absolute;
  left: 58px;
  top: 252px;
  width: 72px;
  height: 22px;
  background: #6d7786;
  border: 4px solid var(--line);
}

.backboard {
  position: absolute;
  inset: 0 auto auto 0;
  width: 84px;
  height: 62px;
  background: #f8f4ea;
  border: 4px solid var(--line);
}

.rim {
  position: absolute;
  top: 72px;
  left: 18px;
  width: 74px;
  height: 14px;
  background: var(--red);
  border: 4px solid var(--line);
}

.net {
  position: absolute;
  top: 88px;
  left: 26px;
  width: 56px;
  height: 34px;
  background:
    linear-gradient(90deg, transparent 0 12px, rgba(255,255,255,0.8) 12px 16px, transparent 16px 28px, rgba(255,255,255,0.8) 28px 32px, transparent 32px 44px, rgba(255,255,255,0.8) 44px 48px, transparent 48px),
    linear-gradient(180deg, rgba(255,255,255,0.85) 0 4px, transparent 4px 12px, rgba(255,255,255,0.85) 12px 16px, transparent 16px 24px, rgba(255,255,255,0.85) 24px 28px, transparent 28px);
  transform-origin: top center;
  animation: net-swish 2.2s ease-in-out infinite;
}

.floor-markings .paint,
.floor-markings .three-line,
.floor-markings .center-dot {
  position: absolute;
  border: 4px solid rgba(255, 249, 231, 0.85);
}

.paint {
  right: 58px;
  bottom: 32px;
  width: 170px;
  height: 190px;
}

.three-line {
  right: 24px;
  bottom: -34px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  border-left-color: transparent;
  border-top-color: transparent;
  border-bottom-color: rgba(255, 249, 231, 0.85);
  border-right-color: rgba(255, 249, 231, 0.85);
}

.center-dot {
  left: 50%;
  bottom: 50px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 249, 231, 0.85);
  transform: translateX(-50%);
}

.play-button {
  display: block;
  margin: 22px auto 0;
  min-width: 220px;
  min-height: 76px;
  font-size: 1.35rem;
}

.selection-grid,
.design-grid,
.info-grid,
.settings-toggle-grid,
.settings-secret-grid,
.settings-lock-grid,
.settings-layout {
  display: grid;
  gap: 18px;
}

.selection-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.design-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.info-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-layout {
  max-width: 1040px;
  margin: 0 auto;
}

.settings-toggle-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-secret-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.unlock-points-summary {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border: 4px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 225, 123, 0.14), transparent 30%),
    #241e44;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.32);
}

.unlock-points-label {
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.unlock-points-total {
  color: #fff4c2;
  font-size: 2rem;
  line-height: 1;
}

.unlock-points-copy {
  color: #e1d7ff;
  line-height: 1.4;
}

.settings-lock-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.team-actions {
  display: flex;
  justify-content: center;
  margin-top: 22px;
}

.ready-button {
  min-width: 260px;
}

.choice-card,
.design-card,
.info-card,
.settings-card,
.settings-lock-item,
.settings-toggle {
  display: flex;
  color: var(--cream);
}

.choice-card,
.design-card {
  position: relative;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px;
  text-align: center;
  transition: transform 160ms ease, background 160ms ease;
  overflow: hidden;
}

.info-card,
.settings-card {
  flex-direction: column;
  gap: 12px;
  padding: 20px;
}

.info-card {
  border: 4px solid var(--line);
  background:
    linear-gradient(180deg, rgba(124, 240, 208, 0.1), transparent 22%),
    #241e44;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.38);
}

.info-card-gold {
  background:
    linear-gradient(180deg, rgba(255, 248, 196, 0.88), rgba(255, 224, 112, 0.92) 52%, rgba(255, 191, 54, 0.96) 100%);
  color: #4d2f00;
}

.info-card-gold .preview-label,
.info-card-gold .game-copy {
  color: #6f4200;
}

.info-card h3 {
  margin: 0;
  font-size: 1.35rem;
  color: var(--gold);
}

.info-card-gold h3 {
  color: #5b3200;
}

.settings-card,
.settings-lock-item,
.settings-toggle {
  border: 4px solid var(--line);
  background:
    linear-gradient(180deg, rgba(124, 240, 208, 0.1), transparent 22%),
    #241e44;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.38);
}

.settings-card h3 {
  margin: 0;
  font-size: 1.35rem;
  color: var(--gold);
}

.settings-toggle {
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 20px;
  cursor: pointer;
  text-align: left;
  transition: transform 160ms ease, background 160ms ease;
}

.settings-toggle:hover,
.lock-toggle:hover {
  transform: translate(-2px, -2px);
}

.settings-toggle.is-off {
  background:
    linear-gradient(180deg, rgba(255, 94, 87, 0.14), transparent 22%),
    #362443;
}

.settings-toggle-title,
.settings-toggle-state,
.settings-item-title {
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.settings-toggle-title,
.settings-item-title {
  font-size: 1rem;
}

.settings-toggle-state {
  color: var(--mint);
}

.settings-toggle.is-off .settings-toggle-state {
  color: #ffd2d2;
}

.secret-choice-button.is-affordable-choice {
  background:
    linear-gradient(180deg, rgba(255, 203, 71, 0.24), transparent 22%),
    #36292a;
  outline: 4px solid var(--gold);
}

.secret-choice-button {
  background:
    linear-gradient(180deg, rgba(255, 225, 138, 0.12), transparent 22%),
    #2b2230;
  padding-right: 52px;
}

.secret-choice-button::after {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 3px solid var(--line);
  border-radius: 50%;
  background: rgba(18, 10, 34, 0.92);
  font-size: 1rem;
  line-height: 1;
}

.secret-choice-button[data-lock-state="locked"]::after {
  content: "🔒";
}

.secret-choice-button[data-lock-state="unlocked"]::after {
  content: "🔓";
}

.secret-choice-button:disabled {
  cursor: default;
  transform: none;
  background:
    linear-gradient(180deg, rgba(255, 247, 208, 0.14), transparent 22%),
    #2d3a31;
}

.secret-choice-button[data-lock-state="locked"]::after {
  content: "\1F512";
}

.secret-choice-button[data-lock-state="unlocked"]::after {
  content: "\1F513";
}

.settings-lock-item {
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
}

.settings-lock-item.is-secret-lock-item {
  background:
    linear-gradient(180deg, rgba(255, 203, 71, 0.12), transparent 22%),
    #2b2348;
}

.settings-lock-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.settings-item-copy {
  color: #e1d7ff;
  line-height: 1.35;
}

.lock-toggle {
  min-width: 110px;
}

.lock-toggle.is-locked {
  background: linear-gradient(180deg, #ffb299, #ff6f59);
}

.lock-toggle:disabled {
  cursor: not-allowed;
  transform: none;
  background: linear-gradient(180deg, #a6a1bf, #6c6688);
  color: #f6f2ea;
}

.settings-response {
  max-width: 1040px;
  min-height: 0;
}

.scores-screen-card {
  max-width: 980px;
  padding: 20px;
  border: 4px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 24%),
    #241e44;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.38);
}

.scores-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 18px;
}

.scores-header-row .game-copy {
  max-width: 420px;
}

.scores-view-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
}

.scores-tab-button {
  min-width: 86px;
}

.scores-tab-button.is-active-scores-tab {
  background: linear-gradient(180deg, #fff4a3, #ffb63b);
  outline: 4px solid var(--mint);
}

.scores-list {
  display: grid;
  gap: 14px;
}

.scores-empty,
.score-entry {
  margin: 0;
  border: 4px solid var(--line);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.3);
}

.scores-empty {
  padding: 18px;
  background: rgba(12, 8, 27, 0.72);
  color: #e1d7ff;
}

.score-entry {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr) auto auto;
  gap: 16px;
  align-items: center;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(124, 240, 208, 0.12), transparent 22%),
    #30285b;
}

.score-entry-main,
.score-entry-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.score-entry-name,
.score-entry-points {
  font-size: 1.2rem;
  font-weight: 900;
}

.score-entry-name {
  color: var(--cream);
}

.score-entry-copy,
.score-entry-detail {
  color: #e1d7ff;
  line-height: 1.35;
}

.score-entry-points {
  color: var(--gold);
  text-align: right;
}

.score-save-button {
  min-width: 56px;
  min-height: 56px;
  padding: 0;
  border: 4px solid var(--line);
  background: linear-gradient(180deg, #f6f2ea, #ddd5c2);
  color: #7a708d;
  font-size: 1.7rem;
  line-height: 1;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: transform 160ms ease, color 160ms ease, background 160ms ease;
}

.score-save-button:hover {
  transform: translate(-2px, -2px);
}

.score-save-button.is-saved {
  background: linear-gradient(180deg, #fff3a2, #ffbf2d);
  color: #8a5a00;
}

.game-copy {
  margin: 0;
  line-height: 1.5;
  color: #e1d7ff;
}

.game-copy.emphasis {
  margin-top: 10px;
  color: var(--gold);
  font-weight: 700;
}

.choice-card:hover,
.design-card:hover,
.pixel-button:hover,
.shot-btn:hover {
  transform: translate(-2px, -2px);
}

.choice-card.is-selected,
.design-card.is-selected {
  background:
    linear-gradient(180deg, rgba(124, 240, 208, 0.22), transparent 28%),
    #30285b;
  outline: 4px solid var(--mint);
}

.choice-card.is-locked,
.design-card.is-locked {
  opacity: 0.5;
  filter: saturate(0.5);
}

.choice-card.is-score-locked,
.design-card.is-score-locked {
  opacity: 1;
  filter: none;
}

.choice-card.is-secret-hidden {
  opacity: 1;
  filter: none;
}

.choice-card.is-secret-hidden .player-art > * {
  opacity: 0;
}

.choice-card.is-score-locked .player-art {
  filter: brightness(0) saturate(0);
}

.design-card.is-secret-hidden .ball {
  background: transparent;
  box-shadow: none;
  border-color: transparent;
}

.choice-card.is-secret-hidden .player-art::before,
.design-card.is-secret-hidden .ball::before {
  content: "???";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: none;
  color: var(--gold);
  font: 900 2rem "Arial Black", Impact, sans-serif;
  letter-spacing: 0.12em;
  opacity: 1;
}

.choice-card.is-secret-hidden .player-art::after {
  display: none;
}

.design-card.is-secret-hidden .ball::after {
  display: none;
}

.choice-card.is-secret-hidden::before,
.design-card.is-secret-hidden::before {
  content: "10 PTS";
  position: absolute;
  left: 50%;
  top: 18px;
  transform: translateX(-50%);
  padding: 6px 10px;
  border: 3px solid var(--line);
  background: rgba(18, 10, 34, 0.92);
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.design-card.is-secret-hidden::before {
  content: "SECRET";
}

.choice-card.is-locked.is-score-locked::after {
  content: "\1F512";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--gold);
  font-size: 2.6rem;
  line-height: 1;
  text-shadow:
    0 0 0 var(--line),
    3px 3px 0 rgba(18, 10, 34, 0.95);
  pointer-events: none;
}

.choice-card.is-locked::after,
.design-card.is-locked::after {
  content: "Locked";
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 10px;
  border: 3px solid var(--line);
  background: rgba(18, 10, 34, 0.92);
  color: #ffd2d2;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.design-card.is-score-locked::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 28px;
  width: 86px;
  height: 86px;
  transform: translateX(-50%);
  border: 4px solid var(--line);
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.16), transparent 24%),
    linear-gradient(180deg, rgba(48, 48, 56, 0.92), rgba(8, 8, 12, 0.98));
  box-shadow: inset 0 -8px 0 rgba(255, 255, 255, 0.05);
  z-index: 1;
  pointer-events: none;
}

.design-card.is-score-locked::after {
  content: "🔒";
  position: absolute;
  left: 50%;
  top: 57px;
  transform: translateX(-50%);
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 3px solid var(--line);
  border-radius: 50%;
  background: rgba(18, 10, 34, 0.94);
  font-size: 1.1rem;
  line-height: 1;
  z-index: 2;
  pointer-events: none;
}

.design-card.is-score-locked .ball {
  filter: brightness(0.35) saturate(0);
}

.choice-card.is-locked:hover,
.design-card.is-locked:hover {
  transform: none;
}

.choice-card.is-secret-hidden:hover {
  transform: none;
}

.design-card.is-secret-hidden:hover {
  transform: none;
}

.choice-card:disabled,
.design-card:disabled {
  cursor: not-allowed;
}

.choice-title {
  font-size: 1.25rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pixel-basketball,
.ball,
.loose-ball,
.player-ball {
  position: relative;
  border: 4px solid var(--line);
  border-radius: 50%;
}

.pixel-basketball,
.ball {
  width: 86px;
  height: 86px;
}

.mini-ball {
  flex: 0 0 auto;
}

.pixel-basketball {
  background:
    linear-gradient(90deg, transparent 46%, var(--line) 46% 54%, transparent 54%),
    linear-gradient(180deg, transparent 46%, var(--line) 46% 54%, transparent 54%),
    radial-gradient(circle at 30% 30%, #ffba6f, #ef6f27 72%);
}

.ball::before,
.ball::after,
.loose-ball::before,
.loose-ball::after,
.player-ball::before,
.player-ball::after {
  content: "";
  position: absolute;
  background: var(--line);
}

.ball::before,
.loose-ball::before,
.player-ball::before {
  top: 0;
  bottom: 0;
  left: calc(50% - 2px);
  width: 4px;
}

.ball::after,
.loose-ball::after,
.player-ball::after {
  left: 0;
  right: 0;
  top: calc(50% - 2px);
  height: 4px;
}

.ball.fire,
.loose-ball.fire,
.player-ball.fire {
  background:
    radial-gradient(circle at 50% -10%, rgba(255, 244, 154, 0.96) 0 18%, transparent 18% 34%),
    radial-gradient(circle at 20% 8%, rgba(255, 187, 88, 0.92) 0 16%, transparent 16% 30%),
    radial-gradient(circle at 80% 12%, rgba(255, 123, 66, 0.88) 0 14%, transparent 14% 28%),
    radial-gradient(circle at 30% 28%, #fff08b, #ff9350 44%, #ff584d 72%);
  box-shadow:
    0 0 0 6px rgba(255, 110, 75, 0.22),
    0 -10px 18px rgba(255, 203, 71, 0.24),
    -10px -6px 14px rgba(255, 122, 66, 0.18),
    10px -6px 14px rgba(255, 94, 87, 0.18);
  filter: drop-shadow(0 -2px 4px rgba(255, 214, 102, 0.45)) drop-shadow(0 0 10px rgba(255, 98, 58, 0.35));
  animation: fire-aura-flicker 0.8s steps(2) infinite;
}

.ball.fire,
.loose-ball.fire,
.player-ball.fire,
.shot-ball.fire,
.swish-ball.fire {
  overflow: visible;
}

.ball.fire::after {
  left: 0;
  right: 0;
  top: calc(50% - 2px);
}

.ball.fire {
  clip-path: circle(50%);
}

.ball.fire::before {
  box-shadow:
    0 -12px 0 -6px #ffd95b,
    -8px -14px 0 -8px rgba(255, 196, 95, 0.9),
    8px -16px 0 -8px rgba(255, 132, 74, 0.88);
}

.ball.water {
  background:
    radial-gradient(circle at 35% 34%, #d8fbff, #5cd1ff 45%, #2574ff 82%);
  box-shadow: 0 0 0 6px rgba(73, 201, 255, 0.18);
}

.ball.water::after {
  height: 18px;
  top: 50px;
  left: 14px;
  right: 14px;
  border-radius: 999px;
  background: rgba(232, 249, 255, 0.9);
  box-shadow: 0 -16px 0 -7px rgba(232, 249, 255, 0.86);
}

.ball.water::before {
  width: 22px;
  height: 22px;
  left: 52px;
  top: 10px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(36deg);
  background: rgba(232, 249, 255, 0.92);
}

.ball.sun {
  background:
    radial-gradient(circle at 36% 36%, #fff9bb, #ffe061 42%, #ffa332 78%);
  box-shadow: 0 0 0 6px rgba(255, 203, 71, 0.2);
}

.ball.sun::before {
  inset: -14px;
  width: auto;
  height: auto;
  border-radius: 50%;
  background:
    conic-gradient(from 0deg, #0000 0 10deg, rgba(255, 235, 153, 0.9) 10deg 20deg, #0000 20deg 45deg, rgba(255, 235, 153, 0.9) 45deg 55deg, #0000 55deg 80deg, rgba(255, 235, 153, 0.9) 80deg 90deg, #0000 90deg 115deg, rgba(255, 235, 153, 0.9) 115deg 125deg, #0000 125deg 150deg, rgba(255, 235, 153, 0.9) 150deg 160deg, #0000 160deg 185deg, rgba(255, 235, 153, 0.9) 185deg 195deg, #0000 195deg 220deg, rgba(255, 235, 153, 0.9) 220deg 230deg, #0000 230deg 255deg, rgba(255, 235, 153, 0.9) 255deg 265deg, #0000 265deg 290deg, rgba(255, 235, 153, 0.9) 290deg 300deg, #0000 300deg 325deg, rgba(255, 235, 153, 0.9) 325deg 335deg, #0000 335deg);
}

.ball.sun::after {
  left: calc(50% - 2px);
  right: auto;
  top: 0;
  bottom: 0;
  width: 4px;
  height: auto;
  background: var(--line);
}

.ball.goat {
  background:
    radial-gradient(circle at 36% 34%, #eedcff, #a976ff 42%, #5a3cb5 80%);
  box-shadow: 0 0 0 6px rgba(123, 93, 255, 0.18);
}

.ball.goat::before {
  width: 32px;
  height: 20px;
  top: 30px;
  left: 26px;
  background: #ffd86c;
  clip-path: polygon(4% 68%, 18% 44%, 27% 12%, 42% 2%, 48% 24%, 57% 0, 70% 10%, 78% 38%, 94% 54%, 86% 82%, 63% 82%, 57% 98%, 46% 98%, 40% 82%, 18% 82%);
}

.ball.goat::after {
  left: 22px;
  right: 22px;
  top: 57px;
  height: 4px;
}

.ball.block {
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(200, 243, 142, 0.26) 0 18%, transparent 18%),
    linear-gradient(0deg, rgba(73, 103, 52, 0.94) 0 28%, transparent 28%),
    linear-gradient(90deg, #7dbd61 0 33%, #6faa55 33% 66%, #88c56c 66% 100%);
  box-shadow: 0 0 0 6px rgba(122, 177, 90, 0.18);
  clip-path: inset(0 round 10px);
}

.ball.block::before {
  top: 16px;
  bottom: 16px;
  left: 18px;
  width: 10px;
  background: rgba(36, 50, 24, 0.82);
  box-shadow:
    20px 0 0 rgba(36, 50, 24, 0.72),
    40px 0 0 rgba(36, 50, 24, 0.72),
    0 20px 0 rgba(36, 50, 24, 0.62),
    20px 20px 0 rgba(36, 50, 24, 0.62),
    40px 20px 0 rgba(36, 50, 24, 0.62);
}

.ball.block::after {
  left: 12px;
  right: 12px;
  top: 12px;
  bottom: 12px;
  height: auto;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(200, 243, 142, 0.34) 0 20%, transparent 20%),
    linear-gradient(315deg, rgba(36, 50, 24, 0.16) 0 24%, transparent 24%);
}

.ball.star {
  background:
    radial-gradient(circle at 34% 30%, #fffbd0, #ffd95a 40%, #ff9b31 84%);
  box-shadow: 0 0 0 6px rgba(255, 212, 84, 0.2);
}

.ball.star::before {
  inset: 18px;
  width: auto;
  height: auto;
  left: auto;
  top: auto;
  bottom: auto;
  background: #fff6b4;
  clip-path: polygon(50% 0%, 61% 34%, 98% 36%, 68% 57%, 78% 92%, 50% 72%, 22% 92%, 32% 57%, 2% 36%, 39% 34%);
}

.ball.star::after {
  left: 18px;
  right: 18px;
  top: 56px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 248, 194, 0.88);
  box-shadow: 0 -34px 0 -2px rgba(255, 248, 194, 0.76);
}

.ball.pig {
  background:
    radial-gradient(circle at 36% 32%, #ffe5ef, #ffb6ca 46%, #e9769f 82%);
  box-shadow: 0 0 0 6px rgba(255, 179, 200, 0.18);
}

.ball.pig::before {
  width: 32px;
  height: 22px;
  left: 27px;
  top: 40px;
  border-radius: 12px;
  background: #ff8db0;
  box-shadow:
    -14px -20px 0 -8px #ffb6ca,
    14px -20px 0 -8px #ffb6ca;
}

.ball.pig::after {
  left: 34px;
  right: 34px;
  top: 48px;
  height: 6px;
  border-radius: 999px;
  background: #6c3145;
  box-shadow: -8px 0 0 #6c3145, 8px 0 0 #6c3145, -12px -22px 0 -1px #6c3145, 12px -22px 0 -1px #6c3145;
}

.ball.cow {
  background:
    radial-gradient(circle at 30% 28%, #fffefa, #f3ebe0 44%, #d4cbbd 82%);
  box-shadow: 0 0 0 6px rgba(255, 245, 231, 0.18);
}

.ball.cow::before {
  inset: 0;
  width: auto;
  height: auto;
  left: auto;
  top: auto;
  bottom: auto;
  background:
    radial-gradient(circle at 24px 28px, #2f211b 0 10px, transparent 11px),
    radial-gradient(circle at 58px 20px, #2f211b 0 8px, transparent 9px),
    radial-gradient(circle at 62px 58px, #2f211b 0 12px, transparent 13px);
}

.ball.cow::after {
  left: 22px;
  right: 22px;
  top: 50px;
  height: 16px;
  border-radius: 999px;
  background: #ffb8c8;
  box-shadow: -16px -28px 0 -8px #2f211b, 16px -28px 0 -8px #2f211b, -8px 4px 0 -3px #7b5060, 8px 4px 0 -3px #7b5060;
}

.ball.chicken {
  background:
    radial-gradient(circle at 34% 26%, #fffef5, #fff8d8 46%, #ffd55f 82%);
  box-shadow: 0 0 0 6px rgba(255, 247, 212, 0.18);
}

.ball.chicken::before {
  width: 24px;
  height: 18px;
  left: 31px;
  top: 14px;
  background: #ff5d4f;
  clip-path: polygon(12% 100%, 0 42%, 18% 30%, 30% 0, 45% 28%, 60% 6%, 74% 32%, 100% 38%, 88% 100%);
}

.ball.chicken::after {
  left: 34px;
  right: 34px;
  top: 42px;
  height: 14px;
  background: #ffad32;
  clip-path: polygon(50% 100%, 0 0, 100% 0);
  box-shadow: -10px -10px 0 -4px #2b2113, 10px -10px 0 -4px #2b2113;
}

.ball.sheep {
  background:
    radial-gradient(circle at 34% 28%, #ffffff, #f2effa 42%, #cbc2d8 82%);
  box-shadow: 0 0 0 6px rgba(245, 243, 251, 0.18);
}

.ball.sheep::before {
  inset: 10px;
  width: auto;
  height: auto;
  left: auto;
  top: auto;
  bottom: auto;
  border-radius: 50%;
  background:
    radial-gradient(circle at 18px 18px, #ffffff 0 12px, transparent 13px),
    radial-gradient(circle at 44px 16px, #ffffff 0 14px, transparent 15px),
    radial-gradient(circle at 26px 42px, #ffffff 0 14px, transparent 15px),
    radial-gradient(circle at 52px 42px, #ffffff 0 12px, transparent 13px);
}

.ball.sheep::after {
  left: 28px;
  right: 28px;
  top: 40px;
  height: 22px;
  border-radius: 12px;
  background: #7a708d;
  box-shadow: -10px -14px 0 -8px #4b435c, 10px -14px 0 -8px #4b435c, -8px 6px 0 -3px #f5f3fb, 8px 6px 0 -3px #f5f3fb;
}

.ball.penguin {
  background:
    radial-gradient(circle at 50% 48%, #ffffff 0 34%, #d7e5f1 36%, #9cb2c7 82%);
  box-shadow: 0 0 0 6px rgba(180, 226, 255, 0.18);
}

.ball.penguin::before {
  inset: 12px;
  width: auto;
  height: auto;
  left: auto;
  top: auto;
  bottom: auto;
  border-radius: 50%;
  background:
    radial-gradient(circle at 16px 18px, #1f2633 0 10px, transparent 11px),
    radial-gradient(circle at 46px 18px, #1f2633 0 10px, transparent 11px),
    radial-gradient(circle at 31px 34px, #ff9c2f 0 5px, transparent 6px),
    radial-gradient(circle at 22px 30px, #1f2633 0 2px, transparent 3px),
    radial-gradient(circle at 40px 30px, #1f2633 0 2px, transparent 3px),
    radial-gradient(circle at 20px 56px, #ff9c2f 0 7px, transparent 8px),
    radial-gradient(circle at 42px 56px, #ff9c2f 0 7px, transparent 8px);
}

.ball.penguin::after {
  left: 10px;
  right: 10px;
  top: 12px;
  bottom: 12px;
  height: auto;
  border-radius: 50%;
  background:
    radial-gradient(circle at 2px 30px, #1f2633 0 8px, transparent 9px),
    radial-gradient(circle at 62px 30px, #1f2633 0 8px, transparent 9px);
}

.ball.cupcake {
  background:
    radial-gradient(circle at 50% 28%, #fff1f8 0 18%, transparent 19%),
    radial-gradient(circle at 50% 40%, #ffbfd9 0 38%, #f184b0 70%, #d76492 100%);
  box-shadow: 0 0 0 6px rgba(255, 192, 217, 0.2);
}

.ball.cupcake::before {
  left: 18px;
  right: 18px;
  top: 48px;
  height: 24px;
  border-radius: 0 0 16px 16px;
  background:
    repeating-linear-gradient(
      90deg,
      #f5c06a 0 6px,
      #f0a94e 6px 12px
    );
}

.ball.cupcake::after {
  inset: 12px;
  width: auto;
  height: auto;
  left: auto;
  top: auto;
  bottom: auto;
  border-radius: 50%;
  background:
    radial-gradient(circle at 18px 16px, #ffffff 0 5px, transparent 6px),
    radial-gradient(circle at 44px 14px, #ffffff 0 5px, transparent 6px),
    radial-gradient(circle at 32px 8px, #ff5d8d 0 4px, transparent 5px),
    radial-gradient(circle at 20px 28px, #7cf0d0 0 4px, transparent 5px),
    radial-gradient(circle at 44px 30px, #ffcb47 0 4px, transparent 5px),
    radial-gradient(circle at 32px 22px, #49c9ff 0 4px, transparent 5px);
}

.player-art {
  position: relative;
  width: 130px;
  height: 170px;
  image-rendering: pixelated;
}

.player-art.hero {
  position: absolute;
  left: 84px;
  bottom: 18px;
  width: 152px;
  height: 196px;
  transform: scale(1.14);
  z-index: 1;
}

.player-art.hero::before {
  content: "";
  position: absolute;
  left: 54px;
  top: 48px;
  width: 20px;
  height: 14px;
  border: 4px solid var(--line);
  border-bottom: 0;
  background: #c37d57;
}

.player-art.hero::after {
  content: "";
  position: absolute;
  left: 30px;
  bottom: 10px;
  width: 96px;
  height: 18px;
  background: rgba(0, 0, 0, 0.18);
  border-radius: 50%;
}

.player-art.hero.shooter .arm-left {
  left: 20px;
  top: 72px;
  width: 20px;
  height: 54px;
  transform: rotate(26deg);
}

.player-art.hero.shooter .arm-right {
  right: 2px;
  top: 28px;
  width: 20px;
  height: 70px;
  transform: rotate(-54deg);
  animation: shooter-flick 2.4s ease-in-out infinite;
}

.player-art.hero.shooter .leg-left {
  left: 42px;
  top: 124px;
  width: 22px;
  height: 56px;
  transform: rotate(12deg);
}

.player-art.hero.shooter .leg-right {
  right: 36px;
  top: 124px;
  width: 22px;
  height: 56px;
  transform: rotate(-8deg);
}

.player-art.hero.shooter .player-ball {
  display: block;
  top: 48px;
  right: -4px;
  width: 30px;
  height: 30px;
  z-index: 4;
  animation: hand-ball-release 2.4s ease-in-out infinite;
}

.player-art.hero .player-head {
  top: 10px;
  left: 42px;
  width: 48px;
  height: 38px;
}

.player-art.hero .player-face {
  top: 24px;
  left: 48px;
  width: 36px;
  height: 22px;
}

.player-art.hero .player-face::before,
.player-art.hero .player-face::after {
  content: "";
  position: absolute;
  top: 6px;
  width: 4px;
  height: 4px;
  background: var(--line);
}

.player-art.hero .player-face::before {
  left: 6px;
}

.player-art.hero .player-face::after {
  right: 6px;
}

.player-art.hero .player-body {
  top: 60px;
  left: 34px;
  width: 64px;
  height: 64px;
}

.player-art.hero .player-body::before {
  content: "";
  position: absolute;
  left: 22px;
  top: 8px;
  width: 12px;
  height: 18px;
  background: rgba(255, 255, 255, 0.18);
}

.player-art.hero .player-arm::after {
  content: "";
  position: absolute;
  left: -4px;
  bottom: -4px;
  width: 20px;
  height: 14px;
  border: 4px solid var(--line);
  background: #c37d57;
}

.player-art.hero .player-leg::after {
  content: "";
  position: absolute;
  left: -2px;
  bottom: -8px;
  width: 24px;
  height: 12px;
  border: 4px solid var(--line);
  background: #f7f1dc;
}

.shot-ball {
  position: absolute;
  left: 184px;
  bottom: 118px;
  width: 30px;
  height: 30px;
  z-index: 4;
  opacity: 1;
  animation: shot-arc 2.4s linear infinite;
}

.swish-ball {
  position: absolute;
  left: 554px;
  bottom: 224px;
  width: 28px;
  height: 28px;
  z-index: 5;
  opacity: 0;
  animation: none;
}

.shot-trail {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.shot-trail span {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 244, 194, 0.7);
  box-shadow: 0 0 0 3px rgba(255, 203, 71, 0.12);
  animation: trail-fade 2.4s linear infinite;
}

.shot-trail span:nth-child(1) {
  left: 238px;
  bottom: 146px;
  animation-delay: 0.08s;
}

.shot-trail span:nth-child(2) {
  left: 322px;
  bottom: 208px;
  animation-delay: 0.22s;
}

.shot-trail span:nth-child(3) {
  left: 426px;
  bottom: 246px;
  animation-delay: 0.36s;
}

.shot-trail span:nth-child(4) {
  left: 520px;
  bottom: 244px;
  animation-delay: 0.5s;
}

.title-block,
.play-button {
  position: relative;
  z-index: 2;
}

.player-head,
.player-face,
.player-body,
.player-arm,
.player-leg,
.player-ball {
  position: absolute;
  display: block;
}

.player-head {
  top: 16px;
  left: 42px;
  width: 46px;
  height: 34px;
  border: 4px solid var(--line);
  background: #6d412f;
}

.player-face {
  top: 28px;
  left: 48px;
  width: 34px;
  height: 20px;
  background: #c37d57;
  border-left: 4px solid var(--line);
  border-right: 4px solid var(--line);
  border-bottom: 4px solid var(--line);
}

.player-body {
  top: 56px;
  left: 38px;
  width: 54px;
  height: 56px;
  border: 4px solid var(--line);
}

.player-arm {
  top: 66px;
  width: 18px;
  height: 48px;
  border: 4px solid var(--line);
}

.player-leg {
  top: 114px;
  width: 20px;
  height: 44px;
  border: 4px solid var(--line);
}

.arm-left {
  left: 18px;
  transform: rotate(24deg);
}

.arm-right {
  right: 16px;
  transform: rotate(-28deg);
}

.leg-left {
  left: 40px;
  transform: rotate(8deg);
}

.leg-right {
  right: 34px;
  transform: rotate(-10deg);
}

.player-ball {
  width: 28px;
  height: 28px;
  top: 48px;
  right: -2px;
  background:
    radial-gradient(circle at 34% 30%, #ffd78d, #ff9e43 44%, #e66826 78%);
}

.player-art.james .player-head {
  background:
    linear-gradient(180deg, #4c2246 0 26%, #222 26% 34%, #6d412f 34%);
}

.player-art.james .player-face::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: -4px;
  height: 8px;
  background: #2d1b18;
}

.player-art.james .player-body,
.player-art.james .player-arm,
.player-art.james .player-leg {
  background: #6b4ad6;
}

.player-art.james .player-body::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 18px;
  height: 10px;
  background: #ffd65a;
}

.player-art.curry .player-head {
  background:
    linear-gradient(180deg, #153a84 0 20%, #33241e 20% 34%, #6d412f 34%);
}

.player-art.curry .player-body,
.player-art.curry .player-arm,
.player-art.curry .player-leg {
  background: #2b83ff;
}

.player-art.curry .player-body::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 18px;
  height: 10px;
  background: #ffdd56;
}

.player-art.curry .arm-left {
  left: 24px;
  top: 72px;
  height: 42px;
}

.player-art.curry .arm-right {
  right: 20px;
  top: 54px;
  height: 54px;
  transform: rotate(-44deg);
}

.player-art.curry .player-ball {
  top: 18px;
  right: 6px;
}

.player-art.kevin .player-head {
  background:
    linear-gradient(180deg, #13254f 0 18%, #201915 18% 34%, #6d412f 34%);
}

.player-art.kevin .player-body,
.player-art.kevin .player-arm,
.player-art.kevin .player-leg {
  background: #314f9c;
}

.player-art.kevin .player-body::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 18px;
  height: 10px;
  background: #ef7d3a;
}

.player-art.kevin .arm-left {
  left: 20px;
  top: 68px;
  height: 46px;
  transform: rotate(18deg);
}

.player-art.kevin .arm-right {
  right: 16px;
  top: 50px;
  height: 56px;
  transform: rotate(-34deg);
}

.player-art.kevin .leg-left {
  left: 38px;
  transform: rotate(4deg);
}

.player-art.kevin .leg-right {
  right: 30px;
  transform: rotate(-6deg);
}

.player-art.kevin .player-ball {
  top: 24px;
  right: 4px;
}

.player-art.anthoney .player-head {
  background:
    linear-gradient(180deg, #f3f0ea 0 18%, #33241e 18% 34%, #6d412f 34%);
}

.player-art.anthoney .player-face::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: -4px;
  height: 6px;
  background: #2d1b18;
}

.player-art.anthoney .player-body,
.player-art.anthoney .player-arm,
.player-art.anthoney .player-leg {
  background: #f0efe8;
}

.player-art.anthoney .player-body::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 18px;
  height: 10px;
  background: #c93d3d;
}

.player-art.anthoney .arm-left {
  left: 16px;
  top: 70px;
  height: 50px;
  transform: rotate(28deg);
}

.player-art.anthoney .arm-right {
  right: 12px;
  top: 58px;
  height: 52px;
  transform: rotate(-24deg);
}

.player-art.anthoney .leg-left {
  left: 38px;
  transform: rotate(10deg);
}

.player-art.anthoney .leg-right {
  right: 32px;
  transform: rotate(-12deg);
}

.player-art.anthoney .player-ball {
  top: 34px;
  right: -1px;
}

.player-art.superman .player-head {
  background:
    linear-gradient(180deg, #1a2748 0 18%, #201915 18% 34%, #6d412f 34%);
}

.player-art.superman .player-face::after {
  content: "";
  position: absolute;
  left: 5px;
  right: 5px;
  bottom: 3px;
  height: 4px;
  background: #1a2748;
}

.player-art.superman .player-body,
.player-art.superman .player-arm,
.player-art.superman .player-leg {
  background: #2f65ff;
}

.player-art.superman .player-body::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 6px;
  width: 12px;
  height: 40px;
  background: #be223c;
  border: 4px solid var(--line);
  z-index: -1;
}

.player-art.superman .player-body::after {
  content: "";
  position: absolute;
  left: 16px;
  top: 16px;
  width: 18px;
  height: 14px;
  background: #ffcb47;
  clip-path: polygon(18% 0, 82% 0, 100% 30%, 82% 100%, 18% 100%, 0 30%);
}

.player-art.sixtyseven .player-head {
  background:
    linear-gradient(180deg, #74f1ff 0 18%, #201915 18% 34%, #6d412f 34%);
}

.player-art.sixtyseven .player-body,
.player-art.sixtyseven .player-arm,
.player-art.sixtyseven .player-leg {
  background: #111826;
}

.player-art.sixtyseven .player-body::after {
  content: "67";
  position: absolute;
  left: 10px;
  top: 14px;
  color: #7cff5d;
  font: 900 0.92rem "Arial Black", Impact, sans-serif;
  letter-spacing: 0.04em;
}

.player-art.sixtyseven .arm-left {
  left: 16px;
  top: 70px;
  height: 44px;
  transform: rotate(16deg);
}

.player-art.sixtyseven .arm-right {
  right: 12px;
  top: 50px;
  height: 56px;
  transform: rotate(-38deg);
}

.player-art.agent .player-head {
  background:
    linear-gradient(180deg, #0f1624 0 18%, #202830 18% 34%, #6d412f 34%);
}

.player-art.agent .player-face::after {
  content: "";
  position: absolute;
  left: 5px;
  right: 5px;
  top: 5px;
  height: 4px;
  background: #080b12;
}

.player-art.agent .player-body,
.player-art.agent .player-arm,
.player-art.agent .player-leg {
  background: #171c2a;
}

.player-art.agent .player-body::before {
  content: "";
  position: absolute;
  left: 17px;
  top: 8px;
  width: 12px;
  height: 34px;
  background: #f7f1dc;
}

.player-art.agent .player-body::after {
  content: "";
  position: absolute;
  left: 20px;
  top: 8px;
  width: 8px;
  height: 32px;
  background: #d6d9df;
  clip-path: polygon(50% 0, 100% 18%, 72% 100%, 28% 100%, 0 18%);
}

.player-art.agent .arm-left {
  left: 18px;
  top: 66px;
  height: 48px;
  transform: rotate(18deg);
}

.player-art.agent .arm-right {
  right: 14px;
  top: 56px;
  height: 50px;
  transform: rotate(-30deg);
}

.player-art.agent .player-ball {
  top: 34px;
  right: -6px;
  width: 26px;
  height: 34px;
  border: 4px solid var(--line);
  background:
    linear-gradient(180deg, #f7f1dc 0 24%, #cfd6df 24% 100%);
}

.player-art.agent .player-ball::before,
.player-art.agent .player-ball::after {
  display: none;
}

.player-art.coder {
  filter:
    drop-shadow(0 0 10px rgba(30, 227, 255, 0.28))
    drop-shadow(0 0 18px rgba(124, 255, 93, 0.16));
}

.player-art.coder::before,
.player-art.coder::after {
  content: "";
  position: absolute;
  border: 4px solid transparent;
  pointer-events: none;
}

.player-art.coder::before {
  left: 2px;
  top: 22px;
  width: 54px;
  height: 86px;
  border-left-color: #2de4ff;
  border-bottom-color: #8a62ff;
  border-radius: 46px;
  transform: rotate(-20deg);
}

.player-art.coder::after {
  right: 0;
  top: 18px;
  width: 56px;
  height: 90px;
  border-right-color: #7cff5d;
  border-top-color: #2de4ff;
  border-radius: 50px;
  transform: rotate(12deg);
}

.player-art.coder .player-head {
  background:
    linear-gradient(180deg, #16364f 0 20%, #101520 20% 34%, #6d412f 34%);
}

.player-art.coder .player-face::after {
  content: "";
  position: absolute;
  right: 6px;
  top: -4px;
  width: 10px;
  height: 10px;
  background: #7cff5d;
  clip-path: polygon(50% 0, 100% 34%, 68% 100%, 0 72%, 16% 18%);
}

.player-art.coder .player-body,
.player-art.coder .player-arm,
.player-art.coder .player-leg {
  background: #121826;
  box-shadow: 0 0 14px rgba(30, 227, 255, 0.18);
}

.player-art.coder .player-body::before {
  content: "</>";
  position: absolute;
  left: 10px;
  top: 14px;
  color: #2de4ff;
  font: 900 0.82rem "Arial Black", Impact, sans-serif;
  letter-spacing: 0.02em;
  text-shadow:
    0 0 6px rgba(45, 228, 255, 0.45),
    0 0 12px rgba(124, 255, 93, 0.2);
}

.player-art.coder .player-body::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 18px;
  height: 10px;
  background: linear-gradient(90deg, #2de4ff, #7cff5d);
}

.player-art.coder .arm-left {
  left: 12px;
  top: 68px;
  height: 44px;
  transform: rotate(14deg);
}

.player-art.coder .arm-right {
  right: 10px;
  top: 54px;
  height: 52px;
  transform: rotate(-34deg);
}

.player-art.coder .player-ball {
  top: 34px;
  right: -16px;
  width: 40px;
  height: 24px;
  border: 4px solid var(--line);
  background: linear-gradient(180deg, #223552, #101520);
  box-shadow:
    0 0 10px rgba(45, 228, 255, 0.35),
    0 0 18px rgba(124, 255, 93, 0.18);
}

.player-art.coder .player-ball::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 4px;
  right: auto;
  bottom: auto;
  width: 24px;
  height: 10px;
  background:
    linear-gradient(90deg, #2de4ff 0 34%, transparent 34% 42%, #7cff5d 42% 76%, transparent 76% 82%, #8a62ff 82% 100%);
}

.player-art.coder .player-ball::after {
  content: "";
  position: absolute;
  left: -6px;
  top: 18px;
  right: auto;
  bottom: auto;
  width: 50px;
  height: 4px;
  background: linear-gradient(90deg, #2de4ff, #7cff5d, #8a62ff);
}

.loose-ball {
  position: absolute;
  left: 42px;
  bottom: 60px;
  width: 44px;
  height: 44px;
  opacity: 0.7;
}

.sound-chip {
  min-width: 132px;
  background: #94fff1;
}

button {
  font: inherit;
}

.game-layout {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.game-stage {
  border: 4px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 24%),
    #241e44;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.38);
}

.game-stage {
  position: relative;
  padding: 12px;
}

.game-player-tag {
  position: absolute;
  top: 24px;
  left: 24px;
  z-index: 3;
  min-width: 180px;
  max-width: min(40vw, 320px);
  padding: 12px 16px;
  border: 4px solid var(--line);
  background: #f6f2ea;
  color: var(--ink);
  font: 900 1rem "Trebuchet MS", "Verdana", sans-serif;
  letter-spacing: 0.05em;
  text-transform: none;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.35);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#game-canvas {
  display: block;
  width: 100%;
  height: auto;
  border: 4px solid var(--line);
  background: linear-gradient(180deg, #68d1ff 0 38%, #d9a05f 38% 100%);
  image-rendering: pixelated;
  aspect-ratio: 1280 / 760;
}

.game-finish-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding-top: 12px;
}

.game-finish-actions.is-hidden,
.game-ui-hidden {
  display: none;
}

body.game-mode .app-shell {
  display: block;
  width: 100vw;
  max-width: none;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  gap: 0;
}

body.game-mode .status-panel {
  display: none;
}

body.game-mode .screen-panel {
  width: 100vw;
  min-height: 100vh;
  border: 0;
  box-shadow: none;
  padding: 0;
  background: transparent;
  overflow: visible;
}

body.game-mode .screen-panel::after {
  display: none;
}

body.game-mode #screen-game {
  display: block;
  min-height: 100vh;
  width: 100vw;
}

body.game-mode .game-layout {
  min-height: 100vh;
  width: 100vw;
}

body.game-mode .game-stage {
  min-height: 100vh;
  width: 100vw;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}

body.game-mode #game-canvas {
  width: 100vw;
  height: 100vh;
  border: 0;
  aspect-ratio: auto;
}

body.game-mode .game-finish-actions {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 3;
  padding-top: 0;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .screen {
    min-height: auto;
  }

  .game-layout {
    display: flex;
  }
}

@media (max-width: 760px) {
  .selection-grid,
  .design-grid,
  .info-grid,
  .settings-toggle-grid,
  .settings-secret-grid,
  .settings-lock-grid {
    grid-template-columns: 1fr;
  }

  .screen-head,
  .top-bar,
  .hud-row,
  .action-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .scores-header-row,
  .score-entry {
    grid-template-columns: 1fr;
  }

  .scores-header-row {
    align-items: flex-start;
  }

  .scores-view-tabs,
  .type-command-tabs {
    align-items: stretch;
  }

  .scores-tab-button,
  .score-save-button {
    width: 100%;
  }

  .type-command-row {
    grid-template-columns: 1fr;
  }

  .type-command-code {
    justify-content: flex-start;
  }

  .score-entry-points {
    text-align: left;
  }

  .court {
    min-height: 560px;
  }

  .player-art.hero {
    left: 18px;
    bottom: 34px;
    transform: scale(0.92);
  }

  .hoop {
    right: 26px;
  }

  .shot-ball {
    left: 120px;
    bottom: 134px;
    transform: scale(0.9);
  }

  .swish-ball {
    left: 362px;
    bottom: 214px;
    transform: scale(0.86);
  }

  .shot-trail span:nth-child(1) {
    left: 156px;
    bottom: 164px;
  }

  .shot-trail span:nth-child(2) {
    left: 214px;
    bottom: 208px;
  }

  .shot-trail span:nth-child(3) {
    left: 284px;
    bottom: 232px;
  }

  .shot-trail span:nth-child(4) {
    left: 336px;
    bottom: 228px;
  }

  .game-finish-actions {
    flex-direction: column;
  }

  body.game-mode .game-finish-actions {
    width: calc(100% - 32px);
    bottom: 18px;
  }

  .game-player-tag {
    top: 16px;
    left: 16px;
    max-width: calc(100vw - 32px);
    font-size: 0.88rem;
  }

  .settings-lock-item,
  .settings-toggle {
    align-items: flex-start;
    flex-direction: column;
  }

  .tutorial-card {
    bottom: 16px;
    width: calc(100vw - 32px);
    max-height: min(300px, 42vh);
  }

  .tutorial-card.is-top-docked {
    top: 16px;
  }

  .tutorial-card.is-center-docked {
    top: 44%;
  }

  .tutorial-text {
    max-height: min(170px, 24vh);
    font-size: 1rem;
  }

  .tutorial-controls-visual {
    top: calc(44% + 128px);
  }

  .tutorial-keycap {
    min-width: 50px;
    min-height: 50px;
    font-size: 1.35rem;
  }
}

@keyframes shot-arc {
  0% {
    transform: translate(0, 0) scale(0.96) rotate(0deg);
    opacity: 1;
  }

  8% {
    transform: translate(4px, -4px) scale(0.98) rotate(14deg);
    opacity: 1;
  }

  18% {
    transform: translate(40px, -32px) scale(1) rotate(52deg);
    opacity: 1;
  }

  32% {
    transform: translate(128px, -100px) scale(1.03) rotate(120deg);
    opacity: 1;
  }

  50% {
    transform: translate(238px, -134px) scale(1.04) rotate(208deg);
    opacity: 1;
  }

  66% {
    transform: translate(316px, -112px) scale(1) rotate(274deg);
    opacity: 1;
  }

  78% {
    transform: translate(360px, -82px) scale(0.94) rotate(324deg);
    opacity: 1;
  }

  86% {
    transform: translate(376px, -52px) scale(0.88) rotate(344deg);
    opacity: 1;
  }

  92% {
    transform: translate(380px, -8px) scale(0.84) rotate(360deg);
    opacity: 1;
  }

  97% {
    transform: translate(380px, 38px) scale(0.8) rotate(384deg);
    opacity: 1;
  }

  100% {
    transform: translate(380px, 220px) scale(0.76) rotate(414deg);
    opacity: 1;
  }
}

@keyframes title-primary-cycle {
  0% {
    opacity: 0;
    transform: translate(-14px, 18px) scale(0.72) rotate(-8deg);
    filter: saturate(0.72);
  }

  7% {
    opacity: 1;
    transform: translate(0, -10px) scale(1.1) rotate(-2deg);
    filter: saturate(1.16);
  }

  12%,
  54.5% {
    opacity: 1;
    transform: translate(0, 0) scale(1) rotate(0deg);
    filter: saturate(1);
  }

  54.6%,
  100% {
    opacity: 0;
    transform: translate(0, 0) scale(1) rotate(0deg);
    filter: saturate(1);
  }
}

@keyframes title-secondary-cycle {
  0%,
  27.2% {
    opacity: 0;
    transform: translate(-10px, 14px) scale(0.76) rotate(-6deg);
    filter: saturate(0.72);
  }

  34% {
    opacity: 1;
    transform: translate(0, -6px) scale(1.08) rotate(-2deg);
    filter: saturate(1.14);
  }

  40%,
  54.5% {
    opacity: 1;
    transform: translate(0, 0) scale(1) rotate(0deg);
    filter: saturate(1);
  }

  54.6%,
  100% {
    opacity: 0;
    transform: translate(0, 0) scale(1) rotate(0deg);
    filter: saturate(1);
  }
}

@keyframes swish-drop {
  0%,
  74% {
    opacity: 0;
  }

  77% {
    opacity: 1;
    transform: translate(0, -2px) scale(0.86);
  }

  84% {
    opacity: 1;
    transform: translate(2px, 18px) scale(0.92);
  }

  92% {
    opacity: 0.96;
    transform: translate(-1px, 38px) scale(0.98);
  }

  100% {
    opacity: 0;
    transform: translate(-1px, 58px) scale(1);
  }
}

@keyframes net-swish {
  0%,
  74%,
  100% {
    transform: scaleY(1) translateY(0);
  }

  80% {
    transform: scaleY(1.16) translateY(2px);
  }

  86% {
    transform: scaleY(0.88) translateY(6px);
  }

  94% {
    transform: scaleY(1.04) translateY(2px);
  }
}

@keyframes shooter-flick {
  0%,
  10%,
  100% {
    transform: rotate(-62deg);
  }

  18% {
    transform: rotate(-78deg);
  }

  28% {
    transform: rotate(-46deg);
  }
}

@keyframes hand-ball-release {
  0%,
  8% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }

  14% {
    transform: translate(8px, -6px) scale(1);
    opacity: 1;
  }

  18% {
    transform: translate(18px, -14px) scale(0.94);
    opacity: 0.15;
  }

  100% {
    transform: translate(10px, -10px) scale(0.92);
    opacity: 0;
  }
}

@keyframes trail-fade {
  0%,
  16% {
    opacity: 0;
    transform: scale(0.3);
  }

  28%,
  52% {
    opacity: 0.9;
    transform: scale(1);
  }

  72%,
  100% {
    opacity: 0;
    transform: scale(0.4);
  }
}

@keyframes tutorial-arrow-bob {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(10px);
  }
}

@keyframes tutorial-target-pulse {
  0%,
  100% {
    box-shadow:
      0 0 0 5px rgba(255, 203, 71, 0.28),
      0 0 18px rgba(255, 203, 71, 0.28),
      4px 4px 0 rgba(0, 0, 0, 0.38);
  }

  50% {
    box-shadow:
      0 0 0 8px rgba(255, 203, 71, 0.42),
      0 0 28px rgba(255, 203, 71, 0.44),
      4px 4px 0 rgba(0, 0, 0, 0.38);
  }
}

@keyframes tutorial-confetti-fall {
  0% {
    opacity: 0;
    transform: translate3d(0, -8vh, 0) rotate(0deg);
  }

  12% {
    opacity: 1;
  }

  100% {
    opacity: 0.96;
    transform: translate3d(10px, 115vh, 0) rotate(540deg);
  }
}

@keyframes fire-aura-flicker {
  0% {
    box-shadow:
      0 0 0 6px rgba(255, 110, 75, 0.2),
      0 -8px 14px rgba(255, 203, 71, 0.2),
      -8px -5px 11px rgba(255, 122, 66, 0.16),
      8px -5px 11px rgba(255, 94, 87, 0.16);
    filter: drop-shadow(0 -1px 3px rgba(255, 214, 102, 0.38)) drop-shadow(0 0 8px rgba(255, 98, 58, 0.28));
  }

  100% {
    box-shadow:
      0 0 0 6px rgba(255, 110, 75, 0.26),
      0 -12px 20px rgba(255, 203, 71, 0.3),
      -12px -8px 16px rgba(255, 122, 66, 0.22),
      12px -8px 16px rgba(255, 94, 87, 0.22);
    filter: drop-shadow(0 -3px 5px rgba(255, 214, 102, 0.5)) drop-shadow(0 0 12px rgba(255, 98, 58, 0.38));
  }
}
