:root {
  --bg: #07130d;
  --panel: #0f2118;
  --panel-2: #132b1f;
  --field: #1f7a45;
  --field-2: #17663a;
  --line: rgba(255, 255, 255, 0.66);
  --text: #f7fbf1;
  --muted: #b8cabd;
  --muted-2: #6f8876;
  --accent: #f34b3f;
  --gold: #f7c948;
  --blue: #55a7ff;
  --win: #50df83;
  --loss: #ff7066;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
  --radius: 8px;
  color-scheme: dark;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(12, 38, 25, 0.88), rgba(5, 16, 10, 1)),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(5, 16, 10, 0.1), rgba(5, 16, 10, 0.92)),
    linear-gradient(90deg, rgba(5, 16, 10, 0.9), rgba(5, 16, 10, 0.42)),
    url("./assets/hero-draft-global.png") center / cover no-repeat;
  opacity: 0.54;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 20% 12%, rgba(247, 201, 72, 0.1), transparent 28%),
    radial-gradient(circle at 80% 18%, rgba(85, 167, 255, 0.12), transparent 30%),
    rgba(2, 10, 6, 0.36);
  pointer-events: none;
}

button,
select {
  font: inherit;
}

button {
  color: inherit;
}

.app-shell {
  min-height: 100vh;
}

.screen {
  position: relative;
  z-index: 1;
  width: min(1420px, 100%);
  margin: 0 auto;
  padding: 22px;
}

.home-screen {
  min-height: 100vh;
  padding: 18px 18px 82px;
}

.home-hero {
  position: relative;
  min-height: calc(100vh - 106px);
  border-radius: 10px;
  overflow: hidden;
  background: #06120c;
  box-shadow: var(--shadow);
}

.home-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 14, 9, 0.96) 0%, rgba(5, 14, 9, 0.82) 35%, rgba(5, 14, 9, 0.22) 72%),
    linear-gradient(0deg, rgba(5, 14, 9, 0.84), rgba(5, 14, 9, 0.08) 42%);
}

.home-copy {
  position: relative;
  z-index: 1;
  width: min(620px, 100%);
  padding: clamp(28px, 7vw, 86px);
}

.home-title {
  margin: 12px 0 14px;
  max-width: 10ch;
  font-size: clamp(48px, 8vw, 104px);
  line-height: 0.88;
  font-weight: 950;
  text-transform: uppercase;
}

.home-copy p {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 22px);
  line-height: 1.35;
  font-weight: 720;
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.home-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.home-points span {
  min-height: 30px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.home-bar {
  position: fixed;
  left: 18px;
  right: 18px;
  bottom: 14px;
  z-index: 20;
  min-height: 52px;
  display: grid;
  grid-template-columns: 1fr auto auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(7, 19, 13, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.bar-link,
.bar-brand {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 950;
  text-transform: uppercase;
  cursor: pointer;
}

.bar-link.strong {
  justify-self: start;
  padding: 0 14px;
  background: var(--gold);
  color: #15180f;
}

.bar-link.support-cta {
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: linear-gradient(135deg, #f7c948, #ff8f3d);
  color: #06150d;
  box-shadow: 3px 3px 0 rgba(255, 255, 255, 0.2);
}

.bar-brand {
  color: var(--text);
  letter-spacing: 0;
}

.bar-link:last-child {
  justify-self: end;
}

.legal-screen {
  padding-bottom: 92px;
}

.seo-content {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 44px 0 84px;
}

.seo-intro,
.how-to-play,
.support-project {
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(7, 19, 13, 0.78);
  box-shadow: var(--shadow);
}

.seo-intro {
  padding: clamp(22px, 5vw, 38px);
}

.seo-intro h1,
.seo-intro h2,
.how-to-play h2,
.support-project h2,
.how-to-play h3 {
  margin: 0;
  text-transform: uppercase;
}

.seo-intro h1 {
  font-size: clamp(40px, 7vw, 82px);
  line-height: 0.92;
}

.seo-intro h2 {
  margin-top: 10px;
  color: var(--gold);
  font-size: clamp(20px, 3vw, 34px);
}

.seo-intro p,
.how-to-play p,
.support-project p {
  max-width: 820px;
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.55;
  font-weight: 680;
}

.seo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.seo-actions a,
.support-project a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 16px;
  border-radius: 8px;
  color: var(--text);
  font-weight: 950;
  text-decoration: none;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
}

.seo-actions .play-button {
  background: var(--accent);
  box-shadow: 4px 4px 0 rgba(247, 201, 72, 0.9);
}

.seo-actions a:last-child,
.support-project a {
  background: linear-gradient(135deg, #f7c948, #ff8f3d);
  color: #06150d;
}

.seo-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 14px;
  margin-top: 14px;
}

.how-to-play,
.support-project {
  padding: 22px;
}

.how-to-play h3 {
  margin-top: 18px;
  color: var(--gold);
  font-size: 18px;
}

.how-to-play ul {
  margin: 12px 0 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.55;
}

.legal-panel,
.support-panel {
  max-width: 920px;
  margin: 0 auto;
}

.legal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.legal-grid div {
  padding: 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.legal-grid h3 {
  margin: 0 0 8px;
  font-size: 16px;
  text-transform: uppercase;
}

.legal-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
}

.language-switch button {
  display: grid;
  place-items: center;
  min-width: 34px;
  min-height: 28px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 950;
  cursor: pointer;
}

.language-switch button.is-active {
  background: var(--gold);
  color: #15180f;
}

.home-copy .language-switch {
  margin: 8px 0 12px;
}

[dir="rtl"] body {
  text-align: right;
}

[dir="rtl"] .brand,
[dir="rtl"] .top-actions,
[dir="rtl"] .home-actions,
[dir="rtl"] .btn-row,
[dir="rtl"] .penalty-score,
[dir="rtl"] .live-score,
[dir="rtl"] .history-head,
[dir="rtl"] .phase-card,
[dir="rtl"] .player-row {
  direction: rtl;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-weight: 950;
  font-size: 20px;
  box-shadow: 4px 4px 0 var(--gold);
}

.brand-title {
  margin: 0;
  font-size: clamp(24px, 4vw, 42px);
  line-height: 1;
  text-transform: uppercase;
  font-weight: 950;
}

.brand-sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.pill,
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.sound-toggle {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
}

.sound-toggle:hover {
  border-color: rgba(247, 201, 72, 0.45);
  background: rgba(247, 201, 72, 0.1);
}

.setup-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.95fr) minmax(360px, 1.05fr);
  gap: 22px;
  align-items: stretch;
}

.panel {
  background: rgba(15, 33, 24, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.setup-panel {
  padding: clamp(18px, 3vw, 28px);
}

.eyebrow {
  display: block;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
  margin-bottom: 8px;
}

.title {
  margin: 0;
  font-size: clamp(34px, 6vw, 70px);
  line-height: 0.96;
  font-weight: 950;
  text-transform: uppercase;
}

.copy {
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.5;
  max-width: 62ch;
}

.formation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}

.formation-card {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  padding: 14px 10px;
  min-height: 72px;
  cursor: pointer;
  text-align: left;
}

.formation-card:hover,
.formation-card.is-active {
  border-color: var(--gold);
  background: rgba(247, 201, 72, 0.12);
}

.formation-name {
  display: block;
  font-size: 24px;
  font-weight: 950;
}

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

.btn-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.btn {
  border: 0;
  border-radius: 6px;
  min-height: 44px;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-weight: 950;
  text-transform: uppercase;
  cursor: pointer;
}

.btn:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 4px 4px 0 rgba(247, 201, 72, 0.9);
}

.btn-secondary {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
}

.btn-support {
  border: 1px solid rgba(247, 201, 72, 0.78);
  background: linear-gradient(135deg, #f7c948, #ff8f3d);
  color: #06150d;
  box-shadow: 4px 4px 0 rgba(255, 255, 255, 0.22);
}

.btn-ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--muted);
}

.layout {
  display: grid;
  grid-template-columns: minmax(310px, 370px) minmax(400px, 1fr) minmax(270px, 330px);
  gap: 14px;
  align-items: start;
}

.draft-rail {
  height: clamp(540px, calc(100vh - 158px), 720px);
}

.left-rail,
.right-rail {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.status-panel,
.cards-panel,
.summary-panel,
.group-panel,
.live-panel,
.final-panel {
  padding: 16px;
}

.draft-rail .cards-panel {
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 10px;
}

.draft-rail .status-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 10px;
}

.draft-rail .round-head {
  align-items: center;
  margin-bottom: 0;
}

.draft-rail .round-title {
  font-size: 20px;
}

.draft-rail .metric-grid {
  grid-template-columns: repeat(2, 62px);
  gap: 6px;
}

.draft-rail .metric {
  padding: 5px 6px;
}

.draft-rail .metric b {
  font-size: 17px;
}

.draft-rail .metric span {
  display: block;
  font-size: 9px;
}

.draft-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.draft-panel-head .eyebrow {
  margin-bottom: 0;
}

.draft-clock {
  position: relative;
  min-width: 86px;
  min-height: 28px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid rgba(247, 201, 72, 0.42);
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.draft-clock::before {
  content: "";
  position: absolute;
  inset: 0;
  width: var(--time);
  background: linear-gradient(90deg, rgba(80, 223, 131, 0.85), rgba(247, 201, 72, 0.85));
  transition: width 260ms ease;
}

.draft-clock span {
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}

.draft-clock.is-warning {
  border-color: rgba(247, 201, 72, 0.82);
}

.draft-clock.is-warning::before {
  background: linear-gradient(90deg, rgba(247, 201, 72, 0.9), rgba(243, 75, 63, 0.82));
}

.draft-clock.is-danger {
  border-color: rgba(243, 75, 63, 0.9);
  color: white;
}

.draft-clock.is-danger::before {
  background: rgba(243, 75, 63, 0.9);
}

.draft-clock.is-waiting {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
}

.draft-clock.is-waiting::before {
  display: none;
}

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

.round-title {
  margin: 0;
  font-size: 26px;
  font-weight: 950;
  text-transform: uppercase;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.metric {
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
}

.metric b {
  display: block;
  font-size: 24px;
}

.metric span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
}

.draft-rail .cards {
  min-height: 0;
  flex: 1;
  overflow: hidden;
  overscroll-behavior: contain;
}

.player-card {
  position: relative;
  min-height: 120px;
  height: auto;
  --rarity-glow: rgba(255, 255, 255, 0.1);
  --rarity-border: rgba(255, 255, 255, 0.16);
  --rarity-chip: var(--gold);
  border: 1px solid var(--rarity-border);
  border-radius: var(--radius);
  background: linear-gradient(155deg, #1c3a2a, #0d1d14);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform-style: preserve-3d;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    0 12px 24px rgba(0, 0, 0, 0.2),
    0 0 26px var(--rarity-glow);
}

.player-card::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto auto;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--rarity-glow);
  filter: blur(4px);
  pointer-events: none;
}

.player-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.18), transparent 32%, transparent 68%, rgba(255, 255, 255, 0.08));
  opacity: 0.42;
  pointer-events: none;
}

.player-card.is-revealed {
  animation: cardReveal 360ms cubic-bezier(0.18, 0.9, 0.24, 1.12);
}

.player-card.is-hidden {
  cursor: pointer;
  min-height: 120px;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.player-card.is-hidden:hover {
  transform: translateY(-2px) rotateX(2deg);
  border-color: rgba(247, 201, 72, 0.58);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.22);
}

.card-back,
.card-front {
  position: relative;
  z-index: 1;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.card-back {
  justify-content: center;
  align-items: center;
  gap: 6px;
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.06) 0 10px, transparent 10px 20px),
    linear-gradient(145deg, #0f2b1d, #07130d);
}

.question {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 3px solid var(--gold);
  color: var(--gold);
  font-size: 28px;
  font-weight: 950;
}

.card-front {
  min-height: 120px;
  padding: 8px;
  gap: 4px;
  box-sizing: border-box;
}

.player-card.is-locked {
  border-color: var(--gold);
  box-shadow:
    inset 0 0 0 2px rgba(247, 201, 72, 0.48),
    0 0 30px rgba(247, 201, 72, 0.18);
}

.rarity-crack {
  --rarity-glow: rgba(247, 201, 72, 0.36);
  --rarity-border: rgba(247, 201, 72, 0.78);
  --rarity-chip: #f7c948;
  background:
    linear-gradient(155deg, rgba(247, 201, 72, 0.28), transparent 42%),
    linear-gradient(145deg, #503810, #172014 62%, #07120c);
}

.rarity-elite {
  --rarity-glow: rgba(85, 167, 255, 0.34);
  --rarity-border: rgba(85, 167, 255, 0.72);
  --rarity-chip: #55a7ff;
  background:
    linear-gradient(155deg, rgba(85, 167, 255, 0.28), transparent 42%),
    linear-gradient(145deg, #123c62, #10251c 62%, #07120c);
}

.rarity-titular {
  --rarity-glow: rgba(80, 223, 131, 0.28);
  --rarity-border: rgba(80, 223, 131, 0.62);
  --rarity-chip: #50df83;
  background:
    linear-gradient(155deg, rgba(80, 223, 131, 0.2), transparent 42%),
    linear-gradient(145deg, #1c4a32, #10251a 62%, #07120c);
}

.rarity-promesa {
  --rarity-glow: rgba(180, 122, 255, 0.28);
  --rarity-border: rgba(180, 122, 255, 0.62);
  --rarity-chip: #b47aff;
  background:
    linear-gradient(155deg, rgba(180, 122, 255, 0.22), transparent 42%),
    linear-gradient(145deg, #33245b, #10221a 62%, #07120c);
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.overall {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 7px;
  background: var(--rarity-chip);
  color: #14170f;
  font-size: 21px;
  font-weight: 950;
}

.country {
  color: rgba(247, 251, 241, 0.88);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  text-align: right;
}

.player-name {
  min-height: 0;
  display: flex;
  align-items: center;
  margin: 0;
  font-size: 17px;
  line-height: 1.05;
  font-weight: 950;
}

.positions {
  color: var(--rarity-chip);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.stat-line {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}

.stat {
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.22);
  padding: 4px 5px;
  text-align: center;
}

.stat b {
  display: block;
  font-size: 15px;
}

.stat span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: auto;
}

.mini-btn {
  min-height: 30px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  cursor: pointer;
}

.mini-btn.choose {
  background: var(--accent);
  color: white;
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(229, 70, 64, 0.22);
}

.mini-btn.locked {
  background: var(--gold);
  color: #14170f;
  border-color: transparent;
}

.draft-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}

.reroll-note {
  display: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.pitch-panel {
  position: sticky;
  top: 14px;
  padding: 14px;
}

.draft-rail + .pitch-panel .pitch {
  height: clamp(540px, calc(100vh - 158px), 720px);
  aspect-ratio: auto;
}

.pitch {
  position: relative;
  width: min(100%, 640px);
  aspect-ratio: 4 / 5;
  margin: 0 auto;
  border: 3px solid rgba(255, 255, 255, 0.55);
  border-radius: 8px;
  overflow: hidden;
  background: repeating-linear-gradient(
    180deg,
    var(--field) 0 10%,
    var(--field-2) 10% 20%
  );
}

.pitch svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.pitch line,
.pitch circle,
.pitch path,
.pitch rect {
  fill: none;
  stroke: var(--line);
  stroke-width: 1.4;
}

.slot {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  width: clamp(70px, 10vw, 96px);
  min-height: 62px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  pointer-events: none;
}

.slot-disc {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.72);
  background: rgba(8, 20, 13, 0.48);
  font-size: 12px;
  font-weight: 950;
}

.slot.is-filled .slot-disc {
  background: white;
  color: #132117;
  border-color: white;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}

.slot-name {
  max-width: 96px;
  color: white;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
  font-size: 11px;
  line-height: 1.05;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.slot-pos {
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.box-list {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.box-list td {
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.box-list .pos {
  color: var(--gold);
  font-weight: 950;
  width: 44px;
}

.box-list .val {
  text-align: right;
  color: var(--muted);
  width: 34px;
  font-weight: 900;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.summary-layout {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(330px, 430px);
  gap: 16px;
  align-items: start;
}

.summary-hero {
  padding: 16px;
}

.summary-pitch {
  margin-top: 16px;
}

.summary-pitch .pitch {
  width: min(100%, 720px);
  max-height: calc(100vh - 230px);
}

.summary-panel {
  padding: 16px;
}

.summary-team-grid {
  grid-template-columns: 1fr;
  max-height: calc(100vh - 330px);
  overflow: auto;
  padding-right: 4px;
}

.player-row {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.player-row b {
  font-size: 14px;
}

.player-row small {
  display: block;
  color: var(--muted);
}

.group-list {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.group-team {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
}

.group-team.is-you {
  border-color: var(--gold);
}

.live-score {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  margin: 14px 0;
}

.team-name {
  font-size: clamp(20px, 4vw, 34px);
  font-weight: 950;
  text-transform: uppercase;
}

.team-name:last-child {
  text-align: right;
}

.score-box {
  min-width: 122px;
  text-align: center;
  padding: 12px 14px;
  border-radius: 8px;
  background: #06120c;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.score {
  display: block;
  font-size: 42px;
  font-weight: 950;
}

.minute {
  color: var(--gold);
  font-size: 14px;
  font-weight: 950;
}

.event-log {
  display: grid;
  gap: 8px;
  min-height: 88px;
  margin: 12px 0;
}

.event {
  padding: 10px 12px;
  border-left: 4px solid var(--gold);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  font-weight: 850;
}

.event-home {
  border-left-color: var(--accent);
  background: rgba(243, 75, 63, 0.14);
}

.event-away {
  border-left-color: var(--blue);
  background: rgba(67, 168, 255, 0.13);
}

.event-for-user {
  border-left-color: #50df83;
  background: rgba(80, 223, 131, 0.16);
}

.event-against-user {
  border-left-color: var(--accent);
  background: rgba(243, 75, 63, 0.16);
}

.event-neutral {
  border-left-color: var(--gold);
  background: rgba(247, 201, 72, 0.11);
}

.third-race {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(247, 201, 72, 0.18);
  background: rgba(247, 201, 72, 0.08);
}

.third-race b,
.third-race span {
  display: block;
}

.third-race b {
  font-size: 16px;
}

.third-race span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.third-race-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.third-race-list span {
  padding: 7px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.18);
}

.third-race-list span.is-you {
  color: var(--text);
  outline: 1px solid rgba(80, 223, 131, 0.5);
  background: rgba(80, 223, 131, 0.13);
}

.penalty-stage {
  margin: 14px 0;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.16);
}

.penalty-phase {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin-bottom: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(247, 201, 72, 0.12);
  color: var(--gold);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.penalty-score {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.penalty-score span:last-child {
  text-align: right;
}

.penalty-score b {
  display: grid;
  place-items: center;
  min-width: 88px;
  min-height: 44px;
  border-radius: 7px;
  background: #06120c;
  color: var(--text);
  font-size: 28px;
}

.penalty-focus {
  display: grid;
  place-items: center;
  gap: 4px;
  margin: 12px auto;
  max-width: 420px;
  min-height: 108px;
  padding: 14px;
  border-radius: 8px;
  text-align: center;
  border-left: 4px solid var(--gold);
  animation: penaltyPulse 900ms ease-in-out infinite alternate;
}

.penalty-focus.is-goal {
  border-left-color: #50df83;
  background: rgba(80, 223, 131, 0.13);
}

.penalty-focus.is-miss {
  border-left-color: var(--accent);
  background: rgba(243, 75, 63, 0.13);
}

.penalty-focus small,
.penalty-focus span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.penalty-focus strong {
  font-size: clamp(24px, 4vw, 38px);
  line-height: 1;
  font-weight: 950;
}

.penalty-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.penalty-column {
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.penalty-column h3 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 950;
  text-transform: uppercase;
}

.penalty-away h3 {
  text-align: right;
}

.penalty-list {
  display: grid;
  gap: 7px;
}

.penalty-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.2);
  font-weight: 850;
}

.penalty-away .penalty-row {
  grid-template-columns: auto minmax(0, 1fr);
}

.penalty-away .penalty-row span {
  order: 2;
  text-align: right;
}

.penalty-away .penalty-row b {
  order: 1;
}

.penalty-row span {
  overflow-wrap: anywhere;
}

.penalty-row b {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.penalty-row.is-goal b {
  color: #50df83;
}

.penalty-row.is-miss b {
  color: var(--accent);
}

.penalty-row.is-pending {
  outline: 1px solid rgba(247, 201, 72, 0.44);
  animation: pendingPenalty 700ms ease-in-out infinite alternate;
}

.penalty-row.is-empty {
  color: var(--muted);
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

.table th,
.table td {
  padding: 9px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
}

.table th {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.table td:not(:nth-child(2)),
.table th:not(:nth-child(2)) {
  text-align: right;
}

.table tr.is-you {
  background: rgba(247, 201, 72, 0.1);
}

.phase-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  margin-top: 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.phase-card b {
  font-size: 18px;
}

.result-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(80, 223, 131, 0.13);
  color: var(--win);
  font-weight: 950;
  text-transform: uppercase;
}

.result-badge.loss {
  background: rgba(255, 112, 102, 0.13);
  color: var(--loss);
}

.history-panel {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.045);
}

.history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.history-head h3 {
  margin: 3px 0 0;
  font-size: 20px;
  text-transform: uppercase;
}

.history-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.history-summary div,
.history-list div {
  padding: 10px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.18);
}

.history-summary b {
  display: block;
  font-size: 30px;
}

.history-summary span,
.history-list span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.history-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.history-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.history-list b {
  font-size: 18px;
}

.support-reminder {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid rgba(247, 201, 72, 0.22);
  background: rgba(247, 201, 72, 0.08);
}

.support-reminder h3 {
  margin: 0;
  font-size: 22px;
  text-transform: uppercase;
}

.support-reminder p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.champion-share-card {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 18px;
  border-radius: 8px;
  border: 1px solid rgba(247, 201, 72, 0.42);
  background:
    radial-gradient(circle at 10% 15%, rgba(247, 201, 72, 0.2), transparent 30%),
    linear-gradient(135deg, rgba(12, 48, 86, 0.9), rgba(6, 21, 13, 0.94));
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.26);
}

.champion-share-card h3 {
  margin: 0;
  color: var(--gold);
  font-size: 26px;
  text-transform: uppercase;
}

.champion-share-card p {
  max-width: 720px;
  margin: 0;
  color: var(--text);
  line-height: 1.5;
}

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

.modal {
  width: min(520px, 100%);
  padding: 18px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow);
}

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

.share-link-input {
  width: 100%;
  margin: 14px 0 12px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.24);
  color: var(--text);
  font-weight: 800;
}

.slot-options {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.slot-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 52px;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  text-align: left;
}

.slot-option:hover {
  border-color: var(--gold);
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  max-width: 360px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #07130d;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: var(--shadow);
  color: var(--text);
  font-weight: 800;
}

@keyframes cardReveal {
  0% {
    opacity: 0;
    transform: rotateY(-16deg) scale(0.96);
  }
  62% {
    opacity: 1;
    transform: rotateY(4deg) scale(1.018);
  }
  100% {
    opacity: 1;
    transform: rotateY(0) scale(1);
  }
}

@keyframes penaltyPulse {
  from {
    transform: scale(0.992);
    box-shadow: 0 0 0 rgba(247, 201, 72, 0);
  }
  to {
    transform: scale(1.01);
    box-shadow: 0 16px 36px rgba(247, 201, 72, 0.12);
  }
}

@keyframes pendingPenalty {
  from {
    background: rgba(247, 201, 72, 0.08);
  }
  to {
    background: rgba(247, 201, 72, 0.18);
  }
}

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

  .pitch-panel {
    position: static;
    order: -1;
  }

  .draft-rail,
  .draft-rail + .pitch-panel .pitch {
    height: auto;
  }

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

  .draft-rail .cards {
    overflow: visible;
    padding-right: 0;
  }

  .summary-pitch .pitch {
    max-height: none;
  }

  .summary-team-grid {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }
}

@media (max-width: 760px) {
  .screen {
    padding: 14px;
  }

  .home-screen {
    padding: 10px 10px 108px;
  }

  .home-hero {
    min-height: calc(100vh - 128px);
  }

  .home-overlay {
    background:
      linear-gradient(180deg, rgba(5, 14, 9, 0.95) 0%, rgba(5, 14, 9, 0.72) 48%, rgba(5, 14, 9, 0.42) 100%);
  }

  .home-copy {
    padding: 24px;
  }

  .home-title {
    max-width: 8ch;
  }

  .home-actions .btn {
    width: 100%;
  }

  .home-bar {
    left: 10px;
    right: 10px;
    bottom: 10px;
    grid-template-columns: 1fr;
  }

  .bar-link.strong,
  .home-bar .bar-link,
  .bar-link:last-child {
    justify-self: stretch;
  }

  .legal-grid {
    grid-template-columns: 1fr;
  }

  .seo-content {
    width: min(100% - 20px, 1120px);
    padding: 28px 0 108px;
  }

  .seo-grid {
    grid-template-columns: 1fr;
  }

  .seo-actions a {
    width: 100%;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-actions {
    flex-wrap: wrap;
  }

  .formation-grid,
  .cards,
  .team-grid,
  .metric-grid,
  .history-summary,
  .history-list {
    grid-template-columns: 1fr;
  }

  .player-card {
    min-height: 120px;
    height: auto;
  }

  .player-card.is-hidden {
    min-height: 120px;
  }

  .live-score {
    grid-template-columns: 1fr;
  }

  .penalty-score,
  .penalty-columns {
    grid-template-columns: 1fr;
  }

  .penalty-score span:last-child,
  .penalty-away h3,
  .penalty-away .penalty-row span {
    text-align: left;
  }

  .penalty-away .penalty-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .penalty-away .penalty-row span,
  .penalty-away .penalty-row b {
    order: initial;
  }

  .team-name:last-child {
    text-align: left;
  }
}
