@import url('tokens.css');
@import url('ui.css');

/* ── Design tokens (v7) — voir tokens.css ── */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 1rem);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1,
h2 {
  font-family: var(--font-hero);
  font-weight: 700;
  color: #fff;
}

.container {
  width: var(--container);
  margin-inline: auto;
}

.section[hidden] {
  display: none !important;
}

.nav a[hidden] {
  display: none !important;
}

#theme,
#spectacles,
#classement,
#resultats,
#ligue {
  scroll-margin-top: calc(var(--nav-height) + 1rem);
}

/* ── Navigation ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.125rem 2rem;
  background: rgba(6, 9, 16, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav__links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(1.25rem, 2.5vw, 2rem);
}

.nav a {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s;
}

.nav a:hover { color: var(--blue); }

.nav__logo {
  position: absolute;
  left: var(--page-gutter);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
}

.nav__logo img {
  width: auto;
  height: clamp(24px, 2.8vw, 32px);
}

.limm-logo {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
}

.limm-logo--nav {
  height: clamp(24px, 2.8vw, 32px);
  width: auto;
}

.limm-logo--footer {
  width: min(180px, 55vw);
  margin-inline: auto;
  opacity: 0.92;
}

.nav__logo:hover {
  opacity: 0.85;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: auto;
}

.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
}

@media (max-width: 640px) {
  :root {
    --container: min(1180px, calc(100% - 1.5rem));
    --section-gap: clamp(2.5rem, 8vw, 3.5rem);
  }

  .nav {
    justify-content: flex-end;
    padding: 1.125rem 1rem;
  }

  .nav__links { display: none; }

  .nav a:not(.nav__logo) { display: none; }

  .nav__logo {
    left: var(--page-gutter);
    transform: translateY(-50%);
  }

  .nav.is-open {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1rem;
  }

  .nav.is-open .nav__links {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .nav.is-open .nav__toggle {
    margin-left: 0;
    align-self: flex-end;
  }

  .nav.is-open a:not(.nav__logo) {
    display: block;
    padding: 0.875rem 0;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border);
  }

  .nav.is-open .nav__logo {
    position: static;
    transform: none;
    align-self: flex-start;
    margin: 0 0 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
  }

  .nav__toggle { display: flex; }
}

/* ── Hero ── */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  min-height: 0;
  padding: calc(var(--nav-height) + 0.35rem) 0 clamp(1.5rem, 4vw, 2.5rem);
  overflow: hidden;
  background: var(--bg);
}

.hero__backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 70% at 12% 18%, rgba(37, 99, 235, 0.38) 0%, transparent 58%),
    radial-gradient(ellipse 40% 50% at 85% 75%, rgba(11, 16, 28, 0.75) 0%, transparent 70%),
    linear-gradient(to top, var(--bg) 0%, rgba(6, 9, 16, 0.55) 38%, var(--bg) 100%),
    var(--bg);
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  max-width: none;
  padding-left: var(--page-gutter);
  padding-right: var(--page-gutter);
  box-sizing: border-box;
}

.hero__title {
  margin: 0;
  max-width: 14ch;
  width: fit-content;
  text-align: left;
  font-size: var(--text-h1-hero);
  line-height: 0.9;
  letter-spacing: -0.025em;
  text-transform: uppercase;
}

.hero__line {
  display: block;
}

.hero__season {
  margin: clamp(0.85rem, 2vw, 1.25rem) 0 0;
  width: fit-content;
  text-align: left;
  font-family: var(--font-mono);
  font-size: var(--text-eyebrow);
  letter-spacing: var(--tracking-caps-wide);
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

@media (max-width: 640px) {
  .hero {
    padding-bottom: clamp(1.25rem, 4vw, 1.75rem);
  }

  .hero__title {
    font-size: var(--text-h1-hero-mobile);
    line-height: 0.92;
    max-width: none;
  }

  .hero__content {
    padding-inline: var(--page-gutter);
  }

  .hero__backdrop {
    background:
      radial-gradient(ellipse 70% 60% at 8% 15%, rgba(37, 99, 235, 0.34) 0%, transparent 62%),
      linear-gradient(to top, var(--bg) 0%, rgba(6, 9, 16, 0.65) 45%, var(--bg) 100%),
      var(--bg);
  }
}

.hero-tickets {
  padding: clamp(1.25rem, 3vw, 1.75rem) var(--page-gutter);
  background: var(--bg);
}

.hero-tickets[hidden] {
  display: none !important;
}

.hero-tickets__inner {
  display: flex;
  justify-content: center;
}

.hero-tickets__btn {
  min-width: min(100%, 20rem);
  padding-inline: clamp(1.25rem, 4vw, 2rem);
}

/* ── Sections ── */
.section {
  padding-block: var(--section-gap);
  border-top: 1px solid var(--border);
}

.section--theme {
  padding-top: 0;
  padding-bottom: 0;
}

.theme-band {
  margin-top: 0;
  margin-inline: calc(50% - 50vw);
  padding-inline: calc(50vw - 50%);
  padding-top: clamp(3rem, 5vw, 4.5rem);
  padding-bottom: clamp(2rem, 3vw, 3rem);
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
}

.section--standings {
  position: relative;
}

.section--standings::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background: var(--bg-subtle);
}

/* ── Theme form ── */
.theme-header {
  text-align: center;
  margin-bottom: clamp(1.75rem, 3vw, 2.5rem);
}

.theme-header__eyebrow {
  margin: 0 0 0.75rem;
  font-family: var(--font-mono);
  font-size: var(--text-eyebrow);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--text-muted);
}

.theme-header__title {
  margin: 0;
  font-size: var(--text-h1-wide);
  letter-spacing: var(--tracking-title);
}

.theme-header__desc {
  margin: 0.75rem auto 0;
  max-width: 36rem;
  color: var(--text-muted);
}

.theme-form-card {
  border: 1px solid var(--border-strong);
  padding: clamp(2rem, 3vw, 3rem);
  max-width: 100%;
}

.theme-form[hidden],
.theme-form-closed[hidden],
#theme-form-wrap[hidden] {
  display: none !important;
}

.theme-form--disabled {
  opacity: 0.72;
}

.theme-form--disabled .btn--submit {
  cursor: not-allowed;
}

.theme-form {
  display: grid;
  gap: 0;
}

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

@media (max-width: 1024px) {
  .theme-form__fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 540px) {
  .theme-form__fields {
    grid-template-columns: 1fr;
  }
}

.form-row {
  display: grid;
  gap: 0.5rem;
  min-width: 0;
}

.form-row label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.form-row__label-nowrap {
  white-space: nowrap;
}

.form-row .required { color: #e63946; }

.form-row input,
.form-row select {
  width: 100%;
  padding: 0.65rem 0;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-strong);
  outline: none;
  transition: border-color 0.2s;
}

.form-row select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2394a3b8' d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0 center;
  padding-right: 1.25rem;
}

.form-row select:invalid {
  color: var(--text-placeholder);
}

.form-row input::placeholder { color: var(--text-placeholder); }
.form-row input:focus,
.form-row select:focus { border-bottom-color: var(--blue); }

.form-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-top: 1.75rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--text-muted);
  cursor: pointer;
}

.form-consent input[type="checkbox"] {
  flex-shrink: 0;
  margin-top: 0.2rem;
  width: 1rem;
  height: 1rem;
  accent-color: var(--blue);
}

.theme-form__actions {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--btn-height);
  padding: 0 var(--btn-padding-x);
  font-family: var(--font-mono);
  font-size: var(--btn-font-size);
  letter-spacing: var(--btn-letter-spacing);
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  transition: border-color var(--transition-fast), color var(--transition-fast), background var(--transition-fast);
}

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

.btn--submit {
  padding-inline: 2.5rem;
}

/* ── Shows (cards) ── */
.shows__list {
  display: grid;
  gap: 1rem;
}

.show-card {
  display: grid;
  grid-template-columns: 10.5rem 1fr auto;
  align-items: center;
  gap: clamp(1.25rem, 3vw, 2rem);
  padding: clamp(1.25rem, 2.5vw, 1.75rem) clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  transition: border-color 0.2s, background 0.2s;
}

.show-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-elevated);
}

.show-card__date {
  display: grid;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.show-card__day {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
}

.show-card__schedule {
  display: block;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.show-card__main {
  min-width: 0;
}

.show-card__title {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.8vw, 1.125rem);
  font-weight: 600;
  color: var(--text);
}

.show-card__match {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.show-card__vs {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-transform: lowercase;
}

.show-card__note {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  font-style: italic;
  color: var(--text-muted);
}

.show-card__action {
  flex-shrink: 0;
  justify-self: end;
}

@media (max-width: 768px) {
  .show-card {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .show-card__date {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.75rem;
  }

  .show-card__day {
    display: inline;
  }

  .show-card__schedule::before {
    content: '·';
    margin-right: 0.5rem;
  }

  .show-card__action {
    justify-self: start;
    width: 100%;
  }

  .show-card__action .btn--ticket {
    width: 100%;
    text-align: center;
  }
}

/* ── Standings + teams (combined) ── */
.standings-teams-wrap {
  max-width: 100%;
  margin-inline: auto;
  overflow-x: auto;
}

.standings-teams {
  min-width: 980px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border: none;
  background: transparent;
}

.standings-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  text-align: center;
  min-height: 0;
}

.standings-col--plain {
  justify-content: center;
  min-height: 0;
}

.standings-col__abbr {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1;
}

.standings-col__hint {
  font-size: 0.5625rem;
  letter-spacing: 0.01em;
  text-transform: lowercase;
  color: color-mix(in srgb, var(--text-muted) 88%, transparent);
  font-weight: 400;
  line-height: 1.2;
  max-width: 4.25rem;
  hyphens: auto;
}

.standings-teams__head {
  padding: 0.65rem 0.65rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-subtle);
}

.standings-teams__head .standings-col--plain:first-child {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
}

.standings-teams__head .standings-col--plain:nth-child(2) {
  justify-content: center;
  align-items: flex-start;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
}

.standings-team__stat--pct {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding-top: 0.05rem;
  min-width: 0;
}

.standings-pct__value {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.standings-pct__bar {
  display: block;
  width: 100%;
  max-width: 3.25rem;
  height: 4px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.standings-pct__fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: currentColor;
  opacity: 0.45;
  transition: width 0.35s ease;
}

.standings-table-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.55rem 0.85rem;
  margin: 0.15rem 0 0;
  padding: 0.75rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.45;
  text-align: center;
}

.standings-table-legend__item strong {
  color: var(--text);
  font-weight: 600;
}

.standings-table-legend__sep {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--text-muted);
  opacity: 0.35;
}

.standings-teams__head,
.standings-team__row {
  display: grid;
  grid-template-columns:
    3rem
    minmax(9.5rem, 1.25fr)
    minmax(2rem, 0.32fr)
    minmax(2rem, 0.32fr)
    minmax(4.35rem, 0.52fr)
    minmax(2rem, 0.32fr)
    minmax(2rem, 0.32fr)
    minmax(4.35rem, 0.52fr)
    minmax(4.35rem, 0.52fr)
    minmax(4.35rem, 0.52fr)
    minmax(2rem, 0.32fr)
    2.25rem;
  align-items: center;
  gap: 0.5rem 0.65rem;
}

.standings-team__stat:not(.standings-team__stat--pct) {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  min-width: 0;
}

.standings-team {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-subtle);
  scroll-margin-top: calc(var(--nav-height) + 1rem);
}

.standings-team::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  pointer-events: none;
}

.standings-team summary {
  list-style: none;
  cursor: pointer;
}

.standings-team summary::-webkit-details-marker {
  display: none;
}

.standings-team__row {
  padding: 0.85rem 0.65rem;
  background: transparent;
  transition: filter 0.2s;
}

.standings-team summary:hover .standings-team__row {
  filter: brightness(1.06);
}

.standings-team[open] .standings-team__row {
  border-bottom: 1px solid var(--border);
}

.standings-team .standings__pos {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 3.2vw, 2.35rem);
  line-height: 1;
  text-align: center;
}

.standings-team .team-cell {
  justify-content: flex-start;
  gap: 0.65rem;
  min-width: 0;
}

.standings-team .team-cell__name {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  font-weight: 700;
  line-height: 1.15;
}

.standings-team .team-logo-badge {
  width: 52px;
  height: 52px;
}

.standings-team__toggle {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--border);
  border-radius: 50%;
}

.standings-team__chevron {
  width: 22px;
  height: 22px;
  color: var(--text-muted);
  transition: transform 0.2s, color 0.2s;
}

.standings-team summary:hover .standings-team__chevron {
  color: var(--text);
}

.standings-team[open] .standings-team__chevron {
  transform: rotate(180deg);
}

.standings-team__body {
  padding: 0.625rem 0.25rem 2rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.stats-by-kind {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1rem;
  margin: 0 1rem 1rem;
  padding: 0.85rem 1rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
}

.stats-by-kind--team {
  margin-top: 0.35rem;
}

.stats-by-kind--compact {
  grid-template-columns: 1fr;
  gap: 0.55rem;
  margin: 0.55rem 0 0;
  padding: 0.65rem 0.75rem;
}

.stats-by-kind__title {
  margin: 0 0 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.member-stats .stats-by-kind--compact {
  margin-left: 0;
  margin-right: 0;
}

.standings-team__members-label {
  margin: 0 0 0.75rem;
  padding: 0 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.team-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.875rem;
}

.team-cell__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text);
}

.team-logo-badge {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  padding: 0;
  background: transparent;
}

.team-logo-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.team-item .team-logo-badge {
  width: 72px;
  height: 72px;
}

.stats-legend strong {
  color: var(--text);
  font-weight: 600;
}

.stats-legend {
  margin: 0 0 0.85rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.stats-legend--compact {
  padding: 0 0.15rem;
}

.stats-legend--player {
  margin: auto 0 0;
  padding-top: 0.85rem;
}

.player-card__bio {
  margin: 0.85rem 0 0;
  line-height: 1.55;
}

/* ── Teams accordion ── */
.teams__list {
  border: 1px solid var(--border);
}

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

.team-item:last-child { border-bottom: none; }

.team-item summary {
  list-style: none;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.25rem;
  padding: 1.35rem 1.75rem;
  cursor: pointer;
  background: var(--bg-subtle);
  transition: filter 0.2s, background 0.2s;
}

.team-item summary::-webkit-details-marker { display: none; }

.team-item summary:hover { filter: brightness(1.06); }

.team-item[open] summary {
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
}

.team-item__name {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  font-weight: 600;
}

.team-item__count {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.team-item__chevron {
  width: 22px;
  height: 22px;
  color: var(--text-muted);
  transition: transform 0.2s, color 0.2s;
}

.team-item summary:hover .team-item__chevron {
  color: var(--text);
}

.team-item[open] .team-item__chevron {
  transform: rotate(180deg);
}

.team-item__body {
  padding: 0.625rem 0.25rem 2.5rem;
}

.member-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.member-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg-subtle);
  padding: 1.5rem;
}

.member-grid__substitutes {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  height: 100%;
  background: var(--bg-subtle);
  padding: 1.5rem;
  min-width: 0;
}

.member-grid__substitutes--empty {
  align-items: center;
  justify-content: center;
  text-align: center;
}

.member-grid__substitutes-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  flex: 1;
}

.member-grid__substitute-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}

.member-grid__substitute-main {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-width: 0;
}

.member-grid__substitute-vignette {
  display: block;
  flex: 0 0 5.5rem;
  width: 5.5rem;
  height: 5.5rem;
  line-height: 0;
  text-decoration: none;
  transition: opacity 0.2s;
}

.member-grid__substitute-vignette:hover {
  opacity: 0.88;
}

.member-grid__substitute-media {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
}

.member-grid__substitute-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border: 1px solid var(--border);
}

.member-grid__substitute-photo--empty {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--surface);
}

.member-grid__substitute-body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
  flex: 1;
}

.member-grid__substitute-body .stat-boxes--compact {
  margin: 0;
}

.member-grid__substitute-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
}

.member-grid__substitute-name:hover {
  color: var(--blue);
}

.member-grid__substitute-role {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.member-grid__substitute-link {
  align-self: flex-start;
  font-size: 0.75rem;
}

.member-card__substitutes-label {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.member-card__substitutes-empty-text {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--text-muted);
}

.member-card__photo-link {
  display: block;
  margin-bottom: 1rem;
  text-decoration: none;
  transition: opacity 0.2s;
}

.member-card__photo-link:hover {
  opacity: 0.92;
}

.member-card__media {
  position: relative;
  margin-bottom: 0;
}

.member-card__photo {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center;
}

.member-card__name-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin: 0 0 0.35rem;
}

.member-card__name-row .member-card__name {
  margin: 0;
  min-width: 0;
}

.member-card__name-row .player-card__badge {
  margin: 0;
  flex-shrink: 0;
  padding: 0.15rem 0.45rem;
  font-size: 0.55rem;
}

.member-card__name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.member-card__name-link,
.player-link,
.detail-matchup__player-link,
.detail-stars__link,
.detail-impro__penalty-player {
  color: inherit;
  text-decoration: none;
}

.member-card__name-link:hover,
.player-link:hover,
.detail-matchup__player-link:hover,
.detail-stars__link:hover,
.detail-impro__penalty-player:hover {
  text-decoration: underline;
}

.detail-matchup__player-link.detail-matchup__player-name--guest {
  font-weight: 600;
}

.member-card__role {
  margin: 0 0 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.member-card__bio {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.member-card__link,
.result-card__link,
.player-history__link {
  color: var(--blue);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: opacity 0.2s;
}

.member-card__link:hover,
.result-card__link:hover,
.player-history__link:hover {
  opacity: 0.85;
}

.player-history__link {
  display: inline-flex;
  align-items: center;
  align-self: flex-end;
  margin-top: 0.15rem;
}

.member-card__link {
  display: inline-flex;
  align-items: center;
  align-self: flex-end;
  margin-top: auto;
  padding-top: 0.85rem;
}

@media (max-width: 720px) {
  .member-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* ---- Public evolution ---- */
.hint-empty,
.theme-form-closed {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
}

.theme-form-closed {
  padding: 1.25rem;
  border: 1px dashed var(--border);
  text-align: center;
}

.btn--ticket,
.btn--submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  height: var(--btn-height);
  min-height: var(--btn-height);
  padding: 0 var(--btn-padding-x);
  background: var(--blue-hover);
  color: #fff;
  font-family: var(--font-mono);
  font-size: var(--btn-font-size);
  font-weight: 600;
  letter-spacing: var(--btn-letter-spacing);
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  border: none;
  border-radius: var(--radius-sm);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
  transition: background var(--transition-fast), box-shadow var(--transition-fast);
}

.btn--ticket:hover,
.btn--ticket:focus-visible,
.btn--submit:hover,
.btn--submit:focus-visible {
  background: #1d4ed8;
  color: #fff;
  border: none;
}

.team-link {
  text-decoration: none;
  transition: opacity 0.2s;
}

.team-link:hover,
.team-link:focus-visible {
  opacity: 0.85;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.show-card__stage,
.result-card__stage {
  margin: 0 0 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.player-history {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.player-history__heading {
  margin: 0 0 1rem;
  font-size: 1.125rem;
}

.player-history__match + .player-history__match {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px dashed var(--border);
}

.player-history__match {
  display: flex;
  flex-direction: column;
}

.player-history__match-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}

.player-history__date {
  color: var(--text-muted);
  font-weight: 500;
}

.player-history__title-sep {
  color: var(--text-muted);
}

.player-history__teams {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  width: auto;
  flex: 0 1 auto;
}

.player-history__match-title .score-team--home,
.player-history__match-title .score-team--away {
  justify-content: flex-start;
  justify-self: auto;
}

.player-history__match-title .score-trophy--empty {
  display: none;
  width: 0;
  margin: 0;
}

.player-history__vs {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.player-history__teams .result-card__team {
  font-size: 0.85rem;
}

.player-history__teams .score-trophy {
  width: 0.85rem;
  height: 0.85rem;
  color: var(--blue);
}

.player-history__impros {
  margin: 0.75rem 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.player-history__impro {
  margin: 0;
}

.player-history__impro .detail-impro__head {
  margin-bottom: 0;
}

.player-history__impro-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px dashed var(--border);
}

.player-history__impro-outcome {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  font-weight: 700;
  flex-shrink: 0;
}

.player-history__impro-outcome--win {
  color: #4ade80;
}

.player-history__impro-outcome--loss {
  color: #f87171;
}

.player-history__impro-outcome--tie {
  color: var(--blue);
}

.player-history__impro-outcome--penalty {
  color: #f0b429;
}

.player-history__penalties {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0.45rem 0 0;
  border-top: 1px dashed var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.player-history__penalties li {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.player-history__penalties li::before {
  content: "⚠ ";
  color: #f0b429;
}

.player-history__penalties--match {
  margin: 0.65rem 0 0;
  padding-left: 0;
}

.player-history__pen-impro {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.player-history__impro-status .player-history__impro-label {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.player-history__empty {
  grid-column: 1 / -1;
  color: var(--text-muted);
  font-style: italic;
}

.results-list {
  display: grid;
  gap: 1rem;
}

.result-card {
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  padding: clamp(1.25rem, 2.5vw, 1.75rem) clamp(1.25rem, 3vw, 2rem);
  transition: border-color 0.2s, background 0.2s;
}

.result-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-elevated);
}

.result-card__head {
  margin-bottom: 1rem;
}

.result-card__meta {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0;
}

.result-card__title {
  margin: 0.5rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.8vw, 1.125rem);
  font-weight: 600;
}

.result-card__scoreline {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.5rem);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.result-card__team {
  font-size: clamp(0.95rem, 1.8vw, 1.15rem);
  line-height: 1.2;
}

.score-block {
  display: inline-grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.35rem;
  min-width: 9ch;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.score-block > strong {
  min-width: 2ch;
  text-align: center;
}

.score-block > strong:first-child {
  justify-self: end;
}

.score-block > strong:last-child {
  justify-self: start;
}

.score-block__sep {
  color: var(--text-muted);
}

.score-team {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  min-width: 0;
}

.score-team--home {
  justify-content: flex-end;
  justify-self: end;
}

.score-team--away {
  justify-content: flex-start;
  justify-self: start;
}

.score-trophy--empty {
  visibility: hidden;
}

.result-card__score {
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text);
}

.score-team--home .result-card__team {
  text-align: right;
}

.score-team--away .result-card__team {
  text-align: left;
}

.result-card__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.result-card__tie {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.result-card__link {
  display: inline-flex;
  align-items: center;
  margin-left: auto;
}

@media (max-width: 540px) {
  .result-card__scoreline {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 0.5rem;
  }

  .score-team--home,
  .score-team--away {
    justify-self: center;
  }

  .score-team--home .result-card__team,
  .score-team--away .result-card__team {
    text-align: center;
  }
}

.league-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
}

.league-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 0;
  overflow: hidden;
  transition: border-color 0.2s, background 0.2s;
}

.league-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-elevated);
}

.league-card__media {
  aspect-ratio: 4 / 5;
  background: var(--bg-elevated);
  overflow: hidden;
}

.league-card__photo {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
}

.league-card__photo:not(img) {
  min-height: 100%;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.04), transparent 55%),
    var(--bg-elevated);
}

.league-card__content {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.league-card__names {
  margin: 0;
  padding: 1.15rem 1.25rem 0;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.35;
}

.league-card__role {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0;
  padding: 0 1.25rem;
}

.league-card__role:last-child {
  padding-bottom: 1.25rem;
}

.league-card__bio {
  margin: 0;
  padding: 0.35rem 1.25rem 1.25rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.55;
}

@media (max-width: 1024px) {
  .league-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

.section--detail {
  padding-top: 2rem;
}

.btn--back {
  margin-bottom: var(--space-4);
  padding: var(--space-2) var(--space-3);
}

.detail-head__meta {
  color: var(--text-muted);
  margin: 0 0 0.35rem;
  text-align: center;
}

.detail-matchup {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

.detail-matchup--match {
  margin-top: 0.35rem;
}

.detail-matchup__side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem 0.75rem;
  min-width: 0;
  text-align: center;
}

.detail-matchup__side--home {
  border-right: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.015);
}

.detail-matchup__side--away {
  border-left: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.015);
}

.detail-matchup__side-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.detail-matchup__subtheme {
  margin: 0.3rem 0 0.4rem;
  max-width: 100%;
  padding: 0 0.35rem;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--text);
  text-align: center;
}

.detail-matchup__subtheme-label {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.detail-matchup__team-head {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  max-width: 100%;
}

.detail-matchup__center {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 0.65rem 0.55rem;
  min-width: 3.25rem;
  background: rgba(255, 255, 255, 0.03);
  text-align: center;
}

.detail-matchup__center .score-block {
  white-space: nowrap;
}

.detail-matchup__team-name {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.detail-matchup--match .detail-matchup__team-name {
  font-size: clamp(0.95rem, 2vw, 1.15rem);
}

.detail-matchup__score {
  font-size: 1rem;
  font-weight: 700;
}

.detail-matchup__score--match {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 700;
}

.detail-matchup__players {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.88rem;
  min-width: 0;
  width: 100%;
  text-align: center;
}

.detail-matchup--match .detail-matchup__players {
  font-size: 0.95rem;
}

.detail-matchup__players li + li {
  margin-top: 0.2rem;
}

.detail-matchup__captain {
  color: var(--blue);
  font-weight: 600;
}

.detail-matchup__player-name {
  font-weight: 600;
}

.detail-matchup__guest-badge {
  display: inline-block;
  margin-left: 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  vertical-align: middle;
}

.score-trophy {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  color: var(--blue);
}

.score-trophy svg {
  width: 1rem;
  height: 1rem;
}

.result-card .score-trophy svg {
  width: clamp(1rem, 2vw, 1.25rem);
  height: clamp(1rem, 2vw, 1.25rem);
}

.detail-head__tie {
  margin: 0.5rem 0 0;
  color: var(--text-muted);
}

.detail-match-aside {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
  margin-top: 1.25rem;
  align-items: stretch;
}

.detail-match-aside--single {
  grid-template-columns: minmax(0, 1fr);
}

.detail-match-aside__col {
  min-width: 0;
}

.detail-score-breakdown {
  margin-top: 0;
  height: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  box-sizing: border-box;
}

.detail-stars {
  height: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  box-sizing: border-box;
}

.detail-stars p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.45;
}

.detail-stars p + p {
  margin-top: 0.55rem;
}

.detail-score-breakdown__title {
  margin: 0 0 0.65rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.detail-score-breakdown__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.detail-score-breakdown__table th,
.detail-score-breakdown__table td {
  padding: 0.35rem 0.5rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.detail-score-breakdown__table th:first-child,
.detail-score-breakdown__table td:first-child {
  text-align: left;
  color: var(--text-muted);
  font-weight: 500;
}

.detail-score-breakdown__table tbody tr:last-child th,
.detail-score-breakdown__table tbody tr:last-child td {
  border-bottom: none;
  font-weight: 600;
  color: var(--text);
}

.detail-impro__penalties-block {
  margin: 0.65rem 0 0;
}

.detail-impro__penalties-title {
  margin: 0 0 0.35rem;
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.detail-impro__penalties {
  list-style: none;
  margin: 0;
  padding: 0.45rem 0.55rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.15);
  border-radius: var(--radius);
}

.detail-impro__penalty + .detail-impro__penalty {
  margin-top: 0.25rem;
}

.detail-impro__penalty-team {
  font-weight: 600;
}

.detail-impros {
  margin-top: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.detail-impros > h3 {
  margin: 0;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.detail-impros__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  padding: 0.85rem;
}

.detail-impro {
  padding: 1rem 1.05rem 1.05rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  min-width: 0;
}

.detail-impro__head {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}

.detail-impro__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-h3);
  font-weight: 600;
  line-height: 1.3;
  color: #fff;
}

.detail-impro__details {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.member-card__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.player-card--detail {
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  padding: 1.5rem;
}

.player-stats-panel {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0.85rem 0 0.35rem;
}

.player-stats-panel__row {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1.2fr) minmax(5.5rem, 0.45fr);
  gap: 0.65rem;
  align-items: stretch;
}

.player-stats-group {
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  min-width: 0;
}

.player-stats-group--kinds {
  padding-bottom: 0.75rem;
}

.player-stats-group__title {
  margin: 0 0 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.player-stats-panel .stat-boxes--player {
  margin: 0;
  gap: 0.4rem;
}

.player-stats-panel .stat-boxes--player-inline {
  flex-wrap: nowrap;
}

.player-stats-panel .stat-boxes--player .stat-box {
  min-width: 0;
  flex: 1 1 0;
  padding: 0.45rem 0.5rem;
}

.player-stats-panel .stat-boxes--player .stat-box__value {
  font-size: 1.05rem;
}

.stats-by-kind--profile {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  gap: 0.65rem;
}

.stats-by-kind--profile .stats-by-kind__group {
  padding: 0.55rem 0.65rem;
  border: 1px dashed color-mix(in srgb, var(--border) 85%, transparent);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
}

.stats-by-kind--profile .stat-boxes--player-inline {
  flex-wrap: wrap;
}

.player-card__layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.5rem;
  align-items: stretch;
}

.player-card__info {
  display: flex;
  flex-direction: column;
}

.player-card__photo-btn,
.player-gallery__zoom {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  cursor: zoom-in;
  text-align: inherit;
  font: inherit;
  color: inherit;
}

.player-card__photo-btn:focus-visible,
.player-gallery__zoom:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.player-card__photo {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.player-card__gallery-section {
  margin-top: 1.35rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.player-card__gallery-title {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
}

.player-gallery {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.player-gallery--detail {
  max-width: 42rem;
}

.player-gallery__item {
  margin: 0;
}

.player-gallery__img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  pointer-events: none;
}

.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.photo-lightbox[hidden] {
  display: none !important;
}

.photo-lightbox__backdrop {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  border: none;
  background: rgba(8, 10, 14, 0.88);
  cursor: zoom-out;
}

.photo-lightbox__panel {
  position: relative;
  z-index: 1;
  max-width: min(960px, 100%);
  max-height: min(90vh, 100%);
}

.photo-lightbox__img {
  display: block;
  max-width: 100%;
  max-height: min(85vh, 900px);
  width: auto;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  border: 1px solid var(--border);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.45);
}

.photo-lightbox__close {
  position: absolute;
  top: -0.25rem;
  right: 0;
  transform: translateY(-100%);
  font-size: 1.5rem;
  line-height: 1;
  padding: 0.35rem 0.65rem;
}

body.photo-lightbox-open {
  overflow: hidden;
}

@media (max-width: 640px) {
  .player-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.player-card__type {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 0.35rem;
}

.player-card__team {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.player-card__name-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
  margin: 0 0 0.35rem;
}

.player-card__name-row .player-card__name {
  margin: 0;
  min-width: 0;
}

.player-card__name-row .player-card__badge {
  margin: 0;
  flex-shrink: 0;
}

.player-card__name {
  font-size: 1.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.player-card__role {
  margin: 0 0 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.player-card__badge {
  display: inline-block;
  margin: 0 0 0.85rem;
  padding: 0.25rem 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--player-badge-color, var(--accent));
  border: 1px solid var(--player-badge-color, var(--accent));
  border-radius: 999px;
}

@media (max-width: 720px) {
  .detail-match-aside {
    grid-template-columns: 1fr;
  }

  .detail-impros__grid,
  .detail-matchup,
  .player-card__layout,
  .player-history__impros {
    grid-template-columns: 1fr;
  }

  .detail-matchup__side--home,
  .detail-matchup__side--away {
    border-right: none;
    border-left: none;
    border-bottom: 1px solid var(--border);
  }

  .detail-matchup__side--away {
    border-bottom: none;
  }

  .detail-matchup__center {
    justify-content: center;
    border-bottom: 1px solid var(--border);
    border-left: none;
    border-right: none;
  }

  .player-stats-panel__row {
    grid-template-columns: 1fr;
  }

  .player-stats-panel .stat-boxes--player-inline {
    flex-wrap: wrap;
  }

  .stats-by-kind--profile {
    grid-template-columns: 1fr;
  }
}

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.footer__logo {
  width: auto;
  height: auto;
  opacity: 0.85;
}

.footer__logo.limm-logo--footer {
  width: min(180px, 55vw);
}

.footer p {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  z-index: 200;
  padding: 0.75rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: var(--bg-elevated);
  border: 1px solid var(--blue);
  color: var(--text);
  transition: transform 0.3s ease;
}

.toast.is-visible {
  transform: translateX(-50%) translateY(0);
}
