/* Movelike · «Табло»: графит, один лаймовый акцент, цифры моноширинным, как на турнирном табло. Шаг 4px, одна кривая движения. */
:root {
  color-scheme: dark;
  --bg0: #0b0c0b; --bg: #101110; --card: #161816; --raised: #1f221f;
  --line: rgba(232, 236, 226, .08); --line2: rgba(232, 236, 226, .15);
  --ink: #eceee6; --ink2: #a3a89c; --ink3: #858a7e;
  --acc: #c8f169; --acc-ink: #d6f78e; --on-acc: #121a04;
  --pos: #5fd38d; --neg: #ff6159; --draw: #6e736a;
  --s1: #5b9cf0; --s2: #f07a3c; --s3: #2fbf8a; --s4: #e0a91c; --cell0: #1b1d1a;
  --sq-l: #e9ecdf; --sq-d: #7f9472; --sq-ink-l: #6c8160; --sq-ink-d: #eef1e6;
  --hl: rgba(200, 241, 105, .5);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --r-ctl: 10px; --r-card: 16px;
  --font: "Onest", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Unbounded", "Onest", ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Consolas, monospace;
  --hdr: 60px; --tab: 0px;
}
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
  --bg0: #eceee8; --bg: #f5f6f1; --card: #ffffff; --raised: #eceee6;
  --line: rgba(20, 24, 16, .09); --line2: rgba(20, 24, 16, .16);
  --ink: #14170f; --ink2: #4b5145; --ink3: #666c60;
  --acc: #3f6212; --acc-ink: #365314; --on-acc: #ffffff;
  --pos: #15803d; --neg: #dc2626; --draw: #9a9f95;
  --s1: #2a78d6; --s2: #e5612b; --s3: #16a06d; --s4: #c98a00; --cell0: #eef0ea;
    --hl: rgba(150, 200, 40, .45);
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.45 var(--font); -webkit-font-smoothing: antialiased; min-height: 100dvh; display: flex; flex-direction: column; }
main { flex: 1; }
a { color: var(--ink); text-decoration-color: var(--line2); text-underline-offset: 3px; transition: color .15s var(--ease), text-decoration-color .15s var(--ease); }
a:hover { text-decoration-color: currentColor; }
h1, h2, h3 { font-weight: 500; margin: 0; letter-spacing: 0; }
h1 { font: 500 clamp(26px, 4vw, 34px)/1.12 var(--display); letter-spacing: -.02em; }
h2 { font-size: 20px; line-height: 1.3; }
h3 { font-size: 14px; color: var(--ink2); font-weight: 500; margin-bottom: 12px; }
p { margin: 0; }
img { display: block; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--ink2); }
.small { font-size: 13px; }
.center { text-align: center; }
.mt { margin-top: 24px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; border-radius: 4px; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }

/* шапка */
.top { position: sticky; top: 0; z-index: 30; height: var(--hdr); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 24px; height: 100%; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 16px; text-decoration: none; letter-spacing: -.01em; }
.logo svg { width: 20px; height: 20px; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: var(--r-ctl); text-decoration: none; color: var(--ink2); font-size: 14px; transition: background-color .15s var(--ease), color .15s var(--ease); }
.nav a:hover { color: var(--ink); background: var(--raised); }
.nav a.on { color: var(--ink); background: var(--raised); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); }
.plan-tag { font: 500 11px/1 var(--mono); color: var(--acc-ink); }
#lang { height: 32px; background: transparent; color: var(--ink2); border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 0 8px; font: 500 12px var(--mono); }

/* кнопки, поля */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: var(--r-ctl); border: 1px solid var(--line2); background: var(--raised); color: var(--ink); font: 500 14px var(--font); cursor: pointer; text-decoration: none; white-space: nowrap; transition: background-color .15s var(--ease), border-color .15s var(--ease), transform .12s var(--ease), opacity .15s; }
.btn:hover { border-color: var(--ink3); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--acc); border-color: transparent; color: var(--on-acc); }
.btn.primary:hover { background: var(--acc-ink); }
.btn.wide { width: 100%; }
input, select { font: 400 15px var(--font); color: var(--ink); }
input[type=email], input:not([type]), input[type=text] { height: 44px; padding: 0 14px; border-radius: var(--r-ctl); border: 1px solid var(--line2); background: var(--card); transition: border-color .15s var(--ease); min-width: 0; }
input:focus { outline: none; border-color: var(--acc); }
.form-err { color: var(--neg); font-size: 13px; margin-top: 8px; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-ctl); border: 1px solid transparent; background: transparent; color: var(--ink2); cursor: pointer; font: 500 16px var(--font); transition: background-color .15s var(--ease), color .15s var(--ease); }
.icon-btn:hover { background: var(--raised); color: var(--ink); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn.armed, .del.armed { color: var(--neg); background: color-mix(in srgb, var(--neg) 12%, transparent); width: auto; padding: 0 8px; font-size: 12px; }
.chip { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--line); font-size: 13px; text-decoration: none; color: var(--ink2); transition: color .15s var(--ease), border-color .15s var(--ease); }
.chip:hover { color: var(--ink); border-color: var(--line2); }
.tog { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink2); cursor: pointer; }
.tog input { accent-color: var(--acc); width: 16px; height: 16px; }
.pc-ico { display: inline-block; width: 20px; height: 20px; vertical-align: -5px; margin-right: 6px; }

/* карточки */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 20px; }
.sec { margin: 48px 0 16px; }
.page-h { margin: 40px 0 24px; display: grid; gap: 8px; }
.empty { padding: 64px 0; text-align: center; display: grid; gap: 12px; justify-items: center; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0 20px; }
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.cols2.tight { margin-top: 0; gap: 32px; }
.cols-main { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 12px; margin-top: 12px; align-items: start; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 20px; display: grid; gap: 4px; align-content: start; }
.stat-v { font-size: 28px; line-height: 1.1; font-weight: 500; }
.stat-l { font-size: 14px; color: var(--ink2); }
.stat-s { font-size: 12px; color: var(--ink3); font-family: var(--mono); }
.prog { height: 4px; border-radius: 2px; background: var(--raised); overflow: hidden; }
.prog span { display: block; height: 100%; width: 0; background: var(--acc); transition: width .3s var(--ease); }
.load { margin: 24px 0; display: grid; gap: 12px; }
.load-row { display: flex; justify-content: space-between; font-size: 14px; color: var(--ink2); }
.scroll-x { overflow-x: auto; }

/* подсказка */
.tip { position: fixed; z-index: 100; pointer-events: none; max-width: 260px; padding: 8px 10px; border-radius: 8px; background: var(--raised); border: 1px solid var(--line2); color: var(--ink); font-size: 13px; line-height: 1.45; opacity: 0; transform: translateY(4px); transition: opacity .16s var(--ease), transform .16s var(--ease); box-shadow: 0 8px 24px rgba(0, 0, 0, .2); }
.tip.on { opacity: 1; transform: none; }
.tip b { font-family: var(--mono); font-weight: 500; }
.sw { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }

/* главная */
.hero { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 48px; align-items: center; min-height: calc(100dvh - var(--hdr) - 80px); padding-top: 32px; padding-bottom: 48px; }
.hero h1 { font-size: 56px; line-height: 1.04; letter-spacing: -.03em; font-weight: 500; max-width: 12em; }
.lead { font-size: 18px; line-height: 1.55; color: var(--ink2); margin: 20px 0 32px; max-width: 34rem; }
.search { display: flex; gap: 8px; max-width: 480px; }
.search input { flex: 1; font-family: var(--mono); height: 48px; }
.search .btn { height: 48px; }
.recent { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 20px; font-size: 13px; }
.demo { display: grid; grid-template-columns: minmax(0, 1fr) 184px; gap: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 16px; }
.demo-board .board { border-radius: 8px; }
.demo-side { display: flex; flex-direction: column; gap: 16px; padding: 4px; }
.demo-h { display: grid; gap: 4px; font-size: 13px; }
.demo-h .mono { font-size: 18px; color: var(--ink); min-height: 24px; }
.demo-stats { margin: 0; display: grid; gap: 2px; }
.demo-stats div { display: flex; justify-content: space-between; align-items: center; height: 36px; border-bottom: 1px solid var(--line); font-size: 14px; }
.demo-stats dt { color: var(--ink2); }
.demo-stats dd { margin: 0; font-size: 16px; display: flex; align-items: center; }
.demo-stats dd .pc-ico { margin: 0; }
.demo-side > p { margin-top: auto; }
.feats { display: grid; border-top: 1px solid var(--line); margin-bottom: 64px; }
.feat-row { display: grid; grid-template-columns: 64px minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; padding: 32px 0; border-bottom: 1px solid var(--line); align-items: start; }
.feat-row p { color: var(--ink2); margin-top: 8px; max-width: 36rem; }
.feat-n { color: var(--acc-ink); font-size: 14px; padding-top: 4px; }
.feat-ex { color: var(--ink2); font-size: 14px; justify-self: end; padding-top: 4px; text-align: right; }

/* статистика */
.phead { display: flex; align-items: center; gap: 16px; margin: 32px 0 24px; flex-wrap: wrap; }
.ph-av { width: 64px; height: 64px; border-radius: 14px; background: var(--raised); object-fit: cover; display: grid; place-items: center; }
.ph-av img { width: 44px; }
.sk { animation: none; }
.ph-main { display: grid; gap: 4px; min-width: 0; }
.ph-main h1 { font-size: 28px; }
.ph-r { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.rt { display: grid; padding: 8px 14px; border: 1px solid var(--line); border-radius: 10px; min-width: 88px; }
.rt-l { font-size: 12px; color: var(--ink2); }
.rt-v { font-size: 20px; }
.rt-b { font-size: 11px; color: var(--ink3); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; position: sticky; top: var(--hdr); z-index: 5; padding: 12px 0; background: var(--bg); border-bottom: 1px solid var(--line); }
.seg { display: inline-flex; padding: 2px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); }
.seg button { height: 30px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--ink2); font: 500 13px var(--font); cursor: pointer; display: inline-flex; align-items: center; transition: background-color .15s var(--ease), color .15s var(--ease); }
.seg button .pc-ico { margin: 0; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--raised); color: var(--ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); }
.filters select { height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); padding: 0 10px; font-size: 13px; }
.wide-res { margin-top: 12px; display: grid; gap: 16px; }
.res-split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.res-split > div { display: grid; grid-template-columns: 72px 1fr 48px; gap: 12px; align-items: center; font-size: 14px; }
.wdl { display: flex; height: 8px; gap: 2px; border-radius: 4px; overflow: hidden; min-width: 60px; }
.wdl.big { height: 12px; border-radius: 6px; }
.wdl span { min-width: 2px; }
.wdl .w, .wdl-legend .w { background: var(--pos); }
.wdl .d, .wdl-legend .d { background: var(--draw); }
.wdl .l, .wdl-legend .l { background: var(--neg); }
.wdl-legend { display: flex; gap: 20px; font-size: 13px; color: var(--ink2); margin-top: -4px; }
.wdl-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.bars { display: grid; gap: 4px; }
.bar-row { display: grid; grid-template-columns: minmax(96px, 38%) 1fr auto; gap: 12px; align-items: center; min-height: 28px; font-size: 14px; }
.bar-label { color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; }
.bar-track { height: 8px; background: var(--raised); border-radius: 4px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--s1); border-radius: 0 4px 4px 0; }
.bar-val { font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; min-width: 40px; }
.bar-val small { color: var(--ink3); margin-left: 6px; font-size: 12px; }
.bars.q .bar-row:nth-child(1) .bar-fill { background: #26c2a3; }
.bars.q .bar-row:nth-child(2) .bar-fill { background: var(--s1); }
.bars.q .bar-row:nth-child(3) .bar-fill { background: var(--pos); }
.bars.q .bar-row:nth-child(4) .bar-fill { background: var(--ink3); }
.bars.q .bar-row:nth-child(5) .bar-fill { background: var(--s4); }
.bars.q .bar-row:nth-child(6) .bar-fill { background: var(--s2); }
.bars.q .bar-row:nth-child(7) .bar-fill { background: var(--neg); }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-weight: 500; color: var(--ink2); font-size: 12px; padding: 0 8px 8px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 0 8px; height: 40px; border-bottom: 1px solid var(--line); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: color-mix(in srgb, var(--raised) 60%, transparent); }
.tbl .r { text-align: right; }
.tbl td small { color: var(--ink3); font-size: 11px; margin-left: 6px; }
.wdl-col { width: 30%; }
.ptbl th:first-child { min-width: 120px; }
.ptbl tbody th { display: flex; align-items: center; height: 40px; border-bottom: 1px solid var(--line); padding: 0 8px; font-size: 14px; color: var(--ink); font-weight: 400; }
.ptbl td { white-space: nowrap; }
.ptbl .tot th, .ptbl .tot td { border-top: 1px solid var(--line2); color: var(--ink2); }
.kv { display: grid; gap: 0; }
.kv > div { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 40px; border-bottom: 1px solid var(--line); font-size: 14px; }
.kv > div:last-child { border-bottom: 0; }
.kv span { color: var(--ink2); }
.kv b { font-weight: 500; text-align: right; }
.kv.two { grid-template-columns: 1fr 1fr; column-gap: 32px; }
.kv.two > div:nth-last-child(2) { border-bottom: 0; }
.cmx { border-collapse: separate; border-spacing: 2px; width: 100%; font: 500 13px var(--mono); }
.cmx th { font: 500 12px var(--font); color: var(--ink2); padding: 4px; text-align: center; }
.cmx th .pc-ico { margin: 0 auto; }
.cmx tbody th .pc-ico { margin: 0; }
.cmx-corner { text-align: left !important; font-size: 11px !important; color: var(--ink3) !important; }
.cmx td { height: 40px; text-align: center; border-radius: 4px; color: var(--ink); }
.cmx td.dk-t { color: #0e1a2b; }
.cmx td.lt-t { color: #fff; }
.cmx td.r { background: none; text-align: right; color: var(--ink2); }
.portrait { margin-top: 12px; }
.portrait h2 { margin-bottom: 20px; }
.trait { display: grid; gap: 6px; margin-bottom: 16px; }
.trait-h { display: flex; justify-content: space-between; font-size: 14px; }
.meter { height: 6px; border-radius: 3px; background: var(--raised); overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--acc); border-radius: 3px; }
.facts { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; font-size: 15px; }
.facts li { padding-left: 16px; position: relative; color: var(--ink); line-height: 1.5; }
.facts li::before { content: ""; position: absolute; left: 0; top: 9px; width: 6px; height: 6px; border-radius: 1px; background: var(--acc); }
.lc { position: relative; }
.lc svg { width: 100%; height: 300px; display: block; overflow: visible; }
.lc .grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.lc .ax { fill: var(--ink3); font: 11px var(--mono); }
.lc .ln { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.lc .xh { stroke: var(--line2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.lc .dot { stroke: var(--card); stroke-width: 2; vector-effect: non-scaling-stroke; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; color: var(--ink2); margin-top: 12px; }
.legend i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.legend b { color: var(--ink); font-weight: 500; margin-left: 4px; }
.heat-grid { display: grid; grid-template-columns: 28px repeat(24, 1fr); gap: 2px; }
.heat-h, .heat-d { font: 11px var(--mono); color: var(--ink3); }
.heat-d { display: flex; align-items: center; }
.heat-c { aspect-ratio: 1; border-radius: 3px; }
.heat-scale { display: flex; align-items: center; gap: 8px; margin-top: 12px; font: 11px var(--mono); color: var(--ink3); }
.heat-ramp { width: 120px; height: 6px; border-radius: 3px; background: linear-gradient(90deg, #172436, #3d80d1, #9ec5f4); }
@media (prefers-color-scheme: light) { .heat-ramp { background: linear-gradient(90deg, #cde2fb, #2a78d6, #0d366b); } }
.cols { display: flex; align-items: flex-end; gap: 2px; height: 180px; }
.col { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.col span { width: 100%; background: var(--s1); border-radius: 3px 3px 0 0; min-height: 2px; }
.col:hover span { background: var(--acc); }
.cols-ax { display: flex; justify-content: space-between; font: 11px var(--mono); color: var(--ink3); margin-top: 8px; }
.bheat { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; margin-top: 16px; max-width: 420px; }
.bheat span { aspect-ratio: 1; border-radius: 3px; }
.sq-wrap .card:last-child { display: flex; align-items: center; }
.more summary { cursor: pointer; color: var(--ink2); font-size: 14px; }
.more[open] summary { margin-bottom: 16px; }
.sf-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.sf-head p { color: var(--ink2); max-width: 44rem; }
#sfProg { margin: 16px 0; display: grid; gap: 8px; }
#sfOut:not(:empty) { margin-top: 20px; display: grid; gap: 12px; }
#sfOut .cols2 { margin: 0; }
.cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 48px 0; }
.cta p { margin-top: 8px; }

/* боты */
.create { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: center; }
.create .search { max-width: none; }
.create #quotaLine { grid-column: 2; margin-top: -12px; }
.bot-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.bot { display: flex; gap: 14px; align-items: center; text-decoration: none; padding: 16px; position: relative; transition: border-color .15s var(--ease), background-color .15s var(--ease); }
.bot:hover { border-color: var(--line2); background: color-mix(in srgb, var(--raised) 50%, var(--card)); }
.bot-av { width: 48px; height: 48px; border-radius: 12px; background: var(--raised); padding: 6px; flex: none; object-fit: cover; }
.bot-av.sm { width: 40px; height: 40px; border-radius: 10px; padding: 4px; }
img.bot-av[src*="chesscomfiles"] { padding: 0; }
.bot-t { display: grid; gap: 2px; min-width: 0; }
.bot-t b { font-weight: 500; }
.bot .del { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; }
.steps { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 4px; }
.steps li { display: grid; grid-template-columns: 20px 1fr auto; gap: 12px; align-items: center; height: 36px; color: var(--ink3); font-size: 14px; }
.steps li.now { color: var(--ink); }
.steps li.done { color: var(--ink2); }
.st-dot { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid currentColor; }
.steps li.now .st-dot { border-color: var(--acc); background: var(--acc); }
.steps li.done .st-dot { background: var(--ink3); border-color: var(--ink3); }
#cbox .btn { margin-top: 16px; }
#cbox > p + p { margin-top: 8px; }

/* аккаунт */
.login { display: grid; gap: 12px; max-width: 440px; }
.login h2 { margin-bottom: -4px; }
.gbtn { height: 44px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--ink3); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.mail-form { display: flex; gap: 8px; }
.mail-form input { flex: 1; }
.mail-form .btn { height: 44px; }
.me { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.me > div:first-child { display: grid; gap: 2px; }
.me-q { display: grid; gap: 2px; margin-left: auto; text-align: right; font-size: 14px; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.plan { display: flex; flex-direction: column; gap: 16px; }
.plan.pick { border-color: color-mix(in srgb, var(--acc) 45%, transparent); }
.plan.cur { background: var(--raised); }
.plan-h { display: flex; justify-content: space-between; align-items: center; }
.plan-h b { font-weight: 500; font-size: 16px; }
.tag { font: 500 11px var(--mono); color: var(--acc-ink); }
.price span { font-size: 32px; }
.price small { color: var(--ink2); margin-left: 6px; font-size: 13px; }
.plan ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 14px; color: var(--ink2); flex: 1; }
.plan li { padding-left: 16px; position: relative; }
.plan li::before { content: ""; position: absolute; left: 0; top: 8px; width: 6px; height: 6px; border-radius: 1px; background: var(--ink3); }
.plans + p { margin-top: 16px; }
#lb .card { display: grid; gap: 12px; }

/* игра — доска на весь экран */
body[data-page=play] #foot { display: none; }
.play { display: grid; grid-template-columns: minmax(0, 1fr) 340px; height: calc(100dvh - var(--hdr)); position: relative; }
.play-area { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 16px; min-width: 0; }
/* две строки игроков по 44px, промежутки и поля — доска с часами целиком влезает в экран */
.play-col { width: min(100%, calc(100dvh - var(--hdr) - 136px)); display: grid; gap: 8px; }
.pl-row { display: flex; justify-content: space-between; align-items: center; height: 44px; }
.who { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; min-width: 0; }
.who-dot { width: 12px; height: 12px; border-radius: 3px; border: 1px solid var(--line2); }
.who-dot.w { background: #f1ede4; } .who-dot.b { background: #2a2622; }
.clock { font-size: 26px; padding: 4px 14px; border-radius: 8px; background: var(--card); border: 1px solid var(--line); color: var(--ink2); min-width: 112px; text-align: right; transition: background-color .15s var(--ease), color .15s var(--ease); }
.clock.on { background: var(--ink); color: var(--bg); border-color: transparent; }
.clock.on.low { background: var(--neg); color: #fff; }
.evalbar { width: 12px; align-self: stretch; margin: 52px 0; border-radius: 6px; background: #2a2622; overflow: hidden; display: flex; flex-direction: column-reverse; }
.evalbar span { display: block; background: #f1ede4; height: 50%; transition: height .4s var(--ease); }
.play-side { border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: var(--bg0); }
.ps-head { padding: 16px; border-bottom: 1px solid var(--line); display: grid; gap: 8px; }
.bot-head { display: flex; align-items: center; gap: 12px; }
.bot-head div { display: grid; }
.bot-head b { font-weight: 500; }
.moves { list-style: none; margin: 0; padding: 8px; overflow-y: auto; flex: 1; min-height: 96px; font-size: 14px; }
.moves li { display: grid; grid-template-columns: 36px 1fr 1fr; height: 30px; align-items: center; }
.moves li:nth-child(odd) { background: color-mix(in srgb, var(--card) 60%, transparent); border-radius: 6px; }
.mn { color: var(--ink3); padding-left: 6px; }
.mv { text-align: left; background: none; border: 0; color: var(--ink); font: inherit; height: 26px; border-radius: 6px; padding: 0 8px; cursor: pointer; display: flex; align-items: center; gap: 4px; }
.mv:hover { background: var(--raised); }
.mv.cur { background: var(--acc); color: var(--on-acc); }
.mv i { font-style: normal; font-size: 12px; }
.mv.c0 i, .g0, .rv-cls.c0 { color: #26c2a3; } .mv.c1 i, .g1, .rv-cls.c1 { color: var(--s1); } .rv-cls.c2 { color: var(--pos); }
.mv.c4 i, .g4, .rv-cls.c4 { color: var(--s4); } .mv.c5 i, .g5, .rv-cls.c5 { color: var(--s2); } .mv.c6 i, .g6, .rv-cls.c6 { color: var(--neg); }
.mv.c0 { box-shadow: inset 0 0 0 1px color-mix(in srgb, #26c2a3 50%, transparent); }
.mv.cur i { color: inherit; }
.ps-ctrl { display: flex; align-items: center; gap: 2px; padding: 8px; border-top: 1px solid var(--line); }
.ps-ctrl .sp { flex: 1; }
.ps-opts { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 12px 16px; border-top: 1px solid var(--line); }
.ps-opts .tog { font-size: 13px; }
#reviewBox:not(:empty) { padding: 12px; border-top: 1px solid var(--line); max-height: 45%; overflow-y: auto; }
.end { display: grid; gap: 8px; padding: 16px; }
.end > b { font-size: 18px; font-weight: 500; }
.end-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.end-btns .btn { height: 36px; padding: 0 12px; }
#reviewOut:not(:empty) { margin-top: 12px; display: grid; gap: 12px; }
.rv td { height: 34px; }
.overlay { position: absolute; inset: 0; z-index: 20; display: none; place-items: center; background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(6px); padding: 16px; }
.overlay.on { display: grid; animation: rise .32s var(--ease); }
.setup { width: min(440px, 100%); display: grid; gap: 12px; padding: 24px; }
.setup h3 { margin: 12px 0 0; }
.tc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tc-grid button, .col-pick button { display: grid; gap: 2px; place-items: center; height: 56px; border-radius: 10px; border: 1px solid var(--line2); background: var(--raised); color: var(--ink); cursor: pointer; font: 500 15px var(--font); transition: border-color .15s var(--ease), background-color .15s var(--ease); }
.tc-grid button small { font-size: 11px; color: var(--ink3); font-weight: 400; }
.tc-grid button.on, .col-pick button.on { border-color: var(--acc); background: color-mix(in srgb, var(--acc) 12%, var(--raised)); }
.col-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.col-pick img { width: 36px; height: 36px; filter: drop-shadow(0 0 1px rgba(255, 255, 255, .55)); }
.col-pick .half { display: flex; }
.col-pick .half img { width: 36px; clip-path: inset(0 50% 0 0); }
.col-pick .half img + img { margin-left: -36px; clip-path: inset(0 0 0 50%); }
.setup .btn.wide { margin-top: 12px; height: 48px; }

/* доска */
.board { position: relative; width: 100%; aspect-ratio: 1; user-select: none; -webkit-user-select: none; touch-action: none; border-radius: 6px; overflow: hidden; box-shadow: 0 1px 0 rgba(255, 255, 255, .04), 0 12px 32px rgba(0, 0, 0, .28); }
.b-sq { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr); }
.b-sq span { position: relative; }
.b-sq .lt { background: var(--sq-l); }
.b-sq .dk { background: var(--sq-d); }
.b-sq span::after, .b-sq span::before { content: ""; position: absolute; pointer-events: none; }
.b-sq .last::after { inset: 0; background: var(--hl); mix-blend-mode: multiply; }
.b-sq .sel::after { inset: 0; background: rgba(170, 220, 60, .62); mix-blend-mode: multiply; }
.b-sq .pre::after { inset: 0; background: rgba(70, 110, 170, .5); }
.b-sq .chk::before { inset: 0; background: radial-gradient(circle, rgba(229, 72, 77, .95) 0%, rgba(229, 72, 77, .55) 35%, rgba(229, 72, 77, 0) 72%); }
.b-sq .dot::before { width: 30%; height: 30%; left: 35%; top: 35%; border-radius: 50%; background: rgba(30, 24, 16, .26); }
.b-sq .cap::before { inset: 0; background: radial-gradient(transparent 0 79%, rgba(30, 24, 16, .26) 80%); }
.b-sq .hov::after { inset: 0; box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .7); }
.b-sq em { position: absolute; font: 600 clamp(8px, 1.4vw, 12px)/1 var(--font); font-style: normal; z-index: 1; pointer-events: none; }
.b-sq .cr { left: 4%; top: 5%; } .b-sq .cf { right: 5%; bottom: 4%; }
.b-sq .lt em { color: var(--sq-ink-l); } .b-sq .dk em { color: var(--sq-ink-d); }
.b-pc { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.pc { position: absolute; left: 0; top: 0; width: 12.5%; height: 12.5%; background-size: 100%; background-repeat: no-repeat; will-change: transform; transition: transform .2s var(--ease), opacity .18s var(--ease); }
.pc.drag { z-index: 10; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .35)); scale: 1.08; cursor: grabbing; }
.pc.drag.touch { scale: 1.5; translate: 0 -12%; }
.b-sq .hov::after { inset: -2px; }
.board:has(.pc.touch) .b-sq .hov::before { inset: -50%; width: auto; height: auto; left: -50%; top: -50%; right: -50%; bottom: -50%; border-radius: 50%; background: rgba(30, 24, 16, .18); z-index: 1; }
.board.view { touch-action: pan-y pinch-zoom; }
.board:not(.view) { cursor: pointer; }
.pc.out { opacity: 0; }
.b-ar { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; }
.b-ar line { stroke: rgba(214, 160, 50, .82); stroke-width: 15; stroke-linecap: round; }
.b-ar circle { fill: none; stroke: rgba(214, 160, 50, .82); stroke-width: 7; }
.b-ar marker path { fill: rgba(214, 160, 50, .82); }
.b-ar .best { stroke: rgba(40, 150, 110, .85); }
.b-promo { position: absolute; inset: 0; z-index: 6; background: rgba(0, 0, 0, .4); }
.pm { position: absolute; width: 12.5%; display: grid; background: var(--card); border-radius: 6px; overflow: hidden; box-shadow: 0 8px 24px rgba(0, 0, 0, .4); }
.pm button { aspect-ratio: 1; border: 0; background-color: var(--card); background-size: 90%; background-position: center; background-repeat: no-repeat; cursor: pointer; transition: background-color .12s var(--ease); }
.pm button:hover { background-color: var(--raised); }

/* подвал */
#foot { border-top: 1px solid var(--line); margin-top: 64px; padding: 32px 0 24px; }
.foot-in { display: grid; grid-template-columns: 1fr auto; gap: 16px 32px; font-size: 14px; }
.foot-in p { margin-top: 4px; }
.foot-links { display: flex; gap: 20px; }
.foot-links a { color: var(--ink2); }
.logo-sm { font-weight: 600; }
.credit { grid-column: 1 / -1; font-size: 12px; color: var(--ink3); }

/* появление страницы */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
main.enter > * { animation: rise .36s var(--ease) both; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0s !important; animation-delay: 0s !important; transition-duration: 0s !important; }
}

/* узкие экраны */
@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; min-height: 0; gap: 32px; padding-top: 48px; }
  .hero h1 { font-size: 44px; }
  .grid4 { grid-template-columns: repeat(2, 1fr); }
  .cols-main, .cols2, .create { grid-template-columns: 1fr; }
  .create #quotaLine { grid-column: 1; margin-top: 0; }
  .bot-grid, .plans { grid-template-columns: 1fr 1fr; }
  .play { grid-template-columns: 1fr; height: auto; }
  .play-area { padding: 8px 0 0; }
  .play-col { width: min(100vw, calc(100dvh - var(--hdr) - 110px)); gap: 4px; }
  .pl-row { padding: 0 12px; height: 40px; }
  .clock { font-size: 22px; min-width: 96px; }
  .play-side { border-left: 0; border-top: 1px solid var(--line); }
  .moves { max-height: 180px; }
  .evalbar { display: none !important; }
  .board { border-radius: 0; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  h1 { font-size: 26px; }
  .hero h1 { font-size: 36px; letter-spacing: -.02em; }
  .lead { font-size: 16px; }
  .search { flex-direction: column; }
  .demo { grid-template-columns: 1fr; }
  .feat-row { grid-template-columns: 1fr; gap: 8px; padding: 24px 0; }
  .feat-ex { justify-self: start; text-align: left; }
  .nav a { padding: 0 8px; font-size: 13px; }
  .top-in { gap: 8px; }
  .logo span { display: none; }
  .grid3, .bot-grid, .plans { grid-template-columns: 1fr; }
  .res-split, .kv.two { grid-template-columns: 1fr; }
  .ph-r { margin-left: 0; }
  .sf-head, .cta { flex-direction: column; align-items: stretch; }
  .mail-form { flex-direction: column; }
  .tc-grid { grid-template-columns: repeat(4, 1fr); }
  .bar-row { grid-template-columns: minmax(80px, 40%) 1fr auto; }
  .foot-in { grid-template-columns: 1fr; }
  .heat-grid { grid-template-columns: 22px repeat(24, 1fr); gap: 1px; }
}

/* аватары, обновление ботов, админка */
img.bot-av.real { padding: 0; }
.lock { position: absolute; top: 12px; right: 12px; font-size: 11px; color: var(--acc-ink); border: 1px solid color-mix(in srgb, var(--acc) 40%, transparent); border-radius: 4px; padding: 2px 6px; }
.bot-act { position: absolute; top: 8px; right: 8px; display: flex; gap: 2px; }
.bot-act .icon-btn { width: 28px; height: 28px; }
.bot-act .icon-btn svg { width: 16px; height: 16px; }
.bot .del { position: static; }
.bot-hdr { grid-template-columns: 56px 1fr; align-items: center; gap: 16px; }
.bot-hdr .bot-av { width: 56px; height: 56px; }
.bot-hdr div { display: grid; gap: 8px; }
.dot-n { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--acc); color: var(--on-acc); font-size: 11px; display: inline-grid; place-items: center; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.link { background: none; border: 0; padding: 0; color: var(--ink); font: inherit; cursor: pointer; text-decoration: underline; text-decoration-color: var(--line2); text-underline-offset: 3px; }
.adm-notes-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.adm-notes-h h3 { margin: 0; }
.notes { list-style: none; margin: 0 0 12px; padding: 0; display: grid; max-height: 320px; overflow-y: auto; }
.notes li { display: grid; gap: 2px; padding: 8px 0 8px 12px; border-bottom: 1px solid var(--line); font-size: 14px; position: relative; }
.notes li.new::before { content: ""; position: absolute; left: 0; top: 14px; width: 6px; height: 6px; border-radius: 50%; background: var(--acc); }
.notes li.k-buy span:last-child { color: var(--pos); }
.notes li.k-cancel span:last-child { color: var(--ink2); }
.grid1 { display: grid; gap: 12px; align-content: start; }
.grant { display: grid; gap: 10px; }
.grant h3 { margin: 0; }
.grant .row { display: flex; gap: 8px; align-items: center; }
.grant select, .grant input[type=number] { height: 40px; border-radius: var(--r-ctl); border: 1px solid var(--line2); background: var(--card); padding: 0 10px; font-size: 14px; }
.grant input[type=number] { width: 90px; font-family: var(--mono); }

/* психология, рейтинг по месяцам, карточка */
.insight { margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: var(--raised); font-size: 14px; line-height: 1.5; }
.dcols { display: flex; gap: 2px; height: 180px; position: relative; }
.dcols::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--line2); }
.dcol { flex: 1; position: relative; }
.dcol span { position: absolute; left: 0; right: 0; border-radius: 3px; }
.dcol .up { bottom: 50%; background: var(--pos); }
.dcol .dn { top: 50%; background: var(--neg); }
.dcols-ax { display: flex; justify-content: space-between; }
.rv-note { line-height: 1.6; }
.share-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 48px; }
.share-row p { margin-top: 8px; }
.share-dlg { position: fixed; z-index: 60; }
.share-box { width: min(1000px, 100%); max-height: calc(100dvh - 32px); overflow: auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; padding: 24px; }
.share-prev canvas { width: 100%; height: auto; border-radius: 12px; display: block; border: 1px solid var(--line); }
.share-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.fact-list { display: grid; gap: 4px; max-height: 420px; overflow-y: auto; }
.fact { display: grid; grid-template-columns: 18px 64px 1fr; gap: 10px; align-items: center; min-height: 40px; padding: 4px 8px; border-radius: 8px; font-size: 14px; cursor: pointer; transition: background-color .15s var(--ease); }
.fact:hover { background: var(--raised); }
.fact input { accent-color: var(--acc); }
.fact .mono { color: var(--acc-ink); text-align: right; }
@media (max-width: 760px) { .share-box { grid-template-columns: 1fr; } .share-row { flex-direction: column; align-items: stretch; } }

/* тарифы */
.plans-page { padding-bottom: 32px; }
.pp-hero { text-align: center; margin: 56px auto 32px; max-width: 720px; display: grid; gap: 4px; justify-items: center; }
.pp-hero h1 { font-size: 44px; line-height: 1.08; letter-spacing: -.025em; }
.pp-hero .lead { margin: 16px 0 0; }
.plans-wrap { display: grid; gap: 20px; }
.period { justify-self: center; display: inline-flex; padding: 3px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.period button { height: 36px; padding: 0 18px; border: 0; border-radius: 9px; background: none; color: var(--ink2); font: 500 14px var(--font); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: background-color .15s var(--ease), color .15s var(--ease); }
.period button.on { background: var(--raised); color: var(--ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); }
.period.sm button { height: 30px; padding: 0 12px; font-size: 13px; }
.save { font-size: 11px; color: var(--on-acc); background: var(--acc); padding: 2px 6px; border-radius: 4px; }
.plans { align-items: stretch; }
.plan { padding: 24px; gap: 14px; position: relative; }
.plan.pick { border-color: color-mix(in srgb, var(--acc) 55%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--acc) 25%, transparent), 0 24px 48px -24px rgba(0, 0, 0, .5); background: linear-gradient(180deg, color-mix(in srgb, var(--acc) 7%, var(--card)), var(--card) 40%); }
.plan .tag { background: color-mix(in srgb, var(--acc) 16%, transparent); padding: 3px 8px; border-radius: 4px; }
.plan .tag.dim { color: var(--ink2); background: var(--raised); }
.plan .price { display: flex; align-items: baseline; gap: 6px; }
.plan .price span { font-size: 44px; line-height: 1; letter-spacing: -.02em; }
.price-sub { font: 400 12px var(--mono); color: var(--ink3); margin-top: -6px; min-height: 16px; }
.price-sub s { opacity: .7; }
.plan ul { gap: 10px; color: var(--ink); align-content: start; }
.plan li { padding-left: 26px; }
.plan li::before { display: none; }
.ck { position: absolute; left: 0; top: 2px; width: 16px; height: 16px; fill: none; stroke: var(--ink3); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.plan li { position: relative; }
.plan.pick .ck, .pw-list .ck { stroke: var(--acc); }
.plan-cur { display: grid; place-items: center; height: 40px; border-radius: var(--r-ctl); border: 1px dashed var(--line2); color: var(--ink2); font-size: 14px; }
.btn.ink { background: var(--ink); color: var(--bg); border-color: transparent; }
.btn.ink:hover { opacity: .9; }
.pl-av { display: flex; height: 44px; }
.pl-sq { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; box-shadow: 0 0 0 3px var(--card); }
.pl-sq + .pl-sq { margin-left: -10px; }
.pl-sq.l { background: var(--sq-l); } .pl-sq.d { background: var(--sq-d); }
.pl-sq img { width: 34px; height: 34px; }
.pl-inf { font-size: 40px; line-height: 44px; height: 44px; color: var(--ink2); }
.trust { text-align: center; font-size: 13px; color: var(--ink2); }
.cmp th, .cmp td { text-align: center; }
.cmp th:first-child, .cmp td:first-child { text-align: left; color: var(--ink2); }
.cmp .hl { background: color-mix(in srgb, var(--acc) 7%, transparent); }
.cmp thead .hl { color: var(--acc-ink); }
.cmp .ck { position: static; vertical-align: middle; stroke: var(--pos); }
.cmp .no { color: var(--ink3); }
.faq { display: grid; gap: 8px; max-width: 760px; }
.faq summary { cursor: pointer; font-weight: 500; list-style-position: outside; }
.faq details[open] summary { margin-bottom: 8px; }
.nav-plus { color: var(--acc-ink) !important; }
.btn.mine { margin-top: 16px; }
.btn.mine .mono { color: var(--ink2); }

/* окно «нужен Plus» */
.pw-dlg, .link-dlg { position: fixed; z-index: 70; }
.pw { width: min(440px, 100%); padding: 28px; display: grid; gap: 14px; position: relative; text-align: left; }
.pw h2 { font-size: 24px; line-height: 1.2; letter-spacing: -.01em; }
.pw-x { position: absolute; top: 12px; right: 12px; }
.pw-vis { display: flex; }
.pw-vis .pl-sq { box-shadow: 0 0 0 3px var(--card); }
.pw-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 15px; }
.pw-list li { position: relative; padding-left: 26px; }
.pw .period { justify-self: start; }
.pw-btns { display: grid; gap: 8px; }
.pw-btns .btn { height: 52px; justify-content: space-between; padding: 0 18px; font-size: 15px; }
.pw .link { justify-self: start; color: var(--ink2); }

/* боты: «создать ещё» */
#createForm .btn.more { background: var(--acc); color: var(--on-acc); }
.upl { color: var(--acc-ink); }
.add-bot { border-style: dashed; border-color: var(--line2); background: transparent; cursor: pointer; text-align: left; font: inherit; color: inherit; width: 100%; }
.add-ic { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-size: 26px; color: var(--acc-ink); background: color-mix(in srgb, var(--acc) 12%, transparent); flex: none; }

/* привязка ника, лимит, темы, юридическое */
.link-box { display: grid; gap: 12px; margin-top: 12px; }
.lb-h { display: flex; align-items: center; gap: 14px; }
.lb-h h3 { margin: 0; color: var(--ink2); }
.lb-h > div { display: grid; gap: 2px; flex: 1; }
.lim { display: grid; gap: 12px; margin-top: 12px; }
.themes { display: flex; flex-wrap: wrap; gap: 6px; }
.themes button { height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line2); background: var(--raised); color: var(--ink); font: 500 13px var(--font); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.themes button.on { border-color: var(--acc); }
.themes i { width: 14px; height: 14px; border-radius: 4px; background: var(--sw); box-shadow: inset 0 0 0 3px var(--sw), inset 0 0 0 7px var(--sa); }
.lock-s { font-size: 10px; color: var(--acc-ink); }
.legal-body { line-height: 1.65; }
.legal-body h2 { font-size: 17px; margin: 20px 0 6px; }
.legal-body p, .legal-body ul { margin: 0 0 10px; color: var(--ink2); }
.legal-nav { margin-top: 16px; }
.co { display: grid; gap: 12px; margin-top: 48px; justify-items: start; }
@media (max-width: 640px) { .pp-hero h1 { font-size: 32px; } .plan .price span { font-size: 38px; } }

/* оплата через Kaspi, обратная связь */
.kreq { display: grid; gap: 4px; border-color: color-mix(in srgb, var(--acc) 40%, transparent); }
.kreq-h { display: flex; align-items: center; gap: 8px; }
.kdot { width: 8px; height: 8px; border-radius: 50%; background: var(--acc); }
.kdot.invoiced { background: var(--pos); }
.k-logo { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink2); }
.k-mark { width: 24px; height: 24px; border-radius: 6px; background: #f14635; color: #fff; display: grid; place-items: center; font: 700 14px var(--font); }
.k-sum { display: flex; align-items: baseline; gap: 8px; }
.k-sum span { font-size: 40px; line-height: 1; letter-spacing: -.02em; }
.k-sum small { color: var(--ink2); }
.k-steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; color: var(--ink2); font-size: 14px; }
.k-phone { display: flex; align-items: center; height: 48px; border: 1px solid var(--line2); border-radius: var(--r-ctl); background: var(--card); padding-left: 14px; margin-bottom: 10px; transition: border-color .15s var(--ease); }
.k-phone:focus-within { border-color: var(--acc); }
.k-phone span { color: var(--ink2); font-size: 16px; }
.k-phone input { border: 0; background: none; height: 46px; flex: 1; font: 400 16px var(--mono); padding: 0 10px; outline: none; }
.kaspi .btn.wide { height: 48px; }
.k-ok { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-size: 24px; color: var(--pos); background: color-mix(in srgb, var(--pos) 14%, transparent); }
.kadm { margin-top: 12px; display: grid; gap: 10px; }
.contact { display: grid; gap: 8px; }
.contact label { font-size: 13px; color: var(--ink2); }
.contact textarea { font: 400 15px var(--font); color: var(--ink); background: var(--card); border: 1px solid var(--line2); border-radius: var(--r-ctl); padding: 12px 14px; resize: vertical; }
.contact textarea:focus { outline: none; border-color: var(--acc); }
.contact .btn { justify-self: start; margin-top: 8px; }

/* ===== выбор темы вручную (Настройки) ===== */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg0: #0b0c0b; --bg: #101110; --card: #161816; --raised: #1f221f;
  --line: rgba(232, 236, 226, .08); --line2: rgba(232, 236, 226, .15);
  --ink: #eceee6; --ink2: #a3a89c; --ink3: #858a7e;
  --acc: #c8f169; --acc-ink: #d6f78e; --on-acc: #121a04;
  --pos: #5fd38d; --neg: #ff6159; --draw: #6e736a;
  --s1: #5b9cf0; --s2: #f07a3c; --s3: #2fbf8a; --s4: #e0a91c; --cell0: #1b1d1a;
  --hl: rgba(200, 241, 105, .5);
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg0: #eceee8; --bg: #f5f6f1; --card: #ffffff; --raised: #eceee6;
  --line: rgba(20, 24, 16, .09); --line2: rgba(20, 24, 16, .16);
  --ink: #14170f; --ink2: #4b5145; --ink3: #666c60;
  --acc: #3f6212; --acc-ink: #365314; --on-acc: #ffffff;
  --pos: #15803d; --neg: #dc2626; --draw: #9a9f95;
  --s1: #2a78d6; --s2: #e5612b; --s3: #16a06d; --s4: #c98a00; --cell0: #eef0ea;
  --hl: rgba(150, 200, 40, .45);
}

/* ===== навигация: пять разделов + аккаунт; на телефоне — нижняя панель ===== */
.nav a svg { display: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.nav2 { display: flex; gap: 4px; }
.nav2 a { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: var(--r-ctl); text-decoration: none; color: var(--ink2); font-size: 14px; }
.nav2 a:hover, .nav2 a.on { color: var(--ink); background: var(--raised); }
@media (max-width: 760px) {
  .nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; margin: 0; height: calc(60px + env(safe-area-inset-bottom)); padding: 4px 4px env(safe-area-inset-bottom); gap: 0;
    background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
  .nav a { flex: 1; flex-direction: column; justify-content: center; gap: 2px; height: 52px; padding: 0; font-size: 11px; border-radius: 10px; }
  .nav a svg { display: block; }
  .nav a.on { background: transparent; box-shadow: none; color: var(--acc-ink); }
  .nav2 { margin-left: auto; }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
}

/* ===== общие мелочи ===== */
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs a { height: 34px; padding: 0 14px; border-radius: var(--r-ctl); display: inline-flex; align-items: center; text-decoration: none; color: var(--ink2); font-size: 14px; white-space: nowrap; border: 1px solid transparent; }
.tabs a.on { color: var(--ink); background: var(--raised); border-color: var(--line); }
.seg.sm button { height: 26px; padding: 0 10px; font-size: 12px; }
.src-seg { margin-bottom: 10px; }
.wide-seg { display: flex; }
.wide-seg button { flex: 1; justify-content: center; }
.tag.ok, .lock.ok { color: var(--pos); }
.ok-t { color: var(--pos); font-weight: 500; } .bad-t { color: var(--neg); font-weight: 500; }
.big { font-size: 32px; line-height: 1.1; }
.btn.ok { border-color: var(--pos); color: var(--pos); } .btn.bad { border-color: var(--neg); color: var(--neg); }
textarea.wide, input.wide { width: 100%; }
textarea { font: 400 14px var(--mono); color: var(--ink); background: var(--card); border: 1px solid var(--line2); border-radius: var(--r-ctl); padding: 12px; resize: vertical; }
input[type=number], select { height: 40px; padding: 0 10px; border-radius: var(--r-ctl); border: 1px solid var(--line2); background: var(--card); }
input[type=range] { accent-color: var(--acc); width: 100%; }
.setup-plan label, .pz-grid label, .set-box label, .duel-set label { display: grid; gap: 6px; font-size: 14px; color: var(--ink2); }
.card.warn { border-color: color-mix(in srgb, var(--s4) 45%, transparent); background: color-mix(in srgb, var(--s4) 7%, var(--card)); display: grid; gap: 6px; }
.pos { color: var(--pos); } .neg { color: var(--neg); }
.tr-ic { width: 48px; height: 48px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--raised); border: 1px solid var(--line); font-size: 15px; color: var(--acc-ink); }
.shake { animation: shake .25s var(--ease); }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* ===== статистика: Зеркало, последние партии, награды ===== */
.topbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 8px 0 20px; }
.st-open { height: 44px; padding: 0 18px; }
.st-ico { width: 14px; height: 18px; border-radius: 3px; background: linear-gradient(90deg, var(--on-acc) 50%, transparent 50%); opacity: .55; border: 1.5px solid var(--on-acc); }
.chk-pill { display: inline-flex; gap: 6px; align-items: center; }
.gl { padding: 4px 8px; }
.gl-row { display: grid; grid-template-columns: 28px 12px minmax(0, 1.2fr) minmax(0, 2fr) 60px auto; gap: 10px; align-items: center; min-height: 48px; text-decoration: none; border-bottom: 1px solid var(--line); padding: 0 8px; border-radius: 8px; }
.gl-row:last-child { border-bottom: 0; }
.gl-row:hover { background: var(--raised); }
.gl-op { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gl-go { font-size: 13px; color: var(--acc-ink); }
.gl-res { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; font: 500 13px var(--mono); background: var(--raised); }
.gl-res.W { background: color-mix(in srgb, var(--pos) 18%, transparent); color: var(--pos); }
.gl-res.L { background: color-mix(in srgb, var(--neg) 16%, transparent); color: var(--neg); }
.gl-row .who-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 1px solid var(--line2); }
.gl-row .who-dot.w { background: #f2f2f2; } .gl-row .who-dot.b { background: #202022; }
.st-badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.badge { display: grid; gap: 4px; padding: 14px; border-radius: 12px; background: var(--raised); border: 1px solid var(--line); font-size: 13px; text-align: left; }
.badge b { font-weight: 500; color: var(--ink); }
.badge span { color: var(--ink2); }
.bg-ic { width: 28px; height: 28px; border-radius: 8px; background: color-mix(in srgb, var(--acc) 22%, transparent); border: 1px solid color-mix(in srgb, var(--acc) 50%, transparent); position: relative; }
.bg-ic::after { content: ""; position: absolute; inset: 8px; border-radius: 2px; background: var(--acc-ink); }
.bg-houdini::after { border-radius: 50%; } .bg-owl::after { border-radius: 50% 50% 2px 2px; } .bg-sniper::after { border-radius: 50%; inset: 10px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--acc) 30%, transparent); }
.bg-streak::after { clip-path: polygon(50% 0, 100% 100%, 0 100%); } .bg-giant::after { clip-path: polygon(0 100%, 50% 0, 100% 100%, 70% 100%, 50% 45%, 30% 100%); }

/* ===== Зеркало (сторис) ===== */
.story { position: fixed; z-index: 60; background: color-mix(in srgb, var(--bg0) 92%, transparent); }
.st-wrap { width: min(440px, 100%); height: min(780px, 100%); display: grid; grid-template-rows: auto 1fr auto; gap: 12px; position: relative; }
.st-dots { display: flex; gap: 3px; padding-right: 40px; }
.st-dots span { flex: 1; height: 3px; border-radius: 2px; background: var(--line2); }
.st-dots span.done { background: var(--ink2); } .st-dots span.on { background: var(--acc); }
.st-x { position: absolute; top: -10px; right: 0; }
.st-card { border-radius: 20px; padding: 32px 28px; background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; gap: 14px; overflow-y: auto; cursor: pointer; user-select: none; animation: rise .3s var(--ease); }
.st-card.brass { background: linear-gradient(160deg, color-mix(in srgb, var(--acc) 22%, var(--card)), var(--card) 70%); }
.st-card.neg { background: linear-gradient(160deg, color-mix(in srgb, var(--neg) 14%, var(--card)), var(--card) 70%); }
.st-card.final { cursor: default; justify-content: flex-start; }
.st-card h2 { font-size: 26px; line-height: 1.2; }
.st-k { font: 500 12px var(--mono); color: var(--acc-ink); }
.st-big { font-size: 72px; line-height: 1; font-weight: 500; letter-spacing: -.02em; }
.st-big.neg { color: var(--neg); }
.st-wdl { display: flex; height: 10px; border-radius: 5px; overflow: hidden; }
.st-wdl .w { background: var(--pos); } .st-wdl .d { background: var(--draw); } .st-wdl .l { background: var(--neg); }
.st-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 15px; }
.st-row b { font-weight: 500; } .st-row.neg span { color: var(--neg); }
.st-spark { width: 100%; height: 100px; }
.st-spark path { fill: none; stroke: var(--acc); stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.st-quiz { display: flex; gap: 8px; }
.st-quiz .btn { flex: 1; height: 52px; font: 500 20px var(--mono); }
.st-piece img { width: 120px; height: 120px; }
.st-sum { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.st-sum div { padding: 12px; border-radius: 12px; background: var(--raised); display: grid; gap: 2px; }
.st-sum span { font-size: 12px; color: var(--ink2); } .st-sum b { font-weight: 500; }
.st-cv { width: 100%; max-width: 220px; aspect-ratio: 9 / 16; border-radius: 12px; border: 1px solid var(--line); align-self: center; }
.st-nav { display: flex; justify-content: space-between; align-items: center; }

/* ===== разбор партии ===== */
.g-head { margin: 24px 0 16px; display: grid; gap: 6px; }
.g-head h1 { font-size: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.g-grid { display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 1fr); gap: 20px; align-items: start; }
.g-board .board { width: 100%; }
.g-graph { margin-top: 8px; }
.g-side { display: grid; gap: 12px; }
.g-side .moves { max-height: 280px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); }
.evalg { width: 100%; height: 110px; display: block; background: #2b2b2e; border-radius: 10px; cursor: pointer; }
.eg-a { fill: #e8e3d8; } .eg-m { stroke: rgba(128, 128, 128, .5); stroke-width: 1; vector-effect: non-scaling-stroke; }
.eg-l { fill: none; stroke: var(--acc); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.eg-c { stroke: var(--acc); stroke-width: 2; vector-effect: non-scaling-stroke; }
.eg-d { stroke: #fff; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.eg-d.c5 { fill: var(--s2); } .eg-d.c6 { fill: var(--neg); } .eg-d.c9 { fill: #b35adb; }
.mv.c9 i, .g9, .rv-cls.c9 { color: #b35adb; } .rv-cls.c7 { color: var(--ink2); } .rv-cls.c8 { color: var(--s3); }
.moments { margin: 0; padding-left: 20px; display: grid; gap: 12px; }
.act { display: grid; gap: 8px; }
.rv-note.card { padding: 12px 14px; font-size: 14px; }

/* ===== задачи ===== */
.pz-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.pz-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.pz { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.pz-b { width: 100%; max-width: 560px; }
.pz-msg { font-weight: 500; min-height: 22px; } .pz-msg.ok { color: var(--pos); } .pz-msg.bad { color: var(--neg); }
.pz-line { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 14px; }
.pz-list { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 2px; max-height: 360px; overflow-y: auto; font-size: 13px; }
.pz-list li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.pz-grid aside .card { display: grid; gap: 12px; }

/* ===== план ===== */
.setup-plan { display: grid; gap: 16px; max-width: 560px; }
.goal { display: flex; align-items: center; gap: 10px; font: 500 18px var(--mono); color: var(--ink); }
.goal input { width: 120px; font: 500 18px var(--mono); }
.plan-head { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.plan-head > div { display: grid; gap: 4px; }
.plan-head b { font-size: 22px; font-weight: 500; }
.route { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 24px; }
.stage { display: grid; gap: 10px; }
.stage h3 { margin: 0; color: var(--acc-ink); font-family: var(--mono); font-size: 12px; }
.step { display: grid; gap: 10px; }
.step.cur { border-color: color-mix(in srgb, var(--acc) 55%, transparent); }
.step.done { opacity: .75; }
.step.locked { opacity: .6; cursor: pointer; }
.step-h { display: flex; align-items: center; gap: 12px; }
.step-h b { flex: 1; font-weight: 500; }
.step-n { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--raised); font-size: 13px; }
.todo { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.todo li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 6px 0 6px 30px; border-bottom: 1px solid var(--line); position: relative; font-size: 14px; }
.todo li:last-child { border-bottom: 0; }
.todo li::before { content: ""; position: absolute; left: 4px; top: 50%; width: 16px; height: 16px; margin-top: -8px; border-radius: 50%; border: 1.5px solid var(--line2); }
.todo li.ok::before { background: var(--pos); border-color: var(--pos); }
.todo li.ok a { color: var(--ink2); }
.cp { align-items: flex-start; } .cp.done { border-color: var(--pos); }
.cp-r { min-width: 56px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--raised); color: var(--acc-ink); font-size: 15px; }

/* ===== тренажёры, уроки ===== */
.tr-safe .card, .tr-coord { display: grid; gap: 12px; max-width: 600px; }
.tr-safe .board, .tr-coord .board { max-width: 520px; }
.tc-h { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.three ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; }
.play-side .three { margin: 8px; padding: 14px; }
.lesson { display: grid; gap: 16px; }
.ls-grid { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 24px; align-items: start; }
.ls-p { margin: 0; padding-left: 20px; display: grid; gap: 10px; line-height: 1.55; }

/* ===== дебюты ===== */
.op-head { display: grid; grid-template-columns: repeat(3, auto) 1fr; align-items: center; gap: 24px; margin-bottom: 12px; }
.op-head > div { display: grid; } .op-head b { font-size: 24px; font-weight: 500; } .op-head .btn { justify-self: end; }
.op-list { list-style: none; margin: 0; padding: 0; display: grid; max-height: 320px; overflow-y: auto; }
.op-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); min-height: 34px; }
.op-b, .op-drill { display: grid; grid-template-columns: minmax(0, 480px) minmax(0, 1fr); gap: 20px; align-items: start; }

/* ===== сегодня, прогресс ===== */
.today-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.tk-h { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; }
.tk-h > div:nth-child(2) { flex: 1; }
.ring-w { position: relative; width: 56px; height: 56px; flex: none; }
.ring { width: 56px; height: 56px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 4; } .ring .r0 { stroke: var(--raised); } .ring .r1 { stroke: var(--acc); stroke-linecap: round; transition: stroke-dasharray .5s var(--ease); }
.ring-t { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; }
.wk { display: flex; gap: 6px; margin-top: 12px; }
.wk span { flex: 1; display: grid; justify-items: center; gap: 4px; font-size: 11px; color: var(--ink3); }
.wk i { width: 100%; max-width: 28px; height: 28px; border-radius: 8px; background: var(--raised); border: 1px solid var(--line); }
.wk span.on i { background: var(--acc); border-color: var(--acc); }
.tilt { margin-bottom: 12px; }
.ladder { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.ladder li { display: grid; grid-template-columns: 56px 1fr auto auto; gap: 12px; align-items: center; padding: 10px 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.ladder li.done { border-color: color-mix(in srgb, var(--pos) 50%, transparent); }
.lad-p { display: flex; gap: 4px; } .lad-p i { width: 10px; height: 10px; border-radius: 50%; background: var(--raised); border: 1px solid var(--line2); } .lad-p i.on { background: var(--pos); border-color: var(--pos); }

/* ===== разведка ===== */
.scout { display: grid; gap: 12px; margin-bottom: 12px; }
.sc-h { display: flex; align-items: center; gap: 16px; }
.sc-h > div:nth-child(2) { flex: 1; display: grid; gap: 6px; }
.sc-s { display: grid; justify-items: end; } .sc-s .mono { font-size: 28px; }
.tips { margin: 0; padding-left: 20px; display: grid; gap: 8px; line-height: 1.5; }
.dossier { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; margin-top: 12px; }
.dz { display: grid; gap: 8px; break-inside: avoid; }
.dz-h { display: flex; justify-content: space-between; gap: 8px; }
@media print { .top, .nav, .nav2, #foot, .prep form, .end-btns, .page-h { display: none !important; } body { background: #fff; color: #000; padding: 0; } .card { border-color: #ccc; background: #fff; } }

/* ===== боты: легенды, дуэли ===== */
.lg-av { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: linear-gradient(160deg, color-mix(in srgb, var(--acc) 35%, var(--raised)), var(--raised)); font: 500 16px var(--mono); color: var(--acc-ink); flex: none; }
.lg-av.sm { width: 32px; height: 32px; font-size: 12px; border-radius: 8px; }
.bot.lg.locked { cursor: pointer; }
.bot.lg.locked .lg-av { filter: grayscale(.8); opacity: .7; }
.duel-set { display: flex; flex-wrap: wrap; align-items: end; gap: 16px; margin-bottom: 16px; }
.duel-grid { display: grid; grid-template-columns: minmax(0, 520px) minmax(0, 1fr); gap: 16px; align-items: start; }
.duel-grid .moves { max-height: 360px; }

/* ===== аккаунт, справка ===== */
.ref-box, .set-box { display: grid; gap: 10px; margin-top: 12px; }
.set-box .seg { justify-self: start; }
.help #hq { height: 48px; }

@media (max-width: 1000px) {
  .g-grid, .pz-grid, .today-grid, .ls-grid, .op-b, .op-drill, .duel-grid { grid-template-columns: 1fr; }
  .gl-row { grid-template-columns: 28px 12px minmax(0, 1fr) auto; }
  .gl-op, .gl-row > .mono { display: none; }
}
@media (max-width: 640px) {
  .plan-head { grid-template-columns: 1fr 1fr; }
  .op-head { grid-template-columns: repeat(3, 1fr); } .op-head .btn { grid-column: 1 / -1; justify-self: stretch; }
  .st-big { font-size: 60px; }
  .st-wrap { height: 100%; }
  .ladder li { grid-template-columns: 48px 1fr auto; } .ladder li .lad-p { display: none; }
}
@media (prefers-reduced-motion: reduce) { .st-card { animation: none; } }

/* ===================== Movelike · «Табло» ===================== */
body { font: 400 16px/1.5 var(--font); }
.logo { font: 600 17px var(--display); letter-spacing: -.02em; gap: 10px; }
.logo svg { width: 24px; height: 24px; }
.kicker { font: 500 12px var(--mono); color: var(--acc-ink); letter-spacing: .02em; margin-bottom: 14px; }
.btn { min-height: 44px; height: auto; border-radius: var(--r-ctl); }
.btn.sm { min-height: 34px; }
.btn.primary { font-weight: 600; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink2); }
.big-btn { width: 100%; min-height: 56px; font-size: 16px; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 48px 0 16px; }
.empty-card { display: grid; gap: 12px; justify-items: start; }
.st-card.brass { background: color-mix(in srgb, var(--acc) 9%, var(--card)); border-color: color-mix(in srgb, var(--acc) 28%, transparent); }
.st-card.neg { background: color-mix(in srgb, var(--neg) 8%, var(--card)); }
.st-big, .price span, .stat-v { font-family: var(--mono); font-weight: 500; letter-spacing: -.03em; }

/* шапка и разделы */
.top { height: var(--hdr); }
.nav { margin-left: auto; }
.nav a { position: relative; height: 36px; font-size: 14px; }
.nav a.on { color: var(--ink); background: var(--raised); }
.nav a.on::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -12px; height: 2px; border-radius: 2px; background: var(--acc); }
.nav .dot-n { position: absolute; top: 2px; right: 2px; }
.nav2 { margin-left: 4px; }
.nav2 .nav-plus { height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--acc) 45%, transparent); font: 600 13px var(--mono); text-decoration: none; display: inline-flex; align-items: center; }
.nav2 .plan-tag { font-size: 12px; padding: 0 4px; }
#foot select { background: transparent; color: var(--ink3); border: 1px solid var(--line); border-radius: 6px; height: 28px; padding: 0 6px; font: 400 12px var(--font); margin-left: 8px; }
@media (max-width: 760px) {
  .nav { height: calc(64px + env(safe-area-inset-bottom)); }
  .nav a { height: 56px; font-size: 11px; gap: 3px; }
  .nav a.on::after { top: 0; bottom: auto; left: 30%; right: 30%; }
  .nav a.on { background: transparent; color: var(--ink); }
  .nav a.on svg { stroke: var(--acc-ink); }
  .nav .dot-n { top: 4px; right: calc(50% - 22px); }
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .logo span { display: inline; }
  .top-in { justify-content: space-between; }
}

/* главная */
.hero { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(32px, 6vw, 80px); min-height: calc(100dvh - var(--hdr) - 40px); padding-block: clamp(32px, 6vw, 72px); }
.hero h1 { font: 600 clamp(2.4rem, 5.6vw, 4.6rem)/1.02 var(--display); letter-spacing: -.035em; max-width: 11ch; }
.lead { font-size: clamp(16px, 1.6vw, 18px); max-width: 40ch; margin: 20px 0 28px; }
.big-search { display: grid; grid-template-columns: 1fr auto; gap: 8px; max-width: 520px; }
.big-search .src-seg { grid-column: 1 / -1; justify-self: start; margin: 0; }
.big-search input { height: 56px; font-size: 18px; padding: 0 18px; border-radius: 14px; }
.big-search .btn { height: 56px; padding: 0 26px; border-radius: 14px; font-size: 16px; }
.mine-btns { margin-top: 16px; }
.demo { display: block; padding: 12px; border-radius: 22px; position: relative; }
.demo-board .board { border-radius: 12px; }
.demo-cap { display: flex; align-items: center; gap: 12px; padding: 14px 6px 4px; flex-wrap: wrap; }
.demo-cap .mono:first-child { font-size: 20px; min-width: 6ch; }
.demo-cap .muted { margin-left: auto; }
.demo-tag { font-size: 13px; padding: 4px 10px; border-radius: 999px; background: var(--acc); color: var(--on-acc); opacity: 0; transform: translateY(4px); transition: opacity .3s var(--ease), transform .3s var(--ease); }
.demo-tag.on { opacity: 1; transform: none; }
.h-list { border-top: 1px solid var(--line); margin-bottom: 72px; }
.h-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) 24px; gap: 16px; align-items: center; padding: 22px 4px; border-bottom: 1px solid var(--line); text-decoration: none; transition: background-color .2s var(--ease); }
.h-row:hover { background: color-mix(in srgb, var(--raised) 55%, transparent); }
.h-row > span:nth-child(2) { display: grid; gap: 2px; }
.h-row b { font: 500 clamp(18px, 2.2vw, 24px)/1.2 var(--display); letter-spacing: -.02em; }
.h-n { color: var(--acc-ink); font-size: 14px; }
.h-ar { width: 22px; height: 22px; fill: none; stroke: var(--ink3); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s var(--ease), stroke .2s; }
.h-row:hover .h-ar, .m-row:hover .h-ar, .course a:hover .h-ar { transform: translateX(4px); stroke: var(--acc-ink); }

/* карточки на странице ника */
.cards-box { margin: 8px 0; }
.cards-h { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.cards-h h2 { font: 600 20px var(--display); letter-spacing: -.02em; }
.cards-h .btn { margin-left: auto; }
.cards { display: grid; grid-auto-flow: column; grid-auto-columns: min(80vw, 300px); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; scrollbar-width: thin; overscroll-behavior-x: contain; }
.cards::-webkit-scrollbar { height: 6px; }
.cards::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 3px; }
.st-card.mini { scroll-snap-align: start; min-height: 320px; padding: 24px 20px; justify-content: flex-start; gap: 12px; overflow: hidden; transition: border-color .2s var(--ease), transform .2s var(--ease); }
.st-card.mini:hover { border-color: var(--line2); }
.st-card.mini:active { transform: scale(.99); }
.st-card.mini h2 { font-size: 20px; }
.st-card.mini .st-big { font-size: 56px; }
.st-card.mini .st-piece img { width: 88px; height: 88px; }
.st-card.mini .st-badges { grid-template-columns: 1fr 1fr; }
.lock-card { background: var(--raised); justify-content: center !important; align-items: flex-start; border-style: dashed; }
.lock-card .st-big { color: var(--acc-ink); }
.topbar .btn { min-height: 44px; }

/* профиль «Я» */
.me-h { display: flex; align-items: center; gap: 12px; }
.plan-chip { font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line2); color: var(--acc-ink); }
.me-main { display: grid; gap: 10px; margin-bottom: 16px; }
.me-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.menu { padding: 4px 0; margin: 12px 0; }
.m-row { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 20px; text-decoration: none; border-bottom: 1px solid var(--line); }
.m-row:last-child { border-bottom: 0; }
.m-row > span:first-child { flex: 1; }
.m-row:hover { background: color-mix(in srgb, var(--raised) 55%, transparent); }
.acc > .card, .acc > details { margin-top: 12px; }
.acc > .btn.wide { margin-top: 12px; }
.more-plans summary { cursor: pointer; color: var(--ink2); font-size: 14px; min-height: 28px; }
.more-plans[open] summary { margin-bottom: 16px; }

/* мои партии, живой разбор */
.last-game { display: grid; gap: 12px; text-decoration: none; margin-bottom: 8px; border-color: color-mix(in srgb, var(--acc) 30%, transparent); }
.lg-t { font-size: 18px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.last-game .btn { justify-self: stretch; }
.scan-card { display: grid; gap: 12px; }
.scan-card .prog { margin-top: 10px; }
.rv-live { margin-top: 12px; align-items: center; }
.brill-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 12px; }
.brill { padding: 10px; display: grid; gap: 10px; cursor: pointer; }
.brill .board { border-radius: 8px; box-shadow: none; }
.brill-t { display: grid; gap: 4px; padding: 0 4px 4px; }
.brill-t b { font-size: 17px; }
.brill-t .g0 { color: #26c2a3; margin-left: 2px; }

/* учёба: блестящие */
.brill-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: end; margin-bottom: 16px; }
.brill-hero h2 { font: 600 clamp(22px, 3vw, 30px)/1.15 var(--display); letter-spacing: -.02em; margin-bottom: 8px; }
.brill-hero .kicker { font-size: 28px; margin-bottom: 8px; }
.course { list-style: none; margin: 0 0 16px; padding: 0; border-top: 1px solid var(--line); }
.course a { display: grid; grid-template-columns: 40px minmax(0, 1fr) 24px; align-items: center; gap: 12px; min-height: 56px; border-bottom: 1px solid var(--line); text-decoration: none; padding: 0 4px; }
.course b { font-weight: 500; }
.missed-card { display: flex; gap: 14px; align-items: center; text-decoration: none; margin-bottom: 12px; }
.ls-cap { margin-top: 8px; min-height: 22px; }
.lesson h2 { font: 600 clamp(22px, 3vw, 28px)/1.15 var(--display); letter-spacing: -.02em; }

/* каталог ботов */
.cat-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.chips button { flex: none; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line2); background: transparent; color: var(--ink2); font: 500 13px var(--font); cursor: pointer; transition: background-color .15s var(--ease), color .15s var(--ease); }
.chips button.on { background: var(--ink); color: var(--bg); border-color: transparent; }
.cat-bar select { height: 36px; border-radius: 999px; }
.st-tag { font-size: 11px; color: var(--ink3); }
.bot.locked { opacity: .82; }

/* установка */
.app-main { display: grid; gap: 16px; }
.steps-ios { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.steps-ios li { display: flex; align-items: center; gap: 14px; min-height: 48px; }
.ios-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--raised); border: 1px solid var(--line); display: grid; place-items: center; flex: none; font-size: 13px; }
.ios-ic svg { width: 20px; height: 20px; fill: none; stroke: var(--acc-ink); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.app-why { margin: 0; padding-left: 18px; color: var(--ink2); display: grid; gap: 6px; }
.apk { margin-top: 12px; display: grid; gap: 12px; }
.apk summary { cursor: pointer; color: var(--ink2); }
.apk[open] summary { margin-bottom: 12px; }
.apk .btn { justify-self: start; }

/* авторы */
.cr-list { padding: 4px 20px; }
.cr { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cr:last-child { border-bottom: 0; }
.cr > div:first-child { display: grid; gap: 2px; }
.cr-r { display: grid; gap: 4px; justify-items: end; text-align: right; flex: none; }

/* телефон: одна колонка, пальцу удобно */
@media (max-width: 640px) {
  .hero { min-height: 0; gap: 28px; padding-top: 24px; }
  .hero h1 { font-size: clamp(2.1rem, 10vw, 2.8rem); }
  .big-search { grid-template-columns: 1fr; }
  .big-search .btn { width: 100%; }
  .h-row { grid-template-columns: 40px minmax(0, 1fr) 20px; padding: 18px 2px; }
  .brill-hero { grid-template-columns: 1fr; }
  .brill-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .brill-t b { font-size: 15px; }
  .brill-t .end-btns .btn { flex: 1; }
  .topbar { display: grid; grid-template-columns: 1fr 1fr; }
  .topbar .btn.primary { grid-column: 1 / -1; }
  .cr { flex-direction: column; }
  .cr-r { justify-items: start; text-align: left; }
  .me-two { grid-template-columns: 1fr; }
  .icon-btn { width: 44px; height: 44px; }
  .ps-ctrl { justify-content: space-between; }
  .g-board .board { border-radius: 0; margin-inline: -16px; width: calc(100% + 32px); }
}

/* отчёт PDF: только статистика */
@media print {
  :root { --bg: #fff; --card: #fff; --raised: #f3f3f3; --ink: #111; --ink2: #444; --ink3: #666; --line: #ddd; --line2: #ccc; color-scheme: light; }
  .top, .nav, #foot, .filters, .topbar, .cards-box, .btn, .icon-btn, .tip, .overlay { display: none !important; }
  body { padding: 0 !important; }
  .card, .stat { break-inside: avoid; }
}

/* размытие у шапки делает её «рамкой» для fixed-панели — на телефоне шапка сплошная, панель внизу экрана */
@media (max-width: 1000px) {
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .hero-vis { max-width: 520px; }
}
@media (max-width: 760px) {
  .top { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }
}
html, body { overflow-x: clip; }
.foot-links { flex-wrap: wrap; gap: 8px 20px; }
.foot-links a { min-height: 32px; display: inline-flex; align-items: center; }
@media (max-width: 640px) { .search input, .mail-form input { flex: none; height: 52px; } .search .btn, .mail-form .btn { width: 100%; } }

/* ===================== телефон: всё как в приложении ===================== */
/* игра: доска на всю ширину, ходы лентой, кнопки внизу экрана, без прокрутки страницы */
@media (max-width: 760px) {
  :root { --hdr: 52px; }
  .logo { font-size: 16px; } .logo svg { width: 22px; height: 22px; }
  .nav2 .nav-plus { height: 30px; }
  body[data-page=play] { padding-bottom: 0; }
  body[data-page=play] .nav { display: none; }
  .play { display: flex; flex-direction: column; height: calc(100dvh - var(--hdr)); overflow: hidden; }
  .play-area { flex: none; padding: 0; }
  .play-col { width: min(100vw, calc(100dvh - var(--hdr) - 220px)); margin: 0 auto; gap: 0; }
  .pl-row { height: 46px; padding: 0 10px; }
  .clock { font-size: 21px; min-width: 88px; padding: 3px 10px; }
  .play .board { border-radius: 0; box-shadow: none; }
  .play-side { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; border: 0; background: var(--bg); }
  .ps-head { order: 1; padding: 8px 12px 0; border: 0; gap: 0; }
  .ps-head .bot-head { display: none; }
  .ps-head #status { min-height: 20px; }
  .moves { order: 0; flex: none; display: flex; align-items: center; gap: 2px; height: 42px; min-height: 0; max-height: none; padding: 0 8px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; border-bottom: 1px solid var(--line); }
  .moves::-webkit-scrollbar { display: none; }
  .moves li { display: flex; flex: none; height: 32px; background: none !important; }
  .moves .mn { padding: 0 2px 0 6px; align-self: center; }
  .moves .mv { height: 32px; padding: 0 6px; white-space: nowrap; }
  #reviewBox { order: 2; } #reviewBox:not(:empty) { max-height: none; border-top: 0; padding: 8px 12px; }
  #helpBox { order: 3; } #helpBox:not(:empty) { padding: 8px 12px; }
  .play-side .three { order: 4; }
  .ps-opts { order: 5; border-top: 0; padding: 8px 12px; }
  .ps-ctrl { order: 9; margin-top: auto; position: sticky; bottom: 0; z-index: 2; background: var(--bg0); padding: 4px 8px calc(4px + env(safe-area-inset-bottom)); justify-content: space-between; }
  .ps-ctrl .icon-btn { width: 48px; height: 48px; }
  .ps-ctrl .sp { display: none; }
  .overlay { overflow-y: auto; place-items: start center; padding: 12px; }
  .setup { padding: 18px; gap: 10px; }
  .tc-grid button, .col-pick button { height: 52px; }
}
/* телефон боком: доска слева на всю высоту, ходы справа */
@media (max-height: 560px) and (orientation: landscape) {
  .play { display: grid; grid-template-columns: auto minmax(0, 1fr); height: calc(100dvh - var(--hdr)); }
  .play-area { padding: 0 8px; }
  .play-col { width: calc(100dvh - var(--hdr) - 96px); gap: 2px; }
  .pl-row { height: 44px; padding: 0; }
  .play-side { border-left: 1px solid var(--line); border-top: 0; overflow-y: auto; }
  .moves { max-height: none; }
}

/* короткие страницы на телефоне: без подвала, содержимое на весь экран; подвал — на главной и в «Я» */
@media (max-width: 760px) {
  body:not([data-page=home]):not([data-page=me]):not([data-page=account]) #foot { display: none; }
  #foot { margin-top: 32px; }
  main { min-height: calc(100dvh - var(--hdr) - 68px - env(safe-area-inset-bottom)); }
  body[data-page=play] main { min-height: 0; }
  .page-h { margin: 20px 0 16px; }
  .sec, .sec-h { margin-top: 32px; }
  .card { padding: 16px; }
  .phead { margin: 16px 0; gap: 12px; }
  .ph-av { width: 56px; height: 56px; }
  .ph-main h1 { font-size: 24px; }
  .ph-r { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); width: 100%; gap: 6px; }
  .rt { min-width: 0; padding: 8px 10px; }
  .rt-v { font-size: 18px; }
  .rt-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .rt-b { font-size: 10px; line-height: 1.3; }
  .filters { top: var(--hdr); margin-inline: -16px; padding: 8px 16px; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .filters > * { flex: none; }
  .tabs { margin-inline: -16px; padding: 0 16px; }
  .g-head { margin: 12px 0; }
  .tc-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pw-dlg .pw, .link-dlg .card { max-height: calc(100dvh - 24px); overflow-y: auto; }
  .share-box { padding: 16px; }
  .gl-row { min-height: 52px; }
  .op-head { gap: 12px; }
  .ladder li { padding: 10px; }
  .cards { margin-inline: -16px; padding-inline: 16px; scroll-padding-inline: 16px; }
}
/* разбор партии и тренажёры: доска во всю ширину экрана */
@media (max-width: 640px) {
  .pz-b, .tr-safe .board, .tr-coord .board, .ls-grid .board, .op-b .board, .op-drill .board, .duel-grid .board { border-radius: 0; margin-inline: -16px; width: calc(100% + 32px); max-width: none; }
}

/* фото легенд */
img.lg-ph { padding: 0; object-fit: cover; background: var(--raised); }
.bot.lg.locked .lg-ph { filter: grayscale(.85); opacity: .75; }
.st-ph { width: 72px; height: 72px; border-radius: 16px; }
