/* SKU only: history on the left, parameters above results. Shared modes are untouched. */
.sku-horizontal-workbench .sku-recognition-status { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.sku-horizontal-workbench :is(.sku-full-frame-panel, .sku-full-frame-preview, .sku-full-frame-preview img) { min-width: 0; max-width: 100%; }
.sku-horizontal-workbench { min-width: 0; min-height: 0; flex: 1; }
.sku-horizontal-workbench .sku-parameter-panel { padding: 14px 18px; gap: 12px; }
.sku-horizontal-workbench .sku-parameter-toolbar { display: flex; align-items: center; gap: 14px; min-width: 0; }
.sku-horizontal-workbench :is(.sku-parameter-toolbar h2, .sku-output-heading h2) { margin: 0; font-size: 16px; line-height: 32px; }
.sku-horizontal-workbench .sku-parameter-toolbar h2 { margin-right: auto; white-space: nowrap; }
.sku-horizontal-workbench .sku-parameter-template { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 0 1 310px; }
.sku-horizontal-workbench .sku-parameter-template > span { font-size: 12px; color: var(--muted); flex: none; }
.production-workspace .sku-horizontal-workbench .production-rail .sku-parameter-template { display: flex !important; flex-direction: row; align-items: center; gap: 10px; margin: 0; }
.sku-horizontal-workbench .sku-parameter-template :is(select, button) { min-width: 0; width: 100%; text-align: left; }
.sku-horizontal-workbench .sku-parameter-clear { background: transparent; border-color: transparent; color: var(--production-accent); }
.sku-horizontal-workbench .sku-parameter-actions { display: flex; gap: 8px; align-items: center; flex: none; }
.sku-horizontal-workbench .sku-parameter-actions > button { min-height: 34px; white-space: nowrap; font-size: 12px; padding: 6px 12px; }
.sku-horizontal-workbench .sku-parameter-actions > .primary { min-width: 112px; }
.sku-horizontal-workbench .sku-parameter-columns { display: grid; gap: 18px; border: 0; margin: 0; padding: 16px 0 0; border-top: 1px solid var(--line); align-items: start; }
.sku-horizontal-workbench :is(.sku-parameter-group, .sku-parameter-images) { min-width: 0; margin: 0; }
.sku-horizontal-workbench .sku-parameter-group { padding-left: 18px; border-left: 1px solid var(--line); }
.sku-horizontal-workbench .sku-parameter-group-heading { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.sku-horizontal-workbench .sku-parameter-group-heading h3 { margin: 0; font-size: 13px; line-height: 20px; }
.sku-horizontal-workbench .sku-parameter-group-heading > span { font-size: 11px; color: var(--muted); }
.sku-horizontal-workbench .sku-image-input-body { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); grid-template-rows: 20px auto; gap: 12px 18px; min-width: 0; }
.sku-horizontal-workbench .sku-image-input-body > .sku-products { display: contents; }
.sku-horizontal-workbench .sku-products > strong { grid-column: 1; grid-row: 1; font-size: 13px; line-height: 20px; }
.sku-horizontal-workbench .sku-products .sku-thumbnails { grid-column: 1; grid-row: 2; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 8px; min-width: 0; max-height: 188px; overflow-y: auto; padding: 2px; }
.sku-horizontal-workbench .sku-products .sku-thumbnails:empty { display: none; }
.sku-horizontal-workbench .sku-image-input-body > .production-upload { grid-column: 1; grid-row: 2; }
.sku-horizontal-workbench .sku-image-input-body > .production-upload,
.sku-horizontal-workbench .sku-full-frame-upload { min-height: 158px; height: auto; justify-content: center; padding: 10px; gap: 8px; }
.sku-horizontal-workbench .sku-image-input-body .production-upload strong { font-size: 12px; line-height: 1.6; }
.sku-horizontal-workbench .sku-image-input-body .production-upload > span { font-size: 10px; line-height: 1.6; }
.sku-horizontal-workbench .sku-full-frame-panel { grid-column: 2; grid-row: 1 / span 2; align-content: start; margin: 0; padding-left: 18px; border-left: 1px solid var(--line); gap: 12px; }
.sku-horizontal-workbench .sku-full-frame-heading { min-height: 20px; }
.sku-horizontal-workbench .sku-full-frame-heading strong { font-size: 13px; }
.sku-horizontal-workbench .sku-full-frame-panel p { font-size: 10px; line-height: 1.6; overflow-wrap: anywhere; }
.sku-horizontal-workbench .sku-full-frame-preview { flex-wrap: wrap; padding: 0; border: 0; background: transparent; gap: 8px; }
.sku-horizontal-workbench .sku-full-frame-preview img { width: 100%; height: 118px; object-fit: contain; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-alt); }
.sku-horizontal-workbench .sku-full-frame-preview strong { font-size: 11px; }
.sku-horizontal-workbench .sku-full-frame-preview button { padding: 3px 6px; min-height: 28px; font-size: 11px; }
.sku-horizontal-workbench .sku-full-frame-panel:has([data-frame-preview]:not([hidden])) [data-frame-status]:not([data-tone="error"]) { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.sku-horizontal-workbench .sku-thumb { width: 64px; height: 64px; }
.sku-horizontal-workbench .sku-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sku-horizontal-workbench .sku-thumbnails > :is(button, .production-reference-add) { width: 64px; height: 64px; min-height: 64px; }
.sku-horizontal-workbench .sku-direct-count { display: none; }
.sku-horizontal-workbench .sku-direct-entry { display: flex; flex-direction: column; gap: 8px; }
.sku-horizontal-workbench .sku-direct-input { display: flex; flex-direction: column; min-width: 0; }
.sku-horizontal-workbench .sku-direct-input textarea { height: 152px; min-height: 120px; resize: vertical; }
.sku-horizontal-workbench .sku-direct-footer { display: flex; justify-content: flex-end; margin: 0; }
.sku-horizontal-workbench .sku-direct-footer button { min-height: 28px; padding: 4px 8px; font-size: 11px; }
.production-workspace .sku-horizontal-workbench .sku-direction-fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.sku-horizontal-workbench .sku-direction-fields label { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sku-horizontal-workbench .sku-direction-fields textarea { min-height: 54px; height: 60px; resize: vertical; }
.sku-horizontal-workbench .sku-direction-mode > .production-field-heading { display: block; font-size: 13px; line-height: 20px; margin: 0 0 12px; color: var(--ink); font-weight: 600; }
.production-workspace .sku-horizontal-workbench .sku-parameter-mode { margin: 0; align-self: start; }
.production-workspace .sku-horizontal-workbench .production-rail .sku-mode-options { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.production-workspace .sku-horizontal-workbench .production-rail .sku-mode-options button { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 10px; text-align: left; }
.sku-horizontal-workbench .sku-mode-options button::before { content: ''; width: 12px; height: 12px; flex: none; border: 1px solid var(--muted); border-radius: 50%; }
.sku-horizontal-workbench .sku-mode-options button.active::before { border-color: var(--production-accent); background: var(--production-accent); box-shadow: inset 0 0 0 3px var(--surface); }
.sku-horizontal-workbench .sku-mode-options small { display: none; }
.production-workspace .sku-horizontal-workbench .production-rail .sku-submit-bar { display: block; padding: 0; margin: 0; border: 0; }
.sku-horizontal-workbench .sku-submit-bar .production-readiness { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; font-size: 11px; }
.sku-horizontal-workbench .sku-output-region { min-width: 0; min-height: 0; display: flex; flex-direction: column; flex: 1; gap: 12px; }
.sku-horizontal-workbench .sku-output-heading { min-height: 34px; flex: none; }
.production-workspace .sku-horizontal-workbench .sku-output-region > .sku-results { padding: 0 !important; margin: 0 !important; border: 0 !important; }
.sku-horizontal-workbench .sku-results-heading { margin-top: -46px !important; padding-left: 110px; min-height: 34px; }
.sku-horizontal-workbench .sku-results-heading .sku-actions { flex-wrap: wrap; justify-content: flex-end; }
.sku-horizontal-workbench .sku-result-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; min-width: 0; }
.sku-horizontal-workbench .sku-output-card { min-width: 0; padding: 6px; margin: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.sku-horizontal-workbench .sku-output-card:focus-within { border-color: var(--production-accent); }
.sku-horizontal-workbench :is(.sku-output-preview, .sku-output-placeholder) { display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 1; min-height: 0; padding: 0; border: 0; border-radius: 5px; overflow: hidden; background: var(--surface-alt); }
.sku-horizontal-workbench .sku-output-preview { cursor: zoom-in; }
.sku-horizontal-workbench .sku-output-preview img { display: block; width: 100%; height: 100%; object-fit: contain; }
.sku-horizontal-workbench .sku-output-placeholder { flex-direction: column; gap: 12px; color: var(--muted); padding: 12px; text-align: center; font-size: 12px; }
.sku-horizontal-workbench .sku-output-caption { display: grid; gap: 4px; padding: 12px 5px; }
.sku-horizontal-workbench .sku-output-caption strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.sku-horizontal-workbench .sku-output-caption > span { color: var(--muted); font-size: 11px; }
.sku-horizontal-workbench .sku-output-card-actions { display: flex; gap: 8px; padding: 0 4px 4px; align-items: flex-start; }
.sku-horizontal-workbench .sku-output-card-actions > * { flex: 1; min-width: 0; }
.sku-horizontal-workbench .sku-output-card-actions .button,
.sku-horizontal-workbench .sku-output-operations > summary { min-height: 32px; font-size: 12px; justify-content: center; }
.sku-horizontal-workbench .sku-output-operations > summary { text-align: center; padding: 6px 10px; border: 1px solid var(--line); border-radius: 5px; cursor: pointer; }
.sku-horizontal-workbench .sku-output-operations[open] { flex-basis: 100%; }
.sku-horizontal-workbench .sku-output-card-actions:has(details[open]) { flex-wrap: wrap; }
.sku-horizontal-workbench .sku-output-operation-body { padding: 10px 0 0; }
.sku-horizontal-workbench .sku-output-operation-body .sku-result-item { border: 0; padding: 0; background: transparent; }
.sku-horizontal-workbench .sku-output-operation-body .sku-result-info { padding: 0; gap: 8px; }
.sku-horizontal-workbench .sku-output-operation-body .sku-result-info h3 { display: none; }
.sku-horizontal-workbench .sku-output-operation-body :is(button, a, select) { font-size: 12px; }
.sku-horizontal-workbench .sku-output-operation-body .sku-actions { flex-wrap: wrap; }
.sku-horizontal-workbench .sku-output-operations > summary:focus-visible { outline: 2px solid var(--production-accent); outline-offset: 2px; }

/* Light SKU content area only. Application navigation and the dark theme keep their existing styles. */
@supports selector(.production-workspace:has(.sku-horizontal-workbench)) {
  html[data-theme="light"] .production-workspace:has(.sku-horizontal-workbench) {
    --sku-glass-blue: #1760ff;
    --sku-glass-coral: #ff6a3d;
    --sku-glass-lime: #b8ee47;
    --sku-glass-violet: #7d5cf1;
    --sku-glass-line: rgb(207 220 244 / 86%);
    --sku-glass-copy: #14213f;
    --sku-glass-muted: #647392;
    position: relative;
    isolation: isolate;
    background-color: #f5f8ff;
    background-image:
      linear-gradient(rgb(23 96 255 / 3%) 1px, transparent 1px),
      linear-gradient(90deg, rgb(23 96 255 / 3%) 1px, transparent 1px),
      radial-gradient(circle at 7% 94%, rgb(255 106 61 / 8%), transparent 23%),
      radial-gradient(circle at 94% 4%, rgb(125 92 241 / 7%), transparent 21%);
    background-size: 22px 22px, 22px 22px, 100% 100%, 100% 100%;
  }

  html[data-theme="light"] .production-workspace:has(.sku-horizontal-workbench) .production-split {
    position: relative;
    z-index: 1;
  }

  html[data-theme="light"] .production-workspace:has(.sku-horizontal-workbench) :is(.production-history:not(.collapsed), .production-rail, .production-stage-body) {
    border: 1px solid var(--sku-glass-line) !important;
    /* The desktop layout still declares an 8px radius later in this file. */
    border-radius: 17px !important;
    box-shadow: 0 16px 38px rgb(31 72 146 / 9%), inset 0 1px 0 rgb(255 255 255 / 78%);
    backdrop-filter: blur(18px) saturate(116%);
    -webkit-backdrop-filter: blur(18px) saturate(116%);
  }

  html[data-theme="light"] .production-workspace:has(.sku-horizontal-workbench) :is(.production-history:not(.collapsed), .production-rail) {
    background: rgb(255 255 255 / 87%) !important;
  }

  html[data-theme="light"] .production-workspace:has(.sku-horizontal-workbench) .production-stage-body {
    position: relative;
    isolation: isolate;
    background-clip: padding-box;
    background: rgb(255 255 255 / 80%) !important;
  }

  /* Keep the task-list controls from reading as one compressed line. */
  html[data-theme="light"] .production-workspace:has(.sku-horizontal-workbench) .production-history-toolbar {
    margin: 14px 0 16px !important;
  }

  html[data-theme="light"] .production-workspace:has(.sku-horizontal-workbench) :is(.production-history, .production-rail-scroll, .production-stage-body) {
    color-scheme: light;
    scrollbar-color: #b8c7e3 transparent;
  }

  html[data-theme="light"] .production-workspace:has(.sku-horizontal-workbench) .sku-parameter-panel {
    position: relative;
    overflow: hidden;
    isolation: isolate;
  }

  html[data-theme="light"] .production-workspace:has(.sku-horizontal-workbench) .sku-parameter-panel::before {
    position: absolute;
    z-index: -1;
    top: 0;
    right: 0;
    left: 0;
    height: 76px;
    content: '';
    background:
      radial-gradient(circle at 17% 10%, rgb(184 238 71 / 82%) 0 13px, transparent 14px),
      radial-gradient(circle at 30% 104%, rgb(255 106 61 / 76%) 0 22px, transparent 23px),
      radial-gradient(circle at 72% 16%, rgb(125 92 241 / 62%) 0 18px, transparent 19px),
      radial-gradient(circle at 79% 46%, rgb(23 96 255 / 30%) 0 1px, transparent 1.5px),
      linear-gradient(105deg, rgb(23 96 255 / 19%), rgb(83 145 255 / 13%) 46%, transparent 76%);
    background-size: auto, auto, auto, 12px 12px, auto;
    pointer-events: none;
  }

  html[data-theme="light"] .production-workspace:has(.sku-horizontal-workbench) :is(.sku-parameter-toolbar, .sku-parameter-columns) {
    position: relative;
    z-index: 1;
  }

  html[data-theme="light"] .production-workspace:has(.sku-horizontal-workbench) .sku-parameter-toolbar h2 {
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 12px;
    color: #fff;
    background:
      radial-gradient(circle at 84% 20%, rgb(184 238 71 / 92%) 0 7px, transparent 8px),
      radial-gradient(circle at 68% 118%, rgb(255 106 61 / 84%) 0 11px, transparent 12px),
      linear-gradient(126deg, var(--sku-glass-blue), #478eff 62%, var(--sku-glass-violet));
    box-shadow: 0 9px 20px rgb(23 96 255 / 20%);
  }

  html[data-theme="light"] .production-workspace:has(.sku-horizontal-workbench) .sku-parameter-columns {
    border-top-color: rgb(207 220 244 / 72%);
  }

  html[data-theme="light"] .production-workspace:has(.sku-horizontal-workbench) :is(.sku-parameter-group, .sku-full-frame-panel) {
    border-left-color: rgb(207 220 244 / 72%);
  }

  html[data-theme="light"] .production-workspace:has(.sku-horizontal-workbench) :is(.sku-parameter-toolbar h2, .sku-parameter-group-heading h3, .sku-direction-mode > .production-field-heading, .sku-output-heading h2, .sku-results-heading h2) {
    font-weight: 750;
  }

  /* The compact toolbar sits on the blue visual band, so its controls need a clearer light surface. */
  html[data-theme="light"] .production-workspace:has(.sku-horizontal-workbench) .sku-parameter-template > span {
    color: #344966;
    font-weight: 700;
  }

  html[data-theme="light"] .production-workspace:has(.sku-horizontal-workbench) .sku-parameter-template :is(select, .template-picker-trigger),
  html[data-theme="light"] .production-workspace:has(.sku-horizontal-workbench) .sku-parameter-actions > button:not(.primary),
  html[data-theme="light"] .production-workspace:has(.sku-horizontal-workbench) .sku-parameter-clear {
    border-color: #afbfdb;
    background: rgb(255 255 255 / 92%);
    color: #213857;
    box-shadow: 0 2px 7px rgb(24 61 123 / 7%);
    font-weight: 650;
  }

  html[data-theme="light"] .production-workspace:has(.sku-horizontal-workbench) .sku-parameter-clear {
    color: #c64918;
  }

  html[data-theme="light"] .production-workspace:has(.sku-horizontal-workbench) .sku-parameter-template :is(select, .template-picker-trigger):hover,
  html[data-theme="light"] .production-workspace:has(.sku-horizontal-workbench) .sku-parameter-actions > button:not(.primary):hover,
  html[data-theme="light"] .production-workspace:has(.sku-horizontal-workbench) .sku-parameter-clear:hover {
    border-color: #6d8fca;
    background: #fff;
  }

  html[data-theme="light"] .production-workspace:has(.sku-horizontal-workbench) .sku-parameter-actions > button:disabled {
    opacity: 1;
    border-color: #c2cfdf !important;
    background: #eef3f9 !important;
    color: #6a7b96 !important;
    box-shadow: none;
  }

  html[data-theme="light"] .production-workspace:has(.sku-horizontal-workbench) :is(.production-rail textarea, .production-rail select, .production-rail input:not([type="file"]), .sku-output-operations > summary) {
    border-color: rgb(207 220 244 / 94%);
    background: rgb(255 255 255 / 74%);
    color: var(--sku-glass-copy);
  }

  html[data-theme="light"] .production-workspace:has(.sku-horizontal-workbench) :is(.production-rail textarea, .production-rail select, .production-rail input:not([type="file"])):focus {
    border-color: var(--sku-glass-blue);
    box-shadow: 0 0 0 3px rgb(23 96 255 / 12%);
  }

  html[data-theme="light"] .production-workspace:has(.sku-horizontal-workbench) .sku-parameter-actions > .primary:not(:disabled) {
    border-color: var(--sku-glass-coral) !important;
    background: var(--sku-glass-coral) !important;
    color: #fff !important;
    box-shadow: 0 8px 18px rgb(255 106 61 / 23%);
  }

  html[data-theme="light"] .production-workspace:has(.sku-horizontal-workbench) .sku-parameter-actions > .primary:not(:disabled):hover {
    background: #ef562b !important;
    transform: translateY(-1px);
  }

  html[data-theme="light"] .production-workspace:has(.sku-horizontal-workbench) :is(.sku-image-input-body > .production-upload, .sku-full-frame-upload) {
    border-color: rgb(23 96 255 / 31%);
    border-radius: 12px;
    background: rgb(255 255 255 / 56%);
  }

  html[data-theme="light"] .production-workspace:has(.sku-horizontal-workbench) :is(.sku-image-input-body > .production-upload, .sku-full-frame-upload):hover {
    border-color: rgb(23 96 255 / 56%);
    background: rgb(23 96 255 / 4%);
  }

  html[data-theme="light"] .production-workspace:has(.sku-horizontal-workbench) .sku-mode-options button {
    border-color: rgb(207 220 244 / 94%);
    border-radius: 12px;
    background: rgb(255 255 255 / 65%);
  }

  html[data-theme="light"] .production-workspace:has(.sku-horizontal-workbench) .sku-mode-options button.active {
    border-color: rgb(255 106 61 / 68%);
    background: rgb(255 106 61 / 9%);
    box-shadow: inset 3px 0 0 var(--sku-glass-coral);
  }

  html[data-theme="light"] .production-workspace:has(.sku-horizontal-workbench) .sku-output-card {
    border-color: var(--sku-glass-line);
    border-radius: 17px;
    background: rgb(255 255 255 / 72%);
    box-shadow: 0 10px 24px rgb(31 72 146 / 7%), inset 0 1px 0 rgb(255 255 255 / 76%);
    backdrop-filter: blur(18px) saturate(116%);
    -webkit-backdrop-filter: blur(18px) saturate(116%);
  }

  html[data-theme="light"] .production-workspace:has(.sku-horizontal-workbench) :is(.sku-output-preview, .sku-output-placeholder) {
    border-radius: 12px;
    background: rgb(246 249 255 / 82%);
  }

  html[data-theme="light"] .production-workspace:has(.sku-horizontal-workbench) .sku-generation-slots {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    min-width: 0;
    margin: 0;
  }

  html[data-theme="light"] .production-workspace:has(.sku-horizontal-workbench) .sku-generation-slots[hidden] { display: none; }

  html[data-theme="light"] .production-workspace:has(.sku-horizontal-workbench) .sku-generation-slot {
    position: relative;
    display: grid;
    min-height: min(30vw, 290px);
    padding: 16px;
    overflow: hidden;
    border: 1px solid var(--sku-glass-line);
    border-radius: 17px;
    background: rgb(255 255 255 / 72%);
    box-shadow: 0 10px 24px rgb(31 72 146 / 7%), inset 0 1px 0 rgb(255 255 255 / 76%);
    place-items: center;
    text-align: center;
  }

  html[data-theme="light"] .production-workspace:has(.sku-horizontal-workbench) .sku-generation-slot[data-current] {
    border-color: rgb(255 106 61 / 54%);
  }

  html[data-theme="light"] .production-workspace:has(.sku-horizontal-workbench) .sku-generation-slot[data-current]::after {
    position: absolute;
    right: auto;
    bottom: 0;
    left: -35%;
    width: 34%;
    height: 3px;
    content: '';
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, var(--sku-glass-coral), transparent);
    animation: sku-generation-sweep 1.8s ease-in-out infinite;
  }

  html[data-theme="light"] .production-workspace:has(.sku-horizontal-workbench) .sku-generation-placeholder {
    display: grid;
    width: 92px;
    height: 92px;
    margin-top: auto;
    place-items: center;
  }

  html[data-theme="light"] .production-workspace:has(.sku-horizontal-workbench) :is(.sku-generation-image-icon, .sku-generation-image-fallback, .sku-generation-orbit) { grid-area: 1 / 1; }

  html[data-theme="light"] .production-workspace:has(.sku-horizontal-workbench) .sku-generation-image-icon {
    width: 58px;
    height: 58px;
    color: #9aa9c4;
    stroke-width: 1.55;
  }

  html[data-theme="light"] .production-workspace:has(.sku-horizontal-workbench) .sku-generation-image-fallback {
    width: 54px;
    height: 40px;
    border: 2px solid #aab7ce;
    border-radius: 10px;
  }

  html[data-theme="light"] .production-workspace:has(.sku-horizontal-workbench) .sku-generation-orbit {
    width: 82px;
    height: 82px;
    border: 3px solid rgb(23 96 255 / 16%);
    border-top-color: var(--sku-glass-coral);
    border-right-color: rgb(255 106 61 / 56%);
    border-radius: 50%;
    animation: sku-generation-spin .9s linear infinite;
  }

  html[data-theme="light"] .production-workspace:has(.sku-horizontal-workbench) .sku-generation-slot[data-state="queued"] .sku-generation-orbit {
    border-top-color: rgb(125 92 241 / 68%);
    border-right-color: rgb(125 92 241 / 28%);
    animation-duration: 1.6s;
  }

  html[data-theme="light"] .production-workspace:has(.sku-horizontal-workbench) .sku-generation-dots {
    display: flex;
    gap: 7px;
    margin: 10px 0 8px;
  }

  html[data-theme="light"] .production-workspace:has(.sku-horizontal-workbench) .sku-generation-dots i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #c6d0df;
  }

  html[data-theme="light"] .production-workspace:has(.sku-horizontal-workbench) .sku-generation-slot[data-current] .sku-generation-dots i:first-child { background: var(--sku-glass-coral); }
  html[data-theme="light"] .production-workspace:has(.sku-horizontal-workbench) .sku-generation-slot[data-state="queued"] .sku-generation-dots i:first-child { background: rgb(125 92 241 / 58%); }

  html[data-theme="light"] .production-workspace:has(.sku-horizontal-workbench) .sku-generation-copy {
    display: grid;
    gap: 5px;
    align-self: start;
    min-width: 0;
  }

  html[data-theme="light"] .production-workspace:has(.sku-horizontal-workbench) .sku-generation-copy strong { color: var(--sku-glass-copy); font-size: 14px; line-height: 20px; }
  html[data-theme="light"] .production-workspace:has(.sku-horizontal-workbench) .sku-generation-copy span { color: var(--sku-glass-muted); font-size: 12px; line-height: 18px; }
  html[data-theme="light"] .production-workspace:has(.sku-horizontal-workbench) .sku-generation-elapsed { color: var(--sku-glass-muted); font-size: 11px; font-variant-numeric: tabular-nums; }

  html[data-theme="light"] .production-workspace:has(.sku-horizontal-workbench) :is(button, input, select, textarea):focus-visible {
    outline: 2px solid var(--sku-glass-blue);
    outline-offset: 2px;
  }

  @media (prefers-reduced-transparency: reduce) {
    html[data-theme="light"] .production-workspace:has(.sku-horizontal-workbench) :is(.production-history:not(.collapsed), .production-rail, .production-stage-body, .sku-output-card, .sku-generation-slot) {
      background: #fff !important;
      backdrop-filter: none;
      -webkit-backdrop-filter: none;
    }
  }

  @media (prefers-reduced-motion: reduce) {
    html[data-theme="light"] .production-workspace:has(.sku-horizontal-workbench) :is(.sku-generation-orbit, .sku-generation-slot[data-current]::after) { animation: none; }
  }
}

@keyframes sku-generation-spin { to { transform: rotate(1turn); } }
@keyframes sku-generation-sweep { 0% { transform: translateX(0); } 100% { transform: translateX(430%); } }

@media (min-width: 1100px) {
  .production-workspace:has(.sku-horizontal-workbench) { min-height: 0 !important; }
  .production-workspace .sku-horizontal-workbench > .production-split { grid-template-columns: 220px minmax(0, 1fr) !important; grid-template-rows: auto minmax(0, 1fr) !important; grid-template-areas: 'history rail' 'history stage' !important; gap: 16px !important; }
  .production-workspace .sku-horizontal-workbench > .production-split:has(.production-history.collapsed) { grid-template-columns: 40px minmax(0, 1fr) !important; grid-template-areas: 'history rail' 'history stage' !important; }
  .production-workspace .sku-horizontal-workbench .production-history { grid-row: 1 / span 2 !important; }
  .production-workspace .sku-horizontal-workbench .production-rail { grid-row: 1 !important; height: auto !important; overflow: visible !important; display: flex; flex-direction: column; }
  .production-workspace .sku-horizontal-workbench .production-stage-body { grid-row: 2 !important; overflow: auto !important; padding: 16px 18px !important; border: 1px solid var(--line) !important; border-radius: 8px; background: var(--surface) !important; }
  .production-workspace .sku-horizontal-workbench .sku-parameter-columns { grid-template-columns: minmax(290px, 1.7fr) minmax(170px, 1fr) minmax(175px, 1.05fr) minmax(125px, .75fr) !important; gap: 18px; padding: 14px 0 0; align-items: start !important; }
  .production-workspace .sku-horizontal-workbench .production-rail textarea { font-size: 12px; line-height: 1.7; padding: 8px; }
  .production-workspace .sku-horizontal-workbench .sku-direct-input textarea { height: 132px; min-height: 120px; }
  .production-workspace .sku-horizontal-workbench .sku-direction-fields textarea { height: 60px; min-height: 54px; }
}

@media (min-width: 1100px) and (max-width: 1450px) {
  .production-workspace .sku-horizontal-workbench > .production-split { grid-template-columns: 180px minmax(0, 1fr) !important; gap: 12px !important; }
}

@media (min-width: 1100px) and (max-width: 1250px) {
  .production-workspace .sku-horizontal-workbench .sku-parameter-columns { grid-template-columns: minmax(280px, 1.25fr) minmax(170px, 1fr) minmax(175px, 1fr) !important; gap: 14px; }
  .sku-horizontal-workbench .sku-parameter-mode { grid-column: 1 / -1; padding: 12px 0 0; border-left: 0; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 16px; }
  .sku-horizontal-workbench .sku-parameter-mode > .production-field-heading { margin: 0; }
  .production-workspace .sku-horizontal-workbench .production-rail .sku-mode-options { display: flex; flex: 1; }
  .sku-horizontal-workbench .sku-mode-options button { flex: 1; }
  .sku-horizontal-workbench .sku-parameter-toolbar { gap: 8px; flex-wrap: wrap; }
  .sku-horizontal-workbench .sku-parameter-template { flex-basis: 230px; }
  .sku-horizontal-workbench .sku-result-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sku-horizontal-workbench .sku-generation-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1099px) {
  .production-workspace:has(.sku-horizontal-workbench) { height: auto !important; min-height: 0 !important; overflow: visible; }
  .production-workspace .sku-horizontal-workbench > .production-split { display: flex !important; flex-direction: column; height: auto !important; max-height: none; }
  .sku-horizontal-workbench .production-rail { order: 0; height: auto !important; overflow: visible !important; }
  .sku-horizontal-workbench .production-stage { display: block !important; order: 1; }
  .sku-horizontal-workbench .production-stage-content { display: flex !important; flex-direction: column; gap: 16px; }
  .sku-horizontal-workbench .production-history { position: static !important; max-height: 180px !important; height: auto !important; width: 100% !important; }
  .sku-horizontal-workbench .production-stage-body { height: auto !important; min-height: 400px; overflow: visible !important; padding: 16px !important; border: 1px solid var(--line) !important; border-radius: 8px; background: var(--surface) !important; }
  .production-workspace .sku-horizontal-workbench .sku-parameter-columns { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important; gap: 20px; padding-top: 16px; }
  .sku-horizontal-workbench .sku-parameter-images { grid-column: 1 / -1; }
  .sku-horizontal-workbench .sku-parameter-specs { border-left: 0; padding-left: 0; }
  .sku-horizontal-workbench .sku-parameter-mode { grid-column: 1 / -1; padding: 0; border: 0; }
  .production-workspace .sku-horizontal-workbench .production-rail .sku-mode-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sku-horizontal-workbench .sku-parameter-toolbar { flex-wrap: wrap; gap: 10px; }
  .sku-horizontal-workbench .sku-parameter-template { flex-basis: 240px; }
  .sku-horizontal-workbench .sku-parameter-actions { flex-wrap: wrap; }
  .sku-horizontal-workbench .sku-result-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sku-horizontal-workbench .sku-generation-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .sku-horizontal-workbench .sku-parameter-panel { padding: 14px; }
  .sku-horizontal-workbench .sku-parameter-template { flex-basis: calc(100% - 60px); }
  .sku-horizontal-workbench .sku-parameter-toolbar h2 { flex-basis: 100%; }
  .sku-horizontal-workbench .sku-parameter-actions { width: 100%; }
  .sku-horizontal-workbench .sku-parameter-actions > button { flex: 1; padding-inline: 8px; }
  .production-workspace .sku-horizontal-workbench .sku-parameter-columns { grid-template-columns: minmax(0, 1fr) !important; }
  .sku-horizontal-workbench .sku-parameter-direction { padding-left: 0; border-left: 0; }
  .sku-horizontal-workbench .sku-image-input-body { gap: 12px; }
  .sku-horizontal-workbench .sku-full-frame-panel { padding-left: 12px; }
  .sku-horizontal-workbench .sku-result-card-grid { grid-template-columns: minmax(0, 1fr); }
  .sku-horizontal-workbench .sku-generation-slots { grid-template-columns: minmax(0, 1fr); }
  .sku-horizontal-workbench .sku-generation-slot { min-height: 230px; }
  .sku-horizontal-workbench .sku-results-heading { margin-top: 0 !important; padding-left: 0; }
}
