/* ДС ПРО.К 3.2: токены */
:root {
  --ink: #1B1F1F; --ink-deep: #131819; --ink-soft: #262B2E; --ink-card: #22282A;
  --white: #FFFFFF; --accent: #E8E404; --brand: #8BB9C4; --brand-mid: #6FA3B1;
  --brand-dk: #2E7489; --deep: #263A3F; --mid: #4A656D; --grey: #5F6B6D; --grey-lt: #B4C1C4;
  --tint1: #F3F8F9; --tint2: #ECF0F2; --line-d: #3A4446; --line-l: #D7E0E3;
  --shadow: 0 6px 22px rgba(46, 116, 137, .13);
  --r: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--tint1); color: var(--ink); font-size: 16px; line-height: 1.45;
}
button, input, textarea, select { font: inherit; color: inherit; }
.wrap { max-width: 560px; margin: 0 auto; padding: 16px 16px 110px; position: relative; }
.corner { position: absolute; top: 14px; right: 14px; width: 18px; height: 18px; border-top: 2px solid var(--brand-dk); border-right: 2px solid var(--brand-dk); pointer-events: none; }
.dark .corner { border-color: var(--accent); }
.kicker { text-transform: uppercase; letter-spacing: .08em; font-size: 11px; font-weight: 700; color: var(--brand-dk); margin: 8px 0 4px; }
h1 { font-size: 24px; line-height: 1.2; margin: 0 0 12px; font-weight: 700; padding-left: 12px; border-left: 4px solid var(--brand-dk); }
h1 b { color: var(--brand-dk); }
h2 { font-size: 18px; margin: 20px 0 8px; }
p { margin: 6px 0; }
.muted { color: var(--grey); font-size: 14px; }
.card { background: var(--white); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; margin: 12px 0; position: relative; }
.btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: 12px; border: 0; cursor: pointer; font-weight: 700; background: var(--brand-dk); color: var(--white); }
.btn.block { width: 100%; }
.btn.yellow { background: var(--accent); color: var(--ink); }
.btn.ghost { background: transparent; color: var(--brand-dk); border: 1.5px solid var(--brand-dk); }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn:disabled { opacity: .45; cursor: default; }
.grid6 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pick { min-height: 64px; border-radius: 12px; border: 1.5px solid var(--line-l); background: var(--white); font-size: 20px; font-weight: 700; cursor: pointer; }
.pick[aria-pressed="true"] { background: var(--brand-dk); color: var(--white); border-color: var(--brand-dk); }
.pick.wide { grid-column: 1 / -1; font-size: 15px; min-height: 48px; }

.crit { padding: 14px 0; border-top: 1px solid var(--line-l); }
.crit:first-of-type { border-top: 0; padding-top: 4px; }
.crit-h { display: flex; gap: 8px; align-items: baseline; }
.tag { flex: none; font-weight: 700; font-size: 13px; color: var(--white); background: var(--brand-dk); border-radius: 6px; padding: 1px 7px; }
.crit-name { font-weight: 600; }
.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 10px; }
.scale button { min-height: 52px; border-radius: 12px; border: 1.5px solid var(--line-l); background: var(--tint1); font-size: 20px; font-weight: 700; cursor: pointer; }
.scale button[aria-pressed="true"] { background: var(--accent); border-color: var(--ink); color: var(--ink); }
.ends { display: flex; justify-content: space-between; font-size: 14px; color: var(--grey); margin-top: 4px; }
details { margin-top: 8px; font-size: 14px; }
details summary { color: var(--brand-dk); cursor: pointer; font-weight: 600; }
details .what { margin: 6px 0; }
details .how { margin: 6px 0; color: var(--grey); }
textarea { width: 100%; min-height: 76px; border-radius: 12px; border: 1.5px solid var(--line-l); padding: 10px 12px; background: var(--white); resize: vertical; }
.bar { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: rgba(243, 248, 249, .96); border-top: 1px solid var(--line-l); }
.bar .inner { max-width: 560px; margin: 0 auto; }
.status { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--tint2); color: var(--grey); }
.status.open { background: var(--accent); color: var(--ink); }
.status.done { background: var(--brand-dk); color: var(--white); }
.ok { font-size: 44px; line-height: 1; }
.toast { position: fixed; left: 50%; top: 16px; transform: translateX(-50%); background: var(--ink); color: var(--white); padding: 10px 16px; border-radius: 10px; font-size: 14px; z-index: 10; max-width: 90vw; }
.hidden { display: none !important; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
table { border-collapse: collapse; width: 100%; }
th, td { padding: 8px 6px; text-align: center; border-bottom: 1px solid var(--line-l); }
th { background: var(--brand-dk); color: var(--white); font-weight: 700; font-size: 14px; }
td:first-child, th:first-child { text-align: left; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- проектор ---------- */
body.dark { background: var(--ink); color: var(--white); }
.screen { padding: 4vh 5vw; min-height: 100vh; }
.screen .kicker { color: var(--accent); font-size: 1.4vw; }
.screen h1 { font-size: 3.4vw; border-left-color: var(--accent); }
.screen h1 b { color: var(--accent); }
.screen .muted { color: var(--grey-lt); font-size: 1.4vw; }
.screen table { margin-top: 3vh; font-size: 2.3vw; background: var(--ink-card); border-radius: 12px; overflow: hidden; }
.screen th { background: var(--ink-soft); color: var(--grey-lt); font-size: 1.6vw; padding: 1.4vh 1vw; font-weight: 600; }
.screen td { border-bottom: 1px solid var(--line-d); padding: 1.6vh 1vw; }
.screen td.total { color: var(--ink); background: var(--accent); font-weight: 700; }
.screen td.init { font-weight: 700; }
.screen td.init small { display: block; font-weight: 400; font-size: 1.3vw; color: var(--grey-lt); }
.screen .big { font-size: 22vh; font-weight: 700; line-height: 1; color: var(--accent); }
.screen .mid { font-size: 4vw; font-weight: 700; }
.screen .qr { background: var(--white); padding: 1.5vh; border-radius: 12px; display: inline-block; }
.screen .qr img, .screen .qr canvas { display: block; width: 32vh; height: 32vh; image-rendering: pixelated; }
.screen .legend { display: grid; grid-template-columns: auto 1fr; gap: .6vh 1.2vw; font-size: 1.6vw; color: var(--grey-lt); margin-top: 3vh; }
.screen .legend b { color: var(--white); }
.screen .flex { display: flex; gap: 5vw; align-items: center; }
.dark .tabs { position: fixed; left: 50%; transform: translateX(-50%); bottom: 2vh; display: flex; gap: 6px; opacity: .25; }
.dark .tabs:hover { opacity: 1; }
.dark .tabs button { background: var(--ink-soft); color: var(--white); border: 1px solid var(--line-d); border-radius: 8px; padding: 6px 10px; cursor: pointer; font-size: 13px; }
.logo { position: fixed; left: 5vw; bottom: 3vh; height: 4vh; }

/* ---------- разбивка ---------- */
.hist td { font-size: 15px; }
.hist td.cell { font-weight: 600; }
.comments li { margin: 6px 0; }
.wrap > .row:first-child { padding-right: 26px; }

.picklist { display: grid; gap: 8px; }
.pick.row-pick { display: flex; align-items: center; gap: 12px; text-align: left; font-size: 17px; min-height: 56px; padding: 0 14px; }
.pick.row-pick .pnum { flex: none; min-width: 42px; font-weight: 700; color: var(--brand-dk); }
.pick.row-pick .ptitle { font-weight: 600; }
.pick.row-pick.host { flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; padding: 10px 14px; background: var(--ink); color: var(--white); border-color: var(--ink); margin-top: 6px; }
.pick.row-pick .psub { font-size: 13px; font-weight: 400; color: var(--grey-lt); }

/* ---------- пульт ведущего ---------- */
.card.now { border-top: 4px solid var(--accent); }
.card.now .kicker { margin-top: 0; }
.mine { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-l); }
.mine .crit:first-of-type { border-top: 0; }
.mine .btn { margin-top: 12px; }
.hrow { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line-l); }
.hrow:first-of-type { border-top: 0; }
.hrow > div { flex: 1; min-width: 0; }
.meta { font-size: 13px; color: var(--grey); margin-top: 4px; }
.switch { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.switch input { width: 22px; height: 22px; accent-color: var(--brand-dk); flex: none; }
details.card > summary { font-size: 16px; }
.tinput { flex: 1; min-height: 40px; border: 1.5px solid var(--line-l); border-radius: 10px; padding: 0 10px; background: var(--tint1); }
.hrow .btn.small, .card .btn.small { min-height: 44px; }
.switch { min-height: 44px; }
.topbar { margin-bottom: 4px; }
.topbar .btn.small { min-height: 40px; }
.who { cursor: pointer; min-height: 36px; font-size: 13px; font-weight: 700; color: var(--brand-dk); background: var(--white); border: 1.5px solid var(--line-l); border-radius: 999px; padding: 4px 10px; }
.wrap > .row:first-child { padding-right: 30px; }
