/* SCOUT OS — Liquid Omni-Glass 3.0 Tri-Desk Workspace
   3-column grid (>=1024px) · tabbed sheets (<1024px). Dependency-free. */
:root {
  --bg: #070b12;
  --bg2: #0b111c;
  --glass: rgba(255, 255, 255, 0.055);
  --glass-2: rgba(255, 255, 255, 0.085);
  --glass-border: rgba(255, 255, 255, 0.10);
  --glass-hi: rgba(255, 255, 255, 0.16);
  --text: #eaf1f8;
  --muted: #93a1b5;
  --accent: #38e1c6;
  --accent-2: #7aa2ff;
  --green: #3ddc84;
  --red: #ff5d5d;
  --amber: #ffb454;
  --radius: 18px;
  --ease: cubic-bezier(0.22, 0.9, 0.28, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--text); font-family: var(--font);
  min-height: 100vh; line-height: 1.45; background: var(--bg);
  overflow-x: hidden; padding: 12px;
}

/* aurora backdrop */
body::before, body::after {
  content: ""; position: fixed; inset: -20%; z-index: -1; pointer-events: none;
}
body::before {
  background:
    radial-gradient(42% 34% at 18% 8%, rgba(56, 225, 198, 0.13), transparent 70%),
    radial-gradient(38% 30% at 84% 16%, rgba(122, 162, 255, 0.14), transparent 70%),
    radial-gradient(30% 26% at 60% 95%, rgba(178, 102, 255, 0.10), transparent 70%);
  animation: drift 26s ease-in-out infinite alternate;
}
body::after {
  background: radial-gradient(60% 45% at 50% 110%, rgba(56, 225, 198, 0.06), transparent 70%);
  animation: drift 34s ease-in-out infinite alternate-reverse;
}
@keyframes drift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to   { transform: translate3d(2%, 2%, 0) scale(1.06); }
}

.glass {
  background: linear-gradient(160deg, var(--glass-2), var(--glass) 45%, rgba(255,255,255,0.03));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(22px) saturate(1.3);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
  box-shadow: 0 18px 50px rgba(0,0,0,0.45), inset 0 1px 0 var(--glass-hi);
}

/* ---------- header ---------- */
.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; margin-bottom: 12px;
  position: sticky; top: 10px; z-index: 20;
  animation: rise 0.55s var(--ease) both;
}
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.brand-mark { font-size: 26px; color: var(--accent); text-shadow: 0 0 18px rgba(56, 225, 198, 0.65); }
.brand h1 {
  margin: 0; font-size: 19px; font-weight: 700; letter-spacing: 0.4px;
  background: linear-gradient(100deg, #fff 30%, var(--accent) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand .sub { margin: 1px 0 0; font-size: 11.5px; color: var(--muted); letter-spacing: 0.2px; }
.live-badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 700; letter-spacing: 1.6px; color: var(--green);
  padding: 6px 12px; border-radius: 999px;
  background: rgba(61, 220, 132, 0.10); border: 1px solid rgba(61, 220, 132, 0.35);
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); animation: heartbeat 1.6s ease-in-out infinite; }
@keyframes heartbeat {
  0%, 100% { transform: scale(1); opacity: 1; }
  14% { transform: scale(1.45); opacity: 0.85; }
  28% { transform: scale(1); opacity: 1; }
}
.ledger-link {
  font-size: 12px; color: var(--accent); text-decoration: none;
  padding: 6px 10px; border-radius: 999px; border: 1px solid rgba(56,225,198,0.3);
  background: rgba(56,225,198,0.08); white-space: nowrap;
}
.syspill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px; background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border); cursor: pointer; }
.sdot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); opacity: 0.55; transition: background 0.3s, box-shadow 0.3s; }
.sdot.ok { background: var(--green); opacity: 1; box-shadow: 0 0 8px var(--green); }
.sdot.warn { background: var(--amber); opacity: 1; box-shadow: 0 0 8px var(--amber); }
.sdot.bad { background: var(--red); opacity: 1; box-shadow: 0 0 8px var(--red); animation: heartbeat 1.2s infinite; }
.syspill-text { font-family: var(--mono); font-size: 11px; color: var(--muted); white-space: nowrap; }
.syspill-text.good { color: var(--green); } .syspill-text.bad { color: var(--red); }

/* ---------- tri-desk grid ---------- */
.tridesk {
  display: grid; gap: 14px; align-items: start;
  grid-template-columns: 25% 45% 30%;
  max-width: 1720px; margin: 0 auto;
  min-height: calc(100vh - 120px);
  padding-bottom: 20px;
}
.pane {
  display: flex; flex-direction: column; gap: 12px;
  min-width: 0; min-height: 0;
}
.pane-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 2px 4px;
}
.pane-head h2 { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: 0.3px; }
.pcount {
  font-size: 12px; font-weight: 700; color: var(--accent);
  background: rgba(56,225,198,0.12); border: 1px solid rgba(56,225,198,0.35);
  border-radius: 999px; padding: 2px 10px;
}

/* ---------- left pane: cards ---------- */
.card-list { display: flex; flex-direction: column; gap: 12px; overflow-y: auto; max-height: calc(100vh - 340px); padding-right: 2px; }
.ocard { padding: 16px; animation: rise 0.5s var(--ease) both; cursor: pointer; transition: border-color 0.2s, box-shadow 0.2s; }
.ocard:hover { border-color: rgba(56,225,198,0.4); }
.ocard.selected { border-color: var(--accent); box-shadow: 0 0 24px rgba(56,225,198,0.22), inset 0 1px 0 var(--glass-hi); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.kicker { font-size: 10.5px; font-weight: 700; letter-spacing: 1.8px; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.ocard h2 { margin: 0 0 8px; font-size: 16px; font-weight: 700; }
.ocard .cbody { color: var(--text); font-size: 13.5px; margin: 0 0 12px; }
.ocard .cbody .muted { color: var(--muted); }
.chead-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.domain-tag { font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #7dd3fc; background: rgba(125,211,252,0.1); padding: 3px 9px; border-radius: 12px; }
.model-badge { font-size: 10.5px; color: #fbbf24; background: rgba(251,191,36,0.1); padding: 3px 9px; border-radius: 12px; font-family: var(--mono); }
.ctime { font-size: 11px; color: var(--muted); margin-left: auto; }
.quiet-banner { border: 1px solid rgba(255,180,84,0.35); background: rgba(255,180,84,0.08); border-radius: 12px; padding: 12px 14px; font-size: 13.5px; margin-bottom: 12px; }
.bento { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 0 0 14px; }
.tile { background: rgba(255,255,255,0.045); border: 1px solid var(--glass-border); border-radius: 12px; padding: 12px 13px; }
.tile.span2 { grid-column: span 2; }
.tile .tnum { font-size: 20px; font-weight: 800; color: #fff; }
.tile .tnum.good { color: var(--green); }
.tile .tnum.warn { color: var(--amber); }
.tile .tlabel { font-size: 11px; color: var(--muted); letter-spacing: 0.4px; margin-top: 2px; }
.no-data { color: var(--muted); font-style: italic; font-size: 13px; padding: 10px 0; }

/* 3-tier action stack */
.astack { display: flex; flex-direction: column; gap: 10px; }
.abtns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn {
  appearance: none; border: 1px solid var(--glass-border); border-radius: 12px;
  padding: 12px 10px; font-size: 13.5px; font-weight: 700; font-family: var(--font);
  color: var(--text); background: rgba(255,255,255,0.06); cursor: pointer;
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease), background 0.15s;
  min-height: 48px;
}
.btn:active { transform: scale(0.97); }
.btn.opt-a { background: linear-gradient(120deg, rgba(56,225,198,0.22), rgba(122,162,255,0.22)); border-color: rgba(56,225,198,0.45); box-shadow: 0 0 18px rgba(56,225,198,0.18); }
.btn.opt-b { background: rgba(255,255,255,0.05); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); min-height: 44px; }
.btn.dispatch { width: 100%; }
.btn.loading { pointer-events: none; opacity: 0.75; animation: btnpulse 0.9s ease-in-out infinite; }
@keyframes btnpulse { 0%, 100% { box-shadow: 0 0 6px rgba(56,225,198,0.15); } 50% { box-shadow: 0 0 22px rgba(56,225,198,0.5); } }
.btn.done { border-color: rgba(61,220,132,0.6); color: var(--green); background: rgba(61,220,132,0.10); }
.btn:disabled { cursor: default; opacity: 0.55; }
.result-log { margin: 12px 0 4px; padding: 10px 13px; border-radius: 10px; background: rgba(61,220,132,0.07); border: 1px solid rgba(61,220,132,0.3); font-size: 13px; animation: rise 0.35s var(--ease) both; }
.result-log .rhead { font-size: 10.5px; letter-spacing: 1.4px; color: var(--green); font-weight: 700; margin-bottom: 3px; }
.clabel { font-size: 10.5px; letter-spacing: 1.4px; color: var(--muted); font-weight: 700; }
.cbox { display: flex; gap: 8px; align-items: stretch; }
.cbox input { flex: 1; min-width: 0; border-radius: 12px; border: 1px solid var(--glass-border); background: rgba(0,0,0,0.25); color: var(--text); padding: 12px 14px; font-size: 14px; font-family: var(--font); outline: none; }
.cbox input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(56,225,198,0.12); }
.cbox input::placeholder { color: var(--muted); }
.mic-btn { width: 52px; min-width: 52px; border-radius: 12px; cursor: pointer; border: 1px solid rgba(122,162,255,0.4); background: rgba(122,162,255,0.12); color: var(--accent-2); font-size: 20px; display: flex; align-items: center; justify-content: center; }
.mic-btn.listening { background: rgba(255,93,93,0.2); border-color: var(--red); color: var(--red); animation: heartbeat 1.2s infinite; }
.mono { font-family: var(--mono); }

/* telemetry box */
.telemetry-box { padding: 14px 16px; }
.tb-head { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 700; letter-spacing: 1px; margin-bottom: 10px; }
.tb-body { display: flex; flex-direction: column; gap: 8px; }
.trow { display: flex; justify-content: space-between; font-size: 13px; }
.trow .tms { font-family: var(--mono); color: var(--muted); }
.trow .tms.good { color: var(--green); }
.trow .tms.bad { color: var(--red); }

/* actioned ledger accordion */
.actioned-wrap { border-radius: 14px; padding: 0; overflow: hidden; }
.actioned-toggle { width: 100%; display: flex; align-items: center; gap: 10px; background: none; border: none; color: var(--text); padding: 14px 16px; font-size: 14px; font-weight: 600; cursor: pointer; }
.actioned-toggle .acount { background: rgba(255,255,255,0.1); border-radius: 20px; padding: 2px 10px; font-size: 12px; }
.actioned-toggle .chev { margin-left: auto; transition: transform 0.2s; }
.actioned-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }
.actioned-list { padding: 0 12px 12px; display: flex; flex-direction: column; gap: 8px; max-height: 260px; overflow-y: auto; }
.arow { display: flex; align-items: center; gap: 10px; font-size: 13px; padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,0.04); }
.arow .atitle { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arow .akind { font-size: 11px; padding: 2px 8px; border-radius: 12px; background: rgba(52,211,153,0.15); color: #34d399; }
.arow .atime { color: var(--muted); font-size: 11.5px; }
.undo-btn { background: rgba(248,113,113,0.12); color: #f87171; border: 1px solid rgba(248,113,113,0.3); border-radius: 8px; padding: 5px 10px; font-size: 12px; cursor: pointer; }
.undo-btn:disabled { opacity: 0.4; cursor: default; }

/* ---------- center pane: canvas ---------- */
.pane-canvas { min-height: calc(100vh - 140px); }
.canvas-tabs { display: flex; gap: 6px; }
.cvtab { background: rgba(255,255,255,0.05); border: 1px solid transparent; color: var(--muted); border-radius: 9px; padding: 7px 14px; font-size: 12.5px; cursor: pointer; font-family: var(--font); }
.cvtab.active { color: var(--text); border-color: var(--glass-border); background: rgba(255,255,255,0.09); }
.cview { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.wys-toolbar { display: flex; gap: 6px; align-items: center; padding: 8px 10px; border-radius: 12px; background: rgba(255,255,255,0.04); border: 1px solid var(--glass-border); flex-wrap: wrap; }
.wys-toolbar button { background: rgba(255,255,255,0.06); border: 1px solid var(--glass-border); color: var(--text); border-radius: 8px; min-width: 36px; height: 34px; font-size: 14px; cursor: pointer; font-family: var(--font); }
.wys-toolbar button:hover { background: rgba(255,255,255,0.12); }
.canvas-title { margin-left: auto; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 45%; }
.canvas-editor {
  min-height: 320px; max-height: calc(100vh - 420px); overflow-y: auto;
  border-radius: 14px; border: 1px solid var(--glass-border);
  background: rgba(0,0,0,0.22); padding: 16px 18px; font-size: 14.5px; line-height: 1.6;
  outline: none; color: var(--text);
}
.canvas-editor:focus { border-color: rgba(56,225,198,0.5); }
.canvas-editor:empty::before { content: attr(data-placeholder); color: var(--muted); font-style: italic; pointer-events: none; }
.canvas-editor b, .canvas-editor strong { color: #fff; }
.canvas-actions { display: flex; gap: 10px; }
.exec-terminal {
  min-height: 420px; max-height: calc(100vh - 260px); overflow-y: auto;
  border-radius: 14px; border: 1px solid var(--glass-border); background: rgba(0,0,0,0.4);
  padding: 14px 16px; font-family: var(--mono); font-size: 12.5px; line-height: 1.7;
}
.term-line { margin: 0 0 4px; overflow-wrap: anywhere; }
.term-line .tts { color: var(--muted); margin-right: 8px; }
.term-line.ok .tmsg { color: var(--green); }
.term-line.err .tmsg { color: var(--red); }
.term-line.info .tmsg { color: var(--accent-2); }
.report-view { border-radius: 14px; border: 1px solid var(--glass-border); background: rgba(255,255,255,0.03); padding: 18px; min-height: 300px; }
.cempty { color: var(--muted); font-size: 13.5px; padding: 22px 0; text-align: center; }

/* ---------- right pane: chat ---------- */
.pane-chat { min-height: calc(100vh - 140px); max-height: calc(100vh - 120px); }
.chat-feed { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 4px 2px; min-height: 200px; }
.bubble { max-width: 88%; padding: 11px 14px; border-radius: 14px; font-size: 14px; line-height: 1.5; animation: rise 0.3s var(--ease) both; overflow-wrap: anywhere; }
.bubble.user { align-self: flex-end; background: linear-gradient(120deg, rgba(56,225,198,0.2), rgba(122,162,255,0.2)); border: 1px solid rgba(56,225,198,0.35); border-bottom-right-radius: 4px; }
.bubble.scout { align-self: flex-start; background: rgba(255,255,255,0.06); border: 1px solid var(--glass-border); border-bottom-left-radius: 4px; }
.bubble .bmeta { font-size: 10px; color: var(--muted); margin-top: 5px; letter-spacing: 0.5px; }
.typing { display: inline-flex; gap: 5px; align-items: center; padding: 6px 0; }
.typing i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: tp 1.1s ease-in-out infinite; }
.typing i:nth-child(2) { animation-delay: 0.18s; }
.typing i:nth-child(3) { animation-delay: 0.36s; }
@keyframes tp { 0%, 100% { transform: translateY(0); opacity: 0.5; } 50% { transform: translateY(-5px); opacity: 1; } }
.chat-dock { display: flex; gap: 8px; align-items: center; padding: 8px 8px 8px 12px; border-radius: 16px; margin-top: 8px; }
.chat-dock input[type="text"] { flex: 1; min-width: 0; border: none; background: transparent; color: var(--text); font-size: 14px; font-family: var(--font); outline: none; padding: 10px 0; }
.chat-dock input::placeholder { color: var(--muted); }
.oattach { background: none; border: none; font-size: 18px; cursor: pointer; padding: 8px; opacity: 0.75; }
.oattach:hover { opacity: 1; }
.attach-chip { font-size: 11.5px; color: #7dd3fc; background: rgba(125,211,252,0.1); padding: 4px 10px; border-radius: 12px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.osend { width: 46px; height: 46px; min-width: 46px; border-radius: 12px; cursor: pointer; border: 1px solid rgba(56,225,198,0.45); color: #062a26; font-size: 17px; background: linear-gradient(120deg, rgba(56,225,198,0.85), rgba(122,162,255,0.85)); display: flex; align-items: center; justify-content: center; }

/* ---------- ledger event cards ---------- */
.ledger-event { border-left: 3px solid var(--accent-2); }
.sbadge { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; margin-bottom: 8px; }
.sbadge.success { color: var(--green); background: rgba(61,220,132,0.12); border: 1px solid rgba(61,220,132,0.4); }
.sbadge.failed { color: var(--red); background: rgba(255,93,93,0.12); border: 1px solid rgba(255,93,93,0.4); }
.sbadge.executing, .sbadge.queued { color: var(--amber); background: rgba(255,180,84,0.12); border: 1px solid rgba(255,180,84,0.4); }
.ltime { font-size: 11.5px; color: var(--muted); font-family: var(--mono); }
.lcmd { font-family: var(--mono); font-size: 12.5px; color: var(--text); overflow-wrap: anywhere; }

/* ---------- voice FAB ---------- */
.voice-fab {
  position: fixed; right: 18px; bottom: calc(20px + env(safe-area-inset-bottom));
  width: 64px; height: 64px; border-radius: 50%; cursor: pointer; z-index: 50;
  border: 1px solid rgba(56,225,198,0.5); color: #062a26;
  background: radial-gradient(circle at 35% 30%, #7df0dd, var(--accent) 60%, #1fae97);
  box-shadow: 0 0 30px rgba(56,225,198,0.45), 0 10px 28px rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
}
.voice-fab .wave { display: none; position: absolute; gap: 3px; align-items: flex-end; height: 26px; }
.voice-fab .wave i { width: 3px; background: #062a26; border-radius: 2px; animation: wv 0.7s ease-in-out infinite; }
.voice-fab .wave i:nth-child(1) { height: 40%; } .voice-fab .wave i:nth-child(2) { height: 80%; animation-delay: 0.12s; }
.voice-fab .wave i:nth-child(3) { height: 100%; animation-delay: 0.24s; } .voice-fab .wave i:nth-child(4) { height: 65%; animation-delay: 0.36s; }
.voice-fab .wave i:nth-child(5) { height: 45%; animation-delay: 0.48s; }
@keyframes wv { 0%, 100% { transform: scaleY(0.5); } 50% { transform: scaleY(1); } }
.voice-fab.listening { border-color: var(--red); }
.voice-fab.listening .mic { display: none; }
.voice-fab.listening .wave { display: flex; }

/* ---------- toasts ---------- */
.toast-wrap { position: fixed; left: 12px; right: 12px; bottom: calc(24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; z-index: 60; pointer-events: none; max-width: 560px; margin: 0 auto; }
.toast { background: rgba(10, 16, 26, 0.92); border: 1px solid var(--glass-border); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-radius: 12px; padding: 11px 15px; font-size: 13.5px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); animation: toastin 0.3s var(--ease) both; pointer-events: auto; }
.toast.ok { border-color: rgba(61,220,132,0.5); }
.toast.warn { border-color: rgba(255,180,84,0.5); }
.toast.err { border-color: rgba(255,93,93,0.6); }
@keyframes toastin { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- diagnostic drawer ---------- */
[hidden] { display: none !important; }
.diag-overlay { position: fixed; inset: 0; background: rgba(4,8,14,0.6); z-index: 80; }
.diag-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(340px, 88vw); z-index: 81; padding: 18px 16px; border-radius: 0; border-left: 1px solid var(--glass-border); background: rgba(12,19,32,0.95); display: flex; flex-direction: column; gap: 14px; animation: toastin 0.25s var(--ease) both; }
.dd-head { display: flex; justify-content: space-between; align-items: center; }
.dd-head h3 { margin: 0; font-size: 16px; }
.dclose { background: none; border: none; color: var(--muted); font-size: 16px; cursor: pointer; padding: 6px; }
.dd-body { display: flex; flex-direction: column; gap: 10px; overflow-y: auto; flex: 1; }
.drow { display: flex; justify-content: space-between; align-items: center; font-size: 13px; padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,0.04); }
.drow .dms { font-family: var(--mono); color: var(--muted); }
.drow .dms.good { color: var(--green); } .drow .dms.bad { color: var(--red); }
.kill-switch { margin-top: auto; background: linear-gradient(135deg, #dc2626, #991b1b); color: #fff; border: none; border-radius: 12px; padding: 14px; font-size: 14px; font-weight: 700; cursor: pointer; font-family: var(--font); }
.kill-switch.paused { background: linear-gradient(135deg, #059669, #065f46); }

[data-tip] { position: relative; }
[data-tip]:hover::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); width: max-content; max-width: 240px; background: rgba(10,16,26,0.95); border: 1px solid var(--glass-border); padding: 7px 11px; border-radius: 9px; font-size: 12px; color: var(--text); z-index: 70; pointer-events: none; }

/* ---------- mobile: tabbed sheets ---------- */
.mobile-nav { display: none; }
@media (max-width: 1023px) {
  body { padding: 8px 8px 96px; }
  .tridesk { display: block; min-height: 0; }
  .pane { display: none; }
  .pane.active { display: flex; animation: rise 0.3s var(--ease) both; }
  .pane-chat { max-height: none; }
  .chat-feed { max-height: calc(100vh - 340px); }
  .card-list { max-height: calc(100vh - 380px); }
  .canvas-editor { min-height: 240px; max-height: 50vh; }
  .exec-terminal { min-height: 300px; max-height: 60vh; }
  .mobile-nav {
    display: flex; position: fixed; z-index: 55;
    left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
    padding: 8px; border-radius: 16px; gap: 6px;
  }
  .mnav { flex: 1; background: transparent; border: none; color: var(--muted); font-size: 13px; font-weight: 700; padding: 10px 4px; border-radius: 10px; cursor: pointer; font-family: var(--font); }
  .mnav.active { color: var(--text); background: rgba(56,225,198,0.14); }
  .voice-fab { bottom: calc(84px + env(safe-area-inset-bottom)); width: 56px; height: 56px; right: 14px; }
  .abtns { grid-template-columns: 1fr; }
  .topbar { flex-wrap: wrap; }
}
@media (min-width: 1024px) {
  .pane { display: flex !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
