/* spacegen-luminous-auth: presentation only; original rules preserved */
/* Luminous / UI-1. Opt-in tokens: importing this file does not recolor another app. */
.luminous-root,
body[data-ui-theme="luminous"],
body[data-seed-auth] {
  color-scheme: light;
  --sg-bg: #f7f8fc;
  --sg-surface: #ffffff;
  --sg-surface-raised: #ffffff;
  --sg-surface-subtle: #f2f3f9;
  --sg-ink: #171721;
  --sg-muted: #686a7c;
  --sg-line: #e6e7ef;
  --sg-line-strong: #c9cad9;
  --sg-primary: #6250f2;
  --sg-primary-hover: #5140db;
  --sg-primary-soft: #efedff;
  --sg-primary-ink: #4937cf;
  --sg-action-neutral: #171721;
  --sg-action-neutral-hover: #31313f;
  --sg-action-neutral-text: #ffffff;
  --sg-agent-primary: var(--sg-primary);
  --sg-agent-primary-hover: var(--sg-primary-hover);
  --sg-radius: 16px;
  --sg-radius-sm: 10px;
  --sg-radius-lg: 24px;
  --sg-font: Inter, "Segoe UI Variable", "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
  --sg-font-mono: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  --sg-font-body: 14px;
  --sg-font-small: 12px;
  --sg-leading: 1.6;
  --sg-shadow: 0 4px 18px rgb(31 30 64 / 5%);
  --sg-shadow-raised: 0 16px 48px rgb(31 30 64 / 10%);
  --sg-shadow-overlay: 0 24px 80px rgb(31 30 64 / 16%);
  --sg-focus: #6250f2;
  --sg-focus-soft: #e5e0ff;
  --sg-dot: #d8dae8;
  --sg-disabled-bg: #f0f1f6;
  --sg-disabled-ink: #727589;
  --sg-disabled-line: #e0e1eb;
  --sg-running: #2455d6;
  --sg-running-soft: #eaf0ff;
  --sg-draft: #7542c1;
  --sg-draft-soft: #f2ecff;
  --sg-review: #865400;
  --sg-review-soft: #fff4d8;
  --sg-stale: #a64610;
  --sg-stale-soft: #fff0e5;
  --sg-waiting: #606375;
  --sg-waiting-soft: #eef0f5;
  --sg-error: #b52d43;
  --sg-error-soft: #ffedf0;
  /* Decorative gradients belong to entry surfaces or agent identity, never status. */
  --sg-entry-glow: radial-gradient(ellipse at 18% 14%, #ede8ff 0%, transparent 48%),
    radial-gradient(ellipse at 85% 22%, #e5f6ff 0%, transparent 42%),
    radial-gradient(ellipse at 66% 92%, #fff0f7 0%, transparent 44%);
  --sg-agent-glow: radial-gradient(circle at 28% 26%, #f5f1ff, #d4cbff 42%, #b6d9ff 76%, #f1d8ef);
}

/* Status chips require real visible labels in the HTML. Empty chips are hidden. */
:where(.luminous-root, body[data-ui-theme="luminous"]) .sg-status {
  --sg-status-ink: var(--sg-waiting);
  --sg-status-bg: var(--sg-waiting-soft);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  padding: 5px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--sg-status-ink);
  background: var(--sg-status-bg);
  font: 500 var(--sg-font-small) / 1.45 var(--sg-font);
  overflow-wrap: anywhere;
}
:where(.luminous-root, body[data-ui-theme="luminous"]) .sg-status:empty { display: none; }
:where(.luminous-root, body[data-ui-theme="luminous"]) .sg-status::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: currentColor;
}
:where(.luminous-root, body[data-ui-theme="luminous"]) .sg-status:is([data-status="running"], [data-tone="running"]) { --sg-status-ink: var(--sg-running); --sg-status-bg: var(--sg-running-soft); }
:where(.luminous-root, body[data-ui-theme="luminous"]) .sg-status:is([data-status="draft"], [data-tone="draft"], [data-status="dirty"], [data-tone="dirty"]) { --sg-status-ink: var(--sg-draft); --sg-status-bg: var(--sg-draft-soft); }
:where(.luminous-root, body[data-ui-theme="luminous"]) .sg-status:is([data-status="review"], [data-tone="review"]) { --sg-status-ink: var(--sg-review); --sg-status-bg: var(--sg-review-soft); }
:where(.luminous-root, body[data-ui-theme="luminous"]) .sg-status:is([data-status="stale"], [data-tone="stale"]) { --sg-status-ink: var(--sg-stale); --sg-status-bg: var(--sg-stale-soft); }
:where(.luminous-root, body[data-ui-theme="luminous"]) .sg-status:is([data-status="waiting"], [data-tone="waiting"]) { --sg-status-ink: var(--sg-waiting); --sg-status-bg: var(--sg-waiting-soft); }
:where(.luminous-root, body[data-ui-theme="luminous"]) .sg-status:is([data-status="error"], [data-tone="error"]) { --sg-status-ink: var(--sg-error); --sg-status-bg: var(--sg-error-soft); }

:root{--seed-ink:#203b35;--seed-muted:#6b7e75;--seed-line:#dce5df;--seed-accent:#275c4b;--seed-paper:#fbfcfa}
body[data-seed-auth]{margin:0;min-height:100vh;display:grid;place-items:center;background:#eff3ee;background-image:radial-gradient(#ccd7cc .75px,transparent .75px);background-size:24px 24px;color:var(--seed-ink);font:15px/1.65 Inter,system-ui,'Microsoft YaHei',sans-serif}
.seed-auth-card{width:min(490px,calc(100vw - 40px));box-sizing:border-box;padding:42px;background:#ffffffef;border:1px solid var(--seed-line);border-radius:26px;box-shadow:0 24px 80px #15392a0c;margin:30px 0}
.seed-brand{color:var(--seed-ink);text-decoration:none;font-size:18px;font-weight:700;letter-spacing:.13em}.seed-eyebrow{font-size:10px;letter-spacing:.16em;color:var(--seed-muted);margin-top:30px}.seed-auth-card h1{font-size:30px;line-height:1.3;letter-spacing:-.04em;font-weight:550}.seed-auth-card p{color:var(--seed-muted)}
.seed-primary,.seed-auth-card button[type=submit]{display:block;box-sizing:border-box;width:100%;padding:13px 18px;margin:22px 0 12px;border:1px solid var(--seed-accent);border-radius:12px;background:var(--seed-accent);color:#fff;text-decoration:none;text-align:center;font:inherit;font-weight:600;cursor:pointer}
.seed-auth-card label,.seed-admin label{display:block;font-size:13px;margin-top:16px}.seed-auth-card input,.seed-admin input,.seed-admin select{display:block;box-sizing:border-box;width:100%;padding:11px 12px;margin-top:5px;border:1px solid #cbd8d0;border-radius:10px;background:var(--seed-paper);color:var(--seed-ink);font:inherit}
.seed-auth-card button:disabled,.seed-admin button:disabled{opacity:.55;cursor:wait}.seed-auth-card :focus-visible,.seed-admin :focus-visible{outline:3px solid #8fbaa3;outline-offset:3px}.seed-help{margin-top:26px;padding-top:18px;border-top:1px solid var(--seed-line);font-size:12px}.seed-help summary{cursor:pointer}.seed-auth-card [role=status]{min-height:24px;font-size:13px}.seed-auth-card [data-error=true]{color:#a33f31!important}.seed-account-hint{font-size:12px}.seed-quota{font-size:11px;white-space:nowrap;color:var(--seed-muted);padding:7px 10px;border:1px solid var(--seed-line);border-radius:20px;background:#fff}.seed-studio-notice{font-size:12px;color:var(--seed-muted)}
body[data-seed-studio] #toggle-agents,body[data-seed-studio] .team-conversation,body[data-seed-studio] .runtime-controls,body[data-seed-studio] .master-runtime-actions,body[data-seed-studio] .master-login-code,body[data-seed-studio] .master-advanced,body[data-seed-studio] .master-legacy-disclosure,body[data-seed-studio] #instance-backup,body[data-seed-studio] #import-project,body[data-seed-studio] label:has(#import-project),body[data-seed-studio] #courtyard-preset,body[data-seed-studio] #ib-operator-label{display:none!important}
body[data-seed-studio] #ai-workshop-advanced,body[data-seed-studio] .code-workshop details:has(select[aria-label="代码工坊模型"]){display:none!important}
.seed-admin{width:min(850px,calc(100vw - 40px));max-height:85vh;overflow:auto;border:1px solid var(--seed-line);border-radius:20px;padding:26px;color:var(--seed-ink);font:14px/1.6 Inter,system-ui,sans-serif}.seed-admin::backdrop{background:#18372c55;backdrop-filter:blur(3px)}.seed-admin header{display:flex;align-items:center;justify-content:space-between;position:static!important;padding:0!important;min-height:0!important}.seed-admin h2{margin:0;font-size:22px}.seed-admin form{display:grid;grid-template-columns:1fr 1fr;gap:0 20px;margin-top:16px}.seed-admin button{border:1px solid #cad7d0;border-radius:9px;background:#fff;padding:9px 12px;font:inherit;cursor:pointer}.seed-admin form button{align-self:end;margin-top:22px;background:var(--seed-accent);color:white}.seed-admin section{border-top:1px solid var(--seed-line);margin-top:26px;padding-top:16px}.seed-admin article{padding:12px 0;border-bottom:1px solid #edf1ed}.seed-admin article p{margin:4px 0;font-size:12px;color:var(--seed-muted)}.seed-admin .seed-share-once{grid-column:1/-1;background:#f0f6ee;padding:16px;border-radius:12px;overflow-wrap:anywhere}.seed-admin textarea{width:100%;box-sizing:border-box;min-height:90px;font:12px/1.5 monospace;border:1px solid #cbd8d0;border-radius:8px;padding:10px}.seed-admin [role=status]{font-size:12px;min-height:20px;color:var(--seed-muted)}
@media(max-width:600px){.seed-auth-card{padding:28px}.seed-auth-card h1{font-size:26px}.seed-admin form{grid-template-columns:1fr}.seed-quota{font-size:10px;max-width:180px;white-space:normal}}

/* UI-1 presentation adapter. Load after the platform CSS, with tokens.css.
   Platform scope is body[data-ui-theme="luminous"]; anonymous auth uses the
   explicit body[data-seed-auth] scope. No layout state, geometry
   colors, workflow labels, permission gates, or visibility gates are changed. */
body[data-ui-theme="luminous"] {
  --paper: var(--sg-surface);
  --table: var(--sg-bg);
  --ink: var(--sg-ink);
  --muted: var(--sg-muted);
  --line: var(--sg-line);
  --forest: var(--sg-primary);
  --sage: var(--sg-primary-soft);
  --sand: var(--sg-review-soft);
  --studio-ink: var(--sg-ink);
  --studio-muted: var(--sg-muted);
  --studio-border: var(--sg-line);
  --studio-accent: var(--sg-primary);
  --studio-paper: var(--sg-surface);
  --studio-table: var(--sg-bg);
  --seed-ink: var(--sg-ink);
  --seed-muted: var(--sg-muted);
  --seed-line: var(--sg-line);
  --seed-accent: var(--sg-primary);
  --seed-paper: var(--sg-surface);
  background: var(--sg-bg);
  color: var(--sg-ink);
  font-family: var(--sg-font);
  font-size: var(--sg-font-body);
  line-height: var(--sg-leading);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body[data-ui-theme="luminous"] *,
body[data-ui-theme="luminous"] *::before,
body[data-ui-theme="luminous"] *::after { box-sizing: border-box; }
body[data-ui-theme="luminous"] ::selection { color: var(--sg-ink); background: var(--sg-focus-soft); }
body[data-ui-theme="luminous"] :is(button, input, select, textarea) { font-family: var(--sg-font); }
body[data-ui-theme="luminous"] :is(button, input, select, textarea, summary, a, [tabindex]):focus-visible {
  outline: 3px solid var(--sg-focus) !important;
  outline-offset: 3px;
}
body[data-ui-theme="luminous"] :is(button, .upload) {
  min-height: 34px;
  border: 1px solid var(--sg-line-strong);
  border-radius: var(--sg-radius-sm);
  background: var(--sg-surface);
  color: var(--sg-ink);
  font-size: var(--sg-font-body);
  font-weight: 500;
  box-shadow: none;
  transition: background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}
body[data-ui-theme="luminous"] button:hover:not(:disabled):not([aria-disabled="true"]) {
  background: var(--sg-surface-subtle);
  border-color: #b8b5d4;
}
body[data-ui-theme="luminous"] :is(input, select, textarea) {
  border: 1px solid var(--sg-line-strong);
  border-radius: var(--sg-radius-sm);
  background: var(--sg-surface);
  color: var(--sg-ink);
  font-size: var(--sg-font-body);
  box-shadow: none;
  accent-color: var(--sg-primary);
}
body[data-ui-theme="luminous"] :is(input, textarea)::placeholder { color: #73768b; opacity: 1; }
body[data-ui-theme="luminous"] :is(pre, code) { font-family: var(--sg-font-mono); font-size: var(--sg-font-small); }
body[data-ui-theme="luminous"] :is(hr, fieldset) { border-color: var(--sg-line); }
body[data-ui-theme="luminous"] a { color: var(--sg-primary-ink); text-underline-offset: 3px; }
body[data-ui-theme="luminous"] :is(summary, label) { color: var(--sg-ink); }
body[data-ui-theme="luminous"] :is(small, .muted) { color: var(--sg-muted); font-size: var(--sg-font-small); }

/* Platform header and desk chrome retain the current geometry and controls. */
body[data-ui-theme="luminous"] > header {
  background: var(--sg-surface);
  color: var(--sg-ink);
  border-bottom: 1px solid var(--sg-line);
  box-shadow: none;
}
body[data-ui-theme="luminous"] header :is(button, small),
body[data-ui-theme="luminous"] :is(#workspace-state, #identity) { color: var(--sg-muted); font-size: var(--sg-font-small); }
body[data-ui-theme="luminous"] header button { background: var(--sg-surface); border-color: var(--sg-line); }
body[data-ui-theme="luminous"] .semantic-brand strong { color: var(--sg-ink); font-size: 18px !important; letter-spacing: -.4px; font-weight: 650; }
body[data-ui-theme="luminous"] .semantic-brand small { color: var(--sg-muted) !important; font-size: var(--sg-font-small) !important; letter-spacing: .6px !important; }
body[data-ui-theme="luminous"] .semantic-brand-mark { color: var(--sg-primary); }
body[data-ui-theme="luminous"] .semantic-project-switch #projects { color: var(--sg-ink); background: transparent; font-size: var(--sg-font-body); }
body[data-ui-theme="luminous"] :is(.semantic-eyebrow, .semantic-header-menu > summary) { color: var(--sg-muted); font-size: var(--sg-font-small); }
body[data-ui-theme="luminous"] .semantic-preview-notice { color: var(--sg-review); background: var(--sg-review-soft); font-size: var(--sg-font-small); }
body[data-ui-theme="luminous"] :is(.studio-toolbar, .station-nav) { background: var(--sg-bg); border-color: var(--sg-line); }
body[data-ui-theme="luminous"] :is(.studio-toolbar > button, .studio-toolbar .upload) { color: var(--sg-ink); background: var(--sg-surface); font-size: var(--sg-font-small); border: 1px solid var(--sg-line); border-radius: var(--sg-radius-sm); }
body[data-ui-theme="luminous"] .semantic-desk-title > span { color: var(--sg-ink); font-size: var(--sg-font-body); letter-spacing: 0; }
body[data-ui-theme="luminous"] .semantic-desk-title > small { font-size: var(--sg-font-small); color: var(--sg-muted); }
body[data-ui-theme="luminous"] :is(.studio-viewport, .station-map, .station-graph-scroll) {
  background-color: var(--sg-bg);
  background-image: radial-gradient(var(--sg-dot) .7px, transparent .7px);
  background-size: 26px 26px;
}
body[data-ui-theme="luminous"] :is(.studio-relation, .station-edges path) { stroke: #aaa9c4; }
body[data-ui-theme="luminous"] #studio-edges text { fill: var(--sg-muted); stroke: var(--sg-bg); font-size: var(--sg-font-small); }
body[data-ui-theme="luminous"] :is(.studio-hint, .semantic-reading-hint) { color: var(--sg-muted); font-size: var(--sg-font-small); }
body[data-ui-theme="luminous"] :is(.semantic-palette, .semantic-zoom) { background: var(--sg-surface); border: 1px solid var(--sg-line); border-radius: var(--sg-radius); box-shadow: var(--sg-shadow); }
body[data-ui-theme="luminous"] .semantic-palette-button { color: var(--sg-muted) !important; }
body[data-ui-theme="luminous"] .semantic-palette-button:hover { background: var(--sg-primary-soft) !important; color: var(--sg-primary-ink) !important; }
body[data-ui-theme="luminous"] :is(.semantic-zoom #board-fit, .semantic-zoom #board-zoom, .studio-toolbar #board-zoom) { color: var(--sg-muted); font-size: var(--sg-font-small) !important; }

/* Cards: neutral white paper; violet selection communicates focus, not validity. */
body[data-ui-theme="luminous"] .studio-card { background: var(--sg-surface); border: 1px solid var(--sg-line); border-radius: var(--sg-radius); box-shadow: var(--sg-shadow); }
body[data-ui-theme="luminous"] .studio-card.selected { outline: 2px solid var(--sg-primary); outline-offset: 4px; box-shadow: 0 8px 28px rgb(98 80 242 / 9%); }
body[data-ui-theme="luminous"] .studio-card-head { background: var(--sg-surface) !important; border-color: var(--sg-line); }
body[data-ui-theme="luminous"] .studio-card-title { font-size: var(--sg-font-body); font-weight: 600; letter-spacing: -.1px; color: var(--sg-ink); }
body[data-ui-theme="luminous"] .studio-card-head button { color: var(--sg-muted); font-size: var(--sg-font-small) !important; border-radius: 8px; }
body[data-ui-theme="luminous"] .studio-card-head [data-control="card-lock"][aria-pressed="true"] { color: var(--sg-primary-ink); background: var(--sg-primary-soft) !important; }
body[data-ui-theme="luminous"] .studio-card-body { background: var(--sg-surface); }
body[data-ui-theme="luminous"] .studio-card :is(button, input, select, textarea) { font-size: var(--sg-font-body); }
body[data-ui-theme="luminous"] .studio-card :is(.muted, summary, .studio-card-source) { color: var(--sg-muted); font-size: var(--sg-font-small); }
body[data-ui-theme="luminous"] .board-note { background: var(--sg-surface); color: var(--sg-ink) !important; font-size: var(--sg-font-body) !important; }
body[data-ui-theme="luminous"] :is(.studio-placeholder, .studio-image-empty, .studio-empty-desk) { color: var(--sg-muted); background: var(--sg-surface); border-color: var(--sg-line); border-radius: var(--sg-radius); }
body[data-ui-theme="luminous"] .studio-card :is(canvas, #model-canvas, .instance-model-canvas) { background: #f5f6fa; background-image: none; }
body[data-ui-theme="luminous"] :is(#sketch-canvas, .bubble-canvas, .ds-stage, .ds-canvas, .space-canvas, .bd-stage, #drawing-canvas) { background-color: #fcfcff; border-color: var(--sg-line); }
body[data-ui-theme="luminous"] #sketch-canvas { background-image: radial-gradient(var(--sg-dot) .7px, transparent .7px); }
body[data-ui-theme="luminous"] .studio-card #tool-dock { background: var(--sg-surface-subtle); }
body[data-ui-theme="luminous"] #tool-dock button[aria-pressed="true"] { background: var(--sg-primary); border-color: var(--sg-primary); color: white; }
body[data-ui-theme="luminous"] .studio-card-resize { background: var(--sg-surface-subtle); color: var(--sg-muted); }
body[data-ui-theme="luminous"] .studio-card-lock-message { color: var(--sg-ink); background: var(--sg-surface); border-color: var(--sg-line); box-shadow: var(--sg-shadow); }
body[data-ui-theme="luminous"] :is(.semantic-card-summary, .semantic-zoom-cover) { color: var(--sg-muted); background: var(--sg-surface); border-color: var(--sg-line); font-size: var(--sg-font-small); }
body[data-ui-theme="luminous"] .semantic-card-summary button { color: var(--sg-primary-ink) !important; font-size: var(--sg-font-small) !important; }
body[data-ui-theme="luminous"] :is(.semantic-overview-purpose, .semantic-overview-state) { color: var(--sg-muted); font-size: var(--sg-font-small); }
body[data-ui-theme="luminous"] .semantic-overview-actions button { font-size: var(--sg-font-small) !important; color: var(--sg-primary-ink) !important; background: var(--sg-primary-soft) !important; }

/* Sidebars and agent panels. Gradients are limited to existing identity orbs. */
body[data-ui-theme="luminous"] :is(.project-rail, aside, .team-conversation, .workspace, .model, .master-home-dock, .desk-master-panel, .semantic-inspector) { color: var(--sg-ink); background: var(--sg-surface); border-color: var(--sg-line); }
body[data-ui-theme="luminous"] .master-home-dock { border: 1px solid var(--sg-line); border-radius: var(--sg-radius-lg); box-shadow: var(--sg-shadow); }
body[data-ui-theme="luminous"] .master-home-dock > .desk-master-panel { background: var(--sg-surface); }
body[data-ui-theme="luminous"] :is(.semantic-assistant-tabs button, .semantic-assistant-tabs button[aria-pressed="true"]) { font-size: var(--sg-font-body); color: var(--sg-muted); background: transparent; border-radius: var(--sg-radius-sm); }
body[data-ui-theme="luminous"] .semantic-assistant-tabs button[aria-pressed="true"] { color: var(--sg-primary-ink); background: var(--sg-primary-soft); }
body[data-ui-theme="luminous"] :is(.master-dock > h2, .semantic-inspector h2) { color: var(--sg-ink); font-size: 20px; font-weight: 600; letter-spacing: -.5px; }
body[data-ui-theme="luminous"] :is(.semantic-inspector h3, .semantic-purpose, .semantic-master-facts small, .master-runtime, .master-advanced, .master-legacy-disclosure, .station-copy) { color: var(--sg-muted); font-size: var(--sg-font-small); }
body[data-ui-theme="luminous"] :is(.semantic-master-facts, .master-advanced, .master-legacy-disclosure, .runtime-controls) { border-color: var(--sg-line); }
body[data-ui-theme="luminous"] .semantic-fact-chips > span { color: var(--sg-primary-ink); background: var(--sg-primary-soft); border-radius: 8px; font-size: var(--sg-font-small); }
body[data-ui-theme="luminous"] .semantic-fact-section { font-size: var(--sg-font-body); }
body[data-ui-theme="luminous"] .semantic-fact-section p { color: var(--sg-ink); }
body[data-ui-theme="luminous"] :is(.semantic-fact-section small, .semantic-result-label > span, .semantic-result-label strong, .semantic-metrics dt, .semantic-metrics > small, .semantic-technical-details, .semantic-technical-details pre) { color: var(--sg-muted); font-size: var(--sg-font-small); }
body[data-ui-theme="luminous"] .semantic-metrics dd { color: var(--sg-ink); font-size: 18px; }
body[data-ui-theme="luminous"] :is(.semantic-technical-details pre, .station-node-evidence pre) { color: var(--sg-muted); background: var(--sg-surface-subtle); font-size: var(--sg-font-small); border-radius: var(--sg-radius-sm); }
body[data-ui-theme="luminous"] .semantic-fact-section .semantic-issue { color: var(--sg-review); background: var(--sg-review-soft); }
body[data-ui-theme="luminous"] .semantic-fact-section .semantic-local-notice { color: var(--sg-draft); background: var(--sg-draft-soft); font-size: var(--sg-font-small); }
body[data-ui-theme="luminous"] :is(.smart-card-bot, .smart-card-composer, .semantic-bot-composer, .semantic-bot-history, .master-workflow-proposal, .station-event-summary, .master-message) { color: var(--sg-ink); background: var(--sg-surface); border-color: var(--sg-line); border-radius: var(--sg-radius-sm); }
body[data-ui-theme="luminous"] .smart-card-bot { font-size: var(--sg-font-body); }
body[data-ui-theme="luminous"] :is(.smart-card-prompt, .master-dock > textarea, .semantic-bot-composer textarea) { color: var(--sg-ink); background: var(--sg-surface); border-color: var(--sg-line-strong); font-family: var(--sg-font); font-size: var(--sg-font-body); line-height: 1.6; }
body[data-ui-theme="luminous"] :is(.smart-card-hint, .smart-card-status, .smart-card-explanation, .smart-card-task-status, .semantic-bot-activity, .semantic-ai-note, .master-message small, .station-event-summary small, .master-workflow-proposal > small, .bot small) { color: var(--sg-muted); font-size: var(--sg-font-small); }
body[data-ui-theme="luminous"] :is(.avatar, .smart-card-avatar) { background: var(--sg-agent-glow); color: #3f3586; border: 1px solid #e8e2ff; }
body[data-ui-theme="luminous"] .bot.active { background: var(--sg-primary-soft); border-color: #bdb3ff; }
body[data-ui-theme="luminous"] .bot.active .avatar { background: var(--sg-agent-glow); color: var(--sg-primary-ink); }

/* Explicit primary actions; ordinary tools stay quiet and neutral. */
body[data-ui-theme="luminous"] :where(header #board-save, .smart-card-bot .smart-card-send, .master-dock [data-control="master-send"], .seed-primary, .seed-auth-card button[type="submit"], .seed-admin form button, .sg-button-primary) {
  background: var(--sg-primary) !important;
  color: #fff !important;
  border-color: var(--sg-primary) !important;
  border-radius: var(--sg-radius-sm);
  font-size: var(--sg-font-body);
}
body[data-ui-theme="luminous"] :where(header #board-save, .smart-card-bot .smart-card-send, .master-dock [data-control="master-send"], .seed-primary, .seed-auth-card button[type="submit"], .seed-admin form button, .sg-button-primary):hover:not(:disabled):not([aria-disabled="true"]) { background: var(--sg-primary-hover) !important; border-color: var(--sg-primary-hover) !important; }
body[data-ui-theme="luminous"] .semantic-fact-section button + button { color: var(--sg-primary-ink); background: var(--sg-primary-soft); font-size: var(--sg-font-body); }

/* Execution state uses text already supplied by the platform, not color alone. */
body[data-ui-theme="luminous"] :is(.station-pill, .studio-card) { --sg-state-ink: var(--sg-waiting); --sg-state-bg: var(--sg-waiting-soft); }
body[data-ui-theme="luminous"] :is(.station-pill[data-tone="running"], .studio-card[data-semantic-tone="running"]) { --sg-state-ink: var(--sg-running); --sg-state-bg: var(--sg-running-soft); }
body[data-ui-theme="luminous"] :is(.station-pill[data-tone="dirty"], .studio-card[data-semantic-tone="dirty"], .studio-card[data-semantic-tone="draft"]) { --sg-state-ink: var(--sg-draft); --sg-state-bg: var(--sg-draft-soft); }
body[data-ui-theme="luminous"] :is(.station-pill[data-tone="review"], .studio-card[data-semantic-tone="review"]) { --sg-state-ink: var(--sg-review); --sg-state-bg: var(--sg-review-soft); }
body[data-ui-theme="luminous"] :is(.station-pill[data-tone="stale"], .studio-card[data-semantic-tone="stale"]) { --sg-state-ink: var(--sg-stale); --sg-state-bg: var(--sg-stale-soft); }
body[data-ui-theme="luminous"] :is(.station-pill[data-tone="waiting"], .studio-card[data-semantic-tone="waiting"]) { --sg-state-ink: var(--sg-waiting); --sg-state-bg: var(--sg-waiting-soft); }
body[data-ui-theme="luminous"] :is(.station-pill[data-tone="error"], .studio-card[data-semantic-tone="error"]) { --sg-state-ink: var(--sg-error); --sg-state-bg: var(--sg-error-soft); }
body[data-ui-theme="luminous"] .station-pill { color: var(--sg-ink); background: var(--sg-state-bg) !important; border-color: var(--sg-line-strong) !important; border-radius: var(--sg-radius); box-shadow: var(--sg-shadow); }
body[data-ui-theme="luminous"] .station-pill[data-tone="saved"] { background: var(--sg-surface) !important; border-color: var(--sg-line) !important; }
body[data-ui-theme="luminous"] .station-pill[data-selected="true"] { outline-color: var(--sg-primary); }
body[data-ui-theme="luminous"] .station-pill :is(small, .station-pill-badges > small) { color: var(--sg-state-ink); background: var(--sg-state-bg); font-size: var(--sg-font-small); border-color: transparent; }
body[data-ui-theme="luminous"] .studio-card[data-semantic-tone] .semantic-card-result { color: var(--sg-state-ink); font-size: var(--sg-font-small); }
body[data-ui-theme="luminous"] :is(.station-node-actions > button, .station-legend, .station-node-evidence, .station-budget, .station-stats, .station-copy, .station-plan-issue, .station-review-package, .station-round-step) { font-size: var(--sg-font-small); }
body[data-ui-theme="luminous"] :is(.station-dialog, .station-head, .station-body, .station-plan, .station-plan-node, .station-review-package, .station-round, .station-legend, .station-scope-box) { color: var(--sg-ink); background-color: var(--sg-surface); border-color: var(--sg-line); }
body[data-ui-theme="luminous"] :is(.station-notice, .station-plan-notice, .semantic-preview-copy) { color: var(--sg-review); background-color: var(--sg-review-soft); border-color: #f1dca6; font-size: var(--sg-font-small); }
body[data-ui-theme="luminous"] :is(.station-error, .smart-card-error, #error, .seed-auth-card [data-error="true"]) { color: var(--sg-error) !important; background-color: var(--sg-error-soft) !important; border-color: #f0c6cf; }

/* Modal and focus surfaces preserve all existing visibility and interaction rules. */
body[data-ui-theme="luminous"] :is(dialog, .semantic-menu-content, #login) { color: var(--sg-ink); background: var(--sg-surface); border-color: var(--sg-line); border-radius: var(--sg-radius-lg); box-shadow: var(--sg-shadow-overlay); }
body[data-ui-theme="luminous"] dialog::backdrop { background: rgb(26 23 51 / 24%); backdrop-filter: blur(4px); }
body[data-ui-theme="luminous"] .semantic-menu-content > button { color: var(--sg-ink); background: var(--sg-surface-subtle) !important; font-size: var(--sg-font-small) !important; }
body[data-ui-theme="luminous"] .studio-card.card-maximized,
body[data-ui-theme="luminous"] .card-maximized.focus-layout-active {
  border-color: var(--sg-line);
  box-shadow: 0 0 0 100vmax rgb(34 34 54 / 8%), 0 18px 56px rgb(31 30 64 / 10%);
}
body[data-ui-theme="luminous"] :is(.focus-layout-active > .smart-card-bot, .focus-layout-active .focus-tools, .focus-tools[open] > summary, .focus-assistant-toggle) { color: var(--sg-ink); background: var(--sg-surface); border-color: var(--sg-line); }
body[data-ui-theme="luminous"] .focus-layout-active .focus-tools { box-shadow: var(--sg-shadow); }
body[data-ui-theme="luminous"] #ib-public-preview {
  background: var(--sg-ink);
  color: #fff;
  border: 1px solid #343440;
  box-shadow: 0 6px 24px rgb(31 30 64 / 12%);
}

/* Entry/auth: restrained ambient color, with plain white input and reading surfaces. */
body[data-ui-theme="luminous"][data-seed-auth] { background-color: #fbfbff; background-image: var(--sg-entry-glow); background-size: cover; }
body[data-ui-theme="luminous"] #project-entry { background-color: var(--sg-bg); background-image: var(--sg-entry-glow); }
body[data-ui-theme="luminous"] #project-entry :is(h1, h2, h3) { color: var(--sg-ink); }
body[data-ui-theme="luminous"] #project-entry article { background: var(--sg-surface); border-color: var(--sg-line); border-radius: var(--sg-radius); box-shadow: var(--sg-shadow); }
body[data-ui-theme="luminous"] .seed-auth-card { color: var(--sg-ink); background: var(--sg-surface); border-color: var(--sg-line); border-radius: 28px; box-shadow: var(--sg-shadow-raised); }
body[data-ui-theme="luminous"] .seed-brand { color: var(--sg-ink); letter-spacing: .05em; }
body[data-ui-theme="luminous"] .seed-eyebrow { color: var(--sg-primary-ink); font-size: var(--sg-font-small); letter-spacing: .08em; }
body[data-ui-theme="luminous"] .seed-auth-card h1 { color: var(--sg-ink); font-size: 32px; font-weight: 600; }
body[data-ui-theme="luminous"] :is(.seed-auth-card p, .seed-auth-card label, .seed-account-hint, .seed-studio-notice, .seed-help, .seed-quota, .seed-admin article p, .seed-admin [role="status"]) { color: var(--sg-muted); font-size: var(--sg-font-small); }
body[data-ui-theme="luminous"] .seed-auth-card > p { font-size: var(--sg-font-body); }
body[data-ui-theme="luminous"] :is(.seed-auth-card input, .seed-admin input, .seed-admin select, .seed-admin textarea) { background: var(--sg-surface); border-color: var(--sg-line-strong); color: var(--sg-ink); font-size: var(--sg-font-body); }
body[data-ui-theme="luminous"] .seed-quota { background: var(--sg-surface); border-color: var(--sg-line); }
body[data-ui-theme="luminous"] .seed-admin .seed-share-once { background: var(--sg-primary-soft); color: var(--sg-primary-ink); }

/* Disabled means unavailable, including a closed AI permission gate. Never recolor
   disabled controls as an available primary action, and do not hide their labels. */
body[data-ui-theme="luminous"] :is(#board-save:disabled, button:disabled, input:disabled, select:disabled, textarea:disabled, button[aria-disabled="true"], [data-semantic-ai-closed="true"]) {
  color: var(--sg-disabled-ink) !important;
  background: var(--sg-disabled-bg) !important;
  border-color: var(--sg-disabled-line) !important;
  opacity: 1 !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
}

/* The server-rendered anonymous auth shell intentionally needs no initialization
   script. Its explicit seed-auth attribute is the only additional theme scope. */
body[data-seed-auth] {
  --seed-ink: var(--sg-ink);
  --seed-muted: var(--sg-muted);
  --seed-line: var(--sg-line);
  --seed-accent: var(--sg-action-neutral);
  --seed-paper: var(--sg-surface);
  color-scheme: light;
  color: var(--sg-ink);
  background-color: #fbfbff;
  background-image: var(--sg-entry-glow);
  background-size: cover;
  font-family: var(--sg-font);
  font-size: var(--sg-font-body);
  line-height: var(--sg-leading);
  -webkit-font-smoothing: antialiased;
}
body[data-seed-auth] .seed-auth-card {
  color: var(--sg-ink);
  background: var(--sg-surface);
  border: 1px solid var(--sg-line);
  border-radius: 28px;
  box-shadow: var(--sg-shadow-raised);
}
body[data-seed-auth] .seed-brand { color: var(--sg-ink); letter-spacing: .05em; }
body[data-seed-auth] .seed-auth-card h1 { color: var(--sg-ink); font-size: 32px; font-weight: 600; }
body[data-seed-auth] :is(.seed-auth-card p, .seed-auth-card label, .seed-auth-card [role="status"], .seed-account-hint, .seed-help) {
  color: var(--sg-muted);
  font-size: var(--sg-font-small);
}
body[data-seed-auth] .seed-auth-card > p { font-size: var(--sg-font-body); }
body[data-seed-auth] .seed-auth-card .seed-eyebrow { color: var(--sg-primary-ink); font-size: var(--sg-font-small); letter-spacing: .08em; }
body[data-seed-auth] .seed-auth-card :is(input, select, textarea) {
  font: inherit;
  font-size: var(--sg-font-body);
  color: var(--sg-ink);
  background: var(--sg-surface);
  border: 1px solid var(--sg-line-strong);
  border-radius: var(--sg-radius-sm);
  accent-color: var(--sg-primary);
}
body[data-seed-auth] :is(.seed-primary, .seed-auth-card button[type="submit"]) {
  background: var(--sg-action-neutral) !important;
  border-color: var(--sg-action-neutral) !important;
  color: var(--sg-action-neutral-text) !important;
  border-radius: var(--sg-radius-sm);
  font-family: var(--sg-font);
  font-size: var(--sg-font-body);
}
body[data-seed-auth] :is(.seed-primary, .seed-auth-card button[type="submit"]):hover:not(:disabled):not([aria-disabled="true"]) {
  background: var(--sg-action-neutral-hover) !important;
  border-color: var(--sg-action-neutral-hover) !important;
}
body[data-seed-auth] .seed-auth-card :is(button, input, select, textarea, a, summary):focus-visible {
  outline: 3px solid var(--sg-focus);
  outline-offset: 3px;
}
body[data-seed-auth] .seed-auth-card [data-error="true"] { color: var(--sg-error) !important; }
body[data-seed-auth] .seed-auth-card :is(button:disabled, input:disabled, select:disabled, textarea:disabled, button[aria-disabled="true"]) {
  color: var(--sg-disabled-ink) !important;
  background: var(--sg-disabled-bg) !important;
  border-color: var(--sg-disabled-line) !important;
  opacity: 1 !important;
  cursor: not-allowed !important;
}
@media (prefers-reduced-motion: reduce) {
  body[data-ui-theme="luminous"] :is(button, .upload) { transition: none; }
}

/* Preserve the existing inverse-scale reading aid at overview zoom. */
body[data-ui-theme="luminous"].semantic-low-zoom .studio-card:not(.card-maximized) .studio-card-head button { font-size: calc(var(--sg-font-small) * var(--semantic-zoom-inverse, 1)) !important; }
body[data-ui-theme="luminous"].semantic-low-zoom .studio-card:not(.card-maximized) :is(.semantic-overview-purpose, .semantic-overview-state, .semantic-overview-actions button) { font-size: calc(var(--sg-font-small) * var(--semantic-zoom-inverse, 1)) !important; }
body[data-ui-theme="luminous"] .semantic-overview-preview { background: #f5f6fa; }
body[data-ui-theme="luminous"] :is(.semantic-update-plan, .semantic-bot-facts, .station-change, .rationalization) { color: var(--sg-ink); background: var(--sg-surface-subtle); border-color: var(--sg-line); }
body[data-ui-theme="luminous"] :is(.semantic-action-guard, .semantic-action-gap) { color: var(--sg-review); }
body[data-ui-theme="luminous"] .semantic-action-message { border-color: var(--sg-primary); }
body[data-ui-theme="luminous"] .smart-card-composer:focus-within { border-color: var(--sg-primary); box-shadow: 0 0 0 3px var(--sg-focus-soft); }
body[data-ui-theme="luminous"] .smart-card-bot .smart-card-modes button { color: var(--sg-muted); font-size: var(--sg-font-small); }
body[data-ui-theme="luminous"] .smart-card-bot .smart-card-modes button[aria-pressed="true"] { color: var(--sg-primary-ink); background: var(--sg-primary-soft); }
body[data-ui-theme="luminous"] :is(.master-dock > [data-control="master-recover"], .station-master-panel > button[data-control="station-authorize"]) { color: var(--sg-primary-ink); background: var(--sg-primary-soft); border-color: #d5ceff; font-size: var(--sg-font-body); }
body[data-ui-theme="luminous"] :is(.station-change small, .station-plan-node > small, .station-plan-node details summary, .station-plan-node pre, .station-round-step > small, .station-event-summary p, .station-event-summary small, .station-head .station-stats, .station-nav button) { font-size: var(--sg-font-small); color: var(--sg-muted); }

/* Ordinary first actions and agent execution deliberately use different tones.
   The brand --sg-primary API stays violet for existing plugin consumers. */
body[data-ui-theme="luminous"] :is(#create-project, header #board-save, .seed-primary, .seed-auth-card button[type="submit"], .seed-admin form button, .sg-button-neutral) {
  background: var(--sg-action-neutral) !important;
  border-color: var(--sg-action-neutral) !important;
  color: var(--sg-action-neutral-text) !important;
}
body[data-ui-theme="luminous"] :is(#create-project, header #board-save, .seed-primary, .seed-auth-card button[type="submit"], .seed-admin form button, .sg-button-neutral):hover:not(:disabled):not([aria-disabled="true"]) {
  background: var(--sg-action-neutral-hover) !important;
  border-color: var(--sg-action-neutral-hover) !important;
}
body[data-ui-theme="luminous"] :is(.sg-button-agent, .master-dock [data-control="master-send"], .smart-card-bot .smart-card-send, .station-master-panel > button[data-control="station-authorize"], .semantic-fact-section button[data-design-action="prepare"], .semantic-fact-section button[data-design-action="confirm"]) {
  background: var(--sg-agent-primary) !important;
  border-color: var(--sg-agent-primary) !important;
  color: #fff !important;
}
body[data-ui-theme="luminous"] :is(.sg-button-agent, .master-dock [data-control="master-send"], .smart-card-bot .smart-card-send, .station-master-panel > button[data-control="station-authorize"], .semantic-fact-section button[data-design-action="prepare"], .semantic-fact-section button[data-design-action="confirm"]):hover:not(:disabled):not([aria-disabled="true"]) {
  background: var(--sg-agent-primary-hover) !important;
  border-color: var(--sg-agent-primary-hover) !important;
}

/* Real plugin library, methods and development workshop shells. Iframe and
   embedded-editor documents keep their own styles and interaction boundaries. */
body[data-ui-theme="luminous"] :is(.plugin-library, .recipe-dialog, .ai-method-workshop, .ai-workshop-trial, .code-workshop, .code-card-trial, .supplier-catalog, .workflow-dialog) {
  color: var(--sg-ink);
  background: var(--sg-surface);
  border-color: var(--sg-line);
  border-radius: var(--sg-radius-lg);
  font-family: var(--sg-font);
  font-size: var(--sg-font-body);
}
body[data-ui-theme="luminous"] :is(.plugin-library, .recipe-dialog, .ai-method-workshop, .ai-workshop-trial, .code-workshop, .code-card-trial, .supplier-catalog, .workflow-dialog)::backdrop {
  background: rgb(26 23 51 / 24%);
}
body[data-ui-theme="luminous"] :is(.plugin-library article, .supplier-catalog article, .project-code-library, .workflow-node-list article) {
  background: var(--sg-surface);
  border-color: var(--sg-line);
  color: var(--sg-ink);
}
body[data-ui-theme="luminous"] :is(.architecture-panel, .recipe-advanced, .recipe-preview-summary, .ai-method-workshop details, .code-workshop details, .ai-workshop-disclosure, .code-workshop-disclosure, .freecad-source-panel, .project-code-io, .space-program-tools, .bubble-inspector, .bim-selection, .authoring-component-sources, .authoring-card > details, .ds-candidate-summary, .bd-inspector) {
  background: var(--sg-surface-subtle);
  border-color: var(--sg-line);
  color: var(--sg-ink);
  border-radius: var(--sg-radius-sm);
}
body[data-ui-theme="luminous"] :is(.recipe-dialog pre, .supplier-catalog pre, .user-imports pre) {
  background: var(--sg-surface-subtle);
  color: var(--sg-muted);
  font-size: var(--sg-font-small);
}
body[data-ui-theme="luminous"] :is(.plugin-identity, .plugin-scope, .plugin-library article small, .architecture-panel p, .supplier-catalog small, .project-code-source, .project-code-scope, .project-code-empty, .project-code-io-row small, .project-code-io-values, .project-code-status, .equipment-panel [data-control="equipment-report"]) {
  color: var(--sg-muted);
  font-size: var(--sg-font-small);
}
body[data-ui-theme="luminous"] :is(.plugin-status, .equipment-panel, .freecad-elevator-card, .floor-card, .space-card, .access-card, .bim-card, .authoring-card, .bd-card, .design-study-card) {
  color: var(--sg-ink);
  font-family: var(--sg-font);
  font-size: var(--sg-font-body);
}
body[data-ui-theme="luminous"] :is(.design-study-card, .ds-option, .ds-bot, .design-study-card > textarea, .bim-sidebar, .bim-tree, .authoring-sidebar, .authoring-tree, .project-code-viewport) {
  color: var(--sg-ink);
  background: var(--sg-surface);
  border-color: var(--sg-line);
}
body[data-ui-theme="luminous"] :is(.ds-option[aria-pressed="true"], .space-placement-table tr[data-selected="true"], .access-connection[data-selected="true"], .bim-component[data-selected="true"], .authoring-tree button[data-selected="true"], .authoring-map-row[data-selected="true"]) {
  background: var(--sg-primary-soft);
  border-color: #bdb3ff;
  color: var(--sg-primary-ink);
}
body[data-ui-theme="luminous"] :is(.bubble-toolbar button[aria-pressed="true"], .bubble-toolbar [data-control="bubble-save"]) {
  background: var(--sg-primary);
  color: #fff;
  border-color: var(--sg-primary);
}
body[data-ui-theme="luminous"] :is(.floor-source, .floor-basis, .floor-caption, .floor-building-list label, .floor-section-controls label, .floor-area-table, .space-sources, .space-caption, .space-editor label, .space-editor small, .space-report, .space-card th, .access-sources, .access-caption, .access-editor label, .access-connection legend, .access-report, .access-card small, .bubble-hint, .bubble-inspector label, .bubble-inspector small, .bubble-selection-hint) {
  color: var(--sg-muted);
  font-size: var(--sg-font-small);
}
body[data-ui-theme="luminous"] :is(.bim-trust, .bim-source, .bim-inspector, .bim-empty, .bim-tree, .bim-editor label, .bim-door legend, .bim-editor small, .bim-progress, .bim-selection code, .bim-selection small, .bim-selection p, .bim-hidden-list, .bim-section-status, .bim-section-value, .bim-view-aux, .authoring-source, .authoring-caption, .authoring-downloads a, .authoring-inspector, .authoring-inspector code, .authoring-inspector pre, .authoring-empty, .authoring-source-map, .authoring-map-ref, .authoring-map-note, .authoring-map-technical, .bd-source, .bd-progress, .bd-basis, .bd-downloads small, .bd-inspector code, .bd-inspector small, .bd-note, .bd-config label, .bd-view-editor legend, .bd-door-table table) {
  color: var(--sg-muted);
  font-size: var(--sg-font-small);
}
body[data-ui-theme="luminous"] :is(.bim-checks pre, .bd-checks pre, .authoring-map-row pre, .authoring-mapping-list pre, .authoring-map-technical pre, .authoring-map-technical > summary) {
  font-size: var(--sg-font-small);
}
body[data-ui-theme="luminous"] :is(.authoring-update-flow, .design-current-review, .design-saved-output, .space-bot-sources) {
  background: var(--sg-surface-subtle);
  color: var(--sg-ink);
  border-color: var(--sg-line);
}
body[data-ui-theme="luminous"] :is(.authoring-mapping-banner, .authoring-map-gap, .authoring-map-object-note, .space-issue, .access-issue, .bim-issue, .bd-issue, .bubble-warning, .workflow-plan-notice, .supplier-catalog-status) {
  color: var(--sg-review);
  background-color: var(--sg-review-soft);
  border-color: #ecd9ab;
  font-size: var(--sg-font-small);
}
body[data-ui-theme="luminous"] :is(.floor-notice, .space-notice, .access-notice, .bim-status, .authoring-status, .bd-status, .workflow-planning-feedback, .workflow-progress li) {
  color: var(--sg-muted);
  background: var(--sg-surface-subtle);
  border-color: var(--sg-line);
  font-size: var(--sg-font-small);
}
body[data-ui-theme="luminous"] :is(.space-notice[data-state="draft"], .access-notice[data-state="draft"], .workflow-progress li[data-state="draft"]) { color: var(--sg-draft); background: var(--sg-draft-soft); }
body[data-ui-theme="luminous"] :is(.floor-notice[data-state="stale"], .space-notice[data-state="stale"], .access-notice[data-state="stale"], .bim-source[data-stale="true"], .bd-source[data-stale="true"], .workflow-progress li[data-state="stale"]) { color: var(--sg-stale); background: var(--sg-stale-soft); }
body[data-ui-theme="luminous"] :is(.bim-status[data-state="candidate"], .bim-status[data-state="unverified"], .bd-status[data-state="candidate"], .workflow-progress li[data-state="review"]) { color: var(--sg-review); background: var(--sg-review-soft); }
body[data-ui-theme="luminous"] .workflow-progress li[data-state="running"] { color: var(--sg-running); background: var(--sg-running-soft); }
body[data-ui-theme="luminous"] :is(.floor-notice[data-state="missing"], .workflow-progress li[data-state="missing"]) { color: var(--sg-waiting); background: var(--sg-waiting-soft); }
body[data-ui-theme="luminous"] :is(.plugin-status.conflict, .project-code-status.conflict, .space-notice[data-state="conflict"], .access-notice[data-state="conflict"], .bim-status[data-state="conflict"], .bim-status[data-state="failed"], .bd-status[data-state="conflict"], .workflow-planning-feedback[data-state="failed"], .workflow-planning-feedback[data-state="blocked"], .workflow-planning-feedback[data-state="interrupted"]) { color: var(--sg-error); background: var(--sg-error-soft); }
body[data-ui-theme="luminous"] :is(.floor-area-table tr:has(td):hover, .bd-door-table tbody tr:hover, .bd-door-table th) { background: var(--sg-surface-subtle); }

/* Keep every server-/host-owned visibility and disabled gate authoritative.
   This final rule also wins over primary-action !important declarations above. */
body[data-ui-theme="luminous"] :is(#board-save:disabled, button:disabled, input:disabled, select:disabled, textarea:disabled, button[aria-disabled="true"], [data-semantic-ai-closed="true"]) {
  color: var(--sg-disabled-ink) !important;
  background: var(--sg-disabled-bg) !important;
  border-color: var(--sg-disabled-line) !important;
  opacity: 1 !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
}

body[data-ui-theme="luminous"] .semantic-fact-section button[data-design-action] { color: var(--sg-ink); background: var(--sg-surface); border: 1px solid var(--sg-line); font-size: var(--sg-font-body); }
body[data-ui-theme="luminous"] .station-pill span::before { background: var(--sg-state-ink); }

