:root {
  --bg: #eef2ef;
  --surface: #ffffff;
  --surface-muted: #f6f8f6;
  --line: #dfe6e1;
  --line-strong: #cbd7d0;
  --ink: #1b2521;
  --muted: #748078;
  --muted-strong: #52605a;
  --teal: #0e817a;
  --teal-soft: #d9f0eb;
  --coral: #d7654e;
  --coral-soft: #f8e2dc;
  --blue: #3568a8;
  --blue-soft: #e0e8f4;
  --yellow: #c28c2c;
  --shadow: 0 9px 28px rgba(30, 52, 43, 0.06);
  --shadow-soft: 0 2px 10px rgba(30, 52, 43, 0.05);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  font-family: Inter, "SF Pro Display", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

* { box-sizing: border-box; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
body { margin: 0; background: var(--bg); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; display: flex; }
.sidebar { width: 252px; flex: 0 0 252px; background: #17241f; color: #e7f0eb; padding: 26px 18px 18px; display: flex; flex-direction: column; }
.brand-lockup { display: flex; align-items: center; gap: 11px; padding: 0 10px 30px; }
.brand-mark { width: 35px; height: 35px; border: 1px solid #75c9bb; color: #bcf2e7; display: grid; place-items: center; font-size: 12px; font-weight: 800; letter-spacing: 0; }
.brand-name { font-weight: 800; letter-spacing: 0; font-size: 15px; }
.brand-sub { color: #91a9a1; font-size: 11px; margin-top: 3px; }
.workspace-label, .section-kicker { color: #91a39b; font-size: 10px; letter-spacing: .08em; font-weight: 800; text-transform: uppercase; }
.workspace-label { padding: 0 12px 10px; }
.workspace-mode { float: right; color: #5fc3b2; font-size: 8px; letter-spacing: .12em; }
.nav-list { display: grid; gap: 3px; }
.nav-section-label { padding: 13px 12px 4px; color: #657d73; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; font-weight: 800; }
.nav-section-spaced { margin-top: 10px; }
.nav-item { border: 1px solid transparent; border-radius: 6px; background: transparent; color: #9eb0a9; text-align: left; padding: 11px 12px; display: flex; align-items: center; gap: 11px; font-size: 13px; transition: background 160ms var(--ease-out), border-color 160ms var(--ease-out), color 160ms var(--ease-out), transform 120ms var(--ease-out); }
.nav-item:hover, .nav-item.active { background: #253831; border-color: #345148; color: #ecfffa; }
.nav-item.active { box-shadow: inset 3px 0 0 #6ed1c2; }
.nav-icon { width: 18px; text-align: center; color: #6ed1c2; font-size: 14px; }
.sidebar-bottom { margin-top: auto; display: grid; gap: 14px; }
.health-card { border-top: 1px solid #34463e; padding: 16px 10px 0; }
.health-line { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #d2e5de; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #e4aa4f; display: inline-block; }
.status-dot.ok { background: #59c9ad; }
.health-meta { font-size: 10px; color: #71877f; margin-top: 7px; }
.user-chip { border: 1px solid #34463e; background: #24342e; color: #dbeae5; border-radius: 5px; padding: 10px; display: flex; align-items: center; gap: 9px; text-align: left; }
.avatar { width: 28px; height: 28px; background: #d4a25e; color: #372b1d; display: grid; place-items: center; border-radius: 50%; font-weight: 800; font-size: 12px; }
.user-copy { display: grid; gap: 2px; flex: 1; }
.user-copy strong { font-size: 12px; }
.user-copy small { font-size: 10px; color: #92aaa1; }
.user-action { border: 0; background: transparent; color: #9fc4b8; padding: 4px; font-size: 10px; text-decoration: none; }
.user-action:hover { color: #ecfffa; }
.hidden { display: none !important; }
.chevron { color: #8da69d; }
.main-content { min-width: 0; flex: 1; padding: 32px clamp(24px, 4vw, 62px) 56px; max-width: 1640px; }
.topbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 26px; margin-bottom: 22px; }
.eyebrow { color: var(--muted); font-size: 11px; letter-spacing: 0; margin-bottom: 7px; }
h1, h2, p { margin: 0; }
h1 { font-size: 28px; letter-spacing: -.02em; font-weight: 760; }
h2 { font-size: 17px; letter-spacing: 0; }
.page-heading-copy { min-width: 0; }
.page-context { color: var(--muted); font-size: 11px; margin-top: 6px; }
.top-actions { display: flex; gap: 8px; align-items: center; }
.project-switcher { display: grid; gap: 4px; min-width: 190px; }
.switcher-label { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; }
.icon-button, .secondary-button, .primary-button, .quiet-button { border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); border-radius: 6px; min-height: 36px; padding: 0 13px; font-size: 12px; transition: transform 140ms var(--ease-out), border-color 160ms var(--ease-out), background 160ms var(--ease-out), color 160ms var(--ease-out), box-shadow 160ms var(--ease-out); }
button:active { transform: scale(.98); }
.icon-button { width: 36px; padding: 0; font-size: 18px; color: var(--muted-strong); }
.primary-button { background: var(--teal); border-color: var(--teal); color: white; font-weight: 700; }
.primary-button:hover { background: #096d67; }
.primary-button.is-loading,
.primary-button.is-loading:hover,
.secondary-button.is-loading,
.secondary-button.is-loading:hover,
button.is-loading:disabled {
  position: relative;
  overflow: hidden;
  background: #929b96;
  border-color: #929b96;
  color: #fff;
  cursor: wait;
  opacity: 1;
  box-shadow: none;
}
.button-loading-content { position: relative; z-index: 2; display: inline-flex; align-items: center; justify-content: center; min-width: 0; max-width: 100%; }
.button-loading-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.loading-dots { display: inline-flex; align-items: center; flex: 0 0 18px; gap: 3px; margin-left: 7px; min-width: 18px; }
.loading-dots i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .35; animation: loading-dot 1.05s infinite ease-in-out; }
.loading-dots i:nth-child(2) { animation-delay: .14s; }
.loading-dots i:nth-child(3) { animation-delay: .28s; }
@keyframes loading-dot { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-2px); } }
.button-loading-progress { position: absolute; z-index: 1; right: 0; bottom: 0; left: 0; height: 3px; overflow: hidden; visibility: hidden; opacity: 0; background: rgba(255, 255, 255, .24); pointer-events: none; transition: opacity 160ms var(--ease-out); }
.button-loading-progress > i { display: block; width: 100%; height: 100%; background: currentColor; opacity: .9; transform: scaleX(var(--button-loading-progress, 0)); transform-origin: left center; transition: transform 240ms var(--ease-out); }
button.is-loading.is-determinate .button-loading-progress { visibility: visible; opacity: 1; }
@media (prefers-reduced-motion: reduce) { .loading-dots i { animation: none; opacity: .75; } .button-loading-progress, .button-loading-progress > i { transition: none; } }
.primary-button.small { min-height: 32px; padding: 0 11px; font-size: 11px; }
.primary-button.full { width: 100%; margin-top: 18px; }
.secondary-button:hover, .quiet-button:hover, .icon-button:hover { border-color: var(--teal); color: var(--teal); }
.quiet-button { min-height: 28px; padding: 0 9px; background: transparent; color: var(--muted-strong); }
.danger-button { min-height: 28px; padding: 0 9px; border: 1px solid #e8c4bb; border-radius: 4px; background: #fff; color: #b84d39; font-size: 10px; }
.danger-button:hover { background: #fff4f1; border-color: #d98b7b; }
.danger-button.is-loading:disabled { background: #929b96; border-color: #929b96; color: #fff; }
.row-actions { display: flex; align-items: center; gap: 5px; flex: 0 0 auto; }
.content-view.hidden { display: none; }
.summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 14px; }
.metric-card { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 17px 18px; min-height: 117px; box-shadow: var(--shadow-soft); }
.metric-card.accent-teal { border-top: 3px solid var(--teal); }
.metric-card.accent-coral { border-top: 3px solid var(--coral); }
.metric-label, .result-label { color: var(--muted); font-size: 11px; }
.metric-value { margin: 14px 0 6px; font-size: 27px; line-height: 1; font-weight: 780; }
.metric-unit { color: var(--muted); font-size: 13px; font-weight: 500; }
.metric-foot { color: var(--muted); font-size: 11px; }
.trend-up { color: var(--teal); font-weight: 700; margin-right: 4px; }
.metric-highlight { color: var(--ink); font-weight: 700; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; margin: 28px 0 12px; }
.section-heading h2 { margin-top: 6px; }
.step-status, .live-badge { color: var(--teal); background: var(--teal-soft); border-radius: 20px; padding: 6px 9px; font-size: 11px; font-weight: 700; }
.workflow-strip { display: flex; align-items: center; background: rgba(255,255,255,.82); border: 1px solid var(--line); padding: 10px 14px; border-radius: 8px; box-shadow: var(--shadow-soft); backdrop-filter: blur(10px); }
.workflow-step { border: 1px solid transparent; border-radius: 6px; background: transparent; display: flex; align-items: center; gap: 9px; text-align: left; color: var(--muted); padding: 7px 8px; flex: 1; min-width: 0; transition: background 160ms var(--ease-out), border-color 160ms var(--ease-out); }
.workflow-step:hover { background: var(--surface-muted); border-color: var(--line); }
.workflow-step strong, .workflow-step small { display: block; }
.workflow-step strong { color: var(--muted-strong); font-size: 12px; }
.workflow-step small { margin-top: 3px; font-size: 10px; white-space: nowrap; }
.workflow-step.active strong, .workflow-step.done strong { color: var(--ink); }
.workflow-step.active .step-number { background: var(--teal); color: white; }
.workflow-step.done .step-number { background: var(--teal-soft); color: var(--teal); }
.step-number { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 8px; background: #edf0ec; color: #9aa59f; font-size: 10px; font-weight: 800; flex: 0 0 auto; }
.step-connector { height: 1px; background: var(--line); flex: 0 0 26px; }
.step-connector.done { background: #9ed6cd; }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(340px, .94fr); gap: 14px; margin-top: 14px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; box-shadow: var(--shadow); padding: 19px; min-width: 0; }
.panel-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 17px; }
.panel-header h2 { margin-top: 5px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px 12px; }
.field { display: grid; gap: 7px; min-width: 0; }
.field > span { font-size: 11px; color: var(--muted-strong); font-weight: 700; }
.field-span-2 { grid-column: span 2; }
input, textarea, select { width: 100%; border: 1px solid var(--line); border-radius: 4px; background: var(--surface-muted); color: var(--ink); padding: 10px 11px; outline: none; font-size: 12px; }
input:focus, textarea:focus, select:focus { border-color: #73bdb3; background: #fff; box-shadow: 0 0 0 3px rgba(14, 129, 122, .09); }
textarea { resize: vertical; min-height: 58px; line-height: 1.5; }
.panel-footer { border-top: 1px solid var(--line); margin-top: 17px; padding-top: 13px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.save-hint { color: var(--muted); font-size: 10px; }
.positioning-result { display: grid; gap: 9px; }
.result-block { background: var(--surface-muted); border: 1px solid var(--line); padding: 13px; border-radius: 4px; }
.dark-result { background: #22332d; border-color: #22332d; color: #e8f7f0; }
.dark-result .result-label { color: #9fc7ba; }
.dark-result strong { display: block; font-size: 16px; margin-top: 8px; }
.dark-result p { color: #bad9d0; margin-top: 6px; font-size: 11px; line-height: 1.5; }
.tag-list, .keyword-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.tag, .keyword { border-radius: 3px; padding: 6px 8px; font-size: 11px; }
.tag { color: var(--teal); background: var(--teal-soft); }
.keyword { color: var(--blue); background: var(--blue-soft); }
.account-list { display: grid; gap: 7px; margin-top: 9px; }
.account-list span { font-size: 11px; color: var(--muted-strong); display: flex; align-items: center; gap: 7px; }
.account-list span::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--yellow); }
.benchmark-panel, .copy-panel { min-height: 284px; }
.benchmark-input-row { display: grid; grid-template-columns: minmax(0, 1fr) 92px auto auto; gap: 7px; }
.benchmark-input-row textarea { width: 100%; min-height: 36px; resize: vertical; padding: 9px 10px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--surface); color: var(--ink); font: inherit; }
.benchmark-list { display: grid; gap: 9px; margin-top: 14px; }
.benchmark-item { border: 1px solid var(--line); padding: 11px; border-radius: 4px; display: grid; gap: 8px; }
.benchmark-top { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.benchmark-title { font-size: 12px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.platform-chip { font-size: 10px; color: var(--coral); background: var(--coral-soft); padding: 4px 6px; border-radius: 3px; }
.benchmark-url { color: var(--muted); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.benchmark-analysis { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.analysis-chip { background: var(--surface-muted); padding: 7px; font-size: 10px; color: var(--muted-strong); line-height: 1.4; }
.analysis-chip b { display: block; color: var(--muted); font-size: 9px; margin-bottom: 3px; }
.analysis-wide { grid-column: 1 / -1; }
.analysis-chip pre { margin: 0; white-space: pre-wrap; font: inherit; }
.copy-mode-group { display: grid; gap: 5px; }
.copy-control-label { color: var(--muted); font-size: 9px; letter-spacing: 0; text-transform: uppercase; }
.copy-content { padding-top: 14px; }
.script-box { border-left: 3px solid var(--coral); padding: 2px 0 2px 13px; white-space: pre-line; color: var(--muted-strong); font-size: 13px; line-height: 1.8; }
.title-block { display: grid; gap: 8px; }
.copy-value { background: var(--surface-muted); padding: 10px; font-size: 12px; line-height: 1.5; }
.shot-list { display: grid; gap: 7px; }
.shot-row { display: flex; align-items: center; gap: 9px; font-size: 12px; }
.shot-index { width: 22px; height: 22px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); font-size: 10px; font-weight: 800; }
.asset-toolbar { display: flex; gap: 9px; align-items: center; margin-bottom: 14px; }
.asset-toolbar input { max-width: 300px; }
.asset-toolbar select { width: 120px; }
.toolbar-count { color: var(--muted); font-size: 11px; margin-left: auto; }
.asset-grid, .template-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; }
.asset-card, .template-card { border: 1px solid var(--line); background: var(--surface); border-radius: 5px; overflow: hidden; }
.asset-thumb { width: 100%; height: 128px; position: relative; display: flex; align-items: flex-end; padding: 0; border: 0; border-radius: 0; overflow: hidden; color: white; font-size: 10px; letter-spacing: 0; text-align: left; }
.asset-thumb.scene { background: #59766f; }
.asset-thumb.product { background: #ac7957; }
.asset-thumb.case { background: #5b6e88; }
.asset-thumb.other { background: #6c736d; }
.asset-thumb img, .asset-thumb video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #26332e; }
.asset-kind-label { position: relative; z-index: 2; margin: 10px; padding: 4px 6px; background: rgba(22, 32, 28, .78); color: white; font-size: 9px; font-weight: 800; }
.asset-play-mark { position: absolute; z-index: 2; inset: 50% auto auto 50%; transform: translate(-50%, -50%); width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .88); color: #20302a; font-size: 13px; padding-left: 2px; }
.asset-type-mark { margin: auto; font-size: 15px; font-weight: 800; letter-spacing: 0; color: rgba(255, 255, 255, .9); }
.asset-info { padding: 11px; display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.asset-info > div { min-width: 0; }
.asset-info strong, .asset-info small { display: block; }
.asset-info strong { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asset-info small { color: var(--muted); font-size: 10px; margin-top: 4px; }
.asset-upload-actions { align-items: flex-end; }
.asset-upload-category { display: grid; gap: 4px; min-width: 142px; }
.asset-upload-category span { color: var(--muted); font-size: 9px; }
.asset-upload-category select { min-height: 36px; }
.workspace-page .modal.asset-category-modal { width: min(440px, calc(100vw - 32px)); }
.asset-category-modal .modal-header p { max-width: 330px; margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
.workspace-page .modal.asset-category-manager-modal { width: min(660px, calc(100vw - 32px)); max-height: min(760px, calc(100vh - 32px)); overflow: hidden; background: rgba(248, 252, 251, .93); border: 1px solid rgba(255, 255, 255, .92); backdrop-filter: blur(28px) saturate(150%); }
.asset-category-manager-modal .modal-header { margin-bottom: 14px; }
.asset-category-manager-modal .modal-header p { max-width: 500px; margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.asset-category-create { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.asset-category-manager-actions { display: flex; align-items: center; gap: 10px; margin: 10px 0 12px; }
.asset-category-manager-actions small { color: var(--muted); font-size: 9px; line-height: 1.45; }
.asset-category-list { display: grid; gap: 7px; max-height: min(430px, calc(100vh - 320px)); overflow: auto; padding: 2px; }
.asset-category-list-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 9px; border: 1px solid rgba(89, 126, 138, .22); border-radius: 5px; background: rgba(255, 255, 255, .66); }
.asset-category-edit { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 9px; min-width: 0; }
.asset-category-edit input { min-height: 34px; padding-block: 7px; }
.asset-category-edit small { min-width: 58px; color: var(--muted); font-size: 9px; text-align: right; }
.asset-category-list-item .danger-button:disabled { opacity: .42; cursor: not-allowed; }
.template-preview { height: 162px; padding: 15px; display: flex; flex-direction: column; justify-content: space-between; }
.template-preview span { font-size: 10px; letter-spacing: 0; }
.template-preview b { font-size: 29px; letter-spacing: 0; }
.qa-preview { background: #2b3a39; color: #e7f5ef; }
.whiteboard-preview { background: #eee9d7; color: #5e5d52; }
.film-preview { background: #252a30; color: #eef1f5; }
.template-info { padding: 13px; display: grid; gap: 7px; }
.template-info strong { font-size: 13px; }
.template-info span { font-size: 11px; color: var(--muted); }
.template-info .quiet-button { justify-self: start; margin-top: 3px; }
.template-card.selected { border-color: var(--teal); box-shadow: 0 0 0 2px rgba(14,129,122,.1); }
.history-list { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.history-row { display: flex; align-items: center; gap: 11px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.history-row:last-child { border-bottom: 0; }
.history-row > div { flex: 1; }
.history-row strong, .history-row small { display: block; }
.history-row strong { font-size: 12px; }
.history-row small { color: var(--muted); font-size: 10px; margin-top: 4px; }
.history-type { width: 28px; height: 28px; display: grid; place-items: center; font-size: 11px; font-weight: 800; }
.history-type.teal { background: var(--teal-soft); color: var(--teal); }
.history-type.coral { background: var(--coral-soft); color: var(--coral); }
.history-type.blue { background: var(--blue-soft); color: var(--blue); }
.copy-source-controls { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(230px, .9fr); gap: 18px; padding: 16px 18px; border-bottom: 1px solid var(--line); background: var(--surface-subtle); }
.copy-source-controls textarea { resize: vertical; min-height: 84px; }
.copy-source-options { display: grid; align-content: center; gap: 8px; }
.copy-source-options small { color: var(--muted); line-height: 1.55; }
.copy-benchmark-references { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 14px; }
.copy-reference-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; color: var(--muted); }
.copy-reference-heading strong { display: block; color: var(--ink); font-size: 13px; }
.copy-reference-heading small { display: block; margin-top: 4px; line-height: 1.5; }
.copy-reference-heading > span { white-space: nowrap; font-size: 12px; color: var(--teal); }
.copy-reference-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.copy-reference-option { display: flex; gap: 9px; align-items: flex-start; min-width: 0; padding: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.28); cursor: pointer; }
.copy-reference-option input { margin-top: 3px; flex: 0 0 auto; }
.copy-reference-option span { min-width: 0; display: grid; gap: 3px; }
.copy-reference-option strong, .copy-reference-option small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy-reference-option small, .copy-reference-empty { color: var(--muted); font-size: 12px; }
.copy-reference-empty { padding: 10px 0; }
.copy-reference-used { display: grid; gap: 4px; margin-bottom: 12px; padding: 10px 12px; border-left: 2px solid var(--teal); background: rgba(45, 148, 141, .08); color: var(--muted); font-size: 12px; }
.copy-reference-used strong { color: var(--ink); font-size: 13px; }
.account-analysis-pending { padding: 14px; border: 1px solid var(--line); color: var(--muted); line-height: 1.6; }
.account-analysis-pending.error { color: var(--coral); border-color: rgba(205, 91, 81, .35); }
@media (max-width: 760px) { .copy-reference-list { grid-template-columns: 1fr; } .copy-reference-heading { display: grid; gap: 6px; } }
.copy-library-list { display: grid; gap: 10px; }
.copy-library-toolbar { margin-bottom: 16px; }
.copy-library-item { border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.copy-library-item summary { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; list-style: none; }
.copy-library-item summary::-webkit-details-marker { display: none; }
.copy-library-item summary > div { min-width: 0; }
.copy-library-item summary strong, .copy-library-item summary small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy-library-item summary small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.copy-library-actions { display: flex; gap: 6px; }
.copy-library-content { padding: 0 16px 16px 62px; }
.copy-library-content pre { margin: 0 0 12px; padding: 14px; max-height: 360px; overflow: auto; white-space: pre-wrap; font: inherit; line-height: 1.75; background: var(--surface-subtle); border: 1px solid var(--line); }
.chat-panel { display: grid; gap: 0; min-height: min(680px, calc(100vh - 190px)); padding: 0; overflow: hidden; }
.chat-toolbar { display: grid; grid-template-columns: minmax(180px, 260px) minmax(0, 1fr); align-items: end; gap: 16px; padding: 17px 19px; border-bottom: 1px solid var(--line); background: var(--surface-subtle); }
.chat-preset-field { gap: 6px; }
.chat-preset-field > span { font-size: 10px; }
.chat-preset-summary { display: grid; gap: 4px; min-width: 0; padding-bottom: 9px; }
.chat-preset-summary strong { color: var(--ink); font-size: 13px; }
.chat-preset-summary small { color: var(--muted); font-size: 10px; line-height: 1.5; }
.chat-message-list { display: grid; align-content: start; gap: 14px; min-height: 330px; max-height: min(520px, calc(100vh - 365px)); overflow-y: auto; padding: 22px clamp(14px, 4vw, 46px); overscroll-behavior: contain; scrollbar-gutter: stable; }
.chat-message { display: grid; gap: 6px; width: min(86%, 720px); min-width: 0; }
.chat-message.user { justify-self: end; }
.chat-message-meta { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; }
.chat-message.user .chat-message-meta { justify-content: flex-end; }
.chat-message-meta strong { color: var(--muted-strong); font-size: 10px; }
.chat-message-meta time { font-size: 9px; }
.chat-message-content { white-space: pre-wrap; overflow-wrap: anywhere; padding: 11px 13px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.64); color: var(--muted-strong); font-size: 12px; line-height: 1.65; box-shadow: 0 4px 16px rgba(52, 86, 104, .05); }
.chat-message.user .chat-message-content { border-color: rgba(91, 137, 213, .22); background: rgba(225, 237, 255, .78); color: #1f4b87; }
.chat-message.pending .chat-message-content { background: rgba(255,255,255,.46); }
.chat-thinking { display: inline-flex; align-items: center; gap: 4px; width: fit-content; padding: 11px 13px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.64); }
.chat-thinking i { width: 5px; height: 5px; border-radius: 50%; background: var(--teal); animation: chat-pulse 1s ease-in-out infinite; }
.chat-thinking i:nth-child(2) { animation-delay: .14s; }
.chat-thinking i:nth-child(3) { animation-delay: .28s; }
@keyframes chat-pulse { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-2px); } }
.chat-empty { display: grid; justify-items: center; align-content: center; gap: 8px; min-height: 280px; color: var(--muted); text-align: center; }
.chat-empty-mark { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid rgba(58, 117, 177, .24); border-radius: 12px; background: rgba(223, 236, 255, .74); color: #315e9b; font-size: 13px; font-weight: 800; }
.chat-empty strong { color: var(--ink); font-size: 14px; }
.chat-starter-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; margin-top: 8px; }
.chat-starter-list button { border: 1px solid var(--line); border-radius: 6px; background: rgba(255,255,255,.58); color: var(--muted-strong); padding: 8px 10px; font: inherit; font-size: 10px; cursor: pointer; }
.chat-starter-list button:hover { border-color: rgba(14, 130, 124, .48); background: rgba(255,255,255,.84); color: var(--teal); }
.chat-composer { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; padding: 14px 19px 17px; border-top: 1px solid var(--line); background: rgba(255,255,255,.32); }
.chat-composer textarea { min-height: 48px; max-height: 160px; resize: vertical; }
.chat-send-button { min-width: 76px; }
button[data-task-cost-label]::after {
  content: attr(data-task-cost-label);
  flex: 0 0 auto;
  margin-left: 8px;
  padding-left: 8px;
  border-left: 1px solid currentColor;
  color: currentColor;
  font-size: 9px;
  font-weight: 650;
  line-height: 1.2;
  opacity: .72;
  white-space: nowrap;
}
button.is-loading[data-task-cost-label]::after { content: none; display: none; }
@media (max-width: 600px) {
  .chat-panel { min-height: calc(100vh - 165px); }
  .chat-toolbar { grid-template-columns: 1fr; align-items: stretch; gap: 8px; padding: 14px; }
  .chat-preset-summary { padding-bottom: 0; }
  .chat-message-list { max-height: calc(100vh - 355px); padding: 17px 12px; }
  .chat-message { width: 94%; }
  .chat-composer { grid-template-columns: 1fr auto; padding: 12px 14px 14px; }
  .chat-starter-list { display: grid; width: 100%; }
  .chat-starter-list button { width: 100%; }
}
.copy-library-meta { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 10px; }
.copy-compliance mark { background: #ffe3a6; color: #713d00; padding: 0 2px; }
.permission-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 0 4px; }
.permission-picker label, .member-permission-picker label { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; color: var(--muted-strong); }
.member-permission-picker { display: flex; flex-wrap: wrap; gap: 7px; }
.account-analysis-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.account-analysis-list { display: grid; gap: 12px; margin-top: 16px; }
.account-analysis-item { border-top: 1px solid var(--line); padding-top: 14px; }
.account-analysis-heading { display: flex; align-items: center; gap: 10px; }
.account-analysis-heading > div { flex: 1; min-width: 0; }
.account-analysis-heading strong, .account-analysis-heading small { display: block; }
.account-analysis-heading small { color: var(--muted); margin-top: 3px; }
.account-analysis-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 12px; }
.account-analysis-grid div { padding: 11px; border: 1px solid var(--line); background: var(--surface-subtle); }
.account-analysis-grid b { display: block; margin-bottom: 5px; font-size: 10px; color: var(--muted); }
.cover-frame-row { display: grid; grid-template-columns: minmax(0, 1fr) 160px auto; align-items: end; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.cover-frame-row label { display: grid; gap: 5px; }
.cover-frame-row label span { font-size: 10px; color: var(--muted); }
.toast { position: fixed; bottom: 26px; left: 50%; transform: translate(-50%, 16px); opacity: 0; pointer-events: none; background: #1d2c27; color: #e8f5f0; padding: 11px 15px; border-radius: 4px; font-size: 12px; transition: opacity 160ms var(--ease-out), transform 160ms var(--ease-out); z-index: 5; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.modal-backdrop { position: fixed; inset: 0; background: rgba(18, 29, 25, .35); display: grid; place-items: center; z-index: 4; }
.modal-backdrop.hidden { display: none; }
.modal { width: min(420px, calc(100vw - 32px)); background: var(--surface); border-radius: 6px; padding: 20px; box-shadow: 0 20px 70px rgba(0,0,0,.18); }
.modal-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
.modal .field { margin-top: 13px; }
.copy-library-editor-modal { width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; background: rgba(248, 252, 251, .9); border: 1px solid rgba(255, 255, 255, .85); backdrop-filter: blur(28px) saturate(150%); }
.copy-library-editor-modal textarea { resize: vertical; min-height: 240px; line-height: 1.7; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.asset-preview-modal { width: min(880px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; }
.asset-preview-body { min-height: 260px; max-height: 70vh; display: grid; place-items: center; overflow: hidden; background: #1d2522; }
.asset-preview-body > img, .asset-preview-body > video { display: block; width: 100%; max-height: 70vh; object-fit: contain; }
.audio-preview, .file-preview { width: 100%; min-height: 260px; display: grid; place-items: center; gap: 22px; padding: 30px; }
.audio-preview audio { width: min(600px, 100%); }
.file-preview .secondary-button { display: inline-flex; align-items: center; text-decoration: none; }
.asset-preview-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 14px; padding-top: 13px; color: var(--muted); font-size: 10px; }
.asset-preview-meta a { margin-left: auto; color: var(--teal); text-decoration: none; font-weight: 700; }
.field-hint { color: var(--muted); font-size: 9px; line-height: 1.45; }
.media-consent-note { display: block; margin: 10px 0 0; color: var(--muted-strong); font-size: 11px; line-height: 1.55; }
@media (max-width: 1100px) { .main-content { padding: 25px; } .sidebar { width: 220px; flex-basis: 220px; } .summary-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 820px) { .app-shell { display: block; } .sidebar { width: 100%; padding: 13px 16px; display: block; } .brand-lockup { padding: 0 4px 12px; } .workspace-label, .sidebar-bottom { display: none; } .nav-list { display: flex; overflow: auto; gap: 3px; } .nav-item { white-space: nowrap; padding: 9px 11px; } .main-content { padding: 22px 16px 38px; } .topbar { align-items: flex-start; flex-direction: column; } .top-actions { width: 100%; } .top-actions .secondary-button, .top-actions .primary-button { flex: 1; } .workflow-strip { overflow-x: auto; } .workflow-step { min-width: 145px; } .workspace-grid { grid-template-columns: 1fr; } .asset-grid, .template-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { h1 { font-size: 22px; } .nav-list { scrollbar-width: none; } .nav-list::-webkit-scrollbar { display: none; } .top-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; } .top-actions .project-select { width: 100%; min-width: 0; } .top-actions .secondary-button, .top-actions .primary-button { width: 100%; white-space: nowrap; } .summary-grid { grid-template-columns: 1fr 1fr; gap: 8px; } .metric-card { min-height: 102px; padding: 13px; } .metric-value { font-size: 22px; } .benchmark-input-row { grid-template-columns: 1fr 1fr; } .benchmark-input-row input, .benchmark-input-row textarea { grid-column: span 2; } .benchmark-input-row .primary-button { grid-column: span 2; } .form-grid { grid-template-columns: 1fr; } .field-span-2 { grid-column: auto; } .panel { padding: 15px; } .asset-grid, .template-grid { grid-template-columns: 1fr; } .asset-toolbar { flex-wrap: wrap; } .asset-toolbar input { max-width: none; } .toolbar-count { margin-left: 0; width: 100%; } }

/* Full capability workspace */
.project-select { min-height: 36px; width: 185px; border-color: var(--line-strong); background: var(--surface); }
.view-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 6px 0 18px; }
.view-heading h2 { font-size: 24px; margin: 7px 0 6px; }
.view-heading p { color: var(--muted); font-size: 12px; line-height: 1.5; max-width: 560px; }
.view-heading-actions { display: flex; align-items: center; gap: 9px; }
.hero-panel { min-height: 190px; background: #22332d; color: #e8f6f0; border-radius: 6px; padding: 25px 28px; display: flex; align-items: flex-end; justify-content: space-between; gap: 25px; box-shadow: var(--shadow); }
.hero-panel .section-kicker { color: #9bc8bb; }
.hero-panel h2 { font-size: 31px; line-height: 1.18; max-width: 610px; margin: 11px 0 9px; letter-spacing: 0; }
.hero-panel p { color: #bdd9d0; font-size: 12px; }
.hero-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.hero-actions .secondary-button { background: transparent; color: #e8f6f0; border-color: #58766c; }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.feature-card { min-height: 166px; background: var(--surface); border: 1px solid var(--line); border-radius: 5px; padding: 15px; display: flex; flex-direction: column; cursor: pointer; transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.feature-card:hover { transform: translateY(-2px); border-color: #88bcb4; box-shadow: 0 9px 24px rgba(30, 43, 37, .09); }
.feature-top { display: flex; align-items: center; justify-content: space-between; }
.feature-index { font-size: 10px; color: var(--muted); letter-spacing: 0; font-weight: 800; }
.feature-status { padding: 4px 6px; border-radius: 3px; font-size: 9px; font-weight: 800; }
.feature-status.ready { background: var(--teal-soft); color: var(--teal); }
.feature-status.partial { background: #f1eee3; color: #8b681f; }
.feature-status.needs_config { background: #f1eee3; color: #8b681f; }
.feature-status.unavailable { background: var(--coral-soft); color: var(--coral); }
.feature-card h3 { font-size: 14px; margin: 18px 0 6px; }
.feature-card p { color: var(--muted); font-size: 11px; line-height: 1.55; min-height: 34px; }
.feature-action { border: 0; background: transparent; color: var(--teal); text-align: left; padding: 0; margin-top: auto; font-size: 11px; font-weight: 700; }
.feature-action span { margin-left: 5px; }
.overview-bottom { display: grid; grid-template-columns: 1.05fr .95fr; gap: 14px; margin-top: 14px; }
.next-action-list { display: grid; gap: 3px; }
.next-action { display: flex; align-items: center; gap: 10px; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 11px 0; text-align: left; color: var(--muted-strong); }
.next-action:last-child { border-bottom: 0; }
.next-action > span:nth-child(2) { flex: 1; display: grid; gap: 3px; }
.next-action strong { font-size: 12px; color: var(--ink); }
.next-action small { font-size: 10px; color: var(--muted); }
.next-action > span:last-child { color: var(--teal); }
.next-action-mark { width: 25px; height: 25px; display: grid; place-items: center; background: var(--teal-soft); color: var(--teal); font-weight: 800; }
.latest-output, .output-row, .publish-row, .custom-template-row { display: flex; align-items: center; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.output-row { flex-wrap: wrap; }
.output-row > div { min-width: min(260px, 100%); }
.output-speech-script { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.output-subtitle-status { color: #1769aa; font-weight: 600; }
.output-subtitle-status.warning { color: #a15c00; }
.latest-output:last-child, .output-row:last-child, .publish-row:last-child, .custom-template-row:last-child { border-bottom: 0; }
.latest-output > div, .output-row > div, .publish-row > div:first-of-type, .custom-template-row > div { flex: 1; display: grid; gap: 4px; }
.latest-output strong, .output-row strong, .publish-row strong, .custom-template-row strong { font-size: 12px; }
.latest-output small, .output-row small, .publish-row small, .custom-template-row small { color: var(--muted); font-size: 10px; }
.output-thumb { width: 45px; height: 34px; display: grid; place-items: center; background: #2d4741; color: #c7ede3; font-size: 9px; letter-spacing: 0; flex: 0 0 auto; }
.output-thumb + div { min-width: 0; }
.output-thumb + div strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.soft-badge { border-radius: 3px; padding: 5px 7px; background: #edf0ec; color: var(--muted-strong); font-size: 10px; font-weight: 800; }
.soft-badge.coral { background: var(--coral-soft); color: var(--coral); }
.soft-badge.blue { background: var(--blue-soft); color: var(--blue); }
.ingest-note { margin-top: 11px; padding: 9px 11px; background: var(--surface-muted); color: var(--muted); font-size: 10px; }
.ingest-note .status-dot { margin-right: 5px; }
.douyin-video-status { margin-top: 9px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-muted); color: var(--muted-strong); }
.douyin-video-status-main { display: flex; align-items: center; gap: 7px; min-width: 0; }
.douyin-video-status-main strong { font-size: 11px; color: var(--ink); font-weight: 650; }
.douyin-video-status small { grid-column: 1; color: var(--muted); font-size: 10px; line-height: 1.4; }
.douyin-video-status .secondary-button { grid-column: 2; grid-row: 1 / span 2; white-space: nowrap; }
.douyin-video-status.is-error { border-color: rgba(198, 103, 79, .42); background: rgba(198, 103, 79, .07); }
.douyin-video-status.is-error .status-dot { background: #c6674f; }
.douyin-video-status.is-loading .status-dot { background: #e4aa4f; animation: douyin-video-status-pulse 1.1s ease-in-out infinite; }
@keyframes douyin-video-status-pulse { 50% { opacity: .35; transform: scale(.75); } }
.benchmark-list.large { margin-top: 16px; }
.quality-pill { margin-left: auto; color: var(--teal); background: var(--teal-soft); border-radius: 3px; padding: 5px 7px; font-size: 10px; }
.copy-editor-panel { min-height: 340px; }
.copy-content.rich { min-height: 220px; }
.copy-content.rich .script-box { font-size: 15px; max-width: 740px; }
.dual-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.check-row { display: flex; gap: 7px; align-items: center; font-size: 11px; color: var(--muted-strong); margin-top: 14px; }
.check-row input { width: auto; }
.full { grid-column: 1 / -1; }
.mini-list { display: grid; gap: 2px; margin-top: 14px; }
.mini-item { display: flex; align-items: center; gap: 9px; padding: 9px 0; border-top: 1px solid var(--line); }
.mini-item > div { flex: 1; display: grid; gap: 3px; }
.mini-item strong { font-size: 11px; }
.mini-item small { color: var(--muted); font-size: 10px; }
.mini-icon { width: 25px; height: 25px; display: grid; place-items: center; font-size: 10px; font-weight: 800; }
.mini-icon.teal { background: var(--teal-soft); color: var(--teal); }
.mini-icon.coral { background: var(--coral-soft); color: var(--coral); }
.status-text { color: var(--teal); font-size: 10px; white-space: nowrap; }
.media-library-item { border: 1px solid var(--line); border-radius: 5px; overflow: hidden; background: var(--surface-muted); }
.avatar-preview { width: 100%; aspect-ratio: 16 / 9; max-height: 210px; background: #26332e; }
.avatar-preview img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 28%; background: #26332e; }
.media-library-copy { display: flex; align-items: center; gap: 9px; padding: 10px; background: var(--surface); }
.media-library-copy > div { flex: 1; min-width: 0; display: grid; gap: 3px; }
.media-library-copy strong { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-library-copy small { color: var(--muted); font-size: 10px; }
.media-preview-empty { min-height: 100%; display: grid; place-items: center; color: #c7d2cd; font-size: 11px; }
.media-preview-empty.compact { min-height: 42px; color: var(--muted); background: var(--surface); border-top: 1px solid var(--line); }
.voice-library-item { padding-bottom: 10px; background: var(--surface); }
.voice-preview { display: block; width: calc(100% - 20px); height: 38px; margin: 0 10px; }
.voice-preview-text { margin: 7px 10px 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.talking-photo-selected-voice-preview .voice-preview { width: 100%; margin: 0; }
.image-studio-panel { margin-top: 14px; }
.image-form-row { display: grid; grid-template-columns: minmax(0, 1fr) 145px 90px auto; gap: 8px; }
.image-reference-section { display: grid; gap: 8px; margin-top: 10px; }
.image-reference-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.image-reference-heading > div { display: grid; gap: 2px; }
.image-reference-heading strong { font-size: 11px; }
.image-reference-heading small { color: var(--muted); font-size: 9px; }
.image-reference-picker { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.image-reference-option { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 8px; min-width: 0; padding: 5px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.image-reference-option:has(input:checked) { border-color: var(--teal); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--teal) 36%, transparent); }
.image-reference-option input { position: absolute; top: 4px; left: 4px; width: 14px; height: 14px; margin: 0; accent-color: var(--teal); }
.image-reference-option img { width: 34px; height: 34px; object-fit: cover; background: #edf0ec; }
.image-reference-option span { overflow: hidden; color: var(--ink); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.image-output-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.image-output-card { overflow: hidden; border: 1px solid rgba(255, 255, 255, .7); min-width: 0; color: inherit; background: rgba(255, 255, 255, .54); box-shadow: 0 8px 24px rgba(34, 63, 69, .08); text-decoration: none; }
.image-output-preview { display: grid; aspect-ratio: 1 / 1; place-items: center; overflow: hidden; background: rgba(229, 238, 237, .75); }
.image-result { display: block; width: 100%; height: 100%; object-fit: contain; background: transparent; }
.image-output-card > div:last-child { display: grid; gap: 5px; padding: 9px; }
.image-output-card strong { font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.image-output-card small { color: var(--muted); font-size: 9px; }
.template-grid.extended { grid-template-columns: repeat(5, 1fr); margin-bottom: 14px; }
.template-grid.extended .template-card { min-width: 0; }
.template-grid.extended .template-preview { height: 130px; }
.template-grid.extended .template-info { min-height: 119px; }
.template-grid.extended .template-info small { color: var(--muted); font-size: 10px; }
.teal-preview { background: #2b3a39; color: #e7f5ef; }
.sand-preview { background: #eee9d7; color: #5e5d52; }
.blue-preview { background: #405d80; color: #eef5ff; }
.dark-preview { background: #252a30; color: #eef1f5; }
.coral-preview { background: #8f4c42; color: #fff0ec; }
.production-mode-switcher { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: min(920px, 100%); gap: 4px; margin: 0 0 22px; padding: 4px; border: 1px solid rgba(255, 255, 255, .72); border-radius: 8px; background: rgba(229, 238, 240, .56); box-shadow: inset 0 1px rgba(255, 255, 255, .8), 0 8px 24px rgba(38, 66, 76, .08); backdrop-filter: blur(18px) saturate(150%); }
.talking-photo-panel .rights-notice { margin: 16px 0 0; padding: 10px 12px; border: 1px solid rgba(107, 137, 145, .18); border-radius: 6px; background: rgba(255, 255, 255, .35); color: var(--muted); font-size: 10px; line-height: 1.6; }
.talking-photo-upload-field { align-content: start; }
.talking-photo-upload-field .secondary-button { justify-self: start; min-width: 120px; }
.jianying-root-bar { display: flex; align-items: center; justify-content: space-between; gap: 18px; width: min(900px, 100%); margin: -4px 0 16px; padding: 12px 14px; border: 1px solid rgba(255, 255, 255, .74); border-radius: 8px; background: rgba(240, 247, 246, .68); box-shadow: 0 8px 24px rgba(38, 66, 76, .06); backdrop-filter: blur(18px) saturate(145%); }
.jianying-root-copy { min-width: 150px; display: grid; gap: 3px; }
.jianying-root-copy strong { font-size: 12px; }
.jianying-root-controls { display: grid; grid-template-columns: minmax(240px, 1fr) auto auto; align-items: center; gap: 8px; min-width: 0; flex: 1; }
.jianying-root-controls input { width: 100%; min-width: 0; height: 38px; padding: 0 11px; border: 1px solid rgba(104, 129, 137, .24); border-radius: 6px; background: rgba(255, 255, 255, .7); color: var(--ink); font: inherit; font-size: 11px; box-shadow: inset 0 1px rgba(255, 255, 255, .78); }
.jianying-root-controls input:focus { border-color: rgba(14, 130, 124, .58); outline: 2px solid rgba(14, 130, 124, .12); }
.production-mode-tab { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 10px; min-width: 0; min-height: 62px; padding: 9px 12px; border: 0; border-radius: 6px; background: transparent; color: var(--muted-strong); text-align: left; cursor: pointer; transition: background-color 180ms ease, box-shadow 180ms ease, color 180ms ease, transform 100ms ease-out; }
.production-mode-tab:active { transform: scale(.985); }
.production-mode-tab:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.production-mode-tab.active { color: var(--ink); background: rgba(255, 255, 255, .78); box-shadow: 0 5px 16px rgba(40, 69, 79, .1), inset 0 1px #fff; }
.production-mode-symbol { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 7px; background: rgba(195, 211, 215, .58); color: #506a74; font-size: 11px; font-weight: 800; }
.production-mode-tab.active .production-mode-symbol { color: #fff; background: var(--teal); box-shadow: 0 6px 14px rgba(14, 130, 124, .2), inset 0 1px rgba(255, 255, 255, .3); }
.production-mode-tab > span:last-child { min-width: 0; display: grid; gap: 3px; }
.production-mode-tab strong { font-size: 12px; }
.production-mode-tab small { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.production-mode-panel { display: grid; gap: 14px; }
.production-panel-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; padding: 0 2px; }
.production-panel-heading h2 { margin-top: 3px; font-size: 19px; }
.digital-render-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; }
.digital-render-column { min-width: 0; }
.form-section-heading { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; color: var(--ink); }
.form-section-heading span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 6px; background: var(--teal-soft); color: var(--teal); font-size: 9px; font-weight: 800; }
.form-section-heading strong { font-size: 12px; }
.settings-row { display: grid; grid-template-columns: minmax(320px, 1.45fr) repeat(2, minmax(150px, 1fr)); gap: 12px; align-items: start; }
.render-settings { margin-bottom: 0; }
.production-submit-row { display: flex; justify-content: flex-end; margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(107, 137, 145, .2); }
.production-submit-row .primary-button { min-width: 148px; }
.output-panel { margin-top: 18px; }
.platform-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.platform-card { position: relative; min-height: 104px; border: 1px solid rgba(107, 137, 145, .22); padding: 14px; display: grid; align-content: start; gap: 6px; cursor: pointer; background: rgba(255, 255, 255, .48); backdrop-filter: blur(18px) saturate(145%); transition: border-color 160ms var(--ease-out), background 160ms var(--ease-out), transform 120ms var(--ease-out); }
.platform-card:active { transform: scale(.985); }
.platform-card.selected { border-color: #72b9ae; background: rgba(220, 244, 238, .76); box-shadow: inset 0 0 0 1px rgba(14, 129, 122, .12); }
.platform-card.unavailable { cursor: not-allowed; opacity: .58; backdrop-filter: none; }
.platform-card input { display: none; }
.platform-card strong { font-size: 13px; }
.platform-card span, .platform-card small { color: var(--muted); font-size: 10px; }
.platform-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.connection-dot { width: 7px; height: 7px; border-radius: 50%; background: #a7b0ad; box-shadow: 0 0 0 3px rgba(167, 176, 173, .14); }
.connection-dot.connected { background: var(--teal); box-shadow: 0 0 0 3px rgba(14, 129, 122, .14); }
.publish-formats { display: flex; flex-wrap: wrap; gap: 5px; }
.publish-formats span { background: var(--blue-soft); color: var(--blue); padding: 5px 6px; font-size: 10px; }
.publish-composer { display: grid; gap: 17px; }
.publish-fields { padding-top: 2px; }
.publish-mode-group { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.publish-mode-option { position: relative; min-height: 67px; display: grid; align-content: center; gap: 4px; padding: 11px 13px; border: 1px solid var(--line); background: rgba(255, 255, 255, .42); cursor: pointer; }
.publish-mode-option input { position: absolute; opacity: 0; pointer-events: none; }
.publish-mode-option strong { font-size: 11px; }
.publish-mode-option small { color: var(--muted); font-size: 9px; }
.publish-mode-option.selected { border-color: #72b9ae; background: var(--teal-soft); box-shadow: inset 0 0 0 1px rgba(14, 129, 122, .1); }
.publish-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.publish-section-heading > div { display: grid; gap: 3px; }
.publish-section-heading strong { font-size: 11px; }
.publish-section-heading small { color: var(--muted); font-size: 9px; }
.publish-submit-row { display: flex; justify-content: flex-end; gap: 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.publish-submit-row .primary-button { min-width: 158px; }
.publish-risk-hint { margin: -7px 0 0; line-height: 1.6; }
.publish-attempt-list { display: grid; gap: 9px; }
.publish-attempt { border: 1px solid var(--line); background: rgba(255, 255, 255, .46); }
.publish-attempt summary { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; list-style: none; }
.publish-attempt summary::-webkit-details-marker { display: none; }
.publish-attempt summary > div { min-width: 0; display: grid; gap: 3px; }
.publish-attempt summary strong, .publish-attempt summary small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.publish-attempt summary strong { font-size: 11px; }
.publish-attempt summary small { color: var(--muted); font-size: 9px; }
.publish-platform-results { display: grid; gap: 1px; padding: 0 14px 14px 54px; }
.publish-platform-result { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 9px 10px; background: var(--surface-subtle); border-top: 1px solid var(--line); }
.publish-platform-result > div { min-width: 0; display: grid; gap: 3px; }
.publish-platform-result strong { font-size: 10px; }
.publish-platform-result small { color: var(--muted); font-size: 9px; overflow-wrap: anywhere; }
.publish-platform-result.failed .status-text { color: var(--coral); }
.publish-platform-result.waiting_user_action .status-text { color: #8b6200; }
.template-token { width: 30px; height: 30px; display: grid; place-items: center; background: var(--coral-soft); color: var(--coral); font-size: 9px; font-weight: 800; }
.custom-template-form { margin-bottom: 15px; }
.history-list.full { margin: -4px -18px; padding: 0 18px; }
.empty-state { padding: 22px 0; color: var(--muted); font-size: 11px; text-align: center; }
.requirement-panel { margin-top: 14px; }
.requirement-matrix { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.requirement-row { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.requirement-row:hover { background: var(--surface-muted); }
.requirement-state { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; background: var(--coral); }
.requirement-state.ready { background: var(--teal); }
.requirement-state.configured { background: #8a6fbb; }
.requirement-state.degraded { background: #b84d39; }
.requirement-state.partial { background: var(--blue); }
.requirement-state.needs_config { background: #b38a31; }
.requirement-copy { min-width: 0; flex: 1; display: grid; gap: 4px; }
.requirement-copy strong { font-size: 12px; }
.requirement-copy small { color: var(--muted); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.requirement-label { padding: 4px 6px; border-radius: 3px; font-size: 9px; font-weight: 800; white-space: nowrap; }
.requirement-label.ready { color: var(--teal); background: var(--teal-soft); }
.requirement-label.configured { color: #674d96; background: #eee9f7; }
.requirement-label.degraded { color: #9f3e2d; background: #fff0ec; }
.requirement-label.partial { color: var(--blue); background: var(--blue-soft); }
.requirement-label.needs_config { color: #73510d; background: #f1eee3; }
.requirement-label.unavailable { color: var(--coral); background: var(--coral-soft); }
.requirement-arrow { color: var(--teal); font-size: 14px; }
.copy-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.copy-modes { display: inline-flex; gap: 3px; padding: 3px; background: var(--surface-muted); border-radius: 4px; }
.copy-mode { border: 0; background: transparent; color: var(--muted); padding: 7px 10px; font-size: 11px; border-radius: 3px; cursor: pointer; }
.copy-mode.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(30,43,37,.08); font-weight: 700; }
.copy-mode:disabled { cursor: wait; opacity: .58; }
.copy-content.rich { display: grid; gap: 18px; }
.copy-primary-section, .copy-result-section { display: grid; gap: 10px; }
.copy-result-section { padding-top: 16px; border-top: 1px solid var(--line); }
.copy-section-heading { display: flex; align-items: center; justify-content: space-between; color: var(--ink); font-size: 11px; font-weight: 800; }
.copy-empty-inline { color: var(--muted); font-size: 10px; }
.production-direction { padding: 12px 14px; border-left: 3px solid var(--blue); background: var(--surface-muted); color: var(--muted-strong); font-size: 12px; line-height: 1.65; }
.suggestion-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.suggestion-row { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 9px; align-items: start; padding: 10px; background: var(--surface-muted); }
.suggestion-row > span { width: 22px; height: 22px; display: grid; place-items: center; background: var(--surface); color: var(--blue); font-size: 9px; font-weight: 800; }
.suggestion-row p { margin: 2px 0 0; color: var(--muted-strong); font-size: 11px; line-height: 1.55; }
.copy-compliance { display: flex; align-items: flex-start; gap: 12px; padding: 11px 13px; font-size: 10px; line-height: 1.5; }
.copy-compliance strong { flex: 0 0 auto; }
.copy-compliance.pass { background: var(--teal-soft); color: var(--teal); }
.copy-compliance.review { background: var(--coral-soft); color: var(--coral); }
.copy-compliance span { color: var(--muted-strong); }
.qa-script-list { width: min(760px, 100%); display: grid; gap: 8px; }
.qa-script-row { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; padding: 11px 12px; background: var(--surface-muted); border-left: 3px solid var(--teal); }
.qa-script-row:nth-child(even) { border-left-color: var(--coral); }
.qa-script-row > span { width: 24px; height: 24px; display: grid; place-items: center; background: var(--surface); color: var(--teal); font-size: 10px; font-weight: 800; }
.qa-script-row:nth-child(even) > span { color: var(--coral); }
.qa-script-row p { margin: 2px 0 0; font-size: 13px; line-height: 1.6; }
.profile-summary { display: grid; gap: 7px; }
.profile-summary p { margin: 0; padding-left: 10px; border-left: 2px solid var(--line-strong); color: var(--muted-strong); font-size: 11px; line-height: 1.5; }
.render-asset-field { grid-column: auto; }
.render-asset-picker { min-height: 76px; max-height: 182px; overflow: auto; display: grid; gap: 4px; padding: 5px; border: 1px solid var(--line-strong); background: var(--surface-muted); }
.render-asset-option { display: grid; grid-template-columns: 16px 24px minmax(0, 1fr); gap: 8px; align-items: center; min-height: 44px; padding: 7px 8px; background: var(--surface); cursor: pointer; }
.render-asset-option:has(input:checked) { box-shadow: inset 3px 0 0 var(--teal); }
.render-asset-option input { width: 14px; height: 14px; accent-color: var(--teal); }
.render-asset-option > span:last-child { min-width: 0; display: grid; gap: 3px; }
.render-asset-option strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.render-asset-option small { color: var(--muted); font-size: 9px; }
.render-asset-order { color: var(--muted); font-size: 9px; font-weight: 800; }
.publish-source-field { margin-bottom: 14px; }
.manifest-notice { color: var(--coral) !important; white-space: normal; }

/* Asset selection lives in a dialog so long filenames never compete with the
   production form controls. The form keeps only a stable trigger and count. */
.image-reference-picker,
.render-asset-picker { display: grid; gap: 7px; min-width: 0; min-height: 0; max-height: none; overflow: visible; padding: 0; border: 0; background: transparent; }
.asset-picker-trigger { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 48px; padding: 8px 10px; border: 1px solid rgba(89, 126, 138, .28); border-radius: 6px; background: rgba(255, 255, 255, .62); color: var(--ink); text-align: left; cursor: pointer; transition: border-color 160ms ease, background-color 160ms ease, transform 120ms ease; }
.asset-picker-trigger:hover { border-color: rgba(14, 130, 124, .55); background: rgba(255, 255, 255, .82); }
.asset-picker-trigger:active { transform: scale(.985); }
.asset-picker-trigger:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.asset-picker-trigger:disabled { cursor: not-allowed; opacity: .56; }
.asset-picker-trigger-icon { display: grid; place-items: center; width: 26px; height: 26px; flex: 0 0 auto; border-radius: 5px; background: var(--teal-soft); color: var(--teal); font-size: 17px; line-height: 1; }
.asset-picker-trigger > span:last-child { display: grid; gap: 2px; min-width: 0; }
.asset-picker-trigger strong { font-size: 11px; }
.asset-picker-trigger small { color: var(--muted); font-size: 9px; }
.asset-picker-selection { display: block; min-height: 16px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.workspace-page .modal.asset-picker-modal { width: min(960px, calc(100vw - 32px)); max-width: min(960px, calc(100vw - 32px)); max-height: min(780px, calc(100vh - 32px)); overflow: hidden; background: rgba(248, 252, 251, .92); border: 1px solid rgba(255, 255, 255, .9); backdrop-filter: blur(28px) saturate(150%); }
.asset-picker-modal .modal-header { margin-bottom: 14px; }
.asset-picker-modal .modal-header p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.asset-picker-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-height: min(590px, calc(100vh - 210px)); overflow: auto; padding: 3px; }
.asset-picker-option { position: relative; display: grid; grid-template-columns: 20px 76px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-width: 0; min-height: 94px; padding: 10px 12px; border: 1px solid rgba(89, 126, 138, .2); border-radius: 6px; background: rgba(255, 255, 255, .64); color: var(--ink); cursor: pointer; transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease; }
.asset-picker-option:hover { border-color: rgba(14, 130, 124, .5); background: rgba(255, 255, 255, .84); }
.asset-picker-option:has(input:checked) { border-color: rgba(14, 130, 124, .68); background: rgba(225, 246, 240, .74); box-shadow: inset 3px 0 0 var(--teal); }
.asset-picker-option input { width: 18px; height: 18px; margin: 0; accent-color: var(--teal); }
.asset-picker-option-media { display: grid; place-items: center; width: 76px; height: 70px; overflow: hidden; border-radius: 5px; background: rgba(214, 228, 230, .7); }
.asset-picker-option-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.asset-picker-video-mark { color: #456875; font-size: 8px; font-weight: 800; letter-spacing: .04em; }
.asset-picker-option-copy { display: grid; gap: 5px; min-width: 0; align-content: center; }
.asset-picker-option-copy strong { min-width: 0; color: var(--ink); font-size: 12px; line-height: 1.4; white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
.asset-picker-option-copy small { color: var(--muted); font-size: 9px; }
.asset-picker-option-order { align-self: start; color: var(--muted); font-size: 9px; font-weight: 800; }
.asset-info { align-items: flex-start; }
.asset-info strong { overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; word-break: break-word; line-height: 1.4; }
.asset-info > div:first-child { flex: 1; min-width: 0; }
.asset-info .row-actions { flex: 0 0 auto; }
@media (max-width: 600px) {
  .asset-picker-body { grid-template-columns: 1fr; max-height: calc(100vh - 220px); }
  .asset-picker-option { grid-template-columns: 20px 64px minmax(0, 1fr) auto; min-height: 84px; padding: 9px 10px; }
  .asset-picker-option-media { width: 64px; height: 60px; }
  .asset-upload-actions { width: 100%; align-items: stretch; }
  .asset-upload-category { min-width: 0; flex: 1; }
  .asset-category-create, .asset-category-list-item { grid-template-columns: 1fr; }
  .asset-category-manager-actions { align-items: flex-start; flex-direction: column; }
  .asset-category-list-item .row-actions { justify-content: flex-end; }
}
@media (max-width: 1200px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } .template-grid.extended { grid-template-columns: repeat(3, 1fr); } .image-output-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) { .view-heading { align-items: flex-start; flex-direction: column; } .overview-bottom, .dual-grid, .digital-render-grid { grid-template-columns: 1fr; } .template-grid.extended { grid-template-columns: repeat(2, 1fr); } .settings-row { grid-template-columns: repeat(2, 1fr); } .render-asset-field { grid-column: 1 / -1; } .requirement-matrix { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .project-select { width: 100%; } .hero-panel { align-items: flex-start; flex-direction: column; padding: 20px; } .hero-panel h2 { font-size: 26px; } .hero-actions { width: 100%; } .hero-actions .primary-button, .hero-actions .secondary-button { flex: 1; } .feature-grid { grid-template-columns: 1fr; } .image-form-row { grid-template-columns: 1fr 1fr; } .image-form-row input { grid-column: span 2; } .image-form-row .primary-button { grid-column: span 2; } .image-reference-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); } .platform-grid, .template-grid.extended, .image-output-grid, .suggestion-list { grid-template-columns: 1fr; } .production-mode-switcher { width: 100%; } .production-mode-tab { grid-template-columns: 28px minmax(0, 1fr); gap: 7px; min-height: 58px; padding: 8px; } .production-mode-symbol { width: 28px; height: 28px; } .production-mode-tab small { display: none; } .production-panel-heading { align-items: stretch; flex-direction: column; } .production-submit-row .primary-button { width: 100%; } .settings-row { grid-template-columns: 1fr; } .render-asset-field { grid-column: auto; } .asset-preview-body, .audio-preview, .file-preview { min-height: 210px; } .asset-preview-meta a { width: 100%; margin-left: 0; } .quality-pill { display: none; } .copy-toolbar, .copy-compliance { align-items: flex-start; flex-direction: column; gap: 8px; } .requirement-row { align-items: flex-start; } .requirement-copy small { white-space: normal; } }

/* Workspace polish: dense operational hierarchy with explicit capability state. */
.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  grid-template-rows: 1fr auto;
  align-items: stretch;
  gap: 18px 30px;
  min-height: 230px;
  padding: 28px 30px;
  position: relative;
  overflow: hidden;
  background: #203a32;
  border: 1px solid #315248;
  border-radius: 8px;
  box-shadow: 0 20px 45px rgba(28, 48, 40, .14);
}
.hero-panel > :first-child { grid-column: 1; grid-row: 1; align-self: end; }
.hero-panel h2 { max-width: 680px; font-size: 32px; }
.hero-panel p { max-width: 690px; line-height: 1.65; }
.hero-actions { grid-column: 1; grid-row: 2; align-self: end; }
.hero-actions .primary-button { background: #d9eee8; border-color: #d9eee8; color: #17372f; }
.hero-actions .primary-button:hover { background: #edf8f4; border-color: #edf8f4; }
.hero-actions .secondary-button:hover { background: rgba(255, 255, 255, .06); border-color: #82b7aa; color: #fff; }
.button-arrow { display: inline-block; margin-left: 6px; }
.hero-console {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  padding: 17px;
  border: 1px solid rgba(178, 230, 216, .25);
  border-radius: 7px;
  background: #183129;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}
.hero-console-top { display: grid; gap: 9px; }
.hero-console-top span { color: #7da99d; font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.hero-console-top strong { color: #f1faf7; font-size: 17px; line-height: 1.35; }
.hero-progress { height: 5px; margin: 24px 0 auto; overflow: hidden; border-radius: 5px; background: #2a4940; }
.hero-progress span { display: block; width: 100%; height: 100%; border-radius: inherit; background: #68d0ba; transform: scaleX(0); transform-origin: left center; transition: transform 220ms var(--ease-out); }
.hero-console-bottom { display: flex; align-items: center; gap: 7px; padding-top: 18px; color: #83aa9f; font-size: 9px; }
.hero-console-bottom strong { color: #eaf8f3; font-size: 11px; }
.hero-console-divider { width: 1px; height: 13px; margin: 0 2px; background: #3a5a51; }
.signal-live { width: 6px; height: 6px; border-radius: 50%; background: #68d0ba; box-shadow: 0 0 0 3px rgba(104, 208, 186, .12); }

.workflow-strip { margin-top: 12px; padding: 9px 11px; }
.workflow-step { min-height: 54px; }
.workflow-step.active { border-color: #c8ddd6; background: #f4f9f7; }
.workflow-step.done small { color: var(--teal); }
.workflow-step.active small { color: var(--muted-strong); }
.step-connector { flex-basis: 20px; }

.metric-card { padding: 18px 19px; border-color: #dce5df; }
.metric-card::after { content: ''; position: absolute; right: 17px; top: 17px; width: 5px; height: 5px; border-radius: 50%; background: #cbd6d0; }
.metric-card.accent-teal::after { background: var(--teal); }
.metric-card.accent-coral::after { background: var(--coral); }
.metric-value { font-variant-numeric: tabular-nums; }

.panel { border-radius: 8px; box-shadow: 0 8px 26px rgba(30, 52, 43, .055); }
.feature-grid { gap: 13px; }
.feature-card {
  min-height: 176px;
  border-radius: 8px;
  border-color: #dce5df;
  padding: 17px;
  box-shadow: 0 3px 12px rgba(30, 52, 43, .035);
  transition: transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out), border-color 160ms var(--ease-out);
}
.feature-card h3 { margin-top: 22px; font-size: 15px; }
.feature-card p { font-size: 11px; line-height: 1.65; }
.feature-action { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.feature-card:hover { transform: none; }
.next-action { border-radius: 5px; padding-inline: 7px; transition: background 150ms var(--ease-out); }
.next-action-mark { border-radius: 5px; }

.template-grid.extended { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.template-card { position: relative; border-radius: 8px; border-color: #dce5df; box-shadow: 0 4px 14px rgba(30, 52, 43, .04); }
.template-card::before { content: ''; position: absolute; inset: 0 auto 0 0; z-index: 2; width: 3px; background: #c6d1cc; }
.template-card.template-status-ready::before { background: var(--teal); }
.template-card.template-status-needs_config::before { background: var(--yellow); }
.template-card.template-status-unavailable::before { background: var(--coral); }
.template-preview { position: relative; }
.template-preview::after { content: ''; position: absolute; inset: 0; background: rgba(15, 25, 22, .04); pointer-events: none; }
.template-preview-status { position: absolute; right: 11px; top: 11px; z-index: 1; padding: 4px 6px; border-radius: 3px; background: rgba(19, 31, 27, .68); color: #fff; font-size: 9px; font-style: normal; font-weight: 800; }
.template-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.template-title-row > strong { min-width: 0; }
.template-status-badge { flex: 0 0 auto; padding: 4px 6px; border-radius: 3px; font-size: 9px !important; font-weight: 800; }
.template-status-badge.ready { color: var(--teal); background: var(--teal-soft); }
.template-status-badge.needs_config { color: #84631d; background: #f4edd9; }
.template-status-badge.unavailable { color: #b84d39; background: var(--coral-soft); }
.template-info { align-content: start; min-height: 183px !important; }
.template-info small { line-height: 1.5; }
.template-unavailable-note { margin: 0; padding: 8px 9px; border-left: 2px solid #dda091; background: #fff7f4; color: #8f5144; font-size: 9px; line-height: 1.5; }
.template-info .quiet-button:disabled { border-color: #dce2df; background: #f3f5f4; color: #919c97; cursor: not-allowed; }

.content-view.view-enter { animation: view-enter 180ms var(--ease-out); }
@keyframes view-enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.toast { transition: opacity 160ms var(--ease-out), transform 160ms var(--ease-out); }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid #2a8f84; outline-offset: 2px; }

@media (hover: hover) and (pointer: fine) {
  .feature-card:hover { transform: translateY(-2px); border-color: #91bfb5; box-shadow: 0 11px 28px rgba(30, 52, 43, .09); }
  .next-action:hover { background: var(--surface-muted); }
}

@media (max-width: 900px) {
  .hero-panel { grid-template-columns: minmax(0, 1fr) 225px; gap: 18px 22px; }
}

@media (max-width: 700px) {
  .hero-panel { grid-template-columns: 1fr; grid-template-rows: auto auto auto; padding: 21px; }
  .hero-panel > :first-child { grid-column: 1; grid-row: 1; }
  .hero-actions { grid-column: 1; grid-row: 2; }
  .hero-console { grid-column: 1; grid-row: 3; min-height: 130px; }
  .hero-progress { margin-top: 18px; }
}

@media (max-width: 520px) {
  .main-content { padding-inline: 13px; }
  .hero-panel h2 { font-size: 25px; }
  .hero-actions { display: grid; grid-template-columns: 1fr; }
  .workflow-strip { margin-inline: -13px; border-left: 0; border-right: 0; border-radius: 0; }
  .workflow-step { min-width: 142px; }
  .summary-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 96px; }
  .template-grid.extended { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html:focus-within { scroll-behavior: auto; }
  .content-view.view-enter { animation: view-fade 120ms linear; }
  .hero-progress span { transition: none; }
  button:active { transform: none; }
}

@media (max-width: 520px) {
  .jianying-root-bar { align-items: stretch; flex-direction: column; gap: 10px; }
  .jianying-root-controls { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .jianying-root-controls input { grid-column: 1 / -1; }
  .jianying-root-controls .secondary-button { width: 100%; }
}

@media (max-width: 700px) {
  .copy-source-controls { grid-template-columns: 1fr; }
  .view-heading-actions { width: 100%; justify-content: space-between; }
  .view-heading-actions .primary-button { flex: 1; }
  .copy-library-item summary { grid-template-columns: 30px minmax(0, 1fr); }
  .copy-library-item summary .status-text { display: none; }
  .copy-library-actions { grid-column: 2; }
  .copy-library-content { padding-left: 16px; }
  .copy-library-editor-modal textarea { min-height: 200px; }
  .modal-actions .secondary-button, .modal-actions .primary-button { flex: 1; }
  .account-analysis-form, .account-analysis-grid { grid-template-columns: 1fr; }
  .cover-frame-row { grid-template-columns: 1fr; }
}
@keyframes view-fade { from { opacity: .72; } to { opacity: 1; } }

.team-summary { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.background-music-field,
.background-music-volume-field { min-width: 0; }
.background-music-picker-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.background-music-picker-row input[type="file"] { display: none; }
.background-music-picker-row .ui-select,
.background-music-picker-row select { min-width: 0; }
.background-music-field .ui-select,
.background-music-field select { width: 100%; min-width: 0; }
.background-music-field .ui-select-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.background-music-volume-field > span { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.background-music-volume-field > span strong { color: var(--teal); font-size: 11px; font-variant-numeric: tabular-nums; }
.background-music-volume-field input[type="range"] { width: 100%; }
.background-music-volume-field.is-disabled { opacity: .58; }
.team-summary span { padding: 9px 11px; border: 1px solid var(--line); background: var(--surface-muted); color: var(--muted-strong); font-size: 11px; }
.team-summary strong { color: var(--ink); font-size: 14px; }
.connection-list, .team-member-list, .ticket-list { display: grid; gap: 1px; }
.connection-row, .team-member-row, .ticket-row { display: grid; align-items: center; gap: 11px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.connection-row:last-child, .team-member-row:last-child, .ticket-row:last-child { border-bottom: 0; }
.connection-row { grid-template-columns: 30px minmax(0, 1fr) auto auto; }
.connection-row > div, .team-member-row > div, .ticket-row > div { min-width: 0; display: grid; gap: 3px; }
.connection-row small, .team-member-row small, .ticket-row small { color: var(--muted); font-size: 10px; }
.platform-symbol { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 5px; background: var(--teal-soft); color: var(--teal); font-weight: 800; }
.connection-actions { display: flex; gap: 5px; }
.platform-login-note { margin: -6px 0 12px; line-height: 1.6; }
.workspace-page .modal.platform-auth-modal { width: min(480px, calc(100vw - 32px)); background: rgba(248, 252, 251, .94); border: 1px solid rgba(255, 255, 255, .94); backdrop-filter: blur(28px) saturate(150%); }
.workspace-page .modal.platform-auth-modal.is-browser-mode { width: min(980px, calc(100vw - 32px)); max-height: calc(100dvh - 24px); overflow-y: auto; }
.platform-auth-status { display: grid; justify-items: center; gap: 12px; text-align: center; }
.platform-auth-status > strong { max-width: 380px; color: var(--text); font-size: 14px; line-height: 1.5; }
.platform-auth-status > p { max-width: 380px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.platform-auth-qr-frame { width: min(280px, 72vw); aspect-ratio: 1; display: grid; place-items: center; padding: 16px; overflow: hidden; background: rgba(255, 255, 255, .86); border: 1px solid rgba(40, 88, 121, .18); border-radius: 6px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), 0 12px 32px rgba(48, 91, 116, .12); }
.platform-auth-qr-frame img { width: 100%; height: 100%; object-fit: contain; image-rendering: auto; }
.platform-auth-placeholder { display: grid; justify-items: center; gap: 14px; color: var(--muted); }
.platform-auth-placeholder > span { width: 32px; height: 32px; border: 2px solid rgba(54, 101, 130, .2); border-top-color: rgba(54, 101, 130, .8); border-radius: 50%; animation: platform-auth-spin .8s linear infinite; }
.platform-auth-placeholder small { font-size: 11px; }
.platform-auth-qr-frame.hidden { display: none; }
.platform-browser-open.hidden { display: none; }
.platform-browser-panel { width: 100%; display: grid; gap: 8px; }
.platform-browser-toolbar { display: grid; grid-template-columns: 34px 34px minmax(0, 1fr); align-items: center; gap: 6px; }
.platform-browser-toolbar .icon-button { width: 34px; min-width: 34px; height: 34px; }
.platform-browser-toolbar > span { min-width: 0; overflow: hidden; color: var(--muted-strong); font-size: 11px; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.platform-browser-viewport { position: relative; width: min(100%, 72dvh); aspect-ratio: 16 / 9; justify-self: center; overflow: hidden; border: 1px solid rgba(40, 88, 121, .24); border-radius: 6px; background: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .96), 0 10px 30px rgba(48, 91, 116, .13); cursor: crosshair; touch-action: none; user-select: none; }
.platform-browser-viewport:focus-visible { outline: 2px solid rgba(36, 105, 151, .5); outline-offset: 2px; }
.platform-browser-viewport img { display: block; width: 100%; height: 100%; object-fit: fill; pointer-events: none; user-select: none; }
.platform-browser-input { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 7px; }
.platform-browser-input input { min-width: 0; width: 100%; }
.platform-browser-scroll { display: flex; justify-content: center; gap: 7px; }
.platform-verification-panel { width: min(380px, 100%); display: grid; justify-items: stretch; gap: 10px; }
.platform-verification-methods { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 3px; padding: 3px; border: 1px solid rgba(40, 88, 121, .16); border-radius: 7px; background: rgba(222, 235, 241, .62); }
.platform-verification-method { min-width: 0; min-height: 38px; padding: 0 10px; border: 1px solid transparent; border-radius: 5px; background: transparent; color: var(--muted-strong); font-size: 12px; font-weight: 650; }
.platform-verification-method:hover { color: var(--ink); background: rgba(255, 255, 255, .48); }
.platform-verification-method.is-selected { border-color: rgba(40, 88, 121, .18); background: rgba(255, 255, 255, .9); color: var(--ink); box-shadow: 0 2px 8px rgba(48, 91, 116, .1); }
.platform-verification-phone { margin: 0 !important; color: var(--muted-strong) !important; font-size: 12px !important; }
.platform-verification-code { display: grid; gap: 8px; text-align: left; }
.platform-verification-code > label { color: var(--muted-strong); font-size: 11px; font-weight: 650; }
.platform-verification-code > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.platform-verification-code input { min-width: 0; width: 100%; letter-spacing: 0; }
.platform-verification-code .primary-button { min-width: 76px; }
.platform-verification-code > .quiet-button { justify-self: end; min-height: 30px; padding-inline: 8px; border-color: transparent; background: transparent; }
.platform-auth-status[data-status="connected"] .platform-auth-qr-frame { border-color: rgba(29, 135, 100, .3); }
.platform-auth-status[data-status="failed"] .platform-auth-qr-frame,
.platform-auth-status[data-status="expired"] .platform-auth-qr-frame { border-color: rgba(176, 88, 73, .28); }
.platform-auth-actions { justify-content: center; }
@keyframes platform-auth-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .platform-auth-placeholder > span { animation: none; } }
@media (max-width: 640px) {
  .workspace-page .modal.platform-auth-modal.is-browser-mode { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); padding: 14px; }
  .platform-browser-input { grid-template-columns: minmax(0, 1fr) auto; }
  .platform-browser-input #platformBrowserEnterButton { grid-column: 1 / -1; }
  .platform-browser-input .primary-button,
  .platform-browser-input .secondary-button,
  .platform-browser-scroll .secondary-button { min-height: 38px; padding-inline: 10px; }
}
.team-member-form { display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)); align-items: end; gap: 10px; margin-bottom: 14px; }
.team-member-form-field { display: grid; min-width: 0; gap: 5px; color: var(--muted); font-size: 10px; }
.team-member-form-field input { width: 100%; min-width: 0; }
.team-member-permission-field { grid-column: span 3; min-width: 0; min-height: 42px; margin: 0; border: 1px solid var(--line); border-radius: 6px; }
.team-member-permission-field legend { padding: 0 5px; color: var(--muted); font-size: 9px; }
.team-member-row { grid-template-columns: 30px minmax(135px, 1fr) 135px minmax(130px, .8fr) auto; }
.team-member-identity { min-width: 0; }
.team-member-name { display: flex; align-items: center; gap: 6px; min-width: 0; }
.team-member-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-member-name em { flex: 0 0 auto; color: var(--muted); font-size: 9px; font-style: normal; font-weight: 600; }
.member-quota-field { display: grid; min-width: 0; gap: 4px; }
.member-quota-field input { width: 100%; min-width: 0; }
.team-member-actions { display: flex !important; grid-auto-flow: column; gap: 5px !important; }
.team-member-list-header { display: grid; grid-template-columns: minmax(176px, 1fr) 135px minmax(130px, .8fr) auto; gap: 11px; padding: 0 0 7px 41px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 9px; font-weight: 700; }
.inline-field { display: grid; grid-template-columns: 1fr; gap: 4px; color: var(--muted); font-size: 9px; }
.inline-field input { min-height: 30px; }
.member-permissions { color: var(--muted-strong); font-size: 10px; overflow-wrap: anywhere; }
.redeem-box { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.ticket-row { grid-template-columns: 25px minmax(0, 1fr) auto; align-items: start; }
.ticket-token { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 4px; background: var(--coral-soft); color: var(--coral); font-weight: 800; }
.ticket-row p { margin: 3px 0; color: var(--muted-strong); font-size: 11px; line-height: 1.6; white-space: pre-wrap; }
.ticket-note { color: var(--teal) !important; }

@media (max-width: 700px) {
  .connection-row { grid-template-columns: 30px minmax(0, 1fr) auto; }
  .connection-actions { grid-column: 2 / -1; }
  .publish-mode-group { grid-template-columns: 1fr; }
  .publish-mode-option { min-height: 58px; }
  .publish-submit-row { display: grid; grid-template-columns: 1fr; }
  .publish-submit-row .primary-button, .publish-submit-row .secondary-button { width: 100%; }
  .publish-attempt summary { grid-template-columns: 30px minmax(0, 1fr); }
  .publish-attempt summary > .status-text { display: none; }
  .publish-attempt summary > .danger-button { grid-column: 2; justify-self: start; }
  .publish-platform-results { padding-left: 14px; }
  .team-member-form { grid-template-columns: 1fr; }
  .team-member-permission-field { grid-column: auto; }
  .team-member-list-header { display: none; }
  .team-member-row { grid-template-columns: 30px minmax(0, 1fr); }
  .team-member-row .member-quota-field, .team-member-row .member-permission-picker, .team-member-row .team-member-actions { grid-column: 2; }
  .redeem-box { grid-template-columns: 1fr; }
  .output-row > div { flex: 1 1 calc(100% - 58px); min-width: 0; }
  .output-row > a, .output-row > button { flex: 1 1 128px; justify-content: center; text-align: center; }
}
