:root {
  --ink: #12151a;
  --ink-soft: #2a3038;
  --paper: #f7f4ef;
  --paper-elevated: #fffdf9;
  --line: #ddd5c8;
  --copper: #c45c26;
  --copper-hover: #a14a1e;
  --forest: #1d3d2f;
  --mist: #6b6860;
  --hero-scrim: rgba(10, 12, 14, 0.62);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-editorial: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --max: 1160px;
  --header-h: 72px;
  --radius: 6px;
  --radius-lg: 10px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink-soft);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  max-width: 100%;
}

img,
canvas,
svg,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--forest);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--copper);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-editorial);
  font-weight: 600;
  line-height: 1.22;
  color: var(--ink);
  letter-spacing: -0.02em;
  overflow-wrap: break-word;
}

h1 {
  font-size: clamp(2.125rem, 4.2vw, 3.1rem);
}

h2 {
  font-size: clamp(1.55rem, 2.8vw, 2.05rem);
  margin-top: 0;
}

h3 {
  font-size: 1.2rem;
}

p {
  margin: 0 0 1.05rem;
  max-width: 68ch;
}

.prose-wide p,
.prose p,
.legal-page p {
  max-width: 72ch;
}

ul,
ol {
  margin: 0 0 1.2rem;
  padding-left: 1.35rem;
}

.container {
  width: min(100% - 2.25rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--ink);
  border-bottom: 3px solid var(--copper);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 1.25rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--paper);
  min-width: 0;
}

.brand:hover {
  color: var(--paper);
  opacity: 0.92;
}

.brand-mark {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 10px;
  object-fit: cover;
}

.brand-name {
  font-family: var(--font-editorial);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--paper);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.site-footer .brand-name {
  color: var(--paper);
}

.nav-toggle {
  display: none;
  border: 1px solid rgba(245, 240, 232, 0.35);
  background: transparent;
  color: var(--paper);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

.primary-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.1rem 0.35rem;
}

.primary-nav a {
  display: block;
  color: rgba(247, 244, 239, 0.88);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.4rem 0.55rem;
  border-radius: var(--radius);
}

.primary-nav a:hover,
.primary-nav a[aria-current="page"] {
  color: var(--paper);
  background: rgba(196, 92, 38, 0.22);
}

/* Hero */
.hero {
  position: relative;
  min-height: clamp(420px, 62vh, 560px);
  display: flex;
  align-items: flex-end;
  color: var(--paper);
  background: var(--ink);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 12, 14, 0.35) 0%,
    var(--hero-scrim) 55%,
    rgba(10, 12, 14, 0.88) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
  max-width: 640px;
}

.hero-content h1 {
  color: var(--paper);
  text-shadow: 0 1px 24px rgba(0, 0, 0, 0.35);
  margin-bottom: 1rem;
}

.hero-content p {
  color: rgba(247, 244, 239, 0.92);
  font-size: 1.125rem;
  line-height: 1.65;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.4);
  max-width: 58ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.6rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.72rem 1.35rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.02em;
}

.btn-primary {
  background: var(--copper);
  color: var(--paper);
  border-color: var(--copper);
}

.btn-primary:hover {
  background: var(--copper-hover);
  color: var(--paper);
}

.btn-outline {
  border-color: rgba(247, 244, 239, 0.55);
  color: var(--paper);
  background: rgba(0, 0, 0, 0.15);
}

.btn-outline:hover {
  border-color: var(--paper);
  color: var(--paper);
}

.btn-ghost {
  background: var(--paper-elevated);
  color: var(--ink);
  border-color: var(--line);
}

.btn-ghost:hover {
  color: var(--copper);
}

/* Sections */
.section {
  padding: clamp(2.75rem, 6vw, 4.25rem) 0;
}

.section-alt {
  background: var(--paper-elevated);
  border-block: 1px solid var(--line);
}

.section-head {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
  max-width: 52rem;
}

.section-head p {
  color: var(--mist);
  margin: 0.5rem 0 0;
}

.section-kicker {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: 0.45rem;
}

.feature-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--paper-elevated);
}

.feature-item {
  padding: 1.35rem 1.25rem;
  border-right: 1px solid var(--line);
}

.feature-item:last-child {
  border-right: 0;
}

.feature-item h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
}

.feature-item p {
  margin: 0;
  font-size: 0.94rem;
  color: var(--mist);
  line-height: 1.55;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.card {
  background: var(--paper-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card-media-wrap {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--line);
}

.card-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body {
  padding: 1.2rem 1.25rem 1.35rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-tag {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--copper);
  margin-bottom: 0.35rem;
}

.card-body h3 {
  margin: 0 0 0.45rem;
}

.card-body p {
  color: var(--mist);
  font-size: 0.95rem;
  flex: 1;
  margin-bottom: 0.75rem;
}

.card-link {
  font-weight: 600;
  text-decoration: none;
  color: var(--forest);
  font-size: 0.92rem;
}

.card-link:hover {
  color: var(--copper);
}

.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2.5rem;
  align-items: center;
}

.split-figure {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 4 / 3;
}

.split-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-hero {
  background: var(--ink);
  color: var(--paper);
  padding: 2.5rem 0 2.15rem;
  border-bottom: 3px solid var(--copper);
}

.page-hero h1 {
  color: var(--paper);
  margin: 0 0 0.65rem;
}

.page-hero p {
  color: rgba(247, 244, 239, 0.85);
  margin: 0;
  max-width: 60ch;
}

.breadcrumbs {
  font-size: 0.82rem;
  margin-bottom: 0.85rem;
  color: rgba(247, 244, 239, 0.55);
}

.breadcrumbs a {
  color: rgba(247, 244, 239, 0.78);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--paper);
  text-decoration: underline;
}

.prose-wide h2 {
  margin-top: 2rem;
}

.legal-page h2 {
  margin-top: 2.25rem;
  font-size: 1.15rem;
}

.legal-page ol.legal-list {
  counter-reset: legal;
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.legal-page ol.legal-list > li {
  counter-increment: legal;
  margin-bottom: 1.75rem;
  padding-left: 0;
}

.legal-page ol.legal-list > li h2::before {
  content: counter(legal) ". ";
  color: var(--copper);
  font-weight: 700;
}

.article-cover {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  margin: 1.25rem 0 2rem;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  width: 100%;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 2rem;
  align-items: start;
}

.contact-form {
  background: var(--paper-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 0.35rem;
  color: var(--ink);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  background: var(--paper);
  color: var(--ink);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.form-note {
  font-size: 0.85rem;
  color: var(--mist);
  margin-top: 0.75rem;
}

.form-success {
  display: none;
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  background: #eef5f0;
  border: 1px solid #c5dac8;
  border-radius: var(--radius);
  color: var(--forest);
  font-weight: 600;
}

.form-success.is-visible {
  display: block;
}

.mt-2 {
  margin-top: 2rem;
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: rgba(247, 244, 239, 0.75);
  padding: 3rem 0 1.35rem;
  margin-top: 2.5rem;
  border-top: 3px solid var(--copper);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand-text {
  margin-top: 1rem;
  font-size: 0.92rem;
  line-height: 1.6;
  max-width: 32ch;
}

.site-footer h4 {
  font-family: var(--font);
  color: var(--paper);
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer li {
  margin-bottom: 0.4rem;
}

.site-footer a {
  color: rgba(247, 244, 239, 0.72);
  text-decoration: none;
  font-size: 0.9rem;
}

.site-footer a:hover {
  color: var(--paper);
}

.footer-bottom {
  border-top: 1px solid rgba(247, 244, 239, 0.12);
  padding-top: 1.15rem;
  font-size: 0.82rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
}

.cookie-banner {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  max-width: 480px;
  margin: 0 auto;
  z-index: 200;
  background: var(--paper-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.2rem;
  box-shadow: 0 12px 40px rgba(18, 21, 26, 0.18);
  display: none;
}

.cookie-banner.is-visible {
  display: block;
}

.cookie-banner p {
  font-size: 0.88rem;
  margin-bottom: 0.85rem;
  color: var(--mist);
  max-width: none;
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

@media (max-width: 1080px) {
  .nav-toggle {
    display: inline-flex;
  }

  .header-inner {
    position: relative;
  }

  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--ink);
    border-bottom: 1px solid rgba(247, 244, 239, 0.1);
    padding: 0.5rem 0.75rem 0.85rem;
    display: none;
    z-index: 120;
  }

  .primary-nav.is-open {
    display: block;
  }

  .primary-nav ul {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 960px) {
  .grid-3,
  .feature-strip,
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature-item:nth-child(2) {
    border-right: 0;
  }

  .feature-item {
    border-bottom: 1px solid var(--line);
  }

  .split,
  .contact-grid,
  .about-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .grid-3,
  .grid-2,
  .feature-strip,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .feature-item {
    border-right: 0;
  }

  .container {
    width: min(100% - 1.25rem, var(--max));
  }
}

.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.25rem;
  align-items: start;
}

@media (max-width: 960px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.about-points {
  margin: 0;
  padding: 0;
  list-style: none;
}

.about-points li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}

.about-points strong {
  display: block;
  color: var(--ink);
  font-family: var(--font-editorial);
  font-size: 1.08rem;
  margin-bottom: 0.2rem;
}

.mast-note {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: 0.5rem;
}

.pitch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.7fr);
  gap: 1.15rem;
  align-items: stretch;
}

.pitch {
  position: relative;
  min-height: 420px;
  border-radius: 18px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    repeating-linear-gradient(
      180deg,
      #1f6b3a 0 12.5%,
      #185c32 12.5% 25%
    );
  border: 3px solid #f4f0e6;
  box-shadow: inset 0 0 0 10px rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 4.5% 6%;
}

.pitch-mark {
  position: absolute;
  border: 2px solid rgba(255, 255, 255, 0.35);
  pointer-events: none;
}

.pitch-mark-center {
  width: 18%;
  aspect-ratio: 1;
  border-radius: 50%;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.pitch-mark-box {
  width: 54%;
  height: 16%;
  left: 23%;
}

.pitch-mark-box-top {
  top: 0;
}

.pitch-mark-box-bottom {
  bottom: 0;
}

.pitch-row {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: clamp(0.25rem, 1.5vw, 0.85rem);
  min-height: 64px;
  max-width: 100%;
}

.pitch.is-live {
  box-shadow: inset 0 0 0 10px rgba(255, 255, 255, 0.08), 0 0 0 2px rgba(196, 92, 38, 0.45);
}

.pitch.is-live::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255, 255, 255, 0.06) 45%,
    transparent 70%
  );
  animation: pitch-sweep 2.8s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes pitch-sweep {
  0% {
    transform: translateX(-60%);
  }
  100% {
    transform: translateX(60%);
  }
}

.pitch-slot {
  width: clamp(46px, 9vw, 68px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.pitch-slot img {
  width: clamp(36px, 7vw, 58px);
  height: clamp(36px, 7vw, 58px);
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #f7f4ef;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
  animation: token-in 0.35s ease;
}

.pitch.is-live .pitch-slot img {
  animation: token-in 0.35s ease, player-drift 1.6s ease-in-out infinite;
}

.pitch.is-live .pitch-row[data-row="MED"] .pitch-slot img {
  animation-delay: 0.15s;
}

.pitch.is-live .pitch-row[data-row="DFC"] .pitch-slot img {
  animation-delay: 0.3s;
}

.pitch.is-live .pitch-row[data-row="POR"] .pitch-slot img {
  animation-duration: 2.2s;
}

@keyframes player-drift {
  0%,
  100% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(4px, -3px);
  }
  50% {
    transform: translate(-3px, 2px);
  }
  75% {
    transform: translate(3px, 1px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pitch.is-live::before,
  .pitch.is-live .pitch-slot img {
    animation: none;
  }
}

.pitch-slot span {
  max-width: 72px;
  font-size: 0.62rem;
  line-height: 1.2;
  color: #fff;
  text-align: center;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
  font-weight: 600;
}

.pitch-ghost {
  width: clamp(36px, 7vw, 52px);
  min-height: clamp(36px, 7vw, 52px);
  border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, 0.45);
  background: rgba(0, 0, 0, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

@keyframes token-in {
  from {
    transform: translateY(8px) scale(0.86);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

.study-result {
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.2rem 1.3rem;
}

.study-result h3 {
  color: var(--paper);
  margin: 0 0 0.35rem;
}

.squad-count,
.formation-line {
  font-size: 0.9rem;
  color: rgba(247, 244, 239, 0.78);
  margin: 0 0 0.65rem;
}

.formation-line strong {
  color: var(--paper);
  font-size: 1.15rem;
}

.study-notes {
  margin: 0 0 1rem;
  padding-left: 1.1rem;
  color: rgba(247, 244, 239, 0.82);
  font-size: 0.88rem;
}

.rail-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.1rem 0 0.65rem;
}

.rail-bar p {
  flex: 1;
  margin: 0;
  font-size: 0.86rem;
  color: var(--mist);
  max-width: none;
}

.rail-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper-elevated);
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.rail-btn:hover {
  border-color: var(--copper);
  color: var(--copper);
}

.player-rail {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 0.25rem 0 0.85rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.player-card {
  flex: 0 0 154px;
  scroll-snap-align: start;
  background: var(--paper-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.player-card img {
  aspect-ratio: 1;
  object-fit: cover;
  width: 100%;
  height: auto;
  background: var(--line);
}

.player-meta {
  padding: 0.55rem 0.65rem 0.35rem;
}

.player-meta strong {
  display: block;
  font-size: 0.86rem;
  color: var(--ink);
}

.player-meta span {
  display: block;
  font-size: 0.72rem;
  color: var(--mist);
  margin: 0.12rem 0 0;
}

.player-card button {
  width: 100%;
  border: 0;
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.5rem;
  cursor: pointer;
  margin-top: auto;
}

.player-card button:hover {
  background: var(--copper);
}

.player-card.is-picked {
  border-color: var(--copper);
}

.player-card.is-picked button {
  background: var(--copper);
}

.player-card.is-full button:not(.is-remove) {
  opacity: 0.45;
  cursor: not-allowed;
}

.player-limit-msg {
  font-size: 0.82rem;
  color: var(--copper);
  margin: 0.35rem 0 0;
  min-height: 1.25rem;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(18, 21, 26, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: 1rem;
}

.modal.is-open {
  display: flex;
}

.modal-card {
  background: var(--paper-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  max-width: 420px;
}

.modal-card h3 {
  margin-top: 0;
}

.analysis-card .card-tag {
  color: var(--forest);
}

@media (max-width: 960px) {
  .about-grid,
  .pitch-layout {
    grid-template-columns: 1fr;
  }

  .pitch {
    min-height: 380px;
  }
}

@media (max-width: 720px) {
  .brand-name {
    font-size: 0.92rem;
    max-width: 9rem;
  }

  .primary-nav a {
    font-size: 0.78rem;
    padding: 0.45rem 0.35rem;
  }

  .pitch {
    min-height: 300px;
    padding: 4% 2%;
  }

  .pitch-slot span {
    display: none;
  }

  .player-card {
    flex-basis: 132px;
  }

  .rail-bar {
    flex-wrap: wrap;
  }

  .rail-bar p {
    font-size: 0.78rem;
    order: 3;
    width: 100%;
  }

  .modal-card {
    max-width: 100%;
  }

  .study-result .btn {
    width: 100%;
  }
}

.xi-arena {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 1.25rem;
  align-items: start;
  width: 100%;
  max-width: 100%;
}

.xi-select,
.xi-field {
  background: var(--paper-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1rem 1.05rem 1.15rem;
  min-width: 0;
  max-width: 100%;
}

.xi-select h3,
.xi-field h3 {
  margin: 0 0 0.45rem;
  font-size: 1.15rem;
}

.xi-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
  color: var(--mist);
}

.xi-rail-wrap {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  max-width: 100%;
}

.xi-pool {
  display: flex;
  gap: 0.7rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  padding: 0.2rem 0.15rem 0.7rem;
  scrollbar-width: thin;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
}

.xi-card {
  flex: 0 0 118px;
  scroll-snap-align: start;
  border: 2px solid var(--line);
  background: var(--paper);
  border-radius: 10px;
  padding: 0.45rem;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: center;
}

.xi-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  margin-bottom: 0.4rem;
  pointer-events: none;
}

.xi-card-name {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
}

.xi-card-meta {
  display: block;
  font-size: 0.68rem;
  color: var(--mist);
  margin-top: 0.15rem;
}

.xi-card.is-on {
  border-color: var(--copper);
  box-shadow: 0 0 0 1px rgba(196, 92, 38, 0.25);
}

.xi-card.is-blocked {
  opacity: 0.45;
  cursor: not-allowed;
}

.xi-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.xi-contact {
  display: none;
  text-decoration: none;
}

.xi-arena.is-done .xi-contact {
  display: inline-flex;
}

.xi-arena.is-done [data-xi-start] {
  display: none;
}

.xi-note {
  font-size: 0.85rem;
  color: var(--mist);
  margin: 0.65rem 0 0;
  max-width: none;
}

.xi-stage {
  position: relative;
  width: min(100%, 22rem, calc(68svh * 0.75));
  margin-inline: auto;
}

.xi-pitch {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  height: auto;
  border-radius: 16px;
  overflow: hidden;
  background:
    repeating-linear-gradient(
      180deg,
      #1f6b3a 0 12.5%,
      #185c32 12.5% 25%
    );
  border: 3px solid #f4f0e6;
}

.xi-pitch-lines {
  position: absolute;
  inset: 4%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  pointer-events: none;
}

.xi-pitch-lines::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255, 255, 255, 0.35);
  transform: translateX(-50%);
}

.xi-slot {
  position: absolute;
  width: clamp(32px, 13%, 52px);
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 2;
}

.xi-dot {
  width: 100%;
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 50%;
  border: 2px solid rgba(247, 244, 239, 0.75);
  background: rgba(18, 21, 26, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.55rem;
  font-weight: 700;
  overflow: hidden;
}

.xi-slot.is-filled .xi-dot {
  border-color: var(--copper);
  padding: 0;
}

.xi-dot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.xi-dot em {
  display: none;
}

.xi-canvas-shell {
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  background: #185c32;
  position: absolute;
  inset: 0;
  display: none;
  z-index: 3;
}

.xi-arena.is-running .xi-canvas-shell {
  display: block;
}

.xi-canvas-shell canvas {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
}

.xi-hud {
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
  right: 0.55rem;
  display: flex;
  justify-content: space-between;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}

@media (min-width: 1101px) {
  .xi-field {
    position: sticky;
    top: calc(var(--header-h) + 0.75rem);
  }
}

@media (max-width: 1100px) {
  .xi-arena {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .xi-card {
    flex-basis: 104px;
  }

  .xi-select,
  .xi-field {
    padding: 0.85rem 0.75rem 1rem;
  }

  .xi-actions {
    flex-direction: column;
  }

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

  .xi-dot {
    font-size: 0.48rem;
  }
}

@media (max-width: 480px) {
  .xi-rail-wrap .rail-btn {
    display: none;
  }

  .xi-card {
    flex-basis: 96px;
  }

  .xi-stage {
    width: min(100%, calc(62svh * 0.75));
  }
}