/* Kakushin OS: tokens taken from kakushin.io's own :root (2026-10-12). Dark only, like the site. */
@font-face { font-family: "Space Grotesk"; src: url(/fonts/space-grotesk.woff2) format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url(/fonts/jetbrains-mono.woff2) format("woff2"); font-weight: 400 600; font-display: swap; }

:root {
  --bg: #05060b;
  --bg-2: #0a0c14;
  --panel: rgba(255,255,255,.035);
  --panel-2: rgba(255,255,255,.065);
  --line: rgba(255,255,255,.09);
  --line-2: rgba(255,255,255,.16);
  --text: #eef0f7;
  --muted: #9aa2b4;
  --muted-2: #6d7488;
  --accent: #29e7ff;
  --accent-2: #7b6cff;
  --good: #3ee68a;
  --bad: #ff5f7a;
  --warn: #ffc65c;
  --grad: linear-gradient(135deg, #29e7ff, #7b6cff);
  --grad-soft: linear-gradient(135deg, rgba(41,231,255,.14), rgba(123,108,255,.14));
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 24px 60px -24px rgba(0,0,0,.7);
  --font: "Space Grotesk", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --bar-h: 60px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg) radial-gradient(120% 90% at 50% -10%, #0b0f1e 0, #05060b 55%) fixed;
  color: var(--text); font: 15px/1.5 var(--font); overflow-x: hidden;
}
/* the starfield motif from kakushin.io, as static dots */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .5;
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(123,108,255,.9), transparent 60%),
    radial-gradient(1px 1px at 72% 9%, rgba(41,231,255,.8), transparent 60%),
    radial-gradient(1px 1px at 38% 62%, rgba(255,255,255,.6), transparent 60%),
    radial-gradient(1.5px 1.5px at 86% 44%, rgba(123,108,255,.8), transparent 60%),
    radial-gradient(1px 1px at 22% 84%, rgba(41,231,255,.7), transparent 60%),
    radial-gradient(1px 1px at 58% 92%, rgba(255,255,255,.5), transparent 60%),
    radial-gradient(1px 1px at 93% 76%, rgba(41,231,255,.6), transparent 60%);
}
[hidden] { display: none !important; }
a { color: var(--accent); text-decoration: none; }
code, .mono, pre { font-family: var(--mono); }
code { background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: .9em; }
button, input, select, textarea { font: inherit; color: inherit; }
input, select, textarea { font-size: 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.grow { flex: 1; }
.row { display: flex; align-items: center; flex-wrap: wrap; }
.gap { gap: 10px; margin-top: 14px; }

/* ---------- brand ring (the kakushin.io favicon mark) ---------- */
.ring { display: inline-block; width: 26px; height: 26px; border-radius: 50%; position: relative; flex: none;
  background: conic-gradient(from 135deg, #29e7ff, #7b6cff, #29e7ff); }
.ring::before { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--bg); }
.ring::after { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--grad); }
.ring.sm { width: 22px; height: 22px; }
.ring.sm::before { inset: 3px; } .ring.sm::after { inset: 7.5px; }
.ring.big { width: 84px; height: 84px; }
.ring.big::before { inset: 6px; } .ring.big::after { inset: 30px; }
.ring.dim { filter: grayscale(.85) brightness(.7); animation: breathe 3s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .55; } }
.boot { position: fixed; inset: 0; display: grid; place-items: center; }
.boot .ring { animation: breathe 1.4s ease-in-out infinite; }

.brand, .brandmark { display: flex; align-items: center; gap: 10px; color: var(--text); min-width: 0; }
.brand b, .brandmark b { display: block; font-weight: 600; letter-spacing: .18em; font-size: 15px; line-height: 1.1; }
.brand i, .brandmark i { display: block; font: normal 10px/1.3 var(--mono); letter-spacing: .12em; color: var(--muted-2); text-transform: uppercase; white-space: nowrap; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 16px;
  border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--panel); cursor: pointer;
  font: 500 13px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.btn:hover { border-color: var(--line-2); color: var(--text); }
.btn.primary { background: var(--grad); color: #05060b; border-color: transparent; font-weight: 600; }
.btn.primary:hover { filter: brightness(1.08); color: #05060b; }
.btn.danger { color: var(--bad); border-color: rgba(255,95,122,.35); }
.btn.ghost { background: transparent; }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 11.5px; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .45; cursor: default; }
.iconbtn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel); cursor: pointer; color: var(--muted); font-size: 16px; flex: none; }
.iconbtn:hover { color: var(--text); border-color: var(--line-2); }
.iconbtn.muted-on { color: var(--muted-2); text-decoration: line-through; }
.toggle { min-width: 40px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; filter: grayscale(1); opacity: .6; }
.toggle.on { filter: none; opacity: 1; border-color: rgba(41,231,255,.45); background: var(--grad-soft); }

/* ---------- sign-in / offline ---------- */
.center-view { position: relative; z-index: 1; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); min-width: 0; }
.card h3 { margin: 0 0 12px; font: 500 11.5px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.login { width: min(420px, 100%); padding: 28px 24px; }
.login h1 { font-size: 26px; margin: 26px 0 6px; font-weight: 600; }
.login form { display: flex; gap: 10px; margin-top: 18px; }
.code { flex: 1; min-width: 0; height: 52px; border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: var(--bg-2);
  text-align: center; font: 600 24px var(--mono); letter-spacing: .4em; padding-left: .4em; }
.code:focus, textarea:focus, input:focus, select:focus { outline: none; border-color: rgba(41,231,255,.6); box-shadow: 0 0 0 3px rgba(41,231,255,.12); }
.login .btn { min-height: 52px; }
.msg { min-height: 1.5em; margin: 14px 0 0; color: var(--muted); }
.msg.err { color: var(--bad); }
.msg.ok { color: var(--good); }
.offline { text-align: center; }
.offline h1 { font-size: 30px; margin: 22px 0 8px; }
.offline p { margin: 6px 0; color: var(--muted); }

/* ---------- app shell ---------- */
#view-app { position: relative; z-index: 1; display: flex; flex-direction: column; min-height: 100dvh; }
.bar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; height: var(--bar-h);
  padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
  border-bottom: 1px solid var(--line); background: rgba(5,6,11,.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.bar .brand { margin-right: auto; }
.topnav { display: flex; gap: 4px; }
.topnav a, .drawer a { color: var(--muted); font: 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; padding: 12px 12px; border-radius: 10px; }
.topnav a.on, .drawer a.on { color: var(--text); background: var(--panel-2); }
.menu-btn { display: none; gap: 4px; flex-direction: column; }
.menu-btn span { display: block; width: 16px; height: 1.5px; background: currentColor; }
.backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.5); }
.drawer { position: fixed; z-index: 41; top: 0; left: 0; bottom: 0; width: min(280px, 82vw); padding: 76px 14px 20px; display: flex; flex-direction: column; gap: 4px;
  background: var(--bg-2); border-right: 1px solid var(--line); }
.drawer a { padding: 14px 12px; }
.drawer-signout { margin-top: auto; text-align: left; background: none; border: 1px solid var(--line); border-radius: 10px; padding: 12px; color: var(--muted); cursor: pointer; }

.strip { position: sticky; top: var(--bar-h); z-index: 20; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: space-between;
  padding: 8px 16px; border-bottom: 1px solid var(--line); background: rgba(5,6,11,.72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.strip-left, .strip-right { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; min-width: 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--panel); font: 11.5px/1 var(--mono); color: var(--muted); white-space: nowrap; }
.chip:empty { display: none; }
.chip.live { color: var(--accent); border-color: rgba(41,231,255,.35); }
.chip.live::before, .dot.run { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: breathe 1.2s infinite; }
.chip.warn { color: var(--warn); border-color: rgba(255,198,92,.4); }
.chip.bad { color: var(--bad); border-color: rgba(255,95,122,.4); }

main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 16px; min-width: 0; }
.page { min-width: 0; }
.subtabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.subtabs::-webkit-scrollbar { display: none; }
.subtabs button { flex: none; background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 12px; min-height: 40px; cursor: pointer;
  color: var(--muted); font: 12px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.subtabs button.on { color: var(--text); border-bottom-color: var(--accent); }

/* ---------- sessions (VS Code style) ---------- */
.sessions { display: flex; flex-direction: column; height: calc(100dvh - var(--pane-top, 170px) - 12px); min-height: 340px; }
.convbar { display: flex; align-items: stretch; gap: 6px; border-bottom: 1px solid var(--line); }
.convtabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.convtabs::-webkit-scrollbar { display: none; }
.ctab { flex: none; display: flex; align-items: center; gap: 8px; max-width: 220px; height: 40px; padding: 0 6px 0 12px; border-radius: 10px 10px 0 0;
  border: 1px solid transparent; border-bottom: 0; background: none; color: var(--muted); cursor: pointer; font-size: 13.5px; }
.ctab.on { background: var(--panel-2); border-color: var(--line); color: var(--text); }
.ctab .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctab .x { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; color: var(--muted-2); }
.ctab .x:hover { background: var(--panel-2); color: var(--text); }
.dot { width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--muted-2); }
.dot.queued { background: var(--warn); }
.dot.error { background: var(--bad); }
.dot.idle { background: var(--good); opacity: .7; }
.plus { position: sticky; right: 0; height: 40px; width: 44px; font-size: 20px; background: var(--grad-soft); border-color: rgba(41,231,255,.3); color: var(--text); }

.thread { flex: 1; overflow-y: auto; padding: 16px 2px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; min-height: 0; }
.empty { margin: auto; text-align: center; color: var(--muted); max-width: 420px; padding: 20px; }
.empty .ring { margin-bottom: 12px; }
.m { max-width: 100%; min-width: 0; overflow-wrap: anywhere; }
.m.user { align-self: flex-end; max-width: min(85%, 720px); background: var(--grad-soft); border: 1px solid rgba(123,108,255,.3); border-radius: 16px 16px 4px 16px; padding: 10px 14px; white-space: pre-wrap; }
.m.user .meta { display: block; font: 10.5px var(--mono); color: var(--muted-2); margin-top: 4px; text-transform: uppercase; letter-spacing: .08em; }
.m.asst { align-self: stretch; padding: 2px 4px; line-height: 1.6; }
.m.asst.sub { opacity: .75; border-left: 2px solid var(--line-2); padding-left: 10px; font-size: 14px; }
.m.asst p { margin: 0 0 .7em; } .m.asst p:last-child { margin-bottom: 0; }
.m.asst pre { background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; overflow-x: auto; font-size: 13px; white-space: pre; }
.m.asst h1, .m.asst h2, .m.asst h3, .m.asst h4 { font-size: 15.5px; margin: .9em 0 .4em; }
.m.asst ul, .m.asst ol { padding-left: 1.3em; margin: 0 0 .7em; }
.m.asst table { border-collapse: collapse; display: block; overflow-x: auto; font-size: 13.5px; margin: 0 0 .7em; }
.m.asst td, .m.asst th { border: 1px solid var(--line); padding: 4px 8px; }
.m.sys { align-self: center; font: 11.5px/1.4 var(--mono); color: var(--muted-2); text-align: center; padding: 0 10px; }
.m.sys.limit, .m.sys.warn { color: var(--warn); }
.m.sys.logout, .m.err { color: var(--bad); }
.m.err { font: 12.5px/1.45 var(--mono); border: 1px solid rgba(255,95,122,.3); background: rgba(255,95,122,.06); border-radius: 10px; padding: 8px 12px; white-space: pre-wrap; }
.m.result { align-self: flex-start; font: 11px var(--mono); color: var(--muted-2); letter-spacing: .04em; }
details.tool { align-self: stretch; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.02); font: 12.5px/1.45 var(--mono); min-width: 0; }
details.tool summary { cursor: pointer; padding: 7px 10px; color: var(--muted); list-style: none; display: flex; gap: 8px; align-items: baseline; min-width: 0; }
details.tool summary::-webkit-details-marker { display: none; }
details.tool summary .n { color: var(--accent); flex: none; }
details.tool summary .h { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
details.tool summary .s { margin-left: auto; flex: none; color: var(--muted-2); }
details.tool.err summary .s { color: var(--bad); }
details.tool.sub { margin-left: 14px; opacity: .8; }
details.tool pre { margin: 0; padding: 8px 10px; border-top: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 360px; overflow-y: auto; color: var(--muted); }
.partial { white-space: pre-wrap; }
.partial::after { content: "▍"; color: var(--accent); animation: breathe 1s infinite; }

.queuebar { display: flex; flex-direction: column; gap: 6px; padding: 8px 0; border-top: 1px dashed var(--line); }
.qi { display: flex; align-items: center; gap: 8px; font-size: 13px; min-width: 0; }
.qi .q { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qi .w { flex: none; font: 11px var(--mono); color: var(--warn); max-width: 46%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qi .btn { min-height: 32px; }
.qi .iconbtn { width: 36px; height: 36px; font-size: 13px; }

.composer { position: relative; border: 1px solid var(--line-2); border-radius: var(--radius); background: rgba(10,12,20,.9); padding: 8px 10px; margin-bottom: max(0px, env(safe-area-inset-bottom)); }
.composer textarea { width: 100%; resize: none; border: 0; background: transparent; min-height: 44px; max-height: 32dvh; padding: 6px 4px; line-height: 1.45; display: block; }
.composer textarea:focus { box-shadow: none; }
.crow { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; min-width: 0; }
.crow select { min-width: 0; max-width: 260px; flex: 0 1 auto; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); padding: 0 8px; }
.ro { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); white-space: nowrap; min-height: 36px; cursor: pointer; }
.ro input { width: 18px; height: 18px; accent-color: var(--accent); }
.ac { position: absolute; left: 8px; right: 8px; bottom: calc(100% + 6px); max-height: 260px; overflow-y: auto; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow); z-index: 10; }
.ac div { padding: 8px 12px; cursor: pointer; display: flex; gap: 10px; align-items: baseline; min-width: 0; }
.ac div.on, .ac div:hover { background: var(--panel-2); }
.ac b { font: 500 13px var(--mono); color: var(--accent); flex: none; }
.ac span { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- cards / tables ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.span2 { grid-column: 1 / -1; }
dl { margin: 0; display: grid; grid-template-columns: minmax(100px, auto) 1fr; gap: 6px 14px; font-size: 14px; }
dt { color: var(--muted); }
dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.good { color: var(--good); } .bad { color: var(--bad); } .warnc { color: var(--warn); }
.list { display: flex; flex-direction: column; gap: 8px; }
.li { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; min-width: 0; font-size: 14px; }
.li .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li .w { font: 11px var(--mono); color: var(--muted); flex: none; }
.tablewrap { overflow-x: auto; margin: 0 -4px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font: 500 10.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); padding: 8px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 9px 6px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.tbl td.nw { white-space: nowrap; }
.tbl .clip { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag { display: inline-block; font: 10.5px var(--mono); padding: 2px 7px; border-radius: 6px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.tag.ok { color: var(--good); border-color: rgba(62,230,138,.3); }
.tag.bad { color: var(--bad); border-color: rgba(255,95,122,.3); }
.tag.warn { color: var(--warn); border-color: rgba(255,198,92,.3); }
.meter { margin-bottom: 16px; }
.mlabel { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 6px; }
.mlabel span:last-child { font-family: var(--mono); }
.mbar { height: 10px; border-radius: 99px; background: var(--panel-2); overflow: hidden; }
.mbar i { display: block; height: 100%; width: 0; background: var(--grad); border-radius: 99px; transition: width .4s; }
.mbar i.hot { background: linear-gradient(135deg, #ffc65c, #ff5f7a); }
.msub { font: 11.5px var(--mono); color: var(--muted-2); margin-top: 5px; }
.mcp, .skills { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; }
.mcp li { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.mcp li .s { margin-left: auto; font: 11px var(--mono); }
.skills { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; margin-top: 10px; }
.skills li { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; min-width: 0; }
.skills b { font: 500 13px var(--mono); color: var(--accent); display: block; }
.skills span { color: var(--muted); font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#sk-filter { width: 100%; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); padding: 0 12px; }

/* ---------- talk ---------- */
.talk { display: flex; flex-direction: column; height: calc(100dvh - var(--pane-top, 120px) - 12px); min-height: 360px; }
.talk-controls { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.talk-row { display: flex; align-items: center; gap: 12px; justify-content: center; }
.talk-row input[type=text] { flex: 1; min-width: 0; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); padding: 0 12px; }
.mic { width: 76px; height: 76px; border-radius: 50%; border: 1px solid rgba(41,231,255,.45); background: var(--grad-soft); cursor: pointer; display: grid; place-items: center; touch-action: manipulation; }
.mic span { width: 28px; height: 28px; border-radius: 50%; background: var(--grad); }
.mic.on { box-shadow: 0 0 0 8px rgba(41,231,255,.12), 0 0 40px rgba(41,231,255,.4); }
.mic.on span { animation: breathe .9s infinite; }
.mic:disabled { opacity: .4; }
#talk-note { text-align: center; margin: 0; }

.toast { position: fixed; z-index: 60; left: 50%; bottom: 24px; transform: translateX(-50%); max-width: calc(100vw - 32px); background: var(--bg-2); border: 1px solid var(--line-2);
  border-radius: 12px; padding: 10px 16px; box-shadow: var(--shadow); font-size: 14px; }
.toast.err { border-color: rgba(255,95,122,.5); color: var(--bad); }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  :root { --bar-h: 56px; }
  .topnav { display: none; }
  .menu-btn { display: inline-flex; }
  main { padding: 10px 12px; }
  .strip { padding: 6px 12px; gap: 8px; flex-wrap: nowrap; }
  .strip-left { flex: 1 1 auto; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .strip-left::-webkit-scrollbar { display: none; }
  .strip-right { flex: none; flex-wrap: nowrap; gap: 6px; }
  .strip .btn.sm { min-height: 36px; padding: 0 10px; }
  .composer.bound #project, .composer.bound .ro { display: none; }
  .crow select { flex: 1 1 0; min-width: 90px; max-width: none; }
  .tbl .minor, .tbl th.minor { display: none; }
  .ro .lbl-long { display: none; }
  .crow { gap: 6px; }

  .m.user { max-width: 92%; }
  .grid { grid-template-columns: 1fr; }
  .brand i { display: none; }
}
@media (max-width: 380px) {
  .crow .ro { font-size: 0; gap: 0; }
  .crow .ro input { margin: 0; }
  .crow .btn.sm { padding: 0 9px; }
}
@media (pointer: coarse) {
  .btn, .iconbtn, .toggle, .ctab, .subtabs button, .crow select { min-height: 36px; }
  .ctab .x { width: 32px; height: 32px; }
}

/* ---------- dashboard ---------- */
.dash-body { display: flex; flex-direction: column; gap: 14px; }
.dash-head { margin: 0 0 8px; }
.banner { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; font-size: 13.5px; margin-bottom: 10px; background: var(--panel); }
.banner.warn { color: var(--warn); border-color: rgba(255,198,92,.35); background: rgba(255,198,92,.06); }
.banner.bad { color: var(--bad); border-color: rgba(255,95,122,.35); background: rgba(255,95,122,.06); }
.banner.ok { color: var(--good); border-color: rgba(62,230,138,.3); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; min-width: 0; }
.tile b { display: block; font-size: 22px; font-weight: 600; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile span { display: block; font: 11px var(--mono); color: var(--muted); letter-spacing: .04em; margin-top: 2px; }
.card select { height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); padding: 0 10px; margin-bottom: 8px; max-width: 100%; }
.card .row.gap select { margin-bottom: 0; }
.dash-body > .row.gap { margin-top: 0; }
@media (max-width: 760px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tile b { font-size: 19px; } }
