/* 91COST Keynote UI
   自研视觉覆盖层：以产品发布式层级、留白和玻璃浮层重组现有工作台。 */

:root {
  --keynote-blue: #0071e3;
  --keynote-blue-hover: #0077ed;
  --keynote-ink: #1d1d1f;
  --keynote-muted: #6e6e73;
  --keynote-bg: #f5f5f7;
  --keynote-surface: rgba(255, 255, 255, .86);
  --keynote-line: rgba(29, 29, 31, .1);
  --keynote-shadow: 0 18px 60px rgba(0, 0, 0, .1);
  color-scheme: light;
}

body {
  color: var(--keynote-ink);
  background: var(--keynote-bg);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select { font: inherit; }

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(0, 113, 227, .28);
  outline-offset: 2px;
}

/* 首页：发布会式单一主叙事。 */
#project-home.project-home,
.design-entry {
  --start-bg: #f5f5f7;
  --start-surface: rgba(255, 255, 255, .9);
  --start-ink: #1d1d1f;
  --start-muted: #6e6e73;
  --start-line: rgba(29, 29, 31, .1);
  --start-accent: #0071e3;
  background:
    radial-gradient(circle at 50% 34%, rgba(142, 208, 255, .23), transparent 30%),
    radial-gradient(circle at 17% 84%, rgba(202, 181, 255, .16), transparent 27%),
    #f5f5f7;
}

.minimal-home,
.minimal-entry { background: transparent; }

.minimal-home-header {
  height: 76px;
  padding: 0 clamp(24px, 5vw, 76px);
}

.minimal-home-header > a img,
.minimal-entry > header img {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  filter: drop-shadow(0 5px 10px rgba(0, 113, 227, .16));
}

.minimal-home-header strong,
.minimal-entry > header strong {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.025em;
}

.minimal-home-header > div > span {
  padding: 7px 11px;
  border: 1px solid var(--start-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .54);
  backdrop-filter: blur(18px) saturate(160%);
}

.minimal-home-header [data-theme-toggle],
.minimal-entry > header > button {
  border: 0;
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset, 0 8px 24px rgba(0, 0, 0, .06);
}

.minimal-home-main {
  position: relative;
  z-index: 1;
  max-width: 980px;
  padding-bottom: 92px;
}

.minimal-home-main::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 50%;
  width: min(820px, 90vw);
  height: min(460px, 54vh);
  border: 1px solid rgba(255, 255, 255, .82);
  border-radius: 48%;
  background: radial-gradient(circle at 50% 48%, rgba(255, 255, 255, .86), rgba(255, 255, 255, 0) 67%);
  filter: blur(.2px);
  transform: translate(-50%, -48%);
}

.minimal-home-main > span {
  color: #0071e3;
  font-size: 11px;
  font-weight: 720;
  letter-spacing: .22em;
}

.minimal-home-main h1 {
  margin: 22px 0 18px;
  font-size: clamp(66px, 9vw, 126px);
  font-weight: 720;
  line-height: .9;
  letter-spacing: -.082em;
  background: linear-gradient(138deg, #111 18%, #53535a 62%, #111 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.minimal-home-main p {
  max-width: 600px;
  font-size: clamp(18px, 2.2vw, 28px);
  font-weight: 480;
  line-height: 1.32;
  letter-spacing: -.035em;
}

.minimal-home-main button {
  min-width: 186px;
  min-height: 54px;
  margin-top: 38px;
  border: 0;
  color: #fff;
  background: var(--keynote-blue);
  box-shadow: 0 12px 30px rgba(0, 113, 227, .24);
  font-size: 15px;
  font-weight: 650;
}

.minimal-home-main button:hover {
  opacity: 1;
  background: var(--keynote-blue-hover);
  box-shadow: 0 16px 36px rgba(0, 113, 227, .3);
  transform: translateY(-2px);
}

.minimal-home > footer,
.minimal-entry > footer { font-size: 11px; }

.minimal-entry > header { height: 76px; padding: 0 clamp(24px, 5vw, 76px); }
.minimal-entry > main { width: min(720px, calc(100% - 40px)); }
.minimal-entry h2 {
  margin-bottom: 34px;
  font-size: clamp(46px, 6vw, 72px);
  font-weight: 710;
  letter-spacing: -.065em;
  text-align: center;
}
.minimal-entry > main > span { display: block; color: #0071e3; text-align: center; }
.minimal-entry-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  overflow: visible;
  border: 0;
  background: transparent;
}
.minimal-entry-actions > button {
  min-height: 174px;
  align-content: end;
  border: 1px solid rgba(255, 255, 255, .85);
  border-radius: 26px;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .07), inset 0 1px 0 #fff;
  text-align: left;
  backdrop-filter: blur(22px) saturate(170%);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}
.minimal-entry-actions > button:last-child { border-bottom: 1px solid rgba(255, 255, 255, .85); }
.minimal-entry-actions > button:hover {
  background: #fff;
  box-shadow: 0 24px 54px rgba(0, 0, 0, .12);
  transform: translateY(-5px);
}
.minimal-entry-actions > button span { align-self: end; }
.minimal-entry-actions > button strong { font-size: 18px; }
.minimal-entry-actions > button small { margin-top: 6px; font-size: 11px; line-height: 1.45; }
.minimal-entry-actions > button > i { align-self: end; color: #0071e3; font-size: 26px; }
.minimal-sample-link { color: #0071e3; font-size: 13px; }

/* 直接双击 HTML 时，不再显示一个看似能用的假首页。 */
.file-launch-guard {
  position: fixed;
  z-index: 10000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #1d1d1f;
  background: rgba(245, 245, 247, .88);
  backdrop-filter: blur(30px) saturate(150%);
}
.file-launch-guard[hidden] { display: none !important; }
.file-launch-guard > div {
  width: min(540px, 100%);
  display: grid;
  justify-items: center;
  padding: 46px;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 32px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 32px 100px rgba(0, 0, 0, .16);
  text-align: center;
}
.file-launch-guard span {
  color: #0071e3;
  font: 700 10px/1.2 "SFMono-Regular", Consolas, monospace;
  letter-spacing: .18em;
}
.file-launch-guard strong { margin-top: 18px; font-size: 38px; letter-spacing: -.055em; }
.file-launch-guard p { margin: 14px 0 0; color: #6e6e73; font-size: 15px; line-height: 1.55; }
.file-launch-guard code { padding: 2px 5px; border-radius: 5px; background: #f0f0f2; font-size: .9em; }
.file-launch-guard a {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 26px;
  padding: 0 22px;
  border-radius: 999px;
  color: #fff;
  background: #0071e3;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(0, 113, 227, .24);
}
.file-launch-guard a i { font-style: normal; font-size: 18px; }
.file-launch-guard small { max-width: 390px; margin-top: 18px; color: #86868b; font-size: 11px; line-height: 1.55; }

/* 主工作台：浮动产品界面，而不是传统后台表格。 */
.fresh-air-workbench {
  --design-top: 78px;
  --design-rail: 82px;
  --design-library: 350px;
  --design-side: 286px;
  --design-line: rgba(29, 29, 31, .1);
  --design-line-strong: rgba(29, 29, 31, .18);
  --design-surface: rgba(255, 255, 255, .92);
  --design-subtle: #f5f5f7;
  --design-canvas: #ececee;
  --design-ink: #1d1d1f;
  --design-muted: #6e6e73;
  --design-accent: #0071e3;
  --design-accent-soft: rgba(0, 113, 227, .09);
  background:
    radial-gradient(circle at 48% 18%, rgba(255, 255, 255, .8), transparent 35%),
    #e9e9ec;
}

.fresh-air-workbench .fa-commandbar {
  top: 10px;
  right: 14px;
  left: 14px;
  height: 56px;
  grid-template-columns: 228px minmax(560px, 1fr) auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .86);
  border-radius: 18px;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 13px 36px rgba(0, 0, 0, .09), inset 0 1px 0 #fff;
  backdrop-filter: blur(26px) saturate(180%);
}
.fresh-air-workbench .fa-brand-block {
  padding: 4px 17px;
  border-right: 1px solid rgba(29, 29, 31, .08);
  background: transparent;
}
.fresh-air-workbench .fa-brand-block img { width: 30px; height: 30px; border-radius: 8px; }
.fresh-air-workbench .fa-brand-block strong { color: #1d1d1f; font-size: 13px; }
.fresh-air-workbench .fa-brand-block small { color: #86868b; font-size: 10px; font-weight: 520; }
.fresh-air-workbench .fa-command-scroll { padding: 5px 8px; }
.fresh-air-workbench .fa-command-group {
  height: 46px;
  gap: 2px;
  padding: 0 6px;
  border-right-color: rgba(29, 29, 31, .08);
}
.fresh-air-workbench .fa-command-group button,
.fresh-air-workbench .fa-command-actions button {
  min-width: 46px;
  height: 46px;
  padding: 4px 7px;
  border-radius: 11px;
}
.fresh-air-workbench .fa-command-group button i,
.fresh-air-workbench .fa-command-actions button i {
  height: 24px;
  color: #515154;
  font-size: 17px;
}
.fresh-air-workbench .fa-command-group button span,
.fresh-air-workbench .fa-command-actions button span { font-size: 9px; }
.fresh-air-workbench .fa-command-group button:hover,
.fresh-air-workbench .fa-command-group button.is-active,
.fresh-air-workbench .fa-command-actions button:hover {
  color: #0071e3;
  background: rgba(0, 113, 227, .08);
}
.fresh-air-workbench .fa-command-actions {
  height: 56px;
  padding-right: 6px;
  border-left-color: rgba(29, 29, 31, .08);
  background: transparent;
}
.fresh-air-workbench .fa-local-badge {
  border: 0;
  color: #6e6e73;
  background: rgba(29, 29, 31, .05);
}

/* P0 的两个工程模块必须始终可见；新风仍按项目约束隐藏。 */
.fresh-air-workbench .engineering-module-switcher {
  position: absolute;
  z-index: 72;
  top: 90px;
  left: 456px;
  width: 304px;
  min-width: 0;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  transform: none;
  border: 1px solid rgba(255, 255, 255, .88);
  border-radius: 16px;
  background: rgba(255, 255, 255, .8);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .1), inset 0 1px 0 #fff;
  backdrop-filter: blur(22px) saturate(180%);
  pointer-events: auto;
}
.fresh-air-workbench .engineering-module-switcher:has(button[data-engineering-module="freshAir"][hidden]) {
  width: 304px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.fresh-air-workbench .engineering-module-switcher button {
  min-width: 0;
  height: 42px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  padding: 0 9px;
  border: 0;
  border-radius: 12px;
  color: #6e6e73;
  background: transparent;
  cursor: pointer;
}
.fresh-air-workbench .engineering-module-switcher button > i {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: currentColor;
  background: rgba(118, 118, 128, .1);
  font-size: 9px;
  font-style: normal;
  font-weight: 750;
}
.fresh-air-workbench .engineering-module-switcher button > span { min-width: 0; display: grid; gap: 1px; text-align: left; }
.fresh-air-workbench .engineering-module-switcher strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.fresh-air-workbench .engineering-module-switcher small { color: #86868b; font-size: 8px; }
.fresh-air-workbench .engineering-module-switcher button.is-active {
  color: #0071e3;
  background: #fff;
  box-shadow: 0 3px 11px rgba(0, 0, 0, .08);
}

/* 一级资源轨道 */
.fresh-air-workbench .fa-resource-rail {
  top: 78px;
  bottom: 18px;
  left: 14px;
  width: 68px;
  gap: 4px;
  padding: 10px 6px;
  border: 1px solid rgba(255, 255, 255, .86);
  border-radius: 22px;
  background: rgba(255, 255, 255, .8);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .09), inset 0 1px 0 #fff;
  backdrop-filter: blur(24px) saturate(180%);
}
.fresh-air-workbench .fa-resource-rail button {
  min-height: 58px;
  padding: 6px 2px;
  border-radius: 15px;
  color: #86868b;
}
.fresh-air-workbench .fa-resource-rail button i { width: 30px; height: 28px; font-size: 17px; }
.fresh-air-workbench .fa-resource-rail button span { font-size: 9px; font-weight: 580; }
.fresh-air-workbench .fa-resource-rail button:hover,
.fresh-air-workbench .fa-resource-rail button.is-active {
  color: #0071e3;
  background: rgba(0, 113, 227, .09);
}

/* 结构库浮层 */
.fa-design-library {
  top: 78px;
  bottom: 18px;
  left: 92px;
  width: 340px;
  grid-template-rows: 52px 54px minmax(0, 1fr) 38px;
  overflow: visible;
  border: 1px solid rgba(255, 255, 255, .88);
  border-radius: 24px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 22px 60px rgba(0, 0, 0, .1), inset 0 1px 0 #fff;
  backdrop-filter: blur(28px) saturate(180%);
}
.fa-library-tabs {
  gap: 6px;
  margin: 7px;
  padding: 4px;
  border: 0;
  border-radius: 14px;
  background: rgba(118, 118, 128, .1);
}
.fa-library-tabs button { border-radius: 10px; color: #6e6e73; font-size: 12px; font-weight: 620; }
.fa-library-tabs button::after { display: none; }
.fa-library-tabs button:hover { color: #1d1d1f; }
.fa-library-tabs button.is-active {
  color: #1d1d1f;
  background: #fff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .08), inset 0 0 0 1px rgba(0, 0, 0, .035);
}
.fa-library-search {
  margin: 7px 12px;
  padding: 0 12px;
  border: 0;
  border-radius: 13px;
  background: rgba(118, 118, 128, .09);
}
.fa-library-search input { height: 38px; font-size: 12px; }
.fa-library-scroll { padding: 3px 14px 26px; }
.fa-library-overview { padding: 13px 2px 15px; border-bottom: 0; }
.fa-library-overview strong { font-size: 19px; font-weight: 700; letter-spacing: -.035em; }
.fa-library-overview small { margin-top: 2px; color: #86868b; font-size: 10px; }
.fa-library-overview > b {
  padding: 5px 9px;
  color: #0071e3;
  background: rgba(0, 113, 227, .09);
  font-size: 9px;
}
.fa-design-library > footer { border-top-color: rgba(29, 29, 31, .07); font-size: 9px; }
.fa-library-collapse {
  top: 50%;
  right: -14px;
  width: 28px;
  height: 48px;
  border-color: rgba(29, 29, 31, .08);
  border-radius: 0 14px 14px 0;
  background: rgba(255, 255, 255, .9);
  box-shadow: 7px 0 15px rgba(0, 0, 0, .07);
}

.fa-structure-tools,
.fa-layout-templates { margin-top: 7px; }
.fa-structure-tools > header,
.fa-layout-templates > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 2px 9px;
}
.fa-structure-tools > header strong,
.fa-layout-templates > header strong { font-size: 12px; font-weight: 680; }
.fa-structure-tools > header small,
.fa-layout-templates > header small { color: #86868b; font-size: 9px; }
.fa-structure-tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.fa-structure-tool-grid button {
  min-height: 78px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(29, 29, 31, .08);
  border-radius: 16px;
  color: #1d1d1f;
  background: linear-gradient(150deg, #fff, #f5f5f7);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .045);
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}
.fa-structure-tool-grid button:hover:not(:disabled) {
  border-color: rgba(0, 113, 227, .26);
  box-shadow: 0 13px 28px rgba(0, 0, 0, .08);
  transform: translateY(-2px);
}
.fa-structure-tool-grid button:disabled { opacity: .42; cursor: not-allowed; }
.fa-structure-tool-grid button > i {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #0071e3;
  background: rgba(0, 113, 227, .09);
  font-size: 17px;
  font-style: normal;
  font-weight: 700;
}
.fa-structure-tool-grid button span { min-width: 0; display: grid; gap: 4px; }
.fa-structure-tool-grid button strong { font-size: 11px; }
.fa-structure-tool-grid button small { color: #86868b; font-size: 8px; line-height: 1.4; }
.fa-structure-room-type {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding: 0 13px;
  border: 1px solid rgba(29, 29, 31, .07);
  border-radius: 14px;
  background: rgba(118, 118, 128, .065);
}
.fa-structure-room-type span { color: #6e6e73; font-size: 10px; }
.fa-structure-room-type select {
  min-width: 118px;
  height: 32px;
  padding: 0 30px 0 10px;
  border: 0;
  border-radius: 9px;
  color: #1d1d1f;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
  font-size: 10px;
}

.fa-resource-grid { grid-template-columns: 1fr; gap: 10px; padding: 0; }
.fa-layout-template-grid { grid-template-columns: 1fr; }
.fa-resource-card {
  border-color: rgba(29, 29, 31, .08);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 9px 26px rgba(0, 0, 0, .055);
}
.fa-resource-card:hover {
  border-color: rgba(0, 113, 227, .28);
  box-shadow: 0 16px 34px rgba(0, 0, 0, .1);
  transform: translateY(-2px);
}
.fa-resource-card > button[data-library-resource] {
  min-height: 102px;
  grid-template-columns: 112px minmax(0, 1fr);
  grid-template-rows: 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px 42px 10px 10px;
}
.fa-resource-preview {
  width: 112px;
  height: 78px;
  border: 0;
  border-radius: 13px;
  color: #0071e3;
  background: linear-gradient(145deg, #f7f8fa, #eff0f3);
  font-size: 17px;
}
.fa-layout-preview { padding: 5px; }
.fa-layout-preview .fa-layout-room {
  fill: rgba(0, 113, 227, .08);
  stroke: rgba(0, 82, 168, .58);
  stroke-width: 1.4;
  vector-effect: non-scaling-stroke;
}
.fa-layout-preview .fa-layout-room.is-bedroom { fill: rgba(175, 82, 222, .08); stroke: rgba(134, 56, 173, .55); }
.fa-layout-preview .fa-layout-room.is-kitchen { fill: rgba(52, 199, 89, .08); stroke: rgba(34, 140, 62, .55); }
.fa-layout-preview .fa-layout-room.is-bathroom { fill: rgba(90, 200, 250, .1); stroke: rgba(40, 140, 188, .55); }
.fa-layout-preview text { fill: #505055; font-size: 7px; font-weight: 650; pointer-events: none; }
.fa-resource-copy { gap: 5px; }
.fa-resource-copy strong { font-size: 12px; font-weight: 680; }
.fa-resource-copy small { color: #86868b; font-size: 9px; }
.fa-resource-meta { flex-wrap: wrap; }
.fa-resource-meta b { padding: 3px 5px; border-radius: 5px; background: #f2f2f4; font-size: 7px; }
.fa-resource-favorite {
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  border: 0;
  background: rgba(245, 245, 247, .9);
  box-shadow: none;
}
.fa-library-boundary {
  margin-top: 13px;
  padding: 13px 14px;
  border: 0;
  border-radius: 14px;
  background: rgba(118, 118, 128, .07);
}
.fa-library-boundary strong { font-size: 9px; }
.fa-library-boundary p { color: #86868b; font-size: 8px; }

/* 中央画布 */
.fresh-air-workbench .fa-plan-stage {
  top: 78px;
  right: 310px;
  bottom: 18px;
  left: 444px;
  border: 1px solid rgba(255, 255, 255, .82);
  border-radius: 26px;
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 255, 255, .88), transparent 55%),
    #dcdcdf;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 18px 48px rgba(0, 0, 0, .08);
}
.fresh-air-workbench.is-library-collapsed .fa-plan-stage { left: 92px; }
.fresh-air-workbench .fa-plan-stage::before,
.fresh-air-workbench .fa-plan-stage::after { background: rgba(29, 29, 31, .09); }
.fresh-air-workbench #fa-plan-svg { color: rgba(80, 80, 84, .3); }
.fresh-air-workbench .fa2d-room rect {
  fill: rgba(255, 255, 255, .94);
  stroke: #2c2c2e;
  stroke-width: 2.2;
  filter: drop-shadow(0 4px 7px rgba(0, 0, 0, .09));
}
.fa-blank-guide {
  top: 78px;
  padding: 10px 10px 10px 14px;
  border: 1px solid rgba(255, 255, 255, .86);
  border-radius: 16px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .1);
  backdrop-filter: blur(20px);
}
.fa-blank-guide button { min-height: 34px; border-radius: 10px; background: #0071e3; }
.fresh-air-workbench .fa-plan-status {
  bottom: 14px;
  left: 14px;
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .76);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .07);
  backdrop-filter: blur(16px);
}

/* 右侧检查器 */
.fresh-air-workbench .fa-side-panel {
  top: 78px;
  right: 14px;
  bottom: 18px;
  width: 282px;
  grid-template-rows: 205px 44px minmax(0, 1fr);
  border: 1px solid rgba(255, 255, 255, .88);
  border-radius: 24px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 22px 60px rgba(0, 0, 0, .1), inset 0 1px 0 #fff;
  backdrop-filter: blur(28px) saturate(180%);
}
.fresh-air-workbench .fa-overview-card {
  margin: 8px;
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(145deg, #f6f6f8, #e8e8eb);
}
.fresh-air-workbench .fa-overview-card header button {
  border: 0;
  border-radius: 999px;
  color: #0071e3;
  background: rgba(255, 255, 255, .84);
  box-shadow: 0 5px 14px rgba(0, 0, 0, .06);
}
.fresh-air-workbench .fa-side-tabs {
  height: 44px;
  margin: 0 8px;
  padding: 4px;
  gap: 4px;
  border: 0;
  border-radius: 13px;
  background: rgba(118, 118, 128, .1);
}
.fresh-air-workbench .fa-side-tabs button { min-height: 36px; border-radius: 9px; font-size: 10px; }
.fresh-air-workbench .fa-side-tabs button.is-active {
  color: #1d1d1f;
  background: #fff;
  box-shadow: 0 3px 9px rgba(0, 0, 0, .07);
}
.fresh-air-workbench .fa-side-content { padding: 16px 13px 28px; }
.fresh-air-workbench .fa-side-content > header { margin: 0 0 12px; padding: 0 0 12px; border-bottom-color: rgba(29, 29, 31, .07); }
.fresh-air-workbench .fa-side-content > header span { font-size: 18px; font-weight: 700; letter-spacing: -.035em; }
.fa-settings-block { padding: 10px 0 13px; border-bottom-color: rgba(29, 29, 31, .07); }
.fa-settings-block h3 { margin-bottom: 10px; color: #6e6e73; font-size: 10px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; }
.fresh-air-workbench .fa-slider-field > b,
.fa-select-field select,
.fa-building-type-row input,
.fa-building-type-row button { border: 0; border-radius: 9px; background: rgba(118, 118, 128, .09); }
.fresh-air-workbench .fa-project-metrics div { border: 0; border-radius: 13px; background: rgba(118, 118, 128, .075); }

/* 视图 Dock */
.fresh-air-workbench .fa-bottom-dock {
  bottom: 32px;
  left: calc(444px + (100% - 444px - 310px) / 2);
  height: 50px;
  gap: 4px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 17px;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 16px 42px rgba(0, 0, 0, .13), inset 0 1px 0 #fff;
  backdrop-filter: blur(24px) saturate(180%);
}
.fresh-air-workbench.is-library-collapsed .fa-bottom-dock { left: calc(92px + (100% - 92px - 310px) / 2); }
.fresh-air-workbench .fa-bottom-dock > button,
.fresh-air-workbench .fa-view-segment button { height: 40px; border-radius: 11px; font-size: 10px; }
.fresh-air-workbench .fa-view-segment { padding: 3px; border: 0; border-radius: 13px; background: rgba(118, 118, 128, .1); }
.fresh-air-workbench .fa-bottom-dock > button:hover,
.fresh-air-workbench .fa-view-segment button:hover,
.fresh-air-workbench .fa-view-segment button.is-active { color: #0071e3; background: #fff; box-shadow: 0 3px 9px rgba(0, 0, 0, .06); }

.fresh-air-workbench .fa-branch-tools { bottom: 88px; left: 462px; }
.fresh-air-workbench .fa-branch-panel { border-radius: 20px; box-shadow: var(--keynote-shadow); }

/* 3D 与 2D 保持同一产品框架。 */
body[data-workspace-mode="freshAir"][data-workspace-view="3d"] #three-bedroom-canvas {
  top: 78px;
  right: 310px;
  bottom: 18px;
  left: 444px;
  width: calc(100% - 754px);
  height: calc(100% - 96px);
  border-radius: 26px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .12);
}
body[data-workspace-mode="freshAir"][data-workspace-view="3d"][data-design-panel="collapsed"] #three-bedroom-canvas {
  left: 92px;
  width: calc(100% - 402px);
}

/* Toast */
.demo-toast {
  z-index: 300;
  bottom: 96px;
  padding: 10px 15px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(29, 29, 31, .86);
  box-shadow: 0 16px 38px rgba(0, 0, 0, .2);
  backdrop-filter: blur(20px);
}

/* 深色模式 */
body[data-ui-theme="dark"] {
  --keynote-ink: #f5f5f7;
  --keynote-muted: #a1a1a6;
  --keynote-bg: #000;
  --keynote-surface: rgba(30, 30, 32, .86);
  --keynote-line: rgba(255, 255, 255, .11);
  color-scheme: dark;
}
body[data-ui-theme="dark"] #project-home.project-home,
body[data-ui-theme="dark"] .design-entry {
  --start-bg: #000;
  --start-surface: rgba(28, 28, 30, .88);
  --start-ink: #f5f5f7;
  --start-muted: #a1a1a6;
  --start-line: rgba(255, 255, 255, .12);
  --start-accent: #2997ff;
  background:
    radial-gradient(circle at 50% 34%, rgba(41, 151, 255, .2), transparent 30%),
    radial-gradient(circle at 17% 84%, rgba(191, 90, 242, .14), transparent 27%),
    #000;
}
body[data-ui-theme="dark"] .minimal-home-main h1 {
  background-image: linear-gradient(138deg, #fff 18%, #a1a1a6 62%, #fff 100%);
}
body[data-ui-theme="dark"] .minimal-home-main::before { border-color: rgba(255, 255, 255, .08); background: radial-gradient(circle, rgba(255, 255, 255, .08), transparent 67%); }
body[data-ui-theme="dark"] .minimal-home-header [data-theme-toggle],
body[data-ui-theme="dark"] .minimal-entry > header > button,
body[data-ui-theme="dark"] .minimal-entry-actions > button { background: rgba(28, 28, 30, .82); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 14px 40px rgba(0, 0, 0, .32); }

body[data-ui-theme="dark"] .fresh-air-workbench {
  --design-line: rgba(255, 255, 255, .1);
  --design-line-strong: rgba(255, 255, 255, .18);
  --design-surface: rgba(28, 28, 30, .92);
  --design-subtle: #242426;
  --design-canvas: #111113;
  --design-ink: #f5f5f7;
  --design-muted: #a1a1a6;
  --design-accent: #2997ff;
  --design-accent-soft: rgba(41, 151, 255, .14);
  background: radial-gradient(circle at 48% 18%, #242426, transparent 38%), #0b0b0c;
}
body[data-ui-theme="dark"] .fresh-air-workbench .fa-commandbar,
body[data-ui-theme="dark"] .fresh-air-workbench .fa-resource-rail,
body[data-ui-theme="dark"] .fa-design-library,
body[data-ui-theme="dark"] .fresh-air-workbench .fa-side-panel,
body[data-ui-theme="dark"] .fresh-air-workbench .fa-bottom-dock,
body[data-ui-theme="dark"] .fresh-air-workbench .engineering-module-switcher {
  border-color: rgba(255, 255, 255, .1);
  background: rgba(28, 28, 30, .82);
  box-shadow: 0 22px 60px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(255, 255, 255, .06);
}
body[data-ui-theme="dark"] .fresh-air-workbench .fa-brand-block strong,
body[data-ui-theme="dark"] .fa-library-tabs button.is-active,
body[data-ui-theme="dark"] .fresh-air-workbench .fa-side-tabs button.is-active,
body[data-ui-theme="dark"] .fa-structure-tool-grid button,
body[data-ui-theme="dark"] .fa-structure-room-type select { color: #f5f5f7; }
body[data-ui-theme="dark"] .fa-library-tabs button.is-active,
body[data-ui-theme="dark"] .fresh-air-workbench .fa-side-tabs button.is-active,
body[data-ui-theme="dark"] .fresh-air-workbench .engineering-module-switcher button.is-active,
body[data-ui-theme="dark"] .fa-structure-room-type select,
body[data-ui-theme="dark"] .fresh-air-workbench .fa-bottom-dock > button:hover,
body[data-ui-theme="dark"] .fresh-air-workbench .fa-view-segment button.is-active { background: #3a3a3c; }
body[data-ui-theme="dark"] .fa-structure-tool-grid button,
body[data-ui-theme="dark"] .fa-resource-card { border-color: rgba(255, 255, 255, .08); background: linear-gradient(150deg, #2c2c2e, #202022); }
body[data-ui-theme="dark"] .fa-resource-preview,
body[data-ui-theme="dark"] .fresh-air-workbench .fa-overview-card { background: linear-gradient(145deg, #303033, #1e1e20); }
body[data-ui-theme="dark"] .fresh-air-workbench .fa-plan-stage { border-color: rgba(255, 255, 255, .08); background: radial-gradient(circle, #242426, transparent 60%), #121214; }
body[data-ui-theme="dark"] .fresh-air-workbench .fa2d-room rect { fill: rgba(38, 38, 41, .96); stroke: #e5e5e7; }
body[data-ui-theme="dark"] .fa-layout-preview text { fill: #d1d1d6; }

@media (max-width: 1280px) {
  .fresh-air-workbench { --design-library: 318px; --design-side: 258px; }
  .fa-design-library { width: 308px; }
  .fresh-air-workbench .fa-side-panel { width: 254px; }
  .fresh-air-workbench .fa-plan-stage { right: 278px; left: 412px; }
  .fresh-air-workbench .engineering-module-switcher { left: 424px; }
  .fresh-air-workbench .fa-bottom-dock { left: calc(412px + (100% - 412px - 278px) / 2); }
  .fresh-air-workbench .fa-branch-tools { left: 430px; }
  body[data-workspace-mode="freshAir"][data-workspace-view="3d"] #three-bedroom-canvas { right: 278px; left: 412px; width: calc(100% - 690px); }
}

@media (max-width: 1040px) {
  .fresh-air-workbench .fa-commandbar { grid-template-columns: 190px minmax(490px, 1fr) auto; }
  .fresh-air-workbench .fa-side-panel { display: none; }
  .fresh-air-workbench .fa-plan-stage { right: 14px; }
  .fresh-air-workbench .fa-bottom-dock { left: calc(412px + (100% - 412px - 14px) / 2); }
  body[data-workspace-mode="freshAir"][data-workspace-view="3d"] #three-bedroom-canvas { right: 14px; width: calc(100% - 426px); }
}

@media (max-width: 720px) {
  .minimal-entry-actions { grid-template-columns: 1fr; }
  .minimal-entry-actions > button { min-height: 104px; }
  .fresh-air-workbench .fa-commandbar { right: 8px; left: 8px; grid-template-columns: 140px minmax(380px, 1fr) 52px; }
  .fresh-air-workbench .fa-resource-rail { left: 8px; }
  .fa-design-library { left: 82px; width: calc(100vw - 90px); }
  .fresh-air-workbench:not(.is-library-collapsed) .fa-plan-stage { left: 100%; }
  .fresh-air-workbench.is-library-collapsed .fa-plan-stage { right: 8px; left: 82px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* 统一选择与受保护删除 */
.fresh-air-workbench [data-selection-action="delete"]:not(:disabled):hover,
.fresh-air-workbench [data-selection-action="delete"]:not(:disabled):focus-visible {
  color: #ff3b30;
  border-bottom-color: #ff3b30;
  background: rgba(255, 59, 48, .09);
}
.fresh-air-workbench [data-selection-action="delete"]:not(:disabled):hover i,
.fresh-air-workbench [data-selection-action="delete"]:not(:disabled):focus-visible i {
  color: #ff3b30;
  border-color: rgba(255, 59, 48, .2);
  background: rgba(255, 59, 48, .08);
}
.fresh-air-workbench .fa2d-room,
.fresh-air-workbench .fa2d-pipe { cursor: pointer; }
.fresh-air-workbench .fa2d-room.is-selected rect {
  stroke: #0071e3;
  stroke-width: 5;
  filter: drop-shadow(0 0 8px rgba(0, 113, 227, .34));
}
.fresh-air-workbench .fa2d-pipe.is-selected {
  filter: drop-shadow(0 0 5px rgba(0, 113, 227, .9));
  stroke-width: 10px !important;
}
.plan-room.is-selected { stroke: #0071e3; stroke-width: 3px; }
.plan-pipe.is-selected { filter: drop-shadow(0 0 3px rgba(0, 113, 227, .9)); stroke-width: 5px; }
.tree-row.is-selected { outline: 2px solid rgba(0, 113, 227, .34); outline-offset: -2px; background: rgba(0, 113, 227, .08); }

/* 导入底图图层 */
.fresh-air-workbench .fa-drawing-underlay {
  pointer-events: none;
  filter: grayscale(.18) contrast(.92);
}
.fa-drawing-status {
  position: absolute;
  z-index: 7;
  top: 18px;
  left: 18px;
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: min(520px, calc(100% - 36px));
  padding: 7px 8px 7px 11px;
  border: 1px solid rgba(255, 255, 255, .86);
  border-radius: 14px;
  color: #1d1d1f;
  background: rgba(255, 255, 255, .84);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .1);
  backdrop-filter: blur(24px) saturate(160%);
}
.fa-drawing-status[hidden] { display: none !important; }
.fa-drawing-status > span { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1px 8px; flex: 1; }
.fa-drawing-status > span i { grid-row: 1 / span 2; align-self: center; color: #0071e3; font-style: normal; }
.fa-drawing-status strong,
.fa-drawing-status small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fa-drawing-status strong { font-size: 11px; }
.fa-drawing-status small { color: #6e6e73; font-size: 9px; }
.fa-drawing-status button {
  min-height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  color: #0071e3;
  background: rgba(0, 113, 227, .08);
  cursor: pointer;
}
.fa-drawing-settings {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(0, 113, 227, .12);
  border-radius: 14px;
  background: rgba(0, 113, 227, .045);
}
.fa-drawing-settings[hidden] { display: none !important; }
.fa-drawing-settings > span { display: grid; gap: 2px; }
.fa-drawing-settings > span strong { font-size: 11px; }
.fa-drawing-settings > span small { color: #6e6e73; font-size: 9px; }
.fa-drawing-settings > label { display: grid; grid-template-columns: 1fr minmax(80px, 1.3fr) 34px; align-items: center; gap: 8px; color: #6e6e73; font-size: 9px; }
.fa-drawing-settings > label input { width: 100%; accent-color: #0071e3; }
.fa-drawing-settings > label b { color: #1d1d1f; text-align: right; }
.fa-drawing-settings > div { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.fa-drawing-settings button { min-height: 30px; border: 0; border-radius: 9px; color: #0071e3; background: rgba(255, 255, 255, .86); cursor: pointer; }
.fa-drawing-settings button[data-drawing-action="remove"] { color: #ff3b30; }

/* Keynote 风格图纸导入向导 */
.drawing-import-dialog {
  width: min(980px, calc(100vw - 40px));
  max-width: none;
  max-height: calc(100vh - 36px);
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .82);
  border-radius: 28px;
  color: #1d1d1f;
  background: rgba(248, 248, 250, .95);
  box-shadow: 0 36px 100px rgba(0, 0, 0, .28), inset 0 1px 0 #fff;
  backdrop-filter: blur(34px) saturate(170%);
}
.drawing-import-dialog::backdrop { background: rgba(16, 18, 22, .42); backdrop-filter: blur(14px); }
.drawing-import-shell { min-height: min(720px, calc(100vh - 40px)); display: grid; grid-template-rows: 72px 58px minmax(0, 1fr) 72px; }
.drawing-import-shell > header,
.drawing-import-shell > footer { display: flex; align-items: center; gap: 16px; padding: 0 26px; }
.drawing-import-shell > header { justify-content: space-between; border-bottom: 1px solid rgba(0, 0, 0, .07); }
.drawing-import-shell > header > span { display: grid; gap: 3px; }
.drawing-import-shell > header small { color: #86868b; font: 700 9px/1.1 "SFMono-Regular", monospace; letter-spacing: .15em; }
.drawing-import-shell > header strong { font-size: 19px; }
.drawing-import-shell > header button { width: 34px; height: 34px; border: 0; border-radius: 50%; color: #6e6e73; background: rgba(118, 118, 128, .1); cursor: pointer; font-size: 20px; }
.drawing-import-steps { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; padding: 10px 26px; list-style: none; border-bottom: 1px solid rgba(0, 0, 0, .06); }
.drawing-import-steps li { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; color: #86868b; font-size: 11px; }
.drawing-import-steps li::after { content: ""; position: absolute; top: 50%; right: -20%; width: 40%; height: 1px; background: rgba(0, 0, 0, .09); }
.drawing-import-steps li:last-child::after { display: none; }
.drawing-import-steps i { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; color: #6e6e73; background: rgba(118, 118, 128, .12); font-style: normal; font-size: 10px; }
.drawing-import-steps li.is-active { color: #1d1d1f; font-weight: 650; }
.drawing-import-steps li.is-active i,
.drawing-import-steps li.is-complete i { color: #fff; background: #0071e3; }
.drawing-import-shell > main { min-height: 0; overflow: auto; padding: 28px; }
.drawing-import-panel { min-height: 100%; }
.drawing-import-panel[hidden] { display: none !important; }
.drawing-import-panel[data-drawing-step="choose"] { display: grid; align-content: center; gap: 24px; max-width: 790px; margin: auto; }
.drawing-import-intro { display: grid; gap: 8px; text-align: center; }
.drawing-import-intro > span,
.drawing-import-place > span { color: #0071e3; font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.drawing-import-intro h2,
.drawing-import-place h2 { margin: 0; font-size: clamp(26px, 4vw, 44px); letter-spacing: -.04em; }
.drawing-import-intro p { max-width: 650px; margin: 0 auto; color: #6e6e73; font-size: 13px; line-height: 1.7; }
.drawing-format-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.drawing-format-grid article { position: relative; min-height: 76px; display: grid; grid-template-columns: 46px minmax(0, 1fr); align-items: center; gap: 12px; padding: 14px; border: 1px solid rgba(0, 0, 0, .07); border-radius: 18px; background: rgba(255, 255, 255, .78); box-shadow: 0 12px 30px rgba(0, 0, 0, .04); }
.drawing-format-grid article > i { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 13px; color: #0071e3; background: rgba(0, 113, 227, .08); font: 700 10px/1 "SFMono-Regular", monospace; font-style: normal; }
.drawing-format-grid article > span { display: grid; gap: 4px; }
.drawing-format-grid article strong { font-size: 12px; }
.drawing-format-grid article small { color: #86868b; font-size: 9px; }
.drawing-format-grid article > b { position: absolute; top: 9px; right: 10px; color: #0071e3; font-size: 8px; font-weight: 650; }
.drawing-format-grid article.is-blocked { opacity: .62; }
.drawing-format-grid article.is-blocked > b { color: #ff9500; }
.drawing-import-dropzone { min-height: 108px; display: flex; align-items: center; justify-content: center; gap: 15px; border: 1.5px dashed rgba(0, 113, 227, .34); border-radius: 20px; color: #1d1d1f; background: rgba(0, 113, 227, .045); cursor: pointer; }
.drawing-import-dropzone.is-dragover { border-color: #0071e3; background: rgba(0, 113, 227, .1); transform: scale(1.006); }
.drawing-import-dropzone > i { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #0071e3; box-shadow: 0 10px 22px rgba(0, 113, 227, .25); font-style: normal; font-size: 22px; }
.drawing-import-dropzone > span { display: grid; gap: 4px; text-align: left; }
.drawing-import-dropzone strong { font-size: 14px; }
.drawing-import-dropzone small { color: #6e6e73; font-size: 10px; }
.drawing-import-panel[data-drawing-step="review"] { grid-template-columns: minmax(0, 1.28fr) minmax(280px, .72fr); gap: 22px; }
.drawing-import-panel[data-drawing-step="review"].is-active { display: grid; }
.drawing-import-preview-column,
.drawing-import-review-column { min-width: 0; display: grid; align-content: start; gap: 14px; }
.drawing-import-preview { min-height: 440px; display: grid; place-items: center; overflow: hidden; border: 1px solid rgba(0, 0, 0, .08); border-radius: 20px; background: #e5e5e7; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6); }
.drawing-import-preview-canvas { position: relative; max-width: 100%; max-height: 440px; display: none; line-height: 0; }
.drawing-import-preview.has-image .drawing-import-preview-canvas { display: inline-block; }
.drawing-import-preview img { max-width: 100%; max-height: 440px; display: block; user-select: none; -webkit-user-drag: none; }
.drawing-import-preview.is-calibrating img { cursor: crosshair; }
.drawing-import-preview svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.drawing-import-preview svg line { stroke: #ff3b30; stroke-width: 7; stroke-linecap: round; filter: drop-shadow(0 0 8px rgba(255, 59, 48, .4)); }
.drawing-import-preview svg circle { fill: #fff; stroke: #ff3b30; stroke-width: 8; }
.drawing-import-preview > span { display: grid; place-items: center; gap: 7px; color: #6e6e73; }
.drawing-import-preview.has-image > span { display: none; }
.drawing-import-preview > span i { font-style: normal; font-size: 34px; }
.drawing-import-preview > span strong { color: #1d1d1f; font-size: 12px; }
.drawing-import-preview > span small,
.drawing-import-preview-column > p { color: #86868b; font-size: 9px; text-align: center; }
.drawing-import-file-card { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; gap: 12px; padding: 13px; border-radius: 16px; background: #fff; box-shadow: 0 9px 28px rgba(0, 0, 0, .05); }
.drawing-import-file-card > i { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 13px; color: #0071e3; background: rgba(0, 113, 227, .08); font: 700 10px/1 "SFMono-Regular", monospace; font-style: normal; }
.drawing-import-file-card > span { min-width: 0; display: grid; gap: 3px; }
.drawing-import-file-card strong,
.drawing-import-file-card small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawing-import-file-card strong { font-size: 12px; }
.drawing-import-file-card small { color: #86868b; font-size: 9px; }
.drawing-import-field { display: grid; gap: 6px; color: #6e6e73; font-size: 9px; }
.drawing-import-field > span:last-child { display: grid; grid-template-columns: minmax(0, 1fr) 34px; align-items: center; }
.drawing-import-field input,
.drawing-import-field select { width: 100%; height: 38px; padding: 0 11px; border: 1px solid rgba(0, 0, 0, .1); border-radius: 11px; color: #1d1d1f; background: #fff; }
.drawing-import-field > span b { text-align: center; }
.drawing-import-capability { padding: 12px 14px; border-radius: 14px; background: rgba(0, 113, 227, .07); }
.drawing-import-capability.is-warning { background: rgba(255, 149, 0, .11); }
.drawing-import-capability strong { color: #0071e3; font-size: 10px; }
.drawing-import-capability.is-warning strong { color: #b36300; }
.drawing-import-capability p { margin: 5px 0 0; color: #6e6e73; font-size: 9px; line-height: 1.55; }
.drawing-import-calibration { display: grid; gap: 10px; padding: 15px; border: 1px solid rgba(0, 0, 0, .07); border-radius: 18px; background: rgba(255, 255, 255, .76); }
.drawing-import-calibration > header { display: flex; align-items: center; justify-content: space-between; }
.drawing-import-calibration > header span { display: grid; gap: 2px; }
.drawing-import-calibration > header small { color: #86868b; font-size: 8px; letter-spacing: .1em; }
.drawing-import-calibration > header strong { font-size: 12px; }
.drawing-import-calibration > header b { padding: 5px 8px; border-radius: 999px; color: #b36300; background: rgba(255, 149, 0, .12); font-size: 8px; }
.drawing-import-calibration.is-calibrated > header b { color: #248a3d; background: rgba(52, 199, 89, .12); }
.drawing-import-calibration p,
.drawing-import-calibration > small { margin: 0; color: #6e6e73; font-size: 9px; line-height: 1.55; }
.drawing-import-calibration > button { min-height: 38px; border: 0; border-radius: 11px; color: #0071e3; background: rgba(0, 113, 227, .08); cursor: pointer; font-weight: 650; }
.drawing-import-calibration > button.is-active { color: #fff; background: #0071e3; }
.drawing-import-place { max-width: 700px; margin: auto; align-content: center; gap: 16px; text-align: center; }
.drawing-import-place.is-active { display: grid; }
.drawing-import-place > ol { display: grid; gap: 10px; margin: 10px 0; padding: 0; list-style: none; text-align: left; }
.drawing-import-place li { display: grid; grid-template-columns: 36px minmax(0, 1fr); align-items: center; gap: 12px; padding: 13px; border-radius: 15px; background: rgba(255, 255, 255, .78); }
.drawing-import-place li > i { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: #0071e3; background: rgba(0, 113, 227, .08); font-style: normal; }
.drawing-import-place li > span { display: grid; gap: 3px; }
.drawing-import-place li strong { font-size: 11px; }
.drawing-import-place li small { color: #86868b; font-size: 9px; }
.drawing-import-opacity { display: grid; grid-template-columns: minmax(0, 1fr) minmax(170px, .8fr) 44px; align-items: center; gap: 12px; padding: 14px; border-radius: 15px; background: rgba(255, 255, 255, .78); text-align: left; }
.drawing-import-opacity > span { display: grid; gap: 3px; }
.drawing-import-opacity strong { font-size: 11px; }
.drawing-import-opacity small { color: #86868b; font-size: 9px; }
.drawing-import-opacity input { width: 100%; accent-color: #0071e3; }
.drawing-import-opacity b { text-align: right; }
.drawing-import-shell > footer { border-top: 1px solid rgba(0, 0, 0, .07); }
.drawing-import-shell > footer > span { min-width: 0; flex: 1; overflow: hidden; color: #6e6e73; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.drawing-import-shell > footer button { min-width: 96px; min-height: 40px; padding: 0 17px; border: 0; border-radius: 999px; color: #1d1d1f; background: rgba(118, 118, 128, .1); cursor: pointer; }
.drawing-import-shell > footer button.is-primary { color: #fff; background: #0071e3; box-shadow: 0 10px 24px rgba(0, 113, 227, .23); }
.drawing-import-shell > footer button:disabled { opacity: .38; cursor: not-allowed; box-shadow: none; }

body[data-ui-theme="dark"] .fa-drawing-status,
body[data-ui-theme="dark"] .drawing-import-dialog { color: #f5f5f7; border-color: rgba(255, 255, 255, .1); background: rgba(28, 28, 30, .95); box-shadow: 0 38px 110px rgba(0, 0, 0, .62), inset 0 1px 0 rgba(255, 255, 255, .06); }
body[data-ui-theme="dark"] .fa-drawing-status strong,
body[data-ui-theme="dark"] .fa-drawing-settings > label b,
body[data-ui-theme="dark"] .drawing-import-steps li.is-active,
body[data-ui-theme="dark"] .drawing-import-preview > span strong,
body[data-ui-theme="dark"] .drawing-import-field input,
body[data-ui-theme="dark"] .drawing-import-field select { color: #f5f5f7; }
body[data-ui-theme="dark"] .drawing-format-grid article,
body[data-ui-theme="dark"] .drawing-import-file-card,
body[data-ui-theme="dark"] .drawing-import-calibration,
body[data-ui-theme="dark"] .drawing-import-place li,
body[data-ui-theme="dark"] .drawing-import-opacity,
body[data-ui-theme="dark"] .drawing-import-field input,
body[data-ui-theme="dark"] .drawing-import-field select { border-color: rgba(255, 255, 255, .08); background: #2c2c2e; }
body[data-ui-theme="dark"] .drawing-import-preview { border-color: rgba(255, 255, 255, .08); background: #161618; }

/* Three visible P0/P1 system entrances; radiator remains a non-mutating placeholder. */
.fresh-air-workbench .engineering-module-switcher:has([data-engineering-coming-soon]) {
  width: 452px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.fresh-air-workbench .engineering-module-switcher [data-engineering-coming-soon] {
  opacity: .66;
}

.fa-device-transform-controls > strong {
  display: block;
  margin-bottom: 9px;
  font-size: 11px;
}

.fa-transform-mode,
.fa-transform-nudge {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.fa-transform-mode button,
.fa-transform-nudge button {
  min-height: 31px;
  border: 1px solid rgba(29, 29, 31, .08);
  border-radius: 9px;
  color: #6e6e73;
  background: rgba(118, 118, 128, .08);
  font-size: 9px;
  cursor: pointer;
}

.fa-transform-mode button.is-active {
  color: #fff;
  border-color: #0071e3;
  background: #0071e3;
}

.fa-transform-coordinates {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 8px 0;
}

.fa-transform-coordinates label {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px;
}

.fa-transform-coordinates label > span {
  grid-column: 1 / -1;
  color: #86868b;
  font-size: 8px;
}

.fa-transform-coordinates input {
  width: 100%;
  min-width: 0;
  height: 31px;
  padding: 0 6px;
  border: 1px solid rgba(29, 29, 31, .1);
  border-radius: 8px;
  background: #fff;
  font-size: 9px;
}

.fa-transform-coordinates small,
.fa-device-transform-controls > small {
  color: #86868b;
  font-size: 8px;
  line-height: 1.45;
}

.fa-transform-nudge {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 8px;
}

.fresh-air-workbench .fa2d-pipe.is-floor-coil.is-selected {
  stroke-width: 2.4px !important;
}

body[data-device-transform-mode="vertical"] #three-bedroom-canvas.is-dragging-device {
  cursor: ns-resize;
}

body[data-ui-theme="dark"] .fa-transform-coordinates input {
  color: #f5f5f7;
  border-color: rgba(255, 255, 255, .1);
  background: #2c2c2e;
}

@media (max-width: 760px) {
  .fresh-air-workbench .engineering-module-switcher:has([data-engineering-coming-soon]) {
    width: calc(100vw - 90px);
  }
  .drawing-import-dialog { width: calc(100vw - 16px); max-height: calc(100vh - 16px); border-radius: 22px; }
  .drawing-import-shell { min-height: calc(100vh - 18px); grid-template-rows: 64px 52px minmax(0, 1fr) 66px; }
  .drawing-import-shell > main { padding: 18px; }
  .drawing-format-grid { grid-template-columns: 1fr; }
  .drawing-import-panel[data-drawing-step="review"].is-active { grid-template-columns: 1fr; }
  .drawing-import-preview { min-height: 300px; }
  .drawing-import-preview img,
  .drawing-import-preview-canvas { max-height: 300px; }
  .drawing-import-steps span { display: none; }
  .drawing-import-shell > footer { padding: 0 14px; }
  .drawing-import-shell > footer > span { display: none; }
  .drawing-import-shell > footer button { flex: 1; }
}
