/* Глядачі: світла тема, як на скрінах власника (турнірна таблиця, тури, сітка). Лише перегляд. */
:root { --bg: #f3f4f6; --card: #ffffff; --ink: #1f2328; --mut: #5f6670; --soft: #8a919b; --line: #e3e6ea; --head: #f1f3f4;
  --win: #1e8e3e; --lose: #d93025; --draw: #9aa0a6; --acc: #ff7a1a; --adv: #1e8e3e }
* { box-sizing: border-box }
html { -webkit-text-size-adjust: 100% }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.35 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; font-variant-numeric: tabular-nums }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; touch-action: manipulation }

.top { position: sticky; top: 0; z-index: 5; background: var(--card); border-bottom: 1px solid var(--line) }
.hd { display: flex; align-items: center; gap: 12px; padding: 10px 16px 6px; max-width: 1100px; margin: 0 auto }
.hd img { width: 38px; height: 38px; flex: none }
.hd h1 { margin: 0; font-size: 21px; line-height: 1.1; font-weight: 700 }
.hd .sub { color: var(--mut); font-size: 13px }
#net { margin-left: auto } #net .off { background: #fde7e7; color: var(--lose); font-size: 12px; font-weight: 700; padding: 4px 8px; border-radius: 10px; white-space: nowrap }
.tabs { display: flex; gap: 8px; padding: 6px 16px 10px; max-width: 1100px; margin: 0 auto; overflow-x: auto }
.tabs button { padding: 8px 16px; border-radius: 20px; background: var(--head); color: var(--ink); font-weight: 600; white-space: nowrap; border: 1px solid transparent }
.tabs button.on { background: #fff; border-color: var(--ink) }

main { max-width: 1100px; margin: 0 auto; padding: 12px 16px 40px }
.empty { color: var(--mut); text-align: center; padding: 40px 0 }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden }

/* ── таблиця ── */
.v-table { display: grid; gap: 14px }
@media (min-width: 980px) { .v-table { grid-template-columns: 1fr 1fr } }
.grp h2 { margin: 0; padding: 12px 14px; font-size: 17px; background: var(--head); border-bottom: 1px solid var(--line) }
.st { width: 100%; border-collapse: collapse; table-layout: auto }
.st th { font-size: 12px; font-weight: 500; color: var(--mut); padding: 8px 2px; text-align: center }
.st td { padding: 9px 2px; text-align: center; border-top: 1px solid var(--line); font-size: 14px }
.st th.cl, .st td.cl { text-align: left; width: 100% }
.st .pos { width: 26px; padding-left: 10px; color: var(--mut) }
.st td.pos { color: var(--ink); font-weight: 600 }
.st tr.adv td.pos { box-shadow: inset 3px 0 0 var(--adv) }
.st .mvh { width: 32px; min-width: 32px }
.st .pts { font-weight: 700; padding-right: 8px } .st th.pts { color: var(--ink) }
.st td:not(.cl):not(.pos):not(.mvh) { min-width: 22px }
.tn { display: flex; align-items: center; gap: 7px; min-width: 0 }
.tn .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46vw }
.lot { font-size: 11px; color: var(--acc); border: 1px solid var(--acc); border-radius: 8px; padding: 0 5px; white-space: nowrap }
.note { padding: 8px 14px 12px; font-size: 13px; color: var(--acc) }
.st .fm { display: none; white-space: nowrap; padding-right: 12px }
@media (min-width: 640px) { .st .fm { display: table-cell } }
.f { display: inline-block; width: 16px; height: 16px; border-radius: 50%; margin-left: 3px; vertical-align: middle; position: relative }
.f.w { background: var(--win) } .f.d { background: var(--draw) } .f.l { background: var(--lose) }
.f.w::after { content: ''; position: absolute; left: 5px; top: 3px; width: 4px; height: 7px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) }
.f.d::after { content: ''; position: absolute; left: 4px; top: 7px; width: 8px; height: 2px; background: #fff }
.f.l::after { content: '×'; position: absolute; inset: 0; color: #fff; font: 700 13px/16px system-ui; text-align: center }
/* стрілка зміни місця */
.mv { display: inline-flex; align-items: center; gap: 1px; font-size: 11px; font-weight: 700 }
.mv i { width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent }
.mv.up { color: var(--win) } .mv.up i { border-bottom: 7px solid var(--win) }
.mv.dn { color: var(--lose) } .mv.dn i { border-top: 7px solid var(--lose) }
.mv.eq i { width: 8px; height: 2px; border: 0; background: #c3c7cc }
.emb { width: 24px; height: 24px; flex: none; display: inline-flex; align-items: center; justify-content: center }
.emb img { max-width: 100%; max-height: 100%; object-fit: contain }
.emb.none { background: #d5d8dc; border-radius: 3px 3px 45% 45%; width: 18px; height: 21px; margin: 0 3px }

/* ── матчі ── */
.tour { margin-bottom: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; scroll-margin-top: 110px }
.tour .th { display: flex; justify-content: space-between; padding: 11px 14px; background: var(--head); border-bottom: 1px solid var(--line); font-weight: 600 }
.tour .tm { color: var(--mut); font-weight: 500 }
.mg { display: grid }
@media (min-width: 700px) { .mg { grid-template-columns: 1fr 1fr } .mg .mcard:nth-child(odd) { border-right: 1px solid var(--line) } }
.mcard { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); min-width: 0 }
.teams { flex: 1; min-width: 0; display: grid; gap: 8px; padding-right: 10px; border-right: 1px solid var(--line) }
.tr { display: flex; align-items: center; gap: 9px; min-width: 0; font-size: 15px }
.tr .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.tr .sc { min-width: 18px; text-align: right; font-size: 16px }
.tr .wm { width: 0; height: 0; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-right: 6px solid transparent; flex: none }
.tr.win .wm { border-right-color: var(--ink) }
.tr.lose { color: var(--soft) }
.rc { width: 9px; height: 12px; background: var(--lose); border-radius: 1px; flex: none }
.ph { color: var(--soft); font-size: 14px } .ph .sh { display: none }
@media (max-width: 600px) { .ph .lg { display: none } .ph .sh { display: inline } }
.ms { width: 104px; flex: none; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px }
.ms .stt { font-size: 14px } .ms .stt b { font-size: 16px }
.ms .pen { font-size: 12px; font-weight: 600 }
.ms .where { font-size: 12px; color: var(--mut); display: flex; flex-direction: column; line-height: 1.3 }
.lv { color: var(--acc); font-weight: 700 }

/* ── сітка ── */
.champ { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-left: 4px solid #e0a800; border-radius: 10px; padding: 12px 14px; margin-bottom: 12px }
.champ .emb { width: 40px; height: 40px } .champ small { display: block; color: var(--mut) } .champ b { font-size: 18px }
.brw { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px 10px }
.br { position: relative; display: grid; grid-template-columns: repeat(var(--cols), minmax(158px, 1fr)); column-gap: 30px; min-width: calc(var(--cols) * 170px) }
.bh { text-align: center; font-size: 14px; font-weight: 600; padding-bottom: 10px }
.bc { display: flex; flex-direction: column; justify-content: space-around; gap: 14px; position: relative; z-index: 1 }
.b3 { margin-top: 22px; position: relative; z-index: 1 }
.bx { border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 6px 8px }
.br-r { display: flex; align-items: center; gap: 7px; padding: 4px 0; min-width: 0 }
.br-r .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px }
.br-r .sc { font-size: 15px; white-space: nowrap } .br-r .sc small { font-size: 12px; font-weight: 500; margin-left: 2px; color: var(--mut) }
.br-r.lose { color: var(--soft) }
.bx .bt { font-size: 11px; color: var(--mut); text-align: center; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px }
svg.lines { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 0; overflow: visible }
svg.lines path { fill: none; stroke: #c9cdd2; stroke-width: 1.5 }

@media (max-width: 380px) { main, .hd, .tabs { padding-left: 12px; padding-right: 12px } .st .pos { padding-left: 6px } .ms { width: 88px } }
