/* MatchGrid system — Eightsy-inspired: felt green, gold, dark club */
:root {
  --felt: #0a5c3a;
  --felt-deep: #063d27;
  --felt-dark: #042818;
  --ink: #0c0a08;
  --bg: #0a5c3a;
  --panel: #16110c;
  --panel2: #211a13;
  --line: #3d3223;
  --text: #f2ece1;
  --muted: #b8a989;
  --green: #2e7d4f;
  --green2: #3fa568;
  --accent: #c9a227;
  --gold: #c9a227;
  --gold-soft: #e0c35a;
  --red: #c0392b;
  --blue: #4a7dbd;
  --cream: #f7f1e4;
  --font: "Barlow", system-ui, sans-serif;
  --display: "Barlow Condensed", "Barlow", system-ui, sans-serif;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 55% at 50% -10%, rgba(10, 92, 58, .45), transparent 60%),
    radial-gradient(ellipse 40% 30% at 90% 100%, rgba(201, 162, 39, .08), transparent 55%),
    linear-gradient(165deg, #041a10 0%, var(--ink) 45%, #120e0a 100%);
  background-attachment: fixed;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.hidden { display: none !important; }

.ac { position: relative; }
.ac-list {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: none;
  max-height: 240px;
  overflow-y: auto;
  box-shadow: 0 8px 20px rgba(0,0,0,.4);
  border-radius: 0 0 10px 10px;
}
.ac-item {
  padding: 8px 10px;
  cursor: pointer;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ac-item:hover { background: var(--panel2); }
.ac-empty { padding: 8px 10px; color: var(--muted); }
.p-list {
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel2);
}
.p-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 6px 10px;
  font-size: 14px;
  color: var(--text);
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.p-item:last-child { border-bottom: none; }
.p-item:hover { background: var(--panel); }
.p-item .sub { font-size: 12px; }
.p-item input[type="checkbox"] { width: auto; margin: 0; }

header#topbar {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 10px 24px;
  background: rgba(12, 10, 8, .9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(201, 162, 39, .18);
  box-shadow: 0 1px 0 rgba(201, 162, 39, .12);
  position: sticky;
  top: 0;
  z-index: 50;
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo {
  height: 34px;
  width: auto;
  filter: drop-shadow(0 3px 10px rgba(201, 162, 39, .35));
}
.brand-name {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--cream);
}
.brand-name span { color: var(--gold); }

#topbar nav { display: flex; gap: 8px; flex: 1; }

.nav-btn, .ghost, .btn, button.primary, button.danger, button.ghost {
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
  transition: filter .15s, transform .05s, background .15s;
}
.nav-btn {
  background: transparent;
  color: var(--text);
  padding: 9px 16px;
  font-weight: 600;
}
.nav-btn:hover { background: rgba(255,255,255,.05); color: var(--cream); }
.nav-btn.active { background: linear-gradient(180deg, var(--gold-soft), var(--gold)); color: #1a1405; font-weight: 700; }

.userbox { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.role-badge {
  font-size: 11px; padding: 2px 10px; border-radius: 999px;
  background: var(--green); color: #fff; font-weight: 700; letter-spacing: .04em;
}
.role-badge.admin { background: var(--accent); color: #1a1405; }

/* language switcher (topbar) */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
}
.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 6px;
  border-radius: 999px;
  cursor: pointer;
  background: transparent;
  border: none;
  transition: background .15s, transform .1s;
}
.lang-btn svg {
  display: block;
  width: 22px;
  height: 15px;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28), 0 1px 3px rgba(0,0,0,.5);
}
.lang-btn:hover { transform: scale(1.1); }
.lang-btn.active { background: rgba(201, 162, 39, .35); box-shadow: 0 0 0 1px var(--gold); }

main#app { padding: 24px; max-width: 1400px; margin: 0 auto; }

/* per-club instance branding */
.club-badge { text-align: center; margin: -8px 0 10px; }
.club-badge img {
  max-height: 130px;
  max-width: 240px;
  object-fit: contain;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, .35));
}
.club-name {
  font-family: var(--display);
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 10px;
  color: var(--cream);
}
.auth-powered { margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}
.auth-lang {
  display: flex;
  justify-content: flex-end;
  margin: -6px 0 6px;
}
.auth-powered a { color: var(--gold); text-decoration: none; font-weight: 600; }
.auth-powered a:hover { text-decoration: underline; }
.site-footer {
  padding: 18px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  border-top: 1px solid rgba(201, 162, 39, .15);
}
.site-footer a { color: var(--gold); text-decoration: none; font-weight: 600; }
.site-footer a:hover { text-decoration: underline; }

h1 { font-size: 26px; margin: 0 0 4px; }
h2 { font-size: 20px; margin: 20px 0 10px; }
h3 {
  font-size: 16px;
  margin: 14px 0 8px;
  color: var(--green2);
  font-family: var(--display);
  font-size: 1.2rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.sub { color: var(--muted); font-size: 13px; }

.btn {
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  color: #1a1405;
  padding: 9px 18px;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(201, 162, 39, .22);
}
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.small { padding: 5px 12px; font-size: 12px; }
.btn.outline { background: transparent; border: 1px solid rgba(201, 162, 39, .5); color: var(--gold-soft); box-shadow: none; }
.btn.outline:hover { background: rgba(201, 162, 39, .12); }
.btn.secondary { background: var(--green); color: #fff; box-shadow: 0 6px 18px rgba(10, 92, 58, .3); }
.danger { background: var(--red); color: #fff; padding: 9px 16px; border-radius: 999px; border: none; font-weight: 700; }
.danger:hover { filter: brightness(1.1); }
.ghost { background: transparent; color: var(--muted); padding: 6px 12px; border-radius: 999px; }
.ghost:hover { color: var(--cream); background: rgba(255,255,255,.05); }

.card {
  background: linear-gradient(165deg, #1e1710, #14100c);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.card + .card { margin-top: 16px; }

.grid { display: grid; gap: 12px; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; } }

.tournament-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(165deg, #1e1710, #14100c);
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color .2s, transform .2s;
}
.tournament-row:hover { border-color: rgba(201, 162, 39, .5); transform: translateY(-2px); }
.tournament-row .name { font-weight: 700; font-size: 15px; }
.cycle-head {
  margin: 18px 0 8px;
  font-family: var(--display);
  font-size: 1rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--gold);
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(201, 162, 39, .25);
}
.cycle-head:first-child { margin-top: 0; }
.badges { display: flex; gap: 8px; align-items: center; }
.badge { font-size: 11px; padding: 3px 10px; border-radius: 999px; background: var(--panel2); color: var(--muted); font-weight: 600; letter-spacing: .04em; }
.badge.draft { background: #4a3d10; color: #f0d060; }
.badge.active { background: #12382a; color: #7fe0ae; }
.badge.completed { background: var(--green); color: #fff; }
.badge.single { background: var(--blue); color: #fff; }
.badge.double { background: #6d4aa0; color: #fff; }
.badge.group { background: #a05a2a; color: #fff; }
.badge.admin-only { background: var(--accent); color: #1a1405; }

table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); }
.tbl th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; }
.tbl tr:hover td { background: rgba(255,255,255,.02); }

input, select {
  background: var(--panel2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 14px;
  width: 100%;
}
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(201, 162, 39, .12); }
label { display: block; font-size: 12px; color: var(--muted); margin: 10px 0 4px; }
.seed-input { width: 70px; padding: 6px 8px; }
.cap-q { font-size: 18px; font-weight: 700; padding: 8px 0; white-space: nowrap; }

/* bracket */
.bracket {
  display: flex;
  gap: 32px;
  overflow-x: auto;
  padding-bottom: 12px;
  align-items: flex-start;
}
.bgroup { display: flex; flex-direction: column; gap: 10px; }
.col-title {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.round-heads { display: flex; padding-bottom: 4px; }
.round-heads .rh {
  width: 210px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
  text-align: center;
  flex-shrink: 0;
}
.round-heads .rh-abs {
  position: absolute;
  top: 0;
  width: 210px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
  text-align: center;
}
.bracket-body { position: relative; }
.bracket-body svg.connectors { position: absolute; inset: 0; pointer-events: none; }
.bracket-body svg.connectors path {
  fill: none;
  stroke: var(--green);
  stroke-width: 1.6;
  opacity: .55;
}
.bracket-body .match .slot { padding: 5px 10px; font-size: 12.5px; }
.bracket-body .match .actions { min-height: 28px; }
.finals { display: flex; flex-direction: column; gap: 14px; }

.bracket .col { display: flex; flex-direction: column; gap: 8px; min-width: 210px; flex-shrink: 0; }
.bracket .col-head { text-align: center; font-size: 12px; color: var(--muted); padding: 4px; border-bottom: 1px solid var(--line); }
.match {
  background: linear-gradient(160deg, #241c14, #15100c);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
}
.match-wrap {
  position: absolute;
  width: 210px;
  transform: translateY(-50%);
}
.match-wrap .match { width: 100%; }
.match-letter {
  position: absolute;
  top: -16px;
  left: 2px;
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  opacity: .9;
  letter-spacing: .5px;
}
.loser-note {
  position: absolute;
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
  padding-left: 2px;
}
.match .slot { display: flex; justify-content: space-between; align-items: center; padding: 7px 10px; font-size: 13px; border-bottom: 1px solid rgba(0,0,0,.25); }
.match .slot:last-child { border-bottom: none; }
.match .slot.winner { background: rgba(62,165,104,.22); color: #b7f0cf; font-weight: 700; }
.match .slot .s-name { line-height: 1.3; }
.match .slot .score { font-weight: 700; }
.match .slot .score.win { color: #7fe0ae; }
.match .slot .score.lose { color: var(--muted); }
.match .slot.bye { color: var(--muted); font-style: italic; }
.match .slot .partner { font-size: 13px; color: var(--text); font-weight: 400; }
.match .actions { display: flex; gap: 6px; padding: 6px; }
.match .actions .btn { flex: 1; }

.match.pending-match { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 20px rgba(201, 162, 39, .15); }

/* groups */
.groups-wrap { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.standings .pos { color: var(--muted); }
.standings .qualified { color: #7fe0ae; font-weight: 700; }
.standings .qstar { color: var(--accent); }

/* modal */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
}
.modal {
  background: linear-gradient(165deg, #1e1710, #14100c);
  border: 1px solid rgba(201, 162, 39, .3);
  border-radius: 16px;
  padding: 22px;
  width: min(480px, 92vw);
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 24px 60px rgba(0,0,0,.5);
}
.modal h3 { margin-top: 0; }
.modal .row { display: flex; gap: 12px; align-items: flex-end; }
.score-input {
  text-align: center;
  font-size: 26px;
  font-weight: 800;
  width: 100%;
}
.score-col { text-align: center; flex: 1; }
.score-col .pname { font-size: 13px; margin-bottom: 6px; min-height: 36px; }
.modal .hint { color: var(--muted); font-size: 12px; margin-top: 10px; }
.break-row { margin-top: 12px; }
.break-input {
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  width: 100%;
}
.break-row .pname.sub { font-size: 11px; }

.brk { color: var(--accent); }
.brks { white-space: nowrap; }
.brk-list { white-space: nowrap; }
.brk-list b { color: var(--accent); margin: 0 2px; }
.brk-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.brk-chip {
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12.5px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.brk-chip b { color: var(--accent); }

/* login */
.auth-wrap { max-width: 440px; margin: 8vh auto; }
.auth-card {
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(10, 92, 58, .35), transparent 55%),
    linear-gradient(165deg, #1a2418, #120e0a 60%, #1a150e);
  border: 1px solid rgba(201, 162, 39, .3);
  border-radius: 18px;
  padding: 30px;
  box-shadow: 0 24px 60px rgba(0,0,0,.5);
}
.auth-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.auth-logo img {
  height: 34px;
  width: auto;
  filter: drop-shadow(0 3px 10px rgba(201, 162, 39, .35));
}
.auth-logo .brand-name { font-size: 1.4rem; }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.auth-tabs .tab {
  flex: 1; text-align: center; padding: 9px; border-radius: 999px; cursor: pointer;
  background: var(--panel2); color: var(--muted); font-weight: 600;
}
.auth-tabs .tab.active { background: linear-gradient(180deg, var(--gold-soft), var(--gold)); color: #1a1405; font-weight: 700; }

#aCapTurnstile { margin: 14px 0 6px; }
#aCapTurnstile .cf-turnstile { margin: 0 auto; }
#aCapTurnstile iframe { display: block; margin: 0 auto; }

.notice { background: var(--panel2); border: 1px solid var(--line); border-left: 4px solid var(--accent); padding: 12px 14px; border-radius: 10px; color: var(--text); font-size: 13px; }
.err-msg { color: #ff9a8c; font-size: 13px; margin-top: 10px; min-height: 18px; }
.ok-msg { color: #7fe0ae; font-size: 13px; margin-top: 10px; }

.empty { color: var(--muted); font-size: 14px; padding: 20px; text-align: center; }

.flex { display: flex; gap: 10px; align-items: center; }
.flex.between { justify-content: space-between; }
.mt { margin-top: 12px; }
.mb { margin-bottom: 12px; }

.champion-banner {
  background: linear-gradient(90deg, rgba(201, 162, 39, .2), rgba(10, 92, 58, .35));
  border: 1px solid rgba(201, 162, 39, .4);
  border-radius: 14px;
  padding: 18px;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  font-family: var(--display);
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* player profile */
.player-photo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--gold);
  flex-shrink: 0;
}
.player-photo.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--green), #1c5a3a);
  color: #fff;
  font-size: 34px;
  font-weight: 800;
}
.player-link { color: var(--green2); text-decoration: none; font-weight: 600; }
.player-link:hover { text-decoration: underline; color: var(--accent); }

tr.place-gold { background: rgba(201, 162, 39, .18); }
tr.place-silver { background: rgba(190, 200, 210, .16); }
tr.place-bronze { background: rgba(176, 106, 42, .16); }
tr.place-gold td, tr.place-silver td, tr.place-bronze td { border-bottom-color: rgba(0,0,0,.25); }
.tour-link { color: var(--green2); text-decoration: none; }
.tour-link:hover { text-decoration: underline; }

/* country flags */
.flag {
  display: inline-block;
  vertical-align: middle;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25), 0 1px 3px rgba(0,0,0,.5);
  margin-right: 8px;
}
.flag-20 { width: 20px; height: 14px; }
.flag-40 { width: 28px; height: 19px; }
.flag-16 { width: 16px; height: 11px; }
.match .slot .s-name .flag,
.match .slot .partner .flag,
.match .slot .s-name .flag-16,
.match .slot .partner .flag-16 { margin-right: 5px; }
.flag-cell { display: inline-flex; align-items: center; gap: 8px; }
.flag-cell .flag { margin-right: 0; }

/* country picker (custom dropdown with flags) */
.country-picker { position: relative; }
.cp-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--panel2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 14px;
  cursor: pointer;
  text-align: left;
  transition: border-color .15s;
}
.cp-trigger:hover { border-color: var(--accent); }
.cp-trigger .flag { margin-right: 0; }
.cp-trigger-name { flex: 1; }
.cp-caret { color: var(--muted); font-size: 12px; }
.cp-menu {
  position: absolute;
  z-index: 30;
  left: 0; right: 0;
  top: calc(100% + 4px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0,0,0,.5);
}
.cp-search {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: var(--panel2);
  padding: 8px 12px;
  font-size: 13px;
}
.cp-search:focus { box-shadow: none; border-color: var(--line); }
.cp-list { max-height: 260px; overflow-y: auto; }
.cp-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--text);
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
}
.cp-item:hover { background: var(--panel2); }
.cp-item.selected { background: rgba(201, 162, 39, .15); }
.cp-item .flag { margin-right: 0; flex-shrink: 0; }
.cp-name { flex: 1; }
.cp-none-flag {
  display: inline-block;
  width: 20px; height: 14px;
  flex-shrink: 0;
  text-align: center;
  line-height: 14px;
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 3px;
}

/* ===== Mobile ===== */
@media (max-width: 720px) {
  body { overflow-x: hidden; }

  main#app { padding: 12px; }

  header#topbar { padding: 8px 10px; gap: 8px; flex-wrap: nowrap; }
  .brand { gap: 6px; }
  .brand-logo { height: 26px; }
  .brand-name { font-size: 1.05rem; }
  #topbar nav { gap: 4px; flex: 1; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  #topbar nav::-webkit-scrollbar { display: none; }
  .nav-btn { padding: 8px 10px; white-space: nowrap; font-size: 13px; }
  .userbox { gap: 6px; }
  .userbox #userName { display: none; }
  .lang-switch { padding: 2px; gap: 0; }
  .lang-btn { padding: 2px 4px; }
  .lang-btn svg { width: 18px; height: 12px; }

  h1 { font-size: 21px; }
  h2 { font-size: 17px; }

  .card { padding: 12px; border-radius: 10px; }

  .tournament-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .tournament-row .badges { justify-content: flex-start; flex-wrap: wrap; }
  .tournament-row .sub { font-size: 12px; }

  .tbl { font-size: 13px; }
  .tbl th, .tbl td { padding: 7px 6px; }

  .flex.between { flex-wrap: wrap; }
  #rankTabs { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  #rankTabs .tab { white-space: nowrap; }

  .auth-wrap { margin: 3vh auto; }
  .auth-card { padding: 20px; }

  .modal { width: 95vw; padding: 16px; max-height: 92vh; }
  .modal .row { gap: 8px; }
  .score-input { font-size: 22px; }

  .player-photo { width: 72px; height: 72px; font-size: 26px; }

  .champion-banner { font-size: 15px; padding: 14px; }

  .groups-wrap { grid-template-columns: 1fr; }

  .btn { padding: 10px 16px; }
  .btn.small { padding: 6px 12px; }
  .p-list { max-height: 180px; }
  .bracket { gap: 16px; }
  .bracket .col { min-width: 180px; }
  .finals { gap: 10px; }
}

/* ===== Hamburger + drawer (mobile) ===== */
.menu-btn {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
  gap: 3px;
}
.menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}
.menu-btn:hover { background: rgba(255, 255, 255, .06); }

.drawer, .drawer-backdrop { display: none; }

@media (max-width: 720px) {
  .menu-btn { display: flex; }
  #topbar nav,
  #topbar .lang-switch,
  #topbar .userbox { display: none; }
  .brand-name { font-size: 1rem; max-width: 42vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  .drawer-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    z-index: 90;
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease;
  }
  .drawer {
    display: flex;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 272px;
    max-width: 82vw;
    z-index: 95;
    background: linear-gradient(180deg, #1e1710, #14100c);
    border-right: 1px solid var(--line);
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform .25s ease;
    box-shadow: 6px 0 24px rgba(0, 0, 0, .45);
  }
  body.drawer-open .drawer { transform: translateX(0); }
  body.drawer-open .drawer-backdrop { opacity: 1; pointer-events: auto; }

  .drawer-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 14px;
  }
  .drawer-nav .nav-btn {
    justify-content: flex-start;
    padding: 13px 14px;
    border-radius: 10px;
    font-size: 15px;
    text-align: left;
  }
  .drawer-lang { display: flex; gap: 8px; padding: 0 16px 18px; }
  .drawer-lang .lang-switch { flex-wrap: wrap; }
  .drawer-user {
    margin-top: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    border-top: 1px solid var(--line);
  }
  .drawer-logout { width: 100%; padding: 12px; }
}

/* ===== Scrollable tables ===== */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.table-scroll .tbl { min-width: max-content; }
