:root {
  color-scheme: dark;
  --bg: #070b0f;
  --surface: rgba(13, 19, 25, 0.86);
  --surface-2: rgba(20, 30, 38, 0.92);
  --line: rgba(201, 220, 225, 0.16);
  --line-strong: rgba(221, 235, 238, 0.28);
  --text: #eef7f1;
  --muted: #93a7a5;
  --accent: #d9f25f;
  --accent-2: #21c67a;
  --danger: #ff6b62;
  --warn: #f5b74b;
  --card-w: 136px;
  --card-h: 176px;
  --radius: 10px;
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    radial-gradient(circle at 14% 10%, rgba(217, 242, 95, 0.16), transparent 22rem),
    radial-gradient(circle at 88% 0%, rgba(33, 198, 122, 0.16), transparent 24rem),
    #05080c;
  background-size:
    38px 38px,
    38px 38px,
    auto,
    auto,
    auto;
  color: var(--text);
}

button {
  border: 0;
  color: inherit;
  font: inherit;
}

button:not(:disabled) {
  cursor: pointer;
}

.site-footer {
  display: flex;
  max-width: 1460px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 12px auto 0;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.site-footer a {
  color: inherit;
  text-underline-offset: 3px;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--accent);
}

.boot-loader {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: grid;
  place-items: center;
  padding: 18px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 50% 32%, rgba(217, 242, 95, 0.18), transparent 24rem),
    #05080c;
  background-size:
    34px 34px,
    34px 34px,
    auto,
    auto;
  transition:
    opacity 260ms ease,
    visibility 260ms ease;
}

.boot-loader[hidden] {
  display: none;
}

.boot-loader.is-done {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.boot-card {
  width: min(360px, 88vw);
  padding: 18px;
  border: 1px solid rgba(217, 242, 95, 0.34);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(18, 27, 34, 0.92), rgba(8, 13, 18, 0.96)),
    #0a1016;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.52);
}

.boot-kicker {
  color: var(--accent);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.boot-title {
  margin-top: 8px;
  color: var(--text);
  font-size: 24px;
  font-weight: 950;
}

.boot-progress {
  height: 10px;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.boot-progress span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 24px rgba(217, 242, 95, 0.34);
  transition: width 220ms ease;
}

.boot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.boot-row strong {
  color: var(--accent);
  font-size: 15px;
}

.app {
  position: relative;
  min-height: 100vh;
  padding: 16px;
}

.topbar,
.pitch-panel,
.captain-card,
.tool-panel,
.target-panel,
.reward-panel,
.locker-panel {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(16px);
}

.topbar {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  max-width: 1480px;
  margin: 0 auto 14px;
  padding: 12px;
  border-radius: 12px;
}

.brand {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 0;
  text-align: center;
}

.brand h1,
.pitch-head h2,
.panel-head h2 {
  margin: 0;
}

.brand h1 {
  display: inline-block;
  font-size: 34px;
  font-weight: 950;
  letter-spacing: 0.03em;
  line-height: 1;
  color: transparent;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), transparent 48%),
    linear-gradient(92deg, #fff9c8 0%, #d9f25f 34%, #48ef9d 70%, #ffffff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter:
    drop-shadow(0 4px 0 rgba(0, 0, 0, 0.66))
    drop-shadow(0 0 18px rgba(217, 242, 95, 0.36))
    drop-shadow(0 0 26px rgba(33, 198, 122, 0.2));
  transform: skewX(-6deg);
}

.brand p,
.captain-copy small,
.reward-panel p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.scoreboard {
  display: grid;
  grid-template-columns: repeat(3, 86px);
  gap: 8px;
}

.scoreboard div {
  min-height: 56px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.04);
}

.scoreboard span,
.eyebrow,
.bench-head,
.panel-head span,
.target-list small,
.modal-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.pitch-head .eyebrow {
  display: none;
}

.scoreboard strong {
  display: block;
  margin-top: 2px;
  color: var(--accent);
  font-size: 25px;
  line-height: 1;
}

.top-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.primary-button,
.ghost-button,
.music-button,
.tool-button {
  min-height: 42px;
  border-radius: 8px;
  font-weight: 900;
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    background 140ms ease,
    opacity 140ms ease;
}

.primary-button {
  padding: 0 16px;
  background: linear-gradient(135deg, #d9f25f, #20c578);
  color: #08100d;
}

.ghost-button {
  padding: 0 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
}

.music-button {
  display: grid;
  min-width: 82px;
  align-content: center;
  gap: 1px;
  padding: 4px 12px;
  border: 1px solid rgba(217, 242, 95, 0.24);
  background: rgba(217, 242, 95, 0.08);
}

.music-button span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.music-button strong {
  color: var(--accent);
  font-size: 15px;
  line-height: 1;
}

.music-button.off {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.music-button.off strong {
  color: var(--muted);
}

.primary-button:not(:disabled):hover,
.ghost-button:not(:disabled):hover,
.music-button:not(:disabled):hover,
.tool-button:not(:disabled):hover {
  transform: translateY(-1px);
}

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

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 14px;
  max-width: 1480px;
  margin: 0 auto;
}

.pitch-panel {
  min-width: 0;
  padding: 12px;
  border-radius: 12px;
}

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

.pitch-head h2 {
  margin-top: 3px;
  font-size: 22px;
}

.remaining {
  display: grid;
  width: 82px;
  height: 58px;
  place-items: center;
  border: 1px solid rgba(217, 242, 95, 0.28);
  border-radius: 9px;
  background: rgba(217, 242, 95, 0.08);
}

.remaining strong {
  color: var(--accent);
  font-size: 23px;
  line-height: 1;
}

.remaining span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.board {
  position: relative;
  height: min(62vh, 660px);
  min-height: 520px;
  overflow: hidden;
  border: 1px solid rgba(169, 232, 167, 0.16);
  border-radius: 12px;
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(239, 255, 245, 0.18) calc(50% - 1px), rgba(239, 255, 245, 0.18) calc(50% + 1px), transparent calc(50% + 1px)),
    radial-gradient(circle at 50% 50%, transparent 0 74px, rgba(239, 255, 245, 0.18) 75px 77px, transparent 78px),
    repeating-linear-gradient(90deg, rgba(18, 91, 52, 0.82) 0 90px, rgba(13, 74, 43, 0.82) 90px 180px),
    #0b3b24;
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.42);
}

.board::before,
.board::after {
  position: absolute;
  z-index: 0;
  content: "";
  pointer-events: none;
}

.board::before {
  inset: 28px;
  border: 2px solid rgba(239, 255, 245, 0.14);
  border-radius: 6px;
}

.board::after {
  inset: 0;
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.11), transparent 9rem),
    radial-gradient(circle at 86% 82%, rgba(0, 0, 0, 0.24), transparent 14rem);
}

.board.is-shuffling {
  animation: boardShuffle 520ms cubic-bezier(0.18, 0.86, 0.22, 1);
}

.tile {
  position: absolute;
  width: var(--card-w);
  height: var(--card-h);
  border-radius: var(--radius);
  background: transparent;
  transform: rotate(var(--rot));
  will-change: transform, opacity;
  transition:
    opacity 160ms ease,
    transform 120ms cubic-bezier(0.2, 0.72, 0.22, 1);
}

.tile:not(.locked):hover {
  transform: rotate(var(--rot)) translateY(-3px);
}

.tile.is-pressing .card {
  animation: cardPress 110ms cubic-bezier(0.2, 0.82, 0.2, 1) both;
}

.tile.is-leaving {
  pointer-events: none;
}

.tile.is-leaving .card {
  animation: cardLeave 180ms cubic-bezier(0.16, 0.9, 0.2, 1) both;
}

.card,
.bench-card,
.locker-grid button {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: #0c1218;
}

.card {
  width: 100%;
  height: 100%;
  transform: translateZ(0);
  box-shadow:
    0 10px 18px rgba(0, 0, 0, 0.32),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.card::before,
.bench-card::before {
  position: absolute;
  inset: 5px;
  z-index: 2;
  border: 2px solid rgba(12, 20, 23, 0.82);
  border-radius: calc(var(--radius) - 2px);
  box-shadow:
    0 0 0 1px var(--ring, rgba(217, 242, 95, 0.26)),
    inset 0 0 26px rgba(0, 0, 0, 0.45);
  content: "";
  pointer-events: none;
}

.card::after {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: var(--radius);
  content: "";
  pointer-events: none;
}

.card img,
.bench-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-meta {
  position: absolute;
  right: 8px;
  bottom: 8px;
  left: 8px;
  z-index: 4;
  display: grid;
  gap: 1px;
  padding: 6px 7px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(3, 7, 10, 0.1), rgba(3, 7, 10, 0.82));
  text-align: left;
}

.card-meta strong {
  overflow: hidden;
  font-size: 13px;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-meta span {
  color: rgba(238, 247, 241, 0.72);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.1;
}

.role-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 4;
  min-width: 32px;
  padding: 4px 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  color: var(--accent);
  font-size: 10px;
  font-weight: 950;
}

.tile.locked {
  filter: saturate(0.72) brightness(0.66);
}

.tile.locked.depth-1 {
  opacity: 0.78;
}

.tile.locked.depth-2 {
  opacity: 0.64;
}

.tile.locked.depth-3,
.tile.locked.depth-4,
.tile.locked.depth-5 {
  opacity: 0.5;
}

.tile.locked .card::after {
  background: rgba(0, 0, 0, 0.24);
}

.tile.progress-1 .card::before,
.bench-card.progress-1::before {
  border-color: rgba(4, 12, 16, 0.94);
  box-shadow:
    0 0 0 2px var(--ring, rgba(140, 162, 161, 0.48)),
    0 0 18px rgba(0, 0, 0, 0.48),
    inset 0 0 34px rgba(0, 0, 0, 0.62);
}

.tile.progress-2 .card::before,
.bench-card.progress-2::before {
  border-color: rgba(0, 0, 0, 0.95);
  box-shadow:
    0 0 0 3px var(--ring, rgba(217, 242, 95, 0.5)),
    0 0 34px var(--ring, rgba(217, 242, 95, 0.18)),
    0 0 0 6px rgba(0, 0, 0, 0.42),
    inset 0 0 34px rgba(0, 0, 0, 0.68);
}

.tile.hint .card {
  outline: 3px solid rgba(217, 242, 95, 0.82);
  outline-offset: 3px;
}

.bench-panel {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.bench-head,
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.bench {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.bench-slot {
  position: relative;
  aspect-ratio: 0.78;
  border: 1px dashed rgba(221, 235, 238, 0.18);
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.18);
}

.bench-slot.receiving::before {
  position: absolute;
  inset: -5px;
  z-index: 3;
  border: 1px solid rgba(217, 242, 95, 0.72);
  border-radius: 12px;
  box-shadow:
    0 0 14px rgba(217, 242, 95, 0.3);
  content: "";
  pointer-events: none;
  animation: slotReceive 320ms cubic-bezier(0.2, 0.76, 0.2, 1) both;
}

.bench-card {
  width: 100%;
  height: 100%;
}

.bench-slot.matching .bench-card {
  animation: benchScore 680ms cubic-bezier(0.16, 0.86, 0.26, 1) both;
}

.bench-slot.matching::after {
  position: absolute;
  inset: -7px;
  z-index: 4;
  border: 2px solid rgba(217, 242, 95, 0.74);
  border-radius: 12px;
  box-shadow:
    0 0 22px rgba(217, 242, 95, 0.42),
    0 0 34px rgba(33, 198, 122, 0.28);
  content: "";
  pointer-events: none;
  animation: goalPop 680ms ease-out both;
}

.fly-card {
  position: fixed;
  z-index: 999;
  pointer-events: none;
  transform: translate3d(0, 0, 0) scale(1);
  transform-origin: center;
  will-change: transform, opacity;
  animation: flyCardToBench 460ms cubic-bezier(0.18, 0.9, 0.2, 1) forwards;
}

.fly-card .bench-card {
  box-shadow:
    0 10px 18px rgba(0, 0, 0, 0.36),
    0 0 0 1px rgba(217, 242, 95, 0.22);
}

.goal-fly {
  position: fixed;
  z-index: 1002;
  width: 24px;
  height: 24px;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.8);
  animation: goalFly 900ms cubic-bezier(0.16, 0.86, 0.2, 1) var(--delay, 0ms) forwards;
}

.fx-layer {
  position: fixed;
  inset: 0;
  z-index: 997;
  pointer-events: none;
}

.stadium-spark {
  position: fixed;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow:
    0 0 0 3px rgba(217, 242, 95, 0.18),
    0 0 18px rgba(217, 242, 95, 0.72);
  opacity: 0;
  transform: translate(-50%, -50%);
  animation: stadiumSpark 760ms ease-out var(--delay, 0ms) forwards;
}

.goal-ribbon {
  position: fixed;
  padding: 7px 13px;
  border: 1px solid rgba(217, 242, 95, 0.54);
  border-radius: 999px;
  background: rgba(9, 15, 18, 0.88);
  color: var(--accent);
  font-size: 16px;
  font-weight: 950;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.34);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.8);
  animation: goalRibbon 860ms cubic-bezier(0.16, 0.86, 0.2, 1) forwards;
}

.side-panel {
  display: grid;
  gap: 12px;
  align-content: start;
}

.captain-card {
  position: relative;
  min-height: 178px;
  overflow: hidden;
  border-radius: 12px;
}

.captain-card img {
  position: absolute;
  right: -16px;
  bottom: -28px;
  width: 172px;
  height: 172px;
  border-radius: 50%;
  object-fit: cover;
  opacity: 0.95;
}

.captain-copy {
  position: relative;
  z-index: 1;
  width: 62%;
  padding: 16px;
}

.captain-copy span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.captain-copy strong {
  display: block;
  margin: 4px 0 7px;
  font-size: 22px;
  line-height: 1;
}

.mascot-card {
  isolation: isolate;
  background:
    radial-gradient(circle at 78% 24%, rgba(217, 242, 95, 0.22), transparent 8rem),
    radial-gradient(circle at 88% 92%, rgba(33, 198, 122, 0.18), transparent 8rem),
    linear-gradient(145deg, rgba(16, 24, 29, 0.94), rgba(8, 12, 17, 0.9));
}

.mascot-card::after {
  position: absolute;
  right: 12px;
  bottom: 16px;
  z-index: 0;
  width: 126px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.38);
  filter: blur(9px);
  content: "";
}

.mascot-copy {
  width: 60%;
}

.mascot-stage {
  position: absolute;
  right: -10px;
  bottom: -10px;
  z-index: 2;
  width: 190px;
  height: 198px;
  pointer-events: none;
}

.mascot-stage img,
.captain-card .mascot-stage img {
  position: absolute;
  right: 10px;
  bottom: 0;
  width: 154px;
  height: 196px;
  border-radius: 0;
  object-fit: contain;
  opacity: 1;
  filter:
    drop-shadow(0 18px 26px rgba(0, 0, 0, 0.5))
    drop-shadow(0 0 12px rgba(217, 242, 95, 0.18));
  transform-origin: 50% 78%;
  animation: mascotIdle 8600ms ease-in-out infinite;
}

.mascot-halo,
.mascot-burst {
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.mascot-halo {
  right: 24px;
  bottom: 20px;
  width: 146px;
  height: 146px;
  border: 1px solid rgba(217, 242, 95, 0.14);
  background:
    radial-gradient(circle, rgba(217, 242, 95, 0.06), transparent 66%),
    rgba(33, 198, 122, 0.025);
  animation: mascotHalo 12000ms ease-in-out infinite;
}

.mascot-ball,
.goal-fly {
  border: 1px solid rgba(12, 18, 22, 0.6);
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 45%, #111820 0 16%, transparent 17%),
    radial-gradient(circle at 28% 28%, #111820 0 8%, transparent 9%),
    radial-gradient(circle at 72% 30%, #111820 0 8%, transparent 9%),
    radial-gradient(circle at 32% 72%, #111820 0 8%, transparent 9%),
    radial-gradient(circle at 70% 72%, #111820 0 8%, transparent 9%),
    #f7fbf4;
  box-shadow:
    0 10px 18px rgba(0, 0, 0, 0.34),
    inset 0 -5px 8px rgba(0, 0, 0, 0.16);
}

.mascot-ball {
  display: none;
  position: absolute;
  right: 142px;
  bottom: 18px;
  width: 28px;
  height: 28px;
  animation: mascotBall 9800ms ease-in-out infinite;
}

.mascot-burst {
  right: 82px;
  bottom: 86px;
  width: 62px;
  height: 62px;
  opacity: 0;
  background:
    radial-gradient(circle, rgba(217, 242, 95, 0.5), transparent 54%),
    radial-gradient(circle at 70% 28%, rgba(255, 255, 255, 0.5), transparent 12%);
  transform: scale(0.4);
}

.mascot-stage.is-kick img,
.mascot-stage img.is-kick {
  animation: mascotKick 1500ms cubic-bezier(0.16, 0.9, 0.2, 1) both;
}

.mascot-stage.is-happy img,
.mascot-stage img.is-happy {
  animation: mascotHappy 1900ms cubic-bezier(0.15, 0.9, 0.2, 1) both;
}

.mascot-stage.is-sad img,
.mascot-stage img.is-sad {
  animation: mascotSad 1350ms ease both;
}

.mascot-stage.is-kick .mascot-burst,
.mascot-stage.is-happy .mascot-burst {
  animation: burstPulse 1350ms ease-out both;
}

.mascot-stage.is-kick .mascot-ball {
  animation: mascotKickBall 1350ms cubic-bezier(0.18, 0.86, 0.22, 1) both;
}

.floating-mascot {
  position: fixed;
  top: calc(92px + env(safe-area-inset-top));
  right: max(0px, calc((100vw - 1480px) / 2 + 4px));
  z-index: 80;
  width: 252px;
  height: 260px;
  min-height: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
  backdrop-filter: none;
}

.floating-mascot::after {
  right: 34px;
  bottom: 4px;
  width: 152px;
  height: 32px;
  background: rgba(0, 0, 0, 0.42);
}

.floating-mascot .mascot-copy {
  display: none;
}

.floating-mascot .mascot-stage {
  right: 0;
  bottom: 0;
  width: 252px;
  height: 260px;
}

.floating-mascot .mascot-stage img,
.floating-mascot.captain-card .mascot-stage img {
  right: 16px;
  bottom: 0;
  width: 198px;
  height: 254px;
}

.floating-mascot .mascot-halo {
  right: 22px;
  bottom: 34px;
  width: 180px;
  height: 180px;
}

.floating-mascot .mascot-ball {
  right: 170px;
  bottom: 26px;
}

.floating-mascot .mascot-burst {
  right: 82px;
  bottom: 102px;
}

.tool-panel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 11px;
  border-radius: 12px;
}

.pitch-panel > .tool-panel {
  margin-top: 10px;
  border: 1px solid rgba(217, 242, 95, 0.12);
  background:
    linear-gradient(90deg, rgba(217, 242, 95, 0.05), rgba(33, 198, 122, 0.045)),
    rgba(255, 255, 255, 0.035);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 14px 28px rgba(0, 0, 0, 0.18);
  backdrop-filter: none;
}

.tool-button {
  position: relative;
  display: flex;
  min-width: 0;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 56px;
  padding: 10px 9px;
  isolation: isolate;
  border: 1px solid var(--tool-line, rgba(217, 242, 95, 0.28));
  border-radius: 10px;
  background:
    linear-gradient(135deg, var(--tool-glow, rgba(217, 242, 95, 0.16)), rgba(255, 255, 255, 0.035)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(4, 9, 12, 0.32));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -12px 24px rgba(0, 0, 0, 0.14),
    0 12px 24px rgba(0, 0, 0, 0.24),
    0 0 18px var(--tool-shadow, rgba(217, 242, 95, 0.08));
}

.tool-button::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.48;
  background:
    linear-gradient(120deg, transparent 0 44%, rgba(255, 255, 255, 0.1) 44% 48%, transparent 48%),
    repeating-linear-gradient(112deg, transparent 0 13px, rgba(255, 255, 255, 0.08) 13px 14px),
    radial-gradient(circle at 12% 18%, var(--tool-glow, rgba(217, 242, 95, 0.22)), transparent 42%);
  content: "";
}

.tool-button::after {
  position: absolute;
  right: 8px;
  bottom: 7px;
  left: 8px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--tool-accent, rgba(217, 242, 95, 0.75)), transparent);
  content: "";
}

.tool-button span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: rgba(238, 247, 241, 0.9);
  font-size: 15px;
  font-weight: 950;
  line-height: 1;
}

.tool-button span::before {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(5, 8, 12, 0.5);
  color: var(--tool-accent, var(--accent));
  font-size: 14px;
  font-weight: 950;
  line-height: 1;
  box-shadow: inset 0 0 14px rgba(255, 255, 255, 0.06);
}

#hintBtn span::before {
  content: "\0021";
}

#shuffleBtn span::before {
  content: "\21bb";
}

#undoBtn span::before {
  content: "\21a9";
}

.tool-button strong {
  min-width: 24px;
  color: #f8ffc6;
  font-size: 26px;
  font-weight: 950;
  line-height: 1;
  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.5),
    0 0 16px var(--tool-shadow, rgba(217, 242, 95, 0.42));
}

#hintBtn {
  --tool-accent: #d9f25f;
  --tool-glow: rgba(217, 242, 95, 0.2);
  --tool-line: rgba(217, 242, 95, 0.34);
  --tool-shadow: rgba(217, 242, 95, 0.18);
}

#shuffleBtn {
  --tool-accent: #54efad;
  --tool-glow: rgba(33, 198, 122, 0.22);
  --tool-line: rgba(84, 239, 173, 0.34);
  --tool-shadow: rgba(33, 198, 122, 0.18);
}

#undoBtn {
  --tool-accent: #f5b74b;
  --tool-glow: rgba(245, 183, 75, 0.2);
  --tool-line: rgba(245, 183, 75, 0.32);
  --tool-shadow: rgba(245, 183, 75, 0.16);
}

.target-panel,
.reward-panel,
.locker-panel {
  padding: 12px;
  border-radius: 12px;
}

.target-list {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 10px 0 0;
  list-style: none;
}

.target-list li,
.reward-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 13px;
  font-weight: 850;
}

.target-list li.done {
  border-color: rgba(33, 198, 122, 0.42);
  background: rgba(33, 198, 122, 0.1);
}

.reward-balance {
  display: grid;
  gap: 5px;
  min-height: 78px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid rgba(217, 242, 95, 0.24);
  border-radius: 10px;
  background:
    radial-gradient(circle at 12% 15%, rgba(217, 242, 95, 0.18), transparent 8rem),
    rgba(255, 255, 255, 0.035);
}

.reward-balance span,
.reward-stats span,
.reward-status,
.reward-setup p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.reward-balance strong {
  color: #ff6d66;
  font-size: 34px;
  line-height: 1;
}

.reward-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.reward-stats span {
  min-height: 46px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
}

.reward-stats strong {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: 17px;
}

.reward-actions {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 8px;
  margin-top: 10px;
}

.reward-actions button {
  min-height: 42px;
}

.reward-milestones {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.reward-row {
  gap: 10px;
  border-color: rgba(217, 242, 95, 0.16);
}

.reward-row > div {
  min-width: 0;
}

.reward-row strong:first-child {
  display: block;
  font-size: 14px;
}

.reward-row small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.reward-row .reward-amount {
  flex: 0 0 auto;
  color: #ff6d66;
  font-size: 24px;
  line-height: 1;
}

.reward-row button {
  flex: 0 0 auto;
  min-width: 68px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 9px;
  background: linear-gradient(135deg, #f5b74b, #ff6b62);
  color: #fff;
  font-weight: 950;
}

.reward-row button:disabled {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(238, 247, 241, 0.55);
}

.reward-row.is-ready {
  border-color: rgba(255, 107, 98, 0.42);
  background: rgba(255, 107, 98, 0.08);
}

.reward-row.is-claimed {
  border-color: rgba(217, 242, 95, 0.28);
  background: rgba(217, 242, 95, 0.07);
}

.reward-status {
  margin-top: 10px;
  color: #d4b26a;
}

.reward-status[data-type="ok"] {
  color: var(--accent-2);
}

.reward-status[data-type="warn"] {
  color: var(--warn);
}

.reward-status[data-type="loading"] {
  color: var(--accent);
}

.reward-setup {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
  border: 1px dashed rgba(217, 242, 95, 0.28);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
}

.reward-setup[hidden] {
  display: none;
}

.qr-placeholder {
  display: grid;
  min-height: 54px;
  place-items: center;
  border-radius: 8px;
  background: rgba(217, 242, 95, 0.08);
  color: var(--accent);
  font-weight: 950;
}

.reward-setup a {
  color: var(--accent);
  font-weight: 900;
  text-decoration: none;
}

.locker-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
  margin-top: 10px;
  max-height: 230px;
  overflow: auto;
}

.locker-grid button {
  aspect-ratio: 0.78;
  padding: 0;
}

.locker-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.96;
}

.locker-grid button.locked {
  filter: grayscale(1) brightness(0.44);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.68);
}

.modal[hidden] {
  display: none;
}

.cinematic {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 18px;
  background:
    radial-gradient(circle at 50% 38%, rgba(217, 242, 95, 0.18), transparent 28rem),
    rgba(0, 0, 0, 0.78);
  animation: cinematicFade 180ms ease both;
}

.cinematic[hidden] {
  display: none;
}

.cinematic-card {
  position: relative;
  width: min(440px, 92vw);
  overflow: hidden;
  border: 1px solid rgba(217, 242, 95, 0.38);
  border-radius: 14px;
  background: #05080c;
  box-shadow: 0 30px 110px rgba(0, 0, 0, 0.72);
}

.cinematic-video {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #05080c;
}

.cinematic-caption {
  position: absolute;
  right: 12px;
  bottom: 12px;
  left: 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  align-items: end;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(5, 8, 12, 0.16), rgba(5, 8, 12, 0.82));
  backdrop-filter: blur(10px);
}

.cinematic-caption span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 950;
}

.cinematic-caption strong {
  color: var(--text);
  font-size: 22px;
  line-height: 1;
}

.cinematic-skip {
  grid-row: 1 / span 2;
  grid-column: 2;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 12px;
  font-weight: 950;
}

.modal-card {
  width: min(420px, 100%);
  padding: 20px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #0c1319;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
}

.modal-card h2 {
  margin: 8px 0;
  font-size: 28px;
}

.modal-card p {
  margin: 0 0 16px;
  color: var(--muted);
}

.modal-card .primary-button {
  width: 100%;
}

@keyframes cinematicFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes mascotIdle {
  0%,
  100% {
    transform: translateY(0) rotate(-0.35deg) scale(1);
  }
  50% {
    transform: translateY(-2px) rotate(0.35deg) scale(1.004);
  }
}

@keyframes mascotHalo {
  0%,
  100% {
    opacity: 0.2;
    transform: scale(0.99);
  }
  50% {
    opacity: 0.34;
    transform: scale(1.012);
  }
}

@keyframes mascotBall {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  50% {
    transform: translate(3px, -5px) rotate(32deg);
  }
}

@keyframes mascotKick {
  0% {
    transform: translateY(0) rotate(-0.35deg) scale(1);
  }
  26% {
    transform: translate(4px, -6px) rotate(3deg) scale(1.035);
  }
  54% {
    transform: translate(-3px, 0) rotate(-2deg) scale(0.992);
  }
  78% {
    transform: translate(1px, -3px) rotate(1.3deg) scale(1.016);
  }
  100% {
    transform: translateY(0) rotate(-0.35deg) scale(1);
  }
}

@keyframes mascotKickBall {
  0% {
    transform: translate(0, 0) scale(1) rotate(0deg);
    opacity: 1;
  }
  56% {
    transform: translate(-22px, -34px) scale(1.04) rotate(150deg);
    opacity: 0.6;
  }
  100% {
    transform: translate(-34px, -50px) scale(0.42) rotate(260deg);
    opacity: 0;
  }
}

@keyframes mascotHappy {
  0% {
    transform: translateY(0) rotate(0deg) scale(1);
  }
  25% {
    transform: translateY(-9px) rotate(-2.4deg) scale(1.035);
  }
  50% {
    transform: translateY(1px) rotate(1.8deg) scale(0.995);
  }
  75% {
    transform: translateY(-5px) rotate(-1.2deg) scale(1.018);
  }
  100% {
    transform: translateY(0) rotate(0deg) scale(1);
  }
}

@keyframes mascotSad {
  0%,
  100% {
    filter:
      drop-shadow(0 18px 26px rgba(0, 0, 0, 0.5))
      drop-shadow(0 0 12px rgba(217, 242, 95, 0.18));
    transform: translateX(0) rotate(0deg) scale(1);
  }
  18% {
    transform: translateX(-3px) rotate(-1.6deg) scale(0.992);
  }
  36% {
    transform: translateX(3px) rotate(1.6deg) scale(0.992);
  }
  54% {
    transform: translateX(-2px) rotate(-1.2deg) scale(0.992);
  }
  72% {
    filter:
      grayscale(0.35)
      drop-shadow(0 14px 22px rgba(0, 0, 0, 0.52));
    transform: translateX(2px) rotate(1deg) scale(0.986);
  }
}

@keyframes burstPulse {
  0% {
    opacity: 0;
    transform: scale(0.36);
  }
  36% {
    opacity: 0.48;
    transform: scale(1.08);
  }
  100% {
    opacity: 0;
    transform: scale(1.28);
  }
}

@keyframes cardPress {
  0% {
    transform: translateY(0) scale(1);
  }
  100% {
    transform: translateY(1px) scale(0.985);
  }
}

@keyframes cardLeave {
  0% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
  100% {
    opacity: 0.2;
    transform: translate3d(0, 2px, 0) scale(0.97);
  }
}

@keyframes flyCardToBench {
  0% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1) rotate(0deg);
  }
  32% {
    opacity: 1;
    transform: translate3d(var(--mx), calc(var(--my) - 14px), 0) scale(0.92) rotate(-2deg);
  }
  78% {
    opacity: 0.96;
    transform: translate3d(calc(var(--dx) + 2px), calc(var(--dy) - 4px), 0) scale(0.6) rotate(1.5deg);
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--dx), var(--dy), 0) scale(0.5) rotate(0deg);
  }
}

@keyframes slotReceive {
  0% {
    opacity: 0;
    transform: scale(0.82);
  }
  42% {
    opacity: 1;
    transform: scale(1.08);
  }
  100% {
    opacity: 0;
    transform: scale(1.24);
  }
}

@keyframes benchScore {
  0% {
    transform: scale(1);
    filter: brightness(1);
  }
  42% {
    transform: translateY(-10px) scale(1.1);
    filter: brightness(1.35) saturate(1.2);
  }
  100% {
    transform: translateY(8px) scale(0.82);
    filter: brightness(0.86);
    opacity: 0;
  }
}

@keyframes goalPop {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  42% {
    opacity: 1;
    transform: scale(1.08);
  }
  100% {
    opacity: 0;
    transform: scale(1.28);
  }
}

@keyframes goalFly {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.62) rotate(0deg);
  }
  16% {
    opacity: 1;
  }
  58% {
    opacity: 1;
    transform: translate(-50%, -50%) translate(var(--dx), calc(var(--dy) - 42px)) scale(1.12) rotate(320deg);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) translate(var(--dx), var(--dy)) scale(0.28) rotate(640deg);
  }
}

@keyframes boardShuffle {
  0%,
  100% {
    filter: brightness(1);
    transform: translateX(0);
  }
  24% {
    filter: brightness(1.2) saturate(1.12);
    transform: translateX(-5px);
  }
  52% {
    transform: translateX(6px);
  }
  78% {
    transform: translateX(-3px);
  }
}

@keyframes stadiumSpark {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
  }
  18% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--sx)), calc(-50% + var(--sy))) scale(0.12);
  }
}

@keyframes goalRibbon {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) translateY(12px) scale(0.78);
  }
  22% {
    opacity: 1;
    transform: translate(-50%, -50%) translateY(-4px) scale(1.06);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) translateY(-44px) scale(0.94);
  }
}

@media (max-width: 1120px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .side-panel {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .app {
    padding: 6px;
  }

  .site-footer {
    flex-wrap: wrap;
    gap: 2px 8px;
    margin-top: 8px;
    padding-inline: 8px;
    text-align: center;
  }

  .boot-card {
    width: min(330px, 90vw);
    padding: 16px;
  }

  .boot-title {
    font-size: 21px;
  }

  .topbar {
    grid-template-columns: 1fr;
    gap: 4px;
    margin-bottom: 6px;
    padding: 7px 104px 7px 7px;
  }

  .scoreboard {
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
  }

  .brand {
    justify-content: center;
    gap: 0;
  }

  .brand h1 {
    font-size: 25px;
    line-height: 1.02;
  }

  .brand p {
    display: none;
  }

  .scoreboard div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 27px;
    min-height: 0;
    padding: 3px 6px;
    border-radius: 7px;
  }

  .scoreboard span,
  .eyebrow,
  .bench-head,
  .panel-head span,
  .target-list small,
  .modal-card span {
    font-size: 10px;
  }

  .scoreboard strong {
    margin-top: 0;
    font-size: 16px;
  }

  .top-actions {
    justify-content: stretch;
    gap: 4px;
  }

  .top-actions button {
    flex: 1;
    min-height: 30px;
    padding-inline: 6px;
    border-radius: 7px;
    font-size: 12px;
  }

  .top-actions .primary-button,
  .top-actions .ghost-button,
  .top-actions .music-button {
    min-height: 30px;
  }

  .top-actions .music-button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    gap: 4px;
    padding-block: 0;
  }

  .music-button span {
    font-size: 9px;
  }

  .music-button strong {
    font-size: 13px;
  }

  .pitch-head h2 {
    font-size: 16px;
  }

  .pitch-panel {
    padding: 8px;
  }

  .pitch-head {
    margin-bottom: 6px;
  }

  .remaining {
    width: 62px;
    height: 44px;
  }

  .remaining strong {
    font-size: 19px;
  }

  .board {
    height: clamp(330px, 43vh, 370px);
    min-height: 330px;
  }

  .bench-panel {
    margin-top: 6px;
    padding: 6px;
  }

  .bench {
    gap: 4px;
    margin-top: 5px;
  }

  .bench-slot {
    border-radius: 8px;
  }

  .side-panel {
    display: contents;
    grid-template-columns: 1fr;
  }

  .layout {
    display: flex;
    flex-direction: column;
  }

  .pitch-panel {
    order: 0;
  }

  .target-panel {
    order: 1;
  }

  .reward-panel {
    order: 2;
  }

  .locker-panel {
    order: 3;
  }

  .captain-card {
    min-height: 142px;
  }

  .captain-card img {
    width: 132px;
    height: 132px;
  }

  .mascot-card {
    min-height: 166px;
  }

  .mascot-copy {
    width: 58%;
    padding: 14px;
  }

  .mascot-stage {
    right: -8px;
    bottom: -8px;
    width: 164px;
    height: 170px;
  }

  .captain-card .mascot-stage img {
    right: 8px;
    width: 136px;
    height: 170px;
  }

  .mascot-halo {
    right: 16px;
    bottom: 14px;
    width: 116px;
    height: 116px;
  }

  .mascot-ball {
    right: 116px;
    bottom: 14px;
    width: 22px;
    height: 22px;
  }

  .floating-mascot {
    top: calc(44px + env(safe-area-inset-top));
    right: -10px;
    width: 160px;
    height: 188px;
    min-height: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  .floating-mascot::after {
    right: 18px;
    bottom: 4px;
    width: 100px;
    height: 18px;
    filter: blur(8px);
  }

  .floating-mascot .mascot-stage {
    right: 0;
    bottom: 0;
    width: 160px;
    height: 188px;
  }

  .floating-mascot .mascot-stage img,
  .floating-mascot.captain-card .mascot-stage img {
    right: 12px;
    bottom: 0;
    width: 132px;
    height: 184px;
  }

  .floating-mascot .mascot-halo {
    right: 10px;
    bottom: 23px;
    width: 122px;
    height: 122px;
  }

  .floating-mascot .mascot-ball {
    right: 106px;
    bottom: 20px;
    width: 20px;
    height: 20px;
  }

  .floating-mascot .mascot-burst {
    right: 48px;
    bottom: 74px;
    width: 40px;
    height: 40px;
  }

  .pitch-panel > .tool-panel {
    margin-top: 6px;
    padding: 7px;
    gap: 7px;
  }

  .tool-button {
    min-height: 50px;
    gap: 5px;
    padding: 8px 5px 9px;
    border-radius: 9px;
  }

  .tool-button span {
    gap: 4px;
    font-size: 14px;
  }

  .tool-button span::before {
    width: 20px;
    height: 20px;
    font-size: 12px;
  }

  .tool-button strong {
    min-width: 21px;
    font-size: 24px;
  }

  .locker-grid {
    grid-template-columns: repeat(6, 1fr);
    max-height: 176px;
  }

  .reward-row {
    align-items: stretch;
    gap: 8px;
  }

  .reward-row .reward-amount {
    align-self: center;
    font-size: 21px;
  }

  .reward-row button {
    min-width: 62px;
  }
}
