/* ==========================================================================
   HaKING WEB Studio PRO (v4.0) — Full VS Code / StackBlitz Grade Workbench CSS
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 12.5px;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
  border-radius: 4px;
}
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Shell */
.studio-shell {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  width: 100%;
  overflow: hidden;
}

/* Top Command Bar */
.topbar {
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 12px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  z-index: 40;
}

.topbar-left,
.topbar-center,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.studio-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  flex-shrink: 0;
}
.studio-brand img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  filter: drop-shadow(0 2px 8px rgba(59, 99, 255, 0.22));
}
.studio-brand-title {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  line-height: 1.05;
  display: flex;
  flex-direction: column;
}
.studio-brand-title span {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topbar-sep {
  width: 1px;
  height: 20px;
  background: var(--border-strong);
  margin: 0 2px;
  flex-shrink: 0;
}

.project-name-input {
  width: 164px;
  height: 27px;
  padding: 0 9px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: var(--bg-surface);
  font-weight: 600;
  font-size: 0.8rem;
  transition: border-color 140ms var(--ease), background 140ms var(--ease);
}
.project-name-input:hover {
  border-color: var(--border-strong);
}
.project-name-input:focus {
  border-color: var(--cyan);
  background: var(--bg-editor);
  outline: none;
}

.starter-select {
  height: 26px;
  padding: 0 8px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  font-size: 0.72rem;
  font-weight: 600;
  max-width: 240px;
}

/* Tool Buttons */
.tbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 27px;
  padding: 0 9px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--ink-2);
  font-size: 0.74rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 130ms var(--ease);
}
.tbtn svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}
.tbtn:hover {
  border-color: var(--border-strong);
  background: var(--bg-elevated);
  color: var(--ink);
}
.tbtn.is-active {
  background: var(--cyan-soft);
  border-color: rgba(59, 99, 255, 0.5);
  color: var(--cyan);
}
.tbtn-run {
  background: var(--run);
  border-color: var(--run);
  color: #ffffff;
  font-weight: 700;
}
.tbtn-run:hover {
  background: var(--run-hover);
  border-color: var(--run-hover);
  color: #ffffff;
}
.tbtn-cyan {
  background: var(--cyan);
  border-color: var(--cyan);
  color: var(--cyan-ink);
  font-weight: 700;
}
.tbtn-cyan:hover {
  background: var(--cyan-hover);
  border-color: var(--cyan-hover);
  color: var(--cyan-ink);
}
.tbtn-icon {
  width: 27px;
  padding: 0;
}
.tbtn-xs {
  height: 24px;
  padding: 0 8px;
  font-size: 0.71rem;
}

.cmd-trigger {
  gap: 8px;
  padding: 0 10px;
  color: var(--ink-muted);
}
.cmd-trigger kbd {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  color: var(--cyan);
}

/* Main Workbench Frame: Activity Rail + Side Panel + Split Editor/Preview */
.ide-body {
  flex: 1;
  min-height: 0;
  display: flex;
  overflow: hidden;
}

/* VS Code Activity Rail */
.activity-rail {
  width: 40px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
}

.rail-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.rail-btn {
  position: relative;
  width: 31px;
  height: 31px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 140ms var(--ease);
}
.rail-btn svg {
  width: 16px;
  height: 16px;
}
.rail-btn:hover {
  color: var(--ink);
  background: var(--bg-surface);
}
.rail-btn.is-active {
  color: var(--cyan);
  background: var(--cyan-soft);
  border-color: rgba(59, 99, 255, 0.35);
}
.rail-btn.is-active::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 7px;
  bottom: 7px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--cyan);
}

.rail-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  border-radius: 99px;
  background: var(--run);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Docked Side Sidebar */
.sidebar-panel {
  width: 202px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  min-height: 0;
  overflow: hidden;
}
.sidebar-panel.is-wide {
  width: 320px;
}

.sidebar-head {
  height: 33px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.sidebar-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 10px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* File Explorer Tree */
.file-tree {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  padding: 5px 7px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.73rem;
  color: var(--ink-2);
  cursor: pointer;
  border: 1px solid transparent;
}
.file-row:hover {
  background: var(--bg-surface);
  color: var(--ink);
}
.file-row.is-active {
  background: var(--cyan-soft);
  border-color: rgba(59, 99, 255, 0.32);
  color: var(--ink);
  font-weight: 700;
}
.file-row-left {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  overflow: hidden;
}
.file-row-left span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-ext-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.ext-html { background: #f97316; }
.ext-css { background: #38bdf8; }
.ext-js { background: #facc15; }
.ext-jsx { background: #22d3ee; }
.ext-json { background: #10b981; }
.ext-other { background: #94a3b8; }

.file-row-actions {
  display: none;
  gap: 2px;
}
.file-row:hover .file-row-actions {
  display: flex;
}

.mini-icon-btn {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--ink-muted);
  font-size: 0.72rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.mini-icon-btn:hover {
  background: var(--bg-elevated);
  color: var(--ink);
}

.explorer-section-lbl {
  margin-top: 8px;
  padding: 6px 6px 2px;
  font-family: var(--font-mono);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  border-top: 1px solid var(--border);
}

/* Main Split Workspace (Editor + Preview) */
.workspace {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  overflow: hidden;
}
.workspace[data-layout='vertical'] {
  flex-direction: column;
}
.workspace[data-layout='preview'] .pane-editor,
.workspace[data-layout='preview'] .split-handle {
  display: none;
}

/* Center Monaco Editor Pane */
.pane-editor {
  width: 44%;
  min-width: 260px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-editor);
  border-right: 1px solid var(--border);
}
.workspace[data-layout='vertical'] .pane-editor {
  width: 100% !important;
  height: 46%;
  min-height: 180px;
  border-right: 0;
}

.editor-tabs-bar {
  height: 33px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 8px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
}

.open-tabs {
  display: flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.open-tabs::-webkit-scrollbar {
  display: none;
}

.ed-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 8px;
  border-radius: 5px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 0.71rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 130ms var(--ease);
}
.ed-tab:hover {
  background: var(--bg-surface);
  color: var(--ink);
}
.ed-tab.is-active {
  background: var(--bg-editor);
  border-color: var(--border-strong);
  color: var(--ink);
}

.editor-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.monaco-host {
  flex: 1;
  min-height: 0;
  position: relative;
  display: flex;
  overflow: hidden;
  background: var(--bg-editor);
}

.fallback-textarea {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 14px;
  border: 0;
  background: var(--bg-editor);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.62;
  tab-size: 2;
  white-space: pre;
  overflow: auto;
  resize: none;
  outline: none;
}

/* Resizable Split Handle */
.split-handle {
  width: 6px;
  flex-shrink: 0;
  background: var(--bg-panel);
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  cursor: col-resize;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 140ms var(--ease);
}
.split-handle::after {
  content: '';
  width: 2px;
  height: 36px;
  border-radius: 99px;
  background: var(--border-strong);
}
.split-handle:hover,
.split-handle.is-dragging {
  background: var(--cyan-soft);
}
.split-handle:hover::after,
.split-handle.is-dragging::after {
  background: var(--cyan);
}

.workspace[data-layout='vertical'] .split-handle {
  width: 100%;
  height: 6px;
  cursor: row-resize;
  border-left: 0;
  border-right: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.workspace[data-layout='vertical'] .split-handle::after {
  width: 36px;
  height: 2px;
}

/* Right Preview + 3-Tab DevTools Pane */
.pane-preview {
  flex: 1;
  min-width: 260px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.preview-toolbar {
  height: 33px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  padding: 0 8px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.preview-toolbar::-webkit-scrollbar {
  display: none;
}

.vp-group {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  flex-shrink: 0;
}
.vp-btn {
  height: 22px;
  padding: 0 6px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 0.67rem;
  font-weight: 700;
  white-space: nowrap;
}
.vp-btn:hover {
  color: var(--ink);
}
.vp-btn.is-active {
  background: var(--cyan);
  color: var(--cyan-ink);
}

.vp-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.71rem;
  color: var(--ink-muted);
  flex-shrink: 0;
}

.zoom-select {
  height: 24px;
  padding: 0 6px;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  flex-shrink: 0;
}

.vp-dim {
  padding: 2px 7px;
  border-radius: 99px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--ink-2);
  white-space: nowrap;
  flex-shrink: 0;
}

.run-time {
  color: var(--run);
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Viewport Canvas Backdrop */
.preview-canvas {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: 0;
  background-image: radial-gradient(rgba(245, 243, 236, 0.09) 1px, transparent 1px);
  background-size: 20px 20px;
}
.preview-canvas.is-framed {
  padding: 20px;
  align-items: flex-start;
}

.device-frame {
  width: 100%;
  height: 100%;
  background: #ffffff;
  overflow: hidden;
  transform-origin: top center;
  transition: width 200ms var(--ease), height 200ms var(--ease), transform 180ms var(--ease);
}
.preview-canvas.is-framed .device-frame {
  border-radius: 14px;
  border: 2px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
  flex-shrink: 0;
}
.device-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #ffffff;
}

/* 3-Tab Interactive DevTools Panel */
.devtools-panel {
  height: 140px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-panel);
  border-top: 1px solid var(--border-strong);
}
.devtools-panel.is-collapsed {
  height: 34px;
}

.devtools-head {
  height: 30px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 10px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.devtools-head::-webkit-scrollbar {
  display: none;
}

.dt-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.dt-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 7px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}
.dt-tab:hover {
  color: var(--ink);
}
.dt-tab.is-active {
  background: var(--bg-panel);
  color: var(--cyan);
}

.console-badge {
  padding: 1px 6px;
  border-radius: 99px;
  background: var(--bg-elevated);
  color: var(--ink-2);
  font-size: 0.67rem;
}
.console-badge.has-error {
  background: var(--danger-soft);
  color: var(--danger);
}

.devtools-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.devtools-panel.is-collapsed .devtools-body {
  display: none;
}

.dt-pane {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.console-logs {
  flex: 1;
  overflow-y: auto;
  padding: 6px 10px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.log-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 3px 7px;
  border-radius: 4px;
  line-height: 1.45;
  word-break: break-word;
}
.log-row.log-info {
  background: var(--cyan-soft);
  color: var(--ink);
}
.log-row.log-warn {
  background: var(--warn-soft);
  color: var(--warn);
}
.log-row.log-error {
  background: var(--danger-soft);
  color: var(--danger);
}
.log-row.log-repl {
  background: var(--run-soft);
  color: var(--run-hover);
}
.log-ts {
  color: var(--ink-muted);
  flex-shrink: 0;
  font-size: 0.68rem;
}

/* Interactive JS REPL Bar */
.repl-bar {
  height: 30px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  background: var(--bg-editor);
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}
.repl-prompt {
  color: var(--cyan);
  font-weight: 800;
}
.repl-input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  outline: none;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

/* DOM Inspector & Audit Panes */
.inspector-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.insp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}
.insp-box {
  padding: 8px 10px;
  border-radius: 7px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
}
.insp-box small {
  display: block;
  color: var(--ink-muted);
  font-size: 0.67rem;
}
.insp-box strong {
  display: block;
  color: var(--ink);
  margin-top: 2px;
  font-size: 0.78rem;
}
.swatch-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  border: 1px solid var(--border-strong);
  vertical-align: middle;
  margin-right: 5px;
}

/* Bottom IDE Status Bar */
.statusbar {
  height: 28px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 12px;
  background: var(--bg-panel);
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.69rem;
  color: var(--ink-muted);
  overflow: hidden;
}
.status-group {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  min-width: 0;
}
.status-link {
  text-decoration: none;
  color: var(--ink-2);
}
.status-link:hover {
  color: var(--cyan);
}
.auto-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  user-select: none;
}

/* Mobile Pane Switcher */
.mobile-mode-bar {
  display: none;
}

/* Toast Notification */
.studio-toast {
  position: fixed;
  right: 16px;
  bottom: 38px;
  z-index: 2000;
  padding: 9px 15px;
  border-radius: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--cyan);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 160ms var(--ease), transform 160ms var(--ease);
}
.studio-toast.is-show {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Adaptation */
@media (max-width: 1520px) {
  .topbar {
    gap: 6px;
    padding: 0 10px;
  }
  .topbar-left,
  .topbar-center,
  .topbar-right {
    gap: 5px;
    flex-shrink: 0;
  }
  .tbtn {
    padding: 0 8px;
    font-size: 0.75rem;
  }
  .project-name-input {
    width: 148px;
  }
}

@media (max-width: 1220px) {
  .hide-lg {
    display: none !important;
  }
  .project-name-input {
    width: 132px;
  }
}

@media (max-width: 960px) {
  .topbar {
    padding: 0 8px;
    gap: 5px;
  }
  .studio-brand-title span,
  .project-name-input,
  .topbar-sep,
  .hide-sm {
    display: none !important;
  }
  .sidebar-panel {
    position: fixed;
    top: 80px;
    left: 40px;
    bottom: 24px;
    z-index: 80;
    width: min(280px, calc(100vw - 48px)) !important;
    box-shadow: var(--shadow-lg);
  }
  .mobile-mode-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 5px 8px;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border);
  }
  .mobile-mode-btn {
    height: 32px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg-surface);
    color: var(--ink-2);
    font-weight: 700;
    font-size: 0.78rem;
  }
  .mobile-mode-btn.is-active {
    background: var(--cyan);
    border-color: var(--cyan);
    color: var(--cyan-ink);
  }
  .split-handle {
    display: none;
  }
  .pane-editor,
  .pane-preview {
    width: 100% !important;
    min-width: 0;
    border-right: 0;
  }
  .workspace[data-mobile-pane='editor'] .pane-preview {
    display: none;
  }
  .workspace[data-mobile-pane='preview'] .pane-editor {
    display: none;
  }
  .vp-dim,
  #vp-rotate-btn,
  #zoom-select,
  #cursor-pos {
    display: none !important;
  }
  .dt-tab {
    padding: 0 7px;
    font-size: 0.68rem;
  }
  .statusbar {
    font-size: 0.66rem;
    padding: 0 8px;
  }
  .status-group {
    gap: 8px;
  }
}

@media (max-width: 520px) {
  .statusbar .status-link {
    display: none !important;
  }
}

/* Dedicated Code & Test IDE Secondary Toolbar (zero topbar collision + natural 80%-grade spacing) */
.code-toolbar {
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 12px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.code-toolbar::-webkit-scrollbar {
  display: none;
}
.code-tb-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
