/* ═══════════════════════════════════════════════════════════════════════
   PADEL STATS — дизайн-система портала
   Тёмный «стеклянный корт»: глубокий фон, светящиеся линии, лаймовый мяч.
   Цвета пар проверены на дальтонизм: пара 1 — #2fa3c8, пара 2 — #d8722a.

   Правила раскладки (чтобы блоки не слипались):
   • main.page и колонки сеток (.grid > div) — flex-колонки с gap; отступы между
     блоками задаёт только gap, у самих блоков внешних отступов нет;
   • любой текст в гриде/флексе имеет min-width:0 и переносится или обрезается;
   • анимации — static/js/padel.js; при prefers-reduced-motion отключены.
   ═══════════════════════════════════════════════════════════════════════ */
:root {
  /* Палитра: тёмно-фиолетовый фон, розовый акцент, голубой второй акцент, белый текст */
  --bg: #0f0820; --bg2: #170d2c; --bg3: #20123b; --bg4: #2b1a4c; --bg5: #38235f;
  --bg-rgb: 15,8,32; --panel-rgb: 25,14,46; --panel2-rgb: 38,22,68;
  --line-rgb: 196,160,255; --line: rgba(196,160,255,.1); --line2: rgba(196,160,255,.19); --line3: rgba(196,160,255,.34);
  --text: #fbf7ff; --text-rgb: 251,247,255; --text2: rgba(251,247,255,.74); --text3: rgba(251,247,255,.5);
  --ball: #ff4fa8; --ball-rgb: 255,79,168; --ball-hi: #ff8cc6; --ball-lo: #c41f78; --on-ball: #ffffff;
  --ball-dim: rgba(255,79,168,.14); --ball-glow: rgba(255,79,168,.42);
  --glass: #6fd3ff; --glass-rgb: 111,211,255; --glass-dim: rgba(111,211,255,.1);
  --violet: #a77bff; --violet-rgb: 167,123,255;
  /* Цвета пар: голубой и коралловый — различимы при дальтонизме */
  --t1: #3fb4ff; --t1-rgb: 63,180,255; --t1-dim: rgba(63,180,255,.16);
  --t2: #ff7a59; --t2-rgb: 255,122,89; --t2-dim: rgba(255,122,89,.16);
  --good: #3fd69b; --good-rgb: 63,214,155; --bad: #ff5d73; --bad-rgb: 255,93,115;
  --hero1: #2a1350; --hero2: #12082a;
  --cond: 'Barlow Condensed', system-ui, sans-serif;
  --font: 'Barlow', system-ui, sans-serif;
  --r: 12px; --r-sm: 8px; --gap: 20px;
  --card: linear-gradient(165deg, rgba(40,22,72,.9), rgba(17,9,34,.94));
  --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 12px 32px -18px rgba(0,0,0,.85);
  --ease: cubic-bezier(.2,.8,.2,1);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden; }
body::before { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(900px 520px at 88% -10%, rgba(var(--ball-rgb),.13), transparent 60%),
    radial-gradient(760px 520px at -10% 28%, rgba(var(--glass-rgb),.08), transparent 60%),
    radial-gradient(700px 600px at 50% 120%, rgba(var(--violet-rgb),.12), transparent 65%),
    linear-gradient(rgba(var(--line-rgb),.035) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, rgba(var(--line-rgb),.035) 1px, transparent 1px) 0 0 / 56px 56px; }
a { color: inherit; text-decoration: none; transition: color .15s; }
img { max-width: 100%; }
::selection { background: var(--ball); color: var(--on-ball); }
:focus-visible { outline: 2px solid var(--glass); outline-offset: 2px; }
.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 28px; position: relative; z-index: 1; }

/* ── ШАПКА ─────────────────────────────────────────────────────────────── */
.pnav { position: sticky; top: 0; z-index: 50; background: rgba(var(--bg-rgb),.82); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border-bottom: 1px solid var(--line); }
.pnav::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--glass), var(--ball), var(--glass), transparent); opacity: .35; }
.pnav-in { display: flex; align-items: center; gap: 18px; height: 64px; }
.plogo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.plogo svg { transition: transform .5s var(--ease); }
.plogo:hover svg { transform: rotate(-8deg) scale(1.06); }
.plogo-t { font-family: var(--cond); font-weight: 800; font-size: 21px; letter-spacing: 2.5px; text-transform: uppercase; }
.plogo-t b { color: var(--ball); font-weight: 800; }
.plinks { display: flex; gap: 2px; min-width: 0; align-items: center; }
.plinks > a, .more > button { position: relative; font-family: var(--cond); font-weight: 600; font-size: 15px; letter-spacing: .6px; text-transform: uppercase; color: var(--text2); padding: 8px 11px; border-radius: 8px; white-space: nowrap; background: none; border: 0; cursor: pointer; transition: color .15s, background .15s; }
.plinks > a:hover, .more > button:hover, .more.open > button { color: var(--text); background: rgba(var(--line-rgb),.06); }
.plinks > a.on { color: var(--ball); }
.plinks > a.on::after { content: ''; position: absolute; left: 11px; right: 11px; bottom: -13px; height: 2px; background: var(--ball); border-radius: 2px; box-shadow: 0 0 12px var(--ball-glow); }
.more { position: relative; }
.more > button svg { margin-left: 4px; vertical-align: 1px; transition: transform .2s; }
.more.open > button svg { transform: rotate(180deg); }
.more-menu { position: absolute; top: calc(100% + 10px); left: 0; min-width: 260px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 8px; background: rgba(var(--panel-rgb),.97); border: 1px solid var(--line2); border-radius: var(--r); box-shadow: 0 24px 50px -20px rgba(0,0,0,.9);
  opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .18s, transform .18s var(--ease), visibility .18s; }
.more.open .more-menu { opacity: 1; visibility: visible; transform: none; }
.more-menu a { padding: 9px 12px; border-radius: var(--r-sm); font-family: var(--cond); font-weight: 600; font-size: 15px; letter-spacing: .4px; text-transform: uppercase; color: var(--text2); white-space: nowrap; }
.more-menu a:hover, .more-menu a.on { background: var(--ball-dim); color: var(--ball); }
.lang-more > button { border: 1px solid var(--line2); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 700; color: var(--text2); }
.lang-more .more-menu { left: auto; right: 0; min-width: 170px; grid-template-columns: 1fr; }
.lang-more .more-menu b { color: var(--ball); }
.psearch { position: relative; flex-shrink: 0; margin-left: auto; }
.psearch input { background: var(--bg2); border: 1px solid var(--line2); color: var(--text); padding: 8px 12px 8px 34px; width: 190px; font: inherit; font-size: 14px; outline: none; border-radius: 999px; transition: border-color .2s, width .3s var(--ease), box-shadow .2s; }
.psearch input:focus { border-color: var(--glass); width: 260px; box-shadow: 0 0 0 3px var(--glass-dim); }
.psearch::before { content: ''; position: absolute; left: 13px; top: 50%; width: 12px; height: 12px; margin-top: -7px; border: 1.6px solid var(--text3); border-radius: 50%; pointer-events: none; }
.psearch::after { content: ''; position: absolute; left: 24px; top: 50%; width: 5px; height: 1.6px; margin-top: 4px; background: var(--text3); transform: rotate(45deg); pointer-events: none; }
.psearch-res { position: absolute; top: calc(100% + 8px); right: 0; width: 320px; background: rgba(var(--panel-rgb),.98); border: 1px solid var(--line2); border-radius: var(--r); overflow: hidden; display: none; z-index: 60; box-shadow: 0 24px 50px -20px rgba(0,0,0,.9); }
.psearch-res a { display: block; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.psearch-res a:last-child { border-bottom: 0; }
.psearch-res a:hover { background: var(--bg3); }
.psearch-res small { display: block; color: var(--text3); font-size: 12px; }
.pnav-tools { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.langs { display: inline-flex; border: 1px solid var(--line2); border-radius: 999px; padding: 2px; }
.langs a { font-family: var(--cond); font-size: 12px; font-weight: 700; padding: 3px 8px; color: var(--text3); letter-spacing: .5px; border-radius: 999px; }
.langs a:hover { color: var(--text); }
.langs a.on { color: var(--on-ball); background: var(--ball); }
.icon-btn { background: none; border: 1px solid var(--line2); color: var(--text2); width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: color .15s, border-color .15s, transform .3s var(--ease); flex-shrink: 0; }
.icon-btn:hover { color: var(--ball); border-color: var(--ball); }
#theme-btn:hover { transform: rotate(180deg); }
.pnav-adm { font-family: var(--cond); font-size: 13px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--text2); border: 1px solid var(--line2); padding: 6px 12px; border-radius: 999px; white-space: nowrap; transition: all .15s; }
.pnav-adm:hover { color: var(--ball); border-color: var(--ball); }
.burger { display: none; }
.subnav { display: none; }
/* мобильное меню */
.drawer { position: fixed; inset: 0; z-index: 90; pointer-events: none; }
.drawer-bg { position: absolute; inset: 0; background: rgba(0,0,0,.55); opacity: 0; transition: opacity .25s; }
.drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(340px, 88vw); background: var(--bg2); border-left: 1px solid var(--line2); padding: 18px 18px 28px; overflow-y: auto; transform: translateX(100%); transition: transform .3s var(--ease); display: flex; flex-direction: column; gap: 14px; }
.drawer.open { pointer-events: auto; }
.drawer.open .drawer-bg { opacity: 1; }
.drawer.open .drawer-panel { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; }
.drawer nav { display: grid; gap: 2px; }
.drawer nav a { padding: 11px 12px; border-radius: var(--r-sm); font-family: var(--cond); font-weight: 600; font-size: 17px; letter-spacing: .5px; text-transform: uppercase; color: var(--text2); }
.drawer nav a.on, .drawer nav a:hover { background: var(--ball-dim); color: var(--ball); }
.drawer nav .sep { height: 1px; background: var(--line2); margin: 8px 0; }
.drawer-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ── ТИПОГРАФИКА ───────────────────────────────────────────────────────── */
h1 { font-family: var(--cond); font-size: clamp(30px, 3.6vw, 46px); font-weight: 800; letter-spacing: .3px; line-height: 1.02; overflow-wrap: anywhere; }
h2 { font-family: var(--cond); font-size: clamp(20px, 2vw, 24px); font-weight: 700; letter-spacing: .4px; line-height: 1.15; margin-bottom: 12px; }
h3 { display: flex; align-items: center; gap: 9px; font-family: var(--cond); font-size: 14px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; color: var(--glass); margin-bottom: 12px; line-height: 1.2; }
h3::before { content: ''; width: 4px; height: 14px; border-radius: 2px; background: currentColor; box-shadow: 0 0 10px currentColor; flex-shrink: 0; }
.card-h h3, h3.plain { margin: 0; }
h3.plain::before { display: none; }
h4 { font-family: var(--cond); font-size: 16px; font-weight: 700; letter-spacing: .3px; }
p { overflow-wrap: anywhere; }
.muted { color: var(--text3); } .sm { font-size: 13px; } .xs { font-size: 12px; }
.cond { font-family: var(--cond); } .num { font-family: var(--cond); font-variant-numeric: tabular-nums; }
.kicker { display: inline-flex; align-items: center; gap: 8px; font-family: var(--cond); font-size: 13px; font-weight: 600; letter-spacing: 2.4px; text-transform: uppercase; color: var(--ball); margin-bottom: 10px; }
.kicker::before { content: ''; width: 18px; height: 2px; background: var(--ball); border-radius: 2px; }
.kicker a:hover { text-decoration: underline; }

/* ── РАСКЛАДКА ─────────────────────────────────────────────────────────── */
main.page { flex: 1; width: 100%; padding-top: 34px; padding-bottom: 72px; display: flex; flex-direction: column; gap: var(--gap); }
main.page > * { margin-top: 0; margin-bottom: 0; min-width: 0; }
.kpis, .filters, .tabs { margin-bottom: 18px; }   /* внутри карточек; у прямых потомков страницы — gap */
.page-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px 24px; flex-wrap: wrap; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.page-h > div:first-child { min-width: 0; flex: 1 1 420px; }
.page-h .muted { line-height: 1.6; }
.grid { display: grid; gap: var(--gap); align-items: start; }
.grid > * { min-width: 0; }
.grid > div:not([class]), .col { display: flex; flex-direction: column; gap: var(--gap); }
.grid > div:not([class]) > *, .col > * { margin-top: 0 !important; margin-bottom: 0; }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g-main { grid-template-columns: minmax(0,1.85fr) minmax(0,1fr); }
.stretch { align-items: stretch; }

/* ── КАРТОЧКИ ──────────────────────────────────────────────────────────── */
.card { background: var(--card); border: 1px solid var(--line2); border-radius: var(--r); padding: 20px 22px; position: relative; min-width: 0; box-shadow: var(--shadow);
  transition: border-color .25s, transform .35s var(--ease), box-shadow .35s var(--ease); }
.card + .card { margin-top: var(--gap); }
main.page > .card + .card, .grid > .card + .card { margin-top: 0; }
.card::before { content: ''; position: absolute; inset: 0 0 auto; height: 1px; border-radius: var(--r) var(--r) 0 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent); pointer-events: none; }
a.card:hover, .card.hoverable:hover { border-color: var(--line3); transform: translateY(-3px); box-shadow: var(--shadow), 0 18px 40px -22px rgba(var(--glass-rgb),.35); }
.card.accent { border-color: rgba(var(--ball-rgb),.35); background: linear-gradient(165deg, rgba(var(--ball-rgb),.07), rgba(var(--panel-rgb),.94) 55%); }
.card.accent h3 { color: var(--ball); }
.card-h { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 12px; margin-bottom: 14px; min-width: 0; }
.card-h > :last-child:not(:first-child) { margin-left: auto; }
.card-h > a, .card-h .more-link { flex-shrink: 0; font-family: var(--cond); font-size: 13px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: var(--text3); display: inline-flex; align-items: center; gap: 4px; }
.card-h > a::after { content: '→'; transition: transform .2s var(--ease); }
.card-h > a:hover { color: var(--ball); }
.card-h > a:hover::after { transform: translateX(3px); }
.card > table, .card > .tbl-wrap { margin: 0 -6px; width: calc(100% + 12px); }

/* ── KPI ───────────────────────────────────────────────────────────────── */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.kpi { position: relative; overflow: hidden; background: var(--card); border: 1px solid var(--line2); border-radius: var(--r); padding: 16px 18px 14px; min-width: 0; transition: border-color .25s, transform .35s var(--ease); }
.kpi:hover { border-color: var(--line3); transform: translateY(-2px); }
.kpi::after { content: ''; position: absolute; right: -30px; top: -30px; width: 90px; height: 90px; border-radius: 50%; background: radial-gradient(circle, var(--glass-dim), transparent 70%); pointer-events: none; }
.kpi-v { font-family: var(--cond); font-size: clamp(28px, 3vw, 38px); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: .3px; overflow-wrap: anywhere; }
.kpi-v.ball { color: var(--ball); text-shadow: 0 0 24px var(--ball-glow); }
.kpi-l { font-family: var(--cond); font-size: 12px; font-weight: 600; color: var(--text3); text-transform: uppercase; letter-spacing: 1.3px; margin-top: 8px; }
.kpi-s { font-size: 12px; color: var(--text2); margin-top: 3px; }

/* ── ТАБЛИЦЫ ───────────────────────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; }
th { font-family: var(--cond); font-size: 12px; font-weight: 700; letter-spacing: 1.1px; text-transform: uppercase; color: var(--text3); text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line2); white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tr.hov td { transition: background .15s; }
tr.hov:hover td { background: rgba(var(--glass-rgb),.05); }
td.r, th.r { text-align: right; } td.c, th.c { text-align: center; }
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.tbl-wrap table { min-width: 560px; }

/* ── БЕЙДЖИ, ФОРМА, ТОЧКИ ──────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 5px; font-family: var(--cond); font-size: 12px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase; padding: 3px 9px; border: 1px solid var(--line2); border-radius: 999px; color: var(--text2); white-space: nowrap; line-height: 1.3; }
.badge.ball { color: var(--ball); border-color: rgba(var(--ball-rgb),.35); background: var(--ball-dim); }
.badge.live { color: var(--bad); border-color: rgba(var(--bad-rgb),.45); background: rgba(var(--bad-rgb),.08); }
.badge.live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 0 rgba(var(--bad-rgb),.6); animation: ping 1.4s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(var(--bad-rgb),.6); } 80%, 100% { box-shadow: 0 0 0 7px rgba(var(--bad-rgb),0); } }
@keyframes pulse { 50% { opacity: .3; } }
.form { display: inline-flex; gap: 4px; }
.form span { width: 22px; height: 22px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; font-family: var(--cond); font-size: 12px; font-weight: 700; transition: transform .2s var(--ease); }
.form a:hover span { transform: translateY(-2px); }
.form .W { background: rgba(var(--good-rgb),.18); color: var(--good); }
.form .L { background: rgba(var(--bad-rgb),.14); color: var(--bad); }
.dot1, .dot2 { display: inline-block; width: 9px; height: 9px; border-radius: 50%; vertical-align: 0; margin-right: 7px; flex-shrink: 0; }
.dot1 { background: var(--t1); box-shadow: 0 0 8px var(--t1); } .dot2 { background: var(--t2); box-shadow: 0 0 8px var(--t2); }
.up { color: var(--good); } .down { color: var(--bad); }

/* ── АВАТАРЫ, ИГРОКИ ───────────────────────────────────────────────────── */
.ava { width: 40px; height: 40px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; font-family: var(--cond); font-weight: 700; font-size: 15px; letter-spacing: .5px;
  background: linear-gradient(145deg, var(--bg5), var(--bg3)); border: 1px solid var(--line2); border-radius: 50%; color: var(--glass); overflow: hidden; transition: transform .3s var(--ease), border-color .2s; }
.pl:hover .ava { transform: scale(1.06); border-color: var(--glass); }
.ava img { width: 100%; height: 100%; object-fit: cover; }
.ava.lg { width: 112px; height: 112px; font-size: 40px; border: 2px solid var(--ball); color: var(--ball); box-shadow: 0 0 0 6px var(--ball-dim), 0 0 40px -6px var(--ball-glow); }
.pl { display: flex; align-items: center; gap: 11px; min-width: 0; }
.pl-n { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
a.pl-n:hover { color: var(--ball); }

/* ── СТРОКА МАТЧА ──────────────────────────────────────────────────────── */
.mrow { display: grid; grid-template-columns: 70px minmax(0,1fr) auto; gap: 14px; align-items: center; padding: 12px 8px; margin: 0 -8px; border-bottom: 1px solid var(--line); border-radius: var(--r-sm); transition: background .18s; min-width: 0; }
.mrow:last-child { border-bottom: 0; }
a.mrow:hover { background: rgba(var(--glass-rgb),.05); }
a.mrow:hover .mteam { color: var(--text); }
.mrow-meta { font-family: var(--cond); font-size: 13px; color: var(--text3); line-height: 1.3; }
.mteam { display: flex; align-items: center; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.6; min-width: 0; transition: color .15s; }
.mteam.win { color: var(--text); font-weight: 600; }
.msc { font-family: var(--cond); font-size: 17px; font-weight: 700; display: grid; grid-auto-flow: column; gap: 12px; text-align: center; font-variant-numeric: tabular-nums; }
.msc div { line-height: 1.6; }
.msc .w { color: var(--ball); }
.msc .l { color: var(--text3); }

/* ── СРАВНЕНИЕ, ПОЛОСЫ ─────────────────────────────────────────────────── */
.cmp { display: grid; grid-template-columns: 60px minmax(0,1fr) 60px; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.cmp:last-child { border-bottom: 0; }
.cmp-v { font-family: var(--cond); font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; }
.cmp-v.r { text-align: right; }
.cmp-mid { text-align: center; min-width: 0; }
.cmp-l { font-size: 12px; color: var(--text2); text-transform: uppercase; letter-spacing: .8px; margin-bottom: 6px; }
.cmp-bars { display: flex; gap: 3px; height: 7px; }
.cmp-bars i { display: block; height: 100%; transition: flex-grow .9s var(--ease), width .9s var(--ease); }
.cmp-bars .b1 { background: linear-gradient(90deg, var(--t1-dim), var(--t1)); border-radius: 4px 0 0 4px; }
.cmp-bars .b2 { background: linear-gradient(90deg, var(--t2), var(--t2-dim)); border-radius: 0 4px 4px 0; }
.cmp-bars .b0 { background: var(--bg4); flex: 1; }
.hbar { display: grid; grid-template-columns: 140px minmax(0,1fr) 46px; gap: 12px; align-items: center; padding: 5px 0; font-size: 13px; }
.hbar > :first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-track { height: 9px; background: var(--bg4); position: relative; border-radius: 5px; overflow: hidden; }
.hbar-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; transition: width 1s var(--ease); }
.hbar-fill.g { background: linear-gradient(90deg, rgba(var(--glass-rgb),.35), var(--glass)); } .hbar-fill.e { background: linear-gradient(90deg, rgba(var(--t2-rgb),.35), var(--t2)); }
.hbar .v { text-align: right; font-family: var(--cond); font-weight: 700; color: var(--text2); }

/* ── ВКЛАДКИ, СЕГМЕНТЫ ─────────────────────────────────────────────────── */
.tabs { position: relative; display: flex; gap: 4px; border-bottom: 1px solid var(--line2); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { position: relative; font-family: var(--cond); font-size: 15px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; padding: 12px 16px; color: var(--text3); white-space: nowrap; transition: color .15s; }
.tabs a::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--ball); transform: scaleX(0); transition: transform .3s var(--ease); }
.tabs a:hover { color: var(--text); }
.tabs a.on { color: var(--ball); }
.tabs a.on::after { transform: scaleX(1); box-shadow: 0 0 12px var(--ball-glow); }
.seg { display: inline-flex; border: 1px solid var(--line2); border-radius: 999px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg a { padding: 6px 14px; border-radius: 999px; font-family: var(--cond); font-weight: 600; font-size: 14px; letter-spacing: .5px; text-transform: uppercase; color: var(--text3); transition: color .15s, background .2s; }
.seg a:hover { color: var(--text); }
.seg a.on { background: var(--ball); color: var(--on-ball); }

/* ── ГЕРОЙ ИГРОКА / ТАБЛО МАТЧА ────────────────────────────────────────── */
.hero { position: relative; display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 28px; align-items: center; padding: 30px 32px; border: 1px solid var(--line2); border-radius: calc(var(--r) + 6px); overflow: hidden;
  background: radial-gradient(600px 260px at 0% 0%, rgba(var(--ball-rgb),.09), transparent 70%), radial-gradient(700px 300px at 100% 100%, rgba(var(--glass-rgb),.1), transparent 70%), var(--card); box-shadow: var(--shadow); }
.hero::after { content: ''; position: absolute; right: -60px; top: -60px; width: 320px; height: 320px; border: 1px solid var(--line); border-radius: 50%; pointer-events: none; }
.hero > * { position: relative; z-index: 1; min-width: 0; }
.hero h1 { margin: 2px 0 0; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; color: var(--text2); font-size: 14px; }
.hero-meta b { color: var(--text3); font-weight: 400; margin-right: 4px; }
.hero-rating { text-align: right; }
.hero-rating .big { font-family: var(--cond); font-size: clamp(52px, 6vw, 76px); font-weight: 800; line-height: .9; color: var(--ball); font-variant-numeric: tabular-nums; text-shadow: 0 0 40px var(--ball-glow); }
.hero-rating .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: 1.6px; color: var(--text3); }
.scoreboard { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 24px; align-items: center; padding: 30px 32px; border: 1px solid var(--line2); border-radius: calc(var(--r) + 6px);
  background: radial-gradient(500px 240px at 0% 50%, var(--t1-dim), transparent 70%), radial-gradient(500px 240px at 100% 50%, var(--t2-dim), transparent 70%), var(--card); box-shadow: var(--shadow); }
.sb-team { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.sb-team.r { align-items: flex-end; text-align: right; }
.sb-team .pl-n { font-size: 18px; }
.sb-score { display: flex; gap: 18px; font-family: var(--cond); font-weight: 800; font-variant-numeric: tabular-nums; }
.sb-set { display: flex; flex-direction: column; align-items: center; font-size: clamp(34px, 4vw, 46px); line-height: 1.1; }
.sb-set .w { color: var(--ball); text-shadow: 0 0 20px var(--ball-glow); } .sb-set .l { color: var(--text3); }
.sb-set sup { font-size: 14px; color: var(--text3); }

/* ── СПИСКИ, ГРАФИКИ ───────────────────────────────────────────────────── */
.ins { list-style: none; }
.ins li { padding: 10px 0 10px 22px; border-bottom: 1px solid var(--line); position: relative; font-size: 14px; color: var(--text2); line-height: 1.5; }
.ins li:last-child { border-bottom: 0; }
.ins li::before { content: ''; position: absolute; left: 0; top: 18px; width: 10px; height: 3px; border-radius: 2px; }
.ins.plus li::before { background: var(--good); }
.ins.minus li::before { background: var(--bad); }
.ins.tac li::before { background: var(--ball); }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { fill: var(--text3); font-family: var(--cond); font-size: 11px; }
/* Многоугольник умений */
.radar-box { display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 0; }
.radar { width: 100%; max-width: 460px; height: auto; display: block; overflow: visible; }
.radar .ring { fill: none; stroke: var(--line2); stroke-width: 1; }
.radar .ring.outer { fill: rgba(var(--line-rgb),.025); stroke: var(--line3); }
.radar .spoke { stroke: var(--line2); stroke-width: 1; }
.radar .shape { fill: var(--c); fill-opacity: .2; stroke: var(--c); stroke-width: 2; stroke-linejoin: round; transform-origin: 50% 50%; transform-box: view-box; }
.radar .dot { fill: var(--c); stroke: var(--bg2); stroke-width: 1.5; pointer-events: none; }
.radar .lbl { fill: var(--text2); font-family: var(--cond); font-size: 14px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; }
.radar .val { font-family: var(--cond); font-size: 14.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.radar .val .sep { fill: var(--text3); }
.js-anim .radar .shape { transition: transform 1s var(--ease), fill-opacity .6s; }
.radar-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; font-size: 13px; color: var(--text2); }
.radar-legend span { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.radar-legend i { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }
.radar-legend b { font-family: var(--cond); font-size: 16px; color: var(--text); }
.radar-note { font-size: 12px; color: var(--text3); text-align: center; max-width: 420px; }
.chart-tip { position: fixed; pointer-events: none; background: rgba(var(--panel-rgb),.97); border: 1px solid var(--line2); border-radius: var(--r-sm); padding: 7px 10px; font-size: 13px; display: none; z-index: 100; white-space: nowrap; box-shadow: 0 12px 30px -12px rgba(0,0,0,.9); }

/* ── ФОРМЫ, КНОПКИ ─────────────────────────────────────────────────────── */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 18px; border: 1px solid var(--line2); border-radius: 999px; background: rgba(var(--line-rgb),.04); color: var(--text); font-family: var(--cond); font-weight: 700; font-size: 14px; letter-spacing: .8px; text-transform: uppercase; cursor: pointer; white-space: nowrap; overflow: hidden;
  transition: border-color .2s, background .2s, color .2s, transform .2s var(--ease), box-shadow .25s; }
.btn:hover { border-color: var(--glass); background: var(--glass-dim); }
.btn:active { transform: scale(.97); }
.btn.ball { background: var(--ball); color: var(--on-ball); border-color: var(--ball); box-shadow: 0 8px 24px -10px var(--ball-glow); }
.btn.ball:hover { box-shadow: 0 10px 30px -8px var(--ball-glow); background: var(--ball-hi); }
.btn.ball::after { content: ''; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent); transform: skewX(-20deg); transition: left .6s var(--ease); }
.btn.ball:hover::after { left: 130%; }
.btn.sm { padding: 6px 13px; font-size: 13px; }
.btn.danger { color: var(--bad); border-color: rgba(var(--bad-rgb),.35); background: transparent; }
.btn.danger:hover { background: rgba(var(--bad-rgb),.1); }
.inp, .sel, textarea.inp { background: var(--bg2); border: 1px solid var(--line2); color: var(--text); padding: 10px 12px; font: inherit; font-size: 14px; outline: none; width: 100%; max-width: 100%; min-width: 0; border-radius: var(--r-sm); transition: border-color .2s, box-shadow .2s; }
.inp:focus, .sel:focus { border-color: var(--glass); box-shadow: 0 0 0 3px var(--glass-dim); }
.sel { appearance: none; -webkit-appearance: none; padding-right: 32px; background-image: linear-gradient(45deg, transparent 50%, var(--text3) 50%), linear-gradient(135deg, var(--text3) 50%, transparent 50%); background-position: calc(100% - 17px) 52%, calc(100% - 12px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.sel option { background: var(--bg2); }
textarea.inp { min-height: 90px; resize: vertical; line-height: 1.5; }
.lbl { display: block; font-family: var(--cond); font-size: 12px; font-weight: 700; letter-spacing: 1.1px; text-transform: uppercase; color: var(--glass); margin-bottom: 6px; }
.frow { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 14px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filters .inp, .filters .sel { width: auto; min-width: 150px; flex: 0 1 auto; }
.flash { padding: 12px 16px; border: 1px solid var(--line2); border-radius: var(--r-sm); font-size: 14px; animation: flash-in .45s var(--ease); }
@keyframes flash-in { from { opacity: 0; transform: translateY(-6px); } }
.flash.success { border-color: rgba(var(--good-rgb),.4); color: var(--good); background: rgba(var(--good-rgb),.07); }
.flash.danger { border-color: rgba(var(--bad-rgb),.4); color: var(--bad); background: rgba(var(--bad-rgb),.07); }
.empty { padding: 34px 22px 30px; text-align: center; color: var(--text3); border: 1px dashed var(--line2); border-radius: var(--r-sm); font-size: 14px; line-height: 1.6; background: radial-gradient(260px 120px at 50% 0%, rgba(var(--ball-rgb),.05), transparent 70%); }
.empty::before { content: ''; display: block; width: 26px; height: 26px; margin: 0 auto 12px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, var(--ball-hi), var(--ball) 55%, var(--ball-lo)); box-shadow: 0 0 18px var(--ball-glow); opacity: .8; animation: bounce 2.2s cubic-bezier(.3,0,.3,1) infinite; }
@keyframes bounce { 0%, 100% { transform: translateY(0) scale(1, 1); } 45% { transform: translateY(-9px) scale(.96, 1.04); } 55% { transform: translateY(-9px); } 92% { transform: translateY(0) scale(1.08, .9); } }
td .empty, .mrow .empty { padding: 20px; }
.prose p { color: var(--text2); line-height: 1.7; margin-bottom: 12px; font-size: 15px; }
.prose ul { margin: 0 0 14px 20px; color: var(--text2); line-height: 1.7; }
.prose b { color: var(--text); }

/* ── ПОДВАЛ ────────────────────────────────────────────────────────────── */
.foot { border-top: 1px solid var(--line); padding: 28px 0 34px; color: var(--text3); font-size: 13px; position: relative; z-index: 1; background: linear-gradient(180deg, transparent, rgba(var(--panel-rgb),.6)); }
.foot a:hover { color: var(--ball); }

/* ── ПРОЧИЕ БЛОКИ ──────────────────────────────────────────────────────── */
.fav { background: none; border: 1px solid var(--line2); border-radius: 999px; color: var(--text3); padding: 6px 13px; cursor: pointer; font-family: var(--cond); font-weight: 700; text-transform: uppercase; font-size: 13px; letter-spacing: .6px; transition: all .2s; }
.fav:hover { color: var(--text); border-color: var(--line3); }
.fav.on { color: var(--ball); border-color: var(--ball); background: var(--ball-dim); }
.brandbar { padding: 8px 0; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; font-family: var(--cond); font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.brandbar img { height: 28px; }
.bracket { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 22px; overflow-x: auto; padding-bottom: 10px; }
.bracket-col { display: flex; flex-direction: column; justify-content: space-around; gap: 14px; }
.bracket-col h4 { font-family: var(--cond); font-size: 13px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--text3); }
.bm { border: 1px solid var(--line2); border-radius: var(--r-sm); background: var(--bg2); display: block; overflow: hidden; transition: border-color .2s, transform .3s var(--ease); }
a.bm:hover { border-color: var(--glass); transform: translateX(3px); }
.bm-row { display: flex; justify-content: space-between; gap: 8px; padding: 7px 11px; font-size: 14px; min-width: 0; }
.bm-row > :first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bm-row + .bm-row { border-top: 1px solid var(--line); }
.bm-row.w { color: var(--text); font-weight: 600; background: var(--ball-dim); }
.bm-row.w .bm-s { color: var(--ball); }
.bm-row.l { color: var(--text3); }
.bm-s { font-family: var(--cond); font-weight: 700; white-space: nowrap; }
.court { width: 100%; max-width: 260px; display: block; border-radius: 6px; }
.court-wrap { display: flex; gap: 18px; flex-wrap: wrap; }
.court-wrap figure { flex: 1; min-width: 170px; }
.court-wrap figcaption { font-size: 13px; color: var(--text3); margin-top: 8px; }
.ach { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.ach div { position: relative; border: 1px solid rgba(var(--ball-rgb),.28); background: linear-gradient(150deg, rgba(var(--ball-rgb),.12), rgba(var(--ball-rgb),.03)); padding: 13px 14px 13px 44px; border-radius: var(--r-sm); transition: transform .3s var(--ease), border-color .2s; }
.ach div:hover { transform: translateY(-2px); border-color: var(--ball); }
.ach div::before { content: '★'; position: absolute; left: 13px; top: 12px; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--on-ball); background: var(--ball); box-shadow: 0 0 14px var(--ball-glow); }
.ach b { display: block; font-family: var(--cond); font-size: 16px; color: var(--ball); line-height: 1.2; }
.ach span { font-size: 13px; color: var(--text2); }
.note-box { border-left: 3px solid var(--ball); background: var(--bg2); border-radius: 0 var(--r-sm) var(--r-sm) 0; padding: 14px 16px; color: var(--text2); line-height: 1.6; font-size: 15px; }
.vote { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.vote button { padding: 14px; border: 1px solid var(--line2); border-radius: var(--r-sm); background: var(--bg2); color: var(--text); font-family: var(--cond); font-weight: 700; font-size: 16px; cursor: pointer; transition: all .2s; }
.vote button:hover { border-color: var(--ball); transform: translateY(-2px); }
.vote .mine { border-color: var(--ball); color: var(--ball); background: var(--ball-dim); }
.price { font-family: var(--cond); font-size: 34px; font-weight: 800; color: var(--ball); }
.clip-list { max-height: 520px; overflow-y: auto; }
.clip-i { display: block; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 9px 8px; color: var(--text2); cursor: pointer; font: inherit; font-size: 14px; border-radius: 6px; }
.clip-i:hover, .clip-i.on { background: var(--ball-dim); color: var(--text); }
.caption-bar { background: var(--bg2); border: 1px solid var(--line2); border-top: 0; padding: 9px 14px; font-family: var(--cond); font-size: 17px; font-weight: 600; border-radius: 0 0 var(--r-sm) var(--r-sm); }
.chip { transition: all .15s; }

/* ── ГЛАВНАЯ: ГЕРОЙ С КОРТОМ ───────────────────────────────────────────── */
.home-hero { position: relative; display: grid; grid-template-columns: minmax(0,1.4fr) minmax(0,1fr); gap: 32px; align-items: center; padding: 36px 44px; border: 1px solid var(--line2); border-radius: 22px; overflow: hidden;
  background: radial-gradient(700px 400px at 0% 0%, rgba(var(--ball-rgb),.1), transparent 65%), radial-gradient(600px 400px at 100% 100%, rgba(var(--glass-rgb),.12), transparent 65%), linear-gradient(165deg, var(--hero1), var(--hero2)); box-shadow: var(--shadow); }
.home-hero h1 { font-size: clamp(36px, 4.8vw, 62px); letter-spacing: .2px; }
.home-hero h1 em { white-space: nowrap; font-style: normal; color: var(--ball); text-shadow: 0 0 30px var(--ball-glow); }
.home-hero p { color: var(--text2); font-size: 17px; line-height: 1.6; margin-top: 16px; max-width: 560px; }
.home-hero .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.hero-court { height: 360px; width: auto; max-width: 100%; justify-self: center; filter: drop-shadow(0 30px 40px rgba(0,0,0,.6)); }
.hero-court .ln { stroke: rgba(var(--glass-rgb),.55); stroke-width: 1.4; fill: none; }
.hero-court .glass { fill: rgba(var(--glass-rgb),.05); stroke: rgba(var(--glass-rgb),.35); stroke-width: 1; }
.hero-court .net { stroke: var(--text); stroke-width: 2; stroke-dasharray: 3 3; }
.hero-court .trail { fill: none; stroke: var(--ball); stroke-width: 1.6; stroke-dasharray: 4 6; opacity: .55; }
.hero-court .ball { fill: var(--ball); filter: drop-shadow(0 0 8px var(--ball)); }
.hero-court .p1 { fill: var(--t1); } .hero-court .p2 { fill: var(--t2); }
.home-kpis { grid-template-columns: repeat(5, minmax(0,1fr)); }
.tops-switch { margin-left: auto; }
.top-list { display: none; } .top-list.on { display: table; }
.feature-match { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 18px; align-items: center; padding: 6px 0 4px; }
.feature-match .fm-team { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.feature-match .fm-team.r { text-align: right; align-items: flex-end; }
.feature-match .fm-team .pl-n { font-size: 19px; }
.feature-match .fm-score { display: flex; gap: 14px; font-family: var(--cond); font-weight: 800; font-size: 36px; font-variant-numeric: tabular-nums; }
.feature-match .fm-score div { display: flex; flex-direction: column; align-items: center; line-height: 1.05; }
.feature-match .w { color: var(--ball); } .feature-match .l { color: var(--text3); }
.feature-meta { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text3); }

/* ── КАБИНЕТ СУПЕРАДМИНА ───────────────────────────────────────────────── */
.lvl { display: inline-flex; align-items: center; gap: 6px; font-family: var(--cond); font-weight: 700; font-size: 13px; letter-spacing: .5px; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; border: 1px solid; white-space: nowrap; }
.lvl-0 { color: var(--glass); border-color: rgba(var(--glass-rgb),.35); background: var(--glass-dim); }
.lvl-1 { color: var(--text2); border-color: var(--line2); }
.lvl-2 { color: var(--glass); border-color: rgba(var(--glass-rgb),.35); background: rgba(var(--glass-rgb),.08); }
.lvl-3 { color: var(--t2); border-color: rgba(var(--t2-rgb),.4); background: var(--t2-dim); }
.lvl-4 { color: var(--bad); border-color: rgba(var(--bad-rgb),.4); background: rgba(var(--bad-rgb),.08); }
.lvl-5 { color: var(--ball); border-color: rgba(var(--ball-rgb),.45); background: var(--ball-dim); }
.lvl-pick { display: inline-flex; gap: 3px; flex-wrap: wrap; }
.lvl-pick button { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line2); background: var(--bg2); color: var(--text3); font-family: var(--cond); font-weight: 800; font-size: 15px; cursor: pointer; transition: all .15s; }
.lvl-pick button:hover:not(:disabled) { border-color: var(--glass); color: var(--text); transform: translateY(-1px); }
.lvl-pick button.on { background: var(--ball); border-color: var(--ball); color: var(--on-ball); box-shadow: 0 0 14px var(--ball-glow); }
.lvl-pick button:disabled { opacity: .35; cursor: not-allowed; }
.switch { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--bg4); border: 1px solid var(--line2); border-radius: 999px; cursor: pointer; transition: background .2s; }
.switch span::before { content: ''; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--text3); transition: transform .25s var(--ease), background .2s; }
.switch input:checked + span { background: rgba(var(--good-rgb),.25); border-color: var(--good); }
.switch input:checked + span::before { transform: translateX(18px); background: var(--good); }
.switch input:disabled + span { opacity: .4; cursor: not-allowed; }
.ucard td { padding-top: 12px; padding-bottom: 12px; }
.urow-saved td { animation: saved 1.2s var(--ease); }
@keyframes saved { 0% { background: rgba(var(--ball-rgb),.18); } 100% { background: transparent; } }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px); opacity: 0; z-index: 120; background: rgba(var(--panel-rgb),.98); border: 1px solid var(--line2); border-radius: 999px; padding: 11px 20px; font-size: 14px; box-shadow: 0 20px 40px -18px rgba(0,0,0,.9); transition: opacity .25s, transform .35s var(--ease); pointer-events: none; max-width: calc(100vw - 32px); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast.err { border-color: rgba(var(--bad-rgb),.5); color: var(--bad); }
.toast.ok { border-color: rgba(var(--good-rgb),.5); }
.modal { position: fixed; inset: 0; z-index: 110; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(0,0,0,.6); }
.modal.on { display: flex; animation: fade .2s; }
.modal-box { width: min(480px, 100%); background: var(--bg2); border: 1px solid var(--line2); border-radius: 16px; padding: 24px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.9); animation: pop .3s var(--ease); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.97); } }
.code-big { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 20px; letter-spacing: 1px; padding: 12px 14px; background: var(--bg); border: 1px dashed var(--ball); border-radius: var(--r-sm); color: var(--ball); text-align: center; user-select: all; overflow-wrap: anywhere; }

/* ── АНИМАЦИЯ ПОЯВЛЕНИЯ (классы ставит padel.js) ───────────────────────── */
.js-anim .rv { opacity: 0; transform: translateY(18px); }
.js-anim .rv.in { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0s); }
.js-anim .chart .draw { transition: stroke-dashoffset 1.6s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
main.page > .page-h, main.page > .hero, main.page > .scoreboard, main.page > .home-hero { animation: rise .7s var(--ease) both; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.hero-court .pl-dot { animation: bob 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.hero-court .pl-dot:nth-of-type(2n) { animation-delay: -1.2s; }

/* ── АДАПТИВ ───────────────────────────────────────────────────────────── */
@media (max-width: 1180px) {
  .plinks, .pnav-tools .lang-more, .pnav-tools .pnav-adm, .pnav-tools #theme-btn { display: none; }
  .burger { display: inline-flex; }
  .pnav-in { justify-content: space-between; }
  .psearch { margin-left: auto; }
  .home-kpis { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 900px) {
  :root { --gap: 16px; }
  .g2, .g3, .g-main { grid-template-columns: minmax(0,1fr); }
  .hero { grid-template-columns: auto minmax(0,1fr); padding: 24px; gap: 20px; }
  .hero-rating { grid-column: 1 / -1; text-align: left; display: flex; align-items: flex-end; gap: 26px; flex-wrap: wrap; }
  .scoreboard { grid-template-columns: minmax(0,1fr); text-align: center; padding: 24px 18px; }
  .sb-team, .sb-team.r { align-items: center; text-align: center; }
  .sb-score { justify-content: center; }
  .home-hero { grid-template-columns: minmax(0,1fr); padding: 30px 26px; }
  .hero-court { height: 230px; order: -1; }
}
@media (max-width: 640px) {
  html, body { font-size: 14.5px; }
  .wrap { padding: 0 16px; }
  main.page { padding-top: 20px; padding-bottom: 56px; }
  .pnav-in { height: 58px; gap: 10px; }
  .plogo-t { font-size: 18px; letter-spacing: 2px; }
  .psearch { flex: 1 1 auto; min-width: 0; display: flex; justify-content: flex-end; }
  .psearch input, .psearch input:focus { width: 100%; max-width: 220px; min-width: 0; padding-left: 30px; }
  .psearch-res { width: calc(100vw - 32px); right: -60px; }
  .card { padding: 16px; border-radius: 10px; }
  .kpis, .home-kpis { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
  .kpis > .kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .kpi { padding: 13px 14px 12px; }
  .ava.lg { width: 76px; height: 76px; font-size: 28px; box-shadow: 0 0 0 4px var(--ball-dim); }
  .hero { padding: 20px 18px; }
  .hbar { grid-template-columns: 96px minmax(0,1fr) 38px; gap: 8px; }
  .mrow { grid-template-columns: 54px minmax(0,1fr) auto; gap: 10px; }
  .msc { gap: 8px; font-size: 16px; }
  .cmp { grid-template-columns: 46px minmax(0,1fr) 46px; gap: 8px; }
  .home-hero { padding: 24px 18px; border-radius: 16px; }
  .home-hero p { font-size: 15px; }
  .feature-match { grid-template-columns: minmax(0,1fr); gap: 12px; text-align: center; }
  .feature-match .fm-team, .feature-match .fm-team.r { align-items: center; text-align: center; }
  .feature-match .fm-team.r .pl { flex-direction: row !important; }
  .feature-match .fm-score { font-size: 30px; gap: 12px; justify-content: center; }
  .feature-match .fm-score div { flex-direction: row; gap: 8px; }
  .feature-match .fm-score div span:first-child::after { content: ':'; color: var(--text3); margin-left: 8px; }
  .feature-match .fm-team .pl-n { font-size: 16px; }
  .filters .inp, .filters .sel { min-width: 0; flex: 1 1 140px; }
  .bracket { grid-auto-columns: minmax(200px, 1fr); }
  .tabs a { padding: 11px 12px; font-size: 14px; }
  .page-h { padding-bottom: 16px; }
  .lvl-pick button { width: 34px; height: 34px; }
  /* широкие таблицы в карточках прокручиваются внутри, а не растягивают страницу */
  .card table:not(.top-list):not(.utable) { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .card table:not(.top-list):not(.utable) td, .card table:not(.top-list):not(.utable) th { white-space: nowrap; }
}
@media (max-width: 400px) {
  .home-hero .actions .btn { white-space: normal; text-align: center; flex: 1 1 auto; }
  .pnav-in { gap: 8px; }
}
@media (max-width: 360px) {
  .plogo-t { display: none; }      /* на самых узких экранах — только значок логотипа */
  .wrap { padding: 0 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js-anim .rv { opacity: 1; transform: none; }
}

/* ═══ СВЕТЛАЯ ТЕМА ═══ */
:root[data-theme="light"] {
  --bg: #f8f4fd; --bg2: #ffffff; --bg3: #f2ebfb; --bg4: #e7dcf6; --bg5: #d9c9f0;
  --bg-rgb: 248,244,253; --panel-rgb: 255,255,255; --panel2-rgb: 250,246,255;
  --line-rgb: 70,30,130; --line: rgba(70,30,130,.09); --line2: rgba(70,30,130,.16); --line3: rgba(70,30,130,.3);
  --text: #21103f; --text-rgb: 33,16,63; --text2: rgba(33,16,63,.74); --text3: rgba(33,16,63,.52);
  --ball: #d81b7d; --ball-rgb: 216,27,125; --ball-hi: #ec4a9c; --ball-lo: #a3125d; --on-ball: #ffffff;
  --ball-dim: rgba(216,27,125,.1); --ball-glow: rgba(216,27,125,.25);
  --glass: #1688c9; --glass-rgb: 22,136,201; --glass-dim: rgba(22,136,201,.09);
  --violet: #6b3fd1; --violet-rgb: 107,63,209;
  --t1: #1a86c9; --t1-rgb: 26,134,201; --t1-dim: rgba(26,134,201,.12);
  --t2: #e0532f; --t2-rgb: 224,83,47; --t2-dim: rgba(224,83,47,.12);
  --good: #13965e; --good-rgb: 19,150,94; --bad: #d42a45; --bad-rgb: 212,42,69;
  --hero1: #ffffff; --hero2: #f6effe;
  --card: linear-gradient(165deg, #ffffff, #fbf8ff);
  --shadow: 0 1px 2px rgba(33,16,63,.05), 0 12px 30px -20px rgba(70,30,130,.28);
}
:root[data-theme="light"] .pnav { background: rgba(255,255,255,.88); }
:root[data-theme="light"] .more-menu, :root[data-theme="light"] .psearch-res, :root[data-theme="light"] .chart-tip, :root[data-theme="light"] .toast { background: #fff; }
:root[data-theme="light"] .btn.ball, :root[data-theme="light"] .langs a.on, :root[data-theme="light"] .seg a.on, :root[data-theme="light"] .lvl-pick button.on { color: #fff; }
:root[data-theme="light"] .hero-court .net { stroke: var(--text); }
:root[data-theme="light"] .card.accent { background: linear-gradient(165deg, rgba(var(--ball-rgb),.07), #fff 60%); border-color: rgba(var(--ball-rgb),.3); }
:root[data-theme="light"] .ach div::before, :root[data-theme="light"] .empty::before { color: #fff; }
:root[data-theme="light"] .foot { background: none; }
:root[data-theme="light"] .radar .ring.outer { fill: rgba(var(--violet-rgb),.03); }

@media print {
  .pnav, .foot, .no-print, .tabs, .drawer, .toast { display: none !important; }
  body::before { display: none; }
  html, body { background: #fff; color: #000; }
  .card, .kpi, .hero, .scoreboard { border: 1px solid #ccc; background: #fff; box-shadow: none; break-inside: avoid; }
  .js-anim .rv { opacity: 1 !important; transform: none !important; }
}
