/* ===== MINI GAMES LOOK (js/miniGames.js) =====
   Loaded after css/refresh.css. Only paint: no layout that a game's
   behaviour depends on, so removing the <link> in index.html returns the
   games to the old look without breaking anything.

   1. Position colours for every mini game: keeper brown, defence gold,
      midfield sage green, attack blush pink. Scoped to the games (and the
      Head to Head pop-up) so the Fantasy Draft keeps its own colours.
   2. A darker, glowing look: hub cards with a pitch pattern and a lit
      mark, banners with pitch markings and a slow sheen, glassy tabs,
      glowing "on" pills, and a podium for the top three. */

/* ---- 1. Position colours ---- */
.mg-game, .h2h-overlay, .mg-attempt-modal, .s38-board, .s38r-card {
  --pos-gk: #8a5a35;  --pos-gk-ink: #ffffff;
  --pos-df: #d1a22a;  --pos-df-ink: #3b2a00;
  --pos-mf: #8fae84;  --pos-mf-ink: #1d3317;
  --pos-fw: #ec9fb5;  --pos-fw-ink: #4c1429;
  --pos-gk-soft: rgba(138, 90, 53, 0.15);
  --pos-df-soft: rgba(209, 162, 42, 0.16);
  --pos-mf-soft: rgba(143, 174, 132, 0.18);
  --pos-fw-soft: rgba(236, 159, 181, 0.2);
}
:root[data-theme="dark"] :is(.mg-game, .h2h-overlay, .mg-attempt-modal, .s38-board, .s38r-card) {
  --pos-gk: #a8754a;
  --pos-df: #e6bd4a;
  --pos-mf: #a3c196;
  --pos-fw: #f3b3c5;
  --pos-gk-soft: rgba(168, 117, 74, 0.2);
  --pos-df-soft: rgba(230, 189, 74, 0.17);
  --pos-mf-soft: rgba(163, 193, 150, 0.17);
  --pos-fw-soft: rgba(243, 179, 197, 0.17);
}
.s38-g-gk { --g-ink: var(--pos-gk-ink, #fff); }
.s38-g-df { --g-ink: var(--pos-df-ink, #fff); }
.s38-g-mf { --g-ink: var(--pos-mf-ink, #fff); }
.s38-g-fw { --g-ink: var(--pos-fw-ink, #fff); }
/* The light colours need dark writing on them. */
.s38-tile-meta b, .s38-ovr, .s38-tile-pos { color: var(--g-ink, #fff); }
.mg-game .draft-pos-chip.pos-DF, .mg-game .draft-pos-chip.pos-MF, .mg-game .draft-pos-chip.pos-FW,
.mg-game .draft-slot-tag.slot-DF, .mg-game .draft-slot-tag.slot-MF, .mg-game .draft-slot-tag.slot-FW,
.h2h-overlay .draft-slot-tag.slot-DF, .h2h-overlay .draft-slot-tag.slot-MF, .h2h-overlay .draft-slot-tag.slot-FW { color: #241a10; }

/* ---- 2. Game artwork ---- */
/* Perfect Season: a trophy-gold night, not a pitch green. */
.mg-art-season {
  background:
    radial-gradient(80% 90% at 85% 10%, rgba(255, 224, 140, 0.55), transparent 60%),
    radial-gradient(70% 80% at 0% 100%, rgba(236, 159, 181, 0.35), transparent 65%),
    linear-gradient(140deg, #3a2410 0%, #7a4d1c 45%, #c99a3b 100%);
}
.mg-art-chain {
  background:
    radial-gradient(70% 80% at 90% 0%, rgba(160, 255, 240, 0.45), transparent 60%),
    linear-gradient(140deg, #0f3b5c 0%, #1673c9 55%, #2fd1c5 100%);
}
.mg-art-shootout {
  background:
    radial-gradient(70% 80% at 100% 0%, rgba(255, 170, 200, 0.45), transparent 60%),
    linear-gradient(140deg, #1d1250 0%, #5b2a9e 55%, #2f7d3b 100%);
}
.mg-art-h2h {
  background:
    radial-gradient(70% 80% at 100% 0%, rgba(255, 200, 150, 0.5), transparent 60%),
    linear-gradient(140deg, #3a0d4a 0%, #b5179e 55%, #ff7a45 100%);
}

/* ---- Hub cards ---- */
#miniGamesRoot .game-cards { gap: 16px; }
#miniGamesRoot .setup-door.game-card {
  position: relative; isolation: isolate;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--border));
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--accent) 6%, var(--card)), var(--card));
}
#miniGamesRoot .setup-door.game-card::before {
  /* A gradient ring that lights up on hover. */
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; z-index: 2;
  background: linear-gradient(135deg, var(--accent), var(--accent-2), transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity 0.2s ease; pointer-events: none;
}
#miniGamesRoot .setup-door.game-card:hover::before,
#miniGamesRoot .setup-door.game-card:focus-visible::before { opacity: 1; }
#miniGamesRoot .game-card-art { height: 118px; align-items: center; justify-content: center; }
#miniGamesRoot .game-card-art::before {
  /* Pitch markings: halfway line and centre circle, faint. */
  opacity: 1;
  background:
    radial-gradient(circle at 50% 50%, transparent 0 34px, rgba(255, 255, 255, 0.18) 35px 36.5px, transparent 37.5px),
    linear-gradient(90deg, transparent calc(50% - 0.75px), rgba(255, 255, 255, 0.16) calc(50% - 0.75px) calc(50% + 0.75px), transparent calc(50% + 0.75px));
  background-size: auto;
}
#miniGamesRoot .mg-card-mark {
  position: relative; z-index: 1;
  display: grid; place-items: center; width: 62px; height: 62px; border-radius: 50%;
  font-size: 30px; line-height: 1;
  background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.07), 0 10px 26px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  transition: transform 0.25s ease;
}
#miniGamesRoot .setup-door.game-card:hover .mg-card-mark { transform: scale(1.08) rotate(-4deg); }
#miniGamesRoot .mg-art-hl .mg-card-mark { display: none; }
#miniGamesRoot .game-card-body { padding: 14px 14px 16px; }
#miniGamesRoot .game-card-body::after {
  content: "Play \2192"; margin-top: auto; padding-top: 10px;
  font-size: 0.78rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent);
}

/* ---- Banners ---- */
.mg-hero {
  border-radius: 24px; padding: 60px 22px 24px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 18px 40px -12px rgba(20, 8, 50, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.mg-hero::before {
  /* Pitch markings and a slow light sweep. */
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(circle at 100% 50%, transparent 0 88px, rgba(255, 255, 255, 0.13) 89px 91px, transparent 92px),
    linear-gradient(90deg, transparent calc(100% - 1px), rgba(255, 255, 255, 0.13) calc(100% - 1px)),
    linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.16) 45%, transparent 60%);
  background-size: auto, auto, 250% 100%;
  background-repeat: no-repeat;
  animation: mgSweep 7s ease-in-out infinite;
}
@keyframes mgSweep { 0%, 35% { background-position: 0 0, 0 0, 130% 0; } 75%, 100% { background-position: 0 0, 0 0, -30% 0; } }
.mg-hero-eyebrow {
  display: inline-flex; align-items: center; gap: 6px; width: fit-content;
  padding: 4px 10px; border-radius: 999px; font-size: 0.68rem;
  background: rgba(0, 0, 0, 0.22); border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); opacity: 1;
}
.mg-hero-eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #9dffcb; box-shadow: 0 0 8px #9dffcb; }
.mg-hero-title {
  margin: 10px 0 8px; font-family: var(--font-display, inherit); font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.005em; line-height: 0.95;
  font-size: clamp(2.5rem, 12vw, 3.8rem);
  text-shadow: 0 4px 22px rgba(0, 0, 0, 0.3);
}
.mg-hero-mark { filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.25)); opacity: 0.9; }

/* ---- Play | Leaderboard and the mode pills ---- */
.mg-tabs {
  background: color-mix(in srgb, var(--card) 80%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-color: color-mix(in srgb, var(--accent) 20%, var(--border));
}
.mg-tab { transition: color 0.15s ease, background 0.2s ease, box-shadow 0.2s ease; }
.mg-tab.active { box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 40%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.mg-tab:not(.active):hover { color: var(--text); }
.mg-mode-pills { border-color: color-mix(in srgb, var(--accent) 20%, var(--border)); }
.mg-mode-pill { transition: background 0.2s ease, color 0.15s ease, box-shadow 0.2s ease; }
.mg-mode-pill.on:not(.off) {
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 38%, transparent);
}
.mg-board-tab.active { background: linear-gradient(135deg, var(--accent), var(--accent-2)); }

/* ---- Cards ---- */
.mg-game .mg-card, .mg-game .mg-board {
  position: relative; overflow: hidden; border-radius: 20px;
  border-color: color-mix(in srgb, var(--accent) 14%, var(--border));
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 5%, var(--card)), var(--card) 120px);
}
.mg-game .mg-card::before, .mg-game .mg-board::before {
  /* A thin lit edge along the top. */
  content: ""; position: absolute; left: 18px; right: 18px; top: 0; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent-2), transparent);
  opacity: 0.55; pointer-events: none;
}

/* ---- Leaderboard: a podium for the top three ---- */
.mg-lb-row { transition: transform 0.12s ease, border-color 0.12s ease; }
.mg-lb-row.top1 { background: linear-gradient(90deg, rgba(245, 197, 66, 0.2), transparent 70%); border-color: rgba(245, 197, 66, 0.55); }
.mg-lb-row.top2 { background: linear-gradient(90deg, rgba(201, 209, 220, 0.22), transparent 70%); border-color: rgba(201, 209, 220, 0.6); }
.mg-lb-row.top3 { background: linear-gradient(90deg, rgba(217, 154, 91, 0.2), transparent 70%); border-color: rgba(217, 154, 91, 0.55); }
.mg-lb-row.top1 .mg-lb-rank { background: linear-gradient(135deg, #ffe08a, #e0a91c); box-shadow: 0 0 12px rgba(245, 197, 66, 0.55); }
.mg-lb-row.top2 .mg-lb-rank { background: linear-gradient(135deg, #f1f4f8, #a9b3c1); }
.mg-lb-row.top3 .mg-lb-rank { background: linear-gradient(135deg, #f0bb86, #b8743a); }
.mg-lb-score b { font-family: var(--font-display, inherit); font-size: 1.35rem; font-weight: 800; }

@media (prefers-reduced-motion: reduce) {
  .mg-hero::before { animation: none; }
  #miniGamesRoot .setup-door.game-card:hover .mg-card-mark { transform: none; }
}

/* ---- 3. Illustrated artwork (assets/minigames/, painted for each game) ----
   Cards use the small version, banners the full one. The player sits on
   the right of every picture, so the banner fades to the game's dark
   colour on the left, where its title goes. */
.game-card-art.mg-art-chain { background: #0f3b5c url("../assets/minigames/transfer-chain-card.webp") right center / cover no-repeat; }
.game-card-art.mg-art-hl    { background: #150b3a url("../assets/minigames/higher-lower-card.webp") 70% center / cover no-repeat; }
.game-card-art.mg-art-season { background: #3a2410 url("../assets/minigames/perfect-season-card.webp") 85% 30% / cover no-repeat; }
.game-card-art.mg-art-h2h   { background: #3a0d4a url("../assets/minigames/head-to-head-card.webp") 75% center / cover no-repeat; }
.game-card-art.mg-art-shootout { background: #2a1660 url("../assets/minigames/shootout-card.webp") 75% center / cover no-repeat; }
#miniGamesRoot .game-card-art:is(.mg-art-chain, .mg-art-hl, .mg-art-h2h, .mg-art-season, .mg-art-shootout)::before { content: none; }
#miniGamesRoot .game-card-art:is(.mg-art-chain, .mg-art-hl, .mg-art-h2h, .mg-art-season, .mg-art-shootout) .mg-card-mark { display: none; }

.mg-hero.mg-art-chain {
  background: linear-gradient(90deg, rgba(10, 34, 56, 0.97) 0%, rgba(10, 34, 56, 0.85) 45%, rgba(10, 34, 56, 0.15) 85%),
              #0f3b5c url("../assets/minigames/transfer-chain.webp") right center / cover no-repeat;
}
.mg-hero.mg-art-hl {
  background: linear-gradient(90deg, rgba(14, 8, 40, 0.95) 0%, rgba(14, 8, 40, 0.78) 42%, rgba(14, 8, 40, 0.08) 80%),
              #150b3a url("../assets/minigames/higher-lower.webp") right center / cover no-repeat;
}
.mg-hero.mg-art-h2h {
  background: linear-gradient(90deg, rgba(38, 6, 50, 0.95) 0%, rgba(38, 6, 50, 0.8) 45%, rgba(38, 6, 50, 0.1) 85%),
              #3a0d4a url("../assets/minigames/head-to-head.webp") 80% center / cover no-repeat;
}
.mg-hero.mg-art-season {
  background: linear-gradient(90deg, rgba(40, 24, 8, 0.95) 0%, rgba(40, 24, 8, 0.82) 45%, rgba(40, 24, 8, 0.1) 85%),
              #3a2410 url("../assets/minigames/perfect-season.webp") right 30% / cover no-repeat;
}
.mg-hero.mg-art-shootout {
  background: linear-gradient(90deg, rgba(24, 12, 60, 0.95) 0%, rgba(24, 12, 60, 0.78) 42%, rgba(24, 12, 60, 0.08) 80%),
              #2a1660 url("../assets/minigames/shootout.webp") right center / cover no-repeat;
}
.mg-hero:is(.mg-art-chain, .mg-art-hl, .mg-art-h2h, .mg-art-season, .mg-art-shootout) .mg-hero-mark { display: none; }
.mg-hero:is(.mg-art-chain, .mg-art-hl, .mg-art-h2h, .mg-art-season, .mg-art-shootout) { min-height: 230px; }
.mg-hero:is(.mg-art-chain, .mg-art-hl, .mg-art-h2h, .mg-art-season, .mg-art-shootout) .mg-hero-sub { max-width: 22em; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); }

/* ---- 4. The banner paintings, moving (js/miniGames.js heroVideo) ----
   The video sits over the still (which stays as its poster and as the
   fallback) and under the same dark fade, so the title reads the same. */
.mg-hero > .mg-hero-video {
  position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: right center; pointer-events: none;
  opacity: 0; transition: opacity 0.6s ease;
}
.mg-hero > .mg-hero-video.on { opacity: 1; }
.mg-hero.mg-art-h2h > .mg-hero-video { object-position: 80% center; }
.mg-hero.mg-art-season > .mg-hero-video { object-position: right 30%; }
.mg-hero > .mg-hero-shade { position: absolute; inset: 0; z-index: 0; pointer-events: none; background: var(--mg-shade, none); }
.mg-hero.mg-art-chain  { --mg-shade: linear-gradient(90deg, rgba(10, 34, 56, 0.97) 0%, rgba(10, 34, 56, 0.85) 45%, rgba(10, 34, 56, 0.15) 85%); }
.mg-hero.mg-art-hl     { --mg-shade: linear-gradient(90deg, rgba(14, 8, 40, 0.95) 0%, rgba(14, 8, 40, 0.78) 42%, rgba(14, 8, 40, 0.08) 80%); }
.mg-hero.mg-art-h2h    { --mg-shade: linear-gradient(90deg, rgba(38, 6, 50, 0.95) 0%, rgba(38, 6, 50, 0.8) 45%, rgba(38, 6, 50, 0.1) 85%); }
.mg-hero.mg-art-season { --mg-shade: linear-gradient(90deg, rgba(40, 24, 8, 0.95) 0%, rgba(40, 24, 8, 0.82) 45%, rgba(40, 24, 8, 0.1) 85%); }
.mg-hero.mg-art-shootout { --mg-shade: linear-gradient(90deg, rgba(24, 12, 60, 0.95) 0%, rgba(24, 12, 60, 0.78) 42%, rgba(24, 12, 60, 0.08) 80%); }
@media (prefers-reduced-motion: reduce) { .mg-hero > .mg-hero-video { display: none; } }

/* ---- 5. Rank emblems and achievement badges (assets/ranks/, assets/badges/) ---- */
.hh-tier { gap: 6px; }
.hh-tier .hh-tier-emblem { width: 1.55em; height: 1.55em; margin: -0.35em 0 -0.35em -0.35em; object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35)); flex: none; }
.hh-tier.small .hh-tier-emblem { width: 1.45em; height: 1.45em; }
.hh-rank-emblem { width: 64px; height: 64px; object-fit: contain; flex: none; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35)); }
@media (max-width: 420px) { .hh-rank-emblem { width: 52px; height: 52px; } }

.badge-art { display: block; width: 100%; height: 100%; object-fit: contain; }
.badge-card-icon.has-art { width: 52px; height: 52px; }
.badge-card.locked .badge-card-icon.has-art { filter: grayscale(1); }
.badge-tooltip-icon .badge-art { width: 30px; height: 30px; }
.trophy-item-icon.has-art { width: 64px; height: 64px; margin: 0 auto; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3)); }
.hh-lb-rank-top { display: flex; align-items: center; }
.hh-lb-trophy { width: 34px; height: 34px; object-fit: contain; margin: -6px 0; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3)); }
.trophy-medal-locked .trophy-item-icon.has-art { filter: grayscale(1) opacity(0.55); }


/* ---- 7. My Avatar: the painted stadium behind the avatar (assets/avatar-stage.webp) ---- */
.avatar-stage, .avatar-stage-full {
  background:
    radial-gradient(260px 220px at 50% 38%, rgba(255, 255, 255, 0.18), transparent 70%),
    linear-gradient(180deg, rgba(40, 10, 70, 0.05) 0%, rgba(40, 10, 70, 0) 60%, rgba(20, 30, 10, 0.25) 100%),
    #5b21b6 url("../assets/avatar-stage.webp") center 62% / cover no-repeat;
}

/* ---- 8. Head to Head: the penalty shootout for a level staked match (js/shootout.js) ---- */
.h2h-pens:empty { display: none; }
.h2h-pens { margin: 12px 0; }
.so { display: flex; flex-direction: column; gap: 10px; }
.so-title { margin: 0; font-size: 1.15rem; }
.so-sub, .so-note { margin: 0; font-size: 0.85rem; color: var(--text-dim); }
.so-board { display: flex; flex-direction: column; gap: 6px; }
.so-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 2ch; align-items: center; gap: 10px; }
.so-row.me .so-name { font-weight: 700; color: var(--text); }
.so-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-dim); font-size: 0.9rem; }
.so-score { text-align: right; font-size: 1.1rem; }
.so-dots { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.so-dot {
  width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border);
  display: inline-grid; place-items: center; font-size: 0.7rem; font-weight: 800; color: #fff;
}
.so-dot.sd { border-style: dashed; }
.so-dot.goal { background: #16a34a; border-color: #16a34a; }
.so-dot.miss { background: #dc2626; border-color: #dc2626; }
.so-dot.next { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(167, 139, 219, 0.35); }
.so-stage {
  position: relative; width: 100%; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden;
  background:
    linear-gradient(180deg, rgba(40, 10, 70, 0.05) 0%, rgba(20, 30, 10, 0.3) 100%),
    #3b1f73 url("../assets/avatar-stage.webp") center 35% / cover no-repeat;
}
.so-stage canvas { display: block; width: 100% !important; height: 100% !important; }
.so-loading { margin: 0; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-weight: 700; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); }
.so-flash {
  position: absolute; left: 50%; top: 12px; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 8px; min-width: 210px; max-width: 92%;
  padding: 10px 12px 11px; border-radius: 14px; color: #fff;
  background: rgba(14, 11, 28, 0.86); border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: so-pop 0.28s cubic-bezier(.2, 1.4, .4, 1); transition: opacity 0.35s, transform 0.35s;
}
.so-flash.out { opacity: 0; transform: translateX(-50%) translateY(-6px); }
.so-flash-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.so-flash-head strong { font-size: 1.25rem; font-weight: 900; letter-spacing: 0.06em; line-height: 1; }
.so-flash-head span { font-size: 0.8rem; opacity: 0.85; }
.so-flash.good .so-flash-head strong { color: #4ade80; }
.so-flash.bad .so-flash-head strong { color: #fb7185; }
.so-flash-body { display: flex; align-items: center; gap: 12px; }
.so-flash-picks { display: flex; flex-direction: column; gap: 4px; font-size: 0.8rem; }
.so-flash-row { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.so-flash-row em { font-style: normal; opacity: 0.6; width: 2.6em; text-transform: uppercase; font-size: 0.68rem; letter-spacing: 0.06em; }
.so-flash-row small { padding: 0 5px; border-radius: 6px; background: rgba(255, 255, 255, 0.14); font-size: 0.65rem; opacity: 0.85; }
/* The little goal: posts and bar, a net, six spots. */
.so-mini-goal {
  position: relative; flex: none; display: grid; grid-template-columns: repeat(3, 20px); grid-template-rows: repeat(2, 16px); gap: 2px;
  padding: 3px 3px 0; border: 2px solid #f8fafc; border-bottom: 0; border-radius: 3px 3px 0 0;
  background: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.08) 0 3px, transparent 3px 6px);
}
.so-mini-spot { position: relative; border-radius: 3px; }
/* Where the keeper went: an outlined, shaded spot. */
.so-mini-spot.dive { background: rgba(251, 113, 133, 0.35); box-shadow: inset 0 0 0 1.5px #fb7185; }
.so-flash.goal .so-mini-spot.dive, .so-flash.miss .so-mini-spot.dive { background: rgba(255, 255, 255, 0.16); }
.so-mini-ball {
  position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff 0 45%, #cbd5e1 70%); box-shadow: 0 0 0 1.5px #111827, 0 0 8px rgba(255, 255, 255, 0.8);
}
.so-mini-spot.shot.dive .so-mini-ball { left: 32%; top: 38%; }
.so-mini-goal.over .so-mini-ball { top: -12px; }
.so-mini-goal.wide-l .so-mini-ball { left: -10px; }
.so-mini-goal.wide-r .so-mini-ball { left: calc(100% + 8px); }
@keyframes so-pop { from { transform: translateX(-50%) scale(0.85); opacity: 0; } to { transform: translateX(-50%) scale(1); opacity: 1; } }
.so-prompt { margin: 0; min-height: 1.3em; font-weight: 700; text-align: center; }
.so-prompt.win { color: #16a34a; font-size: 1.15rem; }
.so-prompt.lose { color: var(--text-dim); font-size: 1.05rem; }
.so-clock { height: 6px; border-radius: 999px; background: var(--border); overflow: hidden; }
.so-clock span { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.25s linear; }
.so-clock span.low { background: #dc2626; }
/* The six spots, drawn as a goal: posts and bar in white, two rows of three. */
.so-spots {
  display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 54px); gap: 4px;
  padding: 6px 6px 0; border: 5px solid #f8fafc; border-bottom: 0; border-radius: 6px 6px 0 0;
  background: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.07) 0 6px, transparent 6px 12px), #1f5419;
  opacity: 0.55; transition: opacity 0.2s;
}
.so-spots.live { opacity: 1; }
.so-spot {
  border: 2px dashed rgba(255, 255, 255, 0.45); border-radius: 8px; background: rgba(255, 255, 255, 0.06);
  cursor: pointer; font: inherit; color: #fff; position: relative;
}
.so-spot:not(:disabled):hover { background: rgba(255, 255, 255, 0.18); border-style: solid; }
.so-spot:disabled { cursor: default; }
.so-spot.on { background: rgba(250, 204, 21, 0.35); border: 2px solid #facc15; }
.so-spot.on::after { content: "⚽"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.3rem; }
.so-spot.keep.on::after { content: "🧤"; }

/* ---- 9. Shootout, the game of its own (js/miniGames.js startShootout) ---- */
.so-intro, .so-after { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.so-intro h3 { margin: 0; }
.so-streak { margin: 0; font-weight: 700; }
.so-after { margin-top: 12px; }
.so-after-line { margin: 0; font-size: 1.1rem; font-weight: 800; }

/* ---- 10. League game covers (assets/leagues/, painted with ElevenLabs) ----
   The league's game cards and each game's setup banner. The figure sits on
   the right; the banner fades to the game's dark colour on the left, under
   its title. The small round thumbnails keep their plain colours. */
.game-card-art.game-art-pl      { background: #2a0a2e url("../assets/leagues/league-pl-card.webp") 72% 30% / cover no-repeat; }
.game-card-art.game-art-cl      { background: #06142e url("../assets/leagues/league-cl-card.webp") 72% 20% / cover no-repeat; }
.game-card-art.game-art-draft   { background: #062a1a url("../assets/leagues/league-draft-card.webp") 72% 40% / cover no-repeat; }
.game-card-art.game-art-history { background: #2a1606 url("../assets/leagues/league-history-card.webp") 80% center / cover no-repeat; }
.game-card-art.game-art-leave   { background: #141a24 url("../assets/leagues/league-leave-card.webp") 78% 45% / cover no-repeat; }
.game-card-art.game-art-manage  { background: #16161a url("../assets/leagues/league-manage-card.webp") 75% 30% / cover no-repeat; }
.game-card-art:is(.game-art-pl, .game-art-cl, .game-art-draft, .game-art-history, .game-art-leave, .game-art-manage)::before { content: none; }
.game-card-art:is(.game-art-pl, .game-art-cl, .game-art-draft, .game-art-history, .game-art-leave, .game-art-manage) .game-card-icon { display: none; }
.game-card-art:is(.game-art-pl, .game-art-cl, .game-art-draft, .game-art-history, .game-art-leave, .game-art-manage) { height: 128px; }

.setup-hero.game-art-pl {
  background: linear-gradient(90deg, rgba(36, 8, 40, 0.96) 0%, rgba(36, 8, 40, 0.82) 45%, rgba(36, 8, 40, 0.12) 85%),
              #2a0a2e url("../assets/leagues/league-pl.webp") right 30% / cover no-repeat;
}
.setup-hero.game-art-cl {
  background: linear-gradient(90deg, rgba(6, 18, 44, 0.96) 0%, rgba(6, 18, 44, 0.82) 45%, rgba(6, 18, 44, 0.12) 85%),
              #06142e url("../assets/leagues/league-cl.webp") right 20% / cover no-repeat;
}
.setup-hero.game-art-draft {
  background: linear-gradient(90deg, rgba(4, 34, 22, 0.96) 0%, rgba(4, 34, 22, 0.82) 45%, rgba(4, 34, 22, 0.12) 85%),
              #062a1a url("../assets/leagues/league-draft.webp") right 35% / cover no-repeat;
}
.setup-hero:is(.game-art-pl, .game-art-cl, .game-art-draft) { min-height: 150px; }
.setup-hero:is(.game-art-pl, .game-art-cl, .game-art-draft)::before { content: none; }
.setup-hero:is(.game-art-pl, .game-art-cl, .game-art-draft) .setup-hero-main { text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); }

/* ---- 11. Shootout's lobby: the computer, a random opponent, a friend ---- */
.so-choices { display: grid; gap: 10px; margin: 6px 0 4px; }
@media (min-width: 640px) { .so-choices { grid-template-columns: repeat(3, 1fr); } }
.so-choice {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left;
  padding: 14px 16px; border-radius: 16px; font: inherit; cursor: pointer; color: var(--text);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--border));
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 8%, var(--card)), var(--card));
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.so-choice:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 10px 24px -16px rgba(0, 0, 0, 0.5); }
.so-choice:disabled { opacity: 0.6; cursor: default; }
.so-choice b { font-size: 1rem; }
.so-choice span, .so-choice .so-streak { font-size: 0.82rem; color: var(--text-dim); font-weight: 400; }
.so-choice .so-streak:empty { display: none; }
.so-choice-cpu { border-left: 4px solid #22c55e; }
.so-choice-random { border-left: 4px solid #a78bfa; }
.so-choice-friend { border-left: 4px solid #f59e0b; }
.so-code {
  margin: 4px 0; font-size: 2.2rem; font-weight: 900; letter-spacing: 0.25em; text-align: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
