:root {
      --bg-void: #03060E;
      --bg-glass: rgba(11, 18, 36, 0.62);
      --bg-glass-strong: rgba(13, 22, 44, 0.84);
      --bg-pill: rgba(255, 255, 255, 0.05);
      --bg-pill-hover: rgba(147, 197, 253, 0.12);
      --rim-light: inset 0 1px 0 rgba(191, 219, 254, 0.15);
      --rim-soft: inset 0 1px 0 rgba(255, 255, 255, 0.08);
      --text-primary: #F8FAFC;
      --text-secondary: #A6B8D6;
      --text-muted: #64799B;
      --sapphire: #2563EB;
      --sapphire-glow: #3B82F6;
      --ice: #93C5FD;
      --amber: #FBBF24;
      --emerald: #34D399;
      --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
      --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
      --font-mono: 'JetBrains Mono', monospace;
    }

    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    html, body {
      height: 100vh;
      width: 100vw;
      margin: 0;
      padding: 0;
      background: var(--bg-void);
      color: var(--text-primary);
      font-family: var(--font-sans);
      overflow: hidden;
      -webkit-font-smoothing: antialiased;
      display: flex;
      flex-direction: column;
    }

    body::before {
      content: "";
      position: fixed;
      inset: 0;
      background:
        radial-gradient(ellipse 65% 40% at 50% -10%, rgba(59, 130, 246, 0.24), transparent 70%),
        radial-gradient(ellipse 45% 45% at 12% 85%, rgba(29, 78, 216, 0.16), transparent 70%),
        radial-gradient(ellipse 40% 40% at 88% 80%, rgba(96, 165, 250, 0.12), transparent 70%);
      pointer-events: none;
      z-index: 0;
    }

    body::after {
      display: none;
    }

    .topbar {
      position: relative;
      z-index: 50;
      height: 48px;
      min-height: 48px;
      flex-shrink: 0;
      padding: 0 12px 0 16px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      background: rgba(13, 17, 25, 0.96);
      box-shadow: 0 1px 0 rgba(147, 197, 253, 0.08);
      user-select: none;
      -webkit-app-region: drag;
    }

    .topbar-left, .topbar-center, .topbar-right {
      display: flex;
      align-items: center;
      gap: 5px;
      -webkit-app-region: no-drag;
    }

    .icon-btn, .btn-ice, .segmented, .pending-pill, .win-btn {
      -webkit-app-region: no-drag;
    }

    .window-controls-divider {
      width: 1px;
      height: 20px;
      background: rgba(255, 255, 255, 0.12);
      margin: 0 6px 0 4px;
    }

    .window-controls {
      display: flex;
      align-items: center;
      gap: 2px;
      -webkit-app-region: no-drag;
    }

    .win-btn {
      width: 32px;
      height: 32px;
      border-radius: 8px;
      border: none;
      background: transparent;
      color: var(--text-secondary);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease;
    }

    .win-btn:hover {
      background: rgba(255, 255, 255, 0.1);
      color: #FFFFFF;
    }

    .win-btn:active {
      transform: scale(0.92);
    }

    .win-btn-close:hover {
      background: #EF4444 !important;
      color: #FFFFFF !important;
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 9px;
      font-weight: 800;
      font-size: 0.9rem;
      letter-spacing: -0.025em;
      padding-right: 10px;
    }

    .brand-orb {
      width: 22px;
      height: 22px;
      border-radius: 50%;
      background: radial-gradient(circle at 35% 35%, #E0F2FE 0%, #3B82F6 55%, #1E3A8A 100%);
      box-shadow: 0 0 16px rgba(59, 130, 246, 0.7);
      display: grid;
      place-items: center;
    }

    .brand-orb::after {
      content: "";
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: #03060E;
    }

    .status-chip {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      height: 26px;
      padding: 0 10px;
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.04);
      font-size: 0.7rem;
      font-weight: 600;
      color: var(--text-secondary);
      transition: background 0.25s, color 0.25s;
    }

    .status-dot {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: var(--emerald);
      box-shadow: 0 0 8px var(--emerald);
    }

    .status-chip.is-pulsing {
      background: rgba(59, 130, 246, 0.22);
      color: #DBEAFE;
    }

    .icon-btn {
      height: 34px;
      min-width: 34px;
      padding: 0 9px;
      border-radius: 999px;
      border: none;
      background: transparent;
      color: var(--text-secondary);
      font-family: var(--font-sans);
      font-size: 0.75rem;
      font-weight: 600;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      cursor: pointer;
      transition: background 0.2s var(--ease-expo), color 0.2s, transform 0.2s var(--ease-expo), box-shadow 0.2s;
    }

    .icon-btn:hover { background: var(--bg-pill-hover); color: var(--text-primary); }
    .icon-btn:active { transform: scale(0.95); }

    .icon-btn.is-active {
      background: linear-gradient(135deg, rgba(37, 99, 235, 0.35), rgba(59, 130, 246, 0.2));
      color: #E0F2FE;
      box-shadow: inset 0 1px 0 rgba(191, 219, 254, 0.3), 0 0 16px rgba(37, 99, 235, 0.3);
    }

    .icon-btn.is-connected {
      background: rgba(52, 211, 153, 0.14);
      color: #6EE7B7;
      box-shadow: inset 0 1px 0 rgba(110, 231, 183, 0.3);
    }

    .icon-btn.is-saving {
      pointer-events: none;
      animation: pulseSaving 1s infinite alternate;
      color: #93C5FD;
    }
    @keyframes pulseSaving {
      from { transform: scale(0.96); opacity: 0.7; }
      to { transform: scale(1.04); opacity: 1; filter: drop-shadow(0 0 6px #3B82F6); }
    }

    .icon-btn:disabled { opacity: 0.28; pointer-events: none; }

    .segmented {
      display: inline-flex;
      align-items: center;
      background: rgba(255, 255, 255, 0.04);
      box-shadow: var(--rim-soft);
      border-radius: 999px;
      padding: 3px;
      gap: 2px;
    }

    .segmented .icon-btn { height: 28px; min-width: 30px; padding: 0 9px; }

    .viewport-badge {
      font-family: var(--font-mono);
      font-size: 0.68rem;
      color: var(--text-muted);
      padding: 0 4px;
      white-space: nowrap;
    }

    .pending-pill {
      height: 30px;
      padding: 0 11px;
      border-radius: 999px;
      border: none;
      background: rgba(251, 191, 36, 0.14);
      box-shadow: inset 0 1px 0 rgba(253, 224, 71, 0.28);
      color: #FDE68A;
      font-family: var(--font-sans);
      font-size: 0.72rem;
      font-weight: 700;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      cursor: pointer;
      transition: transform 0.2s var(--ease-expo), background 0.2s;
    }

    .pending-pill:hover { background: rgba(251, 191, 36, 0.22); transform: translateY(-1px); }
    .pending-pill.is-clear {
      background: rgba(52, 211, 153, 0.12);
      box-shadow: inset 0 1px 0 rgba(110, 231, 183, 0.24);
      color: #6EE7B7;
    }
    .pending-pill.is-hidden { display: none; }

    .btn-ice {
      height: 36px;
      padding: 0 16px;
      border-radius: 999px;
      border: none;
      background: #F8FAFC;
      color: #03060E;
      font-family: var(--font-sans);
      font-size: 0.78rem;
      font-weight: 700;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 7px;
      cursor: pointer;
      box-shadow: 0 8px 24px -6px rgba(147, 197, 253, 0.45);
      transition: transform 0.25s var(--ease-expo), box-shadow 0.25s, background 0.2s;
    }

    .btn-ice:hover {
      background: #FFFFFF;
      transform: translateY(-1px);
      box-shadow: 0 12px 30px -4px rgba(147, 197, 253, 0.65);
    }
    .btn-ice:active { transform: scale(0.97); }

    .btn-sapphire {
      height: 36px;
      padding: 0 15px;
      border-radius: 999px;
      border: none;
      background: linear-gradient(135deg, #1D4ED8 0%, #3B82F6 100%);
      color: #FFFFFF;
      font-family: var(--font-sans);
      font-size: 0.78rem;
      font-weight: 700;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 7px;
      cursor: pointer;
      box-shadow: 0 10px 26px -6px rgba(37, 99, 235, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.28);
      transition: transform 0.25s var(--ease-expo), box-shadow 0.25s, filter 0.2s;
    }

    .btn-sapphire:hover { transform: translateY(-1px); filter: brightness(1.08); }
    .btn-sapphire:active { transform: scale(0.97); }

    .btn-glass {
      height: 34px;
      padding: 0 13px;
      border-radius: 999px;
      border: none;
      background: var(--bg-pill);
      box-shadow: var(--rim-soft);
      color: var(--text-primary);
      font-family: var(--font-sans);
      font-size: 0.76rem;
      font-weight: 600;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      cursor: pointer;
      transition: background 0.2s, transform 0.2s var(--ease-expo);
    }

    .btn-glass:hover { background: var(--bg-pill-hover); }
    .btn-glass:active { transform: scale(0.97); }

    .workspace {
      position: relative;
      z-index: 5;
      flex: 1;
      min-height: 0;
      height: 100%;
      display: flex;
      padding: 8px 12px 12px;
      gap: 12px;
      overflow: hidden;
    }

    #view-editor {
      flex: 1;
      min-height: 0;
      height: calc(100vh - 54px);
      max-height: calc(100vh - 54px);
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }

    #view-editor .workspace {
      flex: 1;
      min-height: 0;
      height: 100%;
      display: flex;
      padding: 8px 12px 12px;
      gap: 12px;
      overflow: hidden;
    }

    #view-editor .sidebar {
      height: 100%;
      max-height: 100%;
    }

    #view-editor .stage {
      flex: 1;
      min-height: 0;
      height: 100%;
      max-height: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
      overflow: hidden;
    }

    #view-editor .topbar .brand,
    #view-editor .topbar .window-controls,
    #view-editor .topbar .window-controls-divider {
      display: none !important;
    }

    #view-editor .topbar {
      height: 42px;
      min-height: 42px;
      background: rgba(5, 10, 22, 0.75);
    }

    #view-editor .projects-bar {
      min-height: 34px;
    }

    .sidebar {
      width: 344px;
      min-width: 344px;
      border-radius: 22px;
      background: rgba(13, 17, 25, 0.96);
      box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), var(--rim-light);
      display: flex;
      flex-direction: column;
      position: relative;
      z-index: 10;
      transition: margin-left 0.35s var(--ease-expo), opacity 0.25s;
    }

    .sidebar.is-collapsed { margin-left: -356px; opacity: 0.3; }

    .sidebar-handle {
      position: absolute;
      top: 50%;
      right: -18px;
      transform: translateY(-50%);
      width: 18px;
      height: 56px;
      border-radius: 0 12px 12px 0;
      border: none;
      background: rgba(15, 26, 52, 0.85);
      box-shadow: var(--rim-soft), 4px 0 16px rgba(0, 0, 0, 0.4);
      color: var(--text-secondary);
      display: grid;
      place-items: center;
      cursor: pointer;
      z-index: 20;
      transition: color 0.2s, background 0.2s;
    }

    .sidebar-handle:hover { background: rgba(37, 99, 235, 0.45); color: #FFF; }
    .sidebar.is-collapsed .sidebar-handle svg { transform: rotate(180deg); }

    .tabs {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      margin: 12px 12px 4px;
      padding: 4px;
      border-radius: 999px;
      background: rgba(3, 6, 14, 0.55);
      box-shadow: var(--rim-soft);
      gap: 4px;
    }

    .tab-btn {
      background: transparent;
      border: none;
      border-radius: 999px;
      color: var(--text-muted);
      font-family: var(--font-sans);
      font-size: 0.70rem;
      font-weight: 700;
      padding: 7px 3px;
      cursor: pointer;
      transition: background 0.25s var(--ease-expo), color 0.2s, box-shadow 0.25s;
    }

    .tab-btn:hover { color: var(--text-secondary); }
    .tab-btn.is-active {
      background: rgba(59, 130, 246, 0.22);
      color: #F8FAFC;
      box-shadow: inset 0 1px 0 rgba(191, 219, 254, 0.26);
    }

    .tab-panel {
      display: none;
      flex: 1;
      flex-direction: column;
      padding: 12px;
      gap: 12px;
      overflow-y: auto;
    }

    .tab-panel.is-active { display: flex; animation: panelFade 0.25s var(--ease-expo); }
    @keyframes panelFade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

    .label-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      font-size: 0.72rem;
      font-weight: 700;
      color: var(--text-secondary);
    }

    .paste-hero-card {
      position: relative;
      overflow: hidden;
      border-radius: 18px;
      padding: 18px 16px;
      background:
        radial-gradient(ellipse 90% 70% at 50% 0%, rgba(59, 130, 246, 0.28), transparent 72%),
        rgba(7, 13, 28, 0.75);
      box-shadow: var(--rim-light), 0 16px 36px -14px rgba(0, 0, 0, 0.6);
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      gap: 10px;
    }

    .paste-icon-glow {
      width: 44px;
      height: 44px;
      border-radius: 14px;
      background: linear-gradient(145deg, rgba(59, 130, 246, 0.3), rgba(15, 29, 64, 0.8));
      box-shadow: inset 0 1px 0 rgba(191, 219, 254, 0.4), 0 0 24px rgba(59, 130, 246, 0.35);
      display: grid;
      place-items: center;
      color: #DBEAFE;
    }

    .paste-hero-card h3 { font-size: 0.88rem; font-weight: 800; letter-spacing: -0.02em; }
    .paste-hero-card p { font-size: 0.72rem; color: var(--text-secondary); line-height: 1.45; }

    .kbd-hint {
      font-family: var(--font-mono);
      font-size: 0.66rem;
      color: var(--ice);
      background: rgba(59, 130, 246, 0.14);
      padding: 3px 8px;
      border-radius: 999px;
    }

    .manual-toggle {
      background: none; border: none; color: var(--text-muted);
      font-family: var(--font-sans); font-size: 0.7rem; font-weight: 600; cursor: pointer;
    }
    .manual-toggle:hover { color: var(--ice); }

    .manual-drawer { display: none; flex-direction: column; gap: 8px; }
    .manual-drawer.is-open { display: flex; }

    .history-box { flex: 1; min-height: 160px; display: flex; flex-direction: column; gap: 8px; }
    .history-meta-pill {
      font-family: var(--font-mono); font-size: 0.65rem; color: var(--text-muted);
      background: rgba(255, 255, 255, 0.04); padding: 2px 8px; border-radius: 999px;
    }
    .history-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding-right: 2px; }

    .history-item {
      display: flex; align-items: center; justify-content: space-between; gap: 8px;
      padding: 9px 11px; border-radius: 12px;
      background: rgba(255, 255, 255, 0.03); box-shadow: var(--rim-soft);
      cursor: pointer; text-align: left; border: none; color: var(--text-primary);
      font-family: var(--font-sans); transition: background 0.2s, transform 0.2s var(--ease-expo);
    }
    .history-item:hover { background: rgba(147, 197, 253, 0.1); transform: translateX(2px); }
    .history-item.is-current { background: rgba(37, 99, 235, 0.2); box-shadow: inset 0 1px 0 rgba(191, 219, 254, 0.3); }
    .history-item-title { font-size: 0.74rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .history-item-time { font-family: var(--font-mono); font-size: 0.64rem; color: var(--text-muted); flex-shrink: 0; }

    .code-area {
      width: 100%; min-height: 110px; resize: none;
      background: rgba(3, 6, 14, 0.65); border: none;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), inset 0 0 0 1px rgba(148, 163, 184, 0.1);
      border-radius: 14px; padding: 11px 12px; color: #E2E8F0;
      font-family: var(--font-mono); font-size: 0.72rem; line-height: 1.5; outline: none;
    }
    .code-area:focus { box-shadow: inset 0 0 0 1.5px rgba(96, 165, 250, 0.6); }

    .field-input {
      width: 100%; height: 36px; background: rgba(3, 6, 14, 0.65); border: none;
      box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.12); border-radius: 11px;
      padding: 0 12px; color: var(--text-primary); font-family: var(--font-sans); font-size: 0.76rem; outline: none;
    }
    .field-input:focus { box-shadow: inset 0 0 0 1.5px rgba(96, 165, 250, 0.6); }

    .config-card {
      background: rgba(3, 6, 14, 0.45); box-shadow: var(--rim-soft);
      border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 7px;
    }
    .config-card.is-pending { background: rgba(251, 191, 36, 0.06); box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.35); }

    .status-tag {
      font-size: 0.64rem; font-weight: 700; padding: 2px 8px; border-radius: 999px;
      background: rgba(255, 255, 255, 0.06); color: var(--text-secondary);
    }
    .status-tag.pending { background: rgba(251, 191, 36, 0.16); color: #FDE68A; }
    .status-tag.ok { background: rgba(52, 211, 153, 0.16); color: #6EE7B7; }

    .dropzone {
      border-radius: 16px; padding: 18px 14px; text-align: center;
      background: radial-gradient(ellipse 80% 70% at 50% 0%, rgba(59, 130, 246, 0.14), rgba(3, 6, 14, 0.55));
      box-shadow: inset 0 0 0 1px rgba(147, 197, 253, 0.2); cursor: pointer;
      transition: transform 0.2s var(--ease-expo), box-shadow 0.2s;
    }
    .dropzone:hover, .dropzone.is-dragover {
      transform: translateY(-1px);
      box-shadow: inset 0 0 0 1.5px rgba(96, 165, 250, 0.65), 0 0 24px rgba(37, 99, 235, 0.25);
    }
    .dropzone p { font-size: 0.78rem; font-weight: 700; }
    .dropzone span { display: block; margin-top: 3px; font-size: 0.69rem; color: var(--text-muted); }

    .asset-list { display: flex; flex-direction: column; gap: 8px; }
    .asset-item {
      display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 9px;
      padding: 8px; border-radius: 14px; background: rgba(3, 6, 14, 0.5); box-shadow: var(--rim-soft);
    }
    .asset-item.is-picking { box-shadow: inset 0 0 0 1.5px var(--sapphire-glow), 0 0 20px rgba(59, 130, 246, 0.3); }
    .asset-thumb {
      width: 42px; height: 42px; border-radius: 10px;
      background: repeating-conic-gradient(#1E293B 0% 25%, #0F172A 0% 50%) 50% / 10px 10px;
      object-fit: contain;
    }
    .asset-meta { min-width: 0; }
    .asset-name { font-size: 0.75rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .asset-path { font-family: var(--font-mono); font-size: 0.62rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
    .asset-actions { display: flex; gap: 2px; }

    .stage {
      flex: 1; border-radius: 22px;
      background: radial-gradient(rgba(147, 197, 253, 0.12) 1px, transparent 1px), rgba(5, 9, 20, 0.55);
      background-size: 24px 24px;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
      display: flex; align-items: center; justify-content: center; padding: 14px; position: relative; overflow: hidden;
    }

    /* Textura ruídica posicionada ATRÁS do canvas no palco do estúdio */
    .stage::before {
      content: "";
      position: absolute;
      inset: 0;
      opacity: 0.045;
      pointer-events: none;
      z-index: 0;
      background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    }

    .stage-banner {
      display: none; position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 30;
      background: linear-gradient(135deg, #1D4ED8, #3B82F6); color: #FFFFFF;
      padding: 8px 16px; border-radius: 999px; font-size: 0.76rem; font-weight: 700;
      align-items: center; gap: 10px; box-shadow: 0 14px 36px rgba(37, 99, 235, 0.55);
    }
    .stage-banner.is-visible { display: inline-flex; animation: popIn 0.25s var(--ease-expo); }
    .stage-banner button {
      background: rgba(0, 0, 0, 0.3); border: none; color: #FFF;
      border-radius: 999px; padding: 3px 10px; font-size: 0.7rem; font-weight: 700; cursor: pointer;
    }

    .preview-frame-wrap {
      position: relative;
      z-index: 2;
      background: #000; border-radius: 16px; overflow: hidden;
      box-shadow: 0 28px 70px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(147, 197, 253, 0.12);
      transform-origin: center center; transition: border-radius 0.3s var(--ease-expo), box-shadow 0.35s var(--ease-expo);
      will-change: transform;
      transform: translateZ(0);
    }
    .preview-frame-wrap.is-updated {
      box-shadow: 0 28px 70px rgba(0, 0, 0, 0.75), 0 0 0 2px #60A5FA, 0 0 42px rgba(59, 130, 246, 0.55);
    }
    .preview-frame-wrap.is-mobile { border-radius: 32px; box-shadow: 0 28px 70px rgba(0, 0, 0, 0.8), 0 0 0 6px #172033; }
    .preview-frame-wrap.is-tablet { border-radius: 24px; box-shadow: 0 28px 70px rgba(0, 0, 0, 0.8), 0 0 0 5px #172033; }

    iframe#previewFrame {
      position: relative;
      z-index: 2;
      width: 100%; height: 100%; border: none; background: #040814; display: block;
    }

    .area-popover {
      display: none; position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
      width: min(500px, calc(100% - 32px)); background: rgba(13, 17, 25, 0.96);
      border-radius: 20px; padding: 16px;
      box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(191, 219, 254, 0.25), 0 0 0 1px rgba(96, 165, 250, 0.35);
      z-index: 40; flex-direction: column; gap: 10px;
    }
    .area-popover.is-open { display: flex; animation: popIn 0.25s var(--ease-expo); }
    .area-selector-tag {
      font-family: var(--font-mono); font-size: 0.68rem; color: #BFDBFE;
      background: rgba(59, 130, 246, 0.18); padding: 3px 9px; border-radius: 999px;
      max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }

    .wizard-backdrop {
      position: fixed; inset: 0; background: rgba(2, 5, 12, 0.88);
      display: none; align-items: center; justify-content: center; padding: 20px; z-index: 120;
    }
    .wizard-backdrop.is-open { display: flex; }

    .wizard-card {
      position: relative; overflow: hidden; width: min(580px, 100%);
      background:
        radial-gradient(ellipse 95% 48% at 50% -8%, rgba(147, 197, 253, 0.25) 0%, rgba(37, 99, 235, 0.12) 40%, transparent 75%),
        rgba(9, 15, 31, 0.96);
      border-radius: 26px;
      box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(219, 234, 254, 0.26);
      display: flex; flex-direction: column; animation: popIn 0.35s var(--ease-expo);
    }

    @keyframes popIn { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

    .wizard-top { padding: 18px 22px 12px; display: flex; align-items: center; justify-content: space-between; }
    .wizard-step-label {
      font-size: 0.7rem; font-weight: 700; color: #BFDBFE; background: rgba(59, 130, 246, 0.18);
      box-shadow: inset 0 1px 0 rgba(191, 219, 254, 0.24); padding: 4px 11px; border-radius: 999px;
      letter-spacing: 0.04em; text-transform: uppercase;
    }
    .wizard-body { padding: 12px 22px 22px; display: flex; flex-direction: column; gap: 16px; }
    .wizard-title { font-size: 1.32rem; font-weight: 800; letter-spacing: -0.03em; }
    .wizard-sub { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.5; margin-top: -8px; }

    .choice-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
    .choice-grid-3 { display: grid; grid-template-columns: 1fr; gap: 10px; }

    .choice-card {
      background: rgba(255, 255, 255, 0.035); border: none;
      box-shadow: var(--rim-soft), 0 14px 30px -14px rgba(0, 0, 0, 0.65);
      border-radius: 18px; padding: 18px 16px; text-align: left; cursor: pointer;
      transition: transform 0.25s var(--ease-expo), background 0.25s, box-shadow 0.25s;
    }
    .choice-card:hover {
      background: rgba(147, 197, 253, 0.09); transform: translateY(-2px);
      box-shadow: inset 0 1px 0 rgba(191, 219, 254, 0.28), 0 18px 38px -12px rgba(37, 99, 235, 0.3);
    }
    .choice-card.is-selected {
      background: linear-gradient(145deg, rgba(37, 99, 235, 0.28), rgba(15, 29, 64, 0.65));
      box-shadow: inset 0 1px 0 rgba(191, 219, 254, 0.45), 0 0 28px rgba(37, 99, 235, 0.35);
    }
    .choice-card strong { display: block; font-size: 0.92rem; color: #F8FAFC; }
    .choice-card span { display: block; font-size: 0.74rem; color: var(--text-secondary); margin-top: 5px; line-height: 1.45; }

    .check-list { display: flex; flex-direction: column; gap: 8px; }
    .check-item {
      display: flex; align-items: flex-start; gap: 11px; padding: 12px 14px;
      background: rgba(255, 255, 255, 0.03); box-shadow: var(--rim-soft); border-radius: 14px; cursor: pointer;
    }
    .check-item:hover { background: rgba(147, 197, 253, 0.07); }
    .check-item input { margin-top: 2px; accent-color: var(--sapphire-glow); width: 16px; height: 16px; }
    .check-item strong { display: block; font-size: 0.8rem; color: #F8FAFC; }
    .check-item span { display: block; font-size: 0.71rem; color: var(--text-muted); margin-top: 2px; }

    .wizard-footer { padding: 14px 22px 18px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
    .link-discrete { background: none; border: none; color: var(--text-secondary); font-family: var(--font-sans); font-size: 0.75rem; font-weight: 600; cursor: pointer; }
    .link-discrete:hover { color: #FFF; text-decoration: underline; }

    .hover-card {
      position: fixed; z-index: 9999; max-width: 245px;
      background: rgba(13, 17, 25, 0.96);
      box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(191, 219, 254, 0.24);
      border-radius: 12px; padding: 9px 12px; pointer-events: none;
      opacity: 0; transform: translateY(5px); transition: opacity 0.16s var(--ease-expo), transform 0.16s var(--ease-expo);
    }
    .hover-card.is-visible { opacity: 1; transform: translateY(0); }
    .hover-card strong { display: block; font-size: 0.74rem; color: #F8FAFC; }
    .hover-card span { display: block; font-size: 0.69rem; color: var(--text-secondary); margin-top: 2px; line-height: 1.4; }

    .toast {
      position: fixed; bottom: 20px; right: 20px;
      background: rgba(13, 17, 25, 0.96);
      box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(191, 219, 254, 0.25);
      color: var(--text-primary); padding: 10px 16px; border-radius: 999px;
      font-size: 0.76rem; font-weight: 700; opacity: 0; transform: translateY(10px) scale(0.96);
      pointer-events: none; transition: opacity 0.22s var(--ease-expo), transform 0.22s var(--ease-expo); z-index: 999;
    }
    .toast.is-visible { opacity: 1; transform: translateY(0) scale(1); }
    .toast.is-error { color: #FCA5A5; box-shadow: 0 16px 44px rgba(0, 0, 0, 0.7), inset 0 0 0 1px rgba(239, 68, 68, 0.45); }
    .toast.is-success { color: #6EE7B7; box-shadow: 0 16px 44px rgba(0, 0, 0, 0.7), inset 0 0 0 1px rgba(52, 211, 153, 0.35); }


/* --- Legendario Studio Desktop Enhancements (Tauri v2) --- */
.projects-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(7, 12, 24, 0.75);
  border-bottom: 1px solid rgba(147, 197, 253, 0.1);
  padding: 0 16px;
  height: 36px;
  min-height: 36px;
  flex-shrink: 0;
  gap: 12px;
  user-select: none;
  z-index: 10;
  -webkit-app-region: drag;
}

.projects-bar > * {
  -webkit-app-region: no-drag;
}

.projects-tabs-track {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
}
.projects-tabs-track::-webkit-scrollbar { display: none; }

.project-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 0.74rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.project-tab:hover {
  background: rgba(147, 197, 253, 0.08);
  color: var(--text-primary);
  border-color: rgba(147, 197, 253, 0.22);
}

.project-tab.is-active {
  background: rgba(37, 99, 235, 0.22);
  color: #F8FAFC;
  border-color: rgba(59, 130, 246, 0.55);
  box-shadow: 0 0 14px rgba(37, 99, 235, 0.3);
}

.project-tab .tab-icon {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}

.project-tab.is-active .tab-icon {
  background: var(--emerald);
  box-shadow: 0 0 6px var(--emerald);
}

.projects-bar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.btn-new-project {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(37, 99, 235, 0.16);
  color: var(--ice);
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 6px;
  padding: 5px 11px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-new-project:hover {
  background: rgba(37, 99, 235, 0.32);
  border-color: var(--sapphire-glow);
  color: #fff;
}

.active-project-path {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Modal Novo Projeto */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 6, 14, 0.88);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s var(--ease-expo);
}

.modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--bg-glass-strong);
  border: 1px solid rgba(147, 197, 253, 0.22);
  border-radius: 14px;
  padding: 24px;
  width: 90%;
  max-width: 440px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}

.modal-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* Media Cards / Video Tags / Limits */
.cf-limit-warn {
  font-size: 0.65rem;
  color: #FCA5A5;
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 4px;
  padding: 2px 6px;
  margin-top: 4px;
  display: inline-block;
  font-weight: 600;
}

.asset-thumb-video {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 6px;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.media-tag-kind {
  font-size: 0.62rem;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 3px;
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.08);
  color: var(--ice);
  margin-right: 4px;
}

.media-alert {
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.72rem;
  margin-bottom: 10px;
}
.media-alert.is-warn {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #FCD34D;
}

/* ========================================================
   Vectorizer Studio Workbench — Web3 Elegance (Carbon Blue)
   ======================================================== */
.vectorizer-workbench {
  --v-carbon: #07090D;
  --v-graphite: #0D1119;
  --v-slate: #131926;
  --v-sapphire: #2563EB;
  --v-ice: #7AA2F7;
  --v-ink: #F1F5F9;
  --v-muted: #8B97AD;
  --v-border: rgba(148, 163, 184, 0.14);

  position: relative;
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr) 310px;
  width: 100%;
  height: 100%;
  background: var(--v-carbon);
  color: var(--v-ink);
  overflow: hidden;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}
.vectorizer-workbench *::-webkit-scrollbar { display: none; width: 0; height: 0; }
.vectorizer-workbench * { scrollbar-width: none; }

.vec-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.vec-kicker {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--v-muted);
}
.vec-count-badge, .vec-live-pill {
  font-size: 0.64rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(122, 162, 247, 0.14);
  color: var(--v-ice);
  border: 1px solid rgba(122, 162, 247, 0.25);
}

/* Coluna 1: Fila */
.vectorizer-sidebar-left, .vectorizer-sidebar-right {
  display: flex;
  flex-direction: column;
  padding: 14px;
  gap: 14px;
  background: linear-gradient(180deg, #0C1018 0%, #07090D 100%);
  overflow-y: auto;
}
.vectorizer-sidebar-left { border-right: 1px solid var(--v-border); }
.vectorizer-sidebar-right { border-left: 1px solid var(--v-border); }

.vec-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 16px;
  border: 1px dashed rgba(122, 162, 247, 0.32);
  background: radial-gradient(circle at 50% 0%, rgba(37, 99, 235, 0.14), rgba(19, 25, 38, 0.55));
  padding: 18px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.22s ease;
}
.vec-dropzone:hover, .vec-dropzone.is-dragover {
  border-color: var(--v-ice);
  background: radial-gradient(circle at 50% 0%, rgba(37, 99, 235, 0.26), rgba(19, 25, 38, 0.8));
  transform: translateY(-1px);
}
.vec-drop-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(122, 162, 247, 0.12);
  color: var(--v-ice);
}
.vec-dropzone strong { font-size: 0.78rem; font-weight: 700; color: var(--v-ink); }
.vec-dropzone span { font-size: 0.68rem; color: var(--v-muted); }

.vec-queue-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.vec-queue-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 12px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
  transition: all 0.18s ease;
}
.vec-queue-item:hover { background: rgba(122, 162, 247, 0.06); }
.vec-queue-item.is-active {
  background: rgba(37, 99, 235, 0.14);
  border-color: rgba(122, 162, 247, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.vec-queue-thumb {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--v-border);
  flex-shrink: 0;
}
.vec-queue-meta { min-width: 0; flex: 1; }
.vec-queue-title { font-size: 0.75rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vec-queue-sub { font-size: 0.66rem; color: var(--v-muted); margin-top: 1px; }
.vec-queue-del {
  background: transparent;
  border: none;
  color: var(--v-muted);
  font-size: 0.9rem;
  padding: 2px 6px;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0.55;
}
.vec-queue-del:hover { opacity: 1; color: #F87171; background: rgba(248, 113, 113, 0.12); }

/* Coluna 2: Palco Central */
.vectorizer-stage-center {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--v-carbon);
}
.vec-stage-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--v-border);
  padding: 10px 18px;
  background: rgba(13, 17, 25, 0.96);
}
.vec-file-meta { display: flex; align-items: center; gap: 10px; min-width: 0; }
.vec-status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--v-muted); flex-shrink: 0; }
.vec-status-dot.is-done { background: #34D399; box-shadow: 0 0 10px rgba(52, 211, 153, 0.6); }
.vec-status-dot.is-running { background: var(--v-ice); box-shadow: 0 0 10px var(--v-ice); }
.vec-filename { font-size: 0.78rem; font-weight: 600; color: var(--v-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.vec-swatches { display: flex; align-items: center; gap: 5px; margin-left: 6px; }
.vec-swatch {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: transform 0.15s ease;
}
.vec-swatch:hover { transform: scale(1.2); }

.vec-telemetry { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gpu-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  background: rgba(19, 25, 38, 0.85);
  border: 1px solid rgba(122, 162, 247, 0.16);
  color: #8B97AD;
  white-space: nowrap;
}
.gpu-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #64748B;
}
.gpu-badge--ok {
  border-color: rgba(16, 185, 129, 0.35);
  color: #D1FAE5;
}
.gpu-badge--ok .gpu-dot {
  background: #10B981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.65);
}
.gpu-badge--warn {
  border-color: rgba(245, 158, 11, 0.4);
  color: #FEF3C7;
}
.gpu-badge--warn .gpu-dot {
  background: #F59E0B;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.55);
}
.vec-tel-chip {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--v-muted);
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--v-border);
}

.vec-stage-viewport {
  position: relative;
  flex: 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.vec-stage-viewport.bg-carbon {
  background:
    radial-gradient(circle at 50% 45%, rgba(37, 99, 235, 0.12), transparent 65%),
    radial-gradient(rgba(122, 162, 247, 0.14) 1px, transparent 1px),
    #080B11;
  background-size: 100% 100%, 22px 22px, 100% 100%;
  color: #F1F5F9;
}
.vec-stage-viewport.bg-cream { background: #F1ECE4; color: #181512; }
.vec-stage-viewport.bg-checker {
  background: conic-gradient(#E2E8F0 90deg, #FFFFFF 90deg 180deg, #E2E8F0 180deg 270deg, #FFFFFF 270deg);
  background-size: 20px 20px;
  color: #181512;
}

.vec-empty-state { text-align: center; max-width: 340px; padding: 24px; }
.vec-empty-orb {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 18px;
  background: radial-gradient(circle at 30% 30%, #7AA2F7, #1E3A8A);
  box-shadow: 0 12px 34px rgba(37, 99, 235, 0.35);
}
.vec-empty-state h3 { font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.vec-empty-state p { font-size: 0.78rem; color: var(--v-muted); line-height: 1.5; }
.vec-empty-state kbd { padding: 2px 6px; border-radius: 6px; background: rgba(255,255,255,0.08); border: 1px solid var(--v-border); font-size: 0.7rem; }

/* ====== FIX DEFINITIVO DE ALINHAMENTO 1:1 (GRID 1/1 + ASPECT-RATIO EXATO) ====== */
.vec-stage-canvas {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px 36px 82px;
}
.vec-compare-box {
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(148, 163, 184, 0.18);
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: center center;
}
.vec-compare-img, .vec-compare-svg {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  display: block;
  user-select: none;
  pointer-events: none;
}
.vec-compare-img { object-fit: fill; }
.vec-compare-svg svg {
  display: block;
  width: 100% !important;
  height: 100% !important;
}
.vec-compare-svg.is-wireframe path {
  fill: none !important;
  stroke: #38BDF8 !important;
  stroke-width: 1.5px !important;
  vector-effect: non-scaling-stroke;
}

.vec-split-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--v-ice);
  box-shadow: 0 0 14px rgba(122, 162, 247, 0.9);
  pointer-events: none;
  z-index: 6;
  transform: translateX(-50%);
}
.vec-split-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #0D1119;
  border: 1.5px solid var(--v-ice);
  color: #F1F5F9;
  font-size: 0.78rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}
.vec-corner-tag {
  position: absolute;
  top: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  background: rgba(7, 9, 13, 0.92);
  color: #F1F5F9;
  border: 1px solid rgba(255, 255, 255, 0.14);
  pointer-events: none;
  z-index: 5;
}
.vec-corner-tag--left { left: 10px; }
.vec-corner-tag--right { right: 10px; color: var(--v-ice); }

.vec-slider-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: ew-resize;
  z-index: 10;
}

/* Dock Flutuante Web3 Glass */
.vec-floating-controls {
  position: absolute;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  background: rgba(13, 17, 25, 0.96);
  padding: 6px 12px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  border: 1px solid var(--v-border);
  z-index: 20;
}
.vec-ctrl-group { display: flex; align-items: center; gap: 3px; }
.vec-sep { width: 1px; height: 16px; background: var(--v-border); }
.vec-pill-btn {
  background: transparent;
  border: none;
  color: var(--v-muted);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.vec-pill-btn:hover { color: var(--v-ink); }
.vec-pill-btn.is-active { background: #F1F5F9; color: #07090D; font-weight: 700; }
.vec-pill-btn.is-active-ice { background: rgba(37, 99, 235, 0.28); color: var(--v-ice); border: 1px solid rgba(122, 162, 247, 0.45); }

/* Coluna 3: Presets & Controles */
.vec-section-block { display: flex; flex-direction: column; gap: 10px; }
.vec-preset-stack { display: flex; flex-direction: column; gap: 7px; }
.vec-preset-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  background: rgba(19, 25, 38, 0.6);
  border: 1px solid var(--v-border);
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--v-ink);
  cursor: pointer;
  transition: all 0.18s ease;
}
.vec-preset-btn:hover { border-color: rgba(122, 162, 247, 0.35); background: rgba(19, 25, 38, 0.95); }
.vec-preset-btn.is-active {
  border-color: var(--v-ice);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.22), rgba(19, 25, 38, 0.9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.vec-preset-title { font-size: 0.76rem; font-weight: 700; }
.vec-preset-desc { font-size: 0.66rem; color: var(--v-muted); margin-top: 2px; }

.vec-fine-tuning {
  padding-top: 14px;
  border-top: 1px solid var(--v-border);
}
.vec-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.74rem;
  color: #CBD5E1;
  cursor: pointer;
  padding: 2px 0;
}
.vec-switch { accent-color: var(--v-sapphire); width: 15px; height: 15px; cursor: pointer; }

.vec-slider-field { display: flex; flex-direction: column; gap: 5px; margin-top: 4px; }
.vec-slider-head { display: flex; justify-content: space-between; font-size: 0.7rem; color: var(--v-muted); }
.vec-slider-head strong { color: var(--v-ice); font-weight: 700; }
.vec-range-input { width: 100%; accent-color: var(--v-sapphire); cursor: pointer; }

/* Botões Web3 Elegance */
.vec-export-footer { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--v-border); }
.vec-export-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn-vec-primary {
  width: 100%;
  min-height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(122, 162, 247, 0.45);
  background: linear-gradient(135deg, #2563EB, #1D4ED8);
  color: #FFFFFF;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.3);
  transition: all 0.2s ease;
}
.btn-vec-primary:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.1); }
.btn-vec-primary:disabled { opacity: 0.35; cursor: not-allowed; box-shadow: none; }

.btn-vec-ghost {
  min-height: 36px;
  border-radius: 10px;
  border: 1px solid var(--v-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--v-ink);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-vec-ghost:hover:not(:disabled) { background: rgba(122, 162, 247, 0.12); border-color: rgba(122, 162, 247, 0.4); }
.btn-vec-ghost:disabled { opacity: 0.35; cursor: not-allowed; }

.btn-vec-accent {
  width: 100%;
  min-height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(122, 162, 247, 0.35);
  background: rgba(122, 162, 247, 0.12);
  color: var(--v-ice);
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-vec-accent:hover:not(:disabled) { background: rgba(122, 162, 247, 0.22); }
.btn-vec-accent:disabled { opacity: 0.35; cursor: not-allowed; }

.vec-toast {
  position: absolute;
  top: 56px;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: rgba(13, 17, 25, 0.95);
  color: #F1F5F9;
  border: 1px solid rgba(122, 162, 247, 0.4);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: all 0.22s ease;
  z-index: 40;
}
.vec-toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

.brand-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: block;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 8px rgba(255, 94, 26, 0.4));
}

/* === APPLE MOTION & POLISH SYSTEM === */
:root {
  --ease-apple: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --dur-fast: 180ms;
  --dur-med: 320ms;
  --dur-slow: 520ms;
}

/* Splash Screen de Abertura */
.leg-splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #07090D !important;
  opacity: 1;
  transform: scale(1);
  transition: opacity 420ms var(--ease-apple), transform 480ms var(--ease-apple), filter 420ms var(--ease-apple);
  will-change: opacity, transform;
}

.leg-splash.is-hidden {
  opacity: 0;
  transform: scale(1.035);
  filter: blur(8px);
  pointer-events: none;
}

.leg-splash__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  animation: legSplashIn 520ms var(--ease-apple) both;
}

.leg-splash__logo {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  filter: drop-shadow(0 14px 32px rgba(255, 94, 26, 0.35));
}

.leg-splash__logo svg {
  width: 100%;
  height: 100%;
  display: block;
}

.leg-splash__title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #F1F5F9;
}

.leg-splash__sub {
  font-size: 12px;
  color: #8B97AD;
  letter-spacing: 0.01em;
  margin-top: -8px;
}

.leg-splash__bar {
  width: 164px;
  height: 3px;
  margin-top: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  overflow: hidden;
  position: relative;
}

.leg-splash__bar-fill {
  position: absolute;
  inset: 0;
  width: 42%;
  border-radius: 999px;
  background: linear-gradient(90deg, #FF9A3C, #FF5E1A, #FF9A3C);
  animation: legShimmer 1.15s var(--ease-apple) infinite;
}

/* Suavidade global em botões, cards, painéis e controles */
button,
.btn,
.tab-btn,
.swatch,
.panel,
.card {
  transition:
    transform var(--dur-fast) var(--ease-apple),
    background-color var(--dur-fast) var(--ease-apple),
    border-color var(--dur-fast) var(--ease-apple),
    box-shadow var(--dur-med) var(--ease-apple),
    opacity var(--dur-med) var(--ease-apple);
}

button:active,
.btn:active,
.tab-btn:active {
  transform: scale(0.97);
}

input[type="range"] {
  transition: opacity var(--dur-fast) var(--ease-apple);
}

/* Entrada suave da interface principal */
body.app-ready #app,
body.app-ready main,
body.app-ready .workbench-shell {
  animation: legAppReveal 460ms var(--ease-apple) both;
}

/* Estado de processamento suave (quando vetorizando) */
.is-loading-shimmer {
  position: relative;
  overflow: hidden;
}
.is-loading-shimmer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    transparent 25%,
    rgba(255, 255, 255, 0.05) 50%,
    transparent 75%
  );
  animation: legShimmer 1.2s var(--ease-apple) infinite;
  pointer-events: none;
}

@keyframes legSplashIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes legLogoPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.035); }
}

@keyframes legShimmer {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(260%); }
}

@keyframes legAppReveal {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.992);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
