:root {
  --bg: #050507;
  --bg-2: #0b0c10;
  --surface: rgba(16, 18, 24, 0.92);
  --surface-2: #14161d;
  --line: rgba(225, 6, 0, 0.22);
  --line-soft: rgba(255, 255, 255, 0.06);
  --text: #f3f5f8;
  --muted: #9aa3b2;
  --red: #e10600;
  --red-2: #ff2a2a;
  --chrome: #d7dce4;
  --win: #7dffb3;
  --loss: #ff7b7b;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  --radius: 20px;
  --font: "Barlow", "Segoe UI", sans-serif;
  --display: "Rajdhani", "Barlow", sans-serif;
  --mono: "Share Tech Mono", "Consolas", monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; }
body {
  font-family: var(--font);
  color: var(--text);
  min-height: 100vh;
  max-width: 100%;
  background:
    radial-gradient(900px 420px at 50% -8%, rgba(225, 6, 0, 0.22), transparent 60%),
    radial-gradient(700px 300px at 100% 10%, rgba(225, 6, 0, 0.08), transparent 50%),
    linear-gradient(180deg, #07080c 0%, #050507 40%, #090b10 100%);
  background-attachment: fixed;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(225, 6, 0, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(225, 6, 0, 0.08) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse at top, #000 20%, transparent 75%);
}

a { color: var(--chrome); text-decoration: none; }
a:hover { color: var(--red-2); }
.container { width: min(1180px, calc(100% - 24px)); margin: 0 auto; position: relative; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: rgba(5, 5, 7, 0.78);
  border-bottom: 1px solid var(--line);
}
.header-inner, .footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}
.brand img,
.brand-mark {
  height: 46px;
  width: 46px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(225, 6, 0, 0.45));
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 0.9;
}
.brand-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.45rem;
  letter-spacing: 0.02em;
  font-style: italic;
}
.brand-name span { color: var(--red); }
.brand-sub {
  font-family: var(--display);
  font-size: 0.72rem;
  letter-spacing: 0.38em;
  color: var(--chrome);
  padding-left: 2px;
}
.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 12px;
  border-radius: 999px;
}
.nav a:hover, .nav a.active {
  color: var(--text);
  background: rgba(225, 6, 0, 0.16);
}

.hero { padding: 36px 0 18px; }
.hero h1, .section-title, .card h2, .card h3 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.hero h1 {
  font-size: clamp(2.1rem, 4.4vw, 3.5rem);
  margin: 0 0 10px;
  text-transform: uppercase;
}
.hero p { color: var(--muted); max-width: 100%; font-size: 1.08rem; overflow-wrap: anywhere; }
.player-hero {
  display: flex;
  align-items: center;
  gap: 20px;
}
.player-photo {
  width: 112px;
  height: 112px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--line);
  flex: 0 0 auto;
  background: var(--surface-2);
}
.photo-row {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.photo-preview {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--surface-2);
  flex: 0 0 auto;
}
.photo-preview.is-empty {
  box-shadow: inset 0 0 0 1px var(--line-soft);
}
.photo-actions { flex: 1 1 220px; min-width: 0; }
.photo-actions .form { margin: 0; }
.mvp-photo {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--line);
}
.kicker {
  display: inline-block;
  color: var(--red-2);
  font-family: var(--display);
  font-size: 0.82rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.hero-home {
  display: flex;
  align-items: stretch;
  gap: 16px 18px;
  padding: 8px 0 28px;
  text-align: left;
}
.hero-logo-wrap {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex: 1.1 1 0;
  width: 0;
  min-width: 0;
  text-align: center;
}
.hero-logo {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 0 28px rgba(225, 6, 0, 0.28));
}
.hero-lead {
  margin: 8px auto 0;
  flex: 0 0 auto;
  color: var(--muted);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.82rem;
}
.hero-side {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  width: 0;
  background: linear-gradient(180deg, rgba(20, 22, 30, 0.96), rgba(10, 11, 16, 0.96));
  border: 1px solid var(--line-soft);
  border-top: 1px solid rgba(225, 6, 0, 0.35);
  border-radius: var(--radius);
  padding: 14px 12px 16px;
  min-width: 0;
  box-shadow: var(--shadow);
}
.hero-side h2 {
  margin: 0 0 8px;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
}
.hero-side-kicker {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.03em;
  line-height: 1.35;
}
.hero-side-note {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.4;
}
.hero-stats-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 8px;
}
.hero-stats-head h2 {
  margin: 0;
  padding-top: 2px;
}
.hero-stats-photo {
  flex: 0 0 32px;
  width: 32px;
  height: 40px;
  display: block;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  object-fit: cover;
  object-position: top center;
}
.hero-stats-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}
a.hero-stats-photo:hover {
  border-color: rgba(225, 6, 0, 0.7);
}
.hero-side .table-wrap { margin: 0; overflow-x: auto; }
.standings-mini { font-size: 0.72rem; }
.standings-mini th,
.standings-mini td { padding: 5px 3px; }
.standings tr.is-mine td {
  background: rgba(225, 6, 0, 0.2);
  font-weight: 700;
}
.hero-avg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.hero-avg-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 8px;
  text-align: center;
}
.hero-avg-item span {
  display: block;
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero-avg-item b {
  display: block;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 1.2rem;
  color: var(--text);
}
.hero-more {
  display: inline;
  margin: 0;
  font-size: inherit;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hero-week {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.hero-last-meta {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}
.stars-board {
  margin: 0 0 28px;
  padding: 18px 16px 20px;
  background: linear-gradient(180deg, rgba(20, 22, 30, 0.96), rgba(10, 11, 16, 0.96));
  border: 1px solid var(--line-soft);
  border-top: 1px solid rgba(225, 6, 0, 0.35);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.stars-head { text-align: center; margin-bottom: 16px; }
.stars-head h2 {
  margin: 0;
  font-family: var(--display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.stars-ages {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.stars-age h3 {
  margin: 0 0 10px;
  font-size: 0.92rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  color: var(--red-2);
}
.stars-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.star-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  padding: 10px 8px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
a.star-card:hover { border-color: rgba(225, 6, 0, 0.55); }
.star-cat {
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.star-photo {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--surface-2);
}
.star-photo.is-empty { box-shadow: inset 0 0 0 1px var(--line-soft); }
.star-name {
  font-family: var(--display);
  font-size: 0.82rem;
  line-height: 1.2;
  letter-spacing: 0.02em;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.star-team {
  font-size: 0.68rem;
  color: var(--muted);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.star-val b {
  font-family: var(--mono);
  font-size: 1.05rem;
}
.star-val small {
  display: block;
  color: var(--muted);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.star-sub {
  font-size: 0.62rem;
  color: var(--muted);
  line-height: 1.3;
}

/* BGL: U14/U16/U18 gibi 3 sütun; satırda birleşik kutu (sol oyuncu / sağ istatistik) */
.stars-board-bgl {
  border-top-color: rgba(225, 6, 0, 0.45);
}
.stars-board-bgl .stars-ages.stars-bgl {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 14px;
  width: 100%;
}
.stars-board-bgl .stars-ages.stars-bgl > .stars-age {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
}
.stars-bgl-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.star-merge {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border-radius: 12px;
  border: 1px solid transparent;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
}
a.star-merge:hover { border-color: rgba(225, 6, 0, 0.55); }
.star-merge-left,
.star-merge-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 4px;
  padding: 10px 8px 12px;
  min-width: 0;
  flex: 1 1 50%;
  width: 50%;
  box-sizing: border-box;
}
.star-merge-left {
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}
.star-merge .star-photo {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
}
.star-merge .star-name {
  font-size: 0.82rem;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.2;
  max-width: 100%;
}
.star-merge .star-team {
  font-size: 0.68rem;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 100%;
}
.star-merge .star-val b {
  font-size: 1.2rem;
}
.star-merge .star-val small {
  display: block;
}
.star-merge .star-val-2 {
  margin-top: 2px;
}
.star-merge .star-val-2 b {
  font-size: 0.95rem;
}
.star-merge .star-sub {
  margin-top: 4px;
  max-width: 100%;
}

.hero-avg.hero-avg-last {
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.hero-avg-last .hero-avg-item {
  padding: 7px 4px;
}
.hero-avg-last .hero-avg-item b {
  font-size: 1rem;
}
a.hero-week-match {
  text-decoration: none;
  color: inherit;
}
.hero-week h3 {
  margin: 0 0 6px;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.hero-week-match {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  margin: 0;
}
.hero-week-match .fixture-teams { font-size: 0.78rem; }
.hero-week-match .fixture-age { font-size: 0.68rem; }
.hero-week-match .fixture-meta {
  font-size: 0.66rem;
  padding-top: 5px;
}

.il-board { padding: 22px; }
.il-board-top {
  margin: 0 0 22px;
  padding: 16px 18px;
}
.suggest-badge {
  display: inline-block;
  flex: 0 0 auto;
  margin-right: 2px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(180deg, var(--red-2), var(--red));
  vertical-align: middle;
}
.home-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}
.home-pane {
  margin: 0 0 12px;
  letter-spacing: 0.12em;
  font-size: 1.05rem;
}
.fixture-source { margin: -4px 0 12px; }
.fixture-filter { margin: 0 0 14px; }
.fixture-filter label { margin: 0; }
.fixture-filter select { width: 100%; cursor: pointer; }
.list.fixture-list { gap: 8px; }
.fixture-age-head {
  margin: 12px 0 2px;
  padding: 4px 2px 6px;
  font-size: 0.92rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
  background: transparent !important;
  border-left: 0;
  border-right: 0;
  border-radius: 0;
}
.fixture-age-head:first-child { margin-top: 0; }
.fixture-age-head.match-girls {
  color: #ffd6e7;
  border-bottom-color: rgba(255, 120, 170, 0.45);
}
.fixture-age-head.match-boys {
  color: #d4e6ff;
  border-bottom-color: rgba(90, 160, 255, 0.45);
}
.list .fixture-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  min-height: 0;
}
.fixture-age {
  font-family: var(--display);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1.2;
}
.fixture-teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  line-height: 1.25;
}
.fixture-home { text-align: left; }
.fixture-away { text-align: right; }
.fixture-vs {
  color: var(--red-2);
  font-family: var(--mono);
  font-size: 0.9rem;
}
.fixture-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  line-height: 1.35;
}
.lig-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}
.lig-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: inherit;
  line-height: 1.2;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.lig-chip:hover {
  border-color: rgba(225, 6, 0, 0.55);
  color: inherit;
  transform: translateY(-1px);
}
.il-picker { margin-bottom: 18px; }
.il-picker label { margin: 0; display: grid; gap: 6px; }
.il-picker input { width: 100%; }
.il-picker .suggest { max-width: 520px; }
.il-picker .muted { margin: 8px 0 0; }
.home-gender {
  margin: 18px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
  letter-spacing: 0.12em;
  font-size: 1rem;
}
.home-gender:first-of-type { margin-top: 0; }
.list a.match-girls,
.list .fixture-row.match-girls,
a.match-girls,
.star-card.match-girls,
.star-merge.match-girls,
.hero-week-match.match-girls,
.card.scoreboard.match-girls,
tr.match-girls td {
  background: rgba(232, 80, 140, 0.16);
}
.list a.match-girls,
.list .fixture-row.match-girls,
a.match-girls,
.star-card.match-girls,
.star-merge.match-girls,
.hero-week-match.match-girls,
.card.scoreboard.match-girls {
  border-color: rgba(255, 120, 170, 0.28);
  color: #ffd6e7;
}
.list a.match-girls,
.list .fixture-row.match-girls,
.hero-week-match.match-girls { color: #ffd6e7; }
.list a.match-girls:hover,
a.match-girls:hover { border-color: #ff7eb0; }
.card.scoreboard.match-girls {
  background:
    radial-gradient(circle at 50% 0%, rgba(232, 80, 140, 0.32), transparent 55%),
    linear-gradient(180deg, rgba(42, 14, 28, 0.96), rgba(14, 8, 12, 0.96));
  border-top-color: rgba(255, 120, 170, 0.55);
}
.list a.match-boys,
.list .fixture-row.match-boys,
a.match-boys,
.star-card.match-boys,
.star-merge.match-boys,
.hero-week-match.match-boys,
.card.scoreboard.match-boys,
tr.match-boys td {
  background: rgba(50, 110, 210, 0.18);
}
.list a.match-boys,
.list .fixture-row.match-boys,
a.match-boys,
.star-card.match-boys,
.star-merge.match-boys,
.hero-week-match.match-boys,
.card.scoreboard.match-boys {
  border-color: rgba(90, 160, 255, 0.3);
  color: #d4e6ff;
}
.list a.match-boys,
.list .fixture-row.match-boys,
.hero-week-match.match-boys { color: #d4e6ff; }
.list a.match-boys:hover,
a.match-boys:hover { border-color: #6aa8ff; }
.card.scoreboard.match-boys {
  background:
    radial-gradient(circle at 50% 0%, rgba(50, 110, 210, 0.34), transparent 55%),
    linear-gradient(180deg, rgba(12, 20, 42, 0.96), rgba(8, 12, 22, 0.96));
  border-top-color: rgba(90, 160, 255, 0.55);
}
.group-board { margin-bottom: 18px; }
.standings {
  table-layout: fixed;
  width: 100%;
  font-size: 0.88rem;
}
.standings th,
.standings td {
  padding: 8px 6px;
  vertical-align: middle;
}
.standings th:first-child,
.standings td:first-child {
  width: 28px;
  white-space: nowrap;
}
.standings th.num,
.standings td.num {
  width: 36px;
  padding-left: 2px;
  padding-right: 2px;
}
.standings td:nth-child(2) {
  overflow-wrap: anywhere;
}

.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.card {
  background: linear-gradient(180deg, rgba(20, 22, 30, 0.96), rgba(10, 11, 16, 0.96));
  border: 1px solid var(--line-soft);
  border-top: 1px solid rgba(225, 6, 0, 0.35);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.card h2, .card h3 { margin: 0 0 12px; text-transform: uppercase; }
.muted { color: var(--muted); }
.list { display: flex; flex-direction: column; gap: 10px; }
.list a, .score-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid transparent;
}
.list a span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}
.home-match-date {
  flex: 0 0 auto;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.match-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}
.list a:hover { border-color: var(--red); }
.score {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--red-2);
}

.table-wrap { overflow: visible; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
th, td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}
th {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
td.num, th.num { text-align: right; font-family: var(--mono); white-space: nowrap; }
.starter { color: var(--red-2); }

.scoreboard {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  text-align: center;
  padding: 32px 18px;
  background:
    radial-gradient(circle at 50% 0%, rgba(225, 6, 0, 0.18), transparent 55%),
    linear-gradient(180deg, rgba(20, 22, 30, 0.96), rgba(10, 11, 16, 0.96));
}
.scoreboard .big {
  font-family: var(--display);
  font-size: clamp(3rem, 7vw, 5.2rem);
  line-height: 0.9;
  margin: 8px 0 0;
  text-shadow: 0 0 24px rgba(225, 6, 0, 0.45);
}
.scoreboard .team {
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text);
  overflow-wrap: anywhere;
}
.quarters { display: flex; gap: 8px; justify-content: center; margin-top: 10px; flex-wrap: wrap; }
.quarters span {
  min-width: 46px;
  padding: 6px 8px;
  border-radius: 8px;
  background: #00000088;
  border: 1px solid var(--line);
  font-family: var(--mono);
}
.score-flow { margin: 16px 0 8px; }
.score-flow-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.score-flow-head h2 { margin: 0; font-size: 1.05rem; }
.score-flow-legend { display: flex; gap: 14px; font-size: 0.82rem; font-weight: 700; }
.sf-home { color: #7dffb3; }
.sf-away { color: #ff6b6b; }
.score-flow-wrap { overflow-x: auto; }
.score-flow-chart { width: 100%; min-width: 640px; height: auto; display: block; }
.score-flow-quarters {
  display: grid;
  gap: 8px;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.75rem;
  text-align: center;
}
.score-flow-note { margin: 8px 0 0; font-size: 0.78rem; }

.form { display: grid; gap: 12px; }
label { display: grid; gap: 6px; color: var(--muted); font-size: 0.9rem; }
input, select, button, textarea { font: inherit; color: var(--text); }
input, select, textarea {
  background: #090a0e;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 11px 12px;
}
input:focus, select:focus {
  outline: 1px solid var(--red);
  border-color: var(--red);
}
button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  padding: 12px 18px;
  background: linear-gradient(180deg, var(--red-2), var(--red));
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(225, 6, 0, 0.28);
}
.btn.secondary {
  background: #1b1e27;
  color: var(--text);
  box-shadow: none;
  margin-left: 8px;
}
button.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--chrome);
  box-shadow: none;
}
.nav-user {
  color: var(--chrome);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.plan-badge {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(180deg, var(--red-2), var(--red));
  border-radius: 999px;
  padding: 3px 8px;
}
.own-stat td {
  background: rgba(225, 6, 0, 0.08);
}
.member-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}
.member-cta h2 { margin: 0 0 6px; }
.member-cta p { margin: 0; max-width: 640px; }
.stats-locked {
  position: relative;
  isolation: isolate;
  min-height: 220px;
  margin: 18px 0 28px;
  border-radius: var(--radius);
  overflow: hidden;
}
.card > .stats-locked {
  margin: 8px 0 4px;
}
.stats-locked-inner {
  filter: blur(8px) saturate(0.65);
  transform: scale(1.015);
  user-select: none;
  pointer-events: none;
}
.share-stopped {
  margin: 8px 0 0;
  color: var(--red, #e10600);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.92rem;
}
td.share-stopped {
  text-align: left;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.85rem;
}
.stats-locked-cta {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(5, 5, 7, 0.28), rgba(5, 5, 7, 0.78));
}
.stats-locked-cta p {
  margin: 0;
  max-width: 420px;
  color: var(--text);
  font-weight: 600;
}
.stats-locked-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.stats-locked-actions .btn.secondary { margin-left: 0; }
.alert {
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 14px;
}
.alert.ok { background: #10251a; color: var(--win); }
.alert.err { background: #2a1010; color: var(--loss); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat {
  padding: 16px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
}
.stat b {
  display: block;
  font-family: var(--display);
  font-size: 1.8rem;
}
.stat span { color: var(--muted); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; }

.section-title { margin: 28px 0 12px; text-transform: uppercase; }

.site-footer {
  margin-top: 56px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer-brand img { height: 28px; width: 28px; }
.tagline { letter-spacing: 0.18em; text-transform: uppercase; font-size: 0.72rem; }
.tagline b { color: var(--red-2); font-weight: 600; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }

.login-wrap { min-height: 70vh; display: grid; place-items: center; padding: 32px 0; }
.login-card { width: min(520px, calc(100% - 32px)); text-align: center; }
.login-card .hero-logo { width: min(280px, 80%); margin-bottom: 8px; }
.login-card .form { text-align: left; }
label.check {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
}
label.check input {
  width: auto;
  margin-top: 3px;
  flex: 0 0 auto;
}
.notice-red {
  color: #ff4d4d;
  font-weight: 700;
  letter-spacing: 0.01em;
}
h2 .notice-red {
  display: inline-block;
  margin-left: 8px;
  font-size: 0.72em;
  text-transform: uppercase;
}
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (max-width: 980px) {
  .hero-home {
    flex-direction: column;
    gap: 14px;
  }
  .hero-logo-wrap {
    order: -1;
    width: auto;
    flex: 0 0 auto;
  }
  .hero-logo {
    width: min(360px, 88%);
    flex: 0 0 auto;
    height: auto;
  }
  .hero-side {
    width: auto;
    flex: 0 0 auto;
  }
  .hero-avg { grid-template-columns: repeat(4, 1fr); }
  .stars-ages { grid-template-columns: 1fr; }
  .stars-board-bgl .stars-ages.stars-bgl {
    flex-direction: column;
    flex-wrap: wrap;
    gap: 16px;
  }
  .stars-board-bgl .stars-ages.stars-bgl > .stars-age {
    flex: 1 1 auto;
    width: 100%;
  }
  .star-merge .star-photo { width: 48px; height: 48px; }
  .star-merge .star-val b { font-size: 1.1rem; }
}

@media (max-width: 720px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .scoreboard { grid-template-columns: 1fr; padding: 22px 14px; }
  .scoreboard .big { font-size: 2.6rem; }
  .brand-text { display: none; }
  .nav a { padding: 6px 8px; font-size: 0.78rem; }
  .member-cta { flex-direction: column; align-items: flex-start; }
  .hero { padding: 22px 0 12px; }
  .hero h1 { font-size: 1.7rem; }
  .card { padding: 14px; }
  .il-board { padding: 14px; }
  .home-split { grid-template-columns: 1fr; gap: 22px; }
  .hero-avg { grid-template-columns: 1fr 1fr; }
  .hero-avg-item b { font-size: 1.35rem; }
  .hero-side { padding: 14px; }
  .fixture-age {
    font-size: 0.88rem;
    letter-spacing: 0.14em;
  }
  .fixture-age-head { font-size: 1rem; }
  .fixture-teams {
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 2px;
  }
  .fixture-away { text-align: left; }
  .fixture-vs {
    display: block;
    font-size: 0.72rem;
    line-height: 1;
    margin: 1px 0;
  }
  .stat b { font-size: 1.4rem; }
  .header-inner, .footer-inner { gap: 10px; }
  .footer-inner { flex-wrap: wrap; }
  .standings { font-size: 0.72rem; }
  .standings th,
  .standings td { padding: 7px 3px; }
  .standings th:first-child,
  .standings td:first-child { width: 20px; }
  .standings th.num,
  .standings td.num { width: 26px; }
  .standings .opt { display: none; }
  .group-board .list a {
    padding: 10px 12px;
    font-size: 0.88rem;
  }
}

@media (max-width: 860px) {
  table.stack thead { display: none; }
  table.stack,
  table.stack tbody {
    display: block;
    width: 100%;
  }
  table.stack tr {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
  }
  table.stack td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    padding: 5px 0;
    border-bottom: 0;
    text-align: right;
  }
  table.stack td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: left;
    flex: 0 0 38%;
  }
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin: 12px 0 4px;
}
.form-grid .span-2 { grid-column: 1 / -1; }

.upload-split {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 18px;
  align-items: start;
}
.upload-pane-title {
  margin: 0 0 12px;
  font-size: 1.15rem;
}
.upload-edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.sched-time-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.sched-time-fields select,
#run-at-date {
  min-height: 42px;
}
.upload-queue-head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.upload-queue-head .upload-pane-title { margin: 0; }
.upload-queue-run { margin: 0; }
.upload-queue-hint { margin: 0 0 12px; }
.sched-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.sched-item {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}
.sched-item.status-pending { border-color: rgba(90, 160, 255, 0.35); }
.sched-item.status-failed { border-color: rgba(255, 107, 107, 0.45); }
.sched-item.status-done { border-color: rgba(61, 255, 154, 0.28); opacity: 0.85; }
.sched-id { font-size: 0.95rem; }
.sched-when {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.sched-meta, .sched-note { font-size: 0.8rem; margin-top: 2px; }
.sched-err {
  margin-top: 4px;
  color: #ff8a8a;
  font-size: 0.78rem;
}
.sched-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sched-actions form { margin: 0; }
@media (max-width: 900px) {
  .upload-split { grid-template-columns: 1fr; }
}
.suggest { position: relative; }
.suggest-list {
  position: absolute;
  z-index: 8;
  left: 0;
  right: 0;
  top: calc(100% - 4px);
  margin: 0;
  padding: 6px 0;
  list-style: none;
  max-height: 260px;
  overflow: auto;
  background: #101218;
  border: 1px solid var(--line-soft, rgba(255,255,255,0.12));
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.35);
}
.suggest-list button {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  color: inherit;
  padding: 8px 12px;
  font-size: 0.88rem;
  cursor: pointer;
}
.suggest-list button:hover {
  background: rgba(225, 6, 0, 0.18);
}
.suggest-empty {
  padding: 8px 12px;
  color: var(--muted);
  font-size: 0.85rem;
}
.filter-row {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: end;
}
.quarter-edit {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 8px;
}
.quarter-edit span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.edit-stats {
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}
.edit-stats table {
  min-width: 1080px;
}
.edit-stats th {
  font-size: 0.72rem;
  white-space: nowrap;
}
.edit-stats input.stat,
.quarter-edit input.stat {
  width: 3.15rem;
  padding: 6px 4px;
  text-align: right;
  border-radius: 8px;
}
.edit-stats input.jersey { width: 2.8rem; text-align: center; }
.edit-stats input.mins { width: 3.5rem; text-align: center; }
.edit-stats input.name-input {
  min-width: 132px;
  width: 100%;
  padding: 6px 8px;
}

th.analiz-col, td.analiz-col { width: 1%; white-space: nowrap; }
.analiz-pick {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.analiz-pick input { accent-color: var(--red); }
.analiz-pick.is-off { opacity: 0.38; cursor: default; }

.mvp-board {
  margin-top: 18px;
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(700px 240px at 80% 0%, rgba(61, 255, 154, 0.08), transparent 60%),
    linear-gradient(180deg, rgba(10, 14, 20, 0.96), rgba(5, 5, 7, 0.94));
}
.mvp-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.mvp-kicker {
  color: #ffd24a;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
}
.mvp-head h2 { margin: 4px 0 0; font-family: var(--display); }
.mvp-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  align-items: center;
}
.mvp-id { display: flex; flex-direction: column; }
.mvp-id b { font-size: 1.4rem; font-family: var(--display); }
.mvp-stat { display: flex; flex-direction: column; }
.mvp-stat b { font-family: var(--mono); font-size: 1.15rem; }
.mvp-stat span, .mvp-id span { color: var(--muted); font-size: 0.78rem; }
.mvp-badge {
  background: linear-gradient(180deg, #3dff9a, #12c96a);
  color: #052013;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
  border-radius: 14px;
  padding: 10px 14px;
  min-width: 132px;
}
.mvp-badge small { display: block; letter-spacing: 0; font-weight: 700; font-size: 0.68rem; }
.mvp-sub { margin: 8px 0 12px; }
.mvp-chart-wrap {
  position: relative;
  overflow-x: auto;
}
.mvp-chart { width: 100%; min-width: 720px; height: auto; display: block; }
.mvp-dot { cursor: pointer; outline: none; }
.mvp-dot-hit { pointer-events: all; }
.mvp-dot:hover .mvp-dot-core,
.mvp-dot:focus .mvp-dot-core {
  r: 7.5;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.35));
}
.mvp-tip {
  position: absolute;
  z-index: 12;
  min-width: 160px;
  max-width: 240px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line-soft);
  background: rgba(10, 12, 18, 0.96);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  pointer-events: none;
  font-size: 0.82rem;
  line-height: 1.35;
}
.mvp-tip.is-pos { border-color: rgba(61, 255, 154, 0.45); }
.mvp-tip.is-neg { border-color: rgba(255, 107, 107, 0.45); }
.mvp-tip-clock {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 4px;
}
.mvp-tip-action {
  font-weight: 700;
  margin-bottom: 4px;
}
.mvp-tip-delta {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1rem;
}
.mvp-tip.is-pos .mvp-tip-delta { color: #7dffb3; }
.mvp-tip.is-neg .mvp-tip-delta { color: #ff8a8a; }
.mvp-tip-total {
  margin-top: 4px;
  font-size: 0.72rem;
  color: var(--muted);
}
.mvp-total-label {
  pointer-events: none;
  paint-order: stroke;
  stroke: rgba(5, 5, 7, 0.9);
  stroke-width: 3px;
}
.mvp-actions {
  margin: 18px 0 14px;
}
.mvp-actions h3 {
  margin: 0 0 10px;
  font-size: 0.95rem;
}
.mvp-actions-table {
  width: 100%;
  font-size: 0.88rem;
}
.mvp-actions-table th,
.mvp-actions-table td {
  padding: 8px 10px;
  vertical-align: middle;
}
.mvp-actions-table tbody tr:nth-child(odd) {
  background: rgba(255, 255, 255, 0.03);
}
.mvp-actions-table .pos { color: #7dffb3; font-weight: 700; }
.mvp-actions-table .neg { color: #ff8a8a; font-weight: 700; }
.mvp-quarters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.75rem;
  text-align: center;
}
.mvp-quarters span { min-width: 0; overflow-wrap: anywhere; }
.mvp-contrib {
  display: grid;
  grid-template-columns: 1fr minmax(180px, 220px);
  gap: 16px;
  margin-top: 16px;
  align-items: start;
}
.mvp-contrib h3 { margin: 0 0 10px; font-size: 0.95rem; }
.mvp-cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.mvp-card {
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 10px 8px;
  text-align: center;
}
.mvp-card b { display: block; font-family: var(--mono); font-size: 1.15rem; }
.mvp-card span { display: block; color: var(--muted); font-size: 0.75rem; }
.mvp-card small { color: var(--muted); }
.mvp-card.pos b { color: #7dffb3; }
.mvp-card.neg b { color: #ff7b7b; }
.mvp-total {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: var(--surface);
}
.mvp-total div { margin-bottom: 8px; color: var(--muted); }
.mvp-total .pos { color: #7dffb3; font-family: var(--mono); font-weight: 700; }
.mvp-total .neg { color: #ff7b7b; font-family: var(--mono); font-weight: 700; }
.mvp-total strong { display: block; margin-top: 10px; font-size: 1.05rem; }
.mvp-legend { margin: 12px 0 0; font-size: 0.8rem; }
.mvp-formula {
  margin: 6px 0 0;
  font-size: 0.8rem;
  line-height: 1.55;
}
.mvp-formula strong { color: var(--text); font-weight: 700; }
.share-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 10px 0 0;
  flex: 0 0 auto;
}
.share-bar button {
  padding: 8px 10px;
  font-size: 0.72rem;
}
.share-bar button:first-of-type {
  grid-column: 1 / -1;
}
.share-bar .js-share-status {
  grid-column: 1 / -1;
  font-size: 0.72rem;
}
.share-bar.is-locked {
  position: relative;
  cursor: not-allowed;
}
.share-bar.is-locked button {
  opacity: 0.42;
  cursor: not-allowed;
  pointer-events: none;
}
.share-lock-tip {
  display: none;
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  z-index: 6;
  width: max-content;
  max-width: 240px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #1a1d24;
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}
.share-bar.is-locked:hover .share-lock-tip {
  display: block;
}
.share-note { margin: 0 0 12px; font-size: 0.8rem; }

.captcha-puzzle {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
}
.captcha-puzzle legend {
  padding: 0 6px;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 700;
}
.captcha-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.captcha-tile {
  display: block;
  position: relative;
  margin: 0;
  padding: 0;
  gap: 0;
  cursor: pointer;
  border: 2px solid var(--line-soft);
  border-radius: 10px;
  overflow: hidden;
  background: #0c0e14;
}
.captcha-tile input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.captcha-tile svg {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}
.captcha-tile:has(input:focus-visible) {
  outline: 2px solid var(--red-2);
  outline-offset: 2px;
}
.captcha-tile:has(input:checked) {
  border-color: var(--red);
  box-shadow: 0 0 0 1px var(--red);
}
.captcha-tile:has(input:checked)::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2' d='M2 6.5l2.5 2.5L10 3'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.captcha-hint { margin: 8px 0 0; font-size: 0.8rem; }

@media (max-width: 860px) {
  .mvp-contrib, .mvp-cards { grid-template-columns: 1fr 1fr; }
  .mvp-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  td.analiz-col {
    justify-content: flex-start;
  }
  td.analiz-col::before { flex: 0 0 auto; }
}

/* Instagram carousel admin */
.ig-admin { display: grid; gap: 1rem; }
.ig-templates {
  display: grid; gap: 0.75rem;
  padding: 1rem; border: 1px solid #e8e8e8; border-radius: 12px; background: #fafafa;
}
.ig-templates-head {
  display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; justify-content: space-between;
}
.ig-file-btn { cursor: pointer; margin: 0; }
.ig-template-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.75rem;
  min-height: 2rem;
}
.ig-template-card {
  position: relative; margin: 0; border: 1px solid #ddd; border-radius: 10px;
  overflow: hidden; background: #fff;
}
.ig-template-card img {
  display: block; width: 100%; aspect-ratio: 4/5; object-fit: cover; background: #eee;
}
.ig-template-card .ig-template-meta {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.35rem 0.45rem; font-size: 0.75rem; font-weight: 700; background: #111; color: #fff;
}
.ig-template-card button {
  border: 0; background: transparent; color: #fff; cursor: pointer; font-size: 0.85rem; padding: 0 0.2rem;
}
.ig-toolbar {
  display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-end;
}
.ig-match-extra {
  display: flex; flex-wrap: wrap; gap: 0.85rem; align-items: center;
}
.ig-match-extra a[data-ig-match-link] {
  font-weight: 600; text-decoration: underline; color: var(--text);
}
.ig-toolbar label { display: grid; gap: 0.35rem; font-weight: 600; min-width: 280px; flex: 1; color: var(--text); }
.ig-toolbar select,
.ig-toolbar select option,
.ig-admin textarea {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid #555;
  border-radius: 8px;
  font: inherit;
  font-family: system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  color: #111 !important;
  background: #fff !important;
  -webkit-text-fill-color: #111;
}
.ig-toolbar select option {
  color: #111;
  background: #fff;
}
.ig-admin textarea { font-family: ui-monospace, Consolas, monospace; font-size: 0.9rem; }
.ig-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.ig-slot {
  margin: 0; border: 1px solid #e8e8e8; border-radius: 12px; overflow: hidden;
  background: #fafafa;
}
.ig-slot-head {
  padding: 0.4rem 0.65rem; font-weight: 700; font-size: 0.85rem;
  background: #111; color: #fff;
}
.ig-slot img, .ig-slot canvas {
  display: block; width: 100%; height: auto; background: #fff;
}
.ig-slot figcaption { padding: 0.45rem 0.65rem; font-size: 0.75rem; }
@media (max-width: 700px) {
  .ig-toolbar { flex-direction: column; align-items: stretch; }
  .ig-templates-head { flex-direction: column; align-items: stretch; }
}
