    /* MODAL: HISTORY DRAWER (Crafted Studio & Antislop compliant) */
    .modal-overlay {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0, 0, 0, 0.78);
      backdrop-filter: blur(8px);
      display: none;
      align-items: center;
      justify-content: center;
      z-index: 99999;
      padding: 16px;
    }

    .modal-card {
      background: var(--bg-surface-elevated);
      border: 1px solid var(--border-strong);
      border-radius: var(--radius-lg);
      width: 660px;
      max-width: 95vw;
      max-height: 84vh;
      display: flex;
      flex-direction: column;
      box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9);
      overflow: hidden;
    }

    .modal-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 16px 20px;
      border-bottom: 1px solid var(--border-subtle);
      background: var(--bg-surface);
      flex-shrink: 0;
    }

    .history-head-left {
      display: flex;
      align-items: center;
      gap: 16px;
      flex-wrap: wrap;
    }

    .history-title {
      font-family: var(--font-ui);
      font-size: 13.5px;
      font-weight: 700;
      letter-spacing: 0.03em;
      color: var(--text-main);
      text-transform: uppercase;
      margin: 0;
    }

    .history-tab-nav {
      display: inline-flex;
      background: var(--bg-input);
      border: 1px solid var(--border-subtle);
      border-radius: var(--radius-sm);
      padding: 2px;
      gap: 2px;
    }

    .history-tab-btn {
      font-family: var(--font-mono);
      font-size: 10.5px;
      font-weight: 600;
      letter-spacing: 0.5px;
      padding: 4px 10px;
      border-radius: var(--radius-sm);
      border: 1px solid transparent;
      background: transparent;
      color: var(--text-muted);
      cursor: pointer;
      transition: all 0.15s ease;
    }

    .history-tab-btn:hover {
      color: var(--text-main);
    }

    .history-tab-btn.active {
      background: rgba(56, 189, 248, 0.12) !important;
      border-color: rgba(56, 189, 248, 0.35) !important;
      color: var(--accent-primary-light) !important;
    }

    .btn-close-modal {
      background: transparent;
      border: none;
      color: var(--text-muted);
      font-size: 18px;
      cursor: pointer;
      padding: 2px 6px;
      line-height: 1;
      transition: color 0.15s ease;
    }

    .btn-close-modal:hover {
      color: #ffffff;
    }

    .modal-body {
      padding: 16px 20px;
      overflow-y: auto;
      max-height: 60vh;
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .modal-body::-webkit-scrollbar {
      width: 6px;
    }

    .modal-body::-webkit-scrollbar-track {
      background: transparent;
    }

    .modal-body::-webkit-scrollbar-thumb {
      background: rgba(148, 163, 184, 0.25);
      border-radius: 9999px;
      transition: background 0.2s ease;
    }

    .modal-body::-webkit-scrollbar-thumb:hover {
      background: rgba(56, 189, 248, 0.55);
    }

    /* History Card Rows (Studio Aligned) */
    .history-item-row {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 12px;
      padding: 12px 14px;
      border: 1px solid var(--border-subtle);
      border-radius: var(--radius-md);
      background: var(--bg-input);
      transition: all 0.15s ease;
    }

    .history-item-row:hover {
      border-color: var(--border-strong);
      background: rgba(255, 255, 255, 0.02);
    }

    .hi-info {
      flex: 1;
      min-width: 0;
    }

    .hi-title {
      font-family: var(--font-mono);
      font-size: 11.5px;
      font-weight: 600;
      color: var(--text-main);
      margin-bottom: 5px;
      line-height: 1.45;
      word-break: break-word;
    }

    .hi-meta {
      font-family: var(--font-mono);
      font-size: 10px;
      color: var(--text-muted);
      display: flex;
      gap: 12px;
      flex-wrap: wrap;
    }

    .hi-meta span {
      display: inline-block;
    }



    .hi-actions {
      display: flex;
      gap: 6px;
      flex-shrink: 0;
      align-items: center;
    }

    .hi-btn {
      padding: 5px 12px;
      font-size: 10.5px;
      font-weight: 600;
      border-radius: var(--radius-sm);
      cursor: pointer;
      font-family: var(--font-mono);
      letter-spacing: 0.5px;
      border: 1px solid var(--border-subtle);
      background: var(--bg-surface-elevated);
      color: var(--text-secondary);
      transition: all 0.15s ease;
      text-decoration: none;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }

    .hi-btn:hover {
      border-color: var(--accent-primary-light);
      color: var(--accent-primary-light);
      background: rgba(56, 189, 248, 0.08);
    }

    .hi-btn-delete:hover {
      border-color: rgba(244, 63, 94, 0.5);
      color: #f43f5e;
      background: rgba(244, 63, 94, 0.08);
    }

    .history-modal-footer {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 14px 20px;
      border-top: 1px solid var(--border-subtle);
      background: var(--bg-surface);
      flex-shrink: 0;
    }

    .btn-history-footer {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 9px 18px;
      border-radius: var(--radius-sm);
      font-family: var(--font-ui);
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.05em;
      text-transform: uppercase;
      cursor: pointer;
      transition: all 0.18s ease;
      user-select: none;
    }

    .btn-history-clear {
      background: var(--bg-surface-elevated);
      border: 1px solid var(--border-subtle);
      color: var(--text-secondary);
    }

    .btn-history-clear:hover {
      border-color: rgba(244, 63, 94, 0.5);
      color: #f43f5e;
      background: rgba(244, 63, 94, 0.08);
    }

    .btn-history-export {
      background: var(--accent-primary);
      border: 1px solid rgba(255, 255, 255, 0.15);
      color: #ffffff;
    }

    .btn-history-export:hover {
      background: var(--accent-primary-hover);
      color: #ffffff;
    }

    .history-footer-right {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }

    .btn-history-import {
      background: rgba(56, 189, 248, 0.1);
      border: 1px solid rgba(56, 189, 248, 0.35);
      color: #38bdf8;
    }

    .btn-history-import:hover {
      background: rgba(56, 189, 248, 0.2);
      border-color: #38bdf8;
      color: #ffffff;
    }

    /* OUTPUT DIRECTORY ROW IN EXPORT MODAL (A1) */
    .output-dir-box {
      display: flex;
      align-items: center;
      gap: 6px;
      background: #060911;
      border: 1px solid #1e293b;
      border-radius: var(--radius-sm);
      padding: 6px 8px;
    }

    .output-dir-path {
      flex: 1;
      min-width: 0;
      font-family: var(--font-mono);
      font-size: 11px;
      color: #cbd5e1;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      padding: 2px 4px;
      user-select: all;
    }

    .output-dir-badge {
      font-family: var(--font-mono);
      font-size: 9.5px;
      font-weight: 600;
      padding: 2px 6px;
      border-radius: 3px;
      background: rgba(148, 163, 184, 0.12);
      color: #94a3b8;
      border: 1px solid rgba(148, 163, 184, 0.22);
      text-transform: none;
      letter-spacing: 0.02em;
    }

    .output-dir-badge.custom {
      background: rgba(34, 197, 94, 0.12);
      color: #4ade80;
      border-color: rgba(34, 197, 94, 0.3);
    }

    .output-dir-btn {
      background: #131c2e;
      border: 1px solid #26354d;
      color: #e2e8f0;
      font-family: var(--font-ui);
      font-size: 11px;
      font-weight: 600;
      padding: 5px 10px;
      border-radius: 3px;
      cursor: pointer;
      white-space: nowrap;
      transition: all 0.15s ease;
    }

    .output-dir-btn:hover:not(:disabled) {
      background: #1e293b;
      border-color: #38bdf8;
      color: #ffffff;
    }

    .output-dir-btn:disabled {
      opacity: 0.4;
      cursor: not-allowed;
    }

    /* MODAL: EXPORT MOTION CONFIG (Studio Refined) */
    .export-modal-card {
      background: #0b0f19;
      border: 1px solid #1e293b;
      border-radius: var(--radius-lg);
      width: 530px;
      max-width: 95vw;
      max-height: 92vh;
      box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85);
      overflow: hidden;
      display: flex;
      flex-direction: column;
    }

    .export-modal-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 16px 22px 14px 22px;
      border-bottom: 1px solid #1e293b;
      background: #070a12;
      flex-shrink: 0;
    }

    .export-modal-title {
      font-family: var(--font-ui);
      font-size: 14.5px;
      font-weight: 700;
      letter-spacing: 0.02em;
      color: #f8fafc;
    }

    .export-modal-body {
      padding: 18px 22px 20px 22px;
      display: flex;
      flex-direction: column;
      gap: 15px;
      overflow-y: auto;
      max-height: calc(92vh - 120px);
    }

    .export-modal-body::-webkit-scrollbar {
      width: 6px;
    }

    .export-modal-body::-webkit-scrollbar-track {
      background: transparent;
    }

    .export-modal-body::-webkit-scrollbar-thumb {
      background: rgba(148, 163, 184, 0.25);
      border-radius: 9999px;
      transition: background 0.2s ease;
    }

    .export-modal-body::-webkit-scrollbar-thumb:hover {
      background: rgba(56, 189, 248, 0.55);
    }

    /* QUICK PRESETS */
    .preset-card-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 8px;
    }

    .preset-chip {
      background: #080c14;
      border: 1px solid #1e293b;
      border-radius: var(--radius-sm);
      padding: 10px 6px;
      text-align: center;
      cursor: pointer;
      transition: all 0.15s ease;
      display: flex;
      flex-direction: column;
      gap: 3px;
      width: 100%;
      font-family: inherit;
      color: inherit;
      appearance: none;
      -webkit-appearance: none;
    }

    .preset-chip:hover {
      border-color: #334155;
      background: #0f172a;
    }

    .preset-chip.active {
      border-color: #475569;
      background: #1a2436;
      box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
    }

    .preset-chip-title {
      font-family: var(--font-ui);
      font-size: 12.5px;
      font-weight: 700;
      color: #e2e8f0;
    }

    .preset-chip.active .preset-chip-title {
      color: #ffffff;
    }

    .preset-chip-desc {
      font-family: var(--font-mono);
      font-size: 9.5px;
      color: #8ca0ba;
      line-height: 1.3;
    }

    .preset-chip.active .preset-chip-desc {
      color: #cbd5e1;
    }

    /* HARDWARE TELEMETRY STRIP */
    .device-rec-box {
      background: rgba(15, 23, 42, 0.65);
      border: 1px solid #1e293b;
      border-radius: var(--radius-sm);
      padding: 8px 12px;
      display: flex;
      align-items: center;
      gap: 8px;
      font-family: var(--font-ui);
      font-size: 11.5px;
      color: #cbd5e1;
      line-height: 1.4;
    }

    .device-rec-box strong {
      color: #f8fafc;
      font-weight: 600;
    }

    .gpu-rec-dot {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: #22c55e;
      flex-shrink: 0;
      box-shadow: 0 0 6px rgba(34, 197, 94, 0.4);
    }

    /* SEGMENTED CONTROLS FOR FORMAT / RESOLUTION / FPS / BITRATE */
    .export-field-row {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .export-group-label {
      font-family: var(--font-ui);
      font-size: 10.5px;
      font-weight: 600;
      letter-spacing: 0.05em;
      color: #8ca0ba;
      text-transform: uppercase;
    }

    .segmented-control-track {
      background: #060911;
      border: 1px solid #1e293b;
      border-radius: var(--radius-sm);
      padding: 3px;
      display: grid;
      gap: 4px;
    }

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

    .btn-toggle-grid-3 {
      grid-template-columns: repeat(3, 1fr);
    }

    .btn-toggle-grid-4 {
      grid-template-columns: repeat(4, 1fr);
    }

    .btn-toggle-grid-5 {
      grid-template-columns: repeat(5, 1fr);
    }

    .btn-toggle-grid-6 {
      grid-template-columns: repeat(6, 1fr);
    }

    .export-toggle-btn {
      background: transparent;
      border: 1px solid transparent;
      border-radius: 3px;
      padding: 8px 6px;
      font-family: var(--font-ui);
      font-variant-numeric: tabular-nums;
      font-size: 12px;
      font-weight: 500;
      color: #8ca0ba;
      cursor: pointer;
      text-align: center;
      transition: all 0.12s ease;
      white-space: nowrap;
    }

    .export-toggle-btn:focus-visible {
      outline: 2px solid #38bdf8;
      outline-offset: -1px;
    }

    .export-toggle-btn:hover:not(:disabled) {
      color: #f1f5f9;
      background: rgba(255, 255, 255, 0.04);
    }

    .export-toggle-btn.active {
      background: #1e293b !important;
      border: 1px solid rgba(255, 255, 255, 0.14) !important;
      color: #ffffff !important;
      font-weight: 600;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.25) !important;
    }

    .export-toggle-btn:disabled {
      opacity: 0.3;
      cursor: not-allowed;
    }

    #group-engine {
      min-height: 48px;
    }

    #group-engine .export-toggle-btn {
      white-space: normal;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 3px;
      padding: 8px 6px;
      line-height: 1.25;
    }

    .engine-btn-title {
      font-size: 11.5px;
      font-weight: 600;
      color: inherit;
    }

    .engine-btn-subtitle {
      font-size: 9.5px;
      font-weight: 400;
      color: #94a3b8;
      letter-spacing: -0.01em;
    }

    .export-toggle-btn.active .engine-btn-subtitle {
      color: #94a3b8 !important;
    }


    /* SUMMARY INSPECTOR BAR */
    .export-summary-container {
      background: #080c14;
      border: 1px solid #1e293b;
      border-radius: var(--radius-sm);
      padding: 10px 14px;
      text-align: center;
      font-family: var(--font-mono);
      font-size: 11px;
      color: #94a3b8;
      letter-spacing: 0.02em;
      line-height: 1.5;
    }

    .export-modal-footer {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 10px;
      padding-top: 6px;
      border-top: 1px solid rgba(30, 41, 59, 0.5);
      flex-shrink: 0;
    }

    .btn-modal-cancel {
      background: transparent;
      border: 1px solid #334155;
      color: #cbd5e1;
      padding: 9px 20px;
      border-radius: var(--radius-sm);
      font-family: var(--font-ui);
      font-size: 12px;
      font-weight: 500;
      letter-spacing: 0.01em;
      cursor: pointer;
      transition: all 0.15s ease;
    }

    .btn-modal-cancel:hover {
      background: #1e293b;
      color: #ffffff;
      border-color: #475569;
    }

    .btn-modal-export {
      background: #0284c7;
      border: 1px solid rgba(255, 255, 255, 0.15);
      color: #ffffff;
      padding: 9px 24px;
      border-radius: var(--radius-sm);
      font-family: var(--font-ui);
      font-size: 12.5px;
      font-weight: 600;
      letter-spacing: 0.01em;
      cursor: pointer;
      transition: all 0.15s ease;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    }

    .btn-modal-export:hover {
      background: #0369a1;
      border-color: rgba(255, 255, 255, 0.3);
    }

    /* EXPORT PROGRESS OVERLAY */
    .export-overlay {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(4, 6, 11, 0.88);
      backdrop-filter: blur(8px);
      display: none;
      align-items: center;
      justify-content: center;
      z-index: 100;
      padding: 16px;
    }

    .export-card {
      background: #0b101c;
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: var(--radius-lg);
      box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.04);
      width: 440px;
      max-width: 92vw;
      padding: 20px;
      display: flex;
      flex-direction: column;
      gap: 14px;
    }

    .export-card-head {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .export-spinner {
      width: 26px;
      height: 26px;
      border: 2.5px solid rgba(56, 189, 248, 0.2);
      border-top-color: #38bdf8;
      border-radius: 50%;
      animation: spin 0.8s linear infinite;
      flex-shrink: 0;
      will-change: transform;
    }

    @keyframes spin {
      0% { transform: rotate(0deg); }
      100% { transform: rotate(360deg); }
    }

    .export-card-title-group {
      flex: 1;
      min-width: 0;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }

    .export-title {
      font-size: 13.5px;
      font-weight: 600;
      letter-spacing: 0.01em;
      color: #f1f5f9;
      margin: 0;
    }

    .export-counter-badge {
      font-family: var(--font-mono);
      font-size: 10.5px;
      font-weight: 600;
      color: #38bdf8;
      background: rgba(56, 189, 248, 0.1);
      border: 1px solid rgba(56, 189, 248, 0.25);
      padding: 2px 8px;
      border-radius: 9999px;
      white-space: nowrap;
    }

    .export-progress-box {
      background: rgba(255, 255, 255, 0.02);
      border: 1px solid rgba(255, 255, 255, 0.05);
      border-radius: var(--radius-md);
      padding: 12px 14px;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .export-item-name {
      font-size: 12.5px;
      font-weight: 600;
      color: #f8fafc;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .export-desc {
      font-size: 11px;
      color: #94a3b8;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      margin: 0;
    }

    .export-track {
      width: 100%;
      height: 6px;
      background: rgba(255, 255, 255, 0.06);
      border-radius: 3px;
      overflow: hidden;
    }

    .export-fill {
      height: 100%;
      background: linear-gradient(90deg, #0284c7, #38bdf8);
      width: 0%;
      border-radius: 3px;
      transition: width 0.1s ease-out;
      will-change: width;
    }

    .export-meta-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-family: var(--font-mono);
      font-size: 11px;
    }

    .export-percent-label {
      font-weight: 700;
      color: #38bdf8;
    }

    .export-detail-label {
      color: #94a3b8;
      font-size: 10.5px;
    }

    /* Overall Batch Section */
    .export-batch-box {
      border-top: 1px solid rgba(255, 255, 255, 0.06);
      padding-top: 12px;
      display: flex;
      flex-direction: column;
      gap: 7px;
    }

    .export-batch-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-size: 11px;
      font-weight: 500;
      color: #94a3b8;
    }

    .export-batch-pct {
      font-family: var(--font-mono);
      font-weight: 600;
      color: #cbd5e1;
    }

    .export-batch-track {
      width: 100%;
      height: 4px;
      background: rgba(255, 255, 255, 0.05);
      border-radius: 2px;
      overflow: hidden;
    }

    .export-batch-fill {
      height: 100%;
      background: #4ade80;
      width: 0%;
      border-radius: 2px;
      transition: width 0.1s ease-out;
      will-change: width;
    }

    .export-batch-sub {
      font-family: var(--font-mono);
      font-size: 10.5px;
      color: #94a3b8;
    }

    .export-actions-row {
      display: flex;
      justify-content: flex-end;
      align-items: center;
    }

    .btn-cancel-batch {
      background: transparent;
      border: 1px solid rgba(244, 63, 94, 0.35);
      color: #f87171;
      border-radius: var(--radius-sm);
      padding: 5px 12px;
      font-size: 11px;
      font-family: var(--font-ui);
      font-weight: 500;
      cursor: pointer;
      transition: all 0.15s ease;
    }

    .btn-cancel-batch:hover {
      background: rgba(244, 63, 94, 0.1);
      border-color: #f43f5e;
      color: #ffffff;
    }

    /* TOAST NOTIFICATION (Top-Center Studio Banner - Never obstructs bottom action buttons) */
    .toast-msg {
      position: fixed;
      top: 16px;
      left: 50%;
      transform: translateX(-50%);
      background: var(--bg-surface-elevated);
      border: 1px solid var(--border-strong);
      color: var(--text-main);
      padding: 10px 20px;
      border-radius: var(--radius-md);
      font-size: 12.5px;
      font-family: var(--font-ui);
      font-weight: 600;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.08);
      display: none;
      align-items: center;
      gap: 8px;
      z-index: 999999;
      max-width: 90vw;
      text-align: center;
      cursor: pointer;
      animation: toastSlideDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    }

    @keyframes toastSlideDown {
      from { opacity: 0; transform: translate(-50%, -10px); }
      to { opacity: 1; transform: translate(-50%, 0); }
    }

    /* HISTORY EMPTY STATE (R-27) */
    .history-empty {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 12px;
      padding: 40px 20px;
      text-align: center;
    }

    .history-empty-icon {
      color: var(--text-muted);
      opacity: 0.7;
    }

    .history-empty-title {
      font-size: 13.5px;
      font-weight: 700;
      color: var(--text-main);
      letter-spacing: 0.02em;
    }

    .history-empty-desc {
      font-size: 11.5px;
      color: var(--text-muted);
      max-width: 320px;
      line-height: 1.45;
    }

    /* RENDER QUEUE STYLES */
    .btn-queue-tag {
      background: rgba(56, 189, 248, 0.08);
      border: 1px solid rgba(56, 189, 248, 0.28);
      color: #38bdf8;
      font-family: var(--font-mono);
      font-size: 11px;
      font-weight: 600;
      padding: 3px 10px;
      border-radius: var(--radius-sm);
      cursor: pointer;
      transition: all 0.15s ease;
      display: inline-flex;
      align-items: center;
      gap: 5px;
    }
    .btn-queue-tag:hover {
      background: rgba(56, 189, 248, 0.16);
      border-color: #38bdf8;
      color: #ffffff;
    }

    .queue-modal-card {
      background: #0b0f19;
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: var(--radius-lg);
      width: 740px;
      max-width: 95vw;
      max-height: 85vh;
      display: flex;
      flex-direction: column;
      box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.04);
      overflow: hidden;
    }

    .queue-toolbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 10px 18px;
      background: #080c14;
      border-bottom: 1px solid #161f30;
      gap: 12px;
    }

    .queue-select-all-label {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      font-size: 12px;
      font-weight: 500;
      color: var(--text-secondary);
      cursor: pointer;
      user-select: none;
    }

    .queue-select-all-label input[type="checkbox"] {
      cursor: pointer;
      accent-color: var(--accent-primary);
    }

    .queue-toolbar-actions {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .queue-tool-btn {
      background: rgba(255, 255, 255, 0.03);
      border: 1px solid rgba(255, 255, 255, 0.08);
      color: #94a3b8;
      font-family: var(--font-ui);
      font-size: 11px;
      font-weight: 500;
      padding: 4px 10px;
      border-radius: var(--radius-sm);
      cursor: pointer;
      transition: all 0.15s ease;
    }

    .queue-tool-btn:hover {
      background: rgba(255, 255, 255, 0.07);
      border-color: rgba(255, 255, 255, 0.15);
      color: #f1f5f9;
    }

    .queue-list-container {
      flex: 1;
      overflow-y: auto;
      min-height: 240px;
      max-height: 480px;
      padding: 12px 18px;
      display: flex;
      flex-direction: column;
      gap: 6px;
      background: #060810;
    }

    .queue-list-container::-webkit-scrollbar {
      width: 6px;
    }
    .queue-list-container::-webkit-scrollbar-track {
      background: transparent;
    }
    .queue-list-container::-webkit-scrollbar-thumb {
      background: rgba(148, 163, 184, 0.25);
      border-radius: 9999px;
      transition: background 0.2s ease;
    }
    .queue-list-container::-webkit-scrollbar-thumb:hover {
      background: rgba(56, 189, 248, 0.55);
    }

    .queue-empty-box {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 50px 20px;
      text-align: center;
      gap: 8px;
    }

    .queue-empty-title {
      font-size: 13.5px;
      font-weight: 700;
      color: var(--text-main);
      letter-spacing: 0.02em;
    }

    .queue-empty-desc {
      font-size: 12px;
      color: var(--text-muted);
      max-width: 320px;
      line-height: 1.5;
    }

    .queue-item-row {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 9px 12px;
      background: #0b101c;
      border: 1px solid #161f30;
      border-radius: var(--radius-md);
      transition: all 0.15s ease;
    }

    .queue-item-row:hover {
      background: #0f1626;
      border-color: #243550;
    }

    .queue-item-checkbox {
      width: 16px;
      height: 16px;
      cursor: pointer;
      accent-color: var(--accent-primary);
      flex-shrink: 0;
      margin: 0;
    }

    .queue-item-info {
      flex: 1;
      min-width: 0;
      display: flex;
      flex-direction: column;
      gap: 3px;
    }

    .queue-item-top {
      display: flex;
      align-items: center;
      gap: 8px;
      min-width: 0;
    }

    .queue-item-index {
      font-family: var(--font-mono);
      font-size: 11px;
      font-weight: 500;
      color: #94a3b8;
      flex-shrink: 0;
    }

    .queue-item-title {
      font-size: 13px;
      font-weight: 600;
      color: #f1f5f9;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      min-width: 0;
    }

    .queue-item-meta {
      display: flex;
      align-items: center;
      gap: 6px;
      font-family: var(--font-mono);
      font-size: 10.5px;
      color: #94a3b8;
      margin-top: 2px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .queue-meta-pill {
      display: inline-flex;
      align-items: center;
      padding: 1px 6px;
      border-radius: 3px;
      font-size: 10px;
      font-family: var(--font-mono);
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid rgba(255, 255, 255, 0.06);
      color: #94a3b8;
      line-height: 1.4;
    }

    .queue-meta-pill.video {
      background: rgba(56, 189, 248, 0.08);
      border-color: rgba(56, 189, 248, 0.2);
      color: #38bdf8;
    }

    .queue-meta-dot {
      color: #64748b;
      font-size: 9px;
    }

    .queue-meta-time {
      color: #94a3b8;
      font-size: 10.5px;
    }

    .queue-meta-err {
      color: #f87171;
      font-size: 10.5px;
    }

    .queue-status-tag {
      font-family: var(--font-mono);
      font-size: 10px;
      font-weight: 600;
      padding: 2px 7px;
      border-radius: 9999px;
      text-transform: none;
      letter-spacing: 0.02em;
      flex-shrink: 0;
      display: inline-flex;
      align-items: center;
      gap: 4px;
    }

    .queue-status-pending {
      background: rgba(148, 163, 184, 0.08);
      color: #94a3b8;
      border: 1px solid rgba(148, 163, 184, 0.2);
    }

    .queue-status-rendering {
      background: rgba(56, 189, 248, 0.1);
      color: #38bdf8;
      border: 1px solid rgba(56, 189, 248, 0.3);
    }

    .queue-status-completed {
      background: rgba(34, 197, 94, 0.1);
      color: #4ade80;
      border: 1px solid rgba(34, 197, 94, 0.25);
    }

    .queue-status-error {
      background: rgba(239, 68, 68, 0.1);
      color: #f87171;
      border: 1px solid rgba(239, 68, 68, 0.25);
    }

    .queue-item-actions {
      display: flex;
      align-items: center;
      gap: 6px;
      flex-shrink: 0;
    }

    .qi-btn {
      font-family: var(--font-ui);
      font-size: 11px;
      font-weight: 500;
      height: 24px;
      box-sizing: border-box;
      padding: 0 8px;
      border-radius: var(--radius-sm);
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 4px;
      border: 1px solid rgba(255, 255, 255, 0.08);
      background: rgba(255, 255, 255, 0.04);
      color: var(--text-secondary);
      transition: all 0.15s ease;
      white-space: nowrap;
      flex-shrink: 0;
    }

    .qi-btn:hover {
      background: rgba(255, 255, 255, 0.08);
      border-color: rgba(255, 255, 255, 0.18);
      color: #f1f5f9;
    }

    .qi-btn-accent {
      background: rgba(56, 189, 248, 0.08);
      border-color: rgba(56, 189, 248, 0.25);
      color: #38bdf8;
    }

    .qi-btn-accent:hover {
      background: rgba(56, 189, 248, 0.16);
      border-color: #38bdf8;
      color: #ffffff;
    }

    .qi-btn-icon-only {
      width: 24px;
      height: 24px;
      padding: 0;
      justify-content: center;
      color: #94a3b8;
      border-radius: var(--radius-sm);
    }

    .qi-btn-icon-only:hover {
      background: rgba(244, 63, 94, 0.1);
      border-color: rgba(244, 63, 94, 0.3);
      color: #f43f5e;
    }

    .queue-config-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      padding: 10px 16px;
      background: #080c14;
      border-top: 1px solid #1a2336;
      border-bottom: 1px solid #1a2336;
      flex-wrap: wrap;
    }

    .queue-config-title {
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.04em;
      color: var(--text-secondary);
      text-transform: uppercase;
      white-space: nowrap;
    }

    .queue-config-row {
      display: flex;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
    }

    .queue-config-group {
      display: inline-flex;
      align-items: center;
      gap: 6px;
    }

    .queue-config-group label {
      font-size: 11px;
      font-weight: 600;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 0.03em;
    }

    .styled-select-compact {
      background-color: var(--bg-input);
      border: 1px solid var(--border-subtle);
      border-radius: var(--radius-sm);
      color: var(--text-main);
      font-family: var(--font-ui);
      font-size: 12px;
      font-weight: 500;
      padding: 5px 24px 5px 8px;
      cursor: pointer;
      outline: none;
      appearance: none;
      -webkit-appearance: none;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: right 6px center;
      background-size: 11px;
    }

    .styled-select-compact:focus {
      border-color: var(--accent-primary-light);
    }

    .btn-modal-export:disabled {
      background: #141b2a;
      border-color: #1e293b;
      color: #475569;
      cursor: not-allowed;
      box-shadow: none;
      pointer-events: none;
    }

    .hi-btn-queue {
      background: rgba(56, 189, 248, 0.1);
      border-color: rgba(56, 189, 248, 0.3);
      color: #38bdf8;
    }
    .hi-btn-queue:hover {
      background: rgba(56, 189, 248, 0.2);
      border-color: #38bdf8;
      color: #ffffff;
    }

