/* footballeurohub — night-final palette
   Night #071233 · Deep #0A1847 · Panel #0E1F57 · Royal #2E63FF · Ice #7FE3FF · Trophy #F2C14E · Signal red #E5243B · Floodlight #EAF0FF */
:root {
  --night: #071233;
  --deep: #0A1847;
  --panel: #0E1F57;
  --panel-2: #132869;
  --line: rgba(150, 178, 255, .16);
  --line-2: rgba(150, 178, 255, .28);
  --text: #EAF0FF;
  --muted: #A3B3D9;
  --dim: #7385B3;
  --royal: #2E63FF;
  --royal-2: #4C7DFF;
  --ice: #7FE3FF;
  --gold: #F2C14E;
  --gold-2: #FFDA85;
  --red: #E5243B;
  --red-2: #FF6B7C;
  --silver: #C9D2E3;
  --danger: #FF6B6B;
  --ok: #4ADE9B;
  --r-s: 8px;
  --r-m: 14px;
  --r-l: 22px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', 'Noto Sans Hebrew', 'Noto Sans Georgian', 'Noto Sans Armenian', sans-serif;
  --display: 'Unbounded', 'Inter', system-ui, sans-serif;
  --tabbar-h: 64px;
  --accent: var(--royal);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
input[type=search]::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0; background: var(--night); color: var(--text);
  font: 400 16px/1.55 var(--font); font-feature-settings: 'cv11', 'ss01';
  min-height: 100vh; display: flex; flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; outline: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--ice); outline-offset: 2px; border-radius: 4px;
}
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.12; letter-spacing: -.01em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 3rem); }
h2 { font-size: clamp(1.15rem, 1rem + .7vw, 1.5rem); font-weight: 500; }
p { margin: 0 0 1em; }
small { font-size: .82em; }
code, pre { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; }
.dim { color: var(--dim); }
.skip { position: absolute; inset-inline-start: -999px; top: 8px; background: var(--gold); color: var(--night); padding: .5rem .8rem; border-radius: var(--r-s); z-index: 100; font-weight: 600; }
.skip:focus { inset-inline-start: 8px; }
.wrap { width: min(1180px, 100% - 2rem); margin-inline: auto; }
.narrow { width: min(760px, 100% - 2rem); }
.section { margin-block: clamp(2rem, 1.5rem + 2vw, 3.5rem); }
.section__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.section__head h2 { margin: 0; padding-inline-start: .7rem; border-inline-start: 3px solid var(--red); line-height: 1.15; }
.section__note { color: var(--muted); font-size: .9rem; margin: 0; }
.fineprint { color: var(--muted); font-size: .85rem; }
.textlink { color: var(--ice); text-decoration: none; font-weight: 500; }
.textlink:hover { text-decoration: underline; }
.ico { width: 1.25em; height: 1.25em; flex: none; }

/* ---------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 44px; padding: .55rem 1.1rem; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--panel); color: var(--text); font: 600 .95rem/1 var(--font); text-decoration: none; cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s;
}
.btn:hover { background: var(--panel-2); border-color: var(--royal-2); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--royal); border-color: var(--royal); }
.btn--primary:hover { background: var(--royal-2); }
.btn--ghost { background: transparent; }
.btn--danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn--block { width: 100%; }
.btn--sm { min-height: 34px; padding: .35rem .8rem; font-size: .85rem; }
.btn--google { width: 100%; background: #fff; color: #1f1f1f; border-color: #fff; }
.btn--google:hover { background: #EEF2FF; border-color: #EEF2FF; }
.btn.is-disabled, .ptype.is-disabled { opacity: .45; pointer-events: none; }
.iconbtn { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 0; background: transparent; color: var(--text); cursor: pointer; }
.iconbtn:hover { background: var(--panel); }
.iconbtn .ico { width: 22px; height: 22px; }
.linkbtn { background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: .4em; padding: 0; }
.linkbtn:hover { color: var(--text); }

/* ---------- top bar */
.topbar { position: sticky; top: 0; z-index: 40; background: rgba(7, 18, 51, .82); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
.topbar::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: linear-gradient(90deg, var(--royal) 0%, var(--royal) 38%, var(--red) 62%, var(--gold) 100%); opacity: .9; pointer-events: none; }
.topbar__in { width: min(1280px, 100% - 1.5rem); margin-inline: auto; display: flex; align-items: center; gap: 1.5rem; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; flex: none; }
.brand .mark { width: 34px; height: 34px; }
.brand__word { font-family: var(--display); font-weight: 700; font-size: 1.02rem; letter-spacing: -.02em; white-space: nowrap; }
.mainnav { display: flex; gap: .25rem; margin-inline-start: auto; }
.mainnav a { text-decoration: none; color: var(--muted); font-weight: 500; padding: .5rem .85rem; border-radius: 999px; }
.mainnav a:hover { color: var(--text); background: var(--panel); }
.mainnav a[aria-current] { color: var(--text); background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line-2), inset 0 -2px 0 var(--red); }
.topbar__tools { display: flex; align-items: center; gap: .25rem; }
.langs { position: relative; }
.langs summary { list-style: none; display: inline-flex; align-items: center; gap: .35rem; height: 42px; padding: 0 .7rem; border-radius: 999px; cursor: pointer; color: var(--text); font-weight: 600; font-size: .85rem; }
.langs summary::-webkit-details-marker { display: none; }
.langs summary:hover, .langs[open] summary { background: var(--panel); }
.langs summary .ico { width: 20px; height: 20px; }
.langflag { width: 22px; height: 16px; border-radius: 3px; object-fit: cover; flex: none; box-shadow: 0 0 0 1px rgba(255, 255, 255, .22); display: block; }
.langs ul { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); margin: 0; padding: .4rem; list-style: none; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-m); min-width: 180px; box-shadow: 0 18px 40px rgba(0, 0, 0, .45); z-index: 60; }
.langs a { display: flex; align-items: center; gap: .6rem; padding: .55rem .8rem; border-radius: var(--r-s); text-decoration: none; }
.langs a:hover { background: var(--panel-2); }
.langs a[aria-current] { color: var(--gold); font-weight: 600; }

/* ---------- bottom tab bar (mobile) */
.tabbar { display: none; }
@media (max-width: 820px) {
  .mainnav { display: none; }
  .topbar__in { height: 56px; gap: .5rem; }
  .topbar__tools { margin-inline-start: auto; }
  .brand .mark { width: 30px; height: 30px; }
  .brand__word { font-size: .74rem; line-height: 1.12; white-space: normal; max-width: 6.2em; letter-spacing: -.01em; }
  .tabbar {
    display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; inset: auto 0 0 0; z-index: 45;
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: rgba(10, 24, 71, .94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line);
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; color: var(--muted); font-size: .72rem; font-weight: 600; }
  .tabbar a .ico { width: 24px; height: 24px; }
  .tabbar a[aria-current] { color: var(--text); box-shadow: inset 0 2px 0 var(--red); }
  .tabbar a[aria-current] .ico { color: var(--gold); }
  body { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
}

/* ---------- flashes & alerts */
.flashes { width: min(760px, 100% - 2rem); margin: 1rem auto 0; }
.flash, .alert { padding: .8rem 1rem; border-radius: var(--r-m); border: 1px solid var(--line-2); background: var(--panel); margin: 0 0 .8rem; }
.flash--ok, .alert--ok { border-color: rgba(74, 222, 155, .5); background: rgba(74, 222, 155, .1); }
.flash--err, .alert--err { border-color: rgba(255, 107, 107, .55); background: rgba(255, 107, 107, .1); }
.alert--warn { border-color: rgba(242, 193, 78, .55); background: rgba(242, 193, 78, .1); }
.alert ul { margin: .3rem 0 0; padding-inline-start: 1.2rem; }
.note { border-inline-start: 3px solid var(--gold); background: rgba(242, 193, 78, .07); padding: .65rem .9rem; border-radius: 0 var(--r-s) var(--r-s) 0; color: var(--silver); font-size: .92rem; }

/* ---------- hero (home) */
.hero { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(300px, 380px) 1fr; gap: 1rem; align-items: center; width: min(1320px, 100%); margin-inline: auto; padding: clamp(1rem, 2vw, 2.5rem) clamp(1rem, 2vw, 2rem) 1rem; }
.hero__glow { position: absolute; inset: -30% -10% auto 30%; height: 120%; background: radial-gradient(closest-side, rgba(46, 99, 255, .28), rgba(46, 99, 255, 0) 70%), radial-gradient(closest-side at 70% 40%, rgba(127, 227, 255, .12), transparent 70%); pointer-events: none; z-index: 0; }
.hero > :not(.hero__glow) { position: relative; z-index: 1; }
.hero__logo { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; margin-bottom: 1.25rem; }
.hero__logo .mark { width: clamp(84px, 9vw, 120px); height: auto; filter: drop-shadow(0 10px 30px rgba(46, 99, 255, .45)); }
.wordmark { font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3.1rem); letter-spacing: -.035em; margin: 0; line-height: 1; }
.hero__lede { color: var(--muted); font-size: 1.05rem; max-width: 36ch; }
.langchips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1.25rem; }
.langchips a { gap: .5rem; text-decoration: none; padding: .45rem .8rem; border-radius: 999px; border: 1px solid var(--line-2); font-size: .88rem; font-weight: 500; color: var(--silver); min-height: 38px; display: inline-flex; align-items: center; }
.langchips a:hover { border-color: var(--royal-2); color: var(--text); }
.langchips a[aria-current] { background: var(--text); color: var(--night); border-color: var(--text); font-weight: 700; }
.hero__map { margin: 0; }
@media (max-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding-top: 1.25rem; }
  .hero > * { min-width: 0; }
  .hero__logo { flex-direction: row; align-items: center; gap: .8rem; margin-bottom: .75rem; }
  .hero__logo .mark { width: 56px; }
  .wordmark { font-size: clamp(1.45rem, 7.4vw, 2.2rem); }
  .hero__lede { font-size: .98rem; margin-bottom: 0; }
  .hero__map { margin-inline: -1rem; }
}

/* Language pickers on phones: flag only (the name stays available to screen readers) */
@media (max-width: 640px) {
  .langchips { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: .3rem; margin-top: 1rem; }
  .langchips a { padding: 0; min-height: 44px; justify-content: center; border-radius: 12px; }
  .langchips a span { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  .langchips .langflag { width: 26px; height: 19px; border-radius: 3px; }
  .langchips a[aria-current] { box-shadow: 0 0 0 2px var(--gold); background: var(--panel-2); color: var(--text); border-color: transparent; }
}
@media (max-width: 820px) {
  .langs summary { width: 44px; height: 44px; padding: 0; justify-content: center; }
  .langs summary > span { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  .langs summary .langflag { width: 26px; height: 19px; }
}
@media (max-width: 340px) { .langchips { gap: .2rem; } .langchips .langflag { width: 22px; height: 16px; } }

/* ---------- map */
.euromap { width: 100%; height: auto; overflow: visible;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 5%, #000 93%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 6%, #000 92%, transparent 100%);
  -webkit-mask-composite: source-in; mask-image: linear-gradient(to right, transparent 0, #000 5%, #000 93%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 6%, #000 92%, transparent 100%); mask-composite: intersect; }
.euromap__bg { fill: #0B1842; stroke: none; }
.cty path, .cty circle { stroke: var(--night); stroke-width: .7; stroke-linejoin: round; transition: fill .2s, filter .2s; vector-effect: non-scaling-stroke; }
.cty { cursor: pointer; outline: none; }
.cty.t0 path, .cty.t0 circle { fill: #142350; }
.cty.t1 path, .cty.t1 circle { fill: #213F9C; }
.cty.t2 path, .cty.t2 circle { fill: #2650C4; }
.cty.t3 path, .cty.t3 circle { fill: #2E63FF; }
.cty.t4 path, .cty.t4 circle { fill: #4F86FF; }
.cty.t5 path, .cty.t5 circle { fill: #7FA9FF; }
.cty:hover path, .cty:focus-visible path, .cty:hover circle, .cty:focus-visible circle, .cty.is-sel path, .cty.is-sel circle { fill: var(--ice); }
.cty:focus-visible path { stroke: #fff; stroke-width: 1.5; }
.cty.is-sel path, .cty.is-sel circle { stroke: var(--red); stroke-width: 2; }
.cty.micro circle { stroke: #fff; stroke-width: 1; }
.pins { pointer-events: none; }
.pin__disc { fill: var(--gold); stroke: #FFF3D1; stroke-width: 1.2; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .5)); }
.pin__num { fill: #1A1300; font-family: var(--display); font-weight: 700; text-anchor: middle; }
.pin__glow { opacity: .9; }
.maptip { position: fixed; z-index: 70; pointer-events: none; background: var(--text); color: var(--night); border-radius: var(--r-s); padding: .45rem .7rem; font-size: .85rem; box-shadow: 0 10px 28px rgba(0, 0, 0, .4); transform: translate(-50%, calc(-100% - 12px)); white-space: nowrap; }
.maptip strong { display: block; font-family: var(--display); font-size: .9rem; }
.maplegend { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; justify-content: center; color: var(--muted); font-size: .8rem; margin-top: .5rem; }
.maplegend span { display: inline-flex; align-items: center; gap: .35rem; }
.maplegend i { display: inline-block; width: 14px; height: 10px; border-radius: 2px; }
.maplegend__scale i { width: 10px; margin-inline-end: -2px; }
.maplegend__pin::before { content: ''; width: 12px; height: 12px; border-radius: 50%; background: var(--gold); display: inline-block; }
.maplegend .t0 { background: #142350; } .maplegend .t1 { background: #213F9C; } .maplegend .t2 { background: #2650C4; }
.maplegend .t3 { background: #2E63FF; } .maplegend .t4 { background: #4F86FF; } .maplegend .t5 { background: #7FA9FF; }
.maplegend__scale i:last-of-type { margin-inline-end: .35rem; }

/* full map page */
.mapx__empty { color: var(--muted); display: grid; place-items: center; height: 100%; text-align: center; }
.cpanel__head { display: flex; align-items: center; gap: .8rem; margin-bottom: 1rem; }
.cpanel__head img { width: 48px; height: 36px; border-radius: 4px; }
.cpanel__head h2 { margin: 0; font-size: 1.3rem; }
.cpanel__stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; margin: 0 0 1.25rem; }
.cpanel__stats div { background: var(--panel); border-radius: var(--r-s); padding: .6rem .75rem; }
.cpanel__stats dt { color: var(--muted); font-size: .78rem; }
.cpanel__stats dd { margin: 0; font-family: var(--display); font-size: 1.35rem; }
.cpanel__stats .gold dd { color: var(--gold); }
.cpanel__top { list-style: none; margin: 0 0 1.25rem; padding: 0; }
.cpanel__top a { display: flex; justify-content: space-between; gap: .5rem; padding: .6rem 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.cpanel__top a:hover strong { color: var(--ice); }
.cpanel__top small { color: var(--muted); display: block; }
.cpanel__top .t { color: var(--gold); font-family: var(--display); white-space: nowrap; }
.cpanel__close { display: none; }
.cpanel__more { display: none; }
@media (max-width: 960px) {
  .mapx__panel {
    position: fixed; inset: auto 0 calc(var(--tabbar-h) + env(safe-area-inset-bottom)) 0; top: auto; max-height: 62vh; z-index: 44;
    border: 0; border-top: 1px solid var(--line-2); border-radius: var(--r-l) var(--r-l) 0 0; box-shadow: 0 -20px 50px rgba(0, 0, 0, .5);
    transform: translateY(110%); transition: transform .28s cubic-bezier(.2, .8, .2, 1); padding-top: 1.75rem;
  }
  .mapx__panel.is-open { transform: none; }
  .mapx__panel.is-open:not(.is-full) { max-height: 226px; overflow: hidden; padding-bottom: .9rem; }
  .mapx__panel:not(.is-full) .cpanel__head { margin-bottom: .6rem; padding-inline-end: 5.6rem; }
  .mapx__panel:not(.is-full) .cpanel__head img { width: 36px; height: 27px; }
  .mapx__panel:not(.is-full) .cpanel__head h2 { font-size: 1.1rem; }
  .mapx__panel:not(.is-full) .cpanel__stats { grid-template-columns: repeat(4, 1fr); gap: .35rem; margin-bottom: .7rem; }
  .mapx__panel:not(.is-full) .cpanel__stats div { padding: .4rem .5rem; }
  .mapx__panel:not(.is-full) .cpanel__stats dt { font-size: .62rem; line-height: 1.2; }
  .mapx__panel:not(.is-full) .cpanel__stats dd { font-size: 1.05rem; }
  .mapx__panel:not(.is-full) .cpanel__top:not(.cpanel__clubs), .mapx__panel:not(.is-full) h3.fineprint { display: none; }
  .mapx__panel:not(.is-full) .cpanel__clubs { max-height: 108px; overflow-y: auto; margin-bottom: 0; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
  .mapx__panel:not(.is-full) .btn--block { min-height: 44px; }
  .cpanel__more { display: inline-grid; position: absolute; inset-inline-end: 3.4rem; top: .6rem; }
  .is-full .cpanel__more svg { transform: rotate(180deg); }
  .mapx__panel::before { content: ''; position: absolute; top: 8px; left: 50%; width: 40px; height: 4px; border-radius: 2px; background: var(--line-2); transform: translateX(-50%); }
  .mapx__empty { display: none; }
  .cpanel__close { display: inline-grid; position: absolute; inset-inline-end: .6rem; top: .6rem; }
}

/* ---------- map: clubs layer */
.mapx [hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.mx-scale { display: inline-flex; margin-inline-end: .1rem; }
.mx-scale i { width: 12px; height: 10px; }
.mx-scale .s1 { background: #213F9C; } .mx-scale .s2 { background: #2650C4; } .mx-scale .s3 { background: #2E63FF; } .mx-scale .s4 { background: #4F86FF; } .mx-scale .s5 { background: #7FA9FF; }
.mx-scale i:first-child { border-radius: 2px 0 0 2px; } .mx-scale i:last-child { border-radius: 0 2px 2px 0; }
.mapx__filter { display: inline-flex; align-items: center; }
.mapx__filter select { font: 600 .9rem var(--font); color: var(--text); background: var(--deep); border: 1px solid var(--line-2); border-radius: 999px; padding: .5rem 2rem .5rem .9rem; min-height: 40px; max-width: min(60vw, 260px); cursor: pointer; }
.mapx__filter select:focus-visible { outline: 2px solid var(--ice); outline-offset: 2px; }
.mapx__zoom .iconbtn { font: 600 1.35rem/1 var(--font); display: inline-grid; place-items: center; color: var(--text); cursor: pointer; }
.mapx__zoom .iconbtn:focus-visible { outline: 2px solid var(--ice); outline-offset: 2px; }
.mapx__legend li { display: inline-flex; align-items: center; gap: .45rem; }
.lg { display: inline-grid; place-items: center; width: 14px; height: 14px; border-radius: 50%; font: 700 .62rem/1 var(--display); color: #1A1300; flex: none; }
.lg--gold { background: var(--gold); box-shadow: 0 0 0 1px #FFF3D1; }
.lg--ice { background: var(--ice); box-shadow: 0 0 0 1px #fff; }
.lg--many { width: 18px; height: 18px; background: var(--red); color: #fff; box-shadow: 0 0 0 1px #fff; }

.cpanel__clubs a { align-items: center; justify-content: flex-start; }
.cpanel__clubs a > svg { flex: none; }
.cpanel__clubs .cl__txt { flex: 1; min-width: 0; }
.cpanel__clubs .cl__txt small { overflow-wrap: break-word; }
.cpanel__clubs .t { margin-inline-start: auto; text-align: end; font-size: .85rem; white-space: normal; }
.cpanel__clubs .t .dim { color: var(--muted); font-family: var(--font); }
@media (max-width: 480px) {
  .mapx__slot .seg button { padding: .45rem .6rem; font-size: .8rem; }
}

/* ---------- segmented control */
.seg { display: inline-flex; padding: 4px; background: var(--deep); border: 1px solid var(--line); border-radius: 999px; gap: 2px; }
.seg button { border: 0; background: transparent; color: var(--muted); font: 600 .85rem var(--font); padding: .5rem .9rem; border-radius: 999px; cursor: pointer; min-height: 36px; }
.seg button[aria-checked="true"] { background: var(--text); color: var(--night); }
.seg--small button { padding: .35rem .75rem; font-size: .8rem; min-height: 32px; }

/* ---------- ranking (home) */
.ranking { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: .25rem 2rem; }
.ranking a { display: grid; grid-template-columns: 1.6rem 28px minmax(0, 1fr) 2.2rem; grid-template-areas: 'pos flag name num' 'pos flag bar bar' '. . sub sub'; align-items: center; column-gap: .75rem; padding: .7rem .25rem; border-bottom: 1px solid var(--line); text-decoration: none; }
.ranking a:hover .ranking__name { color: var(--ice); }
.ranking__pos { grid-area: pos; color: var(--dim); font-family: var(--display); font-size: .85rem; }
.ranking .flag { grid-area: flag; width: 28px; height: 21px; border-radius: 3px; }
.ranking__name { grid-area: name; font-weight: 600; }
.ranking__num { grid-area: num; text-align: end; font-family: var(--display); font-size: 1.35rem; color: var(--gold); }
.ranking__bar { grid-area: bar; height: 4px; background: var(--panel); border-radius: 2px; overflow: hidden; margin-top: .35rem; }
.ranking__bar i { display: block; height: 100%; background: linear-gradient(90deg, #C8961F, var(--gold)); border-radius: 2px; }
.ranking__sub { grid-area: sub; font-size: .78rem; color: var(--dim); margin-top: .2rem; }
@media (max-width: 720px) { .ranking { grid-template-columns: 1fr; } }

/* ---------- country grid */
.countrygrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .5rem; }
.countrygrid a { display: grid; grid-template-columns: 30px 1fr auto; grid-template-rows: auto auto; column-gap: .7rem; align-items: center; padding: .7rem .8rem; border-radius: var(--r-m); background: var(--deep); border: 1px solid transparent; text-decoration: none; min-height: 60px; }
.countrygrid a:hover { border-color: var(--line-2); background: var(--panel); }
.countrygrid .flag { grid-row: span 2; width: 30px; height: 22px; border-radius: 3px; }
.countrygrid__name { font-weight: 600; line-height: 1.2; }
.countrygrid__meta { grid-column: 2; font-size: .8rem; color: var(--muted); }
.countrygrid__t { grid-row: 1 / span 2; grid-column: 3; display: inline-flex; align-items: center; gap: .2rem; color: var(--gold); font-family: var(--display); font-size: .9rem; }
.countrygrid__t .ico { width: 16px; height: 16px; }
.countrygrid .is-empty a { opacity: .6; }

/* ---------- page heads, crumbs, kpis */
.crumbs { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; font-size: .85rem; color: var(--muted); padding-top: 1.25rem; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.crumbs .ico { width: 14px; height: 14px; opacity: .6; }
.phead { display: flex; align-items: center; gap: 1.25rem; margin: 1.25rem 0 1.5rem; }
.phead--plain { margin-top: 2rem; }
.phead h1 { margin: 0 0 .25rem; }
.phead__flag { width: 72px; height: 54px; border-radius: 6px; box-shadow: 0 6px 20px rgba(0, 0, 0, .35); flex: none; }
.phead__sub { color: var(--muted); margin: 0; }
@media (max-width: 560px) { .phead__flag { width: 52px; height: 39px; } .phead { gap: .9rem; } }
.kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; margin: 0 0 1rem; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; }
.kpi { background: var(--deep); padding: .9rem 1rem; min-width: 0; }
.kpi dt { color: var(--muted); font-size: .8rem; margin-bottom: .2rem; }
.kpi dd { margin: 0; font-family: var(--display); font-size: clamp(1.3rem, 1rem + 1vw, 1.9rem); line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi dd small { color: var(--muted); font-size: .6em; }
.kpi--gold dd { color: var(--gold); }
.kpi__txt { font-size: 1.05rem !important; line-height: 1.25 !important; padding-top: .3rem; }
.kpi__rec { display: flex; gap: .55rem; }
.kpi__rec span:nth-child(1) { color: var(--ok); }
.kpi__rec span:nth-child(3) { color: var(--red-2); }
.kpi__cap { font-family: var(--font) !important; font-size: .72rem !important; color: var(--dim); margin-top: .2rem !important; }
@media (max-width: 960px) { .kpis:not(.kpis--stats) { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .kpis:not(.kpis--stats) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 340px) { .kpis--stats .kpi dt { font-size: .66rem; } .kpis--stats .kpi .kpi__txt { font-size: .95rem !important; } .stage { font-size: .7rem; padding: .18rem .4rem; } }
.kpis--admin { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
/* Stats panel (country + club pages): compact, centred, number first and its caption underneath */
.kpis--stats { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 720px; margin: 1.25rem auto 1.5rem; text-align: center; }
.kpis--stats .kpi { display: flex; flex-direction: column-reverse; justify-content: center; align-items: center; gap: .35rem; padding: 1rem .6rem; }
.kpis--stats .kpi dd { font-size: clamp(1.45rem, 1.1rem + 1.3vw, 2rem); line-height: 1; margin: 0; }
.kpis--stats .kpi dt, .kpis--stats .kpi .kpi__txt { overflow-wrap: break-word; max-width: 100%; }
.kpis--stats .kpi dt { margin: 0; font-size: .8rem; line-height: 1.25; color: var(--muted); text-wrap: balance; hyphens: manual; -webkit-hyphens: manual; }
.kpis--stats .kpi .kpi__txt { font-size: clamp(1.05rem, .9rem + .6vw, 1.3rem) !important; line-height: 1.1 !important; padding-top: 0; }
.kpis--stats .kpi--win dd { color: var(--ok); }
.kpis--stats .kpi--loss dd { color: var(--red-2); }
@media (max-width: 480px) {
  .kpis--stats { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-inline: 0; }
  .kpis--stats .kpi { padding: .85rem .35rem; }
  .kpis--stats .kpi dd { font-size: clamp(1.25rem, 5.4vw, 1.6rem); }
  .kpis--stats .kpi dt { font-size: .72rem; }
}


/* ---------- club list (country page) */
.clublist { border-top: 1px solid var(--line); }
.clublist__head, .clubrow { display: grid; grid-template-columns: 40px minmax(0, 1fr) 7rem 10rem 5rem 7rem; align-items: center; gap: .75rem; }
.clublist__head { padding: .6rem .75rem; color: var(--dim); font-size: .78rem; }
.clublist__head span:first-child { grid-column: 1 / 3; }
.clublist__head span:nth-child(n+2) { text-align: start; }
.clubrow { padding: .7rem .75rem; border-bottom: 1px solid var(--line); text-decoration: none; border-radius: var(--r-s); }
.clubrow:hover { background: var(--deep); }
.clubrow:hover strong { color: var(--ice); }
.clubrow__name strong { font-weight: 600; display: block; line-height: 1.25; }
.clubrow__name small { color: var(--muted); }
.clubrow__name .yrs { color: var(--dim); margin-inline-start: .35rem; }
.clubrow__seasons b { font-family: var(--display); font-weight: 500; }
.clubrow__seasons em { display: none; }
.clubrow__titles { display: inline-flex; align-items: center; gap: .25rem; color: var(--gold); font-family: var(--display); }
.clubrow__titles .ico { width: 18px; height: 18px; }
.clubrow__rec { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .9rem; }
@media (max-width: 820px) {
  .clublist__head { display: none; }
  .clubrow { grid-template-columns: 34px minmax(0, 1fr) auto; grid-template-areas: 'b n t' 'b n s'; row-gap: .1rem; padding: .75rem .25rem; border-radius: 0; }
  .clubrow > svg { grid-area: b; align-self: start; }
  .clubrow__name { grid-area: n; }
  .clubrow__titles { grid-area: t; justify-self: end; }
  .clubrow__seasons { grid-area: s; justify-self: end; font-size: .8rem; color: var(--muted); }
  .clubrow__seasons em { display: inline; font-style: normal; margin-inline-start: .25rem; }
  .clubrow__best { display: none; }
  .clubrow__rec { display: none; }
  .clubrow__name .yrs { display: block; margin: 0; }
}
.stage { display: inline-block; padding: .2rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--panel); color: var(--silver); white-space: nowrap; }
.stage--W { background: var(--gold); color: #1A1300; }
.stage--F { background: rgba(229, 36, 59, .16); color: #FFC2CA; box-shadow: inset 0 0 0 1px rgba(229, 36, 59, .7); }
.stage--SF { background: rgba(127, 227, 255, .14); color: var(--ice); }
.stage--QF { background: rgba(76, 125, 255, .18); color: #B5C9FF; }

/* ---------- club page */
.clubhero { position: relative; background: radial-gradient(800px 300px at 15% 0%, color-mix(in srgb, var(--c1) 30%, transparent), transparent 70%), linear-gradient(180deg, var(--deep), var(--night)); border-bottom: 1px solid var(--line); padding-bottom: 1.75rem; }
.clubhero__stripe { height: 6px; background: linear-gradient(90deg, var(--c1) 0 60%, var(--c2) 60% 80%, var(--c1) 80%); }
.clubhead { display: flex; align-items: center; gap: 1.25rem; margin-top: 1rem; }
.clubhead h1 { margin: 0 0 .35rem; }
.clubhead__sub { display: flex; align-items: center; gap: .5rem; color: var(--muted); margin: 0; flex-wrap: wrap; }
.clubhead__sub a { text-decoration: none; color: var(--text); }
.clubhead__sub .flag { width: 22px; height: 16px; border-radius: 2px; }
.clubhead .sep { width: 4px; height: 4px; border-radius: 50%; background: var(--dim); }
.badge--xl { filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .45)); flex: none; }
.tr-hint { color: var(--dim); font-size: .8rem; margin: .4rem 0 0; }
@media (max-width: 560px) { .clubhead { align-items: flex-start; } .badge--xl { width: 60px; height: 69px; } }
.clubhero + .wrap { padding-top: 1.25rem; }
.pathchart { overflow-x: auto; background: var(--deep); border: 1px solid var(--line); border-radius: var(--r-m); padding: .75rem .5rem .25rem; scrollbar-color: var(--line-2) transparent; }
.pathchart svg { max-width: none; }
.pc__grid { stroke: var(--line); stroke-dasharray: 2 4; }
.pc__axis { stroke: var(--line-2); }
.pc__tick { stroke: var(--line-2); }
.pc__lv { fill: var(--dim); font-size: 9.5px; font-family: var(--font); }
.pc__yr { fill: var(--muted); font-size: 10px; font-family: var(--font); }
.pc__bar { fill: var(--bar); opacity: .9; }
.pc__bar:hover { opacity: 1; }
.pc__bar--f { fill: var(--silver); }
.pc__bar--w { fill: var(--gold); }
.pc__star { fill: var(--gold); }
.finals { list-style: none; margin: 0; padding: 0; }
.final { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr) 6.5rem minmax(0, 1fr); align-items: center; gap: .75rem; padding: .7rem .25rem; border-bottom: 1px solid var(--line); }
.final__yr { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .9rem; }
.final__yr em { display: block; font-style: normal; font-size: .75rem; color: var(--dim); }
.final__team { text-decoration: none; color: var(--muted); text-align: end; }
.final__team--a { text-align: start; }
.final__team.is-win { color: var(--text); font-weight: 700; }
.final__team.is-win::after { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); margin-inline-start: .4rem; vertical-align: middle; }
.final__team--a.is-win::after { display: none; }
.final__team--a.is-win::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); margin-inline-end: .4rem; vertical-align: middle; }
.final__team:hover { color: var(--ice); }
.final__score { text-align: center; font-family: var(--display); font-size: 1.05rem; background: var(--panel); border-radius: var(--r-s); padding: .3rem .2rem; }
.final__score small { display: block; font-family: var(--font); font-size: .7rem; color: var(--muted); }
@media (max-width: 640px) {
  .final { grid-template-columns: 4rem minmax(0, 1fr) 4.6rem; grid-template-areas: 'y h s' 'y a s'; row-gap: .15rem; }
  .final__yr { grid-area: y; }
  .final__team { grid-area: h; text-align: start; }
  .final__team--a { grid-area: a; }
  .final__score { grid-area: s; }
  .final__team.is-win::after { display: none; }
  .final__team.is-win::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); margin-inline-end: .35rem; vertical-align: middle; }
}
.seasons { border-top: 1px solid var(--line); }
.seasons__row { display: grid; grid-template-columns: 9rem minmax(0, 1fr) repeat(4, 3rem) 4.5rem; align-items: center; gap: .5rem; padding: .55rem .5rem; border-bottom: 1px solid var(--line); }
.seasons__row--head { color: var(--dim); font-size: .78rem; }
.seasons__row:not(.seasons__row--head):hover { background: var(--deep); }
.seasons .num { text-align: end; font-variant-numeric: tabular-nums; }
.seasons__row--head span:nth-child(n+3) { text-align: end; }
.seasons__yr { font-variant-numeric: tabular-nums; font-weight: 600; }
.histtag { font-size: .68rem; font-weight: 700; color: var(--gold); border: 1px solid rgba(242, 193, 78, .5); border-radius: 4px; padding: 0 .3rem; text-decoration: none; margin-inline-start: .25rem; cursor: help; }
@media (max-width: 640px) {
  .seasons__row--head { display: none; }
  .seasons__row { grid-template-columns: repeat(5, auto) minmax(0, 1fr); column-gap: .9rem; row-gap: .3rem; }
  .seasons__row > span:nth-child(1) { grid-column: 1 / 6; }
  .seasons__row > span:nth-child(2) { grid-column: 6; justify-self: end; min-width: 0; max-width: 100%; }
  .seasons__row > span:nth-child(2) .stage { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .seasons__row .num { display: inline-flex; gap: .25rem; font-size: .82rem; color: var(--muted); text-align: start; }
  .seasons__row .num::before { content: attr(data-l); color: var(--dim); }
}

/* transliteration tooltip (hover desktop, long-press mobile) */
.tr { position: relative; -webkit-touch-callout: none; cursor: help; text-decoration: underline dotted rgba(163, 179, 217, .55); text-underline-offset: .2em; text-decoration-thickness: 1px; }
.tr::after {
  content: attr(data-tr); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translate(-50%, 4px); opacity: 0; pointer-events: none;
  background: var(--text); color: var(--night); font: 600 .82rem/1.2 var(--font); padding: .4rem .6rem; border-radius: var(--r-s); white-space: nowrap; z-index: 30;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .4); transition: opacity .15s, transform .15s; letter-spacing: 0;
}
@media (hover: hover) and (pointer: fine) { .tr:hover::after, .tr:focus-visible::after { opacity: 1; transform: translate(-50%, 0); } }
.tr.is-show::after { opacity: 1; transform: translate(-50%, 0); }
h1 .tr::after { font-size: .9rem; }
.js-tr .tr::after { display: none; }
.trtip { position: fixed; z-index: 80; max-width: min(360px, calc(100vw - 16px)); pointer-events: none; background: var(--text); color: var(--night); font: 600 .85rem/1.25 var(--font); padding: .4rem .65rem; border-radius: var(--r-s); box-shadow: 0 8px 22px rgba(0, 0, 0, .4); overflow-wrap: anywhere; letter-spacing: 0; }
.tr-hint--touch { display: none; }
@media (pointer: coarse) {
  .tr-hint--touch { display: block; margin: -.25rem 0 .8rem; }
  .tr { cursor: pointer; text-decoration-color: rgba(127, 227, 255, .8); }
  .tr::after { content: none; }
  .tr.is-sel { text-decoration: none; }
  /* pinned (tapped) club: the Latin-letter name stays visible under the original one */
  .tr.is-sel::after {
    content: attr(data-tr); position: static; display: block; width: fit-content; max-width: 100%; transform: none; opacity: 1;
    margin-top: .3rem; padding: .18rem .5rem; border-radius: 6px; background: rgba(127, 227, 255, .16); color: var(--ice);
    box-shadow: inset 0 0 0 1px rgba(127, 227, 255, .4); font: 600 .8rem/1.25 var(--font); white-space: normal; text-decoration: none; letter-spacing: 0;
  }
  h1 .tr.is-sel::after { font-size: .9rem; }
}

/* ---------- empty / error */
.empty { text-align: center; padding: 3rem 1rem; background: var(--deep); border: 1px dashed var(--line-2); border-radius: var(--r-l); margin: 1rem 0 3rem; }
.empty__title { font-family: var(--display); font-size: 1.2rem; }
.empty--page { margin-top: 3rem; }
.empty__code { font-family: var(--display); font-size: 4rem; color: var(--gold); margin: 0; line-height: 1; }

/* ---------- prose */
.prose { padding-block: 2rem 3rem; overflow-wrap: anywhere; }
.prose h2 { margin-top: 2rem; }
.prose p, .prose li { color: var(--silver); max-width: 70ch; }
.prose a { color: var(--ice); }

/* ---------- forms & auth */
.authwrap { display: grid; place-items: start center; padding: clamp(1.5rem, 4vw, 4rem) 1rem; }
.authcard { width: min(440px, 100%); background: var(--deep); border: 1px solid var(--line); border-radius: var(--r-l); padding: clamp(1.25rem, 3vw, 2rem); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
.authwrap--wide .authcard { width: min(620px, 100%); }
.authcard h1 { font-size: 1.6rem; }
.authcard__sub { color: var(--muted); }
.authcard__links { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: 1.25rem 0 0; font-size: .92rem; color: var(--muted); }
.authcard__links a { color: var(--ice); text-decoration: none; }
.divider { display: flex; align-items: center; gap: .8rem; color: var(--dim); font-size: .82rem; margin: 1rem 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.form { display: grid; gap: 1rem; }
.form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 1rem; min-width: 0; }
.form fieldset[disabled] { opacity: .5; }
.form--inline { grid-template-columns: 1fr auto; align-items: end; }
.form--grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.form__actions { grid-column: 1 / -1; }
.field { display: grid; gap: .35rem; }
.field > span { font-weight: 600; font-size: .9rem; }
.field em { font-weight: 400; color: var(--dim); font-style: normal; font-size: .82rem; }
.field small { color: var(--dim); }
.field__err { color: var(--red-2) !important; }
input:not([type=checkbox]):not([type=color]):not([type=file]), select, textarea {
  width: 100%; min-height: 46px; padding: .6rem .85rem; border-radius: var(--r-s); border: 1px solid var(--line-2);
  background: var(--night); color: var(--text); font: 400 1rem var(--font);
}
input:focus, select:focus { border-color: var(--royal-2); outline: none; box-shadow: 0 0 0 3px rgba(46, 99, 255, .3); }
input[readonly] { opacity: .7; }
input.otp { font-family: var(--display); letter-spacing: .25em; font-size: 1.2rem; text-align: center; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-size: .9rem; color: var(--silver); }
.check input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--royal); flex: none; }
.check a { color: var(--ice); }
.pw { position: relative; display: block; }
.pw input { padding-inline-end: 3rem; }
.pw__toggle { position: absolute; inset-inline-end: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.formgroup { border: 1px solid var(--line); border-radius: var(--r-m); padding: 1rem; display: grid; gap: 1rem; }
.formgroup__t { font-family: var(--display); font-size: .95rem; margin: 0; }
.back { display: inline-flex; align-items: center; gap: .3rem; color: var(--muted); text-decoration: none; font-size: .9rem; margin: 1rem 0; }
.back .ico { width: 16px; height: 16px; }
.closed { display: flex; gap: .9rem; align-items: flex-start; padding: 1rem; border-radius: var(--r-m); background: rgba(242, 193, 78, .1); border: 1px solid rgba(242, 193, 78, .5); margin-bottom: 1.25rem; }
.closed__ico { color: var(--gold); width: 26px; height: 26px; }
.closed__title { font-family: var(--display); font-weight: 700; margin: 0 0 .25rem; color: var(--gold-2); }
.closed p:last-child { margin: 0; color: var(--silver); font-size: .92rem; }
.ptypes { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.ptype { display: grid; gap: .35rem; padding: 1.1rem; border-radius: var(--r-m); border: 1px solid var(--line-2); background: var(--night); text-decoration: none; }
.ptype:hover { border-color: var(--royal-2); }
.ptype__ico { width: 28px; height: 28px; color: var(--ice); }
.ptype__t { font-family: var(--display); font-weight: 700; }
.ptype__d { color: var(--muted); font-size: .88rem; }
@media (max-width: 520px) { .ptypes { grid-template-columns: 1fr; } }
.card { background: var(--deep); border: 1px solid var(--line); border-radius: var(--r-m); padding: clamp(1rem, 2.5vw, 1.5rem); margin-bottom: 1rem; }
.card h2 { font-size: 1.1rem; }
.card--warn { border-color: rgba(242, 193, 78, .6); }
.card--link { display: flex; align-items: center; gap: .75rem; text-decoration: none; font-weight: 600; }
.card--link span { flex: 1; }
.card--link:hover { border-color: var(--line-2); }
.accounthead { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin: 2rem 0 1.25rem; flex-wrap: wrap; }
.tag { display: inline-block; font-size: .72rem; background: var(--gold); color: var(--night); padding: .1rem .45rem; border-radius: 4px; font-weight: 700; vertical-align: middle; }
.status--on { color: var(--ok); display: flex; gap: .4rem; align-items: center; }
.steps { padding-inline-start: 1.2rem; display: grid; gap: 1rem; }
.qr { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin-top: .75rem; }
.qr__img { background: #fff; padding: 10px; border-radius: var(--r-s); width: 180px; height: 180px; }
.qr__img svg, .qr__img img { width: 100%; height: 100%; }
.secret { display: inline-block; background: var(--night); padding: .4rem .6rem; border-radius: var(--r-s); letter-spacing: .08em; word-break: break-all; }
.codes { columns: 2; font-size: 1.05rem; }
.danger summary { cursor: pointer; color: var(--danger); font-weight: 600; }
.danger .form { margin-top: 1rem; }

/* ---------- search overlay */
.search { position: fixed; inset: 0; z-index: 80; background: rgba(4, 10, 30, .7); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; justify-content: center; align-items: flex-start; padding: max(6vh, env(safe-area-inset-top)) 1rem 1rem; }
.search[hidden] { display: none; }
.search__panel { width: min(620px, 100%); background: var(--deep); border: 1px solid var(--line-2); border-radius: var(--r-l); box-shadow: 0 30px 90px rgba(0, 0, 0, .6); overflow: hidden; }
.search__bar { display: flex; align-items: center; gap: .5rem; padding: .5rem .5rem .5rem 1rem; border-bottom: 1px solid var(--line); }
.search__bar > .ico { color: var(--muted); }
.search__bar input { border: 0 !important; background: transparent !important; box-shadow: none !important; font-size: 1.1rem !important; }
.search__results { list-style: none; margin: 0; padding: .4rem; max-height: min(60vh, 520px); overflow: auto; }
.search__results a { display: flex; align-items: center; gap: .75rem; padding: .65rem .7rem; border-radius: var(--r-s); text-decoration: none; }
.search__results a[aria-selected="true"], .search__results a:hover { background: var(--panel-2); }
.search__results img { width: 24px; height: 18px; border-radius: 2px; flex: none; }
.search__results .n { font-weight: 600; }
.search__results .lt { color: var(--muted); font-weight: 400; margin-inline-start: .4rem; }
.search__results .m { color: var(--muted); font-size: .82rem; display: block; }
.search__empty { padding: 1rem 1.25rem; color: var(--muted); margin: 0; }

/* ---------- footer */
.footer { border-top: 1px solid var(--line); background: var(--deep); margin-top: 3rem; padding: 2rem 0 1.5rem; }
.footer__in { width: min(1180px, 100% - 2rem); margin-inline: auto; display: grid; gap: 1rem; }
.footer__brand { display: flex; gap: .8rem; align-items: center; }
.footer__brand .mark { width: 36px; height: 36px; flex: none; }
.footer__brand p { margin: 0; color: var(--muted); }
.footer__links { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; }
.footer__links a { color: var(--silver); text-decoration: none; font-size: .92rem; }
.footer__links a:hover { color: var(--text); }
.footer__fine { color: var(--dim); font-size: .78rem; margin: 0; max-width: 80ch; }

/* ---------- admin */
.admin { background: var(--night); }
.adminbar { display: flex; align-items: center; gap: 1rem; padding: .75rem 1.25rem; border-bottom: 1px solid var(--line); background: var(--deep); flex-wrap: wrap; position: sticky; top: 0; z-index: 20; }
.adminnav { display: flex; gap: .25rem; flex-wrap: wrap; flex: 1; }
.adminnav a { color: var(--muted); text-decoration: none; padding: .4rem .7rem; border-radius: 999px; font-size: .9rem; }
.adminnav a[aria-current] { background: var(--panel-2); color: var(--text); }
.adminmain { width: min(1280px, 100% - 2rem); margin: 1.5rem auto 3rem; }
.adminmain h1 { font-size: 1.6rem; }
.adminhead { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.adminhead h1 { margin: 0; }
.admingrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 1rem; align-items: start; }
.filters { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .5rem; }
.filters input { max-width: 320px; }
.filters select { max-width: 240px; }
.tablewrap { overflow-x: auto; }
.atable { width: 100%; border-collapse: collapse; font-size: .9rem; }
.atable th { text-align: start; color: var(--dim); font-weight: 600; font-size: .78rem; padding: .5rem; border-bottom: 1px solid var(--line-2); }
.atable td { padding: .45rem .5rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.atable a { color: var(--ice); text-decoration: none; }
.atable .num { text-align: end; }
.atable--compact td { font-size: .82rem; }
.atable--edit input, .atable--edit select { min-height: 36px !important; padding: .3rem .4rem !important; font-size: .88rem !important; min-width: 64px; }
.atable--edit td:first-child input { min-width: 86px; }
.atable--edit .newrow td { background: rgba(46, 99, 255, .08); }
.field--colors { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.field--colors > span { width: 100%; }
.field--colors label { display: inline-flex; align-items: center; gap: .4rem; }
input[type=color] { width: 44px; height: 36px; border: 1px solid var(--line-2); border-radius: 6px; background: none; padding: 2px; }
.plainlist { padding-inline-start: 1.1rem; }
.plainlist a { color: var(--ice); }
pre.code { background: var(--night); padding: .75rem; border-radius: var(--r-s); overflow-x: auto; font-size: .82rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  .topbar, .tabbar, .footer, .search { display: none !important; }
  body { background: #fff; color: #000; }
}

.field--pair { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }

@media (max-width: 360px) {
  .mapx__slot .seg { padding: 3px; gap: 0; }
  .mapx__slot .seg button { padding: .4rem .42rem; font-size: .72rem; min-height: 34px; }
}


/* colour legend: always names the metric and gives the real range behind each colour */
.lgd__scale { display: inline-flex; flex-direction: column; align-items: center; gap: .3rem; }
.lgd__head { display: inline-flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: .1rem .6rem; }
.lgd__dir { color: var(--muted); }
.lgd__chips { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: .3rem .8rem; }
.lgd__lbl { color: var(--text); font-weight: 600; }
.lgd__c { display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap; }
.lgd__c i { display: inline-block; width: 16px; height: 12px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .22); }
.lgd__c .t0 { background: #142350; } .lgd__c .t1 { background: #213F9C; } .lgd__c .t2 { background: #2650C4; }
.lgd__c .t3 { background: #2E63FF; } .lgd__c .t4 { background: #4F86FF; } .lgd__c .t5 { background: #7FA9FF; }

/* the control that swaps with the layer (metrics / country filter) and the layer buttons: same size in every state */
.mapx__slot > .seg, .mapx__slot > .mapx__filter { height: 46px; box-sizing: border-box; }
.mapx__slot > .seg { display: flex; }
.mapx__slot > .seg button { flex: 1 1 0; min-width: 0; text-align: center; white-space: nowrap; }
.mapx__slot > .mapx__filter select { width: 100%; max-width: none; height: 46px; min-height: 46px; box-sizing: border-box; }
.seg--layer { display: inline-flex; height: 46px; box-sizing: border-box; }
.seg--layer button { min-width: 88px; text-align: center; }

/* ---------- map page: the map fills everything between the header and the bottom bar; controls float over it */
body.page-map { height: 100vh; height: 100dvh; overflow: hidden; }
body.page-map .footer { display: none; }
body.page-map main { flex: 1; min-height: 0; position: relative; }
.mapx { position: absolute; inset: 0; overflow: hidden; background: #0B1842; --glass: rgba(7, 18, 51, .86); }
.mapx__map { position: absolute; inset: 0; }
.mapx__bar { position: absolute; z-index: 5; top: 12px; left: 12px; display: flex; align-items: center; gap: .5rem; pointer-events: none; }
.mapx__bar > *, .mapx__zoom, .mapx__card { pointer-events: auto; }
.mapx__bar .seg, .mapx__filter select, .mapx__zoom, .mapx__card { background: var(--glass); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 6px 22px rgba(0, 0, 0, .38); }
.mapx__bar .seg { border-color: var(--line-2); }
.mapx__slot { display: inline-grid; align-items: stretch; height: 46px; min-width: 0; max-width: 100%; }
.mapx__zoom { position: absolute; z-index: 5; right: 12px; bottom: 24px; display: flex; flex-direction: column; gap: 0; padding: 3px; border: 1px solid var(--line-2); border-radius: 14px; transition: right .28s cubic-bezier(.2, .8, .2, 1); }
.mapx__zoom .iconbtn, .mapx__zoom .iconbtn--txt { width: 42px; height: 42px; padding: 0; border: 0; border-radius: 11px; background: transparent; }
.mapx__zoom .iconbtn:hover { background: rgba(255, 255, 255, .1); }
.mapx__zoom .iconbtn + .iconbtn { border-top: 1px solid var(--line); border-radius: 0; }
.mapx__zoom .iconbtn:first-child { border-radius: 11px 11px 0 0; } .mapx__zoom .iconbtn:last-child { border-radius: 0 0 11px 11px; }
.mapx__card { position: absolute; z-index: 5; left: 12px; bottom: 24px; max-width: min(430px, calc(100% - 76px)); padding: .65rem .85rem; border: 1px solid var(--line-2); border-radius: 14px; }
.mapx__legend { list-style: none; display: flex; flex-wrap: wrap; justify-content: flex-start; gap: .35rem 1rem; margin: 0; padding: 0; color: var(--muted); font-size: .8rem; }
.mapx__legend li { display: inline-flex; align-items: center; gap: .45rem; }
.mapx__legend .lgd__scale { align-items: flex-start; }
.mapx__legend .lgd__head, .mapx__legend .lgd__chips { justify-content: flex-start; }

@media (min-width: 961px) {
  .mapx__panel { position: absolute; z-index: 6; top: 12px; right: 12px; bottom: 24px; width: 340px; border: 1px solid var(--line-2); border-radius: 16px; background: var(--glass); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 10px 40px rgba(0, 0, 0, .5); padding: 1.25rem; overflow: auto; }
  .mapx__panel:not(.is-open) { display: none; }
  .mapx__panel .cpanel__close { display: inline-grid; position: absolute; right: .5rem; top: .5rem; }
  .mapx:has(.mapx__panel.is-open) .mapx__zoom { right: 364px; }
}
@media (max-width: 960px) {
  .mapx__bar { right: 12px; flex-direction: column; align-items: flex-start; gap: .5rem; }
  .mapx__zoom { right: 12px; bottom: auto; top: 120px; }
  .mapx__zoom .iconbtn--txt { display: inline-grid; }
  .mapx__card { bottom: 12px; padding: .5rem .7rem; font-size: .75rem; max-width: calc(100% - 76px); }
  .mapx:has(.mapx__panel.is-open) .mapx__card { display: none; }
  .mapx__panel { padding: 1.75rem 1rem .9rem; }
}
@media (max-width: 480px) {
  .mapx__zoom .iconbtn { width: 40px; height: 40px; }
}

/* map page: land outside the clubs' countries (Africa, Asia, ...) in its own neutral colour, so it reads as land and not as sea */

/* metrics and country filter share one cell: the box is as wide as the wider of the two (the longest country name), in both layers */
.mapx__slot > * { grid-area: 1 / 1; width: auto; min-width: 0; }
.mapx .mapx__slot > [hidden] { display: flex !important; visibility: hidden; pointer-events: none; }
.mapx__slot > .mapx__filter select { width: 100%; }

/* map page: every control (layers, metrics, country menu and its options) uses one font, weight and size */
.mapx { --ctl-fs: .85rem; }
@media (max-width: 480px) { .mapx { --ctl-fs: .8rem; } }
@media (max-width: 360px) { .mapx { --ctl-fs: .72rem; } }
.mapx .mapx__bar .seg button,
.mapx .mapx__filter select,
.mapx .mapx__filter select option { font-family: var(--font); font-weight: 600; font-size: var(--ctl-fs); letter-spacing: 0; }
.mapx .mapx__filter select option { color: var(--text); background: var(--deep); }
.mapx .mapx__slot > .seg button { flex: 1 1 auto; padding-inline: .7rem; }
@media (max-width: 360px) { .mapx .mapx__slot > .seg button { padding-inline: .4rem; } }

/* map page: pin the map between the header and the bottom bar with fixed offsets, so mobile browsers' changing
   toolbars (iOS Safari/Chrome) can never push the bottom of the map under the tab bar */
body.page-map { height: auto; min-height: 0; }
body.page-map .mapx { position: fixed; left: 0; right: 0; top: calc(64px + env(safe-area-inset-top)); bottom: 0; }
@media (max-width: 820px) {
  body.page-map .mapx { top: calc(56px + env(safe-area-inset-top)); bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
}

/* cookie notice: small card, bottom-left; sits above the mobile tab bar */
.consent { position: fixed; z-index: 60; left: 12px; bottom: 12px; width: min(440px, calc(100% - 24px)); display: grid; gap: .75rem; padding: .9rem 1rem; background: rgba(7, 18, 51, .96); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: 0 10px 40px rgba(0, 0, 0, .55); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.consent[hidden] { display: none; }
.consent p { margin: 0; font-size: .88rem; line-height: 1.45; color: var(--silver); }
.consent p a { color: var(--text); text-underline-offset: 2px; }
.consent__btns { display: flex; gap: .5rem; }
.consent__btns .btn { flex: 1 1 0; justify-content: center; }
.consent__btns .btn { min-height: 40px; padding-inline: 1.1rem; }
@media (max-width: 820px) { .consent { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 10px); } }

/* country menu: exactly as wide as the longest country name (plus arrow), not stretched to the metric buttons */
.mapx .mapx__slot > .mapx__filter { justify-self: start; width: auto; }
.mapx .mapx__slot > .mapx__filter select { width: auto; max-width: 100%; }
.mapx .mapx__slot > .mapx__filter select { padding: .5rem 1.7rem .5rem .9rem; background-position: right .65rem center; }
.mapx .mapx__slot > .mapx__filter select { -webkit-appearance: none; appearance: none; padding: .5rem 2.1rem .5rem 1rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%23F4F7FF' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1.5 1.75 6 6.25l4.5-4.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-size: 12px 8px; background-position: right 1rem center; }
.mapx .mapx__slot > .mapx__filter select { padding: .5rem 3.1rem .5rem 1rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='11.5' fill='%23F4F7FF' fill-opacity='.14' stroke='%23F4F7FF' stroke-opacity='.45'/%3E%3Cpath d='M7.5 10.25 12 14.75l4.5-4.5' fill='none' stroke='%23F4F7FF' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-size: 24px 24px; background-position: right .8rem center; }
.consent__links { display: flex; flex-wrap: wrap; gap: .25rem 1rem; font-size: .8rem !important; }
.consent__links a { color: var(--muted); }

/* LinkedIn: quiet link in About (next to the author line) and a small icon in the footer */
.byline { margin: -.35rem 0 1.1rem; }
.byline a { display: inline-flex; align-items: center; gap: .45rem; color: var(--muted); font-size: .9rem; text-decoration: none; border-bottom: 1px solid transparent; padding-bottom: 1px; transition: color .15s, border-color .15s; }
.byline a:hover, .byline a:focus-visible { color: var(--text); border-bottom-color: var(--line-2); }
.byline .ico { width: 18px; height: 18px; flex: none; }
.footer__social { display: inline-grid; place-items: center; width: 34px; height: 34px; margin-inline-start: .15rem; border: 1px solid var(--line-2); border-radius: 999px; color: var(--muted); transition: color .15s, border-color .15s; }
.footer__social .ico { width: 17px; height: 17px; }
.footer__social:hover, .footer__social:focus-visible { color: var(--text); border-color: var(--ice); }

/* ---------- Persian (fa) and Arabic (ar): right to left, Vazirmatn for the Arabic script.
   Logical properties above mirror the layout; the map overlays keep their physical positions on purpose (a map is not mirrored). */
html:is([lang=fa], [lang=ar]) {
  --font: 'Vazirmatn', 'Inter', system-ui, 'Segoe UI', Tahoma, 'Noto Sans Arabic', sans-serif;
  --display: 'Vazirmatn', 'Inter', system-ui, 'Segoe UI', Tahoma, 'Noto Sans Arabic', sans-serif;
}
html:is([lang=fa], [lang=ar]) body { line-height: 1.8; font-feature-settings: normal; }
html:is([lang=fa], [lang=ar]) *, html:is([lang=fa], [lang=ar]) *::before, html:is([lang=fa], [lang=ar]) *::after { letter-spacing: normal !important; }   /* tracking breaks the joined letters */
html:is([lang=fa], [lang=ar]) h1, html:is([lang=fa], [lang=ar]) h2, html:is([lang=fa], [lang=ar]) h3 { line-height: 1.45; font-weight: 800; }
html:is([lang=fa], [lang=ar]) .brand__word { font-family: 'Unbounded', 'Inter', system-ui, sans-serif; }
html[dir=rtl] .note { border-radius: var(--r-s) 0 0 var(--r-s); }
html[dir=rtl] .mx-scale i:first-child { border-radius: 0 2px 2px 0; }
html[dir=rtl] .mx-scale i:last-child { border-radius: 2px 0 0 2px; }
html[dir=rtl] .crumbs .ico, html[dir=rtl] .hero .ico--dir, html[dir=rtl] .ico--dir { transform: scaleX(-1); }
html[dir=rtl] .mapx .mapx__slot > .mapx__filter select { padding: .5rem 1rem .5rem 3.1rem; background-position: left .8rem center; }
html[dir=rtl] input[type=email], html[dir=rtl] input[type=url], html[dir=rtl] input.otp { direction: ltr; text-align: end; }
html[dir=rtl] .pathchart { direction: ltr; }
@media (max-width: 380px) {   /* Persian labels are longer: give the stage badge its own columns in the season rows */
  html:is([lang=fa], [lang=ar]) .seasons__row { grid-template-columns: repeat(5, auto); column-gap: .6rem; }
  html:is([lang=fa], [lang=ar]) .seasons__row > span:nth-child(1) { grid-column: 1 / 4; }
  html:is([lang=fa], [lang=ar]) .seasons__row > span:nth-child(2) { grid-column: 4 / 6; }
}

/* ---------- Chinese (zh) and Japanese (ja): no web font (system CJK fonts), looser leading, no tracking */
html[lang=zh-Hans] {
  --font: 'Inter', system-ui, -apple-system, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans CJK SC', 'Noto Sans SC', sans-serif;
  --display: 'Unbounded', 'Inter', system-ui, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans CJK SC', 'Noto Sans SC', sans-serif;
}
html[lang=ja] {
  --font: 'Inter', system-ui, -apple-system, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Yu Gothic UI', 'Meiryo', 'Noto Sans CJK JP', 'Noto Sans JP', sans-serif;
  --display: 'Unbounded', 'Inter', system-ui, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Yu Gothic UI', 'Meiryo', 'Noto Sans CJK JP', 'Noto Sans JP', sans-serif;
}
html:is([lang=zh-Hans], [lang=ja]) body { line-height: 1.75; font-feature-settings: normal; }
html:is([lang=zh-Hans], [lang=ja]) h1, html:is([lang=zh-Hans], [lang=ja]) h2, html:is([lang=zh-Hans], [lang=ja]) h3 { line-height: 1.35; letter-spacing: normal; }

/* ---- map page: 3D globe (canvas) ---- */
.globe { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; outline: none; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.globe.is-drag { cursor: grabbing; }
.globe:focus-visible { outline: 2px solid var(--ice); outline-offset: -3px; }
/* country links: the way in for keyboards and screen readers (and the only map without JavaScript) */
.mapx__list { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mapx__list ul { list-style: none; margin: 0; padding: 0; }
.mapx__list a:focus { position: fixed; left: 50%; top: 84px; transform: translateX(-50%); z-index: 8; background: var(--text); color: var(--night); padding: .5rem .9rem; border-radius: 999px; font-weight: 600; clip: auto; }
.globehint { position: absolute; z-index: 4; left: 50%; bottom: 24px; transform: translateX(-50%); margin: 0; max-width: min(420px, calc(100% - 24px)); padding: .5rem .95rem; border-radius: 18px; background: var(--glass); border: 1px solid var(--line-2); color: var(--text); font-size: .82rem; text-align: center; pointer-events: none; transition: opacity .6s; }
.globehint.is-gone { opacity: 0; }
.mapx:has(.mapx__panel.is-open) .globehint { opacity: 0; }
@media (max-width: 960px) { .globehint { bottom: 140px; } }
