:root {
  --bg: #f4f6fb;
  --panel: #ffffff;
  --panel-2: #f8f9fc;
  --line: #e4e7ef;
  --fg: #151a26;
  --muted: #6a7285;
  --accent: #3b6cf6;
  --accent-soft: #e9efff;
  --ok: #16a36a;
  --ok-soft: #e4f7ee;
  --busy: #2f6bff;
  --busy-soft: #e6eeff;
  --idle: #7c5cf0;
  --idle-soft: #efeaff;
  --warn: #c77700;
  --warn-soft: #fff4e0;
  --bad: #dc3450;
  --bad-soft: #fde8ec;
  --off: #8a90a0;
  --off-soft: #eef0f4;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 26, 40, .04), 0 8px 24px rgba(20, 26, 40, .06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f131b;
    --panel: #171c27;
    --panel-2: #1c2230;
    --line: #283042;
    --fg: #e8ecf5;
    --muted: #97a0b5;
    --accent: #6d93ff;
    --accent-soft: #1d2a4a;
    --ok-soft: #12321f;
    --busy-soft: #182a52;
    --idle-soft: #2a2350;
    --warn-soft: #3a2a0c;
    --bad-soft: #43161f;
    --off-soft: #232a38;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 120px; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 14px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; }
[hidden] { display: none !important; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
h1, h2, h3 { margin: 0; }
p { margin: 0; }
.muted { color: var(--muted); }
.small-text { font-size: 12px; }

button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel); color: var(--fg); font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
button:hover, .button:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); color: var(--accent); text-decoration: none; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
button.primary:hover { filter: brightness(1.06); color: #fff; }
button.ghost, .button.ghost { background: transparent; }
button.small { padding: 3px 10px; font-size: 12px; border-radius: 8px; }
button.danger { color: var(--bad); }
button.danger:hover { border-color: var(--bad); color: var(--bad); }
button:disabled { opacity: .55; cursor: default; }

input {
  padding: 8px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); color: var(--fg); font: inherit;
  outline: none; transition: border-color .12s ease, box-shadow .12s ease;
}
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* Header and tabs */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 12px clamp(14px, 3vw, 32px);
  background: color-mix(in srgb, var(--panel) 88%, transparent); backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand h1 { font-size: 17px; letter-spacing: .2px; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text .muted { font-size: 12px; }
.logo {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 34px; height: 34px; border-radius: 10px; color: #fff; font-weight: 800;
  background: linear-gradient(135deg, #5b8cff, #7c5cf0);
  box-shadow: 0 6px 16px rgba(91, 140, 255, .35);
}
.logo.big { width: 48px; height: 48px; font-size: 22px; border-radius: 14px; margin: 0 auto 4px; }
.top-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tabs {
  position: sticky; top: 59px; z-index: 19;
  display: flex; gap: 4px; overflow-x: auto; padding: 8px clamp(14px, 3vw, 32px);
  background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab { padding: 6px 14px; border-radius: 999px; color: var(--muted); font-size: 13px; font-weight: 600; white-space: nowrap; }
.tab:hover { background: var(--panel); color: var(--fg); text-decoration: none; }
.tab.active { background: var(--accent-soft); color: var(--accent); }

main { max-width: 1320px; margin: 0 auto; padding: 18px clamp(12px, 3vw, 32px) 64px; display: flex; flex-direction: column; gap: 18px; }
.section { display: flex; flex-direction: column; gap: 14px; }

/* Overview */
.banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-radius: 12px; font-size: 13px; }
.banner.warn { background: var(--warn-soft); color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.stat {
  position: relative; overflow: hidden; padding: 16px 18px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.stat::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--tone, var(--accent)); }
.stat.tone-ok { --tone: var(--ok); }
.stat.tone-off { --tone: var(--off); }
.stat.tone-accent { --tone: var(--accent); }
.stat.tone-idle { --tone: var(--idle); }
.stat.tone-warn { --tone: var(--warn); }
.stat.tone-busy { --tone: var(--busy); }
.stat-label { color: var(--muted); font-size: 12px; font-weight: 600; }
.stat-value { margin-top: 4px; font-size: 28px; font-weight: 750; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.stat-sub { margin-top: 2px; font-size: 12px; color: var(--muted); }

/* Panels and tables */
.panel { padding: 18px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.subpanel { margin: 2px 0 6px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb, var(--panel-2) 72%, transparent); }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.panel-head h2 { font-size: 16px; }
.panel-head p { margin-top: 4px; font-size: 12.5px; max-width: 820px; }
.panel h3 { font-size: 14px; margin-top: 6px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { position: sticky; top: 0; background: var(--panel-2); color: var(--muted); font-size: 12px; font-weight: 600; text-align: left; white-space: nowrap; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: color-mix(in srgb, var(--accent-soft) 45%, transparent); }
td.empty { text-align: center; padding: 22px; }
tr.row-stale td:not(:first-child) { opacity: .62; }
.preview { display: inline-block; max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.when { font-size: 12px; }
.stack { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }

.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.busy { background: var(--busy-soft); color: var(--busy); }
.pill.idle { background: var(--idle-soft); color: var(--idle); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.off { background: var(--off-soft); color: var(--off); }
.flag { display: inline-block; margin-top: 3px; padding: 1px 8px; border-radius: 6px; background: var(--warn-soft); color: var(--warn); font-size: 11.5px; }

/* Live activity */
.live-cell {
  display: inline-flex; flex-direction: column; align-items: flex-start; gap: 4px; max-width: 320px;
  padding: 4px 8px; margin: -4px -8px; border: 1px solid transparent; border-radius: 10px;
  background: transparent; text-align: left; white-space: normal; font-size: 12.5px;
}
.live-cell:hover { border-color: var(--line); background: var(--panel); color: inherit; }
.live-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--muted); word-break: break-all; line-height: 1.45; }
.scrim { position: fixed; inset: 0; z-index: 39; background: rgba(12, 16, 26, .35); backdrop-filter: blur(2px); }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 40; width: min(620px, 100%);
  display: flex; flex-direction: column; background: var(--panel); border-left: 1px solid var(--line);
  box-shadow: -20px 0 60px rgba(0, 0, 0, .18);
}
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.drawer-title { min-width: 0; }
.drawer-title h2 { font-size: 16px; overflow-wrap: anywhere; }
.drawer-title p { margin-top: 4px; overflow-wrap: anywhere; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 18px 28px; display: flex; flex-direction: column; gap: 14px; align-items: stretch; }
.drawer-body > .button { align-self: flex-start; }
.live-now { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); font-size: 13.5px; overflow-wrap: anywhere; }
.live-section { display: flex; flex-direction: column; gap: 8px; }
.live-section h3 { margin: 0; font-size: 13px; color: var(--muted); }
.live-text-block {
  margin: 0; max-height: 280px; overflow: auto; padding: 10px 12px; border-radius: 10px;
  background: var(--panel-2); border: 1px solid var(--line);
  font: 12.5px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; white-space: pre-wrap; overflow-wrap: anywhere;
}
.live-details summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); }
.live-details[open] summary { margin-bottom: 8px; }
.live-details .live-text-block + .live-text-block { margin-top: 8px; }
.tool-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.tool-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.tool-row:last-child { border-bottom: 0; }
.tool-row.running { background: color-mix(in srgb, var(--busy-soft) 60%, transparent); }
.tool-time { font-variant-numeric: tabular-nums; font-size: 12px; }
.tool-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tool-main b { white-space: nowrap; }
.tool-target { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.tool-state { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; min-width: 0; max-width: 200px; text-align: right; }
.tool-state .small-text { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Drawer tabs and the context timeline */
.drawer-tabs { display: flex; align-items: center; gap: 4px; padding: 8px 18px; border-bottom: 1px solid var(--line); }
.drawer-tab { padding: 5px 14px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-weight: 600; }
.drawer-tab:hover { background: var(--panel-2); color: var(--fg); }
.drawer-tab.active { background: var(--accent-soft); color: var(--accent); }
.drawer-tabs .small-text { margin-left: auto; }
.drawer-body.context { gap: 10px; background: var(--bg); }
.ctx-who { font-size: 11.5px; color: var(--muted); margin-bottom: 3px; }
.ctx-user { align-self: flex-end; max-width: 88%; }
.ctx-user .ctx-who { text-align: right; }
.ctx-bubble { padding: 9px 13px; border-radius: 14px 14px 4px 14px; background: var(--accent); color: #fff; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; }
.ctx-text, .ctx-result { max-width: 100%; }
.ctx-say { padding: 9px 13px; border-radius: 14px 14px 14px 4px; background: var(--panel); border: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.6; }
.ctx-text.typing .ctx-say::after { content: "▍"; margin-left: 2px; color: var(--accent); animation: ctx-blink 1s steps(2) infinite; }
@keyframes ctx-blink { 50% { opacity: 0; } }
.ctx-result .ctx-say { border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); background: var(--ok-soft); }
.ctx-thinking, .ctx-summary { font-size: 12.5px; }
.ctx-thinking summary, .ctx-summary summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.ctx-thinking summary { display: flex; flex-direction: column; gap: 2px; list-style: none; padding-left: 14px; position: relative; }
.ctx-thinking summary::-webkit-details-marker { display: none; }
.ctx-thinking summary::before { content: "▸"; position: absolute; left: 0; top: 0; }
.ctx-thinking[open] summary::before { content: "▾"; }
.ctx-think-state { font-weight: 600; }
.ctx-thinking.live .ctx-think-state, .think-now .ctx-think-state { color: var(--idle); }
.ctx-think-latest { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg); opacity: .78; font-weight: 400; font-style: italic; }
.think-now { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--idle-soft) 60%, var(--panel)); border: 1px solid color-mix(in srgb, var(--idle) 30%, var(--line)); font-size: 13px; }
.think-now .ctx-think-latest { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ctx-summary summary { color: var(--warn); }
.ctx-thinking[open] summary, .ctx-summary[open] summary { margin-bottom: 6px; }
.ctx-pre {
  margin: 6px 0 0; max-height: 260px; overflow: auto; padding: 8px 10px; border-radius: 8px;
  background: var(--panel); border: 1px solid var(--line);
  font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere;
}
.ctx-pre.output { background: var(--panel-2); }
.ctx-tools { display: flex; flex-direction: column; gap: 4px; padding: 6px 8px; border-radius: 12px; border: 1px dashed var(--line); }
.ctx-tools-head { padding: 0 2px 2px; }
.ctx-tool { border-radius: 10px; background: var(--panel); border: 1px solid var(--line); font-size: 12.5px; }
.ctx-tool.running { border-color: color-mix(in srgb, var(--busy) 45%, var(--line)); background: color-mix(in srgb, var(--busy-soft) 50%, var(--panel)); }
.ctx-tool > .ctx-pre { margin: 0 10px 8px; }
.ctx-tool-line { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 6px 10px; list-style: none; }
details.ctx-tool > summary { cursor: pointer; }
details.ctx-tool > summary::-webkit-details-marker { display: none; }
details.ctx-tool > summary::after { content: "▸"; margin-left: 4px; color: var(--muted); }
details.ctx-tool[open] > summary::after { content: "▾"; }
.ctx-tool-line b { white-space: nowrap; }
.ctx-target { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.ctx-meta { flex: 0 0 auto; white-space: nowrap; }
.ctx-divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.ctx-divider::before, .ctx-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Install checks */
select { padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); color: var(--fg); font: inherit; font-size: 13px; }
.check-verdict { margin: 0 0 10px; padding: 8px 12px; border-radius: 10px; font-weight: 700; font-size: 13.5px; background: var(--ok-soft); color: var(--ok); }
.check-verdict.warn { background: var(--warn-soft); color: var(--warn); }
.check-verdict.fail { background: var(--bad-soft); color: var(--bad); }
.step-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.step { display: flex; gap: 10px; align-items: flex-start; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); font-size: 13px; }
.step-icon { flex: 0 0 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; background: var(--off-soft); color: var(--off); }
.step.ok .step-icon { background: var(--ok-soft); color: var(--ok); }
.step.fail { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); background: var(--bad-soft); }
.step.fail .step-icon { background: var(--bad); color: #fff; }
.step.warn .step-icon { background: var(--warn-soft); color: var(--warn); }
.step.skip { opacity: .6; }
.step-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.step-detail { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--muted); max-height: 220px; overflow: auto; }
.step-hint { font-size: 12.5px; color: var(--warn); }
.install-logs { display: flex; flex-direction: column; gap: 8px; }
.install-log { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; background: var(--panel); }
.install-log.fail { border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); }
.install-log summary { cursor: pointer; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.install-log[open] summary { margin-bottom: 8px; }

/* Forms */
.inline-form { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.inline-form label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); font-weight: 600; }
.inline-form label.grow { flex: 1 1 240px; }
.inline-form input[type=number] { width: 120px; }
.form-error { min-height: 1em; color: var(--bad); font-size: 12.5px; }
.new-cards { padding: 12px 14px; border-radius: 12px; background: var(--ok-soft); border: 1px solid color-mix(in srgb, var(--ok) 25%, transparent); }
.new-cards-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.new-cards pre { margin: 8px 0 0; font: 13px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; }
.code-cell { display: inline-flex; align-items: center; gap: 8px; }
.agent-key summary { cursor: pointer; font-weight: 600; font-size: 13px; }
.agent-key p { margin: 8px 0; font-size: 12.5px; }
.key-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.key-row code { padding: 6px 10px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line); word-break: break-all; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 4px 0; }
.setting-row p { font-size: 12.5px; margin-top: 2px; }

.switch { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 13px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { position: relative; width: 40px; height: 22px; border-radius: 999px; background: var(--off-soft); border: 1px solid var(--line); transition: background .15s ease; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .15s ease; }
.switch input:checked + .track { background: var(--ok); border-color: var(--ok); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px var(--accent-soft); }

/* Dialogs */
.overlay { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(12, 16, 26, .45); backdrop-filter: blur(6px); }
.dialog { width: min(380px, 100%); padding: 26px 24px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0, 0, 0, .25); display: flex; flex-direction: column; gap: 12px; text-align: left; }
.dialog h2 { font-size: 18px; text-align: center; }
.dialog-row { display: flex; justify-content: flex-end; gap: 8px; }
.dialog-error { min-height: 1.2em; color: var(--bad); font-size: 13px; text-align: center; }

/* Phones: rows become cards, labels come from data-label */
@media (max-width: 760px) {
  .top { padding: 10px 14px; }
  .top-actions { width: 100%; justify-content: flex-start; }
  .top-actions .small-text { width: 100%; }
  .tabs { top: 104px; }
  html { scroll-padding-top: 160px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-value { font-size: 24px; }
  .panel { padding: 14px; }
  .table-wrap { border: 0; }
  table, tbody, tr, td { display: block; width: 100%; }
  thead { display: none; }
  tbody tr { margin-bottom: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); }
  tbody tr:hover td { background: transparent; }
  td { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--line); text-align: right; }
  td:last-child { border-bottom: 0; }
  td::before { content: attr(data-label); color: var(--muted); font-size: 12px; text-align: left; flex: 0 0 auto; }
  td[data-label=""]::before { content: none; }
  td.empty { justify-content: center; }
  td.empty::before { content: none; }
  .preview { max-width: 190px; }
  .inline-form input[type=number] { width: 100%; }
  .inline-form label { flex: 1 1 140px; }
  .live-cell { align-items: flex-end; max-width: 64vw; margin: 0; text-align: right; }
  .drawer { border-left: 0; }
  .drawer-body { padding: 14px 14px 28px; }
  .tool-row { grid-template-columns: minmax(0, 1fr) auto; }
  .tool-time { grid-column: 1 / -1; }
  .drawer-tabs { padding: 8px 14px; }
  .ctx-tool-line { flex-wrap: wrap; }
  .ctx-target { flex-basis: 100%; order: 3; }
}
