:root {
  --page: #f3f5f0;
  --page-deep: #e9eee7;
  --surface: #ffffff;
  --surface-soft: #f7f9f6;
  --ink: #14231e;
  --muted: #66766f;
  --forest: #123c32;
  --forest-deep: #082b23;
  --mint: #86e5c4;
  --mint-soft: #dcf7ed;
  --gold: #f5cf58;
  --gold-soft: #fff4c9;
  --line: #dce4df;
  --danger: #bc463d;
  --shadow-sm: 0 8px 24px rgba(25, 48, 40, .07);
  --shadow-md: 0 18px 50px rgba(15, 45, 36, .12);
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 28px;
}

* { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 0%, rgba(134, 229, 196, .18), transparent 28rem),
    linear-gradient(180deg, #f8faf6 0%, var(--page) 55%, var(--page-deep) 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.app { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding-bottom: 40px; }

.topbar {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; cursor: pointer; user-select: none; }
.brand-mark { width: 40px; height: 40px; color: var(--forest); flex: 0 0 auto; }
.brand strong { display: block; color: var(--forest-deep); font-size: 22px; line-height: 1; letter-spacing: -.5px; }
.brand-es { color: #23856b; }
.brand small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.topnav { display: flex; align-items: center; gap: 18px; }
.topnav > a { color: var(--forest); font-size: 14px; font-weight: 750; text-decoration: none; }
.topnav > a:hover { color: #23856b; }
.user-chip { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }

.main { display: flex; flex-direction: column; gap: 22px; }
.loading-block { min-height: 50vh; display: grid; place-items: center; color: var(--muted); font-weight: 700; }

.hero {
  position: relative;
  overflow: hidden;
  min-height: 510px;
  border-radius: var(--radius-lg);
  color: #fff;
  background: var(--forest-deep);
  box-shadow: var(--shadow-md);
}
.hero-photo { display: flex; align-items: stretch; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 45%; z-index: 0; }
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(6, 28, 23, .97) 0%, rgba(6, 28, 23, .91) 34%, rgba(6, 28, 23, .52) 62%, rgba(6, 28, 23, .10) 100%),
    linear-gradient(0deg, rgba(6, 28, 23, .38), transparent 55%);
}
.hero-inner {
  position: relative;
  z-index: 2;
  width: min(650px, 66%);
  padding: 64px 58px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
}
.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: var(--mint);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.hero-kicker::before { content: ""; width: 26px; height: 2px; margin-right: 10px; border-radius: 9px; background: var(--gold); }
.hero h1 { max-width: 640px; margin: 15px 0 16px; font-size: clamp(40px, 5vw, 62px); line-height: .98; letter-spacing: -.055em; }
.hero h1 .u { color: var(--mint); }
.hero p { max-width: 56ch; margin: 0; color: rgba(239, 255, 249, .8); font-size: 17px; line-height: 1.55; }
.hero-points { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 22px 0 26px; color: rgba(255,255,255,.88); font-size: 12px; font-weight: 750; }
.hero-points span { display: inline-flex; align-items: center; gap: 7px; }
.hero-points span::before { content: "✓"; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: rgba(134,229,196,.17); color: var(--mint); font-size: 11px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 10px; }

.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 12px 19px;
  background: var(--forest);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  line-height: 1.15;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(8,43,35,.15); }
.btn:active { transform: translateY(0); }
.btn.secondary { background: #fff; color: var(--forest); border-color: var(--line); }
.hero .btn.secondary { background: rgba(255,255,255,.10); color: #fff; border-color: rgba(255,255,255,.23); backdrop-filter: blur(8px); }
.btn.gold { background: var(--gold); color: #3b310a; }
.btn.danger { background: #fff0ef; color: var(--danger); border-color: #f1cac7; }
.btn.sm { padding: 8px 13px; border-radius: 10px; font-size: 13px; }
.btn[disabled] { opacity: .52; cursor: not-allowed; transform: none; box-shadow: none; }

.format-explorer { padding: 38px 4px 8px; }
.section-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 420px); align-items: end; gap: 40px; margin-bottom: 22px; }
.section-kicker { color: #23856b; }
.section-heading h2 { margin: 4px 0 0; color: var(--forest-deep); font-size: clamp(28px, 4vw, 42px); line-height: 1.05; letter-spacing: -.04em; }
.section-heading p { margin: 0; color: var(--muted); font-size: 14px; }

.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 15px; }
.field label { color: #53645d; font-size: 12px; font-weight: 800; letter-spacing: .02em; }
.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
  background: #fff;
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { min-height: 86px; resize: vertical; }
.field input:focus,
.field textarea:focus,
.field select:focus { border-color: #5bc9a5; box-shadow: 0 0 0 3px rgba(91,201,165,.16); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }

.format-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.format-card {
  min-height: 245px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(25,48,40,.035);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.format-card:hover { transform: translateY(-4px); border-color: #aed6c7; box-shadow: 0 18px 34px rgba(20,54,43,.11); }
.format-card:focus-visible { outline: 3px solid rgba(35,133,107,.28); outline-offset: 2px; }
.format-card__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.format-card__icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; color: #123c32; background: var(--mint-soft); font-size: 14px; font-weight: 900; }
.format-card__icon.blue { color: #205b72; background: #dff3fb; }
.format-card__icon.gold { color: #7c5b00; background: var(--gold-soft); }
.format-card__icon.coral { color: #8a453c; background: #fbe7e2; }
.format-card__icon.violet { color: #5d4f87; background: #eee9fb; }
.format-card__icon.sky { color: #285b7a; background: #e3f1fa; }
.format-card__icon.lime { color: #456527; background: #eaf5d9; }
.format-card__icon.orange { color: #8a531d; background: #fbead8; }
.format-card__arrow { color: #9baca5; font-size: 19px; transition: transform .18s ease, color .18s ease; }
.format-card:hover .format-card__arrow { color: #23856b; transform: translate(2px,-2px); }
.format-card strong { color: var(--forest-deep); font-size: 19px; line-height: 1.2; letter-spacing: -.02em; }
.format-card__description { flex: 1; color: var(--muted); font-size: 14px; line-height: 1.45; }
.format-card__meta { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 12px; border-top: 1px solid #edf1ee; }
.format-card__meta span { padding: 5px 8px; border-radius: 999px; background: var(--surface-soft); color: #53645d; font-size: 11px; font-weight: 750; }
.empty-results { grid-column: 1 / -1; margin: 0; padding: 35px; border: 1px dashed #bdcac4; border-radius: var(--radius); color: var(--muted); text-align: center; }

.card {
  padding: 24px;
  border: 1px solid rgba(210,222,215,.86);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.card.soft { background: var(--surface-soft); box-shadow: none; }
.card h2 { margin: 0 0 14px; color: var(--forest-deep); font-size: 22px; line-height: 1.2; letter-spacing: -.025em; }
.card h3 { margin: 20px 0 9px; color: var(--forest); font-size: 16px; }

.wall {
  padding: 26px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(145deg, #174b3e, var(--forest-deep));
  background-size: 30px 30px, 30px 30px, auto;
  color: #fff;
  box-shadow: var(--shadow-md);
}
.wall-title { margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.wall-title h2 { margin: 0; font-size: 23px; }
.slots { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
.slots.pair-slots { grid-template-columns: repeat(2, minmax(0,1fr)); }
.slot { position: relative; min-height: 74px; padding: 13px; display: flex; flex-direction: column; justify-content: center; gap: 4px; border: 1px dashed rgba(255,255,255,.25); border-radius: 13px; background: rgba(255,255,255,.07); font-size: 14px; }
.slot.filled { border-style: solid; border-color: rgba(134,229,196,.46); background: rgba(134,229,196,.13); }
.slot .who { font-weight: 800; }
.slot .free { color: #b5d4ca; font-size: 12px; }
.slot-remove { position: absolute; top: 7px; right: 7px; padding: 2px 7px; border-radius: 8px; font-size: 12px; line-height: 1.35; }
.owner-add { margin-top: 14px; color: #cae2d9; }
.owner-add summary { color: var(--mint); cursor: pointer; font-weight: 800; }
.owner-add form { margin-top: 12px; }
.owner-add .field label { color: #cae2d9; }
.bulk-pair-row { margin-bottom: 12px; padding: 13px; border: 1px solid rgba(134,229,196,.28); border-radius: 13px; background: rgba(255,255,255,.07); }
.bulk-pair-row > b { display: block; margin-bottom: 9px; color: var(--mint); }
.shuffle-choice { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; color: #cae2d9; font-size: 14px; font-weight: 700; cursor: pointer; }
.shuffle-choice input { width: 17px; height: 17px; accent-color: var(--mint); }

.link-share { display: flex; gap: 8px; align-items: center; padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.link-share code { flex: 1; overflow: hidden; color: var(--forest); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.tag { display: inline-flex; align-items: center; padding: 4px 9px; border-radius: 999px; font-size: 11px; font-weight: 850; letter-spacing: .02em; }
.tag.recruiting, .tag.me { background: #dcf7ed; color: #176b54; }
.tag.active { background: #fff1bd; color: #775c04; }
.tag.finished { background: #e9eeeb; color: #53615b; }

table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 10px 11px; border-bottom: 1px solid var(--line); text-align: left; }
.table th { color: var(--muted); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table tr.me { background: #eef9f5; }
.table tr.winner td { font-weight: 850; }
.standings-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.standings-title h2 { margin-bottom: 12px; }
.podium-badge { padding: 5px 10px; border-radius: 999px; background: #fff1bd; color: #775c04; font-size: 11px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.table .podium-row td { font-weight: 800; }
.table .podium-1 { background: linear-gradient(90deg, rgba(255,214,76,.28), rgba(255,250,229,.72)); }
.table .podium-2 { background: linear-gradient(90deg, rgba(187,199,207,.3), rgba(246,248,249,.72)); }
.table .podium-3 { background: linear-gradient(90deg, rgba(209,139,91,.24), rgba(252,244,238,.72)); }
.table .podium-1 td:first-child { box-shadow: inset 4px 0 #e6b900; }
.table .podium-2 td:first-child { box-shadow: inset 4px 0 #98a5ae; }
.table .podium-3 td:first-child { box-shadow: inset 4px 0 #bb7449; }
.podium-rank { width: 48px; font-size: 19px; text-align: center !important; }

.match { margin-bottom: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface-soft); }
.match-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.match-scoreboard { display: grid; gap: 5px; }
.match-team { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) 68px; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.match-team-name { min-width: 0; color: var(--forest); font-size: 14px; font-weight: 800; line-height: 1.3; overflow-wrap: anywhere; }
.match-vs { margin: -2px 0; color: var(--muted); font-size: 10px; font-weight: 850; letter-spacing: .08em; text-align: center; text-transform: uppercase; }
.score-input { width: 100%; min-height: 44px; padding: 6px; text-align: center; font-size: 18px; font-weight: 900; font-variant-numeric: tabular-nums; }
.score-value { min-width: 46px; color: var(--forest); font-size: 18px; font-variant-numeric: tabular-nums; text-align: center; }
.match-help { margin-top: 7px; color: var(--muted); font-size: 11px; text-align: right; }
.winner-pick { margin-top: 9px; color: var(--muted); font-size: 12px; }
.winner-team-choice {
  width: 100%;
  min-height: 54px;
  grid-template-columns: minmax(0, 1fr) auto;
  text-align: left;
  appearance: none;
  transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease, color .16s ease, opacity .16s ease;
}
button.winner-team-choice { cursor: pointer; }
button.winner-team-choice:not(:disabled):not(.is-winner):not(.is-loser):hover {
  border-color: #67b99f;
  box-shadow: 0 0 0 3px rgba(91,201,165,.14);
}
.winner-team-choice.is-winner {
  border-color: #2f9d78;
  background: #ddf5eb;
  box-shadow: inset 4px 0 #23856b;
}
.winner-team-choice.is-winner .match-team-name { color: #116148; }
.winner-team-choice.is-loser {
  border-color: #d4dad7;
  background: #eaeeec;
  opacity: .72;
}
.winner-team-choice.is-loser .match-team-name { color: #69756f; }
.winner-mark { color: #176b54; font-size: 11px; font-weight: 900; white-space: nowrap; }
.winner-team-choice:disabled { cursor: default; }
.winner-team-readonly { cursor: default; }

.mundial-groups-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.mundial-group-panel { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.mundial-group-panel > h3 { margin: 0 0 12px; font-size: 18px; }
.mundial-group-panel .table { font-size: 12px; }
.mundial-group-panel .table th, .mundial-group-panel .table td { padding: 8px 7px; }
.mundial-group-matches .match:last-child { margin-bottom: 0; }
.qualification { display: inline-flex; margin-left: 5px; padding: 2px 6px; border-radius: 999px; font-size: 9px; font-weight: 900; letter-spacing: .03em; text-transform: uppercase; vertical-align: middle; }
.qualification.direct { background: #dcf7ed; color: #176b54; }
.qualification.repechage { background: #fff1bd; color: #775c04; }

.mundial-bracket-card { overflow: hidden; }
.mundial-bracket-scroll { overflow-x: auto; padding: 4px 2px 12px; }
.mundial-bracket { min-width: 700px; display: grid; grid-template-columns: repeat(3, minmax(210px,1fr)); gap: 28px; align-items: stretch; }
.mundial-bracket.stages-2 { min-width: 470px; grid-template-columns: repeat(2, minmax(210px,1fr)); }
.bracket-stage { min-width: 0; display: flex; flex-direction: column; }
.bracket-stage > h3 { margin: 0 0 12px; text-align: center; }
.bracket-stage:not(:first-child) { justify-content: center; }
.bracket-match { position: relative; margin: auto 0; padding: 6px; display: grid; gap: 5px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-soft); }
.bracket-match + .bracket-match { margin-top: 18px; }
.bracket-stage:not(:last-child) .bracket-match::after { content: "→"; position: absolute; top: 50%; right: -22px; transform: translateY(-50%); color: #8aa097; font-size: 18px; font-weight: 900; }
.bracket-team { min-height: 43px; padding: 8px 10px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 6px; border: 1px solid #dfe6e2; border-radius: 9px; background: #fff; color: var(--forest); font-size: 12px; font-weight: 800; }
.bracket-team small { grid-column: 1 / -1; color: var(--muted); font-size: 9px; font-weight: 750; }
.bracket-team.is-winner { border-color: #2f9d78; background: #ddf5eb; color: #116148; }
.bracket-team.is-loser { background: #eaeeec; color: #69756f; opacity: .7; }
.bracket-team.is-pending { border-style: dashed; background: transparent; color: #8a9690; font-weight: 650; }
.bracket-team > b { color: #176b54; }

.rounds-nav { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.rounds-nav button { padding: 7px 13px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--forest); cursor: pointer; font-size: 12px; font-weight: 800; }
.rounds-nav button.on { border-color: var(--forest); background: var(--forest); color: #fff; }
.rounds-nav button.done::after { content: " ✓"; color: #188364; }
.rounds-nav button.on.done::after { color: var(--mint); }
.round-footer { display: flex; justify-content: flex-end; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.round-next { min-width: 180px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.round-next span { font-size: 18px; line-height: 1; transition: transform .18s ease; }
.round-next:hover span { transform: translateX(4px); }

.confetti-layer { position: fixed; inset: 0; z-index: 100; pointer-events: none; overflow: hidden; }
.confetti-piece { position: absolute; top: -18px; left: var(--x); width: 9px; height: 15px; border-radius: 2px; background: var(--color); opacity: 0; animation: confetti-fall var(--duration) cubic-bezier(.18,.74,.35,1) var(--delay) forwards; }
.confetti-piece:nth-child(3n) { width: 7px; height: 11px; border-radius: 50%; }
.confetti-piece:nth-child(4n) { width: 12px; height: 6px; }
@keyframes confetti-fall {
  0% { opacity: 0; transform: translate3d(0,-4vh,0) rotate(0deg); }
  8% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(var(--drift),105vh,0) rotate(var(--spin)); }
}

.event-list { display: flex; flex-direction: column; gap: 10px; }
.event-item { padding: 15px 17px; display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.event-item .meta { margin-top: 3px; color: var(--muted); font-size: 12px; }
.event-item a { color: var(--forest); font-weight: 850; text-decoration: none; }
.event-item a:hover { color: #23856b; }

.rules ul { margin: 8px 0 16px 18px; padding: 0; }
.rules li { margin-bottom: 7px; }
.rules .kicker { color: #23856b; font-size: 11px; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.format-howto h3 { margin-bottom: 7px; }
.format-howto ul { margin: 0; padding-left: 20px; display: grid; gap: 5px; }
.format-howto li { color: var(--muted); font-size: 14px; }

.auth-tabs { display: flex; gap: 8px; margin-bottom: 18px; padding: 4px; border-radius: 12px; background: var(--surface-soft); }
.auth-tabs button { flex: 1; padding: 9px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; font-weight: 800; }
.auth-tabs button.on { background: #fff; color: var(--forest); box-shadow: 0 3px 10px rgba(25,48,40,.08); }
.consent-field { margin: 2px 0 16px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); }
.consent-field label { display: grid; grid-template-columns: 20px minmax(0,1fr); gap: 9px; align-items: start; color: var(--ink); font-size: 12px; font-weight: 650; line-height: 1.45; cursor: pointer; }
.consent-field input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--forest); }
.consent-field a, .rules a { color: #176b54; font-weight: 800; }

.big-count { color: var(--mint); font-size: 36px; font-weight: 900; letter-spacing: -.03em; }
.subtext { color: var(--muted); font-size: 13px; }
.qr-note { margin-top: 7px; color: var(--muted); font-size: 13px; }
.divider { margin: 18px 0; border: 0; border-top: 1px solid var(--line); }
.error-text { color: var(--danger); font-weight: 700; }
.empty { padding: 24px 0; color: var(--muted); text-align: center; }
.hidden { display: none !important; }

.toast { position: fixed; left: 50%; bottom: 24px; z-index: 50; max-width: min(90vw, 560px); padding: 12px 18px; transform: translateX(-50%); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; background: var(--forest-deep); color: #ecfff8; box-shadow: 0 12px 36px rgba(0,0,0,.25); font-size: 14px; }

.footer { margin-top: 60px; padding: 28px 4px 12px; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 24px; border-top: 1px solid #d7e0db; color: var(--muted); font-size: 12px; }
.footer-brand { display: flex; align-items: baseline; gap: 9px; }
.footer-brand strong { color: var(--forest); font-size: 15px; }
.footer-links { display: flex; gap: 16px; }
.footer-links a { color: var(--muted); font-weight: 700; text-decoration: none; }
.footer-links a:hover { color: var(--forest); }
.footer-copy { white-space: nowrap; }

.language-switcher { display: inline-flex; align-items: center; gap: 4px; }
.language-button { width: 34px; height: 34px; display: inline-grid; place-items: center; padding: 0; border: 1px solid transparent; border-radius: 10px; background: transparent; cursor: pointer; font-size: 20px; line-height: 1; transition: background-color .16s ease, border-color .16s ease, transform .16s ease; }
.language-button:hover, .language-button:focus-visible { border-color: var(--line); background: #fff; transform: translateY(-1px); outline: none; }

@media (max-width: 900px) {
  .app { width: min(100% - 28px, 760px); }
  .hero { min-height: 480px; }
  .hero-inner { width: 72%; padding: 46px 38px; }
  .hero h1 { font-size: clamp(38px, 7vw, 52px); }
  .section-heading { grid-template-columns: 1fr; gap: 12px; }
  .format-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .footer { grid-template-columns: 1fr auto; }
  .footer-copy { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  .app { width: min(100% - 22px, 560px); padding-bottom: 22px; }
  .topbar { min-height: 74px; gap: 12px; }
  .brand-mark { width: 34px; height: 34px; }
  .brand strong { font-size: 19px; }
  .brand small { display: none; }
  .topnav { gap: 8px; }
  .topnav > a { display: none; }
  .user-chip > span { display: none; }
  .user-chip .btn { padding: 7px 10px; font-size: 12px; }
  .language-switcher { gap: 1px; }
  .language-button { width: 30px; height: 30px; font-size: 18px; }
  .hero { min-height: 590px; border-radius: 22px; }
  .hero-img { object-position: 63% center; }
  .hero-overlay { background: linear-gradient(0deg, rgba(6,28,23,.98) 0%, rgba(6,28,23,.91) 43%, rgba(6,28,23,.25) 100%); }
  .hero-inner { width: 100%; min-height: 590px; justify-content: flex-end; padding: 32px 25px; }
  .hero h1 { margin-top: 11px; font-size: clamp(36px, 11vw, 48px); }
  .hero p { font-size: 15px; }
  .hero-points { margin: 17px 0 21px; gap: 7px 13px; }
  .hero .actions { display: grid; grid-template-columns: 1fr 1fr; }
  .hero .btn { padding-inline: 12px; }
  .format-explorer { padding: 30px 1px 6px; }
  .section-heading h2 { font-size: 32px; }
  .format-grid { grid-template-columns: 1fr; }
  .format-card { min-height: 220px; }
  .row { grid-template-columns: 1fr; gap: 0; }
  .slots { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .slots.pair-slots { grid-template-columns: 1fr; }
  .mundial-groups-grid { grid-template-columns: 1fr; }
  .mundial-bracket { min-width: 650px; }
  .match { padding: 10px; }
  .match-team { grid-template-columns: minmax(0, 1fr) 64px; padding: 8px; }
  .round-footer { justify-content: stretch; }
  .round-next { width: 100%; }
  .standings-title { align-items: flex-start; }
  .podium-badge { margin-top: 2px; }
  .card { padding: 19px; }
  .footer { margin-top: 42px; grid-template-columns: 1fr; gap: 14px; }
  .footer-brand { flex-direction: column; gap: 2px; }
  .footer-links { flex-wrap: wrap; gap: 10px 16px; }
  .footer-copy { grid-column: auto; }
  .table { display: block; overflow-x: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
