/* GeoMath AR Offline-First Workbench Design System
 * Palette aligned with GeoMath Digital (Royal Blue #215FF0, Deep Navy #18334B, Cool Canvas #F3F7FB).
 * Zero external fonts or CDNs. Supports Light & Dark themes with high contrast.
 */

:root {
  --gm-bg: #F3F7FB;
  --gm-surface: #FFFFFF;
  --gm-surface-2: #EAF1F8;
  --gm-ink: #18334B;
  --gm-muted: #526A7D;
  --gm-border: #D5E2EE;
  --gm-primary: #215FF0;
  --gm-primary-hover: #1749C6;
  --gm-on-primary: #FFFFFF;
  --gm-success: #127957;
  --gm-success-bg: #E6F6F0;
  --gm-warning: #B45309;
  --gm-warning-bg: #FEF4E2;
  --gm-danger: #B9403E;
  --gm-danger-bg: #FDECEC;
  --gm-shadow: 0 2px 10px rgba(24, 51, 75, 0.06);
  --gm-radius: 14px;
  --gm-radius-sm: 9px;
  --gm-font: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --gm-display: "Trebuchet MS", "Avenir Next", "Segoe UI", sans-serif;
  --gm-mono: "SFMono-Regular", Consolas, ui-monospace, monospace;
}

[data-theme="dark"] {
  --gm-bg: #0E1722;
  --gm-surface: #152231;
  --gm-surface-2: #1C2D40;
  --gm-ink: #EAF2FA;
  --gm-muted: #9CB2C7;
  --gm-border: #283C52;
  --gm-primary: #3B78FF;
  --gm-primary-hover: #588EFF;
  --gm-on-primary: #FFFFFF;
  --gm-success: #34D399;
  --gm-success-bg: rgba(16, 185, 129, 0.14);
  --gm-warning: #FBBF24;
  --gm-warning-bg: rgba(245, 158, 11, 0.15);
  --gm-danger: #F87171;
  --gm-danger-bg: rgba(239, 68, 68, 0.16);
  --gm-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
}

*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--gm-bg);
  color: var(--gm-ink);
  font-family: var(--gm-font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }

/* Top Shell Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--gm-surface);
  border-bottom: 1px solid var(--gm-border);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--gm-primary);
  color: var(--gm-on-primary);
  display: grid;
  place-items: center;
  font-family: var(--gm-display);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.02em;
}
.brand h1 {
  margin: 0;
  font-family: var(--gm-display);
  font-size: 17px;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.brand-sub {
  font-size: 11.5px;
  color: var(--gm-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gm-success);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.account-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 5px;
  border-radius: 999px;
  border: 1px solid var(--gm-border);
  background: var(--gm-surface-2);
  color: var(--gm-ink);
  cursor: pointer;
  font: inherit;
}
.avatar-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--gm-primary);
  color: var(--gm-on-primary);
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.acc-meta {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.15;
}
.acc-meta strong { font-size: 12.5px; }
.acc-meta small { font-size: 11px; color: var(--gm-muted); }

/* Buttons & Controls */
button, select, input, textarea { font: inherit; color: inherit; }
button:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--gm-primary);
  outline-offset: 1px;
}
.btn-primary, .btn-secondary, .btn-ghost, .tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: var(--gm-radius-sm);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease, transform 0.08s ease;
}
.btn-primary {
  background: var(--gm-primary);
  color: var(--gm-on-primary);
}
.btn-primary:hover { background: var(--gm-primary-hover); }
.btn-secondary, .tool-btn {
  background: var(--gm-surface);
  color: var(--gm-ink);
  border-color: var(--gm-border);
}
.btn-secondary:hover, .tool-btn:hover { background: var(--gm-surface-2); }
.tool-btn[aria-pressed="true"] {
  background: var(--gm-primary);
  color: var(--gm-on-primary);
  border-color: var(--gm-primary);
}
.btn-ghost {
  background: transparent;
  color: var(--gm-muted);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--gm-surface-2); color: var(--gm-ink); }
.btn-xs { min-height: 28px; padding: 3px 9px; font-size: 12px; }
.btn-full { width: 100%; }
.link-btn {
  background: none;
  border: 0;
  padding: 0;
  color: var(--gm-primary);
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}
.link-btn:hover { text-decoration: underline; }
.file-btn {
  position: relative;
  overflow: hidden;
}
.file-btn input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* Demo Account Welcome Modal */
.gate-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(14, 23, 34, 0.58);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding: 14px;
}
.gate-modal {
  width: min(720px, 100%);
  margin: auto 0;
  max-height: calc(100dvh - 28px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  background: var(--gm-surface);
  border: 1px solid var(--gm-border);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 18px 46px rgba(14, 23, 34, 0.25);
}
.gate-modal h2 {
  margin: 4px 0 6px;
  font-family: var(--gm-display);
  font-size: 20px;
}
.gate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.role-card {
  background: var(--gm-bg);
  border: 1px solid var(--gm-border);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.role-card h3 { margin: 0; font-size: 16px; }
.role-card ul {
  margin: 0;
  padding-left: 18px;
  font-size: 12.5px;
  color: var(--gm-muted);
}
.role-card li { margin-bottom: 4px; }

/* Main Two-Column AR Workbench */
.workbench {
  max-width: 1360px;
  margin: 0 auto;
  padding: 14px 16px 28px;
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(330px, 0.92fr);
  gap: 16px;
  align-items: start;
}

.panel {
  background: var(--gm-surface);
  border: 1px solid var(--gm-border);
  border-radius: var(--gm-radius);
  box-shadow: var(--gm-shadow);
  overflow: hidden;
}

/* Camera & AR Viewport Column */
.camera-toolbar {
  padding: 10px 12px;
  border-bottom: 1px solid var(--gm-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.btn-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.viewport-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  min-height: 310px;
  background: #DCE4EC;
  overflow: hidden;
}
#ar-viewport {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: grab;
}
#ar-viewport:active { cursor: grabbing; }

.hud-bar-top {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
  flex-wrap: wrap;
}
.hud-pill {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--gm-mono);
  background: rgba(15, 28, 42, 0.84);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.16);
}
.hud-pill[data-state="tracked"] { background: rgba(14, 118, 86, 0.92); }
.hud-pill[data-state="locked"] { background: rgba(33, 95, 240, 0.92); }
.hud-pill.focus-pill { background: rgba(180, 83, 9, 0.9); font-family: var(--gm-font); }

.hud-hint {
  position: absolute;
  bottom: 10px;
  left: 10px;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(15, 28, 42, 0.74);
  color: #EAF2FA;
  font-size: 11.5px;
  pointer-events: none;
}

.vision-debug-box {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 196px;
  background: rgba(15, 28, 42, 0.92);
  color: #EAF2FA;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  padding: 7px;
  font-size: 11px;
}
#vision-debug-canvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  margin-bottom: 5px;
}
#vision-debug-meta {
  font-family: var(--gm-mono);
  font-size: 10.5px;
  line-height: 1.35;
}

/* Demo Camera Controls Bar */
.demo-bar {
  padding: 9px 12px;
  background: var(--gm-surface-2);
  border-top: 1px solid var(--gm-border);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12.5px;
}
.demo-bar select, .calc-options select, .field-stack select, .field-stack textarea {
  background: var(--gm-surface);
  border: 1px solid var(--gm-border);
  border-radius: 7px;
  padding: 5px 8px;
  font-size: 12.5px;
}
.compact-range {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--gm-muted);
  font-weight: 600;
}
.compact-range input[type="range"] { width: 78px; accent-color: var(--gm-primary); }

/* Bentangan 3D & View Controls */
.ar-controls {
  padding: 12px;
  border-top: 1px solid var(--gm-border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.net-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.net-row input[type="range"] {
  flex: 1;
  min-width: 140px;
  accent-color: var(--gm-primary);
}
.net-badge {
  min-width: 108px;
  font-family: var(--gm-mono);
  font-weight: 700;
  font-size: 12.5px;
  color: var(--gm-primary);
}
.view-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

/* 11-Model Selector Shelf */
.shape-shelf-wrap {
  padding: 10px 12px 12px;
  border-top: 1px solid var(--gm-border);
  background: var(--gm-bg);
}
.shelf-label {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gm-muted);
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
}
.shape-shelf {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 7px;
}
.shape-chip {
  text-align: left;
  padding: 7px 9px;
  border-radius: 10px;
  border: 1px solid var(--gm-border);
  background: var(--gm-surface);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: border-color 0.14s ease, background 0.14s ease;
}
.shape-chip:hover { border-color: var(--gm-primary); }
.shape-chip.is-active {
  border-color: var(--gm-primary);
  background: var(--gm-surface-2);
  box-shadow: inset 0 0 0 1px var(--gm-primary);
}
.chip-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10.5px;
}
.chip-code { font-family: var(--gm-mono); font-weight: 700; color: var(--gm-muted); }
.chip-focus {
  background: var(--gm-warning-bg);
  color: var(--gm-warning);
  padding: 1px 5px;
  border-radius: 5px;
  font-weight: 700;
  font-size: 9.5px;
}
.chip-name { font-weight: 700; font-size: 12.5px; line-height: 1.2; }
.chip-dots { display: flex; gap: 3px; margin-top: 2px; }
.chip-dots i {
  width: 10px;
  height: 3px;
  border-radius: 2px;
  background: var(--gm-border);
}
.chip-dots i.on { background: var(--gm-success); }

/* Right Inspector Column */
.inspector-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--gm-border);
  background: var(--gm-surface-2);
}
.tab-btn {
  padding: 10px 6px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  font-weight: 700;
  font-size: 12.5px;
  color: var(--gm-muted);
  cursor: pointer;
}
.tab-btn[aria-selected="true"] {
  color: var(--gm-primary);
  border-bottom-color: var(--gm-primary);
  background: var(--gm-surface);
}
.tab-body { padding: 14px; display: flex; flex-direction: column; gap: 14px; }

.eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gm-primary);
}
.muted { color: var(--gm-muted); margin: 4px 0 0; font-size: 12.5px; }
.model-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.model-head h2 { margin: 2px 0; font-family: var(--gm-display); font-size: 20px; }
.stat-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  min-width: 118px;
}
.stat-mini-grid span {
  background: var(--gm-surface-2);
  border: 1px solid var(--gm-border);
  border-radius: 8px;
  padding: 4px 6px;
  text-align: center;
  line-height: 1.15;
}
.stat-mini-grid strong { display: block; font-size: 13px; }
.stat-mini-grid small { font-size: 10px; color: var(--gm-muted); }

.selected-face-banner {
  padding: 7px 10px;
  border-radius: 9px;
  background: var(--gm-surface-2);
  border-left: 3px solid var(--gm-primary);
  font-size: 12.5px;
}

.calc-section {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.calc-section h3, .learn-card h3, .quiz-card h3, .studio-card h3 {
  margin: 0;
  font-size: 13.5px;
}
.section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.dims-grid { display: flex; flex-direction: column; gap: 9px; }
.dim-row { display: flex; flex-direction: column; gap: 4px; }
.dim-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 600;
}
.dim-input-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.dim-input-wrap input {
  width: 68px;
  padding: 3px 6px;
  border-radius: 6px;
  border: 1px solid var(--gm-border);
  background: var(--gm-bg);
  text-align: right;
  font-family: var(--gm-mono);
  font-weight: 700;
}
.dim-row input[type="range"] { width: 100%; accent-color: var(--gm-primary); }

.calc-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding-top: 4px;
}
.inline-select {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--gm-muted);
  font-weight: 600;
}
.inline-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.derived-strip { display: flex; flex-wrap: wrap; gap: 6px; }
.derived-chip {
  padding: 3px 8px;
  border-radius: 7px;
  background: var(--gm-surface-2);
  border: 1px solid var(--gm-border);
  font-family: var(--gm-mono);
  font-size: 12px;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.result-card {
  padding: 11px 12px;
  border-radius: 11px;
  background: var(--gm-bg);
  border: 1px solid var(--gm-border);
}
.res-label { font-size: 11.5px; font-weight: 700; color: var(--gm-muted); }
.res-formula {
  font-family: var(--gm-mono);
  font-size: 12px;
  color: var(--gm-primary);
  margin: 2px 0 4px;
}
.res-value {
  font-family: var(--gm-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.res-value small { font-size: 12.5px; font-weight: 600; color: var(--gm-muted); }

.parts-list { display: flex; flex-direction: column; gap: 6px; }
.part-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
}
.part-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.part-label { flex: 1; }
.part-val { font-family: var(--gm-mono); font-weight: 600; font-size: 12px; }

.steps-box {
  background: var(--gm-bg);
  border: 1px solid var(--gm-border);
  border-radius: 10px;
  padding: 10px 12px;
}
.steps-box summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
}
.steps-cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 8px;
}
.steps-cols h4 { margin: 0 0 4px; font-size: 12px; color: var(--gm-primary); }
.steps-cols ol { margin: 0; padding-left: 18px; font-size: 12px; }
.steps-cols li { margin-bottom: 3px; }
.calc-actions, .card-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Learn, Quiz, Cards & Studio Panels */
.learn-card, .quiz-card, .studio-card {
  background: var(--gm-bg);
  border: 1px solid var(--gm-border);
  border-radius: 11px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.net-callout {
  padding: 9px 10px;
  border-radius: 8px;
  background: var(--gm-surface);
  border-left: 3px solid var(--gm-success);
  font-size: 12.5px;
}
.net-callout.is-warn { border-left-color: var(--gm-warning); }
.net-callout p { margin: 3px 0 0; }

.pill {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: var(--gm-surface-2);
  color: var(--gm-muted);
}
.pill.is-ok { background: var(--gm-success-bg); color: var(--gm-success); }
.quiz-q { margin: 0; font-weight: 600; font-size: 13.5px; }
.quiz-opts { display: flex; flex-direction: column; gap: 6px; }
.quiz-opt {
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--gm-border);
  background: var(--gm-surface);
  cursor: pointer;
  font-weight: 600;
  font-size: 12.5px;
}
.quiz-opt:hover { border-color: var(--gm-primary); }
.quiz-opt.is-correct { background: var(--gm-success-bg); border-color: var(--gm-success); color: var(--gm-success); }
.quiz-opt.is-wrong { background: var(--gm-danger-bg); border-color: var(--gm-danger); color: var(--gm-danger); }
.quiz-fb { padding: 8px 10px; border-radius: 8px; font-size: 12.5px; }
.quiz-fb.is-ok { background: var(--gm-success-bg); color: var(--gm-success); }
.quiz-fb.is-err { background: var(--gm-danger-bg); color: var(--gm-danger); }

.log-list { display: flex; flex-direction: column; gap: 6px; }
.log-item {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--gm-surface);
  border: 1px solid var(--gm-border);
  font-size: 12px;
}

.cards-hero {
  display: grid;
  grid-template-columns: 165px 1fr;
  gap: 12px;
  align-items: center;
}
.card-preview-box svg { width: 100%; height: auto; display: block; }
.bit-grid-mini {
  display: grid;
  grid-template-columns: repeat(4, 20px);
  gap: 3px;
  margin: 8px 0 10px;
}
.bit-grid-mini span {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  display: grid;
  place-items: center;
  font-family: var(--gm-mono);
  font-size: 10.5px;
  font-weight: 700;
}
.bit-grid-mini .b1 { background: #FFFFFF; color: #0F1C2A; border: 1px solid var(--gm-border); }
.bit-grid-mini .b0 { background: #0F1C2A; color: #FFFFFF; }

.cards-mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 6px;
}
.card-mini-btn {
  padding: 7px 8px;
  border-radius: 8px;
  border: 1px solid var(--gm-border);
  background: var(--gm-bg);
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
}
.card-mini-btn strong { font-family: var(--gm-mono); font-size: 11px; color: var(--gm-primary); }
.card-mini-btn span { font-size: 12px; font-weight: 600; }
.card-mini-btn.is-active { border-color: var(--gm-primary); background: var(--gm-surface-2); }

.summary-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}
.summary-kpis div {
  background: var(--gm-bg);
  border: 1px solid var(--gm-border);
  border-radius: 10px;
  padding: 8px 6px;
  text-align: center;
}
.summary-kpis strong { display: block; font-size: 16px; color: var(--gm-primary); }
.summary-kpis small { font-size: 11px; color: var(--gm-muted); }

.field-stack { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 600; }
.table-scroll { overflow-x: auto; }
.roster-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.roster-table th, .roster-table td {
  padding: 6px 7px;
  border-bottom: 1px solid var(--gm-border);
  text-align: left;
}
.roster-table th { color: var(--gm-muted); font-size: 11px; text-transform: uppercase; }
.roster-table td small { display: block; color: var(--gm-muted); font-size: 10.5px; }

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  padding: 9px 16px;
  border-radius: 999px;
  background: #18334B;
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(14, 23, 34, 0.28);
  max-width: min(92vw, 560px);
  text-align: center;
}
.toast[data-tone="success"] { background: #127957; }
.toast[data-tone="warning"] { background: #B45309; }

@media (max-width: 980px) {
  .workbench { grid-template-columns: 1fr; }
  .cards-hero { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .workbench { padding: 10px 10px 24px; }
  .viewport-stage { aspect-ratio: 4 / 4; min-height: 340px; }
  .hud-pill { font-size: 11px; padding: 3px 8px; }
  .toast { border-radius: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
