    :root {
      --ink: #0f172a;
      --muted: #64748b;
      --line: #e2e8f0;
      --brand: #1a56db;
      --soft: #eff6ff;
      --card: #ffffff;
      --radius: 18px;
    }
    * { box-sizing: border-box; }
    html, body {
      margin: 0;
      height: 100%;
      overflow: hidden;
      font-family: 'Inter', system-ui, sans-serif;
      background: #0f172a;
      color: var(--ink);
    }
    .sim-overlay-msg {
      position: fixed;
      inset: 0;
      z-index: 200;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 24px;
      background: linear-gradient(180deg, #f1f5f9 0%, #e8eef6 100%);
    }
    .sim-root-full {
      position: fixed;
      inset: 0;
      z-index: 1;
      display: flex;
      flex-direction: column;
      background: #0f172a;
    }
    .sim-back-fab {
      position: fixed;
      top: max(10px, env(safe-area-inset-top, 0px));
      left: max(10px, env(safe-area-inset-left, 0px));
      z-index: 60;
      width: 46px;
      height: 46px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      background: rgba(15, 23, 42, 0.78);
      color: #e2e8f0;
      font-weight: 800;
      font-size: 1.15rem;
      text-decoration: none;
      border: 1px solid rgba(255, 255, 255, 0.14);
      backdrop-filter: blur(10px);
      box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
    }
    .sim-back-fab:hover { background: rgba(30, 41, 59, 0.92); color: #fff; }
    .sim-tab-bar {
      flex-shrink: 0;
      display: flex;
      gap: 8px;
      padding: max(10px, env(safe-area-inset-top, 0px)) 12px 10px 64px;
      background: rgba(15, 23, 42, 0.94);
      backdrop-filter: blur(12px);
      border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }
    .sim-tab {
      flex: 1;
      min-width: 0;
      cursor: pointer;
      border: none;
      font-family: inherit;
      padding: 10px 12px;
      border-radius: 12px;
      font-weight: 800;
      font-size: 0.74rem;
      line-height: 1.25;
      background: rgba(255, 255, 255, 0.1);
      color: #cbd5e1;
      transition: background 0.15s, color 0.15s, transform 0.15s;
    }
    .sim-tab:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }
    .sim-tab.active {
      background: #fff;
      color: #0f3a8e;
      box-shadow: 0 6px 22px rgba(26, 86, 219, 0.22);
    }
    .sim-panel-fill {
      flex: 1;
      min-height: 0;
      position: relative;
    }
    .sim-stage-mv {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      border: none;
      border-radius: 0;
      background: #0f172a;
      overflow: hidden;
    }
    .sim-stage-mv model-viewer {
      width: 100%;
      height: 100%;
      min-height: 100%;
      display: block;
      touch-action: none;
      --poster-color: transparent;
    }
    .sim-stage-mv model-viewer::part(default-ar-button) { border-radius: 12px; }
    .sim-stage {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      border: none;
      border-radius: 0;
      background: #0f172a;
      overflow: hidden;
    }
    .sim-hint-floating {
      position: absolute;
      bottom: 14px;
      left: 50%;
      transform: translateX(-50%);
      z-index: 8;
      max-width: min(560px, 94vw);
      margin: 0;
      padding: 8px 16px;
      font-size: 0.72rem;
      font-weight: 600;
      line-height: 1.4;
      text-align: center;
      color: #e2e8f0;
      background: rgba(15, 23, 42, 0.82);
      border-radius: 999px;
      border: 1px solid rgba(255, 255, 255, 0.1);
      pointer-events: none;
    }
    .sim-controls-fab {
      position: absolute;
      right: max(12px, env(safe-area-inset-right, 0px));
      bottom: max(12px, calc(12px + env(safe-area-inset-bottom, 0px)));
      z-index: 40;
      padding: 12px 18px;
      border-radius: 999px;
      border: none;
      background: linear-gradient(135deg, #0f3a8e, #1a56db);
      color: #fff;
      font-weight: 800;
      font-size: 0.78rem;
      font-family: inherit;
      cursor: pointer;
      box-shadow: 0 10px 32px rgba(26, 86, 219, 0.45);
    }
    .sim-controls-fab:hover { filter: brightness(1.06); }
    .sim-controls-sheet {
      position: absolute;
      left: 0;
      right: 0;
      bottom: 0;
      z-index: 38;
      max-height: min(68vh, 520px);
      display: flex;
      flex-direction: column;
      background: #f8fafc;
      border-radius: 20px 20px 0 0;
      box-shadow: 0 -14px 48px rgba(0, 0, 0, 0.4);
      transform: translateY(calc(100% + 8px));
      transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .sim-controls-sheet.open { transform: translateY(0); }
    .sim-sheet-handle {
      width: 44px;
      height: 5px;
      margin: 10px auto 4px;
      border-radius: 99px;
      background: #cbd5e1;
      flex-shrink: 0;
    }
    .sim-sheet-inner {
      overflow-y: auto;
      padding: 6px 14px max(22px, calc(16px + env(safe-area-inset-bottom, 0px)));
      -webkit-overflow-scrolling: touch;
    }
    .sim-card {
      background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
      padding: 16px 16px 14px; box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    }
    .sim-card h2 { margin: 0 0 12px; font-size: 0.82rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: #475569; }
    .sim-row { margin-bottom: 12px; }
    .sim-row:last-child { margin-bottom: 0; }
    .sim-label { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; font-size: 0.8rem; font-weight: 700; color: #334155; }
    .sim-val { font-variant-numeric: tabular-nums; color: var(--brand); font-weight: 800; font-size: 0.78rem; }
    input[type="range"] { width: 100%; accent-color: var(--brand); }
    .sim-floor-pick { display: flex; gap: 8px; flex-wrap: wrap; }
    .sim-floor-pick label {
      flex: 1; min-width: 120px; cursor: pointer; text-align: center; padding: 10px 12px; border-radius: 12px;
      border: 2px solid var(--line); font-weight: 800; font-size: 0.8rem; color: #475569; transition: border-color 0.15s, background 0.15s;
      display: block; position: relative;
    }
    .sim-floor-pick input {
      position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
      clip: rect(0, 0, 0, 0); border: 0; white-space: nowrap;
    }
    .sim-floor-pick label.is-on { border-color: var(--brand); background: var(--soft); color: #0f3a8e; }
    .sim-floor-pick label span { display: block; }
    .sim-floor-pick input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 10px; }
    .sim-note { font-size: 0.76rem; color: var(--muted); line-height: 1.45; margin-top: 10px; }
    .sim-extra-btns { display: flex; flex-wrap: wrap; gap: 8px; }
    .sim-extra-btns button {
      flex: 1; min-width: 100px; padding: 8px 10px; border-radius: 10px; border: 1.5px solid var(--line);
      background: #fff; font-weight: 800; font-size: 0.76rem; color: #334155; cursor: pointer; font-family: inherit;
    }
    .sim-extra-btns button:hover { border-color: var(--brand); color: var(--brand); }
    .sim-extra-list { list-style: none; margin: 10px 0 0; padding: 0; font-size: 0.8rem; }
    .sim-extra-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
    .sim-extra-list li:last-child { border-bottom: none; }
    .sim-extra-list button { padding: 4px 10px; border-radius: 8px; border: 1px solid #fecaca; background: #fef2f2; color: #b91c1c; font-weight: 800; font-size: 0.72rem; cursor: pointer; font-family: inherit; }
    .sim-sheet-inner .sim-card { margin-bottom: 12px; }
    .sim-sheet-inner .sim-card:last-child { margin-bottom: 0; }
    .sim-panel-edit { display: flex; flex-direction: column; }
    @media (max-width: 480px) {
      .sim-tab { font-size: 0.68rem; padding: 9px 8px; }
    }
  
/* ===== Design system overlay (passada final) — remapeia para tokens =========
   Ferramenta 3D full-screen: mantém o palco escuro; harmoniza acentos/tipografia. */
:root {
  --ink: var(--cc-ink); --muted: var(--cc-muted); --line: var(--cc-line);
  --brand: var(--cc-brand); --soft: var(--cc-brand-tint); --card: var(--cc-surface);
  --radius: var(--cc-radius-lg);
}
.sim-card h2 { font-family: var(--cc-font-display); font-weight: 600; text-transform: none; letter-spacing: -0.01em; color: var(--cc-ink); font-size: 0.98rem; }
.sim-tab.active { color: var(--cc-brand-700); box-shadow: var(--cc-shadow); }
.sim-controls-fab { background: linear-gradient(135deg, var(--cc-brand-800), var(--cc-brand)); box-shadow: 0 10px 32px rgba(31,58,95,0.45); }
.sim-floor-pick label.is-on { color: var(--cc-brand-700); }
