:root {
  --page: #f5f6f8;
  --surface: #ffffff;
  --side: #eceef1;
  --soft: #f0f1f3;
  --ink: #1b1f24;
  --muted: #555f6d;
  --line: #d6dbe1;
  --control: #74808f;
  --accent: #0057b8;
  --accent-hover: #004895;
  --accent-soft: #eaf1fc;
  --success: #17624a;
  --success-soft: #eaf5f0;
  --warning: #795400;
  --warning-soft: #fff1d6;
  --danger: #a44215;
  --danger-soft: #fff0e7;
  --on-accent: #ffffff;
  --inverse: var(--ink);
  --focus-color: var(--accent);
  --chart-1: #005a96; --chart-2: #b25b00; --chart-3: #365d70; --chart-4: #806400; --chart-5: #955348;
  --gray-0: var(--surface); --gray-25: var(--surface); --gray-50: var(--soft); --gray-100: var(--soft);
  --gray-200: var(--line); --gray-300: var(--line); --gray-500: var(--muted); --gray-700: var(--ink); --gray-800: var(--ink); --gray-900: var(--ink);
  --blue: var(--accent); --blue-dark: var(--accent-hover); --blue-500: var(--accent); --blue-600: var(--accent-hover);
  --blue-50: var(--accent-soft); --blue-100: var(--accent-soft);
  --green: var(--success); --green-dark: var(--success); --teal: var(--success); --teal-600: var(--success); --teal-50: var(--success-soft);
  --amber: var(--warning); --amber-700: var(--warning); --amber-50: var(--warning-soft);
  --red: var(--danger); --red-600: var(--danger); --red-50: var(--danger-soft);
  color-scheme: light;
}
:root[data-theme="graphite"] {
  color-scheme: dark;
  --page: #18191b; --surface: #222427; --side: #1d1f21; --soft: #2b2d31;
  --ink: #f3f4f5; --muted: #b2bac4; --line: #3a3f45; --control: #7e8793;
  --accent: #8dbbff; --accent-hover: #b0d1ff; --accent-soft: #293a51;
  --success: #88d5bc; --success-soft: #213a31;
  --warning: #f3c969; --warning-soft: #40351c;
  --danger: #f2ab87; --danger-soft: #432e25;
  --on-accent: #111c2a;
  --chart-1: #8dbbff; --chart-2: #f3c969; --chart-3: #88c9da; --chart-4: #d5bc81; --chart-5: #f2ab87;
}
:root[data-theme="colorblind"] {
  --page: #f4f6f8; --surface: #ffffff; --side: #edf0f3; --soft: #f0f2f4;
  --ink: #171b20; --muted: #4c5866; --line: #c8d0d9; --control: #626f7e;
  --accent: #005a96; --accent-hover: #004779; --accent-soft: #e6f1f9;
  --success: #244354; --success-soft: #eaf0f3;
  --warning: #795400; --warning-soft: #fff1d6;
  --danger: #a44215; --danger-soft: #fff0e7;
}
html, body { background: var(--page); color: var(--ink); }
body { caret-color: var(--accent); }
* { scrollbar-color: var(--line) var(--soft); }
::selection { background: var(--accent); color: var(--on-accent); }
::placeholder { color: var(--muted); opacity: 1; }
:focus-visible { outline: 2px solid var(--focus-color) !important; outline-offset: 3px; box-shadow: none !important; }
.sidebar :focus-visible { outline-color: var(--focus-color) !important; }
input, select, textarea { color: var(--ink); background-color: var(--surface); accent-color: var(--accent); }
.topbar { background: var(--surface); border-color: var(--line); }
.primary, .primary:hover { color: var(--on-accent); }
.primary { background: var(--accent); }
.primary:hover { background: var(--accent-hover); }
.secondary, .icon-button { background: var(--surface); color: var(--ink); }
.secondary:hover, .icon-button:hover { background: var(--soft); border-color: var(--muted); }
.settings-hero .page-kicker { display: none; }
.settings-hero h1 { margin-top: 0; }
.ui-muted { color: var(--muted); }
.ui-status { display: inline-flex; align-items: center; gap: 7px; color: var(--accent); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.ui-status .lucide { flex: none; width: 16px; height: 16px; }
.ui-status.success { color: var(--success); }
.ui-status.warning { color: var(--warning); }
.ui-status.error { color: var(--danger); }
.ui-status.neutral { color: var(--muted); }
.icon-text { color: var(--accent); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.appearance-options { display: grid; gap: 0; margin: 24px 0; padding: 0; border: 0; }
.appearance-options legend { padding: 0 0 12px; font-size: 13px; color: var(--muted); }
.appearance-options label { display: flex; align-items: center; gap: 14px; min-height: 68px; padding: 12px; border-bottom: 1px solid var(--line); cursor: pointer; }
.appearance-options label:has(:checked) { background: var(--accent-soft); }
.appearance-options label > span:last-child:not(.theme-swatch) { color: var(--muted); font-size: 12px; }
.theme-swatch { width: 42px; height: 30px; border-radius: 4px; border: 1px solid #738097; box-shadow: inset 10px 0 0 #171b24; }
.swatch-light { background: #fff; }.swatch-graphite { background: #2c2f35; }.swatch-colorblind { background: #e8f3fc; box-shadow: inset 10px 0 0 #005a96; }
.prompt-toolbar, .sourcing-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 20px 0; }
.prompt-toolbar > .ui-status, .sourcing-toolbar > .ui-status { margin-right: auto; }
.prompt-toolbar button, .sourcing-toolbar button, .sourcing-filters button, .regenerate-actions button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding-inline: 12px; }
.direction-prompt-item { padding: 24px 0; border-top: 1px solid var(--line); }
.direction-prompt-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.direction-prompt-heading label { margin-right: auto; font-size: 14px; font-weight: 650; }
.direction-prompt-item textarea, #regeneratePrompt { width: 100%; min-height: 144px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; resize: vertical; line-height: 1.7; font-size: 13px; }
textarea[aria-invalid="true"] { border-color: var(--danger); }
.prompt-item-meta { display: flex; gap: 16px; flex-wrap: wrap; align-items: start; justify-content: space-between; margin-top: 8px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.prompt-item-meta details { max-width: 75ch; }
.prompt-item-meta summary { cursor: pointer; color: var(--accent); text-align: right; }
.prompt-item-meta p { white-space: pre-wrap; line-height: 1.7; }
.published-view-tabs { display: flex; gap: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.published-view-tabs button { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 4px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: 13px; }
.published-view-tabs [aria-selected="true"] { border-bottom-color: var(--accent); color: var(--accent); }
.sourcing-filters { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; }
.sourcing-filters label { display: grid; gap: 7px; flex: 1 1 130px; min-width: 0; color: var(--muted); font-size: 12px; }
.sourcing-filters .sourcing-search { flex: 2 1 180px; }
.sourcing-filters input, .sourcing-filters select { width: 100%; min-width: 0; height: 40px; border: 1px solid var(--line); border-radius: 6px; padding: 0 8px; font-size: 13px; }
.sourcing-filters button { height: 40px; }
.sourcing-scroll { overflow: auto; border-block: 1px solid var(--line); }
.sourcing-table { width: 100%; min-width: 1160px; border-collapse: collapse; background: var(--surface); font-size: 12px; line-height: 1.6; font-variant-numeric: tabular-nums; }
.sourcing-table th { padding: 12px; text-align: left; background: var(--soft); color: var(--muted); font-weight: 600; }
.sourcing-table td { padding: 14px 12px; vertical-align: top; border-top: 1px solid var(--line); max-width: 240px; overflow-wrap: anywhere; }
.sourcing-table td > span, .sourcing-table td > strong { display: flex; margin-bottom: 6px; }
.sourcing-copy-value { display: flex; align-items: start; gap: 5px; }
.sourcing-copy-value > span { flex: 1; }
.sourcing-copy-value .icon-button { flex: none; width: 28px; height: 28px; border: 0; }
.sourcing-copy-value .lucide { width: 14px; height: 14px; }
.sourcing-source-actions { display: flex; align-items: center; gap: 6px; }
.sourcing-history { padding-left: 18px; min-width: 150px; }
.sourcing-table summary { cursor: pointer; color: var(--accent); }
.ui-empty { display: grid; justify-items: center; gap: 10px; padding: 60px 20px; color: var(--muted); font-size: 13px; text-align: center; }
.ui-empty > .lucide { width: 28px; height: 28px; }
.ui-empty strong { color: var(--ink); }
.ui-table-skeleton { display: grid; gap: 1px; border-block: 1px solid var(--line); }
.ui-table-skeleton span { height: 76px; background: var(--soft); }
.regenerate-dialog { width: min(760px, calc(100% - 24px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); box-shadow: 0 18px 48px #0005; }
.regenerate-dialog::backdrop { background: #0009; }
.regenerate-head { display: flex; align-items: start; gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.regenerate-head > div { min-width: 0; flex: 1; }
.regenerate-head h2 { margin: 0; font-size: 20px; }
.regenerate-head p { margin: 8px 0 0; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.regenerate-body { padding: 24px; }
.regenerate-prompt-label { display: block; font-size: 13px; font-weight: 650; margin-bottom: 10px; }
.reference-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 24px 0 12px; }
.reference-heading h3 { margin: 0; font-size: 14px; }
.reference-heading span { color: var(--muted); font-size: 12px; }
.regenerate-references { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.reference-image { min-width: 0; display: grid; gap: 7px; cursor: pointer; }
.reference-image img { width: 100%; aspect-ratio: 1; object-fit: contain; background: var(--soft); border: 1px solid var(--line); border-radius: 4px; }
.reference-image:has(:checked) img, .reference-primary img { border: 2px solid var(--accent); }
.reference-image span { display: flex; gap: 5px; align-items: center; color: var(--muted); font-size: 12px; }
.reference-primary { cursor: default; }
.reference-primary span { color: var(--accent); }
#regenerateResult { margin: 24px 0 0; display: grid; justify-items: start; gap: 8px; color: var(--muted); font-size: 12px; }
#regenerateResultImage { width: 180px; height: 240px; object-fit: contain; background: var(--soft); }
.regenerate-cost { padding-top: 20px; margin-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.7; }
.regenerate-actions { position: sticky; bottom: 0; display: flex; justify-content: end; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--line); background: var(--surface); }
.regenerate-dialog { overflow: hidden; }
.regenerate-dialog form { display: flex; flex-direction: column; max-height: calc(100dvh - 34px); }
.regenerate-dialog .regenerate-head, .regenerate-dialog .regenerate-actions { flex-shrink: 0; }
.regenerate-dialog .regenerate-body { min-height: 0; flex: 1; overflow: auto; overscroll-behavior: contain; }
.regenerate-body textarea { display: block; width: 100%; min-height: 76px; resize: vertical; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); padding: 12px; font: inherit; font-size: 14px; line-height: 1.6; }
.regenerate-body label { font-size: 13px; font-weight: 600; color: var(--ink); }
.regenerate-direction { display: grid; gap: 8px; }
.regenerate-direction .regenerate-prompt-label { margin: 0; }
.regenerate-source { margin-top: 20px; border-block: 1px solid var(--line); }
.regenerate-source summary { padding: 14px 0; cursor: pointer; color: var(--ink); font-weight: 600; font-size: 13px; }
.regenerate-source-fields { display: grid; gap: 8px; padding: 0 0 16px; }
.regenerate-source-fields label:not(:first-child) { margin-top: 12px; }
.regenerate-source-fields p { margin: 0; font-size: 13px; line-height: 1.6; }
.regenerate-body .prompt-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 12px; }
.regenerate-body .prompt-toolbar label { display: inline-flex; align-items: center; min-height: 40px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.regenerate-dialog .reference-image label { display: flex; align-items: center; gap: 6px; min-height: 30px; font-size: 12px; font-weight: 500; }
.reference-image input { accent-color: var(--accent); flex: none; }
#productModal .product-modal { max-height: calc(100dvh - 32px); display: flex; flex-direction: column; overflow: hidden; padding: 0; }
#productModal .modal-head { flex-shrink: 0; margin: 0; padding: 18px 24px; align-items: center; }
#productModal .modal-head h2 { max-width: 70ch; font-size: 18px; overflow-wrap: anywhere; margin: 0; }
#productModal .product-form { display: flex; flex-direction: column; overflow: auto; gap: 0; padding: 0 24px; overscroll-behavior: contain; }
.product-editor-tabs { display: flex; gap: 6px; position: sticky; top: 0; background: var(--surface); padding: 12px 0; border-bottom: 1px solid var(--line); z-index: 3; flex-shrink: 0; }
.product-editor-tabs button { flex: 1; min-height: 42px; border: 0; border-radius: 8px; color: var(--ink); background: var(--surface); font-weight: 600; font-size: 14px; }
.product-editor-tabs button:hover { background: var(--soft); }
.product-editor-tabs button[aria-selected="true"] { background: var(--accent-soft); color: var(--accent); }
#productModal [data-editor-panel] { padding-block: 20px; min-width: 0; }
#productModal [data-editor-panel] h3 { margin: 0 0 16px; color: var(--ink); font-size: 16px; }
#productModal .modal-actions { bottom: 0; flex-shrink: 0; margin: 0; padding: 14px 0; border-top: 1px solid var(--line); background: var(--surface); z-index: 4; }
#productLoadStatus { padding: 32px 24px; display: flex; align-items: center; gap: 16px; min-height: 180px; color: var(--ink); }
#productFieldsStatus { font-size: 13px; line-height: 1.6; color: var(--ink); margin-block: 12px; }
#productModal .ozon-field-grid { align-items: start; gap: 16px; }
#productModal .ozon-field-grid label { display: grid; gap: 8px; padding: 12px 0; border: 0; }
#productModal .ozon-field-grid label.required > span:first-child { color: var(--ink); font-weight: 650; }
#productModal .media-grid { max-height: none; overflow: visible; }
#productModal .media-image-frame { position: relative; }
#mediaGrid .media-preview-button { display: block; width: 100%; padding: 0; }
#mediaGrid .media-image-frame { display: block; width: 100%; height: clamp(160px, 24dvh, 240px); overflow: hidden; background: var(--soft); }
#mediaGrid .media-image-frame > img { width: 100%; height: 100%; object-fit: contain; }
.media-redraw-overlay { position: absolute; z-index: 2; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: var(--surface); color: var(--ink); opacity: .94; }
#mediaGrid .media-slot-card { scroll-margin-top: 76px; }
.media-redraw-overlay strong { font-size: 16px; }
.media-redraw-overlay small { color: var(--ink); font-size: 12px; }
.media-redraw-overlay .lucide { width: 24px; height: 24px; animation: media-redraw-turn 2s linear infinite; }
.media-redraw-error { flex-basis: 100%; margin: 0 0 6px; color: var(--red); font-size: 12px; line-height: 1.5; }
.regenerate-dialog :focus-visible, #productModal :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.regenerate-dialog ::selection, #productModal ::selection { background: var(--accent-soft); color: var(--ink); }
.regenerate-dialog, #productModal .product-form { scrollbar-color: var(--muted) var(--surface); scrollbar-width: thin; }
.regenerate-dialog textarea, #productModal input, #productModal textarea { caret-color: var(--accent); }
@keyframes media-redraw-turn { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .media-redraw-overlay .lucide { animation: none; } }
@media (max-width: 760px) {
  #productModal .modal-head { padding: 16px; }
  #productModal .product-form { padding-inline: 16px; }
  #productModal .modal-actions { flex-wrap: wrap; }
  .product-editor-tabs { gap: 2px; }
  .product-editor-tabs button { font-size: 13px; }
  #mediaGrid .media-slot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .sourcing-filters label { flex-basis: calc(50% - 10px); }
  .sourcing-filters .sourcing-search { flex-basis: 100%; }
  .regenerate-head, .regenerate-body { padding: 16px; }
  .regenerate-actions { padding: 12px 16px; }
  .regenerate-references { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .direction-prompt-heading { flex-wrap: wrap; }
  .prompt-toolbar > .ui-status { flex-basis: 100%; }
  .sourcing-toolbar > .ui-status { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Shared desktop surfaces. Legacy layout rules consume the same semantic tokens. */
:root { --shadow-sm: none; --shadow-lg: 0 16px 48px #0003; --focus: 0 0 0 2px var(--focus-color); }
body { font-family: "Segoe UI Variable", "Segoe UI", "Microsoft YaHei", sans-serif; font-size: 14px; line-height: 1.5; }
body, button, input, select, textarea, h1, h2, h3, small, strong { letter-spacing: 0; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease; }
button:disabled { cursor: not-allowed; opacity: .6; }
button:active:not(:disabled) { transform: none; }
input:not([type="checkbox"]):not([type="radio"]), select, textarea { border-color: var(--control); color: var(--ink); background-color: var(--surface); border-radius: 5px; }
input[type="checkbox"], input[type="radio"] { flex: none; width: 17px; height: 17px; accent-color: var(--accent); cursor: pointer; }
input[readonly], textarea[readonly] { background: var(--soft); }
button .lucide { flex: none; }
.primary { min-height: 38px; height: 40px; padding-inline: 16px; background: var(--accent); color: var(--on-accent); border: 1px solid var(--accent); border-radius: 5px; font-size: 13px; font-weight: 650; box-shadow: none; }
.primary:hover { background: var(--accent-hover); color: var(--on-accent); border-color: var(--accent-hover); }
.secondary, .icon-button, .action-button { border-color: var(--control); border-radius: 5px; color: var(--ink); background: var(--surface); box-shadow: none; }
.secondary:hover, .icon-button:hover, .action-button:hover { background: var(--soft); border-color: var(--accent); color: var(--accent); }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex: none; }
.icon-text, .text-button, .clear-button { color: var(--accent); }
.danger, .danger-outline, .danger-text { color: var(--danger); }
.danger-outline { border-color: var(--danger); background: var(--surface); }
.message { font-size: 13px; line-height: 1.6; }
.message.error, .message.success { border-left: 3px solid currentColor; padding-left: 10px; }
.app-shell { grid-template-columns: 218px minmax(0, 1fr); }
.sidebar { width: 218px; padding: 24px 12px 16px; background: var(--side); color: var(--ink); border-color: var(--line); }
.brand { padding: 0 10px 26px; font-size: 15px; gap: 10px; color: var(--ink); }
.brand-mark { width: 32px; height: 32px; border: 0; border-radius: 6px; background: var(--accent); color: var(--on-accent); font-size: 18px; }
.side-label { padding: 12px 12px 8px; color: var(--muted); font-size: 12px; }
.side-nav { gap: 4px; }
.nav-item { min-height: 44px; padding-inline: 12px; border-radius: 5px; color: var(--muted); font-size: 14px; font-weight: 500; }
.nav-item:hover { background: var(--surface); color: var(--ink); }
.nav-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.nav-item.active::before { left: 0; height: 24px; width: 3px; border-radius: 2px; background: var(--accent); }
.nav-icon, .nav-item:hover .nav-icon { color: inherit; }
.nav-count { border-radius: 4px; background: var(--surface); color: var(--muted); font-size: 12px; }
.nav-item.active .nav-count { color: var(--accent); background: var(--surface); }
.service-state { padding: 16px 10px 0; color: var(--muted); }
.service-state .lucide, .automation-state .lucide { width: 16px; height: 16px; background: none; border: 0; border-radius: 0; color: inherit; }
.topbar { min-height: 68px; height: auto; padding: 12px 28px; gap: 18px; background: var(--surface); border-color: var(--line); backdrop-filter: none; }
.store-picker { min-width: 0; gap: 12px; }
.store-picker > span { color: var(--muted); font-size: 12px; }
.store-picker select { min-width: 160px; max-width: 220px; height: 38px; font-size: 13px; }
.topbar-actions { gap: 10px; min-width: 0; }
.topbar-actions .icon-button { border-color: transparent; background: transparent; }
.topbar-actions .icon-button:hover { border-color: var(--control); background: var(--soft); }
.automation-state, .automation-state.offline { color: var(--muted); max-width: 210px; font-size: 12px; }
.automation-state span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.session-user { color: var(--ink); max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tenant-entitlement { background: var(--soft); border: 1px solid var(--line); color: var(--ink); border-radius: 5px; box-shadow: none; min-height: 40px; }
.tenant-entitlement small { color: var(--muted); font-size: 12px; }
.tenant-entitlement strong { color: var(--ink); font-size: 14px; }
.tenant-entitlement > .lucide { color: var(--accent); }
.content-wrap { padding: 32px 32px 56px; max-width: 1600px; }
.narrow-wrap { max-width: 1080px; }
.page-heading, .settings-hero { margin-bottom: 24px; }
.page-heading h1, .settings-hero h1 { font-size: 26px; line-height: 1.3; font-weight: 680; margin: 0; color: var(--ink); }
.page-heading p, .settings-hero p { font-size: 13px; line-height: 1.7; color: var(--muted); margin-top: 8px; }
.page-kicker, .panel-kicker { display: none; }
.page-count { background: var(--surface); border: 1px solid var(--line); border-radius: 5px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.source-composer { padding: 24px 0; border: 0; border-block: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; }
.source-composer textarea { height: 260px; min-height: 180px; padding: 16px; font-size: 14px; line-height: 1.8; background: var(--surface); }
.source-composer > label { font-size: 14px; color: var(--ink); }
.source-composer .composer-foot { background: transparent; padding-inline: 0; }
.link-stats { font-size: 13px; }
.link-stats b { font-size: 15px; color: var(--ink); }
.pending-toolbar, .processing-toolbar, .publication-toolbar { background: transparent; border-color: var(--line); padding-block: 12px; }
.product-row, .pending-product-card, .published-row, .sku-link-card { background: var(--surface); border-color: var(--line); border-radius: 6px; box-shadow: none; }
.product-row:hover, .published-row:hover { background: var(--soft); }
.pending-product-list { background: transparent; }
.pending-product-title, .publication-product strong { font-size: 14px; line-height: 1.6; }
.badge { min-height: 26px; display: inline-flex; align-items: center; font-size: 12px; border-radius: 4px; }
.product-form label, .field-grid label, .modal-section p, .modal-section small { font-size: 13px; }
.product-modal, .modal, .confirm-modal, .auth-card, .membership-gate-card { background: var(--surface); color: var(--ink); border-color: var(--line); border-radius: 8px; box-shadow: var(--shadow-lg); }
.modal-head, .modal-footer, .product-modal-head, .product-modal-foot { background: var(--surface); border-color: var(--line); }
.image-preview-dialog, .image-preview-stage { background: var(--surface); color: var(--ink); }
.image-preview-backdrop, .modal-backdrop { background: #0009; backdrop-filter: none; }
.modal-layer > [role="dialog"] { position: relative; z-index: 1; }
#productModal .product-modal { width: min(1200px, 100%); }
#mediaGrid .media-slot-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
#mediaGrid .media-slot-card { min-width: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); box-shadow: none; overflow: hidden; }
#mediaGrid .media-image-frame { background: var(--soft); border: 0; aspect-ratio: 3 / 4; }
#mediaGrid .media-image-frame img { object-fit: contain; width: 100%; height: 100%; }
#mediaGrid .media-slot-card .media-slot-head { color: var(--ink); background: var(--surface); font-size: 13px; }
#mediaGrid .media-slot-card button { min-height: 34px; font-size: 12px; }
.media-slot-empty, .media-empty, .media-slot-empty p { color: var(--muted); background: var(--soft); }
.media-history-button, .media-regenerate { color: var(--accent); }
.media-delete { color: var(--danger); }

/* One queue row represents one source link; expanded detail keeps the real failure. */
.processing-overview { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 0; background: transparent; border: 0; border-block: 1px solid var(--line); border-radius: 0; box-shadow: none; margin: 0 0 20px; padding: 20px 0; }
.processing-overview > div { padding: 0 24px; border-color: var(--line); }
.processing-overview > div:first-child { padding-left: 0; }
.processing-overview small { color: var(--muted); font-size: 13px; }
.processing-overview strong { color: var(--ink); font-size: 28px; font-weight: 650; font-variant-numeric: tabular-nums; }
.processing-overview-lead { display: flex; gap: 12px; align-items: center; }
.processing-overview-lead > .lucide { width: 30px; height: 30px; color: var(--accent); }
.processing-overview-lead strong { font-size: 16px; }
#processingAttentionCount { color: var(--danger); }
.processing-list { display: grid; gap: 0; border-block: 1px solid var(--line); }
.processing-list.empty { padding: 36px 16px; }
.processing-card { display: grid; grid-template-columns: 20px 60px minmax(150px, 1fr) 145px 112px 144px; grid-template-areas: "check thumb main state time actions" "detail detail detail detail detail detail"; column-gap: 16px; row-gap: 0; min-height: 110px; padding: 18px 16px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: var(--surface); box-shadow: none; align-items: center; }
.processing-card:last-child { border-bottom: 0; }
.processing-card:hover { box-shadow: none; background: var(--surface); transform: none; }
.processing-card.failed { border-left: 3px solid var(--danger); padding-left: 13px; }
.processing-check { grid-area: check; }
.processing-thumb { grid-area: thumb; width: 60px; height: 72px; border: 1px solid var(--line); border-radius: 4px; background: var(--soft); overflow: hidden; }
.processing-thumb img { width: 100%; height: 100%; object-fit: contain; }
.processing-card-main { grid-area: main; display: grid; gap: 5px; min-width: 0; }
.processing-card-main h2 { margin: 0; font-size: 14px; font-weight: 650; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--ink); }
.processing-row-meta, .processing-card .source-pill { color: var(--muted); font-size: 12px; line-height: 1.4; background: none; padding: 0; border: 0; overflow-wrap: anywhere; }
.processing-row-state { grid-area: state; display: grid; justify-items: start; gap: 8px; min-width: 0; }
.processing-row-state small { color: var(--muted); font-size: 12px; }
.processing-status { display: inline-flex; align-items: center; gap: 6px; background: var(--accent-soft); color: var(--accent); border: 0; border-radius: 4px; padding: 5px 8px; font-size: 12px; white-space: normal; line-height: 1.4; }
.processing-status.failed { color: var(--danger); background: var(--danger-soft); }
.processing-status .lucide { width: 15px; height: 15px; flex: none; }
.processing-row-time { grid-area: time; font-size: 12px; color: var(--muted); line-height: 1.8; font-variant-numeric: tabular-nums; }
.processing-actions { grid-area: actions; display: flex; justify-content: end; align-items: center; gap: 6px; flex-wrap: nowrap; }
.processing-actions button { min-width: 34px; min-height: 34px; height: 34px; border: 1px solid transparent; padding: 7px; border-radius: 4px; background: transparent; color: var(--muted); }
.processing-actions button:hover { color: var(--accent); border-color: var(--control); background: var(--soft); }
.processing-actions .retry-processing { color: var(--accent); gap: 4px; font-size: 12px; }
.processing-actions .delete-processing:hover { color: var(--danger); border-color: var(--danger); background: var(--danger-soft); }
.processing-expand[aria-expanded="true"] .lucide { transform: rotate(180deg); }
.processing-progress { width: 100%; height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; margin: 0; }
.processing-progress i { background: var(--accent); display: block; width: var(--progress); height: 100%; box-shadow: none; }
.processing-detail { grid-area: detail; padding: 20px 0 2px; margin-top: 18px; border-top: 1px solid var(--line); min-width: 0; }
.processing-phase-rail { display: grid; grid-template-columns: repeat(4, 1fr) 1.8fr; gap: 8px; padding: 0; margin: 0; }
.processing-phase-rail > span { display: flex; align-items: center; gap: 8px; color: var(--muted); background: transparent; min-width: 0; }
.processing-phase-rail > span::after { display: none; }
.processing-phase-rail i { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid var(--control); border-radius: 4px; color: var(--muted); background: var(--surface); font-style: normal; }
.processing-phase-rail b { font-size: 12px; font-weight: 500; color: inherit; }
.processing-phase-rail .current, .processing-phase-rail .current i { color: var(--accent); border-color: var(--accent); }
.processing-phase-rail .current i { background: var(--accent-soft); }
.processing-phase-rail .failed, .processing-phase-rail .failed i { color: var(--danger); border-color: var(--danger); }
.processing-detail-summary { color: var(--muted); font-size: 13px; margin: 16px 0 10px; }
.processing-error { display: flex; align-items: start; gap: 8px; padding: 12px; background: var(--danger-soft); color: var(--danger); border: 1px solid var(--danger); border-radius: 4px; font-size: 13px; line-height: 1.7; }
.processing-error .lucide { flex: none; margin-top: 3px; }
.processing-error span { overflow-wrap: anywhere; }
.processing-detail > a { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--accent); text-decoration: none; }
.processing-intake { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: var(--accent-soft); color: var(--accent); box-shadow: none; }

/* Settings stays a flat tool surface; only the selectable theme previews are framed. */
.settings-workspace { grid-template-columns: 205px minmax(0, 1fr); gap: 0; border-top: 1px solid var(--line); padding-top: 24px; }
.settings-sections { border: 0; border-right: 1px solid var(--line); padding: 0 16px 0 0; border-radius: 0; background: transparent; gap: 5px; }
.settings-section-tab { grid-template-columns: 24px minmax(0, 1fr); padding: 12px 10px; min-height: 62px; border: 0; border-radius: 5px; background: transparent; box-shadow: none; color: var(--muted); }
.settings-section-tab > .lucide { background: transparent; padding: 0; width: 19px; height: 19px; color: inherit; border: 0; }
.settings-section-tab:hover { background: var(--soft); }
.settings-section-tab.active { background: var(--accent-soft); color: var(--accent); box-shadow: none; }
.settings-section-tab strong { font-size: 13px; font-weight: 600; color: inherit; white-space: nowrap; }
.settings-section-tab small { color: var(--muted); font-size: 12px; }
.settings-section-tab b { grid-column: 2; justify-self: start; max-width: 100%; white-space: normal; text-align: left; background: transparent; color: var(--muted); font-size: 12px; }
.settings-panels { padding: 0 0 0 28px; min-width: 0; }
.settings-panel-view { padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.settings-panel-intro { padding: 0 0 20px; border-color: var(--line); }
.settings-panel-intro h2 { font-size: 20px; color: var(--ink); line-height: 1.4; }
.settings-panel-intro p, .settings-field small, .settings-list-heading p { color: var(--muted); font-size: 13px; line-height: 1.7; }
.settings-hero-meta { color: var(--muted); background: transparent; border: 0; }
.settings-live-dot { display: none; }
.settings-field > span { font-size: 13px; color: var(--ink); }
.settings-field input, .settings-field select { height: 42px; font-size: 14px; }
.settings-form, .store-form, .user-form { background: transparent; border: 0; border-radius: 0; padding: 20px 0; }
.settings-form-footer { background: transparent; border-color: var(--line); padding-inline: 0; }
.settings-relation-summary, .settings-queue, .settings-form-mode { background: transparent; border: 0; border-block: 1px solid var(--line); border-radius: 0; box-shadow: none; }
.settings-count, .settings-status-chip { background: var(--soft); border-color: var(--line); color: var(--muted); }
.store-access-grid { gap: 8px; }
.store-access-option { padding: 12px; border: 1px solid var(--control); border-radius: 5px; background: var(--surface); box-shadow: none; }
.store-access-option:hover { border-color: var(--accent); background: var(--soft); }
.store-access-option.is-selected, .store-access-option:has(:checked) { background: var(--accent-soft); border-color: var(--accent); box-shadow: none; }
.store-access-option strong { font-size: 13px; color: var(--ink); }
.store-access-option small { color: var(--muted); font-size: 12px; }
.store-access-picker, .member-scope-panel, .user-store-access { border-color: var(--line); background: transparent; border-radius: 5px; box-shadow: none; }
.appearance-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 24px 0 0; }
.appearance-options legend { color: var(--muted); font-size: 13px; padding-bottom: 16px; }
.appearance-options label.theme-choice { display: block; position: relative; padding: 6px; margin: 0; border: 1px solid var(--control); border-radius: 7px; background: var(--surface); min-width: 0; min-height: 0; cursor: pointer; transition: border-color 120ms ease; }
.appearance-options label.theme-choice:has(:checked) { border: 2px solid var(--accent); padding: 5px; background: var(--surface); }
.theme-choice:has(:focus-visible) { outline: 2px solid var(--focus-color); outline-offset: 4px; }
.theme-choice > input { position: absolute; width: 1px; height: 1px; opacity: 0; margin: 0; left: 12px; bottom: 22px; }
.theme-preview { --pv-bg: #fff; --pv-side: #edf0f3; --pv-soft: #f0f2f4; --pv-line: #c8d0d9; --pv-ink: #4c5866; --pv-action: #005a96; --pv-info: #e6f1f9; display: grid; grid-template-columns: 25% 1fr; aspect-ratio: 1.4; border-radius: 3px; overflow: hidden; background: var(--pv-bg); color: var(--pv-ink); pointer-events: none; }
.theme-graphite .theme-preview { --pv-bg: #222427; --pv-side: #1d1f21; --pv-soft: #2b2d31; --pv-line: #535a63; --pv-ink: #b2bac4; --pv-action: #8dbbff; --pv-info: #293a51; }
.theme-light .theme-preview { --pv-bg: #fff; --pv-side: #eceef1; --pv-soft: #f0f1f3; --pv-line: #d6dbe1; --pv-ink: #555f6d; --pv-action: #0057b8; --pv-info: #eaf1fc; }
.preview-nav { display: flex; flex-direction: column; gap: 9px; padding: 14px 8px; background: var(--pv-side); }
.preview-nav b { color: var(--pv-action); font-size: 14px; margin-bottom: 12px; }
.preview-nav i { height: 5px; background: var(--pv-line); border-radius: 1px; }
.preview-nav i:nth-of-type(2) { background: var(--pv-action); height: 7px; }
.preview-work { padding: 0 10px; display: block; }
.preview-toolbar { display: flex; justify-content: space-between; align-items: center; height: 34px; border-bottom: 1px solid var(--pv-line); margin: 0 -10px 14px; padding: 0 10px; }
.preview-toolbar i { width: 40%; height: 5px; background: var(--pv-line); }
.preview-toolbar b { width: 14px; height: 10px; background: var(--pv-action); border-radius: 2px; }
.preview-title { display: block; width: 48%; height: 7px; background: var(--pv-ink); margin-bottom: 14px; }
.preview-metrics { display: flex; gap: 8px; margin-bottom: 12px; }
.preview-metrics i { flex: 1; height: 14px; border-block: 1px solid var(--pv-line); }
.preview-row { display: flex; align-items: center; gap: 6px; height: 28px; border-top: 1px solid var(--pv-line); }
.preview-row > i { width: 16px; height: 19px; background: var(--pv-soft); border: 1px solid var(--pv-line); border-radius: 1px; }
.preview-row > b { flex: 1; height: 4px; background: var(--pv-line); }
.preview-row > em { font-size: 12px; font-style: normal; color: var(--pv-action); width: 18px; text-align: center; }
.preview-row:nth-last-child(2) > em { color: #a44215; }
.theme-graphite .preview-row:nth-last-child(2) > em { color: #f2ab87; }
.theme-caption { display: flex; align-items: center; gap: 8px; padding: 16px 8px 10px; min-height: 48px; }
.appearance-options .theme-caption strong { font-size: 14px; font-weight: 600; color: var(--ink); }
.theme-default { font-size: 12px; color: var(--muted); }
.theme-caption > .lucide { margin-left: auto; width: 18px; height: 18px; visibility: hidden; color: var(--accent); }
.theme-choice:has(:checked) .theme-caption > .lucide { visibility: visible; }
#appearanceStatus { margin-top: 20px; min-height: 24px; }

/* Data labels and actual shares replace decorative motion and glowing scenery. */
.data-screen-wrap { --ds-bg: var(--page); --ds-surface: var(--surface); --ds-surface-2: var(--soft); --ds-cyan: var(--accent); --ds-cyan-soft: var(--accent); --ds-lime: var(--success); --ds-orange: var(--warning); --ds-text: var(--ink); --ds-muted: var(--muted); padding: 28px 32px 48px; background: var(--page); color: var(--ink); }
.data-screen-wrap::before, .data-screen-wrap::after, .data-screen-corners::before, .data-screen-corners::after, .data-screen-title-mark, .data-screen-core::before, .data-screen-core::after { display: none; }
.data-screen-head { background: transparent; border: 0; padding: 0 0 24px; margin: 0; }
.data-screen-title h1 { font-size: 26px; letter-spacing: 0; color: var(--ink); text-shadow: none; }
.data-screen-title p, .data-screen-tools label { color: var(--muted); font-size: 13px; }
.data-screen-tools select, .data-screen-refresh { height: 38px; border: 1px solid var(--control); border-radius: 5px; color: var(--ink); background: var(--surface); }
.data-screen-panel { border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; }
.data-screen-panel-head { padding: 18px 0; border: 0; background: transparent; color: var(--ink); }
.data-screen-panel-head > div, .data-screen-panel-head span { color: var(--ink); font-size: 14px; }
.data-screen-panel-head small, .data-screen-panel-head strong { color: var(--muted); font-size: 12px; }
.data-screen-orbit-stage { height: 320px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(150px, .8fr); gap: 20px; align-items: center; overflow: visible; }
#dataScreenOrbitCanvas { width: 100%; height: 300px; position: static; grid-column: 1; grid-row: 1; }
.data-screen-core { width: 50%; max-width: none; left: 0; top: 50%; transform: translateY(-50%); }
.data-screen-core strong { font-size: 26px; color: var(--ink); text-shadow: none; overflow-wrap: anywhere; max-width: 95%; }
.data-screen-core span { color: var(--muted); font-size: 13px; }
.data-screen-core small { color: var(--muted); font-size: 12px; margin-top: 6px; }
.data-screen-store-nodes { position: static; display: grid; gap: 0; grid-column: 2; pointer-events: auto; }
.data-screen-store-node { position: static; width: auto; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 12px 0; background: transparent; box-shadow: none; gap: 4px; }
.data-screen-store-node span, .data-screen-store-node strong { color: var(--ink); font-size: 13px; overflow-wrap: anywhere; }
.data-screen-store-node small { color: var(--muted); font-size: 12px; }
.data-screen-store-node span::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 7px; background: var(--chart-1); }
.data-screen-store-node-2 span::before { background: var(--chart-2); }.data-screen-store-node-3 span::before { background: var(--chart-3); }.data-screen-store-node-4 span::before { background: var(--chart-4); }.data-screen-store-node-5 span::before { background: var(--chart-5); }
.data-screen-metrics { gap: 0; padding: 0; }
.data-screen-metrics article { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; padding: 22px 0; }
.data-screen-metric-icon { background: var(--accent-soft); color: var(--accent); border: 0; border-radius: 6px; }
.data-screen-metrics strong { font-size: 30px; color: var(--ink); text-shadow: none; }
.data-screen-metrics small, .data-screen-metrics em { color: var(--muted); font-size: 12px; }
.data-screen-funnel { padding: 8px 0 20px; gap: 16px; }
.data-screen-funnel-row { background: transparent; border-color: var(--line); border-radius: 0; box-shadow: none; }
.data-screen-funnel-index { color: var(--muted); background: var(--soft); border: 1px solid var(--line); border-radius: 4px; }
.data-screen-funnel-value, .data-screen-funnel-row strong { color: var(--ink); }
.data-screen-funnel-row small, .data-screen-funnel-row em { color: var(--muted); font-size: 12px; }
.data-screen-funnel-row > i, .data-screen-rank-row i { background: var(--line); }
.data-screen-funnel-row > i b, .data-screen-rank-row i em { background: var(--accent); box-shadow: none; }
.data-screen-rank-row { border-color: var(--line); background: transparent; padding-inline: 0; }
.data-screen-rank-row > b { color: var(--muted); background: var(--soft); border-radius: 4px; }
.data-screen-rank-row strong, .data-screen-rank-row > span { color: var(--ink); font-size: 13px; }
.data-screen-rank-row small { color: var(--muted); font-size: 12px; }
.data-screen-segmented { border: 1px solid var(--control); border-radius: 5px; background: var(--surface); }
.data-screen-segmented button { color: var(--muted); background: transparent; border: 0; font-size: 12px; min-height: 32px; }
.data-screen-segmented button.active { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 -2px var(--accent); }
.data-screen-status-bar { border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--muted); padding: 16px 0; font-size: 12px; }
.data-screen-live-dot { display: none; }
.data-screen-empty { color: var(--muted); background: transparent; font-size: 13px; }
.store-data-command, .store-data-overview, .store-data-table-panel, .auto-promotion-panel { background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; }
.store-data-tabs { background: transparent; border-radius: 0; }
.store-data-tab.active { color: var(--accent); background: var(--accent-soft); border-color: var(--accent); }
.store-data-metric-head, .auto-promotion-head { background: var(--soft); color: var(--muted); }
.store-data-metric-row, .auto-promotion-row { border-color: var(--line); color: var(--ink); }
.auto-promotion-state { color: var(--muted); }
.auto-promotion-state.enabled { color: var(--success); }
.switch-control { position: relative; }
.switch-control input { inset: 0; width: 46px; height: 26px; margin: 0; z-index: 1; pointer-events: auto; }
.switch-control span { border: 1px solid var(--control); background: var(--soft); pointer-events: none; }
.switch-control span::before { width: 18px; height: 18px; top: 3px; left: 3px; background: var(--muted); }
.switch-control input:checked + span { background: var(--accent); border-color: var(--accent); }
.switch-control input:checked + span::before { background: var(--on-accent); }
.switch-control input:focus-visible + span { outline: 2px solid var(--focus-color); outline-offset: 3px; }
.data-screen-core { position: relative; grid-column: 1; grid-row: 1; left: auto; top: auto; transform: none; width: 100%; }
.data-screen-store-node:nth-child(n) { display: grid; grid-template-columns: minmax(0, 1fr) auto; padding-block: 7px; }
.data-screen-store-node strong { grid-column: 2; grid-row: 1; }
.data-screen-store-node small { grid-column: 1 / -1; }
.data-screen-store-node::before { display: none; }
.data-screen-rank-row:nth-child(n) i em { background: var(--accent); }
.auth-gate, .membership-gate { background: var(--page); backdrop-filter: none; }
.auth-card { border: 1px solid var(--line); padding: 32px; }
.auth-card h1 { font-size: 24px; }

@media (max-width: 1200px) {
  .content-wrap { padding-inline: 24px; }
  .automation-state { display: none; }
  .processing-card { grid-template-columns: 20px 52px minmax(140px, 1fr) 140px 130px; grid-template-areas: "check thumb main state actions" "detail detail detail detail detail"; gap: 12px; }
  .processing-row-time { display: none; }
  .processing-thumb { width: 52px; height: 64px; }
  .settings-workspace { grid-template-columns: 180px minmax(0, 1fr); }
  .settings-panels { padding-left: 20px; }
  .appearance-options { gap: 12px; }
  .theme-preview { aspect-ratio: 1.15; }
  .theme-caption { flex-wrap: wrap; gap: 5px; padding-inline: 4px; }
}
@media (max-width: 1000px) and (min-width: 701px) {
  .app-shell { grid-template-columns: 72px minmax(0, 1fr); }
  .sidebar { width: 72px; padding-inline: 8px; }
  .brand { padding: 0 12px 24px; }
  .brand > span:last-child, .side-label, .service-state, .nav-item > span:not(.nav-icon) { display: none; }
  .nav-item { justify-content: center; padding-inline: 0; }
  .topbar { padding-inline: 20px; }
  .data-screen-wrap { padding-inline: 24px; }
}
@media (max-width: 900px) {
  #mediaGrid .media-slot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-workspace { display: block; }
  .settings-sections { display: flex; border: 0; border-bottom: 1px solid var(--line); overflow-x: auto; padding: 0 0 12px; margin-bottom: 22px; }
  .settings-section-tab { min-width: max-content; flex: none; grid-template-columns: 20px auto; min-height: 44px; padding: 10px 12px; }
  .settings-section-tab small, .settings-section-tab b { display: none; }
  .settings-panels { padding: 0; }
  .appearance-options { gap: 12px; }
  .data-screen-cockpit { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; inset: auto 0 0; width: 100%; height: 68px; display: grid; grid-template-columns: minmax(0, 1fr) auto; background: var(--surface); padding: 6px 8px max(6px, env(safe-area-inset-bottom)); border: 0; border-top: 1px solid var(--control); }
  .sidebar .brand, .sidebar .side-label, .service-state, .side-spacer { display: none; }
  .side-nav { display: flex; overflow-x: auto; align-items: center; gap: 4px; scrollbar-width: none; }
  .sidebar .nav-item { flex: none; min-width: 60px; width: auto; height: 50px; min-height: 50px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 5px 8px; font-size: 12px; }
  .sidebar .nav-item span:not(.nav-icon):not(.nav-count) { display: block; }
  .sidebar .nav-count { display: none; }
  .sidebar .nav-item.active::before { display: none; }
  .main-shell { padding-bottom: 68px; }
  .topbar { padding: 10px 14px; gap: 8px; min-height: 62px; flex-wrap: wrap; }
  .store-picker { flex: 1; }
  .store-picker > span { display: none; }
  .store-picker select { width: 130px; min-width: 90px; max-width: 150px; }
  .session-user { display: none; }
  .topbar-actions { gap: 2px; }
  .tenant-entitlement { min-width: 0; padding: 5px 7px; border: 0; background: transparent; }
  .tenant-entitlement > .lucide, .tenant-entitlement small { display: none; }
  .tenant-entitlement strong { font-size: 12px; white-space: nowrap; }
  #appearanceShortcut { display: none; }
  .content-wrap { padding: 24px 16px 36px; }
  .page-heading h1, .settings-hero h1, .data-screen-title h1 { font-size: 23px; }
  .page-heading { gap: 12px; margin-bottom: 20px; }
  .page-heading p { font-size: 13px; }
  .processing-overview { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 16px 0; }
  .processing-overview .processing-overview-lead { display: none; }
  .processing-overview > div { padding: 0 14px; }
  .processing-overview > div:nth-child(2) { padding-left: 0; border-left: 0; }
  .processing-overview strong { font-size: 24px; }
  .processing-overview small { font-size: 12px; white-space: nowrap; }
  .processing-toolbar { gap: 10px; font-size: 12px; flex-wrap: wrap; }
  .processing-card { grid-template-columns: 18px 48px minmax(0, 1fr); grid-template-areas: "check thumb main" ". state state" ". actions actions" "detail detail detail"; gap: 12px; padding: 16px 12px; }
  .processing-card.failed { padding-left: 9px; }
  .processing-thumb { width: 48px; height: 60px; }
  .processing-row-state { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
  .processing-row-state .processing-progress { flex-basis: 100%; }
  .processing-actions { justify-content: end; }
  .processing-phase-rail { grid-template-columns: 1fr 1fr; gap: 12px; }
  .processing-phase-rail > span:last-child { grid-column: 1 / -1; }
  .processing-detail { margin-top: 4px; }
  .settings-workspace { padding-top: 16px; }
  .appearance-options { grid-template-columns: 1fr; gap: 14px; max-width: 420px; margin-top: 8px; }
  .theme-preview { aspect-ratio: 1.7; }
  .preview-nav { padding: 16px 12px; gap: 12px; }
  .preview-row { height: 32px; }
  .theme-caption { padding: 14px 10px 10px; }
  .settings-form-hint { font-size: 12px; }
  .settings-field-grid { grid-template-columns: minmax(0, 1fr); }
  .settings-field-wide { grid-column: 1; }
  .data-screen-wrap { padding: 24px 16px 36px; }
  .data-screen-orbit-stage { height: auto; min-height: 300px; grid-template-columns: minmax(0, 1fr); gap: 0; }
  #dataScreenOrbitCanvas { height: 280px; }
  .data-screen-core { top: auto; width: 100%; }
  .data-screen-store-nodes { grid-column: 1; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
  .data-screen-store-node { display: grid !important; width: auto; padding: 12px 0; }
  .data-screen-tools { flex-wrap: wrap; gap: 10px; }
  .data-screen-tools label { min-width: 0; flex: 1; }
  .data-screen-tools select { width: 100%; min-width: 0; }
  .data-screen-rank-grid { grid-template-columns: minmax(0, 1fr); }
  .data-screen-rank-row { gap: 10px; }
  .auth-card { padding: 24px; }
}

.local-workspace-notice{margin:12px 24px 0;padding:12px 16px;border:1px solid var(--line);border-radius:8px;background:var(--surface);display:flex;align-items:center;justify-content:space-between;gap:16px;font-size:13px;line-height:1.6}.local-workspace-notice[hidden]{display:none}.local-workspace-notice button{flex-shrink:0}@media(max-width:800px){.local-workspace-notice{margin:10px 12px 0;flex-wrap:wrap}}
