/* =========================================================
   Дом в порядке · Экосервис Шолохово — дизайн-система v5
   Концепция «Тёплый двор»
   ========================================================= */
:root{
  --brand:#5CB85C; --brand-strong:#2E7D32; --brand-press:#256B29; --brand-tint:#EAF6EA; --on-brand:#FFFFFF;
  --bg:#F4F6F3; --surface:#FFFFFF; --surface-2:#F6F8F5; --surface-3:#EDF1EC;
  --ink:#16201A; --ink-2:#4B5A52; --ink-3:#5F6E65; --line:#E3E8E2;
  --sun:#F5B82E; --sun-tint:#FFF5D9; --sun-ink:#6E4A00;
  --st-new:#2F6FED; --st-new-ink:#2252B8; --st-new-t:#E8EFFE;
  --st-work:#E08A00; --st-work-ink:#8A5200; --st-work-t:#FFF0D9;
  --st-check:#7A5AF8; --st-check-ink:#5A3DD1; --st-check-t:#EFEBFF;
  --st-done:#2E7D32; --st-done-ink:#256B29; --st-done-t:#E6F4E6;
  --st-late:#D93A3A; --st-late-ink:#B42323; --st-late-t:#FDECEC;
  --c-yellow:#FFF3D1; --c-yellow-i:#8A6100; --c-teal:#DFF4EE; --c-teal-i:#14705A;
  --c-orange:#FFE9DA; --c-orange-i:#A44C0C; --c-blue:#E4EEFE; --c-blue-i:#2252B8;
  --c-green:#E4F3E4; --c-green-i:#2E7D32; --c-red:#FDE6E6; --c-red-i:#B42323;
  --c-gray:#ECEFEC; --c-gray-i:#4B5A52;
  --r-card:22px; --r-btn:14px; --r-chip:999px;
  --shadow:0 1px 2px rgba(22,32,26,.04),0 8px 24px rgba(22,32,26,.06);
  --shadow-lg:0 -2px 10px rgba(22,32,26,.04),0 24px 64px rgba(22,32,26,.18);
  --ease:cubic-bezier(.2,.8,.2,1);
  --tab-h:64px; --safe-b:env(safe-area-inset-bottom,0px); --safe-t:env(safe-area-inset-top,0px);
  color-scheme:light;
}
@media (prefers-color-scheme:dark){
  :root{
    --brand-strong:#6CCB6C; --brand-press:#5CB85C; --brand-tint:#1E2E20; --on-brand:#0F1411;
    --bg:#0F1411; --surface:#182019; --surface-2:#1D261F; --surface-3:#242E26;
    --ink:#EEF3EE; --ink-2:#A9B5AC; --ink-3:#97A49A; --line:#26302A;
    --sun-tint:#2E2814; --sun-ink:#F5CF73;
    --st-new-ink:#8FB2FF; --st-new-t:#1A2440; --st-work-ink:#FFBE5C; --st-work-t:#33260F;
    --st-check-ink:#B9A6FF; --st-check-t:#251F3F; --st-done-ink:#86D686; --st-done-t:#1C2E1D;
    --st-late-ink:#FF8A8A; --st-late-t:#3A1A1A;
    --c-yellow:#332A12; --c-yellow-i:#F5CF73; --c-teal:#14302A; --c-teal-i:#6FD6B8;
    --c-orange:#36220F; --c-orange-i:#FFAE73; --c-blue:#1A2440; --c-blue-i:#8FB2FF;
    --c-green:#1C2E1D; --c-green-i:#86D686; --c-red:#3A1A1A; --c-red-i:#FF8A8A;
    --c-gray:#242E26; --c-gray-i:#C2CCC4;
    --shadow:0 1px 2px rgba(0,0,0,.3),0 8px 24px rgba(0,0,0,.25);
    --shadow-lg:0 24px 64px rgba(0,0,0,.6);
    color-scheme:dark;
  }
}

/* ---------- База ---------- */
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--ink);font-family:'Onest',-apple-system,BlinkMacSystemFont,'SF Pro Text','Segoe UI',Roboto,Arial,sans-serif;font-size:16px;line-height:1.45;-webkit-font-smoothing:antialiased;min-height:100dvh}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer;background:none;border:0;padding:0}
a{color:inherit;text-decoration:none}
h1,h2,h3,h4,p{margin:0}
svg{display:block;flex:none}
img{max-width:100%;display:block}
:focus-visible{outline:3px solid color-mix(in srgb,var(--brand-strong) 55%,transparent);outline-offset:2px;border-radius:10px}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
input[type=text],input[type=tel],input[type=search],input[type=date],input[type=time],textarea{width:100%;background:var(--surface-2);border:1.5px solid transparent;border-radius:14px;padding:13px 14px;font-size:16px;outline:none;transition:border-color .18s,background .18s}
input:focus,textarea:focus{border-color:var(--brand-strong);background:var(--surface)}
textarea{resize:none;min-height:120px;line-height:1.45}
::placeholder{color:var(--ink-3);opacity:1}
label.lbl{display:block;font-size:14px;font-weight:600;color:var(--ink-2);margin:0 0 8px}
.field{margin-bottom:18px}
.hint{font-size:13px;color:var(--ink-3);margin-top:6px}

/* ---------- Каркас ---------- */
.layout{min-height:100dvh}
.main{min-width:0}
.page{padding:8px 16px calc(var(--tab-h) + var(--safe-b) + 28px);max-width:1120px;margin:0 auto}
.is-sub .page{padding-bottom:28px}
.sidebar{display:none}

/* Шапка */
.appbar{position:sticky;top:0;z-index:20;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:calc(10px + var(--safe-t)) 16px 10px;background:color-mix(in srgb,var(--bg) 86%,transparent);backdrop-filter:saturate(1.6) blur(16px);-webkit-backdrop-filter:saturate(1.6) blur(16px);transition:box-shadow .2s}
.appbar.scrolled{box-shadow:0 1px 0 var(--line)}
.brand{display:flex;align-items:center;gap:10px;min-width:0}
.brand b{display:block;font-size:15px;font-weight:700;line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.brand small{display:block;font-size:12px;font-weight:500;color:var(--ink-3);line-height:1.2}
.brand .logo{border-radius:10px;box-shadow:0 2px 8px rgba(46,125,50,.25)}
.appbar-act{display:flex;align-items:center;gap:8px}
.demo-chip .rl{display:inline}
@media (max-width:430px){.demo-chip .rl{display:none}}
.demo-chip{height:32px;padding:0 11px;border-radius:var(--r-chip);background:var(--sun-tint);color:var(--sun-ink);font-size:12px;font-weight:700;letter-spacing:.2px;white-space:nowrap}
.icon-btn{width:44px;height:44px;display:grid;place-items:center;border-radius:14px;color:var(--ink);position:relative;transition:background .15s}
.icon-btn:hover{background:var(--surface-3)}
.icon-btn:active{transform:scale(.94)}
.icon-btn.filled{background:var(--surface)}
.badge-dot{position:absolute;top:6px;right:5px;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:var(--st-late);color:#fff;font-size:11px;font-weight:700;display:grid;place-items:center;border:2px solid var(--bg)}

/* Таб-бар */
.tabbar{position:fixed;left:0;right:0;bottom:0;z-index:30;display:grid;grid-auto-flow:column;grid-auto-columns:1fr;align-items:center;height:calc(var(--tab-h) + var(--safe-b));padding:0 6px var(--safe-b);background:color-mix(in srgb,var(--surface) 92%,transparent);backdrop-filter:saturate(1.6) blur(18px);-webkit-backdrop-filter:saturate(1.6) blur(18px);border-top:1px solid var(--line)}
.tab{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;height:var(--tab-h);font-size:12px;font-weight:600;color:var(--ink-3);position:relative}
.tab .ic-wrap{display:grid;place-items:center;width:52px;height:30px;border-radius:15px;transition:background .2s var(--ease)}
.tab.active{color:var(--brand-strong)}
.tab.active .ic-wrap{background:var(--brand-tint)}
.tab .tb{position:absolute;top:6px;left:calc(50% + 8px);min-width:17px;height:17px;padding:0 4px;border-radius:9px;background:var(--st-late);color:#fff;font-size:10.5px;font-weight:700;display:grid;place-items:center}
.tab-plus{display:grid;place-items:center}
.tab-plus span{width:56px;height:56px;border-radius:20px;background:#2E7D32;color:#fff;display:grid;place-items:center;box-shadow:0 8px 20px rgba(46,125,50,.35);transform:translateY(-10px);transition:transform .18s var(--ease)}
.tab-plus:active span{transform:translateY(-10px) scale(.94)}

/* ---------- Типографика ---------- */
.page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin:10px 0 16px}
.page-head h1,.h1{font-size:28px;line-height:1.15;font-weight:700;letter-spacing:-.6px}
.page-head p{color:var(--ink-2);font-size:15px;margin-top:4px}
.sec{margin-top:28px}
.sec-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:12px}
.sec-head h2{font-size:20px;font-weight:700;letter-spacing:-.3px}
.sec-head a,.sec-head button{font-size:15px;font-weight:600;color:var(--brand-strong);min-height:44px;display:inline-flex;align-items:center;gap:2px;margin:-12px 0}
.muted{color:var(--ink-2)}
.small{font-size:14px}

/* ---------- Кнопки ---------- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:0 18px;border-radius:var(--r-btn);font-size:16px;font-weight:600;white-space:nowrap;transition:transform .15s var(--ease),background .15s,opacity .15s;user-select:none}
.btn:active{transform:scale(.97)}
.btn:disabled{opacity:.45;pointer-events:none}
.btn-lg{min-height:54px;font-size:17px;border-radius:16px}
.btn-sm{min-height:44px;padding:0 14px;font-size:15px;border-radius:12px}
.btn-block{width:100%}
.btn-primary{background:var(--brand-strong);color:var(--on-brand)}
.btn-primary:hover{background:var(--brand-press)}
.btn-secondary{background:var(--surface-3);color:var(--ink)}
.btn-tint{background:var(--brand-tint);color:var(--brand-strong)}
.btn-ghost{color:var(--brand-strong)}
.btn-danger{background:var(--st-late-t);color:var(--st-late-ink)}
.btn-sun{background:var(--sun);color:#3A2800}
.btn-row{display:flex;gap:10px}
.btn-row>.btn{flex:1}

/* Чипы */
.chips{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;margin:0 -16px;padding:2px 16px 4px}
.chips::-webkit-scrollbar{display:none}
.chips.wrap{flex-wrap:wrap;overflow:visible;margin:0;padding:0}
.chip{flex:none;display:inline-flex;align-items:center;gap:6px;min-height:40px;padding:0 15px;border-radius:var(--r-chip);background:var(--surface);color:var(--ink-2);font-size:15px;font-weight:600;box-shadow:inset 0 0 0 1px var(--line);transition:background .15s,color .15s}
.chip.active{background:var(--ink);color:var(--surface);box-shadow:none}
.chip .n{font-size:13px;opacity:.75}
.chip.big{min-height:46px;padding:0 17px;font-size:16px}

/* Сегменты */
.seg{display:flex;background:var(--surface-3);border-radius:14px;padding:3px;gap:2px}
.seg button{flex:1;min-height:40px;border-radius:11px;font-size:14px;font-weight:600;color:var(--ink-2);padding:0 8px;white-space:nowrap;display:flex;align-items:center;justify-content:center;gap:6px}
.seg button.active{background:var(--surface);color:var(--ink);box-shadow:0 1px 3px rgba(0,0,0,.08)}
.seg .n{display:inline-grid;place-items:center;min-width:20px;height:20px;padding:0 5px;border-radius:10px;background:var(--surface-3);font-size:12px}
.seg button.active .n{background:var(--brand-tint);color:var(--brand-strong)}
.seg .n.red{background:var(--st-late);color:#fff}
.seg-scroll{overflow-x:auto;scrollbar-width:none;margin:0 -16px;padding:0 16px}
.seg-scroll::-webkit-scrollbar{display:none}
.seg-scroll .seg{width:max-content;min-width:100%}

/* ---------- Карточки ---------- */
.card{background:var(--surface);border-radius:var(--r-card);box-shadow:var(--shadow)}
.pad{padding:18px}
.stack{display:grid;gap:10px}

/* Иконка категории */
.cat{display:grid;place-items:center;width:44px;height:44px;border-radius:14px;flex:none}
.cat.sm{width:36px;height:36px;border-radius:12px}
.cat.lg{width:56px;height:56px;border-radius:18px}
.c-yellow{background:var(--c-yellow);color:var(--c-yellow-i)} .c-teal{background:var(--c-teal);color:var(--c-teal-i)}
.c-orange{background:var(--c-orange);color:var(--c-orange-i)} .c-blue{background:var(--c-blue);color:var(--c-blue-i)}
.c-green{background:var(--c-green);color:var(--c-green-i)} .c-red{background:var(--c-red);color:var(--c-red-i)}
.c-gray{background:var(--c-gray);color:var(--c-gray-i)}

/* Статусы */
.pill{display:inline-flex;align-items:center;gap:6px;font-size:13px;font-weight:600;white-space:nowrap}
.pill i{width:8px;height:8px;border-radius:50%;background:currentColor}
.pill.st-new{color:var(--st-new-ink)} .pill.st-work{color:var(--st-work-ink)} .pill.st-check{color:var(--st-check-ink)} .pill.st-done{color:var(--st-done-ink)}
.pill.solid{padding:6px 11px;border-radius:var(--r-chip)}
.pill.solid.st-new{background:var(--st-new-t)} .pill.solid.st-work{background:var(--st-work-t)} .pill.solid.st-check{background:var(--st-check-t)} .pill.solid.st-done{background:var(--st-done-t)}
.late{display:flex;align-items:center;gap:5px;color:var(--st-late-ink);font-size:13px;font-weight:600;margin-top:6px}
.urgent{display:inline-flex;color:var(--st-late);vertical-align:-2px;margin-right:4px}

/* Строка вопроса */
.row-card{display:flex;gap:12px;align-items:flex-start;padding:14px 12px 14px 14px;background:var(--surface);border-radius:20px;box-shadow:var(--shadow);cursor:pointer;transition:transform .15s var(--ease)}
.row-card:active{transform:scale(.985)}
.row-main{flex:1;min-width:0}
.row-main h3{font-size:16px;font-weight:600;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.row-meta{display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;margin-top:6px;font-size:13px;color:var(--ink-3)}
.row-meta>span:not(.pill){white-space:nowrap}
.row-meta .sep{width:3px;height:3px;border-radius:50%;background:var(--ink-3);opacity:.6}
.warn-t{color:var(--st-late-ink);font-weight:600}
.votes{display:flex;flex-direction:column;align-items:center;gap:1px;min-width:44px;color:var(--ink-3);font-size:13px;font-weight:600;padding-top:4px}

/* Кнопка поддержки */
.sup{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;min-width:48px;height:52px;border-radius:15px;color:var(--ink-2);background:var(--surface-2);font-size:13px;font-weight:700;transition:background .2s,color .2s}
.sup.on{background:var(--c-red);color:var(--st-late)}
.sup.on b{color:var(--st-late-ink)}
.sup.pop svg{animation:pop .45s var(--ease)}
@keyframes pop{0%{transform:scale(1)}35%{transform:scale(1.35)}100%{transform:scale(1)}}
.sup-wide{flex:1;display:flex;align-items:center;justify-content:center;gap:9px;min-height:54px;border-radius:16px;font-size:17px;font-weight:600;background:var(--brand-strong);color:var(--on-brand);transition:transform .15s var(--ease),background .2s}
.sup-wide.on{background:var(--c-red);color:var(--st-late-ink)}
.sup-wide:active{transform:scale(.97)}
.sup-wide.pop svg{animation:pop .45s var(--ease)}

/* Мини-карточки «Мои вопросы» */
.hscroll{display:flex;gap:10px;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;margin:0 -16px;padding:2px 16px 8px}
.hscroll::-webkit-scrollbar{display:none}
.mini{flex:none;width:228px;scroll-snap-align:start;background:var(--surface);border-radius:20px;box-shadow:var(--shadow);padding:14px;cursor:pointer;display:flex;flex-direction:column;gap:10px;transition:transform .15s var(--ease)}
.mini:active{transform:scale(.98)}
.mini h4{font-size:15px;font-weight:600;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:39px}
.dots{display:flex;gap:4px}
.dots i{flex:1;height:5px;border-radius:3px;background:var(--surface-3)}
.dots.st-new i.on{background:var(--st-new)} .dots.st-work i.on{background:var(--st-work)} .dots.st-check i.on{background:var(--st-check)} .dots.st-done i.on{background:var(--st-done)}
.mini-st{font-size:13px;font-weight:600;color:var(--ink-2)}
.mini-empty{width:100%;padding:18px;color:var(--ink-2);font-size:15px;display:flex;align-items:center;gap:12px}

/* ---------- Главная жителя ---------- */
.home{display:flex;flex-direction:column}
.home .col{display:contents}
.hello{order:0;display:flex;align-items:flex-end;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:8px 0 16px}
.addr-chip{display:inline-flex;align-items:center;gap:6px;min-height:36px;padding:0 12px;border-radius:var(--r-chip);background:var(--surface);box-shadow:inset 0 0 0 1px var(--line);font-size:14px;font-weight:600;color:var(--ink-2)}
.o1{order:1}.o2{order:2}.o3{order:3}.o4{order:4}.o5{order:5}.o6{order:6}.o7{order:7}
.cta-main{display:flex;align-items:center;gap:14px;padding:18px;border-radius:24px;background:#2E7D32;color:#fff;box-shadow:0 12px 28px rgba(46,125,50,.28);position:relative;overflow:hidden;transition:transform .15s var(--ease)}
.cta-main:active{transform:scale(.98)}
.cta-main:after{content:'';position:absolute;right:-30px;top:-40px;width:160px;height:160px;border-radius:50%;background:rgba(255,255,255,.08)}
.cta-main .plus{width:48px;height:48px;border-radius:16px;background:rgba(255,255,255,.18);display:grid;place-items:center}
.cta-main b{display:block;font-size:19px;font-weight:700;letter-spacing:-.2px}
.cta-main small{display:block;font-size:14px;opacity:.85;margin-top:2px}
.cta-main .chev{margin-left:auto;opacity:.85}
.qcats{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-top:10px}
.qcat{display:flex;flex-direction:column;align-items:center;gap:7px;padding:12px 4px 10px;background:var(--surface);border-radius:18px;box-shadow:var(--shadow);font-size:13px;font-weight:600;color:var(--ink-2);text-align:center;transition:transform .15s var(--ease)}
.qcat:active{transform:scale(.96)}
.decide{background:var(--sun-tint);border-radius:22px;padding:16px;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--sun) 40%,transparent)}
.decide+.decide{margin-top:10px}
.decide .k{display:flex;align-items:center;gap:6px;font-size:13px;font-weight:700;color:var(--sun-ink);text-transform:uppercase;letter-spacing:.4px}
.decide h3{font-size:17px;font-weight:600;margin:6px 0 4px;line-height:1.3;cursor:pointer}
.decide p{font-size:15px;color:var(--ink-2);margin-bottom:12px}
.house{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.stat{background:var(--surface);border-radius:20px;box-shadow:var(--shadow);padding:14px;display:flex;flex-direction:column;gap:2px;transition:transform .15s var(--ease)}
.stat:active{transform:scale(.97)}
.stat b{font-size:28px;font-weight:700;letter-spacing:-.8px;line-height:1.1}
.stat span{font-size:13px;font-weight:600;color:var(--ink-2)}
.stat.red b{color:var(--st-late-ink)} .stat.green b{color:var(--st-done-ink)} .stat.amber b{color:var(--st-work-ink)}
.uk-card{display:grid;grid-template-columns:1fr 1fr;gap:0;padding:0;overflow:hidden}
.metric{padding:16px 18px}
.metric+.metric{border-left:1px solid var(--line)}
.metric small{display:block;font-size:14px;font-weight:600;color:var(--ink-2)}
.metric b{display:flex;align-items:baseline;gap:5px;font-size:34px;font-weight:700;letter-spacing:-1px;margin-top:4px;line-height:1.1}
.metric b span{font-size:15px;font-weight:600;color:var(--ink-3);letter-spacing:0}
.metric b .star{color:var(--sun)}
.metric em{display:block;font-style:normal;font-size:13px;color:var(--ink-3);margin-top:2px}
.uk-card-wrap .btn{margin-top:10px}
.news{display:flex;flex-direction:column;gap:8px;padding:16px;background:var(--surface);border-radius:20px;box-shadow:var(--shadow)}
.news h3{font-size:16px;font-weight:600;line-height:1.3}
.news p{font-size:15px;color:var(--ink-2)}
.news .when{display:flex;align-items:center;gap:6px;font-size:14px;font-weight:600;color:var(--ink)}
.news time{font-size:13px;color:var(--ink-3)}
.tag{display:inline-flex;align-self:flex-start;align-items:center;gap:5px;padding:4px 10px;border-radius:var(--r-chip);font-size:12px;font-weight:700}
.tag.plan{background:var(--st-new-t);color:var(--st-new-ink)} .tag.off{background:var(--st-work-t);color:var(--st-work-ink)} .tag.info{background:var(--st-done-t);color:var(--st-done-ink)}

/* ---------- Список ---------- */
.list-tools{position:sticky;top:calc(64px + var(--safe-t));z-index:10;display:flex;gap:8px;padding:6px 0 10px;background:var(--bg)}
.search{flex:1;display:flex;align-items:center;gap:8px;padding:0 12px;border-radius:14px;background:var(--surface);box-shadow:inset 0 0 0 1px var(--line);color:var(--ink-3)}
.search input{background:transparent;border:0;padding:12px 0;min-width:0}
.search input:focus{background:transparent}
.filt{background:var(--surface);box-shadow:inset 0 0 0 1px var(--line)}
.filt .fdot{position:absolute;top:9px;right:9px;width:9px;height:9px;border-radius:50%;background:var(--brand-strong);border:2px solid var(--surface)}
.group-t{font-size:14px;font-weight:700;color:var(--ink-3);text-transform:uppercase;letter-spacing:.5px;margin:20px 4px 10px}
.count-line{font-size:14px;color:var(--ink-3);margin:12px 4px 2px}
.empty{text-align:center;padding:36px 20px;color:var(--ink-2)}
.empty .art{margin:0 auto 14px;width:96px;height:96px}
.empty h3{font-size:18px;color:var(--ink);margin-bottom:6px}
.empty p{font-size:15px;margin-bottom:16px}

/* ---------- Подстраница (вопрос, мастер) ---------- */
.subbar{position:sticky;top:0;z-index:20;display:flex;align-items:center;gap:6px;padding:calc(6px + var(--safe-t)) 8px 6px;background:color-mix(in srgb,var(--bg) 88%,transparent);backdrop-filter:saturate(1.6) blur(16px);-webkit-backdrop-filter:saturate(1.6) blur(16px)}
.subbar.scrolled{box-shadow:0 1px 0 var(--line)}
.subbar .t{flex:1;text-align:center;font-size:16px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.back{display:flex;align-items:center;gap:2px;min-height:44px;padding:0 10px 0 4px;border-radius:12px;font-size:16px;font-weight:500;color:var(--brand-strong)}
.detail{max-width:760px;margin:0 auto}
.d-head{display:flex;align-items:center;gap:10px;margin:6px 0 12px;flex-wrap:wrap}
.d-title{font-size:24px;line-height:1.22;font-weight:700;letter-spacing:-.5px}
.d-meta{display:flex;flex-wrap:wrap;gap:6px 14px;margin-top:10px;font-size:14px;color:var(--ink-2)}
.d-meta span{display:inline-flex;align-items:center;gap:5px}
.d-desc{font-size:16px;line-height:1.55;margin-top:16px;white-space:pre-wrap;overflow-wrap:anywhere}
.alert{display:flex;gap:10px;align-items:flex-start;padding:13px 14px;border-radius:16px;font-size:15px;font-weight:500;margin-top:14px}
.alert.red{background:var(--st-late-t);color:var(--st-late-ink)}
.alert.sun{background:var(--sun-tint);color:var(--sun-ink)}
.alert.gray{background:var(--surface-3);color:var(--ink-2)}
.alert.green{background:var(--brand-tint);color:var(--brand-strong)}
.alert a{text-decoration:underline;font-weight:700}

/* Степпер */
.stepper{list-style:none;margin:18px 0 0;padding:16px 12px 14px;display:grid;grid-template-columns:repeat(4,1fr);background:var(--surface);border-radius:20px;box-shadow:var(--shadow);counter-reset:s}
.stepper li{position:relative;display:flex;flex-direction:column;align-items:center;text-align:center;gap:4px;font-size:13px;color:var(--ink-3)}
.stepper li:before{content:'';position:absolute;top:11px;right:50%;width:100%;height:3px;background:var(--surface-3);z-index:0}
.stepper li:first-child:before{display:none}
.stepper li.done:before,.stepper li.cur:before{background:var(--brand-strong)}
.stepper .dot{position:relative;z-index:1;width:24px;height:24px;border-radius:50%;background:var(--surface-3);display:grid;place-items:center;color:var(--on-brand);border:4px solid var(--surface)}
.stepper li.done .dot{background:var(--brand-strong);border-width:0}
.stepper li.cur .dot{background:var(--brand-strong);box-shadow:0 0 0 5px var(--brand-tint);border-color:var(--surface)}
.stepper li.cur.st-check .dot{background:var(--st-check);box-shadow:0 0 0 5px var(--st-check-t)}
.stepper li.cur.late .dot{background:var(--st-late);box-shadow:0 0 0 5px var(--st-late-t)}
.stepper li.cur.last .dot{border-width:0}
.stepper b{font-size:13px;font-weight:600;color:var(--ink-2)}
.stepper li.cur b{color:var(--ink)}
.stepper small{font-size:12px;min-height:16px}
.stepper small.red{color:var(--st-late-ink);font-weight:600}

/* Фото */
.photos{display:flex;gap:8px;overflow-x:auto;margin-top:14px;scrollbar-width:none}
.photos button{flex:none;position:relative}
.photos img{width:120px;height:120px;object-fit:cover;border-radius:16px}
.photos .lb{position:absolute;left:6px;bottom:6px;font-size:11px;font-weight:700;color:#fff;background:rgba(0,0,0,.55);border-radius:8px;padding:2px 7px}

/* Лента-чат */
.feed{display:flex;flex-direction:column;gap:10px;margin-top:12px}
.ev-sys{align-self:center;max-width:90%;text-align:center;font-size:13px;color:var(--ink-3);padding:4px 10px}
.ev-sys b{font-weight:600;color:var(--ink-2)}
.ev{display:flex;gap:8px;max-width:88%}
.ev.uk{align-self:flex-start}
.ev.me{align-self:flex-end;flex-direction:row-reverse}
.ev .av{flex:none;width:32px;height:32px;border-radius:10px;overflow:hidden;align-self:flex-end}
.ev .av.res{display:grid;place-items:center;background:var(--surface-3);color:var(--ink-2)}
.bubble{padding:10px 13px;border-radius:18px;background:var(--surface);box-shadow:var(--shadow);font-size:15px;line-height:1.45;overflow-wrap:anywhere;white-space:pre-wrap}
.ev.uk .bubble{border-bottom-left-radius:6px}
.ev.me .bubble{background:var(--brand-tint);border-bottom-right-radius:6px;box-shadow:none}
.ev.mod .bubble{background:var(--st-check-t)}
.bubble .who{display:block;font-size:12px;font-weight:700;color:var(--ink-3);margin-bottom:3px;white-space:normal}
.bubble time{display:block;font-size:12px;color:var(--ink-3);margin-top:4px;white-space:normal}
.bubble img{margin-top:8px;border-radius:12px;max-height:180px}
.composer{display:flex;gap:8px;align-items:flex-end;margin-top:14px}
.composer textarea{min-height:48px;height:48px;max-height:140px;border-radius:24px;padding:12px 16px;background:var(--surface);box-shadow:inset 0 0 0 1px var(--line)}
.composer .send{flex:none;width:48px;height:48px;border-radius:50%;background:var(--brand-strong);color:var(--on-brand);display:grid;place-items:center}
.composer .send:disabled{opacity:.35}
.foot-link{display:flex;justify-content:center;margin:22px 0 4px}
.foot-link button{font-size:14px;color:var(--ink-3);display:inline-flex;align-items:center;gap:6px;min-height:44px}

/* Нижняя панель действий */
.actionbar{position:sticky;bottom:0;z-index:15;margin:20px -16px 0;padding:12px 16px calc(12px + var(--safe-b));background:color-mix(in srgb,var(--bg) 90%,transparent);backdrop-filter:saturate(1.6) blur(16px);-webkit-backdrop-filter:saturate(1.6) blur(16px);border-top:1px solid var(--line)}
.actionbar .q{font-size:14px;font-weight:600;color:var(--ink-2);margin-bottom:8px;text-align:center}
.is-sub .page{padding-bottom:0}

/* ---------- Мастер ---------- */
.wiz{max-width:640px;margin:0 auto;min-height:calc(100dvh - 120px);display:flex;flex-direction:column}
.progress{height:4px;border-radius:2px;background:var(--surface-3);margin:4px 8px 0;overflow:hidden}
.progress i{display:block;height:100%;background:var(--brand-strong);border-radius:2px;transition:width .3s var(--ease)}
.wiz h2{font-size:26px;font-weight:700;letter-spacing:-.5px;margin:18px 0 6px}
.wiz .sub{color:var(--ink-2);font-size:15px;margin-bottom:18px}
.cat-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.cat-tile{display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;gap:10px;min-height:104px;padding:14px;hyphens:auto;overflow-wrap:break-word;background:var(--surface);border-radius:20px;box-shadow:var(--shadow);text-align:left;font-size:16px;font-weight:600;line-height:1.25;transition:transform .15s var(--ease),box-shadow .15s}
.cat-tile:active{transform:scale(.97)}
.cat-tile.sel{box-shadow:inset 0 0 0 2px var(--brand-strong)}
.wiz-foot{position:sticky;bottom:0;margin:auto -16px 0;padding:14px 16px calc(14px + var(--safe-b));background:color-mix(in srgb,var(--bg) 92%,transparent);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)}
.picked{display:inline-flex;align-items:center;gap:8px;padding:6px 12px 6px 6px;border-radius:var(--r-chip);background:var(--surface);box-shadow:inset 0 0 0 1px var(--line);font-size:14px;font-weight:600;color:var(--ink-2);margin-bottom:16px;flex-wrap:nowrap;border-radius:16px;line-height:1.3}
.picked .cat{width:28px;height:28px;border-radius:9px}
.title-prev{display:flex;align-items:flex-start;gap:8px;margin-top:10px;padding:12px 14px;border-radius:14px;background:var(--surface);box-shadow:inset 0 0 0 1px var(--line);font-size:15px;text-align:left;width:100%}
.title-prev span{flex:1;min-width:0}
.title-prev small{display:block;font-size:12px;font-weight:700;color:var(--ink-3);text-transform:uppercase;letter-spacing:.4px;margin-bottom:2px}
.title-prev .ed{color:var(--brand-strong);flex:none}
.add-photo{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:64px;border-radius:18px;border:2px dashed color-mix(in srgb,var(--brand-strong) 45%,transparent);color:var(--brand-strong);font-size:16px;font-weight:600;background:var(--brand-tint)}
.thumbs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:10px}
.thumb{position:relative;width:84px;height:84px}
.thumb img{width:100%;height:100%;object-fit:cover;border-radius:14px}
.thumb button{position:absolute;top:-6px;right:-6px;width:28px;height:28px;border-radius:50%;background:var(--ink);color:var(--surface);display:grid;place-items:center;border:2px solid var(--bg)}
.toggle-row{display:flex;align-items:center;gap:12px;padding:14px;border-radius:18px;background:var(--surface);box-shadow:var(--shadow);margin-top:14px;cursor:pointer;width:100%;text-align:left}
.toggle-row .tx{flex:1}
.toggle-row b{display:block;font-size:16px;font-weight:600}
.toggle-row small{display:block;font-size:14px;color:var(--ink-2);margin-top:1px}
.switch{flex:none;width:51px;height:31px;border-radius:16px;background:var(--surface-3);position:relative;transition:background .2s}
.switch:after{content:'';position:absolute;top:2px;left:2px;width:27px;height:27px;border-radius:50%;background:#fff;box-shadow:0 2px 6px rgba(0,0,0,.2);transition:transform .22s var(--ease)}
.switch.on{background:var(--brand-strong)}
.switch.on:after{transform:translateX(20px)}
.toggle-row.danger .switch.on{background:var(--st-late)}
.success{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:30px 8px}
.success .ok{width:96px;height:96px;border-radius:50%;background:var(--brand-strong);color:var(--on-brand);display:grid;place-items:center;margin-bottom:22px;animation:okIn .5s var(--ease)}
.success .ok path{stroke-dasharray:30;stroke-dashoffset:30;animation:draw .45s .25s var(--ease) forwards}
@keyframes okIn{from{transform:scale(.4);opacity:0}to{transform:scale(1);opacity:1}}
@keyframes draw{to{stroke-dashoffset:0}}
.success h2{margin:0 0 8px}
.success p{color:var(--ink-2);font-size:16px;max-width:340px}
.success .due{display:inline-flex;align-items:center;gap:8px;margin:16px 0 26px;padding:10px 16px;border-radius:var(--r-chip);background:var(--surface);box-shadow:var(--shadow);font-weight:600}
.confetti{position:fixed;inset:0;pointer-events:none;z-index:60;overflow:hidden}
.confetti i{position:absolute;top:-12px;width:8px;height:12px;border-radius:2px;animation:fall 1.4s var(--ease) forwards}
@keyframes fall{to{transform:translateY(105vh) rotate(540deg);opacity:.2}}
.draft{display:flex;align-items:center;gap:10px;padding:12px 14px;border-radius:16px;background:var(--st-new-t);color:var(--st-new-ink);font-size:15px;font-weight:500;margin-bottom:16px}
.draft span{flex:1}

/* ---------- Оценка ---------- */
.big2{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.bigm{padding:18px;display:flex;flex-direction:column;gap:4px}
.bigm small{font-size:14px;font-weight:600;color:var(--ink-2)}
.bigm .v{display:flex;align-items:baseline;gap:4px;font-size:44px;font-weight:700;letter-spacing:-1.5px;line-height:1.05}
.bigm .v span{font-size:16px;font-weight:600;color:var(--ink-3);letter-spacing:0}
.bigm p{font-size:14px;color:var(--ink-2);margin-top:4px}
.ring{width:64px;height:64px;border-radius:50%;background:conic-gradient(var(--brand-strong) var(--p),var(--surface-3) 0);display:grid;place-items:center;margin-bottom:6px}
.ring:after{content:'';width:48px;height:48px;border-radius:50%;background:var(--surface)}
.bars{display:grid;gap:16px}
.bar-l{display:flex;justify-content:space-between;gap:10px;font-size:15px;margin-bottom:7px}
.bar-l span{color:var(--ink-2)}
.bar-l b{font-weight:700;white-space:nowrap}
.bar-l em{font-style:normal;font-size:13px;color:var(--ink-3);font-weight:500}
.bar-t{height:8px;border-radius:4px;background:var(--surface-3);overflow:hidden}
.bar-t i{display:block;height:100%;border-radius:4px;background:var(--brand-strong);transition:width .6s var(--ease)}
.bar-t.sun i{background:var(--sun)}
details.how{margin-top:12px}
details.how summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;min-height:48px;font-size:16px;font-weight:600}
details.how summary::-webkit-details-marker{display:none}
details.how[open] summary svg{transform:rotate(90deg)}
details.how summary svg{transition:transform .2s}
.steps{display:grid;gap:12px;font-size:15px;color:var(--ink-2)}
.steps div{display:flex;gap:10px}
.steps b{color:var(--ink);font-weight:600}
.steps svg{color:var(--brand-strong);margin-top:2px}
.vote-row{padding:14px 0;border-bottom:1px solid var(--line)}
.vote-row:last-of-type{border-bottom:0}
.vote-top{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:10px}
.vote-top b{font-size:16px;font-weight:600}
.vote-top button{font-size:14px;font-weight:600;color:var(--ink-3);min-height:36px;padding:0 10px;border-radius:10px}
.vote-top button.on{background:var(--surface-3);color:var(--ink)}
.stars{display:grid;grid-template-columns:repeat(5,1fr);gap:6px}
.stars button{height:48px;border-radius:14px;background:var(--surface-2);color:var(--ink-3);display:grid;place-items:center;transition:transform .12s,background .15s,color .15s}
.stars button.on{background:var(--sun-tint);color:var(--sun)}
.stars button:active{transform:scale(.92)}

/* ---------- Профиль ---------- */
.list{background:var(--surface);border-radius:var(--r-card);box-shadow:var(--shadow);overflow:hidden}
.li{display:flex;align-items:center;gap:12px;min-height:56px;padding:10px 16px;width:100%;text-align:left;font-size:16px}
.li+.li{border-top:1px solid var(--line)}
.li .tx{flex:1;min-width:0}
.li small{display:block;font-size:14px;color:var(--ink-3)}
.li .ic{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;flex:none}
.li .chev{color:var(--ink-3)}
.li.danger{color:var(--st-late-ink)}
.prof{display:flex;align-items:center;gap:14px;padding:18px}
.prof .av{width:56px;height:56px;border-radius:18px;background:var(--brand-tint);color:var(--brand-strong);display:grid;place-items:center}
.prof b{font-size:18px;font-weight:700;display:block}
.prof small{font-size:15px;color:var(--ink-2)}
.demo-box{padding:16px;border-radius:var(--r-card);background:var(--sun-tint)}
.demo-box p{font-size:14px;color:var(--sun-ink);margin-top:12px;line-height:1.5}
.version{font-size:13px;color:var(--ink-3);text-align:center;margin-top:18px}

/* ---------- Кабинет УК ---------- */
.quick{display:flex;align-items:center;gap:8px;margin-top:10px}
.quick .btn{min-height:40px;padding:0 14px;font-size:14px;border-radius:12px}
.quick .wait{font-size:13px;color:var(--ink-3);font-weight:500}
.tpls{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px}
.tpls button{text-align:left;min-height:40px;padding:8px 13px;border-radius:14px;background:var(--surface-2);box-shadow:inset 0 0 0 1px var(--line);font-size:14px;font-weight:500;line-height:1.3}
.tpls button.on{background:var(--brand-tint);box-shadow:inset 0 0 0 1.5px var(--brand-strong);color:var(--brand-strong)}
.log{display:flex;gap:12px;padding:14px 16px}
.log+.log{border-top:1px solid var(--line)}
.log .ic{width:36px;height:36px;border-radius:12px;display:grid;place-items:center;flex:none}
.log b{font-size:15px;font-weight:600}
.log p{font-size:15px;color:var(--ink-2);margin-top:2px;overflow-wrap:anywhere;white-space:pre-line}
.log time{font-size:13px;color:var(--ink-3)}

/* ---------- Шторки ---------- */
.sheet-wrap{position:fixed;inset:0;z-index:50;display:flex;align-items:flex-end;justify-content:center;background:rgba(10,20,14,0);transition:background .24s var(--ease)}
.sheet-wrap.open{background:rgba(10,20,14,.42)}
.sheet{width:100%;max-width:640px;max-height:92dvh;display:flex;flex-direction:column;background:var(--surface);border-radius:28px 28px 0 0;box-shadow:var(--shadow-lg);transform:translateY(100%);transition:transform .28s var(--ease)}
.sheet-wrap.open .sheet{transform:none}
.sheet.dragging{transition:none}
.grabber{width:40px;height:5px;border-radius:3px;background:var(--surface-3);margin:8px auto 0;flex:none}
.sheet-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 10px 6px 20px;flex:none;touch-action:none}
.sheet-head h2{font-size:21px;font-weight:700;letter-spacing:-.3px}
.sheet-body{padding:6px 20px calc(20px + var(--safe-b));overflow-y:auto;overscroll-behavior:contain}
.sheet-body .lead{color:var(--ink-2);font-size:15px;margin-bottom:16px}
.sheet-foot{display:flex;gap:10px;margin-top:20px}
.sheet-foot .btn{flex:1}
.viewer{position:fixed;inset:0;z-index:70;background:rgba(0,0,0,.92);display:grid;place-items:center;padding:20px}
.viewer img{max-height:88dvh;border-radius:12px}
.viewer button{position:absolute;top:calc(12px + var(--safe-t));right:12px;color:#fff;background:rgba(255,255,255,.14)}
.role-opt{display:flex;align-items:center;gap:14px;width:100%;padding:14px;border-radius:18px;background:var(--surface-2);text-align:left}
.role-opt+.role-opt{margin-top:8px}
.role-opt.on{background:var(--brand-tint);box-shadow:inset 0 0 0 2px var(--brand-strong)}
.role-opt .ic{width:44px;height:44px;border-radius:14px;background:var(--surface);display:grid;place-items:center;color:var(--brand-strong);flex:none}
.role-opt b{display:block;font-size:16px;font-weight:600}
.role-opt small{font-size:14px;color:var(--ink-2)}
.notice{display:flex;gap:12px;padding:12px 0}
.notice+.notice{border-top:1px solid var(--line)}
.notice .ic{width:36px;height:36px;border-radius:12px;background:var(--brand-tint);color:var(--brand-strong);display:grid;place-items:center;flex:none}
.notice p{font-size:15px}
.notice time{font-size:13px;color:var(--ink-3)}
.notice.unread p{font-weight:600}
.digest{width:100%;min-height:220px;font-family:ui-monospace,Menlo,monospace;font-size:14px}

/* ---------- Онбординг ---------- */
.onb{position:fixed;inset:0;z-index:80;background:var(--bg);display:flex;flex-direction:column;padding:calc(16px + var(--safe-t)) 20px calc(20px + var(--safe-b))}
.onb .skip{align-self:flex-end;font-size:16px;font-weight:600;color:var(--ink-2);min-height:44px;padding:0 8px}
.onb .art{flex:1;display:grid;place-items:center}
.onb .art .circle{width:min(62vw,260px);aspect-ratio:1;border-radius:50%;background:var(--brand-tint);display:grid;place-items:center;color:var(--brand-strong)}
.onb h2{font-size:28px;font-weight:700;letter-spacing:-.6px;line-height:1.15;margin-bottom:10px}
.onb p{font-size:17px;color:var(--ink-2);margin-bottom:24px}
.onb .pager{display:flex;gap:6px;justify-content:center;margin-bottom:18px}
.onb .pager i{width:8px;height:8px;border-radius:4px;background:var(--surface-3);transition:width .25s var(--ease)}
.onb .pager i.on{width:24px;background:var(--brand-strong)}
.onb-inner{max-width:520px;width:100%;margin:0 auto;display:flex;flex-direction:column;flex:1}

/* ---------- Тост ---------- */
.toast{position:fixed;left:12px;right:12px;margin:0 auto;width:fit-content;bottom:calc(var(--tab-h) + var(--safe-b) + 14px);z-index:90;display:flex;align-items:center;gap:10px;max-width:calc(100vw - 24px);min-height:50px;padding:8px 8px 8px 16px;border-radius:16px;background:#16201A;color:#fff;font-size:15px;font-weight:500;box-shadow:0 12px 32px rgba(0,0,0,.25);transform:translateY(20px);opacity:0;pointer-events:none;transition:all .25s var(--ease)}
.toast.show{transform:none;opacity:1;pointer-events:auto}
.toast svg{color:#86D686}
.toast span{padding-right:8px}
.toast button{min-height:36px;padding:0 12px;border-radius:10px;background:rgba(255,255,255,.12);color:#B8F0B8;font-weight:700;font-size:14px}
.is-sub~.toast,body.sub .toast{bottom:calc(var(--safe-b) + 96px)}
@media (prefers-color-scheme:dark){.toast{background:#EEF3EE;color:#16201A}.toast svg{color:#2E7D32}.toast button{background:rgba(0,0,0,.08);color:#2E7D32}}

/* ---------- Десктоп ---------- */
@media (min-width:960px){
  :root{--tab-h:0px}
  .tabbar{display:none}
  .layout{display:grid;grid-template-columns:260px minmax(0,1fr)}
  .sidebar{display:flex;flex-direction:column;gap:22px;position:sticky;top:0;height:100dvh;padding:22px 14px;border-right:1px solid var(--line);background:var(--surface)}
  .sidebar .brand{padding:0 8px}
  .side-nav{display:grid;gap:4px}
  .side-nav a{display:flex;align-items:center;gap:12px;min-height:46px;padding:0 12px;border-radius:14px;font-size:15px;font-weight:600;color:var(--ink-2)}
  .side-nav a:hover{background:var(--surface-2)}
  .side-nav a.active{background:var(--brand-tint);color:var(--brand-strong)}
  .side-nav .tb{margin-left:auto;min-width:22px;height:22px;padding:0 6px;border-radius:11px;background:var(--st-late);color:#fff;font-size:12px;font-weight:700;display:grid;place-items:center}
  .side-foot{margin-top:auto;font-size:13px;color:var(--ink-3);padding:0 8px}
  .appbar .brand{visibility:hidden}
  .page{padding:8px 36px 60px}
  .home{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(300px,1fr);gap:0 28px;align-items:start}
  .home .col{display:block}
  .home .hello{grid-column:1/-1}
  .home .col>section:first-child{margin-top:0}
  .home .col .sec:first-child{margin-top:0}
  .chips,.hscroll,.seg-scroll{margin:0;padding-left:0;padding-right:0}
  .list-tools{top:64px}
  .actionbar{margin:20px 0 0;border-radius:20px 20px 0 0;border:1px solid var(--line);border-bottom:0}
  .wiz-foot{margin:auto 0 0}
  .sheet-wrap{align-items:center}
  .sheet{border-radius:28px;max-height:86dvh}
  .grabber{display:none}
  .toast{bottom:28px}
  .is-sub~.toast,body.sub .toast{bottom:110px}
  .list-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
  .subbar{padding-left:20px;padding-right:20px}
}
@media (max-width:370px){
  .qcats{gap:6px}.qcat{font-size:12px}
  .metric b{font-size:28px}
  .bigm .v{font-size:36px}
  .stat b{font-size:24px}
}
@media (prefers-reduced-motion:reduce){
  *,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}
  .confetti{display:none}
}

.picked>.cat{flex:none}
.bubble{white-space:pre-line}
@media (max-width:380px){.cat-tile{font-size:15px}.cta-main b{font-size:17px}.cta-main small{font-size:13px}.wiz h2{font-size:24px}}

/* =================== v3: контроль УК =================== */
.yn{display:flex;gap:6px;flex:none}
.yn button{min-width:54px;height:44px;border-radius:13px;background:var(--surface-2);color:var(--ink-3);display:grid;place-items:center;transition:background .15s,color .15s,transform .12s;box-shadow:inset 0 0 0 1px var(--line)}
.yn button:active{transform:scale(.93)}
.yn .y.on{background:var(--st-done-t);color:var(--st-done-ink);box-shadow:inset 0 0 0 2px var(--st-done)}
.yn .n.on{background:var(--st-late-t);color:var(--st-late-ink);box-shadow:inset 0 0 0 2px var(--st-late)}
.check-row{display:flex;align-items:center;gap:12px;padding:10px 0}
.check-row+.check-row{border-top:1px solid var(--line)}
.check-row .tx{flex:1;min-width:0}
.check-row b{display:block;font-size:16px;font-weight:600;line-height:1.25}
.check-row small{display:block;font-size:13px;color:var(--ink-3);margin-top:2px}
.check-row small.bad{color:var(--st-late-ink);font-weight:600}
.check-row .addph{display:inline-flex;align-items:center;gap:4px;color:var(--brand-strong);font-weight:600;font-size:13px;margin-top:4px;min-height:28px}
.check-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;margin-bottom:4px}
.check-head b{font-size:18px;font-weight:700;letter-spacing:-.2px}
.check-head small{display:block;font-size:13px;color:var(--ink-3);font-weight:500}
.tbl-wrap{overflow-x:auto;margin:0 -6px}
.grid-tbl{width:100%;border-collapse:separate;border-spacing:4px;font-size:13px}
.grid-tbl th{font-weight:600;color:var(--ink-3);text-align:center;padding:2px;font-size:12px}
.grid-tbl td:first-child{text-align:left;font-weight:600;color:var(--ink-2);white-space:nowrap;padding-right:4px;font-size:13px}
.grid-tbl td.me{color:var(--brand-strong)}
.cell{height:32px;min-width:40px;border-radius:9px;text-align:center;font-weight:700;font-size:12px;vertical-align:middle}
.cell.ok{background:var(--st-done-t);color:var(--st-done-ink)}
.cell.bad{background:var(--st-late);color:#fff}
.cell.mid{background:var(--st-work-t);color:var(--st-work-ink)}
.cell.none{background:var(--surface-3);color:var(--ink-3)}
.timer{display:inline-flex;align-items:center;gap:6px;padding:6px 11px;border-radius:999px;font-size:13px;font-weight:700;background:var(--st-work-t);color:var(--st-work-ink);white-space:nowrap}
.timer.over{background:var(--st-late-t);color:var(--st-late-ink)}
.timer.ok{background:var(--st-done-t);color:var(--st-done-ink)}
.pill.st-late{color:var(--st-late-ink)} .pill.solid.st-late{background:var(--st-late-t)}
.pill.st-gray{color:var(--ink-3)} .pill.solid.st-gray{background:var(--surface-3)}
.flow{list-style:none;margin:16px 0 0;padding:0;background:var(--surface);border-radius:20px;box-shadow:var(--shadow);overflow:hidden}
.flow li{display:flex;gap:12px;align-items:flex-start;padding:14px 16px}
.flow li+li{border-top:1px solid var(--line)}
.flow .n{flex:none;width:28px;height:28px;border-radius:50%;display:grid;place-items:center;font-size:13px;font-weight:700;background:var(--surface-3);color:var(--ink-3)}
.flow li.done .n{background:var(--brand-strong);color:var(--on-brand)}
.flow li.cur .n{background:var(--sun);color:#3A2800}
.flow li.bad .n{background:var(--st-late);color:#fff}
.flow .tx{flex:1;min-width:0}
.flow b{display:block;font-size:15px;font-weight:600}
.flow small{display:block;font-size:13px;color:var(--ink-2);margin-top:2px}
.flow .act{margin-top:10px;display:flex;gap:8px;flex-wrap:wrap}
.flow .act .btn{min-height:42px;font-size:15px}
.cal{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px}
.cal .dh{font-size:12px;font-weight:600;color:var(--ink-3);text-align:center;padding-bottom:2px}
.cal .d{aspect-ratio:1;border-radius:10px;display:grid;place-items:center;font-size:14px;font-weight:600;background:var(--surface-3);color:var(--ink-3)}
.cal .d.ok{background:var(--st-done-t);color:var(--st-done-ink)}
.cal .d.bad{background:var(--st-late);color:#fff}
.cal .d.today{box-shadow:inset 0 0 0 2px var(--ink)}
.cal .d.fut{opacity:.35}
.cal .d.empty{background:none}
.legend{display:flex;gap:14px;font-size:13px;color:var(--ink-2);margin-top:12px;flex-wrap:wrap}
.legend i{display:inline-block;width:12px;height:12px;border-radius:4px;margin-right:5px;vertical-align:-1px}
.month-sw{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.month-sw b{font-size:17px}
.big-num{font-size:40px;font-weight:700;letter-spacing:-1.2px;line-height:1}
.sig{display:flex;align-items:center;gap:10px;padding:10px 0}
.sig+.sig{border-top:1px solid var(--line)}
.sig .av{width:34px;height:34px;border-radius:11px;background:var(--brand-tint);color:var(--brand-strong);display:grid;place-items:center;flex:none}
.sig .av.empty{background:var(--surface-3);color:var(--ink-3)}
.sig b{font-size:15px;font-weight:600;display:block}
.sig small{font-size:13px;color:var(--ink-3)}
.meter{height:10px;border-radius:5px;background:var(--surface-3);overflow:hidden;margin:10px 0 6px}
.meter i{display:block;height:100%;background:var(--brand-strong);border-radius:5px;transition:width .4s var(--ease)}
.opt{display:flex;align-items:center;gap:10px;width:100%;min-height:52px;padding:10px 14px;border-radius:16px;background:var(--surface-2);text-align:left;font-size:15px;font-weight:500;position:relative;overflow:hidden;line-height:1.3}
.opt+.opt{margin-top:8px}
.opt .fill{position:absolute;inset:0 auto 0 0;background:var(--brand-tint);z-index:0;transition:width .4s var(--ease)}
.opt>*:not(.fill){position:relative;z-index:1}
.opt .pc{margin-left:auto;font-weight:700;padding-left:8px}
.opt.on{box-shadow:inset 0 0 0 2px var(--brand-strong)}
.ph-grid{display:flex;gap:8px;overflow-x:auto;margin-top:14px;scrollbar-width:none}
.ph-grid button{flex:none;position:relative;border-radius:16px;overflow:hidden}
.ph-grid img{width:150px;height:112px;object-fit:cover}
.ph-grid .blurred img{filter:blur(12px)}
.ph-grid .lb{position:absolute;left:6px;bottom:6px;font-size:11px;font-weight:700;color:#fff;background:rgba(0,0,0,.6);border-radius:8px;padding:2px 7px}
.meta-tbl{width:100%;font-size:13px;border-collapse:collapse;margin-top:8px}
.meta-tbl td{padding:6px 0;border-top:1px solid var(--line);vertical-align:top}
.meta-tbl td:first-child{color:var(--ink-3);width:38%;padding-right:8px}
.meta-tbl code{font-size:11px;word-break:break-all;font-family:ui-monospace,Menlo,monospace}
.calc-row{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;padding:12px 0;font-size:15px}
.calc-row+.calc-row{border-top:1px solid var(--line)}
.calc-row small{display:block;color:var(--ink-3);font-size:13px}
.calc-row b{white-space:nowrap}
.calc-total{display:flex;justify-content:space-between;font-size:18px;font-weight:700;padding-top:12px;border-top:2px solid var(--ink);margin-top:4px}
.ev-card{display:flex;gap:10px;align-items:flex-start;padding:12px 0}
.ev-card+.ev-card{border-top:1px solid var(--line)}
.ev-card .ic{width:34px;height:34px;border-radius:11px;display:grid;place-items:center;flex:none}
.ev-card b{font-size:14px;font-weight:600;display:block}
.ev-card p{font-size:15px;margin-top:2px;white-space:pre-line;overflow-wrap:anywhere}
.ev-card time{font-size:12px;color:var(--ink-3)}
.chan{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:16px}
.chan button{display:flex;flex-direction:column;align-items:center;gap:6px;padding:12px 6px;border-radius:16px;background:var(--surface-2);font-size:14px;font-weight:600;color:var(--ink-2)}
.chan button.on{background:var(--brand-tint);color:var(--brand-strong);box-shadow:inset 0 0 0 2px var(--brand-strong)}
.preview{background:var(--surface-2);border-radius:14px;padding:12px 14px;font-size:14px;white-space:pre-line;line-height:1.5;max-height:220px;overflow:auto;margin-bottom:12px}
.cap-row{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.cap-row label{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-height:84px;border-radius:18px;font-size:15px;font-weight:600;cursor:pointer}
.cap-row .cam{background:var(--brand-strong);color:#fff}
.cap-row .gal{background:var(--surface);box-shadow:inset 0 0 0 1px var(--line);color:var(--ink-2)}
.chk{display:flex;align-items:center;gap:10px;font-size:15px;padding:10px 0;cursor:pointer}
.chk input{width:22px;height:22px;accent-color:var(--brand-strong);flex:none}
.kv{display:flex;justify-content:space-between;gap:12px;padding:10px 0;font-size:15px}
.kv+.kv{border-top:1px solid var(--line)}
.kv span{color:var(--ink-2)}
.kv b{text-align:right;font-weight:600}
.sec-sub{font-size:14px;color:var(--ink-2);margin:-6px 0 12px}
.verified{display:inline-flex;align-items:center;gap:4px;font-size:13px;font-weight:700;color:var(--st-done-ink)}
.unverified{display:inline-flex;align-items:center;gap:4px;font-size:13px;font-weight:700;color:var(--st-work-ink)}
.mini-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px}
.mstat{background:var(--surface);border-radius:18px;box-shadow:var(--shadow);padding:14px}
.mstat small{display:block;font-size:13px;font-weight:600;color:var(--ink-2)}
.mstat b{display:block;font-size:28px;font-weight:700;letter-spacing:-.8px;margin-top:4px}
.mstat b.red{color:var(--st-late-ink)} .mstat b.green{color:var(--st-done-ink)}
.mstat em{display:block;font-style:normal;font-size:12px;color:var(--ink-3);margin-top:2px}
/* документ */
.docv{position:fixed;inset:0;z-index:75;background:var(--bg);overflow:auto;-webkit-overflow-scrolling:touch}
.docv .bar{position:sticky;top:0;display:flex;gap:8px;align-items:center;padding:calc(8px + var(--safe-t)) 12px 8px;background:color-mix(in srgb,var(--bg) 92%,transparent);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-bottom:1px solid var(--line);z-index:2}
.docv .bar .t{flex:1;font-weight:600;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.paper{max-width:780px;margin:16px auto 40px;background:#fff;color:#111;padding:40px 44px;border-radius:6px;box-shadow:var(--shadow);font-family:'Times New Roman',Times,serif;font-size:15px;line-height:1.5}
.paper h1{font-size:17px;text-align:center;margin:18px 0 4px;text-transform:uppercase;letter-spacing:.3px}
.paper h2{font-size:15px;margin:16px 0 6px}
.paper p{margin:6px 0}
.paper .r{text-align:right}
.paper .c{text-align:center}
.paper table{width:100%;border-collapse:collapse;margin:8px 0;font-size:14px}
.paper th,.paper td{border:1px solid #555;padding:5px 7px;text-align:left;vertical-align:top}
.paper .ph{display:flex;flex-wrap:wrap;gap:8px;margin:6px 0}
.paper .ph figure{margin:0;width:230px}
.paper .ph img{width:230px;height:172px;object-fit:cover;border:1px solid #999}
.paper figcaption{font-size:10px;line-height:1.3;font-family:Arial,sans-serif;color:#333}
.paper .note{font-size:11px;color:#666;border-top:1px solid #ccc;margin-top:24px;padding-top:8px;font-family:Arial,sans-serif}
.paper code{font-size:9px;word-break:break-all}
.paper .blank{color:#999}
@media (max-width:600px){.paper{padding:22px 16px;margin:8px;font-size:14px}.paper .ph figure,.paper .ph img{width:100%}}
@media print{
  @page{margin:16mm}
  body>*:not(.docv){display:none!important}
  body{background:#fff}
  .docv{position:static;overflow:visible;background:#fff}
  .docv .bar{display:none}
  .paper{box-shadow:none;margin:0;padding:0;max-width:none;border-radius:0}
}
.onb{overflow-y:auto}
.onb .art{min-height:110px}
.onb.compact .art .circle{width:110px}
.onb.compact .art .circle svg{width:56px;height:56px}
.onb.compact h2{font-size:24px}
.onb.compact p{margin-bottom:14px}
.btn-row{flex-wrap:wrap}
.btn{max-width:100%}
.main{overflow-x:clip}
.sheet,.sheet-body{min-width:0;overflow-x:hidden}
.chips.wrap .chip{white-space:normal;height:auto;min-height:40px;padding-top:8px;padding-bottom:8px;text-align:left;line-height:1.3;max-width:100%}

/* =================== v4: упрощение =================== */
.qcard{background:var(--surface);border-radius:26px;box-shadow:var(--shadow);padding:20px}
.qcard h2{font-size:22px;font-weight:700;letter-spacing:-.4px;line-height:1.2}
.qcard .sub{font-size:14px;color:var(--ink-3);margin-top:4px}
.qbtns{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:16px}
.qbtn{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;min-height:112px;border-radius:20px;font-size:17px;font-weight:700;transition:transform .15s var(--ease)}
.qbtn:active{transform:scale(.96)}
.qbtn.ok{background:var(--st-done-t);color:var(--st-done-ink)}
.qbtn.bad{background:var(--st-late-t);color:var(--st-late-ink)}
.qbtn.on{box-shadow:inset 0 0 0 3px currentColor}
.qdone{display:flex;align-items:center;gap:12px;margin-top:14px;padding:14px;border-radius:16px;font-weight:600}
.qdone.ok{background:var(--st-done-t);color:var(--st-done-ink)}
.qdone.bad{background:var(--st-late-t);color:var(--st-late-ink)}
.qdone button{margin-left:auto;font-size:14px;font-weight:600;color:inherit;text-decoration:underline;min-height:36px}
.statline{display:flex;align-items:center;gap:10px;margin-top:12px;padding:12px 14px;border-radius:16px;background:var(--surface);box-shadow:var(--shadow);font-size:15px}
.statline b{font-size:22px;font-weight:700;letter-spacing:-.5px}
.statline .red{color:var(--st-late-ink)} .statline .green{color:var(--st-done-ink)}
/* единая карточка */
.uc{background:var(--surface);border-radius:20px;box-shadow:var(--shadow);padding:14px;cursor:pointer;display:flex;flex-direction:column;gap:10px;transition:transform .15s var(--ease)}
.uc:active{transform:scale(.985)}
.uc-h{display:flex;align-items:center;gap:10px}
.uc-t{flex:1;min-width:0}
.uc-t b{display:block;font-size:15px;font-weight:700;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.uc-t small{display:block;font-size:13px;color:var(--ink-3)}
.uc-x{font-size:15px;line-height:1.4;color:var(--ink);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.uc-bar{display:grid;grid-template-columns:repeat(4,1fr);gap:4px}
.uc-bar i{height:5px;border-radius:3px;background:var(--surface-3)}
.uc-bar.st-new i.on{background:var(--st-new)} .uc-bar.st-work i.on{background:var(--st-work)} .uc-bar.st-check i.on{background:var(--st-check)} .uc-bar.st-done i.on{background:var(--st-done)} .uc-bar.st-late i.on{background:var(--st-late)} .uc-bar.st-gray i.on{background:var(--ink-3)}
.uc-f{display:flex;align-items:center;gap:10px;justify-content:space-between}
.uc-f .st{display:flex;flex-direction:column;gap:2px;min-width:0}
.uc-f .meta{font-size:13px;color:var(--ink-3);display:flex;gap:10px;align-items:center}
.uc-f .meta span{display:inline-flex;align-items:center;gap:4px}
.uc-f .btn{min-height:42px;padding:0 16px;font-size:15px;flex:none}
.uc.poll{cursor:default}
.steps4{list-style:none;margin:16px 0 0;padding:0;background:var(--surface);border-radius:20px;box-shadow:var(--shadow);overflow:hidden}
.steps4 li{display:flex;gap:12px;align-items:center;padding:13px 16px}
.steps4 li+li{border-top:1px solid var(--line)}
.steps4 .n{flex:none;width:28px;height:28px;border-radius:50%;display:grid;place-items:center;font-size:13px;font-weight:700;background:var(--surface-3);color:var(--ink-3)}
.steps4 li.done .n{background:var(--brand-strong);color:var(--on-brand)}
.steps4 li.bad .n{background:var(--st-late);color:#fff}
.steps4 li.cur .n{background:var(--sun);color:#3A2800}
.steps4 .tx{flex:1;min-width:0}
.steps4 b{display:block;font-size:15px;font-weight:600}
.steps4 small{display:block;font-size:13px;color:var(--ink-2)}
.code-input{font-family:ui-monospace,Menlo,monospace;letter-spacing:2px;text-transform:uppercase;font-size:20px!important;text-align:center}
.sugg{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.sugg button{min-height:38px;padding:0 12px;border-radius:12px;background:var(--surface-2);box-shadow:inset 0 0 0 1px var(--line);font-weight:600;font-size:15px}
.sugg button.on{background:var(--ink);color:var(--surface)}
.onb .field input{background:var(--surface)}
.case-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.codes-paper .cc{display:inline-block;width:31%;margin:0 1% 10px;border:1px dashed #888;padding:8px;font-family:Arial,sans-serif;font-size:11px;vertical-align:top;page-break-inside:avoid}
.codes-paper .cc b{display:block;font-size:16px;font-family:ui-monospace,Menlo,monospace;letter-spacing:1px;margin:4px 0}
.badge-soft{display:inline-flex;align-items:center;gap:4px;padding:3px 9px;border-radius:999px;font-size:12px;font-weight:700;background:var(--surface-3);color:var(--ink-2)}
@media (min-width:960px){.qbtn{min-height:96px}}

.stack{grid-template-columns:minmax(0,1fr)}
.uc,.uc-h,.uc-t{min-width:0}
@media (min-width:960px){.list-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
