/* Напарник: одна колонка шириной с телефон, нижняя панель разделов, листы снизу для действий. */
/* Шрифты лежат на нашем сервере: телефон не обращается к Google (152-ФЗ, без передачи IP за границу).
   Вариативные, латиница и кириллица; лицензия SIL OFL — в /static/fonts/. */
@font-face { font-family: 'Onest'; src: url('/static/fonts/onest.woff2') format('woff2'); font-weight: 100 900; font-display: swap }
@font-face { font-family: 'Unbounded'; src: url('/static/fonts/unbounded.woff2') format('woff2'); font-weight: 200 900; font-display: swap }
:root {
  --bg: #F3F2EE; --surface: #FCFBF8; --sunk: #ECE9E3; --ink: #1D1B18; --muted: #6B655D; --line: #E1DCD3;
  --accent: #9C4A1A; --accent-ink: #FFF8F2; --accent-soft: #F4E5D8;
  --crit: #B42318; --crit-soft: #FBE6E2; --warn: #9A5A00; --warn-soft: #FBEFD9; --ok: #2F6B3F; --ok-soft: #E2F0E4;
  --ghost: #D9D3C9; --backdrop: rgba(29, 20, 12, .45);
  --font-ui: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-display: 'Unbounded', 'Onest', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --r: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #141311; --surface: #1E1C19; --sunk: #191714; --ink: #F2EEE8; --muted: #A69F95; --line: #322E29;
  --accent: #E39A5E; --accent-ink: #1E1408; --accent-soft: #3A2A1D;
  --crit: #FF8B7B; --crit-soft: #3A1D19; --warn: #F0B357; --warn-soft: #382A13; --ok: #8BCB99; --ok-soft: #1C3123;
  --ghost: #3A3631; --backdrop: rgba(0, 0, 0, .6); color-scheme: dark } }
:root[data-theme="dark"] {
  --bg: #141311; --surface: #1E1C19; --sunk: #191714; --ink: #F2EEE8; --muted: #A69F95; --line: #322E29;
  --accent: #E39A5E; --accent-ink: #1E1408; --accent-soft: #3A2A1D;
  --crit: #FF8B7B; --crit-soft: #3A1D19; --warn: #F0B357; --warn-soft: #382A13; --ok: #8BCB99; --ok-soft: #1C3123;
  --ghost: #3A3631; --backdrop: rgba(0, 0, 0, .6); color-scheme: dark }

* { box-sizing: border-box }
html { -webkit-text-size-adjust: 100% }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.45 var(--font-ui); -webkit-font-smoothing: antialiased; overflow-x: hidden }
h1, h2, h3, p, ul, ol { margin: 0 }
ul, ol { padding: 0 }
button, input, select, textarea { font: inherit; color: inherit }
button { cursor: pointer }
button:disabled { cursor: default; opacity: .6 }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px }
.num { font-variant-numeric: tabular-nums }
[hidden] { display: none !important }

.app { width: 100%; max-width: 480px; margin-inline: auto; padding-inline: 16px; padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)); min-height: 100dvh }
.top { position: sticky; top: 0; z-index: 5; background: var(--bg); padding-top: calc(12px + env(safe-area-inset-top, 0px)); padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-inline: -16px; padding-inline: 16px }
.brand { display: flex; align-items: center; justify-content: space-between; gap: 12px }
.wordmark { font: 600 20px/1 var(--font-display); letter-spacing: -0.01em; display: inline-flex; align-items: center; gap: 8px }
.chip-demo { font: 600 11px/1 var(--font-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); padding: 5px 8px; border-radius: 99px }
.place { color: var(--muted); font-size: 13px; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.icon-btn { background: none; border: 0; padding: 6px; border-radius: 10px; color: var(--muted); display: inline-grid; place-items: center; min-width: 40px; min-height: 40px }
.icon-btn svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round }
.icon-btn.spin svg { animation: spin .8s linear infinite }
@keyframes spin { to { transform: rotate(360deg) } }

main { padding-block: 16px; display: grid; gap: 22px }
.screen-title { font: 600 20px/1.2 var(--font-display); letter-spacing: -0.01em }
.title-row { display: flex; align-items: center; justify-content: space-between; gap: 8px }
.section { display: grid; gap: 10px; min-width: 0 }
.section-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px }
.section-h h2 { font-size: 13px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); font-weight: 600 }
.section-h .hint { font-size: 13px; color: var(--muted); text-align: right }
.note { font-size: 13px; color: var(--muted) }
.loading { color: var(--muted); padding: 24px 0; text-align: center; animation: loading-in .2s ease .4s both }
@keyframes loading-in { from { opacity: 0 } to { opacity: 1 } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; display: grid; gap: 10px; min-width: 0 }
.card.ok { background: var(--ok-soft); border-color: transparent; color: var(--ok) }
.card.err { background: var(--crit-soft); border-color: transparent; color: var(--crit) }

.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: grid; gap: 12px }
.kpi-main { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap }
.kpi-label { font-size: 13px; color: var(--muted) }
.kpi-value { font: 600 34px/1.05 var(--font-ui); letter-spacing: -0.02em }
.kpi-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; border-top: 1px solid var(--line); padding-top: 12px }
.kpi-row b { display: block; font-size: 18px; font-weight: 600 }
.kpi-row span { font-size: 13px; color: var(--muted) }

.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 99px; white-space: nowrap }
.pill.crit { color: var(--crit); background: var(--crit-soft) }
.pill.warn { color: var(--warn); background: var(--warn-soft) }
.pill.ok { color: var(--ok); background: var(--ok-soft) }
.pill.neutral { color: var(--muted); background: var(--sunk) }

.chart { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 12px 8px; min-width: 0 }
.chart svg { display: block; width: 100%; height: auto }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); padding: 0 4px 6px }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px }

.alert { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; display: grid; gap: 10px }
.alert-top { display: flex; justify-content: space-between; align-items: center; gap: 10px }
.alert-top h3 { font-size: 16px; font-weight: 600; min-width: 0 }
.alert .gap { color: var(--muted); font-size: 14px }
.actions { display: flex; gap: 8px; flex-wrap: wrap }
.actions.grid2 { display: grid; grid-template-columns: 1fr 1fr }
.actions.grid2 .wide { grid-column: 1 / -1 }
.actions.col { display: grid; grid-template-columns: 1fr }
.btn { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 10px 14px; font-weight: 600; font-size: 14px; min-height: 42px; text-align: center }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent) }
.btn.done { background: var(--ok-soft); color: var(--ok); border-color: transparent }
.btn.danger { color: var(--crit) }
.btn.big { width: 100%; padding: 14px; font-size: 16px }
.link { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; text-align: left }

.rows { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r) }
.rows > li { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 14px; border-top: 1px solid var(--line); align-items: center }
.rows > li:first-child { border-top: 0 }
.rows b { font-weight: 600 }
.rows .sub { color: var(--muted); font-size: 13.5px; grid-column: 1 / -1 }
.rows .sub.inline { grid-column: auto }

.order { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; display: grid; gap: 10px }
.order-h { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; flex-wrap: wrap }
.order-h h3 { font-size: 16px; font-weight: 600 }
.order-h span { font-size: 13px; color: var(--muted) }
.lines { display: grid; gap: 6px }
.lines li { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; font-size: 14px }
.lines li span:last-child { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap }
.order-f { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding-top: 10px; flex-wrap: wrap }
.order-f b { font-variant-numeric: tabular-nums }

.stock { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r) }
.stock li { list-style: none; border-top: 1px solid var(--line) }
.stock li:first-child { border-top: 0 }
.stock .row { width: 100%; background: none; border: 0; text-align: left; padding: 12px 14px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center }
.stock .nm { font-weight: 600; min-width: 0 }
.stock .qty { color: var(--muted); font-size: 13.5px; font-variant-numeric: tabular-nums }
.bar { grid-column: 1 / -1; height: 4px; border-radius: 4px; background: var(--sunk); overflow: hidden }
.bar i { display: block; height: 100% }
.more { padding: 0 14px 12px; font-size: 13.5px; color: var(--muted); display: grid; gap: 6px }

.report-text { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 14px 14px 32px; display: grid; gap: 8px }
.top5 { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r) }
.top5 li { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 14px }
.top5 li:first-child { border-top: 0 }
.top5 span { color: var(--muted); font-variant-numeric: tabular-nums }
.top5 b { font-variant-numeric: tabular-nums; font-weight: 600 }
.datenav { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 4px; text-align: center }
.datenav .icon-btn svg { width: 20px; height: 20px }

.check { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 4px 0 }
.check label { display: flex; gap: 12px; align-items: center; padding: 11px 14px; cursor: pointer; border-top: 1px solid var(--line) }
.check label:first-child { border-top: 0 }
.check input { width: 22px; height: 22px; accent-color: var(--accent); flex: none; margin: 0 }
.check input:checked + span { color: var(--muted); text-decoration: line-through }
.progress { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted) }
.progress .bar { flex: 1; height: 6px }
.photo { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r); padding: 12px 14px }
.photo img { width: 56px; height: 56px; object-fit: cover; border-radius: 10px }
.photo .thumbs { display: flex; gap: 6px; flex-wrap: wrap }

.recount { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r) }
.recount li { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 4px 12px; padding: 12px 14px; border-top: 1px solid var(--line); align-items: center }
.recount li:first-child { border-top: 0 }
.recount .nm { font-weight: 600 }
.recount .exp { color: var(--muted); font-size: 13px }
.res { grid-column: 1 / -1; font-size: 13.5px }
.res.ok { color: var(--ok) } .res.warn { color: var(--warn) } .res.crit { color: var(--crit) }

.field { display: grid; gap: 6px; font-size: 14px; color: var(--muted) }
.field > span { font-weight: 500 }
.input, .field input, .field select, .field textarea, .recount input {
  width: 100%; font-size: 16px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); min-height: 44px }
.recount input { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums }
.field textarea { min-height: 120px; resize: vertical; line-height: 1.4 }
.qty-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px }
.form { display: grid; gap: 14px }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--sunk); border-radius: 12px; padding: 4px; gap: 4px }
.seg label { text-align: center; padding: 9px 6px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer }
.seg input { position: absolute; opacity: 0; pointer-events: none }
.seg label:has(input:checked) { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08) }
.chips { display: flex; flex-wrap: wrap; gap: 6px }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 6px 12px; font-size: 13.5px }
.chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent) }
.switch { position: relative; width: 48px; height: 28px; flex: none }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer }
.switch i { position: absolute; inset: 0; background: var(--ghost); border-radius: 99px; transition: background .15s; pointer-events: none } /* нажатие — в сам переключатель под картинкой */
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0, 0, 0, .2) }
.switch input:checked + i { background: var(--crit) }
.switch input:checked + i::after { transform: translateX(20px) }
.switch input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px }
.codebox { font: 500 13px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--sunk); border-radius: 10px; padding: 10px 12px; word-break: break-all; color: var(--ink) }
.log li, .rows.log > li { list-style: none; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 14px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px }
.log li:first-child { border-top: 0 }
.log time { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums }

.center { min-height: 80dvh; display: grid; align-content: center; gap: 16px; padding-block: 32px }
.center h1 { font: 600 24px/1.2 var(--font-display); letter-spacing: -0.01em; text-wrap: balance }
.center p { color: var(--muted) }

.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px)); display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; max-width: 480px; margin-inline: auto }
.tabbar button { background: none; border: 0; border-radius: 10px; padding: 6px 2px; display: grid; justify-items: center; gap: 2px; font-size: 11.5px; color: var(--muted); min-height: 50px }
.tabbar svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round }
.tabbar button[aria-current="page"] { color: var(--accent); background: var(--accent-soft) }
@media (min-width: 520px) { .tabbar { border: 1px solid var(--line); border-bottom: 0; border-radius: 16px 16px 0 0 } }

dialog.sheet { margin: auto auto 0; width: 100%; max-width: 480px; border: 0; border-radius: 20px 20px 0 0; padding: 14px 16px calc(18px + env(safe-area-inset-bottom, 0px)); background: var(--surface); color: var(--ink); max-height: 92dvh; overflow: auto; box-shadow: 0 -10px 40px rgba(0, 0, 0, .18) }
dialog.sheet::backdrop { background: var(--backdrop) }
.sheet-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px }
.sheet-h h2 { font: 600 18px/1.25 var(--font-display); letter-spacing: -0.01em }
#sheet-body { display: grid; gap: 14px }
#sheet-body .rows, #sheet-body .check { background: var(--bg) }

.toast { position: fixed; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 12px); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-size: 14px; width: max-content; max-width: min(420px, calc(100vw - 32px)); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 30 }
.toast.show { opacity: 1; transform: translate(-50%, 0) }
.toast.err { background: var(--crit); color: #fff }
@media (prefers-reduced-motion: reduce) { .toast, .switch i, .switch i::after { transition: none } .icon-btn.spin svg { animation: none } }
.link.danger { color: var(--crit) }
.install-card { grid-template-columns: minmax(0, 1fr); background: var(--accent-soft); border-color: transparent }
.install-card .note { display: block; margin-top: 2px }
.demo-push { border-color: var(--accent) }
.steps-list { counter-reset: st }
.steps-list li { list-style: none; display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line) }
.steps-list li:first-child { border-top: 0 }
.steps-list li::before { counter-increment: st; content: counter(st); font-weight: 700; color: var(--accent) }

/* ---------- пульт оператора ---------- */
body.pult .app { padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px)) }
body.pult .toast { bottom: calc(24px + env(safe-area-inset-bottom, 0px)) }
.kpi-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)) }
.cafes { display: grid; gap: 10px }
.cafe { width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; display: grid; gap: 6px; color: var(--ink); min-width: 0 }
.cafe-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-width: 0 }
.cafe-h b { font-size: 16px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.cafe-sub { font-size: 13px; color: var(--muted); overflow-wrap: anywhere }
.cafe .line { font-size: 14px }
.line.muted { color: var(--muted); font-size: 13.5px }
.line.crit { color: var(--crit); font-weight: 600; font-size: 13.5px }
.line.warn { color: var(--warn); font-weight: 600; font-size: 13.5px }
.card.warnc { background: var(--warn-soft); border-color: transparent; color: var(--warn) }
.seg.grid2 { grid-auto-flow: row; grid-template-columns: 1fr 1fr }
.marks > li { grid-template-columns: 26px minmax(0, 1fr); align-items: start }
.mark { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--ghost); display: grid; place-items: center; font-size: 12px; font-weight: 700; margin-top: 1px }
.mark.ok { background: var(--ok); border-color: var(--ok); color: var(--surface) }
.marks .sub { display: block; grid-column: auto }
.qr { background: #fff; border-radius: 12px; padding: 6px; width: 240px; max-width: 100%; justify-self: center }
.qr svg { display: block; width: 100%; height: auto }
.file-btn { display: block; cursor: pointer }
.bar i.indeterminate { width: 35%; background: var(--accent); animation: slide 1.4s ease-in-out infinite }
@keyframes slide { 0% { transform: translateX(-100%) } 100% { transform: translateX(290%) } }
@media (prefers-reduced-motion: reduce) { .bar i.indeterminate { animation: none; width: 100%; opacity: .5 } }
a.btn { display: block; text-decoration: none; color: var(--ink) }
a.btn.primary { color: var(--accent-ink) }
.bigcode { font: 600 40px/1.1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; text-align: center; background: var(--sunk); border-radius: 14px; padding: 18px 12px; color: var(--ink) }
.rows.tap > li { padding: 0; display: block }
.rowbtn { width: 100%; background: none; border: 0; text-align: left; padding: 12px 14px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; color: inherit; align-items: baseline }
.rowbtn .sub { grid-column: 1 / -1; color: var(--muted); font-size: 13.5px }
.crit-t { color: var(--crit) }
.recipe { display: grid; gap: 8px }
.recipe li { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr) 76px 34px 40px; gap: 6px; align-items: center }
.recipe .input { padding: 8px 10px; min-height: 42px }
.recipe input.input { text-align: right; font-variant-numeric: tabular-nums }
.recipe .unit { color: var(--muted); font-size: 14px }
.check-row { display: flex; gap: 10px; align-items: center; font-size: 15px; color: var(--ink) }
.check-row input { width: 22px; height: 22px; accent-color: var(--accent); margin: 0 }
.check.pick input:checked + span { text-decoration: none; color: var(--ink) }
.place-btn { background: none; border: 0; padding: 2px 0; font: 600 14px/1.3 var(--font-ui); color: var(--accent); display: inline-flex; align-items: center; gap: 4px; max-width: 100%; text-align: left }
.place-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none }
.cafe .line.warn, .cafe .line.crit { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden }
.marks.setup > li { grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center }
.marks.setup .btn { min-height: 36px; padding: 6px 12px }
.cafe.update { border-color: var(--accent); margin-bottom: 12px }
.cafe.update.crit { border-color: var(--crit) }
ul.plain { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 14.5px; overflow-wrap: anywhere }

.shot { display: block; width: 100%; height: auto; border-radius: 14px; margin: 12px 0 0; background: var(--ghost) }

/* вход и согласия */
.cookie-bar { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 40; max-width: 520px; margin-inline: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: grid; gap: 10px;
  box-shadow: 0 8px 28px rgba(29, 20, 12, .18); font-size: 14px; line-height: 1.45 }
.cookie-bar.shake { animation: shake .5s }
@keyframes shake { 20%, 60% { transform: translateX(-6px) } 40%, 80% { transform: translateX(6px) } }
@media (prefers-reduced-motion: reduce) { .cookie-bar.shake { animation: none; outline: 2px solid var(--accent) } }
.check-row.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.4; text-align: left }
.check-row.consent input { width: 20px; height: 20px; margin-top: 1px; flex: none; accent-color: var(--accent) }
.more-box { text-align: left; font-size: 14px; color: var(--muted) }
.more-box summary { cursor: pointer; color: var(--accent); font-weight: 500; padding: 6px 0 }
.more-box p, .more-box form { margin-top: 8px }

/* ---------- Дизайн A «Тёплая бумага» + стеклянная панель вкладок (9 октября 2026) ----------
   Структура как в приложениях Apple: вкладки — места, профиль — кружок в углу, записи — кнопка «+».
   Пульт (body.pult) этим блоком не затронут, кроме общих листов снизу. */
:root { --glass: rgba(252, 251, 248, .8); --glass-line: rgba(255, 255, 255, .65); --float: 0 10px 30px rgba(29, 20, 12, .16), 0 1px 3px rgba(29, 20, 12, .08) }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --glass: rgba(30, 28, 25, .8); --glass-line: rgba(255, 255, 255, .1); --float: 0 10px 30px rgba(0, 0, 0, .45) } }
:root[data-theme="dark"] { --glass: rgba(30, 28, 25, .8); --glass-line: rgba(255, 255, 255, .1); --float: 0 10px 30px rgba(0, 0, 0, .45) }
body:not(.pult) { --r: 18px; -moz-osx-font-smoothing: grayscale }
/* при прокрутке к полю или кнопке (фокус, клавиатура) — не прятать их под шапкой и плавающей панелью */
html:has(body:not(.pult)) { scroll-padding: 96px 0 128px }
body:not(.pult) .app { padding-bottom: calc(112px + env(safe-area-inset-bottom, 0px)) }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap }
body:not(.pult) p, .sub, .note { text-wrap: pretty }
body:not(.pult) h1, body:not(.pult) h2, body:not(.pult) h3 { text-wrap: balance }

/* шапка: полупрозрачная; большой заголовок уехал — в шапке маленький */
.app-top { background: var(--glass); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); border-bottom-color: transparent; transition: border-color .2s }
.app-top.compact { border-bottom-color: var(--line) }
.brand-l { display: grid; min-width: 0 }
.brand-l > * { grid-area: 1 / 1; transition: opacity .2s ease, transform .2s ease }
.top-title { font: 600 17px/1.2 var(--font-ui); opacity: 0; transform: translateY(4px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; align-self: center }
.app-top.compact .wordmark { opacity: 0; transform: translateY(-4px) }
.app-top.compact .top-title { opacity: 1; transform: none }
.brand-r { display: flex; align-items: center; gap: 4px }
.avatar { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); font: 600 14px/1 var(--font-ui); display: inline-grid; place-items: center; flex: none; letter-spacing: .02em }
button.avatar { position: relative }
button.avatar::after { content: ""; position: absolute; inset: -3px } /* попадание пальцем — 44 точки */
.avatar[aria-current="true"], .avatar[aria-current] { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent) }
.avatar.sm { width: 36px; height: 36px; font-size: 13px; background: var(--accent-soft); color: var(--accent) }
.avatar.lg { width: 64px; height: 64px; font-size: 24px }

/* большой заголовок экрана */
.hero { display: grid; gap: 2px; padding-top: 4px }
.eyebrow { font-size: 13px; color: var(--muted); font-weight: 500; letter-spacing: .02em }
.eyebrow::first-letter { text-transform: uppercase }
.hero-row { display: flex; align-items: center; justify-content: space-between; gap: 12px }
body:not(.pult) .screen-title { font: 700 30px/1.1 var(--font-display); letter-spacing: -0.02em }
body:not(.pult) .datenav .screen-title { font-size: 19px; line-height: 1.25 }
.back { display: inline-flex; align-items: center; gap: 2px; background: none; border: 0; padding: 4px 6px 4px 0; min-height: 44px; color: var(--accent); font-weight: 600; font-size: 16px; justify-self: start }
.back svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round }

/* плавающая полупрозрачная панель вкладок (из варианта B) и кнопка «+» */
.tabbar.glass { --edge: max(12px, calc(50% - 228px)); left: var(--edge); right: var(--edge); bottom: calc(12px + env(safe-area-inset-bottom, 0px)); max-width: none; margin: 0;
  height: 64px; padding: 6px; border-radius: 32px; border: 1px solid var(--glass-line); background: var(--glass);
  -webkit-backdrop-filter: blur(22px) saturate(180%); backdrop-filter: blur(24px) saturate(180%); box-shadow: var(--float); gap: 2px }
body.has-fab .tabbar.glass { right: calc(var(--edge) + 72px) }
.tabbar.glass button { border-radius: 26px; min-height: 50px; padding: 4px 2px; gap: 1px; font-size: 11px; font-weight: 600; letter-spacing: .01em; transition: color .15s, background-color .15s, transform .12s ease-out }
.tabbar.glass button[aria-current="page"] { color: var(--accent); background: var(--accent-soft) }
.tabbar.glass svg { width: 24px; height: 24px }
.fab { position: fixed; z-index: 11; right: max(12px, calc(50% - 228px)); bottom: calc(14px + env(safe-area-inset-bottom, 0px)); width: 60px; height: 60px; border-radius: 50%;
  border: 1px solid var(--glass-line); background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; box-shadow: var(--float);
  transition: transform .12s ease-out, box-shadow .15s }
.fab svg { width: 28px; height: 28px; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .tabbar.glass, .app-top { background: var(--surface) } }
body:not(.pult) .toast { bottom: calc(92px + env(safe-area-inset-bottom, 0px)) }
body.has-fab .cookie-bar { bottom: calc(88px + env(safe-area-inset-bottom, 0px)) }

/* сгруппированные списки, как в «Настройках» iPhone */
.group { display: grid; gap: 6px; min-width: 0 }
.group-h { font-size: 13px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 0 4px }
.group-f { font-size: 13px; color: var(--muted); padding: 0 4px; line-height: 1.45 }
.cells { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: grid }
.cell { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px; min-height: 54px; padding: 10px 14px;
  background: none; border: 0; text-align: left; color: var(--ink); text-decoration: none; cursor: pointer; transition: background-color .15s }
.cells > * + * { border-top: 1px solid var(--line) }
.cell:active { background: var(--sunk) }
.cell > svg { width: 16px; height: 16px; stroke: var(--muted); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; grid-column: 4 }
.cell-ic { width: 32px; height: 32px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center }
.cell-ic svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round }
.cell-t { display: grid; gap: 1px; min-width: 0; grid-column: 2 }
.cell:not(:has(.cell-ic)) .cell-t { grid-column: 1 / 3 }
.cell-t b { font-weight: 600; font-size: 15.5px }
.cell-t .sub { font-size: 13px; color: var(--muted); line-height: 1.35 }
.cell-v { color: var(--muted); font-size: 14px; grid-column: 3 }
.cell.danger b { color: var(--crit) }
.cell.danger .cell-ic { background: var(--crit-soft); color: var(--crit) }
.cell.solo { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface) }
#sheet-body .cells { background: var(--bg) }
.me-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center; padding: 4px 0 2px }
body:not(.pult) .me-card .screen-title { font-size: 24px; line-height: 1.15 }
.rows.people > li.person { grid-template-columns: 36px minmax(0, 1fr) auto; gap: 4px 12px }
.person-t { display: grid; gap: 1px; min-width: 0 }
.person-t .sub { grid-column: auto }
.person .actions { grid-column: 2 / -1 }

/* серые заготовки вместо «Загружаю…» */
.skel { display: grid; gap: 14px; padding-top: 4px }
.sk { display: block; border-radius: 12px; background: linear-gradient(90deg, var(--sunk) 0%, var(--line) 50%, var(--sunk) 100%); background-size: 200% 100%; animation: shimmer 1.3s ease-in-out infinite }
.sk-t { height: 34px; width: 55% }
.sk-card { height: 128px; border-radius: var(--r) }
.sk-row { height: 54px; border-radius: var(--r) }
@keyframes shimmer { from { background-position: 100% 0 } to { background-position: -100% 0 } }

/* нажатие «проседает» — сразу видно, что сработало */
body:not(.pult) :is(.btn, .fab, .avatar, .back, .tabbar button, .chip):active:not(:disabled) { transform: scale(.96) }
body:not(.pult) .btn { transition: transform .12s ease-out, background-color .15s, color .15s; border-radius: 12px }

/* листы снизу: «язычок», мягкое появление, смахнуть вниз — закрыть */
.grabber { width: 38px; height: 5px; border-radius: 3px; background: var(--ghost); margin: -4px auto 10px }
dialog.sheet { border-radius: 22px 22px 0 0 }
dialog.sheet[open] { animation: sheet-in .32s cubic-bezier(.2, .8, .2, 1) }
dialog.sheet[open]::backdrop { animation: fade-in .25s ease }
dialog.sheet.dragging { transition: none }
@keyframes sheet-in { from { transform: translateY(40px); opacity: .4 } to { transform: none; opacity: 1 } }
@keyframes fade-in { from { opacity: 0 } to { opacity: 1 } }

/* пересчёт по одной позиции */
.rc-step { gap: 18px }
.rc-name { font: 700 24px/1.2 var(--font-display); letter-spacing: -0.01em }
.field input.rc-input:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--accent-soft) }
.field input.rc-input { font-size: 40px; font-weight: 700; text-align: center; min-height: 76px; border-radius: 16px; border-width: 2px; border-color: var(--accent); background: var(--surface) }

@media (prefers-reduced-motion: reduce) {
  .sk { animation: none }
  dialog.sheet[open], dialog.sheet[open]::backdrop { animation: none }
  body:not(.pult) :is(.btn, .fab, .avatar, .back, .tabbar button, .chip):active { transform: none }
  .brand-l > *, .app-top { transition: none }
}

/* ---------- помощники: подсказки, кофемашина, смены по часам, наставник ---------- */
.card.tip { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center }
.card.warn { background: var(--warn-soft); border-color: transparent; color: var(--warn) }
.rows.machine > li { grid-template-columns: minmax(0, 1fr) auto }
.rows.machine .bar, .rows.machine .btn { grid-column: 1 / -1 }
.rows.machine .btn { justify-self: start; min-height: 36px; padding: 6px 12px }
.staff-hours > li { grid-template-columns: 52px minmax(0, 1fr) auto }
.staff-hours .sub { grid-column: 2 / -1 }
.quiz { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px }
.quiz .btn.right { background: var(--ok-soft); border-color: var(--ok); color: var(--ok) }
.quiz .btn.wrong { background: var(--crit-soft); border-color: var(--crit); color: var(--crit) }
.pre { white-space: pre-line; overflow-wrap: anywhere }
