/* ASAR Studio v166.0 — Cursor 2.0 / Vercel v0 / Linear Design System */
:root {
  --bg: #0c0c0e;
  --panel: #111114;
  --surface: #111114;
  --card-bg: #17171c;
  --elevated: #17171c;
  --hover: #1f1f26;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #ededef;
  --muted: #8b8b96;
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --green: #10b981;
  --green-soft: rgba(16, 185, 129, 0.14);
  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.14);
  --red: #ef4444;
  --danger-tx: #f87171;
  --red-soft: rgba(239, 68, 68, 0.14);
  --font-sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "JetBrains Mono", Consolas, monospace;
}

html[data-theme="light"] {
  --bg: #f6f6f9;
  --panel: #ffffff;
  --surface: #ffffff;
  --card-bg: #f1f1f5;
  --elevated: #f1f1f5;
  --hover: #e8e8ef;
  --border: rgba(15, 23, 42, 0.09);
  --border-strong: rgba(15, 23, 42, 0.16);
  --text: #111116;
  --muted: #646472;
  --danger-tx: #dc2626;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
}

.studio-shell {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
}

/* ---------- Topbar 46px ---------- */
.st-topbar {
  height: 46px;
  min-height: 46px;
  padding: 0 12px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.st-top-left, .st-top-center, .st-top-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.st-divider-v {
  width: 1px;
  height: 18px;
  background: var(--border-strong);
}
.st-brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: -0.01em;
}
.st-logo-mark {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--text);
  color: var(--bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12px;
}
.st-back-link {
  text-decoration: none;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 8px;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 500;
}
.st-back-link:hover { background: var(--hover); color: var(--text); }

.st-select {
  height: 30px;
  padding: 0 9px;
  border-radius: 7px;
  border: 1px solid var(--border-strong);
  background: var(--elevated);
  color: var(--text);
  font: inherit;
  font-size: 12.5px;
  outline: none;
  max-width: 210px;
}
.st-select:focus { border-color: var(--accent); }

.st-segmented {
  display: inline-flex;
  padding: 2px;
  border-radius: 8px;
  background: var(--elevated);
  border: 1px solid var(--border);
}
.st-seg-btn {
  height: 24px;
  padding: 0 12px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}
.st-seg-btn.active {
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.st-btn {
  height: 30px;
  padding: 0 11px;
  border-radius: 7px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: background 0.12s, border-color 0.12s, opacity 0.12s;
}
.st-btn.xs { height: 25px; padding: 0 9px; font-size: 11.5px; }
.st-btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.st-btn-ghost:hover { background: var(--hover); border-color: var(--border-strong); }
.st-btn-primary {
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
}
.st-btn-primary:hover { opacity: 0.88; }
.st-btn-free {
  background: var(--green-soft);
  border-color: rgba(16, 185, 129, 0.28);
  color: var(--green);
  font-weight: 600;
}
.st-btn-free:hover { background: rgba(16, 185, 129, 0.22); }
.st-dot-free {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}
.st-btn-accept { background: var(--green); color: #052e16; font-weight: 600; }
.st-btn-danger { background: var(--red-soft); border-color: rgba(239, 68, 68, 0.3); color: var(--red); }

.st-icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.st-icon-btn.sm { width: 26px; height: 26px; }
.st-icon-btn:hover, .st-icon-btn.active { background: var(--hover); color: var(--text); }

/* ---------- 3-Column Workbench ---------- */
.st-workbench {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 236px minmax(360px, 440px) 1fr;
  overflow: hidden;
}
.studio-shell[data-layout="editor"] .st-workbench {
  grid-template-columns: 236px minmax(320px, 380px) 1fr;
}

/* Column 1: Agents & Files Sidebar */
.st-sidebar {
  background: var(--panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.st-sb-section {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
#stAgentsPane { flex: 1; }
.st-files-pane {
  border-top: 1px solid var(--border);
  max-height: 38%;
}
.studio-shell[data-layout="editor"] #stAgentsPane { max-height: 36%; flex: 0 0 auto; }
.studio-shell[data-layout="editor"] .st-files-pane { flex: 1; max-height: none; }

.st-sb-head {
  height: 36px;
  padding: 0 10px 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.st-sb-title {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.st-agent-list, .st-file-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.st-agent-item {
  width: 100%;
  text-align: left;
  border: none;
  border-radius: 7px;
  padding: 8px 9px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.st-agent-item:hover { background: var(--hover); }
.st-agent-item.active { background: var(--elevated); box-shadow: inset 0 0 0 1px var(--border-strong); }
.st-agent-row {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.st-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--muted);
}
.st-status-dot.running { background: var(--accent); animation: stPulse 1.1s infinite; }
.st-status-dot.review { background: var(--amber); }
.st-status-dot.done { background: var(--green); }
.st-status-dot.error { background: var(--red); }
@keyframes stPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.st-agent-title {
  font-size: 12.5px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
.st-agent-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  padding-left: 14px;
}
.st-delta-add { color: var(--green); font-family: var(--font-mono); }
.st-delta-rem { color: var(--red); font-family: var(--font-mono); }

.st-file-row {
  display: flex;
  align-items: center;
  gap: 4px;
  border-radius: 6px;
  padding: 0 4px;
}
.st-file-row:hover { background: var(--hover); }
.st-file-row.active { background: var(--elevated); }
.st-file-btn {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 5px 4px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.st-file-del {
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 2px 4px;
  font-size: 12px;
  opacity: 0;
}
.st-file-row:hover .st-file-del { opacity: 1; }
.st-file-del:hover { color: var(--red); }

.st-sb-footer {
  padding: 8px 10px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--elevated);
}
.st-pub-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); flex-shrink: 0; }
.st-pub-link {
  flex: 1;
  font-size: 11.5px;
  color: var(--text);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.st-pub-link:hover { text-decoration: underline; }

/* Column 2: Composer / Agent Stream */
.st-composer-col {
  background: var(--bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.st-feed {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.st-welcome {
  margin: auto 0;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.st-welcome h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.st-welcome p {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
}
.st-suggestions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.st-sugg-btn {
  text-align: left;
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.st-sugg-btn:hover { background: var(--elevated); border-color: var(--border-strong); }
.st-sugg-arrow { color: var(--muted); font-size: 12px; }

.st-msg-user {
  align-self: flex-end;
  max-width: 88%;
  padding: 9px 12px;
  border-radius: 12px 12px 3px 12px;
  background: var(--elevated);
  border: 1px solid var(--border-strong);
  font-size: 13px;
  line-height: 1.48;
  white-space: pre-wrap;
}
.st-msg-agent {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  line-height: 1.52;
}
.st-trace-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--panel);
  border: 1px solid var(--border);
}
.st-trace-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  color: var(--muted);
  font-family: var(--font-mono);
}
.st-trace-item.ok { color: var(--text); }
.st-trace-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}
.st-trace-dot.warn { background: var(--amber); }
.st-trace-dot.run { background: var(--accent); animation: stPulse 1s infinite; }

.st-plan-card {
  padding: 12px;
  border-radius: 10px;
  background: var(--panel);
  border: 1px solid rgba(245, 158, 11, 0.35);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.st-plan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--amber);
}
.st-plan-body {
  font-size: 12.5px;
  line-height: 1.55;
  white-space: pre-wrap;
}
.st-msg-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--muted);
}

/* Cursor Review Bar */
.st-review-bar {
  padding: 8px 12px;
  border-top: 1px solid var(--border);
  background: var(--panel);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.st-review-info { font-size: 12px; font-weight: 500; }
.st-review-actions { display: flex; gap: 6px; }

/* Cursor Composer Input Capsule */
.st-input-dock {
  padding: 10px 12px 12px;
  background: var(--bg);
}
.st-input-box {
  background: var(--elevated);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 10px 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.14s;
}
.st-input-box:focus-within { border-color: var(--accent); }
.st-input-box textarea {
  width: 100%;
  border: none;
  outline: none;
  resize: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  line-height: 1.45;
  min-height: 44px;
  max-height: 150px;
}
.st-input-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.st-input-left {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1;
}
.st-mode-pill {
  height: 26px;
  padding: 0 9px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  flex-shrink: 0;
}
.st-mode-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.st-mode-pill[data-mode="plan"] .st-mode-dot { background: var(--amber); }
.st-mode-pill[data-mode="ask"] .st-mode-dot { background: var(--muted); }
.st-model-select {
  height: 26px;
  padding: 0 6px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11.5px;
  outline: none;
  max-width: 215px;
  cursor: pointer;
}
.st-model-select:hover, .st-model-select:focus { color: var(--text); background: var(--panel); }
.st-send-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: none;
  background: var(--text);
  color: var(--bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.st-send-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Column 3: Browser Preview + Diff + Code */
.st-stage {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  background: var(--bg);
}
.st-stage-bar {
  height: 40px;
  min-height: 40px;
  padding: 0 10px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.st-tabs { display: flex; align-items: center; gap: 2px; }
.st-tab {
  height: 28px;
  padding: 0 10px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}
.st-tab:hover { color: var(--text); background: var(--hover); }
.st-tab.active { color: var(--text); background: var(--elevated); font-weight: 600; }

.st-browser-chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: flex-end;
  min-width: 0;
}
.st-url-bar {
  height: 26px;
  padding: 0 10px;
  border-radius: 6px;
  background: var(--elevated);
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 300px;
  min-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.st-vp-group { display: flex; align-items: center; gap: 2px; }

.st-pane {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.st-pane-preview {
  align-items: center;
  justify-content: center;
  background: #08090d;
}
#stPreviewFrame {
  width: 100%;
  height: 100%;
  border: none;
  background: #0b1020;
  transition: width 0.2s ease, border-radius 0.2s ease;
}
.st-pane-scroll { overflow-y: auto; padding: 18px; }
.st-empty-pane {
  color: var(--muted);
  font-size: 13px;
  padding: 24px;
  text-align: center;
}

/* Unified Diff */
.st-diff-wrap { display: flex; flex-direction: column; gap: 14px; }
.st-diff-file {
  border: 1px solid var(--border);
  border-radius: 9px;
  overflow: hidden;
  background: var(--panel);
}
.st-diff-head {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
}
.st-diff-body {
  padding: 8px 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.5;
  overflow-x: auto;
}
.st-diff-line { padding: 0 12px; white-space: pre; }
.st-diff-line.add { background: rgba(16, 185, 129, 0.14); color: #34d399; }
.st-diff-line.rem { background: rgba(239, 68, 68, 0.14); color: #f87171; }
.st-diff-line.hunk { color: var(--accent); }

/* Code Pane */
.st-code-head {
  height: 36px;
  padding: 0 12px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.st-code-actions { display: flex; align-items: center; gap: 8px; }
#stCodeTextarea {
  flex: 1;
  width: 100%;
  border: none;
  outline: none;
  resize: none;
  padding: 14px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.55;
}

/* Versions & Console */
.st-versions-wrap, .st-console-wrap { max-width: 720px; }
.st-versions-wrap h3, .st-console-wrap h3 { margin: 0 0 6px; font-size: 15px; }
.st-muted { color: var(--muted); font-size: 12px; }
.st-versions-list { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.st-ver-card {
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--panel);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.st-console-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.st-console-log {
  padding: 12px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--panel);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
}

/* New Project Modal */
.st-modal-bg {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.st-modal-card {
  width: 100%;
  max-width: 560px;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: var(--panel);
  padding: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.st-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.st-modal-head h2 { margin: 0; font-size: 17px; }
.st-modal-textarea, .st-modal-input {
  width: 100%;
  border-radius: 9px;
  border: 1px solid var(--border-strong);
  background: var(--elevated);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  padding: 10px 12px;
  outline: none;
}
.st-modal-textarea:focus, .st-modal-input:focus { border-color: var(--accent); }
.st-modal-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}
.st-modal-foot {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Toast */
.st-toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 200;
  padding: 9px 14px;
  border-radius: 9px;
  background: var(--text);
  color: var(--bg);
  font-size: 12.5px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.16s, transform 0.16s;
}
.st-toast.show { opacity: 1; transform: translateY(0); }

/* Free Pools Modal Compatibility (reuses free-pools-modal.js) */
.pin-modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.phub-modal-card {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.phub-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.pin-close {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}
.pin-close:hover { background: var(--hover); color: var(--text); }
.phub-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--elevated);
  border: 1px solid var(--border);
}
.phub-pill.green { background: var(--green-soft); color: var(--green); border-color: rgba(16, 185, 129, 0.3); }
.phub-btn {
  height: 30px;
  padding: 0 11px;
  border-radius: 7px;
  border: 1px solid var(--border-strong);
  background: var(--elevated);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.phub-btn:hover { background: var(--hover); }
.phub-btn.primary { background: var(--text); color: var(--bg); border-color: transparent; font-weight: 600; }
.phub-input {
  border-radius: 7px;
  border: 1px solid var(--border-strong);
  background: var(--elevated);
  color: var(--text);
  font: inherit;
  outline: none;
}

.st-mobile-sb-btn { display: none; }
.st-sb-backdrop {
  display: none;
  position: fixed;
  inset: 46px 0 0 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.55);
}
.st-sb-backdrop.open { display: block; }

@media (max-width: 1024px) {
  .st-mobile-sb-btn { display: inline-flex; }
  .st-workbench { grid-template-columns: minmax(300px, 44%) 1fr; }
  .st-sidebar {
    position: fixed;
    top: 46px;
    left: 0;
    bottom: 0;
    width: 264px;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform 0.18s ease;
    box-shadow: 12px 0 36px rgba(0, 0, 0, 0.45);
  }
  .st-sidebar.open { transform: translateX(0); }
}
@media (max-width: 720px) {
  .st-topbar {
    overflow-x: auto;
    scrollbar-width: none;
    padding: 0 8px;
    gap: 6px;
  }
  .st-topbar::-webkit-scrollbar { display: none; }
  .st-brand-name, .st-top-center, .st-url-bar, #stNewProjectBtn span, #stDownloadZipBtn, #stFreePoolsBtn span:last-child, #stThemeBtn, #stVpDesktop, #stVpMobile { display: none; }
  .st-ws-select { max-width: 82px; font-size: 11.5px; }
  .st-top-right { gap: 4px; flex-shrink: 0; }
  .st-top-right .st-btn { padding: 0 6px; font-size: 11px; white-space: nowrap; }
  .st-stage-bar { overflow-x: auto; scrollbar-width: none; gap: 6px; }
  .st-stage-tabs { flex-shrink: 0; }
  .st-stage-bar::-webkit-scrollbar { display: none; }
  .st-workbench { grid-template-columns: 1fr; grid-template-rows: 1fr 48%; }
  .st-modal-row { grid-template-columns: 1fr; }
}

/* ---------- ASAR Studio v179.0: Quick Tools Strip & Live Status Bar ---------- */
.st-qtools-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 2px 8px;
}
.st-qtools-strip::-webkit-scrollbar { display: none; }
.st-qtool-chip {
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--elevated);
  color: var(--text);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease;
}
.st-qtool-chip:hover {
  border-color: var(--accent, #22c55e);
  background: rgba(34, 197, 94, 0.12);
}
.st-status-bar {
  flex-shrink: 0;
  min-height: 29px;
  padding: 3px 14px;
  border-top: 1px solid var(--border);
  background: var(--elevated);
  color: var(--text);
  font-size: 11.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.st-sb-pill {
  border: 0;
  background: transparent;
  color: inherit;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 6px;
  cursor: pointer;
}
.st-sb-pill:hover {
  background: rgba(255, 255, 255, 0.08);
}
