:root {
  /* Apple Light Studio Theme (Default) */
  --bg-stage: radial-gradient(circle at 48% 42%, #ffffff 0%, #f5f5f7 56%, #e8e8ed 100%);
  --surface: rgba(255, 255, 255, 0.78);
  --surface-solid: #ffffff;
  --surface-subtle: rgba(0, 0, 0, 0.035);
  --surface-hover: rgba(0, 0, 0, 0.055);
  --seg-bg: rgba(118, 118, 128, 0.12);
  --seg-active: #ffffff;
  --seg-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 0.5px 1px rgba(0, 0, 0, 0.06);
  --border: rgba(0, 0, 0, 0.08);
  --border-subtle: rgba(0, 0, 0, 0.05);
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-tertiary: #86868b;
  --shadow-float: 0 8px 28px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.04);

  /* Apple System Accents */
  --blue: #0071e3;
  --green: #28a745;
  --indigo: #5856d6;
  --orange: #ff9500;
  --red: #ff3b30;

  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Helvetica Neue", sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, Monaco, monospace;
}

[data-theme="dark"] {
  /* Apple Pro Dark Studio Theme */
  --bg-stage: radial-gradient(circle at 48% 42%, #1d1d22 0%, #0e0e11 58%, #000000 100%);
  --surface: rgba(28, 28, 30, 0.76);
  --surface-solid: #1c1c1e;
  --surface-subtle: rgba(255, 255, 255, 0.05);
  --surface-hover: rgba(255, 255, 255, 0.09);
  --seg-bg: rgba(118, 118, 128, 0.24);
  --seg-active: #3a3a3c;
  --seg-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  --border: rgba(255, 255, 255, 0.11);
  --border-subtle: rgba(255, 255, 255, 0.07);
  --text: #f5f5f7;
  --text-secondary: #a1a1a6;
  --text-tertiary: #86868b;
  --shadow-float: 0 12px 34px rgba(0, 0, 0, 0.48);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.28);

  --blue: #0a84ff;
  --green: #30d158;
  --indigo: #5e5ce6;
  --orange: #ff9f0a;
  --red: #ff453a;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--text);
  background: var(--bg-stage);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.muted {
  color: var(--text-tertiary);
}

.green {
  color: var(--green);
}

/* Main Split Layout */
.app-shell {
  display: flex;
  width: 100vw;
  height: 100vh;
}

.stage-area {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 100%;
  background: var(--bg-stage);
  overflow: hidden;
}

#scene-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  touch-action: none;
}

#scene-canvas:active {
  cursor: grabbing;
}

/* Spatial 3D Hardware HUD (Apple VisionOS Glass Cards + Hairline Connectors) */
.hud-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
  overflow: visible;
}

.hud-line {
  stroke: var(--text-tertiary);
  stroke-width: 1.1;
  stroke-opacity: 0.52;
  fill: none;
}

.hud-anchor-ring {
  fill: var(--surface-solid);
  stroke: var(--blue);
  stroke-width: 1.8;
}

.hud-anchor-core {
  fill: var(--blue);
}

.spatial-hud {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  overflow: hidden;
  transition: opacity 0.2s ease;
}

.spatial-hud.hidden,
.hud-lines.hidden {
  opacity: 0;
  pointer-events: none;
}

.hud-card {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  text-align: left;
  min-width: 182px;
  padding: 7px 11px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  box-shadow: var(--shadow-float);
  color: var(--text);
  font-family: var(--sans);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.22s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.hud-card.visible {
  opacity: 1;
}

.hud-card.visible.dimmed {
  opacity: 0.42;
}

.hud-card:hover {
  border-color: var(--blue);
  opacity: 1 !important;
  z-index: 6;
}

.hud-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 3px;
}

.hud-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  white-space: nowrap;
}

.hud-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--surface-subtle);
  color: var(--text-secondary);
  white-space: nowrap;
}

.hud-badge.blue {
  background: rgba(0, 113, 227, 0.14);
  color: var(--blue);
}

.hud-badge.green {
  background: rgba(48, 209, 88, 0.15);
  color: var(--green);
}

.hud-badge.indigo {
  background: rgba(88, 86, 214, 0.14);
  color: var(--indigo);
}

.hud-badge.orange {
  background: rgba(255, 149, 0, 0.16);
  color: var(--orange);
}

.hud-rows {
  font-size: 10px;
  color: var(--text-secondary);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}

.hud-sep {
  opacity: 0.45;
}

/* Top-Left Stage Title */
.stage-header {
  position: absolute;
  top: 18px;
  left: 20px;
  z-index: 5;
  pointer-events: none;
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: var(--shadow-float);
  border-radius: 14px;
  padding: 9px 14px;
}

.identity-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}

.status-dot.offline {
  background: var(--red);
}

.host-title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.meta-pill {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 2px 8px;
  border-radius: 999px;
}

.uptime-line {
  margin-top: 5px;
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.uptime-line strong {
  color: var(--text);
  font-weight: 500;
}

.dot-sep {
  opacity: 0.45;
}

/* Top-Right Stage Controls */
.stage-actions {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ondemand-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow-float);
  font-size: 12px;
  color: var(--text-secondary);
}

.ondemand-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.apple-btn {
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow-float);
  color: var(--text);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.16s ease, transform 0.12s ease;
}

.apple-btn:hover {
  background: var(--surface-solid);
}

.apple-btn:active {
  transform: scale(0.97);
}

.apple-btn.subtle {
  color: var(--text-secondary);
}

/* Bottom Floating Apple Dock */
.stage-dock {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: var(--shadow-float);
}

.segmented {
  display: inline-flex;
  align-items: center;
  background: var(--seg-bg);
  border-radius: 999px;
  padding: 2px;
  gap: 2px;
}

.segmented.full {
  display: flex;
  width: 100%;
  border-radius: 10px;
}

.segmented.full .seg-btn {
  flex: 1;
  border-radius: 8px;
  height: 30px;
}

.segmented.compact {
  border-radius: 8px;
}

.segmented.compact .seg-btn {
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
}

.seg-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.16s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.seg-btn:hover {
  color: var(--text);
}

.seg-btn.active {
  background: var(--seg-active);
  color: var(--text);
  box-shadow: var(--seg-shadow);
}

.dock-divider {
  width: 1px;
  height: 18px;
  background: var(--border);
}

.dock-toggles {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.lbl-short {
  display: none;
}

.dock-toggle {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.16s ease;
}

.dock-toggle:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.dock-toggle.active {
  background: var(--blue);
  color: #ffffff;
}

/* Right macOS Sequoia Inspector Sidebar */
.inspector {
  width: 430px;
  flex-shrink: 0;
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  display: flex;
  flex-direction: column;
  transition: width 0.25s ease, opacity 0.2s ease, border-color 0.2s ease;
  overflow: hidden;
}

.app-shell.sidebar-hidden .inspector {
  width: 0;
  opacity: 0;
  border-left-color: transparent;
}

.inspector-top {
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.count-badge {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--surface-subtle);
  color: var(--text-secondary);
}

.tab-pane {
  display: none;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 16px 18px;
}

.tab-pane.active {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Summary Strip */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.summary-tile {
  background: var(--surface-solid);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 10px 10px 9px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tile-label {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
}

.tile-value {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}

.tile-sub {
  font-size: 10px;
  color: var(--text-tertiary);
}

/* macOS Settings Grouped Cards */
.group-card {
  background: var(--surface-solid);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 14px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.group-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.group-head.compact {
  align-items: center;
}

.group-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

.group-sub {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.metric-big {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--blue);
  line-height: 1.05;
}

.metric-big.green {
  color: var(--green);
}

.sparkline {
  width: 100%;
  height: 48px;
  display: block;
  border-radius: 10px;
  background: var(--surface-subtle);
}

.kv-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.kv-grid.two {
  grid-template-columns: repeat(2, 1fr);
}

.kv-item {
  background: var(--surface-subtle);
  border-radius: 9px;
  padding: 7px 9px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.kv-item span {
  font-size: 10px;
  color: var(--text-secondary);
}

.kv-item strong {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.sub-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.core-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.core-cell {
  height: 20px;
  border-radius: 5px;
  background: var(--surface-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: background-color 0.28s ease, color 0.28s ease;
}

/* Apple Thin Progress Bars */
.bar-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.bar-head {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-secondary);
}

.apple-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-subtle);
  overflow: hidden;
}

.apple-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.apple-bar-fill.blue { background: var(--blue); }
.apple-bar-fill.green { background: var(--green); }
.apple-bar-fill.indigo { background: var(--indigo); }
.apple-bar-fill.orange { background: var(--orange); }

.inspector-footer {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-tertiary);
  padding: 2px 4px;
}

/* Activity Monitor Process Tab */
.proc-summary {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--surface-solid);
  border: 1px solid var(--border-subtle);
  border-radius: 11px;
  padding: 9px 12px;
}

.proc-toolbar {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.apple-search {
  width: 100%;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  color: var(--text);
  padding: 0 12px;
  font-family: var(--sans);
  font-size: 12px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.apple-search:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.16);
}

.proc-table-wrap {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background: var(--surface-solid);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
}

.proc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.proc-table thead th {
  position: sticky;
  top: 0;
  background: var(--surface-solid);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  text-align: left;
  padding: 8px 7px;
  border-bottom: 1px solid var(--border);
  z-index: 2;
}

.proc-table thead th.num,
.proc-table tbody td.num {
  text-align: right;
  white-space: nowrap;
}

.proc-table tbody td {
  padding: 6px 7px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.proc-table tbody tr:nth-child(even) {
  background: var(--surface-subtle);
}

.proc-table tbody tr:hover {
  background: var(--surface-hover);
}

.proc-name {
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 5px;
}

.proc-cmd {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-tertiary);
  max-width: 128px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gpu-tag {
  font-family: var(--mono);
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(48, 209, 88, 0.14);
  color: var(--green);
  font-weight: 600;
}

.stat-pill {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 10px;
  background: var(--surface-subtle);
  color: var(--text-secondary);
}

.stat-pill.running {
  background: rgba(48, 209, 88, 0.15);
  color: var(--green);
  font-weight: 600;
}

.empty-row {
  text-align: center;
  padding: 28px 10px !important;
  color: var(--text-tertiary);
}

/* Sleep Sheet */
.sleep-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sleep-overlay.hidden {
  display: none;
}

.sleep-sheet {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 30px 36px;
  text-align: center;
  max-width: 360px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
}

.sleep-symbol {
  font-size: 34px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.sleep-sheet h2 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
}

.sleep-sheet p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 18px;
}

.apple-primary-btn {
  border: none;
  background: var(--blue);
  color: #ffffff;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  padding: 9px 20px;
  border-radius: 999px;
  cursor: pointer;
}

.apple-primary-btn:hover {
  filter: brightness(1.06);
}

@media (max-width: 1040px) {
  .inspector {
    width: 350px;
  }
  .stage-dock {
    max-width: calc(100% - 24px);
    overflow-x: auto;
  }
}

/* =====================================================================
   iOS / Mobile Portrait & Narrow Tablet Adaptation (<= 860px)
   ===================================================================== */
@media (max-width: 860px) {
  html,
  body {
    height: 100dvh;
    overflow: hidden;
  }

  .app-shell {
    flex-direction: column;
    height: 100dvh;
    width: 100vw;
  }

  .stage-area {
    flex: none;
    width: 100%;
    height: 48dvh;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    transition: height 0.25s ease;
  }

  .stage-area #scene-canvas {
    flex: 1;
    min-height: 0;
  }

  .app-shell.sidebar-hidden .stage-area {
    height: 100dvh;
  }

  /* Compact iOS top-left header */
  .stage-header {
    top: max(10px, env(safe-area-inset-top));
    left: 10px;
    padding: 6px 10px;
    border-radius: 12px;
    max-width: calc(100% - 178px);
  }

  .host-title {
    font-size: 14px;
  }

  .meta-pill {
    display: none;
  }

  .uptime-line {
    margin-top: 2px;
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .uptime-line > span:first-child,
  .uptime-line > .dot-sep {
    display: none;
  }

  /* Compact top-right buttons */
  .stage-actions {
    top: max(10px, env(safe-area-inset-top));
    right: 10px;
    gap: 5px;
  }

  .ondemand-badge {
    display: none;
  }

  .apple-btn {
    height: 28px;
    padding: 0 9px;
    font-size: 11px;
  }

  /* Native iOS 2-row full-width control strip (zero horizontal scroll, zero chassis overlap!) */
  .stage-dock {
    position: relative;
    bottom: auto;
    left: auto;
    transform: none;
    width: 100%;
    max-width: none;
    border-radius: 0;
    border: none;
    border-top: 1px solid var(--border-subtle);
    box-shadow: none;
    background: var(--surface);
    padding: 8px 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    overflow: visible;
    flex-shrink: 0;
  }

  .lbl-full {
    display: none;
  }

  .lbl-short {
    display: inline;
  }

  .dock-cams {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    width: 100%;
    border-radius: 10px;
    padding: 2px;
  }

  .dock-cams .seg-btn {
    padding: 6px 4px;
    border-radius: 8px;
    font-size: 12px;
    text-align: center;
  }

  .dock-divider {
    display: none;
  }

  .dock-toggles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
    gap: 6px;
  }

  .dock-toggle {
    padding: 6px 8px;
    border-radius: 9px;
    font-size: 12px;
    text-align: center;
    background: var(--surface-subtle);
    color: var(--text);
  }

  .dock-toggle.active {
    background: var(--blue);
    color: #ffffff;
  }

  /* Compact VisionOS 3D HUD pills for mobile width */
  .hud-card {
    min-width: 108px;
    padding: 4px 7px;
    border-radius: 9px;
  }

  .hud-head {
    gap: 5px;
    margin-bottom: 1px;
  }

  .hud-title {
    font-size: 10px;
  }

  .hud-badge {
    font-size: 9px;
    padding: 1px 5px;
  }

  .hud-rows {
    font-size: 9px;
  }

  /* Keep mobile 3D HUD compact: show primary 2 metrics so pills stay narrow on 390px phones */
  .hud-rows > span:nth-child(n + 4) {
    display: none;
  }

  /* Bottom iOS Sheet Inspector */
  .inspector {
    width: 100% !important;
    flex: 1;
    height: auto;
    min-height: 0;
    border-left: none;
    border-top: 1px solid var(--border);
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -8px 26px rgba(0, 0, 0, 0.12);
    z-index: 8;
  }

  .app-shell.sidebar-hidden .inspector {
    flex: 0;
    height: 0;
    min-height: 0;
    opacity: 0;
    border-top-color: transparent;
  }

  .inspector-top {
    padding: 10px 12px 9px;
    position: relative;
  }

  .inspector-top::before {
    content: "";
    display: block;
    width: 36px;
    height: 4px;
    border-radius: 999px;
    background: var(--border);
    margin: 0 auto 8px;
  }

  .tab-pane {
    padding: 10px 12px max(16px, env(safe-area-inset-bottom));
    -webkit-overflow-scrolling: touch;
  }

  .summary-grid {
    gap: 6px;
  }

  .summary-tile {
    padding: 8px 7px;
    border-radius: 10px;
  }

  .tile-value {
    font-size: 14px;
  }

  .group-card {
    padding: 12px;
    border-radius: 12px;
  }

  .metric-big {
    font-size: 19px;
  }

  .kv-grid {
    gap: 6px;
  }

  .kv-item {
    padding: 6px 7px;
  }

  .kv-item strong {
    font-size: 11px;
  }

  .core-grid {
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
  }

  .core-cell {
    height: 18px;
    font-size: 9px;
  }

  /* Process Table Mobile Fit */
  .proc-table {
    font-size: 11px;
  }

  .proc-table thead th,
  .proc-table tbody td {
    padding: 6px 5px;
  }

  .proc-cmd {
    max-width: 115px;
  }
}
