/* Замер окон — стили. Основа — утверждённый прототип (docs/arutech/prototype.html), дополнения рабочей версии — в конце файла.
   Layout: tablet field tool (Lenovo Tab M9: ~533–600 CSS px wide in portrait, ~893–1005 in landscape).
   Portrait: one column of section cards. Landscape: section list on the left, open section on the right.
   Sticky top bar, fixed bottom action bar. Tape-measure yellow marks every chosen answer;
   green/red/orange only for status. Drawing areas are white paper in both themes. */
:root{
  --bg:#E8EBED;--surface:#FFFFFF;--surface2:#F2F4F5;--ink:#14181B;--muted:#58616A;--line:#CBD1D6;
  --accent:#F4C20D;--accent-ink:#1A1500;--accent-line:#D19E00;
  --ok:#1B7842;--ok-soft:#E0F1E7;--err:#BE2E26;--err-soft:#FBE5E3;--warn:#965500;--warn-soft:#FFEFD6;
  --glass:#D5E6F1;--frame-fill:#E1E5E8;--frame:#14181B;--on-st:#FFFFFF;
  --ext:#BAC5CD;--wood:#E8CFA6;--wood-line:#8A5A2B;
  --f-ui:"Golos Text",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  --f-num:"IBM Plex Mono",ui-monospace,SFMono-Regular,Consolas,monospace;
  --r:14px;
}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){
  --bg:#0F1214;--surface:#191D20;--surface2:#22272B;--ink:#ECEFF1;--muted:#9AA4AD;--line:#353C42;
  --accent:#F4C20D;--accent-ink:#1A1500;--accent-line:#F4C20D;
  --ok:#41BF78;--ok-soft:#16331F;--err:#FF6E62;--err-soft:#3D1B19;--warn:#F1A43E;--warn-soft:#382811;
  --glass:#213848;--frame-fill:#394147;--frame:#DCE2E6;--on-st:#0F1214;--ext:#56626B;--wood:#5B4429;--wood-line:#D3A46E;color-scheme:dark}}
:root[data-theme="dark"]{
  --bg:#0F1214;--surface:#191D20;--surface2:#22272B;--ink:#ECEFF1;--muted:#9AA4AD;--line:#353C42;
  --accent:#F4C20D;--accent-ink:#1A1500;--accent-line:#F4C20D;
  --ok:#41BF78;--ok-soft:#16331F;--err:#FF6E62;--err-soft:#3D1B19;--warn:#F1A43E;--warn-soft:#382811;
  --glass:#213848;--frame-fill:#394147;--frame:#DCE2E6;--on-st:#0F1214;--ext:#56626B;--wood:#5B4429;--wood-line:#D3A46E;color-scheme:dark}
*{box-sizing:border-box}
html,body{background:var(--bg)}
body{color:var(--ink);font-family:var(--f-ui);font-size:16px;line-height:1.4;-webkit-tap-highlight-color:transparent;-webkit-text-size-adjust:100%}
button,input,textarea{font:inherit;color:inherit}
button{cursor:pointer;-webkit-appearance:none;appearance:none}
:focus-visible{outline:3px solid var(--accent-line);outline-offset:2px}
.top{position:sticky;top:env(safe-area-inset-top,0px);z-index:30;background:var(--bg);border-bottom:1px solid var(--line)}
.top-in{max-width:620px;margin:0 auto;padding:8px 16px;display:flex;align-items:center;gap:10px;min-height:60px}
.top h1{flex:1;min-width:0;margin:0;font-size:19px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;letter-spacing:-.01em}
.back{flex:none;display:inline-flex;align-items:center;gap:2px;height:44px;padding:0 12px 0 6px;border:0;border-radius:12px;background:var(--surface);font-weight:600;font-size:15px}
.saved{flex:none;font-size:12.5px;color:var(--ok)}
.saved.bad{color:var(--err)}
.who{flex:none;font-size:13px;color:var(--muted)}
.wrap{max-width:620px;margin:0 auto;padding-inline:16px;padding-block:14px 150px;display:flex;flex-direction:column;gap:10px}
.bar{position:fixed;left:0;right:0;bottom:0;z-index:30;background:var(--surface);border-top:1px solid var(--line);padding:10px 16px calc(10px + env(safe-area-inset-bottom,0px))}
.bar-in{max-width:620px;margin:0 auto;display:flex;align-items:center;gap:12px}
.prog{flex:1;min-width:0}
.prog b{font-size:15.5px}
.prog small{color:var(--muted);font-size:13.5px}
.track{height:6px;border-radius:3px;background:var(--surface2);margin-top:6px;overflow:hidden}
.fill{height:100%;background:var(--ok);border-radius:3px;transition:width .25s}
.btn{min-height:52px;padding:0 18px;border-radius:12px;border:2px solid var(--line);background:var(--surface);font-weight:600;font-size:16.5px;display:inline-flex;align-items:center;justify-content:center;gap:8px;text-align:center;line-height:1.2}
.btn.pri{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
.btn.wide{width:100%}
.btn.sm{min-height:46px;font-size:15px;padding:0 14px}
.btn.ghost{background:transparent}
.btn.danger{background:transparent;border-color:transparent;color:var(--err);align-self:flex-start}
.btn:disabled{opacity:.45;cursor:not-allowed}
.row{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.row.end{justify-content:flex-end}
.grow{flex:1}
.banner{background:var(--surface);border:1px dashed var(--line);border-radius:var(--r);padding:12px 14px;font-size:14.5px;color:var(--muted)}
.banner b{color:var(--ink)}
.banner.ok{border-style:solid;border-color:var(--ok);background:var(--ok-soft);color:var(--ink)}
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:14px;display:flex;flex-direction:column;gap:12px;scroll-margin-top:80px;min-width:0}
.card-h{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.card-h b{font-size:17px}
.card-h small{color:var(--muted);font-size:13px}
.sub{margin:12px 2px 0;font-size:13px;letter-spacing:.07em;text-transform:uppercase;color:var(--muted);font-weight:600}
.plan{background:var(--surface2);border-radius:10px;padding:10px 12px;font-size:14.5px}
.plan small{color:var(--muted);font-size:13.5px}
.two,.col{display:flex;flex-direction:column;gap:10px;min-width:0}
.sec{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);scroll-margin-top:72px}
.sec.open{border-color:var(--ink);box-shadow:0 0 0 1px var(--ink)}
.sec-h{width:100%;display:flex;align-items:center;gap:12px;min-height:64px;padding:10px 12px 10px 14px;border:0;background:none;text-align:left;border-radius:var(--r)}
.sec-t{flex:1;min-width:0;display:flex;flex-direction:column}
.sec-t b{font-size:16.5px;font-weight:600}
.sec-t small{font-size:12.5px;color:var(--muted)}
.sec-v{max-width:46%;font-size:14px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:right}
.sec-v.set{color:var(--ink);font-weight:600}
.chev{flex:none;color:var(--muted);display:grid;transition:transform .2s}
.sec.open .sec-h .chev{transform:rotate(90deg)}
.sec-b{padding:2px 14px 16px;display:flex;flex-direction:column;gap:12px}
.st{flex:none;width:28px;height:28px;border-radius:50%;border:2px solid var(--line);display:grid;place-items:center;font-weight:800;font-size:15px;color:var(--on-st)}
.st.done{background:var(--ok);border-color:var(--ok)}
.st.warn{background:var(--warn);border-color:var(--warn)}
.st.err{background:var(--err);border-color:var(--err)}
.st.opt{border-style:dashed}
.wwin{display:grid;grid-template-columns:300px minmax(0,1fr);gap:16px;align-items:start}
.snav{position:sticky;top:calc(env(safe-area-inset-top,0px) + 72px);display:flex;flex-direction:column;gap:6px;max-height:calc(100vh - 160px);overflow:auto;padding:2px}
.snav-i{width:100%;display:flex;align-items:center;gap:10px;min-height:56px;padding:7px 12px;border:1px solid var(--line);border-radius:12px;background:var(--surface);text-align:left}
.snav-i .sec-t b{font-size:15.5px}
.snav-i .sec-t small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:13px}
.snav-i.on{border-color:var(--ink);box-shadow:0 0 0 1px var(--ink)}
.spanel{background:var(--surface);border:1px solid var(--ink);box-shadow:0 0 0 1px var(--ink);border-radius:var(--r);min-width:0;scroll-margin-top:80px}
.sp-h{display:flex;align-items:center;gap:12px;padding:16px 16px 6px}
.sp-h b{font-size:20px}
.spanel .sec-b{padding:8px 16px 18px}
.copyc{flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:space-between;border-style:dashed}
.copyc small{color:var(--muted);font-size:13.5px}
.opts{display:grid;grid-template-columns:repeat(auto-fill,minmax(132px,1fr));gap:8px}
.opts.two{grid-template-columns:1fr 1fr}
.opts.c5{grid-template-columns:repeat(5,1fr)}
.opts.c4{grid-template-columns:repeat(4,1fr)}
.opts.c3{grid-template-columns:repeat(3,1fr)}
.opts.one{grid-template-columns:1fr}
.opt{min-height:56px;padding:8px 12px;border:2px solid var(--line);border-radius:12px;background:var(--surface);text-align:left;display:flex;flex-direction:column;justify-content:center;gap:1px;font-weight:600;font-size:16px;line-height:1.2}
.opt small{font-weight:400;font-size:12.5px;color:var(--muted)}
.opt .ot{display:flex;align-items:center;gap:8px}
.opt.on{background:var(--accent);border-color:var(--ink);color:var(--accent-ink)}
.opt.on small{color:var(--accent-ink)}
.opt.c{align-items:center;text-align:center;padding:0 4px;font-family:var(--f-num);font-size:17px}
.opt.c small{font-family:var(--f-ui)}
.sw{width:18px;height:18px;border-radius:50%;border:1.5px solid var(--line);flex:none;display:inline-block}
.floors{display:grid;grid-template-columns:repeat(5,1fr);gap:8px}
.floors .inp{min-width:0;width:100%;text-align:center;padding:0 4px}
.fl{display:flex;flex-direction:column;gap:8px;min-width:0}
.lb2{font-weight:600;font-size:15px}
.lb2 small,.lb3 small{font-weight:400;color:var(--muted);font-size:12.5px;margin-left:4px}
.lb3{font-size:15px}
.inp{min-height:52px;width:100%;padding:0 14px;border:2px solid var(--line);border-radius:12px;background:var(--surface);font-size:17px}
.inp:focus{border-color:var(--ink);outline:none}
.inp.ta{min-height:96px;padding:12px 14px;resize:vertical}
.inp::placeholder{color:var(--muted);opacity:.85}
.num{font-family:var(--f-num);font-weight:600;font-size:19px;text-align:right;letter-spacing:.02em}
.num::placeholder{font-family:var(--f-ui);font-weight:400;font-size:14px}
.numw{display:inline-flex;align-items:center;gap:6px}
.numw .inp{width:128px}
.mm{color:var(--muted);font-size:14px;min-width:22px}
.szlist{display:flex;flex-direction:column}
.szh{margin:14px 0 2px;font-size:13px;letter-spacing:.07em;text-transform:uppercase;color:var(--muted);font-weight:600}
.szlist .szh:first-child{margin-top:0}
.szlist .szh+.szrow{border-top:0}
.szrow{display:flex;align-items:center;justify-content:space-between;gap:8px 12px;flex-wrap:wrap;padding:8px 0;border-top:1px solid var(--line)}
.szlist .szrow:first-child,.rowc>.szrow:first-of-type{border-top:0}
.szrow>label,.szrow>.lb3{flex:1;min-width:140px;font-size:15px;display:flex;flex-direction:column}
.szrow>label small,.szrow>.lb3 small{color:var(--muted);font-size:12.5px;margin-left:0}
.szrow>.seg,.szrow>.opts{flex-basis:100%}
.seg{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.seg .opt{align-items:center;text-align:center;min-height:50px}
.msg{border-radius:10px;padding:10px 12px;font-size:14.5px;line-height:1.35}
.msg+.msg{margin-top:8px}
.msg.err{background:var(--err-soft);color:var(--err)}
.msg.warn{background:var(--warn-soft);color:var(--warn)}
.msg.todo{background:var(--surface2);color:var(--muted)}
.msg.todo b{color:var(--ink);font-weight:600}
.cap{margin:0;font-size:13.5px;color:var(--muted)}
.cap b{color:var(--ink)}
.hint{margin:0;font-size:15px}
.draw{background:var(--surface2);border-radius:12px;padding:6px}
.draw svg{display:block;width:100%;height:auto;max-height:min(420px,calc(100vh - 230px));margin:0 auto}
.draw.prof svg{max-height:230px}
.draw.prof.sm svg{max-height:170px}
svg *{vector-effect:non-scaling-stroke}
.sv-frame{fill:var(--frame-fill);stroke:var(--frame);stroke-width:1.6}
.sv-sash{fill:var(--frame-fill);stroke:var(--frame);stroke-width:1.2}
.sv-glass{fill:var(--glass);stroke:var(--frame);stroke-width:1}
.sv-open{fill:none;stroke:var(--frame);stroke-width:1.4;stroke-linejoin:round}
.sv-open.thick{stroke-width:2.4;stroke-linecap:round}
.sv-handle{fill:var(--frame)}
.sv-miss{fill:var(--err-soft);stroke:var(--err);stroke-width:2;stroke-dasharray:6 4}
.sv-q{fill:var(--err);font-family:var(--f-ui);font-weight:700}
.sv-f{fill:var(--muted);font-family:var(--f-ui);font-weight:700}
.sv-sel{fill:none;stroke:var(--accent-line);stroke-width:5}
.sv-num{fill:var(--surface);stroke:var(--frame);stroke-width:1}
.sv-numt{fill:var(--ink);font-family:var(--f-ui);font-weight:700}
.sv-cell{cursor:pointer}
.sv-ext{fill:var(--ext);stroke:var(--frame);stroke-width:1.2}
.sv-wood{fill:var(--wood);stroke:var(--wood-line);stroke-width:1.4}
.sv-hatch{fill:none;stroke:var(--wood-line);stroke-width:1;opacity:.55}
.sv-woodt{fill:var(--wood-line);font-family:var(--f-ui);font-weight:700;paint-order:stroke;stroke:var(--wood);stroke-width:6px;stroke-linejoin:round}
.sv-paper{fill:#FFFFFF;stroke:#CBD1D6;stroke-width:1}
.fsk path{vector-effect:none}
.dim{cursor:pointer}
.dim line{stroke:var(--muted);stroke-width:1}
.dim line.ext{stroke-width:.7;opacity:.7}
.dim .lb{fill:var(--surface2)}
.dim text{fill:var(--ink);font-family:var(--f-num);font-weight:600}
.dim.auto text{fill:var(--muted)}
.dim.miss text{fill:var(--err)}
.dim.op line:not(.ext){stroke-dasharray:5 4}
.dim.hl line{stroke:var(--accent-line);stroke-width:3}
.dim.hl .lb{fill:var(--accent)}
.dim.hl text{fill:var(--accent-ink)}
.pr-line{fill:none;stroke:var(--frame);stroke-width:2.6;stroke-linejoin:round;stroke-linecap:round}
.pl rect{fill:var(--surface2)}
.pl text{fill:var(--ink);font-family:var(--f-num);font-weight:600}
.pl.miss text{fill:var(--err)}
.pm circle{fill:var(--surface);stroke:var(--muted);stroke-width:1}
.pm text{fill:var(--muted);font-family:var(--f-ui);font-weight:700}
.pm.miss circle{stroke:var(--err)}
.pm.miss text{fill:var(--err)}
.tpls{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px}
.tpl{display:flex;flex-direction:column;align-items:center;gap:6px;padding:10px 6px;border:2px solid var(--line);border-radius:12px;background:var(--surface);font-size:13.5px;font-weight:600;line-height:1.2;text-align:center}
.tpl svg{height:64px;width:100%}
.tpl-pen{height:64px;display:grid;place-items:center;color:var(--ink)}
.cellpanel{display:flex;flex-direction:column;gap:10px;padding:12px;border-radius:12px;background:var(--surface2)}
.cp-h{font-weight:600}
.types{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:8px}
.ty{display:flex;align-items:center;gap:10px;min-height:64px;padding:6px 10px 6px 8px;border:2px solid var(--line);border-radius:12px;background:var(--surface);text-align:left}
.ty svg{width:34px;height:41px;flex:none}
.ty span{display:flex;flex-direction:column;min-width:0}
.ty b{font-size:14px;line-height:1.15;font-weight:600}
.ty small{font-size:12.5px;color:var(--muted)}
.ty.on{background:var(--accent);border-color:var(--ink);color:var(--accent-ink)}
.ty.on small{color:var(--accent-ink)}
.ptiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(128px,1fr));gap:8px}
.ptile{display:flex;flex-direction:column;align-items:center;gap:3px;padding:8px 8px 10px;border:2px solid var(--line);border-radius:12px;background:var(--surface);text-align:center;line-height:1.2}
.ptile svg{width:100%;height:56px}
.ptile b{font-size:14px}
.ptile small{font-size:12px;color:var(--muted)}
.ptile .pt-pen{height:56px;display:grid;place-items:center;color:var(--ink)}
.ptile.on{background:var(--accent);border-color:var(--ink);color:var(--accent-ink)}
.ptile.on small,.ptile.on .pt-pen{color:var(--accent-ink)}
.ptile.on .pr-line{stroke:var(--accent-ink)}
.segrow{display:flex;flex-direction:column}
.bend{display:flex;flex-direction:column;gap:8px;padding:4px 0 10px 14px;border-left:3px solid var(--line);margin-left:6px}
.bend-r{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.bend-r .opts{flex:1;min-width:240px}
.wcard,.mcard{width:100%;display:flex;align-items:center;gap:12px;padding:12px;border:1px solid var(--line);border-radius:var(--r);background:var(--surface);text-align:left}
.th{flex:none;width:78px;height:78px;border-radius:10px;background:var(--surface2);display:grid;place-items:center;padding:6px}
.th svg{width:100%;height:100%}
.th-e{color:var(--muted);font-size:24px;font-weight:700}
.wc-t,.mc-t{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px;align-items:flex-start}
.wc-t b,.mc-t b{font-size:16.5px}
.wc-t small,.mc-t small{color:var(--muted);font-size:13.5px}
.mc-time{flex:none;width:62px;align-self:flex-start;padding-top:1px;font-family:var(--f-num);font-weight:600;font-size:19px}
.pill{display:inline-block;margin-top:3px;padding:3px 9px;border-radius:999px;font-size:13px;font-weight:600;background:var(--surface2);color:var(--muted)}
.pill.bad{background:var(--err-soft);color:var(--err)}
.pill.good{background:var(--ok-soft);color:var(--ok)}
.pill.warn{background:var(--warn-soft);color:var(--warn)}
.tag{font-size:12.5px;color:var(--warn);font-weight:600}
.link{border:0;background:none;color:var(--muted);text-decoration:underline;padding:10px;align-self:center;font-size:14.5px}
.rowc{border:1px solid var(--line);border-radius:12px;padding:10px 12px;display:flex;flex-direction:column;gap:10px}
.rowc-h{display:flex;justify-content:space-between;align-items:center;min-height:32px}
.x{border:0;background:none;color:var(--err);font-size:14px;font-weight:600;padding:8px}
.qty{display:inline-flex;align-items:center;gap:6px}
.qb{width:48px;height:48px;border-radius:12px;border:2px solid var(--line);background:var(--surface);font-size:22px;font-weight:600}
.qty b{min-width:36px;text-align:center;font-family:var(--f-num);font-size:20px}
.qty b.miss{color:var(--err)}
.plist{display:flex;flex-direction:column;gap:6px}
.pitem{display:flex;flex-direction:column;gap:2px;padding:10px 12px;border-radius:10px;border:0;background:var(--surface2);text-align:left}
.pitem b{font-size:15px}
.pitem small{color:var(--muted);font-size:13.5px}
.pitem.e{background:var(--err-soft)}
.pitem.e small{color:var(--err)}
.agree{margin:0;font-size:15px}
.agree small{color:var(--muted);font-size:13px}
/* бумага для карандаша: всегда светлая */
.sk,.skv{--frame:#14181B;--frame-fill:#E1E5E8;--glass:#D5E6F1;--surface:#FFFFFF;--surface2:#FFFFFF;--ink:#14181B;--muted:#58616A;--err:#BE2E26;--err-soft:#FBE5E3;--accent:#F4C20D;--accent-ink:#1A1500;--accent-line:#D19E00;--ext:#BAC5CD;--wood:#E8CFA6;--wood-line:#8A5A2B}
.sk{position:relative;width:min(100%,calc((100vh - 250px)*var(--ar)));border:2px solid var(--line);border-radius:12px;background:#FFFFFF;overflow:hidden;touch-action:none}
.sk.grid{background-image:linear-gradient(#E4E8EC 1px,transparent 1px),linear-gradient(90deg,#E4E8EC 1px,transparent 1px);background-size:24px 24px}
.sk canvas{position:absolute;inset:0;width:100%;height:100%;display:block;touch-action:none;cursor:crosshair}
.sk-under{position:absolute;inset:0;padding:8px;opacity:.45;pointer-events:none}
.sk-under svg{width:100%;height:100%;max-height:none}
.sk-ph{position:absolute;left:14px;right:14px;bottom:10px;color:#7A838B;font-size:13.5px;pointer-events:none}
.sk.has .sk-ph{display:none}
.sk.sig{border-style:dashed}
.sk.sig .sk-ph{border-top:1px solid #C9CFD4;padding-top:4px}
.sktools{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin-top:8px}
.skt{min-height:44px;min-width:44px;padding:0 12px;border-radius:10px;border:2px solid var(--line);background:var(--surface);font-weight:600;font-size:14.5px;display:inline-flex;align-items:center;justify-content:center}
.skt i{width:20px;height:20px;border-radius:50%;display:block}
.skt.on{border-color:var(--ink);background:var(--accent);color:var(--accent-ink)}
.skv{position:relative;width:100%;border:1px solid var(--line);border-radius:10px;background:#FFFFFF;overflow:hidden}
.skv>svg{position:absolute;inset:0;width:100%;height:100%}
.skv>svg path{vector-effect:none}
.sheet h2{margin:0;font-size:19px;letter-spacing:.05em;text-transform:uppercase}
.sheet h3{margin:0;font-size:17px}
.sheetgrid{display:flex;flex-direction:column;gap:12px;min-width:0}
.kv{width:100%;border-collapse:collapse;font-size:15px}
.kv td{padding:7px 4px;border-top:1px solid var(--line);vertical-align:top}
.kv td:first-child{color:var(--muted);width:44%}
.kv td:first-child small{display:block;font-size:12px}
.kv tr:first-child td{border-top:0}
.na{color:var(--err);font-weight:600}
.legend{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:6px;font-size:14.5px}
.legend b{display:inline-grid;place-items:center;width:22px;height:22px;border-radius:50%;border:1px solid var(--ink);font-size:12.5px;margin-right:6px}
.tbl{overflow-x:auto}
.tbl table{border-collapse:collapse;width:100%;font-size:15px}
.tbl th,.tbl td{padding:6px 8px;border-bottom:1px solid var(--line);text-align:right;font-family:var(--f-num)}
.tbl th{font-family:var(--f-ui);font-size:12.5px;color:var(--muted);font-weight:600}
.dripc{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:10px;border:1px solid var(--line);border-radius:10px;padding:10px}
.photos{display:flex;flex-wrap:wrap;gap:8px}
.pho{position:relative;width:96px;height:96px;border-radius:10px;overflow:hidden;background:var(--surface2)}
.pho img{width:100%;height:100%;object-fit:cover}
.pho .x{position:absolute;top:2px;right:2px;background:var(--surface);border-radius:50%;width:32px;height:32px;padding:0}
.sigv{max-width:420px}
.json summary{font-weight:600;cursor:pointer;min-height:32px}
.json pre{margin:0;font-family:var(--f-num);font-size:12px;white-space:pre-wrap;word-break:break-word;max-height:420px;overflow:auto;background:var(--surface2);padding:10px;border-radius:8px}
.empty{color:var(--muted);text-align:center;padding:24px}
.diag{text-align:center}
@media (min-width:720px){
  .wrap,.top-in,.bar-in{max-width:1180px}
  .wrap.doc{max-width:940px}
  .two{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,6fr);gap:16px;align-items:start}
  .sheetgrid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px;align-items:start}
  .spanel .draw svg{max-height:min(540px,calc(100vh - 230px))}
  .spanel .draw.prof svg{max-height:260px}
}
@media (prefers-reduced-motion:reduce){*{transition:none!important}}

/* ---------- рабочая версия: основа страницы (то, что у прототипа давала страница-обёртка) ---------- */
:root{padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px)}
body{margin:0}
img{max-width:100%}
[hidden]{display:none!important}
/* связь с офисом на главном экране */
.sync{display:flex;align-items:center;gap:10px;padding:8px 8px 8px 14px;border-radius:var(--r);background:var(--surface);border:1px solid var(--line);font-size:14.5px}
.sync .dot{flex:none;width:10px;height:10px;border-radius:50%;background:var(--ok)}
.sync.off .dot{background:var(--warn)}
.sync small.bad{color:var(--err);font-size:13px}
.banner.bad{border-style:solid;border-color:var(--err);background:var(--err-soft);color:var(--ink)}
.banner.row{display:flex}
.foot{margin-top:8px}
.foot .link{padding-left:0}
.login{max-width:460px}
.login .card{gap:14px}
/* телефон в книжной ориентации (docs/arutech/PLAN.md § 4): плитки схем и форм гиба — по две в ряд */
@media (max-width:479px){
  .tpls,.ptiles{grid-template-columns:1fr 1fr}
  .tpl svg{height:56px}
  .types{grid-template-columns:1fr}
}
/* «как у объекта» (общее для всех окон, common.js) */
.inh{margin:10px 0 0;font-size:13.5px;line-height:1.35;color:var(--muted)}
.inh b{color:var(--ink)}
.inh .link{font-size:inherit;padding:0 2px}
