/* Стили приложения (T7.2, D-050, D-053): экраны, цвета и размеры по образцу
   design/redesign_main.dc.html. Основа - тёмная тема образца; светлая - в «Настройках».
   Шрифты Golos Text и Literata - свои файлы (OFL), без загрузки из интернета.
   Встроенных стилей в разметке нет (CSP): цвета проектов ставятся из JS через element.style. */
@font-face{font-family:"Golos Text";src:url("/fonts/golos-text.woff2") format("woff2");font-weight:400 900;font-style:normal;font-display:swap}
@font-face{font-family:"Literata";src:url("/fonts/literata.woff2") format("woff2");font-weight:500 700;font-style:normal;font-display:swap}
:root{
  /* тёмная (как в образце) */
  --bg:#141413; --panel:#1C1B19; --surface:#232220; --surface-2:#2A2724; --surface-3:#33302C;
  --line:#3A3733; --line-2:#4A4640; --ink:#F2F0EB; --ink-2:#C9C4BA; --muted:#A8A399; --muted-2:#8A857C;
  --cream:#F6F1E8; --cream-ink:#181817; --cream-muted:#4A463F;
  --brand:#E85D3F; --accent:#E85D3F; --accent-ink:#FFFFFF; --accent-text:#F07A5E; --accent-soft:#3A2A22;
  --danger:#FF6A55; --warn:#F59E0B; --ok:#2E9D62; --ok-2:#3FB27F; --ok-bg:#1F3A2C; --ok-ink:#BFEBD3;
  --remind-bg:#3A2E1A; --remind-ink:#FBD38D;
  --display:"Literata", Georgia, serif; --body:"Golos Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme:dark;
}
:root[data-theme="light"]{
  --bg:#F6F5F2; --panel:#FFFFFF; --surface:#FFFFFF; --surface-2:#EEECE7; --surface-3:#E6E3DC;
  --line:#E1DED7; --line-2:#D3CFC6; --ink:#181817; --ink-2:#3B3833; --muted:#6E6A62; --muted-2:#8A857C;
  --cream:#F6F1E8; --cream-ink:#181817; --cream-muted:#4A463F;
  --accent:#C9462A; --accent-ink:#FFFFFF; --accent-text:#C9462A; --accent-soft:#FBE3DB;
  --danger:#C62F22; --warn:#B7791F; --ok:#2E9D62; --ok-2:#2E9D62; --ok-bg:#DDF3E7; --ok-ink:#1E6B43;
  --remind-bg:#FDF0D5; --remind-ink:#7A4E0C;
  color-scheme:light;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{height:100%;margin:0}
body{background:var(--bg);color:var(--ink);font:16px/1.45 var(--body);overflow:hidden}
button{font:inherit;color:inherit;background:none;border:0;cursor:pointer;padding:0}
button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid var(--accent-text);outline-offset:2px}
[hidden]{display:none !important}
.sr{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}
.grow{flex:1;min-width:0}
.muted{color:var(--muted)}.dang{color:var(--danger)}.ok{color:var(--ok-2)}.mono{font-variant-numeric:tabular-nums}
.app{position:relative;height:100%;max-width:520px;margin:0 auto;display:flex;flex-direction:column;background:var(--bg);overflow:hidden;overflow:clip}
@media (min-width:560px){.app{border-left:1px solid var(--surface);border-right:1px solid var(--surface)}}
h1,h2,h3{letter-spacing:-.01em}

/* --- шапка ----------------------------------------------------------------------------------- */
.top{display:flex;align-items:center;gap:8px;padding:12px 16px 8px;min-height:64px}
.iconbtn{width:44px;height:44px;border-radius:12px;display:grid;place-items:center;flex:none;color:var(--ink)}
.iconbtn svg{width:22px;height:22px}
.top h1{flex:1;min-width:0;margin:0;font:700 22px/1.2 var(--display);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tabs{display:flex;background:var(--surface);border-radius:999px;padding:4px;gap:2px;margin:0 auto}
.tabs button{height:36px;padding:0 14px;border-radius:999px;font-weight:600;font-size:14px;color:var(--muted)}
.tabs button.sel{background:var(--ink);color:var(--bg)}
.pin svg{fill:none;stroke:var(--muted-2)}
.pin.on svg,.pinb.on svg{fill:var(--brand);stroke:var(--brand)}
.net{width:44px;height:44px;display:grid;place-items:center;flex:none;position:relative}
.net #netLbl{position:absolute;left:-9999px}
.ndot{width:9px;height:9px;border-radius:50%;background:var(--ok-2)}
.net.busy .ndot{background:var(--warn)}
.net.off .ndot{background:var(--muted-2);box-shadow:0 0 0 3px color-mix(in srgb,var(--warn) 45%,transparent)}
.net.fail .ndot{background:var(--danger);box-shadow:0 0 0 3px color-mix(in srgb,var(--danger) 30%,transparent)}
.plusbtn{width:44px;height:44px;border-radius:50%;background:var(--accent);color:var(--accent-ink);display:grid;place-items:center;flex:none}
.plusbtn svg{width:20px;height:20px}
.banner{margin:0 16px 8px;padding:10px 14px;border-radius:14px;background:var(--remind-bg);color:var(--remind-ink);font-size:14px;display:flex;gap:10px;align-items:center}
.banner b{font-weight:600}.banner button{margin-left:auto;font-weight:600}

.view{flex:1;overflow-y:auto;padding:4px 16px 24px;display:none;scrollbar-width:none}
.view::-webkit-scrollbar{display:none}
.view.on{display:block}
#v-home.on{display:flex;flex-direction:column;padding-bottom:0;overflow:hidden;gap:12px}
.hscroll{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:12px;scrollbar-width:none}
.hscroll::-webkit-scrollbar{display:none}

/* --- главная: Мураш на светлой карточке, примеры, поле ввода ------------------------------------ */
.hello{flex:none;background:var(--cream);color:var(--cream-ink);border-radius:26px;padding:12px 18px 16px;display:flex;flex-direction:column;align-items:center;text-align:center;gap:6px}
.hello h2{margin:0;font:700 22px/1.15 var(--display)}
.hello p{margin:0;font-size:14px;line-height:1.4;color:var(--cream-muted);max-width:300px}
.mu{display:block;aspect-ratio:4/5;flex:none}
/* Мураш из слоёв (T7.3, п. 12): каждый слой во весь размер, двигает браузер (transform, opacity) */
.mz{position:relative;width:100%;height:100%;pointer-events:none}
.ml{position:absolute;inset:0}
.ml .murash-svg{position:absolute;inset:0;width:100%;height:100%;display:block;overflow:visible}
.ml.lean,.ml.shelfpose{transition:transform .3s ease}
.ml.mfade{transition:opacity .3s ease}
.mticks{position:absolute;overflow:hidden;border-radius:999px}
.mstrip{position:absolute;left:0;top:0;height:100%;width:106.897%}
.mstrip svg{display:block;width:100%;height:100%}
.mu-home{width:118px}
.mu-mini{width:40px}
#procMu{display:none}
.mu-empty{width:96px;margin:0 auto 4px;background:var(--cream);border-radius:24px;padding:6px}
.mu-login{width:150px;background:var(--cream);border-radius:28px;padding:8px}
.examples{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;flex:none}
.excard{text-align:left;background:var(--surface);color:var(--ink);border-radius:22px;padding:12px;display:flex;flex-direction:column;gap:6px;min-height:44px}
.excard b{font-weight:700;font-size:14px}
.excard span{font-size:12px;color:var(--muted);line-height:1.3}
.excard svg{width:100%;height:40px}
.examples.one{grid-template-columns:1fr}
.exwrap{position:relative;display:flex;min-width:0}
.exwrap .excard{flex:1;min-width:0;padding-right:34px}
.exx{position:absolute;top:2px;right:2px;width:40px;height:40px;border-radius:50%;color:var(--muted-2);font-size:20px;line-height:1}
.sent{flex:none;text-align:left;background:var(--ok-bg);color:var(--ok-ink);border-radius:16px;padding:12px;font-size:14px;min-height:44px}
.sent b{color:var(--ink)}
:root[data-theme="light"] .sent b{color:var(--ok-ink)}
.ask{flex:none;background:var(--surface-2);border:1px solid #5A4335;border-radius:20px;padding:12px;display:flex;flex-direction:column;gap:10px;animation:pop .35s ease-out}
.ask p{margin:0;font-size:14px;line-height:1.35}
.ask p b{color:var(--accent-text)}
.ask .row{display:flex;gap:8px}
.ask .row button{flex:1;height:44px;border-radius:14px;font-weight:600;font-size:14px;background:var(--surface-3);color:var(--ink)}
.ask .row button.yes{background:var(--accent);color:var(--accent-ink)}
.composer{flex:none;background:var(--surface);border-radius:26px;padding:12px;display:flex;flex-direction:column;gap:10px;margin-bottom:max(16px,env(safe-area-inset-bottom))}
.composer textarea{width:100%;border:0;outline:0;resize:none;background:transparent;color:var(--ink);font:16px/1.4 var(--body);min-height:44px;max-height:160px;overflow-y:hidden;display:block}
.composer textarea::placeholder{color:var(--muted-2)}
.composer textarea.scroll{overflow-y:auto}
.crow{display:flex;align-items:center;gap:8px}
.round{width:44px;height:44px;border-radius:50%;background:var(--surface-3);color:var(--ink);display:grid;place-items:center;flex:none}
.round svg{width:20px;height:20px}
.projchip{height:44px;padding:0 14px;border-radius:999px;font-weight:600;font-size:13px;border:1px solid var(--line);color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:46%}
.projchip.on{border-color:var(--accent);background:var(--accent-soft);color:#F7B39F}
:root[data-theme="light"] .projchip.on{color:var(--accent)}
.send{width:44px;height:44px;border-radius:50%;background:var(--accent);color:var(--accent-ink);display:grid;place-items:center;flex:none}
.send svg{width:20px;height:20px}
.send[disabled]{background:var(--surface-3);color:#6E6A62;cursor:not-allowed}
.send.wait{background:var(--surface-3);color:#6E6A62}
.cpanel{display:flex;gap:6px}
.cpanel.wrap{flex-wrap:wrap}
.cbtn{flex:1;height:44px;border-radius:12px;border:1px solid var(--line-2);background:var(--surface-2);color:var(--ink);font-size:13px}
.cpanel.wrap .cbtn{flex:none;height:40px;padding:0 14px;border-radius:999px}
.cbtn.sel{border-color:var(--accent);color:var(--accent-text)}
.atts{display:flex;gap:8px;overflow-x:auto}
.att{position:relative;flex:none;width:86px}
.att img{width:86px;height:86px;object-fit:cover;border-radius:12px;display:block}
.att .x{position:absolute;top:4px;right:4px;width:22px;height:22px;border-radius:50%;background:rgba(0,0,0,.6);color:#fff;font-size:14px;line-height:22px}
.att .mode{margin-top:4px;width:100%;height:24px;border-radius:8px;font-size:11px;font-weight:600;background:var(--surface-3)}
.att .mode.ai{background:var(--accent);color:var(--accent-ink)}
.quick{flex:none;display:flex;gap:6px;overflow-x:auto;scrollbar-width:none}
.quick::-webkit-scrollbar{display:none}
.chip{flex:none;display:inline-flex;align-items:center;gap:6px;height:40px;padding:0 14px;border-radius:999px;border:1px solid var(--line);color:var(--muted);font-size:13px;font-weight:600;white-space:nowrap}
.chip.sel{border-color:var(--ink);background:var(--ink);color:var(--bg)}
.today{flex:none;width:100%;display:flex;gap:10px;align-items:center;text-align:left;padding:10px 12px;border-radius:16px;background:var(--remind-bg);color:var(--remind-ink);font-size:14px}
.today .ic{width:34px;height:34px;display:grid;place-items:center;flex:none}
.today .ic svg{width:20px;height:20px}
.today small{display:block;font-size:12px;opacity:.85}
.trial{flex:none;align-self:center;display:inline-flex;align-items:center;gap:8px;padding:6px 12px;border-radius:999px;background:var(--surface);font-size:13px;color:var(--muted)}
.trial b{color:var(--ink);font-weight:600}

/* статус Мураша и вопросы после разбора */
.proc{display:flex;gap:10px;align-items:center;padding:12px 14px;border-radius:16px;background:var(--surface);margin-bottom:8px;font-size:14px}
.proc b{display:block;font-size:14px}.proc span.s{display:block;color:var(--muted);font-size:13px}
.proc[data-state="offline"],.proc[data-state="later"]{border:1px dashed var(--warn)}
.proc[data-state="done"]{background:var(--ok-bg);color:var(--ok-ink)}
.proc[data-state="done"] b{color:inherit}
.proc .btn{height:40px}
.askday{flex-wrap:wrap}.askday .grow{flex:1 1 100%}
.askday .btn{flex:1}
.steps{background:var(--surface);border-radius:18px;padding:10px 14px 6px;font-size:14px;flex:none}
.steps .sh{display:flex;justify-content:space-between;align-items:center;margin-bottom:4px}
.steps .sh button{color:var(--accent-text);font-weight:600;font-size:13px;min-height:36px}
.steps .st{display:flex;gap:10px;align-items:center;padding:6px 0;border-top:1px solid var(--line)}
.steps .st .check{width:22px;height:22px}
.steps .st.ok .grow{color:var(--muted);text-decoration:line-through}
.steps .btn{height:32px;padding:0 12px;flex:none}

/* --- боковое меню как в Claude ---------------------------------------------------------------- */
.scrim{position:absolute;inset:0;background:rgba(0,0,0,.55);opacity:0;pointer-events:none;transition:opacity .2s;z-index:20}
.scrim.on{opacity:1;pointer-events:auto}
.drawer{position:absolute;top:0;bottom:0;left:0;width:300px;max-width:86%;background:var(--panel);z-index:21;transform:translateX(-102%);transition:transform .25s ease;display:flex;flex-direction:column;box-shadow:8px 0 30px rgba(0,0,0,.45)}
.drawer.on{transform:none}
.dhead{display:flex;align-items:center;gap:10px;padding:16px 14px 10px 18px}
.dlogo{width:40px;height:40px;border-radius:12px;background:var(--cream);display:grid;place-items:center;flex:none}
.dlogo svg{width:34px;height:28px}
.dhead b{font:700 24px var(--display);flex:1}
.dhome{flex:1;min-width:0;display:flex;align-items:center;gap:10px;text-align:left;min-height:48px}
.dnet{width:36px;height:48px}
.dsearch{width:48px;height:48px;border-radius:50%;border:1px solid var(--surface-3);display:grid;place-items:center}
.dsearch svg{width:20px;height:20px}
.dbody{flex:1;min-height:0;overflow-y:auto;padding:4px 10px 96px;scrollbar-width:none}
.dbody::-webkit-scrollbar{display:none}
.ditem{width:100%;height:50px;border-radius:14px;text-align:left;display:flex;align-items:center;gap:14px;padding:0 10px;font-size:17px;font-weight:600}
.ditem.cur{background:#2C2A27}
:root[data-theme="light"] .ditem.cur{background:var(--surface-2)}
.ditem .ic{width:24px;height:24px;display:grid;place-items:center;flex:none;color:var(--ink-2)}
.ditem .ic svg{width:22px;height:22px}
.ditem .n{margin-left:auto;color:var(--muted);font-size:14px;font-weight:500;font-variant-numeric:tabular-nums}
.ditem .n.red{color:#fff;background:var(--danger);border-radius:999px;padding:0 7px;font-size:12px;line-height:20px}
.dsec{width:100%;height:44px;margin-top:10px;color:var(--muted);font-size:15px;font-weight:600;display:flex;align-items:center;justify-content:space-between;padding:0 10px}
.dsec svg{width:18px;height:18px;transition:transform .2s}
.dsec.shut svg{transform:rotate(180deg)}
.prow{display:flex;align-items:center;border-radius:12px;padding-left:4px}
.prow.sub{padding-left:30px}
.prow.sub.empty{opacity:.6}
.prow .go{flex:1;min-width:0;height:46px;text-align:left;display:flex;align-items:center;gap:12px;padding:0 6px;font-size:15px}
.prow .go .t,.rrow .t{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.prow .ic,.rrow .ic{width:24px;height:24px;display:grid;place-items:center;flex:none;color:var(--ink-2)}
.prow .ic svg{width:20px;height:20px}
.prow .chev{width:40px;height:44px;color:var(--muted);display:grid;place-items:center}
.prow .chev svg{width:18px;height:18px;transition:transform .2s}
.prow .chev.open svg{transform:rotate(90deg)}
.prow .dots{width:36px;height:44px;color:var(--muted-2);display:grid;place-items:center;flex:none}
.prow .dots svg{width:16px;height:16px}
.prow.rr{padding-left:10px}.prow.rr .ic{width:20px;color:var(--muted-2)}.prow.rr .ic svg{width:18px;height:18px}
.sq{display:inline-block;flex:none;border-radius:5px;width:14px;height:14px;background:#6E6A62}
.sq.s8{width:8px;height:8px;border-radius:3px}
.sq.s16{width:16px;height:16px}
.dhint{padding:4px 10px 8px;font-size:13px;color:var(--muted-2)}
.rrow{width:100%;height:46px;text-align:left;display:flex;align-items:center;gap:12px;padding:0 16px;font-size:15px;border-radius:12px}
.rrow .ic{width:20px;height:20px;color:var(--muted-2)}
.rrow .ic svg{width:18px;height:18px}
.dfoot{position:absolute;left:0;right:0;bottom:0;padding:24px 14px max(18px,env(safe-area-inset-bottom));display:flex;gap:10px;align-items:center;background:linear-gradient(rgba(28,27,25,0),var(--panel) 34%)}
.avatar{width:52px;height:52px;flex:none;border-radius:50%;border:2px solid var(--surface-3);background:var(--brand);color:#fff;font-weight:700;font-size:19px}
.newrec{flex:1;height:52px;border-radius:999px;background:var(--ink);color:var(--bg);font-weight:700;font-size:16px;display:flex;align-items:center;justify-content:center;gap:8px}
.newrec svg{width:18px;height:18px}

/* --- списки ----------------------------------------------------------------------------------- */
.filters{display:flex;gap:6px;overflow-x:auto;padding-bottom:10px;scrollbar-width:none}
.filters::-webkit-scrollbar{display:none}
.row-card{width:100%;text-align:left;background:var(--surface);color:var(--ink);border-radius:18px;padding:12px 14px;display:flex;flex-direction:column;gap:4px;min-height:60px;margin-bottom:8px}
.row-card .t{font-weight:600;font-size:15px}
.row-card .p{font-size:13px;color:var(--muted);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.row-card .m{display:flex;gap:6px;align-items:center;font-size:12px;color:var(--muted);flex-wrap:wrap}
.row-card.conflict{outline:1px solid var(--warn)}
.row-card.nrow{flex-direction:row;padding:0;gap:0;align-items:stretch}
.nrow .open{flex:1;min-width:0;text-align:left;display:flex;flex-direction:column;gap:4px;padding:12px 2px 12px 14px;color:inherit}
.ra{display:flex;flex-direction:column;justify-content:center;padding:2px 2px 2px 0}
.ra .pinb,.ra .delb{width:40px;height:40px}
.delb{width:44px;height:44px;display:grid;place-items:center;flex:none}
.delb svg{width:19px;height:19px;stroke:var(--muted-2)}
.lrow.hl{outline:2px solid var(--accent)}
.thumbs{display:flex;gap:6px;margin-top:4px}.thumbs img{width:44px;height:44px;border-radius:8px;object-fit:cover;background:var(--surface-2)}
.badge{display:inline-flex;align-items:center;gap:5px;padding:2px 8px;border-radius:999px;background:var(--surface-2);color:var(--ink-2);font-size:12px;font-weight:500}
.badge.warn{background:var(--remind-bg);color:var(--remind-ink)}
.empty{color:var(--muted);text-align:center;font-size:14px;padding:30px 10px}
.empty p{margin:0 auto 12px;max-width:34ch}
.lrow{display:flex;align-items:center;gap:4px;background:var(--surface);border-radius:18px;padding:4px 4px 4px 12px;margin-bottom:8px}
.lrow .main{flex:1;min-width:0;text-align:left;display:flex;gap:12px;align-items:center;min-height:56px}
.lrow .txt{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.lrow .txt .t{font-weight:600;font-size:15px}
.lrow .txt .m{font-size:12px;color:var(--muted)}
.pinb{width:44px;height:44px;display:grid;place-items:center;flex:none}
.pinb svg{width:20px;height:20px;fill:none;stroke:var(--muted-2)}
.rcheck{width:28px;height:28px;border-radius:50%;border:2px solid var(--warn);display:grid;place-items:center;flex:none;color:#fff}
.rcheck svg{width:14px;height:14px}
.rcheck.on{background:var(--ok);border-color:var(--ok)}
.lrow.done .t{text-decoration:line-through;color:var(--muted-2)}
.lrow.over .m{color:var(--danger);font-weight:600}
.lrow .pend{color:var(--warn);font-weight:600}
.grp{font-size:13px;font-weight:600;color:var(--muted);margin:14px 4px 8px;display:flex;align-items:center;gap:8px}
.grp.red{color:var(--danger)}
.grp button{margin-left:auto;font-size:13px;color:var(--accent-text);min-height:36px}
.newproj{width:100%;height:52px;border-radius:18px;border:1px dashed var(--line-2);color:var(--accent-text);font-weight:600;font-size:15px}
.lead{margin:0 4px 12px;color:var(--muted);font-size:14px;line-height:1.4}
.search{display:flex;align-items:center;gap:8px;height:48px;padding:0 14px;border-radius:16px;background:var(--surface);margin-bottom:10px;color:var(--muted)}
.search input{flex:1;border:0;outline:0;background:transparent;color:var(--ink);font:16px var(--body)}
.hints{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:10px}
.hints button{height:36px;padding:0 12px;border-radius:999px;border:1px solid var(--line);color:var(--ink-2);font-size:13px}
.qrow{width:100%;text-align:left;background:var(--surface);border-radius:16px;padding:12px 14px;display:flex;flex-direction:column;gap:2px;min-height:52px;margin-bottom:8px}
.qrow .t{font-weight:600;font-size:15px}.qrow .m{font-size:12px;color:var(--muted)}
.check{width:26px;height:26px;border-radius:7px;border:2px solid #6E6A62;flex:none;display:grid;place-items:center;color:#fff}
.check.on{background:var(--ok);border-color:var(--ok)}
.check svg{width:14px;height:14px}

/* --- заметка ---------------------------------------------------------------------------------- */
.tags{display:flex;gap:6px;flex-wrap:wrap;font-size:12px;margin-bottom:12px}
.tag{padding:4px 10px;border-radius:999px;background:var(--surface-2);color:var(--ink-2)}
.tag.proj{color:#fff;font-weight:600;background:#4A4640}
.ndhead h2{font:700 24px/1.2 var(--display);margin:0 0 10px;text-wrap:balance}
.nbody{background:var(--surface);border-radius:18px;padding:6px 14px;margin-bottom:12px}
.md{font-size:15px;line-height:1.5}
.md h4{font:600 16px/1.3 var(--body);margin:14px 0 6px}
.md p{margin:8px 0;color:var(--ink-2)}.md ul{margin:6px 0;padding-left:20px}
.md li.task{list-style:none;margin-left:-20px;display:flex;gap:10px;align-items:center;min-height:44px}
.md li.task .check{width:24px;height:24px}
.md li.task.done span{color:var(--muted-2);text-decoration:line-through}
.md q{quotes:"«" "»"}
.md .q{color:var(--muted)}
.nbtns{display:flex;gap:8px;margin-bottom:10px}
.nbtns button{flex:1;height:48px;border-radius:16px;font-size:15px;border:1px solid var(--line-2)}
.nbtns button.pri{background:var(--accent);color:var(--accent-ink);font-weight:600;border:0}
.actions{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}
.act{display:flex;flex-direction:column;align-items:center;gap:4px;font-size:12px;padding:8px 0;border-radius:14px;background:var(--surface);color:var(--ink-2);min-height:56px}
.act svg{width:20px;height:20px}
.photos{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;margin:0 0 12px}
.photos figure{margin:0}.photos img{width:100%;aspect-ratio:1;object-fit:cover;border-radius:12px;display:block;background:var(--surface-2)}
audio{width:100%;margin-bottom:12px}
.nsent{margin-bottom:10px}
.rlink{display:flex;width:100%;align-items:center;gap:8px;margin-bottom:10px}
.rlink .grow{flex:1}
.src{margin:0 0 12px}
.src summary{cursor:pointer;color:var(--muted);font-size:14px;min-height:44px;display:flex;align-items:center;list-style:none}
.src summary::-webkit-details-marker{display:none}
.src summary::before{content:"›";display:inline-block;margin-right:8px;transition:transform .2s}
.src[open] summary::before{transform:rotate(90deg)}
.nproc .mu{width:46px;flex:none}
.raw{background:var(--surface-2);border-radius:14px;padding:12px 14px;font-size:14px;color:var(--muted);white-space:pre-wrap;margin:0 0 12px}
.alert{padding:10px 12px;border-radius:12px;background:color-mix(in srgb,var(--danger) 14%,transparent);color:var(--danger);font-size:13px;margin:0 0 10px}
.vers{display:grid;gap:8px;margin:10px 0}
.vers .card{margin:0;white-space:pre-wrap}
.vers .card b{display:block;margin-bottom:4px;font-size:13px;color:var(--muted)}

/* --- общие карточки, кнопки, настройки -------------------------------------------------------- */
.card{background:var(--surface);border-radius:20px;padding:14px 16px;margin-bottom:10px;display:block;width:100%;text-align:left}
.card h3{margin:0 0 4px;font:600 16px/1.3 var(--body)}
.btn{display:inline-flex;align-items:center;justify-content:center;min-height:44px;height:44px;padding:0 16px;border-radius:14px;background:var(--surface-3);color:var(--ink);font-weight:600;font-size:14px;text-decoration:none}
.btn.pri{background:var(--accent);color:var(--accent-ink)}
.btn[disabled]{opacity:.45;cursor:default}
.btn.dang{color:var(--danger)}
.btn.line{background:transparent;border:1px solid var(--line-2)}
.profile{display:flex;gap:12px;align-items:center;background:var(--surface);border-radius:20px;padding:14px;margin-bottom:10px}
.profile .avatar{width:52px;height:52px;border:0;font-size:20px;display:grid;place-items:center}
.profile .grow b{display:block;font-size:16px}
.profile .grow small{font-size:13px;color:var(--muted)}
.setlist{background:var(--surface);border-radius:20px;overflow:hidden;margin-bottom:10px}
.setrow{display:flex;align-items:center;gap:12px;padding:12px 16px;border-bottom:1px solid #2F2D2A;min-height:52px}
:root[data-theme="light"] .setrow{border-color:var(--line)}
.setrow:last-child{border:0}
.setrow .grow{font-size:15px}
.setrow .grow small{display:block;color:var(--muted);font-size:13px}
.setrow .val{color:var(--muted);font-size:13px;text-align:right}
.setrow.tap{width:100%;text-align:left}
.setlist .card{border-radius:0;margin:0}
.again{width:100%;height:48px;border-radius:16px;border:1px solid var(--line-2);font-size:15px;margin:4px 0 10px}
.seg{display:flex;background:var(--surface-2);border-radius:12px;padding:3px}
.seg button{padding:8px 10px;border-radius:9px;font-size:13px;min-height:36px}
.seg button.sel{background:var(--ink);color:var(--bg);font-weight:600}
.sw{width:30px;height:16px;border-radius:9px;background:var(--line-2);position:relative;flex:none;transition:background .15s}
.sw::after{content:"";position:absolute;top:2px;left:2px;width:12px;height:12px;border-radius:50%;background:#fff;transition:left .15s}
.sw.on{background:var(--accent)}.sw.on::after{left:16px}
.field{width:100%;height:48px;border-radius:14px;border:1px solid var(--line);background:var(--bg);color:var(--ink);padding:0 14px;font:16px var(--body);margin-bottom:12px}
textarea.field{height:auto;padding:12px 14px;line-height:1.45}
select.field{appearance:auto}
.colors{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:16px}
.colors button{width:40px;height:40px;border-radius:50%;border:3px solid transparent}
.colors button.sel{border-color:var(--ink)}
.dot{width:9px;height:9px;border-radius:50%;flex:none}
.dot.c{width:12px;height:12px;margin:0 4px}
.stub{font-size:12px;color:var(--muted);margin-top:4px}
.err{padding:10px 12px;border-radius:12px;background:color-mix(in srgb,var(--danger) 14%,transparent);color:var(--danger);font-size:14px}
.fine{font-size:12px;color:var(--muted);text-align:center;margin:8px 0 0}
.lim{display:flex;justify-content:space-between;font-size:14px}

/* подключения (коннекторы) */
.conn{display:flex;gap:12px;align-items:flex-start;background:var(--surface);border-radius:18px;padding:12px 12px 12px 14px;margin-bottom:8px}
.conn .ci{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;flex:none;font-weight:700;color:#fff;background:#4A4640}
.conn b{display:block;font-weight:600;font-size:15px}
.conn small{display:block;color:var(--muted);font-size:12px;line-height:1.35;margin-top:2px}
.conn small.st{font-weight:600}
.conn small.st.ok{color:var(--ok-2)}.conn small.st.err{color:var(--danger)}
.conn > .btn{height:36px;min-height:36px;padding:0 12px;border-radius:999px;font-size:13px;flex:none}
.conn > .btn.pri{background:var(--accent)}
.conn > .btn[disabled]{background:transparent;border:1px solid var(--line);color:#6E6A62}
.conn .seg{margin-top:8px;flex-wrap:wrap;width:max-content;max-width:100%;background:none;gap:6px;padding:0}
.conn .seg .chip{height:36px}
.soon{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);background:var(--surface-2);border-radius:6px;padding:2px 6px;margin-left:6px;vertical-align:2px}
.connsteps{margin:8px 0 2px;padding-left:20px;font-size:14px;line-height:1.5}
.connsteps li{margin:3px 0}.connsteps .btn{height:36px;min-height:36px;padding:0 10px;margin-left:6px}
.connsteps .chip{height:36px;margin-left:6px}
.code{font:700 22px/1.2 var(--body);letter-spacing:4px}
.agree{display:flex;gap:10px;align-items:flex-start;font-size:14px;margin:12px 0;cursor:pointer}
.agree input{width:20px;height:20px;margin:1px 0 0;flex:none;accent-color:var(--accent)}
.facts{font-size:14px;line-height:1.5}
.facts-list{margin:4px 0 0;padding-left:18px;color:var(--muted)}
.facts div{display:flex;gap:10px;padding:6px 0}.facts div span:first-child{color:var(--muted);flex:none;width:92px}
.connwarn{font-size:14px;line-height:1.45;background:var(--remind-bg);color:var(--remind-ink);border-radius:12px;padding:10px 12px;margin:10px 0}

/* подписка */
.pay .row{display:flex;align-items:baseline;gap:8px}
.pay .sum{margin-left:auto;font:600 18px var(--body);font-variant-numeric:tabular-nums}
.bar{height:6px;border-radius:6px;background:var(--surface-2);margin:10px 0 6px;overflow:hidden}
.bar i{display:block;height:100%;border-radius:6px;background:var(--ok)}
.bar i.warn{background:var(--warn)}
.plan{position:relative;border:2px solid var(--line);border-radius:20px;padding:16px;margin-bottom:12px;background:var(--surface);width:100%;text-align:left;display:block}
.plan.sel{border-color:var(--accent)}
.plan .ph{display:flex;align-items:baseline;gap:8px}
.plan .pn{font:600 20px/1.2 var(--display)}
.plan .pp{margin-left:auto;font:700 22px/1 var(--body);font-variant-numeric:tabular-nums;white-space:nowrap}
.plan .pp small{font-size:13px;font-weight:500;color:var(--muted)}
.plan .tag{position:absolute;top:-11px;left:16px;background:var(--accent);color:var(--accent-ink);font-size:12px;font-weight:700;padding:3px 10px;border-radius:999px}
.plan ul{margin:10px 0 0;padding:0;list-style:none;display:grid;gap:6px;font-size:14px}
.plan li{display:flex;gap:8px}.plan li::before{content:"✓";color:var(--ok-2);font-weight:700}
.plan li.no{color:var(--muted)}.plan li.no::before{content:"-";color:var(--muted)}
.plan .sub2{color:var(--muted);font-size:13px;margin-top:2px}
.usage{display:grid;gap:12px;margin-bottom:6px}
.usage .u{font-size:14px}.usage .u div:first-child{display:flex;justify-content:space-between}
.usage .u span{font-variant-numeric:tabular-nums;color:var(--muted)}
.paybar{position:sticky;bottom:0;padding:12px 0 6px;background:linear-gradient(transparent,var(--bg) 25%)}
.paybar .btn{width:100%;height:52px;font-size:16px}
.wall{text-align:center;padding:10px 4px 16px}
.wall h2{font:600 26px/1.2 var(--display);margin:8px 0 6px;text-wrap:balance}
.wall p{color:var(--muted);margin:0 auto;max-width:34ch}

/* --- шторки, всплывашки, запись голоса -------------------------------------------------------- */
.sheet{position:absolute;left:0;right:0;bottom:0;background:var(--panel);border-radius:22px 22px 0 0;z-index:31;transform:translateY(105%);transition:transform .25s ease;padding:8px 16px max(18px,env(safe-area-inset-bottom));max-height:85%;overflow-y:auto}
.sheet.on{transform:none}
.sheet .grab{width:40px;height:5px;border-radius:3px;background:var(--line-2);margin:4px auto 12px}
.sheet h3{margin:0 0 12px;font:600 18px var(--body)}
.sheet .opt{width:100%;display:flex;align-items:center;gap:12px;padding:13px 4px;border-bottom:1px solid var(--line);text-align:left;font-size:16px;min-height:48px}
.sheet .opt:last-child{border:0}.sheet .opt small{display:block;color:var(--muted);font-size:13px}
.sheet .opt svg{width:22px;height:22px;flex:none}
.sheet .opt svg:not([fill]){fill:none;stroke:currentColor}
.sheet .row{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.sheet .row .btn{flex:1}
.sheet p{color:var(--muted);font-size:14px;margin:-4px 0 12px}
.sscrim{position:absolute;inset:0;background:rgba(0,0,0,.55);z-index:30;opacity:0;pointer-events:none;transition:opacity .2s}
.sscrim.on{opacity:1;pointer-events:auto}
.toast{position:absolute;left:16px;right:16px;bottom:150px;background:var(--ink);color:var(--bg);padding:12px 14px;border-radius:14px;font-size:14px;z-index:50;opacity:0;transform:scale(.92);transition:.2s;pointer-events:none;text-align:center}
.toast.on{opacity:1;transform:none}
/* «Удалено. Вернуть» (T7.3): 5 секунд, потом удаляется по-настоящему */
.undo{position:absolute;left:16px;right:16px;bottom:96px;z-index:45;background:var(--ink);color:var(--bg);border-radius:14px;padding:6px 6px 6px 16px;display:flex;align-items:center;gap:10px;font-size:15px;animation:fade .2s ease-out}
.undo[hidden]{display:none}
.undo span{flex:1}
.undo button{height:40px;padding:0 16px;border-radius:10px;font-weight:700;color:var(--brand)}
.rec{position:absolute;inset:0;z-index:40;background:var(--bg);display:none;flex-direction:column;align-items:center;justify-content:center;gap:22px;padding:24px}
.rec.on{display:flex}
.rec .time{font:600 40px var(--body);font-variant-numeric:tabular-nums}
.wave{display:flex;gap:4px;align-items:center;height:60px}
.wave i{width:5px;border-radius:3px;background:var(--accent);height:20%;animation:w 1s ease-in-out infinite}
.wave i:nth-child(2){animation-delay:.1s}.wave i:nth-child(3){animation-delay:.2s}.wave i:nth-child(4){animation-delay:.3s}
.wave i:nth-child(5){animation-delay:.4s}.wave i:nth-child(6){animation-delay:.5s}.wave i:nth-child(7){animation-delay:.6s}
@keyframes w{50%{height:100%}}
.rec .stop{width:76px;height:76px;border-radius:50%;background:var(--danger);display:grid;place-items:center}
.rec .stop i{width:26px;height:26px;border-radius:6px;background:#fff}
.spin{width:18px;height:18px;border-radius:50%;border:2px solid var(--line);border-top-color:var(--accent);animation:s .8s linear infinite}
@keyframes s{to{transform:rotate(360deg)}}
@keyframes pop{0%{transform:scale(.6);opacity:0}100%{transform:scale(1);opacity:1}}
@keyframes fade{0%{transform:translateY(10px);opacity:0}100%{transform:none;opacity:1}}
.pop{animation:pop .35s ease-out}.fade{animation:fade .4s ease-out}

/* --- вход, ключ, знакомство ------------------------------------------------------------------- */
.screen{position:absolute;inset:0;z-index:60;background:var(--bg);overflow-y:auto;padding:24px 18px}
.screen .inner{max-width:440px;margin:4vh auto 0;display:flex;flex-direction:column;gap:12px}
.screen h2{font:700 26px/1.2 var(--display);margin:4px 0}
.screen p{margin:0;color:var(--muted)}
.screen .mark{width:56px;height:56px;border-radius:16px}
.screen .btn{height:52px;font-size:16px;border-radius:18px}
.screen .agree{margin:2px 0}
.mark{background:none;border-radius:22%;display:grid;place-items:center}
.mark .logo{width:100%;height:100%;display:block}
.words{counter-reset:w;display:grid;grid-template-columns:1fr 1fr;gap:6px 14px;margin:0;padding:14px 16px;list-style:none;background:var(--surface);border-radius:16px;font:600 16px/1.6 var(--body)}
.words li{counter-increment:w}.words li::before{content:counter(w) ". ";color:var(--muted);font-weight:400}
.keytips{background:var(--surface);border-radius:16px;padding:10px 14px;display:grid;gap:6px}
.keytips p{font-size:14px}.keytips b{color:var(--ink)}
.ob{padding:0}
.ob .obw{height:100%;max-width:520px;margin:0 auto;box-sizing:border-box;padding:12px 18px 20px;display:flex;flex-direction:column;gap:12px}
.ob .skip{align-self:flex-end;height:44px;padding:0 12px;color:var(--muted);font-size:15px}
.ob .hero{background:var(--cream);border-radius:32px;padding:18px 0 10px;display:flex;justify-content:center}
.ob .hero .mu{width:220px}
.ob .h{display:flex;flex-direction:column;gap:8px;text-align:center}
.ob .h h2{font:700 28px/1.15 var(--display);margin:0;color:var(--ink)}
.ob .h p{font-size:16px;line-height:1.45;color:var(--ink-2)}
.ob .go{height:54px;border-radius:18px;background:var(--accent);color:var(--accent-ink);font-weight:700;font-size:17px;flex:1}
.ob .go.wait{background:var(--surface-3);color:var(--muted-2);cursor:wait}
.ob .again2{height:54px;padding:0 16px;border-radius:18px;border:1px solid var(--line-2);font-size:15px}
.ob .bottom{display:flex;gap:8px}
.ob .head{display:flex;justify-content:space-between;align-items:center}
.ob .dots{display:flex;gap:6px;align-items:center}
.ob .dots i{height:6px;width:6px;border-radius:3px;display:inline-block;background:var(--line-2)}
.ob .dots i.cur{width:22px;background:var(--brand)}
.ob .dots i.ok{background:var(--ok-2)}
.ob .dots span{font-size:13px;color:var(--muted);font-weight:600;margin-left:6px}
.ob .say{display:flex;align-items:flex-end;gap:10px}
.ob .say .mbox{flex:none;background:var(--cream);border-radius:24px;padding:8px 8px 2px}
.ob .say .mu{width:96px}
.ob .bubble{flex:1;background:#F2F0EB;color:#181817;border-radius:18px 18px 18px 4px;padding:12px 14px;font-size:14px;line-height:1.4;margin-bottom:14px}
.ob .st{font:700 23px/1.15 var(--display);margin:0}
.ob .body{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:10px;scrollbar-width:none}
.ob .before{background:var(--surface);border-radius:20px;padding:12px 14px;display:flex;flex-direction:column;gap:8px}
.ob .lbl{font-size:12px;color:var(--muted);font-weight:600}
.ob .msg{align-self:flex-end;max-width:92%;background:var(--brand);color:#fff;border-radius:16px 16px 4px 16px;padding:10px 12px;font-size:14px;line-height:1.4}
.ob .voice{display:flex;gap:10px;align-items:center;background:var(--brand);border-radius:16px;padding:10px 12px;color:#fff;font-size:13px;font-weight:600}
.ob .voice svg{flex:none}
.ob .quote{font-size:13px;line-height:1.45;color:var(--ink-2);font-style:italic}
.ob .photo{border-radius:14px;overflow:hidden;height:170px}
.ob .photo svg,.ob .thumb svg{width:100%;height:100%;display:block}
.ob .procs{background:var(--surface);border-radius:20px;padding:14px;display:flex;flex-direction:column;gap:10px}
.ob .procs div{display:flex;gap:10px;align-items:center;font-size:15px;color:var(--muted-2)}
.ob .procs i{width:24px;height:24px;flex:none;box-sizing:border-box;border-radius:50%;display:grid;place-items:center;font-size:13px;color:#fff;font-style:normal;border:2px solid var(--line-2)}
.ob .procs .act{color:var(--ink);font-weight:600;background:none;flex-direction:row;min-height:0;padding:0;font-size:15px}
.ob .procs .act i{border:3px solid var(--brand)}
.ob .procs .done{color:var(--ink)}
.ob .procs .done i{background:var(--ok);border:0}
.ob .after{display:flex;flex-direction:column;gap:6px}
.ob .res{background:var(--cream);color:#181817;border-radius:16px;padding:10px 12px;border-left:6px solid #3D5AFE;display:flex;flex-direction:column;gap:2px}
.ob .res .k{font-size:11px;font-weight:700}
.ob .res .t{font-weight:700;font-size:15px}
.ob .res .x{font-size:13px;color:#4A463F;line-height:1.5}
.ob .res .sub{font-size:12px;font-weight:700;color:#6E6A62;margin-top:4px}
.ob .res.row{flex-direction:row;gap:12px}
.ob .thumb{width:64px;height:64px;flex:none;border-radius:10px;overflow:hidden}
.ob .remind{background:var(--remind-bg);color:var(--remind-ink);border-radius:14px;padding:10px 12px;font-size:13px}
.ob .what{display:flex;gap:8px;font-size:13px;line-height:1.4;color:var(--ink-2)}
.ob .what b{color:var(--ok-2)}
.ob .feat{display:flex;gap:12px;align-items:center;background:var(--surface);border-radius:16px;padding:10px 12px}
.ob .feat .fi{width:38px;height:38px;flex:none;border-radius:12px;display:grid;place-items:center}
.ob .feat .fi svg{width:20px;height:20px}
.ob .feat b{display:block;font-size:15px}
.ob .feat small{font-size:13px;color:var(--muted)}
.ob .mu.busy{filter:none}

/* --- маленькие экраны ------------------------------------------------------------------------- */
@media (max-width:380px){
 .top{padding:10px 10px 6px;gap:4px}
 .tabs button{padding:0 10px;font-size:13px}
 .view{padding-left:12px;padding-right:12px}
 .mu-home{width:96px}
}
@media (max-height:700px){
 .mu-home{width:84px}
 .hello p{display:none}
 .excard span{display:none}
}
@media (max-height:560px){
 .hello .mu-home,.examples{display:none}
 #procMu{display:block}
}

/* --- компьютер: меню слева всегда открыто ----------------------------------------------------- */
@media (min-width:900px){
 .app{max-width:none;padding-left:300px;border:0}
 .drawer{transform:none;width:300px;max-width:none;transition:none;box-shadow:none;border-right:1px solid var(--surface)}
 .scrim{display:none}
 #menuBtn{visibility:hidden}
 .top,.banner{width:min(780px,calc(100% - 32px));margin-left:auto;margin-right:auto}
 .top{padding-left:0;padding-right:0}
 .view{padding-left:max(16px,calc((100% - 780px)/2));padding-right:max(16px,calc((100% - 780px)/2))}
 .hello h2{font-size:28px}
 .mu-home{width:140px}
 .sheet{left:calc(300px + (100% - 300px - 540px)/2);right:auto;width:540px;bottom:24px;border-radius:22px;transform:translateY(calc(100% + 60px))}
 .sheet.on{transform:none}
 .sheet .grab{display:none}
 .toast{left:calc(300px + (100% - 300px - 460px)/2);right:auto;width:460px}
 .rec{left:300px}
 .photos{grid-template-columns:repeat(3,1fr)}
 .ob .obw{max-width:560px}
}
@media (prefers-reduced-motion:reduce){
 .sheet,.drawer,.scrim,.sscrim,.toast,.dsec svg,.prow .chev svg{transition:none}
 .spin,.wave i,.pop,.fade,.ask{animation:none}
 .wave i{height:50%}
}
.ob .res .grow{display:flex;flex-direction:column;gap:2px}
