/* Layout: рабочий пульт трейдера — плотные строки как табло, одна колонка на телефоне,
   страница матча — две команды рядом, у каждой поле + список заявки. */
:root {
  --bg: #0f141b;
  --surface: #161d27;
  --surface-2: #1d2633;
  --line: #2a3544;
  --fg: #e6ebf2;
  --muted: #8b98aa;
  --accent: #f2b544;        /* табло-янтарь */
  --accent-ink: #1a1305;
  --down: #3fcf8e;          /* кэф падает — деньги заходят */
  --up: #ff6b6b;            /* кэф растёт */
  --warn: #f2b544;
  --st-xi: #2fbf71; --st-pos: #2fbf71; --st-bench: #4c8dff; --st-squad: #5b6676;
  --st-past: #2bb3b3; --st-doubt: #f0a030; --st-inj: #ff5a5a; --st-yel: #ffd23f;
  --st-red: #d7263d; --st-out: #9b6bff;
  --pitch: #17432c; --pitch-line: rgba(255,255,255,.18);
  --shadow: 0 8px 30px rgba(0,0,0,.45);
  --f-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --f-ui: "Barlow Semi Condensed", "Segoe UI", Roboto, sans-serif;
  --f-num: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #eef1f5; --surface: #ffffff; --surface-2: #f4f6f9; --line: #d8dee7; --fg: #141a22;
    --muted: #5d6a7c; --accent: #b67a07; --accent-ink: #ffffff; --down: #138a55; --up: #cf3434;
    --warn: #b67a07; --st-squad: #8a95a5; --st-yel: #d9a900; --pitch: #2e7a4f;
    --pitch-line: rgba(255,255,255,.35); --shadow: 0 8px 30px rgba(20,30,50,.18); color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #eef1f5; --surface: #ffffff; --surface-2: #f4f6f9; --line: #d8dee7; --fg: #141a22;
  --muted: #5d6a7c; --accent: #b67a07; --accent-ink: #ffffff; --down: #138a55; --up: #cf3434;
  --warn: #b67a07; --st-squad: #8a95a5; --st-yel: #d9a900; --pitch: #2e7a4f;
  --pitch-line: rgba(255,255,255,.35); --shadow: 0 8px 30px rgba(20,30,50,.18); color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--fg); font: 15px/1.4 var(--f-ui); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.num { font-family: var(--f-num); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }

/* ---------- верхняя панель ---------- */
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.top-in { max-width: 1240px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.brand { font: 700 22px/1 var(--f-display); letter-spacing: .02em; text-transform: uppercase; display: flex; align-items: center; gap: 8px; text-decoration: none; }
.brand b { background: var(--accent); color: var(--accent-ink); padding: 2px 6px; border-radius: 3px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tab { text-decoration: none; padding: 6px 12px; border-radius: 6px; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.tab:hover { color: var(--fg); background: var(--surface); }
.tab.on { color: var(--fg); background: var(--surface-2); box-shadow: inset 0 -2px 0 var(--accent); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: 13px; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: var(--st-squad); }
.dot.ok { background: var(--down); box-shadow: 0 0 0 3px color-mix(in srgb, var(--down) 25%, transparent); }
.dot.err { background: var(--up); box-shadow: 0 0 0 3px color-mix(in srgb, var(--up) 25%, transparent); }
.clock { font-family: var(--f-num); color: var(--muted); }
.themetog { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; cursor: pointer; font-size: 15px; line-height: 1.2; }
.themetog:hover { background: var(--surface-2); }

main { max-width: 1240px; margin: 0 auto; padding: 18px 16px 60px; }
.banner { background: color-mix(in srgb, var(--up) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--up) 45%, var(--line)); padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; }
.banner.demo { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }

/* ---------- панель фильтров ---------- */
.bar { display: flex; gap: 10px 18px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 5px 11px; border-radius: 6px; cursor: pointer; color: var(--muted); font-weight: 600; }
.seg button:hover { color: var(--fg); }
.seg button.on { background: var(--surface-2); color: var(--fg); box-shadow: inset 0 0 0 1px var(--line); }
.lbl { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.chk { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--muted); }
.chk input { accent-color: var(--accent); }

h1, h2, h3 { font-family: var(--f-display); text-wrap: balance; margin: 0; }
.sec-h { display: flex; align-items: baseline; gap: 4px 10px; flex-wrap: wrap; margin: 22px 0 8px; }
.sec-h h2 { font-size: 22px; text-transform: uppercase; letter-spacing: .03em; }
.sec-h .count { font-family: var(--f-num); color: var(--muted); font-size: 13px; }

/* ---------- строки матчей ---------- */
.list { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.league-h { display: flex; align-items: center; gap: 8px; padding: 7px 12px; background: var(--surface-2); border-top: 1px solid var(--line); font-weight: 700; font-size: 13px; letter-spacing: .03em; cursor: pointer; user-select: none; }
.league-h:first-child { border-top: 0; }
.league-h .cnt { color: var(--muted); font-weight: 500; }
.league-h .car { margin-left: auto; color: var(--muted); transition: transform .15s; }
.league-h.closed .car { transform: rotate(-90deg); }
.row {
  display: grid; align-items: center; gap: 10px;
  grid-template-columns: 52px minmax(0, 1fr) 92px repeat(3, 84px) 34px;
  padding: 8px 12px; border-top: 1px solid var(--line); cursor: pointer; text-decoration: none;
}
.row:hover { background: var(--surface-2); }
.row .t { font-family: var(--f-num); font-size: 14px; }
.row .t small { display: block; color: var(--muted); font-size: 11px; }
.teams { min-width: 0; }
.teams .tm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.teams .lg { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.score { font-family: var(--f-num); font-weight: 700; }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 3px 7px; border-radius: 4px; letter-spacing: .02em; white-space: nowrap; }
.b-conf { background: color-mix(in srgb, var(--st-xi) 18%, transparent); color: var(--st-xi); }
.b-pred { background: color-mix(in srgb, var(--st-bench) 16%, transparent); color: var(--st-bench); }
.b-none { color: var(--muted); }
.b-live { background: color-mix(in srgb, var(--up) 18%, transparent); color: var(--up); }
.odd { text-align: right; font-family: var(--f-num); font-variant-numeric: tabular-nums; line-height: 1.15; }
.odd .v { font-size: 15px; }
.odd .k { font-size: 10px; color: var(--muted); margin-right: 4px; font-family: var(--f-ui); }
.ch { display: block; font-size: 12px; }
.ch.dn { color: var(--down); }
.ch.upc { color: var(--up); }
.ch.z { color: var(--muted); }
.odd.hot .v { color: var(--down); font-weight: 600; }
.bell { width: 30px; height: 30px; border-radius: 6px; border: 1px solid transparent; background: none; cursor: pointer; color: var(--muted); display: grid; place-items: center; }
.bell:hover { border-color: var(--line); color: var(--fg); }
.bell.on { color: var(--accent); }
.bell svg { width: 17px; height: 17px; }
.btn svg { width: 16px; height: 16px; }
.row.drop { grid-template-columns: 52px minmax(0, 1fr) 92px 84px 84px 150px 0; }
.empty { padding: 26px 16px; text-align: center; color: var(--muted); }
.fresh .row { grid-template-columns: 52px minmax(0, 1fr) 92px repeat(3, 84px) 90px; }
.ago { font-family: var(--f-num); font-size: 12px; color: var(--muted); text-align: right; }
.ago .new { color: var(--accent); font-weight: 600; }

/* ---------- страница матча ---------- */
.back { color: var(--muted); text-decoration: none; font-size: 14px; }
.back:hover { color: var(--fg); }
.mhead { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: end; margin: 10px 0 16px; }
.mhead h1 { font-size: clamp(28px, 5vw, 44px); line-height: 1; text-transform: uppercase; letter-spacing: .01em; }
.mhead h1 .vs { color: var(--muted); font-weight: 500; padding: 0 .2em; }
.mhead .meta { color: var(--muted); margin-top: 6px; display: flex; gap: 6px 14px; flex-wrap: wrap; align-items: center; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.btn { border: 1px solid var(--line); background: var(--surface); padding: 7px 12px; border-radius: 7px; cursor: pointer; font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.on { border-color: var(--accent); color: var(--accent); }
.btn:disabled { opacity: .55; cursor: default; }
.oddbox { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.4fr); gap: 10px; margin-bottom: 18px; }
.ob { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.ob .k { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.ob .big { font: 600 26px/1.1 var(--f-num); margin: 2px 0; }
.ob .sub { font-size: 12px; color: var(--muted); font-family: var(--f-num); display: flex; gap: 10px; flex-wrap: wrap; }
.ob svg { width: 100%; height: 64px; display: block; }
.spark-leg { display: flex; gap: 12px; font-size: 11px; color: var(--muted); }
.spark-leg i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: 4px; vertical-align: middle; }

.teamsgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.team { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; min-width: 0; }
.team-h { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.team-h h2 { font-size: 24px; text-transform: uppercase; }
.team-h .form { font-family: var(--f-num); color: var(--muted); margin-left: auto; }
.pitch { position: relative; background: var(--pitch); margin: 12px; border-radius: 8px; padding: 14px 6px; display: flex; flex-direction: column-reverse; gap: 10px; min-height: 300px; justify-content: space-around;
  background-image: linear-gradient(var(--pitch-line), var(--pitch-line)), radial-gradient(circle at 50% 0, transparent 46px, var(--pitch-line) 47px, transparent 48px);
  background-size: 100% 1px, 100% 100%; background-position: 0 0, 0 0; background-repeat: no-repeat; border: 1px solid var(--pitch-line); }
.pitch::after { content: ""; position: absolute; left: 30%; right: 30%; bottom: -1px; height: 44px; border: 1px solid var(--pitch-line); border-bottom: 0; pointer-events: none; }
.pline { display: flex; justify-content: space-around; gap: 2px; position: relative; z-index: 1; }
.pp { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 70px; cursor: pointer; background: none; border: 0; padding: 0; }
.pp .shirt { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 700 14px var(--f-num); color: #fff; background: var(--c, var(--st-xi)); border: 2px solid rgba(255,255,255,.85); position: relative; }
.pp .nm { font-size: 12px; font-weight: 600; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.7); max-width: 70px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp .mk { position: absolute; top: -6px; right: -8px; display: flex; gap: 1px; }
.pitch-empty { color: rgba(255,255,255,.75); text-align: center; align-self: center; margin: auto; font-size: 14px; max-width: 30ch; }

.plist { padding: 4px 0 8px; }
.pgroup-h { display: flex; align-items: center; gap: 8px; padding: 10px 14px 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.sw { width: 10px; height: 10px; border-radius: 3px; background: var(--c); display: inline-block; flex: none; }
.prow { display: grid; grid-template-columns: 30px 22px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 5px 14px; cursor: pointer; border-left: 3px solid var(--c, transparent); }
.prow:hover { background: var(--surface-2); }
.prow .n { font-family: var(--f-num); color: var(--muted); text-align: right; font-size: 13px; }
.prow .ps { font-size: 11px; font-weight: 700; color: var(--muted); }
.prow .pn { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow .pn small { color: var(--muted); margin-left: 6px; }
.prow .man { font-size: 10px; color: var(--accent); margin-left: 6px; text-transform: uppercase; letter-spacing: .06em; }
.mks { display: flex; gap: 3px; }
.m { font: 700 10px/1 var(--f-ui); min-width: 16px; height: 16px; padding: 0 3px; border-radius: 3px; display: inline-grid; place-items: center; background: var(--surface-2); color: var(--fg); border: 1px solid var(--line); }
.m.cap { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.m.key { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.m.ly { background: var(--st-yel); border-color: var(--st-yel); width: 10px; min-width: 10px; padding: 0; color: transparent; }
.m.ret { color: var(--down); }

.legend { margin-top: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 14px; font-size: 13px; }
.legend div { display: flex; align-items: center; gap: 8px; }

/* редактор игрока */
.pop-bg { position: fixed; inset: 0; background: rgba(5,8,12,.5); z-index: 40; display: grid; place-items: center; padding: 16px; }
.pop { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); width: min(460px, 100%); max-height: 90vh; overflow: auto; }
.pop-h { padding: 14px 16px 10px; border-bottom: 1px solid var(--line); }
.pop-h h3 { font-size: 24px; }
.pop-h .muted { font-size: 13px; }
.pop-b { padding: 12px 16px; display: grid; gap: 14px; }
.stgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.stbtn { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); cursor: pointer; text-align: left; font-size: 14px; }
.stbtn.on { border-color: var(--c); box-shadow: inset 0 0 0 1px var(--c); }
.stbtn .auto { margin-left: auto; font-size: 10px; color: var(--muted); text-transform: uppercase; }
.mkgrid { display: grid; gap: 6px; }
.pop-f { padding: 10px 16px 14px; display: flex; gap: 8px; justify-content: flex-end; border-top: 1px solid var(--line); flex-wrap: wrap; }

/* настройки */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; display: grid; gap: 12px; align-content: start; min-width: 0; }
.card h2 { font-size: 22px; text-transform: uppercase; }
.field { display: grid; gap: 6px; }
.field input[type=number] { width: 110px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; }
.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--fg); color: var(--bg); padding: 9px 16px; border-radius: 8px; font-weight: 600; z-index: 60; box-shadow: var(--shadow); max-width: calc(100vw - 32px); }

/* вход */
.login { max-width: 360px; margin: 12vh auto 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 22px; display: grid; gap: 14px; }
.login h1 { font-size: 30px; text-transform: uppercase; }
.login input { background: var(--surface-2); border: 1px solid var(--line); border-radius: 7px; padding: 10px 12px; width: 100%; }
.err { color: var(--up); font-size: 14px; }

.shot img { width: 100%; border-radius: 6px; border: 1px solid var(--line); }

@media (max-width: 900px) {
  .teamsgrid { grid-template-columns: minmax(0, 1fr); }
  .oddbox { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .oddbox .ob.hist { grid-column: 1 / -1; }
}
@media (max-width: 680px) {
  .row, .fresh .row { grid-template-columns: 44px minmax(0, 1fr) 62px 62px 62px; gap: 6px; padding: 8px 10px; }
  .row.drop { grid-template-columns: 44px minmax(0, 1fr) 62px 62px 76px; }
  .row .lu, .row .bell-c { display: none; }
  .teams .tm { white-space: normal; }
  .teams .tm span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .teams .tm .sep { display: none; }
  .fresh .row .ago { display: none; }
  .row .teams .lu-m { display: inline-flex; }
  .odd .v { font-size: 14px; }
  .mhead { grid-template-columns: minmax(0, 1fr); }
  .actions { justify-content: flex-start; }
  .top-right .clock { display: none; }
  .pp { width: 56px; } .pp .nm { max-width: 56px; font-size: 11px; }
  .stgrid { grid-template-columns: minmax(0, 1fr); }
}
.lu-m { display: none; margin-top: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ================= страница матча в виде expari ================= */
:root {
  --c-ext: #8a94a3; --c-poss: #7cc4ff; --c-xi: #ff4b4b; --c-bench: #f5c400; --c-past: #2fbf71;
  --c-q: #ff9f1a; --c-key: #4d9bff; --row-alt: rgba(255,255,255,.025);
}
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) { --c-ext: #8b929c; --c-poss: #4aa3f0; --c-xi: #e03131; --c-bench: #e0b000; --c-past: #1f9d55; --c-q: #e67700; --c-key: #1c6fe0; --row-alt: rgba(20,30,50,.035); } }
:root[data-theme="light"] { --c-ext: #8b929c; --c-poss: #4aa3f0; --c-xi: #e03131; --c-bench: #e0b000; --c-past: #1f9d55; --c-q: #e67700; --c-key: #1c6fe0; --row-alt: rgba(20,30,50,.035); }

main:has(.mlayout) { max-width: none; }
.mlayout { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 18px; align-items: start; }
.mmain { min-width: 0; }
.personal { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 64px); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; max-height: calc(100vh - 90px); overflow-y: auto; }
.personal summary { padding: 9px 12px; font: 700 15px var(--f-display); text-transform: uppercase; letter-spacing: .04em; cursor: pointer; background: var(--surface-2); }
.pm-day { padding: 4px 12px; font-size: 12px; font-family: var(--f-num); color: var(--muted); background: var(--bg); border-top: 1px solid var(--line); }
.pm { display: flex; align-items: flex-start; border-top: 1px solid var(--line); }
.pm a { flex: 1; display: flex; gap: 6px; padding: 7px 4px 7px 10px; text-decoration: none; font-size: 13px; font-weight: 600; line-height: 1.25; min-width: 0; }
.pm a:hover { background: var(--surface-2); }
.pm.on a { box-shadow: inset 3px 0 0 var(--accent); background: var(--surface-2); }
.pm-star { color: var(--accent); width: 13px; flex: none; margin-top: 1px; }
.pm-t { min-width: 0; overflow-wrap: anywhere; }
.pm-t small { display: block; color: var(--muted); font-weight: 400; font-size: 11px; margin-top: 2px; }
.pm-x { border: 0; background: none; color: var(--up); cursor: pointer; padding: 7px 8px; font-size: 12px; }
.pm-empty { padding: 10px 12px; font-size: 13px; }

.xlegend { display: flex; flex-wrap: wrap; gap: 6px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; margin-bottom: 14px; font-size: 12.5px; }
.lg-it { display: inline-flex; align-items: center; gap: 6px; }
.dot-l { width: 11px; height: 11px; border-radius: 50%; display: inline-block; flex: none; vertical-align: middle; }
.c-ext { background: var(--c-ext); } .c-poss { background: var(--c-poss); } .c-xi { background: var(--c-xi); }
.c-bench { background: var(--c-bench); } .c-past { background: var(--c-past); } .c-none { border: 1.5px solid var(--muted); }

.ic { display: inline-grid; place-items: center; width: 14px; height: 14px; margin-left: 4px; vertical-align: -2px; flex: none; }
.ic svg { width: 100%; height: 100%; }
.ic.q { color: var(--c-q); font-weight: 800; font-size: 14px; }
.ic.inj { color: var(--c-xi); }
.ic.out { color: var(--c-xi); }
.ic.ret { color: var(--c-past); }
.ic.crd { width: 9px; height: 12px; border-radius: 1.5px; }
.ic.crd.yl { background: var(--c-bench); }
.ic.crd.rd { background: var(--c-xi); }
.ic.crd.gr { background: var(--c-past); }
.ic.crd.yr { background: linear-gradient(135deg, var(--c-bench) 50%, var(--c-xi) 50%); }
.ic.cap { width: auto; padding: 0 3px; height: 13px; font: 800 10px/13px var(--f-ui); border-radius: 2px; background: var(--c-key); color: #fff; }
.ic.key { color: var(--c-key); }
.lg-it .ic { margin-left: 0; }

.tgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.tpanel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; min-width: 0; overflow: hidden; }
.tp-h { display: flex; align-items: baseline; gap: 10px; padding: 10px 12px 4px; flex-wrap: wrap; }
.tp-h h2 { font-size: 22px; text-transform: uppercase; letter-spacing: .02em; }
.cnts { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-family: var(--f-num); font-size: 13px; }
.swline { padding: 0 12px 8px; font-size: 13px; display: flex; gap: 4px 10px; flex-wrap: wrap; align-items: center; }
.swline a { color: var(--c-key); }
.rotline, .valline { font-size: 13px; }
.tvals { display: inline-flex; align-items: baseline; gap: 4px 10px; flex-wrap: wrap; }
.tval { font-family: var(--f-num); font-size: 18px; font-weight: 700; }
.ob .est { color: var(--accent); font-weight: 600; }
.ob .bf { color: #b8860b; font-weight: 600; }
.tval-s { font-family: var(--f-num); font-size: 13px; color: var(--muted); }
.rot b { font-weight: 700; }
.rot-high b { color: var(--up); }
.rot-mid b { color: var(--warn); }
.rot-low b { color: var(--muted); }
.linkbtn { border: 0; background: none; color: var(--muted); text-decoration: underline; cursor: pointer; padding: 0; font-size: 13px; }
.linkform { display: flex; gap: 8px; padding: 0 12px 10px; flex-wrap: wrap; }
.linkform input { flex: 1 1 260px; min-width: 0; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 6px 9px; }
.tscroll { overflow-x: auto; border-top: 1px solid var(--line); }
.xt { border-collapse: collapse; width: 100%; font-size: 13px; white-space: nowrap; }
.xt th { position: sticky; top: 0; background: var(--surface-2); font-size: 11px; font-weight: 700; color: var(--muted); text-align: left; padding: 5px 4px; border-bottom: 1px solid var(--line); z-index: 1; }
.xt td { padding: 2px 4px; border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent); }
.xt tbody tr:nth-child(even) { background: var(--row-alt); }
/* тонкие вертикальные линии между столбцами — таблица читается по колонкам (№ | % | фамилия …) */
.xt td, .xt th { border-right: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.xt td:last-child, .xt th:last-child { border-right: 0; }
.xt tbody tr:hover { background: var(--surface-2); }
.xt .st { text-align: right; font-family: var(--f-num); font-variant-numeric: tabular-nums; min-width: 26px; }
.xt th.st { text-align: right; }
.xt .mins { font-weight: 600; }
.xt .pos { color: var(--muted); }
.xt .c-n { text-align: right; color: var(--muted); padding-right: 8px; }
.xt .c-ck, .xt .c-rd { text-align: center; width: 22px; padding: 2px 1px; }
.xt input[type=checkbox], .xt input[type=radio] { margin: 0; width: 14px; height: 14px; cursor: pointer; vertical-align: middle; }
.xt input.man { outline: 2px solid var(--accent); outline-offset: 1px; }
.xt input[data-f=ext] { accent-color: var(--c-ext); } .xt input[data-f=poss] { accent-color: var(--c-poss); }
.xt input.rx { accent-color: var(--c-xi); } .xt input.rb { accent-color: var(--c-bench); }
.xt th.sortable { cursor: pointer; } .xt th.sortable:hover, .xt th.sortable.on { color: var(--fg); } .xt th.sortable.on { box-shadow: inset 0 -2px 0 var(--accent); }
.c-st { width: 1%; }
.stsel { background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px; padding: 1px 2px; font-size: 12.5px; max-width: 150px; cursor: pointer; }
.stsel.man { border-color: var(--accent); }
.plus { border: 1px solid var(--line); background: none; color: var(--c-key); width: 20px; height: 20px; border-radius: 4px; cursor: pointer; font-weight: 800; line-height: 1; padding: 0; }
.plus.has { background: color-mix(in srgb, var(--c-key) 18%, transparent); }
.c-name { min-width: 170px; }
.pname { font-weight: 600; }
.pname.n-q { color: var(--c-q); text-decoration: underline; text-underline-offset: 2px; }
.pname.n-out { color: var(--c-xi); text-decoration: line-through; }
.pname.n-ret { color: var(--c-past); }
.pnote { margin-left: 6px; font-size: 11px; color: var(--muted); max-width: 150px; overflow: hidden; text-overflow: ellipsis; display: inline-block; vertical-align: -3px; }
tr.role-xi .c-n { box-shadow: inset 3px 0 0 var(--c-xi); }
tr.role-bench .c-n { box-shadow: inset 3px 0 0 var(--c-bench); }
tr.role-poss .c-n { box-shadow: inset 3px 0 0 var(--c-poss); }
.fm { text-align: center; width: 30px; padding: 2px 2px; }
.fh { display: inline-block; font-size: 9.5px; line-height: 1.05; font-family: var(--f-num); }
.fdot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; vertical-align: middle; }
.f-s { background: var(--c-past); }
.f-b { background: var(--c-bench); }
.f-u { border: 2px solid var(--c-bench); width: 10px; height: 10px; }
.f-n { background: transparent; }
.ly-box { display: inline-block; min-width: 18px; text-align: center; border: 1.5px solid var(--c-xi); border-radius: 2px; padding: 0 2px; }
.ptabs { display: flex; gap: 2px; padding: 10px 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.ptabs button { border: 1px solid var(--line); border-bottom: 0; background: var(--surface-2); color: var(--muted); padding: 5px 12px; border-radius: 6px 6px 0 0; cursor: pointer; font-weight: 600; font-size: 13px; }
.ptabs button.on { background: var(--surface); color: var(--fg); box-shadow: inset 0 2px 0 var(--accent); }
.pbody { padding: 0 12px 12px; display: grid; gap: 6px; }
.notes { width: 100%; min-height: 110px; resize: vertical; background: var(--surface-2); border: 1px solid var(--line); border-radius: 0 6px 6px 6px; padding: 8px 10px; font: 13px/1.45 var(--f-ui); }
.saved { font-size: 12px; min-height: 1em; }
.pbody .btn { justify-self: start; }
.log { list-style: none; margin: 0; padding: 8px 0 0; max-height: 240px; overflow-y: auto; font-size: 13px; display: grid; gap: 3px; border-top: 1px solid var(--line); }
.mkpop { position: absolute; z-index: 50; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); padding: 10px 12px; display: grid; gap: 7px; width: 300px; max-width: calc(100vw - 16px); font-size: 14px; }
.mk-h { font-weight: 700; }
.mkpop .chk { color: var(--fg); }
.mk-f { display: flex; justify-content: flex-end; }
.btn svg { width: 15px; height: 15px; }
#bPin svg { color: var(--accent); }

@media (max-width: 1500px) { .tgrid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) {
  .mlayout { grid-template-columns: minmax(0, 1fr); }
  .personal { position: static; max-height: none; }
  .personal details:not([open]) { }
}
[hidden] { display: none !important; }

/* ================= общий макет с левой панелью ================= */
.top-in { max-width: 1560px; }
.layout { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 18px; max-width: 1560px; margin: 0 auto; padding: 0 16px; align-items: start; }
.layout.wide { max-width: none; }
.layout > main { max-width: none; margin: 0; padding: 18px 0 60px; min-width: 0; }
.side { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 62px); margin-top: 18px; max-height: calc(100vh - 80px); overflow-y: auto;
  display: grid; gap: 12px; align-content: start; scrollbar-width: thin; }
.side-load { padding: 12px; }
.sbox { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.sbox > summary { padding: 9px 12px; font: 700 15px var(--f-display); text-transform: uppercase; letter-spacing: .04em; cursor: pointer; background: var(--surface-2); list-style: none; display: flex; gap: 8px; align-items: center; }
.sbox > summary::before, .cty > summary::before { content: "▸"; color: var(--muted); font-size: 11px; transition: transform .15s; }
.sbox[open] > summary::before, .cty[open] > summary::before { transform: rotate(90deg); }
.sbox > summary::-webkit-details-marker, .cty > summary::-webkit-details-marker { display: none; }
.ctys { display: grid; }
.cty { border-top: 1px solid var(--line); }
.cty > summary { padding: 7px 12px; cursor: pointer; font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 7px; list-style: none; }
.cty > summary:hover { background: var(--surface-2); }
.cty > summary .cnt { margin-left: auto; font-size: 12px; font-weight: 500; }
.lgi { display: flex; align-items: center; gap: 6px; padding: 0 8px 0 0; }
.lgi a { flex: 1; min-width: 0; padding: 5px 8px 5px 30px; text-decoration: none; font-size: 13.5px; color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lgi:hover { background: var(--surface-2); }
.lgi.on { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--accent); }
.lgi.on a { font-weight: 700; }
.soon { font: 600 11px var(--f-num); color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); border-radius: 8px; padding: 1px 6px; }
.lg-x { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 11px; padding: 2px 4px; }
.lg-x:hover { color: var(--up); }
.addlg { border-top: 1px solid var(--line); padding: 9px 12px; }
.addlg form { display: grid; gap: 7px; }
.addlg input { width: 100%; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; font-size: 13px; }
.addlg-b { display: flex; gap: 6px; }
.crumbs { font-size: 13px; }
.big-h { font-size: clamp(26px, 4vw, 38px) !important; }
.lgrid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 18px; align-items: start; }
.grp { font-size: 16px; text-transform: uppercase; margin: 12px 0 6px; color: var(--muted); }
.card-t { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.lt { width: 100%; border-collapse: collapse; font-size: 14px; }
.lt th { text-align: left; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 7px 8px; background: var(--surface-2); }
.lt td { padding: 6px 8px; border-top: 1px solid var(--line); }
.lt .num { text-align: right; font-family: var(--f-num); font-variant-numeric: tabular-nums; }
.lt tbody tr { cursor: pointer; }
.lt tbody tr:hover { background: var(--surface-2); }
.lt a { text-decoration: none; font-weight: 600; }
.lt .go { color: var(--muted); width: 16px; }
.trow { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); text-decoration: none; }
.trow:first-child { border-top: 0; }
.trow:hover { background: var(--surface-2); }
.trow .t small { display: block; color: var(--muted); font-size: 11px; }
.trow .me { color: var(--accent); }
.tr-r { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.tr-go { color: var(--muted); font-size: 13px; font-weight: 600; }
.trow:hover .tr-go { color: var(--fg); }
.tlink { text-decoration: none; }
.tlink:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.mhead .meta a.tlink { color: var(--muted); }

@media (max-width: 1200px) { .lgrid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .side { position: static; max-height: none; margin-top: 12px; }
  /* на телефоне панель «Личные матчи / Страны и лиги» — под страницей, а не над ней */
  .layout > main { order: 1; }
  .layout > .side { order: 2; }
}
@media (max-width: 680px) {
  .trow { grid-template-columns: 60px minmax(0, 1fr); }
  .tr-r { grid-column: 2; justify-content: flex-start; }
  .trow .teams .tm span { display: block; }
  .trow .teams .tm .sep { display: none; }
}

/* точки состава у фамилии (как у expari) */
.xt .c-sd { width: 46px; padding: 2px 6px 2px 2px; }
.sdots { display: inline-flex; gap: 3px; vertical-align: middle; }
.sdot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.sdot.c-ext { background: var(--c-ext); } .sdot.c-poss { background: var(--c-poss); }
.sdot.c-xi { background: var(--c-xi); } .sdot.c-bench { background: var(--c-bench); }

/* ================= live ================= */
.lstate { font-size: 12px; display: inline-flex; align-items: center; gap: 5px; color: var(--muted); }
.lstate::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--st-squad); }
.lstate.on::before { background: var(--down); box-shadow: 0 0 0 3px color-mix(in srgb, var(--down) 25%, transparent); }
.lstate.off { color: var(--up); } .lstate.off::before { background: var(--up); }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--up); display: inline-block; margin-right: 2px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.lv { display: inline-flex; align-items: center; gap: 2px; margin-left: 6px; font: 600 11px var(--f-num); color: var(--muted); vertical-align: -2px; }
.lv svg { width: 12px; height: 12px; }
.lv .ic { margin-left: 0; }
.lv-g b { color: var(--fg); font-weight: 700; margin-left: 2px; }
.lv-a { color: var(--c-key); }
.lv-in { color: var(--c-past); }
.lv-out { color: var(--c-xi); }
.xt .c-lm { min-width: 44px; font-weight: 700; }
.xt .c-lm.on { color: var(--c-past); }
@keyframes flashrow { 0% { background: color-mix(in srgb, var(--accent) 38%, transparent); } 100% { background: transparent; } }
.xt tbody tr.flash, .xt tbody tr.flash td { animation: flashrow 4s ease-out 1; }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }
.xt .c-mv { min-width: 46px; font-weight: 700; color: var(--fg); }
.xt td.c-mv.ss { color: var(--muted); font-style: italic; font-weight: 600; }
.xt .c-rt { min-width: 48px; }
.rt { display: inline-block; min-width: 34px; text-align: center; padding: 1px 4px; border-radius: 3px; font-weight: 700; font-size: 12px; color: #fff; }
.r-top { background: #3b7cff; } .r-good { background: #1fae63; } .r-ok { background: #8bbf28; }
.r-low { background: #f08c1a; } .r-bad { background: #e5484d; }

/* ================= компактная таблица и расположение команд ================= */
.tlay { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; margin: -4px 0 10px; }
.tlay .seg button { padding: 3px 10px; font-size: 13px; }
.tlay-hint { font-size: 12.5px; }
.tgrid.side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tgrid.stack { grid-template-columns: minmax(0, 1fr); }
.xt { font-size: 12.5px; }
.xt th { padding: 4px 3px; font-size: 10.5px; }
.xt td { padding: 1px 3px; }
.xt .st { min-width: 22px; }
.xt .c-ck, .xt .c-rd { width: 18px; padding: 1px 0; }
.xt input[type=checkbox], .xt input[type=radio] { width: 13px; height: 13px; }
.stsel { max-width: 108px; font-size: 12px; padding: 0 1px; }
.plus { width: 18px; height: 18px; }
.xt .c-name { min-width: 120px; max-width: 230px; overflow: hidden; text-overflow: ellipsis; }
.xt .pname { display: inline-block; max-width: 150px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.xt .pnote { max-width: 64px; }
.xt .c-sd { width: 40px; padding-right: 3px; }
.sdot { width: 10px; height: 10px; }
.xt .fm { width: 22px; padding: 1px; }
.xt .fh { font-size: 9px; }
.fdot { width: 10px; height: 10px; }
.f-u { width: 9px; height: 9px; }
.xt .c-mv { min-width: 40px; }
.xt .c-rt { min-width: 40px; }
.rt { min-width: 30px; font-size: 11.5px; padding: 0 3px; }
.xt .c-n { padding-right: 5px; }
/* тень справа, если таблицу всё же можно прокрутить вбок */
.tscroll { background:
  linear-gradient(to right, var(--surface) 30%, transparent) left / 24px 100% no-repeat local,
  linear-gradient(to left, var(--surface) 30%, transparent) right / 24px 100% no-repeat local,
  radial-gradient(farthest-side at 0 50%, rgba(0,0,0,.35), transparent) left / 12px 100% no-repeat scroll,
  radial-gradient(farthest-side at 100% 50%, rgba(0,0,0,.35), transparent) right / 12px 100% no-repeat scroll; }
.sidetog { border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 6px; padding: 4px 9px; cursor: pointer; font-size: 13px; font-weight: 600; }
.sidetog:hover { color: var(--fg); }
.layout.noside { grid-template-columns: minmax(0, 1fr); }
.layout.noside > .side { display: none; }
@media (max-width: 900px) { .sidetog { display: none; } .layout.noside > .side { display: grid; } }

/* был в старте прошлого матча, а в этом — нет */
tr.pr.dropped > td { background: rgba(229, 57, 53, .17); }
tr.pr.dropped:hover > td { background: rgba(229, 57, 53, .26); }
.lg-drop { display: inline-block; width: 18px; height: 11px; border-radius: 3px; background: rgba(229, 57, 53, .35); }

.xlinks { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.xlinks:empty { display: none; }
.xlinks .btn { text-decoration: none; }
.xlegend-below { margin-top: 16px; }

.surprise { margin: 6px 0; padding: 6px 10px; border-radius: 8px; font-size: 13px; line-height: 1.4; border-left: 4px solid; }
.surprise.sp-lo { border-color: #9aa3ad; background: rgba(154, 163, 173, .10); }
.surprise.sp-mid { border-color: #e0a100; background: rgba(224, 161, 0, .12); }
.surprise.sp-hi { border-color: #d6453d; background: rgba(214, 69, 61, .12); }


.motiv { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; font-size: 14px; }
.mv-derby { font-weight: 700; color: var(--up); }
.mv-fight { font-weight: 700; color: var(--up); }
.mv-done { font-weight: 700; color: var(--c-key); }
.mv-none { color: var(--muted); }
.mv-info { color: var(--muted); }

.tglist { list-style: none; margin: 8px 0; padding: 0; font-size: 13px; }
.tglist li { display: flex; flex-wrap: wrap; gap: 2px 10px; padding: 4px 0; border-bottom: 1px solid var(--line); }

.mstats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin: 10px 0; }
.mstats > div { border: 1px solid var(--line, rgba(127,127,127,.25)); border-radius: 8px; padding: 10px 12px; }
.mstats .k { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.mstats .big { font-family: var(--f-num); font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.mstats .muted { font-size: 12px; }
b.pos { color: var(--down); } b.neg { color: var(--up); }

/* настройки: раскрывающиеся разделы */
.accs { display: flex; flex-direction: column; gap: 10px; }
details.acc { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
details.acc > summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: 6px 14px; flex-wrap: wrap;
  padding: 14px 44px 14px 16px; position: relative; }
details.acc > summary::-webkit-details-marker { display: none; }
details.acc > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 10px; }
.acc-t { font-size: 17px; font-weight: 700; }
.acc-s { font-size: 13px; }
.acc-c { position: absolute; right: 16px; top: 50%; width: 9px; height: 9px; border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); transition: transform .15s; }
details.acc[open] > summary .acc-c { transform: translateY(-30%) rotate(-135deg); }
details.acc[open] > summary { border-bottom: 1px solid var(--line); }
.acc-b { padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.acc-b > section { min-width: 0; }
.acc-h { font-size: 14px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-top: 8px;
  padding-top: 10px; border-top: 1px dashed var(--line); }
.field.inline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.field.inline input[type=number] { width: 80px; }
@media (prefers-reduced-motion: reduce) { .acc-c { transition: none; } }

/* зелёный вопросник: был под вопросом, но может сыграть; новый игрок в прогнозе; убран из прогноза */
:root { --c-qok: #2fbf71; --st-ok: #2fbf71; }
.ic.q.ok { color: var(--c-qok); }
.pname.n-qok { color: var(--c-qok); text-decoration: underline; text-underline-offset: 2px; }
.sdot.c-poss.chg { box-shadow: 0 0 0 2px var(--bg, #fff), 0 0 0 3.5px var(--c-q); }
.sdot.c-poss-out { background: transparent; border: 1.5px solid var(--c-poss); position: relative; }
.sdot.c-poss-out::after { content: ""; position: absolute; left: -2px; right: -2px; top: 50%; height: 1.5px; background: var(--c-xi); transform: rotate(-45deg); }

.xt .c-imp { text-align: right; color: var(--muted); font-size: 11px; padding: 0 4px 0 0; min-width: 22px; font-variant-numeric: tabular-nums; }
.xt .c-imp.out { color: var(--down, #e03131); font-weight: 700; background: rgba(224,49,49,.12); }
.pimp { margin-left: 5px; font-size: 11px; font-weight: 700; color: var(--down, #e03131); background: rgba(224,49,49,.1); border-radius: 4px; padding: 0 4px; vertical-align: 1px; }

/* ------------------------------------------------------------------ НБА */
.row.nrow { grid-template-columns: 52px minmax(0, 1fr) 92px 84px 84px 110px; }
.nrow .nb-line { text-align: right; }
.nb-out { margin-left: 4px; font: 700 11px/1 var(--f-num); color: var(--down, #e03131); }
.nb-score { margin-left: 8px; font-family: var(--f-num); font-weight: 700; }
.nrow .live { color: var(--down, #e03131); font-weight: 600; }
.nba-h { margin: 0 12px 0 0; font-family: var(--f-head, inherit); }
.ftop { display: flex; align-items: baseline; gap: 10px; margin: 6px 0 12px; flex-wrap: wrap; }
.nba-bot { margin-top: 18px; max-width: 760px; }
.nba-bot h3 { margin: 0; }
.nb-howto ol { margin: 4px 0 0 18px; padding: 0; display: grid; gap: 4px; font-size: 14px; }
.nb-howto.hide { display: none; }
.nb-tok { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.nb-tok input[type=password] { flex: 1 1 260px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 7px 9px; }
.nb-sw { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; }
.nst { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 5px; border-radius: 4px; white-space: nowrap; }
.nst.n-out { background: rgba(224,49,49,.14); color: #e03131; }
.nst.n-dbt { background: rgba(240,140,0,.16); color: #d9480f; }
.nst.n-q { background: rgba(250,176,5,.18); color: #b07a00; }
.nst.n-prob { background: rgba(64,192,87,.14); color: #2b8a3e; }
.nst.n-av { background: rgba(134,142,150,.14); color: var(--muted); }
.nlu { display: inline-block; min-width: 18px; text-align: center; font: 700 11px/16px var(--f-ui); border-radius: 3px; }
.nlu.c { background: var(--c-xi); color: #fff; }
.nlu.e { border: 1.5px solid var(--c-poss); color: var(--c-poss); }
.nlu.i { color: var(--muted); }
.pname.st-out { text-decoration: line-through; color: var(--down, #e03131); }
.nbt .nb-st { min-width: 86px; }
.nb-spark { width: 100%; height: 54px; display: block; }
.nb-b2b { margin-left: 5px; font: 700 10px/1 var(--f-ui); padding: 2px 4px; border-radius: 3px; background: rgba(240,140,0,.16); color: #d9480f; vertical-align: 1px; }
.row.nrow .tm .nb-short { display: none !important; }
.nbt .muted { color: var(--muted) !important; font-weight: 400; }
@media (min-width: 1200px) { .tgrid.nba-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.nba-legend { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
@media (max-width: 720px) {
  .row.nrow { grid-template-columns: 44px minmax(0, 1fr) 62px 62px 66px; }
  .row.nrow .lu { display: none; }
  .row.nrow .tm .nb-full { display: none !important; } .row.nrow .tm .nb-short { display: inline !important; }
}
/* НХЛ */
.row.nrow.nhrow { grid-template-columns: 52px minmax(0, 1fr) 150px 84px 84px 110px; }
.nh-gs { display: flex; gap: 4px; align-items: center; justify-content: center; }
.nh-g .badge { font-size: 11px; padding: 2px 5px; }
.nh-ghead { padding: 8px 14px; font-size: 13px; border-bottom: 1px solid var(--line); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.nh-note { flex-basis: 100%; font-size: 12px; }
@media (max-width: 720px) { .row.nrow.nhrow { grid-template-columns: 44px minmax(0, 1fr) 62px 62px 66px; } }

/* оборот Betfair в ленте */
.lg .bfv { display: inline-block; margin-left: 6px; font: 600 11px/1.4 var(--f-num); color: #b8860b; }
.lg .bfv.big { color: #e0a000; }
.lg .bfv.low { color: var(--muted); font-weight: 400; }

/* ⚡ Срочно */
.urgwrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 10px; }
table.urg { width: 100%; border-collapse: collapse; font-size: 13px; }
table.urg th { text-align: left; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.urg td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.urg td:nth-child(n+4) { white-space: nowrap; }
table.urg .small, .small { font-size: 11px; }
.uch { font-weight: 600; font-size: 12px; }
.uch.up-good { color: var(--down); }      /* в сторону сигнала — зелёным, как у сайта «деньги заходят» */
.uch.dn-bad { color: var(--up); }

/* блок Betfair на странице матча */
.bfbox { border: 1px solid var(--line); border-left: 3px solid #e0a000; border-radius: 10px; background: var(--surface); padding: 10px 12px; margin: -8px 0 18px; }
.bfh { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; margin-bottom: 8px; }
.bfh .btn.sm { margin-left: auto; padding: 3px 10px; font-size: 12px; text-decoration: none; }
.bfrow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.bfc .k { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bfp { display: flex; gap: 6px; margin: 3px 0; font: 600 20px/1.1 var(--f-num); }
.bfp .bk { color: #2f7fd8; }
.bfp .ly { color: #d9578a; }
.bfc .sub { font-size: 12px; color: var(--muted); }
@media (max-width: 600px) { .bfp { font-size: 16px; } .bfc .k { font-size: 10px; } }

/* «⚡ Срочно» на телефоне — карточки вместо таблицы */
@media (max-width: 700px) {
  table.urg thead { display: none; }
  table.urg, table.urg tbody { display: block; }
  table.urg tr { display: flex; flex-wrap: wrap; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  table.urg td { display: block; border: none; padding: 0; }
  table.urg td:nth-child(1) { order: 1; width: 100%; color: var(--muted); font-size: 12px; }
  table.urg td:nth-child(2) { order: 2; width: 100%; }
  table.urg td:nth-child(3) { order: 3; width: 100%; margin-bottom: 4px; }
  table.urg td[data-l] { order: 4; font-size: 12px; }
  table.urg td[data-l]::before { content: attr(data-l) " "; color: var(--muted); }
  table.urg td:last-child { order: 5; margin-left: auto; }
}

/* сирена: плашки сильных сигналов поверх страницы */
#urgBox { position: fixed; right: 16px; top: 70px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; max-width: min(420px, calc(100vw - 32px)); }
.urgcard { background: #2b1d00; color: #fff; border: 2px solid #ffb400; border-radius: 12px; padding: 12px 14px; box-shadow: 0 8px 28px rgba(0,0,0,.45); font-size: 14px; animation: urgpulse 1s ease-in-out 3; }
.urgcard .t { font-weight: 700; font-size: 15px; margin-bottom: 4px; padding-right: 22px; }
.urgcard .a { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.urgcard .a .btn { text-decoration: none; color: #2b1d00; background: #ffb400; border-color: #ffb400; font-weight: 700; }
.urgcard .a .btn + .btn { background: transparent; color: #ffd27a; border-color: #ffd27a; }
.urgcard .w { margin-top: 6px; font-size: 12px; color: #ffd27a; }
.urgcard .x { position: absolute; right: 10px; top: 6px; background: none; border: 0; color: #fff; font-size: 20px; cursor: pointer; }
.urgcard { position: relative; }
@keyframes urgpulse { 50% { box-shadow: 0 0 0 6px rgba(255,180,0,.45); } }

/* 1.11: ручная правка статусов — по кнопке «✏️ Править статусы»; без неё таблица уже (на телефоне — заметно) */
.noedit .xt .c-st, .noedit .xt .c-plus, .noedit .xt .c-ck, .noedit .xt .c-rd { display: none; }
.xlegend-below > summary { cursor: pointer; font-size: 13px; margin-bottom: 8px; }
