    /* App-only extras — tokens come from core.js + uni.theme.v2.css */

    * { box-sizing: border-box; margin: 0; padding: 0; corner-shape: squircle; user-select: none;
    -webkit-user-select: none; -ms-user-select: none; -moz-user-select: none; }

    body.bg-white { background: var(--bg); }
    body.bg-black { background: var(--black-950); }
    body.bg-media { background: var(--black-950); }

    /* checkerboard preview for alpha */
    body.bg-check {
      background-image:
        linear-gradient(45deg, var(--onyx-400) 25%, transparent 25%, transparent 75%, var(--onyx-400) 75%),
        linear-gradient(45deg, var(--onyx-400) 25%, var(--onyx-500) 25%, var(--onyx-500) 75%, var(--onyx-400) 75%);
      background-size: 28px 28px; background-position: 0 0, 14px 14px;
    }

    /* ── BACKGROUND LAYER (video / iframe) — sits BEHIND the canvas ── */
    #bg-layer {
      position: fixed; inset: 0; z-index: 0; overflow: hidden;
      pointer-events: none; display: none; background: var(--black-950);
    }
    #bg-layer.on { display: block; }
    #bg-layer video, #bg-layer iframe {
      position: absolute; top: 50%; left: 50%;
      width: 100%; height: 100%; min-width: 100%; min-height: 100%;
      transform: translate(-50%, -50%);
      object-fit: cover; border: 0;
    }
    #bg-layer iframe { width: 100vw; height: 100dvh; border: 0; }
    /* YouTube embed — crop controls/branding via center + scale */
    #bg-layer iframe.bg-yt-embed {
      width: 100vw; height: 100dvh;
      transform: translate(-50%, -50%) scale(1.2);
      pointer-events: none;
    }

    #three-container { position: fixed; inset: 0; z-index: 1; }

    canvas { display: block; width: 100%; height: 100%; outline: none; background: transparent !important; touch-action: none; }
    /* During recording the drawing buffer is 1080×1920 — letterbox the live preview honestly */
    canvas.recording-aspect { object-fit: contain; }

    /* ── GLASS UI & SQUIRCLE LOGIC ── */
    .glass, .ctrl-btn {
      border-radius: var(--radius);
      corner-smoothing: 100%;
      -webkit-corner-smoothing: 100%;
    }
    .glass {
      background: var(--surface);
      backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
      border: 1px solid rgba(var(--rgb-diff),.04);
      box-shadow: inset 0 1px 0 0 rgba(var(--rgb-theme),.2), inset 0 0 0 1px rgba(var(--rgb-theme),.075);
    }

    /* ── TOP RIGHT THEME TOGGLE ── */
    .theme-toggle { position: fixed; top: calc(20px + var(--safe-top)); right: var(--s-4); z-index: var(--z-ui); display: flex; gap: var(--s-3); align-items: center; }
    .theme-label {
      font-family: var(--ff-mono); font-size: 0.7rem; text-transform: uppercase;
      letter-spacing: 1px; opacity: 0.6; pointer-events: none; transition: opacity 0.3s;
    }
    @media (max-width: 480px) { .theme-label { display: none; } }
    .theme-btn {
      width: 48px; height: 48px; border: none; cursor: pointer; color: var(--txt-color);
      display: flex; align-items: center; justify-content: center;
      border-radius: 50%; font-size: 1.2rem;
      transition: transform var(--t-ui);
    }
    .theme-btn:hover { transform: scale(1.1) rotate(15deg); }

    /* ── BOTTOM CONTROL BAR ── */
    .control-bar {
      position: fixed; bottom: calc(20px + var(--safe-bottom)); left: 50%; transform: translateX(-50%);
      z-index: 90; padding: var(--s-2); display: flex; gap: 6px; border-radius: var(--r-pill);
      max-width: calc(100vw - var(--s-5));
    }
    .ctrl-btn {
      width: 52px; height: 52px; border-radius: 50%; border: none;
      background: transparent; color: var(--txt-color); font-size: 1.4rem;
      cursor: pointer; display: flex; align-items: center; justify-content: center;
      transition: all var(--t-ui);
      position: relative; overflow: hidden;
      -webkit-tap-highlight-color: transparent;
    }
    @media (max-width: 380px) { .ctrl-btn { width: 46px; height: 46px; font-size: 1.25rem; } }
    .ctrl-btn::after {
      content: ''; position: absolute; inset: 0; background: var(--primary);
      opacity: 0; transition: opacity 0.2s; border-radius: 50%; z-index: -1;
    }
    .ctrl-btn:hover { transform: translateY(-4px); }
    .ctrl-btn:active { transform: scale(0.92); }
    .ctrl-btn:hover::after { opacity: 0.1; }
    .ctrl-btn.active { color: var(--bg); }
    .ctrl-btn.active::after { opacity: 1; }

    /* ── RECORD STORY FAB (bottom-right) — clean camera-shutter circle ── */
    .record-fab {
      position: fixed; bottom: calc(var(--s-5) - 8px + var(--safe-bottom)); right: 18px; z-index: 95;
      width: 58px; height: 58px; border-radius: 50% !important;
      border: none; cursor: pointer; padding: 0;
      display: flex; align-items: center; justify-content: center;
      transition: transform var(--t-ui);
      -webkit-tap-highlight-color: transparent;
    }
    .record-fab:hover { transform: translateY(-3px) scale(1.05); }
    .record-fab:active { transform: scale(0.92); }
    .record-fab .ring {
      width: 28px; height: 28px; border-radius: 50%;
      border: 2.5px solid var(--accent-sunset-red);
      display: flex; align-items: center; justify-content: center;
      transition: border-color 0.3s;
    }
    .record-fab .core {
      width: 13px; height: 13px; border-radius: 50%; background: var(--accent-sunset-red);
      transition: border-radius 0.3s, transform 0.3s;
      animation: fabPulse 2.2s ease-in-out infinite;
    }
    @keyframes fabPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.2); } }
    /* while recording: square stop glyph, no pulse */
    .record-fab.rec .core { border-radius: 3px; animation: none; }

    /* ── RECORD STUDIO SHEET ── */
    .record-sheet {
      position: fixed; left: 50%; bottom: 0; z-index: 300;
      width: min(440px, 100vw); transform: translate(-50%, 110%);
      border-radius: var(--r-lg) var(--r-lg) 0 0; padding: 22px 20px calc(22px + var(--safe-bottom));
      transition: transform 0.55s var(--ease);
    }
    .record-sheet.open { transform: translate(-50%, 0); }
    .rs-grab { width: 40px; height: 4px; border-radius: 4px; background: var(--border); margin: 0 auto 16px; }
    .rs-title { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
    .rs-title .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent-sunset-red); }
    .rs-title h3 { font-size: 0.95rem; font-weight: 600; letter-spacing: 0.02em; }
    .rs-title small { font-family: var(--ff-mono); font-size: 0.6rem; opacity: 0.5; margin-left: auto; text-transform: uppercase; }
    .rs-row { display: flex; gap: 8px; margin-bottom: 12px; }
    .rs-opt {
      flex: 1; padding: 12px 8px; border-radius: 14px; border: 1px solid var(--border);
      background: transparent; color: var(--txt-color); cursor: pointer; text-align: center;
      font-family: var(--ff-mono); font-size: 0.68rem; letter-spacing: 0.04em;
      transition: all 0.25s; -webkit-tap-highlight-color: transparent;
      min-height: 48px; display: flex; flex-direction: column; justify-content: center; gap: 3px;
    }
    .rs-opt b { font-size: 0.78rem; }
    .rs-opt small { opacity: 0.55; font-size: 0.58rem; }
    .rs-opt.sel { border-color: var(--primary); color: var(--primary); background: rgba(var(--rgb-primary), 0.08); }
    .rs-go {
      width: 100%; margin-top: 6px; padding: var(--s-3); border: none; border-radius: var(--r-pill);
      background: var(--primary); color: var(--bg); cursor: pointer;
      font-family: var(--ff-main); font-weight: 600; font-size: 0.95rem; letter-spacing: 0.02em;
      display: flex; align-items: center; justify-content: center; gap: 10px;
      transition: transform 0.25s, filter 0.25s; -webkit-tap-highlight-color: transparent;
    }
    .rs-go:hover { filter: brightness(1.1); }
    .rs-go:active { transform: scale(0.97); }
    .rs-note { margin-top: 10px; font-size: 0.62rem; font-family: var(--ff-mono); opacity: 0.45; text-align: center; line-height: 1.5; }

    /* ── RECORDING HUD ── */
    .rec-badge {
      position: fixed; top: calc(20px + var(--safe-top)); left: 50%; transform: translate(-50%, -200%);
      z-index: 400; display: flex; align-items: center; gap: 10px;
      padding: 10px 20px; border-radius: var(--r-pill);
      font-family: var(--ff-mono); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase;
      transition: transform 0.45s var(--ease);
      pointer-events: none;
    }
    .rec-badge.on { transform: translate(-50%, 0); }
    .rec-badge .dot {
      width: 10px; height: 10px; border-radius: 50%; background: var(--accent-sunset-red);
      animation: recBlink 1s steps(2) infinite;
    }
    @keyframes recBlink { 0% { opacity: 1; } 50% { opacity: 0.2; } 100% { opacity: 1; } }
    .rec-badge .t { color: var(--primary); min-width: 3ch; text-align: right; }

    /* big 3-2-1 countdown */
    .countdown {
      position: fixed; inset: 0; z-index: 390; display: none;
      align-items: center; justify-content: center; pointer-events: none;
    }
    .countdown.on { display: flex; }
    .countdown span {
      font-family: var(--ff-mono); font-weight: 700; font-size: clamp(80px, 25vw, 180px);
      color: var(--primary); text-shadow: 0 0 60px rgba(var(--rgb-primary), 0.5);
      animation: cdPop 1s var(--ease) infinite;
    }
    @keyframes cdPop { 0% { transform: scale(1.4); opacity: 0; } 25% { transform: scale(1); opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; } }
    .story-mask { position: fixed; inset: 0; z-index: 80; pointer-events: none; display: none; }
    .story-mask.on { display: block; }
    .story-mask::before, .story-mask::after {
      content: ''; position: absolute; top: 0; bottom: 0; width: var(--mask-w, 0px);
      background: rgba(var(--rgb-diff), 0.55); backdrop-filter: blur(2px);
    }
    .story-mask::before { left: 0; }
    .story-mask::after { right: 0; }

    /* ── KALEIDOSCOPE MODE PRO — grupos A/B/C no painel (substitui o Instax) ── */
    .kaleido-group-title {
      padding: 14px 14px 4px; font-family: var(--ff-mono); font-size: 9px;
      font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
      color: var(--accent);
    }
    .settings-panel .kaleido-radio {
      display: flex; align-items: center; gap: 9px; width: 100%; cursor: pointer;
      font-size: 13px; color: var(--txt-color);
    }
    .settings-panel .kaleido-radio input[type="radio"] {
      appearance: none; -webkit-appearance: none; width: 16px; height: 16px; flex-shrink: 0;
      border-radius: 50%; border: 1.5px solid rgba(var(--rgb-diff), .25);
      display: grid; place-content: center; cursor: pointer; margin: 0;
    }
    .settings-panel .kaleido-radio input[type="radio"]::before {
      content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
      transform: scale(0); transition: transform .15s var(--ease);
    }
    .settings-panel .kaleido-radio input[type="radio"]:checked::before { transform: scale(1); }
    .settings-panel .kaleido-radio input[type="radio"]:checked { border-color: var(--accent); }

    /* ── SETTINGS PANEL — positioning shell; .s + uni.css handle aside tokens ── */
    .settings-panel {
      position: fixed; left: 0; right: 0; bottom: 0;
      width: 340px; max-width: 92%; height: 82dvh; transform: translateY(110%);
      transition: transform 0.5s var(--ease), background 0.35s, border-color 0.35s;
      z-index: 200; display: flex; flex-direction: column;
      overflow: hidden;
      touch-action: pan-y;
      font-family: var(--ff-main);
      font-size: clamp(12px, 3.2vw, 13.5px);
      background: rgba(var(--rgb-theme),.94);
      border-left: 1px solid rgba(var(--rgb-diff),.04);
      box-shadow: inset 0 1px 0 0 rgba(var(--rgb-theme),.2), inset 0 0 0 1px rgba(var(--rgb-theme),.075);
      backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
      color: var(--txt-color);
    }
    .settings-panel.open { transform: translateY(0); }
    .settings-panel .s {
      display: flex; flex-direction: column; height: 100%; min-height: 0; overflow: hidden;
    }
    .settings-panel .close-panel {
      margin-left: auto; background: none; border: none; color: var(--muted);
      cursor: pointer; font-size: 1.4rem; transition: color 0.2s, transform 0.2s;
      min-width: 44px; min-height: 44px;
    }
    .settings-panel .close-panel:hover { color: var(--txt-heading); transform: rotate(90deg); }

    @media (max-width: 640px) {
      .settings-panel {
        left: 0; right: 0; width: 100%; max-width: 100%;
        height: 72dvh;
        border-left: none; border-top: 1px solid rgba(var(--rgb-diff),.04);
        border-radius: var(--r-lg) var(--r-lg) 0 0;
        padding-bottom: var(--safe-bottom);
      }
    }

    .settings-panel .nb {
      flex: 1 1 auto;
      min-height: 0;
      overflow-y: auto !important;
      overflow-x: hidden;
      -webkit-overflow-scrolling: touch;
      overscroll-behavior: contain;
      touch-action: pan-y;
      scrollbar-width: none;
      -ms-overflow-style: none;
      padding: 5px var(--s-2) calc(var(--r-lg) - 2px + var(--safe-bottom));
    }
    .settings-panel .nb::-webkit-scrollbar { display: none; width: 0; height: 0; }

    /* section bubbles — fabrica-specific grouping */
    .settings-panel .sec {
      border: 1px solid rgba(var(--rgb-diff),.04);
      border-radius: var(--r);
      background: var(--surface);
      margin: 0 0 10px; padding: 6px;
      transition: background 0.45s ease, border-color 0.4s ease;
      box-shadow: inset 0 1px 0 0 rgba(var(--rgb-theme),.2), inset 0 0 0 1px rgba(var(--rgb-theme),.075);
    }
    .settings-panel .sec:has(.col:not(.shut)) {
      background: var(--card);
      border-color: rgba(var(--rgb-diff),.08);
    }

    /* accordion — grid-rows trick (self-contained, não depende de uni.css) */
    .settings-panel .col {
      display: grid; grid-template-rows: 1fr;
      transition: grid-template-rows .4s var(--ease);
    }
    .settings-panel .col.shut { grid-template-rows: 0fr; }
    .settings-panel .inn { overflow: hidden; min-height: 0; }
    .settings-panel .inn > * { min-height: 0; }

    .settings-panel .si input[type=text],
    .settings-panel .si input[type=url] {
      flex: 1; background: var(--surface); color: var(--txt-heading);
      border: 1px solid rgba(var(--rgb-diff),.04); border-radius: var(--r-xs);
      padding: 8px 10px; font-family: var(--ff-mono); font-size: 10px; outline: none;
      min-height: 36px; user-select: text; -webkit-user-select: text;
      box-shadow: inset 0 1px 0 0 rgba(var(--rgb-theme),.2), inset 0 0 0 1px rgba(var(--rgb-theme),.075);
    }

    /* 002.3 — botões NUNCA usam --surface/--card; sempre destacam (ink → accent) */
    .settings-panel .btn-action {
      width: 100%; padding: 10px; margin-top: 6px;
      background: var(--black-1); color: var(--bg);
      border: 1px solid transparent; border-radius: var(--r-xs);
      cursor: pointer; font-family: var(--ff-mono); font-size: 10px;
      text-transform: uppercase; letter-spacing: 0.05em; transition: all 0.2s;
      display: flex; justify-content: center; align-items: center; gap: 6px;
      min-height: 40px; -webkit-tap-highlight-color: transparent;
    }
    .settings-panel .btn-action:hover { background: var(--accent); color: var(--bg); border-color: transparent; }
    .settings-panel .btn-action:active { transform: scale(0.98); }

    .settings-panel .seg button.sel::before { background: var(--accent); }
    .settings-panel .seg button.sel { background: var(--bg); color: var(--txt-heading); }

    .settings-panel textarea.code-in,
    .settings-panel #code-output {
      width: 100%; background: var(--surface); color: var(--txt-heading);
      border: 1px solid rgba(var(--rgb-diff),.04); border-radius: var(--r-xs);
      padding: 8px; font-family: var(--ff-mono); font-size: 10px;
      box-shadow: inset 0 1px 0 0 rgba(var(--rgb-theme),.2), inset 0 0 0 1px rgba(var(--rgb-theme),.075);
    }
    .settings-panel textarea.code-in { resize: vertical; outline: none; user-select: text; -webkit-user-select: text; touch-action: auto; }

    .settings-panel .mini-tog.on { background: var(--gray-20); border-color: rgba(var(--rgb-diff),.08); }
    .settings-panel .mini-tog.on::after { background: var(--bg); }

    .settings-panel .tl-strip {
      display: flex; gap: 6px; overflow-x: auto; padding: 6px 2px;
      touch-action: pan-x; -webkit-overflow-scrolling: touch;
      overscroll-behavior: contain; scrollbar-width: none;
    }
    .settings-panel .tl-strip::-webkit-scrollbar { display: none; }

    .settings-panel .tl-clip .du { color: var(--accent); }
    .settings-panel .tl-progress > div { background: var(--txt-heading); }

    /* ── EFFECTS CHIP BAR — outer shell (transform) + inner track (scroll-x) ── */
    .fx-chips {
      position: fixed; bottom: calc(92px + var(--safe-bottom)); left: 50%;
      transform: translateX(-50%) translateY(16px);
      z-index: 89;
      width: min(calc(100vw - var(--s-3)), 100%);
      max-width: calc(100vw - var(--s-3));
      padding: var(--s-2);
      border-radius: var(--r-pill);
      overflow: hidden;
      opacity: 0; pointer-events: none;
      transition: opacity 0.35s, transform 0.45s var(--ease);
    }
    .fx-chips.on {
      opacity: 1; pointer-events: auto;
      transform: translateX(-50%) translateY(0);
    }
    .fx-chips-track {
      display: flex; flex-wrap: nowrap; align-items: center; gap: 6px;
      width: 100%; min-width: 0;
      overflow-x: auto; overflow-y: hidden;
      -webkit-overflow-scrolling: touch;
      touch-action: pan-x;
      overscroll-behavior-x: contain;
      scrollbar-width: none;
      -ms-overflow-style: none;
    }
    .fx-chips-track::-webkit-scrollbar { display: none; width: 0; height: 0; }
    .fx-chips-track.is-dragging { cursor: grabbing; }
    .fx-chips-track.is-dragging .fx-chip { pointer-events: none; }
    .fx-chip {
      flex: 0 0 auto; min-height: 42px; padding: 10px var(--s-3); border-radius: var(--r-pill);
      border: 1px solid var(--border); background: transparent; color: var(--txt-color);
      font-family: var(--ff-mono); font-size: var(--fs-list-meta); text-transform: uppercase; letter-spacing: 0.05em;
      cursor: pointer; transition: all var(--t-ui); -webkit-tap-highlight-color: transparent;
      touch-action: manipulation;
    }
    .fx-chip:active { transform: scale(0.94); }
    .fx-chip.sel { background: var(--black-1); color: var(--bg); border-color: transparent; }

    /* Floating Toast */
    .toast {
      position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.9);
      background: var(--black-1); color: var(--bg); padding: 12px 24px; max-width: 86vw; text-align: center;
      border-radius: 50px; font-family: var(--ff-mono); font-size: 0.8rem;
      pointer-events: none; opacity: 0; transition: all 0.3s; z-index: 1000;
    }
    .toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }

    /* sheet backdrop */
    .backdrop {
      position: fixed; inset: 0; z-index: 250; background: rgba(var(--rgb-diff), 0.35);
      opacity: 0; pointer-events: none; transition: opacity 0.4s;
    }
    .backdrop.on { opacity: 1; pointer-events: auto; }

    /* ── APP ROOT (hub.js monta tudo aqui dentro) ── */
    #app-3d { position: fixed; inset: 0; }

    /* ── HOLO FAN — moldura circular do ventilador holográfico ── */
    .holo-frame {
      position: fixed; inset: 0; z-index: 82; pointer-events: none;
      display: none; opacity: 0; transition: opacity .4s ease;
    }
    .holo-frame.on { display: block; opacity: 1; }
    .holo-frame .disc {
      position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
      width: 100vmin; height: 100vmin; border-radius: 50%;
      /* corner-shape:round anula o squircle global — o fan É um círculo real.
         border (não outline) segue o raio, então o anel também fica circular. */
      corner-shape: round; -webkit-corner-shape: round;
      box-shadow: 0 0 0 200vmax rgba(var(--rgb-diff), 0.78);
      border: 1.5px dashed rgba(var(--rgb-accent), 0.55);
    }
    .holo-frame .hf-label {
      position: absolute; top: 5%; left: 50%; transform: translateX(-50%);
      font-family: var(--ff-mono); font-size: 9px; letter-spacing: 0.16em;
      text-transform: uppercase; color: rgba(var(--rgb-accent), 0.65);
      text-shadow: 0 0 12px rgba(var(--rgb-accent), 0.4); white-space: nowrap;
    }
    /* cruzeta de centragem sutil */
    .holo-frame .hf-cross { position: absolute; background: rgba(var(--rgb-accent), 0.22); }
    .holo-frame .hf-h { top: 50%; left: 12%; right: 12%; height: 1px; }
    .holo-frame .hf-v { left: 50%; top: 12%; bottom: 12%; width: 1px; }

    /* ── DURAÇÃO CUSTOM (Record Studio) ── */
    .rs-num {
      width: 84px; flex-shrink: 0; min-height: 48px;
      border-radius: 14px; border: 1px solid var(--border);
      background: transparent; color: var(--txt-color); text-align: center;
      font-family: var(--ff-mono); font-size: 0.78rem; letter-spacing: 0.04em;
      outline: none; -moz-appearance: textfield; appearance: textfield;
      transition: all 0.25s;
    }
    .rs-num::-webkit-outer-spin-button,
    .rs-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
    .rs-num:focus { border-color: var(--primary); color: var(--primary); background: rgba(var(--rgb-primary), 0.08); }

    /* ══════════════════════════════════════════════════════════════
       PANEL COMPONENTS — auto-suficiente (a página carrega só tokens+base
       de uni.theme.v2.css, NÃO a biblioteca de componentes uni.css).
       Tudo escopado em .settings-panel p/ vencer o CSS-base do tema.
       ══════════════════════════════════════════════════════════════ */

    /* header */
    .settings-panel .hd {
      display: flex; align-items: center; gap: 9px;
      padding: 20px 20px 12px; flex-shrink: 0;
      border-bottom: 1px solid rgba(var(--rgb-diff), .06);
    }
    .settings-panel .lg {
      width: 24px; height: 24px; border-radius: var(--r-xs, 10px);
      background: var(--accent); display: flex; align-items: center;
      justify-content: center; flex-shrink: 0;
    }
    .settings-panel .lg i { font-size: 13px; color: var(--bg); line-height: 1; }
    .settings-panel .wm { font-size: 16px; font-weight: 600; color: var(--txt-heading); letter-spacing: .01em; }
    .settings-panel .wm b { color: var(--accent); font-weight: 700; }

    /* section header + chevron */
    .settings-panel .sh {
      display: flex; align-items: center; justify-content: space-between; gap: 8px;
      padding: 13px 12px; cursor: pointer; user-select: none;
      border-radius: var(--r-xs, 10px); -webkit-tap-highlight-color: transparent;
    }
    .settings-panel .sh:active { opacity: .7; }
    .settings-panel .slbl {
      font-family: var(--ff-mono); font-size: 9.5px; font-weight: 500;
      letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
      transition: color .3s ease;
    }
    .settings-panel .sec:has(.col:not(.shut)) .slbl,
    .settings-panel .sh:hover .slbl { color: var(--txt-heading); }
    .settings-panel .tog {
      font-size: 14px; color: var(--muted); flex-shrink: 0; pointer-events: none;
      transition: transform .38s var(--ease);
    }
    .settings-panel .sh.shut .tog { transform: rotate(-90deg); }

    /* control row */
    .settings-panel .si {
      display: flex; align-items: center; justify-content: space-between; gap: 10px;
      padding: 11px 12px; min-height: 42px; border-radius: var(--r-xs, 10px);
      font-size: 13px; color: var(--txt-color); transition: background .3s, color .3s;
    }
    .settings-panel .si:hover { background: rgba(var(--rgb-diff), .03); color: var(--txt-heading); }
    .settings-panel .sn {
      flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between;
      gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .settings-panel .sn > span { color: var(--accent); font-family: var(--ff-mono); font-size: 10px; }

    /* select + color */
    .settings-panel .si select {
      background: transparent; color: var(--txt-heading); border: none; outline: none;
      text-align: right; font-family: var(--ff-mono); font-size: 11px; cursor: pointer;
      max-width: 58%; min-height: 30px;
    }
    .settings-panel .si select option { background: var(--bg); color: var(--txt-heading); }
    .settings-panel .si input[type=color] {
      width: 26px; height: 26px; padding: 0; border: none; background: transparent;
      border-radius: 50%; overflow: hidden; cursor: pointer; flex-shrink: 0;
    }
    .settings-panel .si input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
    .settings-panel .si input[type=color]::-webkit-color-swatch { border: 1px solid rgba(var(--rgb-diff), .15); border-radius: 50%; }

    /* ── COMPACT RANGE (003) — anula o cap 58×44 do fader do tema.
       Cap fino cor-de-destaque: altura ~ fonte do texto, largura ~ 1/3. ── */
    .settings-panel input[type=range] {
      -webkit-appearance: none; appearance: none;
      width: 108px; height: 4px; flex: 0 0 auto;
      background: transparent; cursor: pointer; outline: none; margin: 0; padding: 0;
    }
    .settings-panel input[type=range]::-webkit-slider-runnable-track {
      height: 4px; border-radius: 2px; background: rgba(var(--rgb-diff), .14);
    }
    .settings-panel input[type=range]::-moz-range-track {
      height: 4px; border-radius: 2px; background: rgba(var(--rgb-diff), .14); border: none;
    }
    .settings-panel input[type=range]::-webkit-slider-thumb {
      -webkit-appearance: none; appearance: none;
      width: 7px; height: 18px; margin-top: -7px;
      border: none; border-radius: 3px; corner-shape: round;
      background: var(--accent); box-shadow: 0 1px 3px rgba(var(--rgb-diff), .35);
      transition: transform .15s var(--ease), filter .15s;
    }
    .settings-panel input[type=range]::-moz-range-thumb {
      width: 7px; height: 18px; border: none; border-radius: 3px;
      background: var(--accent); box-shadow: 0 1px 3px rgba(var(--rgb-diff), .35);
    }
    .settings-panel input[type=range]:hover::-webkit-slider-thumb { transform: scaleY(1.12); filter: brightness(1.08); }
    .settings-panel input[type=range]:active::-webkit-slider-thumb { transform: scaleY(1.22); }

    /* segmented buttons (bg modes) */
    .settings-panel .seg { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 8px 8px; }
    .settings-panel .seg button {
      flex: 1 0 calc(33% - 6px); min-height: 42px; padding: 9px 6px;
      border-radius: var(--r-xs, 10px); border: 1px solid transparent; background: transparent;
      color: var(--muted); cursor: pointer; font-family: var(--ff-mono); font-size: 9.5px;
      text-transform: uppercase; letter-spacing: .04em; display: flex; align-items: center;
      justify-content: center; gap: 5px; transition: all .3s var(--ease);
      position: relative; overflow: hidden; -webkit-tap-highlight-color: transparent;
    }
    .settings-panel .seg button:hover:not(.sel) { color: var(--txt-color); background: rgba(var(--rgb-diff), .03); }
    .settings-panel .seg button:active { transform: scale(.96); }
    .settings-panel .seg button.sel { background: rgba(var(--rgb-accent), .12); color: var(--txt-heading); border-color: rgba(var(--rgb-accent), .35); }
    .settings-panel .seg button.sel::before {
      content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
      width: 3px; height: 14px; background: var(--accent); border-radius: 0 3px 3px 0;
    }

    /* mini toggle */
    .settings-panel .mini-tog {
      width: 38px; height: 22px; border-radius: 100px; flex-shrink: 0; cursor: pointer;
      position: relative; border: 1px solid rgba(var(--rgb-diff), .12);
      background: rgba(var(--rgb-diff), .05); transition: background .25s, border-color .25s;
      -webkit-tap-highlight-color: transparent;
    }
    .settings-panel .mini-tog::after {
      content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px;
      border-radius: 50%; background: var(--muted);
      transition: transform .25s var(--ease), background .25s;
    }
    .settings-panel .mini-tog.on { background: rgba(var(--rgb-accent), .16); border-color: var(--accent); }
    .settings-panel .mini-tog.on::after { transform: translateX(16px); background: var(--accent); }

    /* timeline clips */
    .settings-panel .tl-wrap { padding: 4px 8px 8px; }
    .settings-panel .tl-clip {
      flex-shrink: 0; display: flex; flex-direction: column; gap: 2px;
      align-items: center; justify-content: center; min-width: 62px; padding: 8px 10px;
      border-radius: var(--r-xs, 10px); border: 1px solid rgba(var(--rgb-diff), .12);
      background: transparent; cursor: pointer; position: relative;
    }
    .settings-panel .tl-clip.playing { border-color: var(--accent); background: rgba(var(--rgb-accent), .14); }
    .settings-panel .tl-clip .ty { font-family: var(--ff-mono); font-size: 9px; text-transform: uppercase; letter-spacing: .06em; color: var(--txt-heading); }
    .settings-panel .tl-clip .rm {
      position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border-radius: 50%;
      background: var(--bg); border: 1px solid rgba(var(--rgb-diff), .15); color: var(--muted);
      font-size: 10px; line-height: 1; display: flex; align-items: center; justify-content: center;
    }
    .settings-panel .tl-clip .rm:hover { color: var(--accent-sunset-red); border-color: var(--accent-sunset-red); }
    .settings-panel .tl-progress { height: 3px; border-radius: 3px; background: rgba(var(--rgb-diff), .12); margin-top: 8px; overflow: hidden; }

    /* ── EFFECT SECTION (001) — controles do efeito ativo, fixa no topo,
       titulada com o NOME do efeito, destacada em accent ── */
    .settings-panel .effect-sec {
      border-color: rgba(var(--rgb-accent), .35);
      background: rgba(var(--rgb-accent), .05);
    }
    .settings-panel .effect-sec .slbl { color: var(--accent); font-size: 11px; display: flex; align-items: center; gap: 6px; }
    .settings-panel .effect-sec .slbl b { font-weight: 700; letter-spacing: .1em; }
    .settings-panel .effect-sec .slbl i,
    .settings-panel .effect-sec .tog { color: var(--accent); }
    .settings-panel .effect-sec.pulse { animation: effectPulse 1s var(--ease); }
    @keyframes effectPulse {
      0% { box-shadow: 0 0 0 0 rgba(var(--rgb-accent), .5); }
      100% { box-shadow: 0 0 0 16px rgba(var(--rgb-accent), 0); }
    }
    .settings-panel .effect-note .sn { color: var(--muted); font-style: italic; font-size: 12px; white-space: normal; }

    /* ── ICON FALLBACK (001) — garante glyphs ri-* em qualquer origem.
       Se o runtime Apollo injetar um <svg>, o glyph de fonte se esconde. ── */
    i[class*="ri-"] { font-style: normal; }
    i[class*="ri-"]:has(svg)::before { content: none !important; }