/* ORBISAN 3 — kit.css: THE theme and the kit. The only file that names a colour, a font or a radius.
   Every module widget and every result tab is built from the classes below and nothing else. */

/* ===== THEME ===== */
:root{
  --font:"Segoe UI",-apple-system,Roboto,sans-serif;
  --bg:#0c0f14;            /* the page */
  --surface:#131821;       /* tabs, pills, the input box, "link" pills */
  --surface-2:#1a2130;     /* the bot's card, widgets, hover */
  --line:#232c3b;          /* every border */
  --line-2:#2d384a;        /* a border when hovered or focused */
  --text:#d7dde7; --dim:#7d8898; --accent:#8fb7ff; --accent2:#9fd0b0; --warn:#f0c266; --bad:#f08a8a;   /* accent2: the effects' second colour */
  --evo:#6fd3a0; --sparky:#e8c35a; --bolty:#6aa6ff; --cluster:#ff6fd4;   /* where a thing runs */
  --r:14px; --t:700ms; --t2:650ms; --ease:cubic-bezier(.22,.8,.2,1);
  --apps-bg:#0f1420;       /* the + page: the apps section */
  --widgets-bg:#0e1319;    /* the + page: the widgets section */
  --special:#1f2a24;       /* a section that is out of the ordinary (Kiri's own settings) */
  --fs:15px;               /* set by the shell: 12-15 px from the window width */
}

/* ===== base ===== */
*{box-sizing:border-box;font:inherit;font-weight:400;letter-spacing:0;text-transform:none}
html{color-scheme:dark;font-size:var(--fs);height:100%;margin:0;background:var(--bg)}
body{height:100%;margin:0;background:transparent;color:var(--text);font-family:var(--font);font-size:1rem;line-height:1.35;-webkit-font-smoothing:antialiased;display:flex;flex-direction:column;overflow:hidden}
a{color:var(--accent);text-decoration:none}

/* ===== the shell: top bar ===== */
#top{flex:none;display:flex;flex-wrap:wrap;align-items:flex-end;gap:4px;padding:6px 6px 0;border-bottom:1px solid var(--line);row-gap:0}
.tab{padding:5px 12px;border:1px solid var(--line);border-bottom:none;border-radius:10px 10px 0 0;color:var(--dim);cursor:pointer;white-space:nowrap;background:transparent;transition:background var(--t2),color var(--t2);user-select:none}
.tab.active{background:var(--surface);color:var(--text)}
.tab.bot{background:var(--surface-2);color:var(--dim)}
.tab.bot.active{color:var(--text);border-color:var(--line-2)}
.tab.nf{font-weight:700;padding:5px 11px} .tab.nf.alert{color:var(--warn);animation:nfblink 1s steps(1) infinite} .tab.nf.active{color:var(--text)} @keyframes nfblink{50%{opacity:.3}}   /* the "!" notification tab (Mik 2026-10-22): blinks until looked at */
.row.nfchange{padding-left:1.5em;border-bottom:none;justify-content:flex-start} .row.nf .d{display:flex;gap:6px} .row.nf .d .btn{padding:4px 9px}
.tbtn{width:2em;height:2em;border:1px solid var(--line);border-bottom:none;border-radius:10px 10px 0 0;background:transparent;color:var(--dim);cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:1.1em;line-height:1}
.tbtn:hover,.tbtn.on{color:var(--text);background:var(--surface)}
#undo{margin-left:auto} #undo.off{opacity:.3;cursor:default;background:transparent;color:var(--dim)}   /* tab undo (Mik 2026-10-18): far right of the top row, dim when there is nothing to reopen */
.chev{transition:transform var(--t2) var(--ease)} .on .chev{transform:rotate(180deg)}

/* ===== the shell: area = module view (top) + chat (bottom) ===== */
#area{flex:1;min-height:0;display:flex;flex-direction:column;position:relative}
#view{flex:0 0 0;min-height:0;overflow:auto;transition:flex-basis var(--t) var(--ease);padding:0 6px}
body.half #view{flex-basis:calc((100% - var(--formh,60px)) * 0.5 - 6px)}
body.half.modfull #view{flex-basis:calc(100% - var(--formh,60px))}
body.modfull .deck{display:none}
body.half.chatfull #view{flex-basis:0}
.page{display:none}
.page.active{display:block}

/* ===== the chat ===== */
#chat{flex:1;min-height:0;display:flex;flex-direction:column}
.deck{flex:1;min-height:0;position:relative;padding:6px 6px 0;overflow:hidden}
.cc{position:absolute;left:6px;right:6px;bottom:0;background:var(--surface-2);border:1px solid var(--line);border-radius:var(--r);padding:9px 12px 10px;max-height:50%;overflow:auto;transition:opacity var(--t2),background var(--t2),border-color var(--t2),height var(--t2) var(--ease)}
body.half .deck>.cc{max-height:calc(100% - 6px)}
.cc.me{background:transparent;border-color:transparent}
.cc{overflow-wrap:anywhere}   /* 2026-10-20: nothing in a card may push it wider than its room (the "other cases") */
.cc .body{white-space:pre-wrap;overflow-wrap:anywhere}
.cc .xp{position:sticky;top:0;float:right;margin:-4px -6px 0 6px;width:1.6em;height:1.6em;border:none;border-radius:8px;background:transparent;color:var(--dim);cursor:pointer;display:none;align-items:center;justify-content:center}
.cc.tall .xp{display:flex} .cc .xp:hover{color:var(--text);background:var(--surface)} .cc.fit{overflow:hidden}
.cc.err{border-color:var(--bad)}
.cc .think{display:flex;align-items:center;gap:8px;margin-top:10px;padding-left:2px} .cc .think .tl{color:var(--dim);margin-right:6px}
.eta{color:var(--tc,var(--dim));font-variant-numeric:tabular-nums;margin-right:8px;white-space:nowrap} .eta.relight{animation:relight 1.6s var(--ease)}   /* time left while a model loads; lights up when the estimate corrects itself */
@keyframes relight{0%{text-shadow:0 0 12px var(--tc,var(--dim));filter:brightness(1.6)}100%{text-shadow:none;filter:none}}
.cc .think i{width:7px;height:7px;border-radius:50%;background:var(--tc,var(--dim));opacity:.22;animation:think 3.9s ease-in-out infinite}   /* each dot lights with a small glow that fades as the next lights: slow, hypnotising */
.cc .think i:nth-child(2){animation-delay:1.3s} .cc .think i:nth-child(3){animation-delay:2.6s}
.cc[data-box=evo]{--tc:var(--evo)} .cc[data-box=sparky]{--tc:var(--sparky)} .cc[data-box=bolty]{--tc:var(--bolty)} .cc[data-box=cluster]{--tc:var(--cluster)}   /* the machine that answers */
@keyframes think{0%,100%{opacity:.22;box-shadow:0 0 0 0 transparent}22%{opacity:1;box-shadow:0 0 10px 2px var(--tc,var(--dim))}60%{opacity:.22;box-shadow:0 0 0 0 transparent}}
#chat.unfolded .deck{overflow:auto}
#chat.unfolded .deck>.cc{display:none}
.list{display:flex;flex-direction:column;gap:6px;min-height:100%;justify-content:flex-end}
.list .cc{position:relative;left:auto;right:auto;bottom:auto;max-height:none;overflow:visible;opacity:1}
.list .cc .xp{display:none}
.list .cc.me{text-align:right;margin-left:15%} .list .cc.bot{margin-right:15%}
form#compose{flex:none;padding:6px}
#slash{padding:0 6px 6px}   /* the slash menu: only what matches what you type (round 20) */
.inputwrap{position:relative;background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:9px 64px 9px 40px}
.inputwrap:focus-within{border-color:var(--line-2)}
textarea#input{display:block;width:100%;resize:none;height:1.6em;max-height:40vh;overflow-y:auto;background:transparent;color:var(--text);border:none;padding:0;outline:none;scrollbar-width:none}
textarea#input::-webkit-scrollbar{display:none}
.ib{position:absolute;bottom:5px;width:30px;height:30px;border:none;border-radius:10px;background:transparent;color:var(--dim);cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:1.2em;line-height:1}
.ib:hover{color:var(--text);background:var(--surface-2)} .foldbtn{left:5px} .send{right:5px}
.send.live{color:var(--accent);animation:sendglow 2.6s ease-in-out infinite}   /* she is working: the > glows; click it to stop, it goes dead again (Mik round 20) */
@keyframes sendglow{0%,100%{text-shadow:0 0 4px color-mix(in srgb, var(--accent) 40%, transparent)}50%{text-shadow:0 0 14px var(--accent),0 0 26px color-mix(in srgb, var(--accent) 60%, transparent)}}
#chat.unfolded .foldbtn .chev{transform:rotate(180deg)}
#legend{flex:none;display:flex;justify-content:center;gap:14px;color:var(--dim);padding:0 6px 8px;position:relative}
.vm{position:absolute;right:12px;top:-2px;cursor:pointer;border:1px solid var(--line);border-radius:999px;padding:1px 12px;user-select:none;transition:color var(--t2),border-color var(--t2)}   /* voice | alerts | mute (Mik 2026-10-17: green, yellow, red) */
.ctxm{position:absolute;left:12px;top:-2px;cursor:pointer;border:1px solid var(--line);border-radius:999px;padding:1px 12px;user-select:none;font-variant-numeric:tabular-nums;transition:color var(--t2),border-color var(--t2)}   /* the CONTEXT METER (Mik 2026-10-18, as Orbisan 2): the engine's own token count of the last answer against the model's real window; click = the archive tab */
.arch .aday{color:var(--dim);font-size:.85em;margin:14px 0 4px;border-bottom:1px solid var(--line);padding-bottom:3px}   /* the archive tab (Mik 2026-10-18): day + date dividers */
.arch .achat{cursor:pointer;gap:10px} .arch .achat:hover .atitle{color:var(--accent)} .arch .achat.now{cursor:default;opacity:.6}
.arch .at{color:var(--dim);font-variant-numeric:tabular-nums;flex:none} .arch .atitle{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.arch .anav{justify-content:center;margin-top:12px} .arch .act.off{opacity:.3;cursor:default}
.ctxm.warm{color:var(--warn);border-color:var(--warn)} .ctxm.full{color:var(--bad);border-color:var(--bad)}
.vm.voice{color:var(--evo);border-color:var(--evo)} .vm.alerts{color:var(--warn);border-color:var(--warn)} .vm.mute{color:var(--bad);border-color:var(--bad)}
.mic{right:34px} .mic.rec{color:var(--bad);animation:recpulse 1.6s ease-in-out infinite} @keyframes recpulse{50%{opacity:.4}}
.cc.speaking{border-color:var(--accent);animation:speakpulse 3.2s ease-in-out infinite;cursor:pointer}   /* she is talking: click the bubble to cut this answer's voice */
@keyframes speakpulse{50%{box-shadow:0 0 14px 0 color-mix(in srgb, var(--accent) 35%, transparent)}}
.dot{display:inline-block;width:.55em;height:.55em;border-radius:50%;vertical-align:1px;margin-right:5px;background:var(--line)}
.dot.evo{background:var(--evo)} .dot.sparky{background:var(--sparky)} .dot.bolty{background:var(--bolty)} .dot.cluster{background:var(--cluster)}
.dot.off{opacity:.3}   /* off = its own colour, dimmed (Mik 2026-10-17: the cluster is pink at the bottom of the chat too) */

/* ===== the picker (the +) ===== */
#picker{position:absolute;inset:0;bottom:calc(var(--formh,60px) + 1.35em + 8px);background:var(--bg);padding:6px;overflow:auto;display:none}
body.picking #picker{display:flex}
#picker{flex-direction:column;gap:6px}   /* shown as flex only while picking (rule above) */
.perm{display:flex;gap:6px;flex:none}  .perm .pill{flex:1;min-width:0}          /* the permanent line: as wide as the window, shrinks as more come */
.sect{border-radius:var(--r);padding:6px;display:flex;flex-direction:column;gap:6px;min-height:0}   /* round 13: apps and widgets, each its own background */
.sect.apps{background:var(--apps-bg);flex:none} .sect.widgets{background:var(--widgets-bg);flex:1}
.sect .sl{color:var(--dim);padding:0 8px;flex:none}
.sect .pills{flex:none} .sect.widgets .pills{flex:1}
.pills{flex:1;min-height:0;overflow:auto;display:grid;grid-template-columns:repeat(auto-fit,minmax(11em,1fr));grid-auto-rows:max-content;align-content:start;gap:6px}   /* the chosen widgets: fill left-right, keep their height, scroll when many */
.pill{background:var(--surface);border:1px solid var(--line);border-radius:999px;padding:7px 14px;cursor:pointer;min-width:0;transition:background var(--t2),border-color var(--t2)}
.pill:hover{background:var(--surface-2);border-color:var(--line-2)}
.pill.open{border-color:var(--accent)}
@media (max-width:700px){ .sect.widgets,.sect.widgets .pills{flex:none;overflow:visible} #picker{overflow-y:auto;touch-action:pan-y} }   /* a phone: ONE scroller (the + page itself), sections at natural height (Mik 2026-10-17: finger could not scroll the + page) */
.pill .n,.pill .i{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pill .i{color:var(--dim);display:flex;align-items:center;gap:6px}
.pill .i span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis}
.pill .i .dot{margin:0;flex:none}

/* ===== widgets and links (a tab = a chain of widgets) ===== */
.page{padding:6px 6px 0}
.widget{background:var(--surface-2);border:1px solid var(--line);border-radius:var(--r);padding:9px 12px 10px;margin-bottom:6px}
.widget .wn{color:var(--dim);margin-bottom:4px}
.linkline,.linkwrap{display:flex;justify-content:center;margin-bottom:6px}
.pillw,.linkbubble{display:inline-flex;align-items:center;gap:10px;background:var(--surface);border:1px solid var(--line);border-radius:999px;padding:4px 14px;color:var(--dim)}
.linkbubble{cursor:pointer} .linkbubble:hover,.pillw .x:hover{color:var(--text);border-color:var(--line-2)}
.pillw .x{cursor:pointer;line-height:1}
.linkpick{display:none;grid-template-columns:repeat(auto-fill,minmax(11em,1fr));gap:6px;margin-bottom:6px}

/* ===== THE KIT: what a widget is built from ===== */
.row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:6px 0;border-bottom:1px solid var(--line)}
.row:last-child{border-bottom:none}
.row .d{color:var(--dim);white-space:nowrap}
.txt{padding:6px 0 8px} .txt+.txt{border-top:1px solid var(--line)} .txt .ln{padding:2px 0;display:flex;flex-wrap:wrap;justify-content:space-between;column-gap:12px;white-space:pre-wrap;overflow-wrap:anywhere} .txt .ln>span{min-width:0} .txt .ln .d{color:var(--dim);margin-left:auto}   /* 2026-10-19 (Mik: "they dont scale down when the browser does"): the dim right part was nowrap, so a long one pushed the tab wider than the window; now it wraps, and drops under the left part when both do not fit */   /* a result tab: her lines as written, a rule only between blank-line groups */
.row .act{color:var(--dim);cursor:pointer} .row .act:hover{color:var(--text)}
.box{padding:8px 0;border-bottom:1px solid var(--line)} .box:last-child{border-bottom:none}
.box .h{display:flex;justify-content:space-between} .box .h span{color:var(--dim)}
.bar{height:6px;background:var(--line);border-radius:3px;overflow:hidden;margin-top:6px} .bar i{display:block;height:100%;border-radius:3px;background:var(--accent)}
.msg{padding:8px 12px;border-radius:var(--r);background:var(--surface);max-width:100%;white-space:pre-wrap}
.k{color:var(--dim)}
/* a setting = a row whose right side is an input */
.row input,.row select,.row textarea{background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:8px;padding:4px 8px;outline:none;min-width:0}
.row input:focus,.row select:focus,.row textarea:focus{border-color:var(--line-2)}
.row input[type=number]{width:5em} .row select{max-width:60%}
.row.tall{flex-direction:column;align-items:stretch} .row.tall textarea{width:100%;min-height:6em;resize:vertical}
.btn{display:inline-block;border:1px solid var(--line);border-radius:999px;padding:4px 14px;color:var(--dim);cursor:pointer;background:var(--surface)}
.btn.on{border-color:var(--accent);color:var(--text)} .btn:hover{color:var(--text);border-color:var(--line-2)} .btn.bad:hover{color:var(--bad);border-color:var(--bad)}
.btns{display:flex;gap:8px;justify-content:center;padding:8px 0 2px;flex-wrap:wrap}
.fold{cursor:pointer;color:var(--dim)} .fold:hover{color:var(--text)}
.act{cursor:pointer;user-select:none}
.hidden{display:none}
/* click-choices: chips (one or several "on"), and a < value > stepper */
.chips{display:inline-flex;flex-wrap:wrap;gap:6px;align-items:center} .chips.hidden{display:none}
.chip{border:1px solid var(--line);border-radius:999px;padding:2px 10px;color:var(--dim);cursor:pointer;background:var(--surface);user-select:none}
.chip:hover{border-color:var(--line-2);color:var(--text)} .chip.on{color:var(--text);border-color:var(--accent)}
.chip i{font-style:normal;color:var(--accent)}
.chip.box-evo.on{border-color:var(--evo)} .chip.box-sparky.on{border-color:var(--sparky)} .chip.box-bolty.on{border-color:var(--bolty)} .chip.box-cluster.on{border-color:var(--cluster)}
.step{display:inline-flex;align-items:center;gap:10px} .step .act{padding:0 6px}
select.alias{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:.95em}   /* alias rows: name left, gb right, columns hold */
.row .d .dot{margin:0 4px 0 2px}
/* docs: rendered markdown is built from the kit; only these two additions */
.code{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:.92em;background:var(--surface);border-radius:6px;padding:0 5px}
.msg.code pre{margin:0;white-space:pre-wrap;overflow-wrap:anywhere;font-family:ui-monospace,Menlo,Consolas,monospace;font-size:.92em}
.doc .body{padding:4px 0 8px} .doc .msg{margin:6px 0}
.model{border-bottom:1px solid var(--line);padding:2px 0} .model:last-child{border-bottom:none} .model .row{border-bottom:none;padding:3px 0}
.model .acts{display:inline-flex;gap:12px;white-space:nowrap} .model .alias{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.special{background:var(--special);border-radius:var(--r);padding:4px 12px;margin:6px 0}   /* Kiri's section: out of the ordinary */
.fold>.h{cursor:pointer} .fold .fb{display:none} .fold.open .fb{display:block}   /* folded content: click the header */
.divider{text-align:center;color:var(--dim);border-top:1px dashed var(--line);margin:12px 0 6px;padding-top:6px}
/* round 20 (Mik): no explanation text inside an app; a ? opens it. .q = the ?, .help = the folded text right after it */
.q{display:inline-flex;align-items:center;justify-content:center;width:1.3em;height:1.3em;border:1px solid var(--line);border-radius:50%;color:var(--dim);font-size:.85em;cursor:pointer;margin-left:6px;vertical-align:middle;user-select:none} .q:hover{color:var(--text);border-color:var(--line-2)}
.help{display:none;color:var(--dim);padding:6px 10px;margin:4px 0;background:var(--surface-2);border-radius:var(--r);white-space:normal;flex-basis:100%} .help.open{display:block}
.row.tick{flex-wrap:wrap;gap:4px} .row.tick label{flex:1;min-width:0}
.tools{display:grid;grid-template-columns:repeat(auto-fit,minmax(16em,1fr));gap:6px}
.term{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:.88em;background:var(--surface-2);border-radius:var(--r);padding:8px 10px;margin-top:6px;max-height:50vh;overflow:auto} .term .tl{white-space:pre-wrap} .term .tout{white-space:pre-wrap;border-top:1px dashed var(--line);margin-top:6px;padding-top:6px;font-family:var(--font)}
.widget.app .wn{margin-bottom:8px}
.applystatus .k{white-space:normal}
/* ===== text looks (ORB FX text slot, ported from Orbisan 2 2026-10-17): only the current chat bubble; --txb = text boost 1..3 ===== */
.cc .body .txline{animation:txfade calc(.6s * var(--txb,1)) ease-out both}
@keyframes txfade{from{opacity:0;transform:translateY(calc(4px * var(--txb,1)))}to{opacity:1;transform:none}}
.cc .body .txsettle{animation:txsettle calc(.7s * var(--txb,1)) cubic-bezier(.2,.7,.2,1) both;transform-origin:left center}
@keyframes txsettle{from{opacity:0;transform:translateY(calc(-7px * var(--txb,1))) scale(calc(1 + .03 * var(--txb,1)));filter:blur(calc(3px * var(--txb,1)))}to{opacity:1;transform:none;filter:none}}
.cc .body .txsheen{animation:txfade calc(.5s * var(--txb,1)) ease-out both,txsheen calc(1.2s * var(--txb,1)) ease-in-out both;background:linear-gradient(100deg,currentColor calc(50% - 10% * var(--txb,1)),var(--accent) 50%,currentColor calc(50% + 10% * var(--txb,1))) 0 0 / 250% 100% no-repeat;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}
@keyframes txsheen{from{background-position:100% 0}to{background-position:0 0}}
.cc .body .txword{display:inline;animation:txfocus calc(.5s * var(--txb,1)) ease-out both;white-space:pre-wrap}
@keyframes txfocus{from{opacity:0;filter:blur(calc(6px * var(--txb,1)))}to{opacity:1;filter:none}}
.cc .body .txcur{color:var(--accent);animation:txblink 1s steps(1) infinite;display:inline-block}
@keyframes txblink{50%{opacity:0}}
/* ===== the theme app ===== */
.swatches{display:grid;grid-template-columns:repeat(auto-fill,minmax(9em,1fr));gap:8px;padding:6px 0}
.swatch{border:1px solid var(--line);border-radius:var(--r);padding:8px 10px;cursor:pointer;background:var(--s-bg);color:var(--s-text);transition:border-color var(--t2)}
.swatch:hover{border-color:var(--line-2)} .swatch.on{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent)}
.swatch .sw{display:flex;gap:4px;margin-top:6px} .swatch .sw i{flex:1;height:8px;border-radius:4px} .swatch .sw i:nth-child(1){background:var(--s-surface)} .swatch .sw i:nth-child(2){background:var(--s-accent)} .swatch .sw i:nth-child(3){background:var(--s-accent2)}
.fxdesc{color:var(--dim);padding:2px 0 6px}
#runinfo{position:fixed;inset:0;z-index:-1;pointer-events:none;overflow:hidden}   /* runtime visual (round 20): what she does, fading in and out behind the chat; above the fx canvas, under everything else */
#runinfo .rl{position:absolute;color:var(--dim);font-size:1.15em;letter-spacing:.04em;white-space:nowrap;opacity:0;transform:rotate(var(--rrot,0deg));animation:runfade 5s ease-in-out forwards}
@keyframes runfade{0%{opacity:0;filter:blur(3px)}14%{opacity:.75;filter:none}70%{opacity:.6}100%{opacity:0;filter:blur(2px)}}
#runinfo .rl.fill{animation:runfill 6s ease-in-out forwards}   /* a thinking word: 3 s in, 3 s out (Mik 2026-10-18) */
@keyframes runfill{0%{opacity:0;filter:blur(3px)}50%{opacity:.7;filter:none}100%{opacity:0;filter:blur(3px)}}
/* the widget designer */
.page.full{height:100%;padding-bottom:6px}
.dz{--split:30%;display:grid;grid-template-columns:calc(var(--split) - 3px) 6px 1fr;height:100%;min-height:0}
.dl,.dr{display:flex;flex-direction:column;min-height:0;background:var(--surface-2);border:1px solid var(--line);border-radius:var(--r);padding:9px 12px 10px}
.ddiv{cursor:col-resize;position:relative} .ddiv::after{content:"";position:absolute;left:2px;top:0;bottom:0;width:2px;background:var(--line);border-radius:1px} .ddiv:hover::after{background:var(--line-2)}
.dhead{display:flex;align-items:center;gap:12px;color:var(--dim);padding-bottom:6px;border-bottom:1px solid var(--line);margin-bottom:6px;flex:none}
.dhead select,.dhead input{background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:8px;padding:4px 8px;outline:none;min-width:0}
.dlist,.dslots{flex:1;min-height:0;overflow:auto}
.dlist.pills{grid-auto-rows:max-content;align-content:start}
.row.pick{cursor:pointer;background:var(--surface);border:1px solid var(--line);border-radius:8px;padding:6px 10px;margin:4px 0;border-bottom:1px solid var(--line)}   /* a part you can pick = its own box */
.row.pick:hover{border-color:var(--line-2);color:var(--text)} .row.pick.on{background:var(--surface-2);border-color:var(--accent);color:var(--text)}   /* picked = highlighted inside its box */
.dslot{border:1px dashed var(--line);border-radius:var(--r);padding:6px 12px;color:var(--dim);text-align:center;margin:6px 0;transition:border-color var(--t2),color var(--t2)}
.dslot.ready{border-color:var(--accent);color:var(--text);cursor:pointer}
.dpart{border:1px solid var(--line);border-radius:var(--r);padding:4px 12px 8px;background:var(--surface)}
.dpart>.row{border-bottom:1px solid var(--line)}
/* a module that is a whole page inside a widget (Orikomi, notes): the iframe fills the widget */
.widget iframe.app{display:block;width:100%;height:72vh;border:0;border-radius:var(--r);background:var(--bg)}
body.half.modfull .widget iframe.app{height:calc(100vh - 147px - 2.45em)}
/* a gated tool asks inside the bot's card */
.cc .ask{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:8px;padding:8px 12px;border:1px solid var(--line-2);border-radius:var(--r);background:var(--surface)} .cc .ask>span:first-child{min-width:0;overflow-wrap:anywhere} .cc .ask .btns{flex:none}   /* 2026-10-20 (Mik: "when she asks for running tools ... it extends wide, out of screen"): a tool line with a long path could not break, so the box grew past the card; now it wraps and the buttons keep their place */
.cc .ask .btns{padding:0}

/* ===== VOICE MODE (round 23/24, Mik: "fullscreen voice mode ... the mic icon large at bottom - no input bar, no nothing just that ... 5x larger ... centered on bottom of screen. Easy to touch") ===== */
body.voicemode #top,body.voicemode #view,body.voicemode .deck,body.voicemode #compose,body.voicemode #legend,body.voicemode #picker{display:none}
#vm{display:none} body.voicemode #vm{display:flex;position:fixed;inset:0;z-index:20;flex-direction:column;align-items:center;justify-content:flex-end;padding:16px;gap:14px;pointer-events:none} #vm>*{pointer-events:auto}
#vmsay{display:none;font-size:calc(var(--fs)*1.95);line-height:1.3;max-height:48vh;min-height:0;flex:0 1 auto;overflow:auto;background:var(--surface-2);border:1px solid var(--line);border-radius:var(--r);padding:14px 18px;margin:auto 0;cursor:pointer;white-space:pre-wrap;max-width:min(96vw,60rem)} #vmsay.on{display:block} #vmsay.speaking{border-color:var(--accent);animation:speakpulse 3.2s ease-in-out infinite}
#vmtext{font-size:calc(var(--fs)*1.5);color:var(--text);text-align:center;min-height:2em;padding:0 8px}
#vmmic{width:150px;height:150px;border-radius:50%;border:2px solid var(--line-2);background:var(--surface);color:var(--dim);display:flex;align-items:center;justify-content:center;cursor:pointer;position:relative;transition:box-shadow .15s,color .15s,border-color .15s} #vmmic svg{width:80px;height:80px;display:block;pointer-events:none}
#vmmic.rec{color:var(--bad);border-color:var(--bad);animation:recpulse 1.6s ease-in-out infinite} body.vmloud #vmmic{animation:none;box-shadow:0 0 calc(12px + 70px*var(--vlevel,0)) var(--bad)}
body.vmloud{background:color-mix(in srgb,var(--bad) calc(40%*var(--vlevel,0)),var(--bg))}   /* the page breathes red with Mik's level above the floor */
#vmmic .cnt{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:64px;color:var(--text);pointer-events:none}
/* ===== SPLIT (round 29, Mik 2026-10-19): double-click the + = the open tab left, the chat right, a line that drags between them. Every app must fit a column (DESIGN.md round 29). ===== */
#vdiv{display:none}
body.split #area{flex-direction:row}
body.split #view,body.split.half #view,body.split.half.modfull #view,body.split.half.chatfull #view{flex:0 0 calc(var(--splitw,50%) - 3px);transition:none;padding-bottom:6px}
body.split #vdiv{display:block;flex:0 0 6px;cursor:col-resize;position:relative;touch-action:none} #vdiv::after{content:"";position:absolute;left:2px;top:0;bottom:0;width:2px;background:var(--line);border-radius:1px} #vdiv:hover::after,body.splitdrag #vdiv::after{background:var(--line-2)}
body.splitdrag{user-select:none;cursor:col-resize} body.splitdrag iframe{pointer-events:none}   /* an iframe under the pointer would swallow the drag */
body.split #chat{flex:1;min-width:0}
body.split.modfull .deck{display:block} body.split .deck>.cc{max-height:calc(100% - 6px)}   /* 2026-10-20 (Mik: "the chat for orisa has to be 100% in height when its split"): the right column is the whole chat, so the card may fill it, like in half */
body.split.picking .deck{visibility:hidden}   /* 2026-10-20 (Mik: "clicking + takes up all the space meaning it folds down chat to input line only as its open - across the screen"): the card goes, the input line stays */
body.split.picking #picker{bottom:0;z-index:1;padding-bottom:calc(var(--formh,60px) + 8px)} body.split.picking #compose,body.split.picking #legend{position:relative;z-index:2}   /* the + page under the whole width; the input line + legend on top of it, right column */
body.split #full{opacity:.3;cursor:default;background:transparent;color:var(--dim)}   /* the whole-window chevron has no job in split */
body.split .widget iframe.app{height:calc(100vh - 55px - 3.55em)}   /* an app in the left column: the whole height, no second scrollbar */
.ls{display:none} body.split #legend .lw{display:none} body.split #legend .ls{display:inline} body.split #legend{gap:9px}   /* e s b c + v a m: Mik knows them */
body.split.voicemode #top,body.split.voicemode #view{display:block} body.split.voicemode #top{display:flex} body.split.voicemode #vdiv{display:block}
body.split.voicemode #vm{position:absolute;inset:0 0 0 auto;width:calc(100% - var(--splitw,50%) - 3px);z-index:5}   /* voice mode in the right half (Mik round 29) */
body.split.voicemode #vmsay{max-width:100%}
#vmfloor{display:none;position:fixed;inset:0;z-index:30;background:var(--bg);flex-direction:column} #vmfloor.on{display:flex} #vmfloor canvas{flex:1;width:100%;min-height:0;touch-action:none;cursor:ns-resize} #vmfloor .btns{justify-content:center;padding:12px}

/* ===== system to-do (round 24) ===== */
.row.todo{align-items:flex-start} .row.todo .t{flex:1;min-width:0} .row.todo.done .t{text-decoration:line-through;color:var(--dim)} .row.todo>.btn{flex:none;min-width:2em;text-align:center}
/* WORKMODE mark (modules/workmode, Mik 2026-10-20: "a red, faded out workmode text ... same font as text chat, just centered on background, 25% visible only") */
#wmmark{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);font-family:var(--font);font-size:clamp(2.5rem,9vw,7rem);color:var(--bad);opacity:0;pointer-events:none;z-index:-1;user-select:none;transition:opacity .6s}
body.wm-on #wmmark{opacity:.25}
