/* GOLAZO ’26 — vintage match-day program aesthetic */

:root {
  --ink: #23251c;
  --ink-soft: #5a5c4e;
  --paper: #f4edda;
  --paper-deep: #ece2c8;
  --card: #fdfaf0;
  --green: #0a6b3d;
  --green-deep: #084d2c;
  --red: #d8432f;
  --gold: #eba937;
  --line: #23251c;
  --shadow: 4px 4px 0 rgba(35, 37, 28, 0.92);
  --shadow-sm: 3px 3px 0 rgba(35, 37, 28, 0.9);
  --radius: 10px;
  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --body: "Libre Franklin", Georgia, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--paper);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
  color: var(--ink);
  font-family: var(--body);
  font-size: 15.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--green); }

/* ---------- masthead ---------- */

.masthead {
  background: var(--green-deep);
  background-image:
    radial-gradient(circle at 12% 110%, rgba(235, 169, 55, 0.22), transparent 42%),
    radial-gradient(circle at 88% -20%, rgba(216, 67, 47, 0.25), transparent 45%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.12'/%3E%3C/svg%3E");
  color: var(--paper);
  border-bottom: 3px solid var(--ink);
  overflow: hidden;
}

.masthead-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 30px 20px 0;
  position: relative;
}

.masthead-kicker {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  border-bottom: 1px solid rgba(244, 237, 218, 0.35);
  padding-bottom: 8px;
  animation: rise 0.5s ease-out both;
}

.masthead-title {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(64px, 13vw, 148px);
  line-height: 0.88;
  letter-spacing: 0.01em;
  margin: 14px 0 6px;
  text-transform: uppercase;
  animation: rise 0.55s 0.08s ease-out both;
}

.title-year {
  color: var(--gold);
  -webkit-text-stroke: 0;
  margin-left: 0.08em;
}

.masthead-sub {
  max-width: 520px;
  margin: 0 0 26px;
  font-size: 15px;
  color: rgba(244, 237, 218, 0.85);
  animation: rise 0.6s 0.16s ease-out both;
}

.masthead-stripes { display: flex; height: 10px; margin: 0 -20px; }
.masthead-stripes i { flex: 1; }
.masthead-stripes i:nth-child(1) { background: var(--red); }
.masthead-stripes i:nth-child(2) { background: var(--paper); }
.masthead-stripes i:nth-child(3) { background: var(--gold); }

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

/* ---------- tabs ---------- */

.tabs {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  gap: 0;
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
  padding: 0 max(20px, calc((100% - 1080px) / 2));
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tab {
  appearance: none;
  border: none;
  background: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: 21px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  padding: 14px 18px 10px;
  cursor: pointer;
  border-bottom: 4px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: color 0.15s;
}
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--ink); border-bottom-color: var(--red); }

/* ---------- layout ---------- */

main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 26px 20px 60px;
}

.panel { display: none; }
.panel.is-active { display: block; animation: rise 0.3s ease-out both; }

.panel-note {
  font-size: 13.5px;
  color: var(--ink-soft);
  max-width: 640px;
  margin: 2px 0 20px;
}

.panel-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.seg {
  display: inline-flex;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--card);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.seg button {
  appearance: none;
  border: none;
  background: none;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 8px 15px;
  cursor: pointer;
  color: var(--ink-soft);
}
.seg button + button { border-left: 2px solid var(--ink); }
.seg button.is-on { background: var(--ink); color: var(--paper); }

#group-filter {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  padding: 8px 14px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.data-stamp {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}
.data-stamp button {
  appearance: none; border: none; background: none; cursor: pointer;
  font: inherit; color: var(--green); text-decoration: underline; padding: 0;
}

/* ---------- match list ---------- */

.day-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 30px 0 14px;
}
.day-header:first-child { margin-top: 0; }

.day-header h3 {
  font-family: var(--display);
  font-weight: 900;
  font-size: 26px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 0;
  white-space: nowrap;
}
.day-header .rule { flex: 1; border-top: 2px dashed rgba(35, 37, 28, 0.4); }
.day-header .day-count {
  font-family: var(--mono); font-size: 11px; color: var(--ink-soft);
  text-transform: uppercase; letter-spacing: 0.1em; white-space: nowrap;
}
.day-header.is-today h3 { color: var(--red); }
.day-header .today-badge {
  font-family: var(--mono); font-size: 10.5px; font-weight: 600;
  background: var(--red); color: var(--paper);
  padding: 3px 9px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: 0.12em;
  transform: rotate(-2deg);
}

.match-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 14px;
}

/* ticket-stub match card */
.match-card {
  position: relative;
  display: flex;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.12s ease-out;
}
.match-card:hover { transform: translate(-1px, -1px); }

.stub {
  flex: 0 0 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-right: 2px dashed var(--ink);
  background: var(--paper-deep);
  font-family: var(--mono);
  padding: 10px 4px;
  text-align: center;
}
.stub .stub-time { font-size: 13px; font-weight: 600; }
.stub .stub-meta { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); }
.stub .stub-score {
  font-family: var(--display); font-weight: 900; font-size: 26px; line-height: 1;
  letter-spacing: 0.02em;
}
.stub .stub-pen { font-size: 9.5px; color: var(--red); font-weight: 600; }

/* punched holes on the perforation */
.match-card::before, .match-card::after {
  content: "";
  position: absolute;
  /* 18px outer width (pseudos are content-box): center x = left + 9 must hit
     the stub's dashed border-right, whose center is at 64 - 2/2 = 63px */
  left: 54px;
  width: 14px; height: 14px;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 50%;
  z-index: 2;
}
.match-card::before { top: -9px; }
.match-card::after { bottom: -9px; }

.match-body { flex: 1; padding: 10px 14px; min-width: 0; }

.match-tags {
  display: flex; gap: 6px; align-items: center;
  font-family: var(--mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.match-tags .tag {
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  padding: 1px 6px;
  font-weight: 600;
  color: var(--ink);
  background: var(--paper-deep);
  white-space: nowrap;
  flex-shrink: 0;
}
.match-tags .tag.knockout { background: var(--gold); }
.match-tags .venue { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.match-teams { display: flex; flex-direction: column; gap: 4px; }
.team-row {
  display: flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 14.5px;
}
.team-row .flag { width: 22px; height: 16px; object-fit: cover; border: 1px solid rgba(35,37,28,0.55); border-radius: 2px; flex: 0 0 22px; }
.team-row .flag-tbd {
  width: 22px; height: 16px; flex: 0 0 22px; border: 1px dashed rgba(35,37,28,0.5);
  border-radius: 2px; background: var(--paper-deep);
}
.team-row .tname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-row .tname.tbd { color: var(--ink-soft); font-weight: 500; font-style: italic; }
.team-row .tgoals { margin-left: auto; font-family: var(--mono); font-size: 15px; font-weight: 600; }
.team-row.loser { opacity: 0.55; }
.team-row.winner .tgoals { color: var(--green); }

.match-scorers {
  margin-top: 7px;
  font-size: 11.5px;
  color: var(--ink-soft);
  border-top: 1px dotted rgba(35,37,28,0.35);
  padding-top: 5px;
}
.match-scorers summary { cursor: pointer; font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.07em; }

.live-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--red); margin-right: 5px;
  animation: pulse 1.2s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.25; } }

.empty-note {
  text-align: center; padding: 50px 20px;
  font-family: var(--mono); color: var(--ink-soft); font-size: 13px;
}

/* ---------- groups ---------- */

.groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 16px;
}

.group-card {
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.group-card h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 900;
  font-size: 22px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--green);
  color: var(--paper);
  padding: 8px 14px;
  border-bottom: 2px solid var(--ink);
}

.group-card table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.group-card th {
  font-family: var(--mono); font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink-soft); text-align: right; padding: 7px 6px 4px;
  border-bottom: 1.5px solid rgba(35,37,28,0.4);
}
.group-card th:first-child { text-align: left; padding-left: 12px; }
.group-card td { padding: 6px 6px; text-align: right; font-family: var(--mono); font-size: 12.5px; border-bottom: 1px dotted rgba(35,37,28,0.25); }
.group-card tr:last-child td { border-bottom: none; }
.group-card td.gteam {
  text-align: left; font-family: var(--body); font-weight: 600; font-size: 13.5px;
  padding-left: 12px; display: flex; align-items: center; gap: 7px;
}
.group-card td.gteam .flag { width: 20px; height: 14px; object-fit: cover; border: 1px solid rgba(35,37,28,0.5); border-radius: 2px; }
.group-card td .pts { font-weight: 700; }
.group-card tr.q-direct td.gteam { box-shadow: inset 3px 0 0 var(--green); }
.group-card tr.q-third td.gteam { box-shadow: inset 3px 0 0 var(--gold); }

/* ---------- bracket ---------- */

.bracket-head {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  margin-bottom: 8px;
}
.bracket-head h2 {
  font-family: var(--display); font-weight: 900; font-size: 34px;
  text-transform: uppercase; margin: 0; letter-spacing: 0.02em;
}
.bracket-actions { margin-left: auto; display: flex; gap: 9px; flex-wrap: wrap; }

.btn {
  appearance: none; cursor: pointer;
  font-family: var(--mono); font-size: 12.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
  border: 2px solid var(--ink); border-radius: 8px;
  background: var(--card); color: var(--ink);
  padding: 9px 15px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.1s;
}
.btn:hover { transform: translate(-1px, -1px); }
.btn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--ink); }
.btn.primary { background: var(--red); color: var(--paper); }
.btn.ghost { box-shadow: none; background: none; }

.name-row { display: flex; align-items: center; gap: 10px; margin: 10px 0 4px; flex-wrap: wrap; }
.name-row label { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; }
#bracket-name {
  font-family: var(--body); font-weight: 600; font-size: 15px;
  border: 2px solid var(--ink); border-radius: 8px;
  background: var(--card); padding: 8px 12px; width: 210px;
  box-shadow: var(--shadow-sm);
}
#bracket-name:focus { outline: 2px solid var(--gold); }

.bracket-progress {
  font-family: var(--mono); font-size: 12px; color: var(--ink-soft);
  margin: 4px 0 18px;
}
.bracket-progress b { color: var(--green); }

.bracket-step {
  margin: 26px 0 14px;
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
}
.bracket-step h3 {
  font-family: var(--display); font-weight: 900; font-size: 25px;
  text-transform: uppercase; margin: 0;
}
.bracket-step .step-num {
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  background: var(--ink); color: var(--paper);
  border-radius: 999px; padding: 3px 10px;
  text-transform: uppercase; letter-spacing: 0.1em;
}
.bracket-step .hint { font-size: 12.5px; color: var(--ink-soft); }
.bracket-step .mini-btn {
  appearance: none; border: none; background: none; cursor: pointer;
  font-family: var(--mono); font-size: 11.5px; color: var(--green);
  text-decoration: underline; padding: 0;
}

.pick-groups {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}

.pick-group {
  background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.pick-group h4 {
  margin: 0; padding: 6px 12px;
  font-family: var(--display); font-weight: 700; font-size: 17px;
  text-transform: uppercase; letter-spacing: 0.06em;
  background: var(--paper-deep); border-bottom: 2px solid var(--ink);
  display: flex; justify-content: space-between; align-items: center;
}
.pick-group h4 .done { color: var(--green); font-size: 13px; font-family: var(--mono); }

.pick-team {
  display: flex; align-items: center; gap: 8px;
  width: 100%; text-align: left;
  appearance: none; background: none; border: none;
  border-bottom: 1px dotted rgba(35,37,28,0.3);
  font-family: var(--body); font-weight: 600; font-size: 13.5px; color: var(--ink);
  padding: 7px 12px; cursor: pointer;
}
.pick-team:last-child { border-bottom: none; }
.pick-team:hover { background: rgba(235, 169, 55, 0.15); }
.pick-team .flag { width: 20px; height: 14px; object-fit: cover; border: 1px solid rgba(35,37,28,0.5); border-radius: 2px; }
.pick-team .rank {
  margin-left: auto;
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  width: 22px; height: 22px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid transparent;
}
.pick-team[data-rank="1"] .rank { background: var(--green); color: var(--paper); }
.pick-team[data-rank="2"] .rank { background: var(--gold); color: var(--ink); }
.pick-team[data-rank="3"] .rank { background: var(--paper-deep); color: var(--ink); border-color: var(--ink); }
.pick-team[data-rank="x"] { opacity: 0.45; }

.third-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}
.third-slot {
  background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 10px 12px;
}
.third-slot .ts-head {
  font-family: var(--mono); font-size: 11px; color: var(--ink-soft);
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 7px;
}
.third-slot .ts-head b { color: var(--ink); }
.third-slot .ts-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.ts-chip {
  appearance: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px;
  border: 1.5px solid var(--ink); border-radius: 999px;
  background: var(--paper-deep); color: var(--ink);
  font-family: var(--body); font-weight: 600; font-size: 12px;
  padding: 4px 10px;
}
.ts-chip .flag { width: 16px; height: 11px; object-fit: cover; border-radius: 1px; }
.ts-chip.is-on { background: var(--green); color: var(--paper); }
.ts-chip:disabled { opacity: 0.35; cursor: not-allowed; }

.locked-note {
  font-family: var(--mono); font-size: 12px; color: var(--ink-soft);
  border: 1.5px dashed rgba(35,37,28,0.45); border-radius: 8px;
  padding: 12px 14px; margin-top: 6px;
}

/* knockout tree */
.ko-scroll { overflow-x: auto; padding: 6px 2px 18px; }
.ko-tree { display: flex; gap: 22px; min-width: max-content; align-items: stretch; }
.ko-round { display: flex; flex-direction: column; min-width: 215px; }
.ko-round-title {
  font-family: var(--display); font-weight: 900; font-size: 17px;
  text-transform: uppercase; letter-spacing: 0.05em;
  text-align: center; margin-bottom: 10px;
  border-bottom: 2px solid var(--ink); padding-bottom: 4px;
}
.ko-matches { flex: 1; display: flex; flex-direction: column; justify-content: space-around; gap: 12px; }

.ko-match {
  background: var(--card); border: 2px solid var(--ink); border-radius: 8px;
  box-shadow: var(--shadow-sm); overflow: hidden; position: relative;
}
.ko-match .ko-meta {
  font-family: var(--mono); font-size: 9.5px; color: var(--ink-soft);
  text-transform: uppercase; letter-spacing: 0.06em;
  padding: 3px 9px; background: var(--paper-deep);
  border-bottom: 1px solid rgba(35,37,28,0.4);
  display: flex; justify-content: space-between; gap: 6px;
}
.ko-team {
  display: flex; align-items: center; gap: 7px;
  width: 100%; text-align: left;
  appearance: none; background: none; border: none;
  font-family: var(--body); font-weight: 600; font-size: 13px; color: var(--ink);
  padding: 6px 9px; cursor: pointer;
}
.ko-team + .ko-team { border-top: 1px dotted rgba(35,37,28,0.3); }
.ko-team:hover:not(:disabled) { background: rgba(235, 169, 55, 0.18); }
.ko-team:disabled { cursor: default; }
.ko-team .flag { width: 19px; height: 13px; object-fit: cover; border: 1px solid rgba(35,37,28,0.5); border-radius: 2px; flex: 0 0 19px; }
.ko-team .flag-tbd { width: 19px; height: 13px; flex: 0 0 19px; border: 1px dashed rgba(35,37,28,0.45); border-radius: 2px; }
.ko-team .kname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ko-team .kname.tbd { color: var(--ink-soft); font-weight: 500; font-style: italic; font-size: 12px; }
.ko-team.picked { background: rgba(10, 107, 61, 0.14); }
.ko-team.picked .kname::after { content: " ✓"; color: var(--green); font-weight: 700; }
.ko-team.hit { background: rgba(10, 107, 61, 0.22); }
.ko-team.miss { background: rgba(216, 67, 47, 0.16); text-decoration: line-through; }

.ko-match.champion-box { border-width: 3px; box-shadow: 5px 5px 0 var(--gold), 5px 5px 0 2px var(--ink); }
.champ-display {
  text-align: center; padding: 14px 10px;
}
.champ-display .champ-label {
  font-family: var(--mono); font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--ink-soft);
}
.champ-display .champ-name {
  font-family: var(--display); font-weight: 900; font-size: 26px;
  text-transform: uppercase; margin-top: 3px;
}
.champ-display .flag { width: 34px; height: 24px; object-fit: cover; border: 1.5px solid var(--ink); border-radius: 3px; margin-top: 6px; }

/* ---------- view banner / leaderboard ---------- */

.banner {
  background: var(--gold);
  border: 2px solid var(--ink); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 13px 16px; margin-bottom: 22px;
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  font-weight: 600; font-size: 14px;
}
.banner .btn { box-shadow: none; padding: 7px 12px; }

.lb-table { width: 100%; border-collapse: collapse; background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.lb-wrap { border-radius: var(--radius); overflow: hidden; border: 2px solid var(--ink); box-shadow: var(--shadow-sm); }
.lb-wrap table { width: 100%; border-collapse: collapse; background: var(--card); }
.lb-wrap th {
  font-family: var(--mono); font-size: 10.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.07em;
  background: var(--ink); color: var(--paper);
  padding: 9px 10px; text-align: right;
}
.lb-wrap th:first-child, .lb-wrap th:nth-child(2) { text-align: left; }
.lb-wrap td { padding: 9px 10px; text-align: right; font-family: var(--mono); font-size: 13px; border-top: 1px dotted rgba(35,37,28,0.3); }
.lb-wrap td:first-child { font-family: var(--display); font-weight: 900; font-size: 19px; width: 40px; text-align: left; }
.lb-wrap td.lb-name { text-align: left; font-family: var(--body); font-weight: 700; font-size: 14.5px; }
.lb-wrap td.lb-name .you { color: var(--red); font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; margin-left: 6px; }
.lb-wrap td.lb-name small { display: block; font-weight: 400; color: var(--ink-soft); font-size: 11px; }
.lb-wrap td .total { font-weight: 700; font-size: 15px; color: var(--green); }
.lb-row-actions button {
  appearance: none; border: none; background: none; cursor: pointer;
  font-family: var(--mono); font-size: 11px; color: var(--green); text-decoration: underline; padding: 0 4px;
}
.lb-row-actions button.danger { color: var(--red); }

.lb-explain {
  margin-top: 18px; font-size: 12.5px; color: var(--ink-soft); max-width: 640px;
}
.lb-explain code { font-family: var(--mono); background: var(--paper-deep); padding: 1px 5px; border-radius: 4px; }

/* ---------- players / favourites ---------- */

#player-search {
  flex: 1;
  min-width: 220px;
  max-width: 420px;
  font-family: var(--mono);
  font-size: 13px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  padding: 9px 16px;
  box-shadow: var(--shadow-sm);
}
#player-search:focus { outline: 2px solid var(--green); outline-offset: 2px; }

.fav-count {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin: 0 0 16px;
}

.fav-board {
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  outline: 2px solid var(--gold);
  outline-offset: 1px;
  margin-bottom: 18px;
}
.fav-board h3 {
  font-family: var(--display);
  font-weight: 900;
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0;
  padding: 11px 14px;
  border-bottom: 2px dashed rgba(35,37,28,0.4);
}
.fav-board .flag { width: 20px; height: 14px; object-fit: cover; border: 1px solid rgba(35,37,28,0.5); border-radius: 2px; flex: 0 0 20px; }
.fav-board .squad-list { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.fav-board .player-ga { margin-left: auto; }
.player-row .player-ga {
  font-family: var(--mono); font-size: 10.5px; font-weight: 600;
  border: 1.5px solid var(--ink); border-radius: 4px;
  background: var(--paper-deep);
  padding: 0 5px;
  white-space: nowrap;
}
.player-row .player-team {
  margin-left: auto;
  font-family: var(--mono); font-size: 10.5px;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink-soft);
  white-space: nowrap;
}

.squad-card {
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 10px;
  overflow: hidden;
}
.squad-card summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  font-size: 15px;
}
.squad-card summary::-webkit-details-marker { display: none; }
.squad-card summary::after {
  content: "+";
  margin-left: 4px;
  font-family: var(--mono);
  font-weight: 600;
  color: var(--ink-soft);
}
.squad-card[open] summary::after { content: "–"; }
.squad-card[open] summary { border-bottom: 2px dashed rgba(35,37,28,0.4); }
.squad-card .squad-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.squad-card .squad-favs {
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  background: var(--gold); border: 1.5px solid var(--ink); border-radius: 4px;
  padding: 1px 6px;
}
.squad-card .squad-count {
  margin-left: auto;
  font-family: var(--mono); font-size: 10.5px;
  text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--ink-soft);
  white-space: nowrap;
}

.squad-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 2px 14px;
  padding: 10px 12px;
}
.player-row {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: none;
  font: inherit;
  font-size: 13.5px;
  color: var(--ink);
  padding: 5px 6px;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
}
.player-row:hover { background: var(--paper-deep); }
.player-row .player-star { color: var(--ink-soft); font-size: 15px; flex: 0 0 18px; }
.player-row.is-fav .player-star { color: var(--gold); text-shadow: 1px 1px 0 rgba(35,37,28,0.6); }
.player-row.is-fav .player-name { font-weight: 700; }
.player-row .player-pos {
  font-family: var(--mono); font-size: 10px; font-weight: 600;
  color: var(--ink-soft); flex: 0 0 22px;
}
.player-row .player-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* player performance modal */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(35, 37, 28, 0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  z-index: 50;
}
.modal {
  position: relative;
  width: 100%; max-width: 420px;
  max-height: 85vh; overflow-y: auto;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
.modal-close {
  position: absolute; top: 8px; right: 10px;
  appearance: none; border: none; background: none; cursor: pointer;
  font-size: 22px; line-height: 1; color: var(--ink-soft);
}
.modal-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.modal-head h3 {
  font-family: var(--display); font-weight: 900; font-size: 24px;
  text-transform: uppercase; letter-spacing: 0.03em; margin: 0;
}
.modal-sub {
  width: 100%;
  font-family: var(--mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-soft);
}
.modal-stats { display: flex; gap: 12px; margin-bottom: 14px; }
.stat-big {
  flex: 1;
  border: 2px solid var(--ink); border-radius: 8px;
  background: var(--paper-deep);
  padding: 10px;
  text-align: center;
  font-family: var(--mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-soft);
}
.stat-big b {
  display: block;
  font-family: var(--display); font-weight: 900; font-size: 30px; line-height: 1;
  color: var(--ink);
}
.modal-matches { margin-bottom: 14px; }
.modal-match {
  display: flex; justify-content: space-between; gap: 10px;
  font-size: 13.5px;
  padding: 6px 2px;
  border-bottom: 1px dotted rgba(35,37,28,0.3);
}
.modal-match b { font-family: var(--mono); font-size: 12px; white-space: nowrap; }
.modal-note { font-size: 13px; color: var(--ink-soft); margin: 0 0 14px; }
.modal .btn { width: 100%; }

/* matches involving a starred player's country */
.match-card.has-fav {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}
.match-card.has-fav .stub { background: var(--gold); }
/* same look as the header tags, on its own line under the teams */
.match-card .fav-line {
  display: inline-block;
  margin-top: 7px;
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  padding: 1px 6px;
  background: var(--gold);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
  max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---------- footer / toast ---------- */

.footer {
  border-top: 2px solid var(--ink);
  background: var(--paper-deep);
  font-size: 12px; color: var(--ink-soft);
}
.footer p { max-width: 1080px; margin: 0 auto; padding: 18px 20px 26px; }

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(80px);
  background: var(--ink); color: var(--paper);
  font-family: var(--mono); font-size: 13px;
  padding: 11px 20px; border-radius: 8px;
  box-shadow: 4px 4px 0 rgba(35,37,28,0.35);
  opacity: 0; pointer-events: none;
  transition: transform 0.25s, opacity 0.25s;
  z-index: 100; max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 560px) {
  body { font-size: 15px; }
  .masthead-inner { padding-top: 22px; }
  .data-stamp { margin-left: 0; width: 100%; }
  .bracket-actions { margin-left: 0; }
}
