/* ─────────────────────────────────────────────────────────────────────────
   ЭКО — вёрстка на одной единице (ДНК Сашо): --unit = 100vmin/160 (портрет /64).
   Ни одного px. Одна ось адаптива — orientation. Семантические теги = сетка.
   Тема на переменных; шрифт — системный, без внешних зависимостей (правило 4.09).
   ───────────────────────────────────────────────────────────────────────── */
:root { --unit: calc(100vmin / 160); }
@media (orientation: portrait) { :root { --unit: calc(100vmin / 64); } * { scrollbar-width: none; } *::-webkit-scrollbar { display: none; } }
:root {
  --pixel: calc(var(--unit) * .1); --min-unit: calc(var(--unit) * .2); --half-unit: calc(var(--unit) * .5);
  --1unit: var(--unit); --1-5unit: calc(var(--unit) * 1.5); --2unit: calc(var(--unit) * 2); --2-5unit: calc(var(--unit) * 2.5);
  --3unit: calc(var(--unit) * 3); --3-5unit: calc(var(--unit) * 3.5); --4unit: calc(var(--unit) * 4); --5unit: calc(var(--unit) * 5);
  --6unit: calc(var(--unit) * 6); --8unit: calc(var(--unit) * 8); --10unit: calc(var(--unit) * 10); --15unit: calc(var(--unit) * 15);
}
html {
  --bg: #fff; --bg-header: rgba(255,255,255,.92); --bg-t: rgba(255,255,255,.06); --bg-t1: rgba(255,255,255,.3);
  --accent: #00226b; --accent2: #0d83f2; --accent0: #bfa069; --accentother: rgba(255,255,255,.92);
  --accent-t: #00226b08; --accent-t1: #00226b30; --accent-t2: #00226b80;
  --accent2-t: #0d83f206; --accent2-t1: #0d83f230; --accent2-t2: #0d83f280;
  --accent0-t1: #bfa06930;
  --text: #00226b; --text-light: #2050b8; --text-2: #000; --text-2-t: rgba(0,0,0,.6); --text-2-light: #969696; --text-accent: #fff;
  --green1: #2B8D24A0; --red: #791b1460;
  --textSize: calc(3.9 * var(--unit)); --citeSize: var(--3unit); --opacity: .9;
  color-scheme: light;
}
html[data-theme='dark'] {
  --bg: #000618; --bg-header: #000618C0; --bg-t: #00061808; --bg-t1: rgba(255,255,255,.1);
  --accent: #ffffffC0; --accent2: #3d9cf5A0; --accentother: rgba(255,255,255,.82);
  --accent-t: #ffffff26; --accent-t1: #ffffff50; --accent-t2: #ffffff90;
  --accent2-t: #3d9cf508; --accent2-t1: #3d9cf530; --accent2-t2: #3d9cf580;
  --text: #9ebdff; --text-light: hsl(221 70% 62%); --text-2: rgba(255,255,255,.6); --text-2-t: rgba(255,255,255,.4); --text-2-light: rgba(150,150,150,.9); --text-accent: #000;
  --opacity: .8; color-scheme: dark;
}
@media (prefers-color-scheme: dark) { html:not([data-theme='light']) {
  --bg: #000618; --bg-header: #000618C0; --bg-t: #00061808; --bg-t1: rgba(255,255,255,.1);
  --accent: #ffffffC0; --accent2: #3d9cf5A0; --accentother: rgba(255,255,255,.82);
  --accent-t: #ffffff26; --accent-t1: #ffffff50; --accent-t2: #ffffff90;
  --accent2-t: #3d9cf508; --accent2-t1: #3d9cf530; --accent2-t2: #3d9cf580;
  --text: #9ebdff; --text-light: hsl(221 70% 62%); --text-2: rgba(255,255,255,.6); --text-2-t: rgba(255,255,255,.4); --text-2-light: rgba(150,150,150,.9); --text-accent: #000;
  --opacity: .8; color-scheme: dark; } }
html[data-text='big'] { --textSize: var(--4unit); --citeSize: calc(3.2 * var(--unit)); }
html[data-text='small'] { --textSize: var(--2unit); --citeSize: calc(1.6 * var(--unit)); }
@media (orientation: portrait) { html { --textSize: calc(3 * var(--unit)); } }

* { box-sizing: border-box; margin: 0; padding: 0; outline-color: var(--accent-t1);
    font-family: Verdana, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
    transition: opacity .6s ease, background-color .2s ease, color .2s ease, transform .2s ease-in-out; scroll-behavior: smooth; }
main, article, aside, footer, header, nav, section { display: flex; }
a { color: var(--accent2); text-decoration: none; } a:hover { text-decoration: underline; }
.none { display: none !important; }
img, video, iframe { opacity: var(--opacity); max-width: 100%; }
mark { background: var(--accent0); color: #000; padding: 0 var(--half-unit); }

body { color: var(--text-2); background: var(--bg); font-size: var(--textSize); line-height: 1;
  overflow-x: hidden; width: 100vw; min-height: 100vh; display: flex; flex-direction: column;
  padding-top: calc(19 * var(--1unit)); padding-right: var(--4unit); }

/* ── nav: fixed сверху, блюр, толстая синяя кромка ── */
nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; background: var(--bg-header);
  box-shadow: 0 0 var(--4unit) var(--text-2-t); backdrop-filter: blur(var(--2unit)); -webkit-backdrop-filter: blur(var(--2unit));
  border-bottom: var(--3unit) solid var(--accent2); outline: var(--2unit) solid var(--accentother); flex-direction: column; }
nav > #nav_header { flex-direction: row; align-items: stretch; }
nav > #nav_header > a { display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--text); }
nav > #nav_header > a:hover { text-decoration: none; background: var(--accent-t); }
nav > #nav_header > a.logoicon { flex: 0 0 auto; padding: var(--1unit); }
nav > #nav_header > a.logoicon > img { width: calc(var(--unit) * 12); height: calc(var(--unit) * 12); border-radius: var(--1unit); }
nav > #nav_header > a.logodescr { flex: 7; align-items: flex-start; padding: var(--2unit) var(--1unit); }
.logotitle { font-size: var(--4unit); font-weight: 600; letter-spacing: var(--pixel); line-height: 1.2; color: var(--accent); }
.logosubtitle { font-size: var(--3unit); line-height: 1.4; color: var(--accent); }
nav > #nav_header > a.tool { flex: 1; width: calc(var(--unit) * 20); max-width: calc(var(--unit) * 20); padding: var(--1unit); overflow: hidden; cursor: pointer; }
nav > #nav_header > a.tool > svg { fill: none; stroke: var(--text); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; width: var(--8unit); height: var(--8unit); }
nav > #nav_header > a.tool > span { font-size: calc(2.2 * var(--1unit)); white-space: nowrap; overflow: hidden; width: 100%; text-align: center; }
nav > #nav_header > a.tool.marked { background: var(--accent-t); }
#hot { display: none; } #hot.marked { display: flex; background: var(--accent2-t1); }

/* ── форма записи и поиск (внутри nav, как у Сашо) ── */
.write-wrapper { flex-direction: column; padding: var(--2unit); gap: var(--1unit); }
.write-body { display: flex; flex-direction: column; border: var(--pixel) solid var(--accent2-t1); gap: var(--1unit); padding: var(--1unit); }
.write-body select, .write-body input, #q { font-size: var(--3-5unit); padding: var(--1unit) var(--2unit); border: var(--pixel) solid var(--accent-t1); background: var(--bg-header); color: var(--text); }
#write_area { resize: none; padding: var(--3unit); border: none; border-left: calc(4 * var(--pixel)) solid transparent; background: var(--bg-header); color: var(--text-2);
  font-size: var(--textSize); min-height: 10vh; max-height: 50vh; overflow-y: auto; }
#write_area:focus { border-left-color: var(--accent2); background: var(--accent2-t); outline: none; }
.writebuttons { display: flex; flex-wrap: wrap; gap: var(--2unit); align-items: center; font-size: var(--3unit); color: var(--text-2-light); }
.button { padding: var(--1-5unit) var(--4unit); background: var(--accent2); color: var(--text-accent); font-size: var(--3-5unit); font-weight: 500; text-align: center; cursor: pointer; }
.button.light { background: var(--accent-t1); color: var(--text); }
.button:hover { text-decoration: none; filter: brightness(1.1); }
.write-top { display: flex; flex-wrap: wrap; gap: var(--1unit); font-size: var(--3unit); }
.write-top a.reply { padding: var(--half-unit) var(--2unit); background: var(--accent2-t1); }

/* ── aside: ящик справа, класс withaside сдвигает остальное ── */
aside { position: fixed; right: 0; top: calc(var(--1unit) * 17.8); bottom: 0; width: calc(var(--1unit) * 48); z-index: 100;
  background: var(--bg-header); border-left: var(--pixel) solid var(--accent2-t1); display: none; flex-direction: column; overflow-y: auto; }
aside.withaside { display: flex; }
aside > a, aside > div > a { text-align: right; font-size: var(--3unit); color: var(--accent); padding: var(--1-5unit) var(--2-5unit); cursor: pointer; display: block; }
aside > a:hover, aside > div > a:hover { background: var(--accent2); color: var(--text-accent); text-decoration: none; }
aside > div > a.on { background: var(--accent2-t1); font-weight: 600; }
aside > div > a .n { color: var(--text-2-light); font-size: var(--2-5unit); padding-left: var(--1unit); }
aside > span.menudelimeter { height: var(--pixel); border-bottom: var(--pixel) solid var(--accent2-t1); }
aside > span.menutitle { text-align: right; font-size: var(--3-5unit); color: var(--accent); padding: var(--1-5unit) var(--2-5unit); background: var(--accent2-t); }
aside > span.menuspace { padding-bottom: var(--10unit); }
#gotop.withaside, header.withaside, main.withaside, footer.withaside { margin-right: calc(var(--1unit) * 48); }

header { flex-direction: column; }
.netstate { font-size: var(--2-5unit); color: var(--text-2-light); padding: var(--1unit) var(--2unit); }
.netstate.off { color: var(--red); }

/* ── лента: article = .top (цитаты) / .main / .bottom ── */
main { flex-direction: column; margin: 0; }
article { font-weight: 500; line-height: 1.3; border-bottom: var(--pixel) solid var(--text-light); margin: var(--unit); padding: var(--2unit);
  width: calc(100% - var(--2unit)); flex-direction: column; }
main > article:first-child { border-top: var(--half-unit) solid var(--accent2); }
main > article.new > .bottom > a:first-child { padding-right: var(--8unit); background: var(--accent2-t1); }
main > article.pending { border-left: var(--half-unit) solid var(--accent0); }
article > .top { display: flex; flex-direction: column; margin-bottom: var(--3unit); }
article > .top > a { font-size: var(--3unit); color: var(--accent-t2); }
article > .main { text-align: justify; overflow: hidden; line-height: 1.518; overflow-wrap: anywhere; }
article > .main.replytome { color: var(--accent2); }
article > .main .title { font-weight: 600; color: var(--text); display: block; margin-bottom: var(--1unit); }
article > .bottom { font-size: var(--3unit); font-weight: 400; color: var(--text-2); margin-top: var(--4unit); margin-bottom: var(--2unit); position: relative; display: flex; flex-wrap: wrap; align-items: baseline; }
article > .bottom > a.nick { font-size: var(--3unit); font-weight: 700; }
article > .bottom > .badge { margin-left: auto; font-size: var(--2-5unit); padding: 0 var(--2unit); background: var(--accent2-t1); color: var(--text); }
article > .bottom > .badge.kind { background: var(--accent0-t1); margin-left: var(--1unit); }
span.separator::before { content: "::"; color: var(--text); padding: 0 var(--2unit); }
.empty { color: var(--text-2-light); text-align: center; padding: var(--15unit) var(--4unit); }

/* ── подвал: лоадер, «ещё раньше», gotop ── */
footer { padding-top: var(--5unit); padding-bottom: var(--15unit); text-align: center; flex-direction: column; align-items: center; gap: var(--2unit); }
footer > svg#loader { max-height: calc(20 * var(--1unit)); width: calc(30 * var(--1unit)); }
footer > a#more { font-size: var(--3-5unit); padding: var(--2unit) var(--6unit); border: var(--pixel) solid var(--accent2-t1); }
#gotop { z-index: 100; position: fixed; right: 0; bottom: 0; background: var(--bg-t); backdrop-filter: blur(var(--2unit)); border: var(--min-unit) solid var(--accent2-t1); padding: var(--2unit); cursor: pointer; }
#gotop > svg { stroke: var(--accent2); stroke-width: 4; fill: none; width: var(--6unit); height: var(--4unit); }
#gotop:hover { background: var(--accent2); } #gotop:hover > svg { stroke: var(--text-accent); }

/* ── оверлей «Да/Нет» ── */
#over { position: fixed; z-index: 999; inset: 0; display: flex; flex-direction: column; background: #020310A0; backdrop-filter: blur(var(--2unit)); }
#over-form { display: flex; flex-direction: column; background: var(--bg); width: min(100%, calc(var(--1unit) * 128)); max-height: 30%; margin: auto; }
#over-title { flex: 2; font-weight: 500; text-align: center; padding: var(--15unit) var(--4unit) var(--4unit); }
#over-buttons { flex: 1; display: flex; padding: var(--4unit) var(--4unit) var(--15unit); } #over-buttons a { flex: 1; margin: var(--4unit); }

/* ── портрет: aside на весь экран, контент прячется, инструменты сжаты ── */
@media (orientation: portrait) {
  body { padding-top: calc(11 * var(--1unit)); padding-right: 0; }
  nav { padding: var(--1unit) var(--1unit) 0; border-bottom: var(--1-5unit) solid var(--accent2); outline: var(--half-unit) solid var(--accentother); }
  nav > #nav_header > a.logodescr { display: none; }
  nav > #nav_header > a.logoicon > img { width: var(--8unit); height: var(--8unit); }
  nav > #nav_header > a.tool { width: calc(var(--unit) * 12); max-width: calc(var(--unit) * 12); }
  nav > #nav_header > a.tool > svg { width: calc(var(--unit) * 4.5); height: calc(var(--unit) * 4.5); stroke-width: 1; }
  nav > #nav_header > a.tool > span { font-size: var(--1-5unit); margin-top: var(--1unit); }
  aside { left: 0; width: auto; top: calc(var(--1unit) * 11.3); border-left: none; }
  #gotop.withaside, header.withaside, main.withaside, footer.withaside { display: none; }
  article { width: 100%; margin: 0; margin-top: var(--1unit); padding: var(--half-unit); border-bottom: var(--half-unit) solid var(--accent2); line-height: 1; }
  article > .main { line-height: 1.4; text-align: left; }
  article > .top > a { font-size: var(--2unit); } article > .bottom, article > .bottom > a.nick { font-size: var(--2-5unit); }
  span.separator::before { padding: 0 var(--unit); }
}

/* ── v0.2: форма под постом (режим «мп»), смайлы, админка ── */
.write-wrapper.under { margin: var(--unit); margin-top: 0; border: var(--pixel) solid var(--accent2-t1); border-left: var(--half-unit) solid var(--accent2); background: var(--bg-header); width: calc(100% - var(--2unit)); }
.write-row { display: flex; gap: var(--1unit); align-items: center; flex-wrap: wrap; }
.write-row > select, .write-row > input { flex: 0 1 auto; }
.write-note { font-size: var(--2-5unit); color: var(--text-2-light); }
.smiles { display: flex; flex-direction: column; border: var(--pixel) solid var(--accent2-t1); background: var(--bg); max-height: 40vh; }
.smiles-tabs { display: flex; gap: var(--1unit); padding: var(--1unit); border-bottom: var(--pixel) solid var(--accent2-t1); }
.smiles-tabs a { font-size: var(--2-5unit); padding: var(--half-unit) var(--2unit); background: var(--accent-t); }
.smiles-tabs a.on { background: var(--accent2); color: var(--text-accent); }
.smiles-grid { display: flex; flex-wrap: wrap; gap: var(--half-unit); padding: var(--1unit); overflow-y: auto; align-items: center; min-height: var(--15unit); }
.smiles-grid a { display: inline-flex; padding: var(--half-unit); } .smiles-grid a:hover { background: var(--accent2-t1); }
.smiles-grid img { height: var(--6unit); width: auto; opacity: 1; }
.smiles-group { width: 100%; font-size: var(--2-5unit); color: var(--text-2-light); padding-top: var(--1unit); }
img.smile { height: var(--5unit); width: auto; vertical-align: middle; opacity: 1; }
article > .main img[src*="/smiles/"] { height: var(--5unit); width: auto; vertical-align: middle; }
article.hidden-1 { opacity: .6; border-left: var(--half-unit) solid var(--red); }
article.hidden-2 { opacity: .4; border-left: var(--half-unit) solid #000; }
.admin { display: flex; flex-direction: column; gap: var(--2unit); padding: var(--2unit); font-size: var(--3unit); width: 100%; overflow-x: auto; }
.admin h2 { font-size: var(--3-5unit); color: var(--accent); font-weight: 600; }
.admin table { border-collapse: collapse; width: 100%; font-family: "Courier New", Courier, monospace; }
.admin th, .admin td { border: var(--pixel) solid var(--accent2-t1); padding: var(--half-unit) var(--1unit); text-align: left; vertical-align: top; }
.admin th { background: var(--accent2-t1); color: var(--text); }
.admin tr.banned td, .admin tr.st-1 td { color: var(--text-2-light); } .admin tr.st-2 td { text-decoration: line-through; }
.admin select { font-size: var(--2-5unit); background: var(--bg-header); color: var(--text); border: var(--pixel) solid var(--accent-t1); }
aside i { font-style: normal; color: var(--accent0); }

/* ── 0.3–0.6: личка, визитка, контакты ── */
.chats { display: flex; flex-direction: column; width: 100%; }
/* ── голосования: карточка с полосками, как табло у Сашо ── */
article.poll > .main { text-align: left; }
article.poll .ptitle { font-weight: 600; color: var(--text); display: block; margin-bottom: var(--2unit); }
article.poll .opt { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--1unit) var(--2unit); align-items: center; font-size: var(--3-5unit); font-weight: 400; margin: var(--half-unit) 0; }
article.poll .opt .bar { grid-column: 1 / -1; height: var(--1-5unit); background: var(--accent2-t1); position: relative; }
article.poll .opt .bar > i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent2); }
article.poll .opt.top .bar > i { background: var(--accent0); }
article.poll .opt .n { color: var(--text-2-light); font-size: var(--3unit); white-space: nowrap; }
article.kino > .main { text-align: left; } article.kino .knote { color: var(--text-2-light); font-size: var(--3unit); margin-top: var(--1unit); }
.kinohead { padding: 0 var(--3unit) var(--2unit); font-size: var(--3unit); color: var(--text-2-light); }
.polltabs { display: flex; flex-wrap: wrap; gap: var(--1unit); padding: var(--2unit) var(--3unit); font-size: var(--3unit); }
.polltabs a { padding: var(--half-unit) var(--2unit); background: var(--accent-t); } .polltabs a.on { background: var(--accent2); color: var(--text-accent); }
.polltabs a .n { color: var(--text-2-light); font-size: var(--2-5unit); padding-left: var(--1unit); } .polltabs a.on .n { color: var(--text-accent); }
/* ── статистика: каталог, досье, правки ── */
.statfilters { display: flex; flex-wrap: wrap; gap: var(--1unit); padding: var(--2unit) var(--3unit); font-size: var(--3unit); align-items: center; }
.statfilters select, .statfilters input { font-size: var(--3unit); padding: var(--half-unit) var(--2unit); border: var(--pixel) solid var(--accent-t1); background: var(--bg-header); color: var(--text); }
.matchrow { display: grid; grid-template-columns: calc(var(--unit) * 20) 1fr auto; gap: var(--2unit); align-items: baseline; padding: var(--1-5unit) var(--3unit); border-bottom: var(--pixel) solid var(--accent2-t1); font-size: var(--3-5unit); color: var(--text-2); }
.matchrow:hover { background: var(--accent2-t); text-decoration: none; }
.matchrow .d { color: var(--text-2-light); font-size: var(--3unit); } .matchrow .sc { font-weight: 700; color: var(--accent); } .matchrow .pr { font-size: var(--2-5unit); color: var(--accent0); }
.dossier { display: flex; flex-direction: column; padding: var(--2unit) var(--3unit); gap: var(--2unit); width: 100%; }
.dossier h2 { font-size: var(--5unit); color: var(--accent); font-weight: 600; }
.dossier .meta { color: var(--text-2-light); font-size: var(--3unit); }
.dossier .score { font-size: var(--8unit); font-weight: 700; color: var(--accent); }
.dossier .events { display: flex; flex-direction: column; gap: var(--half-unit); font-size: var(--3-5unit); }
.dossier .ev { display: grid; grid-template-columns: calc(var(--unit) * 8) calc(var(--unit) * 6) 1fr; gap: var(--2unit); }
.dossier .ev .m { color: var(--accent2); text-align: right; font-weight: 600; } .dossier .ev.away { direction: rtl; } .dossier .ev.away > * { direction: ltr; }
.dossier .ev .ic { text-align: center; } .dossier .sect { font-weight: 600; color: var(--text); border-bottom: var(--pixel) solid var(--accent2-t1); padding-bottom: var(--1unit); margin-top: var(--2unit); }
.dossier .source { border-left: var(--min-unit) solid var(--accent2-t1); padding: var(--1unit) var(--2unit); margin: var(--1unit) 0; font-size: var(--3unit); }
.dossier .source .a { color: var(--accent2); font-weight: 600; }
.dossier .source img { max-height: 60vh; width: auto; margin: var(--1unit) 0; } .dossier .source br + br { display: none; }
.dnote { width: 100%; font-size: var(--3unit); color: var(--text-2-light); padding-bottom: var(--1unit); }
.digest { display: flex; gap: var(--2unit); flex-wrap: wrap; align-items: flex-start; }
.dwin { flex: 1 1 calc(33% - var(--2unit)); min-width: calc(var(--unit) * 80); border: var(--pixel) solid var(--accent2-t1); max-height: 60vh; overflow-y: auto; }
.dwin .dwt { position: sticky; top: 0; background: var(--accent2-t1); color: var(--text); font-weight: 600; padding: var(--1unit) var(--2unit); font-size: var(--3unit); }
.dpost { padding: var(--1unit) var(--2unit); border-bottom: var(--pixel) solid var(--accent2-t0); font-size: var(--3unit); }
.dpost .a { color: var(--accent2); font-weight: 600; } .dpost .d { color: var(--text-2-light); }
@media (orientation: portrait) { .dwin { flex: 1 1 100%; } }
.prop { border: var(--pixel) solid var(--accent0); border-left: var(--half-unit) solid var(--accent0); padding: var(--2unit); margin: var(--1unit) 0; }
.prop .h { display: flex; flex-wrap: wrap; gap: var(--1unit); align-items: baseline; font-size: var(--3unit); }
.prop .field { font-weight: 600; color: var(--accent); } .prop .att { margin-left: auto; font-size: var(--3unit); }
.prop .att b { color: var(--accent0); } .prop .who { color: var(--accent2); font-weight: 600; }
.srchbox { padding: var(--2unit) var(--3unit); } .srchbox input { width: 100%; font-size: var(--4unit); padding: var(--1-5unit) var(--3unit); border: var(--pixel) solid var(--accent2-t1); background: var(--bg-header); color: var(--text); }
.srchres { padding: 0 var(--3unit) var(--3unit); } .srchres .grp { margin-top: var(--2unit); } .srchres .grp .t { font-weight: 600; color: var(--accent); font-size: var(--3unit); border-bottom: var(--pixel) solid var(--accent2-t1); }
.srchres a.item { display: flex; gap: var(--2unit); align-items: baseline; padding: var(--1unit) var(--1unit); border-bottom: var(--pixel) solid var(--accent2-t0); color: var(--text-2); font-size: var(--3-5unit); } .srchres a.item:hover { background: var(--accent2-t); text-decoration: none; }
.srchres a.item .n { margin-left: auto; color: var(--text-2-light); font-size: var(--3unit); }
.card { padding: var(--2unit) var(--3unit); display: flex; flex-direction: column; gap: var(--2unit); width: 100%; }
.card h2 { font-size: var(--5unit); color: var(--accent); font-weight: 600; }
.card .balance { display: flex; gap: var(--3unit); flex-wrap: wrap; font-size: var(--4unit); }
.card .balance b { color: var(--accent); } .card .balance .w { color: var(--green1); } .card .balance .l { color: var(--red); }
.card table { border-collapse: collapse; font-family: "Courier New", monospace; font-size: var(--3unit); } .card th, .card td { border: var(--pixel) solid var(--accent2-t1); padding: var(--half-unit) var(--2unit); text-align: right; } .card th { background: var(--accent2-t1); color: var(--text); } .card td:first-child, .card th:first-child { text-align: left; }
.card .opps { display: flex; flex-wrap: wrap; gap: var(--1unit); } .card .opps a { padding: var(--half-unit) var(--2unit); background: var(--accent-t); font-size: var(--3unit); } .card .opps a:hover { background: var(--accent2-t1); }
.card .sect { font-weight: 600; color: var(--text); border-bottom: var(--pixel) solid var(--accent2-t1); padding-bottom: var(--1unit); }
/* ── аналитика: вкладки, таблица розыгрыша, рекорды, серии ── */
.atabs { display: flex; flex-wrap: wrap; gap: var(--1unit); font-size: var(--3-5unit); border-bottom: var(--pixel) solid var(--accent2-t1); }
.atabs a { padding: var(--1unit) var(--3unit); color: var(--text-2); } .atabs a.on { background: var(--accent2); color: var(--text-accent); font-weight: 600; } .atabs a:hover { background: var(--accent2-t1); text-decoration: none; }
.card .statfilters { padding: 0; } .card .statfilters.rules label { display: inline-flex; align-items: center; gap: var(--1unit); } .card .statfilters .lbl { color: var(--text-2-light); }
.card .statfilters input[type=number] { width: calc(var(--unit) * 14); }
.rnote { font-size: var(--3unit); color: var(--text-2-light); line-height: 1.3; }
.rulesbox { width: 100%; font-size: var(--3unit); } .rulesbox summary { cursor: pointer; color: var(--accent2); padding: var(--half-unit) 0; } .rulesbox[open] summary { margin-bottom: var(--1unit); } .rulesbox .rnote { margin-top: var(--1unit); }
.tblwrap { width: 100%; overflow-x: auto; }
.card table.standings { width: 100%; font-family: inherit; font-size: var(--3-5unit); } .card table.standings td, .card table.standings th { padding: var(--1unit) var(--1-5unit); white-space: nowrap; }
.card table.standings tr.me td { background: var(--accent0-t1); }
@media (orientation: portrait) { .card table.standings { font-size: var(--2-5unit); } .card table.standings td, .card table.standings th { padding: var(--half-unit) var(--1unit); }
  .card table.standings .per, .card table.standings .form, .card table.standings td small, .card table.standings th:nth-last-child(-n+2), .card table.standings td:nth-child(7), .card table.standings th:nth-child(7), .card table.standings td:nth-child(8), .card table.standings th:nth-child(8) { display: none; }
  .card table.standings .city { display: block; font-size: var(--2unit); } }
.card table.standings td:nth-child(2), .card table.standings th:nth-child(2) { text-align: left; }
.card table.standings td small { color: var(--text-2-light); font-size: var(--2-5unit); }
.card .city { color: var(--text-2-light); font-size: var(--2-5unit); } .card .per { color: var(--text-2-light); font-size: var(--2-5unit); white-space: nowrap; }
.card .flag { color: var(--accent0); cursor: help; padding-left: var(--half-unit); } .card .flags { font-size: var(--3unit); color: var(--text-2-light); line-height: 1.4; } .card .flags b { color: var(--text); }
.form { display: inline-flex; gap: var(--min-unit); } .form i, .form a { display: inline-block; min-width: var(--3-5unit); text-align: center; font-style: normal; font-size: var(--2-5unit); color: var(--text-accent); background: var(--text-2-light); padding: 0 var(--half-unit); }
.form .w { background: #2B8D24; } .form .l { background: #a83a2f; } .form .d { background: var(--text-2-light); }
.form.big { flex-wrap: wrap; gap: var(--1unit); } .form.big a { font-size: var(--3-5unit); padding: var(--1unit) var(--2unit); font-weight: 600; } .form.big a:hover { text-decoration: none; opacity: .8; }
.card .two { display: flex; gap: var(--3unit); width: 100%; align-items: flex-start; } .card .two > div { flex: 1 1 50%; min-width: 0; display: flex; flex-direction: column; gap: var(--1unit); }
@media (orientation: portrait) { .card .two { flex-direction: column; } .card .two > div { flex: 1 1 100%; } }
.card .two .matchrow { grid-template-columns: calc(var(--unit) * 22) 1fr auto; padding: var(--1unit) var(--1unit); font-size: var(--3unit); } .card .two .matchrow .d { white-space: nowrap; }
.card .balance .l { color: #c0473a; }
.bars { display: flex; flex-direction: column; gap: var(--half-unit); font-size: var(--3unit); }
.bars .bar { display: grid; grid-template-columns: calc(var(--unit) * 12) 1fr calc(var(--unit) * 12); align-items: center; gap: var(--1unit); }
.bars .bar i { display: block; height: var(--2-5unit); background: var(--accent2); min-width: var(--pixel); } .bars .bar:first-child i { background: var(--accent0); }
.bars .bar .n { color: var(--text-2-light); } .bars .bar .l { color: var(--text); font-weight: 600; text-align: right; }
.kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(var(--unit) * 70), 1fr)); gap: var(--3unit); width: 100%; }
.kind { border: var(--pixel) solid var(--accent2-t1); padding: var(--1-5unit) var(--2unit); font-size: var(--3unit); }
.kind .kt { font-weight: 600; color: var(--accent); border-bottom: var(--pixel) solid var(--accent2-t1); padding-bottom: var(--half-unit); margin-bottom: var(--1unit); }
.kind .ke { display: grid; grid-template-columns: var(--4unit) 1fr auto var(--5unit); gap: var(--1unit); align-items: baseline; padding: var(--half-unit) 0; }
.kind .ke .i { color: var(--text-2-light); } .kind .ke b { color: var(--accent); text-align: right; } .kind .ke .per { grid-column: 2 / -1; }
.srchbox.small { padding: 0; width: 100%; } .srchbox.small input { font-size: var(--3-5unit); padding: var(--1unit) var(--2unit); } .srchbox.small .srchres { padding: 0; }
.card b.gold { color: var(--accent0); } .card b.medal { color: var(--accent2); }
.card .sect small { color: var(--text-2-light); font-weight: 400; font-size: var(--2-5unit); }
.h2h { display: grid; grid-template-columns: 1fr auto 1fr; gap: var(--2unit); align-items: center; font-size: var(--5unit); text-align: center; }
.h2h .mid { font-size: var(--3unit); color: var(--text-2-light); } .h2h .aw { color: var(--green1); } .h2h .bw { color: var(--red); }
.chats > a { display: flex; align-items: baseline; gap: var(--2unit); padding: var(--2unit) var(--3unit); border-bottom: var(--pixel) solid var(--accent2-t1); color: var(--text-2); }
.chats > a:hover { background: var(--accent2-t); text-decoration: none; }
.chats > a .t { font-weight: 600; color: var(--text); } .chats > a .last { color: var(--text-2-light); font-size: var(--3unit); flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.chats > a .unread { background: var(--accent2); color: var(--text-accent); font-size: var(--2-5unit); padding: 0 var(--1-5unit); }
.chats > a .kind { font-size: var(--2-5unit); color: var(--accent0); }
.chattools { display: flex; flex-wrap: wrap; gap: var(--2unit); padding: var(--2unit) var(--3unit); align-items: center; font-size: var(--3unit); }
.chattools input, .chattools textarea { font-size: var(--3unit); padding: var(--1unit) var(--2unit); border: var(--pixel) solid var(--accent-t1); background: var(--bg-header); color: var(--text); min-width: calc(var(--unit) * 40); }
.card-box { font-family: "Courier New", Courier, monospace; font-size: var(--2-5unit); word-break: break-all; background: var(--accent-t); border: var(--pixel) solid var(--accent2-t1); padding: var(--2unit); margin: var(--2unit) var(--3unit); user-select: all; }
article.msg.mine { border-left: var(--half-unit) solid var(--accent2); }
article.msg.pending { opacity: .6; }
article.msg > .bottom > .badge.ok { background: var(--green1); }
#mailcount { color: var(--accent0); }

/* ── кино v2: карточки с превью, запись, форма, медиа, загрузка, лайтбокс ── */
article.kino .kthumb { float: right; width: var(--15unit); height: calc(var(--15unit) * .66); object-fit: cover; margin: 0 0 var(--1unit) var(--2unit); border: var(--pixel) solid var(--accent2-t1); }
article.kino .title { cursor: pointer; }
.polltabs a.kord, .polltabs a.kadd { margin-left: auto; } .polltabs a.kadd { background: var(--accent2); color: var(--text-accent); margin-left: var(--1unit); }
.kstorage { position: relative; margin: 0 var(--3unit) var(--2unit); height: var(--4unit); background: var(--accent2-t1); font-size: var(--2-5unit); color: var(--text-2-light); }
.kstorage > i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent2-t2); } .kstorage > span { position: relative; padding: 0 var(--2unit); line-height: var(--4unit); white-space: nowrap; overflow: hidden; display: block; }
.kitem { flex-direction: column; gap: var(--2unit); padding: var(--3unit); width: 100%; }
.kitem h2 { font-size: calc(var(--textSize) * 1.3); color: var(--text); font-weight: 600; } .kitem h3 { font-size: var(--3-5unit); color: var(--accent); font-weight: 600; margin-top: var(--3unit); }
.kitem.hidden-1 { opacity: .6; } .kcrumbs, .kmeta { font-size: var(--3unit); color: var(--text-2-light); } .kcrumbs { display: flex; flex-wrap: wrap; gap: var(--1unit); align-items: center; }
.kepisode { line-height: 1.5; } .ktools { display: flex; flex-wrap: wrap; gap: var(--2unit); align-items: center; font-size: var(--3unit); }
.kform { display: flex; flex-direction: column; gap: var(--1-5unit); border: var(--pixel) solid var(--accent2-t1); border-left: var(--half-unit) solid var(--accent2); padding: var(--2unit); background: var(--bg-header); }
.kform label { display: flex; flex-direction: column; gap: var(--half-unit); font-size: var(--2-5unit); color: var(--text-2-light); flex: 1; }
.kform input, .kform select, .kform textarea, .klinkform input, #kcaption { font-size: var(--3-5unit); padding: var(--1unit) var(--2unit); border: var(--pixel) solid var(--accent-t1); background: var(--bg); color: var(--text-2); font-family: inherit; }
.krow { display: flex; flex-wrap: wrap; gap: var(--2unit); align-items: flex-end; } .krow > label { min-width: var(--15unit); }
.klinks { list-style: none; display: flex; flex-direction: column; gap: var(--1unit); font-size: var(--3-5unit); } .klinks li a[data-act] { font-size: var(--3unit); }
.kembed:not(:empty) { margin: var(--1unit) 0; } .kembed iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; }
.klinkform input[name=url] { flex: 3; min-width: var(--15unit); } .klinkform input[name=title] { flex: 1; }
.kmedia { display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(var(--15unit) * 2.4), 1fr)); gap: var(--2unit); width: 100%; }
.km { display: flex; flex-direction: column; gap: var(--half-unit); border: var(--pixel) solid var(--accent2-t1); padding: var(--1unit); background: var(--bg-header); }
.km.vid, .km.aud { grid-column: 1 / -1; } .km img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; cursor: zoom-in; } .km video { width: 100%; max-height: 70vh; background: #000; } .km.hid { opacity: .5; }
.mcap { display: flex; justify-content: space-between; gap: var(--1unit); font-size: var(--2-5unit); color: var(--text-2-light); flex-wrap: wrap; } .mcap .n { white-space: nowrap; }
.kupload { display: flex; flex-wrap: wrap; gap: var(--2unit); align-items: center; } .kupload #kcaption { flex: 1; min-width: var(--15unit); }
#kprogress { width: 100%; display: flex; flex-direction: column; gap: var(--half-unit); font-size: var(--2-5unit); } .kprow { position: relative; padding: var(--half-unit) var(--1unit); background: var(--accent2-t); } .kprow i { position: absolute; left: 0; bottom: 0; height: var(--half-unit); background: var(--accent2); } .kprow .err { color: var(--red); }
.lightbox { position: fixed; inset: 0; z-index: 998; background: #000618E6; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--2unit); cursor: zoom-out; }
.lightbox img { max-width: 96vw; max-height: 88vh; object-fit: contain; opacity: 1; }
@media (orientation: portrait) { article.kino .kthumb { width: var(--10unit); height: var(--8unit); } .kmedia { grid-template-columns: 1fr 1fr; } .polltabs a.kord, .polltabs a.kadd { margin-left: 0; } }

/* ── выжимка по матчу + перепрыжка в реку ── */
.summary { display: flex; flex-direction: column; gap: var(--1-5unit); border-left: var(--half-unit) solid var(--accent0); padding: var(--2unit); margin: var(--2unit) 0; background: var(--accent0-t1); width: 100%; }
.summary .stitle { font-weight: 600; color: var(--text); } .summary .stext { line-height: 1.5; }
.summary .theses { padding-left: var(--4unit); display: flex; flex-direction: column; gap: var(--1unit); line-height: 1.4; }
.summary .refs a.jump, .dpost a.d { font-size: var(--2-5unit); padding: 0 var(--1unit); background: var(--accent2-t1); white-space: nowrap; }
main > article.jump { outline: var(--half-unit) solid var(--accent0); background: var(--accent0-t1); }
