    /* MAIN TWO-COLUMN WORKSPACE */
    .main-workspace {
      flex: 1;
      display: grid;
      grid-template-columns: 390px minmax(0, 1fr);
      height: calc(100vh - 48px);
      overflow: hidden;
      width: 100vw;
    }

    /* LEFT COLUMN: BRIEF PANEL */
    .brief-panel {
      background: var(--bg-surface);
      border-right: 1px solid var(--border-subtle);
      padding: 16px;
      overflow-y: auto;
      overflow-x: hidden;
      display: flex;
      flex-direction: column;
      gap: 14px;
      width: 390px;
      max-width: 390px;
    }

    .section-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .section-title {
      font-size: 13px;
      font-weight: 700;
      letter-spacing: 0.04em;
      color: var(--text-main);
      text-transform: uppercase;
    }

    .section-step {
      font-family: var(--font-mono);
      font-size: 11px;
      font-weight: 600;
      color: var(--text-muted);
      letter-spacing: 0.06em;
    }

    /* CREATIVE BRIEF CONTAINER */
    .brief-card {
      border: 1px solid var(--border-strong);
      background: var(--bg-surface-elevated);
      border-radius: var(--radius-lg);
      padding: 14px;
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .brief-header-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }

    .btn-ai-enhance {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      background: var(--bg-surface-elevated);
      border: 1px solid var(--border-strong);
      border-radius: var(--radius-sm);
      color: var(--text-secondary);
      font-family: var(--font-ui);
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 0.2px;
      padding: 4px 10px;
      cursor: pointer;
      transition: all 0.15s ease;
    }

    .btn-ai-enhance:hover:not(:disabled) {
      background: rgba(56, 189, 248, 0.08);
      border-color: var(--accent-primary-light);
      color: #ffffff;
    }

    .btn-ai-enhance:active:not(:disabled) {
      background: rgba(56, 189, 248, 0.15);
      transform: translateY(1px);
    }

    .btn-ai-enhance:disabled {
      opacity: 0.5;
      cursor: not-allowed;
      border-color: var(--border-subtle);
    }

    .btn-ai-enhance .enhance-icon {
      display: block;
      color: var(--accent-primary-light);
      flex-shrink: 0;
    }

    .brief-actions-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-size: 11px;
      color: var(--text-muted);
      margin-top: 2px;
    }

    .auto-enhance-toggle {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      cursor: pointer;
      color: var(--text-secondary);
      font-size: 11px;
      font-family: var(--font-ui);
      user-select: none;
    }

    .auto-enhance-toggle input {
      accent-color: var(--accent-primary-light);
      cursor: pointer;
    }

    .brief-char-badge {
      font-family: var(--font-mono);
      font-size: 11px;
      color: var(--text-muted);
    }

    .chip-row-label {
      font-size: 10px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      color: var(--text-muted);
      display: flex;
      align-items: center;
      margin-right: 4px;
    }

    @keyframes promptFlash {
      0% { border-color: #38bdf8; box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.35); }
      100% { border-color: var(--border-subtle); box-shadow: none; }
    }
    .brief-input.flash-enhance, .prompt-textarea.flash-enhance {
      animation: promptFlash 1.2s ease-out;
    }

    .card-label {
      color: var(--accent-primary-light);
      font-size: 11.5px;
      font-weight: 700;
      letter-spacing: 0.05em;
      text-transform: uppercase;
    }

    .brief-input {
      background: var(--bg-input);
      border: 1px solid var(--border-subtle);
      border-radius: var(--radius-md);
      color: var(--text-main);
      font-family: var(--font-mono);
      font-size: 13px;
      line-height: 1.5;
      padding: 10px 12px;
      min-height: 74px;
      width: 100%;
      resize: vertical;
      outline: none;
      transition: border-color 0.15s ease;
    }

    .brief-input:focus {
      border-color: var(--border-focus);
    }

    .pills-container, .chip-row {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-top: 8px;
      margin-bottom: 6px;
    }

    .topic-pill, .chip {
      background: var(--bg-surface);
      border: 1px solid var(--border-subtle);
      color: var(--text-secondary);
      font-family: var(--font-mono);
      font-size: 11px;
      font-weight: 500;
      padding: 4px 10px;
      border-radius: var(--radius-tag);
      cursor: pointer;
      transition: all 0.15s ease;
    }

    .topic-pill:hover, .chip:hover {
      border-color: var(--accent-primary-light);
      color: #38bdf8;
      background: rgba(2, 132, 199, 0.12);
    }

    .note-amber {
      color: var(--accent-amber);
      font-size: 11px;
      line-height: 1.45;
      font-weight: 500;
    }

    .note-muted {
      color: var(--text-secondary);
      font-size: 11px;
      line-height: 1.45;
      font-weight: 400;
    }

    /* 2-COLUMN DROPDOWNS */
    .controls-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px 12px;
    }

    .control-cell {
      display: flex;
      flex-direction: column;
      gap: 5px;
    }

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

    .styled-select {
      background-color: var(--bg-input);
      border: 1px solid var(--border-subtle);
      border-radius: var(--radius-md);
      color: var(--text-main);
      font-family: var(--font-ui);
      font-size: 12.5px;
      font-weight: 500;
      padding: 8px 10px;
      padding-right: 28px;
      width: 100%;
      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 8px center;
      background-size: 13px;
      transition: border-color 0.15s ease;
    }

    .styled-select:focus {
      border-color: var(--border-focus);
    }

    .styled-select option {
      background: var(--bg-surface-elevated);
      color: var(--text-main);
      padding: 8px 10px;
    }

    /* PRIMARY WORKFLOW BUTTONS */
    .btn-solid-primary {
      background: var(--accent-primary);
      color: #ffffff;
      font-family: var(--font-ui);
      font-weight: 700;
      font-size: 13px;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      padding: 12px;
      border-radius: var(--radius-md);
      border: 1px solid rgba(255, 255, 255, 0.15);
      cursor: pointer;
      width: 100%;
      transition: background 0.15s ease;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .btn-solid-primary:hover {
      background: var(--accent-primary-hover);
    }

    .btn-solid-primary:active {
      transform: translateY(1px);
    }

    /* GENERATED PROMPT OUTPUT BOX */
    .generated-section {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .prompt-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

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

    .btn-copy-tag {
      background: var(--bg-surface-elevated);
      border: 1px solid var(--border-subtle);
      color: var(--text-secondary);
      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;
    }

    .btn-copy-tag:hover {
      border-color: var(--accent-primary-light);
      color: var(--text-main);
    }

    .prompt-textarea {
      background: var(--bg-input);
      border: 1px solid var(--border-subtle);
      border-radius: var(--radius-md);
      color: #cbd5e1;
      font-family: var(--font-mono);
      font-size: 11px;
      line-height: 1.45;
      padding: 10px;
      height: 140px;
      width: 100%;
      overflow-y: auto;
      resize: vertical;
      outline: none;
      white-space: pre-wrap;
      word-break: break-word;
    }

    /* RIGHT COLUMN: PREVIEW & RUN WORKSPACE */
    .preview-panel {
      background: var(--bg-base);
      padding: 16px 20px;
      display: flex;
      flex-direction: column;
      gap: 12px;
      overflow-y: auto;
      min-width: 0;
    }

    .preview-header-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .preview-header-actions {
      display: flex;
      align-items: center;
      gap: 10px;
    }



    .fps-badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-family: var(--font-mono);
      font-size: 11px;
      font-weight: 600;
      color: var(--text-secondary);
      border: 1px solid var(--border-subtle);
      padding: 4px 9px;
      border-radius: var(--radius-sm);
      background: var(--bg-surface);
      min-width: 76px;
      justify-content: center;
    }

    .fps-dot {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: #64748b;
      transition: background 0.2s ease, box-shadow 0.2s ease;
    }

    .fps-dot.live {
      background: #10b981;
      box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
    }

    .preview-res-badge {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      font-family: var(--font-mono);
      font-size: 11px;
      font-weight: 600;
      color: var(--text-secondary);
      border: 1px solid var(--border-subtle);
      padding: 4px 9px;
      border-radius: var(--radius-sm);
      background: var(--bg-surface);
      min-width: 88px;
      justify-content: center;
      user-select: none;
    }

    .btn-export-solid {
      background: #2563eb;
      color: #ffffff;
      font-family: var(--font-ui);
      font-size: 12px;
      font-weight: 700;
      letter-spacing: 0.04em;
      border: 1px solid rgba(255, 255, 255, 0.15);
      padding: 5px 16px;
      border-radius: var(--radius-md);
      cursor: pointer;
      transition: background 0.15s ease;
    }

    .btn-export-solid:hover {
      background: #1d4ed8;
    }

    .preview-ratio-pill {
      font-family: var(--font-mono);
      font-size: 11px;
      font-weight: 700;
      color: #38bdf8;
      background: rgba(56, 189, 248, 0.1);
      border: 1px solid rgba(56, 189, 248, 0.25);
      padding: 2px 8px;
      border-radius: var(--radius-sm);
      letter-spacing: 0.05em;
    }

    /* STAGE (SCREEN / DISPLAY) */
    .stage-container {
      flex: 1;
      min-height: 400px;
      border: 1px solid #1a2333;
      border-radius: var(--radius-lg);
      position: relative;
      overflow: hidden;
      display: flex;
      align-items: center;
      justify-content: center;
      background-color: #070910; /* Clean studio workspace matte */
      padding: 28px 24px;
      box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.7);
    }

    .stage-viewport {
      position: relative;
      border-radius: 10px;
      overflow: hidden;
      background-color: #000000;
      /* Distinct studio monitor bezel and ambient drop shadow */
      border: 2px solid #222d42;
      box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.08);
      display: flex;
      align-items: center;
      justify-content: center;
      transition: width 0.22s cubic-bezier(0.4, 0, 0.2, 1), height 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* Microstock checkerboard underlay inside the viewport monitor only */
    .stage-viewport::before {
      content: '';
      position: absolute;
      inset: 0;
      pointer-events: none;
      background-image: 
        linear-gradient(45deg, #10141e 25%, transparent 25%),
        linear-gradient(-45deg, #10141e 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #10141e 75%),
        linear-gradient(-45deg, transparent 75%, #10141e 75%);
      background-size: 16px 16px;
      background-position: 0 0, 0 8px, 8px -8px, -8px 0;
      z-index: 0;
    }

    .stage-iframe {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      border: none;
      display: none;
      background: #000000 !important;
      z-index: 1;
    }

    .stage-video {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: contain;
      display: none;
      background: #000;
      z-index: 1;
    }

    .no-signal-state {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 10px;
      text-align: center;
      padding: 24px;
      z-index: 1;
      width: 100%;
      height: 100%;
    }

    .no-signal-icon {
      width: 32px;
      height: 32px;
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--text-secondary);
      margin-bottom: 2px;
    }

    .no-signal-title {
      font-size: 15px;
      font-weight: 700;
      letter-spacing: 0.15em;
      color: var(--text-secondary);
      text-transform: uppercase;
    }

    .no-signal-sub {
      font-size: 12px;
      color: var(--text-muted);
      letter-spacing: 0.01em;
    }

    /* MEDIA CONTROLS BAR */
    .media-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 4px 0;
    }

    .media-bar-left {
      display: flex;
      align-items: center;
      gap: 8px;
      flex: 1;
    }

    .btn-media-play {
      background: var(--accent-primary);
      color: #ffffff;
      border: 1px solid rgba(255, 255, 255, 0.15);
      border-radius: var(--radius-sm);
      width: 32px;
      height: 32px;
      min-width: 32px;
      min-height: 32px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 0;
      line-height: 1;
      transition: background 0.15s ease, border-color 0.15s ease;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    }

    .btn-media-play:hover {
      background: var(--accent-primary-hover);
      border-color: rgba(255, 255, 255, 0.3);
    }

    .btn-media-play:focus {
      outline: none;
    }

    .btn-media-play:focus-visible {
      outline: 2px solid var(--accent-primary-light);
      outline-offset: 1px;
    }

    .btn-media-stop {
      background: #0f172a;
      border: 1px solid var(--border-subtle);
      color: #cbd5e1;
      border-radius: var(--radius-sm);
      width: 32px;
      height: 32px;
      min-width: 32px;
      min-height: 32px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 0;
      line-height: 1;
      transition: all 0.15s ease;
    }

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

    .media-icon {
      display: block;
      pointer-events: none;
      flex-shrink: 0;
    }

    .time-readout {
      font-family: var(--font-mono);
      font-size: 12px;
      font-weight: 600;
      color: var(--accent-primary-light);
      min-width: 90px;
    }

    .timeline-slider {
      flex: 1;
      height: 4px;
      background: var(--border-subtle);
      border-radius: var(--radius-sm);
      outline: none;
      accent-color: var(--accent-primary-light);
      cursor: pointer;
    }

    .media-bar-right {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .loop-toggle {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 11px;
      font-weight: 600;
      color: var(--text-secondary);
      cursor: pointer;
    }

    .loop-toggle input {
      accent-color: var(--accent-primary-light);
      cursor: pointer;
    }

    /* PASTE LLM HTML SECTION */
    .paste-html-section {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .paste-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .paste-label {
      font-size: 11px;
      font-weight: 700;
      color: var(--text-secondary);
      letter-spacing: 0.04em;
      text-transform: uppercase;
    }

    .paste-size-label {
      font-family: var(--font-mono);
      font-size: 11px;
      color: var(--text-muted);
    }

    .html-code-area {
      background: var(--bg-input);
      border: 1px solid var(--border-subtle);
      border-radius: var(--radius-md);
      color: #e2e8f0;
      font-family: var(--font-mono);
      font-size: 11.5px;
      line-height: 1.45;
      padding: 10px 12px;
      height: 110px;
      width: 100%;
      resize: vertical;
      outline: none;
      transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
    }

    .html-code-area:focus {
      border-color: var(--border-focus);
    }

    .html-code-area.drag-over {
      border: 1.5px dashed var(--accent-primary-light, #38bdf8) !important;
      background: rgba(56, 189, 248, 0.08) !important;
      box-shadow: 0 0 16px rgba(56, 189, 248, 0.25) !important;
    }

    /* BOTTOM ACTIONS BAR */
    .actions-bar {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .btn-run-motion {
      flex: 1;
      height: 42px;
      background: var(--accent-primary);
      color: #ffffff;
      font-family: var(--font-ui);
      font-weight: 700;
      font-size: 13px;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      border: 1px solid rgba(255, 255, 255, 0.15);
      border-radius: var(--radius-md);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: background 0.15s ease;
    }

    .btn-run-motion:hover {
      background: var(--accent-primary-hover);
    }

    .btn-run-motion:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }

    .btn-action-tool {
      height: 42px;
      padding: 0 16px;
      background: var(--bg-surface);
      border: 1px solid var(--border-subtle);
      color: var(--text-secondary);
      font-family: var(--font-ui);
      font-size: 12px;
      font-weight: 600;
      letter-spacing: 0.02em;
      text-transform: uppercase;
      border-radius: var(--radius-md);
      cursor: pointer;
      transition: all 0.15s ease;
    }

    .btn-action-tool:hover {
      border-color: var(--accent-primary-light);
      color: var(--text-main);
      background: var(--bg-surface-elevated);
    }

    /* RESPONSIVE BREAKPOINTS (R-03) */
    @media (max-width: 900px) {
      body {
        height: auto;
        min-height: 100vh;
        overflow-y: auto;
        overflow-x: hidden;
      }

      header {
        padding: 0 14px;
        overflow: hidden;
      }


      .main-workspace {
        grid-template-columns: 1fr;
        height: auto;
        width: 100%;
        overflow: visible;
      }

      .brief-panel {
        width: 100%;
        max-width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-subtle);
        overflow: visible;
      }

      .preview-panel {
        width: 100%;
        height: auto;
        overflow: visible;
      }

      .media-bar {
        flex-wrap: wrap;
        gap: 10px;
      }

      .media-bar-left {
        flex: 1 1 100%;
        width: 100%;
        min-width: 0;
      }

      .timeline-slider {
        min-width: 60px;
        min-height: 24px;
        padding: 10px 0;
      }

      .media-bar-right {
        width: 100%;
        justify-content: flex-end;
      }

      .styled-select {
        min-height: 44px;
      }

      .btn-media-play, .btn-media-stop {
        min-width: 44px;
        min-height: 44px;
      }

      .btn-copy-tag, .btn-queue-tag, .queue-tool-btn, .hi-btn-queue, .chip, .btn-action-tool {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
      }

      .btn-ai-enhance {
        min-height: 44px;
        padding: 8px 14px;
      }

      .btn-solid-primary {
        min-height: 44px;
      }

      .btn-run-motion {
        min-height: 44px;
      }

      .export-toggle-btn {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
      }

      .preset-chip {
        min-height: 44px;
      }

      .btn-modal-cancel, .btn-modal-export {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
      }

      .btn-history-footer {
        min-height: 44px;
      }

      .history-tab-btn {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 6px 14px;
      }

      .hi-btn {
        min-height: 44px;
        min-width: 44px;
      }

      .loop-toggle {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        padding: 4px 8px;
      }

      .btn-close-modal {
        min-width: 44px;
        min-height: 44px;
      }
    }

    @media (max-width: 540px) {
      .version-tag {
        display: none;
      }
      .btn-export-solid {
        padding: 8px 12px;
        min-height: 44px;
        font-size: 11px;
      }
      .preview-header-bar {
        flex-wrap: wrap;
        gap: 8px;
      }
      .paste-head {
        flex-wrap: wrap;
        gap: 8px;
      }
      .actions-bar {
        flex-wrap: wrap;
        gap: 8px;
      }
      .btn-toggle-grid-5,
      .btn-toggle-grid-6 {
        grid-template-columns: repeat(3, 1fr);
      }
      #group-format.btn-toggle-grid-3 {
        grid-template-columns: 1fr;
      }
      .export-toggle-btn {
        min-height: 44px;
        white-space: normal;
        line-height: 1.2;
      }
    }



