:root {
  --bg: #eef1f6; --card: #fff; --ink: #151b26; --muted: #5d6779; --line: #d9dfe9;
  --brand: #0f3d8f; --brand2: #1d5fd6; --danger: #c62828; --ok: #1b8a3c;
  --s-new: #1d5fd6; --s-assigned: #7b3fc4; --s-in_progress: #e07b00; --s-waiting_part: #a67c00; --s-done: #1b8a3c;
  --radius: 14px; --tap: 52px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
body { overflow-x: hidden; min-height: 100vh; overscroll-behavior-y: none; }
button, input, select, textarea { font: inherit; color: inherit; }
#app { max-width: 640px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }

.top { position: sticky; top: 0; z-index: 10; background: var(--brand); color: #fff;
  padding: calc(10px + env(safe-area-inset-top)) 12px 10px; display: flex; align-items: center; gap: 8px; min-height: 58px; }
.top h1 { font-size: 20px; margin: 0; flex: 1; font-weight: 700; line-height: 1.2; }
.top .back { background: rgba(255,255,255,.15); border: 0; color: #fff; width: 44px; height: 44px; border-radius: 12px; font-size: 24px; cursor: pointer; }
.top .who { font-size: 13px; opacity: .85; text-align: right; line-height: 1.2; }
main { flex: 1; padding: 12px 12px 110px; }

.tabs { position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; background: #fff; border-top: 1px solid var(--line);
  display: flex; max-width: 640px; margin: 0 auto; padding-bottom: env(safe-area-inset-bottom); }
.tabs a { flex: 1; text-align: center; padding: 8px 2px 8px; text-decoration: none; color: var(--muted); font-size: 12px; font-weight: 600; position: relative; min-height: 60px; }
.tabs a .ic { display: block; font-size: 24px; line-height: 28px; }
.tabs a.on { color: var(--brand2); }
.tabs a.plus .ic { background: var(--brand2); color: #fff; width: 44px; height: 44px; border-radius: 50%; margin: -14px auto 0; line-height: 42px; font-size: 30px; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.tabs a.plus { color: var(--brand2); }
.badge { position: absolute; top: 4px; left: 54%; background: var(--danger); color: #fff; border-radius: 10px; font-size: 11px; padding: 1px 6px; font-weight: 700; }

.card { background: var(--card); border-radius: var(--radius); padding: 14px; margin-bottom: 10px; box-shadow: 0 1px 2px rgba(20,30,50,.08); }
a.card { display: block; color: inherit; text-decoration: none; border-left: 6px solid var(--line); }
.card.urgent { border-left-color: var(--danger); }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sp { flex: 1; }
.num { font-weight: 800; font-size: 18px; }
.muted { color: var(--muted); font-size: 14px; }
.title { font-weight: 700; margin: 4px 0 2px; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 13px; font-weight: 700; color: #fff; white-space: nowrap; }
.pill.s-new { background: var(--s-new); } .pill.s-assigned { background: var(--s-assigned); }
.pill.s-in_progress { background: var(--s-in_progress); } .pill.s-waiting_part { background: var(--s-waiting_part); }
.pill.s-done { background: var(--s-done); }
.pill.urgent { background: var(--danger); }
.pill.eq { background: #e6ebf5; color: #2a3550; font-weight: 600; }

label.f { display: block; font-weight: 700; margin: 14px 0 6px; font-size: 15px; }
input[type=text], input[type=search], input[type=password], input[type=tel], select, textarea {
  width: 100%; min-height: var(--tap); padding: 10px 12px; border: 2px solid var(--line); border-radius: 12px; background: #fff; font-size: 16px; }
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand2); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--tap); padding: 10px 18px; border-radius: 12px;
  border: 0; background: var(--brand2); color: #fff; font-weight: 700; font-size: 16px; cursor: pointer; text-decoration: none; position: relative; overflow: hidden; }
.btn.block { display: flex; width: 100%; }
.btn.sec { background: #e3e9f5; color: #1c2f5c; }
.btn.ok { background: var(--ok); } .btn.warn { background: var(--s-in_progress); } .btn.red { background: var(--danger); }
.btn.ghost { background: transparent; border: 2px solid var(--line); color: var(--ink); }
.btn.sm { min-height: 44px; padding: 6px 14px; font-size: 15px; }
.btn input[type=file] { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; font-size: 0; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.btns .btn { flex: 1 1 140px; }

.filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.filters .wide { grid-column: 1 / -1; }
.chip { min-height: var(--tap); border-radius: 12px; border: 2px solid var(--line); background: #fff; font-weight: 700; cursor: pointer; }
.chip.on { background: var(--brand2); border-color: var(--brand2); color: #fff; }
.stats { display: flex; gap: 8px; margin-bottom: 10px; }
.stat { flex: 1; background: #fff; border-radius: 12px; padding: 8px; text-align: center; box-shadow: 0 1px 2px rgba(20,30,50,.08); }
.stat b { display: block; font-size: 22px; } .stat span { font-size: 12px; color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }

.seg { display: flex; gap: 8px; }
.seg button { flex: 1; min-height: var(--tap); border-radius: 12px; border: 2px solid var(--line); background: #fff; font-weight: 700; cursor: pointer; }
.seg button.on { border-color: var(--brand2); background: #e6efff; color: var(--brand); }
.seg button.on.urgent { border-color: var(--danger); background: #fdeaea; color: var(--danger); }

.kv { display: grid; grid-template-columns: 110px 1fr; gap: 6px 10px; margin: 8px 0; font-size: 15px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 600; word-break: break-word; }
.desc { white-space: pre-wrap; margin: 8px 0; }
.photos { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.photos img { width: 88px; height: 88px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); cursor: zoom-in; background: #e3e8f0; }
.photos .th { position: relative; }
.photos .th button { position: absolute; top: -6px; right: -6px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--danger); color: #fff; font-weight: 700; }

.tl { margin-top: 6px; }
.evt { font-size: 14px; color: var(--muted); padding: 6px 0 6px 14px; border-left: 3px solid var(--line); margin-left: 6px; }
.evt b { color: var(--ink); }
.msg { margin: 8px 0 8px 6px; padding: 10px 12px; border-radius: 12px; background: #eef2fa; }
.msg.instr { background: #fff4d6; border: 2px solid #f0b400; }
.msg .h { font-size: 13px; color: var(--muted); margin-bottom: 2px; }
.msg.instr .h b::before { content: "📌 Указание · "; }
.msg .t { white-space: pre-wrap; }
.done-note { background: #e6f5ea; border-radius: 12px; padding: 10px 12px; margin: 8px 0; }

.ann { border-left: 6px solid #f0b400; }
.ann .t { white-space: pre-wrap; margin: 6px 0; }
.item { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: 0; }
.item .nm { flex: 1; font-weight: 700; }
.item { flex-wrap: wrap; }
.item .nm { min-width: 0; word-break: break-word; }
.item select { flex: 1 1 100%; width: 100%; min-height: 48px; }
.icbtn { min-width: 44px; min-height: 44px; border-radius: 12px; border: 2px solid var(--line); background: #fff; cursor: pointer; font-size: 18px; }
.menu-btn { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; text-align: left; background: #fff; border: 0; border-radius: var(--radius);
  padding: 10px 14px; margin-bottom: 8px; font-weight: 700; font-size: 17px; box-shadow: 0 1px 2px rgba(20,30,50,.08); cursor: pointer; color: inherit; text-decoration: none; }
.menu-btn .ic { font-size: 24px; width: 32px; text-align: center; }

/* вход */
.login { padding: calc(24px + env(safe-area-inset-top)) 16px 30px; }
.login h1 { font-size: 24px; margin: 0 0 4px; } .login .sub { color: var(--muted); margin-bottom: 18px; }
.ubtn { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 66px; border: 2px solid var(--line); background: #fff; border-radius: 14px; padding: 10px 14px; margin-bottom: 10px; cursor: pointer; font-size: 19px; font-weight: 700; text-align: left; }
.ubtn small { display: block; font-weight: 500; color: var(--muted); font-size: 14px; }
.ava { width: 44px; height: 44px; border-radius: 50%; background: var(--brand2); color: #fff; display: grid; place-items: center; font-weight: 800; flex: none; }
.hint { background: #fff8e1; border: 1px dashed #d9a800; border-radius: 12px; padding: 10px 12px; font-size: 14px; margin-top: 14px; }
.dots { display: flex; gap: 16px; justify-content: center; margin: 18px 0; }
.dots i { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--brand); }
.dots i.on { background: var(--brand); }
.dots.bad { animation: shake .35s; } .dots.bad i { border-color: var(--danger); background: var(--danger); }
@keyframes shake { 20%,60% { transform: translateX(-8px);} 40%,80% { transform: translateX(8px);} }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 320px; margin: 0 auto; }
.pad button { min-height: 64px; border-radius: 16px; border: 0; background: #fff; font-size: 26px; font-weight: 700; box-shadow: 0 1px 2px rgba(20,30,50,.15); cursor: pointer; }
.pad button:active { background: #dfe8fb; }

/* всплывающие окна */
.ov { position: fixed; inset: 0; background: rgba(10,18,35,.55); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: #fff; width: 100%; max-width: 640px; max-height: 90vh; overflow: auto; border-radius: 20px 20px 0 0; padding: 16px 16px calc(18px + env(safe-area-inset-bottom)); }
.sheet h2 { margin: 0 0 4px; font-size: 20px; }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 60; display: grid; place-items: center; }
.lightbox img { max-width: 100%; max-height: 100%; }
#toast { position: fixed; left: 50%; bottom: calc(80px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px); background: #1b2230; color: #fff;
  padding: 12px 18px; border-radius: 12px; opacity: 0; pointer-events: none; transition: .25s; z-index: 100; max-width: 90%; text-align: center; font-weight: 600; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.err { background: var(--danger); }

/* ---------- v3: кабинет, схемы, пикеры, отчёты, тема ---------- */
html.big body, html.big { font-size: 20px; }
html.big .muted { font-size: 16px; } html.big .tabs a { font-size: 14px; } html.big .pill { font-size: 15px; }
html.big input, html.big select, html.big textarea, html.big .btn { font-size: 19px; }
input[type=number], input[type=date], input[type=time] { width: 100%; min-height: var(--tap); padding: 8px 10px; border: 2px solid var(--line); border-radius: 12px; background: #fff; font-size: 16px; }
.top .who { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; }
.top .bell { color: #fff; text-decoration: none; font-size: 22px; position: relative; padding: 6px; min-width: 44px; text-align: center; }
.top .bell .badge { top: -2px; left: 60%; }
.ava { overflow: hidden; object-fit: cover; font-size: 16px; }
.ava.sm { width: 34px; height: 34px; font-size: 13px; }
.ava.xs { width: 22px; height: 22px; font-size: 10px; display: inline-grid; vertical-align: middle; }
.ava.lg { width: 96px; height: 96px; font-size: 34px; }
img.ava { display: inline-block; background: #ccd5e3; }
.people { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: 14px; }
.people span { display: inline-flex; align-items: center; gap: 5px; }
.pill.late { background: #8e1b1b; }
.stat { border: 0; font: inherit; cursor: pointer; color: inherit; }
.stat.on { outline: 3px solid var(--brand2); } .stat.late b { color: var(--danger); }
.banner { border-left: 6px solid #f0b400 !important; background: #fff8e1; }
.banner.info { background: #e8f0ff; border-left-color: var(--brand2) !important; }
.banner.loc { background: #e9f7ee; border-left-color: var(--ok) !important; }
.warnbar { background: #fff1e0; color: #8a4b00; padding: 10px 12px; border-radius: 12px; margin: 8px 12px; font-size: 14px; }
.modebar { background: #e3e9f5; border-radius: 10px; padding: 8px 12px; margin-bottom: 12px; font-size: 14px; }
.modebar.ok { background: #e6f5ea; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 8px; -webkit-overflow-scrolling: touch; }
.chips .chip { flex: none; padding: 0 14px; display: inline-flex; align-items: center; text-decoration: none; color: inherit; min-height: 44px; }
.chips .chip.on .muted { color: #fff; }
.seg.wrap { flex-wrap: wrap; } .seg.wrap button { flex: 1 1 18%; min-width: 64px; }
.dlabel { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.dlabel input { flex: 1; min-width: 0; }
.dndrow { margin: 6px 0; } .dndrow .dlabel { flex: 1; }
.gtitle { font-weight: 800; margin: 12px 0 2px; }
.gtitle:first-child { margin-top: 0; }
.item.off { opacity: .55; }
.item.user, .item[data-act] { cursor: pointer; }
a.item { color: inherit; text-decoration: none; }
.item .ic { font-size: 24px; }
.chev { color: var(--muted); font-size: 24px; }
.mitem { display: flex; align-items: center; gap: 12px; min-height: 56px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; font-weight: 700; }
.mitem:last-child { border-bottom: 0; } .mitem .ic { font-size: 22px; width: 30px; text-align: center; } .mitem .nm { flex: 1; }
.card.menu > b { display: block; margin-bottom: 4px; }
.profile { display: flex; gap: 16px; align-items: center; }
.avabig { position: relative; cursor: pointer; flex: none; }
.avabig input { position: absolute; inset: 0; opacity: 0; width: 100%; }
.avabig .cam { position: absolute; right: -2px; bottom: -2px; background: #fff; border-radius: 50%; width: 34px; height: 34px; display: grid; place-items: center; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.pname { font-size: 20px; font-weight: 800; }
.tgl { display: flex; align-items: center; gap: 10px; min-height: 52px; border-bottom: 1px solid var(--line); cursor: pointer; }
.tgl span { flex: 1; font-weight: 600; }
.tgl input { position: absolute; opacity: 0; pointer-events: none; }
.tgl i { width: 52px; height: 30px; border-radius: 99px; background: #c4ccd9; position: relative; transition: .2s; flex: none; }
.tgl i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: .2s; }
.tgl input:checked + i { background: var(--ok); } .tgl input:checked + i::after { left: 25px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-bottom: 10px; }
.kpi { background: var(--card); border-radius: 12px; padding: 10px 6px; text-align: center; box-shadow: 0 1px 2px rgba(20,30,50,.08); text-decoration: none; color: inherit; border: 1px solid var(--line); }
.kpi b { display: block; font-size: 24px; } .kpi span { font-size: 12px; color: var(--muted); }
.kpi.ok b { color: var(--ok); } .kpi.red b { color: var(--danger); } .kpi.wide { grid-column: span 2; }
.late-list a { display: block; padding: 6px 0; color: var(--danger); text-decoration: none; font-weight: 600; font-size: 15px; }
.rtable { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 6px; }
.rtable th, .rtable td { padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: right; }
.rtable th:first-child, .rtable td:first-child { text-align: left; }
.rrow { display: block; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 15px; color: inherit; text-decoration: none; }
.rrow a { font-weight: 700; }
.printhead { display: none; }
.hitem { padding: 8px 0; border-bottom: 1px solid var(--line); } .hlist { margin: 4px 0 8px; padding-left: 20px; }
.notif { border-left-color: var(--line); } .notif.unread { border-left-color: var(--brand2); background: #f3f7ff; }
.pinrow code.pin { font-size: 20px; font-weight: 800; letter-spacing: 3px; min-width: 64px; text-align: center; }
.pinrow { flex-wrap: nowrap; } .pinrow .nm { font-size: 15px; }
.opick .olist { max-height: 260px; overflow-y: auto; border: 2px solid var(--line); border-radius: 12px; margin-top: 6px; }
.oitem { display: block; width: 100%; text-align: left; min-height: 48px; padding: 10px 12px; background: var(--card); border: 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.oitem.on { background: #e6efff; font-weight: 700; }
.onum { color: var(--brand2); } .tag { font-size: 11px; background: #fff3cd; color: #7a5a00; border-radius: 6px; padding: 1px 6px; }
.row.nowrap { flex-wrap: nowrap; }
.arch { display: flex; gap: 10px; align-items: stretch; }
.athumb { width: 84px; height: 84px; border-radius: 10px; object-fit: cover; flex: none; background: #e3e8f0; }
.athumb.none { display: grid; place-items: center; font-size: 12px; color: var(--muted); }
.abody { flex: 1; min-width: 0; }
.ubtn.on { border-color: var(--brand2); background: #e6efff; }
.btn.danger { background: var(--danger); }
#toast.click { pointer-events: auto; cursor: pointer; }
.sheet h3 { margin: 0 0 8px; }

/* схема */
.sch { position: fixed; inset: 0; z-index: 70; background: #0d1117; display: flex; flex-direction: column; color: #fff; }
.sch-top { display: flex; align-items: center; gap: 10px; padding: calc(8px + env(safe-area-inset-top)) 10px 8px; background: #161d29; }
.sch-top .back { background: rgba(255,255,255,.15); border: 0; color: #fff; width: 44px; height: 44px; border-radius: 12px; font-size: 20px; }
.sch-title small { display: block; opacity: .7; }
.sch-hint { background: #f0b400; color: #000; padding: 8px 12px; font-size: 15px; }
.sch-stage { flex: 1; position: relative; overflow: hidden; touch-action: none; }
.sch-inner { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.sch-inner img { width: 100%; height: 100%; display: block; user-select: none; -webkit-user-select: none; }
.sch-mark { position: absolute; transform-origin: 50% 100%; pointer-events: none; }
.sch-mark span { display: block; background: var(--brand2); color: #fff; font-size: 13px; font-weight: 700; padding: 3px 8px; border-radius: 8px; white-space: nowrap; box-shadow: 0 2px 6px rgba(0,0,0,.4); position: relative; }
.sch-mark span::after { content: ''; position: absolute; left: 50%; bottom: -6px; margin-left: -6px; border: 6px solid transparent; border-bottom: 0; border-top-color: inherit; border-top-color: var(--brand2); }
.sch-mark.hl span { background: var(--danger); font-size: 15px; } .sch-mark.hl span::after { border-top-color: var(--danger); }
.sch-mark.pick span { background: #f0b400; color: #000; } .sch-mark.pick span::after { border-top-color: #f0b400; }
.sch-ctrl { display: flex; gap: 8px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: #161d29; }
.sch-ctrl button { min-width: 52px; min-height: 48px; border-radius: 12px; border: 0; background: rgba(255,255,255,.15); color: #fff; font-size: 20px; font-weight: 700; }
.sch-ctrl button.ok { background: var(--ok); flex: 1; font-size: 16px; } .sch-ctrl button:disabled { opacity: .45; }

/* тёмная тема */
html[data-theme=dark] { --bg: #0f141b; --card: #1a212c; --ink: #e8edf5; --muted: #9aa6b8; --line: #2c3544; --brand: #0b2a63; }
html[data-theme=dark] input, html[data-theme=dark] select, html[data-theme=dark] textarea, html[data-theme=dark] .chip, html[data-theme=dark] .seg button,
html[data-theme=dark] .ubtn, html[data-theme=dark] .pad button, html[data-theme=dark] .icbtn, html[data-theme=dark] .stat, html[data-theme=dark] .tabs,
html[data-theme=dark] .sheet, html[data-theme=dark] .oitem, html[data-theme=dark] .kpi { background: var(--card); color: var(--ink); }
html[data-theme=dark] .btn.sec { background: #263247; color: #dfe7f5; } html[data-theme=dark] .pill.eq { background: #2a3550; color: #dfe7f5; }
html[data-theme=dark] .msg { background: #212b3a; } html[data-theme=dark] .msg.instr, html[data-theme=dark] .banner, html[data-theme=dark] .hint { background: #3a3014; }
html[data-theme=dark] .banner.info { background: #1b2a47; } html[data-theme=dark] .banner.loc, html[data-theme=dark] .done-note { background: #173322; }
html[data-theme=dark] .seg button.on, html[data-theme=dark] .oitem.on, html[data-theme=dark] .ubtn.on, html[data-theme=dark] .notif.unread { background: #1d3157; color: #fff; }
html[data-theme=dark] .modebar { background: #263247; } html[data-theme=dark] .warnbar { background: #3d2a12; color: #ffcf8a; }

@media print {
  .top, .tabs, .noprint, #toast { display: none !important; }
  .printhead { display: block; } main { padding: 0; } .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
  html[data-theme=dark] { --bg: #fff; --card: #fff; --ink: #000; }
}
/* правки вёрстки v3 */
#tpls { flex-wrap: wrap; overflow: visible; }
.pinrow { flex-wrap: wrap; row-gap: 6px; }
.pinrow .nm { flex: 1 1 calc(100% - 60px); }
.pinrow code.pin { margin-left: 54px; flex: 1; text-align: left; }
.top .who span { font-size: 12px; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
@media (max-width: 480px) { .top .who span { display: none; } }
/* не даём длинным спискам и полям даты раздвигать страницу */
.filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.filters > *, .row > input, .row > select { min-width: 0; max-width: 100%; }
select { text-overflow: ellipsis; }
.dlabel input { min-width: 0; }

/* язык, звуки, квота, ТО, голос, повторность */
.langbar { display:flex; gap:6px; justify-content:center; margin:8px 0 12px; }
.langbar button { min-width:64px; min-height:36px; border-radius:18px; border:1px solid var(--line); background:var(--card); color:var(--ink); font-weight:700; font-size:14px; }
.langbar button.on { background:var(--brand); color:#fff; border-color:transparent; }
.login .langbar { margin-bottom:4px; }
.qbar { position:relative; height:16px; border-radius:8px; background:var(--line); margin:6px 0 12px; overflow:hidden; }
.qbar i { display:block; height:100%; background:var(--ok,#2a9d6a); border-radius:8px; }
.qbar.warn i { background:#e6a100; }
.qbar.bad i { background:var(--danger); }
.qbar span { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:700; }
.qlabel { font-weight:700; margin-top:8px; }
.sound-preview { display:flex; flex-direction:column; gap:6px; margin:10px 0; }
.srow { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.voice-btn { margin:6px 0 8px; border:0; background:#e8eef8; color:var(--brand,#0b2a63); font-weight:700; border-radius:12px; min-height:40px; padding:0 12px; }
.voice-btn.on { background:#c4452e; color:#fff; }
.voice-hint { font-size:13px; }
.pill.repeat { background:#5b3d12; color:#ffd9a0; }
.export-bar { display:flex; flex-wrap:wrap; gap:8px; margin:10px 0 16px; }
.export-bar .btn { flex:1 1 140px; }
.to-item { border:1px solid var(--line); border-radius:12px; padding:10px; margin:8px 0; }
.to-item.ok { border-color:#2a9d6a; background:rgba(42,157,106,.08); }
.to-item.bad { border-color:var(--danger); background:rgba(196,69,46,.08); }
.to-item .seg { margin:8px 0; }
.to-item .seg label { flex:1; text-align:center; cursor:pointer; }
.to-item .seg label:has(input:checked), .to-item .seg label.on { background:var(--brand); color:#fff; }
html[data-theme=dark] .voice-btn { background:#263247; color:#dfe7f5; }
html[data-theme=dark] .qbar { background:#2c3544; }
.banner.warn { background:#3d2a12; color:#ffcf8a; }

/* инструкция */
.help-login { text-align:center; margin:18px 0 8px; }
.help-login a { font-weight:700; }
.help-page { text-align:left; max-width:640px; margin:0 auto; padding-bottom:40px; }
.help-page h1 { text-align:center; }
.help-toc-list { display:flex; flex-direction:column; gap:4px; margin-top:8px; }
button.help-jump { display:block; width:100%; text-align:left; background:none; border:0; color:var(--brand2); font-weight:600; padding:8px 0; cursor:pointer; }
.help-sec { background:var(--card); border-radius:var(--radius); padding:14px; margin-bottom:10px; box-shadow:0 1px 2px rgba(20,30,50,.08); }
.help-sec h2 { font-size:18px; margin:0 0 8px; }
.help-steps { list-style:none; padding:0; margin:8px 0 0; }
.help-steps li { display:flex; gap:10px; margin:0 0 10px; }
.help-steps .n { flex:0 0 24px; height:24px; border-radius:50%; background:var(--brand); color:#fff; font-size:13px; font-weight:700; display:flex; align-items:center; justify-content:center; margin-top:2px; }
.help-faq { border-top:1px solid var(--line); padding:8px 0; }
.help-faq summary { cursor:pointer; font-weight:700; }
.help-faq p { margin:8px 0 0; color:var(--muted); }
#sec-faq, .help-sec { scroll-margin-top:70px; }
html[data-theme=dark] button.help-jump { color:#8cb4ff; }
