/* ── Variables ────────────────────────────────────────────────────────────── */

:root {
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.26);
  /* Position palette (matches positionKey values) */
  --pos-pg: #4a8fd9;
  --pos-sg: #4aad6b;
  --pos-sf: #e8902e;
  --pos-pf: #d95050;
  --pos-c:  #9a5fd9;
}

body[data-theme="dark"] {
  --bg: #0c1118;
  --bg-soft: #111826;
  --surface: rgba(15, 22, 33, 0.74);
  --surface-strong: rgba(18, 27, 40, 0.9);
  --surface-muted: rgba(21, 31, 46, 0.72);
  --text: #f2ede4;
  --muted: #a4acb8;
  --line: rgba(242, 237, 228, 0.1);
  --accent: #ff8357;
  --accent-soft: rgba(255, 131, 87, 0.12);
  --accent-strong: #ffd2c2;
  --track: rgba(242, 237, 228, 0.12);
  --bg-image:
    radial-gradient(circle at top left, rgba(255, 131, 87, 0.16), transparent 24%),
    radial-gradient(circle at bottom right, rgba(68, 105, 135, 0.22), transparent 28%),
    linear-gradient(180deg, #0c1118 0%, #111826 100%);
}

body[data-theme="light"] {
  --bg: #f2efe8;
  --bg-soft: #f8f4ec;
  --surface: rgba(255, 255, 255, 0.62);
  --surface-strong: rgba(255, 255, 255, 0.8);
  --surface-muted: rgba(255, 255, 255, 0.46);
  --text: #1d1b17;
  --muted: #6b665d;
  --line: rgba(29, 27, 23, 0.12);
  --accent: #b6482d;
  --accent-soft: rgba(182, 72, 45, 0.14);
  --accent-strong: #8d351f;
  --track: rgba(29, 27, 23, 0.08);
  --bg-image:
    radial-gradient(circle at top left, rgba(182, 72, 45, 0.18), transparent 24%),
    radial-gradient(circle at bottom right, rgba(44, 90, 80, 0.14), transparent 28%),
    linear-gradient(180deg, #f7f4ee 0%, #f2efe8 100%);
}

/* ── Base ────────────────────────────────────────────────────────────────── */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Manrope", sans-serif;
  background: var(--bg-image);
  transition: background 0.25s ease, color 0.25s ease;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0.32;
  mask-image: radial-gradient(circle at center, black 52%, transparent 88%);
}

/* ── Shell ───────────────────────────────────────────────────────────────── */

.page-shell {
  width: min(1360px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 64px;
}

/* ── Header ──────────────────────────────────────────────────────────────── */

.site-header {
  display: grid;
  grid-template-columns: auto minmax(260px, 420px) auto;
  align-items: center;
  gap: 18px;
  padding: 10px 0 18px;
}

/* Header sin buscador (player.html) */
.site-header--simple {
  grid-template-columns: 1fr auto;
}

.brand-lockup {
  min-width: 0;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: inherit;
  text-decoration: none;
}

.site-logo {
  width: 56px;
  height: 56px;
  display: block;
  flex: 0 0 auto;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.22));
}

.brand-copy {
  display: grid;
  gap: 4px;
}

.site-mark,
.meta-label,
.section-kicker,
.player-badge,
.stamp-label,
.profile-label,
.filter-group-label {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.site-name {
  color: var(--text);
  font-family: "Fraunces", serif;
  font-size: 1.2rem;
  font-weight: 600;
}

.header-search {
  min-width: 0;
}

.header-search-input {
  width: 100%;
}

.header-tools {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 10px;
}

.toggle-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  background: var(--surface-muted);
  backdrop-filter: blur(10px);
}

.toggle-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 10px 12px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.toggle-button:hover,
.toggle-button:focus-visible {
  color: var(--text);
  outline: none;
}

.toggle-button.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

body[data-theme="light"] .toggle-button.is-active {
  background: rgba(29, 27, 23, 0.06);
}

.theme-toggle {
  border: 1px solid var(--line);
  background: var(--surface-muted);
}

/* ── Search input ────────────────────────────────────────────────────────── */

.search-input {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 13px 14px;
  font: inherit;
}

body[data-theme="light"] .search-input {
  background: rgba(255, 255, 255, 0.64);
}

.search-input:focus {
  outline: 2px solid rgba(255, 131, 87, 0.18);
  border-color: rgba(255, 131, 87, 0.38);
}

body[data-theme="light"] .search-input:focus {
  outline: 2px solid rgba(182, 72, 45, 0.22);
  border-color: rgba(182, 72, 45, 0.34);
}

/* ── Hero ────────────────────────────────────────────────────────────────── */

.hero {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding: 20px 0 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)),
    radial-gradient(circle at left center, var(--accent-soft), transparent 28%);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.9fr);
  gap: 28px;
  width: min(1360px, calc(100% - 32px));
  margin: 0 auto;
  align-items: center;
}

.hero-copy {
  max-width: 920px;
  animation: rise 0.7s ease both;
}

.hero h1,
.player-header h2,
.empty-state h2,
.section-heading h3 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-weight: 600;
  line-height: 0.94;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  max-width: 12ch;
}

.hero-text {
  max-width: 42ch;
  margin: 14px 0 0;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--muted);
}

.hero-meta {
  display: flex;
  gap: 28px;
  justify-content: flex-end;
  align-items: center;
  animation: rise 0.8s ease 0.08s both;
}

.hero-meta strong {
  display: block;
  margin-top: 6px;
  font-size: 1.55rem;
  font-weight: 800;
}

/* ── Players section ─────────────────────────────────────────────────────── */

.players-section {
  margin-top: 28px;
}

/* ── About ──────────────────────────────────────────────────────────────── */

.about-section {
  margin-top: clamp(54px, 8vw, 104px);
  padding: 12px 0 22px;
}

.about-signature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.34fr);
  gap: clamp(32px, 7vw, 96px);
  align-items: center;
  max-width: 1060px;
  padding-left: clamp(20px, 3vw, 38px);
  border-left: 3px solid var(--accent);
}

.about-copy {
  max-width: 720px;
}

.about-copy h2 {
  margin: 10px 0 0;
  font-family: "Fraunces", serif;
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  font-weight: 600;
  line-height: 1;
}

.about-text {
  max-width: 66ch;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.12rem);
  line-height: 1.8;
}

.about-mark {
  display: grid;
  justify-items: center;
  gap: 14px;
  color: var(--accent);
}

.about-ball {
  position: relative;
  display: block;
  width: clamp(92px, 12vw, 142px);
  aspect-ratio: 1;
  overflow: hidden;
  border: 3px solid currentColor;
  border-radius: 50%;
  opacity: 0.86;
  transform: rotate(-12deg);
}

.about-ball::before,
.about-ball::after {
  content: "";
  position: absolute;
  inset: -18%;
  border: 3px solid currentColor;
  border-radius: 50%;
}

.about-ball::before {
  transform: translateX(-54%);
}

.about-ball::after {
  transform: translateX(54%);
}

.about-mark-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.22em;
}

/* ── Filter bar ──────────────────────────────────────────────────────────── */

.filter-bar {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface-strong), var(--surface));
  backdrop-filter: blur(14px);
  padding: 20px 22px;
  display: grid;
  gap: 18px;
  margin-bottom: 28px;
  box-shadow: var(--shadow);
  animation: rise 0.5s ease both;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
}

.filter-group {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.filter-group--sort {
  margin-left: auto;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ── Filter pills ────────────────────────────────────────────────────────── */

.filter-pill {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 6px 13px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
  white-space: nowrap;
}

.filter-pill:hover,
.filter-pill:focus-visible {
  border-color: rgba(255, 131, 87, 0.34);
  color: var(--text);
  outline: none;
}

.filter-pill.is-active {
  background: var(--accent-soft);
  border-color: rgba(255, 131, 87, 0.5);
  color: var(--text);
}

body[data-theme="light"] .filter-pill:hover,
body[data-theme="light"] .filter-pill:focus-visible {
  border-color: rgba(182, 72, 45, 0.32);
}

body[data-theme="light"] .filter-pill.is-active {
  border-color: rgba(182, 72, 45, 0.44);
}

/* ── Filter status bar ───────────────────────────────────────────────────── */

.filter-status {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.grid-count {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.clear-filters {
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.15s ease;
}

.clear-filters:hover {
  opacity: 0.72;
}

/* ── Pill count badge ────────────────────────────────────────────────────── */

.pill-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 5px;
  font-size: 0.7rem;
  font-weight: 800;
  background: var(--track);
  color: var(--muted);
  border-radius: 9px;
  transition: background 0.15s ease, color 0.15s ease;
  vertical-align: middle;
}

.filter-pill.is-active .pill-count {
  background: rgba(255, 131, 87, 0.22);
  color: var(--text);
}

body[data-theme="light"] .filter-pill.is-active .pill-count {
  background: rgba(182, 72, 45, 0.18);
}

/* ── Players grid ────────────────────────────────────────────────────────── */

.players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  animation: rise 0.55s ease 0.05s both;
}

.grid-empty {
  grid-column: 1 / -1;
  padding: 48px 0;
  text-align: center;
  color: var(--muted);
  font-size: 1rem;
}

/* ── Player card ─────────────────────────────────────────────────────────── */

.player-card {
  display: grid;
  min-width: 0;
  overflow: hidden;
  gap: 6px;
  padding: 20px 18px 18px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--pos-color, var(--line));
  position: relative;
  background: linear-gradient(180deg, var(--surface-strong), var(--surface));
  backdrop-filter: blur(14px);
  color: inherit;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.player-card:hover,
.player-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(255, 131, 87, 0.42);
  background: linear-gradient(180deg, var(--surface-strong), var(--accent-soft));
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
  outline: none;
}

body[data-theme="light"] .player-card:hover,
body[data-theme="light"] .player-card:focus-visible {
  border-color: rgba(182, 72, 45, 0.36);
}

.card-top {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.card-flag {
  font-size: 1.35rem;
  line-height: 1;
  flex: 0 0 auto;
}

.card-meta {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-name {
  display: block;
  min-width: 0;
  font-family: "Fraunces", serif;
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.1;
  color: var(--text);
  overflow-wrap: anywhere;
}

.card-team {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
  margin-top: 2px;
}

/* ── Card position color variants ────────────────────────────────────────── */

.player-card[data-pos="PG"] { --pos-color: var(--pos-pg); }
.player-card[data-pos="SG"] { --pos-color: var(--pos-sg); }
.player-card[data-pos="SF"] { --pos-color: var(--pos-sf); }
.player-card[data-pos="PF"] { --pos-color: var(--pos-pf); }
.player-card[data-pos="C"]  { --pos-color: var(--pos-c);  }

/* Card competition label (replaces .card-meta in new structure) */
.card-competition {
  flex: 1 1 auto;
  max-width: 100%;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Card bottom row: position badge + team · age */
.card-footer {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
}

.card-pos-label {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pos-color, var(--muted));
  padding: 2px 7px;
  border: 1px solid var(--pos-color, var(--line));
  opacity: 0.85;
  flex: 0 0 auto;
}

.card-info {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
}

/* "Reciente" dot indicator — top-right corner */
.player-card.is-recent::after {
  content: "";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

/* ── Player page ─────────────────────────────────────────────────────────── */

.player-main {
  padding-top: 32px;
  padding-bottom: 64px;
}

/* ── Player prev/next navigation ─────────────────────────────────────────── */

.player-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
}

.player-nav-link {
  display: inline-flex;
  align-items: center;
  padding: 9px 14px;
  border: 1px solid var(--line);
  background: var(--surface-muted);
  backdrop-filter: blur(10px);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.player-nav-link:hover {
  color: var(--text);
  border-color: rgba(255, 131, 87, 0.34);
  background: var(--accent-soft);
}

body[data-theme="light"] .player-nav-link:hover {
  border-color: rgba(182, 72, 45, 0.32);
}

/* Keeps flex spacing when hidden — use visibility rather than display:none */
.player-nav-link.is-hidden {
  visibility: hidden;
  pointer-events: none;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 36px;
  transition: color 0.15s ease;
}

.back-link:hover {
  color: var(--text);
}

/* When .back-link sits inside .player-nav, no bottom margin needed */
.player-nav .back-link {
  flex: 1;
  justify-content: center;
  margin-bottom: 0;
}

/* ── Player detail ───────────────────────────────────────────────────────── */

.runtime-note {
  max-width: 56ch;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 24px;
}

.player-view {
  animation: fadeUp 0.35s ease both;
}

/* ── Player header position color strip ──────────────────────────────────── */

#player-header[data-pos="PG"] { --pos-color: var(--pos-pg); }
#player-header[data-pos="SG"] { --pos-color: var(--pos-sg); }
#player-header[data-pos="SF"] { --pos-color: var(--pos-sf); }
#player-header[data-pos="PF"] { --pos-color: var(--pos-pf); }
#player-header[data-pos="C"]  { --pos-color: var(--pos-c);  }

#player-header[data-pos] {
  border-top: 3px solid var(--pos-color);
  padding-top: 20px;
}

.player-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

/* Flag + name row inside player header */
.player-title-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.player-flag-hero {
  font-size: clamp(2.4rem, 4.5vw, 3.4rem);
  line-height: 1;
  flex: 0 0 auto;
  margin-top: 6px;
}

.player-header h2 {
  margin-top: 8px;
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  max-width: 10ch;
}

.player-summary {
  max-width: 62ch;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.player-stamp {
  min-width: 160px;
  padding-top: 4px;
}

.player-grid {
  display: grid;
  gap: 28px;
  padding-top: 26px;
}

.profile-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  padding-bottom: 6px;
}

.profile-strip strong {
  display: block;
  margin-top: 7px;
  font-size: 1.05rem;
}

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

.stat-chip {
  padding: 18px 16px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

body[data-theme="light"] .stat-chip {
  background: rgba(255, 255, 255, 0.38);
}

.stat-chip strong {
  display: block;
  margin-top: 10px;
  font-size: 2rem;
}

.stat-chip span {
  color: var(--muted);
  font-size: 0.92rem;
}

.ratings-grid {
  display: grid;
  gap: 14px;
}

.rating-row {
  display: grid;
  grid-template-columns: minmax(140px, 220px) minmax(0, 1fr) 44px;
  gap: 12px;
  align-items: center;
}

.rating-label {
  font-weight: 700;
}

.rating-track {
  height: 10px;
  background: var(--track);
  overflow: hidden;
}

.rating-fill {
  height: 100%;
  background: linear-gradient(90deg, #325b7a 0%, var(--accent) 100%);
  transform-origin: left center;
  animation: growBar 0.8s ease both;
}

.rating-value {
  font-weight: 800;
  text-align: right;
}

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

.detail-list {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.projection-block {
  padding: 22px 0 10px;
  border-top: 1px solid var(--line);
}

.projection-text {
  max-width: 64ch;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.7;
}

.sources-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.source-link {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid rgba(255, 131, 87, 0.24);
  color: var(--text);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.92rem;
  line-height: 1.7;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

body[data-theme="light"] .source-link {
  border-color: rgba(182, 72, 45, 0.24);
  background: rgba(255, 255, 255, 0.56);
}

.source-link:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 131, 87, 0.48);
}

body[data-theme="light"] .source-link:hover {
  border-color: rgba(182, 72, 45, 0.48);
}

/* ── Empty / error state ─────────────────────────────────────────────────── */

.empty-state {
  max-width: 56ch;
  color: var(--muted);
  padding-top: 12px;
}

/* ── Utilities ───────────────────────────────────────────────────────────── */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Animations ──────────────────────────────────────────────────────────── */

@keyframes rise {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0);    }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0);    }
}

@keyframes growBar {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 1040px) {
  .hero-inner,
  .notes-layout,
  .profile-strip,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .site-header {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .site-header--simple {
    grid-template-columns: 1fr auto;
  }

  .player-header {
    flex-direction: column;
  }

  .hero {
    padding: 18px 0 16px;
  }

  .hero-meta {
    justify-content: flex-start;
  }

  .player-nav {
    flex-wrap: wrap;
  }

  .player-nav .back-link {
    order: -1;
    flex-basis: 100%;
    justify-content: flex-start;
  }

  .filter-group--sort {
    margin-left: 0;
  }

  .players-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 20px, 1360px);
  }

  .brand-link {
    align-items: flex-start;
  }

  .header-tools {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    justify-self: stretch;
  }

  .toggle-group {
    width: fit-content;
  }

  .hero h1 {
    font-size: clamp(2.8rem, 17vw, 4.3rem);
  }

  .players-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .filter-bar {
    padding: 16px;
  }

  .about-section {
    margin-top: 58px;
    padding-bottom: 10px;
  }

  .about-signature {
    grid-template-columns: 1fr;
    gap: 30px;
    padding-left: 20px;
  }

  .about-copy h2 {
    font-size: clamp(2.6rem, 14vw, 4rem);
  }

  .about-text {
    font-size: 1rem;
    line-height: 1.75;
  }

  .about-mark {
    justify-self: start;
    grid-template-columns: auto 1fr;
    align-items: center;
  }

  .about-ball {
    width: 76px;
  }

  .rating-row {
    grid-template-columns: 1fr;
  }

  .player-header h2 {
    font-size: clamp(2.2rem, 14vw, 3.5rem);
  }
}

@media (max-width: 420px) {
  .site-header--simple {
    grid-template-columns: 1fr;
  }

  .site-name {
    font-size: 1.08rem;
  }

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