:root {
  --bg: #07100d;
  --surface: #0c1713;
  --surface-2: #12211b;
  --line: #263a33;
  --text: #edf8f3;
  --muted: #91a79e;
  --accent: #55c792;
  --accent-soft: #183b2d;
  --warning: #dfa54a;
  font-family: "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; overflow: hidden; }
body { margin: 0; min-width: 320px; min-height: 0; background: var(--bg); }
button, input, textarea { font: inherit; }
button { color: inherit; background: transparent; border: 1px solid transparent; cursor: pointer; }
.topbar { height: 56px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 280px 1fr auto; align-items: center; padding: 0 18px; background: rgba(7,16,13,.96); }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #06100c; font-weight: 900; background: var(--accent); }
nav { display: flex; gap: 6px; }
nav button { padding: 9px 15px; border-radius: 8px; color: var(--muted); }
nav .nav-active { background: var(--surface-2); color: var(--text); border-color: var(--line); }
.top-actions { display: flex; gap: 10px; align-items: center; }
.shop, .user { padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.workspace { height: calc(100vh - 56px); height: calc(100dvh - 56px); min-height: 0; overflow: hidden; display: grid; grid-template-columns: 300px minmax(540px, 1fr) 300px; }
.sidebar, .inspector { background: rgba(12,23,19,.88); }
.sidebar { min-height: 0; overflow: hidden; border-right: 1px solid var(--line); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.primary { background: var(--accent); color: #05100b; font-weight: 800; padding: 12px; border-radius: 9px; }
.search { display: flex; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 9px; padding: 0 11px; background: var(--surface-2); }
.search input { width: 100%; padding: 11px 0; border: 0; outline: 0; background: transparent; color: var(--text); }
.scope-tabs, .platforms { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.scope-tabs button, .platforms button { color: var(--muted); padding: 8px 4px; border-radius: 7px; }
.scope-tabs .selected, .platforms .selected { color: var(--text); background: #1b2d26; }
.section-label, .eyebrow { color: var(--muted); font-size: 12px; }
.context-list { display: flex; flex-direction: column; gap: 8px; overflow: auto; flex: 1; }
.context-card { padding: 12px; text-align: left; border: 1px solid var(--line); border-radius: 10px; background: #0e1b16; }
.context-card.selected { border-color: var(--accent); background: var(--accent-soft); }
.context-card strong { display: block; margin-bottom: 5px; }
.context-card small { color: var(--muted); }
.context-detail { display: block; margin-top: 5px; color: #79b99d; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.context-list-empty { padding: 24px 12px; border: 1px dashed #456158; border-radius: 10px; color: var(--muted); text-align: center; font-size: 13px; }
.connection-button { padding: 10px; border: 1px dashed #456158; border-radius: 8px; color: var(--muted); }
.conversation { min-width: 0; min-height: 0; height: 100%; overflow: hidden; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; }
.conversation-header { min-height: 96px; display: flex; justify-content: space-between; align-items: center; padding: 18px 28px 12px; }
h1 { margin: 5px 0; font-size: 25px; }
.muted { color: var(--muted); }
.secondary { padding: 9px 14px; border: 1px solid var(--line); border-radius: 8px; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.subnav { display: flex; gap: 18px; padding: 0 28px; border-bottom: 1px solid var(--line); }
.subnav button { color: var(--muted); padding: 11px 2px; }
.subnav .selected { color: var(--text); border-bottom: 2px solid var(--accent); }
.messages { min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-gutter: stable; padding: 28px; }
.workspace-panel { min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-gutter: stable; padding: 24px 28px 32px; }
.workspace-section { max-width: 1080px; margin: 0 auto; }
.workspace-section-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.workspace-section-header h2 { margin: 0 0 5px; font-size: 21px; }
.workspace-section-header p { margin: 0; color: var(--muted); font-size: 13px; }
.workspace-count { flex: none; padding: 5px 9px; border-radius: 999px; color: var(--accent); background: var(--accent-soft); font-size: 12px; }
.record-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.record-card { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: rgba(18,33,27,.78); }
.record-card h3 { margin: 0 0 9px; font-size: 16px; }
.record-meta { display: flex; flex-wrap: wrap; gap: 7px 12px; color: var(--muted); font-size: 12px; }
.record-card p { margin: 9px 0 0; line-height: 1.65; overflow-wrap: anywhere; }
.record-card a { color: var(--accent); overflow-wrap: anywhere; }
.record-next { margin-top: 11px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.record-empty { padding: 42px 20px; border: 1px dashed #456158; border-radius: 12px; text-align: center; color: var(--muted); }
.record-empty strong { display: block; margin-bottom: 7px; color: var(--text); }
.profile-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.profile-field { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: rgba(18,33,27,.78); }
.profile-field span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; }
.profile-field strong { overflow-wrap: anywhere; font-size: 14px; }
.profile-edit-button { flex: none; padding: 8px 12px; border: 1px solid var(--accent); border-radius: 8px; color: var(--accent); }
.profile-edit-button:disabled { opacity: .6; cursor: default; }
.profile-edit-form { margin-top: 18px; padding: 18px; border: 1px solid var(--accent); border-radius: 12px; background: #0d1d17; }
.profile-edit-heading, .profile-accounts-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.profile-edit-heading p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.profile-edit-heading button, .profile-accounts-heading button, .remove-account { padding: 7px 10px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); }
.profile-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 15px; }
.profile-form-field { display: grid; gap: 6px; min-width: 0; color: var(--muted); font-size: 12px; }
.profile-form-field input, .profile-form-field textarea, .profile-form-field select { width: 100%; min-width: 0; padding: 10px 11px; border: 1px solid var(--line); border-radius: 8px; outline: none; color: var(--text); background: #09130f; }
.profile-form-field input:focus, .profile-form-field textarea:focus, .profile-form-field select:focus { border-color: var(--accent); }
.profile-form-wide { grid-column: 1 / -1; }
.profile-accounts-heading { margin-top: 22px; align-items: center; }
.platform-account-editors { display: grid; gap: 12px; margin-top: 10px; }
.platform-account-editor { min-width: 0; margin: 0; padding: 0 14px 14px; border: 1px solid var(--line); border-radius: 10px; }
.platform-account-editor legend { padding: 0 7px; color: var(--accent); }
.platform-account-editor .remove-account { margin-top: 12px; }
.profile-form-actions { display: flex; justify-content: flex-end; }
.profile-form-actions .save-button { width: auto; min-width: 180px; }
.timeline { display: grid; gap: 10px; }
.timeline-item { display: grid; grid-template-columns: 120px minmax(0,1fr); gap: 15px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.timeline-item time { color: var(--muted); font-size: 12px; }
.pending-action-card { border-color: var(--accent); background: #10251c; }
.pending-action-card .review-heading span { color: #07100d; background: var(--accent); }
.pending-action-card .review-choice-buttons button:first-child { color: #06100c; border-color: var(--accent); background: var(--accent); font-weight: 800; }
.empty-state { max-width: 520px; margin: 70px auto; text-align: center; color: var(--muted); }
.empty-state h2 { color: var(--text); }
.assistant-avatar { width: 48px; height: 48px; margin: auto; display: grid; place-items: center; border-radius: 50%; color: var(--accent); background: var(--accent-soft); font-weight: 800; }
.message { max-width: 72%; padding: 12px 14px; border-radius: 12px; margin-bottom: 15px; line-height: 1.65; white-space: pre-wrap; }
.message.user { margin-left: auto; background: #244034; }
.message.assistant { background: var(--surface-2); border: 1px solid var(--line); }
.message.system { background: var(--surface-2); border: 1px solid var(--line); }
.review-card, .action-card { width: min(680px, 78%); max-width: 680px; padding: 0; overflow: hidden; white-space: normal; scroll-margin-top: 16px; }
.action-card { border-color: #456158; }
.review-heading { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.review-heading span { padding: 3px 8px; border-radius: 999px; color: var(--warning); background: rgba(223,165,74,.14); font-size: 12px; }
.review-summary { margin: 0; padding: 9px 14px 3px; color: var(--muted); font-size: 13px; }
.review-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 7px 14px 10px; }
.review-fields div { min-width: 0; padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; background: #0d1915; }
.review-fields div.review-field-wide { grid-column: span 2; }
.review-fields dt { margin-bottom: 2px; color: var(--muted); font-size: 11px; }
.review-fields dd { margin: 0; overflow-wrap: anywhere; font-size: 14px; line-height: 1.4; }
.review-choice { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 14px 11px; border-top: 1px solid var(--line); }
.review-choice > strong { white-space: nowrap; font-size: 13px; }
.review-choice-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.review-choice-buttons button { min-width: 64px; padding: 6px 9px; border: 1px solid #456158; border-radius: 7px; }
.review-choice-buttons button:hover, .review-choice-buttons button.selected { color: #06100c; border-color: var(--accent); background: var(--accent); font-weight: 800; }
.review-choice-buttons button:disabled { opacity: .5; cursor: wait; }
.composer-wrap { padding: 10px 28px 18px; }
.quick-actions { display: flex; gap: 8px; margin-bottom: 8px; }
.quick-actions button { padding: 7px 10px; border: 1px solid var(--line); border-radius: 7px; }
.composer { border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: var(--surface-2); }
textarea { width: 100%; resize: none; color: var(--text); background: transparent; border: 0; outline: 0; line-height: 1.6; }
.attachment-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.attachment-card { display: grid; grid-template-columns: 46px minmax(0,1fr) auto; align-items: center; gap: 9px; max-width: 520px; padding: 7px; border: 1px solid var(--line); border-radius: 9px; background: #0d1915; }
.attachment-card img { width: 46px; height: 46px; border-radius: 6px; object-fit: cover; }
.attachment-card span { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-card button { color: var(--muted); font-size: 12px; padding: 5px 7px; border: 1px solid var(--line); border-radius: 6px; }
.composer-bottom { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 12px; }
.composer-bottom button { min-width: 82px; padding: 9px 16px; border-radius: 8px; background: var(--accent); color: #07100d; font-weight: 800; }
.composer-bottom button:disabled { opacity: .35; cursor: not-allowed; }
.inspector { min-height: 0; overflow-y: auto; overscroll-behavior: contain; border-left: 1px solid var(--line); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.inspector-heading { display: none; align-items: center; justify-content: space-between; }
.inspector-heading button { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 8px; font-size: 22px; }
.panel { border: 1px solid var(--line); border-radius: 12px; padding: 15px; background: rgba(18,33,27,.75); }
.panel-title { font-weight: 800; margin-bottom: 12px; }
.panel-help { margin: -4px 0 12px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.status-panel { padding-top: 12px; padding-bottom: 12px; }
.status-panel .panel-title { margin-bottom: 8px; }
.status-panel p { margin: 8px 0 0; font-size: 12px; line-height: 1.5; }
.status-line { display: flex; align-items: center; gap: 8px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--warning); box-shadow: 0 0 12px currentColor; }
.status-line.ready .dot { background: var(--accent); }
.progress { height: 7px; border-radius: 9px; overflow: hidden; background: #24352e; margin-bottom: 10px; }
.progress span { display: block; height: 100%; background: var(--accent); }
.field-summary { margin: 15px 0 0; padding: 0; list-style: none; }
.field-summary li { padding: 9px 0; display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); }
.field-summary em { color: var(--warning); font-style: normal; }
.field-summary em { max-width: 64%; text-align: right; overflow-wrap: anywhere; }
.field-summary em.ok { color: var(--accent); }
.review-link { width: 100%; margin-top: 12px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); }
.review-link:hover { color: var(--text); border-color: #456158; }
.review-link:disabled { opacity: .35; cursor: not-allowed; }
.save-button { width: 100%; margin-top: 12px; padding: 10px; border-radius: 8px; background: var(--accent); color: #07100d; font-weight: 800; }
.save-button:disabled { opacity: .35; cursor: not-allowed; }
.confirm-card { max-width: 620px; margin: 15px 0; padding: 15px; border: 1px solid var(--accent); border-radius: 12px; background: #10251c; }
.confirm-card h3 { margin: 0 0 8px; }
.confirm-card p { color: var(--muted); line-height: 1.65; }
.confirm-card button { padding: 9px 14px; border-radius: 8px; background: var(--accent); color: #07100d; font-weight: 800; }
.guard-panel p { color: var(--muted); line-height: 1.7; }
.login-screen { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 55% 20%, #143125 0, #07100d 45%); }
.login-card { width: min(420px, 94vw); display: grid; gap: 15px; padding: 30px; border: 1px solid var(--line); border-radius: 16px; background: rgba(12,23,19,.96); box-shadow: 0 24px 70px rgba(0,0,0,.38); }
.login-brand { margin-bottom: 8px; }
.login-card h1 { margin: 0; }
.login-card p { margin: 0; line-height: 1.6; }
.login-card label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; }
.login-card input, .admin-form input, .admin-form select { width: 100%; padding: 11px 12px; color: var(--text); border: 1px solid var(--line); border-radius: 8px; outline: none; background: #09130f; }
.login-card input:focus, .admin-form input:focus, .admin-form select:focus { border-color: var(--accent); }
.login-card .primary { margin-top: 4px; }
.login-error { min-height: 22px; color: #ff8585; }
.page-workspace { height: calc(100vh - 56px); height: calc(100dvh - 56px); min-height: 0; overflow-y: auto; padding: 28px 34px 48px; }
.page-header { max-width: 1260px; margin: 0 auto 24px; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.page-header h1 { margin: 4px 0 6px; }
.page-header p { margin: 0; }
.page-content { max-width: 1260px; margin: 0 auto; display: grid; gap: 18px; }
.management-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.management-tabs button { padding: 9px 13px; color: var(--muted); border: 1px solid var(--line); border-radius: 8px; }
.management-tabs button.selected { color: #07100d; border-color: var(--accent); background: var(--accent); font-weight: 800; }
.management-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.management-card { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: rgba(18,33,27,.78); }
.management-card h2, .management-card h3 { margin: 0 0 8px; }
.management-card p { color: var(--muted); line-height: 1.6; }
.management-card-wide { grid-column: 1 / -1; }
.data-table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th, .data-table td { padding: 11px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.data-table th { color: var(--muted); font-weight: 500; }
.data-table td { overflow-wrap: anywhere; }
.status-badge { display: inline-flex; padding: 3px 7px; border-radius: 999px; color: var(--accent); background: var(--accent-soft); font-size: 11px; }
.status-badge.disabled { color: var(--muted); background: #23312c; }
.admin-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.admin-form label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; }
.admin-form .wide { grid-column: 1 / -1; }
.admin-form button { justify-self: start; min-width: 130px; }
.role-permissions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.role-permissions span { padding: 4px 7px; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; font-size: 11px; }
.page-feedback { padding: 11px 13px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); }
@media (max-width: 1250px) {
  .workspace { grid-template-columns: 265px minmax(0, 1fr); }
  .inspector { position: fixed; z-index: 20; top: 56px; right: 0; bottom: 0; width: min(360px, 92vw); display: flex; transform: translateX(105%); transition: transform .18s ease; box-shadow: -18px 0 50px rgba(0,0,0,.35); overflow: auto; }
  .inspector.open { transform: translateX(0); }
  .inspector-heading { display: flex; }
}
@media (max-width: 900px) {
  .topbar { grid-template-columns: 220px 1fr auto; }
  .topbar nav button { display: block; }
  .workspace { grid-template-columns: 245px minmax(0, 1fr); }
  .conversation-header, .messages { padding-left: 20px; padding-right: 20px; }
  .workspace-panel { padding-left: 20px; padding-right: 20px; }
  .subnav, .composer-wrap { padding-left: 20px; padding-right: 20px; }
  .review-card, .action-card { width: 92%; }
  .review-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .review-choice { align-items: flex-start; flex-direction: column; }
  .record-grid, .profile-grid { grid-template-columns: 1fr; }
  .management-grid, .admin-form { grid-template-columns: 1fr; }
  .management-card-wide, .admin-form .wide { grid-column: auto; }
}

/* Workbench repair: compact cards, persistent navigation and bounded scroll areas. */
:root { --accent: #40e2a0; }
.wordmark { font-size: 26px; letter-spacing: -.8px; }
.topbar { grid-template-columns: 120px 1fr auto; }
.topbar nav button { border-radius: 0; padding: 17px 14px; }
.topbar nav .nav-active { background: none; border-color: transparent; border-bottom: 3px solid var(--accent); color: var(--accent); }
.workspace { grid-template-columns: 300px minmax(0, 1fr) 280px; }
#toggleCreators { display: none; }
.list-mode { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.list-mode select { background: var(--surface); border: 1px solid var(--line); color: var(--text); border-radius: 6px; padding: 5px; }
.context-card { display: flex; align-items: center; gap: 10px; padding: 12px 6px; flex-shrink: 0; border-color: transparent; border-bottom-color: var(--line); background: none; }
.creator-avatar { flex: none; width: 42px; height: 42px; object-fit: cover; border-radius: 50%; background: #b6c2bd; }
.creator-list-info { flex: 1; min-width: 0; }
.creator-list-heading { display: flex; flex-wrap: wrap; gap: 4px 7px; justify-content: space-between; align-items: center; }
.creator-list-heading strong { font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.creator-state { flex: none; font-size: 11px; color: var(--accent); }
.creator-list-meta { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; font-size: 10px; color: var(--muted); }
.creator-list-meta time { margin-left: auto; }
.platform-badge { padding: 2px 4px; background: var(--surface-2); border-radius: 4px; }
.connection-button { display: none; }
.conversation-header { min-height: 88px; padding: 14px 22px; }
.conversation-header h1 { font-size: 23px; }
.subnav { overflow-x: auto; gap: 16px; flex-wrap: nowrap; white-space: nowrap; padding: 0 22px; }
.messages { padding: 22px; }
.message { max-width: min(82%, 760px); font-size: 14px; line-height: 1.65; }
.message-meta { font-size: 11px; color: var(--muted); margin-bottom: 7px; }
.message-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.review-card, .action-card { width: min(100%, 680px); max-width: 100%; font-size: 13px; }
.review-card > .secondary { margin: 8px 14px 12px; }
.review-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 10px 14px; gap: 6px; }
.review-fields > div { padding: 7px 9px; }
.review-fields dd { font-size: 13px; }
.composer-wrap { padding: 8px 20px 12px; }
.composer textarea { max-height: 120px; min-height: 36px; font-size: 14px; }
.quick-actions { flex-wrap: wrap; gap: 5px; }
.quick-actions button { font-size: 12px; padding: 5px 9px; }
.upload-image { cursor: pointer; color: var(--muted); font-size: 12px; }
.inspector { gap: 14px; padding: 18px; }
.inspector .panel { padding: 0 0 14px; border: none; border-radius: 0; background: none; }
.status-panel { order: 2; border-top: 1px solid var(--line) !important; padding-top: 14px !important; }
.panel-help { font-size: 11px; }
.field-summary { display: block; }
.progress-group { padding: 13px 0; border-top: 1px solid var(--line); font-size: 12px; }
.progress-group summary { display: flex; justify-content: space-between; cursor: pointer; }
.progress-group summary span, .progress-field .ready { color: var(--accent); }
.progress-field { display: flex; justify-content: space-between; gap: 12px; padding: 5px 5px 0 12px; color: var(--muted); }
.progress-field .missing { color: var(--warning); }
.draft-editor { max-width: 800px; margin: 0 auto; }
.draft-editor h2 { margin-top: 0; }
.draft-editor > p { font-size: 13px; line-height: 1.6; }
.draft-editor .platform-account-editor { margin-bottom: 12px; }
.supplemental-fields { margin: 18px 0; border-top: 1px solid var(--line); padding-top: 14px; }
.supplemental-fields > summary { cursor: pointer; color: var(--accent); }
.draft-editor-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.draft-field-row { display: flex; gap: 7px; align-items: flex-start; }
.draft-field-row > input { margin-top: 28px; accent-color: var(--accent); }
.draft-field-row > label { flex: 1; min-width: 0; }
.field-source { font-size: 11px; color: var(--muted); }
.field-source p { max-height: 120px; overflow: auto; white-space: pre-wrap; }
.form-feedback { color: var(--warning); font-size: 13px; }
.operation-dialog { max-width: min(480px, 92vw); color: var(--text); background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
.operation-dialog::backdrop { background: #000a; }
.operation-dialog p { line-height: 1.7; }
.operation-dialog button { margin-right: 10px; }
button:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 1250px) { .workspace { grid-template-columns: 270px minmax(0, 1fr); } .inspector { background: var(--surface); } }
@media (max-width: 900px) { .topbar { grid-template-columns: 90px 1fr auto; } .top-actions { gap: 4px; font-size: 11px; } .shop, .user { padding: 6px; } .workspace { grid-template-columns: 230px minmax(0, 1fr); } .header-actions { flex-wrap: wrap; justify-content: flex-end; } .header-actions button { padding: 6px 8px; font-size: 12px; } .conversation-header { gap: 10px; } .review-fields, .draft-editor-fields { grid-template-columns: 1fr; } }
@media (max-width: 650px) {
  .topbar { height: 140px; grid-template-columns: 1fr; grid-template-rows: 42px 48px 50px; padding: 0 12px; }
  .topbar nav { grid-row: 3; grid-column: 1 / -1; justify-content: space-around; }
  .topbar nav button { padding: 12px 20px; }
  .top-actions { grid-row:2; min-width:0; }
  .top-actions .shop { display:block; min-width:0; flex:1; }
  .top-actions .user { max-width:130px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  #toggleCreators { display: block; padding: 4px 7px; font-size: 12px; }
  .wordmark { font-size: 23px; }
  .workspace, .page-workspace { height: calc(100dvh - 140px); }
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; z-index: 25; top: 140px; bottom: 0; left: 0; width: min(320px, 88vw); transform: translateX(-105%); background: var(--surface); box-shadow: 20px 0 40px #0008; }
  .sidebar.open { transform: translateX(0); }
  .inspector { top: 140px; }
  .conversation-header { padding: 10px 12px; }
  .conversation-header h1 { font-size: 18px; }
  .conversation-header .muted { font-size: 11px; }
  .eyebrow { display: none; }
  .subnav, .composer-wrap { padding-left: 12px; padding-right: 12px; }
  .messages, .workspace-panel { padding: 14px 12px; }
  .message { max-width: 96%; }
  .composer-bottom { gap: 7px; } #sendHint { font-size: 10px; }
  .profile-form-grid { grid-template-columns: 1fr; }
  .page-workspace { padding: 18px 12px; }
}

.message-image { display:block; max-width:min(100%, 360px); max-height:240px; object-fit:contain; border-radius:8px; margin-top:8px; }
.business-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:12px; }
.business-form label { display:flex; flex-direction:column; gap:5px; color:var(--muted); font-size:12px; min-width:0; }
.business-form input, .business-form select, .business-form textarea { min-width:0; width:100%; font-size:13px; }
.business-form input, .business-form select, .business-form textarea { padding:9px 10px; border:1px solid var(--line); border-radius:7px; color:var(--text); background:var(--bg); }
.business-form label:has(textarea), .business-form label:has(select[name="sampleOrderId"]), .business-form .form-feedback { grid-column:1/-1; }
.business-form textarea { min-height:64px; }
.manual-menu { position:relative; font-size:12px; }
.manual-menu summary { cursor:pointer; border:1px solid var(--line); padding:7px 10px; border-radius:6px; }
.manual-menu[open] { padding:6px; background:var(--surface-2); border:1px solid var(--line); border-radius:8px; }
.manual-menu button { margin:4px 2px; }
@media(max-width:650px) { .business-form { grid-template-columns:1fr; } }

.creator-heading { display:flex; gap:14px; align-items:center; min-width:0; }
.creator-heading .creator-avatar { width:52px; height:52px; display:block; }
.creator-heading h1 { overflow-wrap:anywhere; }
.completion-overview { display:flex; gap:16px; align-items:center; margin:16px 0; }
.completion-ring { --completion:0%; position:relative; flex:none; width:68px; height:68px; border-radius:50%; background:conic-gradient(var(--accent) var(--completion), var(--line) 0); display:grid; place-items:center; }
.completion-ring::before { content:""; position:absolute; inset:7px; border-radius:50%; background:var(--surface); }
.completion-ring strong { position:relative; font-size:18px; }
.completion-overview p { white-space:pre-line; font-size:13px; line-height:1.8; color:var(--muted); margin:0; }
.extraction-history > summary { padding:10px 14px; font-size:12px; cursor:pointer; color:var(--muted); }
.review-fields { margin:0 14px 10px; padding:8px 0; }
.current-draft-card .review-fields { grid-template-columns:repeat(3,minmax(0,1fr)); }
.profile-review-card, .current-draft-card { border-radius:10px; }
.business-form { padding:0 14px 14px; }
.business-form .primary { font-size:13px; }
.review-card > h3, .review-card > p { margin:12px 14px; }
@media(max-width:900px) { .current-draft-card .review-fields { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:650px) { .creator-heading { gap:9px; } .creator-heading .creator-avatar { width:38px; height:38px; } .creator-heading .muted { max-width:170px; } }

.contact-dialog { color: var(--text,#e8f3ef); background:#12241d; border:1px solid #35564a; border-radius:16px; width:min(600px,calc(100vw - 40px)); max-height:80dvh; overflow:auto; padding:24px; }
.contact-dialog::backdrop { background:rgba(0,0,0,.65); }
.contact-result { display:grid; gap:12px; margin-top:18px; }
.contact-result strong { overflow-wrap:anywhere; }
#currentShop {max-width:180px;background:#14281f;color:inherit;border:1px solid #35564a;border-radius:8px;padding:8px;}
.workflow-dialog { color:var(--text); background:var(--surface); border:1px solid var(--line); border-radius:14px; width:min(620px,calc(100vw - 24px)); max-height:85dvh; overflow:auto; padding:24px; }
.workflow-dialog::backdrop {background:rgba(0,0,0,.65);}
.workflow-dialog .form-note {grid-column:1/-1;}
.lifecycle-summary {display:flex; flex-wrap:wrap; align-items:center; gap:10px; padding:12px 0 18px; color:var(--accent);}
.quality-badge {font-size:11px; padding:3px 6px; border-radius:5px; color:#f5cc74; background:#322e1e;}
.creator-list-extra {display:flex;flex-wrap:wrap;gap:4px;margin-top:6px;}
.creator-list-extra .shipping-age {color:#f5cc74;font-size:11px;}
.quality-options {grid-column:1/-1;border:1px solid var(--line);border-radius:8px;padding:12px;display:flex;flex-wrap:wrap;gap:18px;}
.quality-options label {display:flex;align-items:center;gap:6px;}
.quality-options input {width:auto;}
.content-metrics {display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;}
.content-metrics div {padding:9px;background:var(--bg);border-radius:7px;}
.content-metrics dt {font-size:11px;color:var(--muted);}
.content-metrics dd {margin:8px 0 0;font-weight:600;}
.content-details details {border-top:1px solid var(--line);padding-top:12px;}
.provider-unavailable {color:#e0b15c;padding:10px;border:1px solid #675432;border-radius:8px;}
@media(max-width:650px){.content-metrics{grid-template-columns:repeat(2,minmax(0,1fr));}.workflow-dialog{padding:16px;}.workspace-section-header{flex-wrap:wrap;}}

.bounded-record-table { max-height: 360px; overflow: auto; scrollbar-gutter: stable; }
.bounded-record-table th { position: sticky; top: 0; z-index: 1; background: var(--panel, #14221d); }
.bounded-record-table:focus-visible { outline: 2px solid var(--accent, #3de3a2); outline-offset: 2px; }
#simulationBadge { white-space:nowrap; color:var(--accent); font-size:10px; border:1px solid var(--line); border-radius:5px; padding:3px 5px; }
