/* Apple Creative Studio v3 — Pure White Gallery & Clean 3-Pane Workspace */
:root {
  --apple-canvas: #ffffff;
  --apple-sidebar: #f5f5f7;
  --apple-assistant: #fbfbfd;
  --apple-control-bg: #f2f2f7;
  --apple-surface-subtle: #fafafc;
  --apple-ink: #1d1d1f;
  --apple-muted: #6e6e73;
  --apple-faint: #86868b;
  --apple-blue: #0071e3;
  --apple-blue-hover: #0077ed;
  --apple-link: #0066cc;
  --apple-blue-soft: rgba(0, 113, 227, 0.10);
  --apple-line: rgba(0, 0, 0, 0.08);
  --apple-line-strong: rgba(0, 0, 0, 0.14);
  --apple-ok-bg: #eaf7ee;
  --apple-ok-ink: #1f6b3a;
  --apple-warn-bg: #fff6e6;
  --apple-warn-ink: #995c00;
  --apple-err-bg: #fff0f0;
  --apple-err-ink: #b92b27;
}

body.apple-studio-v3 {
  margin: 0;
  background: var(--apple-canvas);
  color: var(--apple-ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "PingFang SC", "Hiragino Sans GB", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.studio-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr) 356px;
  height: 100dvh;
  overflow: hidden;
  background: var(--apple-canvas);
}

/* 1. Left Sidebar */
.studio-sidebar {
  background: var(--apple-sidebar);
  border-right: 1px solid var(--apple-line);
  display: flex;
  flex-direction: column;
  padding: 14px 12px 12px;
  gap: 10px;
  min-height: 0;
}

.sidebar-top {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 4px 6px;
  text-decoration: none;
  color: var(--apple-ink);
  font-size: 14px;
}

.brand-mark {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--apple-ink);
  color: #ffffff;
  display: inline-grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
}

.brand-text {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
}

.brand-text strong {
  font-weight: 600;
  letter-spacing: -0.015em;
}

.brand-sub {
  color: var(--apple-muted);
  font-size: 11px;
  font-weight: 500;
}

.sidebar-create-btn {
  min-height: 36px !important;
  border-radius: 999px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  padding: 6px 14px !important;
}

.sidebar-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px 2px;
  font-size: 11px;
  font-weight: 600;
  color: var(--apple-faint);
  letter-spacing: 0.02em;
}

.sidebar-count {
  background: rgba(0, 0, 0, 0.06);
  color: var(--apple-muted);
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
}

.studio-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 2px;
}

.studio-project {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 9px 11px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  cursor: pointer;
  transition: background-color 140ms ease;
}

.studio-project:hover {
  background: rgba(0, 0, 0, 0.04);
}

.studio-project.selected {
  background: var(--apple-blue-soft);
}

.studio-project strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--apple-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.studio-project.selected strong {
  color: var(--apple-link);
}

.studio-project small,
.studio-project span {
  font-size: 11px;
  color: var(--apple-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.studio-empty {
  font-size: 12px;
  color: var(--apple-muted);
  padding: 12px 8px;
  line-height: 1.65;
}

.sidebar-footer {
  border-top: 1px solid var(--apple-line);
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-health-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 4px;
}

.health-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--apple-muted);
  min-width: 0;
}

.health-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.health-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #28a745;
  flex-shrink: 0;
}

.health-dot.warn { background: #d9822b; }
.health-dot.alert { background: #d93025; }

.sidebar-utility-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 0 4px;
}

.subtle-link-btn,
.subtle-icon-btn {
  border: 0;
  background: transparent;
  color: var(--apple-link);
  font-size: 12px;
  padding: 4px 6px;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
}

.subtle-icon-btn {
  color: var(--apple-muted);
}

.subtle-link-btn:hover,
.subtle-icon-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* 2. Center Main Column */
.studio-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: var(--apple-canvas);
}

.studio-topbar {
  height: 52px;
  flex-shrink: 0;
  padding: 0 22px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--apple-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.mobile-sidebar-btn {
  display: none;
  border: 1px solid var(--apple-line);
  background: var(--apple-control-bg);
  color: var(--apple-ink);
  border-radius: 999px;
  font-size: 12px;
  padding: 4px 10px;
}

.topbar-project-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--apple-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.stage-tabs {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: var(--apple-control-bg);
  padding: 3px;
  border-radius: 999px;
}

.stage-tab {
  border: 0;
  background: transparent;
  color: var(--apple-muted);
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease;
}

.stage-tab[aria-pressed="true"] {
  background: #ffffff;
  color: var(--apple-ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.wallet-pill {
  font-size: 12px;
  font-weight: 500;
  color: var(--apple-ink);
  background: var(--apple-control-bg);
  padding: 5px 11px;
  border-radius: 999px;
  white-space: nowrap;
}

.studio-canvas {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 26px 32px 48px;
  background: var(--apple-canvas);
}

.canvas-inner {
  max-width: 820px;
  margin: 0 auto;
}

.canvas-meta-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.canvas-heading h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--apple-ink);
}

.canvas-heading .muted {
  margin-top: 4px;
  font-size: 13px;
  color: var(--apple-muted);
}

.canvas-stage-wrap {
  position: relative;
}

/* Progress strip & checkpoint pills */
.checkpoint-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.checkpoint-pill {
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--apple-control-bg);
  color: var(--apple-muted);
}

.checkpoint-pill.active {
  background: var(--apple-blue-soft);
  color: var(--apple-link);
  font-weight: 500;
}

.checkpoint-pill.done {
  background: var(--apple-ok-bg);
  color: var(--apple-ok-ink);
  font-weight: 500;
}

.checkpoint-pill.locked {
  opacity: 0.65;
}

.studio-steps {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.studio-steps li {
  border: 1px solid var(--apple-line);
  background: var(--apple-surface-subtle);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.studio-steps li strong {
  font-size: 12px;
  color: var(--apple-ink);
}

.studio-steps li span {
  font-size: 11px;
  color: var(--apple-muted);
}

.studio-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.studio-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.studio-section-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.section-head-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.badge-free {
  background: var(--apple-ok-bg);
  color: var(--apple-ok-ink);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
}

.checkpoint-notice {
  background: var(--apple-surface-subtle);
  border: 1px solid var(--apple-line);
  border-radius: 12px;
  padding: 12px 15px;
  font-size: 13px;
  color: var(--apple-muted);
  line-height: 1.65;
}

.checkpoint-post-delivery {
  background: var(--apple-warn-bg);
  border-color: rgba(153, 92, 0, 0.16);
  color: var(--apple-warn-ink);
}

.studio-script {
  background: #ffffff;
  border: 1px solid var(--apple-line);
  border-radius: 16px;
  padding: 24px 28px;
  font-size: 15px;
  line-height: 1.84;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--apple-ink);
}

.studio-script-editor-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid var(--apple-blue);
  border-radius: 16px;
  padding: 18px;
  background: #ffffff;
}

.studio-script-editor {
  width: 100%;
  min-height: 360px;
  border: 1px solid var(--apple-line-strong);
  border-radius: 12px;
  padding: 14px 16px;
  font: 14px/1.78 -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", sans-serif;
  color: var(--apple-ink);
  background: var(--apple-surface-subtle);
  resize: vertical;
}

.studio-script-note-input {
  width: 100%;
  border: 1px solid var(--apple-line);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
}

.scene-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.scene-card {
  border: 1px solid var(--apple-line);
  border-radius: 12px;
  padding: 14px 16px;
  background: var(--apple-surface-subtle);
}

.scene-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.scene-card-head strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--apple-ink);
}

.scene-duration-chip {
  font-size: 11px;
  color: var(--apple-muted);
  background: rgba(0, 0, 0, 0.05);
  padding: 2px 8px;
  border-radius: 999px;
}

.scene-card p {
  margin: 0;
  font-size: 12px;
  line-height: 1.65;
  color: var(--apple-muted);
}

.studio-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

/* Apple Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 7px 15px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 140ms ease, opacity 140ms ease;
}

.button-compact {
  min-height: 30px !important;
  padding: 5px 12px !important;
  font-size: 12px !important;
  border-radius: 999px !important;
}

.button-primary {
  background: var(--apple-blue) !important;
  color: #ffffff !important;
  border-color: var(--apple-blue) !important;
}

.button-primary:hover:not(:disabled) {
  background: var(--apple-blue-hover) !important;
}

.button-quiet {
  background: #ffffff !important;
  color: var(--apple-ink) !important;
  border: 1px solid var(--apple-line-strong) !important;
}

.button-quiet:hover:not(:disabled) {
  background: var(--apple-control-bg) !important;
}

.button-full {
  width: 100%;
}

/* Lookbook & Film Review Cards */
.lookbook-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.asset-card {
  border: 1px solid var(--apple-line);
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
}

.asset-preview {
  display: block;
  width: 100%;
  height: 156px;
  object-fit: cover;
  background: var(--apple-control-bg);
}

.asset-card-body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.asset-card-body strong {
  font-size: 13px;
}

.missing-popover {
  border: 1px solid rgba(153, 92, 0, 0.2);
  background: var(--apple-warn-bg);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 13px;
  color: var(--apple-warn-ink);
}

.studio-task-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.studio-task-card {
  border: 1px solid var(--apple-line);
  border-radius: 14px;
  padding: 16px 18px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.studio-task-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.studio-task-media {
  width: 100%;
  max-height: 360px;
  border-radius: 10px;
  background: #000000;
  object-fit: contain;
}

.studio-review-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--apple-line);
}

.studio-review-box textarea {
  width: 100%;
  min-height: 64px;
  border: 1px solid var(--apple-line-strong);
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
}

.studio-review-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12px;
}

.studio-review-checks label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.studio-delivered-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--apple-ok-bg);
  color: var(--apple-ok-ink);
  font-size: 12px;
  font-weight: 600;
  align-self: flex-start;
}

/* Swarm activity HUD (clean non-overlapping bottom-right stack in center pane) */
.swarm-overlay {
  pointer-events: none;
  position: fixed;
  right: 376px;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  z-index: 40;
}

.swarm-cursor {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(29, 29, 31, 0.88);
  backdrop-filter: saturate(180%) blur(12px);
  color: #ffffff;
  padding: 5px 11px;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  transition: opacity 280ms ease, transform 240ms ease;
}

.swarm-pointer {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #30d158;
  flex-shrink: 0;
}

.swarm-tag {
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

/* 3. Right Assistant Pane */
.studio-assistant {
  background: var(--apple-assistant);
  border-left: 1px solid var(--apple-line);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.assistant-head {
  height: 52px;
  flex-shrink: 0;
  padding: 0 16px;
  border-bottom: 1px solid var(--apple-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #ffffff;
}

.assistant-head strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
}

.assistant-head span {
  display: block;
  font-size: 11px;
}

.count-badge {
  display: inline-block;
  min-width: 16px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--apple-control-bg);
  color: var(--apple-ink);
  font-size: 11px;
}

.archive-drawer {
  max-height: 220px;
  overflow-y: auto;
  padding: 12px 14px;
  border-bottom: 1px solid var(--apple-line);
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.archive-item {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--apple-line);
  border-radius: 10px;
  padding: 8px;
  background: var(--apple-surface-subtle);
}

.archive-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--apple-control-bg);
  display: grid;
  place-items: center;
  font-size: 11px;
  color: var(--apple-muted);
  flex-shrink: 0;
}

.archive-meta {
  flex: 1;
  min-width: 0;
}

.archive-meta strong {
  display: block;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.archive-meta p {
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--apple-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.subtle-action {
  border: 0;
  background: transparent;
  color: var(--apple-link);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
}

.subtle-action:hover {
  background: var(--apple-blue-soft);
}

.assistant-thread {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-bubble {
  border-radius: 14px;
  padding: 10px 13px;
  font-size: 13px;
  line-height: 1.62;
  max-width: 92%;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.chat-bubble.assistant {
  background: #ffffff;
  border: 1px solid var(--apple-line);
  align-self: flex-start;
  color: var(--apple-ink);
}

.chat-bubble.user {
  background: var(--apple-blue);
  color: #ffffff;
  align-self: flex-end;
}

.chat-bubble-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 10px;
  opacity: 0.72;
  margin-bottom: 4px;
}

.assistant-composer {
  padding: 12px 14px;
  border-top: 1px solid var(--apple-line);
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.composer-context,
.pending-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.context-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--apple-blue-soft);
  color: var(--apple-link);
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 999px;
}

.context-chip button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 0 2px;
}

.assistant-composer textarea {
  width: 100%;
  min-height: 68px;
  border: 1px solid var(--apple-line-strong);
  border-radius: 12px;
  padding: 9px 12px;
  font: inherit;
  font-size: 13px;
  resize: none;
  background: var(--apple-surface-subtle);
  color: var(--apple-ink);
}

.composer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.upload-actions {
  display: flex;
  gap: 6px;
}

.upload-btn {
  border: 1px solid var(--apple-line);
  background: #ffffff;
  color: var(--apple-ink);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
}

.upload-btn:hover {
  background: var(--apple-control-bg);
}

/* Modals */
dialog {
  border: 1px solid var(--apple-line);
  border-radius: 18px;
  padding: 22px 24px;
  width: min(440px, calc(100vw - 32px));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.16);
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(4px);
}

.studio-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dialog-heading h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.icon-button {
  border: 0;
  background: var(--apple-control-bg);
  color: var(--apple-muted);
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 12px;
  cursor: pointer;
}

.field-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--apple-muted);
  margin-top: 4px;
}

.studio-form input,
.studio-form select {
  border: 1px solid var(--apple-line-strong);
  border-radius: 10px;
  padding: 8px 11px;
  font: inherit;
}

.quote-summary-box {
  background: var(--apple-surface-subtle);
  border: 1px solid var(--apple-line);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quote-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.quote-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 6px;
}

.inline-error {
  background: var(--apple-err-bg);
  color: var(--apple-err-ink);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 12px;
}

.studio-advanced-details {
  border: 1px solid var(--apple-line);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13px;
}

.studio-advanced-details summary {
  cursor: pointer;
  color: var(--apple-muted);
}

.invite-links-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Unified Studio SSO Login Card */
.sso-login-card {
  max-width: 420px;
  margin: 36px auto;
  border: 1px solid var(--apple-line);
  border-radius: 20px;
  padding: 28px;
  background: #ffffff;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sso-login-card h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.sso-login-card input {
  width: 100%;
  border: 1px solid var(--apple-line-strong);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
}

/* Stage 2 Material Checklist & 3-Tier Triage */
.checklist-card {
  border: 1px solid var(--apple-line);
  background: var(--apple-surface-subtle);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.checklist-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.checklist-items {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  color: var(--apple-ink);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.engine-selector-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border: 1px solid var(--apple-line);
  border-radius: 12px;
  padding: 10px 14px;
  background: #ffffff;
}

.engine-selector-row select {
  border: 1px solid var(--apple-line-strong);
  border-radius: 999px;
  padding: 5px 12px;
  font: inherit;
  font-size: 12px;
  background: var(--apple-control-bg);
}

.triage-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.triage-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 999px;
}

.triage-primary { background: var(--apple-ok-bg); color: var(--apple-ok-ink); }
.triage-adapt_or_montage { background: var(--apple-warn-bg); color: var(--apple-warn-ink); }
.triage-archive_skip { background: var(--apple-control-bg); color: var(--apple-muted); }

.highlight-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--apple-blue-soft);
  color: var(--apple-link);
}

.triage-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 4px;
}

.triage-btn {
  border: 1px solid var(--apple-line);
  background: #ffffff;
  color: var(--apple-muted);
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 999px;
  cursor: pointer;
}

.triage-btn.active {
  background: var(--apple-ink);
  color: #ffffff;
  border-color: var(--apple-ink);
}

/* Responsive tablet/narrow screens */
@media (max-width: 1180px) {
  .studio-shell {
    grid-template-columns: 216px minmax(0, 1fr) 316px;
  }
}

@media (max-width: 900px) {
  .studio-shell {
    grid-template-columns: minmax(0, 1fr);
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }
  .studio-sidebar {
    display: none;
  }
  .studio-sidebar.open {
    display: flex;
    position: fixed;
    inset: 0 auto 0 0;
    width: 260px;
    z-index: 60;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  }
  .mobile-sidebar-btn {
    display: inline-flex;
  }
  .scene-card-grid,
  .studio-steps {
    grid-template-columns: 1fr;
  }
}
