:root {
  --bg: #f5f6f4;
  --surface: #ffffff;
  --ink: #1e2524;
  --muted: #66706e;
  --line: #dfe4df;
  --nav: #26302f;
  --nav-soft: #33413f;
  --green: #327a5e;
  --teal: #2d6f7a;
  --amber: #b47a28;
  --red: #b24b45;
  --shadow: 0 14px 34px rgba(25, 35, 32, 0.08);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

button, input, select { font: inherit; }
button { cursor: pointer; }

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
}

.home-mode .app-shell { grid-template-columns: minmax(0, 1fr); }
.home-mode .sidebar { display: none; }

.sidebar {
  background: var(--nav);
  color: #f7faf7;
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 0;
  align-self: start;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  z-index: 2500; /* 左侧导航恒为第一图层：浮于弹窗(2400)之上 */
}

.brand {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  text-align: left;
  border-radius: 8px;
}

.brand:hover { background: rgba(255,255,255,0.06); }

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #e4b765;
  color: #1f2d2b;
  font-weight: 800;
}

.brand span, .sidebar-note { display: block; color: #c8d1ce; font-size: 12px; margin-top: 3px; }
/* DAY-CONTRAST-FIX-20260726 · 全局底座 A —— 侧栏品牌角标 ratio 1.00(夜)/1.42(昼),肉眼实测不可见。
   根因: 上面这条 `.brand span` 本是给品牌【副标题】写的浅灰,但选择器过宽,连角标 .brand-mark 内的
   首字 <span> 一起染成浅灰 —— 而角标底是金色(01 #e4b765 / 42 day 渐变 #e2c98f→#b8863b),浅灰压金 ≈ 1:1。
   该 <span> 由 app-src/01_core_config.js renderSidebarIdentityCp() 在「公司有简称但未传 Logo」时创建,
   即【每个新注册账号都必现】。修法只调色值不动结构: 角标内文字继承角标自身的深墨色,昼夜同时达标。 */
.brand-mark span { color: inherit; }
.nav-list { display: grid; gap: 6px; min-height: 0; overflow-y: auto; }
.nav-item {
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 11px 12px;
  background: transparent;
  color: #e8eeee;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

/* 242卡 Slice S1(定稿包04外壳段): 一级导航单字角标改小圆点。
   装饰单字 span 视觉隐藏且 aria-hidden，不占无障碍名；圆点由 ::before 绘制;
   选中=科技蓝实点(#4bb3ff, 与 09/59 分片 --r4-ui-accent 同源)+整行背景反差(下方既有规则),
   焦点=本文件既有焦点色描边(同 .module-card:focus-visible)——圆点不作唯一状态信息; 零新颜色。 */
.nav-item span {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.nav-item::before {
  content: "";
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(232, 239, 233, 0.48); /* 未选中=弱填充, 与 58 分片 pcs-nav-item::before 同值 */
}
.nav-item.active::before { background: #4bb3ff; } /* 选中=科技蓝实点亮起(同源色板, 不带回旧菜单绿) */
.nav-item:focus-visible {
  outline: 2px solid rgba(71, 255, 221, 0.9);
  outline-offset: 2px;
}
/* 昼主题侧栏沿用其既有金色 accent(与 42 分片 active inset 同色), 不引入新值 */
html[data-meifan-theme="day"] body:not(.home-mode) .nav-item.active::before { background: #b8863b; }
/* 窄屏沿用 02 分片"隐藏装饰字"既有口径: 底部主操作区(mobile-primary)只留文字, 圆点不破版 */
@media (max-width: 980px) {
  .nav-item::before { display: none; }
}
.nav-item:hover, .nav-item.active { background: var(--nav-soft); }
/* 377(定稿 NY-05/NY-11): 手机六底栏基件——默认 display:none(>820 桌面零渲染零行为);
   ≤820 由 css/02_project.css 媒体块放行为 position:fixed 贴底栏。视觉沿用侧栏同族(--nav/--nav-soft/圆点两态色),
   选中=科技蓝实点(#4bb3ff, 与 .nav-item.active::before 同源)+行背景反差, 昼主题沿用金色 accent(#b8863b), 零新色系。 */
.mf-nav-bottom { display: none; }
.mf-nav-bottom-item {
  border: 0;
  background: transparent;
  color: #e8eeee;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 11px;
  border-radius: 8px;
  padding: 2px 0;
  text-align: center;
}
.mf-nav-bottom-item::before {
  content: "";
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(232, 239, 233, 0.48); /* 未选中=弱填充, 与 .nav-item::before 同值 */
}
.mf-nav-bottom-item:focus-visible {
  outline: 2px solid rgba(71, 255, 221, 0.9);
  outline-offset: 2px;
}
.mf-nav-more-panel {
  background: var(--nav);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}
.mf-nav-more-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1999;
  background: rgba(31, 45, 43, 0.42); /* 与现有素材预览遮罩同值 */
}
.mf-nav-more-backdrop.hidden { display: none; }
.mf-nav-more-item {
  width: 100%;
  border: 0;
  background: transparent;
  color: #e8eeee;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  text-align: left;
}
.mf-nav-more-item:hover { background: var(--nav-soft); }
[data-company-action-permission][aria-disabled="true"] {
  opacity: 0.52;
  cursor: not-allowed;
  filter: saturate(0.55);
}
.nav-item.panorama-nav-item[aria-disabled="true"] {
  opacity: 0.52;
  cursor: not-allowed;
}
.nav-item.panorama-nav-item[aria-disabled="true"]:hover {
  background: rgba(255,255,255,0.035);
}
.sidebar-account {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: #f7faf7;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  margin-top: auto;
  border-radius: 10px;
  text-align: left;
}
.sidebar-account:hover,
.sidebar-account[aria-expanded="true"] {
  background: rgba(255,255,255,0.11);
  border-color: rgba(228,183,101,0.5);
}
.account-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e4b765;
  color: #1f2d2b;
  font-weight: 800;
}
.account-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.account-copy strong,
.account-copy small {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.account-copy small { color: #c8d1ce; font-size: 12px; }
.account-popover {
  position: fixed;
  left: 18px;
  bottom: 84px;
  z-index: 1200;
  width: 230px;
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(228,183,101,0.38);
  border-radius: 12px;
  background: #fffdf7;
  color: var(--text);
  box-shadow: 0 18px 42px rgba(15,23,42,0.22);
}
.account-popover span { font-size: 13px; color: var(--muted); }
.sidebar-note { margin-top: 0; padding: 10px; border-top: 1px solid rgba(255,255,255,0.12); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.online { background: #76d19d; }

.main { min-width: 0; padding: 22px; }
.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 26px; margin-bottom: 6px; letter-spacing: 0; }
h2 { font-size: 17px; margin-bottom: 0; letter-spacing: 0; }
h3 { font-size: 15px; margin-bottom: 8px; letter-spacing: 0; }
.topbar p { color: var(--muted); margin-bottom: 0; }
.top-actions { display: flex; gap: 10px; align-items: center; }
.top-actions[hidden] { display: none; }
.home-return-action { display: none; }
.marketing-mode #newTaskButton { display: none; }
.marketing-mode #topActions .home-return-action { display: inline-flex; }
.project-mode .topbar { display: none; }

.primary-action, .ghost, .quick-grid button, .segmented button {
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  min-height: 40px;
  padding: 0 13px;
}

.primary-action {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.small { min-height: 34px; }
.ghost:hover, .quick-grid button:hover, .segmented .selected { border-color: var(--green); color: var(--green); }
.view { display: none; }
.view.active { display: block; }

.home-view {
  min-height: 0;
  display: none;
  align-content: start;
  position: relative;
  z-index: 1;
}
.home-view.active { display: grid; }

.home-mode {
  background: #050a11;
  color: #edfaff;
}

.home-mode .main {
  min-height: 100dvh;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 34px;
  background: #020810;
}

.home-mode .main::before,
.home-mode .main::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

.home-mode .main::before {
  inset: -3.5%;
  background-image: url("assets/ui/home-tech-bg-20260617-2x.png");
  /* FC-PERF-WEBP-A-BEGIN: same approved artwork; main height can exceed viewport. */
  background-image: image-set(
    url("assets/ui/home-tech-bg-20260617-q92-w3344-da81b40effee.webp") type("image/webp") 1x,
    url("assets/ui/home-tech-bg-20260617-2x.png") type("image/png") 1x
  );
  /* FC-PERF-WEBP-A-END */
  background-size: cover;
  background-position: center center;
  filter: saturate(1.08) contrast(1.03);
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1.01);
  animation: homeBgDrift 24s ease-in-out infinite alternate;
}

.home-mode .main::after {
  background:
    linear-gradient(180deg, rgba(2, 8, 16, 0.20), rgba(2, 8, 16, 0.02) 40%, rgba(2, 8, 16, 0.36)),
    radial-gradient(ellipse at 50% 50%, transparent 0 52%, rgba(0,0,0,0.48) 100%),
    linear-gradient(105deg, transparent 0 30%, rgba(255,255,255,0.04) 42%, transparent 58% 100%);
  mix-blend-mode: normal;
  opacity: 0.92;
  transform: translate3d(0, 0, 0);
  animation: homeImageSheen 18s ease-in-out infinite alternate;
}

/* DL-032-NIGHT-ZINDEX(2026-07-27): 首页右上账户菜单下半部被 .module-card 压住、「退出登录」不可点。
   根因 = 层叠上下文平级撞车, 不是"菜单 z-index 不够大"(菜单 .account-ux-menu-r3 早已是 2600, 照样输)。
   `.home-mode .main{isolation:isolate}` 自建层叠上下文, 里面两个直接子级同为 z-index:1 ——
   `.home-mode .topbar`(承载右上菜单) 与 `.home-view`(承载 #moduleGrid) 打平, 平级则按 DOM 序后来居上,
   `.home-view` 在后 → 压住 topbar; 菜单的 2600 被关在 topbar 自己的上下文里, 对外只按 1 参与层叠, 抬多高都没用。
   修法 = 抬 topbar 这个"上下文本身"到 2, 让它高于 .home-view 的 1。

   层级体系(为什么是 2 而不是一个巨大值):
     · 本站全局刻度都挂在 body:not(.home-mode) 上(css/09):模态 2147483000 / 侧栏 2147483600 /
       侧栏账户浮层 2147483601;局部浮层刻度 1200(.account-popover)、2600(账户菜单/素材模态)。
     · 首页态(.home-mode)不走那套全局刻度:`.home-mode .main` 的 isolation:isolate 把首页整体封成一个
       独立层叠上下文, 内部只有一把 -1 / 1 / 2 的**局部**小尺子(-1=.main::before/::after 背景层)。
     · 所以这里的 2 只在 .home-mode .main 内部生效, 出不了 .main —— 天然压不到全局模态、侧栏、
       登录页(.account-login-mode 另把 .main 整个 display:none), 不会重演"某元素又被谁盖住"。
     · 取最小可用值 2(比 .home-view 的 1 高一档即可), 给后来者留刻度, 不占用大数字。
   昼夜通用: 根因与主题无关, 故不加 day/night 前缀。夜晚是"被卡片盖住看不见+点不到";
   白天卡片起始位更低、菜单未被遮挡看着正常, 但 .home-view 是通版满幅(min-height:calc(100dvh - 154px))
   的透明拦截层, 实测白天同样命中 SECTION.home-view、真点「退出登录」无反应 —— 白天是"看得见但点不动"的
   静默失效, 同一个根因, 只挂 day 前缀会把夜晚修好、白天继续埋雷。 */
.home-mode .topbar {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  width: 100%;
  margin: 26px auto 24px;
  padding: 0;
  color: #f3fdff;
  align-items: center;
}

.home-mode .topbar > div:first-child {
  position: relative;
  padding-left: 26px;
}

.home-mode .topbar > div:first-child::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 3px;
  height: 76px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(76, 255, 240, 0.98), rgba(50, 194, 226, 0.48));
  box-shadow: 0 0 22px rgba(76, 255, 240, 0.34);
}

.home-mode .topbar h1 {
  margin: 0;
  font-size: 36px;
  line-height: 1.12;
  letter-spacing: 0;
  font-weight: 800;
  text-shadow: 0 0 28px rgba(71, 255, 221, 0.18);
}

.home-mode #pageSubtitle {
  margin-top: 10px;
  color: rgba(222, 246, 255, 0.66);
}

.home-account-badge {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 7px 12px 7px 8px;
  border: 1px solid rgba(179, 246, 255, 0.24);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.17), rgba(255,255,255,0.055)),
    rgba(7, 20, 31, 0.58);
  color: #edfaff;
  -webkit-backdrop-filter: blur(20px) saturate(145%);
  backdrop-filter: blur(20px) saturate(145%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.28),
    0 18px 48px rgba(0,0,0,0.26);
  text-align: left;
}

.home-mode .home-account-badge {
  display: inline-flex;
}

.home-account-badge:hover {
  border-color: rgba(103, 255, 232, 0.62);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.34),
    0 18px 54px rgba(62, 255, 222, 0.12),
    0 18px 48px rgba(0,0,0,0.30);
}

.home-account-badge:active {
  transform: scale(0.98);
}

.home-account-badge strong,
.home-account-badge small {
  display: block;
  white-space: nowrap;
}

.home-account-badge strong {
  font-size: 13px;
  line-height: 1.2;
}

.home-account-badge small {
  margin-top: 3px;
  color: rgba(221, 246, 255, 0.58);
  font-size: 11px;
}

.home-account-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(151, 255, 236, 0.72));
  color: #07131c;
  font-weight: 900;
  box-shadow: 0 0 26px rgba(96,255,229,0.22);
}

.home-view .customer-safe-banner {
  display: none;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  width: min(1180px, 100%);
  margin: 0 auto;
}
.module-card {
  min-height: 216px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(112, 210, 242, 0.44);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.09), rgba(255,255,255,0.024) 36%, rgba(56, 174, 218, 0.052) 100%),
    linear-gradient(320deg, rgba(2, 12, 22, 0.82), rgba(5, 35, 55, 0.58)),
    rgba(2, 13, 21, 0.72);
  -webkit-backdrop-filter: blur(28px) saturate(155%) contrast(1.08);
  backdrop-filter: blur(28px) saturate(155%) contrast(1.08);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.20),
    inset 0 -1px 0 rgba(255,255,255,0.07),
    inset 18px 18px 54px rgba(255,255,255,0.018),
    inset -28px -28px 72px rgba(54, 170, 220, 0.038),
    0 30px 86px rgba(0, 0, 0, 0.46);
  padding: 30px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: start;
  text-align: left;
  color: #f5feff;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
  will-change: transform;
}
.module-card.primary {
  grid-column: span 1;
  min-height: 216px;
  border-color: rgba(112, 210, 242, 0.44);
  background:
    linear-gradient(145deg, rgba(255,255,255,0.09), rgba(255,255,255,0.024) 36%, rgba(56, 174, 218, 0.052) 100%),
    linear-gradient(320deg, rgba(2, 12, 22, 0.82), rgba(5, 35, 55, 0.58)),
    rgba(2, 13, 21, 0.72);
}
.module-card.secondary {
  grid-column: span 1;
  min-height: 216px;
}
.module-card.support {
  grid-column: span 1;
  min-height: 216px;
}
.module-card::before,
.module-card::after {
  content: "";
  position: absolute;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.module-card::before {
  inset: 1px;
  border-radius: 19px;
  border: 1px solid rgba(210, 250, 255, 0.10);
  background:
    linear-gradient(134deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0.032) 18%, transparent 42%),
    linear-gradient(18deg, transparent 0 56%, rgba(104,214,246,0.055) 76%, rgba(255,255,255,0.045) 100%),
    radial-gradient(ellipse at 74% 88%, rgba(76,194,238,0.075), transparent 48%);
  opacity: 0.76;
}

.module-card::after {
  inset: 0;
  background:
    radial-gradient(ellipse at 78% 58%, rgba(82, 198, 238, 0.075), transparent 42%),
    linear-gradient(90deg, transparent 0 48%, rgba(255,255,255,0.035) 72%, transparent 100%);
  opacity: 0.22;
}

.module-card:hover {
  border-color: rgba(102, 224, 246, 0.66);
  background:
    linear-gradient(145deg, rgba(255,255,255,0.112), rgba(255,255,255,0.032) 36%, rgba(70, 188, 226, 0.064) 100%),
    linear-gradient(320deg, rgba(3, 15, 26, 0.84), rgba(6, 40, 62, 0.66)),
    rgba(4, 17, 26, 0.76);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.22),
    inset 0 -1px 0 rgba(255,255,255,0.08),
    0 0 0 1px rgba(82,210,244,0.075),
    0 28px 82px rgba(50, 180, 230, 0.07),
    0 24px 72px rgba(0, 0, 0, 0.46);
  transform: translateY(-2px);
}

.module-card:hover::after {
  opacity: 0.30;
}

.module-card:active {
  transform: translateY(-1px) scale(0.985);
  border-color: rgba(71, 255, 221, 0.92);
}

.module-card:focus-visible {
  outline: 2px solid rgba(71, 255, 221, 0.90);
  outline-offset: 4px;
}

.module-icon {
  position: relative;
  z-index: 2;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(190, 246, 255, 0.22);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.18), rgba(255,255,255,0.045)),
    rgba(2, 12, 19, 0.38);
  -webkit-backdrop-filter: blur(18px) saturate(170%);
  backdrop-filter: blur(18px) saturate(170%);
  color: rgba(235, 253, 255, 0.94);
  font-size: 24px;
  line-height: 1;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.28),
    0 14px 34px rgba(0,0,0,0.26);
}

.module-copy {
  position: relative;
  z-index: 2;
  align-self: end;
  display: grid;
  gap: 14px;
  max-width: 230px;
  margin-top: 22px;
}

.module-card strong {
  position: relative;
  z-index: 1;
  font-size: 24px;
  line-height: 1.18;
  letter-spacing: 0;
  font-weight: 800;
  text-shadow: 0 0 22px rgba(71, 255, 221, 0.20);
}

.module-card small {
  display: block;
  color: rgba(221, 244, 249, 0.64);
  font-size: 14px;
  line-height: 1.65;
  letter-spacing: 0;
}

.module-enter {
  position: relative;
  z-index: 2;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(200, 250, 255, 0.30);
  border-radius: 999px;
  color: rgba(241, 253, 255, 0.88);
  background: rgba(4, 17, 26, 0.26);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  font-size: 18px;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.module-card:hover .module-enter {
  transform: translateX(4px);
  border-color: rgba(112, 220, 246, 0.58);
  background: rgba(45, 170, 220, 0.075);
}

.module-visual {
  position: absolute;
  right: 22px;
  bottom: 20px;
  width: 168px;
  height: 138px;
  opacity: 0.46;
  pointer-events: none;
  z-index: 1;
  filter:
    drop-shadow(0 0 10px rgba(98, 210, 246, 0.095))
    drop-shadow(0 0 24px rgba(98, 210, 246, 0.064));
  animation: moduleOutlinePulse 5.8s ease-in-out infinite alternate;
}

.module-visual::before,
.module-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(166, 240, 249, 0.20);
  background: rgba(68, 175, 218, 0.026);
}

.module-card:hover .module-visual {
  opacity: 0.64;
  filter:
    drop-shadow(0 0 12px rgba(112, 220, 246, 0.16))
    drop-shadow(0 0 30px rgba(112, 220, 246, 0.095));
}

.module-card:hover .module-visual::before,
.module-card:hover .module-visual::after {
  border-color: rgba(156, 252, 255, 0.34);
}

.module-card[data-module-id="projects"] .module-visual::before {
  inset: 16px 0 0 22px;
  border-radius: 18px;
  background:
    linear-gradient(0deg, transparent 20%, rgba(189, 246, 255, 0.18) 20% 26%, transparent 26% 42%, rgba(189, 246, 255, 0.16) 42% 49%, transparent 49% 65%, rgba(189, 246, 255, 0.14) 65% 72%, transparent 72%),
    rgba(94, 232, 248, 0.045);
}

.module-card[data-module-id="projects"] .module-visual::after {
  inset: 32px 20px auto auto;
  width: 82px;
  height: 72px;
  border-radius: 10px;
}

.module-card[data-module-id="ai"] .module-visual::before,
.module-card[data-module-id="ai"] .module-visual::after {
  width: 34px;
  height: 92px;
  inset: auto 44px 0 auto;
  transform: skewY(-28deg);
}

.module-card[data-module-id="ai"] .module-visual::after {
  right: 8px;
  bottom: 30px;
  height: 124px;
}

.module-card[data-module-id="marketing"] .module-visual::before {
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(189,246,255,0.13) 0 30%, transparent 31%),
    conic-gradient(from 40deg, transparent 0 70%, rgba(189,246,255,0.28) 72% 74%, transparent 76% 100%);
}

.module-card[data-module-id="marketing"] .module-visual::after {
  inset: 42px 30px auto auto;
  width: 60px;
  height: 2px;
  border: 0;
  background: rgba(189,246,255,0.36);
  transform: rotate(-45deg);
}

.module-card[data-module-id="quote"] .module-visual::before {
  inset: 8px 4px 0 auto;
  width: 104px;
  border-radius: 15px;
  background:
    linear-gradient(0deg, transparent 22%, rgba(189,246,255,0.18) 22% 28%, transparent 28% 42%, rgba(189,246,255,0.14) 42% 48%, transparent 48%),
    rgba(94, 232, 248, 0.045);
}

.module-card[data-module-id="quote"] .module-visual::after {
  content: "¥";
  inset: auto 38px 14px auto;
  border: 0;
  background: transparent;
  color: rgba(189,246,255,0.26);
  font-size: 46px;
  font-weight: 800;
}

.module-card[data-module-id="cases"] .module-visual::before {
  inset: 4px 0 0 28px;
  border-radius: 14px;
}

.module-card[data-module-id="cases"] .module-visual::after {
  inset: 48px 26px 18px 50px;
  border: 0;
  background:
    radial-gradient(circle at 24% 28%, rgba(189,246,255,0.24) 0 10px, transparent 11px),
    linear-gradient(135deg, transparent 42%, rgba(189,246,255,0.18) 43% 100%);
}

.module-card[data-module-id="settings"] .module-visual::before {
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 0 27%, rgba(189,246,255,0.12) 28% 44%, transparent 45%),
    conic-gradient(from 0deg, rgba(189,246,255,0.22) 0 8%, transparent 8% 16%, rgba(189,246,255,0.18) 16% 24%, transparent 24% 34%, rgba(189,246,255,0.20) 34% 42%, transparent 42% 52%, rgba(189,246,255,0.16) 52% 60%, transparent 60% 100%);
}

.module-card[data-module-id="settings"] .module-visual::after {
  inset: 51px;
  border-radius: 14px;
  background: rgba(189,246,255,0.14);
}

.module-card[data-module-id="ai"],
.module-card[data-module-id="marketing"] {
  min-height: 216px;
}

.module-card[data-module-id="projects"],
.module-card[data-module-id="cases"] {
  transform-origin: center;
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .module-card {
    background: #0b1a26;
  }
}

@keyframes homeFluidField {
  0% { background-position: 0% 0%, 100% 80%, 0 0; }
  100% { background-position: 8% 5%, 92% 70%, 0 0; }
}

@keyframes homeBgDrift {
  0% { transform: translate3d(-0.8%, -0.4%, 0) scale(1.018); }
  100% { transform: translate3d(0.8%, 0.45%, 0) scale(1.045); }
}

@keyframes homeImageSheen {
  0% { opacity: 0.88; }
  100% { opacity: 0.98; }
}

@keyframes moduleOutlinePulse {
  0% {
    opacity: 0.36;
    filter:
      drop-shadow(0 0 6px rgba(98, 210, 246, 0.075))
      drop-shadow(0 0 18px rgba(98, 210, 246, 0.046));
  }
  100% {
    opacity: 0.54;
    filter:
      drop-shadow(0 0 12px rgba(98, 210, 246, 0.14))
      drop-shadow(0 0 28px rgba(98, 210, 246, 0.085));
  }
}

@keyframes homeLiquidDrift {
  0% { transform: translate3d(-1.5%, -1%, 0) scale(1.02); }
  100% { transform: translate3d(1.5%, 1%, 0) scale(1.06); }
}

@keyframes homeSheenDrift {
  0% { transform: translate3d(-4%, 0, 0); opacity: 0.24; }
  100% { transform: translate3d(4%, -1%, 0); opacity: 0.38; }
}

@media (prefers-reduced-motion: reduce) {
  .home-mode .main,
  .home-mode .main::before,
  .home-mode .main::after,
  .module-visual {
    animation: none;
  }
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.metric, .panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metric { padding: 16px; display: grid; gap: 4px; }
.metric span, small, .detail-body, .asset-folder small, .content-lanes p, .review-board p { color: var(--muted); }
.metric strong { font-size: 27px; }

.dashboard-grid, .section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(290px, 0.8fr);
  gap: 12px;
  margin-bottom: 12px;
}

.panel { padding: 16px; margin-bottom: 12px; }
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.panel-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.timeline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.step {
  min-height: 124px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  align-content: start;
}
.step b { color: var(--teal); }
.step.done { border-color: #8fc7a9; background: #f0f8f3; }
.step.running { border-color: #d9b26c; background: #fff8ea; }

.work-main-flow-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.work-flow-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 9px;
  background: #fbfcfb;
  min-width: 0;
  align-content: start;
}

.work-flow-head,
.work-flow-statuses,
.work-flow-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.work-flow-head {
  justify-content: space-between;
}

.work-flow-head b {
  color: var(--teal);
}

.work-flow-card h3 {
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
}

.work-flow-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.work-action-grid button {
  display: grid;
  gap: 5px;
  text-align: left;
  align-content: start;
  min-height: 78px;
}

.work-action-grid button strong,
.work-action-grid button small {
  display: block;
}

.work-action-grid button small {
  color: var(--muted);
}

.quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.segmented { display: flex; gap: 6px; flex-wrap: wrap; }
.segmented button { min-height: 32px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 680px; }
th, td { padding: 12px 10px; border-top: 1px solid var(--line); text-align: left; }
th { color: var(--muted); font-size: 13px; }
.badge, .status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  background: #ecf3ef;
  color: var(--green);
  font-size: 12px;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.summary-pill {
  min-height: 68px;
  display: grid;
  align-content: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 10px 12px;
}

.summary-pill span {
  color: var(--muted);
  font-size: 12px;
}

.summary-pill strong {
  font-size: 22px;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fbfcfb;
}

.switch input {
  width: 18px;
  height: 18px;
}

.upload-preview-list {
  display: grid;
  gap: 10px;
}

.upload-preview-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfb;
}

.preview-main {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.preview-main strong,
.preview-main small,
.preview-main p {
  overflow-wrap: anywhere;
}

.preview-main p {
  margin-bottom: 0;
  color: var(--muted);
}

.preview-main .path-line {
  font-size: 12px;
  color: var(--teal);
  background: #eef5f4;
  border-radius: 6px;
  padding: 4px 8px;
}

.queue-preview-secondary {
  margin-top: 18px;
  border-style: dashed;
}

.tag-archive {
  display: inline-flex;
  align-items: center;
  align-self: start;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  background: #fff5df;
  color: var(--amber);
}

.tag-archive.off {
  background: #ecf3ef;
  color: var(--green);
}

.block-reason {
  font-size: 12px;
  color: var(--red);
  margin-bottom: 0;
}

.block-reason.ok {
  color: var(--muted);
}




/* COMPANY-PROFILE-ZHANG6-20260725 §4: 身份卡严格两行；第二行角色可省略，积分作为整体永不拆行。 */
.account-copy small#sidebarAccountSub {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
  line-height: 1.35;
}
.sidebar-account-role { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-account-separator,
.sidebar-account-points { flex: none; white-space: nowrap; }
/* ======= P1 状态标签与占位入口 ======= */
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.status-pill.ready { background: #ecf3ef; color: var(--green); }
.status-pill.review { background: #fff5df; color: var(--amber); }
.status-pill.pending { background: #eceeed; color: #68736f; }
.status-pill.internal { background: #e8f4f2; color: var(--teal); }
.status-pill.static { background: #f1eee6; color: #766a54; }
.status-pill.blocked { background: #fff0ef; color: #b24b45; }
.status-pill.warn { background: #fff8ea; color: #b47a28; }
.status-pill.urgent { background: #fff0ef; color: #b24b45; }

.module-status {
  display: grid;
  justify-items: end;
  gap: 4px;
  max-width: 148px;
}

.module-status small {
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

.placeholder-note {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: #856404;
  background: #fff3cd;
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 12px;
  font-size: 13px;
}

.static-grid .case-card,
.static-grid.content-lanes div,
.review-board.static-grid article {
  cursor: default;
  box-shadow: none;
}

.static-grid .case-card:hover,
.static-grid.content-lanes div:hover,
.review-board.static-grid article:hover {
  border-color: var(--line);
}

.settings-list.static-grid {
  opacity: 0.78;
}

.settings-list.static-grid label {
  cursor: default;
  justify-content: space-between;
  gap: 8px;
}

.settings-list.static-grid input:disabled {
  cursor: not-allowed;
}

.primary-action:disabled {
  background: #c9d2cd;
  border-color: #c9d2cd;
  color: #6f7a76;
  cursor: not-allowed;
}

/* ======= 半自动宣传图 ======= */
.rule-hint {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.6;
  background: #e8f4f2;
  color: var(--teal);
  border: 1px solid #c4e0da;
}

.rule-hint.warn {
  background: #fff8ea;
  color: var(--amber);
  border-color: #f5d6a0;
}

.rule-hint.danger {
  background: #fff0ef;
  color: var(--red);
  border-color: #f5c6c2;
}

.task-draft-preview {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fafbfc;
  font-size: 13px;
  display: none;
  gap: 6px;
}

.task-draft-preview.show { display: grid; }

.task-draft-preview .draft-field {
  display: flex;
  gap: 8px;
  align-items: baseline;
}

.task-draft-preview .draft-label {
  color: var(--muted);
  min-width: 100px;
  text-align: right;
  font-size: 12px;
}

.task-draft-preview .draft-value {
  font-weight: 600;
}

.task-draft-preview .draft-actions {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.draft-actions button { width: auto; }

/* ======= 发布回填表格 ======= */
#publishRecordsBody td { font-size: 12px; }

.publish-msg {
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 6px;
}

.publish-msg.ok { background: #f0faf7; color: var(--green); }
.publish-msg.warn { background: #fff8ee; color: var(--amber); }

.publish-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.publish-status-grid div {
  min-height: 76px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 10px 12px;
  display: grid;
  gap: 3px;
  align-content: center;
}

.publish-status-grid span,
.publish-status-grid small {
  color: var(--muted);
  font-size: 12px;
}

.publish-status-grid strong {
  font-size: 24px;
}

.technical-details {
  margin-top: 10px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 10px 12px;
}

.technical-details summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 700;
}

.technical-details .form-grid {
  margin-top: 10px;
}

.field-note {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.preview-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.project-list-head {
  align-items: flex-start;
}

.project-dashboard-shell {
  display: grid;
  gap: 14px;
}

.project-dashboard-tools {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.72fr);
  gap: 12px;
  align-items: center;
}

.project-reference-topbar {
  min-height: 72px;
  padding: 12px 14px;
  border: 1px solid rgba(126, 211, 242, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025) 44%, rgba(54, 185, 226, 0.06)),
    rgba(7, 23, 35, 0.86);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 18px 48px rgba(0, 14, 28, 0.22);
}

.project-dashboard-title {
  font-size: 22px;
  line-height: 1.18;
  margin: 0;
  white-space: nowrap;
}

.project-ai-style-topbar .project-dashboard-title {
  color: #eefbff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.24);
}

.project-dashboard-titleblock {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.project-dashboard-titleblock small {
  color: rgba(205, 226, 232, 0.72);
  font-size: 12px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-dashboard-brand-group {
  display: contents;
}

.project-brand-title {
  width: 250px;
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(48, 125, 93, 0.2);
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #f2f7f4 56%, #ecf4ef 100%);
  box-shadow: 0 10px 24px rgba(30, 66, 53, 0.06);
}

.project-brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #163b30;
  background: linear-gradient(135deg, #e7bf73, #f5dfad);
  font-weight: 900;
  letter-spacing: 0;
}

.project-brand-title small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 1.4px;
}

.project-brand-title > div {
  min-width: 160px;
}

.project-time-card {
  width: 136px;
  min-height: 58px;
  padding: 7px 11px 7px 12px;
  border: 1px solid rgba(61, 132, 105, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(232, 244, 238, 0.72)),
    radial-gradient(circle at 20% 16%, rgba(255, 255, 255, 0.96), transparent 34%),
    linear-gradient(90deg, rgba(20, 92, 70, 0.08), transparent 48%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 10px 24px rgba(18, 76, 58, 0.08);
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "date week"
    "time time";
  column-gap: 8px;
  align-items: center;
}

.project-live-clock span,
.project-live-clock strong,
.project-live-clock em {
  display: block;
  white-space: nowrap;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.project-clock-date {
  grid-area: date;
  color: #526b60;
  font-size: 11px;
  line-height: 1;
  font-weight: 800;
}

.project-clock-week {
  grid-area: week;
  color: #1d765a;
  font-size: 11px;
  line-height: 1;
  font-style: normal;
  font-weight: 900;
}

.project-clock-time {
  grid-area: time;
  color: #123f32;
  font-size: 24px;
  line-height: 1;
  font-weight: 900;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.project-dashboard-tool-group {
  justify-self: end;
  width: min(100%, 940px);
  max-width: 940px;
  display: grid;
  grid-template-columns: auto auto auto 34px auto;
  gap: 8px;
  align-items: center;
}

.project-dashboard-topbar {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.project-dashboard-topbar h2 {
  font-size: 24px;
  margin-bottom: 4px;
}

.project-dashboard-actions {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.project-toolbar {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.project-category-filter {
  min-width: 190px;
  color: var(--muted);
  font-size: 12px;
}

.project-account-switcher {
  min-width: 150px;
  color: var(--muted);
  font-size: 12px;
}

.project-filter-chip {
  min-width: 120px;
}

.project-category-filter select {
  min-width: 190px;
}

.project-account-switcher select {
  min-width: 150px;
}

.project-filter-chip select,
.project-time-filter select {
  width: 100%;
  min-width: 0;
}

.project-time-filter {
  position: relative;
}

.project-time-filter > span[aria-hidden="true"] {
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.project-time-filter select {
  padding-right: 30px;
}

.project-hidden-filter {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.project-alert-button {
  position: relative;
  width: 34px;
  height: 40px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  display: grid;
  place-items: center;
  font-weight: 800;
}

.project-alert-button b {
  position: absolute;
  top: 2px;
  right: 3px;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #ef5a4f;
  color: #fff;
  font-size: 10px;
  line-height: 1;
}

.project-user-menu {
  height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}

.project-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #efe3d0;
  color: #203d35;
  font-weight: 800;
  flex: 0 0 auto;
}

.project-user-menu select {
  width: 104px;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0 18px 0 0;
  color: var(--ink);
  font-weight: 700;
}

.project-panorama-production-entry {
  border: 1px solid rgba(126, 211, 242, 0.24);
  border-radius: 8px;
  padding: 3px 10px 3px 5px;
  background: rgba(2, 17, 28, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.project-panorama-production-entry .project-user-avatar {
  width: 28px;
  height: 28px;
  background: linear-gradient(145deg, #f2ddaa, #8fd3f4);
  color: #10202a;
  font-size: 13px;
}

.project-panorama-production-entry button {
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
  white-space: nowrap;
}

.project-panorama-production-entry:hover,
.project-panorama-production-entry:focus-within {
  border-color: rgba(126, 211, 242, 0.68);
  box-shadow: 0 0 0 2px rgba(67, 192, 232, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.project-panorama-production-entry.is-permission-disabled {
  border-color: rgba(145, 164, 174, 0.18);
  box-shadow: none;
  opacity: 0.58;
}

.project-panorama-production-entry button[aria-disabled="true"] {
  cursor: not-allowed;
}

.project-reference-topbar #newProjectBtn {
  padding-inline: 12px;
  white-space: nowrap;
}

.project-ai-style-topbar .project-filter-chip,
.project-ai-style-topbar .project-user-menu,
.project-ai-style-topbar .project-alert-button {
  border: 1px solid rgba(126, 211, 242, 0.22);
  background: rgba(2, 17, 28, 0.52);
  color: rgba(235, 248, 252, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.project-ai-style-topbar .project-filter-chip select,
.project-ai-style-topbar .project-user-menu select {
  color: rgba(235, 248, 252, 0.94);
}

.project-ai-style-topbar .project-time-filter > span[aria-hidden="true"] {
  color: rgba(175, 218, 230, 0.76);
}

.project-ai-style-topbar .project-user-avatar {
  background: rgba(245, 223, 173, 0.9);
  color: #17364a;
}

.project-ai-style-topbar #newProjectBtn {
  height: 36px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 8px 18px rgba(24, 120, 93, 0.22);
}

.project-kpi-strip {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.project-kpi-card {
  min-height: 106px;
  padding: 18px;
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 14px;
  align-items: center;
  width: 100%;
  border: 0;
  border-right: 1px dashed var(--line);
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.project-kpi-card:last-child {
  border-right: 0;
}

.project-kpi-card:hover,
.project-kpi-card:focus-visible,
.project-kpi-card.selected {
  background: #fbfffc;
}

.project-kpi-card:hover {
  transform: translateY(-1px);
}

.project-kpi-card:focus-visible {
  outline: 2px solid rgba(47, 125, 95, 0.28);
  outline-offset: -2px;
}

.project-kpi-card.selected {
  box-shadow: inset 0 -3px 0 var(--green);
}

.project-kpi-card > span {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 24px;
  background: #edf6f0;
  color: var(--green);
}

.project-kpi-card.amber > span,
.project-kpi-card.gold > span {
  background: #fff7e6;
  color: var(--amber);
}

.project-kpi-card small,
.project-kpi-card em {
  display: block;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.project-kpi-card strong {
  display: block;
  font-size: 25px;
  line-height: 1.1;
  margin: 4px 0;
}

.project-dashboard-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.54fr) minmax(0, 3fr);
  gap: 14px;
  align-items: stretch;
  min-height: calc(100vh - 158px);
}

.project-list-panel,
.project-cockpit-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.project-list-panel {
  padding: 12px 12px 0;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  max-height: calc(100vh - 158px);
  overflow: hidden;
}

.project-list-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 4px 4px 12px;
}

.project-list-title > strong {
  flex: 0 0 auto;
}

.project-list-tools {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  min-width: 0;
}

.project-list-type-filter {
  width: 72px;
  height: 30px;
  flex: 0 0 72px;
  border: 1px solid rgba(126, 211, 242, 0.2);
  border-radius: 8px;
  background: rgba(2, 17, 28, 0.32);
  overflow: hidden;
}

.project-list-type-filter select {
  width: 100%;
  height: 100%;
  min-width: 0;
  border: 0;
  padding: 0 18px 0 7px;
  background: transparent;
  color: rgba(235, 248, 252, 0.9);
  font-size: 12px;
  font-weight: 700;
}

.project-list-tools small {
  min-width: 34px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(126, 211, 242, 0.2);
  border-radius: 8px;
  padding: 0 6px;
  background: rgba(2, 17, 28, 0.32);
  color: rgba(205, 226, 232, 0.78);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.project-list-stack {
  grid-template-columns: 1fr;
  gap: 12px;
  flex: 1;
  align-content: start;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
}

.project-list-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: auto -12px 0;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 92%, #eef4ef);
}

.project-list-pager small {
  color: var(--muted);
  white-space: nowrap;
}

.project-list-page-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.project-list-page-controls button {
  width: 30px;
  height: 30px;
  min-height: 30px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0;
  background: transparent;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}

.project-list-page-controls button:hover:not(:disabled),
.project-list-page-controls button.active {
  border-color: rgba(22, 107, 74, 0.35);
  background: #eef8f2;
  color: var(--green);
}

.project-list-page-controls button:disabled {
  color: #b4bcb8;
  cursor: default;
}

.project-list, .asset-grid, .review-board, .content-lanes, .case-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.project-card, .asset-folder, .review-board article, .content-lanes div, .case-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfb;
}
.project-list-stack.project-list {
  grid-template-columns: 1fr;
  gap: 12px;
}

.project-list-stack.project-list.project-list-stack-fill {
  grid-auto-rows: 84px;
}

.project-list-stack-fill .project-card {
  height: 84px;
}

.project-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: minmax(0, 1fr) auto;
  column-gap: 10px;
  row-gap: 6px;
  height: 84px;
  min-height: 84px;
  max-height: 84px;
  padding: 10px 10px;
  text-align: left;
  align-items: center;
  cursor: pointer;
  overflow: hidden;
}
.project-card.selected { border-color: var(--green); box-shadow: inset 3px 0 0 var(--green); }
.project-card-main {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.project-card-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
}
.project-card-main strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
  line-height: 1.25;
}
.project-card-time {
  max-width: 84px;
  font-size: 11px;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}
.project-card-time.overdue { color: #b83d35; font-weight: 600; }
.project-card-progress-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}
.project-card-progress-row small { min-width: 36px; font-size: 11px; text-align: right; color: var(--muted); }
.project-card-progress {
  height: 4px;
  border-radius: 999px;
  background: #e8ece9;
  overflow: hidden;
}
.project-card-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}
.project-empty-state {
  grid-column: 1 / -1;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #fbfcfb;
  display: grid;
  gap: 6px;
}
.project-cockpit-panel {
  padding: 14px;
}
.project-cockpit-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 14px;
  padding: 10px 10px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fff, #fbfdfb);
  border-radius: 8px 8px 0 0;
}
.project-cockpit-titleblock {
  min-width: 0;
  display: grid;
  gap: 7px;
}
.project-cockpit-head h3 {
  font-size: 21px;
  margin: 0;
}
.project-cockpit-head h3 span,
.project-cockpit-head p {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 5px;
}
.project-cockpit-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}
.project-cockpit-meta span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.project-cockpit-meta span + span::before {
  content: "";
  display: inline-block;
  width: 1px;
  height: 11px;
  margin-right: 8px;
  background: var(--line);
  vertical-align: -1px;
}
.project-cockpit-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  min-width: 300px;
}
.project-cockpit-actions .review-action {
  border-color: #edc779;
  color: #9a6b00;
  background: #fff9ea;
}
.project-cockpit-actions .task-action {
  border-color: rgba(62, 126, 101, 0.28);
  color: var(--green);
  background: #f3faf6;
  font-weight: 800;
  min-width: 52px;
}
.project-cockpit-actions .more-action {
  min-width: 36px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
}
.project-cockpit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  grid-auto-flow: dense;
  align-items: stretch;
  margin-top: 12px;
}
.project-cockpit-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  min-height: 150px;
  background: #fff;
  display: grid;
  gap: 10px;
  align-content: stretch;
}

.project-cockpit-card[data-project-module-card="contentLibrary"] {
  grid-column: 1 / -1;
  min-height: 142px;
}

.project-cockpit-card[data-project-module-card="contentLibrary"] .project-content-library-panel {
  min-height: 92px;
}

.project-cockpit-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}
.project-cockpit-card-head strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-dashboard-material-workbench {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)),
    var(--surface);
  display: grid;
  gap: 12px;
}

.project-dashboard-material-workbench .project-dashboard-panel {
  min-height: min(62vh, 610px);
  max-height: min(64vh, 660px);
}

.project-dashboard-workbench-head,
.project-dashboard-panel-head,
.project-dashboard-bottom-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.project-dashboard-panel-actions,
.project-todo-summary-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.project-dashboard-workbench-head strong,
.project-dashboard-panel-head strong,
.project-dashboard-bottom-head strong {
  font-size: 16px;
}

.project-dashboard-workbench-head small,
.project-dashboard-panel-head small,
.project-dashboard-bottom-head small {
  color: var(--muted);
}

.project-dashboard-tab-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.project-dashboard-tab {
  min-height: 66px;
  border: 1px solid rgba(57, 128, 104, 0.22);
  border-radius: 8px;
  padding: 10px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.01)),
    color-mix(in srgb, var(--surface) 92%, #eef7f2);
  color: inherit;
  text-align: left;
  display: grid;
  gap: 4px;
  align-content: center;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.project-dashboard-tab:hover,
.project-dashboard-tab:focus-visible,
.project-dashboard-tab.selected {
  border-color: rgba(80, 205, 231, 0.58);
  box-shadow: inset 0 0 0 1px rgba(80, 205, 231, 0.2), 0 10px 24px rgba(16, 94, 110, 0.14);
}

.project-dashboard-tab:hover {
  transform: translateY(-1px);
}

.project-dashboard-tab strong,
.project-dashboard-tab span,
.project-dashboard-tab small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-dashboard-tab strong {
  font-size: 14px;
}

.project-dashboard-tab span,
.project-dashboard-tab small {
  color: var(--muted);
  font-size: 12px;
}

.project-dashboard-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: color-mix(in srgb, var(--surface) 96%, #f2f8f5);
  min-height: 360px;
  max-height: min(52vh, 480px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
}

.project-dashboard-panel--ai {
  grid-template-rows: minmax(0, 1fr);
}

.project-dashboard-panel--ai > .project-dashboard-panel-head {
  display: none;
}

.project-dashboard-panel-body {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
}

.project-dashboard-panel-body > * {
  height: 100%;
}

.project-dashboard-panel-body .project-mini-assets {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: minmax(112px, auto);
}

.project-site-folder-detail {
  display: grid;
  gap: 12px;
  align-content: start;
}

.project-site-folder-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 14px;
  align-content: start;
}

.project-site-folder-grid-empty {
  min-height: 100%;
}

.project-site-folder-card {
  aspect-ratio: 4 / 3;
  min-height: 0;
  align-self: start;
  border: 1px solid rgba(126, 211, 242, 0.24);
  border-radius: 8px;
  padding: 14px 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015)),
    rgba(5, 20, 31, 0.72);
  color: inherit;
  text-align: left;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: minmax(0, 1fr) auto auto;
  gap: 8px 12px;
  cursor: pointer;
  overflow: hidden;
}

.project-site-folder-card:hover,
.project-site-folder-card:focus-visible,
.project-site-folder-card.is-drag-target,
.project-site-folder-card.is-file-drop-target,
.project-site-folder-library.is-file-drop-target,
.project-site-folder-grid.is-file-drop-target,
.project-design-folder-library.is-file-drop-target,
.project-design-folder-grid.is-file-drop-target {
  border-color: rgba(80, 205, 231, 0.58);
  box-shadow: inset 0 0 0 1px rgba(80, 205, 231, 0.16), 0 12px 26px rgba(0, 14, 28, 0.22);
  outline: none;
}

.project-site-folder-stack {
  grid-column: 1 / -1;
  grid-row: 1;
  position: relative;
  width: min(64%, 152px);
  height: clamp(68px, 5vw, 90px);
  display: block;
  align-self: center;
  justify-self: center;
}

.project-site-folder-thumb,
.project-site-folder-empty-thumb {
  position: absolute;
  width: 82%;
  height: 84%;
  left: calc(50% - 41% + var(--stack-index, 0) * 9px);
  top: calc(50% - 42% + var(--stack-index, 0) * 5px);
  border: 2px solid rgba(45, 183, 255, 0.78);
  border-radius: 8px;
  background: rgba(2, 14, 24, 0.74);
  display: grid;
  place-items: center;
  overflow: hidden;
  color: rgba(205, 226, 232, 0.74);
  box-shadow: 0 12px 20px rgba(0, 12, 24, 0.2);
}

.project-site-folder-thumb img,
.project-site-photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-site-folder-card strong,
.project-site-folder-card small,
.project-site-folder-card em {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-site-folder-card strong {
  grid-column: 1 / -1;
  grid-row: 2;
  align-self: end;
  font-size: clamp(20px, 1.35vw, 28px);
  line-height: 1.18;
  color: rgba(238, 250, 252, 0.96);
}

.project-site-folder-card small,
.project-site-folder-card em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.project-site-folder-card small {
  grid-column: 2;
  grid-row: 3;
  justify-self: end;
}

.project-site-folder-card em {
  grid-column: 1;
  grid-row: 3;
  justify-self: start;
}

.project-site-folder-library {
  display: grid;
  gap: 12px;
}

.project-site-folder-library-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(2, 17, 28, 0.5);
}

.project-site-folder-library-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.project-site-folder-library-actions .danger-action:not(:disabled) {
  border-color: rgba(255, 112, 112, 0.46);
  color: #ffd1d1;
}

.project-site-folder-library-actions .danger-action:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  filter: saturate(0.5);
}

.project-site-folder-library-head strong,
.project-site-folder-library-head small {
  display: block;
}

.project-site-folder-library-head small {
  color: var(--muted);
}

.project-site-folder-library-layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 12px;
  min-height: 420px;
}

.project-site-folder-library-layout--single {
  grid-template-columns: minmax(0, 1fr);
  min-height: min(62vh, 620px);
}

.project-site-folder-grid--library {
  grid-auto-rows: minmax(110px, auto);
}

.project-site-folder-nav {
  display: grid;
  align-content: start;
  gap: 8px;
}

.project-site-folder-nav button {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(2, 17, 28, 0.36);
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.project-site-folder-nav button.active,
.project-site-folder-nav button:hover {
  border-color: rgba(80, 205, 231, 0.55);
  background: rgba(37, 84, 101, 0.34);
}

.project-site-folder-nav strong,
.project-site-folder-nav small {
  display: block;
}

.project-site-folder-nav small {
  color: var(--muted);
  font-size: 12px;
}

.project-site-photo-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 14px;
  align-content: start;
}

.project-site-photo-card {
  border: 1px solid rgba(126, 211, 242, 0.22);
  border-radius: 8px;
  padding: 8px;
  background: rgba(2, 17, 28, 0.38);
  color: inherit;
  display: grid;
  gap: 8px;
  text-align: left;
  cursor: pointer;
}

.project-site-file-card {
  min-height: 110px;
  aspect-ratio: 4 / 3;
  grid-template-rows: minmax(0, 1fr) auto;
  align-content: stretch;
  overflow: hidden;
}

.project-site-photo-card span {
  aspect-ratio: 4 / 3;
  min-height: 0;
  border-radius: 8px;
  background: #050b10;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.project-site-photo-card small {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.project-site-folder-create {
  width: min(420px, calc(100vw - 36px));
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(126, 211, 242, 0.28);
  border-radius: 8px;
  background: rgba(5, 20, 31, 0.86);
}

.project-site-folder-create label {
  display: grid;
  gap: 6px;
  color: rgba(231, 246, 250, 0.92);
  font-weight: 800;
}

.project-site-folder-create input {
  min-height: 38px;
  border: 1px solid rgba(126, 211, 242, 0.28);
  border-radius: 8px;
  padding: 0 10px;
  background: rgba(2, 17, 28, 0.72);
  color: inherit;
}

.project-site-folder-create small {
  color: var(--muted);
}

.project-site-folder-create-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

@media (max-width: 1500px) {
  .project-site-folder-grid,
  .project-site-photo-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .project-site-folder-grid,
  .project-site-photo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.project-dashboard-bottom-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px 148px;
  gap: 12px;
  align-items: stretch;
}

.project-dashboard-bottom-card,
.project-dashboard-bottom-entry {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015)),
    var(--surface);
  min-height: 106px;
}

.project-dashboard-bottom-card {
  padding: 14px 16px;
  display: grid;
  gap: 12px;
}

.project-dashboard-bottom-card--construction {
  align-content: start;
  min-height: 138px;
}

.project-dashboard-bottom-entry {
  padding: 14px;
  color: inherit;
  text-align: left;
  display: grid;
  align-content: center;
  gap: 8px;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.project-dashboard-bottom-entry:hover,
.project-dashboard-bottom-entry:focus-visible {
  border-color: rgba(80, 205, 231, 0.58);
  box-shadow: inset 0 0 0 1px rgba(80, 205, 231, 0.18), 0 10px 24px rgba(16, 94, 110, 0.14);
  transform: translateY(-1px);
}

.project-dashboard-bottom-entry strong {
  font-size: 16px;
}

.project-dashboard-bottom-entry span {
  color: var(--muted);
  font-size: 12px;
}

.project-dashboard-bottom-entry--selection {
  min-height: 122px;
  align-self: stretch;
  text-align: center;
  justify-items: center;
}

.project-dashboard-bottom-entry--task {
  min-height: 122px;
  text-align: center;
  justify-items: stretch;
  align-content: start;
  padding-top: 18px;
}

.project-dashboard-bottom-entry--task strong {
  font-size: 22px;
  line-height: 1.1;
}

.project-dashboard-bottom-entry--task.is-overdue {
  border-color: rgba(239, 91, 91, 0.44);
  background:
    linear-gradient(145deg, rgba(126, 24, 24, 0.18), rgba(255, 255, 255, 0.02)),
    var(--surface);
}

.project-task-shortcut-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  color: inherit;
  margin-top: 8px;
}

.project-task-shortcut-metrics b {
  display: grid;
  gap: 6px;
  justify-items: center;
  font-style: normal;
}

.project-task-shortcut-metrics em {
  color: #ff6f65;
  font-size: 19px;
  line-height: 1;
  font-style: normal;
  font-weight: 900;
}

.project-task-shortcut-metrics b:last-child em {
  color: #f2d27a;
}

.project-task-shortcut-metrics small {
  color: var(--muted);
  font-size: 11px;
}
.project-quote-case-summary,
.project-quote-case-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.65fr);
  gap: 12px;
  align-items: stretch;
}

.project-quote-case-panel,
.project-quote-case-detail > section {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)),
    color-mix(in srgb, var(--surface) 96%, #f2f8f5);
  display: grid;
  gap: 10px;
  align-content: start;
}

.project-case-library-mini,
.project-case-library-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.04);
  display: grid;
  gap: 6px;
  min-width: 0;
}

.project-case-library-mini span {
  min-height: 92px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(126, 211, 242, 0.12), rgba(47, 125, 95, 0.08));
  color: var(--green);
  font-weight: 800;
}

.project-case-library-list {
  display: grid;
  gap: 8px;
}

.project-case-library-row span {
  width: fit-content;
  border-radius: 6px;
  padding: 3px 7px;
  background: #fff5df;
  color: var(--amber);
  font-size: 12px;
}
.tiny {
  min-height: 28px;
  padding: 0 8px;
  font-size: 12px;
}
.project-info-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  margin: 0;
}
.project-info-list div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
}
.project-info-list dt {
  color: var(--muted);
}
.project-info-list dd {
  margin: 0;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.project-customer-summary {
  display: grid;
  gap: 8px;
  margin: 0;
}
.project-customer-row {
  display: grid;
  grid-template-columns: minmax(116px, 0.34fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  min-width: 0;
}
.project-customer-row dt {
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.project-customer-row dt span {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #eef6f1;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  flex: 0 0 auto;
}
.project-customer-row dd {
  margin: 0;
  color: var(--ink);
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.project-mini-assets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
}
.project-mini-assets figure,
.project-mini-asset-card,
.project-placeholder-asset-card,
.project-upload-slot {
  min-height: 86px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fafafa;
}
.project-mini-asset-card {
  padding: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  display: grid;
  align-content: start;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}
.project-mini-asset-card:hover,
.project-mini-asset-card:focus-visible {
  border-color: var(--green);
  box-shadow: 0 10px 22px rgba(22, 107, 74, 0.11);
  outline: none;
  transform: translateY(-1px);
}
.project-mini-asset-action-card {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  cursor: default;
}
.project-mini-asset-preview-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  display: grid;
  align-content: start;
  min-width: 0;
}
.project-ai-material-action {
  border: 0;
  border-top: 1px solid var(--line);
  min-height: 28px;
  padding: 5px 6px;
  background: #f6faf7;
  color: var(--green-dark);
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.project-ai-material-action:hover,
.project-ai-material-action:focus-visible {
  background: #e7f4ec;
  outline: none;
}
.project-ai-material-action.selected {
  background: #e8f4f2;
  color: var(--teal);
}
.project-placeholder-asset-card {
  padding: 0;
  display: grid;
  align-content: start;
  color: var(--muted);
  background: #fbfcfb;
}
.project-placeholder-asset-card .project-mini-asset-preview {
  background: linear-gradient(180deg, #eef3f0, #f8faf8);
  color: #6d7a75;
}
.project-mini-assets img,
.project-mini-assets figure > span,
.project-mini-asset-preview {
  width: 100%;
  aspect-ratio: 1.7;
  display: grid;
  place-items: center;
  object-fit: cover;
  background: #edf1ee;
  color: var(--green);
  font-weight: 700;
}
.project-mini-asset-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.project-mini-assets figcaption {
  padding: 6px;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.project-mini-asset-name {
  display: block;
  padding: 6px;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.project-upload-slot {
  display: grid;
  place-items: center;
  align-content: center;
  border-style: dashed;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  text-align: center;
  transition: 0.16s ease;
}
.project-upload-slot b {
  font-size: 24px;
  color: var(--ink);
}
.project-upload-slot small {
  color: var(--muted);
  font-size: 11px;
}
.project-upload-slot:hover {
  border-color: var(--green);
  color: var(--green);
  background: #f2faf5;
}
.project-upload-slot.drag-over {
  border-color: var(--green);
  background: #eaf7ef;
  box-shadow: inset 0 0 0 2px rgba(22, 107, 74, 0.18), 0 12px 26px rgba(22, 107, 74, 0.12);
  color: var(--green-dark);
}

.project-materials-panel {
  display: grid;
  gap: 12px;
}
.project-materials-section {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.project-materials-subhead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}
.project-materials-subhead span {
  color: var(--ink);
  font-weight: 800;
}
.project-materials-subhead em {
  font-style: normal;
  border-radius: 999px;
  padding: 3px 8px;
  background: #edf7f0;
  color: var(--green);
}
.project-materials-panel .project-mini-assets {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.project-materials-panel .project-mini-assets .project-upload-slot {
  min-height: 78px;
}
.project-materials-detail {
  display: grid;
  gap: 14px;
}
.project-materials-detail section {
  display: grid;
  gap: 10px;
}
.project-materials-detail h4 {
  margin: 0;
  font-size: 15px;
}
.project-marketing-materials-view,
.project-marketing-materials-list { display: grid; gap: 12px; min-width: 0; }
.project-marketing-materials-tools,
.project-marketing-materials-pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.project-marketing-material-row {
  display: grid; gap: 4px; width: 100%; min-width: 0; padding: 12px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); color: inherit; text-align: left;
}
.project-marketing-material-row strong,
.project-marketing-material-row small { overflow-wrap: anywhere; }
.project-marketing-material-row small,
.project-marketing-legacy-drafts small { color: var(--muted); }
.project-marketing-legacy-drafts {
  display: grid; gap: 8px; padding: 14px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface);
}
.project-marketing-legacy-drafts > div { display: flex; flex-wrap: wrap; gap: 10px; }
.project-materials-rework-summary,
.project-materials-detail-rework {
  min-height: 320px;
}
.project-material-rework-grid {
  display: grid;
  grid-template-columns: 1.05fr 1.25fr 1.2fr 2.15fr;
  gap: 12px;
  align-items: stretch;
  min-height: 320px;
}
.project-material-handoff-panel,
.project-material-finance-panel,
.project-material-cad-panel,
.project-material-selection-panel {
  min-width: 0;
  width: 100%;
  border: 1px solid rgba(80, 205, 231, 0.26);
  border-radius: 8px;
  background:
    radial-gradient(circle at 15% 0%, rgba(80, 205, 231, 0.10), transparent 30%),
    linear-gradient(180deg, rgba(18, 39, 51, 0.96), rgba(8, 25, 35, 0.98));
  color: rgba(235, 248, 252, 0.92);
  padding: 12px;
  display: grid;
  gap: 12px;
  align-content: start;
  text-align: left;
}
.project-material-handoff-panel,
.project-material-cad-panel {
  cursor: pointer;
  font: inherit;
}
.project-material-handoff-panel:hover,
.project-material-cad-panel:hover,
.project-material-selection-card:hover,
.project-material-finance-file:hover,
.project-material-payment-card:hover {
  border-color: rgba(80, 205, 231, 0.68);
  box-shadow: 0 0 0 1px rgba(80, 205, 231, 0.08), 0 12px 26px rgba(0, 0, 0, 0.20);
}
.project-material-rework-card-head,
.project-material-modal-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.project-material-rework-card-head strong,
.project-material-modal-section-head strong {
  color: rgba(245, 252, 255, 0.96);
  font-size: 14px;
}
.project-material-rework-card-head small,
.project-material-modal-section-head small {
  color: rgba(176, 216, 226, 0.78);
}
.project-material-handoff-list,
.project-material-cad-list {
  display: grid;
  gap: 9px;
}
.project-material-handoff-list span,
.project-material-cad-list span {
  min-height: 30px;
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
  border-bottom: 1px solid rgba(80, 205, 231, 0.10);
  padding-bottom: 7px;
}
.project-material-handoff-list b,
.project-material-cad-list b {
  color: #62d5ef;
  font-weight: 900;
}
.project-material-handoff-list em,
.project-material-cad-list em {
  min-width: 0;
  color: rgba(235, 248, 252, 0.78);
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-material-finance-files {
  display: grid;
  gap: 10px;
}
.project-material-finance-file {
  min-height: 68px;
  border: 1px solid rgba(80, 205, 231, 0.26);
  border-radius: 6px;
  background: rgba(4, 20, 30, 0.48);
  color: inherit;
  padding: 10px 12px;
  display: grid;
  gap: 3px;
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.project-material-finance-file span {
  color: #62d5ef;
  font-size: 12px;
  font-weight: 900;
}
.project-material-finance-file strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-material-finance-file small {
  color: rgba(176, 216, 226, 0.78);
}
.project-material-payment-strip,
.project-material-payment-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.project-material-payment-label {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(80, 205, 231, 0.18);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.project-material-payment-label strong {
  color: rgba(245, 252, 255, 0.96);
  font-size: 14px;
}
.project-material-payment-label small {
  color: rgba(176, 216, 226, 0.72);
}
.project-material-payment-card {
  min-height: 72px;
  border: 1px solid rgba(80, 205, 231, 0.22);
  border-radius: 6px;
  background: rgba(3, 18, 28, 0.52);
  color: inherit;
  padding: 8px;
  display: grid;
  gap: 4px;
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.project-material-payment-card strong {
  color: rgba(245, 252, 255, 0.96);
}
.project-material-payment-card span {
  color: #a9f0c4;
  font-size: 12px;
  font-weight: 900;
}
.project-material-payment-card.pending span {
  color: #ffc84d;
}
.project-material-payment-card small {
  color: rgba(176, 216, 226, 0.78);
}
.project-material-empty-inline {
  min-height: 72px;
  border: 1px dashed rgba(80, 205, 231, 0.24);
  border-radius: 6px;
  color: rgba(176, 216, 226, 0.76);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 14px;
  background: rgba(2, 17, 26, 0.42);
}
.project-material-empty-inline.compact {
  min-height: 96px;
}
.project-material-selection-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-content: start;
}
.project-material-selection-card {
  min-height: 148px;
  border: 1px solid rgba(80, 205, 231, 0.24);
  border-radius: 8px;
  background: rgba(3, 18, 28, 0.50);
  color: inherit;
  padding: 10px;
  display: grid;
  grid-template-rows: 1fr auto auto auto;
  gap: 6px;
  text-align: center;
  cursor: pointer;
  font: inherit;
}
.project-material-selection-thumb {
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid rgba(80, 205, 231, 0.28);
  border-radius: 6px;
  background: rgba(0, 10, 16, 0.56);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.project-material-selection-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.project-material-selection-card strong,
.project-material-selection-card small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-material-selection-card em {
  font-style: normal;
  color: #a9f0c4;
  font-size: 12px;
  font-weight: 900;
}
.project-material-utility-modal .project-module-summary {
  display: none;
}
.project-material-wide-modal .project-modal-dialog {
  width: min(1180px, calc(100vw - 72px));
}
.project-material-compact-modal .project-modal-dialog {
  width: min(640px, calc(100vw - 72px));
}
.project-material-handoff-modal,
.project-material-finance-modal,
.project-material-file-modal,
.project-material-cad-modal,
.project-material-payment-edit,
.project-material-selection-edit {
  display: grid;
  gap: 14px;
}
.project-material-handoff-table {
  display: grid;
  gap: 8px;
}
.project-material-handoff-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 10px;
  border: 1px solid rgba(80, 205, 231, 0.16);
  border-radius: 8px;
  padding: 10px;
  background: rgba(3, 18, 28, 0.42);
}
.project-material-handoff-row.locked {
  border-color: rgba(255, 200, 77, 0.26);
}
.project-material-handoff-row label,
.project-material-payment-edit label,
.project-material-selection-edit label,
.project-material-finance-upload-area label {
  display: grid;
  gap: 6px;
  color: rgba(176, 216, 226, 0.82);
  font-size: 12px;
  font-weight: 800;
}
.project-material-handoff-row input,
.project-material-payment-edit input,
.project-material-payment-edit select,
.project-material-payment-edit textarea,
.project-material-selection-edit input,
.project-material-selection-edit select,
.project-material-selection-edit textarea {
  width: 100%;
  border: 1px solid rgba(80, 205, 231, 0.24);
  border-radius: 7px;
  background: rgba(2, 17, 26, 0.62);
  color: rgba(245, 252, 255, 0.95);
  padding: 8px 10px;
  font: inherit;
}
.project-material-handoff-row input[readonly] {
  color: rgba(176, 216, 226, 0.82);
}
.project-material-handoff-delete,
.project-material-handoff-delete-placeholder {
  align-self: end;
  min-width: 64px;
  min-height: 36px;
}
.project-material-handoff-delete-placeholder {
  display: inline-grid;
  place-items: center;
  color: rgba(176, 216, 226, 0.48);
  font-size: 12px;
}
.project-material-modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
.project-material-finance-upload-area {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.project-material-cad-drop,
.project-material-selection-image-drop {
  min-height: 136px;
  border: 1px dashed rgba(80, 205, 231, 0.34);
  border-radius: 8px;
  background: rgba(2, 17, 26, 0.46);
  color: rgba(176, 216, 226, 0.86);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 16px;
}
.project-material-cad-drop.drag-over,
.project-material-selection-image-drop.drag-over {
  border-color: #62d5ef;
  background: rgba(80, 205, 231, 0.12);
}
.project-material-cad-card-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.project-material-cad-card {
  border: 1px solid rgba(80, 205, 231, 0.22);
  border-radius: 8px;
  background: rgba(3, 18, 28, 0.50);
  padding: 10px;
  display: grid;
  gap: 8px;
}
.project-material-cad-card > button:first-child {
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  padding: 0;
  display: grid;
  gap: 6px;
  cursor: pointer;
  font: inherit;
}
.project-material-cad-card strong,
.project-material-cad-card small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-material-cad-card small {
  color: rgba(176, 216, 226, 0.74);
}
.project-material-selection-edit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.project-material-selection-image-drop {
  cursor: pointer;
}
.project-material-selection-image-drop img {
  max-width: 100%;
  max-height: 280px;
  border-radius: 6px;
  object-fit: contain;
}
.project-material-archive-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.project-material-archive-grid.boss-layout {
  grid-template-areas:
    "construction measurement"
    "retention retention"
    "selection selection";
  align-items: stretch;
}
.project-material-archive-window {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 12px;
  display: grid;
  gap: 10px;
}
.project-material-archive-window.area-construction {
  grid-area: construction;
}
.project-material-archive-window.area-retention {
  grid-area: retention;
}
.project-material-archive-window.area-measurement {
  grid-area: measurement;
}
.project-material-archive-window.area-selection {
  grid-area: selection;
}
.project-material-window-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.project-material-window-tools {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}
.project-material-window-head strong,
.project-material-window-head small {
  display: block;
}
.project-material-window-head small {
  color: var(--muted);
  margin-top: 3px;
}
.project-material-window-search {
  min-width: 136px;
  max-width: 180px;
}
.project-material-window-search input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  background: #fff;
}
.project-material-checklist {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.project-material-checklist span {
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  background: #fff4df;
  color: var(--amber);
  border: 1px solid #f4dec0;
}
.project-material-checklist span.ready {
  background: #edf7f0;
  color: var(--green);
  border-color: #cfe5d6;
}
.project-material-window-list .project-module-record-grid {
  grid-template-columns: 1fr;
}
.project-material-window-body-action {
  justify-self: end;
  align-self: end;
  margin-top: auto;
}
.project-material-archive-window.area-construction .project-material-window-body-action {
  min-width: 92px;
}
.project-material-subwindow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}
.project-material-archive-window.area-selection .project-material-subwindow-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.project-material-archive-window.area-retention .project-material-subwindow-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.project-material-archive-window.area-measurement .project-material-subwindow-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-items: start;
}
.project-material-archive-window.area-measurement .project-material-subwindow {
  padding: 8px;
  gap: 6px;
  align-self: start;
}
.project-material-archive-window.area-measurement .project-material-subwindow-upload {
  min-height: 48px;
  padding: 8px;
}
.project-material-archive-window.area-measurement .project-material-subwindow-plus {
  width: 18px;
  height: 18px;
  font-size: 12px;
}
.project-material-archive-window.area-measurement .project-material-subwindow-title {
  font-size: 12px;
}
.project-material-archive-window.area-measurement .project-material-subwindow-count {
  font-size: 11px;
}
.project-material-archive-window.area-measurement .project-module-record-grid {
  gap: 6px;
}
.project-material-archive-window.area-measurement .project-module-record {
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 7px;
  padding: 5px;
}
.project-material-archive-window.area-measurement .project-module-record-preview {
  width: 34px;
  min-height: 34px;
}
.project-material-archive-window.area-measurement .project-module-record strong,
.project-material-archive-window.area-measurement .project-module-record small,
.project-material-archive-window.area-measurement .project-module-record p {
  font-size: 11px;
  line-height: 1.25;
}
.project-material-archive-window.area-measurement .project-module-record p {
  display: none;
}
.project-material-subwindow {
  min-width: 0;
  border: 1px solid #edf0ed;
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  display: grid;
  gap: 8px;
}
.project-material-subwindow-upload {
  width: 100%;
  min-height: 76px;
  border: 1px dashed #d7e2db;
  border-radius: 8px;
  background: #edf1ee;
  color: var(--green);
  cursor: pointer;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 4px;
  padding: 12px 10px;
  text-align: center;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.project-material-subwindow-upload:hover,
.project-material-subwindow-upload:focus-visible {
  border-color: var(--green);
  box-shadow: 0 8px 20px rgba(36, 112, 86, 0.12);
  transform: translateY(-1px);
  outline: none;
}
.project-material-subwindow-plus {
  width: auto;
  height: auto;
  border-radius: 0;
  display: inline-grid;
  place-items: center;
  background: transparent;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}
.project-material-subwindow-title {
  max-width: 100%;
  color: var(--green);
  font-size: 14px;
  line-height: 1.35;
  font-weight: 800;
  overflow-wrap: anywhere;
}
.project-material-subwindow-count {
  color: var(--muted);
  font-size: 12px;
}
.project-material-subwindow .project-module-record-grid {
  grid-template-columns: 1fr;
}
.project-material-subwindow .project-module-record {
  padding: 8px;
}
.project-module-empty.compact {
  min-height: 76px;
  padding: 12px;
}
.project-material-window-list .project-module-record.hidden {
  display: none;
}
.project-material-archive-window.is-search-empty .project-material-window-list::after {
  content: "没有匹配资料";
  display: block;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--muted);
  background: rgba(2, 17, 28, 0.62);
}
.project-reference-material-strip {
  min-width: 0;
}
.project-reference-material-strip .project-mini-assets {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.project-reference-detail-panel,
.project-ai-detail-panel,
.project-marketing-detail-panel,
.project-marketing-library-detail {
  display: grid;
  gap: 12px;
}
.project-ai-detail-panel section,
.project-marketing-library-detail section {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  display: grid;
  gap: 10px;
}
.project-ai-detail-panel h4,
.project-marketing-library-detail h4 {
  margin: 0;
  font-size: 15px;
}
.project-todo-list {
  display: grid;
  gap: 8px;
}

.project-todo-direct-list {
  grid-template-columns: repeat(8, minmax(0, 1fr));
  align-content: start;
  height: auto;
  min-height: 0;
  padding-top: 0;
}

.project-todo-direct-list .project-todo-item {
  min-height: 0;
  position: relative;
  padding: 10px 10px 16px;
  overflow: hidden;
}

.project-todo-card-board {
  gap: 24px;
  justify-items: center;
}

.project-todo-card-board .project-todo-card-tile {
  width: 100%;
  aspect-ratio: 3 / 4;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 6px;
  border-left-width: 1px;
  background:
    radial-gradient(circle at 18% 0%, rgba(80, 205, 231, 0.12), transparent 35%),
    color-mix(in srgb, var(--surface) 94%, #0b2a35);
}

.project-todo-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
}

.project-todo-card-top em {
  max-width: 58%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid rgba(80, 205, 231, 0.22);
  border-radius: 999px;
  padding: 1px 6px;
  color: rgba(235, 248, 252, 0.86);
  background: rgba(2, 17, 28, 0.24);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.project-todo-card-tile > strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
}

.project-todo-card-tile > small {
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  align-self: start;
  line-height: 1.45;
}

.project-todo-direct-list .project-todo-item time {
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 4px;
}

.project-todo-direct-list .project-todo-item time strong {
  font-size: 24px;
  line-height: 1.05;
}

.project-dashboard-panel-body > .project-todo-direct-list {
  height: auto;
}
.project-todo-item {
  width: 100%;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid #edf0ed;
  border-left: 4px solid #d8dfd8;
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfb;
}
.project-todo-item.warning {
  border-left-color: #d39a2c;
  background: #fffaf0;
}
.project-todo-item.urgent {
  border-left-color: #c9554f;
  background: #fff5f3;
}
.project-todo-item.pending-review {
  border-left-color: rgba(255, 255, 255, 0.8);
  background: color-mix(in srgb, var(--surface) 92%, #ffffff);
}
.project-todo-item.pending-review b {
  color: rgba(255, 255, 255, 0.92);
}
.project-todo-item.review-rejected {
  border-left-color: #e45f55;
  background: color-mix(in srgb, var(--surface) 88%, #4e1717);
}
.project-todo-item.review-rejected b {
  color: #ff8a80;
}
.project-todo-item b,
.project-todo-item strong,
.project-todo-item small,
.project-todo-item time,
.project-todo-item time span {
  display: block;
}
.project-todo-item b {
  margin-bottom: 3px;
  color: var(--green);
  font-size: 12px;
}
.project-todo-item.warning b {
  color: #a36c13;
}
.project-todo-item.urgent b {
  color: #b24b45;
}
.project-todo-item strong {
  overflow-wrap: anywhere;
}
.project-todo-item small,
.project-todo-item time span {
  color: var(--muted);
  font-size: 12px;
}
.project-todo-card-state {
  display: inline-flex;
  width: fit-content;
  margin-top: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgba(80, 205, 231, 0.22);
  color: rgba(235, 248, 252, 0.9);
  background: rgba(2, 17, 28, 0.26);
  font-size: 12px;
  font-weight: 800;
}
.project-todo-state-line {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 7px;
  height: 5px;
  border-radius: 999px;
  background: #2f9c66;
}
.project-todo-item.warning .project-todo-state-line {
  background: #f3bc2d;
}
.project-todo-item.urgent .project-todo-state-line {
  background: #e45f55;
}
.project-todo-item.pending-review .project-todo-state-line {
  background: rgba(255, 255, 255, 0.92);
}
.project-todo-item.review-rejected .project-todo-state-line {
  background: #e45f55;
}
.project-todo-item time {
  min-width: 92px;
  text-align: right;
  color: var(--ink);
  font-size: 12px;
  white-space: nowrap;
}
.project-todo-item:hover,
.project-todo-item:focus-visible {
  border-color: var(--green);
  box-shadow: 0 10px 22px rgba(22, 107, 74, 0.1);
  outline: none;
}
.project-todo-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: 12px;
  align-items: start;
}
.project-todo-detail-list,
.project-todo-editor {
  display: grid;
  gap: 10px;
}
.project-todo-detail-item {
  border: 1px solid #edf0ed;
  border-left: 4px solid #d8dfd8;
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfb;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}
.project-todo-detail-item.warning {
  border-left-color: #d39a2c;
  background: #fffaf0;
}
.project-todo-detail-item.urgent {
  border-left-color: #c9554f;
  background: #fff5f3;
}
.project-todo-detail-item b,
.project-todo-detail-item strong,
.project-todo-detail-item small,
.project-todo-detail-item p,
.project-todo-detail-item time,
.project-todo-detail-item time span {
  display: block;
}
.project-todo-detail-item b {
  color: var(--green);
  font-size: 12px;
}
.project-todo-detail-item.warning b { color: #a36c13; }
.project-todo-detail-item.urgent b { color: #b24b45; }
.project-todo-detail-item p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.5;
}
.project-todo-detail-item time {
  color: var(--ink);
  font-size: 12px;
  white-space: nowrap;
  text-align: right;
}
.project-todo-detail-item time span,
.project-todo-detail-item small {
  color: var(--muted);
  font-size: 12px;
}
.project-todo-editor {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8fbf8;
}
.project-todo-editor label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}
.project-todo-editor input,
.project-todo-editor textarea {
  width: 100%;
}
.project-todo-editor-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.project-todo-event-popover {
  width: min(420px, 100%);
  margin: 0 auto;
  border: 1px solid rgba(126, 211, 242, 0.5);
  border-radius: 8px;
  padding: 16px 18px 14px;
  background:
    radial-gradient(circle at 15% 0%, rgba(80, 205, 231, 0.14), transparent 36%),
    rgba(4, 18, 29, 0.78);
  display: grid;
  gap: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 22px 60px rgba(0, 12, 24, 0.28);
}

.project-todo-event-field {
  display: grid;
  gap: 6px;
  color: rgba(235, 248, 252, 0.92);
  font-weight: 800;
}

.project-todo-event-field.inline {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
}

.project-todo-event-field input,
.project-todo-event-field textarea {
  width: 100%;
  border-color: rgba(80, 205, 231, 0.48);
  background: rgba(2, 17, 28, 0.62);
  color: rgba(235, 248, 252, 0.95);
}

.project-todo-event-photo {
  min-height: 132px;
  border: 1px solid rgba(80, 205, 231, 0.48);
  border-radius: 8px;
  background: rgba(2, 17, 28, 0.62);
  color: var(--muted);
  display: grid;
  place-items: center;
  overflow: hidden;
  cursor: pointer;
}

.project-todo-event-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-todo-result-output {
  min-height: 116px;
  padding: 12px;
  text-align: left;
  place-items: start;
  align-content: start;
}

.project-todo-result-output small {
  color: rgba(235, 248, 252, 0.88);
  line-height: 1.55;
}

.project-todo-event-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.project-todo-result-field {
  border-top: 1px solid rgba(80, 205, 231, 0.18);
  padding-top: 8px;
}

.project-todo-reject-field {
  border-top: 1px solid rgba(228, 95, 85, 0.2);
  padding-top: 8px;
}

.project-todo-review-state {
  border: 1px solid rgba(80, 205, 231, 0.22);
  border-radius: 8px;
  padding: 7px 9px;
  color: rgba(235, 248, 252, 0.92);
  background: rgba(2, 17, 28, 0.28);
  font-weight: 900;
}

.project-todo-review-state.pending-review {
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

.project-todo-review-state.review-rejected {
  border-color: rgba(228, 95, 85, 0.52);
  color: #ffb3ad;
}

.project-todo-countdown-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 4px;
  color: rgba(235, 248, 252, 0.96);
  font-weight: 900;
}

.project-todo-countdown-strip span {
  height: 9px;
  border-radius: 999px;
  background: #2f9c66;
}

.project-todo-countdown-strip.warning span {
  background: #f3bc2d;
}

.project-todo-countdown-strip.urgent span {
  background: #e45f55;
}
.project-todo-countdown-strip.pending-review span {
  background: rgba(255, 255, 255, 0.92);
}

.project-todo-card-only-modal .project-module-detail-dialog {
  width: min(420px, calc(100vw - 36px)) !important;
  max-height: calc(100vh - 36px) !important;
  overflow: visible !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.project-todo-card-only-modal .project-modal-head,
.project-todo-card-only-modal .project-modal-actions {
  display: none !important;
}

.project-todo-card-only-modal .project-module-detail-body {
  display: grid !important;
  place-items: center !important;
  min-height: 0 !important;
  overflow: visible !important;
}

.project-todo-card-only-modal .project-todo-event-popover {
  width: min(420px, calc(100vw - 36px)) !important;
  margin: 0 !important;
}
.project-todo-summary-head,
.project-todo-toolbar,
.project-todo-card-title,
.project-todo-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.project-todo-summary-head small {
  color: var(--muted);
  font-size: 12px;
}
.project-todo-detail-v2 {
  grid-template-columns: 1fr;
}
.project-todo-toolbar {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f6faf8 100%);
}
.project-todo-toolbar strong,
.project-todo-toolbar small {
  display: block;
}
.project-todo-toolbar small {
  color: var(--muted);
  font-size: 12px;
}
.project-todo-searchbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  min-width: min(100%, 520px);
}
.project-todo-searchbar input {
  width: 100%;
}
.project-todo-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.project-todo-card {
  border: 1px solid #edf0ed;
  border-left: 4px solid #d8dfd8;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px;
  min-height: 152px;
}
.project-todo-card.warning {
  border-left-color: #d39a2c;
  background: #fffaf0;
}
.project-todo-card.urgent {
  border-left-color: #c9554f;
  background: #fff5f3;
}
.project-todo-card-thumb {
  min-width: 0;
  border-radius: 8px;
  border: 1px solid #e3e8e4;
  background: #edf4ef;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: var(--green);
  font-size: 12px;
  min-height: 112px;
}
.project-todo-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.project-todo-card-body {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.project-todo-card-body strong,
.project-todo-card-body p,
.project-todo-card-body time,
.project-todo-card-body small {
  margin: 0;
  overflow-wrap: anywhere;
}
.project-todo-card-title b {
  font-size: 12px;
  color: var(--green);
}
.project-todo-card.warning .project-todo-card-title b {
  color: #a36c13;
}
.project-todo-card.urgent .project-todo-card-title b {
  color: #b24b45;
}
.project-todo-card-body p,
.project-todo-card-body time,
.project-todo-card-body small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.project-todo-card-body p span,
.project-todo-card-body time span {
  color: var(--ink);
  font-weight: 700;
  margin-right: 6px;
}
.project-todo-pager {
  justify-content: flex-end;
}
.project-todo-pager .active {
  border-color: var(--green);
  color: var(--green);
  background: #edf7f1;
}
.project-todo-pager small {
  color: var(--muted);
}
.project-todo-editor-create {
  background: #fff;
  border-color: rgba(22, 107, 74, 0.22);
}

/* Project todo category detail polish */
.project-todo-detail-v2 { gap: 12px; }

:is(.project-todo-category-tabs, .project-todo-tabs, .project-todo-filter-tabs, .project-todo-severity-tabs, .project-todo-tone-tabs) {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

:is(.project-todo-category-tabs, .project-todo-tabs, .project-todo-filter-tabs, .project-todo-severity-tabs, .project-todo-tone-tabs) :is(button, .project-todo-category-tab, .project-todo-tab, .project-todo-filter-tab, .project-todo-tone-tab),
:is(.project-todo-category-tab, .project-todo-tab, .project-todo-filter-tab, .project-todo-tone-tab),
button:is([data-project-todo-category], [data-project-todo-tone], [data-todo-category], [data-todo-tone]) {
  --todo-tone: var(--green);
  --todo-tone-bg: #f3f8f4;
  --todo-tone-line: #d8e8dd;
  min-height: 44px;
  border: 1px solid var(--todo-tone-line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
  box-shadow: none;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

:is(.project-todo-category-tabs, .project-todo-tabs, .project-todo-filter-tabs, .project-todo-severity-tabs, .project-todo-tone-tabs) span,
:is(.project-todo-category-tab, .project-todo-tab, .project-todo-filter-tab, .project-todo-tone-tab) span {
  color: var(--todo-tone);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

:is(.project-todo-category-tabs, .project-todo-tabs, .project-todo-filter-tabs, .project-todo-severity-tabs, .project-todo-tone-tabs) :is(button, .project-todo-category-tab, .project-todo-tab, .project-todo-filter-tab, .project-todo-tone-tab):hover,
:is(.project-todo-category-tab, .project-todo-tab, .project-todo-filter-tab, .project-todo-tone-tab):hover,
button:is([data-project-todo-category], [data-project-todo-tone], [data-todo-category], [data-todo-tone]):hover {
  border-color: color-mix(in srgb, var(--todo-tone) 52%, var(--line));
  background: var(--todo-tone-bg);
  transform: translateY(-1px);
}

:is(.project-todo-category-tabs, .project-todo-tabs, .project-todo-filter-tabs, .project-todo-severity-tabs, .project-todo-tone-tabs) :is(button, .project-todo-category-tab, .project-todo-tab, .project-todo-filter-tab, .project-todo-tone-tab):is(.active, .selected, [aria-selected="true"]),
:is(.project-todo-category-tab, .project-todo-tab, .project-todo-filter-tab, .project-todo-tone-tab):is(.active, .selected, [aria-selected="true"]),
button:is([data-project-todo-category], [data-project-todo-tone], [data-todo-category], [data-todo-tone]):is(.active, .selected, [aria-selected="true"]) {
  border-color: color-mix(in srgb, var(--todo-tone) 58%, var(--line));
  background: linear-gradient(180deg, #fff, var(--todo-tone-bg));
  box-shadow: inset 3px 0 0 var(--todo-tone), 0 8px 18px rgba(31, 45, 43, 0.06);
}

:is(.project-todo-category-tabs, .project-todo-tabs, .project-todo-filter-tabs, .project-todo-severity-tabs, .project-todo-tone-tabs) .urgent,
:is(.project-todo-category-tab, .project-todo-tab, .project-todo-filter-tab, .project-todo-tone-tab).urgent,
button:is([data-project-todo-category="urgent"], [data-project-todo-category="red"], [data-project-todo-tone="urgent"], [data-project-todo-tone="red"], [data-todo-category="urgent"], [data-todo-category="red"], [data-todo-tone="urgent"], [data-todo-tone="red"]) {
  --todo-tone: var(--red);
  --todo-tone-bg: #fff6f4;
  --todo-tone-line: #efd8d4;
}

:is(.project-todo-category-tabs, .project-todo-tabs, .project-todo-filter-tabs, .project-todo-severity-tabs, .project-todo-tone-tabs) .warning,
:is(.project-todo-category-tab, .project-todo-tab, .project-todo-filter-tab, .project-todo-tone-tab).warning,
button:is([data-project-todo-category="warning"], [data-project-todo-category="yellow"], [data-project-todo-tone="warning"], [data-project-todo-tone="yellow"], [data-todo-category="warning"], [data-todo-category="yellow"], [data-todo-tone="warning"], [data-todo-tone="yellow"]) {
  --todo-tone: var(--amber);
  --todo-tone-bg: #fff9ec;
  --todo-tone-line: #eadbbd;
}

:is(.project-todo-category-tabs, .project-todo-tabs, .project-todo-filter-tabs, .project-todo-severity-tabs, .project-todo-tone-tabs) :is(.ready, .normal),
:is(.project-todo-category-tab, .project-todo-tab, .project-todo-filter-tab, .project-todo-tone-tab):is(.ready, .normal),
button:is([data-project-todo-category="ready"], [data-project-todo-category="normal"], [data-project-todo-category="green"], [data-project-todo-tone="ready"], [data-project-todo-tone="normal"], [data-project-todo-tone="green"], [data-todo-category="ready"], [data-todo-category="normal"], [data-todo-category="green"], [data-todo-tone="ready"], [data-todo-tone="normal"], [data-todo-tone="green"]) {
  --todo-tone: var(--green);
  --todo-tone-bg: #f2f8f4;
  --todo-tone-line: #d5e6da;
}

:is(.project-todo-category-stats, .project-todo-stats, .project-todo-tone-stats) {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

:is(.project-todo-stat, .project-todo-stat-card, .project-todo-category-stat) {
  --todo-tone: var(--green);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  display: grid;
  gap: 4px;
  min-width: 0;
}

:is(.project-todo-stat, .project-todo-stat-card, .project-todo-category-stat).urgent { --todo-tone: var(--red); }
:is(.project-todo-stat, .project-todo-stat-card, .project-todo-category-stat).warning { --todo-tone: var(--amber); }
:is(.project-todo-stat, .project-todo-stat-card, .project-todo-category-stat):is(.ready, .normal) { --todo-tone: var(--green); }

:is(.project-todo-stat, .project-todo-stat-card, .project-todo-category-stat) strong {
  color: var(--todo-tone);
  font-size: 20px;
  line-height: 1.1;
}

:is(.project-todo-stat, .project-todo-stat-card, .project-todo-category-stat) :is(span, small) {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.project-todo-toolbar { align-items: stretch; }
.project-todo-toolbar > div:first-child { min-width: min(100%, 260px); }

:is(.project-todo-card, .project-todo-detail-item, .project-todo-item) {
  --todo-card-tone: var(--green);
  border-left-color: color-mix(in srgb, var(--todo-card-tone) 72%, #fff);
}

:is(.project-todo-card, .project-todo-detail-item):is(.warning, .urgent) {
  background:
    radial-gradient(circle at 12% 0%, color-mix(in srgb, var(--todo-card-tone) 16%, transparent), transparent 34%),
    rgba(2, 17, 28, 0.64);
}
:is(.project-todo-card, .project-todo-detail-item, .project-todo-item).warning { --todo-card-tone: var(--amber); }
:is(.project-todo-card, .project-todo-detail-item, .project-todo-item).urgent { --todo-card-tone: var(--red); }

.project-todo-card {
  position: relative;
  background:
    radial-gradient(circle at 12% 0%, color-mix(in srgb, var(--todo-card-tone) 14%, transparent), transparent 34%),
    rgba(2, 17, 28, 0.64);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.project-todo-card::before {
  content: "";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--todo-card-tone);
  opacity: 0.72;
}

.project-todo-card:hover {
  border-color: color-mix(in srgb, var(--todo-card-tone) 42%, var(--line));
  box-shadow: 0 12px 26px rgba(31, 45, 43, 0.08);
  transform: translateY(-1px);
}

.project-todo-card-title { align-items: flex-start; }
.project-todo-card-title b {
  color: var(--todo-card-tone);
  line-height: 1.35;
}
.project-todo-card-title .tiny { flex: 0 0 auto; }

.project-todo-card-thumb {
  background: linear-gradient(180deg, #f7faf8, #eef4f0);
}

.project-todo-card-thumb[role="button"] {
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.project-todo-card-thumb[role="button"]:hover,
.project-todo-card-thumb[role="button"]:focus-visible {
  border-color: color-mix(in srgb, var(--todo-card-tone) 48%, var(--line));
  box-shadow: 0 8px 18px rgba(31, 45, 43, 0.08);
  outline: none;
  transform: translateY(-1px);
}

:is(.project-todo-detail-v2, .project-todo-card-grid):is([data-project-todo-category="urgent"], [data-project-todo-category="red"], [data-todo-category="urgent"], [data-todo-category="red"], [data-active-todo-category="urgent"], [data-active-todo-category="red"]) .project-todo-card:not(.urgent),
:is(.project-todo-detail-v2, .project-todo-card-grid):is([data-project-todo-category="warning"], [data-project-todo-category="yellow"], [data-todo-category="warning"], [data-todo-category="yellow"], [data-active-todo-category="warning"], [data-active-todo-category="yellow"]) .project-todo-card:not(.warning),
:is(.project-todo-detail-v2, .project-todo-card-grid):is([data-project-todo-category="ready"], [data-project-todo-category="normal"], [data-project-todo-category="green"], [data-todo-category="ready"], [data-todo-category="normal"], [data-todo-category="green"], [data-active-todo-category="ready"], [data-active-todo-category="normal"], [data-active-todo-category="green"]) .project-todo-card:is(.warning, .urgent) {
  display: none;
}

.project-list-panel { min-height: 240px; }
.project-list-stack { min-height: 120px; }
.project-dashboard-layout > .project-list-panel { min-height: 100%; }

#projectCards:empty::before {
  content: "项目列表暂无可见项目，请检查当前筛选或本地服务返回。";
  border: 1px dashed #cfd8d2;
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfb;
  color: var(--muted);
  font-size: 13px;
}

.project-empty-state {
  background: linear-gradient(180deg, #fff, #f8fbf8);
  border-color: #cfd8d2;
  color: var(--muted);
}

/* 问题3(2026-07-25 续窗):未入公司空态门禁按钮(去创建/加入公司)——沿用主绿,不改空态排版 */
.project-empty-gate-btn {
  margin-top: 10px;
  border: none;
  background: #1c6b57;
  color: #fff;
  border-radius: 9px;
  padding: 8px 18px;
  font-weight: 700;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
}

.project-message-center,
.project-dashboard-upload-modal,
.project-module-detail-modal,
.project-task-list-modal,
.construction-task-modal,
.project-material-preview-modal,
.project-edit-modal,
.project-review-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(31, 45, 43, 0.34);
}

.project-message-dialog,
.project-dashboard-upload-dialog,
.project-module-detail-dialog,
.project-task-list-dialog,
.construction-task-dialog,
.project-material-preview-dialog,
.project-edit-dialog,
.project-review-dialog {
  width: min(760px, calc(100vw - 36px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 22px 60px rgba(31, 45, 43, 0.22);
  padding: 16px;
}

.project-dashboard-upload-dialog {
  width: min(980px, calc(100vw - 36px));
}

.project-module-detail-dialog {
  width: min(1040px, calc(100vw - 36px));
}

.project-task-list-dialog {
  width: min(1180px, calc(100vw - 36px));
}

.construction-task-dialog {
  width: min(820px, calc(100vw - 36px));
}

.project-material-preview-dialog {
  width: min(900px, calc(100vw - 36px));
}

.project-edit-dialog {
  width: min(900px, calc(100vw - 36px));
}

.project-start-date-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.project-start-date-field label {
  min-width: 0;
}

.project-start-date-field .small {
  min-height: 36px;
  white-space: nowrap;
}

.project-review-dialog {
  width: min(760px, calc(100vw - 36px));
}

.project-todo-card-only-modal .project-module-detail-dialog {
  width: min(420px, calc(100vw - 36px)) !important;
  max-height: calc(100vh - 36px) !important;
  overflow: visible !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.project-todo-card-only-modal .project-modal-head,
.project-todo-card-only-modal .project-modal-actions {
  display: none !important;
}

.project-todo-card-only-modal .project-module-detail-body {
  display: grid !important;
  place-items: center !important;
  min-height: 0 !important;
  overflow: visible !important;
}

.project-todo-card-only-modal .project-todo-event-popover {
  width: min(420px, calc(100vw - 36px)) !important;
  margin: 0 !important;
}

.project-site-material-detail {
  display: grid;
  gap: 12px;
}

.project-site-material-overview {
  border: 1px solid #dfe9e3;
  border-radius: 8px;
  background: #f5faf7;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--green);
}

.project-site-material-overview strong,
.project-site-material-overview span {
  display: block;
}

.project-site-material-stage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.project-site-stage-window {
  min-height: 204px;
  align-content: start;
  background: linear-gradient(180deg, #fbfcfb 0%, #ffffff 100%);
}

.project-site-stage-tools {
  gap: 6px;
}

.project-site-stage-search {
  min-width: 118px;
  max-width: 150px;
}

.project-site-stage-upload {
  min-width: 50px;
}

.project-site-stage-empty-upload {
  width: 100%;
  min-height: 128px;
  border: 1px dashed #b8d5c5;
  border-radius: 8px;
  background: #f8fcf9;
  color: var(--ink);
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 14px;
  cursor: pointer;
  text-align: center;
}

.project-site-stage-empty-upload small,
.project-site-stage-summary small {
  color: var(--muted);
}

.project-site-stage-summary {
  display: grid;
  gap: 8px;
  border: 1px solid #e3ece7;
  border-radius: 8px;
  background: #ffffff;
  padding: 10px;
}

.project-design-space-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.project-design-split-detail {
  min-height: 100%;
  display: grid;
  grid-template-columns: minmax(150px, 0.22fr) minmax(0, 1fr);
  gap: 12px;
}

.project-design-split-detail--single {
  grid-template-columns: minmax(0, 1fr);
}

.project-design-panorama-panel,
.project-design-folder-panel {
  min-width: 0;
  min-height: 0;
  border: 1px solid rgba(126, 211, 242, 0.22);
  border-radius: 8px;
  padding: 10px;
  background: rgba(2, 17, 28, 0.34);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
}

.project-design-subpanel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.project-design-subpanel-head strong,
.project-design-subpanel-head small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-design-subpanel-head small {
  color: var(--muted);
  font-size: 12px;
}

.project-design-panorama-list {
  min-height: 0;
  overflow-y: auto;
  display: grid;
  grid-auto-rows: minmax(178px, auto);
  gap: 12px;
  align-content: start;
  padding-right: 2px;
}

.project-panorama-local-channel {
  border: 1px solid rgba(80, 205, 231, 0.28);
  border-radius: 8px;
  padding: 10px;
  background:
    linear-gradient(145deg, rgba(80, 205, 231, 0.10), rgba(255, 255, 255, 0.018)),
    rgba(2, 17, 28, 0.66);
  display: grid;
  gap: 10px;
  min-width: 0;
}

.project-panorama-channel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.project-panorama-channel-head strong,
.project-panorama-channel-head small {
  display: block;
}

.project-panorama-channel-head small {
  margin-top: 3px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.project-panorama-channel-head span {
  flex: 0 0 auto;
  border: 1px solid rgba(126, 211, 242, 0.28);
  border-radius: 999px;
  padding: 2px 8px;
  color: rgba(220, 246, 252, 0.9);
  font-size: 12px;
}

.project-panorama-embed,
.project-panorama-modal-embed {
  width: 100%;
  border: 1px solid rgba(126, 211, 242, 0.24);
  border-radius: 8px;
  background: #020b12;
  display: block;
}

.project-panorama-embed {
  aspect-ratio: 16 / 9;
  min-height: 132px;
}

.project-panorama-modal-embed {
  aspect-ratio: 16 / 9;
  min-height: 220px;
}

.project-panorama-channel-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.project-design-panorama-card {
  min-height: 178px;
  border: 1px solid rgba(126, 211, 242, 0.24);
  border-radius: 8px;
  padding: 9px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015)),
    rgba(5, 20, 31, 0.72);
  color: inherit;
  text-align: left;
  display: grid;
  grid-template-rows: minmax(92px, 1fr) auto auto;
  gap: 7px;
  cursor: pointer;
}

.project-design-panorama-card:hover,
.project-design-panorama-card:focus-visible {
  border-color: rgba(80, 205, 231, 0.58);
  box-shadow: inset 0 0 0 1px rgba(80, 205, 231, 0.16), 0 12px 26px rgba(0, 14, 28, 0.22);
  outline: none;
}

.project-design-panorama-preview {
  min-height: 92px;
  border: 1px solid rgba(126, 211, 242, 0.22);
  border-radius: 8px;
  background: #050b10;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: rgba(205, 226, 232, 0.74);
}

.project-design-panorama-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-design-panorama-card strong,
.project-design-panorama-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-design-panorama-card small {
  color: var(--muted);
  font-size: 12px;
}

.project-design-folder-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-rows: auto;
  gap: 14px;
  align-content: start;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
}

.project-design-folder-grid-empty {
  min-height: 100%;
}

.project-ai-output-empty-state {
  grid-column: 1 / -1;
  min-height: 220px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px dashed rgba(144, 190, 205, 0.28);
  border-radius: 8px;
  background: rgba(4, 22, 31, 0.32);
  color: var(--muted);
  text-align: center;
}

.project-ai-output-empty-state strong {
  color: var(--ink);
  font-size: 14px;
}

.project-design-file-card {
  aspect-ratio: 4 / 3;
  height: auto;
  min-height: 0;
  max-height: none;
  grid-template-rows: minmax(0, 1fr) auto;
  align-content: stretch;
  overflow: hidden;
  position: relative;
}

.project-design-file-card > span {
  min-height: 0;
  height: auto;
  aspect-ratio: 4 / 3;
}

.project-design-file-card small {
  min-height: 0;
  max-height: 30px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.project-design-file-card.is-selected,
.project-site-file-card.is-selected {
  border-color: rgba(80, 205, 231, 0.82);
  box-shadow: inset 0 0 0 2px rgba(80, 205, 231, 0.24);
}

.project-design-file-card.is-selected::after,
.project-site-file-card.is-selected::after {
  content: "已选";
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(80, 205, 231, 0.94);
  color: #04131c;
  font-size: 11px;
  font-weight: 900;
}

.project-design-folder-library.is-selecting .project-design-file-card,
.project-site-folder-library.is-selecting .project-site-file-card {
  cursor: copy;
}

.project-design-move-drawer {
  border: 1px solid rgba(126, 211, 242, 0.28);
  border-radius: 8px;
  padding: 10px;
  background: rgba(2, 17, 28, 0.74);
  display: grid;
  gap: 8px;
}

.project-design-move-drawer strong {
  font-size: 12px;
}

.project-design-move-target-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.project-design-move-target-list button {
  min-height: 30px;
  border: 1px solid rgba(126, 211, 242, 0.26);
  border-radius: 8px;
  padding: 0 10px;
  background: rgba(6, 28, 42, 0.84);
  color: inherit;
  font-size: 12px;
  cursor: pointer;
}

.project-design-move-target-list button:hover,
.project-design-move-target-list button:focus-visible {
  border-color: rgba(80, 205, 231, 0.7);
  outline: none;
}

.project-design-panorama-popover {
  width: min(430px, calc(100vw - 36px));
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(126, 211, 242, 0.28);
  border-radius: 8px;
  background: rgba(5, 20, 31, 0.88);
}

.project-design-panorama-popover label {
  display: grid;
  gap: 6px;
  color: rgba(231, 246, 250, 0.92);
  font-weight: 800;
}

.project-design-panorama-popover input {
  min-height: 38px;
  border: 1px solid rgba(126, 211, 242, 0.28);
  border-radius: 8px;
  padding: 0 10px;
  background: rgba(2, 17, 28, 0.72);
  color: inherit;
}

.project-design-panorama-upload {
  min-height: 160px;
  border: 1px dashed rgba(126, 211, 242, 0.34);
  border-radius: 8px;
  padding: 8px;
  background: rgba(2, 17, 28, 0.58);
  color: inherit;
  display: grid;
  gap: 8px;
  place-items: center;
  cursor: pointer;
}

.project-design-panorama-upload.readonly {
  border-style: solid;
  cursor: default;
}

.project-design-panorama-upload.readonly.is-link {
  cursor: pointer;
}

.project-design-panorama-upload.readonly.is-link:hover,
.project-design-panorama-upload.readonly.is-link:focus-visible {
  border-color: rgba(80, 205, 231, 0.72);
  outline: none;
}

.project-design-panorama-upload.drag-over {
  border-color: rgba(80, 205, 231, 0.76);
  background: rgba(37, 84, 101, 0.34);
}

.project-design-panorama-upload span,
.project-design-panorama-upload img {
  width: 100%;
}

.project-design-panorama-upload img {
  max-height: 148px;
  object-fit: cover;
  border-radius: 6px;
}

.project-design-panorama-upload small {
  color: var(--muted);
}

.project-design-panorama-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 1500px) {
  .project-design-folder-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .project-design-split-detail {
    grid-template-columns: 1fr;
  }

  .project-design-folder-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.project-design-space-window {
  min-height: 190px;
  background: #fff;
}

.project-design-space-head {
  align-items: flex-start;
}

.project-design-space-tools {
  display: flex;
  align-items: center;
  gap: 6px;
}

.project-design-space-title-corner {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #eef5ff;
  color: #27527a;
  font-size: 11px;
  font-weight: 800;
}

.project-design-space-contract {
  padding: 8px 10px;
  border: 1px solid #e3ecf6;
  border-radius: 8px;
  background: #f8fbff;
  color: var(--muted);
  font-size: 12px;
}

.project-design-space-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.project-design-space-image-card,
.project-design-space-empty-upload {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 8px;
  display: grid;
  gap: 6px;
  cursor: pointer;
  text-align: left;
}

.project-design-space-image-card:hover,
.project-design-space-image-card:focus-visible,
.project-design-space-empty-upload:hover,
.project-design-space-empty-upload:focus-visible {
  border-color: rgba(22, 107, 74, 0.42);
  box-shadow: 0 10px 22px rgba(22, 107, 74, 0.1);
  outline: none;
}

.project-design-space-empty-upload {
  min-height: 120px;
  place-items: center;
  text-align: center;
  border-style: dashed;
  color: var(--green);
}

.project-design-space-empty-upload small {
  color: var(--muted);
}

.project-design-space-image {
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  background: #eef2f0;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.project-design-space-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-design-space-image-name {
  color: var(--ink);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.project-modal-head h2 {
  font-size: 20px;
  margin-bottom: 5px;
}

.project-message-tabs {
  margin-bottom: 12px;
}

.project-message-list {
  display: grid;
  gap: 10px;
}

.project-message-item,
.project-message-empty {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfb;
  display: grid;
  gap: 8px;
}

.project-message-item {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.project-message-item p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.project-module-detail-body {
  display: grid;
  gap: 12px;
}

.project-module-summary {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8fbf8;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.project-module-summary strong,
.project-module-summary small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.project-module-info-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.project-material-preview-body {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(220px, 0.7fr);
  gap: 14px;
  align-items: start;
}

.project-material-preview-media {
  min-height: 320px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f4f7f5;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--green);
  font-size: 30px;
  font-weight: 800;
  gap: 8px;
  padding: 16px;
  text-align: center;
}

.project-material-preview-media img {
  width: 100%;
  height: 100%;
  max-height: 62vh;
  object-fit: contain;
  display: block;
  background: #fff;
}

.project-material-preview-media small {
  max-width: 380px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.55;
}

.project-material-preview-meta {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfb;
  display: grid;
  gap: 10px;
}

.project-material-preview-meta div {
  display: grid;
  gap: 4px;
}

.project-material-preview-meta dt {
  color: var(--muted);
  font-size: 12px;
}

.project-material-preview-meta dd {
  margin: 0;
  color: var(--ink);
  overflow-wrap: anywhere;
}

/* Read-only material preview should sit above detail modals and absorb backdrop clicks. */
.project-material-preview-modal {
  z-index: 2300;
  isolation: isolate;
  background: rgba(31, 45, 43, 0.42);
  backdrop-filter: blur(2px);
  pointer-events: auto;
}

.project-material-preview-modal.hidden {
  pointer-events: none;
}

.project-module-detail-modal {
  z-index: 2200;
}

.project-task-list-modal {
  z-index: 2200;
}

.project-material-preview-dialog {
  position: relative;
  z-index: 1;
  pointer-events: auto;
  overflow: auto;
  overscroll-behavior: contain;
}

.project-material-preview-body {
  position: relative;
  z-index: 1;
}

.project-material-preview-media {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.78), rgba(248,251,249,0.92)),
    #f4f7f5;
  cursor: default;
  user-select: none;
}

.project-material-preview-media img {
  user-select: none;
}

.project-material-preview-meta {
  align-self: stretch;
}

.project-material-preview-modal :is(button, a, input, select, textarea, [role="button"], [tabindex]) {
  pointer-events: auto;
}

.project-material-preview-dialog {
  --modal-max-width: min(1680px, calc(100vw - var(--mf-sidebar-width, 0px) - 56px));
  width: var(--modal-max-width);
  max-height: calc(100vh - 56px);
  background:
    linear-gradient(145deg, rgba(18, 43, 58, 0.96), rgba(4, 17, 28, 0.98)),
    #06131d;
  border-color: rgba(126, 211, 242, 0.32);
}

.project-material-preview-dialog .project-modal-head {
  border-color: rgba(126, 211, 242, 0.24);
}

.project-material-preview-body {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: 16px;
  min-height: min(78vh, 820px);
}

.project-material-preview-primary,
.project-material-preview-side {
  min-width: 0;
  display: grid;
  gap: 12px;
  align-content: start;
}

.project-material-preview-primary {
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: min(78vh, 820px);
}

.project-material-preview-actions-row {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  min-height: 36px;
}

.project-material-preview-media {
  min-height: min(78vh, 820px);
  padding: 10px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)),
    rgba(2, 13, 22, 0.86);
  border-color: rgba(126, 211, 242, 0.3);
  color: rgba(126, 211, 242, 0.86);
}

.project-material-preview-media img {
  width: 100%;
  height: 100%;
  max-height: calc(100vh - 210px);
  object-fit: contain;
  background: rgba(2, 13, 22, 0.92);
}

.project-material-preview-media video {
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 210px);
  object-fit: contain;
  display: block;
}

.project-material-preview-meta {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.015)),
    rgba(4, 19, 31, 0.88);
  border-color: rgba(126, 211, 242, 0.26);
}

.project-material-preview-meta dt {
  color: rgba(164, 196, 205, 0.72);
}

.project-material-preview-meta dd {
  color: rgba(229, 246, 250, 0.94);
}

.project-material-preview-sync-grid {
  display: grid;
  gap: 8px;
}

.project-material-preview-sync-grid button {
  justify-content: center;
}

.project-material-preview-sync-grid button.selected,
.project-material-preview-sync-grid button[aria-pressed="true"] {
  border-color: rgba(80, 205, 231, 0.64);
  background: rgba(80, 205, 231, 0.18);
  color: #eafaff;
}

.project-mini-asset-card,
.project-mini-asset-action-card {
  position: relative;
  isolation: isolate;
}

.project-mini-asset-preview-button {
  position: relative;
  z-index: 2;
  border-radius: 8px;
}

.project-mini-asset-preview-button:hover,
.project-mini-asset-preview-button:focus-visible {
  outline: 2px solid rgba(50, 122, 94, 0.22);
  outline-offset: 2px;
}

.project-mini-asset-preview-button .project-mini-asset-preview,
.project-mini-asset-preview-button .project-mini-asset-preview img,
.project-todo-card-thumb[role="button"] img {
  pointer-events: none;
}

.project-module-note {
  margin: 0;
  border-left: 3px solid var(--green);
  padding: 8px 10px;
  background: #f7fbf8;
  color: var(--muted);
}

.project-module-record-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.project-module-record {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.project-module-record:hover,
.project-module-record:focus-visible {
  border-color: var(--green);
  box-shadow: 0 10px 22px rgba(22, 107, 74, 0.1);
  outline: none;
  transform: translateY(-1px);
}

.project-module-record-preview {
  border-radius: 8px;
  overflow: hidden;
  background: #edf1ee;
  min-height: 72px;
  display: grid;
  place-items: center;
  color: var(--green);
  font-weight: 800;
}

.project-module-record-preview img {
  width: 100%;
  height: 100%;
  min-height: 72px;
  object-fit: cover;
  display: block;
}

.project-module-record strong,
.project-module-record small,
.project-module-record p {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.project-module-record small {
  color: var(--muted);
  margin-top: 4px;
}

.project-module-record p {
  margin: 6px 0 0;
  color: var(--muted);
}

.project-module-empty {
  /* PROJECT_TODO_DARK_EMPTY_R2 */
  border: 1px dashed var(--line);
  border-radius: 8px;
  min-height: 140px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  background:
    radial-gradient(circle at 50% 12%, rgba(80, 205, 231, 0.08), transparent 34%),
    rgba(2, 17, 28, 0.62);
  color: var(--muted);
  text-align: center;
}

.project-upload-dialog-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 14px;
}

.project-upload-form {
  display: grid;
  gap: 12px;
}

#dashboardUploadFileInput {
  display: none;
}

.dashboard-upload-preview {
  min-height: 86px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 10px;
  display: grid;
  gap: 8px;
  background: #fbfcfb;
}

.dashboard-upload-construction-task {
  border: 1px solid #dfe9e3;
  border-radius: 8px;
  background: linear-gradient(180deg, #fbfcfb 0%, #f7fbf8 100%);
  padding: 10px;
}

.dashboard-upload-task-board {
  display: grid;
  gap: 10px;
}

.dashboard-upload-task-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-upload-task-card {
  display: grid;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 11px;
}

.dashboard-upload-task-card.pending,
.dashboard-upload-task-card.not_started {
  background: #ffffff;
}

.dashboard-upload-task-card.ready,
.dashboard-upload-task-card.complete {
  border-color: rgba(22, 107, 74, 0.22);
}

.dashboard-upload-task-card.empty {
  border-style: dashed;
  color: var(--muted);
}

.dashboard-upload-task-head,
.dashboard-upload-task-main {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.dashboard-upload-task-main {
  display: grid;
  gap: 4px;
}

.dashboard-upload-task-head strong,
.dashboard-upload-task-main strong {
  display: block;
  color: var(--ink);
}

.dashboard-upload-task-head small,
.dashboard-upload-task-main small,
.dashboard-upload-task-meta,
.dashboard-upload-task-card li,
.dashboard-upload-task-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.dashboard-upload-task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.dashboard-upload-task-card ul {
  margin: 0;
  padding-left: 16px;
}

.dashboard-upload-task-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.dashboard-upload-file {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
}

.dashboard-upload-file span {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #eaf5ef;
  color: var(--green);
  font-weight: 800;
}

.dashboard-upload-file strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-upload-status {
  min-height: 18px;
  display: block;
  color: var(--muted);
}

.project-upload-status.ready { color: var(--green); }
.project-upload-status.pending { color: var(--amber); }
.project-upload-status.failed { color: var(--red); }

.project-mobile-upload-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(145deg, #f8fbf8, #fff);
  padding: 12px;
  display: grid;
  gap: 10px;
  align-content: start;
}

.project-upload-qr {
  width: 140px;
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 8px;
  border: 8px solid #fff;
  display: grid;
  place-items: center;
  color: #173a31;
  font-weight: 900;
  background:
    linear-gradient(90deg, #173a31 10px, transparent 10px) 0 0 / 20px 20px,
    linear-gradient(#173a31 10px, transparent 10px) 0 0 / 20px 20px,
    #eff7f2;
  box-shadow: inset 0 0 0 1px var(--line);
}

.project-mobile-upload-card input {
  width: 100%;
  font-size: 11px;
}

.project-mobile-upload-actions {
  display: flex;
  gap: 8px;
}
.project-quote-contract {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(150px, 0.65fr);
  gap: 12px;
  align-items: stretch;
}
.project-quote-file-list {
  border: 1px solid #edf0ed;
  border-radius: 8px;
  overflow: hidden;
  background: #fbfcfb;
}
.project-quote-file-panel {
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(72px, 1fr);
  align-content: stretch;
  gap: 12px;
}
.project-quote-file-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border-bottom: 1px solid #edf0ed;
}
button.project-quote-file-row {
  width: 100%;
  border-top: 0;
  border-right: 0;
  border-left: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
button.project-quote-file-row:hover,
button.project-quote-file-row:focus-visible {
  background: #f4faf6;
  outline: none;
}
.project-quote-file-row:last-child {
  border-bottom: 0;
}
.project-quote-file-icon {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: #e6f3ec;
  color: var(--green);
  font-size: 10px;
  font-weight: 900;
}
.project-quote-file-icon.pdf {
  background: #fff0ed;
  color: #c5574b;
}
.project-quote-file-row strong,
.project-quote-file-row small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-quote-file-row small,
.project-payment-progress small,
.project-payment-progress span {
  color: var(--muted);
}
.project-quote-file-row em {
  border-radius: 6px;
  padding: 3px 7px;
  font-style: normal;
  font-size: 12px;
  white-space: nowrap;
}
.project-quote-file-row em.ready {
  background: #edf7f0;
  color: var(--green);
}
.project-quote-file-row em.review {
  background: #fff5df;
  color: var(--amber);
}
.project-quote-contract-side {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 10px;
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
}
.project-quote-contract-side .project-payment-progress {
  border-left: 0;
  padding-left: 0;
}
.project-quote-inline-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-self: end;
  align-self: end;
  margin-top: auto;
  padding: 10px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fff;
}
.project-quote-file-panel .project-quote-inline-actions {
  margin-top: auto;
}
.project-quote-inline-actions .ghost.small {
  min-height: 28px;
}
.project-payment-progress {
  border-left: 1px solid var(--line);
  padding-left: 12px;
  display: grid;
  align-content: center;
  gap: 8px;
}
.project-payment-progress strong {
  font-size: 24px;
  line-height: 1;
  font-weight: 800;
}
.project-contract-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 8px;
  background: #f8faf8;
}
.project-contract-row em {
  font-style: normal;
  color: var(--amber);
}
.project-payment-bar {
  height: 7px;
  border-radius: 999px;
  background: #e9eee9;
  overflow: hidden;
}
.project-payment-bar i {
  display: block;
  height: 100%;
  background: var(--green);
}
.project-payment-droplet-grid {
  display: grid;
  grid-template-columns: repeat(3, 32px);
  gap: 11px 14px;
  align-items: center;
  padding: 4px 0 2px;
}
.project-payment-droplet {
  position: relative;
  width: 28px;
  height: 28px;
  border: 2px solid color-mix(in srgb, var(--green) 42%, #dbe8e0);
  border-radius: 55% 55% 55% 12%;
  background: linear-gradient(145deg, #fff, #f5fbf8);
  transform: rotate(45deg);
  cursor: pointer;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.74), 0 5px 12px rgba(31, 78, 62, 0.08);
}
.project-payment-droplet::before {
  content: "";
  position: absolute;
  inset: 100% 0 0;
  background:
    radial-gradient(circle at 36% 24%, rgba(255,255,255,0.86), transparent 24%),
    linear-gradient(180deg, #9ddfc4, var(--green));
  transition: inset 0.18s ease;
}
.project-payment-droplet.paid::before {
  inset: 0;
}
.project-payment-droplet span {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  transform: rotate(-45deg);
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
}
.project-payment-droplet.paid span {
  color: #fff;
}
.project-payment-droplet:hover,
.project-payment-droplet:focus-visible {
  border-color: var(--green);
  outline: none;
  box-shadow: 0 0 0 3px rgba(43, 122, 90, 0.14), 0 8px 16px rgba(31, 78, 62, 0.12);
}
.project-quote-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 12px;
  align-items: stretch;
}
.project-quote-detail .project-quote-contract {
  min-width: 0;
}
.project-detail-mobile-upload {
  grid-row: 1;
  grid-column: 2 / 3;
}
.project-content-library-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.project-content-library-panel .project-content-library-stat-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfb;
  display: grid;
  gap: 5px;
}
.project-library-stat-card {
  width: 100%;
  min-width: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  position: relative;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease, background .16s ease;
}
.project-library-stat-card::after {
  content: "›";
  position: absolute;
  top: 8px;
  right: 10px;
  color: rgba(22, 107, 74, 0.46);
  font-size: 16px;
  line-height: 1;
}
.project-library-stat-card:hover,
.project-library-stat-card:focus-visible {
  border-color: rgba(22, 107, 74, 0.42);
  background: linear-gradient(180deg, #ffffff 0%, #f4faf7 100%);
  box-shadow: 0 8px 22px rgba(20, 64, 48, 0.08);
  transform: translateY(-1px);
  outline: none;
}
.project-content-library-panel small,
.project-content-library-panel span {
  color: var(--muted);
}
.project-content-library-panel strong {
  font-size: 26px;
  line-height: 1;
}
.project-content-library-hidden-label {
  display: none;
}
.project-content-library-media-grid {
  display: grid;
  gap: 10px;
}
.project-ai-design-library {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(150px, 0.75fr);
  gap: 12px;
  align-items: stretch;
}
.project-ai-library-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}
.project-ai-library-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: linear-gradient(180deg, #fbfcfb 0%, #f5f8f6 100%);
  display: grid;
  gap: 10px;
  min-width: 0;
}
.project-ai-library-group strong,
.project-ai-design-bucket-head strong {
  color: var(--green-dark);
}
.project-ai-library-group small,
.project-ai-library-chips small,
.project-ai-design-section small {
  color: var(--muted);
}
.project-ai-library-chips {
  display: grid;
  gap: 6px;
}
.project-ai-library-chips .project-ai-library-stat-card {
  border: 1px solid rgba(22, 107, 74, 0.12);
  border-radius: 7px;
  padding: 7px;
  background: #fff;
  display: grid;
  gap: 3px;
}
.project-ai-library-chips b {
  font-size: 20px;
  line-height: 1;
}
.project-ai-generated-category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 3px;
}
.project-ai-generated-category-tabs span {
  border: 1px solid rgba(22, 107, 74, 0.12);
  border-radius: 999px;
  padding: 2px 7px;
  background: #f6faf8;
  color: #31584d;
  font-size: 11px;
  line-height: 1.4;
  white-space: nowrap;
}
.project-ai-generated-category-tabs b {
  font-size: inherit;
  color: var(--green-dark);
}
.project-ai-generated-product-library {
  display: grid;
  gap: 10px;
}
.project-ai-generated-product-library section {
  display: grid;
  gap: 6px;
}
.project-ai-generated-product-library h5 {
  margin: 0;
  font-size: 13px;
  color: var(--green-dark);
}
.project-ai-generated-record-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.project-ai-generated-record {
  border: 1px solid rgba(22, 107, 74, 0.12);
  border-radius: 8px;
  padding: 8px;
  background: #fff;
  color: inherit;
  text-align: left;
  display: grid;
  gap: 4px;
  min-width: 0;
  cursor: pointer;
}
.project-ai-generated-record span {
  justify-self: start;
  border-radius: 999px;
  padding: 2px 7px;
  background: #edf7f2;
  color: #1f6b50;
  font-size: 11px;
  font-weight: 700;
}
.project-ai-generated-record strong,
.project-ai-generated-record small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-ai-generated-empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--muted);
  background: #fff;
}
@media (max-width: 760px) {
  .project-ai-generated-record-list {
    grid-template-columns: 1fr;
  }
}
.project-library-focus-target {
  border-color: rgba(22, 107, 74, 0.58) !important;
  box-shadow: 0 0 0 3px rgba(22, 107, 74, 0.12), 0 12px 30px rgba(20, 64, 48, 0.08);
  background: linear-gradient(180deg, #ffffff 0%, #f5fbf8 100%);
  outline: none;
}
.project-ai-design-detail {
  display: grid;
  gap: 12px;
}
.project-ai-design-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  display: grid;
  gap: 10px;
}
.project-ai-design-section header,
.project-ai-design-bucket-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.project-ai-design-section h4 {
  margin: 0;
  font-size: 15px;
}
.project-ai-design-section header span,
.project-ai-design-bucket-head span {
  border-radius: 999px;
  padding: 3px 8px;
  background: #f3f6f4;
  color: var(--muted);
  white-space: nowrap;
}
.project-ai-design-buckets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.project-ai-design-bucket {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fcfdfc;
  display: grid;
  gap: 8px;
  min-width: 0;
}
.project-ai-material-space-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.project-ai-material-space-tabs button {
  border: 1px solid var(--line);
  border-radius: 999px;
  min-height: 28px;
  padding: 0 10px;
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.project-ai-material-space-tabs button.selected,
.project-ai-material-space-tabs button:hover,
.project-ai-material-space-tabs button:focus-visible {
  border-color: var(--green);
  background: #edf7f1;
  color: var(--green-dark);
  outline: none;
}

.project-ai-library-workbench {
  grid-template-columns: minmax(240px, 0.22fr) minmax(0, 1fr);
  gap: 14px;
  min-height: min(45vh, 520px);
}

.project-ai-library-workbench--detail {
  min-height: min(60vh, 680px);
}

.project-ai-input-panel,
.project-ai-output-panel {
  min-width: 0;
  border: 1px solid rgba(126, 211, 242, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.015)),
    rgba(4, 18, 30, 0.76);
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 12px;
  overflow: hidden;
}

.project-ai-input-folder-list {
  display: grid;
  gap: 12px;
  align-content: start;
}

.project-ai-source-folder-card {
  aspect-ratio: 3 / 1;
  border: 1px solid rgba(126, 211, 242, 0.25);
  border-radius: 8px;
  padding: 12px 14px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.014)),
    rgba(3, 15, 26, 0.82);
  color: inherit;
  text-align: left;
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  cursor: pointer;
  overflow: hidden;
}

.project-ai-source-folder-card:hover,
.project-ai-source-folder-card:focus-visible,
.project-ai-output-tabs button:hover,
.project-ai-output-tabs button:focus-visible,
.project-ai-output-tabs button.selected {
  border-color: rgba(80, 205, 231, 0.62);
  box-shadow: inset 0 0 0 1px rgba(80, 205, 231, 0.14), 0 10px 22px rgba(0, 12, 24, 0.22);
  outline: none;
}

.project-ai-source-folder-preview {
  grid-row: 1 / -1;
  width: 76px;
  height: 52px;
  display: block;
  position: relative;
}

.project-ai-source-folder-preview .project-site-folder-stack {
  width: 76px;
  height: 52px;
}

.project-ai-source-folder-card strong,
.project-ai-source-folder-card small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-ai-source-folder-card strong {
  color: rgba(238, 250, 252, 0.96);
  font-size: clamp(17px, 1vw, 22px);
}

.project-ai-source-folder-card small {
  color: var(--muted);
  font-size: 12px;
}

.project-ai-output-panel {
  min-height: 100%;
}

.project-ai-output-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.project-ai-output-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.project-ai-output-tabs button {
  border: 1px solid rgba(126, 211, 242, 0.24);
  border-radius: 8px;
  min-height: 32px;
  padding: 0 14px;
  background: rgba(2, 14, 24, 0.68);
  color: rgba(216, 235, 240, 0.88);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.project-ai-output-tabs button.selected {
  color: #eafaff;
  background: rgba(7, 33, 47, 0.92);
}

.project-ai-output-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.project-ai-output-folder-frame {
  min-height: 0;
  display: grid;
}

.project-ai-output-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-auto-rows: auto;
  align-items: start;
  min-height: min(36vh, 430px);
}

.project-ai-file-card {
  aspect-ratio: 4 / 3;
  grid-template-rows: minmax(0, 1fr) auto;
  align-self: start;
  min-height: 0;
}

.project-ai-file-card > span {
  aspect-ratio: auto;
  height: auto;
  min-height: 0;
}

.project-ai-file-card > span b {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.project-ai-file-card > span > video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.project-ai-file-card small {
  min-height: 0;
  max-height: 30px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-ai-folder-card.is-file-drop-target,
.project-ai-folder-library.is-file-drop-target,
.project-ai-output-grid.is-file-drop-target {
  border-color: rgba(80, 205, 231, 0.8);
  box-shadow: inset 0 0 0 2px rgba(80, 205, 231, 0.22);
}

.project-ai-folder-library.is-selecting .project-ai-file-card {
  cursor: copy;
}

.project-ai-folder-modal {
  padding: 14px 18px;
}

.project-ai-folder-modal .project-module-detail-dialog {
  width: min(1500px, calc(100vw - var(--mf-sidebar-width, 0px) - 44px));
  max-height: calc(100vh - 32px);
  padding: 12px;
}

.project-ai-folder-modal .project-module-detail-body,
.project-ai-folder-modal .project-site-folder-library-layout--single {
  min-height: min(74vh, 760px);
}

.project-ai-folder-modal .project-site-folder-library {
  gap: 10px;
}

.project-ai-folder-modal .project-site-folder-library-layout {
  min-height: min(72vh, 740px);
}

.project-ai-folder-modal .project-design-folder-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.project-material-preview-sync {
  border: 1px solid rgba(126, 211, 242, 0.26);
  border-radius: 8px;
  padding: 10px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.014)),
    rgba(4, 19, 31, 0.86);
  display: grid;
  gap: 8px;
}

.project-material-preview-sync span,
.project-material-preview-sync small {
  color: var(--muted);
}

.project-build-steps {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
}
.project-build-steps span {
  display: grid;
  gap: 6px;
  justify-items: center;
  text-align: center;
}
.project-build-steps b {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--muted);
  background: #fff;
}
.project-build-steps .active b {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}
.project-construction-stage-board {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}
.project-construction-stage-board > button,
.project-construction-stage-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 10px;
  display: grid;
  gap: 6px;
  color: var(--muted);
  font: inherit;
  text-align: center;
  min-width: 0;
}
.project-construction-stage-board > button {
  cursor: pointer;
}
.project-construction-stage-board > button:hover,
.project-construction-stage-board > button:focus-visible {
  border-color: var(--green);
  box-shadow: 0 10px 22px rgba(22, 107, 74, 0.1);
  outline: none;
}
.project-construction-stage-board b,
.project-construction-stage-card b {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
}
.project-construction-stage-board .active b,
.project-construction-stage-card:first-child b {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.project-construction-stage-board span,
.project-construction-stage-card strong {
  color: var(--ink);
  font-weight: 800;
  overflow-wrap: anywhere;
}
.project-construction-stage-board small,
.project-construction-stage-card small {
  font-size: 11px;
  color: var(--muted);
}
.project-construction-detail {
  display: grid;
  gap: 12px;
}
.project-construction-stage-board.detail {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.project-construction-stage-card {
  text-align: left;
  align-content: start;
}
.project-construction-stage-card > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.project-construction-stage-card b {
  margin: 0;
}
.construction-progress-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.construction-progress-overview div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfb;
  display: grid;
  gap: 4px;
}
.construction-progress-overview span {
  font-size: 11px;
  color: var(--muted);
}
.construction-progress-overview strong {
  font-size: 18px;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.construction-summary-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfb;
  display: grid;
  gap: 4px;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease, background .16s ease;
}
.construction-summary-card span {
  font-size: 11px;
  color: var(--muted);
}
.construction-summary-card strong {
  font-size: 18px;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.construction-summary-card:hover,
.construction-summary-card:focus-visible {
  border-color: rgba(22, 107, 74, 0.42);
  background: linear-gradient(180deg, #ffffff 0%, #f4faf7 100%);
  box-shadow: 0 8px 22px rgba(20, 64, 48, 0.08);
  transform: translateY(-1px);
  outline: none;
}
.construction-summary-auto {
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}
.project-construction-water-board {
  min-width: 0;
}

.project-dashboard-bottom-card--construction .construction-progress-overview {
  gap: 6px;
  margin-bottom: 4px;
}

.construction-dashboard-progress-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: end;
}

.construction-dashboard-progress-head div {
  display: grid;
  gap: 2px;
}

.construction-dashboard-progress-head span,
.construction-dashboard-progress-head small {
  color: var(--muted);
  font-size: 12px;
}

.construction-dashboard-progress-head strong {
  color: rgba(235, 248, 252, 0.96);
  font-size: 24px;
  line-height: 1;
}

.construction-dashboard-progress-head small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-dashboard-bottom-card--construction .construction-summary-card {
  min-height: 54px;
  padding: 7px 8px;
  gap: 2px;
}

.project-dashboard-bottom-card--construction .construction-summary-card strong {
  font-size: 15px;
}

.project-dashboard-bottom-card--construction .construction-summary-card span {
  font-size: 10px;
}

.project-dashboard-bottom-card--construction .construction-step-timeline {
  padding: 10px 0 0;
}

.project-dashboard-bottom-card--construction .construction-step-timeline::before {
  top: 29px;
  height: 6px;
  left: 6%;
  right: 6%;
  border-radius: 999px;
  background: rgba(216, 226, 222, 0.32);
}

.project-dashboard-bottom-card--construction .construction-step-timeline::after {
  content: "";
  position: absolute;
  left: 6%;
  top: 29px;
  width: calc((88%) * var(--timeline-progress, 0) / 100);
  height: 6px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(73, 205, 156, 0.92), rgba(243, 211, 95, 0.95), rgba(73, 205, 156, 0.92));
  background-size: 180% 100%;
  animation: construction-progress-flow 1.8s linear infinite;
  z-index: -1;
}

.project-dashboard-bottom-card--construction .construction-step-progress-fill {
  left: 6%;
  top: 29px;
  width: calc(88% * var(--timeline-progress-visible, var(--timeline-progress, 0)) / 100);
  height: 6px;
  background:
    linear-gradient(90deg, rgba(73, 205, 156, 0.96), rgba(243, 211, 95, 0.96), rgba(73, 205, 156, 0.96));
  background-size: 180% 100%;
  animation: construction-progress-flow 1.8s linear infinite;
}

.project-dashboard-bottom-card--construction .construction-step-node {
  gap: 8px;
  padding: 0 4px;
}

.project-dashboard-bottom-card--construction .construction-step-dot {
  width: 42px;
  height: 42px;
  border-width: 2px;
  font-size: 16px;
}

.project-dashboard-bottom-card--construction .construction-step-name {
  min-height: 28px;
  max-width: 86px;
  font-size: 12px;
  line-height: 1.12;
  color: rgba(235, 248, 252, 0.9);
}

.project-dashboard-bottom-card--construction .construction-step-percent {
  display: none;
}

.project-dashboard-bottom-card--construction .construction-step-percent b {
  font-size: 10px;
}

.project-dashboard-bottom-card--construction .construction-step-node small {
  display: none;
}

@keyframes construction-progress-flow {
  from { background-position: 0 0; }
  to { background-position: 180% 0; }
}

.construction-total-percent {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.construction-review-queue {
  border: 1px solid rgba(22, 107, 74, 0.22);
  border-radius: 8px;
  padding: 12px;
  background: #f8fbf8;
  display: grid;
  gap: 10px;
}
.construction-review-head,
.construction-review-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}
.construction-review-head strong,
.construction-review-head small {
  display: block;
}
.construction-review-head small {
  color: var(--muted);
  font-size: 12px;
}
.construction-review-accounts {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 420px;
}
.construction-review-accounts span,
.construction-review-account {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.construction-review-account {
  color: var(--green);
  border-color: rgba(22, 107, 74, 0.18);
}
.construction-review-list {
  display: grid;
  gap: 8px;
}
.construction-review-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}
.construction-review-item b,
.construction-review-item strong,
.construction-review-item small {
  display: block;
}
.construction-review-item b {
  color: var(--green);
  font-size: 12px;
}
.construction-review-item small {
  color: var(--muted);
  margin-top: 3px;
}
.construction-review-files {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 360px;
}
.construction-review-files span {
  border: 1px solid #e7ece8;
  border-radius: 6px;
  padding: 5px 7px;
  background: #f8faf8;
  color: var(--muted);
  font-size: 12px;
}

.construction-step-timeline {
  --step-count: 7;
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--step-count), minmax(0, 1fr));
  gap: 0;
  align-items: start;
  padding: 6px 4px 2px;
  isolation: isolate;
}

.construction-step-timeline::before {
  content: "";
  position: absolute;
  left: 7%;
  right: 7%;
  top: 24px;
  height: 2px;
  background: linear-gradient(90deg, rgba(13, 78, 59, 0.28), rgba(200, 210, 205, 0.7), rgba(200, 210, 205, 0.45));
  z-index: -1;
}

.construction-step-progress-fill {
  position: absolute;
  left: 7%;
  top: 24px;
  width: calc(86% * var(--timeline-progress-visible, var(--timeline-progress, 0)) / 100);
  min-width: 0;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(73, 205, 156, 0.95), rgba(243, 211, 95, 0.92));
  box-shadow: 0 0 14px rgba(73, 205, 156, 0.35);
  pointer-events: none;
  z-index: 0;
}

.construction-step-timeline.compact {
  padding: 4px 0 0;
}

.construction-step-node {
  position: relative;
  z-index: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0 5px;
  display: grid;
  justify-items: center;
  gap: 5px;
  text-align: center;
  cursor: pointer;
  font: inherit;
}

.construction-step-node:hover,
.construction-step-node:focus-visible {
  outline: none;
}

.construction-step-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #7d8982;
  background: rgba(255, 255, 255, 0.94);
  border: 2px solid #d9e0dc;
  box-shadow: 0 3px 10px rgba(28, 64, 52, 0.08);
  font-weight: 900;
  font-size: 15px;
}

.construction-step-node.active .construction-step-dot,
.construction-step-node.complete .construction-step-dot {
  color: #fff;
  border-color: rgba(4, 77, 56, 0.72);
  background: radial-gradient(circle at 35% 24%, #2e8f6b, #07543d 70%);
  box-shadow: 0 9px 20px rgba(8, 78, 58, 0.22);
}

.construction-step-node.review .construction-step-dot {
  color: #9a6b00;
  border-color: rgba(216, 156, 45, 0.48);
  background: #fff8e8;
}

.construction-step-node.rework .construction-step-dot {
  color: #b24b45;
  border-color: rgba(178, 63, 63, 0.45);
  background: #fff0ee;
}

.construction-step-name {
  min-height: 32px;
  max-width: 86px;
  display: grid;
  place-items: start center;
  color: #132f27;
  font-size: 13px;
  line-height: 1.22;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.construction-step-percent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #0f3a32;
}

.construction-step-percent b {
  font-size: 12px;
  line-height: 1;
}

.construction-step-node small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
}

.construction-step-node.active .construction-step-name,
.construction-step-node.active .construction-step-percent b {
  color: var(--green);
}

.construction-water-drop {
  --drop-fill: 0%;
  position: relative;
  width: 28px;
  height: 28px;
  display: inline-block;
  overflow: hidden;
  border: 1px solid rgba(107, 188, 231, 0.42);
  border-radius: 56% 56% 58% 58%;
  transform: rotate(45deg);
  background:
    radial-gradient(circle at 28% 20%, rgba(255, 255, 255, 0.98), transparent 22%),
    linear-gradient(135deg, rgba(219, 244, 255, 0.46), rgba(154, 214, 247, 0.12));
  box-shadow:
    inset 4px 4px 10px rgba(255, 255, 255, 0.72),
    inset -5px -6px 12px rgba(84, 169, 217, 0.18),
    0 6px 14px rgba(68, 154, 205, 0.14);
}

.construction-water-drop.mini {
  width: 17px;
  height: 17px;
  box-shadow:
    inset 3px 3px 7px rgba(255, 255, 255, 0.72),
    inset -3px -4px 8px rgba(84, 169, 217, 0.18),
    0 3px 8px rgba(68, 154, 205, 0.13);
}

.construction-water-drop.tiny {
  width: 20px;
  height: 20px;
}

.construction-drop-fill {
  position: absolute;
  left: -3px;
  right: -3px;
  bottom: -3px;
  height: var(--drop-fill);
  background:
    linear-gradient(180deg, rgba(188, 231, 255, 0.38), rgba(79, 178, 235, 0.58)),
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.62), transparent 42%);
  transition: height 0.24s ease;
}

.construction-drop-gloss {
  position: absolute;
  width: 38%;
  height: 22%;
  left: 18%;
  top: 16%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  filter: blur(0.4px);
}

.construction-water-percent {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.construction-water-card {
  --water: 0%;
  min-height: 122px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 12px;
  display: grid;
  align-content: space-between;
  gap: 6px;
  text-align: left;
  cursor: pointer;
  font: inherit;
  isolation: isolate;
}
.construction-water-card:hover,
.construction-water-card:focus-visible {
  border-color: var(--green);
  box-shadow: 0 12px 28px rgba(24, 98, 70, 0.12);
  outline: none;
}
.construction-water-card.current {
  border-color: var(--green);
  box-shadow: inset 0 0 0 1px rgba(24, 98, 70, 0.25);
}
.construction-water-fill {
  position: absolute;
  inset: auto 0 0 0;
  height: var(--water);
  min-height: 4px;
  background: linear-gradient(180deg, rgba(44, 135, 99, 0.08), rgba(44, 135, 99, 0.22));
  z-index: -1;
  transition: height 0.2s ease;
}
.construction-water-card.review .construction-water-fill {
  background: linear-gradient(180deg, rgba(198, 133, 34, 0.08), rgba(198, 133, 34, 0.22));
}
.construction-water-card.rework {
  border-color: rgba(178, 63, 63, 0.45);
}
.construction-water-card.rework .construction-water-fill {
  background: linear-gradient(180deg, rgba(178, 63, 63, 0.06), rgba(178, 63, 63, 0.2));
}
.construction-water-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: start;
}
.construction-water-top strong {
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.construction-water-top em,
.construction-water-alerts i {
  border-radius: 999px;
  background: rgba(24, 98, 70, 0.08);
  color: var(--green);
  padding: 2px 7px;
  font-style: normal;
  font-size: 11px;
  white-space: nowrap;
}
.construction-water-card b {
  font-size: 24px;
  line-height: 1;
}
.construction-water-card small,
.construction-water-alerts {
  font-size: 11px;
  color: var(--muted);
}
.construction-water-alerts {
  min-height: 20px;
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.construction-water-alerts .danger,
.construction-water-card.rework .construction-water-top em {
  background: rgba(178, 63, 63, 0.1);
  color: var(--red);
}
.construction-stage-drawer {
  min-height: 520px;
}
.construction-detail-shell {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 12px;
}

.construction-detail-shell--timeline {
  grid-template-columns: 1fr;
}

.construction-detail-shell--timeline .construction-step-timeline {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, #ffffff, #fbfcfb),
    radial-gradient(circle at 12% 0%, rgba(37, 126, 91, 0.08), transparent 30%);
  padding: 14px 8px 10px;
  box-shadow: 0 10px 26px rgba(31, 67, 52, 0.05);
}
.construction-stage-nav {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 8px;
  display: grid;
  gap: 6px;
  align-content: start;
}
.construction-stage-nav button {
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  padding: 9px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 8px;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
}
.construction-stage-nav button.active,
.construction-stage-nav button:hover,
.construction-stage-nav button:focus-visible {
  border-color: rgba(24, 98, 70, 0.25);
  background: rgba(24, 98, 70, 0.07);
  outline: none;
}
.construction-stage-nav b {
  grid-row: span 2;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--green);
  color: #fff;
  font-size: 12px;
}
.construction-stage-nav span {
  font-weight: 800;
  overflow-wrap: anywhere;
}
.construction-stage-nav small {
  color: var(--muted);
  font-size: 11px;
}
.construction-stage-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

@media (max-width: 980px) {
  .construction-step-timeline {
    grid-template-columns: repeat(var(--step-count), minmax(92px, 1fr));
    overflow-x: auto;
    padding-bottom: 6px;
  }

  .construction-step-timeline::before {
    left: 46px;
    right: 46px;
  }
}

.construction-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  margin-bottom: 12px;
}
.construction-tabs button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(2, 17, 28, 0.42);
  padding: 6px 12px;
  font: inherit;
  color: var(--muted);
}
.construction-tabs button.active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.construction-material-reader {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 20, 31, 0.62);
  padding: 12px;
  display: grid;
  gap: 12px;
}
.construction-material-reader-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.construction-material-reader-head strong {
  display: block;
  color: var(--ink);
}
.construction-material-reader-head small {
  color: var(--muted);
  font-size: 12px;
}
.construction-material-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.construction-material-readonly-card {
  min-height: 176px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 20, 31, 0.72);
  padding: 8px;
  display: grid;
  grid-template-rows: 104px auto auto auto;
  gap: 6px;
  text-align: left;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
.construction-material-readonly-card.empty {
  cursor: default;
  border-style: dashed;
  color: var(--muted);
  background: rgba(2, 17, 28, 0.34);
}
.construction-material-thumb {
  border-radius: 8px;
  overflow: hidden;
  background: rgba(0, 10, 18, 0.7);
  display: grid;
  place-items: center;
}
.construction-material-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.construction-material-thumb span {
  color: var(--green);
  font-weight: 900;
}
.construction-material-readonly-card strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.construction-material-readonly-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.construction-material-pager {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}
.construction-task-board {
  display: grid;
  gap: 12px;
}
.construction-stage-brief,
.construction-section-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.construction-stage-brief strong,
.construction-section-head strong {
  display: block;
  color: var(--ink);
}
.construction-stage-brief small,
.construction-section-head small {
  color: var(--muted);
  font-size: 12px;
}
.construction-task-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.construction-task-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 20, 31, 0.72);
  padding: 12px;
  display: grid;
  gap: 9px;
}
.construction-task-card.blocked {
  border-color: rgba(178, 63, 63, 0.4);
  background: rgba(96, 21, 21, 0.18);
}
.construction-task-main {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.construction-task-main strong {
  display: block;
  overflow-wrap: anywhere;
}
.construction-task-main small,
.construction-task-meta,
.construction-task-card li {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.construction-task-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.construction-task-card ul {
  margin: 0;
  padding-left: 16px;
}
.construction-task-skip-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 8px;
  border-radius: 8px;
  background: rgba(2, 17, 28, 0.38);
  border: 1px solid rgba(126, 211, 242, 0.18);
}
.construction-task-skip-options span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.construction-task-skip-options .tiny {
  min-height: 26px;
  padding: 0 9px;
  font-size: 12px;
}
.construction-review-note {
  margin: 0;
  border-left: 3px solid var(--amber);
  padding: 6px 8px;
  background: rgba(198, 133, 34, 0.08);
  color: var(--ink);
  font-size: 12px;
}
.construction-task-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.construction-action-hint {
  align-self: center;
  color: var(--muted);
  font-size: 12px;
}

.construction-task-card--preview {
  min-height: 168px;
  aspect-ratio: 3 / 4;
  padding: 18px 12px 12px;
  justify-items: center;
  align-content: stretch;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.construction-task-card--preview:hover,
.construction-task-card--preview:focus-visible {
  border-color: rgba(80, 205, 231, 0.58);
  box-shadow: inset 0 0 0 1px rgba(80, 205, 231, 0.18), 0 12px 24px rgba(5, 16, 27, 0.22);
  transform: translateY(-1px);
  outline: none;
}

.construction-task-card--preview.overdue {
  border-color: rgba(239, 91, 91, 0.58);
  background: linear-gradient(145deg, rgba(122, 20, 20, 0.2), rgba(5, 20, 31, 0.72));
}

.construction-task-card--preview.completed {
  border-color: rgba(82, 196, 142, 0.42);
}

.construction-task-card .status-pill.pending,
.construction-task-card .status-pill.review,
.construction-task-card .status-pill.rework,
.construction-task-card .status-pill.overdue,
.construction-task-card .status-pill.completed {
  background: rgba(2, 17, 28, 0.7);
  border: 1px solid rgba(126, 211, 242, 0.22);
  color: var(--ink);
}

.construction-task-card .status-pill.overdue,
.construction-task-card .status-pill.rework {
  border-color: rgba(239, 91, 91, 0.42);
  color: #ff9a91;
}

.construction-task-card .status-pill.completed {
  border-color: rgba(82, 196, 142, 0.42);
  color: #7fe3a6;
}

.construction-task-card .status-pill.review {
  border-color: rgba(242, 210, 122, 0.42);
  color: #f2d27a;
}

.construction-task-preview-title {
  width: 100%;
  min-height: 62px;
  display: grid;
  place-items: center;
  font-size: 24px;
  line-height: 1.22;
  overflow-wrap: anywhere;
  color: var(--ink);
}

.construction-task-preview-time {
  display: grid;
  place-items: center;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 800;
  font-size: 13px;
  line-height: 1.4;
  align-self: center;
}

.construction-task-preview-status {
  color: var(--ink);
  font-size: 21px;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 6px;
}

.construction-task-preview-status-bar {
  width: 76%;
  height: 8px;
  border-radius: 999px;
  background: rgba(236, 246, 248, 0.92);
  box-shadow: 0 0 12px rgba(236, 246, 248, 0.16);
}

.construction-task-preview-status-bar.active {
  background: #23c778;
  box-shadow: 0 0 14px rgba(35, 199, 120, 0.2);
}

.construction-task-preview-status-bar.overdue {
  background: #ef5b5b;
  box-shadow: 0 0 14px rgba(239, 91, 91, 0.24);
}

.construction-task-dialog {
  position: relative;
}

.construction-task-delete-confirm {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  padding: 18px;
  border-radius: inherit;
  background: rgba(1, 10, 18, 0.72);
  backdrop-filter: blur(8px);
}

.construction-task-delete-confirm-card {
  width: min(360px, 100%);
  border: 1px solid rgba(239, 91, 91, 0.36);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(18, 38, 50, 0.98), rgba(5, 20, 31, 0.98));
  box-shadow: 0 18px 42px rgba(1, 10, 18, 0.38);
  padding: 16px;
  display: grid;
  gap: 12px;
}

.construction-task-delete-confirm-card strong {
  color: var(--ink);
  font-size: 17px;
}

.construction-task-delete-confirm-card small {
  color: var(--muted);
  line-height: 1.5;
}

.construction-task-delete-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.construction-expanded-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 20, 31, 0.66);
  padding: 12px 14px;
}

.construction-expanded-head strong {
  display: block;
  font-size: 16px;
}

.construction-expanded-head small {
  color: var(--muted);
  font-size: 12px;
}

.project-task-list-body {
  display: grid;
  gap: 12px;
}
.project-task-list-detail {
  display: grid;
  gap: 12px;
}
.project-task-list-summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid rgba(126, 211, 242, 0.22);
  border-radius: 8px;
  background: rgba(5, 20, 31, 0.72);
}
.project-task-list-summary strong,
.project-task-stage-head strong {
  display: block;
  color: var(--ink);
}
.project-task-list-summary small,
.project-task-stage-head small {
  color: var(--muted);
  font-size: 12px;
}
.project-task-stage-list {
  display: grid;
  gap: 12px;
}
.project-task-stage {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 20, 31, 0.62);
  padding: 12px;
  display: grid;
  gap: 10px;
}
.project-task-stage-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.project-task-stage-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.project-task-stage-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.danger-action {
  color: var(--red);
  border-color: rgba(178, 63, 63, 0.3);
}
.construction-stage-materials {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.construction-task-modal-body {
  display: grid;
  gap: 12px;
}
.construction-task-modal-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.construction-task-modal-summary div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 20, 31, 0.72);
  padding: 10px;
}
.construction-task-modal-summary small {
  display: block;
  color: var(--muted);
  margin-bottom: 4px;
}
.construction-task-modal-summary strong {
  overflow-wrap: anywhere;
}
.construction-task-modal-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 20, 31, 0.72);
  padding: 12px;
  display: grid;
  gap: 10px;
}
.construction-task-modal-card h3,
.construction-task-modal-card p {
  margin: 0;
}
.construction-task-simple-detail {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 20, 31, 0.72);
  padding: 14px;
  display: grid;
  gap: 14px;
}
.construction-task-simple-detail h3 {
  margin: 0;
  text-align: center;
  font-size: 24px;
  line-height: 1.3;
}
.construction-task-simple-detail label {
  display: grid;
  gap: 8px;
}
.construction-task-simple-detail label span {
  color: var(--ink);
  font-weight: 900;
}
.construction-task-simple-detail label div {
  min-height: 84px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(2, 17, 28, 0.54);
  padding: 10px;
  color: var(--muted);
  line-height: 1.55;
}
.construction-task-simple-detail p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.construction-task-simple-detail p strong {
  color: var(--ink);
}
.construction-task-edit-detail {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 20, 31, 0.72);
  padding: 14px;
  display: grid;
  gap: 12px;
}
.construction-task-edit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.construction-task-edit-detail label {
  min-width: 0;
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}
.construction-task-edit-detail input,
.construction-task-edit-detail select,
.construction-task-edit-detail textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(126, 211, 242, 0.22);
  border-radius: 6px;
  background: rgba(2, 17, 28, 0.72);
  color: var(--ink);
  padding: 8px 10px;
  font: inherit;
}
.construction-task-edit-detail textarea {
  resize: vertical;
}
.construction-task-editor-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.construction-task-editor-footer small {
  color: var(--muted);
  text-align: right;
}
.construction-task-modal-card p,
.construction-task-modal-card li,
.construction-task-note-field span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.construction-task-space-field {
  display: grid;
  gap: 5px;
  max-width: 220px;
  margin: 4px 0 2px;
}
.construction-task-space-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.construction-task-evidence-list {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  list-style: none;
}
.construction-task-evidence-list li,
.construction-task-file-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 8px 10px;
}
.construction-task-evidence-list small,
.construction-task-file-row small {
  color: var(--muted);
}

.construction-task-evidence-gallery {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(126, 211, 242, 0.18);
  border-radius: 8px;
  background: rgba(4, 22, 31, 0.34);
  padding: 10px;
}

.construction-task-evidence-gallery > strong {
  color: var(--ink);
  font-size: 13px;
}

.construction-task-evidence-gallery.is-empty small {
  color: var(--muted);
}

.construction-task-evidence-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(116px, 1fr));
  gap: 8px;
}

.construction-task-evidence-item {
  min-width: 0;
  border: 1px solid rgba(126, 211, 242, 0.18);
  border-radius: 8px;
  background: rgba(3, 16, 26, 0.68);
  color: var(--ink);
  padding: 6px;
  display: grid;
  gap: 6px;
  text-align: left;
  cursor: pointer;
}

.construction-task-evidence-item img,
.construction-task-evidence-item > span {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.28);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 800;
}

.construction-task-evidence-item small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}
.construction-review-note.approved {
  border-color: var(--green);
  background: rgba(47, 125, 91, 0.08);
}
.construction-review-note.rework {
  border-color: var(--red);
  background: rgba(178, 63, 63, 0.08);
}
.construction-task-note-field {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}
.construction-task-upload-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.construction-task-dropzone {
  min-height: 88px;
  border: 1px dashed rgba(47, 125, 91, 0.35);
  border-radius: 8px;
  background: rgba(5, 20, 31, 0.72);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 16px;
  cursor: pointer;
}
.construction-task-dropzone input {
  display: none;
}
.construction-task-dropzone.drag-over {
  border-color: var(--green);
  background: rgba(47, 125, 91, 0.08);
}
.construction-task-dropzone strong {
  display: block;
  margin-bottom: 4px;
}
.construction-task-file-preview {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
}
.construction-task-file-preview small {
  color: var(--muted);
}
.project-ai-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.project-ai-stats div {
  padding: 12px;
  border-right: 1px solid var(--line);
  background: #fbfcfb;
}
.project-ai-stats div:last-child {
  border-right: 0;
}
.project-ai-stats strong {
  display: block;
  font-size: 23px;
  margin-top: 6px;
}
.project-ai-stats span {
  margin-left: 4px;
  color: var(--muted);
}
.project-ai-production-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(150px, 0.85fr);
  gap: 12px;
  align-items: stretch;
}
.project-ai-latest-block {
  display: grid;
  gap: 6px;
  align-content: start;
  min-width: 0;
}
.project-ai-latest-block > small {
  color: var(--muted);
}
.project-ai-latest-block > strong {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.project-ai-latest-preview {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  background: #fbfcfb;
  overflow: hidden;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  min-height: 78px;
  display: grid;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.project-ai-latest-preview:hover,
.project-ai-latest-preview:focus-visible {
  border-color: var(--green);
  box-shadow: 0 10px 22px rgba(22, 107, 74, 0.11);
  outline: none;
}
.project-ai-latest-preview.is-empty {
  cursor: default;
}
.project-ai-latest-preview > span {
  min-height: 52px;
  display: grid;
  place-items: center;
  background: #edf1ee;
  color: var(--green);
  font-weight: 800;
}
.project-ai-latest-preview img {
  width: 100%;
  height: 72px;
  object-fit: cover;
  display: block;
}
.project-ai-latest-preview small {
  padding: 6px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.project-detail-full { min-height: calc(100vh - 150px); }
.project-detail-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.project-profile-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
  background: #fff;
  display: grid;
  gap: 10px;
}
.project-profile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.project-profile-head h4 {
  margin: 0 0 4px;
}
.project-profile-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.project-profile-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  min-width: 0;
  background: #f8faf8;
}
.project-profile-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 4px;
}
.project-profile-grid strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 13px;
}
.project-profile-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.project-create-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(31, 45, 43, 0.34);
  display: grid;
  place-items: center;
  padding: 20px;
}
.project-create-dialog {
  width: min(840px, calc(100vw - 36px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 22px 60px rgba(31, 45, 43, 0.22);
  padding: 16px;
}
.project-create-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.project-note-field {
  margin-top: 12px;
}
.project-modal-actions {
  position: sticky;
  bottom: -16px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  padding-bottom: 2px;
  background: linear-gradient(180deg, rgba(255,255,255,0.72), var(--surface) 36%);
}
.project-main-flow-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  margin-top: 14px;
  background: #fff;
  display: grid;
  gap: 10px;
}
.project-main-flow-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.project-main-flow-head h4 {
  margin: 0 0 3px;
}
.project-main-flow-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.project-main-flow-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfb;
  display: grid;
  gap: 7px;
  min-width: 0;
  align-content: start;
}
.project-main-flow-card h5 {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
}
.project-main-flow-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.project-main-flow-card small {
  font-size: 11px;
}
.project-main-flow-card button {
  width: 100%;
}
.project-main-flow-guards {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.project-context-handoff-banner {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbf9;
  padding: 10px 12px;
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.project-context-handoff-banner strong {
  display: block;
  font-size: 13px;
  color: var(--ink);
}
.project-context-handoff-banner small {
  color: var(--muted);
  overflow-wrap: anywhere;
}
.project-context-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}
.project-branch-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.project-branch-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  display: grid;
  gap: 4px;
  text-align: left;
  min-height: 98px;
  cursor: pointer;
}
.project-branch-card:hover:not(:disabled) {
  border-color: var(--green);
  box-shadow: inset 0 0 0 1px var(--green);
}
.project-branch-card.disabled,
.project-branch-card:disabled {
  opacity: 0.72;
  background: #f7f7f4;
  cursor: not-allowed;
}
.branch-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.branch-icon { font-size: 22px; }
.branch-state-label {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.branch-count { font-size: 12px; color: var(--muted); }
.asset-folder, .case-card { min-height: 104px; display: grid; gap: 6px; align-content: start; }
.asset-folder b, .case-card b { color: var(--teal); }
.case-card span { color: var(--muted); }

.form-grid, .quote-box {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}
label { display: grid; gap: 6px; color: var(--muted); }
select, input, textarea {
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  color: var(--ink);
}
textarea {
  min-height: 86px;
  padding: 10px;
  resize: vertical;
}

.queue-list { margin-top: 14px; display: grid; gap: 10px; }
.queue-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.status.helper { color: var(--teal); background: #e8f4f2; }
.status.boss { color: var(--amber); background: #fff5df; }
.status.failed { color: var(--red); background: #fff0ef; }
.settings-list { display: grid; gap: 12px; }
.settings-list label { display: flex; align-items: center; color: var(--ink); }
.settings-list input { width: 18px; height: 18px; }

.hidden { display: none !important; }

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  background: #1f2d2b;
  color: #fff;
  padding: 10px 12px;
  border-radius: 8px;
  opacity: 0;
  transform: translateY(8px);
  transition: 0.2s ease;
  pointer-events: none;
  z-index: 2147483647; /* 始终浮在所有弹窗(含 2400 任务卡弹窗)之上，避免「保存」校验提示被弹窗盖住看不到 */
}
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 1180px) {
  .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .module-card.primary,
  .module-card.secondary,
  .module-card.support { grid-column: span 1; }
  .project-profile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-dashboard-tools { grid-template-columns: 1fr; }
  .project-dashboard-tool-group {
    max-width: none;
  }
  .project-alert-button,
  .project-user-menu { justify-self: end; }
  .project-account-switcher,
  #newProjectBtn { min-width: 0; }
  .project-dashboard-layout { grid-template-columns: 1fr; }
  .project-kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-kpi-card:nth-child(2) { border-right: 0; }
  .project-dashboard-tab-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .project-dashboard-bottom-grid { grid-template-columns: minmax(0, 1fr) 118px 136px; }
  .project-dashboard-bottom-card--construction { grid-column: auto; }
  .project-material-archive-window.area-selection .project-material-subwindow-grid,
  .project-material-archive-window.area-retention .project-material-subwindow-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.construction-task-modal-card--detail label {
  display: grid;
  gap: 6px;
  margin: 0;
}

.construction-task-modal-card--detail label span {
  color: var(--ink);
  font-weight: 900;
  font-size: 13px;
}

.construction-task-custom-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.construction-task-readonly-hint {
  color: var(--muted);
}

@media (max-width: 1440px) {
  .project-dashboard-tools {
    grid-template-columns: 1fr;
  }

  .project-dashboard-tool-group {
    justify-self: stretch;
    width: 100%;
    max-width: none;
  }
}

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  .home-mode .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: sticky; top: 0; z-index: 5; height: auto; max-height: none; overflow: visible; padding: 10px 12px; gap: 10px; }
  .brand { padding: 0; }
  .brand-mark { width: 38px; height: 38px; }
  .nav-list { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .nav-item { justify-content: center; font-size: 13px; padding: 0 6px; min-height: 44px; }
  .nav-item.mobile-secondary { display: none; }
  .nav-item span { display: none; }
  .project-material-archive-grid.boss-layout {
    grid-template-areas:
      "construction"
      "retention"
      "measurement"
      "selection";
    grid-template-columns: 1fr;
  }
  .project-material-window-head {
    flex-wrap: wrap;
  }
  .project-material-window-tools,
  .project-material-window-search {
    width: 100%;
    max-width: none;
  }
  .project-material-archive-window.area-selection .project-material-subwindow-grid,
  .project-material-archive-window.area-retention .project-material-subwindow-grid {
    grid-template-columns: 1fr;
  }
  .sidebar-account { margin-top: 0; width: auto; padding: 7px 8px; }
  .account-avatar { width: 30px; height: 30px; flex-basis: 30px; }
  .account-copy strong { font-size: 12px; }
  .account-copy small { font-size: 11px; }
  .account-popover { left: 12px; top: 72px; bottom: auto; width: min(230px, calc(100vw - 24px)); }
  .sidebar-note { display: none; }
  .metric-grid, .timeline, .dashboard-grid, .work-main-flow-grid, .section-grid, .project-list, .project-main-flow-grid, .project-branch-grid, .project-profile-grid, .project-cockpit-grid, .project-mini-assets, .project-materials-panel .project-mini-assets, .project-info-list, .project-customer-row, .project-material-preview-body, .project-quote-contract, .project-quote-detail, .project-ai-production-panel, .project-ai-design-library, .project-ai-design-buckets, .project-todo-item, .project-todo-detail, .project-module-record-grid, .construction-material-gallery, .construction-task-list, .project-task-stage-grid, .construction-task-modal-summary, .construction-task-upload-panel, .asset-grid, .review-board, .content-lanes, .case-grid, .form-grid, .project-create-grid, .quote-box, .summary-strip, .upload-preview-row { grid-template-columns: 1fr; }
  .project-dashboard-topbar,
  .project-cockpit-head { flex-direction: column; align-items: stretch; }
  .project-dashboard-tools { grid-template-columns: 1fr; }
  .project-dashboard-title,
  .project-alert-button,
  .project-user-menu { justify-self: stretch; }
  .project-user-menu { justify-content: space-between; }
  .project-dashboard-tab-grid,
  .project-dashboard-bottom-grid { grid-template-columns: 1fr; }
  .project-dashboard-bottom-card--construction { grid-column: auto; }
  .project-upload-dialog-grid { grid-template-columns: 1fr; }
  .project-detail-mobile-upload { grid-row: auto; grid-column: auto; }
  .project-construction-stage-board,
  .project-construction-stage-board.detail,
  .project-ai-library-groups,
  .project-content-library-panel,
  .project-reference-material-strip .project-mini-assets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-mobile-upload-actions { flex-direction: column; }
  .project-dashboard-actions,
  .project-cockpit-actions { justify-content: stretch; min-width: 0; }
  .project-cockpit-actions button { flex: 1; }
  .project-cockpit-actions .more-action { flex: 0 0 42px; }
  .project-toolbar { width: 100%; justify-content: stretch; }
  .project-category-filter,
  .project-account-switcher,
  .project-filter-chip,
  .project-category-filter select,
  .project-account-switcher select,
  .project-filter-chip select,
  .project-user-menu select,
  #newProjectBtn { width: 100%; }
  .project-kpi-strip { grid-template-columns: 1fr; }
  .project-kpi-card { border-right: 0; border-bottom: 1px dashed var(--line); }
  .project-kpi-card:last-child { border-bottom: 0; }
  .project-card { grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; }
  .project-build-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .project-todo-item time { text-align: left; }
  .project-payment-progress { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; padding-top: 10px; }
  .project-create-modal { align-items: start; padding: 10px; }
  .project-create-dialog { width: 100%; max-height: calc(100vh - 20px); }
  .publish-status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .preview-actions { justify-content: stretch; }
  .preview-actions button { flex: 1; }
  .topbar, .top-actions { flex-direction: column; align-items: stretch; }
  .project-todo-toolbar,
  .project-todo-searchbar {
    grid-template-columns: 1fr;
    min-width: 0;
  }
  .project-todo-toolbar {
    flex-direction: column;
  }
  .project-todo-searchbar {
    display: grid;
  }
  .project-todo-category-tabs,
  .project-todo-tabs,
  .project-todo-filter-tabs,
  .project-todo-severity-tabs,
  .project-todo-tone-tabs,
  .project-todo-category-stats,
  .project-todo-stats,
  .project-todo-tone-stats {
    grid-template-columns: repeat(3, minmax(88px, 1fr));
    overflow-x: auto;
    padding-bottom: 2px;
  }
}

/* ===== 377(定稿 NY-05/NY-11) ≤820 手机六底栏 =====
   一级导航由底栏承担, 顶部 sticky 条只留品牌行: .nav-list 零尺寸收纳(容器高 0 + 项塌高不塌宽, 非 display:none)——
   无障碍树仍暴露九项原名(nav_aria_name_r323 ①(390) 合同不腐, 项宽>0 其 390 进场判据成立), Playwright isVisible=false(窄屏进场走首页模块卡既有兜底);
   底栏 position:fixed 贴底, 高亮纯 CSS 跟随 body[data-active-view](01 switchView 写入), >820 不进入本块零变化。 */
@media (max-width: 820px) {
  /* 顶条贴顶(压 42 ≤760 的 sticky→static 移动打磨): 条底量法(--mf-nav-strip-bottom)随滚稳定, 364 N2b 滚动格不腐 */
  .app-shell > .sidebar { position: sticky; top: 0; }
  /* 顶条只留品牌行: 账号钮/主题开关≤820 让位(账号区由 更多→系统设置 承担, 定稿 NY-05); 两钮 DOM 不动(各静态门钉原样),
       条高须 ≤163px 才能保证 31 抽屉高 60vh 支在 320×568 成立(364 N2c 格) */
  .sidebar-account, .sidebar .sidebar-theme-toggle { display: none; }
  .nav-list { height: 0; min-height: 0; overflow: hidden; padding: 0; border: 0; gap: 0; }
  /* 项只塌高不塌宽: 宽>0(nav_aria_name_r323 390 档进场等 nav-item width>0)且 bbox 面积 0(Playwright isVisible=false, 窄屏兜底走首页模块卡) */
  .nav-list .nav-item { height: 0; min-height: 0; padding-top: 0; padding-bottom: 0; border-top: 0; border-bottom: 0; overflow: hidden; }
  .mf-nav-bottom {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 2px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000; /* 内容之上, 浮层抽屉之下(mf-ny 抽屉 2501 / r14 operator 9000) */
    height: calc(56px + env(safe-area-inset-bottom));
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    background: var(--nav);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }
  body.mf-nav-more-open #r14-operator { visibility: hidden; pointer-events: none; }
  .mf-nav-bottom-item:hover,
  body[data-active-view="projects"] .mf-nav-bottom-item[data-view="projects"],
  body[data-active-view="aiMemory"] .mf-nav-bottom-item[data-view="aiMemory"],
  body[data-active-view="ai"] .mf-nav-bottom-item[data-view="ai"],
  body[data-active-view="marketing"] .mf-nav-bottom-item[data-view="marketing"],
  body[data-active-view="quote"] .mf-nav-bottom-item[data-view="quote"],
  body[data-active-view="home"] .mf-nav-bottom-more,
  body[data-active-view="cases"] .mf-nav-bottom-more,
  body[data-active-view="materials"] .mf-nav-bottom-more,
  body[data-active-view="settings"] .mf-nav-bottom-more {
    background: var(--nav-soft);
  }
  body[data-active-view="projects"] .mf-nav-bottom-item[data-view="projects"]::before,
  body[data-active-view="aiMemory"] .mf-nav-bottom-item[data-view="aiMemory"]::before,
  body[data-active-view="ai"] .mf-nav-bottom-item[data-view="ai"]::before,
  body[data-active-view="marketing"] .mf-nav-bottom-item[data-view="marketing"]::before,
  body[data-active-view="quote"] .mf-nav-bottom-item[data-view="quote"]::before,
  body[data-active-view="home"] .mf-nav-bottom-more::before,
  body[data-active-view="cases"] .mf-nav-bottom-more::before,
  body[data-active-view="materials"] .mf-nav-bottom-more::before,
  body[data-active-view="settings"] .mf-nav-bottom-more::before {
    background: #4bb3ff;
  }
  html[data-meifan-theme="day"] body[data-active-view="projects"] .mf-nav-bottom-item[data-view="projects"]::before,
  html[data-meifan-theme="day"] body[data-active-view="aiMemory"] .mf-nav-bottom-item[data-view="aiMemory"]::before,
  html[data-meifan-theme="day"] body[data-active-view="ai"] .mf-nav-bottom-item[data-view="ai"]::before,
  html[data-meifan-theme="day"] body[data-active-view="marketing"] .mf-nav-bottom-item[data-view="marketing"]::before,
  html[data-meifan-theme="day"] body[data-active-view="quote"] .mf-nav-bottom-item[data-view="quote"]::before,
  html[data-meifan-theme="day"] body[data-active-view="home"] .mf-nav-bottom-more::before,
  html[data-meifan-theme="day"] body[data-active-view="cases"] .mf-nav-bottom-more::before,
  html[data-meifan-theme="day"] body[data-active-view="materials"] .mf-nav-bottom-more::before,
  html[data-meifan-theme="day"] body[data-active-view="settings"] .mf-nav-bottom-more::before {
    background: #b8863b;
  }
  .mf-nav-more-panel {
    position: fixed;
    right: 8px;
    bottom: calc(64px + env(safe-area-inset-bottom));
    z-index: 2001;
    display: grid;
    gap: 4px;
    min-width: 132px;
  }
  /* DECOR8-M02: effective mobile More sheet, not a desktop shell change. */
  .mf-nav-more-panel[data-m02-ready] {
    left: 0; /* M02-width */
    right: 0;
    bottom: calc(56px + env(safe-area-inset-bottom));
    min-width: 0;
    max-height: calc(100dvh - 64px - env(safe-area-inset-bottom));
    overflow-y: auto;
    padding: 0.75px 16.375px 14px; /* M02-R1-sheet-insets */
    gap: 6px;
    border-radius: 22px 22px 0 0;
    background: var(--mf-theme-card-strong);
    color: var(--mf-theme-ink-strong);
    border-color: var(--mf-theme-line);
    backdrop-filter: blur(18px);
  }
  .mf-nav-more-panel[data-m02-ready]::before {
    content: "";
    justify-self: center;
    width: 34.25px;
    height: 4px;
    margin-bottom: -1px;
    transform: translateY(8.75px); /* M02-R1-handle */
    border-radius: 3px;
    background: var(--mf-theme-muted-soft);
  }
  .mf-nav-more-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .mf-nav-more-heading { font-size: 20px; font-weight: 600; margin-left: 1.375px; /* M02-R1-heading */ }
  .mf-nav-more-close {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    position: relative;
    transform: translateX(6px); /* M02-R1-close */
    border: 0;
    color: var(--mf-theme-ink-strong);
    background: transparent;
    font-size: 20px;
  }
  .mf-nav-more-close::before {
    content: "";
    position: absolute;
    inset: 6px;
    border: 1px solid var(--mf-theme-line);
    border-radius: 50%;
  }
  .mf-nav-more-panel[data-m02-ready] .mf-nav-more-item {
    min-height: 48px; /* M02-target */
    border: 1px solid var(--mf-theme-line);
    background: var(--mf-theme-card);
    color: var(--mf-theme-ink-strong);
    border-radius: 10px;
    gap: 24px;
    padding: 6px 14px; /* M02-R1-text */
  }
  .mf-nav-more-icon { flex: 0 0 24px; width: 24px; height: 24px; }
  .mf-nav-more-icon svg { display: block; width: 100%; height: 100%; }
  .mf-nav-more-text { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 2px; }
  .mf-nav-more-title { font-size: 15px; line-height: 18px; }
  .mf-nav-more-subtitle { font-size: 11px; line-height: 14px; color: var(--mf-theme-muted); }
  .mf-nav-more-chevron { flex: 0 0 12px; font-size: 24px; line-height: 24px; color: var(--mf-theme-muted); }
  body[data-active-view="home"] .mf-nav-more-item[data-view="home"],
  body[data-active-view="cases"] .mf-nav-more-item[data-view="cases"],
  body[data-active-view="materials"] .mf-nav-more-item[data-view="materials"],
  body[data-active-view="settings"] .mf-nav-more-item[data-view="settings"] {
    background: var(--nav-soft);
  }
  /* 底栏贴底占位: 正文尾部不被固定栏永久遮盖(栏高 56+safe-area, 14 呼吸) */
  .main,
  .home-mode .main { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
}

@media (max-width: 560px) {
  .main { padding: 14px; }
  .home-mode .main { padding: 20px 14px; }
  .home-mode .topbar {
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
    min-height: 76px;
  }
  .home-mode .topbar > div:first-child {
    min-width: 0;
    flex: 1 1 auto;
    max-width: calc(100% - 136px);
  }
  .home-mode .topbar h1 {
    font-size: 24px;
    white-space: nowrap;
  }
  .home-mode #pageSubtitle {
    display: block;
    max-width: 210px;
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.45;
    color: rgba(222, 246, 255, 0.62);
  }
  .home-account-badge {
    position: absolute;
    top: 0;
    right: 0;
    min-height: 42px;
    max-width: 128px;
    padding: 5px 9px 5px 6px;
    gap: 7px;
  }
  .home-account-avatar {
    width: 30px;
    height: 30px;
    font-size: 13px;
  }
  .home-account-badge strong {
    font-size: 12px;
  }
  .home-account-badge small {
    display: none;
  }
  /* MOBILE-UI-P2-1: 定稿 M11 首页右上只画圆形头像。≤560 名字文字改为视觉隐藏（仍在 DOM、读屏可读，整钮 aria-label 不变），
     徽标收成头像一圈——名字不再溢出 128px 盒、被 main.main 的 overflow-x:hidden 裁掉。≥561 不动。 */
  .home-account-badge .home-account-avatar + span {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .home-account-badge {
    min-width: 42px;
    justify-content: center;
    padding: 5px;
    gap: 0;
  }
  .nav-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .project-construction-stage-board,
  .project-construction-stage-board.detail,
  .project-ai-library-groups,
  .project-ai-design-buckets,
  .project-content-library-panel,
  .project-reference-material-strip .project-mini-assets,
  .project-todo-detail-item,
  .project-module-record {
    grid-template-columns: 1fr;
  }
  .project-todo-item time,
  .project-todo-detail-item time {
    text-align: left;
    white-space: normal;
  }
  .module-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .module-card {
    min-height: 94px;
    padding: 18px 20px;
  }
  .module-card.primary,
  .module-card.secondary,
  .module-card.support,
  .module-card[data-module-id="ai"],
  .module-card[data-module-id="marketing"] { min-height: 94px; }
  .module-card strong { font-size: 21px; }
  h1 { font-size: 22px; }
  .panel-head { align-items: flex-start; flex-direction: column; }
  .queue-row { grid-template-columns: 1fr; }
  .primary-action, .ghost, .quick-grid button, .segmented button, .mobile-upload-action {
    min-height: 44px;
  }
  .work-flow-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .work-flow-actions button {
    width: 100%;
  }
  .work-action-grid {
    grid-template-columns: 1fr;
  }
  .project-context-handoff-banner {
    grid-template-columns: 1fr;
  }
  .project-context-meta {
    justify-content: flex-start;
  }
  .topbar { gap: 12px; margin-bottom: 14px; }
  .top-actions { gap: 8px; }
  .publish-status-grid { grid-template-columns: 1fr; }
  .project-todo-category-tabs,
  .project-todo-tabs,
  .project-todo-filter-tabs,
  .project-todo-severity-tabs,
  .project-todo-tone-tabs,
  .project-todo-category-stats,
  .project-todo-stats,
  .project-todo-tone-stats {
    grid-template-columns: 1fr;
    overflow: visible;
  }
  .project-todo-card {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .project-todo-card-thumb {
    min-height: 150px;
  }
  .project-material-preview-modal {
    padding: 10px;
  }
  .project-material-preview-dialog {
    width: 100%;
    max-height: calc(100vh - 20px);
  }
}

/* 377: 底栏贴底占位重钉——须排在 ≤560 `.main{padding:14px}` 简写之后(简写会把 padding-bottom 重置回 14px) */
@media (max-width: 640px) {
  .main,
  .home-mode .main { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
}


@media (max-width: 520px) {
  .form-grid { grid-template-columns: 1fr !important; }
  input, select { width: 100%; min-width: 0; }
  .panel { overflow: hidden; }
  .status-pill {
    min-height: 22px;
    max-width: 100%;
    white-space: normal;
    text-align: center;
  }

  .module-status {
    justify-items: start;
    max-width: none;
  }

  .module-status small {
    text-align: left;
  }

  .placeholder-note {
    align-items: flex-start;
  }
}

/* ======= 案例分享独立库 ======= */
.case-share-panel {
  display: grid;
  gap: 12px;
}

.case-share-head {
  min-height: 38px;
}

.case-share-head small {
  color: var(--muted);
  font-size: 12px;
}

.case-share-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.35fr) repeat(4, minmax(132px, 1fr));
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf8;
}

.case-share-filters label {
  display: grid;
  gap: 5px;
  color: #2f7060;
  font-size: 12px;
  font-weight: 800;
}

.case-share-filters input,
.case-share-filters select {
  width: 100%;
  min-width: 0;
  height: 34px;
  border: 1px solid #d9e2dd;
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  font-size: 13px;
}

.case-share-library-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 2px 0;
}

.case-share-library-head small {
  color: var(--muted);
}

.case-share-card-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  gap: 18px;
  min-height: 470px;
  padding: 18px 8px 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.case-share-card {
  min-width: 0;
  min-height: 360px;
  border: 1px solid #d8e1dd;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
  display: grid;
  grid-template-rows: minmax(252px, 1fr) auto;
  padding: 0;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.case-share-card:hover {
  border-color: #2f8068;
  box-shadow: 0 12px 24px rgba(28, 56, 48, 0.1);
  transform: translateY(-2px);
}

.case-share-cover {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 14px;
  color: #173b32;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0)),
    linear-gradient(145deg, #dce9e3 0%, #a8c7bb 58%, #7ca493 100%);
}

.case-share-cover b {
  max-width: 100%;
  padding: 7px 9px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  line-height: 1.35;
}

.case-share-cover.cream {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0)),
    linear-gradient(145deg, #eee8d9 0%, #d1b98c 55%, #a58358 100%);
}

.case-share-cover.wood {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0)),
    linear-gradient(145deg, #eadfd2 0%, #c39d76 55%, #7e6047 100%);
}

.case-share-cover.rose {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0)),
    linear-gradient(145deg, #eadcdf 0%, #c88e98 56%, #8c5c65 100%);
}

.case-share-cover.stone {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0)),
    linear-gradient(145deg, #e0e3e2 0%, #b5bfbd 54%, #6c7d7c 100%);
}

.case-share-info {
  display: grid;
  gap: 4px;
  padding: 12px;
  color: var(--ink);
}

.case-share-info strong {
  font-size: 15px;
  line-height: 1.35;
}

.case-share-info span,
.case-share-info small {
  color: var(--muted);
  font-size: 12px;
}

.case-share-empty {
  grid-column: 1 / -1;
  min-height: 240px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 1px dashed #cbd8d2;
  border-radius: 8px;
  background: #ffffff;
}

.case-share-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(18, 34, 30, 0.42);
}

.case-share-modal.hidden {
  display: none;
}

.case-share-dialog {
  width: min(1120px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 22px 52px rgba(10, 24, 20, 0.22);
}

.case-share-dialog .modal-head,
.case-share-dialog .modal-foot {
  position: sticky;
  z-index: 1;
  background: #ffffff;
}

.case-share-dialog .modal-head {
  top: 0;
}

.case-share-dialog .modal-foot {
  bottom: 0;
}

.case-share-detail-body {
  padding: 16px;
}

.case-share-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.case-share-detail-section {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 12px;
  display: grid;
  gap: 10px;
  align-content: start;
}

.case-share-detail-section.panorama,
.case-share-profile {
  grid-column: 1 / -1;
}

.case-share-detail-section h4 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
}

.case-share-link-list,
.case-share-chip-list,
.case-share-craft-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.case-share-link-list a,
.case-share-chip-list span,
.case-share-craft-list button {
  min-height: 30px;
  border: 1px solid #d8e1dd;
  border-radius: 6px;
  background: #ffffff;
  padding: 6px 10px;
  color: var(--ink);
  font-size: 12px;
}

.case-share-craft-list button {
  cursor: pointer;
}

.case-share-folder-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.case-share-folder-card {
  min-height: 138px;
  border: 1px solid #d8e1dd;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(245, 250, 247, 0.95)),
    #ffffff;
  color: var(--ink);
  padding: 12px;
  text-align: left;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 9px;
  align-content: start;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.case-share-folder-card:hover {
  border-color: #2f8068;
  box-shadow: 0 12px 24px rgba(28, 56, 48, 0.12);
  transform: translateY(-1px);
}

.case-share-folder-card strong,
.case-share-folder-card small,
.case-share-folder-card em {
  display: block;
}

.case-share-folder-card strong {
  font-size: 15px;
  line-height: 1.3;
}

.case-share-folder-card small {
  margin-top: 4px;
  color: #2f8068;
  font-size: 12px;
  font-weight: 800;
}

.case-share-folder-card em {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  font-style: normal;
}

.case-share-folder-order {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: #e7f1ed;
  color: #2f8068;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 900;
}

.case-share-folder-overlay {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(13, 27, 24, 0.52);
}

.case-share-folder-overlay.hidden {
  display: none;
}

.case-share-folder-dialog {
  width: min(920px, 100%);
  max-height: calc(100vh - 56px);
  overflow: auto;
  border: 1px solid #cbd8d2;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 64px rgba(8, 24, 19, 0.26);
}

.case-share-folder-dialog header {
  position: sticky;
  top: 0;
  z-index: 1;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid #d8e1dd;
  background: #ffffff;
}

.case-share-folder-dialog header strong {
  display: block;
  font-size: 16px;
  color: var(--ink);
}

.case-share-folder-dialog header small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.case-share-folder-item-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
}

.case-share-folder-item {
  min-width: 0;
  min-height: 96px;
  border: 1px solid #dfe8e3;
  border-radius: 8px;
  background: #fbfcfb;
  padding: 10px;
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 10px;
  align-items: center;
}

.case-share-folder-thumb {
  min-height: 72px;
  border-radius: 6px;
  background: linear-gradient(145deg, #e7f1ed, #c7dbd3);
  color: #245d4f;
  display: grid;
  place-items: center;
  padding: 8px;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.case-share-folder-item strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.35;
  word-break: break-word;
}

.case-share-folder-item small,
.case-share-folder-link {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  word-break: break-all;
}

.case-share-folder-link {
  color: #2f8068;
  font-weight: 800;
}

.case-share-folder-empty {
  grid-column: 1 / -1;
  min-height: 180px;
  border: 1px dashed #cbd8d2;
  border-radius: 8px;
  background: #fbfcfb;
  color: var(--muted);
  display: grid;
  place-items: center;
  font-size: 13px;
}

.case-share-archive-layout {
  display: grid;
  gap: 12px;
}

.case-share-archive-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.case-share-archive-section {
  min-width: 0;
  min-height: 192px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 14px;
  display: grid;
  gap: 12px;
  align-content: start;
  cursor: pointer;
}

.case-share-archive-section.full {
  grid-column: 1 / -1;
  min-height: 230px;
}

.case-share-archive-section header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.case-share-archive-section h3 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.2;
}

.case-share-archive-section header small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.case-share-preview-strip {
  min-height: 132px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px;
}

.case-share-preview-card {
  width: 132px;
  min-height: 168px;
  border: 1px solid #d8e1dd;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 8px;
  display: grid;
  grid-template-rows: 92px auto auto;
  gap: 7px;
  text-align: left;
  cursor: pointer;
  position: relative;
}

.case-share-preview-card[role="button"] {
  appearance: none;
}

.case-share-preview-card:hover {
  border-color: #2f8068;
  box-shadow: 0 12px 24px rgba(28, 56, 48, 0.1);
}

.case-share-preview-thumb {
  min-width: 0;
  border-radius: 6px;
  background: linear-gradient(145deg, #e7f1ed, #c7dbd3);
  color: #245d4f;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 900;
}

.case-share-media-preview,
.case-share-folder-media,
.case-share-folder-detail-media {
  width: 100%;
  height: 92px;
  min-width: 0;
  border-radius: 6px;
  object-fit: cover;
  background: linear-gradient(145deg, #e7f1ed, #c7dbd3);
  display: block;
}

.case-share-folder-media {
  width: 88px;
  height: 72px;
  flex: 0 0 88px;
}

.case-share-folder-detail-media {
  width: min(100%, 520px);
  height: 280px;
  object-fit: contain;
}

.case-share-preview-card strong {
  font-size: 13px;
  line-height: 1.35;
  word-break: break-word;
}

.case-share-preview-card small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  word-break: break-all;
}

.case-share-preview-card i {
  position: absolute;
  top: 7px;
  right: 7px;
  min-width: 36px;
  min-height: 24px;
  border: 1px solid #d9e2dd;
  border-radius: 6px;
  background: rgba(255,255,255,0.94);
  color: #8b2f2f;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.case-share-preview-delete {
  position: absolute;
  top: 7px;
  right: 7px;
  min-width: 44px;
  min-height: 24px;
  border: 1px solid rgba(218, 91, 91, 0.38);
  border-radius: 6px;
  background: rgba(75, 18, 24, 0.92);
  color: #ffe8e8;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  cursor: pointer;
  z-index: 2;
}

.case-share-preview-delete:hover {
  background: rgba(115, 26, 34, 0.98);
  border-color: rgba(255, 139, 139, 0.64);
}

.case-share-preview-empty {
  width: 100%;
  min-height: 116px;
  border: 1px dashed #cbd8d2;
  border-radius: 8px;
  color: var(--muted);
  display: grid;
  place-items: center;
  font-size: 13px;
}

.case-share-upload-dropzone {
  min-height: 54px;
  border: 1px dashed #b7ccc3;
  border-radius: 8px;
  background: rgba(255,255,255,0.62);
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.case-share-upload-dropzone input {
  max-width: 220px;
  font-size: 12px;
}

.case-share-file-picker {
  min-width: 188px;
  min-height: 34px;
  border: 1px solid #d9e2dd;
  border-radius: 6px;
  background: #f2f7f4;
  color: var(--ink);
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.case-share-file-picker b,
.case-share-file-picker em {
  font-size: 12px;
  line-height: 1.2;
  font-style: normal;
  white-space: nowrap;
}

.case-share-file-picker em {
  opacity: 0.72;
  overflow: hidden;
  text-overflow: ellipsis;
}

.case-share-file-picker input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.case-share-upload-dropzone input[type="file"],
.case-share-edit-list input[type="file"] {
  min-height: 34px;
  border: 1px solid #d9e2dd;
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  padding: 5px;
}

.case-share-upload-dropzone input[type="file"]::file-selector-button,
.case-share-edit-list input[type="file"]::file-selector-button,
.case-share-upload-dropzone input[type="file"]::-webkit-file-upload-button,
.case-share-edit-list input[type="file"]::-webkit-file-upload-button {
  min-height: 24px;
  border: 1px solid #d9e2dd;
  border-radius: 5px;
  background: #f2f7f4;
  color: var(--ink);
  font-weight: 800;
}

.case-share-edit-danger-row,
.case-share-recycle-actions {
  margin-top: 14px;
  border: 1px solid #e5c1c1;
  border-radius: 8px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #fff8f8;
}

.case-share-edit-danger-row strong,
.case-share-recycle-actions strong {
  display: block;
  margin-bottom: 4px;
}

.case-share-edit-danger-row small,
.case-share-recycle-actions small {
  color: var(--muted);
}

.case-share-archive-section.drag-over {
  border-color: #2f8068;
  box-shadow: 0 0 0 3px rgba(47, 128, 104, 0.12);
}

.case-share-archive-profile {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 12px;
}

.case-share-profile-edit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.case-share-profile-field {
  min-width: 0;
  border: 1px solid #e1e8e4;
  border-radius: 6px;
  background: #ffffff;
  padding: 8px;
  display: grid;
  gap: 5px;
}

.case-share-profile-field.wide {
  grid-column: span 2;
}

.case-share-profile-field span {
  color: var(--muted);
  font-size: 11px;
}

.case-share-profile-field strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
  word-break: break-word;
}

.case-share-profile-field textarea {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  border: 1px solid #d9e2dd;
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
  padding: 7px 8px;
  resize: vertical;
}

.case-share-panorama-editor {
  grid-column: 1 / -1;
}

.case-share-item-detail {
  grid-column: 1 / -1;
  grid-template-columns: 180px 1fr;
  min-height: 220px;
}

.case-share-profile dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.case-share-profile div {
  min-width: 0;
  border: 1px solid #e1e8e4;
  border-radius: 6px;
  background: #ffffff;
  padding: 8px;
}

.case-share-profile dt {
  color: var(--muted);
  font-size: 11px;
}

.case-share-profile dd {
  margin: 4px 0 0;
  color: var(--ink);
  font-weight: 700;
  word-break: break-word;
}

.case-share-muted {
  color: var(--muted);
  font-size: 12px;
}

.case-share-edit-form {
  display: grid;
  gap: 12px;
}

.case-share-edit-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.case-share-edit-section h3 {
  margin: 0;
  font-size: 14px;
  color: var(--ink);
}

.case-share-edit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.case-share-edit-grid label {
  display: grid;
  gap: 5px;
  color: #2f7060;
  font-size: 12px;
  font-weight: 800;
}

.case-share-edit-grid label.wide,
.case-share-edit-list {
  grid-column: 1 / -1;
}

.case-share-edit-grid input,
.case-share-edit-grid select,
.case-share-edit-grid textarea,
.case-share-edit-list textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #d9e2dd;
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  font-size: 13px;
}

.case-share-edit-grid input,
.case-share-edit-grid select {
  height: 34px;
}

.case-share-edit-grid textarea,
.case-share-edit-list textarea {
  min-height: 76px;
  padding: 8px 10px;
  resize: vertical;
}

.case-share-edit-list input[type="file"] {
  height: auto;
  padding: 7px 8px;
  background: #ffffff;
}

@media (max-width: 1280px) {
  .case-share-card-grid {
    grid-template-columns: repeat(4, minmax(160px, 1fr));
  }
}

@media (max-width: 980px) {
  .case-share-filters,
  .case-share-card-grid,
  .case-share-folder-grid,
  .case-share-folder-item-grid,
  .case-share-archive-grid,
  .case-share-profile dl,
  .case-share-profile-edit-grid,
  .case-share-edit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .case-share-detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .case-share-filters,
  .case-share-card-grid,
  .case-share-folder-grid,
  .case-share-folder-item-grid,
  .case-share-archive-grid,
  .case-share-profile dl,
  .case-share-profile-edit-grid,
  .case-share-edit-grid {
    grid-template-columns: 1fr;
  }

  .case-share-archive-section.full {
    grid-column: auto;
  }

  .case-share-profile-field.wide {
    grid-column: auto;
  }

  .case-share-modal {
    padding: 10px;
  }

  .case-share-folder-overlay {
    padding: 10px;
  }

  .case-share-dialog {
    max-height: calc(100vh - 20px);
  }

  .case-share-folder-dialog {
    max-height: calc(100vh - 20px);
  }

  .case-share-folder-item {
    grid-template-columns: 1fr;
  }

  .case-share-preview-card {
    width: min(142px, calc(50% - 6px));
  }

  .case-share-upload-dropzone {
    display: grid;
  }
}
.project-directory-upload-feedback {
  margin: 6px 0;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.project-directory-upload-feedback:empty,
[data-project-directory-upload-input][hidden],
[data-project-directory-upload-retry][hidden] { display: none; }
.project-directory-upload-feedback[data-state="ready"] { color: var(--success, #248653); }
/* ======= AD 半自动入口 MVP ======= */
.ad-entry-panel { border-color: #c4e0da; }
.ad-state-strip { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 12px 0; padding: 10px 12px; border-radius: 8px; background: #f0faf7; color: var(--teal); }
.ad-entry-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: end; }
.ad-lock-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 12px 0; }
.ad-lock-row label { display: flex; align-items: center; gap: 6px; color: var(--ink); }
.ad-lock-row input[type="checkbox"] { width: 18px; height: 18px; }
.ad-field-card, .ad-result-card { border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin-top: 12px; background: #fbfcfb; }
.ad-field-card h3, .ad-result-card h3 { margin: 0 0 10px; }
.ad-validation-box { margin-top: 12px; border: 1px solid #f2d0a4; background: #fff8ea; color: var(--amber); border-radius: 8px; padding: 10px 12px; font-size: 13px; }
.ad-validation-box.ok { border-color: #c4e0da; background: #f0faf7; color: var(--green); }
.ad-validation-box ul { margin: 6px 0 0 18px; }
.ad-result-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.ad-candidate-list { display: grid; gap: 8px; }
.ad-candidate-card { border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: #fff; display: grid; gap: 5px; }
.ad-candidate-card p { margin: 0; color: var(--muted); }
.ad-writeback-list { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; font-size: 13px; }
.ad-writeback-list span { color: var(--muted); overflow-wrap: anywhere; }
.ad-writeback-list strong { text-align: right; overflow-wrap: anywhere; }
@media (max-width: 900px) { .ad-entry-grid, .ad-result-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .ad-entry-grid, .ad-result-grid { grid-template-columns: 1fr; } .ad-lock-row { align-items: flex-start; } .ad-writeback-list { grid-template-columns: 1fr; } .ad-writeback-list strong { text-align: left; } .ad-candidate-card { overflow-wrap: anywhere; } }

/* ======= AI 宣传图工作流画布 Phase 1 ======= */
.flow-canvas-panel { border-color: #d8ddcf; }
.flow-guard-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: -4px 0 12px;
}
.flow-canvas-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.34fr);
  gap: 12px;
  align-items: stretch;
}
.flow-canvas {
  position: relative;
  min-height: 430px;
  max-width: 100%;
  overflow: hidden;
  contain: layout paint;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(38,48,47,0.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(38,48,47,0.04) 1px, transparent 1px),
    #fbfcfa;
  background-size: 28px 28px;
  cursor: grab;
  touch-action: none;
}
.flow-canvas:active { cursor: grabbing; }
.flow-canvas-stage {
  position: absolute;
  left: 24px;
  top: 8px;
  width: 1160px;
  height: 430px;
  transform-origin: left top;
}
.flow-edge-layer,
.flow-node-layer {
  position: absolute;
  inset: 0;
}
.flow-edge-layer { width: 1160px; height: 430px; pointer-events: none; }
.flow-edge-layer path {
  fill: none;
  stroke: #9eaaa4;
  stroke-width: 2;
  stroke-dasharray: 7 6;
}
.flow-edge-layer text {
  fill: var(--muted);
  font-size: 12px;
  paint-order: stroke;
  stroke: #fbfcfa;
  stroke-width: 5px;
}
.flow-node {
  position: absolute;
  width: 144px;
  min-height: 96px;
  border: 1px solid #d8ded7;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(25, 35, 32, 0.08);
  padding: 10px;
  text-align: left;
  display: grid;
  gap: 6px;
}
.flow-node strong,
.flow-node small {
  overflow-wrap: anywhere;
}
.flow-node:hover,
.flow-node.selected {
  border-color: var(--green);
  box-shadow: 0 14px 28px rgba(50, 122, 94, 0.16);
}
.flow-node.ready { background: #f7fbf8; }
.flow-node.review { background: #fffaf0; }
.flow-node.pending { background: #fafafa; }
.flow-node.static { background: #f4f6f5; }
.flow-detail-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
  min-height: 430px;
  display: grid;
  align-content: start;
  gap: 10px;
}
.flow-detail-panel h3 { margin: 0; font-size: 17px; }
.flow-detail-panel p { margin: 0; color: var(--muted); line-height: 1.6; }
.flow-detail-panel dl { margin: 0; display: grid; gap: 8px; }
.flow-detail-panel dt { color: var(--muted); font-size: 12px; }
.flow-detail-panel dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .flow-canvas-shell { grid-template-columns: 1fr; }
  .flow-detail-panel { min-height: 0; }
}
@media (max-width: 520px) {
  .flow-canvas-panel .panel-head { align-items: flex-start; }
  .flow-canvas-panel .panel-actions { width: 100%; }
  .flow-canvas-panel .panel-actions button { flex: 1 1 0; min-width: 0; }
  .flow-canvas { min-height: 390px; }
  .flow-canvas-stage { left: 10px; top: 12px; width: 100%; }
  .flow-edge-layer { width: 100%; }
  .flow-detail-panel { padding: 12px; }
}

/* ======= 内容雷达卡片 ======= */
.radar-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.radar-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 180px;
}

.radar-card.radar-today {
  grid-column: span 2;
  border-color: #c4e0da;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbf8 100%);
}

.radar-card.radar-gap {
  border-color: #f2d0a4;
  background: #fffdf7;
}

.radar-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.radar-card-head h3 { margin: 0; font-size: 15px; }

.radar-card-body {
  display: grid;
  gap: 8px;
}

.radar-field {
  display: grid;
  gap: 2px;
}

.radar-field span {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
}

.radar-field strong {
  font-size: 13px;
}

.radar-field small {
  font-size: 11px;
}

.radar-field.gap strong {
  color: var(--amber);
}

.radar-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

/* ======= 运营画布表单 ======= */
.ops-canvas-panel {
  border-color: #c4d0da;
}

.ops-canvas-draft-list {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.ops-draft-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.ops-draft-row div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.ops-draft-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-canvas-form {
  display: grid;
  gap: 14px;
}

.ops-node-canvas-shell {
  display: grid;
  grid-template-columns: minmax(168px, 0.72fr) minmax(420px, 1.9fr) minmax(240px, 1fr);
  gap: 12px;
  align-items: stretch;
  margin: 12px 0 14px;
}

.ops-node-library,
.ops-flow-canvas,
.ops-node-inspector {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  min-width: 0;
}

.ops-node-library,
.ops-node-inspector {
  padding: 12px;
  display: grid;
  gap: 8px;
}

.ops-node-library-head,
.ops-node-inspector-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.ops-node-library-head strong,
.ops-node-inspector-head strong {
  overflow-wrap: anywhere;
}

.ops-lib-node,
.ops-flow-node {
  border: 1px solid #d8ddd6;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.ops-lib-node {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 2px 8px;
  align-items: center;
  padding: 8px;
  min-height: 54px;
}

.ops-lib-node b,
.ops-flow-node b {
  color: var(--green);
  font-size: 12px;
}

.ops-lib-node span,
.ops-flow-node strong {
  font-weight: 800;
  overflow-wrap: anywhere;
}

.ops-lib-node small,
.ops-flow-node small {
  grid-column: 2;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.ops-lib-node.active,
.ops-flow-node.active {
  border-color: var(--green);
  box-shadow: inset 0 0 0 1px var(--green), 0 10px 24px rgba(45, 93, 72, .08);
}

.ops-flow-canvas {
  position: relative;
  min-height: 378px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(216,221,214,.46) 1px, transparent 1px),
    linear-gradient(0deg, rgba(216,221,214,.46) 1px, transparent 1px),
    #fcfdfb;
  background-size: 32px 32px;
  padding-top: 38px;
}

.ops-flow-caption {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 10px;
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.ops-flow-lines {
  position: absolute;
  inset: 28px 0 0;
  width: 100%;
  height: calc(100% - 28px);
  pointer-events: none;
}

.ops-flow-lines path {
  fill: none;
  stroke: #9eb2a6;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-dasharray: 5 7;
}

.ops-flow-node {
  position: absolute;
  display: grid;
  gap: 3px;
  width: 134px;
  min-height: 74px;
  padding: 9px 10px;
}

.ops-flow-node.review {
  background: #fffaf0;
}

.ops-flow-node.output {
  width: 148px;
  background: #f4f8f5;
}

.ops-flow-node:hover,
.ops-lib-node:hover {
  border-color: var(--green);
  transform: translateY(-1px);
}

.ops-inspector-grid {
  display: grid;
  gap: 8px;
}

.ops-inspector-grid div,
.ops-node-preview {
  border: 1px solid #e0e4df;
  border-radius: 8px;
  background: #fff;
  padding: 8px 10px;
  min-width: 0;
}

.ops-inspector-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.ops-inspector-grid strong,
.ops-node-preview p {
  display: block;
  margin: 2px 0 0;
  overflow-wrap: anywhere;
}

.ops-rule-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ops-local-review-panel .queue-row {
  align-items: center;
}

.ops-node-panel {
  border-color: #c4d0da;
}

.ops-node-head {
  align-items: flex-start;
}

.ops-node-guardbar,
.ops-soft-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.ops-node-guardbar {
  margin: 10px 0 12px;
}

.ops-node-shell {
  display: grid;
  grid-template-columns: minmax(150px, .62fr) minmax(520px, 1.65fr) minmax(300px, 1fr);
  gap: 12px;
  align-items: stretch;
}

.ops-node-stage {
  position: relative;
  min-height: 438px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(216,221,214,.45) 1px, transparent 1px),
    linear-gradient(0deg, rgba(216,221,214,.45) 1px, transparent 1px),
    #fcfdfb;
  background-size: 32px 32px;
}

.ops-node-edges {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.ops-node-edges path {
  fill: none;
  stroke: #9eb2a6;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-dasharray: 5 7;
}

.ops-node-form {
  display: grid;
  gap: 10px;
}

.ops-node-group {
  border: 1px solid #e0e4df;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.ops-node-group h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.ops-field-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ops-check-grid.compact,
.ops-radio-grid.compact {
  grid-template-columns: 1fr;
}

.ops-wide-label {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.ops-wide-label textarea {
  min-height: 126px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  font: inherit;
  resize: vertical;
}

.ops-material-blocked-note {
  margin-top: 10px;
  border: 1px solid #f1d6d2;
  border-radius: 8px;
  background: #fff7f5;
  padding: 10px;
}

.ops-material-blocked-note div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.ops-node-actions,
.ops-script-review-zone {
  display: grid;
  gap: 10px;
}

.ops-node-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ops-prompt-pack-preview {
  margin-top: 10px;
  border: 1px solid #d8e3dc;
  border-radius: 8px;
  background: #f8fbf9;
  padding: 10px;
  display: grid;
  gap: 5px;
  overflow-wrap: anywhere;
}

.ops-prompt-pack-preview strong {
  font-size: 13px;
}

.ops-prompt-pack-preview small {
  color: var(--muted);
  line-height: 1.5;
}

.ops-script-review-zone {
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  margin-top: 12px;
}

.ops-script-preview,
.ops-draft-review-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 10px;
  min-width: 0;
}

.compact-head {
  margin-bottom: 8px;
}

.ops-canvas-toast {
  min-height: 24px;
  margin-top: 8px;
  font-size: 13px;
}

.ops-node-disabled-row {
  margin-top: 12px;
}

.ops-fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: #fbfcfb;
}

.ops-fieldset legend {
  font-weight: 700;
  font-size: 14px;
  padding: 0 6px;
  color: var(--ink);
}

.ops-field-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.ops-check-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.ops-check-grid label,
.ops-radio-grid label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-size: 13px;
  cursor: pointer;
}

.ops-check-grid input,
.ops-radio-grid input {
  width: 18px;
  height: 18px;
}

.ops-radio-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ops-status-btn-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ops-status-btn {
  min-height: 36px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font-size: 13px;
  cursor: pointer;
  transition: 0.15s ease;
}

.ops-status-btn:hover {
  border-color: var(--green);
}

.ops-status-btn.active {
  border-color: var(--green);
  background: #ecf3ef;
  color: var(--green);
  font-weight: 700;
  box-shadow: inset 0 0 0 1px var(--green);
}

.ops-status-btn.ops-status-block.active {
  border-color: var(--red);
  background: #fff0ef;
  color: var(--red);
  box-shadow: inset 0 0 0 1px var(--red);
}

.ops-disabled-section {
  opacity: 0.72;
  background: #f7f7f4;
}

.ops-disabled-section legend {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ops-disabled-btn-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ops-disabled-btn-grid button,
.ops-disabled-publish-row button {
  min-height: 36px;
  padding: 6px 14px;
  border: 1px solid #d8ddd6;
  border-radius: 8px;
  background: #eceeed;
  color: #8a9590;
  font-size: 13px;
  cursor: not-allowed;
  opacity: 0.7;
}

.ops-disabled-publish-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ======= 390px 内容雷达 + 运营画布响应式 ======= */
@media (max-width: 900px) {
  .radar-grid { grid-template-columns: 1fr; }
  .radar-card.radar-today { grid-column: span 1; }
  .ops-node-canvas-shell { grid-template-columns: 1fr; }
  .ops-flow-canvas { min-height: 430px; overflow-x: auto; }
  .ops-flow-canvas .ops-flow-lines,
  .ops-flow-canvas .ops-flow-node {
    transform: scale(.92);
    transform-origin: top left;
  }
  .ops-field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ops-check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 390px) {
  .radar-grid {
    grid-template-columns: 1fr;
  }

  .radar-card {
    min-height: 0;
    padding: 12px;
  }

  .radar-card.radar-today {
    grid-column: span 1;
  }

  .radar-card-head {
    flex-wrap: wrap;
  }

  .radar-field strong {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  /* 运营画布 390 单列 */
  .ops-node-canvas-shell {
    grid-template-columns: 1fr;
    gap: 10px;
    max-width: 100%;
    overflow: hidden;
  }

  .ops-node-library,
  .ops-node-inspector {
    padding: 10px;
  }

  .ops-flow-canvas {
    min-height: 0;
    overflow: visible;
    padding: 38px 10px 10px;
    display: grid;
    gap: 8px;
  }

  .ops-flow-lines {
    display: none;
  }

  .ops-flow-caption {
    position: static;
    order: -1;
  }

  .ops-flow-node {
    position: static;
    width: 100% !important;
    min-height: 58px;
    transform: none !important;
  }

  .ops-lib-node {
    min-height: 50px;
  }

  .ops-field-grid {
    grid-template-columns: 1fr;
  }

  .ops-check-grid {
    grid-template-columns: 1fr;
  }

  .ops-radio-grid {
    grid-template-columns: 1fr;
  }

  .ops-status-btn-grid {
    flex-direction: column;
  }

  .ops-status-btn {
    width: 100%;
    text-align: center;
  }

  .ops-disabled-btn-grid,
  .ops-disabled-publish-row {
    flex-direction: column;
  }

  .ops-disabled-btn-grid button,
  .ops-disabled-publish-row button {
    width: 100%;
  }

  /* 长状态可换行 */
  .status-pill {
    white-space: normal;
    text-align: center;
    max-width: 100%;
  }

  /* 脚本正文 textarea 高度 */
  #opsScriptBody {
    min-height: 140px;
  }

  /* 表格在 390 不强制 680px */
  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 0;
    width: max-content;
  }

  .radar-card-actions button {
    width: 100%;
  }

  .ops-draft-row {
    grid-template-columns: 1fr;
  }

  /* 运营画布持久化 — 草稿列表按钮纵向排列 */
  .ops-draft-row .preview-actions {
    flex-direction: column;
    gap: 4px;
  }

  .ops-draft-row .preview-actions button {
    width: 100%;
  }

  /* toast 不遮挡按钮 */
  #opsCanvasToast {
    font-size: 11px;
    max-width: 100%;
    white-space: normal;
    word-break: break-word;
  }

  /* 长项目名不撑破 */
  .ops-draft-row strong {
    overflow-wrap: anywhere;
    word-break: break-word;
    display: block;
    max-width: 100%;
  }

  /* 错误提示行内不溢出 */
  .ops-canvas-panel small {
    display: block;
    overflow-wrap: anywhere;
  }
}

/* ======= 项目素材状态标签 ======= */
.xiaobin-badge-group {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
}

.xiaobin-badge-group .status-pill {
  white-space: normal;
  max-width: 100%;
}

.xiaobin-muted-entry {
  opacity: 0.7;
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
}

.xiaobin-blocked-notice {
  border: 1px solid #f2d0a4;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fffdf7;
  color: var(--amber);
  font-size: 13px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}

.xiaobin-blocked-notice .status-pill {
  flex-shrink: 0;
}

.xiaobin-disabled-selector {
  border: 1px dashed #d8ddd6;
  border-radius: 8px;
  padding: 10px 12px;
  background: #f7f7f4;
  display: grid;
  gap: 6px;
}

.xiaobin-disabled-selector label {
  color: #8a9590;
}

.xiaobin-disabled-selector select,
.xiaobin-disabled-selector input {
  background: #eceeed;
  color: #8a9590;
  cursor: not-allowed;
}

.material-inherit-card {
  margin-top: 10px;
  border: 1px solid #d9e4dd;
  border-radius: 8px;
  background: #fbfdfb;
  padding: 10px 12px;
  min-width: 0;
}

.material-inherit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.material-inherit-head strong {
  font-size: 13px;
}

.material-inherit-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.material-inherit-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px 9px;
  min-width: 0;
}

.material-inherit-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.material-inherit-grid strong {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.material-inherit-tags,
.material-type-row {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.material-inherit-card small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.queue-row-material {
  align-items: flex-start;
}

@media (max-width: 390px) {
  .xiaobin-badge-group {
    gap: 3px;
  }
  .xiaobin-blocked-notice {
    flex-direction: column;
    gap: 6px;
  }
  .material-inherit-card {
    padding: 9px;
  }
  .material-inherit-grid {
    grid-template-columns: 1fr;
  }
  .material-inherit-tags .status-pill,
  .material-type-row .status-pill {
    white-space: normal;
    text-align: left;
    max-width: 100%;
  }
}

/* 第580单域B(A04): 案例份额度行 */
.case-share-quota-line { display: block; padding: 2px 2px 8px; color: var(--muted, #5c6862); font-size: 12px; }

/* CASE-RECYCLE-ENTRY-1: keep the existing card button above its separate restore row. */
#caseShareRecycleGrid .case-share-card { width: 100%; }

.case-share-library-head { flex-wrap: wrap; gap: 8px; }
#caseShareScopeTabs { display: flex; flex-wrap: nowrap; gap: 8px; flex: 0 0 auto; }
#caseShareScopeTabs button { flex: 0 0 auto; white-space: nowrap; }

/* 07-03: keep the original case-open button and a separate local action menu. */
.case-share-card-shell { min-width: 0; display: grid; grid-template-rows: 1fr auto; gap: 6px; }
.case-share-card-shell > .case-share-card { width: 100%; }
.case-share-card-menu { padding: 4px 8px; }
.case-share-card-menu > summary { cursor: pointer; font-size: 12px; color: var(--muted); }
.case-share-card-menu > button { margin-top: 6px; }
/* ======= AI管理系统首页 ======= */
.ai-mgmt-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  margin-bottom: 12px;
}

.ai-mgmt-topbar-left strong {
  font-size: 16px;
  display: block;
}

.ai-mgmt-subtitle {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.ai-mgmt-topbar-center,
.ai-mgmt-topbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.trial-guardrail-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1.15fr) minmax(220px, .9fr);
  gap: 10px 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid #edd7d4;
  border-left: 4px solid var(--red);
  border-radius: 8px;
  background: linear-gradient(180deg, #fffafa 0%, #fff 100%);
  box-shadow: 0 8px 20px rgba(178, 75, 69, 0.06);
  margin-bottom: 12px;
}

.trial-guardrail-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.trial-guardrail-copy strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.35;
}

.trial-guardrail-copy small {
  color: var(--muted);
  line-height: 1.5;
}

.trial-state-legend,
.trial-forbidden-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}

.trial-forbidden-row {
  grid-column: 1 / -1;
  justify-content: flex-start;
}

.trial-state-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  display: inline-block;
  flex: 0 0 auto;
}

.legend-dot.ready { background: var(--green); }
.legend-dot.static { background: #9c8a65; }
.legend-dot.internal { background: var(--teal); }
.legend-dot.pending { background: #87918d; }
.legend-dot.blocked { background: var(--red); }

.ai-main-flow-section {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.ai-branch-strip {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 10px 12px;
  margin: -2px 0 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.ai-branch-strip div {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.ai-branch-strip strong {
  font-size: 13px;
}

.ai-branch-strip small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.system-backstage-panel {
  margin: 14px 0 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfa;
  overflow: hidden;
}

.system-backstage-panel > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}

.system-backstage-panel > summary::-webkit-details-marker { display: none; }
.system-backstage-panel > summary strong { font-size: 14px; }

.system-backstage-panel > summary small {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}

.system-backstage-panel[open] { padding-bottom: 12px; }

.system-backstage-panel[open] > summary {
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}

.ai-main-flow-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
  display: grid;
  gap: 10px;
  min-width: 0;
  align-content: start;
}

.ai-main-flow-card h2 {
  margin: 0;
  font-size: 15px;
  line-height: 1.3;
}

.ai-main-flow-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.flow-card-head,
.flow-state-row,
.flow-card-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.flow-card-head {
  justify-content: space-between;
}

.flow-index {
  font-size: 11px;
  color: var(--muted);
  font-weight: 800;
}

.flow-card-actions {
  margin-top: 2px;
}

.flow-card-actions button {
  min-width: 0;
}

.ai-mgmt-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.ai-metric-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
  display: grid;
  gap: 4px;
  text-align: left;
  cursor: pointer;
  min-height: 88px;
  align-content: start;
}

.ai-metric-card:hover {
  border-color: var(--green);
}

.ai-metric-num {
  font-size: 28px;
  font-weight: 800;
  color: var(--green);
}

.ai-metric-num.warn { color: var(--amber); }
.ai-metric-num.off { color: var(--muted); }

.ai-metric-label {
  font-size: 13px;
  font-weight: 700;
}

.ai-metric-card small {
  font-size: 11px;
  color: var(--muted);
}

.ai-mgmt-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.32fr);
  gap: 12px;
  margin-bottom: 12px;
}

.ai-workspace-panel {
  margin-bottom: 10px;
}

.ai-task-mini-list,
.ai-review-mini-list {
  display: grid;
  gap: 6px;
}

.ai-task-mini-row,
.ai-review-mini-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfb;
  font-size: 13px;
}

.ai-task-mini-row strong,
.ai-review-mini-row strong {
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 140px;
}

.ai-task-mini-row small,
.ai-review-mini-row small {
  font-size: 11px;
  color: var(--muted);
  margin-left: auto;
}

.ai-quick-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

/* 风险边界面板 */
.ai-mgmt-risk-panel {
  border: 1px solid #f2d0a4;
  border-radius: 8px;
  background: #fffdf7;
  padding: 14px;
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 0;
}

.ai-mgmt-risk-panel h3 {
  margin: 0;
  font-size: 14px;
  color: var(--amber);
}

.ai-risk-item {
  display: grid;
  gap: 3px;
  padding: 8px 0;
  border-top: 1px solid #f5e6cc;
}

.ai-risk-item:first-of-type { border-top: none; }

.ai-risk-item strong {
  font-size: 12px;
}

.ai-risk-item small {
  font-size: 11px;
  color: var(--muted);
}

/* 成本网关路由表 */
.cost-route-table {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  margin-top: 10px;
}

.cost-route-row {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr 1.5fr;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  align-items: center;
  font-size: 13px;
}

.cost-route-row.head {
  background: #f4f6f5;
  font-weight: 700;
  font-size: 12px;
  color: var(--muted);
  border-top: none;
}

.cost-route-row small { font-size: 11px; color: var(--muted); }

.ai-pm-objects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.ai-pm-obj {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fbfcfb;
  display: grid;
  gap: 4px;
}

.ai-pm-obj strong {
  font-size: 13px;
  font-family: monospace;
  color: var(--ink);
}

.ai-pm-obj span {
  font-size: 11px;
  color: var(--muted);
}

/* ======= AI设计师三层架构 ======= */
.ai-hierarchy-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 12px;
  border: 1px solid #c4e0da;
  border-radius: 8px;
  background: #f0faf7;
  font-size: 13px;
  margin-bottom: 12px;
}

.ai-hierarchy-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ai-hierarchy-actions span {
  color: var(--muted);
  font-size: 12px;
}

.ai-measure-tool-entry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid #8fc6ba;
  border-radius: 8px;
  background: #ffffff;
  color: #1f6b58;
  font-weight: 800;
  font-size: 12px;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(31, 107, 88, .10);
}

.ai-measure-tool-entry:hover {
  border-color: #1f7a63;
  background: #e8f8f3;
  color: #14513f;
}

.ai-measure-header-action {
  text-decoration: none;
  white-space: nowrap;
}

.ai-backend-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 12px;
  border: 1px solid #d8ddcf;
  border-radius: 8px;
  background: #f4f6f5;
  font-size: 13px;
  margin-bottom: 12px;
}

.ai-gen-disabled-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.ai-gen-disabled-row button {
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid #d8ddd6;
  border-radius: 8px;
  background: #eceeed;
  color: #8a9590;
  font-size: 12px;
  cursor: not-allowed;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ai-gen-disabled-row button small {
  color: #9a9590;
  font-size: 11px;
}

.ai-measure-features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ai-measure-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fbfcfb;
  display: grid;
  gap: 4px;
}

.ai-measure-item strong { font-size: 13px; }
.ai-measure-item small { font-size: 11px; color: var(--muted); }
.ai-measure-item.disabled { opacity: 0.6; background: #f7f7f4; }

.ai-board-inline-panel {
  padding: 0;
  overflow: hidden;
  min-height: 760px;
  background: transparent;
  box-shadow: none;
}

.ai-board-inline-frame {
  display: block;
  width: 100%;
  height: calc(100vh - 196px);
  min-height: 760px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.ai-board-entry-panel {
  display: none;
}

.ai-board-entry-head small {
  color: var(--muted);
}

.ai-board-entry-shell {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(340px, 1.08fr);
  gap: 14px;
  align-items: stretch;
}

.ai-board-entry-copy {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fbfffc 0%, #f4faf7 100%);
  padding: 16px;
  display: grid;
  gap: 12px;
  align-content: start;
}

.ai-board-entry-copy h3 {
  margin: 0;
  font-size: 17px;
}

.ai-board-entry-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.ai-board-entry-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ai-board-preview-card {
  border: 1px solid #cfe3d9;
  border-radius: 8px;
  background: #eef6f2;
  padding: 12px;
  display: grid;
  grid-template-rows: auto minmax(180px, 1fr) auto;
  gap: 10px;
}

.ai-board-toolbar-preview {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.ai-board-toolbar-preview span {
  border: 1px solid #cbd9d2;
  border-radius: 6px;
  background: #fff;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 700;
}

.ai-board-mini-canvas {
  position: relative;
  min-height: 210px;
  border: 1px solid #dbe8e0;
  border-radius: 6px;
  background-color: #fff;
  background-image:
    linear-gradient(#eef3ef 1px, transparent 1px),
    linear-gradient(90deg, #eef3ef 1px, transparent 1px);
  background-size: 24px 24px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .8);
  overflow: hidden;
}

.ai-board-mini-canvas .mini-wall,
.ai-board-mini-canvas .mini-cabinet,
.ai-board-mini-canvas .mini-line {
  position: absolute;
  display: block;
}

.ai-board-mini-canvas .mini-wall {
  left: 15%;
  top: 24%;
  width: 58%;
  height: 46%;
  border: 2px solid #6a7470;
  background: rgba(255, 255, 255, .45);
}

.ai-board-mini-canvas .mini-cabinet {
  left: 24%;
  top: 35%;
  width: 24%;
  height: 28%;
  border: 2px solid #6f7a75;
  box-shadow: 32px 0 0 -1px transparent, 32px 0 0 0 #6f7a75;
}

.ai-board-mini-canvas .mini-line {
  height: 2px;
  background: #2b7f69;
  transform-origin: left center;
}

.ai-board-mini-canvas .mini-line.one {
  left: 55%;
  top: 34%;
  width: 22%;
  transform: rotate(-8deg);
}

.ai-board-mini-canvas .mini-line.two {
  left: 52%;
  top: 65%;
  width: 30%;
  transform: rotate(6deg);
}

.ai-board-preview-foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.ai-template-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.ai-template-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fbfcfb;
  display: grid;
  gap: 4px;
}

.ai-template-card strong { font-size: 13px; }
.ai-template-card span { font-size: 11px; color: var(--muted); }

.ai-polish-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.ai-polish-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fbfcfb;
  display: grid;
  gap: 5px;
  min-width: 0;
}

.ai-polish-card strong { font-size: 13px; }

.ai-polish-card small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.ai-polish-card.disabled {
  background: #f7f7f4;
}

.ai-polish-form {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfb;
}

.polish-option-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.ops-save-result {
  margin-top: 12px;
  border: 1px solid #b9d8cc;
  border-radius: 8px;
  padding: 10px 12px;
  background: #f0faf6;
  display: grid;
  gap: 6px;
  font-size: 13px;
}

.ops-save-result.hidden { display: none; }
.ops-save-result strong { color: var(--green); }

.ops-save-result .ops-save-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

@media (max-width: 390px) {
  .ai-measure-features { grid-template-columns: 1fr; }
  .ai-board-entry-shell { grid-template-columns: 1fr; }
  .ai-board-entry-actions button { width: 100%; }
  .ai-template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ai-polish-grid { grid-template-columns: 1fr; }
  .polish-option-grid { grid-template-columns: 1fr; }
  .ai-gen-disabled-row { flex-direction: column; }
  .ai-gen-disabled-row button { width: 100%; }
  .ai-hierarchy-banner { flex-direction: column; align-items: flex-start; }
}

/* ======= 390px AI管理系统响应式 ======= */
@media (max-width: 900px) {
  .ai-main-flow-section { grid-template-columns: 1fr; }
  .ai-mgmt-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ai-mgmt-workspace { grid-template-columns: 1fr; }
}

@media (max-width: 390px) {
  .ai-mgmt-topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .ai-mgmt-topbar-center,
  .ai-mgmt-topbar-right {
    width: 100%;
  }

  .trial-guardrail-panel {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .trial-state-legend,
  .trial-forbidden-row {
    justify-content: flex-start;
  }

  .trial-state-legend span,
  .trial-forbidden-row .status-pill {
    white-space: normal;
    text-align: left;
  }

  .ai-mgmt-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .system-backstage-panel > summary {
    align-items: flex-start;
  }

  .system-backstage-panel > summary small {
    width: 100%;
    margin-left: 0;
  }

  .polish-option-grid {
    grid-template-columns: 1fr;
  }

  .ai-main-flow-section {
    grid-template-columns: 1fr;
  }

  .ai-branch-strip {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .ai-branch-strip button {
    width: 100%;
  }

  .ai-main-flow-card {
    padding: 12px;
  }

  .flow-card-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .flow-card-actions button {
    width: 100%;
  }

  .flow-state-row .status-pill,
  .ai-branch-strip .status-pill,
  #aiSubTabs button,
  #marketingSubTabs button {
    white-space: normal;
    text-align: left;
  }

  .ai-metric-card {
    min-height: 72px;
  }

  .ai-metric-num {
    font-size: 22px;
  }

  .ai-mgmt-workspace {
    grid-template-columns: 1fr;
  }

  .ai-mgmt-risk-panel {
    order: -1;
  }

  .ai-task-mini-row,
  .ai-review-mini-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .ai-task-mini-row strong,
  .ai-review-mini-row strong {
    max-width: 100%;
    white-space: normal;
  }

  .ai-task-mini-row small,
  .ai-review-mini-row small {
    margin-left: 0;
  }

  .ai-quick-actions {
    flex-direction: column;
  }

  .ai-quick-actions button {
    width: 100%;
  }

  .cost-route-row {
    grid-template-columns: 1fr 1fr;
    font-size: 11px;
  }

  .cost-route-row small {
    grid-column: span 2;
  }
}

/* ======= 全自动线 MVP ======= */
.auto-status-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 4px;
}

.auto-filter-state-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 12px;
}

.auto-status-card {
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 10px 12px;
  display: grid;
  gap: 2px;
  align-content: center;
  text-align: left;
  cursor: pointer;
  transition: 0.15s ease;
}

.auto-status-card:hover { border-color: var(--green); }
.auto-status-card strong { font-size: 22px; }
.auto-status-card span { font-size: 12px; color: var(--ink); }
.auto-status-card span.warn { color: var(--amber); }
.auto-status-card small { font-size: 11px; color: var(--muted); }

.auto-table { width: 100%; border-collapse: collapse; min-width: 680px; }
.auto-table td { font-size: 12px; vertical-align: middle; }

.auto-account-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.auto-account-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fbfcfb;
}

.auto-log-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fafcfb;
  margin-bottom: 8px;
}

.auto-risk-grid {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.auto-disabled-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.auto-disabled-btns button {
  min-height: 40px;
  padding: 6px 12px;
  border: 1px solid #d8ddd6;
  border-radius: 8px;
  background: #eceeed;
  color: #8a9590;
  font-size: 12px;
  cursor: not-allowed;
  opacity: 0.75;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.auto-disabled-btns button span {
  font-size: 10px;
  color: #9a9590;
}

@media (max-width: 900px) {
  .auto-status-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .auto-account-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 390px) {
  .auto-status-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auto-status-card { min-height: 60px; padding: 8px 10px; }
  .auto-status-card strong { font-size: 18px; }

  .auto-account-grid { grid-template-columns: 1fr; }

  .auto-disabled-btns { flex-direction: column; }
  .auto-disabled-btns button { width: 100%; }

  .auto-table { min-width: 0; width: max-content; }

  .auto-risk-grid { gap: 4px; }

  .auto-log-row { padding: 8px 10px; }
  .auto-log-row div { flex-direction: column; gap: 4px; }
}

/* ======= AI生图画布前端壳 ======= */
.aigen-entry-strip {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.aigen-entry-btn {
  min-height: 38px;
  padding: 6px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.15s ease;
}

.aigen-entry-btn:hover { border-color: var(--green); }
.aigen-entry-btn.active {
  border-color: var(--green);
  background: #ecf3ef;
  color: var(--green);
  box-shadow: inset 0 0 0 1px var(--green);
}

.aigen-entry-btn.disabled-entry {
  opacity: 0.5;
  cursor: not-allowed;
  color: var(--muted);
}

.aigen-risk-strip {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.ai-gen-disabled-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ai-gen-disabled-row button {
  min-height: 36px;
  padding: 4px 10px;
  border: 1px solid #d8ddd6;
  border-radius: 8px;
  background: #eceeed;
  color: #8a9590;
  font-size: 12px;
  cursor: not-allowed;
  opacity: 0.7;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
}

.ai-gen-disabled-row button small {
  font-size: 10px;
  color: #9a9590;
}

@media (max-width: 390px) {
  .aigen-entry-strip { flex-direction: column; }
  .aigen-entry-btn { width: 100%; text-align: center; }

  .ai-gen-disabled-row { flex-direction: column; }
  .ai-gen-disabled-row button { width: 100%; }

  .aigen-risk-strip { gap: 4px; }
}

/* ======= 仅文字草稿 候选面板 ======= */
.aigen-candidate-grid { display: grid; gap: 8px; }
.aigen-candidate-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfb;
  display: grid;
  gap: 8px;
}
.aigen-candidate-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.aigen-candidate-head strong { font-size: 13px; font-family: monospace; }
.aigen-candidate-body {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px 12px;
  font-size: 12px;
  color: var(--muted);
}
.aigen-candidate-status {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.aigen-candidate-actions {
  display: flex;
  gap: 8px;
}

/* === route dashboard === */
.aigen-dash-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  background: #fbfcfb;
  margin-bottom: 6px;
  display: grid;
  gap: 4px;
}

@media (max-width: 390px) {
  .aigen-candidate-body { grid-template-columns: 1fr; }
  .aigen-candidate-actions { flex-direction: column; }
}

/* === Dry-run Dashboard === */
.auto-dryrun-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.auto-dryrun-card { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #fff; display: grid; gap: 2px; }
.auto-dryrun-card strong { font-size: 20px; }
.auto-dryrun-card span { font-size: 11px; color: var(--ink); }
.auto-dryrun-card small { font-size: 10px; color: var(--muted); }
.auto-dryrun-card.blocked strong { color: var(--red); }

.auto-forbidden-bar { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

.auto-script-row { border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: #fbfcfb; margin-bottom: 6px; display: grid; gap: 4px; }
.auto-script-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.auto-script-head strong { font-size: 12px; font-family: monospace; }
.auto-script-head span { font-size: 12px; color: var(--muted); }
.auto-script-title { font-size: 13px; font-weight: 600; }
.auto-script-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 11px; }
.auto-script-actions { display: flex; gap: 6px; margin-top: 4px; }

.auto-script-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.68;
}

.auto-gap-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.auto-gap-group { border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: #fbfcfb; }
.auto-gap-group h4 { margin: 0 0 4px; font-size: 13px; }
.auto-gap-group p { margin: 0; font-size: 11px; color: var(--muted); }

@media (max-width: 900px) {
  .auto-dryrun-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .auto-gap-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 390px) {
  .auto-dryrun-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auto-gap-grid { grid-template-columns: 1fr; }
  .auto-script-head { flex-direction: column; align-items: flex-start; }
  .auto-filter-state-row { align-items: flex-start; }
  .auto-script-actions { flex-direction: column; }
  .auto-script-actions button { width: 100%; }
  .auto-risk-grid .status-pill,
  .auto-filter-state-row .status-pill,
  .auto-forbidden-bar .status-pill,
  .auto-script-meta .status-pill {
    white-space: normal;
    text-align: left;
  }
}

/* === 客户可见安全提示 === */
.customer-safe-banner {
  background: #e8f4f2;
  border: 1px solid #c4e0da;
  border-radius: 6px;
  padding: 6px 12px;
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--teal);
  text-align: center;
}

/* === 老板审核池 / 待审核池 === */
.boss-review-pool-panel { border-color: #d8ddd6; }
.boss-review-pool-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}
.boss-review-filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}
.boss-review-filter-group button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  min-height: 34px;
  padding: 5px 9px;
  font-size: 12px;
  cursor: pointer;
}
.boss-review-filter-group button.selected {
  border-color: #86b1aa;
  background: #e8f4f2;
  color: var(--teal);
  font-weight: 700;
}
.boss-review-filter-group span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  min-height: 20px;
  margin-left: 4px;
  padding: 0 5px;
  border-radius: 999px;
  background: #f1eee6;
  color: #766a54;
  font-size: 11px;
}
.boss-review-empty-state {
  border: 1px dashed #d8ddd6;
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfb;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.boss-review-package-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfb;
  display: grid;
  gap: 10px;
}
.boss-review-package-card h3 {
  margin: 0;
  font-size: 17px;
}
.boss-review-package-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.boss-review-card-head,
.boss-review-risk-tags,
.boss-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.boss-review-risk-title {
  font-size: 11px;
  color: var(--muted);
  margin-right: 2px;
}
.boss-review-field-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.boss-review-field-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: #fff;
  min-width: 0;
}
.boss-review-field-grid span,
.boss-review-top3 strong {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 3px;
}
.boss-review-field-grid strong {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.boss-review-top3 {
  border: 1px solid #e2ded2;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fffdf7;
}
.boss-review-top3 ol {
  margin: 4px 0 0 18px;
  padding: 0;
  color: var(--ink);
  font-size: 13px;
}
.boss-review-top3 li { margin: 2px 0; overflow-wrap: anywhere; }
.boss-review-actions button[disabled] {
  cursor: not-allowed;
  opacity: 0.72;
}
.boss-review-readonly-detail {
  border: 1px solid #d8ddd6;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}
.boss-review-readonly-detail summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--teal);
  font-size: 13px;
}
.boss-review-default-policy {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.boss-review-timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.boss-review-timeline div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: #fbfcfb;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 7px;
  min-width: 0;
}
.boss-review-timeline div.current {
  border-color: #c4e0da;
  background: #f1faf8;
}
.boss-review-timeline span {
  grid-row: span 2;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #f1eee6;
  color: #766a54;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}
.boss-review-timeline .current span {
  background: #e8f4f2;
  color: var(--teal);
}
.boss-review-timeline strong {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.boss-review-timeline small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.boss-review-next-steps {
  border: 1px solid #e2ded2;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fffdf7;
  margin-top: 10px;
}
.boss-review-next-steps strong {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}
.boss-review-next-steps ul {
  margin: 0 0 0 18px;
  padding: 0;
  color: var(--muted);
  font-size: 12px;
}
.boss-review-next-steps li {
  margin: 2px 0;
  overflow-wrap: anywhere;
}
.boss-review-missing-checklist {
  border: 1px solid #d8ddd6;
  border-radius: 8px;
  padding: 10px 12px;
  background: #f7fbfa;
  margin-top: 10px;
}
.boss-review-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.boss-review-progress strong {
  font-size: 13px;
}
.boss-review-progress span {
  border-radius: 999px;
  background: #fff5df;
  color: var(--amber);
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 700;
}
.boss-review-checklist-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.boss-review-checklist-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 9px 10px;
  display: grid;
  gap: 4px;
  min-width: 0;
}
.boss-review-checklist-grid strong {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.boss-review-checklist-grid small,
.boss-review-missing-checklist p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.boss-review-missing-checklist p {
  margin: 8px 0 0;
}
.boss-review-evidence-log {
  border: 1px solid #e2ded2;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fffdf7;
  margin-top: 10px;
}
.boss-review-evidence-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.boss-review-evidence-head strong {
  font-size: 13px;
}
.boss-review-evidence-log ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.boss-review-evidence-log li {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 9px 10px;
  display: grid;
  gap: 3px;
  min-width: 0;
}
.boss-review-evidence-log time {
  color: var(--muted);
  font-size: 11px;
}
.boss-review-evidence-log strong {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.boss-review-evidence-log small,
.boss-review-evidence-log p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.boss-review-evidence-log p {
  margin: 8px 0 0;
}
.boss-review-submit-preview {
  border: 1px solid #d9e4dd;
  border-radius: 8px;
  padding: 10px 12px;
  background: #f8fbf8;
  margin-top: 10px;
}
.boss-review-preview-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.boss-review-preview-head strong {
  font-size: 13px;
}
.boss-review-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.boss-review-preview-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: #fff;
  min-width: 0;
  display: grid;
  gap: 3px;
}
.boss-review-preview-grid span {
  color: var(--muted);
  font-size: 11px;
}
.boss-review-preview-grid strong {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.boss-review-preview-grid small,
.boss-review-submit-preview p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.boss-review-submit-preview p {
  margin: 8px 0 0;
}
.boss-review-confirm-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.boss-review-confirm-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: #fbfcfb;
  min-width: 0;
  display: grid;
  gap: 3px;
}
.boss-review-confirm-grid span {
  color: var(--muted);
  font-size: 11px;
}
.boss-review-confirm-grid strong {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.boss-review-confirm-grid small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  .boss-review-field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .boss-review-timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .boss-review-checklist-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .boss-review-evidence-log ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .boss-review-preview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .boss-review-confirm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 390px) {
  .boss-review-pool-panel .panel-head {
    align-items: flex-start;
  }
  .boss-review-field-grid {
    grid-template-columns: 1fr;
  }
  .boss-review-confirm-grid {
    grid-template-columns: 1fr;
  }
  .boss-review-timeline {
    grid-template-columns: 1fr;
  }
  .boss-review-checklist-grid {
    grid-template-columns: 1fr;
  }
  .boss-review-evidence-log ol {
    grid-template-columns: 1fr;
  }
  .boss-review-preview-grid {
    grid-template-columns: 1fr;
  }
  .boss-review-default-policy {
    align-items: flex-start;
  }
  .boss-review-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .boss-review-actions button {
    width: 100%;
    min-width: 0;
    white-space: normal;
  }
  .boss-review-filter-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .boss-review-filter-group button {
    width: 100%;
    min-width: 0;
    white-space: normal;
  }
  .boss-review-package-card {
    padding: 10px;
  }
}

/* ======= AI生图节点画布 MVP ======= */
.aigen-node-panel { border-color:#d8e3dc; }
.aigen-guardbar {
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  margin:10px 0;
}
.aigen-node-shell {
  display:grid;
  grid-template-columns:180px minmax(520px, 1fr) 320px;
  gap:12px;
  align-items:stretch;
}
.aigen-node-library,
.aigen-node-inspector {
  border:1px solid var(--line);
  border-radius:8px;
  background:#fbfcfb;
  padding:12px;
  min-width:0;
}
.aigen-node-library {
  display:grid;
  gap:8px;
  align-content:start;
}
.aigen-node-library > strong {
  font-size:13px;
}
.aigen-lib-node {
  border:1px solid var(--line);
  border-radius:8px;
  background:#fff;
  color:var(--ink);
  min-height:34px;
  padding:6px 9px;
  text-align:left;
  font-weight:700;
  cursor:pointer;
}
.aigen-lib-node.active {
  border-color:var(--green);
  background:#eef8f3;
  color:var(--green);
}
.aigen-node-stage {
  position:relative;
  min-height:420px;
  border:1px solid #d7e0dc;
  border-radius:8px;
  overflow:auto;
  background:
    linear-gradient(rgba(50,122,94,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(50,122,94,.06) 1px, transparent 1px),
    #f8fbf9;
  background-size:24px 24px;
}
.aigen-node-edges {
  position:absolute;
  inset:0;
  width:760px;
  height:420px;
  pointer-events:none;
}
.aigen-node-edges path {
  fill:none;
  stroke:#98aba3;
  stroke-width:2;
  stroke-dasharray:5 6;
}
.aigen-flow-node {
  position:absolute;
  width:132px;
  min-height:74px;
  display:grid;
  gap:3px;
  border:1px solid #cfd9d4;
  border-radius:8px;
  background:#fff;
  color:var(--ink);
  padding:9px;
  text-align:left;
  box-shadow:0 8px 18px rgba(20,42,35,.06);
  cursor:pointer;
}
.aigen-flow-node b {
  font-size:11px;
  color:var(--muted);
}
.aigen-flow-node strong {
  font-size:13px;
}
.aigen-flow-node small {
  color:var(--muted);
  overflow-wrap:anywhere;
}
.aigen-flow-node.active {
  border-color:var(--green);
  box-shadow:0 0 0 2px rgba(50,122,94,.14), 0 10px 24px rgba(20,42,35,.08);
}
.aigen-flow-node.output {
  background:#f7fbff;
  border-color:#c9dbea;
}
.aigen-inspector-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom:10px;
}
.aigen-control-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}
.aigen-control-grid label {
  display:grid;
  gap:4px;
  font-size:12px;
  color:var(--muted);
}
.aigen-control-grid input,
.aigen-control-grid select {
  min-width:0;
  width:100%;
  border:1px solid var(--line);
  border-radius:6px;
  padding:7px 8px;
  background:#fff;
  color:var(--ink);
  box-sizing:border-box;
}
.aigen-board-summary,
.aigen-draft-preview {
  margin-top:10px;
  border:1px solid var(--line);
  border-radius:8px;
  padding:10px;
  background:#fff;
  color:var(--muted);
  font-size:12px;
  line-height:1.55;
  overflow-wrap:anywhere;
}
.aigen-candidate-card,
.aigen-candidate-card * {
  min-width:0;
  overflow-wrap:anywhere;
}
.aigen-candidate-panel .material-inherit-card {
  display:none;
}
@media (max-width: 980px) {
  .aigen-node-shell {
    grid-template-columns:1fr;
  }
  .aigen-node-library {
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
  .aigen-node-library > strong {
    grid-column:1 / -1;
  }
  .aigen-node-stage {
    min-height:430px;
  }
}
@media (max-width: 390px) {
  .aigen-node-panel .panel-head,
  .aigen-candidate-panel .panel-head {
    align-items:flex-start;
  }
  .aigen-node-panel .panel-actions,
  .aigen-candidate-panel .panel-actions {
    width:100%;
  }
  .aigen-node-panel .panel-actions button,
  .aigen-candidate-panel .panel-actions button {
    flex:1 1 100%;
    min-width:0;
  }
  .aigen-entry-strip,
  .aigen-guardbar {
    flex-direction:column;
  }
  .aigen-entry-btn,
  .aigen-guardbar .status-pill {
    width:100%;
    text-align:center;
    box-sizing:border-box;
  }
  .aigen-node-library,
  .aigen-control-grid {
    grid-template-columns:1fr;
  }
  .aigen-node-stage {
    min-height:500px;
  }
  .aigen-flow-node {
    width:126px;
  }
  .aigen-node-inspector {
    padding:10px;
  }
  .aigen-disabled-actions {
    flex-direction:column;
  }
  .aigen-disabled-actions button {
    width:100%;
  }
}


@media (max-width: 1320px) {
  .aigen-node-shell {
    grid-template-columns: minmax(130px, 170px) minmax(0, 1fr);
  }

  .aigen-node-inspector {
    grid-column: 1 / -1;
    max-width: none;
  }
}


@media (max-width: 390px) {
  .aigen-node-stage {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    min-height: 0;
    overflow: visible;
    padding: 10px;
  }

  .aigen-node-edges {
    display: none;
  }

  .aigen-flow-node {
    position: relative;
    left: auto !important;
    top: auto !important;
    width: auto;
    min-height: 64px;
  }
}

@media (max-width: 390px) {
  .ops-node-shell,
  .ops-script-review-zone,
  .ops-node-actions {
    grid-template-columns: 1fr;
  }

  .ops-node-shell {
    max-width: 100%;
    overflow: hidden;
  }

  .ops-node-stage {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    min-height: 0;
    overflow: visible;
    padding: 10px;
  }

  .ops-node-edges {
    display: none;
  }

  .ops-node-stage .ops-flow-caption {
    position: static;
    order: -1;
  }

  .ops-node-stage .ops-flow-node {
    position: relative;
    left: auto !important;
    top: auto !important;
    width: auto !important;
    min-height: 64px;
  }

  .ops-node-guardbar .status-pill,
  .ops-node-disabled-row button {
    width: 100%;
    box-sizing: border-box;
    text-align: center;
  }

  .ops-field-grid.compact {
    grid-template-columns: 1fr;
  }
}


/* R1: keep ops node canvas inside 1280 desktop viewport */
.ops-node-shell,
.ops-node-stage,
.ops-node-inspector,
.ops-node-panel,
.ops-field-grid.compact,
.ops-field-grid.compact label {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.ops-field-grid.compact input,
.ops-field-grid.compact select,
.ops-wide-label input,
.ops-wide-label textarea {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

@media (min-width: 901px) and (max-width: 1320px) {
  .ops-node-shell {
    grid-template-columns: minmax(120px, 0.48fr) minmax(0, 1.34fr) minmax(248px, 0.86fr);
  }

  .ops-node-stage {
    overflow: hidden;
  }

  .ops-node-stage .ops-flow-node {
    width: 112px;
    min-height: 66px;
    padding: 7px 8px;
    font-size: 12px;
  }

  .ops-node-stage .ops-flow-node[style*="left:610px"] {
    left: calc(100% - 128px) !important;
  }

  .ops-node-stage .ops-flow-node[style*="left:410px"] {
    left: 50% !important;
  }

  .ops-node-stage .ops-flow-node[style*="left:204px"] {
    left: 24% !important;
  }

  .ops-node-edges {
    transform: scaleX(.72);
    transform-origin: left center;
  }

  .ops-field-grid.compact {
    grid-template-columns: 1fr;
  }
}


/* ======= 设计截图精渲 MVP ======= */
.polish-mvp-panel { border-color: #d8e3dc; }
.polish-mvp-head small { color: var(--muted); }
.polish-guardbar,
.polish-disabled-actions,
.polish-candidate-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}
.polish-flow-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}
.polish-flow-step {
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 9px;
  display: grid;
  gap: 3px;
  text-align: left;
}
.polish-flow-step.active {
  border-color: var(--green);
  background: #eef8f3;
}
.polish-flow-step b,
.polish-flow-step small { color: var(--muted); }
.polish-workbench {
  display: grid;
  grid-template-columns: minmax(240px, .7fr) minmax(0, 1.3fr);
  gap: 12px;
}
.polish-source-card,
.polish-settings-card,
.polish-draft-preview,
.polish-candidate-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 12px;
  min-width: 0;
}
.polish-card-head,
.polish-candidate-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}
.polish-placeholder {
  min-height: 150px;
  border: 1px dashed #cfd9d4;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(50,122,94,.08) 25%, transparent 25%) 0 0/18px 18px,
    #f8fbf9;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 14px;
  text-align: center;
}
.polish-placeholder span,
.polish-source-card small,
.polish-candidate-card p { color: var(--muted); }
.polish-file-pick {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 9px;
  display: grid;
  gap: 6px;
  cursor: pointer;
}
.polish-file-pick input { max-width: 100%; }
.polish-field-grid,
.polish-option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.polish-field-grid label,
.polish-wide-label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
}
.polish-field-grid input,
.polish-field-grid select,
.polish-wide-label input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.polish-option-grid {
  margin: 10px 0;
}
.polish-option-grid label {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}
.polish-disabled-actions button {
  min-height: 40px;
  border: 1px solid #d8ddd6;
  border-radius: 8px;
  background: #eceeed;
  color: #75807b;
  cursor: not-allowed;
  display: grid;
  gap: 2px;
  text-align: left;
}
.polish-draft-zone {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: 12px;
  margin-top: 12px;
}
.polish-draft-preview {
  display: grid;
  gap: 8px;
}
.polish-draft-preview .draft-field {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 8px;
}
.polish-draft-preview .draft-value,
.polish-candidate-card strong {
  overflow-wrap: anywhere;
}
.polish-candidate-grid {
  display: grid;
  gap: 8px;
}
.polish-candidate-grid > p {
  margin: 0;
  color: var(--muted);
  text-align: center;
  padding: 18px;
}
.polish-candidate-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}
.polish-candidate-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  font-size: 12px;
}
.polish-result-preview-slot {
  margin-top: 10px;
  border: 1px dashed #c9d5cf;
  border-radius: 8px;
  background: #f6f8f7;
  min-height: 92px;
  padding: 10px;
  display: grid;
  align-content: center;
  gap: 5px;
  overflow-wrap: anywhere;
}
.polish-result-preview-slot strong {
  font-size: 14px;
}
.polish-result-preview-slot small {
  color: var(--muted);
}
/* AI-ASSIST-NODE-MODALS-R2: production workflow pickers, output review, and annotation workspace. */
body:not(.home-mode) .ai-assist-modal {
  z-index: 2200;
  background: rgba(0, 12, 18, .62);
  backdrop-filter: blur(6px);
}

body:not(.home-mode) .ai-assist-modal-card {
  border-color: rgba(88, 172, 199, .72);
  background:
    linear-gradient(180deg, rgba(14, 45, 60, .96), rgba(5, 24, 34, .98)),
    #071721;
  color: rgba(238, 250, 255, .94);
  box-shadow: 0 26px 80px rgba(0, 0, 0, .46), inset 0 0 0 1px rgba(255, 255, 255, .05);
}

.ai-assist-modal-card.ai-assist-modal-card-medium {
  width: min(760px, calc(100vw - 40px));
}

.ai-assist-modal-card.ai-assist-modal-card-large {
  width: min(980px, calc(100vw - 40px));
}

.ai-assist-modal-card.ai-assist-modal-card-annotate {
  width: min(1460px, calc(100vw - 26px));
  max-height: min(960px, calc(100vh - 18px));
}

body:not(.home-mode) #ai .ai-assist-modal[data-ai-assist-node="local_edit"] .ai-assist-modal-card.ai-assist-modal-card-annotate {
  --modal-max-width: 1460px;
  width: min(1460px, calc(100vw - var(--mf-sidebar-width, 224px) - 40px)) !important;
  max-width: min(1460px, calc(100vw - var(--mf-sidebar-width, 224px) - 40px)) !important;
}

body:not(.home-mode) .ai-assist-modal-card h3,
body:not(.home-mode) .ai-assist-modal-fields label,
body:not(.home-mode) .ai-assist-picker-head strong {
  color: rgba(245, 253, 255, .98);
}

body:not(.home-mode) .ai-assist-modal-fields input,
body:not(.home-mode) .ai-assist-modal-fields select,
body:not(.home-mode) .ai-assist-modal-fields textarea {
  border-color: rgba(103, 179, 204, .48);
  background: rgba(6, 28, 40, .88);
  color: rgba(243, 252, 255, .96);
}

body:not(.home-mode) .ai-assist-modal-fields input::placeholder,
body:not(.home-mode) .ai-assist-modal-fields textarea::placeholder {
  color: rgba(170, 198, 209, .72);
}

.ai-assist-modal[data-ai-assist-node="local_image_route"] #aiAssistModalConfirmBtn,
.ai-assist-modal[data-ai-assist-node="local_edit"] #aiAssistModalConfirmBtn {
  display: none;
}

.ai-assist-modal[data-ai-assist-node="local_image_route"] .ai-assist-modal-card footer,
.ai-assist-modal[data-ai-assist-node="local_edit"] .ai-assist-modal-card footer {
  justify-content: flex-end;
}

.ai-assist-picker-panel,
.ai-assist-generation-panel,
.ai-assist-output-panel,
.ai-assist-annotation-panel {
  display: grid;
  gap: 14px;
}

.ai-assist-picker-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(118, 197, 222, .22);
}

.ai-assist-picker-head div {
  display: grid;
  gap: 4px;
}

.ai-assist-picker-head small,
.ai-assist-source-card small,
.ai-assist-prompt-card small,
.ai-assist-bio-card small,
.ai-assist-output-panel p {
  color: rgba(184, 211, 221, .78);
  line-height: 1.45;
}

.ai-assist-picker-head select {
  min-width: 220px;
}

.ai-assist-source-grid,
.ai-assist-prompt-grid,
.ai-assist-bio-grid,
.ai-assist-material-tag-grid {
  display: grid;
  gap: 10px;
}

.ai-assist-source-grid {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  max-height: 430px;
  overflow: auto;
}

.ai-assist-bio-grid {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  max-height: 360px;
  overflow: auto;
}

.ai-assist-prompt-grid {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  max-height: 330px;
  overflow: auto;
}

.ai-assist-material-tag-grid {
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
}

.ai-assist-material-prompt-layout {
  display: grid;
  grid-template-columns: minmax(128px, 160px) minmax(0, 1fr);
  gap: 12px;
  min-height: 420px;
}

.ai-assist-material-category-rail {
  display: grid;
  align-content: start;
  gap: 8px;
  max-height: 430px;
  overflow: auto;
  padding: 8px;
  border: 1px solid rgba(88, 156, 182, .30);
  border-radius: 8px;
  background: rgba(4, 20, 29, .52);
}

.ai-assist-material-category-rail button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  border: 1px solid rgba(88, 156, 182, .38);
  border-radius: 7px;
  background: rgba(7, 30, 42, .74);
  color: rgba(238, 250, 255, .88);
  font-weight: 800;
  cursor: pointer;
}

.ai-assist-material-category-rail button span {
  min-width: 22px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(133, 226, 247, .14);
  color: rgba(201, 241, 250, .92);
  font-size: 11px;
}

.ai-assist-material-category-rail button:hover,
.ai-assist-material-category-rail button.is-active {
  border-color: rgba(126, 230, 255, .86);
  background: rgba(12, 70, 88, .94);
}

.ai-assist-material-prompt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
  max-height: 430px;
  overflow: auto;
}

.ai-assist-material-prompt-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  grid-template-areas:
    "thumb title"
    "thumb meta"
    "body body";
  gap: 6px 10px;
  min-height: 150px;
  padding: 10px;
  border: 1px solid rgba(88, 156, 182, .44);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(10, 35, 48, .90), rgba(4, 22, 32, .90));
  color: rgba(241, 252, 255, .94);
  text-align: left;
  cursor: pointer;
}

/* AI设计辅助审计修R1(2026-07-06) P3顺手项: hover 与 is-selected 原样式完全相同→悬停即"看似选中"; 拆开——hover 只提边框, 选中才有底色+光晕 */
.ai-assist-material-prompt-card:hover {
  border-color: rgba(126, 230, 255, .70);
}

.ai-assist-material-prompt-card.is-selected {
  border-color: rgba(126, 230, 255, .95);
  background: linear-gradient(180deg, rgba(12, 83, 99, .98), rgba(3, 30, 42, .98));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .10), 0 0 0 2px rgba(82, 207, 238, .16);
}

.ai-assist-material-prompt-thumb {
  grid-area: thumb;
  min-height: 58px;
  border-radius: 7px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid rgba(105, 177, 201, .35);
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .08) 0 8px, rgba(255, 255, 255, .02) 8px 16px);
}

.ai-assist-material-prompt-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ai-assist-material-prompt-card strong {
  grid-area: title;
  min-width: 0;
  align-self: end;
}

.ai-assist-material-prompt-card small {
  grid-area: meta;
  color: rgba(184, 211, 221, .78);
}

.ai-assist-material-prompt-card em {
  grid-area: body;
  color: rgba(215, 237, 244, .84);
  font-style: normal;
  font-size: 12px;
  line-height: 1.45;
}

.ai-assist-source-card,
.ai-assist-bio-card,
.ai-assist-prompt-card,
.ai-assist-material-tag,
.ai-assist-mini-source,
.ai-assist-output-slot {
  display: grid;
  gap: 7px;
  align-content: start;
  min-width: 0;
  border: 1px solid rgba(88, 156, 182, .44);
  border-radius: 8px;
  background: rgba(8, 31, 43, .72);
  color: rgba(241, 252, 255, .94);
  padding: 10px;
  text-align: left;
  cursor: pointer;
}

.ai-assist-source-card:hover,
.ai-assist-bio-card:hover,
.ai-assist-prompt-card:hover,
.ai-assist-material-tag:hover,
.ai-assist-mini-source:hover,
.ai-assist-output-slot:hover {
  border-color: rgba(126, 230, 255, .85);
  background: rgba(13, 50, 65, .92);
}

.ai-assist-source-card.is-selected,
.ai-assist-bio-card.is-selected,
.ai-assist-prompt-card.is-selected,
.ai-assist-material-tag.is-selected,
.ai-assist-mini-source.is-selected,
.ai-assist-output-slot.is-selected {
  border-color: rgba(126, 230, 255, .95);
  background:
    linear-gradient(180deg, rgba(12, 83, 99, .98), rgba(3, 30, 42, .98)),
    rgba(4, 34, 46, .98);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .10), 0 0 0 2px rgba(82, 207, 238, .18);
}

.ai-assist-prompt-card.is-disabled {
  opacity: .46;
  pointer-events: none;
}

.ai-assist-source-thumb,
.ai-assist-bio-card span,
.ai-assist-mini-source span {
  display: grid;
  place-items: center;
  min-height: 118px;
  border-radius: 7px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(44, 85, 103, .88), rgba(12, 34, 46, .92));
}

.ai-assist-source-thumb img,
.ai-assist-bio-card img,
.ai-assist-mini-source img,
.ai-assist-output-slot img,
.ai-assist-material-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ai-assist-source-card strong,
.ai-assist-bio-card strong,
.ai-assist-prompt-card strong,
.ai-assist-output-slot strong {
  color: rgba(246, 253, 255, .98);
  line-height: 1.35;
}

.ai-assist-picker-actions,
.ai-assist-inline-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ai-assist-inline-actions {
  justify-content: center;
  padding-top: 4px;
}

.ai-assist-wide-textarea {
  display: grid;
  gap: 7px;
}

.ai-assist-wide-textarea textarea {
  min-height: 132px;
}

.ai-assist-generation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
}

.ai-assist-generation-grid label {
  min-width: 0;
}

.ai-assist-output-dropzone {
  border: 1px dashed rgba(126, 210, 236, .52);
  border-radius: 10px;
  padding: 12px;
  background: rgba(4, 21, 31, .42);
}

.ai-assist-output-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ai-assist-output-slot {
  min-height: 168px;
}

.ai-assist-output-slot span {
  display: grid;
  place-items: center;
  min-height: 108px;
  border-radius: 7px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(52, 88, 106, .9), rgba(14, 35, 48, .94));
  font-size: 22px;
  font-weight: 900;
}

.ai-assist-node-slot-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin-top: 9px;
}

.ai-assist-node-slot-strip i {
  height: 28px;
  border: 1px dashed rgba(126, 203, 226, .55);
  border-radius: 5px;
  background: rgba(6, 28, 40, .6);
}

.ai-assist-node-slot-strip i.filled {
  border-style: solid;
  background: linear-gradient(135deg, rgba(99, 190, 218, .75), rgba(11, 48, 66, .92));
}

.ai-assist-annotation-panel {
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  align-items: start;
}

.ai-assist-annotation-panel > .ai-assist-wide-textarea,
.ai-assist-annotation-settings,
.ai-assist-annotation-panel > .ai-assist-inline-actions {
  grid-column: 1 / -1;
}

.ai-assist-mini-source-grid {
  display: grid;
  gap: 9px;
  max-height: 420px;
  overflow: auto;
}

.ai-assist-mini-source {
  grid-template-columns: 82px 1fr;
  align-items: center;
}

.ai-assist-mini-source span {
  min-height: 64px;
}

.ai-assist-annotation-board {
  display: grid;
  gap: 10px;
}

.ai-assist-annotation-toolbar {
  /* 文字标注深化: 改 flex-wrap——"文字"工具追加配色/字号选择器时, 工具条不被固定网格挤爆, 自然换行 */
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.ai-assist-annotation-toolbar > input[data-ai-assist-field="marker_text"] {
  flex: 1 1 200px;
  min-width: 160px;
}

.ai-assist-annotation-toolbar button {
  min-height: 34px;
  border: 1px solid rgba(99, 176, 202, .48);
  border-radius: 7px;
  background: rgba(7, 31, 42, .88);
  color: rgba(238, 250, 255, .92);
  font-weight: 800;
  cursor: pointer;
}

/* #4(2026-07-10): 撤销/重做不可用时置灰(栈空), 视觉克制 */
.ai-assist-annotation-toolbar button:disabled {
  opacity: .4;
  cursor: not-allowed;
  border-color: rgba(99, 176, 202, .24);
}

.ai-assist-annotation-toolbar button.is-active,
.ai-assist-annotation-toolbar button:hover {
  border-color: rgba(126, 230, 255, .94);
  background: rgba(14, 74, 92, .95);
}

.ai-assist-annotator-canvas {
  position: relative;
  min-height: 520px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(116, 190, 214, .48);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(27, 61, 78, .66), rgba(3, 17, 26, .92)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .06) 0 8px, transparent 8px 16px);
  color: rgba(210, 234, 242, .78);
  cursor: crosshair;
}

.ai-assist-annotator-canvas > img {
  width: 100%;
  max-height: 680px;
  object-fit: contain;
}

.ai-assist-modal-card-annotate .ai-assist-modal-fields {
  gap: 10px;
  padding-right: 4px;
}

.ai-assist-modal-card-annotate .ai-assist-annotation-panel {
  gap: 14px;
}

.ai-assist-modal-card-annotate .ai-assist-annotator-canvas {
  min-height: 0;
  height: clamp(500px, 64vh, 660px);
}

.ai-assist-modal-card-annotate .ai-assist-wide-textarea textarea {
  min-height: 96px;
}

.ai-assist-modal-card-annotate .ai-assist-generation-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ai-assist-marker-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.ai-assist-marker {
  position: absolute;
  transform: translate(-50%, -50%);
  color: #f6fbff;
  font-style: normal;
}

.ai-assist-marker b {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #ff4f57;
  color: #fff;
  box-shadow: 0 0 0 3px rgba(255, 79, 87, .22);
}

.ai-assist-marker-circle b {
  outline: 3px solid rgba(255, 79, 87, .85);
  outline-offset: 10px;
}

.ai-assist-marker-arrow b::after {
  content: "";
  position: absolute;
  width: 58px;
  height: 2px;
  left: 24px;
  top: 13px;
  background: #ff4f57;
  box-shadow: 48px 0 0 -3px #ff4f57;
}

.ai-assist-marker em {
  position: absolute;
  left: 32px;
  top: 18px;
  min-width: 92px;
  max-width: 220px;
  padding: 6px 8px;
  border-radius: 7px;
  background: rgba(4, 20, 29, .9);
  border: 1px solid rgba(255, 99, 108, .65);
  color: #fff;
  font-size: 12px;
  line-height: 1.35;
}

.ai-assist-annotator-canvas.is-annotating {
  border-color: rgba(255, 109, 116, .92);
  box-shadow: inset 0 0 0 1px rgba(255, 109, 116, .24), 0 0 0 3px rgba(255, 109, 116, .10);
}

.ai-assist-annotator-canvas.is-select-mode {
  cursor: default;
  border-color: rgba(126, 230, 255, .82);
}

.ai-assist-annotator-canvas.is-select-mode .ai-assist-marker-layer,
.ai-assist-annotator-canvas.is-select-mode .ai-assist-marker,
.ai-assist-marker-editor,
.ai-assist-marker-editor * {
  pointer-events: auto;
}

.ai-assist-marker.is-selected {
  z-index: 8;
  filter: drop-shadow(0 0 12px rgba(126, 230, 255, .38));
}

.ai-assist-marker.is-selected b {
  background: #25c7e8;
  box-shadow: 0 0 0 3px rgba(37, 199, 232, .24);
}

.ai-assist-marker.is-selected.ai-assist-marker-box {
  border-color: rgba(126, 230, 255, .96);
  background: rgba(50, 196, 227, .12);
}

.ai-assist-marker-editor {
  position: absolute;
  left: 8px;
  top: calc(100% + 34px);
  z-index: 12;
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto auto;
  gap: 6px;
  min-width: 300px;
  padding: 8px;
  border: 1px solid rgba(126, 230, 255, .72);
  border-radius: 8px;
  background: rgba(4, 22, 32, .96);
  box-shadow: 0 16px 34px rgba(0, 0, 0, .34);
}

.ai-assist-marker-arrow .ai-assist-marker-editor,
.ai-assist-marker-text .ai-assist-marker-editor {
  top: 34px;
}

.ai-assist-marker-editor.is-above {
  top: auto;
  bottom: calc(100% + 10px);
}

.ai-assist-marker-editor input {
  min-height: 32px;
  border: 1px solid rgba(95, 171, 197, .52);
  border-radius: 6px;
  background: rgba(7, 30, 42, .92);
  color: rgba(241, 252, 255, .95);
}

.ai-assist-marker-editor button {
  min-height: 32px;
  border: 1px solid rgba(105, 181, 205, .58);
  border-radius: 6px;
  background: rgba(12, 61, 78, .96);
  color: rgba(241, 252, 255, .95);
  font-weight: 800;
}

.ai-assist-marker-editor button.danger {
  border-color: rgba(255, 116, 124, .66);
  background: rgba(92, 22, 30, .92);
}

.ai-assist-marker-box,
.ai-assist-draft-box {
  transform: none;
  border: 2px solid rgba(255, 79, 87, .96);
  border-radius: 6px;
  background: rgba(255, 79, 87, .10);
  box-shadow: inset 0 0 0 999px rgba(255, 79, 87, .03), 0 10px 24px rgba(0, 0, 0, .18);
}

.ai-assist-marker-box b {
  position: absolute;
  left: -12px;
  top: -12px;
}

.ai-assist-marker-box em,
.ai-assist-draft-box em {
  left: 8px;
  top: calc(100% + 7px);
}

.ai-assist-marker-arrow,
.ai-assist-draft-arrow {
  transform: none;
  width: 0;
  height: 0;
}

.ai-assist-marker-arrow span,
.ai-assist-draft-arrow span {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--arrow-length, 80px);
  height: 3px;
  transform: rotate(var(--arrow-angle, 0deg));
  transform-origin: 0 50%;
  border-radius: 999px;
  background: #ff4f57;
  box-shadow: 0 0 0 2px rgba(255, 79, 87, .16);
}

.ai-assist-marker-arrow span::after,
.ai-assist-draft-arrow span::after {
  content: "";
  position: absolute;
  right: -1px;
  top: 50%;
  width: 12px;
  height: 12px;
  border-right: 3px solid #ff4f57;
  border-top: 3px solid #ff4f57;
  transform: translateY(-50%) rotate(45deg);
  background: transparent;
}

.ai-assist-marker-arrow b {
  position: absolute;
  left: -13px;
  top: -13px;
}

.ai-assist-marker-arrow b::after {
  content: none;
}

/* 文字标注深化: text/draft-text 已改纯文字标签(不再渲染 <b> 红 pin), 停用文字标签写死红——此规则退役(box/arrow 红 pin 见下方各自规则, 一个不动) */

.ai-assist-draft-marker {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  color: #fff;
  font-style: normal;
  opacity: .92;
}

.ai-assist-draft-box {
  border-style: dashed;
}

.ai-assist-draft-marker b {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 79, 87, .95);
  color: #fff;
}

.ai-assist-draft-marker em {
  position: absolute;
  min-width: 100px;
  max-width: 260px;
  padding: 6px 8px;
  border-radius: 7px;
  background: rgba(4, 20, 29, .92);
  border: 1px solid rgba(255, 99, 108, .65);
  color: #fff;
  font-size: 12px;
  line-height: 1.35;
}

.ai-assist-draft-arrow em {
  left: 34px;
  top: 15px;
}

.ai-assist-draft-text {
  transform: translate(-50%, -50%);
}

.ai-assist-draft-text em {
  left: 30px;
  top: 16px;
}

.ai-assist-empty {
  min-height: 120px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(120, 184, 206, .45);
  border-radius: 8px;
  color: rgba(189, 215, 224, .76);
  text-align: center;
  padding: 14px;
  font-weight: 800;
}

body:not(.home-mode) .ai-assist-node.configured {
  border-color: rgba(92, 215, 178, .82);
  background: linear-gradient(180deg, rgba(12, 65, 55, .92), rgba(5, 28, 34, .96));
}

body:not(.home-mode) .ai-assist-material-preview {
  min-height: 118px;
  color: rgba(233, 249, 255, .88);
}

@media (max-width: 900px) {
  .polish-flow-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .polish-workbench,
  .polish-draft-zone { grid-template-columns: 1fr; }
}
@media (max-width: 390px) {
  .polish-mvp-panel .panel-head,
  .polish-card-head,
  .polish-candidate-head {
    align-items: flex-start;
  }
  .polish-mvp-panel .panel-actions,
  .polish-mvp-panel .panel-actions button,
  .polish-guardbar .status-pill,
  .polish-disabled-actions button {
    width: 100%;
    box-sizing: border-box;
  }
  .polish-guardbar,
  .polish-disabled-actions {
    flex-direction: column;
  }
  .polish-flow-strip,
  .polish-field-grid,
  .polish-option-grid,
  .polish-candidate-body {
    grid-template-columns: 1fr;
  }
  .polish-draft-preview .draft-field {
    grid-template-columns: 1fr;
  }
}

/* THREE-CANVAS-MIN-ACCEPT-FIX support: reference-style ops production board while keeping dry-run limits explicit */
.ops-node-panel {
  background: #f7faf8;
  border-color: #d8e3dc;
}

.ops-node-head h2 {
  letter-spacing: 0;
}

.ops-node-shell {
  background: #eef5f0;
  border: 1px solid #d8e3dc;
  border-radius: 8px;
  padding: 10px;
}

.ops-node-library,
.ops-node-inspector {
  background: rgba(255,255,255,.96);
  border-color: #dfe8e2;
  box-shadow: 0 10px 24px rgba(24, 60, 45, .06);
}

.ops-node-library > strong {
  display: flex;
  align-items: center;
  min-height: 32px;
  font-size: 14px;
}

.ops-lib-section-title {
  display: block;
  margin: 10px 0 2px;
  font-size: 12px;
  font-weight: 800;
  color: #53615b;
}

.ops-lib-node {
  justify-content: flex-start;
  gap: 8px;
  background: #f8faf8;
}

.ops-lib-node.active,
.ops-flow-node.active {
  background: #eef8f2;
}

.ops-node-stage {
  background:
    radial-gradient(circle, rgba(22, 86, 60, .14) 1px, transparent 1.5px),
    linear-gradient(180deg, #fcfefd 0%, #f7faf8 100%);
  background-size: 18px 18px, auto;
  border-color: #d8e3dc;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.65);
}

.ops-flow-caption {
  display: grid;
  gap: 2px;
  padding: 9px 12px;
  border: 1px solid #d8e3dc;
  background: rgba(255,255,255,.88);
  box-shadow: 0 8px 18px rgba(24, 60, 45, .05);
}

.ops-flow-caption strong {
  color: #0c4f36;
  font-size: 13px;
}

.ops-flow-caption span {
  color: #52645c;
  font-size: 12px;
}

.ops-flow-node {
  background: rgba(255,255,255,.96);
  box-shadow: 0 10px 18px rgba(24, 60, 45, .07);
}

.ops-flow-node b {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #0f6a45;
  color: #fff;
}

.ops-node-edges path {
  stroke: #375f4b;
  stroke-dasharray: none;
}

.ops-inspector-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 3px;
  border-radius: 8px;
  background: #eef3ef;
}

.ops-inspector-tabs span {
  min-width: 0;
  text-align: center;
  padding: 7px 4px;
  border-radius: 6px;
  color: #607067;
  font-size: 12px;
  font-weight: 700;
}

.ops-inspector-tabs .active {
  background: #fff;
  color: #0c4f36;
  box-shadow: 0 4px 10px rgba(24, 60, 45, .08);
}


/* THREE-CANVAS-MIN-ACCEPT-FIX-20260613-06 */
.aigen-output-lock {
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  margin-top:10px;
  border:1px solid #e0c58f;
  border-radius:8px;
  background:#fff8e8;
  color:#5a3c0c;
}
.aigen-output-lock strong { white-space:nowrap; }
.aigen-flow-node.disabled-output {
  border-color:#dec082;
  background:#fff8e8;
  color:#6b4b12;
  cursor:not-allowed;
}
.aigen-flow-node.disabled-output b { background:#c48b2b; color:#fff; }
.aigen-lib-node.disabled-entry { opacity:.72; cursor:not-allowed; }

@media (max-width: 390px) {
  .aigen-output-lock { align-items:flex-start; flex-direction:column; }
}

.three-canvas-trial-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid #cfe0d8;
  border-left: 4px solid var(--green);
  border-radius: 8px;
  background: #f7fbf8;
}

.three-canvas-trial-strip > div:first-child {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.three-canvas-trial-strip strong {
  font-size: 15px;
  color: var(--ink);
}

.three-canvas-trial-strip small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.trial-strip-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (max-width: 900px) {
  .three-canvas-trial-strip { grid-template-columns: 1fr; }
  .trial-strip-actions { justify-content: flex-start; }
}

@media (max-width: 390px) {
  .three-canvas-trial-strip { padding: 10px; }
  .trial-strip-actions { display: grid; grid-template-columns: 1fr; }
  .trial-strip-actions button { width: 100%; min-width: 0; }
}

/* OPS-COMFYUI-WORKFLOW-CANVAS-FIX: real local ComfyUI-style ops workflow canvas */
.ops-comfy-shell {
  grid-template-columns: 174px minmax(0, 1fr) 58px;
  min-height: 590px;
  background: #edf4ef;
  transition: grid-template-columns .18s ease;
}

.ops-comfy-shell.output-open {
  grid-template-columns: 174px minmax(0, 1fr) minmax(282px, .78fr);
}

.ops-comfy-library small {
  color: #617168;
  font-size: 12px;
}

.ops-comfy-stage {
  min-height: 560px;
  isolation: isolate;
  cursor: default;
}

.ops-comfy-caption {
  z-index: 2;
  pointer-events: none;
}

.ops-workflow-node {
  z-index: 4;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.ops-workflow-node:active {
  cursor: grabbing;
}

.ops-workflow-node.dragging {
  z-index: 10;
  box-shadow: 0 18px 34px rgba(12, 79, 54, .18);
}

.ops-comfy-edges {
  z-index: 1;
}

.ops-comfy-edges path {
  stroke: #1f5f43;
  stroke-width: 2.6;
  stroke-dasharray: none;
  filter: drop-shadow(0 2px 2px rgba(15, 106, 69, .16));
}

.ops-comfy-popover {
  position: absolute;
  z-index: 12;
  width: min(390px, calc(100% - 24px));
  max-height: 430px;
  overflow: auto;
  border: 1px solid #cfe0d7;
  border-radius: 8px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 22px 50px rgba(24, 60, 45, .18);
  padding: 10px;
}

.ops-comfy-popover.hidden {
  display: none;
}

.ops-comfy-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2ebe6;
}

.ops-comfy-popover .ops-node-group {
  display: none;
}

.ops-comfy-popover .ops-node-group.active {
  display: block;
}

.ops-comfy-popover .ops-node-actions {
  margin-top: 8px;
}

.ops-material-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 8px;
}

.ops-material-picker label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
  border: 1px solid #e0e8e2;
  border-radius: 8px;
  background: #f8fbf9;
  padding: 7px;
  font-size: 12px;
}

.ops-material-score {
  margin: 8px 0;
  font-size: 12px;
  font-weight: 800;
  color: #0c4f36;
}

.ops-output-drawer {
  overflow: hidden;
  min-width: 0;
  border: 1px solid #dfe8e2;
  border-radius: 8px;
  background: rgba(255,255,255,.96);
  padding: 8px;
  opacity: .72;
  transition: opacity .18s ease;
}

.ops-output-drawer:not(.open) .ops-inspector-tabs,
.ops-output-drawer:not(.open) .ops-output-summary,
.ops-output-drawer:not(.open) .ops-output-preview,
.ops-output-drawer:not(.open) .ops-disabled-btn-grid {
  display: none;
}

.ops-output-drawer:not(.open) .ops-inspector-head {
  writing-mode: vertical-rl;
  align-items: center;
  margin: 0 auto;
}

.ops-output-drawer.open {
  opacity: 1;
  padding: 12px;
}

.ops-output-summary {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.ops-output-summary div {
  border: 1px solid #e2ebe6;
  border-radius: 8px;
  padding: 8px;
  background: #f8fbf9;
}

.ops-output-summary span {
  display: block;
  color: #64746b;
  font-size: 12px;
}

.ops-output-preview {
  margin-top: 10px;
  border: 1px solid #dfe8e2;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  color: #26362f;
  font-size: 13px;
  white-space: pre-wrap;
}

@media (max-width: 900px) {
  .ops-comfy-shell,
  .ops-comfy-shell.output-open {
    grid-template-columns: 1fr;
  }

  .ops-output-drawer:not(.open) .ops-inspector-head {
    writing-mode: initial;
  }

  .ops-comfy-popover {
    position: relative;
    left: auto !important;
    top: auto !important;
    width: 100%;
    max-height: none;
    margin-top: 8px;
  }
}


/* OPS-COMFYUI-1280-DESKTOP-FIT: keep the fixed 8-node canvas inside 1280px desktop viewport. */
@media (min-width: 901px) and (max-width: 1320px) {
  .ops-comfy-shell,
  .ops-comfy-shell.output-open {
    grid-template-columns: 128px minmax(0, 1fr) 48px;
  }

  .ops-comfy-shell.output-open .ops-output-drawer.open {
    position: absolute;
    right: 10px;
    top: 66px;
    width: 290px;
    max-height: calc(100% - 82px);
    overflow: auto;
    z-index: 20;
  }

  .ops-comfy-stage .ops-workflow-node {
    width: 102px !important;
    min-height: 64px;
    padding: 7px 8px;
    font-size: 12px;
  }

  .ops-comfy-stage .ops-workflow-node[data-ops-node="project"] { left: 8px !important; top: 92px !important; }
  .ops-comfy-stage .ops-workflow-node[data-ops-node="material"] { left: 118px !important; top: 72px !important; }
  .ops-comfy-stage .ops-workflow-node[data-ops-node="copy"] { left: 228px !important; top: 72px !important; }
  .ops-comfy-stage .ops-workflow-node[data-ops-node="persona"] { left: calc(100% - 112px) !important; top: 92px !important; }
  .ops-comfy-stage .ops-workflow-node[data-ops-node="digital"] { left: 22px !important; top: 298px !important; }
  .ops-comfy-stage .ops-workflow-node[data-ops-node="script"] { left: 148px !important; top: 278px !important; }
  .ops-comfy-stage .ops-workflow-node[data-ops-node="storyboard"] { left: 274px !important; top: 298px !important; }
  .ops-comfy-stage .ops-workflow-node[data-ops-node="review"] { left: calc(100% - 112px) !important; top: 390px !important; }
}


/* OPS-COMFYUI-WORKFLOW-CANVAS-FIX-20260613-08 */
.ops-comfy-panel { border-color:#cfe0d8; }
.ops-comfy-shell {
  display:grid;
  grid-template-columns:minmax(158px,.42fr) minmax(0,1.7fr) minmax(0,0);
  gap:10px;
  align-items:stretch;
}
.ops-comfy-shell:has(.ops-output-drawer:not(.collapsed)) {
  grid-template-columns:minmax(150px,.36fr) minmax(0,1.28fr) minmax(260px,.62fr);
}
.ops-comfy-library {
  align-content:start;
  max-height:640px;
  overflow:auto;
}
.ops-comfy-stage {
  position:relative;
  min-height:560px;
  overflow:hidden;
  border:1px solid #d8e3dc;
  border-radius:8px;
}
.ops-comfy-caption {
  z-index:3;
  left:12px;
  right:12px;
}
.ops-comfy-edges {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  pointer-events:none;
  z-index:1;
}
.ops-comfy-edges path {
  fill:none;
  stroke:#2d674e;
  stroke-width:2.4;
  stroke-linecap:round;
}
.ops-comfy-nodes {
  position:absolute;
  inset:0;
  z-index:2;
}
.ops-comfy-node {
  width:156px;
  min-height:78px;
  cursor:grab;
  touch-action:none;
}
.ops-comfy-node:active { cursor:grabbing; }
.ops-comfy-node.review { background:#fff9ea; border-color:#dfc580; }
.ops-config-popover {
  position:absolute;
  z-index:5;
  display:grid;
  gap:9px;
  width:min(292px, calc(100% - 20px));
  padding:12px;
  border:1px solid #b9d7c8;
  border-radius:8px;
  background:#fff;
  box-shadow:0 18px 42px rgba(24,60,45,.18);
}
.ops-config-popover strong { font-size:14px; }
.ops-config-popover small { color:var(--muted); line-height:1.45; }
.ops-config-popover label {
  display:grid;
  gap:5px;
  font-size:12px;
  font-weight:700;
}
.ops-config-popover input,
.ops-config-popover select,
.ops-config-popover textarea {
  width:100%;
  min-width:0;
  box-sizing:border-box;
  border:1px solid var(--line);
  border-radius:7px;
  padding:8px;
  font:inherit;
}
.ops-material-choices,
.ops-mini-choice-grid {
  display:grid;
  gap:7px;
}
.ops-material-choice {
  grid-template-columns:auto minmax(0,1fr);
  align-items:start;
  padding:8px;
  border:1px solid #e1e8e4;
  border-radius:8px;
  background:#f8fbf9;
}
.ops-material-choice span,
.ops-material-choice small {
  min-width:0;
  overflow-wrap:anywhere;
}
.ops-mini-choice {
  min-width:0;
  padding:8px 10px;
  border:1px solid #d8e3dc;
  border-radius:8px;
  background:#f8faf8;
  color:var(--ink);
  text-align:left;
  font-weight:700;
  cursor:pointer;
}
.ops-mini-choice.active {
  border-color:var(--green);
  background:#eef8f2;
  box-shadow:inset 0 0 0 1px var(--green);
}
.ops-points-line {
  padding:8px 10px;
  border:1px dashed #b9d7c8;
  border-radius:8px;
  background:#f7fbf8;
  color:#315845;
  font-size:12px;
  font-weight:700;
}
.ops-output-drawer {
  transition:opacity .16s ease;
  overflow:hidden;
}
.ops-output-drawer.collapsed {
  width:0;
  min-width:0;
  padding:0;
  border:0;
  opacity:0;
  pointer-events:none;
}
.ops-output-empty,
.ops-output-body {
  display:grid;
  gap:10px;
}
.ops-output-empty small,
.ops-node-preview p {
  color:var(--muted);
  line-height:1.55;
  overflow-wrap:anywhere;
}
.ops-output-actions {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}
.ops-output-actions button { min-width:0; }
.ops-hidden-fields {
  display:none !important;
}

@media (max-width: 900px) {
  .ops-comfy-shell,
  .ops-comfy-shell:has(.ops-output-drawer:not(.collapsed)) {
    grid-template-columns:1fr;
  }
  .ops-comfy-library {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    max-height:none;
  }
  .ops-comfy-library > strong,
  .ops-comfy-library .ops-lib-section-title {
    grid-column:1 / -1;
  }
  .ops-output-drawer.collapsed {
    display:none;
  }
}

@media (max-width: 390px) {
  .ops-node-panel,
  .ops-comfy-shell,
  .ops-comfy-stage,
  .ops-comfy-library,
  .ops-output-drawer {
    max-width:100%;
    min-width:0;
    box-sizing:border-box;
  }
  .ops-comfy-library {
    grid-template-columns:1fr;
  }
  .ops-comfy-stage {
    min-height:720px;
  }
  .ops-comfy-node {
    width:132px;
    min-height:72px;
    padding:8px;
    font-size:12px;
  }
  .ops-config-popover {
    left:10px !important;
    right:10px;
    top:auto !important;
    bottom:10px;
    width:auto;
    max-height:58vh;
    overflow:auto;
  }
  .ops-output-actions {
    grid-template-columns:1fr;
  }
}

/* OPS-COMFYUI-CLICK-LAYER-FIX: keep workflow nodes clickable when a node config popover is open. */
.ops-comfy-stage .ops-workflow-node {
  z-index: 16;
}

.ops-comfy-stage .ops-workflow-node.dragging {
  z-index: 24;
}

.ops-comfy-stage .ops-comfy-popover {
  z-index: 12;
}

/* OPS-COMFYUI-CURRENT-NODE-LAYER-FIX: current rendered nodes stay clickable above the config popover. */
.ops-comfy-stage .ops-comfy-node {
  z-index: 8;
}

.ops-comfy-stage .ops-comfy-node:active {
  z-index: 12;
}

.ops-comfy-stage .ops-config-popover {
  z-index: 7;
}

/* OPS-FIXED-WORKFLOW-R9: 内容营销固定工作流，左侧输入，右侧只输出结果。 */
.ops-comfy-shell,
.ops-comfy-shell:has(.ops-output-drawer:not(.collapsed)) {
  grid-template-columns: minmax(236px, 0.58fr) minmax(560px, 1.35fr) minmax(340px, 0.82fr);
  align-items: stretch;
  gap: 12px;
}

.ops-comfy-library {
  max-height: 78vh;
  overflow: auto;
  padding: 12px;
  gap: 10px;
}

.ops-input-head {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6fbf8;
}

.ops-input-head strong,
.ops-left-field,
.ops-material-choices.compact-list,
.ops-mini-choice-grid {
  grid-column: 1 / -1;
}

.ops-left-field {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.ops-left-field input,
.ops-left-field select,
.ops-left-field textarea {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px 9px;
  color: var(--text);
  font: inherit;
}

.ops-left-field textarea {
  min-height: 58px;
  resize: vertical;
}

.ops-material-choices.compact-list {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.ops-material-choice {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 8px;
  align-items: start;
  padding: 8px;
  border: 1px solid #dce8e1;
  border-radius: 8px;
  background: #fbfffd;
}

.ops-material-choice small {
  grid-column: 2;
  color: var(--muted);
  line-height: 1.35;
}

.ops-mini-choice-grid {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.ops-mini-choice-grid > strong {
  font-size: 13px;
}

.ops-mini-choice-grid button {
  width: 100%;
  justify-content: flex-start;
  border: 1px solid #dce8e1;
  background: #fff;
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--text);
}

.ops-mini-choice-grid button.active {
  border-color: var(--green);
  background: #effaf4;
  color: #065f46;
}

.ops-comfy-stage {
  min-height: 620px;
  background:
    linear-gradient(#edf4ef 1px, transparent 1px),
    linear-gradient(90deg, #edf4ef 1px, transparent 1px),
    #fbfdfb;
  background-size: 22px 22px;
  overflow: hidden;
}

.ops-comfy-node.fixed-node {
  width: 150px;
  min-height: 72px;
  cursor: default;
  border: 1px solid #d8e5dd;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ops-comfy-node.fixed-node:hover,
.ops-comfy-node.fixed-node.active {
  transform: none;
  border-color: var(--green);
  box-shadow: 0 10px 24px rgba(6, 95, 70, 0.14);
}

.ops-comfy-edges .ops-cable-shadow {
  fill: none;
  stroke: rgba(15, 118, 110, 0.18);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ops-comfy-edges .ops-cable-flow {
  fill: none;
  stroke: #ef4444;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 14 12;
  animation: opsCableFlow 1.1s linear infinite;
}

@keyframes opsCableFlow {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: -26; }
}

.ops-output-drawer,
.ops-output-drawer.collapsed {
  display: flex;
  flex-direction: column;
  width: auto;
  min-width: 0;
  opacity: 1;
  pointer-events: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.ops-output-head {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.ops-output-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 3px;
  border: 1px solid #dce8e1;
  border-radius: 8px;
  background: #f8faf9;
}

.ops-output-tabs button {
  min-width: 52px;
  border: 0;
  border-radius: 6px;
  padding: 6px 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.ops-output-tabs button.active {
  background: var(--green);
  color: #fff;
}

.ops-output-summary {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
  border-radius: 10px;
  background: #f8fbf9;
  border: 1px solid #e4eee8;
}

.ops-output-summary p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.ops-output-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.ops-output-card {
  display: grid;
  gap: 8px;
  border: 1px solid #dce8e1;
  border-radius: 10px;
  padding: 10px;
  background: #fff;
}

.ops-output-thumb {
  display: grid;
  place-items: center;
  min-height: 112px;
  border-radius: 8px;
  color: #0f5132;
  font-weight: 700;
  letter-spacing: 0;
  background:
    linear-gradient(135deg, rgba(22, 163, 74, 0.14), rgba(14, 165, 233, 0.1)),
    repeating-linear-gradient(45deg, rgba(15, 23, 42, 0.04) 0, rgba(15, 23, 42, 0.04) 8px, transparent 8px, transparent 16px);
}

.ops-output-card h4 {
  margin: 0;
  font-size: 14px;
}

.ops-output-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.ops-output-download-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ops-output-download-row button {
  flex: 1 1 92px;
}

.ops-config-popover {
  display: none !important;
}

@media (max-width: 900px) {
  .ops-comfy-shell,
  .ops-comfy-shell:has(.ops-output-drawer:not(.collapsed)) {
    grid-template-columns: 1fr;
  }
  .ops-comfy-stage {
    min-height: 520px;
  }
  .ops-output-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  .ops-output-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .ops-comfy-node.fixed-node {
    width: 136px;
  }
  .ops-output-tabs {
    width: 100%;
  }
  .ops-output-tabs button {
    flex: 1;
  }
}

/* OPS-COMFYUI-NODE-LAYER-STACKING-FIX: the node layer must stay above popovers so node switching remains clickable. */
.ops-comfy-stage .ops-comfy-nodes {
  z-index: 9;
}

.ops-comfy-stage .ops-config-popover {
  z-index: 7;
}

/* OPS-COMFYUI-WORKFLOW-CANVAS-FIX-R10: fixed workflow, single-node inputs, output-card drawer. */
#pageSubtitle:empty,
.ops-comfy-caption,
.ops-node-guardbar,
.ops-node-note,
.ops-output-summary,
.ops-inspector-grid {
  display: none !important;
}

.ops-comfy-panel .panel-head + .ops-node-shell {
  margin-top: 8px;
}

.ops-comfy-shell,
.ops-comfy-shell:has(.ops-output-drawer:not(.collapsed)),
.ops-comfy-shell.output-expanded {
  grid-template-columns: minmax(252px, .58fr) minmax(600px, 1.38fr) minmax(396px, .92fr);
  gap: 14px;
  background: #edf4ef;
}

.ops-project-context-bar {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #cfe0d8;
  border-radius: 10px;
  background: #f9fdfb;
}

.ops-project-context-bar span {
  color: #0f5132;
  font-size: 12px;
  font-weight: 800;
}

.ops-project-context-bar select {
  width: 100%;
  min-width: 0;
  border: 1px solid #d8e5dd;
  border-radius: 8px;
  background: #fff;
  padding: 9px 10px;
  color: var(--text);
  font: inherit;
}

.ops-node-input-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #d8e5dd;
  border-radius: 10px;
  background: #fff;
}

.ops-node-input-title {
  display: flex;
  gap: 8px;
  align-items: center;
}

.ops-node-input-title b {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #057a55;
  color: #fff;
  font-size: 13px;
}

.ops-node-input-title strong {
  font-size: 16px;
}

.ops-left-field,
.ops-mini-choice-grid,
.ops-material-choices.compact-list {
  padding: 0;
  border: 0;
  background: transparent;
}

.ops-left-field input,
.ops-left-field select,
.ops-left-field textarea,
.ops-material-choice,
.ops-mini-choice-grid button {
  border-color: #d8e5dd;
  border-radius: 8px;
}

.ops-mini-choice-grid button {
  text-align: left;
  min-height: 40px;
  font-weight: 700;
}

.ops-comfy-stage {
  min-height: 650px;
  background:
    radial-gradient(circle at 18px 18px, rgba(15, 118, 110, .16) 1.2px, transparent 1.4px),
    linear-gradient(#edf4ef 1px, transparent 1px),
    linear-gradient(90deg, #edf4ef 1px, transparent 1px),
    #fbfdfb;
  background-size: 22px 22px, 22px 22px, 22px 22px, auto;
}

.ops-comfy-edges .ops-cable-glow {
  fill: none;
  stroke: rgba(8, 145, 178, .35);
  stroke-width: 13;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: url(#opsCableGlow);
}

.ops-comfy-edges .ops-cable-core {
  fill: none;
  stroke: url(#opsCableGradient);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: url(#opsCableGlow);
}

.ops-comfy-edges .ops-cable-flow {
  fill: none;
  stroke: rgba(255, 255, 255, .9);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1 18;
  animation: opsCableFlowR10 .74s linear infinite;
}

@keyframes opsCableFlowR10 {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: -38; }
}

.ops-output-drawer,
.ops-output-drawer.collapsed {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 650px;
  padding: 12px;
  border: 1px solid #d8e5dd;
  border-radius: 10px;
  background: #fff;
  opacity: 1;
  pointer-events: auto;
}

.ops-output-head {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-height: 36px;
}

.ops-output-head > b {
  display: none;
}

.ops-output-tabs {
  margin-left: auto;
}

.ops-output-empty {
  min-height: 520px;
  border: 0;
  background: transparent;
}

.ops-output-empty strong {
  display: none;
}

.ops-output-body {
  display: flex !important;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.ops-output-body.hidden {
  display: none !important;
}

.ops-node-preview {
  flex: 1;
  min-height: 0;
  border: 0;
  padding: 0;
  background: transparent;
}

.ops-output-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.ops-output-card {
  position: relative;
  display: grid;
  grid-template-rows: 150px auto auto minmax(92px, 1fr);
  gap: 9px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #d8e5dd;
  border-radius: 10px;
  background: #fbfdfb;
}

.ops-output-card.selectable {
  cursor: pointer;
}

.ops-output-card.selected {
  border-color: #057a55;
  box-shadow: 0 0 0 2px rgba(5, 122, 85, .16);
}

.ops-output-visual {
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid #d4e3db;
  color: #0f5132;
  background:
    linear-gradient(135deg, rgba(8, 145, 178, .16), rgba(34, 197, 94, .13)),
    repeating-linear-gradient(135deg, rgba(15, 23, 42, .045) 0, rgba(15, 23, 42, .045) 9px, transparent 9px, transparent 18px);
}

.ops-output-visual span {
  align-self: end;
  font-size: 12px;
  color: #64746b;
}

.ops-output-visual strong {
  align-self: start;
  font-size: 18px;
}

.ops-output-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ops-output-platforms span,
.ops-output-meta span {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  border-radius: 999px;
  padding: 4px 8px;
  background: #eef7f2;
  color: #0f5132;
  font-size: 12px;
}

.ops-output-meta {
  display: grid;
  gap: 6px;
}

.ops-output-meta strong {
  font-size: 14px;
  line-height: 1.35;
}

.ops-output-script {
  margin: 0;
  color: #39463f;
  line-height: 1.48;
  overflow-wrap: anywhere;
}

.ops-card-download {
  position: absolute;
  right: 10px;
  bottom: 10px;
}

.ops-output-actions-final {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
}

.ops-output-actions-final button {
  min-width: 0;
}

@media (max-width: 1180px) {
  .ops-comfy-shell,
  .ops-comfy-shell:has(.ops-output-drawer:not(.collapsed)),
  .ops-comfy-shell.output-expanded {
    grid-template-columns: 1fr;
  }

  .ops-output-drawer,
  .ops-output-drawer.collapsed {
    min-height: 420px;
  }
}

@media (max-width: 520px) {
  .ops-output-grid {
    grid-template-columns: 1fr;
  }

  .ops-output-card {
    grid-template-rows: 132px auto auto auto;
  }

  .ops-output-actions-final {
    grid-template-columns: 1fr;
  }
}

/* OPS-COMFYUI-WORKFLOW-CANVAS-FIX-R11: initial cable stability, project-scoped output cards, compact result drawer. */
.ops-comfy-edges {
  opacity: 1;
  visibility: visible;
  pointer-events: none;
}

#mkt-tab-canvas .ops-comfy-edges {
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  transform: none !important;
  transform-origin: center center !important;
}

.ops-comfy-edges .ops-cable-glow {
  stroke: rgba(14, 165, 233, .42);
  stroke-width: 20;
}

.ops-comfy-edges .ops-cable-core {
  stroke-width: 10.5;
}

.ops-comfy-edges .ops-cable-flow {
  stroke: rgba(255, 255, 255, .96);
  stroke-width: 4.8;
  stroke-dasharray: 16 18;
  animation: opsCableFlowR11 .56s linear infinite;
}

.ops-comfy-edges .ops-cable-spark {
  fill: none;
  stroke: rgba(45, 212, 191, .88);
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 2 42;
  filter: url(#opsCableGlow);
  animation: opsCableSparkR11 1.05s linear infinite;
}

@keyframes opsCableFlowR11 {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: -68; }
}

@keyframes opsCableSparkR11 {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: -88; }
}

.ops-output-head,
.ops-inspector-head {
  min-height: 28px;
  justify-content: flex-end;
  align-items: flex-start;
}

.ops-output-head .status-pill.review,
.ops-inspector-head .status-pill.review {
  display: none !important;
}

.ops-output-tabs {
  margin-left: auto;
  align-self: flex-start;
  display: inline-flex;
  gap: 4px;
  padding: 2px;
  border-radius: 999px;
}

.ops-output-tabs button {
  min-width: 44px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.2;
}

.ops-output-drawer,
.ops-output-drawer.collapsed {
  padding: 10px;
}

.ops-node-preview {
  overflow: hidden;
}

.ops-output-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ops-output-card {
  grid-template-rows: 82px auto auto minmax(48px, auto);
  gap: 6px;
  padding: 8px;
}

.ops-output-visual {
  min-height: 0;
}

.ops-output-visual span {
  font-size: 11px;
}

.ops-output-visual strong {
  font-size: 14px;
}

.ops-output-platforms {
  gap: 4px;
}

.ops-output-platforms span,
.ops-output-meta span {
  padding: 3px 6px;
  font-size: 11px;
}

.ops-output-meta {
  gap: 4px;
}

.ops-output-meta strong {
  font-size: 13px;
}

.ops-output-script {
  font-size: 12px;
  line-height: 1.38;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ops-output-blank {
  height: 100%;
  min-height: 420px;
  display: grid;
  place-items: center;
  border: 1px dashed #d8e5dd;
  border-radius: 10px;
  color: var(--muted);
  text-align: center;
  padding: 20px;
}

#marketing #pageSubtitle,
#mkt-tab-canvas .ops-comfy-panel > .panel-head small,
#mkt-tab-canvas .ops-disabled-publish-row,
#mkt-tab-canvas .ops-node-disabled-row,
#mkt-tab-canvas .ops-comfy-panel > .status-row,
#mkt-tab-canvas .ops-comfy-panel > .badge-row {
  display: none !important;
}

@media (max-width: 520px) {
  .ops-output-tabs {
    width: auto;
  }

  .ops-output-card {
    grid-template-rows: 92px auto auto auto;
  }
}

/* CONTENT-MARKETING-TWO-BRANCH-R14: video publish workflow shell. */
.video-publish-workflow-panel small {
  color: var(--muted);
}

.video-publish-shell {
  display: grid;
  grid-template-columns: minmax(220px, 0.78fr) minmax(420px, 1.45fr) minmax(220px, 0.78fr);
  gap: 12px;
  align-items: stretch;
}

.video-publish-inputs,
.video-publish-output {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.video-publish-inputs label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.video-publish-inputs input,
.video-publish-inputs select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px 9px;
  color: var(--text);
  font: inherit;
}

.video-platform-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.video-platform-checks span {
  padding: 6px 8px;
  border: 1px solid #dce8e1;
  border-radius: 999px;
  background: #f7fbf8;
  color: #14513f;
  font-weight: 700;
  font-size: 12px;
}

.video-publish-stage {
  position: relative;
  min-height: 360px;
  border: 1px solid #d7e8de;
  border-radius: 12px;
  overflow: hidden;
  background:
    radial-gradient(circle at 1px 1px, rgba(10, 100, 83, .18) 1px, transparent 1px),
    linear-gradient(135deg, rgba(234, 248, 240, .92), rgba(248, 252, 250, .98));
  background-size: 18px 18px, 100% 100%;
}

.video-publish-edges {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.video-publish-edges path {
  fill: none;
  stroke: url(#videoPublishCable);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .72;
  filter: drop-shadow(0 0 8px rgba(7, 84, 201, .24));
  stroke-dasharray: 18 12;
  animation: videoPublishCableFlow 1s linear infinite;
}

@keyframes videoPublishCableFlow {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: -30; }
}

.video-publish-node {
  position: absolute;
  z-index: 2;
  width: 140px;
  min-height: 70px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 5px 8px;
  align-content: center;
  padding: 12px;
  border: 1px solid #d8e5dd;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .08);
}

.video-publish-node.review {
  background: #fff8e8;
  border-color: #e7c66c;
}

.video-publish-node b {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font-size: 12px;
}

.video-publish-node strong {
  min-width: 0;
  font-size: 15px;
  line-height: 1.2;
}

.video-publish-node small {
  grid-column: 2;
  color: var(--muted);
}

.video-publish-output button {
  min-height: 38px;
  border: 1px solid #dce8e1;
  border-radius: 8px;
  background: #f8faf9;
  color: var(--muted);
}

@media (max-width: 1100px) {
  .video-publish-shell {
    grid-template-columns: 1fr;
  }
  .video-publish-stage {
    min-height: 340px;
  }
}

/* OPS-COMFYUI-WORKFLOW-CANVAS-FIX-R12: unified two-layer glass cables and enlarged output library. */
.ops-comfy-edges .ops-cable-glow,
.ops-comfy-edges .ops-cable-core,
.ops-comfy-edges .ops-cable-flow,
.ops-comfy-edges .ops-cable-spark,
.ops-comfy-edges .ops-cable-base,
.ops-comfy-edges .ops-cable-signal {
  display: none;
}

/* OPS-COMFYUI-WORKFLOW-CANVAS-FIX-R13: reference-style three-layer blue fiber cable. */
.ops-comfy-edges .ops-cable-outer {
  fill: none;
  stroke: url(#opsCableOuterGradient);
  stroke-width: 14px;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .56;
  filter: url(#opsCableDeepGlow);
  vector-effect: non-scaling-stroke;
}

.ops-comfy-edges .ops-cable-mid {
  fill: none;
  stroke: url(#opsCableDeepGradient);
  stroke-width: 7.5px;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 1;
  filter: url(#opsCableDeepGlow);
  vector-effect: non-scaling-stroke;
}

.ops-comfy-edges .ops-cable-white-flow {
  fill: none;
  stroke: url(#opsCableWhiteSignalGradient);
  stroke-width: 1.55px;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 11 18;
  opacity: .98;
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, .92));
  animation: opsCableWhiteFlowR13 .64s linear infinite;
  vector-effect: non-scaling-stroke;
}

@keyframes opsCableWhiteFlowR13 {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: -58; }
}

.ops-comfy-shell.output-expanded::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 980;
  background: rgba(15, 23, 42, .18);
  backdrop-filter: blur(2px);
  pointer-events: none;
}

.ops-comfy-shell.output-expanded .ops-output-drawer {
  position: fixed;
  top: 72px;
  right: 36px;
  bottom: 32px;
  z-index: 990;
  width: min(820px, calc(100vw - 72px));
  min-height: 0;
  max-height: calc(100vh - 104px);
  padding: 14px;
  border-color: rgba(20, 184, 166, .42);
  box-shadow: 0 26px 74px rgba(15, 23, 42, .26);
}

.ops-comfy-shell.output-expanded .ops-output-body {
  min-height: 0;
}

.ops-comfy-shell.output-expanded .ops-node-preview {
  overflow: auto;
  padding-right: 2px;
}

.ops-comfy-shell.output-expanded .ops-output-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ops-comfy-shell.output-expanded .ops-output-card {
  grid-template-rows: 150px auto auto minmax(72px, auto);
  gap: 8px;
  padding: 10px;
  background: linear-gradient(180deg, #ffffff, #f7fbf9);
}

.ops-comfy-shell.output-expanded .ops-output-card.selectable {
  cursor: pointer;
}

.ops-comfy-shell.output-expanded .ops-output-actions-final {
  position: sticky;
  bottom: 0;
  z-index: 2;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-top: 12px;
  padding: 12px 0 0;
  background: #fff;
}

.ops-output-actions-final .danger {
  color: #b42318;
  border-color: #f2bbb5;
  background: #fff7f6;
}

@media (max-width: 860px) {
  .ops-comfy-shell.output-expanded .ops-output-drawer {
    left: 16px;
    right: 16px;
    width: auto;
  }

  .ops-comfy-shell.output-expanded .ops-output-actions-final {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .ops-comfy-shell.output-expanded .ops-output-drawer {
    top: 48px;
    bottom: 16px;
    left: 10px;
    right: 10px;
  }

  .ops-comfy-shell.output-expanded .ops-output-grid {
    grid-template-columns: 1fr;
  }

  .ops-comfy-shell.output-expanded .ops-output-actions-final {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* VIDEO-PUBLISH-WORKFLOW-CANVAS-MVP-20260615-01: local dry-run publish canvas. */
.video-publish-head {
  align-items: flex-start;
}

.video-publish-guardbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.video-publish-shell {
  grid-template-columns: minmax(252px, .72fr) minmax(640px, 1.45fr) minmax(320px, .9fr);
  padding: 12px;
  border-radius: 12px;
  background: #edf4ef;
}

.video-publish-node-head {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid #d8e5dd;
  border-radius: 10px;
  background: #f9fdfb;
}

.video-publish-node-inputs {
  display: grid;
  gap: 10px;
}

.video-publish-inputs textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px 9px;
  color: var(--text);
  font: inherit;
  resize: vertical;
}

.video-publish-auth-state,
.video-publish-user-chip {
  display: flex;
  gap: 9px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid #d8e5dd;
  border-radius: 10px;
  background: #f8faf9;
}

.video-publish-auth-state {
  align-items: flex-start;
  flex-direction: column;
}

.video-publish-risk-list {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid #f0d49a;
  border-radius: 10px;
  background: #fffaf0;
}

.video-publish-risk-list span {
  color: #7b5b20;
  font-size: 12px;
}

.video-publish-stage {
  min-height: 430px;
  background:
    radial-gradient(circle at 18px 18px, rgba(15, 118, 110, .16) 1.2px, transparent 1.4px),
    linear-gradient(#edf4ef 1px, transparent 1px),
    linear-gradient(90deg, #edf4ef 1px, transparent 1px),
    #fbfdfb;
  background-size: 22px 22px, 22px 22px, 22px 22px, auto;
}

.video-publish-edges path {
  display: none;
}

.video-publish-edges .video-cable-outer {
  display: block;
  fill: none;
  stroke: url(#videoPublishCableOuter);
  stroke-width: 14;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .58;
  filter: drop-shadow(0 0 14px rgba(14, 116, 144, .32));
}

.video-publish-edges .video-cable-core {
  display: block;
  fill: none;
  stroke: url(#videoPublishCableCore);
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 12 18;
  opacity: .98;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, .9));
  animation: videoPublishCableFlowR15 .72s linear infinite;
}

@keyframes videoPublishCableFlowR15 {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: -60; }
}

.video-publish-node {
  border-color: #d8e5dd;
  text-align: left;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.video-publish-node:hover,
.video-publish-node.active {
  border-color: #057a55;
  box-shadow: 0 0 0 3px rgba(5, 122, 85, .16), 0 12px 24px rgba(15, 23, 42, .12);
}

.video-publish-node.disabled-node {
  background: #fff5f4;
  border-color: #f0c4c0;
}

.video-publish-output {
  min-width: 0;
}

.video-publish-output-card,
.video-publish-pool {
  display: grid;
  gap: 10px;
}

.video-publish-preview-thumb {
  min-height: 152px;
  display: grid;
  place-items: center;
  border: 1px solid #d8e5dd;
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(8, 145, 178, .16), rgba(34, 197, 94, .13)),
    repeating-linear-gradient(135deg, rgba(15, 23, 42, .045) 0, rgba(15, 23, 42, .045) 9px, transparent 9px, transparent 18px);
}

.video-publish-preview-thumb strong {
  font-size: 20px;
  color: #0f5132;
}

.video-publish-preview-meta,
.video-publish-preview-disabled {
  display: grid;
  gap: 7px;
}

.video-publish-preview-meta p {
  margin: 0;
  color: #39463f;
  line-height: 1.48;
  overflow-wrap: anywhere;
}

.video-publish-preview-disabled {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.video-publish-pool button,
.video-publish-empty-pool {
  min-width: 0;
  width: 100%;
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid #d8e5dd;
  border-radius: 10px;
  background: #f8fbf9;
  text-align: left;
}

.video-publish-empty-pool {
  color: var(--muted);
}

.video-publish-bottom-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.video-publish-bottom-actions button {
  min-width: 0;
}

@media (max-width: 1180px) {
  .video-publish-shell {
    grid-template-columns: 1fr;
  }

  .video-publish-stage {
    min-height: 430px;
  }
}

@media (max-width: 520px) {
  .video-publish-workflow-panel {
    padding: 12px;
  }

  .video-publish-shell {
    padding: 8px;
    gap: 10px;
  }

  .video-publish-stage {
    min-height: 520px;
  }

  .video-publish-node {
    width: 132px;
    min-height: 64px;
    padding: 9px;
  }

  .video-publish-node strong {
    font-size: 13px;
  }

  .video-publish-node small {
    font-size: 11px;
  }

  .video-publish-preview-disabled,
  .video-publish-bottom-actions {
    grid-template-columns: 1fr;
  }
}


/* VIDEO-PUBLISH-WORKFLOW-CANVAS-MVP-20260615-01-R16: overflow and 8-node responsive overrides. */
.video-publish-workflow-panel,
.video-publish-shell {
  max-width: 100%;
  overflow: hidden;
}

.video-publish-shell {
  grid-template-columns: minmax(230px, .82fr) minmax(0, 1.44fr) minmax(238px, .84fr);
}

.video-publish-node-head {
  min-width: 0;
}

.video-publish-node-inputs,
.video-choice-row,
.video-risk-list,
.vp-draft-summary,
.video-preview-frame,
.video-preview-meta,
.vp-pool-row {
  min-width: 0;
}

.video-choice-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.video-choice {
  min-width: 0;
  min-height: 38px;
  border: 1px solid #dce8e1;
  border-radius: 8px;
  background: #f8faf9;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}

.video-choice.selected {
  border-color: #0c6ccf;
  box-shadow: 0 0 0 3px rgba(12, 108, 207, .12);
}

.video-risk-list,
.vp-draft-summary,
.video-preview-frame,
.video-preview-meta,
.vp-pool-row {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf9;
}

.video-preview-frame strong,
.video-preview-frame p,
.video-preview-meta span,
.video-preview-meta small,
.vp-pool-row strong,
.vp-pool-row small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.video-publish-bottom-actions button {
  white-space: normal;
}

.video-cable-outer {
  fill: none;
  stroke: url(#videoPublishCableOuter);
  stroke-width: 13px;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .64;
  filter: drop-shadow(0 0 10px rgba(12, 108, 207, .22));
  vector-effect: non-scaling-stroke;
}

.video-cable-core {
  fill: none;
  stroke: url(#videoPublishCableCore);
  stroke-width: 4px;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .92;
  stroke-dasharray: 18 12;
  animation: videoPublishCableFlow 1.1s linear infinite;
  vector-effect: non-scaling-stroke;
}

@media (max-width: 1280px) {
  .video-publish-shell {
    grid-template-columns: minmax(220px, .78fr) minmax(0, 1.3fr) minmax(220px, .78fr);
  }
  .video-publish-node {
    width: 132px;
    padding: 10px;
  }
}

@media (max-width: 980px) {
  .video-publish-shell {
    grid-template-columns: 1fr;
  }
  .video-publish-stage {
    min-height: 560px;
  }
  .video-publish-bottom-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .video-publish-workflow-panel,
  .video-publish-shell,
  .video-publish-inputs,
  .video-publish-output,
  .video-publish-stage {
    max-width: 100%;
    overflow-x: hidden;
  }
  .video-choice-row {
    grid-template-columns: 1fr;
  }
  .video-publish-stage {
    min-height: 610px;
  }
  .video-publish-node {
    width: 132px;
    min-height: 64px;
    padding: 8px;
  }
  .video-publish-node strong {
    font-size: 13px;
  }
  .video-publish-node small {
    font-size: 11px;
  }
  [data-video-node="source"] { left: 14px !important; top: 52px !important; }
  [data-video-node="platform"] { left: calc(100% - 148px) !important; top: 52px !important; }
  [data-video-node="account"] { left: 14px !important; top: 166px !important; }
  [data-video-node="copy"] { left: calc(100% - 148px) !important; top: 166px !important; }
  [data-video-node="risk"] { left: 14px !important; top: 280px !important; }
  [data-video-node="draft"] { left: calc(100% - 148px) !important; top: 280px !important; }
  [data-video-node="pool"] { left: 14px !important; top: 394px !important; }
  [data-video-node="action"] { left: calc(100% - 148px) !important; top: 394px !important; }
  .video-publish-bottom-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 390px) {
  .video-publish-workflow-panel {
    padding-left: 10px;
    padding-right: 10px;
  }
  .video-publish-stage {
    min-height: 620px;
  }
  .video-publish-node {
    width: 124px;
  }
  [data-video-node="platform"],
  [data-video-node="copy"],
  [data-video-node="draft"],
  [data-video-node="action"] {
    left: calc(100% - 138px) !important;
  }
}


/* VIDEO-PUBLISH-WORKFLOW-CANVAS-MVP-20260615-01-R17: 1280-safe marketing layout. */
.video-choice.active {
  border-color: #0c6ccf;
  box-shadow: 0 0 0 3px rgba(12, 108, 207, .12);
}

.video-preview-frame,
.video-preview-meta {
  overflow-wrap: anywhere;
}

@media (max-width: 1360px) {
  .marketing-mode .video-publish-shell {
    grid-template-columns: 1fr;
  }

  .marketing-mode .video-publish-stage {
    min-height: 520px;
  }

  .marketing-mode .video-publish-output {
    width: 100%;
  }
}


/* VIDEO-PUBLISH-WORKFLOW-CANVAS-MVP-20260615-02: fixed release workflow layout. */
.video-publish-workflow-panel {
  overflow: visible;
}

.video-publish-shell,
.marketing-mode .video-publish-shell {
  display: grid;
  grid-template-columns: minmax(300px, .42fr) minmax(900px, 1.58fr);
  align-items: stretch;
  gap: 12px;
  max-width: 100%;
  overflow: auto;
}

.video-publish-disclaimer-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 12px;
  padding: 10px 12px;
  border: 1px solid #d8e5dd;
  border-radius: 12px;
  background: #fbfdfb;
  color: #234136;
  font-weight: 700;
}

.video-publish-disclaimer-row input {
  width: 16px;
  height: 16px;
  accent-color: #08785e;
}

.video-disclaimer-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(6, 20, 17, .34);
}

.video-disclaimer-modal.hidden {
  display: none;
}

.video-disclaimer-card {
  width: min(560px, 94vw);
  display: grid;
  gap: 12px;
  padding: 22px;
  border: 1px solid #cfe0d6;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .18);
}

.video-disclaimer-card h3,
.video-disclaimer-card p {
  margin: 0;
}

.video-disclaimer-card p {
  color: #3c564d;
  line-height: 1.7;
}

.video-disclaimer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.video-publish-project-picker {
  padding: 12px;
  border: 1px solid #d8e5dd;
  border-radius: 12px;
  background: #f9fdfb;
}

.video-publish-project-picker label {
  display: grid;
  gap: 8px;
  color: #0f3d2e;
  font-weight: 800;
}

.video-publish-project-picker select {
  min-width: 0;
  border: 1px solid #cfe0d6;
  border-radius: 8px;
  background: #fff;
  padding: 9px 10px;
  font: inherit;
  color: var(--text);
}

.video-publish-inputs {
  gap: 12px;
}

.video-resource-list {
  display: grid;
  gap: 8px;
}

.video-resource-card {
  width: 100%;
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 11px;
  border: 1px solid #d8e5dd;
  border-radius: 10px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.video-resource-card.selected {
  border-color: #08785e;
  background: #ecfdf6;
  box-shadow: inset 4px 0 0 #08785e;
}

.video-resource-card small {
  color: var(--muted);
}

.video-publish-stage {
  min-height: 620px;
  border: 1px solid #cfe0d6;
  border-radius: 12px;
  overflow: hidden;
  background:
    radial-gradient(circle at 18px 18px, rgba(15, 118, 110, .15) 1.1px, transparent 1.5px),
    linear-gradient(135deg, rgba(12, 108, 207, .05), rgba(15, 118, 110, .07)),
    #fbfdfb;
  background-size: 22px 22px, auto, auto;
}

.video-publish-edges {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: visible;
}

/* AI image generation canvas: product layout aligned with three-canvas brief */
.aigen-product-shell {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(620px, 1fr) minmax(300px, 420px);
  grid-template-areas:
    "left stage right"
    "bottom bottom bottom";
  gap: 12px;
  align-items: stretch;
}

.aigen-product-left {
  grid-area: left;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
}

.aigen-project-selector,
.aigen-node-inspector,
.aigen-product-right,
.aigen-product-bottom {
  border: 1px solid #d6e4df;
  border-radius: 8px;
  background: #fff;
}

.aigen-project-selector {
  padding: 12px;
}

.aigen-project-selector strong {
  display: block;
  margin-bottom: 8px;
  color: #0d3f32;
}

.aigen-node-inspector {
  padding: 12px;
  overflow: auto;
  max-height: 880px;
}

.aigen-field-card {
  border: 1px solid #dbe7e3;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 10px;
  background: #fbfdfc;
}

.aigen-field-card.hidden {
  display: none !important;
}

.aigen-product-stage-wrap {
  grid-area: stage;
  min-width: 0;
}

.aigen-product-stage.aigen-node-stage {
  min-height: 880px;
  overflow: hidden;
  background:
    radial-gradient(circle, rgba(49, 129, 108, 0.16) 1px, transparent 1px) 0 0 / 18px 18px,
    linear-gradient(135deg, rgba(237, 253, 249, 0.8), rgba(255, 255, 255, 0.94));
}

.aigen-product-stage .aigen-node-edges {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.aigen-product-stage .aigen-node-edges path {
  stroke: #8f72ff;
  stroke-width: 2;
  stroke-dasharray: 6 8;
  fill: none;
  opacity: 0.75;
}

.aigen-product-stage .aigen-node-edges path.edge-solid {
  stroke-dasharray: none;
  opacity: 0.25;
}

.aigen-product-stage .aigen-flow-node {
  min-height: 72px;
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(17, 64, 52, 0.08);
  cursor: pointer;
}

.aigen-product-stage .aigen-flow-node.mini {
  width: 130px;
}

.aigen-product-stage .aigen-flow-node.wide {
  width: 240px;
}

.aigen-product-stage .aigen-flow-node.generate {
  width: 300px;
  min-height: 180px;
  justify-content: flex-start;
  padding-top: 18px;
}

.aigen-product-stage .aigen-flow-node.active {
  border-color: #2e7d62;
  box-shadow: 0 0 0 2px rgba(46, 125, 98, 0.14), 0 14px 26px rgba(17, 64, 52, 0.14);
}

.aigen-inline-generate-btn {
  display: inline-grid;
  place-items: center;
  width: max-content;
  max-width: 100%;
  min-height: 28px;
  margin-top: 8px;
  padding: 4px 10px;
  border: 1px solid rgba(134, 223, 247, .72);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(12, 76, 96, .88), rgba(4, 38, 56, .92));
  color: rgba(244, 253, 255, .96);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 10px 22px rgba(0, 0, 0, .18);
}

.aigen-inline-generate-btn:hover {
  border-color: rgba(161, 239, 255, .96);
  background: linear-gradient(180deg, rgba(16, 94, 118, .96), rgba(5, 46, 69, .98));
}

.aigen-flow-node.is-generating {
  border-color: rgba(252, 211, 77, .9);
  box-shadow: 0 0 0 2px rgba(252, 211, 77, .16), 0 14px 28px rgba(0, 0, 0, .2);
}

.aigen-flow-node.has-generation-error {
  border-color: rgba(248, 113, 113, .82);
}

.aigen-inline-generate-btn:disabled {
  cursor: progress;
  opacity: .78;
  border-color: rgba(252, 211, 77, .86);
  background: linear-gradient(180deg, rgba(97, 73, 19, .9), rgba(50, 38, 13, .94));
}

.aigen-product-right {
  grid-area: right;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  min-width: 0;
}

.aigen-library-title {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  font-weight: 700;
  color: #0d3f32;
}

.aigen-photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-content: start;
}

.aigen-library-card,
.aigen-video-card {
  border: 1px solid #d8e5e1;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  min-width: 0;
}

.aigen-library-thumb,
.aigen-video-thumb {
  min-height: 120px;
  display: grid;
  place-items: center;
  color: #2f7c67;
  font-weight: 700;
  background:
    repeating-linear-gradient(135deg, rgba(41, 130, 107, 0.08) 0 8px, rgba(255,255,255,0.75) 8px 16px);
}

/* 画布R9 (2026-07-05) F7: 生成图片库缩略图 9:16 显示不全 → contain 完整显示; 点击缩略图=大图预览详情弹窗(JS 侧 data-aigen-photo-thumb-preview) */
.aigen-library-thumb img {
  width: 100%;
  height: 120px;
  object-fit: contain;
  display: block;
  background: #0a1a22;
  cursor: zoom-in;
}

.aigen-library-meta,
.aigen-video-card {
  padding: 10px;
  display: grid;
  gap: 6px;
  min-width: 0;
}

/* LAYOUT-FIX-FLOAT-RIGHTPANE-20260707 #2: 窄右栏内超长不换行的文件名/标题会撑破卡片、
   溢出到栏外被裁切。让文本在卡片内换行(含长英文/无空格串), 不再溢出。纯换行处理, 不改数据。 */
.aigen-library-meta small,
.aigen-video-card small,
.aigen-video-card strong,
.aigen-library-meta strong {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.aigen-library-meta small,
.aigen-video-card small {
  color: #64736f;
  line-height: 1.4;
}

.aigen-library-pill {
  justify-self: start;
  border-radius: 999px;
  padding: 3px 8px;
  color: #9c3b31;
  background: #fff1ed;
  font-size: 12px;
  font-weight: 700;
}

.aigen-library-empty {
  grid-column: 1 / -1;
  border: 1px dashed #d3dfdb;
  border-radius: 8px;
  padding: 24px 12px;
  color: #6a7773;
  text-align: center;
  background: #fbfdfc;
}

.aigen-product-bottom {
  grid-area: bottom;
  padding: 12px;
  min-height: 280px;
}

.aigen-bottom-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.aigen-video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.aigen-video-card-empty {
  border-style: dashed;
}

@media (max-width: 1280px) {
  .aigen-product-shell {
    grid-template-columns: minmax(240px, 300px) minmax(560px, 1fr);
    grid-template-areas:
      "left stage"
      "right right"
      "bottom bottom";
  }
}

@media (max-width: 760px) {
  .aigen-product-shell {
    grid-template-columns: 1fr;
    grid-template-areas:
      "left"
      "stage"
      "right"
      "bottom";
  }
  .aigen-product-stage.aigen-node-stage {
    min-height: 760px;
    overflow: auto;
  }
  .aigen-photo-grid,
  .aigen-video-grid {
    grid-template-columns: 1fr;
  }
}

/* AI生图画布：项目选择上置；节点输入改为弹窗；中间画布向左拉满。 */
.aigen-product-shell.aigen-remodel-shell {
  grid-template-columns: minmax(760px, 1fr) minmax(300px, 390px);
  grid-template-areas:
    "project right"
    "stage right"
    "video video";
  align-items: start;
  column-gap: 18px;
}

#ai-tab-generate .aigen-guardbar {
  display: none;
}

.aigen-remodel-shell .aigen-canvas-project-bar {
  grid-area: project;
  width: min(430px, 100%);
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  margin: 0 0 10px;
  padding: 8px 10px;
  border: 1px solid rgba(111, 190, 216, .34);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(12, 35, 49, .92), rgba(4, 19, 29, .84));
  box-shadow: inset 0 0 0 1px rgba(10, 54, 75, .28);
}

.aigen-remodel-shell .aigen-canvas-project-bar label {
  color: rgba(230, 247, 252, .82);
  font-size: 12px;
  font-weight: 700;
}

.aigen-remodel-shell .aigen-canvas-project-bar select {
  min-width: 0;
  width: 100%;
  border: 1px solid rgba(126, 181, 202, .42);
  border-radius: 7px;
  padding: 7px 9px;
  background: rgba(6, 20, 31, .86);
  color: #effcff;
}

.aigen-remodel-shell .aigen-flow-inputs {
  max-height: 1280px;
  overflow-y: auto;
  overflow-x: hidden;
}

.aigen-remodel-shell .aigen-project-picker {
  border: 1px solid #d6e4df;
  border-radius: 8px;
  padding: 12px;
  background: #fbfdfc;
}

.aigen-remodel-shell .aigen-project-picker label,
.aigen-remodel-shell .aigen-field-card label {
  display: block;
  margin: 8px 0 5px;
  color: #355249;
  font-size: 12px;
  font-weight: 700;
}

.aigen-remodel-shell .aigen-product-stage.aigen-node-stage.aigen-remodel-workflow {
  min-height: 1280px;
  overflow: auto;
  position: relative;
  border: 1px solid #cfe4dc;
  border-radius: 8px;
  background:
    radial-gradient(circle, rgba(43, 123, 102, .18) 1px, transparent 1.2px) 0 0 / 18px 18px,
    linear-gradient(135deg, rgba(239, 255, 252, .82), rgba(255, 255, 255, .95));
}

.aigen-remodel-workflow .aigen-node-edges {
  z-index: 1;
  /* AI-DIRECTOR 2026-06-16: pin the edge SVG to its viewBox px (overriding the base
     width/height:100%). The nodes are positioned in raw px, and the stage column is
     fluid (minmax(760px,1fr)), so a 100%-sized SVG + preserveAspectRatio="none"
     stretched the 960x1320 viewBox to the stage width and the cables drifted off the
     nodes. Sizing the SVG to exactly 960x1320 makes view units == node px (1:1),
     so cables stay anchored regardless of stage width, and the responsive
     scale(.72) still scales SVG + nodes together. */
  left: 0;
  top: 0;
  width: 960px;
  height: 1320px;
}

.aigen-remodel-workflow .aigen-node-edges path.edge-soft {
  stroke: #8f72ff;
  stroke-width: 8;
  stroke-dasharray: none;
  opacity: .2;
  filter: drop-shadow(0 0 8px rgba(86, 88, 255, .2));
}

.aigen-remodel-workflow .aigen-node-edges path.edge-core {
  stroke: #6b52ff;
  stroke-width: 2.4;
  stroke-dasharray: none;
  opacity: .72;
}

.aigen-remodel-workflow .aigen-node-edges path.edge-dash {
  stroke: #1f6fff;
  stroke-width: 2.2;
  stroke-dasharray: 4 10;
  opacity: .9;
  animation: aigenRemodelCable 1.35s linear infinite;
}

.aigen-remodel-workflow .aigen-node-edges path.edge-soft.edge-strong {
  stroke-width: 10.5;
  opacity: .27;
}

.aigen-remodel-workflow .aigen-node-edges path.edge-core.edge-strong {
  stroke-width: 3.8;
  opacity: .9;
}

.aigen-remodel-workflow .aigen-node-edges path.edge-dash.edge-strong {
  stroke-width: 2.2;
  opacity: .96;
}

@keyframes aigenRemodelCable {
  to { stroke-dashoffset: -28; }
}

.aigen-remodel-workflow .aigen-flow-node {
  z-index: 2;
  cursor: pointer;
  border: 1px solid #d4e4df;
  background: #fff;
}

.aigen-remodel-workflow .aigen-flow-node.mini.top-node {
  width: 150px;
}

.aigen-remodel-workflow .aigen-flow-node.micro {
  width: 160px;
  min-height: 60px;
  border-color: #a477ff;
}

.aigen-remodel-workflow .aigen-flow-node.video-node {
  width: 230px;
  min-height: 64px;
  border-color: #a477ff;
}

.aigen-remodel-workflow .aigen-flow-node.graphic-understanding {
  width: 210px;
  min-height: 64px;
  border-color: #a477ff;
}

.aigen-remodel-workflow .aigen-flow-node.image-settings {
  width: 360px;
  min-height: 106px;
  border-color: #a477ff;
}

.aigen-remodel-workflow .aigen-flow-node.image-browser {
  width: 500px;
  min-height: 240px;
  border-color: #a477ff;
  align-items: stretch;
}

.aigen-remodel-workflow .aigen-flow-node.video-generate {
  width: 620px;
  min-height: 72px;
  border-color: #a477ff;
}

.aigen-generated-slot-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.aigen-generated-slot-grid i {
  display: block;
  aspect-ratio: 1 / 1;
  border: 1px dashed rgba(129, 96, 255, .55);
  border-radius: 8px;
  background:
    repeating-linear-gradient(135deg, rgba(124, 104, 255, .08) 0 8px, rgba(255, 255, 255, .8) 8px 16px);
}

.aigen-node-preview-grid {
  min-height: 72px;
}

.aigen-node-mini-thumb {
  display: grid;
  place-items: center;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(125, 211, 252, .45);
  border-radius: 8px;
  background: rgba(16, 35, 48, .85);
  color: rgba(222, 247, 255, .72);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.aigen-node-mini-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.aigen-node-mini-thumb.empty {
  border-style: dashed;
  border-color: rgba(125, 211, 252, .25);
  color: rgba(222, 247, 255, .42);
}

.aigen-video-node-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 48px));
  align-items: center;
  gap: 6px;
  min-height: 52px;
  margin-top: 8px;
}

.aigen-video-node-preview .aigen-node-mini-thumb {
  width: 48px;
}

.aigen-video-node-preview.empty {
  grid-template-columns: 1fr;
  border: 1px dashed rgba(125, 211, 252, .25);
  border-radius: 8px;
  color: rgba(222, 247, 255, .55);
  font-size: 12px;
  place-items: center;
}

.aigen-remodel-shell .aigen-product-right {
  max-height: 1280px;
  overflow: auto;
}

.panel.aigen-node-panel.is-output-modal-layer-open {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

.aigen-remodel-shell.is-output-modal-open .aigen-product-right {
  position: fixed;
  z-index: 2460;
  top: 178px;
  right: 32px;
  width: min(360px, 24vw);
  max-height: calc(100vh - 220px);
  overflow: auto;
  border-color: rgba(119, 205, 229, .62);
  background: linear-gradient(180deg, rgba(9, 32, 47, .98), rgba(3, 19, 30, .98));
  box-shadow: 0 26px 72px rgba(0, 0, 0, .46), 0 0 0 1px rgba(132, 221, 246, .2);
  pointer-events: auto;
}

.aigen-remodel-shell .aigen-video-library {
  grid-area: video;
  border: 1px solid #d6e4df;
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  min-height: 300px;
}

.aigen-remodel-shell .aigen-product-bottom {
  display: none;
}

.aigen-remodel-shell .aigen-inline-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.aigen-remodel-shell .aigen-drop-hint,
.aigen-remodel-shell .aigen-draft-preview {
  border: 1px dashed #d1dfda;
  border-radius: 8px;
  padding: 10px;
  color: #5f706a;
  background: #fff;
}

@media (max-width: 1280px) {
  .aigen-product-shell.aigen-remodel-shell {
    grid-template-columns: minmax(0, 720px) minmax(280px, 1fr);
    grid-template-areas:
      "project project"
      "stage stage"
      "right right"
      "video video";
  }

  .aigen-remodel-workflow .aigen-node-edges,
  .aigen-remodel-workflow .aigen-flow-node {
    transform: scale(.72);
    transform-origin: top left;
  }

  .aigen-remodel-shell .aigen-product-stage.aigen-node-stage.aigen-remodel-workflow {
    min-height: 940px;
    overflow: hidden;
  }
}

@media (max-width: 760px) {
  .aigen-product-shell.aigen-remodel-shell {
    grid-template-columns: 1fr;
    grid-template-areas:
      "project"
      "stage"
      "right"
      "video";
  }
  .aigen-remodel-shell .aigen-product-stage.aigen-node-stage.aigen-remodel-workflow {
    min-height: 760px;
    overflow: visible;
  }
  .aigen-remodel-workflow .aigen-node-edges,
  .aigen-remodel-workflow .aigen-flow-node {
    transform: none;
  }
}

.video-publish-edges .video-cable-sheath,
.video-publish-edges .video-cable-rail,
.video-publish-edges .video-cable-mid,
.video-publish-edges .video-cable-white,
.video-publish-edges .video-cable-spark {
  display: block;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
  vector-effect: non-scaling-stroke;
}

.video-publish-edges .video-cable-sheath {
  stroke: url(#videoPublishCableSheath);
  stroke-width: 24;
  opacity: .46;
  filter: drop-shadow(0 0 18px rgba(79, 172, 254, .36));
}

.video-publish-edges .video-cable-rail {
  stroke: #0b57b7;
  stroke-width: 13;
  stroke-dasharray: none;
  opacity: .92;
  filter: drop-shadow(0 0 13px rgba(11, 87, 183, .45));
}

.video-publish-edges .video-cable-mid {
  stroke: url(#videoPublishCableMid);
  stroke-width: 6;
  stroke-dasharray: none;
  opacity: .98;
  filter: drop-shadow(0 0 10px rgba(7, 95, 194, .42));
}

.video-publish-edges .video-cable-white {
  stroke: #fff;
  stroke-width: 3.4;
  stroke-dasharray: 14 26;
  opacity: .96;
  filter:
    drop-shadow(0 0 5px rgba(255, 255, 255, .96))
    drop-shadow(0 0 10px rgba(179, 242, 255, .82));
  animation: videoPublishWhiteCoreFlowR3 .74s linear infinite;
}

.video-publish-edges .video-cable-spark {
  stroke: #fff;
  stroke-width: 1.4;
  stroke-dasharray: 1 44 1 70;
  opacity: .98;
  filter:
    drop-shadow(0 0 5px rgba(255, 255, 255, .96))
    drop-shadow(0 0 12px rgba(122, 226, 255, .82));
  animation: videoPublishSparkFlowR2 .86s linear infinite;
}

@keyframes videoPublishWhiteCoreFlowR3 {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: -40; }
}

@keyframes videoPublishSparkFlowR2 {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: -70; }
}

.video-publish-stage .video-publish-node {
  z-index: 2;
  width: 148px;
  min-height: 76px;
  display: grid;
  gap: 4px;
  place-items: start;
  padding: 12px;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(5px);
}

.video-publish-stage .video-publish-node.pool-node {
  width: 300px;
  min-height: 448px;
  align-content: start;
  place-items: stretch;
}

.video-publish-stage .video-publish-node.preview-node {
  width: 210px;
  min-height: 126px;
  padding: 13px;
}

.video-publish-stage .video-publish-node.platform-pool-node {
  width: 250px;
  min-height: 134px;
  padding: 11px;
}

.vp-preview-actions {
  display: flex;
  gap: 6px;
  margin-top: 5px;
}

.vp-preview-actions em {
  display: inline-grid;
  min-width: 52px;
  place-items: center;
  padding: 3px 6px;
  border: 1px solid rgba(8, 120, 94, .22);
  border-radius: 999px;
  background: rgba(236, 253, 246, .86);
  color: #0f5132;
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
}

.video-publish-pool-canvas {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.vp-pool-current,
.vp-pool-row {
  display: grid;
  gap: 3px;
  padding: 9px;
  border: 1px solid #d8e5dd;
  border-radius: 10px;
  background: rgba(255,255,255,.78);
  text-align: left;
}

.vp-pool-current small,
.vp-pool-row small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.video-publish-stage .platform-pool-node .video-publish-pool-canvas {
  gap: 5px;
  margin-top: 6px;
}

.video-publish-stage .platform-pool-node .vp-pool-current,
.video-publish-stage .platform-pool-node .vp-pool-row {
  padding: 6px;
  border-radius: 8px;
  font-size: 11px;
}

.video-publish-stage .platform-pool-node .vp-pool-row strong,
.video-publish-stage .platform-pool-node .vp-pool-current b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vp-pool-empty {
  padding: 7px;
  border: 1px dashed #cfe0d6;
  border-radius: 8px;
  color: var(--muted);
  font-size: 11px;
  background: rgba(255,255,255,.62);
}

.vp-cover-preview {
  position: relative;
  min-height: 122px;
  display: grid;
  align-content: end;
  gap: 4px;
  padding: 12px;
  border: 1px solid #cfe0d6;
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(8, 120, 94, .11), rgba(34, 126, 203, .08)),
    repeating-linear-gradient(-45deg, rgba(255,255,255,.64) 0 8px, rgba(236,253,246,.64) 8px 16px);
  color: #0f3d2e;
  cursor: pointer;
}

.vp-cover-preview strong {
  font-size: 18px;
}

.vp-cover-preview small {
  color: var(--muted);
}

.vp-cover-generate {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid #cfe0d6;
  border-radius: 50%;
  background: #fff;
  color: #08785e;
  font-weight: 900;
  box-shadow: 0 6px 18px rgba(8, 120, 94, .14);
}

.vp-publish-mode-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.vp-publish-mode-row button {
  min-height: 36px;
  border: 1px solid #cfe0d6;
  border-radius: 9px;
  background: #fff;
  color: #0f3d2e;
  font-weight: 800;
}

.video-publish-node b {
  min-width: 26px;
  text-align: center;
}

.video-publish-output {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 12px;
  background: #fff;
}

.video-publish-output-card,
.video-publish-pool {
  border: 1px solid #d8e5dd;
  border-radius: 12px;
  padding: 12px;
  background: #fbfdfb;
}

.video-publish-pool {
  align-content: start;
}

.video-preview-frame {
  min-height: 118px;
  display: grid;
  place-items: center;
  gap: 6px;
  border-radius: 10px;
  color: #0f5132;
}

.video-preview-meta {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.vp-pool-row {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
}

.vp-pool-row small {
  grid-column: 2;
}

.video-publish-record-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.video-publish-record-lane {
  min-height: 260px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 10px;
  padding: 14px;
  border: 1px solid #dbe7e1;
  border-radius: 12px;
  background: #fbfdfb;
}

.video-publish-record-lane h3 {
  margin: 0;
  font-size: 16px;
  color: #0f3d2e;
}

.video-publish-record-lane > div {
  display: grid;
  align-content: start;
  gap: 8px;
}

.video-record-card {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid #d8e5dd;
  border-radius: 10px;
  background: #fff;
}

.video-record-card small,
.video-record-empty {
  margin: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

@media (max-width: 1460px) {
  .video-publish-shell,
  .marketing-mode .video-publish-shell {
    grid-template-columns: minmax(280px, .42fr) minmax(860px, 1.58fr);
  }
  .video-publish-stage .video-publish-node {
    width: 136px;
  }
  .video-publish-stage .video-publish-node.pool-node {
    width: 280px;
  }
}

@media (max-width: 1120px) {
  .video-publish-shell,
  .marketing-mode .video-publish-shell {
    grid-template-columns: 1fr;
  }
  .video-publish-record-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .video-publish-stage {
    min-height: 620px;
  }
  .video-publish-stage .video-publish-node {
    width: 128px;
    min-height: 66px;
    padding: 9px;
  }
  .video-publish-record-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1360px) {
  .video-publish-shell,
  .marketing-mode .video-publish-shell {
    grid-template-columns: 1fr;
  }

  .video-publish-stage {
    min-height: 540px;
  }
}

/* VIDEO-PUBLISH-WORKFLOW-FIX-20260615-05: keep publish canvas fixed; left config scrolls. */
.video-publish-workflow-panel .video-publish-shell,
.marketing-mode .video-publish-workflow-panel .video-publish-shell {
  grid-template-columns: 360px 1480px !important;
  align-items: stretch;
  gap: 12px;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
}

.video-publish-workflow-panel .video-publish-inputs {
  min-width: 0;
  max-height: 1290px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.video-publish-workflow-panel .video-publish-stage {
  width: 1480px !important;
  height: 1290px;
  min-height: 1290px !important;
  flex: 0 0 1480px;
}

.video-publish-workflow-panel .video-publish-stage .video-publish-node.preview-node {
  width: 230px;
  min-height: 170px;
  padding: 14px;
}

.video-publish-workflow-panel .video-publish-stage .video-publish-node.platform-pool-node {
  width: 250px;
  min-height: 320px;
  padding: 11px;
}

.video-publish-workflow-panel .video-publish-stage .platform-pool-node strong,
.video-publish-workflow-panel .video-publish-stage .platform-pool-node small {
  writing-mode: initial;
  white-space: normal;
}

@media (max-width: 1460px) {
  .video-publish-workflow-panel .video-publish-shell,
  .marketing-mode .video-publish-workflow-panel .video-publish-shell {
    grid-template-columns: 340px 1480px !important;
  }
}

@media (max-width: 760px) {
  .video-publish-workflow-panel .video-publish-shell,
  .marketing-mode .video-publish-workflow-panel .video-publish-shell {
    grid-template-columns: 310px 1480px !important;
  }
}

/* AIGEN-WORKFLOW-CANVAS-FOLLOWUP-20260615-01-R2: AI designer keeps three clear customer-facing sub entries. */
#aiSubTabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

#aiSubTabs button {
  justify-content: center;
  text-align: center;
  font-weight: 800;
}

.ai-board-inline-panel,
.ai-board-inline-frame {
  max-width: 100%;
}

@media (max-width: 520px) {
  #aiSubTabs {
    grid-template-columns: 1fr;
  }

  .ai-board-inline-panel {
    min-height: 680px;
  }

  .ai-board-inline-frame {
    height: calc(100vh - 150px);
    min-height: 680px;
  }
}

/* AIGEN-CANVAS-PRODUCT-ALIGN-FINAL-20260616-01: fit product workflow inside 1280 desktop and stack cleanly on mobile. */
@media (min-width: 761px) and (max-width: 1280px) {
  .aigen-product-shell.aigen-remodel-shell {
    grid-template-columns: minmax(0, 720px) minmax(280px, 1fr);
  }

  .aigen-remodel-workflow .aigen-flow-node.mini.top-node {
    width: 112px;
    min-height: 68px;
  }

  .aigen-remodel-workflow .aigen-flow-node[data-aigen-node="material"] { left: 24px !important; top: 38px !important; }
  .aigen-remodel-workflow .aigen-flow-node[data-aigen-node="person_pet"] { left: 184px !important; top: 38px !important; }
  .aigen-remodel-workflow .aigen-flow-node[data-aigen-node="lens"] { left: 344px !important; top: 38px !important; }
  .aigen-remodel-workflow .aigen-flow-node[data-aigen-node="style_ref"] { left: 504px !important; top: 38px !important; }

  .aigen-remodel-workflow .aigen-flow-node[data-aigen-node="custom_prompt"] {
    left: 29px !important;
    top: 169px !important;
    width: 180px;
  }

  .aigen-remodel-workflow .aigen-flow-node.image-settings {
    left: 233px !important;
    top: 157px !important;
    width: 270px;
  }

  .aigen-remodel-workflow .aigen-flow-node.image-browser {
    left: 64px !important;
    top: 286px !important;
    width: 375px;
  }

  .aigen-remodel-workflow .aigen-flow-node.video-node {
    width: 172px;
  }

  .aigen-remodel-workflow .aigen-flow-node[data-aigen-node="video_image"] { left: 120px !important; top: 537px !important; }
  .aigen-remodel-workflow .aigen-flow-node[data-aigen-node="video_first_last"] { left: 374px !important; top: 537px !important; }

  .aigen-remodel-workflow .aigen-flow-node.graphic-understanding {
    left: 64px !important;
    top: 641px !important;
    width: 158px;
  }

  .aigen-remodel-workflow .aigen-flow-node.video-desc {
    left: 234px !important;
    top: 641px !important;
    width: 180px;
  }

  .aigen-remodel-workflow .aigen-flow-node.micro {
    left: 439px !important;
    width: 120px;
  }

  .aigen-remodel-workflow .aigen-flow-node[data-aigen-node="video_quality"] { top: 608px !important; }
  .aigen-remodel-workflow .aigen-flow-node[data-aigen-node="video_ratio"] { top: 674px !important; }
  .aigen-remodel-workflow .aigen-flow-node[data-aigen-node="video_subject"] { top: 739px !important; }

  .aigen-remodel-workflow .aigen-flow-node.video-generate {
    left: 64px !important;
    top: 826px !important;
    width: 465px;
  }
}

.aigen-remodel-workflow .aigen-flow-node.video-generate:disabled {
  cursor: not-allowed;
  opacity: .74;
  background: #f4f1eb;
}

@media (max-width: 760px) {
  .aigen-remodel-shell .aigen-product-stage.aigen-node-stage.aigen-remodel-workflow {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    min-height: 0;
    overflow: visible;
    padding: 10px;
  }

  .aigen-remodel-workflow .aigen-node-edges {
    display: none;
  }

  .aigen-remodel-workflow .aigen-flow-node,
  .aigen-remodel-workflow .aigen-flow-node.mini.top-node,
  .aigen-remodel-workflow .aigen-flow-node.micro,
  .aigen-remodel-workflow .aigen-flow-node.video-node,
  .aigen-remodel-workflow .aigen-flow-node.graphic-understanding,
  .aigen-remodel-workflow .aigen-flow-node.image-settings,
  .aigen-remodel-workflow .aigen-flow-node.image-browser,
  .aigen-remodel-workflow .aigen-flow-node.video-generate {
    position: relative;
    left: auto !important;
    top: auto !important;
    width: auto !important;
    min-height: 64px;
  }

  .aigen-generated-slot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* AI生图画布 v4：动态节点线与可拖动节点。 */
.aigen-remodel-shell .aigen-product-stage.aigen-node-stage.aigen-remodel-workflow.is-draggable {
  min-height: 1320px;
  min-width: 960px;
  overflow: auto;
  position: relative;
}

.aigen-remodel-workflow.is-draggable .aigen-node-edges {
  position: absolute;
  inset: 0;
  display: block !important;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: auto;
  z-index: 1;
  transform: none !important;
}

.aigen-remodel-workflow.is-draggable .aigen-node-edges .aigen-edge-shell {
  fill: none;
  stroke: #77d9ff;
  stroke-width: 10;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .24;
  filter: drop-shadow(0 0 10px rgba(35, 143, 255, .35));
}

.aigen-remodel-workflow.is-draggable .aigen-node-edges .aigen-edge-core {
  fill: none;
  stroke: #155bc2;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .94;
}

.aigen-remodel-workflow.is-draggable .aigen-node-edges .aigen-edge-pulse {
  fill: none;
  stroke: #fff;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 2 18 2 24;
  animation: aigenNodeCablePulse .85s linear infinite;
  opacity: .98;
}

.aigen-remodel-workflow.is-draggable .aigen-node-edges .aigen-edge-group.strong .aigen-edge-shell {
  stroke-width: 12;
  opacity: .28;
}

.aigen-remodel-workflow.is-draggable .aigen-node-edges .aigen-edge-group.strong .aigen-edge-core {
  stroke-width: 6;
}

.aigen-remodel-workflow.is-draggable .aigen-node-edges .aigen-edge-group.strong .aigen-edge-pulse {
  stroke-width: 1.8;
}

@keyframes aigenNodeCablePulse {
  to {
    stroke-dashoffset: -46;
  }
}

.aigen-remodel-workflow.is-draggable .aigen-flow-node {
  cursor: grab;
  touch-action: none;
  user-select: none;
  transform: none !important;
}

.aigen-remodel-workflow.is-draggable .aigen-flow-node.dragging {
  cursor: grabbing;
  z-index: 9;
  box-shadow: 0 14px 36px rgba(20, 65, 105, .18);
}

.aigen-remodel-workflow.is-draggable .aigen-flow-node.video-generate[aria-disabled="true"] {
  cursor: grab;
  background: #fffaf0;
  opacity: .92;
}

@media (min-width: 761px) and (max-width: 1280px) {
  .aigen-remodel-shell .aigen-product-stage.aigen-node-stage.aigen-remodel-workflow.is-draggable {
    min-width: 0;
    width: 100%;
    min-height: 940px;
    overflow: hidden;
  }

  .aigen-remodel-workflow.is-draggable .aigen-node-edges {
    width: 100%;
    height: 940px;
  }
}

@media (max-width: 760px) {
  .aigen-remodel-shell .aigen-product-stage.aigen-node-stage.aigen-remodel-workflow.is-draggable {
    min-width: 0;
    width: 100%;
    min-height: 0;
    overflow: visible;
  }

  .aigen-remodel-workflow.is-draggable .aigen-node-edges {
    display: none !important;
    width: 0;
    height: 0;
  }
}

/* AI design assist three-row workflow workspace. */
.ai-assist-workbench {
  display: grid;
  gap: 18px;
  padding: 14px;
  background: #fbfcfa;
}

.ai-assist-project-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
}

.ai-assist-project-bar select {
  width: min(360px, 68vw);
  height: 38px;
  border: 1px solid #20282a;
  border-radius: 2px;
  background: #fff;
  color: #111817;
  font-weight: 800;
  text-align: center;
}

.ai-assist-new-project-btn {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #d8ded9;
  border-radius: 6px;
  background: #fff;
  color: #1b6f51;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.ai-assist-new-project-btn:hover {
  border-color: #1b6f51;
  background: #eef8f4;
}

.ai-assist-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 16px;
  align-items: stretch;
}

.ai-assist-canvas-card,
.ai-assist-output-card {
  border: 3px solid #55585a;
  border-radius: 6px;
  background: #fff;
  min-width: 0;
}

.ai-assist-canvas-card {
  overflow-x: auto;
  overflow-y: hidden;
}

.ai-assist-output-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
  padding: 16px;
  min-height: 318px;
}

.ai-assist-output-card h3 {
  margin: 0;
  text-align: center;
  font-size: 18px;
  color: #2b2f30;
}

.ai-assist-canvas {
  position: relative;
  min-width: 1120px;
  min-height: 645px;
  overflow: hidden;
  background-color: #fafbfc;
  background-image: radial-gradient(#d5dae1 1.1px, transparent 1.1px);
  background-size: 20px 20px;
}

.ai-assist-canvas-whole {
  min-height: 1170px;
}

.segmented button.selected,
.segmented .selected {
  border-color: rgba(126, 230, 255, .92);
  background: linear-gradient(180deg, rgba(15, 67, 82, .96), rgba(5, 31, 43, .98));
  color: rgba(244, 253, 255, .98);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .08),
    0 0 0 2px rgba(85, 203, 234, .22),
    0 14px 28px rgba(0, 0, 0, .18);
}

body:not(.home-mode) :is(.segmented button.selected, .segmented .selected) {
  border-color: rgba(126, 230, 255, .96);
  background:
    linear-gradient(180deg, rgba(24, 85, 101, .96), rgba(5, 35, 48, .98)),
    radial-gradient(circle at 20% 0%, rgba(117, 220, 248, .22), transparent 48%);
  color: rgba(244, 253, 255, .98);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .10),
    0 0 0 2px rgba(85, 203, 234, .26),
    0 14px 30px rgba(0, 0, 0, .22);
}

.ai-assist-edges {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.ai-assist-edge {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.ai-assist-edge-group {
  cursor: grab;
  pointer-events: stroke;
}

.ai-assist-edge-group.dragging {
  cursor: grabbing;
}

.ai-assist-edge-shell {
  stroke: #77d9ff;
  stroke-width: 10;
  opacity: .24;
  filter: drop-shadow(0 0 10px rgba(35, 143, 255, .35));
}

.ai-assist-edge-core {
  stroke: #155bc2;
  stroke-width: 5;
  opacity: .94;
}

.ai-assist-edge-pulse {
  stroke: #fff;
  stroke-width: 1.5;
  stroke-dasharray: 2 18 2 24;
  animation: aiAssistCablePulse .85s linear infinite;
  opacity: .98;
}

@keyframes aiAssistCablePulse {
  to {
    stroke-dashoffset: -46;
  }
}

.ai-assist-node {
  position: absolute;
  z-index: 2;
  width: 150px;
  min-height: 54px;
  padding: 8px 10px;
  border: 2px solid #9857ff;
  border-radius: 7px;
  background: #fff;
  color: #151a1d;
  box-shadow: 0 5px 12px rgba(70, 48, 118, .08);
  cursor: pointer;
  text-align: center;
  font: inherit;
  touch-action: none;
  user-select: none;
}

.ai-assist-material-node {
  width: 220px;
  min-height: 150px;
  padding: 10px;
  display: grid;
  align-content: start;
  gap: 8px;
  text-align: left;
}

.ai-assist-material-node strong,
.ai-assist-material-node small {
  display: block;
}

.ai-assist-material-preview {
  display: grid;
  place-items: center;
  min-height: 88px;
  border: 1px dashed rgba(126, 230, 255, .68);
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(145, 226, 240, .22), rgba(19, 56, 71, .5)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .08) 0 8px, transparent 8px 16px);
  color: rgba(231, 249, 255, .88);
  font-size: 12px;
  font-weight: 900;
}

.ai-assist-node::before {
  content: attr(data-ai-assist-index);
  position: absolute;
  top: -12px;
  left: -12px;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #1a6cff;
  color: #fff;
  box-shadow: 0 4px 12px rgba(23, 82, 160, .25);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.ai-assist-node strong {
  display: block;
  font-size: 14px;
  line-height: 1.35;
}

.ai-assist-node small {
  display: block;
  margin-top: 8px;
  color: #20282a;
  font-size: 11px;
  line-height: 1.25;
}

.ai-assist-node em {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #eaf7f0;
  color: #0b7a51;
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
}

.ai-assist-node:hover,
.ai-assist-node:focus-visible {
  border-color: #6e35ff;
  outline: none;
  box-shadow: 0 0 0 4px rgba(152, 87, 255, .16);
}

.ai-assist-node.dragging {
  cursor: grabbing;
  z-index: 5;
  box-shadow: 0 14px 34px rgba(34, 64, 130, .22);
}

.ai-assist-canvas.is-dragging {
  cursor: grabbing;
}

.ai-assist-node.configured {
  border-color: #17815d;
  background: #f4fbf7;
}

.ai-assist-node-main {
  width: 330px;
  min-height: 78px;
}

.ai-assist-output-node {
  width: 260px;
  min-height: 100px;
}

body:not(.home-mode) .ai-assist-node small {
  color: rgba(204, 230, 239, .84);
}

body:not(.home-mode) .ai-assist-node em {
  min-width: 46px;
  border: 1px solid rgba(132, 231, 255, .56);
  background: rgba(12, 58, 72, .94);
  color: rgba(236, 253, 255, .96);
  text-align: center;
}

body:not(.home-mode) .ai-assist-node.configured em {
  border-color: rgba(124, 238, 195, .68);
  background: rgba(8, 71, 57, .96);
  color: rgba(230, 255, 248, .98);
}

body:not(.home-mode) .ai-assist-preview-output-node {
  width: 320px;
  min-height: 138px;
  padding: 16px;
}

body:not(.home-mode) .ai-assist-preview-output-node .ai-assist-node-slot-strip {
  gap: 8px;
  margin-top: 12px;
}

body:not(.home-mode) .ai-assist-preview-output-node .ai-assist-node-slot-strip i {
  height: 40px;
  border-color: rgba(126, 203, 226, .62);
  background: rgba(4, 27, 39, .78);
}

body:not(.home-mode) .ai-assist-node.ai-assist-annotation-node {
  width: 320px;
  min-height: 120px;
  display: grid;
  align-content: center;
  border-color: rgba(255, 164, 124, .64);
  background:
    linear-gradient(135deg, rgba(54, 39, 31, .94), rgba(6, 26, 37, .97)),
    #071a24;
}

body:not(.home-mode) .ai-assist-node.ai-assist-annotation-node strong {
  color: rgba(255, 246, 235, .98);
}

body:not(.home-mode) .ai-assist-node.ai-assist-annotation-node small {
  color: rgba(255, 213, 185, .88);
}

.ai-assist-wide-node {
  width: 260px;
}

.ai-assist-function-node {
  width: 500px;
  min-height: 112px;
}

.ai-assist-output-list {
  display: grid;
  gap: 10px;
  align-content: start;
}

.ai-assist-output-empty {
  min-height: 190px;
  display: grid;
  place-items: center;
  border: 1px dashed #ccd5cf;
  border-radius: 6px;
  color: #7b8580;
  text-align: center;
  padding: 16px;
  font-weight: 700;
}

.ai-assist-output-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid #dfe6e1;
  border-radius: 6px;
  background: #fdfefd;
}

.ai-assist-output-item input {
  grid-row: span 3;
}

.ai-assist-output-item span {
  width: max-content;
  padding: 2px 8px;
  border-radius: 999px;
  background: #edf4ff;
  color: #135fb8;
  font-size: 12px;
  font-weight: 900;
}

.ai-assist-output-item strong {
  color: #15201d;
  font-size: 14px;
}

.ai-assist-output-item small {
  color: #6f7b75;
  font-size: 12px;
}

.ai-assist-ppt-btn {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  background: #1b6f51;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.ai-assist-ppt-btn:hover {
  background: #15583f;
}

.ai-assist-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  background: rgba(13, 21, 19, .46);
  padding: 20px;
}

.ai-assist-modal.hidden {
  display: none;
}

.ai-assist-modal-card {
  width: min(560px, calc(100vw - 40px));
  max-height: min(760px, calc(100vh - 40px));
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 16px;
  border: 1px solid #d9e2dc;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .22);
  padding: 18px;
}

.ai-assist-modal-card header,
.ai-assist-modal-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ai-assist-modal-card h3 {
  margin: 8px 0 0;
  color: #14201d;
  font-size: 20px;
}

.ai-assist-modal-fields {
  display: grid;
  gap: 12px;
  overflow: auto;
}

.ai-assist-modal-fields label {
  display: grid;
  gap: 6px;
  color: #44504b;
  font-size: 13px;
  font-weight: 800;
}

.ai-assist-modal-fields input,
.ai-assist-modal-fields select {
  height: 38px;
  border: 1px solid #d8ded9;
  border-radius: 6px;
  padding: 0 10px;
  color: #14201d;
  font: inherit;
  background: #fff;
}

.ai-assist-modal-fields textarea {
  min-height: 78px;
  border: 1px solid #d8ded9;
  border-radius: 6px;
  padding: 10px;
  color: #14201d;
  font: inherit;
  resize: vertical;
}

.ai-assist-ppt-modal-card {
  width: min(680px, calc(100vw - 40px));
}

.ai-assist-ppt-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ai-assist-ppt-fields label:nth-child(3),
.ai-assist-ppt-fields label:nth-child(4),
.ai-assist-ppt-fields label:nth-child(7),
.ai-assist-ppt-fields p {
  grid-column: 1 / -1;
}

.ai-assist-ppt-checks {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.ai-assist-ppt-checks label {
  grid-template-columns: auto 1fr;
  align-items: center;
  border: 1px solid #dfe8e3;
  border-radius: 6px;
  padding: 8px 10px;
  background: #fbfdfc;
}

.ai-assist-ppt-checks input {
  width: 16px;
  height: 16px;
  padding: 0;
}

.ai-assist-modal-fields p {
  margin: 0;
  padding: 10px 12px;
  border-radius: 6px;
  background: #f6f3eb;
  color: #7a5b1e;
  font-size: 12px;
  font-weight: 700;
}

.ai-assist-canvas-whole.is-multifunction {
  min-height: 960px;
  background:
    radial-gradient(circle at 30% 20%, rgba(41, 130, 158, .14), transparent 28%),
    linear-gradient(180deg, rgba(6, 29, 41, .98), rgba(3, 19, 30, .98));
  border-color: rgba(89, 166, 191, .42);
}

.ai-assist-canvas-whole.is-multifunction .ai-assist-node {
  border-color: rgba(91, 185, 216, .54);
  background:
    linear-gradient(180deg, rgba(14, 45, 62, .98), rgba(5, 25, 37, .98));
  color: rgba(239, 251, 255, .96);
  box-shadow: 0 18px 34px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .06);
}

.ai-assist-canvas-whole.is-multifunction .ai-assist-node strong {
  color: rgba(247, 253, 255, .98);
}

.ai-assist-canvas-whole.is-multifunction .ai-assist-node small {
  color: rgba(186, 219, 229, .88);
}

.ai-assist-canvas-whole.is-multifunction .ai-assist-node em {
  border-color: rgba(116, 237, 194, .58);
  background: rgba(12, 79, 63, .94);
  color: rgba(230, 255, 247, .96);
}

.ai-assist-whole-multifunction-node {
  text-align: left;
}

.ai-assist-whole-source-node {
  width: 330px;
  min-height: 206px;
}

.ai-assist-whole-source-node .ai-assist-material-preview {
  min-height: 116px;
}

.ai-assist-whole-generate-node {
  width: 330px;
  min-height: 132px;
  display: grid;
  align-content: center;
}

.ai-assist-whole-output-node {
  width: 520px;
  min-height: 300px;
  padding: 18px;
}

body:not(.home-mode) .ai-assist-canvas-whole.is-multifunction .ai-assist-whole-output-node {
  width: 520px;
  min-height: 300px;
  padding: 18px;
}

.ai-assist-whole-output-node .ai-assist-node-slot-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.ai-assist-whole-output-node .ai-assist-node-slot-strip i {
  min-height: 96px;
  border: 1px dashed rgba(115, 200, 226, .6);
  border-radius: 7px;
  background:
    linear-gradient(135deg, rgba(26, 83, 104, .42), rgba(5, 25, 37, .84)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .07) 0 8px, transparent 8px 16px);
}

.ai-assist-whole-output-node .ai-assist-node-slot-strip i.filled {
  border-style: solid;
  background: linear-gradient(135deg, rgba(42, 117, 139, .78), rgba(10, 54, 69, .96));
}

.ai-assist-whole-edit-node {
  width: 520px;
  min-height: 170px;
  display: grid;
  align-content: center;
}

body:not(.home-mode) .ai-assist-canvas-whole.is-multifunction .ai-assist-whole-edit-node {
  width: 520px;
  min-height: 170px;
}

.ai-assist-ppt-prompt-strip {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(101, 184, 207, .34);
  border-radius: 8px;
  background: rgba(4, 26, 37, .72);
}

.ai-assist-ppt-prompt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.ai-assist-ppt-prompt-card {
  display: grid;
  gap: 6px;
  min-height: 110px;
  padding: 12px;
  border: 1px solid rgba(94, 169, 192, .36);
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(12, 44, 60, .96), rgba(5, 26, 38, .96));
  color: rgba(234, 249, 254, .94);
  text-align: left;
  cursor: pointer;
}

.ai-assist-ppt-prompt-card:hover,
.ai-assist-ppt-prompt-card.is-selected {
  border-color: rgba(124, 235, 196, .78);
  background: linear-gradient(180deg, rgba(13, 74, 61, .98), rgba(5, 37, 42, .98));
}

.ai-assist-ppt-prompt-card small,
.ai-assist-ppt-prompt-card span {
  color: rgba(195, 225, 234, .84);
  font-size: 12px;
  line-height: 1.4;
}

.ai-assist-output-empty-action {
  width: 100%;
  min-height: 190px;
  color: rgba(219, 244, 250, .92);
  background:
    linear-gradient(180deg, rgba(15, 48, 64, .86), rgba(5, 26, 38, .92)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .05) 0 8px, transparent 8px 16px);
  cursor: pointer;
}

.ai-assist-output-empty-action strong,
.ai-assist-output-empty-action span {
  display: block;
}

.ai-assist-whole-output-add {
  width: 100%;
}

.ai-assist-whole-output-picker-modal {
  z-index: 1500;
}

.ai-assist-whole-output-picker-card {
  width: min(960px, calc(100vw - 48px));
  background:
    linear-gradient(180deg, rgba(11, 44, 60, .98), rgba(4, 23, 34, .98));
  border-color: rgba(91, 184, 213, .48);
  color: rgba(236, 251, 255, .96);
}

.ai-assist-whole-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(174px, 1fr));
  gap: 12px;
  min-height: 320px;
  max-height: min(58vh, 560px);
  overflow: auto;
  padding-right: 4px;
}

.ai-assist-whole-library-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(100, 181, 205, .38);
  border-radius: 7px;
  background: rgba(7, 31, 45, .9);
  color: rgba(236, 251, 255, .94);
  text-align: left;
  cursor: pointer;
}

.ai-assist-whole-library-card span {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(46, 102, 120, .5), rgba(7, 31, 45, .86)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .08) 0 8px, transparent 8px 16px);
}

.ai-assist-whole-library-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ai-assist-whole-library-card strong {
  color: rgba(245, 253, 255, .98);
}

.ai-assist-whole-library-card small {
  color: rgba(190, 222, 231, .86);
}

.ai-assist-whole-library-card.is-selected {
  border-color: rgba(126, 239, 197, .86);
  background: linear-gradient(180deg, rgba(12, 80, 65, .98), rgba(5, 36, 42, .98));
  box-shadow: 0 0 0 2px rgba(78, 216, 171, .18);
}

.ai-assist-ppt-route {
  grid-column: 1 / -1;
}

.ai-assist-ppt-route select {
  height: 38px;
  border: 1px solid #d8ded9;
  border-radius: 6px;
  padding: 0 10px;
  color: #14201d;
  background: #fff;
  font: inherit;
}

@media (max-width: 900px) {
  .ai-assist-row {
    grid-template-columns: 1fr;
  }

  .ai-assist-output-card {
    min-height: 240px;
  }

  .ai-assist-ppt-fields,
  .ai-assist-ppt-checks {
    grid-template-columns: 1fr;
  }

  .ai-assist-annotation-panel,
  .ai-assist-generation-grid,
  .ai-assist-output-preview-grid,
  .ai-assist-annotation-toolbar {
    grid-template-columns: 1fr;
  }

  .ai-assist-material-prompt-layout {
    grid-template-columns: 1fr;
  }

  .ai-assist-material-category-rail {
    grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
    max-height: 180px;
  }
}

@media (max-width: 520px) {
  .ai-assist-project-bar {
    align-items: stretch;
  }

  .ai-assist-project-bar select {
    flex: 1;
    width: auto;
  }

  .ai-assist-canvas {
    min-width: 960px;
  }

  .ai-assist-node {
    width: 138px;
  }
}

/* AIGEN-DESIGNER-MATERIAL-ANCHOR-20260621: persistent base-image anchor and quieter node numbers. */
.aigen-remodel-workflow .aigen-flow-node {
  padding: 12px 34px 10px 10px;
}

.aigen-remodel-workflow .aigen-flow-node b {
  position: absolute;
  right: 8px;
  top: 7px;
  z-index: 3;
  min-width: 20px;
  padding: 2px 5px;
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(8, 37, 52, .96), rgba(3, 18, 29, .98));
  color: #f3fbff !important;
  border: 1px solid rgba(118, 214, 241, .58);
  font-size: 10px;
  line-height: 1.25;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0;
  box-shadow: 0 0 0 1px rgba(2, 8, 13, .74), 0 4px 12px rgba(0, 0, 0, .32);
  pointer-events: none;
}

.aigen-remodel-workflow .aigen-flow-node.material-anchor {
  width: 330px;
  min-height: 250px;
  align-content: start;
  gap: 8px;
  border-color: rgba(111, 208, 235, .75);
}

.aigen-remodel-workflow .aigen-flow-node.has-choice-preview {
  min-height: 116px;
  align-content: start;
  gap: 6px;
}

.aigen-node-choice-preview {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  width: 100%;
  min-height: 38px;
  padding: 5px 6px;
  border: 1px solid rgba(106, 190, 219, .38);
  border-radius: 7px;
  background: rgba(5, 24, 36, .58);
  color: rgba(237, 252, 255, .9);
}

.aigen-node-choice-preview.empty {
  display: grid;
  place-items: center;
  grid-template-columns: 1fr;
  border-style: dashed;
  color: rgba(224, 241, 246, .62);
}

.aigen-node-choice-thumbs {
  display: flex;
  align-items: center;
  min-width: 0;
}

.aigen-node-choice-thumbs img,
.aigen-node-choice-thumbs b {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid rgba(142, 232, 255, .44);
  background: linear-gradient(180deg, rgba(31, 73, 92, .92), rgba(9, 30, 43, .95));
  box-shadow: 0 3px 10px rgba(0, 0, 0, .25);
  object-fit: cover;
  display: grid;
  place-items: center;
  color: #eafbff;
  font-size: 12px;
}

.aigen-node-choice-thumbs img + img,
.aigen-node-choice-thumbs img + b,
.aigen-node-choice-thumbs b + img,
.aigen-node-choice-thumbs b + b {
  margin-left: -9px;
}

.aigen-node-choice-preview small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(235, 250, 255, .82) !important;
}

.aigen-base-material-preview {
  display: grid;
  grid-template-rows: minmax(130px, 1fr) auto;
  gap: 7px;
  min-height: 162px;
  width: 100%;
  border: 1px dashed rgba(125, 203, 225, .42);
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(31, 83, 109, .42), rgba(9, 27, 39, .82)),
    repeating-linear-gradient(135deg, rgba(105, 190, 220, .08) 0 8px, rgba(7, 23, 33, .1) 8px 16px);
}

.aigen-base-material-preview img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 130px;
  object-fit: cover;
}

.aigen-base-material-preview b {
  position: static !important;
  display: grid;
  place-items: center;
  min-height: 130px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(238, 252, 255, .88) !important;
  font-size: 13px;
}

.aigen-base-material-preview span {
  display: block;
  padding: 0 8px 8px;
  color: rgba(232, 249, 255, .82);
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.aigen-field-card .aigen-base-material-preview {
  margin: 8px 0;
  min-height: 190px;
}

.aigen-material-preview-button {
  appearance: none;
  border-style: dashed;
  text-align: left;
  cursor: pointer;
}

.aigen-material-preview-button:hover,
.aigen-material-preview-button:focus-visible {
  border-color: rgba(145, 231, 255, .9);
  box-shadow: 0 0 0 2px rgba(101, 195, 226, .16), inset 0 0 24px rgba(96, 205, 232, .12);
  outline: none;
}

.aigen-material-upload-drop {
  display: grid !important;
  gap: 4px;
  padding: 10px;
  border: 1px dashed rgba(127, 206, 226, .55);
  border-radius: 8px;
  background: rgba(7, 34, 49, .32);
  cursor: pointer;
}

.aigen-material-upload-drop input {
  display: none;
}

.aigen-material-upload-drop strong {
  color: #eafcff;
  font-size: 12px;
}

.aigen-material-upload-drop small {
  color: rgba(221, 240, 244, .72);
}

.aigen-material-upload-drop.is-dragging {
  border-color: rgba(142, 229, 255, .95);
  box-shadow: 0 0 0 2px rgba(80, 189, 229, .14), inset 0 0 24px rgba(74, 178, 215, .18);
}

.aigen-card-picker,
.aigen-prompt-card-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 10px;
  max-height: 330px;
  overflow: auto;
  padding: 8px;
  border: 1px solid rgba(115, 184, 214, .28);
  border-radius: 8px;
  background: rgba(3, 18, 27, .42);
}

.aigen-bio-card-choice,
.aigen-prompt-card-choice {
  text-align: left;
  color: #e9f7ff;
  border: 1px solid rgba(122, 190, 220, .24);
  border-radius: 8px;
  background: rgba(10, 32, 45, .74);
  padding: 9px;
  min-height: 116px;
  display: grid;
  gap: 6px;
  cursor: pointer;
  position: relative;
}

.aigen-bio-card-choice:hover,
.aigen-prompt-card-choice:hover,
.aigen-bio-card-choice.active,
.aigen-prompt-card-choice.active {
  border-color: #8ee8ff;
  box-shadow: 0 0 0 1px rgba(142, 232, 255, .32), 0 0 22px rgba(68, 174, 214, .18);
}

.aigen-bio-card-choice.active,
.aigen-prompt-card-choice.active {
  background:
    linear-gradient(180deg, rgba(13, 88, 105, .98), rgba(3, 30, 43, .99));
  border-color: rgba(142, 232, 255, .92);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .08),
    0 0 0 2px rgba(89, 210, 239, .26),
    0 16px 32px rgba(0, 0, 0, .22);
}

.aigen-bio-card-choice.active::after,
.aigen-prompt-card-choice.active::after {
  content: "\5df2\9009";
  position: absolute;
  right: 8px;
  top: 8px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(1, 12, 20, .76);
  border: 1px solid rgba(142, 232, 255, .7);
  color: #f2fdff;
  font-size: 11px;
  line-height: 1.25;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .26);
}

.aigen-bio-card-choice.active strong,
.aigen-bio-card-choice.active small,
.aigen-prompt-card-choice.active strong,
.aigen-prompt-card-choice.active small,
.aigen-prompt-card-choice.active span {
  color: #f5fdff;
}

.aigen-bio-card-thumb {
  height: 86px;
  border-radius: 6px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.08);
}

.aigen-bio-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.aigen-bio-card-thumb b {
  color: #9edff1;
  font-size: 22px;
}

.aigen-bio-card-choice strong,
.aigen-prompt-card-choice strong {
  font-size: 13px;
}

.aigen-bio-card-choice small,
.aigen-prompt-card-choice small,
.aigen-prompt-card-choice span {
  color: rgba(226, 244, 250, .68);
  font-size: 12px;
  line-height: 1.45;
}

.aigen-prompt-card-choice.is-disabled,
.aigen-prompt-card-picker.is-custom .aigen-prompt-card-choice {
  opacity: .42;
  filter: grayscale(.25);
}

.aigen-custom-prompt-box {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.aigen-custom-prompt-box textarea {
  width: 100%;
  resize: vertical;
  min-height: 92px;
  border-radius: 8px;
  border: 1px solid rgba(111, 186, 218, .34);
  background: rgba(4, 20, 31, .82);
  color: #eaf8ff;
  padding: 9px 10px;
}

.aigen-card-picker-empty {
  grid-column: 1 / -1;
  border: 1px dashed rgba(139, 196, 218, .35);
  border-radius: 8px;
  color: rgba(230, 247, 252, .72);
  padding: 14px;
  background: rgba(255,255,255,.04);
}

.aigen-compat-hidden {
  display: none !important;
}

.aigen-remodel-shell .aigen-product-stage-wrap {
  position: relative;
  z-index: 1;
  min-width: 0;
  padding-left: 0;
}

.aigen-remodel-shell .aigen-node-config-dialog *,
.aigen-remodel-shell .aigen-material-modal-panel * {
  box-sizing: border-box;
}

.aigen-node-config-modal {
  position: fixed;
  inset: 0;
  z-index: 2400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(1, 12, 19, .62);
  backdrop-filter: blur(9px);
}

.aigen-node-config-modal.hidden {
  display: none !important;
}

.aigen-node-config-dialog {
  width: min(560px, 92vw);
  max-height: min(760px, 88vh);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(119, 205, 229, .42);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(10, 35, 50, .98), rgba(3, 19, 29, .98));
  box-shadow: 0 28px 80px rgba(0, 0, 0, .45);
}

.aigen-node-config-head,
.aigen-node-config-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.aigen-node-config-actions {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
}

.aigen-node-config-actions [data-aigen-node-config-close] {
  justify-self: start;
}

.aigen-node-config-actions [data-aigen-footer-generate] {
  justify-self: center;
  min-width: 138px;
  visibility: hidden;
  pointer-events: none;
}

.aigen-node-config-modal[data-aigen-selected-node="image_settings"] .aigen-node-config-actions [data-aigen-footer-generate] {
  visibility: visible;
  pointer-events: auto;
}

.aigen-node-config-actions [data-aigen-node-config-confirm] {
  justify-self: end;
}

.aigen-node-config-head h3 {
  margin: 5px 0 0;
  color: #effcff;
  font-size: 16px;
}

.aigen-node-config-body {
  overflow: auto;
  padding-right: 2px;
}

.aigen-remodel-shell .aigen-field-card {
  width: 100%;
  max-width: 100%;
  overflow: visible;
  border: 1px solid rgba(111, 190, 216, .34);
  box-shadow: inset 0 0 0 1px rgba(10, 54, 75, .28);
}

.aigen-remodel-shell .aigen-field-card:not(.hidden) {
  display: grid;
  gap: 8px;
}

.aigen-material-modal {
  position: fixed;
  inset: 0;
  z-index: 2600;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(1, 12, 19, .66);
  backdrop-filter: blur(10px);
}

.aigen-material-modal.open {
  display: flex;
}

.aigen-material-modal-panel {
  width: min(940px, 92vw);
  max-height: min(760px, 88vh);
  display: grid;
  grid-template-rows: auto auto 1fr auto auto;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(119, 205, 229, .42);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(10, 35, 50, .98), rgba(3, 19, 29, .98));
  box-shadow: 0 28px 80px rgba(0, 0, 0, .45);
}

.aigen-material-modal-head,
.aigen-material-modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.aigen-material-modal-head h3 {
  margin: 0;
  color: #effcff;
  font-size: 16px;
  letter-spacing: 0;
}

.aigen-material-modal-head small {
  display: block;
  margin-top: 3px;
  color: rgba(226, 244, 248, .68);
}

.aigen-material-modal-filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.aigen-material-modal-filters label {
  display: grid;
  gap: 5px;
  color: rgba(232, 249, 255, .78);
  font-size: 12px;
}

.aigen-material-modal-filters select {
  width: 100%;
}

.aigen-material-modal-drop {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px dashed rgba(127, 206, 226, .58);
  border-radius: 8px;
  background: rgba(7, 34, 49, .36);
  cursor: pointer;
}

.aigen-material-modal-drop input {
  display: none;
}

.aigen-material-modal-drop strong {
  color: #eafcff;
  font-size: 13px;
}

.aigen-material-modal-drop small {
  color: rgba(221, 240, 244, .7);
}

.aigen-material-modal-drop.is-dragging {
  border-color: rgba(142, 229, 255, .95);
  box-shadow: inset 0 0 28px rgba(74, 178, 215, .18);
}

.aigen-material-modal-grid {
  min-height: 260px;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  padding: 2px;
}

.aigen-material-modal-grid.is-dragging {
  border: 1px dashed rgba(142, 229, 255, .95);
  border-radius: 8px;
  background: rgba(40, 150, 190, .12);
  box-shadow: inset 0 0 34px rgba(74, 178, 215, .2);
}

.aigen-material-choice {
  display: grid;
  gap: 7px;
  min-height: 198px;
  padding: 8px;
  border: 1px solid rgba(106, 186, 211, .28);
  border-radius: 8px;
  background: rgba(4, 24, 35, .66);
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.aigen-material-choice:hover,
.aigen-material-choice.active {
  border-color: rgba(132, 224, 250, .9);
  box-shadow: 0 0 0 2px rgba(88, 198, 235, .12);
}

.aigen-material-choice.active {
  position: relative;
  border-color: #8ee8ff;
  background: rgba(9, 54, 73, .88);
  box-shadow: 0 0 0 2px rgba(142, 232, 255, .42), inset 0 0 0 1px rgba(255,255,255,.16), 0 0 28px rgba(42, 185, 228, .22);
}

.aigen-material-choice.active::after {
  content: "已选";
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #bff4ff;
  color: #063345;
  font-size: 11px;
  font-weight: 800;
}

.aigen-material-choice-thumb {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(31, 83, 109, .42), rgba(9, 27, 39, .82)),
    repeating-linear-gradient(135deg, rgba(180, 236, 250, .12) 0 8px, rgba(7, 23, 33, .14) 8px 16px);
  color: rgba(239, 252, 255, .86);
}

.aigen-material-choice-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.aigen-material-choice strong {
  color: rgba(240, 253, 255, .92);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.aigen-material-choice small {
  color: rgba(220, 239, 244, .62);
}

.aigen-material-empty {
  display: grid;
  place-items: center;
  min-height: 240px;
  border: 1px dashed rgba(127, 206, 226, .36);
  border-radius: 8px;
  color: rgba(231, 246, 250, .72);
  text-align: center;
}

.aigen-generation-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  margin-top: 10px;
}

.aigen-generation-settings-grid label,
.aigen-supplemental-prompt-label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: rgba(231, 246, 250, .84);
  font-size: 12px;
  font-weight: 700;
}

.aigen-generation-settings-grid select,
.aigen-supplemental-prompt-label textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(112, 203, 230, .42);
  border-radius: 8px;
  background: rgba(8, 27, 40, .86);
  color: rgba(244, 253, 255, .94);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

.aigen-generation-settings-grid select {
  height: 38px;
  padding: 0 10px;
}

.aigen-supplemental-prompt-label {
  margin-top: 14px;
}

.aigen-supplemental-prompt-label textarea {
  min-height: 190px;
  padding: 12px;
  resize: vertical;
  line-height: 1.55;
}

.aigen-generation-actions,
.aigen-output-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.aigen-generation-actions .primary {
  min-width: 118px;
}

.aigen-output-panel {
  display: grid;
  gap: 12px;
}

.aigen-output-dropzone {
  border: 1px dashed rgba(109, 203, 231, .42);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(9, 31, 45, .86), rgba(6, 20, 31, .9));
  padding: 12px;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.aigen-output-dropzone.is-dragging {
  border-color: rgba(128, 232, 255, .85);
  background: rgba(11, 48, 66, .96);
  box-shadow: 0 0 0 3px rgba(71, 199, 229, .16);
}

.aigen-output-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.aigen-output-slot {
  display: grid;
  grid-template-rows: minmax(116px, 1fr) auto auto;
  gap: 8px;
  min-height: 154px;
  width: 100%;
  padding: 8px;
  border: 1px solid rgba(104, 189, 215, .28);
  border-radius: 8px;
  background: rgba(8, 25, 36, .72);
  color: rgba(236, 250, 253, .86);
  text-align: left;
}

.aigen-output-slot span {
  display: grid;
  place-items: center;
  overflow: hidden;
  min-width: 0;
  min-height: 116px;
  border-radius: 6px;
  background: rgba(168, 216, 226, .1);
  color: rgba(227, 245, 250, .66);
  font-size: 24px;
  font-weight: 800;
}

.aigen-output-thumb-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: zoom-in;
}

/* 画布R9 (2026-07-05) F3: 06 候选缩略图 9:16 竖图被 cover 裁成横条 → contain 完整显示(留边不裁), 桌面/移动同一条规则 */
.aigen-output-slot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: rgba(4, 16, 24, .92);
}

.aigen-output-slot strong {
  overflow: hidden;
  min-width: 0;
  color: rgba(241, 253, 255, .9);
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aigen-output-slot.has-image {
  cursor: pointer;
}

.aigen-output-slot.has-image:hover,
.aigen-output-slot.is-selected {
  border-color: rgba(116, 223, 247, .84);
  box-shadow: 0 0 0 2px rgba(57, 194, 226, .18);
}

.aigen-output-slot.is-empty {
  opacity: .74;
}

.aigen-output-select-button {
  justify-self: start;
  min-height: 28px;
  padding: 4px 8px;
}

.aigen-library-card.is-selected-output {
  border-color: rgba(116, 223, 247, .88);
  box-shadow: 0 0 0 2px rgba(57, 194, 226, .2);
  background: rgba(13, 58, 75, .86);
}

.aigen-output-detail-modal {
  position: fixed;
  inset: 0;
  z-index: 2720;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(1, 10, 16, .78);
  backdrop-filter: blur(12px);
}

.aigen-output-detail-card {
  width: min(920px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(111, 203, 229, .62);
  border-radius: 10px;
  background: rgba(5, 23, 34, .98);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .46);
}

.aigen-output-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.aigen-output-detail-media {
  position: relative;
  min-height: 260px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(105, 185, 210, .34);
  border-radius: 8px;
  background: rgba(4, 18, 28, .92);
}

.aigen-output-detail-media img {
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
}

.aigen-output-detail-meta {
  display: grid;
  gap: 4px;
  color: rgba(218, 238, 245, .74);
  font-size: 12px;
}

.aigen-video-generate-status {
  min-height: 20px;
  color: rgba(245, 221, 151, .9);
  font-size: 12px;
  line-height: 1.45;
}

.aigen-output-dropzone p {
  margin: 10px 0 0;
  color: rgba(221, 240, 246, .66);
  font-size: 12px;
  line-height: 1.5;
}

.aigen-output-actions {
  justify-content: space-between;
  flex-wrap: wrap;
}

.aigen-output-actions .danger {
  border-color: rgba(255, 126, 126, .5);
  color: rgba(255, 199, 199, .94);
}

.aigen-library-card[draggable="true"] {
  cursor: grab;
}

.aigen-library-card[draggable="true"]:active {
  cursor: grabbing;
}

.aigen-output-library-modal {
  position: fixed;
  inset: 0;
  z-index: 2620;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(2, 13, 20, .7);
  backdrop-filter: blur(10px);
}

.aigen-output-library-modal.open {
  display: flex;
}

.aigen-output-library-panel {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  gap: 14px;
  width: min(920px, 94vw);
  max-height: min(760px, 88vh);
  padding: 18px;
  border: 1px solid rgba(108, 202, 229, .46);
  border-radius: 8px;
  background: rgba(7, 25, 38, .96);
  box-shadow: 0 24px 72px rgba(0, 0, 0, .38);
}

.aigen-output-library-head,
.aigen-output-library-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.aigen-output-library-panel h3 {
  margin: 0;
  color: rgba(243, 253, 255, .94);
  font-size: 18px;
}

.aigen-output-library-panel p {
  margin: 0;
  color: rgba(221, 239, 245, .68);
  line-height: 1.5;
}

.aigen-output-library-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.aigen-output-library-filters label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: rgba(231, 246, 250, .84);
  font-size: 12px;
  font-weight: 700;
}

.aigen-output-library-filters select {
  width: 100%;
  height: 38px;
  min-width: 0;
  padding: 0 10px;
  border: 1px solid rgba(112, 203, 230, .42);
  border-radius: 8px;
  background: rgba(8, 27, 40, .86);
  color: rgba(244, 253, 255, .94);
}

.aigen-output-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  overflow: auto;
  min-height: 260px;
  padding: 4px;
}

.aigen-output-library-choice {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 9px;
  border: 1px solid rgba(104, 189, 215, .28);
  border-radius: 8px;
  background: rgba(8, 25, 36, .72);
  color: rgba(236, 250, 253, .86);
  text-align: left;
}

.aigen-output-library-choice.active,
.aigen-output-library-choice:hover {
  border-color: rgba(116, 223, 247, .84);
  box-shadow: 0 0 0 2px rgba(57, 194, 226, .18);
}

.aigen-output-library-choice span {
  display: grid;
  place-items: center;
  overflow: hidden;
  min-height: 112px;
  border-radius: 6px;
  background: rgba(168, 216, 226, .1);
  color: rgba(227, 245, 250, .66);
  font-weight: 800;
}

.aigen-output-library-choice img {
  width: 100%;
  height: 112px;
  object-fit: cover;
}

.aigen-output-library-choice strong {
  overflow: hidden;
  min-width: 0;
  color: rgba(241, 253, 255, .9);
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aigen-node-config-modal[data-aigen-selected-node="graphic_understanding"] .aigen-node-config-dialog,
.aigen-node-config-modal[data-aigen-selected-node="video_description"] .aigen-node-config-dialog,
.aigen-node-config-modal[data-aigen-selected-node="video_generate"] .aigen-node-config-dialog {
  width: min(820px, 94vw);
  max-height: min(860px, 92vh);
  grid-template-rows: auto minmax(0, 1fr);
}

.aigen-node-config-modal[data-aigen-selected-node="graphic_understanding"] .aigen-node-config-actions,
.aigen-node-config-modal[data-aigen-selected-node="video_description"] .aigen-node-config-actions,
.aigen-node-config-modal[data-aigen-selected-node="video_generate"] .aigen-node-config-actions {
  display: none;
}

.aigen-video-source-grid,
.aigen-digital-card-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 10px;
}

.aigen-video-source-groups {
  display: grid;
  gap: 14px;
}

.aigen-video-source-groups h4 {
  margin: 0 0 8px;
  color: rgba(226, 244, 249, .78);
  font-size: 12px;
}

.aigen-video-source-card,
.aigen-digital-card-choice,
.aigen-video-prompt-card {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 9px;
  border: 1px solid rgba(102, 185, 214, .28);
  border-radius: 8px;
  background: rgba(6, 22, 33, .78);
  color: rgba(235, 250, 253, .88);
  text-align: left;
}

.aigen-video-source-card span {
  display: grid;
  place-items: center;
  overflow: hidden;
  min-height: 88px;
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(38, 69, 83, .82), rgba(15, 39, 51, .88));
  color: rgba(234, 249, 252, .86);
  font-weight: 800;
}

/* 画布R9 (2026-07-05) F3同病: 07/08 候选图同为 06 输出(9:16 竖图), cover 同样裁横条 → contain 完整显示 */
.aigen-video-source-card img {
  width: 100%;
  height: 88px;
  object-fit: contain;
  background: rgba(4, 16, 24, .92);
}

.aigen-video-source-card strong,
.aigen-digital-card-choice strong,
.aigen-video-prompt-card strong {
  overflow: hidden;
  min-width: 0;
  color: rgba(245, 253, 255, .94);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aigen-video-source-card small,
.aigen-digital-card-choice small,
.aigen-video-prompt-card small,
.aigen-video-prompt-card span {
  color: rgba(205, 228, 236, .7);
  font-size: 11px;
  line-height: 1.45;
}

.aigen-video-source-card:hover,
.aigen-digital-card-choice:hover,
.aigen-video-prompt-card:hover,
.aigen-video-source-card.active,
.aigen-digital-card-choice.active,
.aigen-video-prompt-card.active {
  border-color: rgba(126, 230, 255, .9);
  background:
    linear-gradient(180deg, rgba(8, 73, 89, .96), rgba(3, 31, 43, .98));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .08),
    0 0 0 2px rgba(89, 210, 239, .24),
    0 18px 34px rgba(0, 0, 0, .24);
}

/* 画布R9 (2026-07-05) F4: 07/08 候选图选中态 .on(平台选中态铁律)——旧 .active 与 :hover 同款, 点选时鼠标正悬停其上,
   视觉上"点了没反应"。.on 用更强的边框高亮+底色加深+选中角标, 与 hover 明确区分; 再点同一张=取消选中(JS 侧)。 */
.aigen-video-source-card.on {
  border-color: rgba(126, 230, 255, 1);
  background: linear-gradient(180deg, rgba(10, 96, 118, .98), rgba(4, 42, 58, 1));
  box-shadow:
    inset 0 0 0 2px rgba(126, 230, 255, .55),
    0 0 0 3px rgba(89, 210, 239, .38),
    0 18px 34px rgba(0, 0, 0, .3);
  position: relative;
}

.aigen-video-source-card.on::after {
  content: "已选";
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(126, 230, 255, .92);
  color: #04222f;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.4;
}

.aigen-digital-card-choice span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(151, 215, 229, .16);
  color: rgba(239, 253, 255, .94);
  font-weight: 800;
}

.aigen-graphic-chat-panel {
  display: grid;
  gap: 12px;
}

.aigen-graphic-chat-panel textarea {
  min-height: 126px;
  padding: 12px;
  line-height: 1.55;
}

.aigen-graphic-workbench,
.aigen-video-description-workbench,
.aigen-video-generate-panel {
  display: grid;
  gap: 14px;
}

.aigen-node-inline-head {
  display: flex;
  justify-content: flex-end;
  min-height: 32px;
}

.aigen-graphic-control-row,
.aigen-video-preset-row,
.aigen-video-generate-settings {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, .72fr);
  gap: 12px;
  align-items: end;
}

.aigen-video-generate-settings {
  grid-template-columns: minmax(0, 1fr) 160px;
}

.aigen-control-field,
.aigen-textarea-block {
  display: grid;
  gap: 7px;
  min-width: 0;
  margin: 0;
  color: rgba(229, 246, 250, .84);
  font-size: 12px;
  font-weight: 700;
}

.aigen-control-field select,
.aigen-control-field input {
  width: 100%;
  height: 40px;
}

/* R5 NY-10: keep the native value carrier in the 14 video node at the
   measured field size; the rest of the node form keeps its own columns. */
@media (min-width: 761px) {
  .aigen-video-generate-settings #aiGenVideoRoute {
    width: min(404px, 100%);
    height: 63px;
  }
}

.aigen-textarea-block > span {
  color: rgba(229, 246, 250, .84);
  font-size: 12px;
  font-weight: 800;
}

.aigen-textarea-block textarea {
  width: 100%;
  resize: vertical;
  line-height: 1.58;
}

.aigen-graphic-input-block textarea {
  min-height: 160px;
}

.aigen-graphic-output-block textarea {
  min-height: 280px;
}

.aigen-video-prompt-main textarea {
  min-height: 240px;
}

.aigen-preset-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "label label"
    "title hint";
  gap: 2px 8px;
  min-height: 40px;
  padding: 8px 10px;
  text-align: left;
}

.aigen-preset-button span {
  grid-area: label;
  color: rgba(203, 228, 236, .72);
  font-size: 11px;
}

.aigen-preset-button strong {
  grid-area: title;
  overflow: hidden;
  color: rgba(245, 253, 255, .94);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aigen-preset-button small {
  grid-area: hint;
  color: rgba(117, 220, 248, .86);
  font-size: 11px;
  white-space: nowrap;
}

.aigen-preset-more-button {
  min-height: 40px;
  padding-inline: 16px;
  white-space: nowrap;
}

.aigen-video-prompt-picker {
  display: none;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  max-height: 260px;
  overflow: auto;
  padding: 8px;
  border: 1px solid rgba(100, 184, 214, .24);
  border-radius: 8px;
  background: rgba(3, 18, 27, .42);
}

.aigen-video-prompt-picker.open {
  display: grid;
}

.aigen-video-description-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-top: 10px;
}

.aigen-video-description-actions [data-aigen-node-config-confirm] {
  grid-column: 2;
  min-width: 92px;
}

.aigen-video-description-actions [data-aigen-node-config-close] {
  grid-column: 3;
  justify-self: end;
  min-width: 72px;
}

.aigen-graphic-chat-actions,
.aigen-video-generate-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}

.aigen-graphic-chat-actions {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
}

.aigen-video-generate-actions {
  justify-content: center;
}

.aigen-video-generate-actions .primary {
  min-width: 148px;
}

.aigen-video-generate-note {
  min-height: 44px;
  padding: 12px;
  border: 1px dashed rgba(110, 196, 223, .34);
  border-radius: 8px;
  background: rgba(5, 22, 33, .62);
  color: rgba(209, 232, 239, .76);
  font-size: 12px;
  line-height: 1.55;
}

@media (min-width: 761px) and (max-width: 1280px) {
  .aigen-remodel-workflow .aigen-flow-node[data-aigen-node="material"] {
    left: 24px !important;
    top: 38px !important;
    width: 250px !important;
    min-height: 215px !important;
  }

  .aigen-remodel-workflow .aigen-flow-node[data-aigen-node="person_pet"] { left: 312px !important; top: 38px !important; }
  .aigen-remodel-workflow .aigen-flow-node[data-aigen-node="lens"] { left: 456px !important; top: 38px !important; }
  .aigen-remodel-workflow .aigen-flow-node[data-aigen-node="style_ref"] { left: 600px !important; top: 38px !important; }

  .aigen-remodel-workflow .aigen-flow-node.image-settings {
    left: 362px !important;
    top: 190px !important;
    width: 300px;
  }

  .aigen-remodel-workflow .aigen-flow-node.image-browser {
    left: 64px !important;
    top: 344px !important;
    width: 375px;
  }

  .aigen-remodel-workflow .aigen-flow-node[data-aigen-node="video_image"] { top: 595px !important; }
  .aigen-remodel-workflow .aigen-flow-node[data-aigen-node="video_first_last"] { top: 595px !important; }
  .aigen-remodel-workflow .aigen-flow-node.graphic-understanding { top: 699px !important; }
  .aigen-remodel-workflow .aigen-flow-node.video-desc { top: 699px !important; }
  .aigen-remodel-workflow .aigen-flow-node[data-aigen-node="video_quality"] { top: 666px !important; }
  .aigen-remodel-workflow .aigen-flow-node[data-aigen-node="video_ratio"] { top: 732px !important; }
  .aigen-remodel-workflow .aigen-flow-node[data-aigen-node="video_subject"] { top: 797px !important; }
  .aigen-remodel-workflow .aigen-flow-node.video-generate { top: 884px !important; }

  .aigen-base-material-preview {
    min-height: 142px;
    grid-template-rows: minmax(104px, 1fr) auto;
  }

  .aigen-base-material-preview img,
  .aigen-base-material-preview b {
    min-height: 104px;
  }
}

@media (max-width: 760px) {
  .aigen-material-modal-filters {
    grid-template-columns: 1fr;
  }

  .aigen-generation-settings-grid,
  .aigen-output-library-filters {
    grid-template-columns: 1fr;
  }

  .aigen-graphic-control-row,
  .aigen-video-preset-row,
  .aigen-video-generate-settings {
    grid-template-columns: 1fr;
  }

  .aigen-output-preview-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== AI设计师P0(2026-07-04): 14 真实视频任务卡三态(生成中/成片/失败) ===== */
.aigen-video-card video {
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: min(60vh, 480px);
  display: block;
  border-radius: 6px;
  background: #0b2633;
  object-fit: contain;
}

.aigen-video-thumb.is-generating {
  color: #8a6d1f;
  background:
    repeating-linear-gradient(135deg, rgba(197, 160, 58, 0.12) 0 8px, rgba(255, 255, 255, 0.78) 8px 16px);
}

.aigen-video-thumb.is-failed {
  color: #9c3b31;
  background:
    repeating-linear-gradient(135deg, rgba(156, 59, 49, 0.1) 0 8px, rgba(255, 255, 255, 0.78) 8px 16px);
}

.aigen-video-card[data-aigen-video-task-status="failed"] small {
  color: #9c3b31;
}

/* ===== 生图画布重构B1(2026-07-04, Q1-Q12) Q1-C: 01 素材语义槽(结构锚/基图/风格/材质, 选中态 .on 加深) ===== */
.aigen-semantic-slot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

.aigen-semantic-slot-label {
  color: rgba(218, 238, 245, .72);
  font-size: 12px;
}

.aigen-semantic-slot-empty {
  color: rgba(221, 240, 246, .58);
  font-size: 11px;
  line-height: 1.5;
}

.aigen-semantic-slot-choice {
  padding: 4px 10px;
  border: 1px solid rgba(105, 185, 210, .38);
  border-radius: 999px;
  background: rgba(6, 26, 38, .82);
  color: rgba(218, 238, 245, .82);
  font-size: 12px;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}

.aigen-semantic-slot-choice:hover {
  border-color: rgba(111, 203, 229, .66);
}

.aigen-semantic-slot-choice.on,
.aigen-semantic-slot-choice.active {
  background: rgba(28, 96, 128, .92);
  border-color: rgba(126, 216, 240, .92);
  color: #eafcff;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(126, 216, 240, .38);
}

/* ===== 生图画布重构B1(2026-07-04) Q7/Q8: 05 空间/用途下拉 + 数量排队小注 ===== */
.aigen-count-queue-note,
.aigen-video-count-note {
  display: block;
  margin-top: 3px;
  color: rgba(245, 221, 151, .78);
  font-size: 11px;
  line-height: 1.4;
}

/* ===== 生图画布重构B1(2026-07-04) Q12-A: 06 成品图卡"送素材大库"按钮 + 入库弹窗 ===== */
.aigen-output-send-reflib {
  margin-top: 4px;
}

.aigen-output-send-reflib.is-sent,
.aigen-output-send-reflib.on {
  background: rgba(30, 92, 74, .88);
  border-color: rgba(112, 214, 178, .78);
  color: #dcfff2;
  cursor: default;
}

.aigen-reflib-send-modal .aigen-output-detail-card {
  width: min(460px, calc(100vw - 36px));
  grid-template-rows: none;
}

.aigen-reflib-send-modal .aigen-control-field {
  display: grid;
  gap: 4px;
  color: rgba(218, 238, 245, .82);
  font-size: 12px;
}

.aigen-reflib-send-modal select {
  width: 100%;
}

.aigen-reflib-send-hint {
  margin: 0;
  color: rgba(221, 240, 246, .68);
  font-size: 12px;
  line-height: 1.55;
}

/* ========== AI设计辅助最小真化B2(2026-07-04, Q5-C): 生成候选区(不自动定稿, [采用]才入库) ========== */
.ai-assist-candidate-strip { margin-top: 12px; padding: 10px 12px; border: 1px solid rgba(61, 111, 143, .38); border-radius: 10px; background: rgba(61, 111, 143, .10); }
.ai-assist-candidate-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.ai-assist-candidate-card { width: 172px; display: flex; flex-direction: column; gap: 4px; padding: 8px; border-radius: 8px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .14); }
/* AI设计辅助审计修R1(2026-07-06) D17: 9:16 竖图被 92px 定高+cover 裁成横条(候选决策依据失真) → contain 完整显示留边不裁, 与 R9 F3 同口径; D18 缩略图可点开详情 */
.ai-assist-candidate-thumb { display: block; height: 128px; border-radius: 6px; overflow: hidden; background: rgba(0, 0, 0, .35); text-align: center; line-height: 128px; cursor: zoom-in; }
.ai-assist-candidate-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.ai-assist-candidate-card strong { font-size: 12px; line-height: 1.35; }
.ai-assist-candidate-card small { opacity: .68; font-size: 11px; word-break: break-all; }
.ai-assist-candidate-actions { display: flex; gap: 6px; }
/* AI设计辅助审计修R1(2026-07-06) D18: 候选卡新增[详情]后三键 172px 卡内换行竖排——压紧内边距+禁换行 */
.ai-assist-candidate-actions button { white-space: nowrap; padding: 4px 8px; }
.ai-assist-honest-note { font-size: 12px; opacity: .78; margin-right: auto; line-height: 1.45; max-width: 62%; }

/* AI辅助批2前端接线(2026-07-06) D10: 候选区"从服务端查回"入口/加载态/失败提示(可见, 非假按钮) */
.ai-assist-candidate-recall { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.ai-assist-candidate-recall-status { font-size: 12px; opacity: .82; }
.ai-assist-candidate-recall-error { font-size: 12px; color: #ffb4a8; flex-basis: 100%; line-height: 1.4; }
.ai-assist-candidate-card-server { border-color: rgba(120, 190, 160, .5); background: rgba(80, 150, 120, .12); }

/* AI辅助批2前端接线(2026-07-06) refHint 前端可读: 提示词摘要里参考图各 kind 各自标签行, 不混成一行 */
.ai-assist-ref-hint-summary { margin: 8px 0; padding: 8px 12px; border: 1px solid rgba(105, 185, 210, .3); border-radius: 10px; background: rgba(6, 26, 38, .45); display: grid; gap: 6px; }
.ai-assist-ref-hint-summary > strong { font-size: 12px; opacity: .9; }
.ai-assist-ref-hint-row { display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 8px; row-gap: 2px; }
.ai-assist-ref-hint-label { font-size: 12px; font-weight: 600; color: rgba(150, 220, 245, .96); white-space: nowrap; }
.ai-assist-ref-hint-items { font-size: 12px; opacity: .92; overflow-wrap: anywhere; }
.ai-assist-ref-hint-note { grid-column: 1 / -1; font-size: 11px; opacity: .66; line-height: 1.4; }

/* ===== D16 意图结构(2026-07-06): 本次意图白话摘要 + 降级提示 + 可覆盖控件(内部码不露, 只显白话) ===== */
.ai-assist-intent-summary { margin: 8px 0; padding: 9px 12px; border: 1px solid rgba(120, 205, 170, .34); border-radius: 10px; background: rgba(8, 32, 26, .42); display: grid; gap: 6px; }
.ai-assist-intent-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; font-size: 12px; line-height: 1.5; }
.ai-assist-intent-line > strong { font-size: 12px; color: rgba(160, 235, 200, .96); }
.ai-assist-intent-chip { font-weight: 600; color: rgba(180, 240, 210, .98); padding: 1px 8px; border: 1px solid rgba(120, 205, 170, .4); border-radius: 999px; }
.ai-assist-intent-seg { opacity: .92; overflow-wrap: anywhere; }
.ai-assist-intent-degrade { font-size: 11.5px; line-height: 1.45; color: rgba(255, 214, 150, .95); padding: 3px 8px; border-left: 2px solid rgba(240, 180, 90, .7); background: rgba(60, 42, 12, .38); border-radius: 4px; }
.ai-assist-intent-overrides { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 4px 0 8px; padding: 6px 10px; border: 1px dashed rgba(120, 205, 170, .3); border-radius: 9px; }
.ai-assist-intent-overrides > span { font-size: 11.5px; opacity: .8; }
.ai-assist-intent-overrides label { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; opacity: .92; }
.ai-assist-intent-overrides select, .ai-assist-intent-overrides input { font-size: 11.5px; padding: 2px 6px; border-radius: 6px; }
.ai-assist-intent-override-clear { font-size: 11px; }
.ai-assist-intent-confirm-body { margin: 6px 0 2px; }
.ai-assist-intent-confirm-body .ai-assist-intent-summary { margin: 0; }
@media (max-width: 640px) {
  .ai-assist-intent-line { gap: 4px 8px; }
  .ai-assist-intent-overrides { flex-direction: column; align-items: stretch; }
}

/* B2 收尾优化点#1(视觉复核发现, 非本批引入): 输出库卡 small(长路径行)落进 auto 列把 strong 挤成一字一行竖排——small 改整行, 标题恢复横排 */
.ai-assist-output-item strong { min-width: 0; overflow-wrap: anywhere; }
.ai-assist-output-item small { grid-column: 1 / -1; min-width: 0; overflow-wrap: anywhere; }

/* ===== B3(2026-07-04) 场景预设一键填(B1 回传优化点#2, 酷家乐式场景入口): 画布顶部预设条, 选中态 .on ===== */
.aigen-scene-preset-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  padding: 8px 12px;
  border: 1px solid rgba(105, 185, 210, .28);
  border-radius: 10px;
  background: rgba(6, 26, 38, .55);
}

.aigen-scene-preset-label {
  color: rgba(218, 238, 245, .72);
  font-size: 12px;
}

.aigen-scene-preset-choice {
  padding: 5px 12px;
  border: 1px solid rgba(105, 185, 210, .38);
  border-radius: 999px;
  background: rgba(6, 26, 38, .82);
  color: rgba(218, 238, 245, .85);
  font-size: 12px;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}

.aigen-scene-preset-choice:hover {
  border-color: rgba(111, 203, 229, .66);
}

.aigen-scene-preset-choice.on {
  background: rgba(28, 96, 128, .92);
  border-color: rgba(126, 216, 240, .92);
  color: #eafcff;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(126, 216, 240, .38);
}

.aigen-scene-preset-note {
  color: rgba(221, 240, 246, .55);
  font-size: 11px;
  line-height: 1.5;
}

@media (max-width: 760px) {
  .aigen-scene-preset-bar { padding: 8px 10px; }
  .aigen-scene-preset-note { flex-basis: 100%; }
}

/* ========== B4反推修复(2026-07-04) P1-P3: 交付出口/费用预估/标注确认层 ========== */
.aigen-output-detail-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-top: 10px;
}

.aigen-library-card-actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.aigen-library-card-actions .ghost.small {
  font-size: 11px;
  padding: 2px 8px;
}

.aigen-video-card-actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.aigen-video-card-actions .ghost.small {
  font-size: 11px;
  padding: 2px 8px;
}

.aigen-video-delivery-note {
  display: block;
  margin-top: 4px;
  color: rgba(221, 240, 246, .55);
  font-size: 11px;
  line-height: 1.5;
}

.aigen-fee-estimate {
  display: block;
  margin: 6px 0;
  color: rgba(255, 214, 140, .85);
  font-size: 11px;
  line-height: 1.6;
}

.aigen-video-generate-actions .aigen-fee-estimate { flex-basis: 100%; }

.aigen-video-generate-actions [data-aigen-video-confirm-generate][disabled] {
  opacity: .55;
  cursor: not-allowed;
}

/* P3/D12 上送前预览确认层: 把"将发送的标注说明"亮给用户, 确认才扣费 */
.ai-assist-annotation-confirm {
  position: fixed;
  inset: 0;
  /* AI设计辅助审计修R1(2026-07-06) D18伴生发现: 09_global_tech_glass_sync 把 .ai-assist-modal 抬到 2147483000(!important),
     旧 2600 的确认层/详情层实际被节点模态盖住(DOM 在、画不出来, B4 标注确认层同病)——抬到模态之上、侧栏(2147483600)之下 */
  z-index: 2147483100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 14, 20, .62);
  backdrop-filter: blur(3px);
}

.ai-assist-annotation-confirm-card {
  width: min(560px, calc(100vw - 32px));
  max-height: 78vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  border-radius: 14px;
  border: 1px solid rgba(126, 216, 240, .35);
  background: rgba(10, 28, 38, .97);
  color: #eafcff;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .5);
}

.ai-assist-annotation-confirm-card small { color: rgba(221, 240, 246, .65); }

.ai-assist-annotation-confirm-card pre {
  margin: 0;
  padding: 12px;
  border-radius: 10px;
  background: rgba(6, 18, 26, .9);
  border: 1px solid rgba(126, 216, 240, .18);
  color: #d8f6ff;
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-all;
}

.ai-assist-annotation-confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

@media (max-width: 760px) {
  .ai-assist-annotation-confirm-card { padding: 14px; }
  .aigen-output-detail-actions { justify-content: stretch; }
  .aigen-output-detail-actions .btn { flex: 1; }
}

/* API R8(2026-07-05) T3: 05/14 路线下拉小字——节点改选=会话覆盖, 长期默认指路系统设置 */
.aigen-route-pref-note {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: rgba(148, 163, 184, .92);
  line-height: 1.5;
}

/* ========== AI设计辅助审计修R1(2026-07-06) 新增样式 ========== */
/* D5/D15 诚实化小注(数量固定1张/清晰度未接线) */
.ai-assist-param-note {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: rgba(148, 163, 184, .92);
  line-height: 1.5;
}

/* D6: 上游已选卡只读提示条(不再写回补充描述输入框) */
.ai-assist-hint-strip {
  margin: 8px 0 2px;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px dashed rgba(126, 216, 240, .35);
  background: rgba(61, 111, 143, .12);
  color: rgba(221, 240, 246, .82);
  font-size: 12px;
  line-height: 1.6;
}

/* D7: 07A/07B 参考类型二选一(风格/材质) */
.ai-assist-ref-kind {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(221, 240, 246, .82);
  white-space: nowrap;
}
.ai-assist-ref-kind select { min-width: 96px; }

/* D18: 候选详情弹层(复用标注确认层底座), 大图 contain 完整显示 */
.ai-assist-candidate-detail-card { width: min(640px, calc(100vw - 32px)); }
.ai-assist-candidate-detail-image {
  border-radius: 10px;
  overflow: hidden;
  background: rgba(0, 0, 0, .4);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ai-assist-candidate-detail-image img {
  max-width: 100%;
  max-height: 46vh;
  object-fit: contain;
  display: block;
}
.ai-assist-candidate-detail-row { display: flex; flex-direction: column; gap: 4px; }
.ai-assist-candidate-detail-row pre {
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, .28);
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
  line-height: 1.6;
  color: rgba(234, 252, 255, .92);
}
.ai-assist-candidate-detail-row span { font-size: 12px; color: rgba(221, 240, 246, .82); line-height: 1.6; }

/* ============================================================================
 AIGEN-CANVAS-UX-1234(2026-07-10): 06 画布画板手感补齐样式
   #2 坏图兜底占位 / #3 大图查看器(翻页/滤带/并排比对) / #4 标注触屏
   轻奢暗色, 沿用 06 既有 teal/cyan 语汇, 间距留呼吸感。
   ============================================================================ */

/* #4: 标注画布触屏拖拽不被页面滚动抢走(pointer 事件 + touch-action) */
.ai-assist-annotator-canvas { touch-action: none; }

/* #2: 远程图失效时的占位框(替代裸破图标) */
.aigen-img-broken {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 40px;
  width: 100%;
  height: 100%;
  padding: 8px 10px;
  box-sizing: border-box;
  border: 1px dashed rgba(120, 190, 214, .42);
  border-radius: 8px;
  background: rgba(6, 24, 34, .8);
  color: rgba(180, 210, 222, .72);
  font-size: 11px;
  line-height: 1.4;
  text-align: center;
}

/* #3: 大图查看器舞台 + 上/下一张按钮 */
.aigen-output-detail-stage {
  position: relative;
  min-height: 260px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(105, 185, 210, .34);
  border-radius: 8px;
  background: rgba(4, 18, 28, .92);
}
.aigen-output-detail-stage .aigen-output-detail-media {
  border: none;
  background: transparent;
  min-height: 0;
  width: 100%;
}
.aigen-detail-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 40px;
  height: 56px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(126, 214, 240, .5);
  border-radius: 9px;
  background: rgba(4, 20, 30, .72);
  backdrop-filter: blur(4px);
  color: rgba(238, 250, 255, .94);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.aigen-detail-nav-btn:hover { background: rgba(14, 74, 92, .92); border-color: rgba(150, 235, 255, .95); }
.aigen-detail-nav-btn[data-aigen-detail-prev] { left: 10px; }
.aigen-detail-nav-btn[data-aigen-detail-next] { right: 10px; }

/* AIGEN-DETAIL-ZOOM #3(2026-07-10): 大图放大看细节——滚轮/点击缩放 + 拖动平移, 交互专业克制 */
[data-aigen-detail-zoom-img] {
  cursor: zoom-in;
  transform-origin: 0 0;
  will-change: transform;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  touch-action: none;
}
.aigen-output-detail-media.is-zoomed { cursor: grab; }
.aigen-output-detail-media.is-zoomed [data-aigen-detail-zoom-img] { cursor: grab; }
.aigen-output-detail-media.is-panning,
.aigen-output-detail-media.is-panning [data-aigen-detail-zoom-img] { cursor: grabbing; }
.aigen-output-detail-media.is-panning [data-aigen-detail-zoom-img] { transition: none !important; }
.aigen-detail-zoom-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 4;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .03em;
  color: rgba(160, 230, 248, .96);
  background: rgba(4, 20, 30, .74);
  border: 1px solid rgba(126, 214, 240, .5);
  backdrop-filter: blur(4px);
  pointer-events: none;
  user-select: none;
}
.aigen-detail-zoom-badge[hidden] { display: none; }

.aigen-detail-head-tools { display: flex; align-items: center; gap: 10px; }
.aigen-detail-counter {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  color: rgba(150, 224, 244, .9);
  padding: 2px 8px;
  border: 1px solid rgba(120, 200, 224, .34);
  border-radius: 999px;
  background: rgba(6, 28, 40, .7);
}
.aigen-detail-head-tools .ghost.small.is-active {
  border-color: rgba(150, 235, 255, .95);
  background: rgba(14, 74, 92, .92);
  color: rgba(240, 252, 255, .96);
}

/* #3: 底部候选滤带(缩略图 + 当前高亮), 点选跳图 */
.aigen-detail-filmstrip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 2px;
  scrollbar-width: thin;
}
.aigen-detail-film-thumb {
  flex: 0 0 auto;
  width: 62px;
  height: 62px;
  padding: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(105, 185, 210, .32);
  border-radius: 8px;
  background: rgba(4, 18, 28, .9);
  color: rgba(180, 210, 222, .7);
  cursor: pointer;
  transition: border-color .15s ease, transform .12s ease;
}
.aigen-detail-film-thumb img { width: 100%; height: 100%; object-fit: cover; }
.aigen-detail-film-thumb:hover { border-color: rgba(140, 220, 244, .8); transform: translateY(-1px); }
.aigen-detail-film-thumb.is-current { border-color: rgba(150, 235, 255, .98); box-shadow: 0 0 0 2px rgba(126, 214, 240, .32); }

/* #3: 并排比对网格(组内最多 4 张同屏, 点选看大图) */
.aigen-detail-compare-grid {
  display: grid;
  gap: 10px;
  width: 100%;
  padding: 8px;
  box-sizing: border-box;
}
.aigen-detail-compare-grid[data-count="1"] { grid-template-columns: 1fr; }
.aigen-detail-compare-grid[data-count="2"] { grid-template-columns: repeat(2, 1fr); }
.aigen-detail-compare-grid[data-count="3"] { grid-template-columns: repeat(3, 1fr); }
.aigen-detail-compare-grid[data-count="4"] { grid-template-columns: repeat(2, 1fr); }
.aigen-detail-compare-cell {
  position: relative;
  padding: 0;
  min-height: 180px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(105, 185, 210, .34);
  border-radius: 9px;
  background: rgba(4, 18, 28, .92);
  color: rgba(180, 210, 222, .72);
  cursor: zoom-in;
  transition: border-color .15s ease;
}
.aigen-detail-compare-cell img { width: 100%; max-height: 46vh; object-fit: contain; }
.aigen-detail-compare-cell:hover { border-color: rgba(140, 220, 244, .82); }
.aigen-detail-compare-cell.is-current { border-color: rgba(150, 235, 255, .98); box-shadow: 0 0 0 2px rgba(126, 214, 240, .3); }
.aigen-detail-compare-cell em {
  position: absolute;
  top: 6px;
  left: 6px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(4, 20, 30, .82);
  border: 1px solid rgba(126, 214, 240, .5);
  color: rgba(238, 250, 255, .94);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

@media (max-width: 720px) {
  .aigen-detail-compare-grid[data-count="3"],
  .aigen-detail-compare-grid[data-count="4"] { grid-template-columns: repeat(2, 1fr); }
  .aigen-detail-nav-btn { width: 34px; height: 46px; font-size: 22px; }
}

/* ============================================================
 文字标注深化(2026-07-10): 自由文字标签
   text marker 去红 pin, 改细底框纯文字标签(轻奢克制):
   deep 深墨底白字 / light 白米底墨字 / gold 金字金框强调; 小中大三字号。
   仅作用于 .ai-assist-marker-text —— box/arrow 编号红 pin 与红框一个不动。
   ============================================================ */
/* 文字标签本体可交互(拖动重定位/双击改字); box/arrow 仍只在选择态可点 */
.ai-assist-marker.ai-assist-marker-text { pointer-events: auto; cursor: grab; }
.ai-assist-marker.ai-assist-marker-text.is-selected { cursor: grabbing; }
.ai-assist-marker-text { background: none; border: 0; box-shadow: none; }
/* em 由"偏移小标签(红框)"改为"就在锚点的文字标签本体"——覆盖 .ai-assist-marker em 的绝对偏移/红框 */
.ai-assist-marker-text em {
  position: static;
  left: auto; top: auto;
  min-width: 0; max-width: 260px;
  display: inline-block;
  border: 0;
  border-radius: 8px;
  padding: 4px 10px;
  line-height: 1.35;
  font-style: normal;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  backdrop-filter: blur(2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
}
/* 三档配色(圆角+半透, 背景花也读得清) */
.ai-assist-text-deep em { background: rgba(20, 26, 34, .82); color: #f5f7f9; }
.ai-assist-text-light em { background: rgba(248, 247, 243, .9); color: #171e27; }
.ai-assist-text-gold em { background: rgba(42, 33, 19, .62); color: #e0a25a; border: 1px solid rgba(224, 162, 90, .6); }
/* 三档字号 */
.ai-assist-text-s em { font-size: 12px; }
.ai-assist-text-m em { font-size: 15px; }
.ai-assist-text-l em { font-size: 19px; font-weight: 600; }
/* 选中态: teal 细描边(与既有选中语言一致, 克制) */
.ai-assist-marker-text.is-selected em { outline: 2px solid rgba(126, 230, 255, .9); outline-offset: 2px; }

/* 工具条: 配色 swatch + 字号选择器(小巧不突兀, 与工具按钮同高) */
.ai-assist-text-style {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(7, 31, 42, .55);
  border: 1px solid rgba(99, 176, 202, .28);
}
.ai-assist-text-style-sep {
  width: 1px;
  height: 18px;
  margin: 0 2px;
  background: rgba(126, 230, 255, .28);
}
.ai-assist-annotation-toolbar .ai-assist-text-style button {
  min-height: 26px;
  min-width: 30px;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 13px;
}
/* swatch 小色片: 深/浅/金各自底色暗示, 一眼可辨 */
.ai-assist-annotation-toolbar .ai-assist-sw.sw-deep { background: rgba(20, 26, 34, .92); color: #f5f7f9; border-color: rgba(160, 174, 188, .5); }
.ai-assist-annotation-toolbar .ai-assist-sw.sw-light { background: rgba(248, 247, 243, .92); color: #171e27; border-color: rgba(180, 176, 166, .6); }
.ai-assist-annotation-toolbar .ai-assist-sw.sw-gold { background: rgba(42, 33, 19, .82); color: #e0a25a; border-color: rgba(224, 162, 90, .5); }
/* 选中态: teal 描边(克制, 与画布选中语言一致) */
.ai-assist-annotation-toolbar .ai-assist-text-style button.on {
  outline: 2px solid rgba(126, 230, 255, .95);
  outline-offset: 1px;
  border-color: rgba(126, 230, 255, .95);
}

/* ===== NIGHT-CONTRAST-FIX-20260725 · 清单#4/#5 AI设计师图片库/视频库白块夜间覆盖段 =====
   #4 .aigen-video-thumb(含 .is-generating/.is-failed)：深卡里嵌白斜纹块，"待生成"#2f7c67 几乎不可读。
      同一声明块还带 .aigen-library-thumb(无图占位时同样是白斜纹)，一并翻夜色。
   #5 .aigen-library-empty(#fbfdfc 白块，像素中位亮度 0.978) / .aigen-library-pill(同型)。
   夜间 = 默认态，用 html:not([data-meifan-theme="day"]) 兜住"未写 attr"与"tech-glass-blue"；
   白天分支不匹配 → 上方白天规则原样保留，零改动。
   加 !important 是因为本分片(06)排在 09 全局夜间清单之前，需盖住 09 的 !important 兜底。 */
html:not([data-meifan-theme="day"]) body:not(.home-mode) .aigen-library-thumb,
html:not([data-meifan-theme="day"]) body:not(.home-mode) .aigen-video-thumb {
  color: #7ce6b6 !important;
  background:
    repeating-linear-gradient(135deg, rgba(112, 224, 173, 0.10) 0 8px, rgba(6, 24, 37, 0.90) 8px 16px) !important;
}
html:not([data-meifan-theme="day"]) body:not(.home-mode) .aigen-video-thumb.is-generating {
  color: #f2c789 !important;
  background:
    repeating-linear-gradient(135deg, rgba(231, 180, 95, 0.14) 0 8px, rgba(6, 24, 37, 0.90) 8px 16px) !important;
}
html:not([data-meifan-theme="day"]) body:not(.home-mode) .aigen-video-thumb.is-failed {
  color: #ffa093 !important;
  background:
    repeating-linear-gradient(135deg, rgba(255, 156, 144, 0.12) 0 8px, rgba(6, 24, 37, 0.90) 8px 16px) !important;
}
html:not([data-meifan-theme="day"]) body:not(.home-mode) .aigen-library-empty {
  border-color: var(--mf-theme-line) !important;
  background: var(--mf-theme-card) !important;
  color: var(--mf-theme-muted) !important;
}
/* pill 在 #ai 内已被 09 夜间清单收编成玻璃卡；这里补的是 #ai 之外的同类节点，
   刻意沿用 09 的同款中性玻璃底，避免同一 class 出现两种夜间长相 */
html:not([data-meifan-theme="day"]) body:not(.home-mode) .aigen-library-pill {
  border-color: var(--mf-theme-line) !important;
  background: var(--mf-theme-card) !important;
  color: var(--mf-theme-ink) !important;
}

/* ══ 378(定稿 NY-10/11): 桌面主题浮层 + ≤640 底部抽屉 ══
   O75: 桌面浮层挂 body 并钳在视口内；原 select 保留作为选择与提交值载体。 */
.mf-ny-panel {
  position: fixed;
  z-index: 9101; /* 当前选择层高于全局 AI 悬浮球(9000) */
  box-sizing: border-box;
  width: 410px;
  max-width: calc(100vw - 16px);
  height: 409px;
  max-height: calc(100vh - 16px);
  overflow-y: auto;
  overflow-x: hidden;
  margin: 0;
  padding: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 8px;
  border: 1px solid rgba(119, 205, 229, .42);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(10, 35, 50, .98), rgba(3, 19, 29, .98));
  box-shadow: 0 18px 50px rgba(0, 0, 0, .42);
  color: #effcff;
  font-size: 13px;
}
.mf-ny-group { display: grid; gap: 4px; align-content: start; }
.mf-ny-recent { display: grid; gap: 4px; padding-bottom: 8px; border-bottom: 1px solid rgba(119, 205, 229, .25); }
.mf-ny-recent > small { color: #9fd8ec; font-size: 11px; padding-left: 4px; }
.mf-ny-group-title {
  font-size: 12px;
  color: #9fd8ec;
  padding: 2px 4px;
}
.mf-ny-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #effcff;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
button.mf-ny-item:hover,
button.mf-ny-item:focus-visible {
  background: rgba(61, 154, 196, .18);
  outline: none;
}
.mf-ny-item.is-selected {
  background: rgba(43, 127, 180, .32);
  border-color: rgba(119, 205, 229, .55);
}
.mf-ny-item-check { flex: 0 0 16px; width: 16px; color: #5eead4; }
.mf-ny-item-copy { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.mf-ny-item-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mf-ny-item-mobile-name { display: none; }
.mf-ny-item-sub { font-size: 11px; color: #a9d9ed; line-height: 1.35; }
.mf-ny-badge {
  flex: 0 0 auto;
  font-size: 11px;
  line-height: 1.5;
  padding: 0 6px;
  border-radius: 999px;
  border: 1px solid rgba(119, 205, 229, .5);
  color: #bfe9fb;
}
.mf-ny-badge-default { border-color: rgba(94, 234, 212, .6); color: #5eead4; }
.mf-ny-item-radio {
  flex: 0 0 12px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(159, 216, 236, .7);
}
.mf-ny-item.is-selected .mf-ny-item-radio { background: #5eead4; border-color: #5eead4; }
.mf-ny-item.is-disabled { opacity: .55; cursor: not-allowed; }
.mf-ny-reason {
  flex: 0 1 auto;
  font-size: 11px;
  color: #f0b56a;
  white-space: normal;
  text-align: right;
}
.mf-ny-empty { padding: 10px; color: #bfe9fb; font-size: 12px; }
.mf-ny-foot {
  font-size: 12px;
  color: #9fd8ec;
  padding: 6px 4px 0;
  border-top: 1px dashed rgba(119, 205, 229, .25);
}
/* ≤640 桌面浮层不出场(JS 同口径切抽屉), 双保险不叠层 */
@media (max-width: 640px) {
  .mf-ny-panel { display: none !important; }
}
/* UI-MODAL-CLOSE-BRAND-OVERLAP-1 v2: 模型下拉面板(桌面 .mf-ny-panel / ≤640 抽屉 .mf-ny-drawer + 遮罩)由 JS 挂在 body 下,
   z=9101/9100(围绕全局 AI 悬浮球 9000 定的)。非首页模式下弹层族被 GLOBAL-UI-SIDEBAR-MODAL-LAYER 抬到 --mf-layer-modal(2147483000)
   (<=980 再被 UI-MODAL v1 抬到 sidebar+2),面板整体落在弹层之下:选项中心 elementFromPoint 命中弹层内容、
   点击落在面板外 ⇒ JS 的『面板外 mousedown 收起』把面板关掉,选不了模型(V5 原生 N/95d0416c: local_image_route 弹层)。
   只在『有族内弹层打开』时抬:面板/抽屉 sidebar+6、抽屉遮罩 sidebar+5(须高于弹层 +2 与账号菜单配套 +3/+4;
   int 上限 2147483647,+6 仍在界内)。无弹层时不动——抽屉与侧栏导航带共存、遮罩留导航可见的设计保持不变;
   首页模式(body.home-mode)不受影响(该模式弹层仅 z1200,面板本就在其上)。仅直接挂 body 的实例(排除 72 分片 genbar 内的 absolute 版)。 */
body:not(.home-mode):has(:is(
  .project-create-modal,
    .project-message-center,
    .project-dashboard-upload-modal,
    .project-module-detail-modal,
    .project-task-list-modal,
    .construction-task-modal,
    .project-material-preview-modal,
    .project-edit-modal,
    .case-share-modal,
    .ai-assist-modal
):not(.hidden)) > .mf-ny-drawer-backdrop {
  z-index: calc(var(--mf-layer-sidebar) + 5) !important;
}
body:not(.home-mode):has(:is(
  .project-create-modal,
    .project-message-center,
    .project-dashboard-upload-modal,
    .project-module-detail-modal,
    .project-task-list-modal,
    .construction-task-modal,
    .project-material-preview-modal,
    .project-edit-modal,
    .case-share-modal,
    .ai-assist-modal
):not(.hidden)) > :is(.mf-ny-panel, .mf-ny-drawer) {
  z-index: calc(var(--mf-layer-sidebar) + 6) !important;
}
/* R5 NY-11: leave the 62px bottom navigation strip visible. The one-row
   drawer has a measured 273px frame; longer lists scroll in their own body. */
.mf-ny-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9100;
  background: rgba(1, 12, 19, .55);
}
.mf-ny-drawer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: max(var(--mf-ny-bottom-bar-height, 0px), env(safe-area-inset-bottom, 0px));
  top: auto;
  z-index: 9101;
  width: 100vw;
  max-width: 100vw;
  height: 273px;
  max-height: min(60vh, calc(100vh - var(--mf-nav-strip-bottom, 0px) - var(--mf-ny-bottom-bar-height, 0px) - 8px));
  min-height: 160px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  gap: 8px;
  padding: 12px 12px calc(20px + env(safe-area-inset-bottom, 0px));
  border: 1px solid rgba(119, 205, 229, .42);
  border-radius: 16px 16px 0 0;
  background: linear-gradient(180deg, rgba(10, 35, 50, .99), rgba(3, 19, 29, .99));
  box-shadow: 0 -18px 60px rgba(0, 0, 0, .5);
  color: #effcff;
  font-size: 13px;
}
.mf-ny-drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.mf-ny-drawer-head strong { font-size: 16px; color: #effcff; }
.mf-ny-drawer-head small { display: block; margin-top: 2px; font-size: 12px; color: #9fd8ec; }
.mf-ny-drawer-close {
  flex: 0 0 auto;
  min-width: 32px;
  min-height: 32px;
  border: 1px solid rgba(119, 205, 229, .42);
  border-radius: 8px;
  background: transparent;
  color: #effcff;
  font-size: 16px;
  cursor: pointer;
}
.mf-ny-drawer-count { font-size: 12px; color: #9fd8ec; padding: 0 2px; }
.mf-ny-drawer-body {
  overflow: auto;
  display: grid;
  gap: 10px;
  align-content: start;
  padding-right: 2px;
}
.mf-ny-drawer .mf-ny-item {
  border-color: rgba(111, 190, 216, .34);
  background: rgba(12, 44, 63, .45);
  padding: 10px 12px;
}
.mf-ny-drawer .mf-ny-item.is-selected {
  border-color: rgba(94, 234, 212, .6);
  background: rgba(43, 127, 180, .38);
}
@media (max-width: 640px) {
  .mf-ny-item-name { display: none; }
  .mf-ny-item-mobile-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
/* NY-10/11: the shared model picker follows the day theme in every entry. */
html[data-meifan-theme="day"] .mf-ny-panel,
html[data-meifan-theme="day"] .mf-ny-drawer {
  background: #f7fbff;
  border-color: #8aa7c3;
  color: #16324f;
  box-shadow: 0 14px 32px rgba(30, 64, 95, .18);
}
html[data-meifan-theme="day"] .mf-ny-item,
html[data-meifan-theme="day"] .mf-ny-drawer-head strong,
html[data-meifan-theme="day"] .mf-ny-drawer-close { color: #16324f; }
html[data-meifan-theme="day"] .mf-ny-group-title,
html[data-meifan-theme="day"] .mf-ny-item-sub,
html[data-meifan-theme="day"] .mf-ny-foot,
html[data-meifan-theme="day"] .mf-ny-drawer-head small,
html[data-meifan-theme="day"] .mf-ny-drawer-count,
html[data-meifan-theme="day"] .mf-ny-drawer-foot,
html[data-meifan-theme="day"] .mf-ny-empty { color: #32536f; }
html[data-meifan-theme="day"] .mf-ny-recent > small { color: #32536f; }
html[data-meifan-theme="day"] .mf-ny-badge { color: #214e72; border-color: #7c9ebc; }
html[data-meifan-theme="day"] .mf-ny-reason { color: #7b3d10; }
html[data-meifan-theme="day"] .mf-ny-drawer .mf-ny-item { background: #fff; border-color: #afc5d8; }
html[data-meifan-theme="day"] .mf-ny-item.is-selected { background: #e4f0ff; border-color: #4c88c4; }
.mf-ny-drawer-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: #9fd8ec;
}
.mf-ny-drawer-foot a { color: #7dd3fc; }
.mf-ny-drawer-confirm {
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(180deg, #2f7fd9, #1f63c4);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}

/* Shared annotation host; geometry remains in the engine logical coordinate system. */
.ai-assist-annotator-canvas.ai-assist-shared-canvas{display:block;position:relative;width:100%;min-width:0;height:clamp(280px,52vh,600px);overflow:hidden;touch-action:none}
.ai-assist-shared-canvas .canvas-container{max-width:100%;max-height:100%}
.ai-assist-shared-comment-editor .ai-assist-marker-editor{position:static;display:flex;flex-wrap:wrap;gap:8px;width:100%;min-width:0;box-sizing:border-box;max-width:100%;margin-top:8px}
.ai-assist-shared-comment-editor input{min-width:0;flex:1 1 180px;max-width:100%}

/* AD-D01: inline image preparation / settings / results, native controls only. */
.aigen-product-shell.aigen-remodel-shell.aigen-has-d01{
  grid-template-areas:"project project" "d01nav d01nav" "stage right" "video video";
}
.aigen-d01-toolbar{grid-area:d01nav;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;min-width:0;margin:0 0 14px}
.aigen-d01-tabs{display:flex;align-items:center;flex-wrap:wrap;gap:5px}
.aigen-d01-tabs button{padding:8px 14px;border:1px solid transparent;border-radius:8px;background:transparent;color:var(--muted);font-weight:600}
.aigen-d01-tabs button[aria-pressed="true"]{color:var(--ink);background:color-mix(in srgb,var(--teal) 14%,var(--surface));border-color:color-mix(in srgb,var(--teal) 50%,var(--line))}
.aigen-d01-toolbar [data-aigen-d01-tools]{min-width:0;max-width:100%}
.aigen-d01-toolbar .aigen-canvas-topbar-row{margin:0;flex-wrap:wrap;gap:6px}
.aigen-d01-grid,.aigen-d01-pane{display:contents}
.aigen-d01-pane>h3,.aigen-d01-pane>details>summary,.aigen-d01-hero,.aigen-d01-status,.aigen-d01-actions{display:none}
.aigen-has-d01:not(.is-d01-image) .aigen-d01-pane>details{display:contents}
.aigen-product-shell.aigen-remodel-shell.is-d01-image{grid-template-columns:minmax(0,1fr);grid-template-areas:"project" "d01nav" "workspace";gap:0}
.is-d01-image>.aigen-product-stage-wrap,.is-d01-image>.aigen-video-library{display:none}
.is-d01-image>.aigen-canvas-project-bar{width:min(520px,100%);margin-bottom:14px}
.is-d01-image #aiGenNodeConfigModal{grid-area:workspace;position:static;inset:auto;display:block;padding:0;background:none;z-index:auto}
.is-d01-image .aigen-node-config-dialog{width:100%;max-width:none;max-height:none;margin:0;padding:0;border:0;background:none;box-shadow:none;overflow:visible}
.is-d01-image .aigen-node-config-head,.is-d01-image .aigen-node-config-actions{display:none}
.is-d01-image .aigen-node-config-body{display:block;max-height:none;padding:0;overflow:visible}
.is-d01-image .aigen-d01-grid{display:grid;grid-template-columns:minmax(210px,.8fr) minmax(290px,1fr) minmax(340px,1.4fr);align-items:start;gap:16px;min-width:0}
.is-d01-image .aigen-d01-pane{display:flex;flex-direction:column;gap:14px;min-width:0;max-height:min(82vh,1000px);overflow:auto;scrollbar-gutter:stable;padding:16px;border:1px solid var(--line);border-radius:10px;background:var(--surface)}
.is-d01-image .aigen-d01-pane>h3{display:block;margin:0;font-size:15px;line-height:1.5;font-weight:650;color:var(--ink)}
.is-d01-image .aigen-d01-pane details{border:0;border-top:1px solid var(--line);padding:12px 0 0;margin:0;min-width:0}
.is-d01-image .aigen-d01-pane summary{display:list-item;cursor:pointer;list-style-position:inside;padding:2px 0;color:var(--ink);font-size:13px;font-weight:600;line-height:1.6}
.is-d01-image .aigen-d01-pane details[open]>summary{margin-bottom:12px}
.is-d01-image .aigen-field-card{width:100%;min-width:0;padding:0;margin:0;border:0;border-radius:0;background:none;box-shadow:none}
.is-d01-image .aigen-field-card>.node-index,.is-d01-image .aigen-field-card>h3{display:none}
.is-d01-image .aigen-field-card label{font-size:12px;color:var(--muted);line-height:1.7}
.is-d01-image .aigen-field-card input,.is-d01-image .aigen-field-card select,.is-d01-image .aigen-field-card textarea{max-width:100%;min-width:0;box-sizing:border-box}
.is-d01-image .aigen-field-card select,.is-d01-image .aigen-field-card textarea{background:color-mix(in srgb,var(--surface) 92%,var(--bg));border:1px solid var(--line);border-radius:7px;color:var(--ink)}
.is-d01-image .aigen-base-material-preview{min-height:180px;aspect-ratio:4/3;overflow:hidden}
.is-d01-image .aigen-base-material-preview img{width:100%;height:100%;object-fit:contain}
.is-d01-image .aigen-d01-settings>h3{order:0}
.aigen-remodel-shell.is-d01-image .aigen-field-card[data-aigen-field-group="image_settings"]:not(.hidden){display:contents}
.is-d01-image .aigen-supplemental-prompt-label{order:1;display:grid;gap:7px;font-size:12px;color:var(--muted)}
.is-d01-image .aigen-supplemental-prompt-label textarea{width:100%;min-height:132px;resize:vertical;padding:12px;line-height:1.7}
.is-d01-image [data-aigen-d01-lens]{order:2}
.is-d01-image [data-aigen-d01-style]{order:3}
.is-d01-image [data-aigen-d01-more]{order:4}
.is-d01-image .aigen-generation-settings-grid{order:5;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.is-d01-image .aigen-generation-settings-grid label{display:grid;gap:5px;align-content:start}
.is-d01-image .aigen-generation-settings-grid select{width:100%;min-height:36px;padding:6px 8px}
.is-d01-image .aigen-generation-settings-grid label:has(#aiGenModelRoute){grid-column:1/-1}
.is-d01-image .aigen-route-pref-note,.is-d01-image .aigen-count-queue-note{font-size:11px;line-height:1.55;color:var(--muted)}
.is-d01-image [data-aigen-image-fee]{order:6;font-size:11px;color:var(--muted);line-height:1.6}
.is-d01-image .aigen-d01-status{order:7;display:block;min-height:22px;font-size:12px;line-height:1.6;color:var(--muted)}
.is-d01-image .aigen-d01-actions{order:8;display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.is-d01-image .aigen-d01-actions>[data-aigen-inline-generate]{order:-1;flex:1 1 100%;min-height:42px;padding:10px 16px;border:1px solid var(--r4-ui-accent,var(--teal));background:var(--r4-ui-accent,#1686ed);color:#fff;border-radius:8px;font-weight:650}
.is-d01-image .aigen-d01-actions>button.ghost{flex:1 1 auto;font-size:12px;padding:8px}
.is-d01-image .aigen-d01-hero{display:grid;position:relative;place-items:center;width:100%;min-height:240px;aspect-ratio:4/3;padding:0;overflow:hidden;border:1px solid var(--line);border-radius:8px;background:color-mix(in srgb,var(--bg) 60%,var(--surface));color:var(--muted)}
.is-d01-image .aigen-d01-hero img{width:100%;height:100%;object-fit:contain;position:absolute;inset:0}
.is-d01-image .aigen-d01-hero span{position:relative;max-width:100%;padding:10px;line-height:1.5;font-size:12px;overflow-wrap:anywhere}
.is-d01-image .aigen-d01-hero:not(:disabled) span{align-self:end;justify-self:stretch;text-align:left;background:color-mix(in srgb,var(--surface) 90%,transparent);color:var(--ink)}
.is-d01-image .aigen-output-preview-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
.is-d01-image .aigen-output-slot{min-width:0;min-height:80px;padding:5px;gap:5px;border-radius:6px}
.is-d01-image .aigen-output-slot>span{width:100%;height:66px;min-height:0;overflow:hidden}
.is-d01-image .aigen-output-slot>span img{width:100%;height:100%;object-fit:cover}
.is-d01-image .aigen-output-slot>strong{display:block;font-size:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.is-d01-image .aigen-output-slot button{font-size:10px;padding:4px;min-width:0;width:100%;white-space:normal}
.is-d01-image .aigen-output-actions{display:flex;flex-wrap:wrap;gap:6px}
.is-d01-image .aigen-output-actions button{font-size:11px;padding:6px 8px}
.is-d01-image .aigen-output-dropzone>p{font-size:11px;line-height:1.6;color:var(--muted)}
.is-d01-image .aigen-d01-gallery .aigen-product-right{display:block;width:100%;max-height:440px;overflow:auto;margin:0;padding:0;border:0;background:none}
.aigen-has-d01 button:focus-visible,.aigen-has-d01 summary:focus-visible,.aigen-has-d01 select:focus-visible,.aigen-has-d01 textarea:focus-visible{outline:2px solid var(--teal);outline-offset:3px}
@media(max-width:1120px){.is-d01-image .aigen-d01-grid{grid-template-columns:minmax(190px,.8fr) minmax(250px,1fr)}.is-d01-image .aigen-d01-results{grid-column:1/-1;max-height:none}.is-d01-image .aigen-d01-hero{max-height:480px}}
@media(max-width:740px){.is-d01-image .aigen-d01-grid{grid-template-columns:minmax(0,1fr)}.is-d01-image .aigen-d01-pane{max-height:none}.aigen-d01-toolbar{align-items:stretch}.is-d01-image .aigen-d01-hero{min-height:220px}}

/* AD-D02 SHELL-1: AI生图画布「视频生成」内联三区（视频素材｜视频描述｜生成设置）；结果区先沿用下方「该项目视频库」。
   特性开关 localStorage meifan_aigen_d02_shell_v1==="1" 才会出现 .is-d02-video（默认关）；样式并列 AD-D01 的 .is-d01-image，不改 D01 规则。 */
.aigen-product-shell.aigen-remodel-shell.is-d02-video{grid-template-columns:minmax(0,1fr);grid-template-areas:"project" "d01nav" "workspace" "right" "video";gap:0}
.is-d02-video>.aigen-product-stage-wrap{display:none}
.is-d02-video>.aigen-canvas-project-bar{width:min(520px,100%);margin-bottom:14px}
.is-d02-video #aiGenNodeConfigModal{grid-area:workspace;position:static;inset:auto;display:block;padding:0;background:none;z-index:auto;margin-bottom:16px}
/* 旧规则 .aigen-node-config-modal[data-aigen-selected-node="video_generate"] .aigen-node-config-dialog（特异性 0,3,0）把对话框锁在 min(820px,94vw)，这里要压过它才能铺满 */
.aigen-product-shell.is-d02-video .aigen-node-config-modal .aigen-node-config-dialog{width:100%;max-width:none;max-height:none;margin:0;padding:0;border:0;background:none;box-shadow:none;overflow:visible}
.is-d02-video .aigen-node-config-head,.is-d02-video .aigen-node-config-actions{display:none}
.is-d02-video .aigen-node-inline-head,.is-d02-video .aigen-video-description-actions{display:none}
.is-d02-video .aigen-graphic-control-row,.is-d02-video .aigen-video-preset-row,.is-d02-video .aigen-video-generate-settings{grid-template-columns:minmax(0,1fr)}
.is-d02-video .aigen-node-config-body{display:block;max-height:none;padding:0;overflow:visible}
.is-d02-video .aigen-d02-grid{display:grid;grid-template-columns:minmax(260px,1.2fr) minmax(300px,1.6fr) minmax(260px,.9fr);gap:16px;min-width:0}
.is-d02-video .aigen-d02-pane{display:flex;flex-direction:column;gap:14px;min-width:0;max-height:min(82vh,1000px);overflow:auto;padding:16px;border:1px solid var(--line);border-radius:10px;background:var(--surface)}
.is-d02-video .aigen-d02-tabs{display:flex;align-items:center;flex-wrap:wrap;gap:5px}
.is-d02-video .aigen-d02-tabs button{padding:8px 14px;font-weight:600}
/* 平台玻璃皮肤给所有按钮同一套 !important 底色边框，按下态要用更高特异性＋!important 才看得出来 */
.aigen-product-shell.is-d02-video #aiGenNodeConfigModal .aigen-d02-tabs button[aria-pressed="true"]{color:var(--ink)!important;background:color-mix(in srgb,var(--teal) 14%,var(--surface))!important;border-color:color-mix(in srgb,var(--teal) 50%,var(--line))!important}
.is-d02-video .aigen-field-card{width:100%;min-width:0;padding:0;margin:0;border:0;border-radius:0;background:none;box-shadow:none}
.is-d02-video .aigen-field-card>.node-index,.is-d02-video .aigen-field-card>h3{display:none}
/* 平台玻璃皮肤 body:not(.home-mode) #ai :is(button,label,article,details,…){background/box-shadow !important} 会给卡片与标签套嵌套大阴影；三区里只压这三类块（按钮仍沿用平台皮肤） */
.aigen-product-shell.is-d02-video #aiGenNodeConfigModal .aigen-d02-pane :is(.aigen-field-card,.aigen-control-field,.aigen-textarea-block){background:none!important;box-shadow:none!important}
.is-d02-video .aigen-d02-pane .aigen-field-card>p,.is-d02-video .aigen-d02-pane .aigen-card-picker-empty,.is-d02-video .aigen-d02-pane .aigen-video-generate-note{font-size:12px;line-height:1.7;color:var(--muted)}
.is-d02-video .aigen-d02-pane .aigen-card-picker-empty,.is-d02-video .aigen-d02-pane .aigen-video-generate-note{background:none;border:1px dashed var(--line);border-radius:8px;padding:10px 12px}
.is-d02-video .aigen-d02-pane a{color:var(--teal)}
.is-d02-video .aigen-d02-grid[data-d02-source="image"] [data-aigen-field-group="video_first_last"],.is-d02-video .aigen-d02-grid[data-d02-source="first_last"] [data-aigen-field-group="video_image"]{display:none}
@media(max-width:1120px){.is-d02-video .aigen-d02-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.is-d02-video .aigen-d02-settings{grid-column:1/-1;max-height:none}}
@media(max-width:740px){.is-d02-video .aigen-d02-grid{grid-template-columns:minmax(0,1fr)}.is-d02-video .aigen-d02-pane{max-height:none}}

/* AD-D03 SHELL-1: AI设计辅助页级「局部辅助｜全案辅助」页签；特性开关 localStorage meifan_aigen_d03_shell_v1==="1" 才会出现 data-d03-view（默认关）。 */
.ai-assist-workbench[data-d03-view="local"] .ai-assist-row-whole{display:none}
.ai-assist-workbench[data-d03-view="whole"] .ai-assist-row-local{display:none}
.ai-assist-d03-tabs button{min-height:36px;padding:8px 18px;font-weight:700}

/* AD-D03 STAGE-1: 局部优化舞台——节点弹窗 #aiAssistNodeModal 内联重挂进工作台（DOM 在两行之后，用 order 排到页签条与局部行之间）（现役 .ai-assist-modal 是 fixed 遮罩，且 local_edit 卡片宽度带 !important，要用 ID＋多类＋!important 压）。 */
.ai-assist-workbench[data-d03-stage="1"]>.ai-assist-project-bar{order:-3}
.ai-assist-workbench[data-d03-stage="1"]>[data-aigen-d03-tabs]{order:-2}
body:not(.home-mode) #ai .ai-assist-workbench[data-d03-stage="1"]>.ai-assist-modal.ai-assist-d03-stage{order:-1}
body:not(.home-mode) #ai .ai-assist-workbench .ai-assist-modal.ai-assist-d03-stage{position:static!important;inset:auto!important;z-index:auto!important;display:block;padding:0!important;background:none!important}
body:not(.home-mode) #ai .ai-assist-workbench .ai-assist-modal.ai-assist-d03-stage[data-ai-assist-node] .ai-assist-modal-card{width:100%!important;max-width:none!important;max-height:none!important;margin:0!important;box-shadow:none!important}
.ai-assist-d03-stage[data-ai-assist-node="local_edit"] .ai-assist-modal-card>header,.ai-assist-d03-stage[data-ai-assist-node="local_edit"] .ai-assist-modal-card>footer{display:none}
.ai-assist-d03-stage-head{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px 16px}
.ai-assist-d03-stage-title{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 12px}
.ai-assist-d03-stage-title strong{font-size:20px;font-weight:800}
.ai-assist-d03-stage-title span,.ai-assist-d03-stage-meta>span{font-size:13px}
.ai-assist-d03-stage-meta{display:flex;align-items:center;flex-wrap:wrap;gap:10px 12px}
.ai-assist-d03-stage-meta button{min-height:36px;padding:6px 14px;font-weight:700}

/* AD-D03 RAIL-1（S3a）：局部优化右栏——主画面｜右栏两列，来源图条与候选条各占整行（S4 再改成版本条）；右栏是 JS 搬来的 <aside>（修改说明／更换模型／更多设置／预览确认并生成／保存标注）。
   现役 .ai-assist-modal-fields label 在玻璃皮肤里是带 !important 的卡片底，右栏里的 label 要用更高特异性＋!important 压回无底。 */
body:not(.home-mode) #ai .ai-assist-workbench .ai-assist-modal.ai-assist-d03-stage .ai-assist-annotation-panel{grid-template-columns:minmax(0,1fr) clamp(300px,31%,380px);grid-template-areas:"main rail" "src src" "strip strip";align-items:start;gap:16px}
body:not(.home-mode) #ai .ai-assist-workbench .ai-assist-modal.ai-assist-d03-stage .ai-assist-annotation-panel>.ai-assist-annotation-source{grid-area:src}
body:not(.home-mode) #ai .ai-assist-workbench .ai-assist-modal.ai-assist-d03-stage .ai-assist-annotation-panel>.ai-assist-candidate-strip{grid-area:strip;margin-top:0}
body:not(.home-mode) #ai .ai-assist-workbench .ai-assist-modal.ai-assist-d03-stage .ai-assist-mini-source-grid{grid-auto-flow:column;grid-auto-columns:minmax(200px,240px);max-height:none;overflow-x:auto;overflow-y:hidden}
body:not(.home-mode) #ai .ai-assist-workbench .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-rail{grid-area:rail;min-width:0;display:grid;gap:14px;padding:14px;border:1px solid var(--mf-theme-line,rgba(118,197,222,.28));border-radius:12px;background:var(--mf-theme-card,rgba(4,21,31,.42))}
body:not(.home-mode) #ai .ai-assist-workbench .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-rail label{display:grid;gap:6px;padding:0!important;border:0!important;background:none!important;box-shadow:none!important;font-size:14px;font-weight:700}
body:not(.home-mode) #ai .ai-assist-workbench .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-rail textarea{min-height:132px;resize:vertical}
body:not(.home-mode) #ai .ai-assist-workbench .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-count{justify-self:end;font-size:12px;font-weight:600}
body:not(.home-mode) #ai .ai-assist-workbench .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-model{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:10px}
body:not(.home-mode) #ai .ai-assist-workbench .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-model select{width:100%;min-width:0;text-overflow:ellipsis}
body:not(.home-mode) #ai .ai-assist-workbench .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-model>span{padding-bottom:10px;font-size:13px;white-space:nowrap}
body:not(.home-mode) #ai .ai-assist-workbench .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-more>summary{cursor:pointer;font-size:13px;font-weight:700}
body:not(.home-mode) #ai .ai-assist-workbench .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-more>label{margin-top:10px}
body:not(.home-mode) #ai .ai-assist-workbench .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-rail-actions{display:grid;gap:10px}
body:not(.home-mode) #ai .ai-assist-workbench .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-rail-actions .ai-assist-honest-note{max-width:none;margin:0;font-size:12px}
body:not(.home-mode) #ai .ai-assist-workbench .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-rail-actions button{width:100%;min-height:44px;font-weight:800}
body:not(.home-mode) #ai .ai-assist-workbench .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-rail-actions button.primary-action{border-color:rgba(122,223,250,.72)!important;background:linear-gradient(135deg,rgba(96,196,236,.55),rgba(44,128,176,.40)),rgba(8,31,48,.82)!important;color:#f4fdff!important}
html[data-meifan-theme="day"] body:not(.home-mode) #ai .ai-assist-workbench .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-rail-actions button.primary-action{border-color:#1d3230!important;background:linear-gradient(150deg,#24403c,#1d3230)!important;color:#f6f3ec!important}
@media (max-width:1180px){body:not(.home-mode) #ai .ai-assist-workbench .ai-assist-modal.ai-assist-d03-stage .ai-assist-annotation-panel{grid-template-columns:minmax(0,1fr);grid-template-areas:"main" "rail" "src" "strip"}}

/* AD-D03 RAIL-2（S3b）：右栏上半——分段（右栏里与节点面板顶上两处）、修改参考、首次生成资料折叠。主色沿用 RAIL-1 的站内主按钮色（夜青蓝渐变／日深绿渐变），玻璃皮肤会盖掉所以用 !important＋高特异性。 */
body:not(.home-mode) #ai .ai-assist-workbench .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-seg{display:flex;gap:4px;padding:4px;border:1px solid var(--mf-theme-line,rgba(118,197,222,.28));border-radius:10px}
body:not(.home-mode) #ai .ai-assist-workbench .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-seg button{flex:1;min-height:36px;padding:6px 10px;border-radius:8px;font-weight:700}
body:not(.home-mode) #ai .ai-assist-workbench .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-seg button.is-active{border-color:rgba(122,223,250,.72)!important;background:linear-gradient(135deg,rgba(96,196,236,.55),rgba(44,128,176,.40)),rgba(8,31,48,.82)!important;color:#f4fdff!important}
html[data-meifan-theme="day"] body:not(.home-mode) #ai .ai-assist-workbench .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-seg button.is-active{border-color:#1d3230!important;background:linear-gradient(150deg,#24403c,#1d3230)!important;color:#f6f3ec!important}
body:not(.home-mode) #ai .ai-assist-workbench .ai-assist-modal.ai-assist-d03-stage .ai-assist-modal-fields>.ai-assist-d03-seg{margin-bottom:12px;max-width:360px}
body:not(.home-mode) #ai .ai-assist-workbench .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-ref{display:grid;gap:8px}
body:not(.home-mode) #ai .ai-assist-workbench .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-ref-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;align-items:end}
body:not(.home-mode) #ai .ai-assist-workbench .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-drop{min-height:56px;border:1px dashed var(--mf-theme-line-strong,rgba(126,211,242,.5))!important;border-radius:10px;background:none!important;font-weight:700;cursor:pointer}
body:not(.home-mode) #ai .ai-assist-workbench .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-ref-list{list-style:none;margin:0;padding:0;display:grid;gap:6px}
body:not(.home-mode) #ai .ai-assist-workbench .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-ref-list li{display:grid;grid-template-columns:40px minmax(0,1fr) 28px;align-items:center;gap:8px}
body:not(.home-mode) #ai .ai-assist-workbench .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-ref-list img{width:40px;height:40px;object-fit:cover;border-radius:6px}
body:not(.home-mode) #ai .ai-assist-workbench .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-ref-list li>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}
body:not(.home-mode) #ai .ai-assist-workbench .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-ref-list li>button{min-width:28px;min-height:28px;padding:0}
body:not(.home-mode) #ai .ai-assist-workbench .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-ref>small{font-size:12px}
body:not(.home-mode) #ai .ai-assist-workbench .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-link{justify-self:start;min-height:32px;padding:4px 10px;font-size:13px}
body:not(.home-mode) #ai .ai-assist-workbench .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-materials>summary{cursor:pointer;font-size:14px;font-weight:700}
body:not(.home-mode) #ai .ai-assist-workbench .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-materials-list{list-style:none;margin:8px 0 0;padding:0;display:grid;gap:6px}
body:not(.home-mode) #ai .ai-assist-workbench .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-materials-list li{display:grid;grid-template-columns:32px minmax(0,1fr) auto auto;align-items:center;gap:6px 8px;font-size:13px}
body:not(.home-mode) #ai .ai-assist-workbench .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-materials-list em{font-style:normal;font-size:12px}
body:not(.home-mode) #ai .ai-assist-workbench .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-materials-list button{min-height:28px;padding:2px 10px;font-size:12px}

/* AD-D03 RAIL-3（S4）：底部「候选与版本」条——替换现役的来源图条与生成候选区（两行格子合成一整行），缩略图横排可滚，选中带粗描边，一排动作；主按钮沿用 RAIL-1／2 的站内主按钮色。 */
body:not(.home-mode) #ai .ai-assist-workbench .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-strip{grid-area:src / src / strip / strip;display:grid;gap:10px;padding:14px;border:1px solid var(--mf-theme-line,rgba(118,197,222,.28));border-radius:12px;background:var(--mf-theme-card,rgba(4,21,31,.42))}
body:not(.home-mode) #ai .ai-assist-workbench .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-vers{display:flex;gap:10px;overflow-x:auto;padding-bottom:4px}
body:not(.home-mode) #ai .ai-assist-workbench .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-ver{flex:0 0 auto;display:grid;gap:4px;width:132px;padding:6px;border:1px solid var(--mf-theme-line,rgba(118,197,222,.28));border-radius:10px;background:none!important;text-align:left;cursor:pointer}
body:not(.home-mode) #ai .ai-assist-workbench .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-ver-orig{cursor:default}
body:not(.home-mode) #ai .ai-assist-workbench .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-ver.is-selected{border:2px solid rgba(126,223,250,.9)!important}
html[data-meifan-theme="day"] body:not(.home-mode) #ai .ai-assist-workbench .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-ver.is-selected{border-color:#1d3230!important}
body:not(.home-mode) #ai .ai-assist-workbench .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-ver-img{display:block;height:84px;border-radius:6px;overflow:hidden;background:rgba(0,0,0,.25)}
body:not(.home-mode) #ai .ai-assist-workbench .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-ver-img img{width:100%;height:100%;object-fit:cover;display:block}
body:not(.home-mode) #ai .ai-assist-workbench .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-ver>strong{font-size:13px;font-weight:700}
body:not(.home-mode) #ai .ai-assist-workbench .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-ver>em{font-style:normal;font-size:12px}
body:not(.home-mode) #ai .ai-assist-workbench .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-vers-actions{display:flex;flex-wrap:wrap;gap:8px}
body:not(.home-mode) #ai .ai-assist-workbench .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-vers-actions button{min-height:36px;padding:6px 16px;font-weight:700}
body:not(.home-mode) #ai .ai-assist-workbench .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-vers-actions button:disabled{opacity:.45;cursor:not-allowed}
body:not(.home-mode) #ai .ai-assist-workbench .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-vers-actions button.primary-action{border-color:rgba(122,223,250,.72)!important;background:linear-gradient(135deg,rgba(96,196,236,.55),rgba(44,128,176,.40)),rgba(8,31,48,.82)!important;color:#f4fdff!important}
html[data-meifan-theme="day"] body:not(.home-mode) #ai .ai-assist-workbench .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-vers-actions button.primary-action{border-color:#1d3230!important;background:linear-gradient(150deg,#24403c,#1d3230)!important;color:#f6f3ec!important}
body:not(.home-mode) #ai .ai-assist-workbench .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-strip>small{font-size:12px;min-height:1.4em}
/* AD-D03 M-1 手机壳（≤760px；仍是同一把开关 meifan_aigen_d03_shell_v1，默认关＝没有 data-d03-view＝下面任何一条都不匹配）：页头与二级入口收成一行、「局部辅助｜全案辅助」分段居中收窄、内容宽收到视口−28、舞台页头收紧。页头与二级入口是平台件，只在设计辅助页可见时才收（:has），切到生图画布／AI画板照旧。 */
@media (max-width:760px){
body:has(#ai.active #ai-tab-polish:not(.hidden) .ai-assist-workbench[data-d03-view]) header.topbar{flex-direction:row;gap:8px;padding:8px 14px}
body:has(#ai.active #ai-tab-polish:not(.hidden) .ai-assist-workbench[data-d03-view]) header.topbar>div:first-child{flex:1 1 auto}
body:has(#ai.active #ai-tab-polish:not(.hidden) .ai-assist-workbench[data-d03-view]) header.topbar h1{font-size:20px!important}
body:has(#ai.active #ai-tab-polish:not(.hidden) .ai-assist-workbench[data-d03-view]) header.topbar #pageSubtitle{display:none}
body:has(#ai.active #ai-tab-polish:not(.hidden) .ai-assist-workbench[data-d03-view]) #aiSubTabs{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
body:has(#ai.active #ai-tab-polish:not(.hidden) .ai-assist-workbench[data-d03-view]) #aiSubTabs button{min-height:36px;padding:4px;white-space:nowrap}
body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view]{width:calc(100% + 16px);max-width:none;margin-inline:-8px;padding:10px 7px!important}
body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-modal.ai-assist-d03-stage .ai-assist-modal-card{padding:0!important;border:0!important;border-radius:0!important;background:none!important}
body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-modal.ai-assist-d03-stage .ai-assist-modal-fields{padding:0}
body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-d03-tabs{width:min(235px,100%);margin-inline:auto}
body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-d03-tabs button{flex:1 1 0;min-height:30px;padding:4px 10px}
body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-d03-stage-head{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 8px}
body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-d03-stage-head .ai-assist-d03-stage-meta{display:contents}
body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-d03-stage-head .ai-assist-d03-stage-meta>button{grid-column:2;grid-row:1/span 2;padding:4px 12px}
}
/* AD-D03 M-1b 宽度守卫（≤760px；同一把开关 meifan_aigen_d03_shell_v1，默认关＝没有 data-d03-view＝下面两条都不匹配）：工作台是只有一列 auto 轨道的 grid，项目栏里的项目下拉按最长项目名撑出最小内容宽，会把整列（舞台、右栏、版本条都在这一列里）撑宽（真栈上 362→433，右侧被工作台 overflow-x:hidden 裁掉）。轨道改 minmax(0,1fr)，这一列里的块（项目栏、舞台、右栏、版本条）都按视口内的列宽走；项目下拉本来就能在项目栏里收窄（现役 min-width 为 0），不用再动它。 */
@media (max-width:760px){
body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view]{grid-template-columns:minmax(0,1fr)}
}
/* AD-D03 M-2（CSS 半，依赖 M-1；仍是同一把开关 meifan_aigen_d03_shell_v1，默认关＝没有 data-d03-view＝下面任何一条都不匹配）：「修改当前图」手机版式——画布 5:3、工具条两排、修改说明低框、修改参考一排三块、两个主按钮一行、版本卡并排。版本区底部动作的收纳（更多操作）是 JS 半，另片。 */
@media (max-width:760px){
body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-modal.ai-assist-d03-stage .ai-assist-shared-canvas{height:auto;aspect-ratio:5/3}
body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-modal.ai-assist-d03-stage .ai-assist-annotation-toolbar{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:6px}
body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-modal.ai-assist-d03-stage .ai-assist-annotation-toolbar>button{padding:0 2px;font-size:12px}
body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-modal.ai-assist-d03-stage .ai-assist-annotation-toolbar>.ai-assist-text-style{grid-column:1/-1}
body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-modal.ai-assist-d03-stage .ai-assist-annotation-toolbar>input[data-ai-assist-field="marker_text"]{grid-column:span 3}
body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-modal.ai-assist-d03-stage .ai-assist-shared-zoom{display:flex;gap:8px}
body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-modal.ai-assist-d03-stage .ai-assist-shared-zoom select{flex:0 0 96px;height:32px}
body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-modal.ai-assist-d03-stage [data-aigen-d03-rail] .ai-assist-wide-textarea{position:relative}
body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-modal.ai-assist-d03-stage [data-aigen-d03-rail] .ai-assist-wide-textarea textarea{min-height:48px;padding-bottom:20px}
body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-modal.ai-assist-d03-stage [data-aigen-d03-rail] .ai-assist-d03-count{position:absolute;right:10px;bottom:6px}
body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-ref{grid-template-columns:repeat(3,minmax(0,1fr))}
body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-ref>strong,body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-ref>small,body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-ref>.ai-assist-d03-ref-list{grid-column:1/-1}
body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-ref-row{display:contents}
body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-ref [data-aigen-d03-ref-library]{grid-row:2;justify-self:stretch;border:1px dashed var(--mf-theme-line-strong,rgba(126,211,242,.5))!important;border-radius:10px;background:none!important;font-weight:700}
body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-ref [data-aigen-d03-ref-upload]{min-height:54px}
body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-ref-row>label{gap:2px}
body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-ref-row>label select{height:32px}
body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-rail-actions{grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:8px}
body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-rail-actions>.ai-assist-honest-note,body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-rail-actions>small{grid-column:1/-1}
body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-rail-actions button{min-height:35px}
body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-ver{flex:0 0 calc(50% - 4px);height:53px;grid-template-columns:44px minmax(0,1fr);column-gap:8px;padding:4px 6px}
body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-ver-img{grid-row:1/span 2;height:44px}
body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-ver>strong:last-child{grid-row:1/span 2;align-self:center}
body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-vers{gap:8px}
}
/* AD-D03 M-2 JS 半（依赖 M-2 CSS 半；仍是同一把开关 meifan_aigen_d03_shell_v1，默认关＝没有 data-d03-view＝下面任何一条都不匹配）：版本条底部动作的手机版式——「继续修改」＋「保存至辅助设计库」状态块一行、「更多操作 ›」打开结果操作抽屉（M-4；采用／放弃／详情／找回候选／送素材库都在抽屉里，一个都不删）。新增的状态块与切换钮在 ≥761 宽隐藏。 */
body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-vers-actions>[data-aigen-d03-savechip],body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-vers-actions>[data-aigen-d03-actmore]{display:none}
@media (max-width:760px){
body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-vers-actions{display:grid;grid-template-columns:repeat(6,minmax(0,1fr))}
body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-vers-actions>[data-aigen-d03-act="continue"]{grid-column:span 3;order:1}
body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-vers-actions>[data-aigen-d03-savechip]{display:flex;flex-direction:column;justify-content:center;grid-column:span 3;order:2;padding:0 8px;border:1px solid var(--mf-theme-line,rgba(118,197,222,.28));border-radius:8px;font-size:11px;line-height:1.25}
body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-vers-actions>[data-aigen-d03-actmore]{display:inline-flex;justify-content:center;align-items:center;grid-column:1/-1;order:3}
body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-strip .ai-assist-d03-vers-actions>[data-aigen-d03-act]:not([data-aigen-d03-act="continue"]){display:none}
}
/* AD-D03 M-4（依赖 M-2 JS 半；同一把开关 meifan_aigen_d03_shell_v1，默认关）：①手机宽把右栏「更换模型｜当前 N 张/次」画成一行卡片「已选模型 ＜模型名＞ · N 张 更换模型 ›」（点非下拉处由 JS 转发 mousedown 给路线下拉，走现役 NY 抽屉）；②结果操作抽屉（只在手机宽点「更多操作 ›」时由 JS 挂到 body，别处不存在）。 */
@media (max-width:760px){
body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-model{align-items:center;gap:4px 8px;padding:10px 12px;border:1px solid var(--mf-theme-line,rgba(118,197,222,.28));border-radius:10px}
body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-model::before{content:"已选模型";grid-area:1/1;font-size:12px}
body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-model>label{display:contents}
body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-model select{grid-area:2/1/auto/3;min-width:0;width:100%}
body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-model>span{grid-area:2/3;padding-bottom:0}
body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-model::after{content:"›";grid-area:1/3}
}
.ai-assist-d03-drawer-mask{position:fixed;inset:0;z-index:2147483647;display:flex;align-items:flex-end}
.ai-assist-d03-drawer{overflow-y:auto;padding:12px 16px 16px;background:#0a1f2e;color:#e8f4fa}
html[data-meifan-theme="day"] .ai-assist-d03-drawer{background:#f6f3ec;color:#1d3230}
.ai-assist-d03-drawer>header{display:flex;justify-content:space-between}
.ai-assist-d03-drawer>header>button{min-width:36px;min-height:36px}
.ai-assist-d03-drawer-card{display:grid;grid-template-columns:96px minmax(0,1fr);gap:12px}
.ai-assist-d03-drawer-card>button{height:72px}
.ai-assist-d03-drawer-list{display:grid;gap:8px;margin-bottom:12px}
.ai-assist-d03-drawer-list>button{min-height:44px}
.ai-assist-d03-drawer>.primary-action{width:100%}
/* AD-D03 M-3（依赖 M-4；同一把开关 meifan_aigen_d03_shell_v1，默认关）：手机宽「首次生成」页——基图、调整方向 chips、首次参考、描述、模型行、生成候选、找回候选、生成结果行；06 节点面板里其余块被隐藏（不删，状态不丢）。 */
@media (max-width:760px){
body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-modal.ai-assist-d03-stage [data-aigen-d03-first-hidden]{display:none}
body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-first{display:grid;gap:12px}
body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-first-head{display:grid;gap:2px}
body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-first-base{position:relative;aspect-ratio:5/3;overflow:hidden}
body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-first-base img{width:100%;height:100%;object-fit:contain}
body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-first-base>button{position:absolute;right:8px;bottom:8px;min-height:36px}
body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-first-chips{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-first-chips>button{min-height:36px;padding:0 4px;font-size:12px}
body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-first-refs{display:flex;align-items:center;gap:8px}
body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-first-refs>button{flex:1;min-height:36px}
body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-first-result{display:grid;grid-template-columns:56px minmax(0,1fr);gap:6px 10px;align-items:center}
body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-first-result img{width:56px;height:56px;object-fit:cover}
body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view] .ai-assist-modal.ai-assist-d03-stage .ai-assist-d03-first-result>button{min-height:36px}
}
.quote-template-shell,
.quote-operable-r1 {
  display: grid;
  gap: 14px;
}

.quote-template-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 420px) auto;
  gap: 12px;
  align-items: end;
}

.quote-template-select {
  color: var(--ink);
  font-weight: 700;
}

.quote-template-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#quoteCalculationWorkspace[hidden],
#quoteDisplayWorkspace[hidden],
#quote .quote-template-toolbar[hidden] {
  display: none;
}

#quoteCalculationWorkspace,
.quote-display-workspace {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.quote-display-source,
.quote-display-note { margin: 0; color: var(--muted); line-height: 1.6; }
.quote-display-settings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.quote-display-settings label { display: grid; gap: 6px; min-width: 0; color: var(--ink); }
.quote-display-settings select,
.quote-display-settings input,
.quote-display-settings textarea {
  width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 6px;
  padding: 8px; background: var(--surface, var(--bg)); color: var(--ink); font: inherit;
}
.quote-display-requirements { grid-column: 1 / -1; }
.quote-display-preview { border: 1px solid var(--line); border-radius: 8px; padding: 14px; color: var(--ink); }
.quote-display-preview h4 { margin: 0 0 12px; }
.quote-display-preview [role="status"] { color: var(--muted); }
.quote-display-thumbnails { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.quote-display-thumbnails img { max-width: 100%; height: auto; }
.quote-display-workspace button:disabled { opacity: .65; cursor: not-allowed; }
@media (max-width: 720px) { .quote-display-settings { grid-template-columns: 1fr; } }

.quote-template-select select,
.quote-template-inputs input,
.quote-template-inputs select,
.quote-config-grid input,
.quote-config-grid select,
.quote-detail-editor input {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
}

.quote-template-board {
  border: 2px solid #c9433f;
  border-radius: 8px;
  background: #fffdfb;
  overflow: hidden;
}

.quote-template-board-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid #efd8d4;
  background: #fff7f4;
}

.quote-template-board-head small,
.quote-template-architecture span,
.quote-template-draft-list small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.quote-template-totals,
.quote-output-cards {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.quote-template-totals span,
.quote-output-cards article {
  min-height: 34px;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
}

.quote-template-totals strong,
.quote-output-cards strong {
  color: var(--ink);
  font-size: 15px;
}

.quote-output-cards {
  justify-content: flex-start;
  padding: 12px;
}

.quote-output-cards article.internal {
  background: #f6f1e8;
  color: #6f5425;
}

.quote-step-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
  background: #fbfcfa;
}

.quote-step-nav button {
  min-height: 44px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
}

.quote-step-nav button:last-child {
  border-right: 0;
}

.quote-step-nav button.active {
  background: #1f2a2a;
  color: #fff;
}

.quote-step-panel {
  display: none;
  padding: 14px;
}

.quote-step-panel.active {
  display: block;
}

.quote-operable-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.quote-operable-section-head h3 {
  margin: 0;
  font-size: 15px;
}

.quote-operable-section-head span {
  color: var(--muted);
  font-size: 12px;
}

.quote-template-inputs,
.quote-config-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}

.quote-template-inputs label,
.quote-config-grid label,
.quote-config-multi {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.quote-template-inputs small {
  color: var(--muted);
  font-weight: 500;
}

.quote-config-multi {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.quote-config-multi label,
.quote-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  color: var(--muted);
}

.quote-config-multi input,
.quote-toggle input,
.quote-template-settings-table input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: #1f2a2a;
}

.quote-readonly-bridge {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px dashed #b8c1bd;
  border-radius: 8px;
  background: #fbfcfa;
  color: var(--muted);
  font-size: 12px;
}

.quote-meifan-final-shell {
  width: 100%;
  overflow: hidden;
  border: 0;
  border-radius: 10px;
  background: #f5f5f0;
}

.quote-meifan-final-frame {
  display: block;
  width: 100%;
  min-height: 5600px;
  border: 0;
  background: #f5f5f0;
}

.quote-template-scroll {
  width: 100%;
  overflow-x: auto;
}

.quote-template-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
  font-size: 12px;
}

.quote-template-table th,
.quote-template-table td {
  padding: 8px 9px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.quote-template-table th {
  background: #f3f5f2;
  color: #3b4745;
  font-weight: 800;
  white-space: nowrap;
}

.quote-template-table td {
  color: var(--ink);
}

.quote-detail-editor input {
  min-width: 82px;
  padding: 5px 7px;
}

.quote-detail-editor td:nth-child(2) input,
.quote-detail-editor td:nth-child(3) input,
.quote-detail-editor td:nth-child(11) input {
  min-width: 150px;
}

.quote-template-internal {
  background: #f6f1e8;
  color: #6f5425;
}

.quote-card-preview {
  margin: 0 12px 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  color: var(--muted);
  font-size: 12px;
}

.quote-card-preview strong,
.quote-card-preview p {
  display: block;
  margin: 0 0 6px;
  color: var(--ink);
}

.quote-template-meta {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.quote-template-export-preview {
  min-height: 36px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 10px;
  color: var(--muted);
  background: #fbfcfa;
  font-size: 12px;
}

.quote-template-settings {
  margin-top: 12px;
}

.quote-template-settings-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
  flex-wrap: wrap;
}

.quote-template-settings-table {
  min-width: 1060px;
}

.quote-template-settings-table td:first-child,
.quote-template-settings-table td:nth-child(2),
.quote-template-settings-table th:first-child,
.quote-template-settings-table th:nth-child(2) {
  width: 72px;
  text-align: center;
}

.quote-template-settings-table td strong,
.quote-template-settings-table td small {
  display: block;
}

.quote-template-architecture {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.quote-template-draft-list {
  display: grid;
  gap: 4px;
  margin-top: 10px;
}

.danger {
  color: #a33;
  border-color: #e8c8c8;
}

/* 公司保存/历史在原报价容器内接线；功能布局，不作为未审 QD/QM 图面验收。 */
.quote-company-controls,
.quote-company-workspace {
  min-width: 0;
  padding: 12px;
  margin: 10px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface);
}

.quote-company-controls label,
.quote-company-history-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.quote-company-controls input,
.quote-company-workspace input {
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
  color: var(--ink);
  background: var(--surface);
}

.quote-company-workspace button { margin: 4px; }
.quote-company-table-wrap { max-width: 100%; overflow-x: auto; }
.quote-company-table-wrap table { width: 100%; min-width: 600px; }
.quote-company-table-wrap th,
.quote-company-table-wrap td { padding: 8px; text-align: left; overflow-wrap: anywhere; }
.quote-company-internal pre { max-height: 320px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.quote-company-readonly { color: var(--muted); }
#quoteCompanyProjectR1 { box-sizing: border-box; max-width: 100%; min-width: 0; }
.quote-company-workspace[hidden] { display: none; }

@media (max-width: 640px) {
  .quote-company-controls,
  .quote-company-workspace { padding: 8px; }
  .quote-company-controls label { display: grid; grid-template-columns: minmax(0, 1fr); }
  .quote-company-controls input,
  .quote-company-workspace input { width: 100%; }
}

@media (max-width: 1180px) {
  .quote-template-inputs,
  .quote-config-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quote-template-board-head {
    grid-template-columns: 1fr;
  }

  .quote-template-totals {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .quote-template-toolbar,
  .quote-template-inputs,
  .quote-config-grid,
  .quote-step-nav {
    grid-template-columns: 1fr;
  }

  .quote-step-nav button {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .quote-template-table {
    min-width: 980px;
  }

  .quote-meifan-final-frame {
    min-height: 6200px;
  }
}
/* SYSTEM-SETTINGS-CENTER-OPERABLE-R1 */
.system-settings-shell {
  display: grid;
  gap: 16px;
}

.system-settings-hero,
.owner-backoffice-center,
.company-admin-settings,
.admin-prompt-preview,
.system-api-comfy-panel,
.system-material-contracts,
.system-quote-config,
.system-publishing-gateway,
.system-todo-urgency-config,
.system-recycle-bin-panel,
.system-feature-map {
  border: 1px solid rgba(126, 158, 177, 0.22);
  background: rgba(11, 18, 28, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 18px 44px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
}

.system-settings-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
}

.system-settings-summary span,
.owner-module-card,
.prompt-layer-grid article,
.api-shell-grid article,
.material-contract-grid article,
.publishing-gateway-grid article,
.system-delete-permission-grid span {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid rgba(126, 158, 177, 0.22);
  border-radius: 8px;
  background: rgba(14, 24, 36, 0.74);
  color: rgba(226, 234, 236, 0.78);
  min-width: 0;
}

.system-settings-summary strong {
  color: #f2f7f8;
  font-size: 22px;
}

.system-settings-guardrail {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(244, 190, 92, 0.28);
  border-radius: 8px;
  background: rgba(66, 48, 18, 0.28);
  color: #f5d38d;
  font-size: 12px;
  line-height: 1.6;
}

.owner-module-grid,
.prompt-layer-grid,
.api-shell-grid,
.material-contract-grid,
.publishing-gateway-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.owner-module-card strong,
.prompt-layer-grid strong,
.api-shell-grid strong,
.material-contract-grid strong,
.publishing-gateway-grid strong {
  color: #f3f8f9;
}

.owner-module-card small,
.prompt-layer-grid small,
.api-shell-grid small,
.material-contract-grid small,
.publishing-gateway-grid small,
.owner-backoffice-nav small,
.admin-prompt-name-list small,
.system-settings-category-nav small,
.owner-account-admin small,
.system-recycle-table small {
  color: rgba(214, 226, 226, 0.64);
  line-height: 1.5;
}

.material-contract-grid em {
  color: #9ee7bf;
  font-size: 12px;
  font-style: normal;
}

.owner-backoffice-grid {
  display: grid;
  grid-template-columns: 280px minmax(320px, 1fr) 260px;
  gap: 14px;
  align-items: start;
  margin-top: 14px;
}

.owner-backoffice-nav,
.owner-prompt-editor,
.owner-account-admin,
.system-settings-detail,
.system-settings-category-nav,
.admin-prompt-name-list,
.system-quote-grid {
  border: 1px solid rgba(126, 158, 177, 0.22);
  border-radius: 8px;
  background: rgba(10, 16, 26, 0.58);
}

.owner-backoffice-nav,
.admin-prompt-name-list,
.system-settings-category-nav {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.owner-backoffice-nav button,
.admin-prompt-name-list button,
.system-settings-category-nav button {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 10px;
  border: 1px solid rgba(126, 158, 177, 0.18);
  border-radius: 8px;
  background: rgba(20, 31, 45, 0.56);
  color: #e8f1f2;
  text-align: left;
  cursor: pointer;
}

.owner-backoffice-nav button.active,
.system-settings-category-nav button.active {
  border-color: rgba(95, 196, 214, 0.58);
  background: rgba(28, 74, 92, 0.44);
}

.owner-prompt-editor,
.owner-account-admin {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.owner-prompt-editor label,
.owner-account-table label,
.system-quote-grid label,
.system-todo-urgency-grid label {
  display: grid;
  gap: 6px;
  color: rgba(226, 234, 236, 0.78);
  font-size: 13px;
}

.owner-prompt-editor input,
.owner-prompt-editor textarea,
.owner-account-table select,
.system-quote-grid input,
.system-todo-urgency-grid input {
  width: 100%;
  border: 1px solid rgba(126, 158, 177, 0.24);
  border-radius: 8px;
  padding: 9px 10px;
  background: rgba(6, 11, 18, 0.62);
  color: #f2f7f8;
  font: inherit;
}

.owner-prompt-meta,
.owner-backoffice-actions,
.system-settings-rolebar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.owner-prompt-meta span,
.settings-level-chip {
  display: inline-flex;
  width: fit-content;
  padding: 5px 8px;
  border: 1px solid rgba(126, 158, 177, 0.2);
  border-radius: 999px;
  background: rgba(22, 35, 49, 0.72);
  color: rgba(226, 234, 236, 0.72);
  font-size: 11px;
}

.owner-account-table {
  display: grid;
  gap: 8px;
}

.system-settings-rolebar {
  margin-bottom: 12px;
}

.system-settings-rolebar button {
  border: 1px solid rgba(126, 158, 177, 0.24);
  border-radius: 999px;
  background: rgba(10, 16, 26, 0.66);
  color: rgba(226, 234, 236, 0.72);
  padding: 8px 12px;
  cursor: pointer;
}

.system-settings-rolebar button.active {
  background: rgba(53, 126, 150, 0.42);
  color: #f3fbfc;
  border-color: rgba(95, 196, 214, 0.58);
}

.system-settings-rolebar span {
  color: rgba(226, 234, 236, 0.66);
  font-size: 12px;
}

.system-settings-layout {
  display: grid;
  grid-template-columns: 280px minmax(360px, 1fr);
  gap: 14px;
}

.system-settings-detail {
  padding: 14px;
}

.system-settings-detail-head,
.system-settings-level2-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.system-settings-detail h3,
.system-recycle-table-grid h3 {
  color: #f3f8f9;
}

.system-settings-level2-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.system-settings-level2-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(126, 158, 177, 0.2);
  border-radius: 8px;
  background: rgba(14, 24, 36, 0.58);
}

.system-settings-level3-list {
  display: grid;
  gap: 7px;
}

.system-settings-level3-list label {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 8px;
  align-items: start;
  color: rgba(226, 234, 236, 0.76);
  font-size: 13px;
}

.system-settings-level3-list em {
  display: inline-block;
  margin-right: 6px;
  color: rgba(157, 178, 187, 0.78);
  font-size: 11px;
  font-style: normal;
}

.system-quote-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
  padding: 12px;
}

.system-quote-grid .quote-toggle {
  grid-template-columns: 18px 1fr;
  align-items: center;
}

.system-feature-map-table,
.system-recycle-table {
  width: 100%;
  border-collapse: collapse;
  color: rgba(226, 234, 236, 0.78);
  font-size: 13px;
}

.system-feature-map-table th,
.system-feature-map-table td,
.system-recycle-table th,
.system-recycle-table td {
  padding: 10px;
  border-bottom: 1px solid rgba(126, 158, 177, 0.18);
  text-align: left;
  vertical-align: top;
}

.system-feature-map-table th,
.system-recycle-table th {
  background: rgba(19, 31, 44, 0.72);
  color: #e8f1f2;
}

#systemQuoteTemplateMount .quote-template-settings {
  margin: 0;
}

.system-todo-urgency-config {
  display: grid;
  gap: 12px;
}

.system-todo-urgency-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr)) minmax(260px, 1.2fr) auto;
  gap: 12px;
  align-items: end;
}

.system-todo-urgency-preview {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.system-todo-urgency-preview span {
  border: 1px solid rgba(126, 158, 177, 0.22);
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 800;
}

.system-todo-urgency-preview .urgent {
  border-color: rgba(228, 95, 85, 0.54);
  color: #f1aaa3;
  background: rgba(72, 25, 30, 0.34);
}

.system-todo-urgency-preview .warning {
  border-color: rgba(243, 188, 45, 0.54);
  color: #ffd66d;
  background: rgba(90, 66, 16, 0.28);
}

.system-todo-urgency-preview .normal {
  border-color: rgba(60, 177, 116, 0.54);
  color: #9ee7bf;
  background: rgba(20, 76, 48, 0.3);
}

.system-delete-permission-grid,
.system-recycle-table-grid {
  display: grid;
  gap: 10px;
}

.system-delete-permission-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 12px;
}

.system-recycle-table-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-soft-delete-banner,
.case-share-edit-danger-row,
.case-share-recycle-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(226, 118, 108, 0.34);
  background: rgba(11, 18, 28, 0.58);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 10px 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 12px 28px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(14px);
}

.project-soft-delete-banner,
.case-share-recycle-actions {
  border-color: rgba(116, 185, 158, 0.34);
  background: rgba(10, 28, 25, 0.48);
}

.project-soft-delete-banner small,
.case-share-edit-danger-row small,
.case-share-recycle-actions small {
  display: block;
  color: rgba(222, 228, 224, 0.68);
  font-size: 12px;
  margin-top: 3px;
}

.project-modal-actions-split {
  justify-content: flex-end;
}

.project-modal-actions-split .modal-danger-button {
  margin-right: auto;
}

.danger-action,
.modal-danger-button {
  border-color: rgba(226, 118, 108, 0.5);
  color: #f1aaa3;
  background: rgba(72, 25, 30, 0.28);
}

.danger-action:hover,
.modal-danger-button:hover {
  border-color: rgba(244, 150, 139, 0.72);
  color: #ffd4cf;
  background: rgba(92, 32, 38, 0.38);
}

.case-share-edit-danger-row {
  justify-content: flex-start;
}

.case-share-edit-danger-row .modal-danger-button {
  order: -1;
  margin-right: 12px;
}

button.modal-danger-button.danger-action,
.project-modal-actions .modal-danger-button.danger-action,
.case-share-edit-danger-row .modal-danger-button.danger-action {
  border-color: rgba(226, 118, 108, 0.54);
  color: #f1aaa3;
  background: rgba(72, 25, 30, 0.34);
}

button.modal-danger-button.danger-action:hover,
.project-modal-actions .modal-danger-button.danger-action:hover,
.case-share-edit-danger-row .modal-danger-button.danger-action:hover {
  border-color: rgba(244, 150, 139, 0.78);
  color: #ffd4cf;
  background: rgba(92, 32, 38, 0.44);
}

#caseShareEditForm .case-share-edit-danger-row button.modal-danger-button.danger-action {
  color: #f1aaa3 !important;
}

#caseShareEditForm .case-share-edit-danger-row button.modal-danger-button.danger-action:hover {
  color: #ffd4cf !important;
}

@media (max-width: 1100px) {
  .owner-module-grid,
  .prompt-layer-grid,
  .api-shell-grid,
  .material-contract-grid,
  .publishing-gateway-grid,
  .system-settings-level2-grid,
  .system-quote-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .system-settings-summary,
  .owner-backoffice-grid,
  .system-settings-layout,
  .system-todo-urgency-grid,
  .system-delete-permission-grid,
  .system-recycle-table-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .owner-module-grid,
  .prompt-layer-grid,
  .api-shell-grid,
  .material-contract-grid,
  .publishing-gateway-grid,
  .system-settings-level2-grid,
  .system-quote-grid {
    grid-template-columns: 1fr;
  }
}

/* === 总框架重排 2026-06-20：域 Tab 工作区 + 账号/权限/反馈/报价搭建 === */
.system-account-workspace,
.system-permission-matrix,
.system-feedback-panel,
.system-comfy-maindir,
.system-business-tools,
.system-business-placeholders,
.system-security-panel,
.system-quote-builder {
  border: 1px solid rgba(126, 158, 177, 0.22);
  background: rgba(11, 18, 28, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 18px 44px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
  border-radius: 12px;
  padding: 16px;
}

.system-settings-domain-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.system-settings-domain-tabs .domain-tab {
  display: grid;
  gap: 2px;
  padding: 8px 12px;
  border: 1px solid rgba(126, 158, 177, 0.24);
  border-radius: 8px;
  background: rgba(14, 24, 36, 0.74);
  color: rgba(226, 234, 236, 0.78);
  cursor: pointer;
  text-align: left;
}
.system-settings-domain-tabs .domain-tab strong { color: #f1f7f8; font-size: 13px; }
.system-settings-domain-tabs .domain-tab small { color: rgba(214, 226, 226, 0.6); font-size: 11px; }
.system-settings-domain-tabs .domain-tab.active {
  border-color: rgba(120, 210, 170, 0.6);
  background: rgba(18, 40, 34, 0.7);
}
.system-settings-domain-tabs .domain-tab.active strong { color: #eafff4; }
.system-settings-domains { display: grid; gap: 16px; }

.account-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.account-grid label,
.account-keyadd label { display: grid; gap: 6px; color: rgba(226, 234, 236, 0.78); font-size: 13px; }
.account-grid input,
.account-keyadd select,
.account-keyadd input {
  border: 1px solid rgba(126, 158, 177, 0.24);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(6, 11, 18, 0.62);
  color: #eaf1f2;
  font-size: 13px;
}
.account-subhead { margin: 16px 0 6px; color: #e6eef0; font-size: 14px; }
.account-keyadd { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.account-keytable,
.perm-table,
.quote-builder-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 13px; }
.account-keytable th, .account-keytable td,
.perm-table th, .perm-table td,
.quote-builder-table th, .quote-builder-table td {
  border: 1px solid rgba(126, 158, 177, 0.18);
  padding: 8px 10px;
  color: rgba(226, 234, 236, 0.82);
  text-align: left;
}
.account-keytable th, .perm-table th, .quote-builder-table th { color: rgba(214, 226, 226, 0.7); font-weight: 600; }
.perm-table td.perm-cell { text-align: center; }
.account-bundles { margin-top: 14px; display: grid; gap: 6px; }
.account-bundles strong { color: #f1f7f8; }

.feedback-add, .quote-builder-add {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0;
}
.feedback-add input, .quote-builder-add input,
.feedback-add select, .quote-builder-add select {
  border: 1px solid rgba(126, 158, 177, 0.24);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(6, 11, 18, 0.62);
  color: #eaf1f2;
  font-size: 13px;
}
.feedback-add input, .quote-builder-add input { min-width: 240px; }

.quote-builder-workspace {
  display: grid;
  gap: 12px;
}

.quote-builder-topbar {
  display: grid;
  grid-template-columns: minmax(220px, 340px) auto 1fr;
  gap: 8px;
  align-items: end;
}

.quote-builder-topbar label {
  display: grid;
  gap: 5px;
  color: rgba(226, 234, 236, 0.78);
  font-size: 12px;
}

.quote-builder-topbar select {
  width: 100%;
  border: 1px solid rgba(126, 158, 177, 0.24);
  border-radius: 8px;
  padding: 8px 9px;
  background: rgba(6, 11, 18, 0.62);
  color: #f2f7f8;
  font: inherit;
}

.quote-builder-topbar > span {
  color: rgba(214, 226, 226, 0.62);
  font-size: 12px;
  line-height: 1.5;
}

.quote-builder-top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.quote-builder-actions,
.quote-builder-inline-form,
.quote-builder-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
}

.quote-builder-actions label,
.quote-builder-inline-form input,
.quote-builder-inline-form select {
  min-width: 150px;
}

.quote-builder-actions label {
  display: grid;
  gap: 5px;
  color: rgba(226, 234, 236, 0.78);
  font-size: 12px;
}

.quote-builder-actions input,
.quote-builder-inline-form input,
.quote-builder-inline-form select {
  border: 1px solid rgba(126, 158, 177, 0.24);
  border-radius: 8px;
  padding: 8px 9px;
  background: rgba(6, 11, 18, 0.62);
  color: #f2f7f8;
  font: inherit;
}

.quote-builder-actions span,
.quote-builder-formula-help,
.quote-builder-empty {
  color: rgba(214, 226, 226, 0.66);
  font-size: 12px;
  line-height: 1.5;
}

.quote-builder-stage-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 10px;
}

.quote-builder-stage-grid article,
.quote-builder-form-grid section,
.quote-builder-preview {
  border: 1px solid rgba(126, 158, 177, 0.22);
  border-radius: 8px;
  background: rgba(10, 16, 26, 0.58);
  padding: 12px;
}

.quote-builder-stage-grid strong,
.quote-builder-form-grid h3,
.quote-builder-preview strong {
  color: #f3f8f9;
}

.quote-builder-stage-grid small,
.quote-builder-preview small {
  display: block;
  color: rgba(214, 226, 226, 0.64);
  line-height: 1.5;
  margin-top: 5px;
}

/* P2-3-QT-MOBILE(2026-10-27) 手机止血：≤640px 构建器顶栏／阶段网格单列并允许收缩，外框 overflow-x 改 auto 兜底（.panel{overflow:hidden}≤520px）。
   纯显示修补，不动构建器功能与结构；QT 实施时整体替换本段。须排在上面基础规则之后。 */
@media (max-width: 640px) {
  .quote-builder-workspace,
  .quote-builder-topbar,
  .quote-builder-stage-grid { grid-template-columns: minmax(0, 1fr); }
  .system-quote-builder { overflow-x: auto; }
}

.quote-builder-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 10px;
}

.quote-builder-form-grid section {
  min-width: 0;
}

.quote-builder-wide {
  grid-column: 1 / -1;
}

.quote-builder-line-form input {
  min-width: 130px;
}

.quote-builder-table code {
  display: inline-block;
  max-width: 240px;
  overflow-wrap: anywhere;
  color: #9ee7bf;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
}

.quote-builder-preview {
  justify-content: space-between;
}

.quote-builder-footer-actions {
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.quote-builder-footer-actions button {
  min-width: 92px;
}

.quote-builder-template-library {
  grid-column: span 1;
  max-height: 230px;
  overflow: auto;
}

.quote-builder-category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}

.quote-builder-category-tabs .active {
  border-color: rgba(87, 201, 183, 0.58);
  background: rgba(44, 129, 107, 0.42);
  color: #f3fffb;
}

.quote-builder-column-settings {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr);
  gap: 8px;
  align-items: end;
}

.quote-builder-column-settings > div {
  grid-column: 1 / -1;
  display: grid;
  gap: 3px;
}

.quote-builder-column-settings label {
  display: grid;
  gap: 5px;
  color: rgba(226, 234, 236, 0.78);
  font-size: 12px;
}

.quote-builder-column-settings input {
  width: 100%;
  border: 1px solid rgba(126, 158, 177, 0.24);
  border-radius: 8px;
  padding: 8px 9px;
  background: rgba(6, 11, 18, 0.62);
  color: #f2f7f8;
  font: inherit;
}

.quote-builder-var-code {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 8px;
  border: 1px solid rgba(87, 201, 183, 0.34);
  border-radius: 7px;
  background: rgba(87, 201, 183, 0.11);
  color: #9ee7bf;
  font: 600 12px/1.2 Consolas, "Courier New", monospace;
}

.quote-builder-row-input {
  width: 100%;
  min-width: 120px;
  border: 1px solid rgba(126, 158, 177, 0.24);
  border-radius: 7px;
  padding: 7px 8px;
  background: rgba(6, 11, 18, 0.58);
  color: #f2f7f8;
  font: inherit;
}

.quote-builder-subtotal-row td {
  background: rgba(87, 201, 183, 0.08);
  color: #dff9f0;
  font-weight: 700;
}

.quote-builder-preview-modal {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  min-height: 100vh !important;
  max-height: 100vh !important;
  z-index: 2600 !important;
  display: grid !important;
  place-items: center;
  overflow: hidden;
  padding: 24px;
  background: rgba(0, 7, 12, 0.72);
  backdrop-filter: blur(4px);
}

.quote-builder-preview-modal.hidden {
  display: none !important;
}

.quote-builder-preview-dialog {
  width: min(1100px, 96vw);
  max-height: 84vh;
  overflow: auto;
  border: 1px solid rgba(87, 201, 183, 0.3);
  border-radius: 8px;
  background: #07131d;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  padding: 14px;
}

.quote-builder-create-dialog {
  width: min(560px, calc(100vw - 48px));
}

.quote-builder-create-name {
  display: grid;
  gap: 8px;
  color: rgba(226, 234, 236, 0.82);
  font-size: 13px;
  margin: 12px 0 16px;
}

.quote-builder-create-name input {
  width: 100%;
  border: 1px solid rgba(103, 180, 196, 0.28);
  border-radius: 8px;
  background: rgba(2, 13, 20, 0.78);
  color: #e6f2f2;
  padding: 10px 12px;
  outline: none;
}

.quote-builder-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.quote-builder-preview-head strong {
  color: #f3f8f9;
}

.quote-builder-preview-head small {
  display: block;
  color: rgba(214, 226, 226, 0.62);
  margin-top: 4px;
}

.quote-builder-preview-table {
  display: grid;
  gap: 8px;
}

.quote-builder-table .danger {
  border-color: rgba(242, 104, 104, 0.42);
  color: #ffb6b6;
}
.feedback-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.feedback-list li { color: rgba(226, 234, 236, 0.8); font-size: 13px; }

.business-tools-grid,
.biz-placeholder-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-top: 12px;
}
.business-tools-grid article,
.biz-placeholder-grid article {
  display: grid; gap: 4px; padding: 12px;
  border: 1px solid rgba(126, 158, 177, 0.2); border-radius: 8px; background: rgba(14, 24, 36, 0.6);
}
.business-tools-grid strong,
.biz-placeholder-grid strong { color: #f1f7f8; font-size: 13px; }
.business-tools-grid small,
.biz-placeholder-grid small { color: rgba(214, 226, 226, 0.62); }

.settings-placeholder-flag { display: flex; align-items: center; gap: 6px; color: rgba(214, 226, 226, 0.72); font-size: 13px; }
.settings-placeholder-note { margin: 10px 0 0; color: rgba(214, 226, 226, 0.74); font-size: 12px; line-height: 1.6; }

/* === 施工模板自建管理器 === */
.ctpl-manager { display: grid; gap: 12px; margin-top: 8px; }
.ctpl-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.ctpl-add label { display: grid; gap: 6px; color: rgba(226, 234, 236, 0.78); font-size: 12px; }
.ctpl-add select, .ctpl-add input {
  border: 1px solid rgba(126, 158, 177, 0.24); border-radius: 8px; padding: 8px 10px;
  background: rgba(6, 11, 18, 0.62); color: #eaf1f2; font-size: 13px;
}
.ctpl-add input { min-width: 220px; }
.ctpl-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ctpl-table th, .ctpl-table td { border: 1px solid rgba(126, 158, 177, 0.18); padding: 8px 10px; text-align: left; color: rgba(226, 234, 236, 0.82); }
.ctpl-table th { color: rgba(214, 226, 226, 0.7); }
.ctpl-table strong { color: #f1f7f8; }
.ctpl-editor { display: grid; gap: 10px; padding: 12px; border: 1px solid rgba(126, 158, 177, 0.22); border-radius: 10px; background: rgba(10, 16, 26, 0.5); }
.ctpl-editor-head { display: flex; justify-content: space-between; align-items: center; color: #f1f7f8; }
.ctpl-stage-card { display: grid; gap: 6px; padding: 10px; border: 1px solid rgba(126, 158, 177, 0.18); border-radius: 8px; background: rgba(14, 24, 36, 0.6); }
.ctpl-stage-head { display: flex; justify-content: space-between; align-items: center; color: #eaf1f2; }
.ctpl-task-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: rgba(226, 234, 236, 0.78); font-size: 12px; padding: 3px 0; }
.ctpl-task-add, .ctpl-stage-add { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
.ctpl-task-add input, .ctpl-stage-add input {
  border: 1px solid rgba(126, 158, 177, 0.22); border-radius: 6px; padding: 6px 8px;
  background: rgba(6, 11, 18, 0.6); color: #eaf1f2; font-size: 12px;
}
.ctpl-task-add input[data-ctpl-task-media] { width: 64px; }
.ctpl-empty { color: rgba(214, 226, 226, 0.6); font-size: 12px; }
.ctpl-manager-r4 {
  gap: 14px;
}
.ctpl-template-rail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}
.ctpl-template-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(126, 158, 177, 0.18);
  border-radius: 8px;
  background: rgba(10, 16, 26, 0.5);
  cursor: pointer;
}
.ctpl-template-card.on {
  border-color: rgba(120, 210, 170, 0.58);
  background: rgba(20, 40, 34, 0.58);
}
.ctpl-template-card strong,
.ctpl-stage-board-head strong,
.ctpl-stage-column-head strong {
  color: #f1f7f8;
}
.ctpl-template-card small,
.ctpl-stage-board-head small {
  display: block;
  margin-top: 4px;
  color: rgba(214, 226, 226, 0.62);
}
.ctpl-template-actions,
.ctpl-stage-board-actions,
.ctpl-stage-column-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ctpl-stage-board {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(126, 158, 177, 0.2);
  border-radius: 10px;
  background: rgba(8, 14, 22, 0.56);
  padding: 12px;
}
.ctpl-stage-board-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.ctpl-stage-board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}
.ctpl-stage-column {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(126, 158, 177, 0.18);
  border-radius: 8px;
  background: rgba(14, 24, 36, 0.62);
}
.ctpl-stage-column-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ctpl-stage-column-head span {
  flex: 0 0 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(120, 210, 170, 0.42);
  border-radius: 999px;
  color: rgba(120, 210, 170, 0.96);
  font-size: 11px;
}
.ctpl-stage-column-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.ctpl-stage-column-metrics span {
  border: 1px solid rgba(126, 158, 177, 0.2);
  border-radius: 999px;
  padding: 2px 8px;
  color: rgba(226, 234, 236, 0.76);
  font-size: 11px;
}
.ctpl-stage-task-preview {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ctpl-stage-task-preview li {
  display: grid;
  gap: 2px;
  padding: 7px;
  border-radius: 7px;
  background: rgba(6, 11, 18, 0.46);
}
.ctpl-stage-task-preview strong {
  color: rgba(241, 247, 248, 0.92);
  font-size: 12px;
}
.ctpl-stage-task-preview small {
  color: rgba(214, 226, 226, 0.74);
}

/* === 施工模板三步向导 2026-06-21 === */
.ctpl-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ctpl-hint { color: rgba(214, 226, 226, 0.74); font-size: 12px; }
.ctpl-in { border: 1px solid rgba(126, 158, 177, 0.24); border-radius: 8px; padding: 8px 10px; background: rgba(6, 11, 18, 0.62); color: #eaf1f2; font-size: 13px; width: 100%; box-sizing: border-box; }
.ctpl-in-num { width: 92px; }
.ctpl-mini { width: 18px; height: 18px; line-height: 1; padding: 0; margin-left: 2px; border-radius: 5px; border: 1px solid rgba(126, 158, 177, 0.3); background: rgba(10, 16, 26, 0.6); color: #c9d4d6; font-size: 11px; cursor: pointer; }

/* 全屏向导遮罩 */
/* 弹窗挂到 body 顶层容器，脱离 settings 面板 backdrop-filter 造成的 fixed 困住；z-index 在内容之上、左侧导航之下 */
#meifanCtplOverlay { position: static; }
.ctpl-wizard, .ctpl-modal {
  position: fixed; inset: 0; z-index: 2400; display: flex; align-items: center; justify-content: center;
  background: rgba(4, 8, 14, 0.62); backdrop-filter: blur(4px); padding: 24px;
}
.ctpl-wizard-panel {
  width: min(960px, 96vw); max-height: 92vh; display: flex; flex-direction: column; gap: 14px;
  border: 1px solid rgba(126, 158, 177, 0.24); border-radius: 14px; background: rgba(12, 19, 30, 0.98);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5); padding: 18px 20px;
}
.ctpl-wizard-wide { width: min(1100px, 97vw); }
.ctpl-wizard-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.ctpl-wizard-title { color: #f1f7f8; font-size: 16px; font-weight: 600; }
.ctpl-wizard-title small { display: block; color: rgba(214, 226, 226, 0.6); font-size: 12px; font-weight: 400; margin-top: 4px; }
.ctpl-step-dots { display: flex; gap: 6px; flex-shrink: 0; }
.ctpl-step-dots span { font-size: 12px; color: rgba(214, 226, 226, 0.74); border: 1px solid rgba(126, 158, 177, 0.2); border-radius: 999px; padding: 3px 10px; }
.ctpl-step-dots span.on { color: #0c1320; background: rgba(120, 210, 170, 0.9); border-color: transparent; }
.ctpl-wizard-meta { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.ctpl-wizard-meta label { display: grid; gap: 6px; color: rgba(226, 234, 236, 0.78); font-size: 12px; }
.ctpl-wizard-meta label .ctpl-in { width: 280px; }
.ctpl-wizard-body { overflow: auto; }
.ctpl-stage-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ctpl-stage-table th, .ctpl-stage-table td { border: 1px solid rgba(126, 158, 177, 0.16); padding: 7px 9px; text-align: left; color: rgba(226, 234, 236, 0.85); vertical-align: middle; }
.ctpl-stage-table th { color: rgba(214, 226, 226, 0.68); font-weight: 500; }
.ctpl-srow-idx { white-space: nowrap; }
.ctpl-wizard-foot { display: flex; align-items: center; gap: 10px; padding-top: 4px; border-top: 1px solid rgba(126, 158, 177, 0.14); }
.ctpl-foot-spacer { flex: 1; }

/* 步骤2：左阶段时间线 + 右内容 */
.ctpl-wizard-2col { display: grid; grid-template-columns: 248px 1fr; gap: 14px; overflow: hidden; min-height: 340px; }
.ctpl-timeline { display: grid; gap: 8px; align-content: start; overflow: auto; max-height: 60vh; padding-right: 4px; }
.ctpl-tl-node { display: flex; gap: 10px; align-items: center; text-align: left; padding: 8px 10px; border: 1px solid rgba(126, 158, 177, 0.18); border-radius: 10px; background: rgba(10, 16, 26, 0.55); color: #e2eaec; cursor: pointer; }
.ctpl-tl-node.on { border-color: rgba(120, 210, 170, 0.7); background: rgba(20, 40, 34, 0.7); }
.ctpl-tl-no { width: 30px; height: 30px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid rgba(120, 210, 170, 0.5); color: rgba(120, 210, 170, 0.95); font-size: 12px; }
.ctpl-tl-meta { display: grid; gap: 2px; min-width: 0; }
.ctpl-tl-meta strong { color: #f1f7f8; font-size: 13px; }
.ctpl-tl-meta small { color: rgba(214, 226, 226, 0.74); font-size: 11px; }
.ctpl-stage-detail { display: flex; flex-direction: column; gap: 10px; overflow: auto; max-height: 60vh; }
.ctpl-tabs { display: flex; gap: 6px; border-bottom: 1px solid rgba(126, 158, 177, 0.16); }
.ctpl-tab { background: transparent; border: none; border-bottom: 2px solid transparent; color: rgba(214, 226, 226, 0.6); font-size: 13px; padding: 6px 10px; cursor: pointer; }
.ctpl-tab.on { color: #f1f7f8; border-bottom-color: rgba(120, 210, 170, 0.9); }
.ctpl-card-add { margin: 2px 0; }
.ctpl-card-list { display: grid; gap: 8px; }
.ctpl-card-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 10px; border: 1px solid rgba(126, 158, 177, 0.16); border-radius: 10px; background: rgba(10, 16, 26, 0.5); }
.ctpl-card-main { display: grid; gap: 4px; min-width: 0; }
.ctpl-card-main strong { color: #f1f7f8; font-size: 13px; }
.ctpl-card-main small { color: rgba(214, 226, 226, 0.6); font-size: 12px; }
.ctpl-card-roles { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }
.ctpl-role-chip { font-size: 11px; color: rgba(120, 210, 170, 0.95); border: 1px solid rgba(120, 210, 170, 0.4); border-radius: 999px; padding: 1px 8px; }
.ctpl-card-need { font-size: 11px; color: rgba(244, 190, 92, 0.95); border: 1px solid rgba(244, 190, 92, 0.4); border-radius: 999px; padding: 1px 8px; }
.ctpl-card-ops { display: flex; gap: 4px; flex-shrink: 0; }

/* 卡片弹窗 / 预览 */
.ctpl-modal-card { width: min(560px, 95vw); max-height: 90vh; display: flex; flex-direction: column; border: 1px solid rgba(126, 158, 177, 0.24); border-radius: 14px; background: rgba(12, 19, 30, 0.99); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55); }
.ctpl-pv-card { width: min(720px, 96vw); }
.ctpl-modal-head { display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-bottom: 1px solid rgba(126, 158, 177, 0.16); color: #f1f7f8; }
.ctpl-modal-head strong { font-size: 15px; }
.ctpl-modal-x { margin-left: auto; width: 26px; height: 26px; border-radius: 8px; border: 1px solid rgba(126, 158, 177, 0.24); background: transparent; color: #c9d4d6; font-size: 16px; cursor: pointer; }
.ctpl-modal-body { padding: 16px; overflow: auto; display: grid; gap: 14px; }
.ctpl-modal-foot { display: flex; justify-content: flex-end; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid rgba(126, 158, 177, 0.16); }
.ctpl-modal-err { margin-right: auto; color: #ff8f8f; font-size: 12px; }
.ctpl-fld { display: grid; gap: 6px; color: rgba(226, 234, 236, 0.8); font-size: 12px; }
.ctpl-fld small { color: rgba(214, 226, 226, 0.74); }
.ctpl-fld .req { color: #ff6b6b; }
.ctpl-fld textarea.ctpl-in { resize: vertical; font-family: inherit; line-height: 1.6; }
.ctpl-thumb-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.ctpl-thumb { position: relative; width: 72px; height: 72px; border-radius: 8px; overflow: hidden; border: 1px solid rgba(126, 158, 177, 0.24); }
.ctpl-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ctpl-thumb-del { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border-radius: 50%; border: none; background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 12px; cursor: pointer; line-height: 1; padding: 0; }
.ctpl-thumb-add { width: 72px; height: 72px; display: flex; align-items: center; justify-content: center; border: 1px dashed rgba(126, 158, 177, 0.35); border-radius: 8px; color: rgba(214, 226, 226, 0.6); font-size: 22px; cursor: pointer; }
.ctpl-role-selected { display: flex; flex-wrap: wrap; gap: 6px; }
.ctpl-role-sel { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: #0c1320; background: rgba(120, 210, 170, 0.9); border-radius: 999px; padding: 2px 4px 2px 10px; }
.ctpl-role-x { width: 16px; height: 16px; border-radius: 50%; border: none; background: rgba(0, 0, 0, 0.25); color: #fff; font-size: 11px; cursor: pointer; line-height: 1; padding: 0; }
.ctpl-role-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.ctpl-role-opt { font-size: 12px; color: rgba(226, 234, 236, 0.82); border: 1px solid rgba(126, 158, 177, 0.3); border-radius: 999px; padding: 3px 12px; background: rgba(10, 16, 26, 0.55); cursor: pointer; }
.ctpl-role-opt.on { color: #0c1320; background: rgba(120, 210, 170, 0.85); border-color: transparent; }
.ctpl-role-custom { display: flex; gap: 8px; align-items: center; }
.ctpl-role-custom .ctpl-in { width: 200px; }
.ctpl-pv-sum { color: rgba(214, 226, 226, 0.7); font-size: 13px; margin: 0; }
.ctpl-pv-stage { display: grid; gap: 6px; padding: 10px; border: 1px solid rgba(126, 158, 177, 0.16); border-radius: 10px; background: rgba(10, 16, 26, 0.5); }
.ctpl-pv-stage-head { display: flex; align-items: center; gap: 8px; color: #f1f7f8; }
.ctpl-pv-stage-head small { color: rgba(214, 226, 226, 0.74); font-size: 11px; margin-left: auto; }
.ctpl-pv-no { width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid rgba(120, 210, 170, 0.5); color: rgba(120, 210, 170, 0.95); font-size: 11px; }
.ctpl-pv-list { margin: 0; padding-left: 18px; color: rgba(226, 234, 236, 0.82); font-size: 12px; line-height: 1.7; }
.ctpl-pv-list em { color: rgba(120, 210, 170, 0.9); font-style: normal; }
.ctpl-pv-sub { color: rgba(214, 226, 226, 0.6); }

/* Quote Builder R4 */
.quote-builder-draft-library {
  margin: 12px 0;
  padding: 12px;
  border: 1px solid rgba(103, 180, 196, 0.22);
  border-radius: 8px;
  background: rgba(4, 17, 25, 0.48);
}

.quote-builder-draft-library.hidden,
.quote-builder-preview-modal.hidden {
  display: none;
}

.quote-builder-lock-note {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  color: rgba(214, 226, 226, 0.62);
  font-size: 12px;
}

.quote-builder-tier-panel {
  margin-top: 8px;
}

.quote-builder-tier-head,
.quote-builder-modal-actions,
.quote-builder-preview-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.quote-builder-tier-head small,
.quote-builder-preview-summary small {
  display: block;
  color: rgba(214, 226, 226, 0.74);
  margin-top: 4px;
}

.quote-builder-tier-name {
  display: grid;
  gap: 6px;
  margin: 10px 0;
  color: rgba(214, 226, 226, 0.72);
  font-size: 12px;
}

.quote-builder-tier-name input,
.quote-builder-tier-dialog input,
.quote-builder-craft-dialog textarea,
.quote-builder-preview-fields input {
  width: 100%;
  border: 1px solid rgba(103, 180, 196, 0.24);
  border-radius: 6px;
  background: rgba(2, 13, 20, 0.72);
  color: #e6f2f2;
  padding: 8px 10px;
  outline: none;
}

.quote-builder-tier-dialog,
.quote-builder-preview-flow {
  width: min(1180px, calc(100vw - 56px));
  max-height: calc(100vh - 56px);
  overflow: auto;
}

.quote-builder-craft-dialog {
  width: min(720px, calc(100vw - 56px));
}

.quote-builder-craft-dialog textarea {
  resize: vertical;
  min-height: 180px;
  line-height: 1.6;
}

.quote-builder-preview-flow .quote-step-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 12px 0;
  border: 1px solid rgba(103, 180, 196, 0.22);
  border-radius: 8px;
  overflow: hidden;
}

.quote-builder-preview-flow .quote-step-nav span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  color: rgba(214, 226, 226, 0.74);
  border-right: 1px solid rgba(103, 180, 196, 0.18);
}

.quote-builder-preview-flow .quote-step-nav span:last-child {
  border-right: 0;
}

.quote-builder-preview-flow .quote-step-nav .active {
  background: rgba(46, 128, 151, 0.34);
  color: #f2fbfb;
  font-weight: 700;
}

.quote-builder-preview-flow .quote-step-nav b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: rgba(235, 246, 246, 0.9);
  color: #0b1f27;
  font-size: 12px;
}

.quote-builder-preview-flow-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.quote-builder-preview-flow-grid section {
  border: 1px solid rgba(103, 180, 196, 0.18);
  border-radius: 8px;
  padding: 12px;
  background: rgba(5, 20, 29, 0.56);
}

.quote-builder-preview-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.quote-builder-preview-fields label {
  display: grid;
  gap: 5px;
  color: rgba(214, 226, 226, 0.72);
  font-size: 12px;
}

.quote-builder-preview-fields small {
  color: rgba(214, 226, 226, 0.74);
}

/* === 职务管理 2026-06-21 === */
.system-jobtitles-panel { border: 1px solid rgba(126, 158, 177, 0.22); background: rgba(11, 18, 28, 0.68); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 18px 44px rgba(0, 0, 0, 0.24); backdrop-filter: blur(18px); border-radius: 12px; padding: 16px; }
.jobtitle-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.jobtitle-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: #eaf1f2; background: rgba(20, 31, 45, 0.7); border: 1px solid rgba(126, 158, 177, 0.28); border-radius: 999px; padding: 4px 6px 4px 12px; }
.jobtitle-del { width: 18px; height: 18px; line-height: 1; padding: 0; border: none; border-radius: 50%; background: rgba(0, 0, 0, 0.3); color: #fff; font-size: 12px; cursor: pointer; }
.jobtitle-add { display: flex; gap: 8px; align-items: center; }
.jobtitle-add input { flex: 1; max-width: 320px; border: 1px solid rgba(126, 158, 177, 0.24); border-radius: 8px; padding: 9px 10px; background: rgba(6, 11, 18, 0.62); color: #f2f7f8; font: inherit; }

/* 项目任务卡·责任归属 多选 */
.construction-task-roles { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 6px 0 8px; }
.construction-role-opt { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: rgba(226, 234, 236, 0.85); cursor: pointer; }
.construction-role-opt input { margin: 0; }
/* GLOBAL-UI-TECH-GLASS-SYNC-20260617: align all workbench pages with the approved dark blue glass home direction. */
:root {
  --bg: #04101a;
  --surface: rgba(8, 24, 36, 0.76);
  --surface-strong: rgba(10, 31, 46, 0.88);
  --surface-soft: rgba(13, 39, 56, 0.62);
  --ink: #effbff;
  --muted: rgba(198, 224, 235, 0.68);
  --line: rgba(128, 209, 240, 0.24);
  --nav: rgba(4, 14, 22, 0.86);
  --nav-soft: rgba(73, 151, 184, 0.18);
  --green: #6dcdf1;
  --teal: #76d8f6;
  --amber: #e7b45f;
  --red: #ec7771;
  --shadow: 0 24px 72px rgba(0, 0, 0, 0.34);
  --tech-glass-bg:
    linear-gradient(145deg, rgba(255,255,255,0.078), rgba(255,255,255,0.022) 40%, rgba(56,174,218,0.045) 100%),
    linear-gradient(320deg, rgba(2,12,22,0.78), rgba(5,35,55,0.62)),
    rgba(4, 18, 30, 0.72);
  --tech-glass-border: rgba(126, 211, 242, 0.30);
  --tech-glass-highlight: rgba(224, 250, 255, 0.13);
  --tech-glass-glow: rgba(72, 185, 230, 0.12);
}

body:not(.home-mode) {
  min-height: 100dvh;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(2, 8, 16, 0.24), rgba(2, 8, 16, 0.88)),
    radial-gradient(ellipse at 72% 5%, rgba(46, 158, 210, 0.24), transparent 42%),
    radial-gradient(ellipse at 12% 18%, rgba(87, 184, 228, 0.12), transparent 36%),
    #020810;
}

body:not(.home-mode)::before {
  content: "";
  position: fixed;
  inset: -4%;
  z-index: -2;
  pointer-events: none;
  background-image: url("assets/ui/home-tech-bg-20260617-2x.png");
  /* FC-PERF-WEBP-A-BEGIN: max-size default; PNG is the unsupported-format fallback. */
  background-image: image-set(
    url("assets/ui/home-tech-bg-20260617-q92-w3344-da81b40effee.webp") type("image/webp") 1x,
    url("assets/ui/home-tech-bg-20260617-2x.png") type("image/png") 1x
  );
  /* FC-PERF-WEBP-A-END */
  background-size: cover;
  background-position: center;
  opacity: 0.34;
  filter: saturate(0.96) contrast(1.04);
  transform: translate3d(0, 0, 0) scale(1.02);
  animation: systemBgDrift 30s ease-in-out infinite alternate;
}

/* FC-PERF-WEBP-A-BEGIN
   Fixed pseudo-element bounds: viewport * 1.08 inset expansion * 1.04 max scale.
   Both dimensions must fit; largest matching DPR candidate caps at original size.
   Fractional densities round DOWN from min(width ratio, height ratio).
   Keep larger screens/high DPR on full original-size variant; never enlarge an asset.
*/
@media (max-width: 2279px) and (max-height: 1282px) {
  body:not(.home-mode)::before {
    background-image: image-set(
      url("assets/ui/home-tech-bg-20260617-q92-w2560-8f6333599f23.webp") type("image/webp") 1x,
      url("assets/ui/home-tech-bg-20260617-q92-w3344-da81b40effee.webp") type("image/webp") 1.306037x,
      url("assets/ui/home-tech-bg-20260617-2x.png") type("image/png") 1x
    );
  }
}
@media (max-width: 1709px) and (max-height: 962px) {
  body:not(.home-mode)::before {
    background-image: image-set(
      url("assets/ui/home-tech-bg-20260617-q92-w1920-3a6811a08cee.webp") type("image/webp") 1x,
      url("assets/ui/home-tech-bg-20260617-q92-w2560-8f6333599f23.webp") type("image/webp") 1.333024x,
      url("assets/ui/home-tech-bg-20260617-q92-w3344-da81b40effee.webp") type("image/webp") 1.740980x,
      url("assets/ui/home-tech-bg-20260617-2x.png") type("image/png") 1x
    );
  }
}
@media (max-width: 1139px) and (max-height: 641px) {
  body:not(.home-mode)::before {
    background-image: image-set(
      url("assets/ui/home-tech-bg-20260617-q92-w1280-981a0d6836e6.webp") type("image/webp") 1x,
      url("assets/ui/home-tech-bg-20260617-q92-w1920-3a6811a08cee.webp") type("image/webp") 1.500000x,
      url("assets/ui/home-tech-bg-20260617-q92-w2560-8f6333599f23.webp") type("image/webp") 2x,
      url("assets/ui/home-tech-bg-20260617-q92-w3344-da81b40effee.webp") type("image/webp") 2.612500x,
      url("assets/ui/home-tech-bg-20260617-2x.png") type("image/png") 1x
    );
  }
}
/* FC-PERF-WEBP-A-END */

body:not(.home-mode)::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(2, 8, 16, 0.56), rgba(2, 8, 16, 0.22) 44%, rgba(2, 8, 16, 0.70)),
    radial-gradient(ellipse at 50% 46%, transparent 0 46%, rgba(0, 0, 0, 0.38) 100%);
}

body:not(.home-mode) .app-shell {
  background: transparent;
}

body:not(.home-mode) .main {
  background: transparent;
}

body:not(.home-mode) .sidebar {
  border-right: 1px solid rgba(126, 211, 242, 0.18);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.018)),
    rgba(4, 14, 22, 0.78);
  -webkit-backdrop-filter: blur(26px) saturate(145%);
  backdrop-filter: blur(26px) saturate(145%);
  box-shadow: 16px 0 70px rgba(0, 0, 0, 0.26);
}

body:not(.home-mode) .brand,
body:not(.home-mode) .nav-item,
body:not(.home-mode) .sidebar-account {
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

body:not(.home-mode) .brand-mark,
body:not(.home-mode) .account-avatar {
  background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(143, 222, 247, 0.78));
  color: #06131d;
  box-shadow: 0 0 24px rgba(91, 200, 239, 0.18);
}

body:not(.home-mode) .nav-item {
  color: rgba(237, 250, 255, 0.86);
}

body:not(.home-mode) .nav-item:hover,
body:not(.home-mode) .nav-item.active,
body:not(.home-mode) .brand:hover {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.09), rgba(255,255,255,0.026)),
    rgba(60, 146, 180, 0.13);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
}

body:not(.home-mode) .nav-item:active,
body:not(.home-mode) button:active {
  transform: translateY(1px) scale(0.992);
}

body:not(.home-mode) .sidebar-account,
body:not(.home-mode) .account-popover,
body:not(.home-mode) .home-account-badge {
  border-color: rgba(151, 223, 248, 0.26);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.12), rgba(255,255,255,0.032)),
    rgba(7, 24, 36, 0.64);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
}

body:not(.home-mode) .account-popover {
  color: var(--ink);
  box-shadow: 0 26px 72px rgba(0, 0, 0, 0.34);
}

body:not(.home-mode) .topbar {
  position: sticky;
  top: 14px;
  z-index: 30;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid rgba(126, 211, 242, 0.22);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.075), rgba(255,255,255,0.024)),
    rgba(5, 19, 30, 0.66);
  -webkit-backdrop-filter: blur(26px) saturate(150%);
  backdrop-filter: blur(26px) saturate(150%);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
}

body:not(.home-mode) .topbar h1,
body:not(.home-mode) h1,
body:not(.home-mode) h2,
body:not(.home-mode) h3,
body:not(.home-mode) strong,
body:not(.home-mode) label {
  color: var(--ink);
}

body:not(.home-mode) .topbar p,
body:not(.home-mode) small,
body:not(.home-mode) p,
body:not(.home-mode) .detail-body,
body:not(.home-mode) .asset-folder small,
body:not(.home-mode) .content-lanes p,
body:not(.home-mode) .review-board p {
  color: var(--muted);
}

body:not(.home-mode) :is(
  .panel,
  .metric,
  .quick-grid button,
  .work-flow-card,
  .step,
  .summary-pill,
  .upload-preview-row,
  .asset-folder,
  .review-board article,
  .content-lanes div,
  .case-card,
  .project-time-card,
  .project-kpi-card,
  .project-list-panel,
  .project-cockpit-panel,
  .project-card,
  .project-cockpit-card,
  .project-mini-asset-card,
  .project-placeholder-asset-card,
  .project-materials-panel,
  .project-ai-detail-panel section,
  .project-todo-toolbar,
  .project-todo-card,
  .project-todo-stat,
  .project-todo-stat-card,
  .project-todo-category-stat,
  .project-todo-detail-item,
  .project-todo-item,
  .project-reference-detail-panel,
  .project-ai-detail-panel,
  .project-marketing-detail-panel,
  .project-site-material-overview,
  .project-site-stage-summary,
  .project-site-stage-window,
  .project-design-space-window,
  .project-design-space-contract,
  .project-design-space-image-card,
  .project-design-space-empty-upload,
  .project-module-summary,
  .project-module-info-list,
  .project-message-item,
  .project-message-empty,
  .construction-task-modal-card,
  .construction-task-modal-summary div,
  .ai-mgmt-topbar,
  .trial-guardrail-panel,
  .ai-branch-strip,
  .system-backstage-panel,
  .ai-main-flow-card,
  .ai-metric-card,
  .ad-field-card,
  .ad-result-card,
  .ad-candidate-card,
  .flow-canvas,
  .flow-node,
  .flow-detail-panel,
  .radar-card,
  .ops-canvas-panel,
  .ops-output-card,
  .video-publish-workflow-panel,
  .video-publish-output-card,
  .video-record-card,
  .video-resource-card,
  .aigen-field-card,
  .aigen-library-card,
  .aigen-video-card,
  .ai-assist-canvas-card,
  .ai-assist-output-card,
  .quote-template-board,
  .quote-template-totals span,
  .quote-output-cards article,
  .quote-config-multi,
  .quote-readonly-bridge,
  .quote-card-preview,
  .quote-template-export-preview,
  .quote-template-architecture,
  .quote-template-settings,
  .system-settings-summary span,
  .system-settings-guardrail,
  .owner-backoffice-nav,
  .owner-prompt-editor,
  .owner-account-admin,
  .system-settings-detail,
  .system-settings-category-nav,
  .admin-prompt-name-list,
  .system-quote-grid,
  .system-settings-level2-card
) {
  position: relative;
  border-color: var(--tech-glass-border);
  background: var(--tech-glass-bg);
  -webkit-backdrop-filter: blur(22px) saturate(145%) contrast(1.04);
  backdrop-filter: blur(22px) saturate(145%) contrast(1.04);
  box-shadow:
    inset 0 1px 0 var(--tech-glass-highlight),
    inset 0 -1px 0 rgba(255,255,255,0.045),
    0 22px 68px rgba(0, 0, 0, 0.26);
}

body:not(.home-mode) :is(.panel, .metric, .work-flow-card, .ai-main-flow-card, .project-card, .project-cockpit-card, .case-card, .quote-template-board, .system-settings-level2-card)::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  pointer-events: none;
  border: 1px solid rgba(224, 250, 255, 0.07);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.075), transparent 35%),
    radial-gradient(ellipse at 86% 86%, rgba(75, 184, 225, 0.07), transparent 52%);
}

body:not(.home-mode) :is(.panel, .metric, .work-flow-card, .ai-main-flow-card, .project-card, .project-cockpit-card, .case-card, .quote-template-board, .system-settings-level2-card) > * {
  position: relative;
  z-index: 1;
}

body:not(.home-mode) :is(.project-card, .project-kpi-card, .project-mini-asset-card, .ai-metric-card, .radar-card, .case-card, .quick-grid button, .work-flow-card):hover,
body:not(.home-mode) :is(.project-card, .project-kpi-card, .project-mini-asset-card, .ai-metric-card, .radar-card, .case-card, .quick-grid button, .work-flow-card):focus-visible {
  border-color: rgba(112, 220, 246, 0.58);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    0 0 0 1px rgba(82,210,244,0.07),
    0 26px 78px rgba(0, 0, 0, 0.32),
    0 0 38px rgba(72, 185, 230, 0.08);
}

body:not(.home-mode) :is(.project-filter-chip, .project-user-menu, .quote-template-select select, input, select, textarea) {
  border-color: rgba(126, 211, 242, 0.24);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.075), rgba(255,255,255,0.022)),
    rgba(5, 18, 28, 0.68);
  color: var(--ink);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
  backdrop-filter: blur(16px) saturate(130%);
}

body:not(.home-mode) :is(input, select, textarea)::placeholder {
  color: rgba(198, 224, 235, 0.46);
}

body:not(.home-mode) :is(input, select, textarea):focus {
  outline: 2px solid rgba(112, 220, 246, 0.34);
  outline-offset: 2px;
  border-color: rgba(112, 220, 246, 0.60);
}

body:not(.home-mode) :is(.primary-action, .ghost, .quick-grid button, .segmented button, .project-alert-button, .project-list-page-controls button, .quote-step-nav button, .system-settings-rolebar button, .owner-backoffice-nav button, .admin-prompt-name-list button, .system-settings-category-nav button) {
  border-color: rgba(126, 211, 242, 0.26);
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.088), rgba(255,255,255,0.024)),
    rgba(8, 25, 38, 0.68);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
}

body:not(.home-mode) .primary-action,
body:not(.home-mode) :is(.segmented .selected, .quote-step-nav button.active, .system-settings-rolebar button.active, .owner-backoffice-nav button.active, .system-settings-category-nav button.active) {
  border-color: rgba(122, 223, 250, 0.58);
  background:
    linear-gradient(135deg, rgba(96, 196, 236, 0.30), rgba(44, 128, 176, 0.18)),
    rgba(8, 31, 48, 0.82);
  color: #f4fdff;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    0 0 28px rgba(71, 185, 232, 0.12);
}

body:not(.home-mode) :is(.segmented button.selected, .segmented .selected) {
  border-color: rgba(126, 230, 255, 0.96);
  background:
    linear-gradient(180deg, rgba(24, 85, 101, 0.96), rgba(5, 35, 48, 0.98)),
    radial-gradient(circle at 20% 0%, rgba(117, 220, 248, 0.22), transparent 48%);
  color: rgba(244, 253, 255, 0.98);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.10),
    0 0 0 2px rgba(85, 203, 234, 0.26),
    0 14px 30px rgba(0, 0, 0, 0.22);
}

body:not(.home-mode) #ai .segmented button.selected {
  border-color: rgba(126, 230, 255, 0.96) !important;
  background:
    linear-gradient(180deg, rgba(24, 85, 101, 0.96), rgba(5, 35, 48, 0.98)),
    radial-gradient(circle at 20% 0%, rgba(117, 220, 248, 0.22), transparent 48%) !important;
  color: rgba(244, 253, 255, 0.98) !important;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.10),
    0 0 0 2px rgba(85, 203, 234, 0.26),
    0 14px 30px rgba(0, 0, 0, 0.22) !important;
}

/* DECOR8-D06: deepen only the shared AI secondary-tab selection using existing
   technology-glass tokens. Local comparison, not a separately approved swatch. */
html:not([data-meifan-theme="day"]) body:not(.home-mode) #aiSubTabs button.selected {
  background: var(--mf-theme-card-strong) !important;
  color: var(--mf-theme-ink-strong) !important;
  border-color: var(--mf-theme-line-strong) !important;
}

body:not(.home-mode) :is(.ghost:hover, .quick-grid button:hover, .segmented button:hover, .project-list-page-controls button:hover:not(:disabled), .quote-step-nav button:hover) {
  border-color: rgba(112, 220, 246, 0.62);
  color: #f4fdff;
}

/* DAY-CONTRAST-FIX-20260726 · 全局底座 B —— 全站禁用按钮。
   缺口: 09 全库原先零 `:disabled` 处理,凡是没有专属规则的禁用按钮一律落 UA 默认
   `color: rgba(16,16,16,.3)`(实测「公司节点默认」弹窗「清除默认」即为此色) —— 压夜底 ratio 1.27,
   压白天浅底同样糊。这里只补【没人管】的那部分: 不加 !important、特异度仅 (0,2,1),
   任何已有专属禁用样式(如 .settings-account-r3-nav button:disabled 的 opacity 方案)仍照旧胜出。
   白天对应覆盖在 css/42(day 前缀,特异度更高)。
   ⚠ 为什么连 background 一起给: UA 默认还塞了 `background: rgba(239,239,239,.3)`,半透明灰块压在
   深底面板上合成出中灰(实测 L50=0.135) —— 只改文字色的话,要压过这块中灰得把字提到近白,
   禁用态就看着跟可用态一样了。把这块 UA 灰块清掉、让按钮落回所在面板真实底色,
   再配一档柔和浅字,禁用语义与可读性才能同时成立。仍是纯色值声明,不动尺寸/布局/结构。 */
body:not(.home-mode) button:disabled {
  background: transparent;
  color: rgba(198, 224, 235, 0.6);
}

body:not(.home-mode) :is(.table-wrap, .quote-template-scroll, .owner-account-table, .system-feature-map-table) {
  border-color: rgba(126, 211, 242, 0.18);
}

body:not(.home-mode) :is(table, .quote-template-table, .system-feature-map-table) {
  color: var(--ink);
}

body:not(.home-mode) :is(th, .quote-template-table th, .system-feature-map-table th) {
  color: rgba(218, 242, 250, 0.78);
  background: rgba(10, 34, 50, 0.78);
}

body:not(.home-mode) :is(td, .quote-template-table td, .system-feature-map-table td) {
  color: rgba(239, 251, 255, 0.86);
  border-color: rgba(126, 211, 242, 0.16);
}

body:not(.home-mode) :is(.status-pill, .badge, .status) {
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.07);
  color: rgba(231, 247, 252, 0.84);
}

body:not(.home-mode) .status-pill.ready,
body:not(.home-mode) .badge,
body:not(.home-mode) .status {
  background: rgba(89, 205, 171, 0.13);
  color: #8ae9ce;
}

body:not(.home-mode) .status-pill.review,
body:not(.home-mode) .status-pill.warn {
  background: rgba(231, 180, 95, 0.15);
  color: #ffd994;
}

body:not(.home-mode) .status-pill.pending,
body:not(.home-mode) .status-pill.static {
  background: rgba(173, 209, 222, 0.11);
  color: rgba(224, 243, 249, 0.72);
}

body:not(.home-mode) .status-pill.internal {
  background: rgba(112, 216, 246, 0.13);
  color: #9fe8ff;
}

body:not(.home-mode) .status-pill.blocked,
body:not(.home-mode) .status-pill.urgent {
  background: rgba(236, 119, 113, 0.14);
  color: #ffaaa5;
}

body:not(.home-mode) :is(
  .project-create-modal,
  .project-message-center,
  .project-dashboard-upload-modal,
  .project-module-detail-modal,
  .project-task-list-modal,
  .construction-task-modal,
  .project-material-preview-modal,
  .project-edit-modal,
  .project-review-modal,
  .case-share-modal,
  .ai-assist-modal,
  .video-disclaimer-modal
) {
  background:
    radial-gradient(ellipse at 50% 35%, rgba(70, 181, 230, 0.16), transparent 48%),
    rgba(1, 6, 12, 0.68);
  -webkit-backdrop-filter: blur(16px) saturate(125%);
  backdrop-filter: blur(16px) saturate(125%);
}

body:not(.home-mode) :is(
  .project-create-dialog,
  .project-message-dialog,
  .project-dashboard-upload-dialog,
  .project-module-detail-dialog,
  .project-task-list-dialog,
  .construction-task-dialog,
  .project-material-preview-dialog,
  .project-edit-dialog,
  .project-review-dialog,
  .case-share-dialog,
  .ai-assist-modal-card,
  .video-disclaimer-card
) {
  border: 1px solid rgba(126, 211, 242, 0.34);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.10), rgba(255,255,255,0.026) 38%, rgba(56,174,218,0.052) 100%),
    rgba(5, 19, 30, 0.84);
  color: var(--ink);
  -webkit-backdrop-filter: blur(30px) saturate(150%) contrast(1.05);
  backdrop-filter: blur(30px) saturate(150%) contrast(1.05);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    0 34px 96px rgba(0,0,0,0.46);
}

body:not(.home-mode) .project-modal-head {
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(126, 211, 242, 0.16);
}

body:not(.home-mode) :is(.toast, .ops-canvas-toast) {
  border: 1px solid rgba(126, 211, 242, 0.34);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.12), rgba(255,255,255,0.035)),
    rgba(5, 19, 30, 0.88);
  color: var(--ink);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 24px 70px rgba(0,0,0,0.38);
}

body:not(.home-mode) :is(.project-empty-state, .ad-validation-box, .ad-validation-box.ok, .project-site-stage-empty-upload, .quote-output-cards article.internal, .quote-template-internal, .danger) {
  border-color: rgba(126, 211, 242, 0.24);
  background: rgba(9, 27, 40, 0.66);
  color: var(--muted);
}

body:not(.home-mode) .quote-meifan-final-shell,
body:not(.home-mode) .quote-meifan-final-frame {
  background: rgba(5, 16, 24, 0.62);
}

body:not(.home-mode) .quote-template-board {
  border-color: rgba(126, 211, 242, 0.34);
  background:
    linear-gradient(145deg, rgba(255,255,255,0.078), rgba(255,255,255,0.020) 42%, rgba(70,181,230,0.052)),
    rgba(5, 18, 28, 0.78);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.16),
    inset 0 -1px 0 rgba(255,255,255,0.045),
    0 24px 70px rgba(0, 0, 0, 0.34);
}

body:not(.home-mode) :is(
  .quote-template-board-head,
  .quote-step-nav,
  .quote-step-panel,
  .quote-template-scroll,
  .quote-output-cards,
  .quote-template-meta,
  .quote-template-settings
) {
  background: transparent;
}

body:not(.home-mode) .quote-template-board-head {
  border-bottom-color: rgba(126, 211, 242, 0.18);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.075), rgba(255,255,255,0.020)),
    rgba(6, 20, 31, 0.66);
}

body:not(.home-mode) .quote-step-nav {
  border-bottom-color: rgba(126, 211, 242, 0.18);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.050), rgba(255,255,255,0.012)),
    rgba(4, 16, 25, 0.62);
}

body:not(.home-mode) .quote-step-nav button {
  border-right-color: rgba(126, 211, 242, 0.18);
}

body:not(.home-mode) .quote-template-board-head h2,
body:not(.home-mode) .quote-template-board-head h3,
body:not(.home-mode) .quote-template-inputs label,
body:not(.home-mode) .quote-config-grid label,
body:not(.home-mode) .quote-config-multi,
body:not(.home-mode) .quote-operable-section-head h3,
body:not(.home-mode) .quote-template-table td,
body:not(.home-mode) .quote-card-preview strong,
body:not(.home-mode) .quote-card-preview p,
body:not(.home-mode) .quote-template-architecture strong {
  color: rgba(239, 251, 255, 0.90);
}

body:not(.home-mode) .quote-template-board-head small,
body:not(.home-mode) .quote-template-inputs small,
body:not(.home-mode) .quote-operable-section-head span,
body:not(.home-mode) .quote-template-meta,
body:not(.home-mode) .quote-card-preview,
body:not(.home-mode) .quote-template-export-preview,
body:not(.home-mode) .quote-template-architecture span {
  color: rgba(193, 222, 234, 0.68);
}

body:not(.home-mode) :is(
  .quote-template-totals span,
  .quote-output-cards article,
  .quote-config-multi,
  .quote-readonly-bridge,
  .quote-card-preview,
  .quote-template-export-preview,
  .quote-template-architecture
) {
  border-color: rgba(126, 211, 242, 0.24);
  background:
    linear-gradient(145deg, rgba(255,255,255,0.075), rgba(255,255,255,0.018)),
    rgba(7, 24, 36, 0.72);
  color: rgba(193, 222, 234, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.12),
    0 16px 42px rgba(0,0,0,0.18);
}

body:not(.home-mode) :is(.quote-template-totals strong, .quote-output-cards strong) {
  color: #f4fdff;
}

body:not(.home-mode) .quote-output-cards article.internal,
body:not(.home-mode) .quote-template-internal,
body:not(.home-mode) .danger {
  border-color: rgba(231, 180, 95, 0.24);
  background: rgba(231, 180, 95, 0.10);
  color: #ffd994;
}

body:not(.home-mode) .quote-template-table th {
  background: rgba(10, 34, 50, 0.86);
  color: rgba(218, 242, 250, 0.80);
  border-bottom-color: rgba(126, 211, 242, 0.20);
}

body:not(.home-mode) .quote-template-table td {
  border-bottom-color: rgba(126, 211, 242, 0.14);
}

body:not(.home-mode) .quote-template-select select,
body:not(.home-mode) .quote-template-inputs input,
body:not(.home-mode) .quote-template-inputs select,
body:not(.home-mode) .quote-config-grid input,
body:not(.home-mode) .quote-config-grid select,
body:not(.home-mode) .quote-detail-editor input {
  border-color: rgba(126, 211, 242, 0.24);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.075), rgba(255,255,255,0.022)),
    rgba(5, 18, 28, 0.72);
  color: rgba(239, 251, 255, 0.90);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

body:not(.home-mode) .quote-template-select select:focus,
body:not(.home-mode) .quote-template-inputs input:focus,
body:not(.home-mode) .quote-template-inputs select:focus,
body:not(.home-mode) .quote-config-grid input:focus,
body:not(.home-mode) .quote-config-grid select:focus,
body:not(.home-mode) .quote-detail-editor input:focus {
  outline: 2px solid rgba(112, 220, 246, 0.34);
  outline-offset: 2px;
  border-color: rgba(112, 220, 246, 0.60);
}

body:not(.home-mode) .quote-meifan-final-shell {
  border: 1px solid rgba(126, 211, 242, 0.22);
  background:
    linear-gradient(145deg, rgba(255,255,255,0.052), rgba(255,255,255,0.014)),
    rgba(4, 16, 25, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.12),
    0 22px 68px rgba(0,0,0,0.26);
}

body:not(.home-mode) .quote-meifan-final-frame {
  background: transparent;
}

body:not(.home-mode) .flow-canvas {
  background:
    radial-gradient(ellipse at 70% 20%, rgba(82, 183, 225, 0.10), transparent 42%),
    linear-gradient(145deg, rgba(255,255,255,0.052), rgba(255,255,255,0.016)),
    rgba(5, 18, 28, 0.72);
}

body:not(.home-mode) .flow-edge-layer path {
  stroke: rgba(126, 211, 242, 0.46);
}

body:not(.home-mode) .flow-edge-layer text {
  fill: rgba(218, 242, 250, 0.72);
  stroke: rgba(4, 15, 24, 0.92);
}

body:not(.home-mode) .project-card.selected,
body:not(.home-mode) .project-kpi-card.selected {
  border-color: rgba(112, 220, 246, 0.68);
  box-shadow:
    inset 3px 0 0 rgba(112, 220, 246, 0.86),
    inset 0 1px 0 rgba(255,255,255,0.16),
    0 24px 72px rgba(0,0,0,0.30);
}

/* GLOBAL-UI-READABILITY-REPAIR-20260617: keep light business workspaces readable inside the dark glass shell. */
body:not(.home-mode) {
  --light-ink: #102635;
  --light-ink-strong: #071925;
  --light-muted: #4c6572;
  --light-soft: #6f838c;
  --light-line: rgba(28, 86, 112, 0.18);
  --light-card-bg:
    linear-gradient(145deg, rgba(255,255,255,0.98), rgba(235,246,250,0.92)),
    rgba(249, 252, 253, 0.94);
}

body:not(.home-mode) :is(
  .ai-hierarchy-banner,
  .aigen-product-left,
  .aigen-product-stage,
  .aigen-product-right,
  .aigen-video-library,
  .aigen-drop-hint,
  .aigen-draft-preview,
  .aigen-flow-node,
  .aigen-flow-node *,
  .aigen-generated-slot-grid,
  .ai-board-main,
  .ai-board-shell,
  .ai-board-toolbar,
  .ai-board-sidebar,
  .ai-board-layer-panel,
  .project-cockpit-head,
  .project-cockpit-head *,
  .project-mini-assets,
  .project-mini-asset-card,
  .project-mini-asset-card *,
  .project-placeholder-asset-card,
  .project-placeholder-asset-card *,
  .project-mini-asset-preview,
  .project-mini-asset-preview *,
  .project-upload-slot,
  .project-upload-slot *,
  .project-ai-material-action,
  .project-ai-material-action *,
  .project-ai-library-stat-card,
  .project-ai-library-stat-card *,
  .project-library-stat-card,
  .project-library-stat-card *,
  .project-content-library-stat-card,
  .project-content-library-stat-card *,
  .project-ai-latest-preview,
  .project-ai-latest-preview *,
  .construction-summary-card,
  .construction-summary-card *,
  .construction-task-dropzone,
  .construction-task-dropzone *,
  .project-design-space-image,
  .project-design-space-image *,
  .project-main-flow-panel > header,
  .project-main-flow-panel > header *,
  .case-share-filters,
  .case-share-filters *,
  .case-share-card,
  .case-share-card *,
  .case-share-empty,
  .case-share-detail-section,
  .case-share-detail-section *,
  .case-share-edit-form,
  .case-share-edit-form *,
  .flow-canvas-stage .flow-node,
  .flow-canvas-stage .flow-node *,
  .video-publish-node,
  .video-publish-node *
) {
  color: var(--light-ink);
  text-shadow: none;
}

body:not(.home-mode) :is(
  .ai-hierarchy-banner,
  .aigen-product-left,
  .aigen-product-stage,
  .aigen-product-right,
  .aigen-video-library,
  .aigen-flow-node,
  .project-cockpit-head,
  .project-mini-asset-card,
  .project-placeholder-asset-card,
  .project-upload-slot,
  .project-ai-library-stat-card,
  .project-library-stat-card,
  .project-content-library-stat-card,
  .project-ai-latest-preview,
  .construction-summary-card,
  .construction-task-dropzone,
  .project-design-space-image,
  .case-share-filters,
  .case-share-card,
  .case-share-detail-section,
  .case-share-edit-form,
  .video-publish-node
) :is(h1, h2, h3, h4, strong, b, label, span, button) {
  color: var(--light-ink-strong);
  text-shadow: none;
}

body:not(.home-mode) :is(
  .ai-hierarchy-banner,
  .aigen-product-left,
  .aigen-product-stage,
  .aigen-product-right,
  .aigen-video-library,
  .aigen-flow-node,
  .project-cockpit-head,
  .project-mini-asset-card,
  .project-placeholder-asset-card,
  .project-upload-slot,
  .project-ai-library-stat-card,
  .project-library-stat-card,
  .project-content-library-stat-card,
  .project-ai-latest-preview,
  .construction-summary-card,
  .construction-task-dropzone,
  .project-design-space-image,
  .case-share-filters,
  .case-share-card,
  .case-share-detail-section,
  .case-share-edit-form,
  .video-publish-node
) :is(p, small, em, time, dd, dt) {
  color: var(--light-muted);
  text-shadow: none;
}

body:not(.home-mode) :is(
  .aigen-flow-node,
  .project-mini-asset-card,
  .project-placeholder-asset-card,
  .project-upload-slot,
  .project-ai-library-stat-card,
  .project-library-stat-card,
  .project-content-library-stat-card,
  .project-ai-latest-preview,
  .construction-summary-card,
  .construction-task-dropzone,
  .case-share-card,
  .case-share-filters,
  .video-publish-node
) {
  border-color: var(--light-line);
  background: var(--light-card-bg);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.72),
    0 16px 34px rgba(0, 0, 0, 0.14);
}

body:not(.home-mode) :is(.aigen-flow-node.active, .project-mini-asset-card:hover, .case-share-card:hover) {
  border-color: rgba(71, 181, 222, 0.58);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.78),
    0 0 0 1px rgba(71,181,222,0.14),
    0 18px 42px rgba(0, 0, 0, 0.18);
}

body:not(.home-mode) :is(.aigen-flow-node b, .video-publish-node b, .case-share-cover b) {
  color: #f3fdff;
}

body:not(.home-mode) :is(
  .panel,
  .project-list-panel,
  .project-cockpit-panel,
  .project-cockpit-card,
  .ops-canvas-panel,
  .video-publish-workflow-panel,
  .system-settings-detail,
  .quote-template-board,
  .case-share-dialog,
  .project-create-dialog,
  .project-dashboard-upload-dialog
) :is(p, small, .detail-body) {
  color: rgba(218, 242, 250, 0.78);
}

body:not(.home-mode) :is(
  .case-share-filters input,
  .case-share-filters select,
  .aigen-product-left input,
  .aigen-product-left select,
  .aigen-product-left textarea,
  .case-share-edit-form input,
  .case-share-edit-form select,
  .case-share-edit-form textarea
) {
  color: var(--ink) !important;
}

body:not(.home-mode) :is(.case-share-filters input, .case-share-filters select)::placeholder,
body:not(.home-mode) :is(.aigen-product-left input, .aigen-product-left textarea)::placeholder,
body:not(.home-mode) :is(.case-share-edit-form input, .case-share-edit-form textarea)::placeholder {
  color: rgba(218, 242, 250, 0.58);
}

body:not(.home-mode) :is(
  .aigen-flow-node small,
  .case-share-card small,
  .project-mini-asset-card small,
  .project-placeholder-asset-card small,
  .project-upload-slot small,
  .project-ai-library-stat-card small,
  .project-library-stat-card small,
  .project-content-library-stat-card small,
  .project-ai-latest-preview small,
  .construction-summary-card small,
  .construction-task-dropzone small,
  .video-publish-node small,
  .flow-canvas-stage .flow-node small
) {
  color: var(--light-muted) !important;
}

body:not(.home-mode) :is(.project-cockpit-head h3, .project-cockpit-head h3 span, .project-cockpit-head strong) {
  color: #effbff !important;
}

body:not(.home-mode) :is(.project-cockpit-head p, .project-cockpit-head small, .project-cockpit-meta, .project-cockpit-meta span) {
  color: rgba(218, 242, 250, 0.76) !important;
}

body:not(.home-mode) :is(
  .aiboard-topbar,
  .aiboard-topbar *,
  .library-panel,
  .library-panel *,
  .layer-panel,
  .layer-panel *,
  .canvas-toolbar,
  .canvas-toolbar *,
  .bottom-panel,
  .bottom-panel *,
  .crop-panel,
  .crop-panel *,
  .modal-card,
  .modal-card *,
  .saved-drawer,
  .saved-drawer *,
  .selected-info,
  .selected-info *,
  .empty-state,
  .empty-state *
) {
  color: #1f2523;
  text-shadow: none;
}

body:not(.home-mode) :is(
  .aiboard-title h1,
  .panel-title h2,
  .library-item strong,
  .layer-row strong,
  .insert-choice strong,
  .image-meta strong,
  .saved-card strong,
  .empty-state strong,
  .modal-card h2
) {
  color: #1f2523 !important;
}

body:not(.home-mode) :is(
  .aiboard-title small,
  .library-item small,
  .layer-row small,
  .insert-choice small,
  .image-meta,
  .selected-info,
  .tool-hint,
  .bottom-grid label,
  .project-meta,
  .board-summary,
  .modal-card label,
  .modal-card p,
  .saved-card small,
  .empty-state
) {
  color: #66716d !important;
}

body:not(.home-mode) :is(.aiboard-shell input, .aiboard-shell select, .aiboard-shell textarea) {
  color: #1f2523 !important;
  background: #fff;
}

/* GLOBAL-UI-DARK-GLASS-ROLLBACK-20260617: Zhang Gong approved dark glass as the default surface. */
body:not(.home-mode) {
  --glass-ink: #e8f6fb;
  --glass-ink-strong: #f1fbff;
  --glass-muted: rgba(207, 230, 238, 0.74);
  --glass-muted-soft: rgba(207, 230, 238, 0.58);
  --glass-line: rgba(126, 211, 242, 0.28);
  --glass-dark-card:
    linear-gradient(145deg, rgba(255,255,255,0.086), rgba(255,255,255,0.024) 42%, rgba(70,185,230,0.052) 100%),
    linear-gradient(320deg, rgba(2,12,22,0.84), rgba(7,37,56,0.70)),
    rgba(5, 19, 30, 0.76);
  --glass-dark-card-strong:
    linear-gradient(145deg, rgba(255,255,255,0.11), rgba(255,255,255,0.032) 42%, rgba(70,185,230,0.064) 100%),
    rgba(7, 25, 38, 0.88);
}

body:not(.home-mode) :is(
  .project-cockpit-head,
  .project-main-flow-panel > header,
  .project-cockpit-card,
  .project-mini-asset-card,
  .project-placeholder-asset-card,
  .project-upload-slot,
  .project-ai-material-action,
  .project-ai-library-stat-card,
  .project-library-stat-card,
  .project-content-library-stat-card,
  .project-ai-latest-preview,
  .construction-summary-card,
  .construction-task-dropzone,
  .project-design-space-image,
  .project-materials-panel,
  .project-materials-detail section,
  .project-material-archive-window,
  .project-material-subwindow,
  .project-module-record,
  .project-site-stage-window,
  .project-design-space-window,
  .aigen-product-left,
  .aigen-product-stage,
  .aigen-product-right,
  .aigen-video-library,
  .aigen-drop-hint,
  .aigen-draft-preview,
  .aigen-field-card,
  .aigen-library-card,
  .aigen-flow-node,
  .aigen-generated-slot-grid i,
  .ai-assist-canvas-card,
  .ai-assist-output-card,
  .ai-assist-output-node,
  .ai-assist-output-item,
  .ai-assist-output-empty,
  .video-publish-node,
  .case-share-filters,
  .case-share-card,
  .case-share-detail-section,
  .case-share-edit-form
) {
  border-color: var(--glass-line) !important;
  background: var(--glass-dark-card) !important;
  color: var(--glass-ink) !important;
  -webkit-backdrop-filter: blur(22px) saturate(145%) contrast(1.04);
  backdrop-filter: blur(22px) saturate(145%) contrast(1.04);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.13),
    inset 0 -1px 0 rgba(255,255,255,0.04),
    0 18px 52px rgba(0,0,0,0.24) !important;
}

body:not(.home-mode) :is(
  .project-cockpit-head,
  .project-main-flow-panel > header,
  .project-cockpit-card,
  .project-mini-asset-card,
  .project-placeholder-asset-card,
  .project-upload-slot,
  .project-ai-material-action,
  .project-ai-library-stat-card,
  .project-library-stat-card,
  .project-content-library-stat-card,
  .project-ai-latest-preview,
  .construction-summary-card,
  .construction-task-dropzone,
  .project-design-space-image,
  .project-materials-panel,
  .project-materials-detail section,
  .project-material-archive-window,
  .project-material-subwindow,
  .project-module-record,
  .project-site-stage-window,
  .project-design-space-window,
  .aigen-product-left,
  .aigen-product-stage,
  .aigen-product-right,
  .aigen-video-library,
  .aigen-drop-hint,
  .aigen-draft-preview,
  .aigen-field-card,
  .aigen-library-card,
  .aigen-flow-node,
  .ai-assist-canvas-card,
  .ai-assist-output-card,
  .ai-assist-output-node,
  .ai-assist-output-item,
  .ai-assist-output-empty,
  .video-publish-node,
  .case-share-filters,
  .case-share-card,
  .case-share-detail-section,
  .case-share-edit-form
) :is(h1, h2, h3, h4, h5, strong, b, label, span, button, dd, dt) {
  color: var(--glass-ink) !important;
  text-shadow: none !important;
}

body:not(.home-mode) :is(
  .project-cockpit-head,
  .project-main-flow-panel > header,
  .project-cockpit-card,
  .project-mini-asset-card,
  .project-placeholder-asset-card,
  .project-upload-slot,
  .project-ai-library-stat-card,
  .project-library-stat-card,
  .project-content-library-stat-card,
  .project-ai-latest-preview,
  .construction-summary-card,
  .construction-task-dropzone,
  .project-materials-panel,
  .project-materials-detail section,
  .project-material-archive-window,
  .project-material-subwindow,
  .project-module-record,
  .aigen-product-left,
  .aigen-product-stage,
  .aigen-product-right,
  .aigen-video-library,
  .aigen-flow-node,
  .ai-assist-canvas-card,
  .ai-assist-output-card,
  .ai-assist-output-node,
  .ai-assist-output-item,
  .video-publish-node,
  .case-share-filters,
  .case-share-card
) :is(p, small, em, time, li, .detail-body) {
  color: var(--glass-muted) !important;
  text-shadow: none !important;
}

body:not(.home-mode) :is(
  .project-mini-asset-preview,
  .project-mini-assets figure > span,
  .project-placeholder-asset-card .project-mini-asset-preview,
  .project-content-library-media-grid,
  .project-ai-latest-preview,
  .construction-task-dropzone,
  .aigen-generated-slot-grid i
) {
  border-color: rgba(126, 211, 242, 0.22) !important;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.064), rgba(255,255,255,0.018)),
    rgba(7, 24, 36, 0.68) !important;
  color: var(--glass-muted) !important;
}

body:not(.home-mode) :is(.project-mini-asset-preview img, .project-mini-assets img) {
  background: transparent !important;
}

body:not(.home-mode) :is(.project-upload-slot b, .aigen-flow-node b, .video-publish-node b) {
  color: #06131d !important;
  background: linear-gradient(135deg, rgba(232, 248, 252, 0.96), rgba(124, 218, 248, 0.78)) !important;
}

body:not(.home-mode) :is(
  .project-ai-material-action,
  .project-cockpit-actions button,
  .project-mini-asset-preview-button,
  .aigen-product-left input,
  .aigen-product-left select,
  .aigen-product-left textarea,
  .aigen-product-right input,
  .aigen-product-right select,
  .ai-assist-output-item input,
  .case-share-filters input,
  .case-share-filters select,
  .case-share-edit-form input,
  .case-share-edit-form select,
  .case-share-edit-form textarea
) {
  border-color: rgba(126, 211, 242, 0.28) !important;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.082), rgba(255,255,255,0.024)),
    rgba(5, 18, 28, 0.72) !important;
  color: var(--glass-ink) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.11) !important;
}

body:not(.home-mode) :is(.aigen-flow-node.active, .project-mini-asset-card:hover, .project-upload-slot:hover, .case-share-card:hover) {
  border-color: rgba(112, 220, 246, 0.64) !important;
  background: var(--glass-dark-card-strong) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    0 0 0 1px rgba(82,210,244,0.10),
    0 24px 68px rgba(0,0,0,0.32),
    0 0 32px rgba(72,185,230,0.10) !important;
}

body:not(.home-mode) :is(
  .aiboard-shell,
  .aiboard-topbar,
  .library-panel,
  .layer-panel,
  .canvas-zone,
  .canvas-toolbar,
  .canvas-scroll,
  .bottom-panel,
  .crop-panel,
  .modal-card,
  .saved-drawer,
  .selected-info,
  .empty-state
) {
  border-color: var(--glass-line) !important;
  background: var(--glass-dark-card) !important;
  color: var(--glass-ink) !important;
}

body:not(.home-mode) :is(
  .aiboard-topbar *,
  .library-panel *,
  .layer-panel *,
  .canvas-toolbar *,
  .bottom-panel *,
  .crop-panel *,
  .modal-card *,
  .saved-drawer *,
  .selected-info *,
  .empty-state *
) {
  color: var(--glass-ink) !important;
  text-shadow: none !important;
}

body:not(.home-mode) :is(
  .aiboard-title small,
  .library-item small,
  .layer-row small,
  .insert-choice small,
  .image-meta,
  .selected-info,
  .tool-hint,
  .bottom-grid label,
  .project-meta,
  .board-summary,
  .modal-card label,
  .modal-card p,
  .saved-card small,
  .empty-state
) {
  color: var(--glass-muted) !important;
}

body:not(.home-mode) :is(
  .tool-btn,
  .icon-btn,
  .bottom-btn,
  .library-cat,
  .library-item,
  .saved-card,
  .layer-row,
  .insert-choice,
  .layer-toggle,
  .add-library-entry,
  .image-card
) {
  border-color: rgba(126, 211, 242, 0.28) !important;
  background: var(--glass-dark-card) !important;
  color: var(--glass-ink) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.11) !important;
}

body:not(.home-mode) :is(.tool-btn.active, .tool-btn.toggle-on, .layer-row.active, .library-cat.active) {
  border-color: rgba(112, 220, 246, 0.62) !important;
  background:
    linear-gradient(135deg, rgba(96,196,236,0.24), rgba(44,128,176,0.16)),
    rgba(8, 31, 48, 0.82) !important;
  color: var(--glass-ink-strong) !important;
}

body:not(.home-mode) :is(.aiboard-shell input, .aiboard-shell select, .aiboard-shell textarea) {
  border-color: rgba(126, 211, 242, 0.28) !important;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.024)),
    rgba(5, 18, 28, 0.72) !important;
  color: var(--glass-ink) !important;
}

body:not(.home-mode) :is(
  #boardCanvas,
  .library-item svg,
  .saved-card-preview,
  .image-thumb,
  .image-card img,
  .canvas-stage
) {
  color: #1f2523;
}

body:not(.home-mode) .library-item svg,
body:not(.home-mode) .saved-card-preview {
  background: #f7faf9 !important;
}

body:not(.home-mode) #boardCanvas {
  background: #fff !important;
}

/* GLOBAL-UI-PM-DARK-GLASS-GAPS-20260617: close remaining project page light islands. */
body:not(.home-mode) :is(
  .project-brand-title,
  .project-time-card,
  .project-card-thumb,
  .project-card-side,
  .project-card-side em,
  .project-card-progress,
  .project-ai-design-library,
  .project-ai-library-groups,
  .project-ai-library-group,
  .project-ai-library-chips,
  .project-ai-library-chips .project-ai-library-stat-card,
  .project-ai-generated-category-tabs span,
  .project-ai-generated-product-library section,
  .project-ai-latest-preview > span
) {
  border-color: var(--glass-line) !important;
  background: var(--glass-dark-card) !important;
  color: var(--glass-ink) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.12),
    0 14px 38px rgba(0,0,0,0.18) !important;
}

body:not(.home-mode) :is(.project-brand-title, .project-time-card) {
  -webkit-backdrop-filter: blur(22px) saturate(145%) contrast(1.04);
  backdrop-filter: blur(22px) saturate(145%) contrast(1.04);
}

body:not(.home-mode) :is(
  .project-brand-title h2,
  .project-brand-title strong,
  .project-brand-title span,
  .project-clock-time,
  .project-clock-week,
  .project-card-main,
  .project-card-main strong,
  .project-card-side,
  .project-card-side em,
  .project-ai-library-group strong,
  .project-ai-library-chips b,
  .project-ai-generated-category-tabs b
) {
  color: var(--glass-ink) !important;
  text-shadow: none !important;
}

body:not(.home-mode) :is(
  .project-brand-title small,
  .project-clock-date,
  .project-card-main small,
  .project-card-side time,
  .project-ai-library-group small,
  .project-ai-library-chips small,
  .project-ai-design-section small,
  .project-ai-generated-category-tabs span
) {
  color: var(--glass-muted) !important;
  text-shadow: none !important;
}

body:not(.home-mode) .project-brand-title .project-brand-mark,
body:not(.home-mode) .project-card .project-card-side,
body:not(.home-mode) .project-card .project-card-side em {
  border: 1px solid rgba(126,211,242,0.30) !important;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.10), rgba(255,255,255,0.025)),
    rgba(5, 20, 31, 0.82) !important;
  color: var(--glass-ink) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.14),
    0 0 22px rgba(91,200,239,0.12) !important;
}

body:not(.home-mode) .project-ai-design-library :is(
  .project-ai-library-group,
  .project-ai-library-chips,
  .project-ai-library-chips .project-ai-library-stat-card
) {
  background:
    linear-gradient(145deg, rgba(255,255,255,0.085), rgba(255,255,255,0.018)),
    rgba(4, 18, 29, 0.86) !important;
  color: var(--glass-ink) !important;
}

body:not(.home-mode) .project-card-progress {
  height: 4px;
  background:
    linear-gradient(90deg, rgba(112,220,246,0.70), rgba(112,220,246,0.18)),
    rgba(126,211,242,0.12) !important;
}

body:not(.home-mode) .project-card-progress i,
body:not(.home-mode) .project-card-progress span {
  background: rgba(112,220,246,0.86) !important;
}

body:not(.home-mode) .project-ai-latest-preview > span:has(img) {
  background: transparent !important;
  box-shadow: none !important;
}

/* GLOBAL-UI-THEME-PACK-20260618: reusable dark-tech glass theme package for future settings switch. */
:root,
html[data-meifan-theme="tech-glass-blue"] {
  --mf-theme-id: tech-glass-blue;
  --mf-theme-ink: #e8f6fb;
  --mf-theme-ink-strong: #f1fbff;
  --mf-theme-muted: rgba(207, 230, 238, 0.74);
  --mf-theme-muted-soft: rgba(207, 230, 238, 0.58);
  --mf-theme-line: rgba(126, 211, 242, 0.30);
  --mf-theme-line-strong: rgba(126, 211, 242, 0.50);
  --mf-theme-card:
    linear-gradient(145deg, rgba(255,255,255,0.095), rgba(255,255,255,0.024) 44%, rgba(70,185,230,0.055) 100%),
    linear-gradient(318deg, rgba(2,12,22,0.86), rgba(6,33,50,0.74)),
    rgba(5, 19, 30, 0.78);
  --mf-theme-card-strong:
    linear-gradient(145deg, rgba(255,255,255,0.13), rgba(255,255,255,0.032) 42%, rgba(70,185,230,0.08) 100%),
    rgba(6, 24, 37, 0.90);
  --mf-theme-dots:
    radial-gradient(circle, rgba(220,246,255,0.18) 1px, transparent 1.4px),
    linear-gradient(145deg, rgba(6, 28, 43, 0.94), rgba(2, 13, 23, 0.98));
  --mf-theme-glass-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    inset 0 -1px 0 rgba(255,255,255,0.06),
    0 22px 70px rgba(0,0,0,0.34),
    0 0 0 1px rgba(126,211,242,0.08);
}

body:not(.home-mode) {
  --glass-ink: var(--mf-theme-ink);
  --glass-ink-strong: var(--mf-theme-ink-strong);
  --glass-muted: var(--mf-theme-muted);
  --glass-muted-soft: var(--mf-theme-muted-soft);
  --glass-line: var(--mf-theme-line);
  --glass-dark-card: var(--mf-theme-card);
  --glass-dark-card-strong: var(--mf-theme-card-strong);
}

body:not(.home-mode) #ai .ai-hierarchy-banner {
  display: none !important;
}

body:not(.home-mode) #ai .ai-board-inline-panel {
  padding: 12px !important;
  border: 1px solid rgba(126,211,242,0.34) !important;
  border-radius: 14px !important;
  background: var(--mf-theme-card-strong) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.20),
    inset 0 -1px 0 rgba(255,255,255,0.08),
    0 28px 90px rgba(0,0,0,0.36),
    0 0 34px rgba(75, 188, 228, 0.10) !important;
}

body:not(.home-mode) #ai .ai-board-inline-frame {
  border: 1px solid rgba(190,238,255,0.38) !important;
  border-radius: 12px !important;
  background: #f7fbfb !important;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.66),
    0 0 0 1px rgba(54, 171, 218, 0.16),
    0 22px 60px rgba(0,0,0,0.32) !important;
}

body:not(.home-mode) #ai :is(
  .aigen-project-picker,
  .aigen-project-selector,
  .ai-assist-project-bar,
  .ai-assist-modal-fields label,
  .ai-assist-ppt-checks label,
  .ai-assist-modal-card p,
  .polish-placeholder,
  .polish-draft-preview,
  .polish-candidate-panel,
  .polish-result-preview-slot,
  .ai-backend-banner,
  .rule-hint,
  .ad-state-strip,
  .technical-details,
  .ai-template-card,
  .ai-assist-legacy-step,
  .aigen-library-pill
) {
  border-color: var(--mf-theme-line) !important;
  background: var(--mf-theme-card) !important;
  color: var(--mf-theme-ink) !important;
  box-shadow: var(--mf-theme-glass-shadow) !important;
}

body:not(.home-mode) #ai :is(
  .aigen-project-picker *,
  .aigen-project-selector *,
  .ai-assist-project-bar *,
  .ai-assist-modal-card *,
  .polish-placeholder *,
  .polish-draft-preview *,
  .polish-candidate-panel *,
  .polish-result-preview-slot *,
  .ai-backend-banner *,
  .technical-details *,
  .ai-template-card *,
  .ai-assist-legacy-step *
) {
  color: var(--mf-theme-ink) !important;
  text-shadow: none !important;
}

body:not(.home-mode) #ai :is(
  .aigen-product-stage,
  .ai-assist-canvas
) {
  background: var(--mf-theme-dots) !important;
  background-size: 18px 18px, auto !important;
  border-color: var(--mf-theme-line) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.14),
    inset 0 0 42px rgba(84,184,226,0.055),
    0 20px 58px rgba(0,0,0,0.25) !important;
}

body:not(.home-mode) #ai :is(
  .ai-assist-node,
  .ai-assist-new-project-btn,
  .ai-assist-ppt-btn,
  .ai-assist-output-card,
  .ai-assist-output-item,
  .ai-assist-output-empty
) {
  border-color: var(--mf-theme-line) !important;
  background: var(--mf-theme-card) !important;
  color: var(--mf-theme-ink) !important;
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    inset 0 -1px 0 rgba(255,255,255,0.05),
    0 18px 48px rgba(0,0,0,0.30),
    0 0 0 1px rgba(126,211,242,0.10) !important;
}

body:not(.home-mode) #ai :is(.ai-assist-node:hover, .ai-assist-new-project-btn:hover, .ai-assist-ppt-btn:hover) {
  border-color: var(--mf-theme-line-strong) !important;
  background: var(--mf-theme-card-strong) !important;
  transform: translateY(-1px);
}

body:not(.home-mode) #ai :is(.ai-assist-modal-card, .ai-assist-ppt-modal-card) {
  border: 1px solid var(--mf-theme-line-strong) !important;
  background: var(--mf-theme-card-strong) !important;
  color: var(--mf-theme-ink) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    0 34px 110px rgba(0,0,0,0.48),
    0 0 0 1px rgba(126,211,242,0.12) !important;
}

body:not(.home-mode) #ai :is(
  .ai-assist-modal-card input,
  .ai-assist-modal-card select,
  .ai-assist-modal-card textarea,
  .aigen-project-picker select,
  .aigen-project-selector select,
  .technical-details input,
  .technical-details select,
  .technical-details textarea
) {
  border-color: var(--mf-theme-line) !important;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.085), rgba(255,255,255,0.024)),
    rgba(4, 16, 27, 0.78) !important;
  color: var(--mf-theme-ink) !important;
}

body:not(.home-mode) #marketing :is(
  .ops-canvas-panel,
  .ops-node-panel,
  .ops-node-shell,
  .ops-node-library,
  .ops-node-inspector,
  .ops-project-context-bar,
  .ops-node-input-card,
  .ops-node-group,
  .ops-inspector-grid div,
  .ops-node-preview,
  .ops-prompt-pack-preview,
  .ops-script-preview,
  .ops-draft-review-list,
  .ops-fieldset,
  .ops-draft-row,
  .ops-output-tabs,
  .ops-output-drawer,
  .auto-dryrun-card,
  .auto-script-row,
  .auto-gap-group,
  .auto-log-row,
  .boss-review-package-card,
  .boss-review-field-grid div,
  .video-publish-workflow-panel,
  .video-publish-disclaimer-row,
  .video-publish-shell,
  .video-publish-inputs,
  .video-publish-project-picker,
  .video-publish-node-head,
  .video-publish-node-inputs,
  .video-publish-record-lane,
  .vp-pool-row,
  .xiaobin-blocked-notice,
  .publish-status-grid > div,
  .queue-row
) {
  border-color: var(--mf-theme-line) !important;
  background: var(--mf-theme-card) !important;
  color: var(--mf-theme-ink) !important;
  -webkit-backdrop-filter: blur(22px) saturate(145%);
  backdrop-filter: blur(22px) saturate(145%);
  box-shadow: var(--mf-theme-glass-shadow) !important;
}

body:not(.home-mode) #marketing :is(
  .ops-flow-canvas,
  .ops-node-stage,
  .video-publish-stage
) {
  border-color: var(--mf-theme-line) !important;
  background: var(--mf-theme-dots) !important;
  background-size: 18px 18px, auto !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.14),
    inset 0 0 48px rgba(84,184,226,0.06),
    0 20px 60px rgba(0,0,0,0.28) !important;
}

body:not(.home-mode) #marketing :is(
  .ops-lib-node,
  .ops-flow-node,
  .ops-comfy-node,
  .video-publish-node,
  .auto-script-actions button,
  .ai-gen-disabled-row button,
  .ops-disabled-btn-grid button,
  .ops-disabled-publish-row button,
  .video-publish-stage em,
  .video-publish-pool-canvas span,
  .video-publish-record-lane article,
  .video-publish-record-lane div > *
) {
  border-color: var(--mf-theme-line) !important;
  background: var(--mf-theme-card) !important;
  color: var(--mf-theme-ink) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.16),
    0 16px 44px rgba(0,0,0,0.28) !important;
}

body:not(.home-mode) #marketing :is(
  .ops-canvas-panel *,
  .ops-node-panel *,
  .video-publish-workflow-panel *,
  .auto-dryrun-card *,
  .auto-script-row *,
  .auto-gap-group *,
  .video-publish-node *,
  .video-publish-record-lane *,
  .publish-status-grid *
) {
  color: var(--mf-theme-ink) !important;
  text-shadow: none !important;
}

body:not(.home-mode) #marketing :is(
  small,
  .ops-flow-caption,
  .ops-node-note,
  .auto-script-meta,
  .video-publish-node small,
  .vp-pool-row small
) {
  color: var(--mf-theme-muted) !important;
}

body:not(.home-mode) #marketing :is(input:not([type="checkbox"]), select, textarea) {
  border-color: var(--mf-theme-line) !important;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.022)),
    rgba(4, 16, 27, 0.78) !important;
  color: var(--mf-theme-ink) !important;
}

body:not(.home-mode) #cases :is(
  .case-share-card-grid,
  .case-share-dialog,
  .case-share-dialog .modal-head,
  .case-share-dialog .modal-foot,
  .case-share-detail-section,
  .case-share-archive-section,
  .case-share-archive-profile,
  .case-share-preview-empty,
  .case-share-folder-dialog,
  .case-share-folder-dialog header,
  .case-share-folder-empty,
  .case-share-edit-section,
  .case-share-profile div,
  .case-share-empty
) {
  border-color: var(--mf-theme-line) !important;
  background: var(--mf-theme-card) !important;
  color: var(--mf-theme-ink) !important;
  box-shadow: var(--mf-theme-glass-shadow) !important;
}

body:not(.home-mode) #cases .case-share-card {
  border-color: var(--mf-theme-line) !important;
  background: var(--mf-theme-card) !important;
  color: var(--mf-theme-ink) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    inset 0 -1px 0 rgba(255,255,255,0.05),
    0 24px 62px rgba(0,0,0,0.30),
    0 0 0 1px rgba(126,211,242,0.12) !important;
}

body:not(.home-mode) #cases .case-share-card:hover {
  border-color: var(--mf-theme-line-strong) !important;
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.22),
    0 30px 74px rgba(0,0,0,0.36),
    0 0 28px rgba(86,202,244,0.12) !important;
}

body:not(.home-mode) #cases :is(
  .case-share-cover b,
  .case-share-link-list a,
  .case-share-chip-list span,
  .case-share-craft-list button,
  .case-share-folder-card,
  .case-share-folder-item,
  .case-share-folder-thumb,
  .case-share-preview-card,
  .case-share-preview-thumb,
  .case-share-preview-delete,
  .case-share-media-preview,
  .case-share-folder-media,
  .case-share-folder-detail-media,
  .case-share-upload-dropzone,
  .case-share-file-picker,
  .case-share-dialog input[type="file"],
  .case-share-dialog input[type="file"]::file-selector-button,
  .case-share-dialog input[type="file"]::-webkit-file-upload-button,
  .case-share-upload-dropzone input[type="file"],
  .case-share-upload-dropzone input[type="file"]::file-selector-button,
  .case-share-upload-dropzone input[type="file"]::-webkit-file-upload-button,
  .case-share-profile-field,
  .case-share-profile-field textarea,
  .case-share-edit-danger-row,
  .case-share-recycle-actions,
  .case-share-panorama-editor,
  .case-share-panorama-editor input,
  .case-share-profile div,
  .case-share-edit-grid label,
  .case-share-edit-form input,
  .case-share-edit-form select,
  .case-share-edit-form textarea
) {
  border-color: var(--mf-theme-line) !important;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.085), rgba(255,255,255,0.018)),
    rgba(5, 20, 31, 0.82) !important;
  color: var(--mf-theme-ink) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.14) !important;
}

body:not(.home-mode) #cases :is(
  .case-share-dialog .modal-foot button,
  .case-share-folder-dialog button,
  .case-share-preview-delete,
  .case-share-panorama-editor button
) {
  border-color: var(--mf-theme-line) !important;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.11), rgba(255,255,255,0.025)),
    rgba(9, 28, 42, 0.92) !important;
  color: var(--mf-theme-ink) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.14) !important;
}

body:not(.home-mode) #cases :is(
  .case-share-dialog .modal-foot .primary-action,
  .case-share-panorama-editor .primary-action
) {
  border-color: rgba(126,211,242,0.44) !important;
  background:
    linear-gradient(145deg, rgba(86,202,244,0.35), rgba(40,132,178,0.18)),
    rgba(10, 45, 64, 0.95) !important;
  color: #eefbff !important;
}

body:not(.home-mode) #cases :is(
  .case-share-preview-delete,
  .case-share-edit-danger-row .danger-action,
  .case-share-folder-item .danger-action
) {
  border-color: rgba(255, 129, 129, 0.48) !important;
  background:
    linear-gradient(145deg, rgba(255,112,112,0.28), rgba(90,20,28,0.26)),
    rgba(72, 18, 26, 0.96) !important;
  color: #ffe9e9 !important;
}

body:not(.home-mode) #cases :is(
  .case-share-dialog input[type="file"]::file-selector-button,
  .case-share-dialog input[type="file"]::-webkit-file-upload-button,
  .case-share-upload-dropzone input[type="file"]::file-selector-button,
  .case-share-upload-dropzone input[type="file"]::-webkit-file-upload-button
) {
  background-color: rgba(9, 28, 42, 0.96) !important;
  color: var(--mf-theme-ink) !important;
  border-color: var(--mf-theme-line) !important;
}

body:not(.home-mode) #cases :is(
  .case-share-card-grid *,
  .case-share-dialog *,
  .case-share-detail-section *,
  .case-share-archive-layout *,
  .case-share-folder-dialog *,
  .case-share-profile *
) {
  color: var(--mf-theme-ink) !important;
  text-shadow: none !important;
}

body:not(.home-mode) #cases :is(
  .case-share-info span,
  .case-share-info small,
  .case-share-library-head small,
  .case-share-muted,
  .case-share-folder-card em,
  .case-share-folder-dialog header small,
  .case-share-folder-item small,
  .case-share-preview-card small,
  .case-share-upload-dropzone,
  .case-share-file-picker em,
  .case-share-edit-danger-row small,
  .case-share-recycle-actions small,
  .case-share-profile-field span,
  .case-share-profile dt,
  .case-share-detail-section p,
  .case-share-detail-section small
) {
  color: var(--mf-theme-muted) !important;
}

body:not(.home-mode) #ai :is(
  button,
  label,
  article,
  details,
  .boss-review-filter-group button,
  .boss-review-filter-group span,
  .boss-review-package-card,
  .boss-review-field-grid div,
  .boss-review-top3,
  .boss-review-readonly-detail,
  .boss-review-timeline div,
  .boss-review-timeline span,
  .boss-review-next-steps,
  .boss-review-missing-checklist,
  .boss-review-checklist-grid div,
  .boss-review-evidence-log,
  .boss-review-evidence-log li,
  .boss-review-submit-preview,
  .boss-review-submit-preview div,
  .boss-review-decision-grid div
) {
  border-color: var(--mf-theme-line) !important;
  background: var(--mf-theme-card) !important;
  color: var(--mf-theme-ink) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.14),
    0 14px 38px rgba(0,0,0,0.22) !important;
}

body:not(.home-mode) #ai .boss-review-confirm-grid > div,
body:not(.home-mode) #cases .case-share-delete-actions {
  border-color: var(--mf-theme-line) !important;
  background: var(--mf-theme-card) !important;
  color: var(--mf-theme-ink) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.14),
    0 14px 38px rgba(0,0,0,0.22) !important;
}

body:not(.home-mode) #ai .boss-review-confirm-grid > div *,
body:not(.home-mode) #cases .case-share-delete-actions * {
  color: var(--mf-theme-ink) !important;
}

body:not(.home-mode) #ai :is(
  .boss-review-package-card *,
  .boss-review-field-grid *,
  .boss-review-top3 *,
  .boss-review-readonly-detail *,
  .boss-review-timeline *,
  .boss-review-next-steps *,
  .boss-review-missing-checklist *,
  .boss-review-evidence-log *,
  .boss-review-submit-preview *,
  .boss-review-decision-grid *
) {
  color: var(--mf-theme-ink) !important;
  text-shadow: none !important;
}

body:not(.home-mode) #marketing button {
  border-color: var(--mf-theme-line) !important;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.085), rgba(255,255,255,0.018)),
    rgba(5, 20, 31, 0.82) !important;
  color: var(--mf-theme-ink) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12) !important;
}

body:not(.home-mode) #marketing button:hover {
  border-color: var(--mf-theme-line-strong) !important;
  background: var(--mf-theme-card-strong) !important;
}

/* GLOBAL-UI-PROJECT-MODAL-GLASS-20260618: remove remaining light islands in project-management subdirectory modals. */
body:not(.home-mode) :is(
  .project-dashboard-upload-dialog,
  .project-module-detail-dialog,
  .project-task-list-dialog,
  .construction-task-dialog
) :is(
  .project-module-detail-body > section,
  .project-module-detail-body > div,
  .project-upload-form,
  .project-mobile-upload-card,
  .dashboard-upload-preview,
  .dashboard-upload-construction-task,
  .dashboard-upload-task-board,
  .dashboard-upload-task-card,
  .dashboard-upload-file,
  .project-module-detail-body,
  .project-module-summary,
  .project-module-info-list,
  .project-module-note,
  .project-module-record-grid,
  .project-module-record,
  .project-module-empty,
  .project-quote-contract,
  .project-quote-file-panel,
  .project-quote-file-list,
  .project-quote-file-row,
  .project-quote-contract-side,
  .project-quote-inline-actions,
  .project-payment-progress,
  .project-contract-row,
  .project-detail-mobile-upload,
  .project-task-list-body,
  .project-task-list-detail,
  .project-task-list-summary,
  .project-task-stage,
  .project-task-stage-grid,
  .project-construction-detail,
  .construction-stage-drawer,
  .construction-detail-shell,
  .construction-detail-shell--timeline .construction-step-timeline,
  .construction-stage-nav,
  .construction-stage-nav button,
  .construction-stage-panel,
  .construction-task-board,
  .construction-stage-brief,
  .construction-task-list,
  .construction-task-card,
  .construction-task-skip-options,
  .construction-stage-materials,
  .construction-summary-card,
  .construction-task-modal-body,
  .construction-task-modal-summary,
  .construction-task-modal-summary div,
  .construction-task-modal-card,
  .construction-task-note-field,
  .construction-task-space-field,
  .construction-task-upload-panel,
  .construction-task-dropzone,
  .construction-task-file-preview,
  .construction-task-file-row,
  .construction-material-reader,
  .construction-material-gallery,
  .construction-material-readonly-card,
  .project-ai-design-library,
  .project-ai-design-section,
  .project-ai-design-bucket,
  .project-ai-library-groups,
  .project-ai-library-group,
  .project-ai-library-chips,
  .project-ai-library-stat-card,
  .project-ai-generated-empty,
  .project-ai-generated-product-library,
  .project-ai-generated-product-library section,
  .project-ai-generated-category-tabs,
  .project-ai-generated-category-tabs span,
  .project-content-library-panel,
  .project-content-library-media-grid,
  .project-content-library-stat-card
) {
  border-color: var(--mf-theme-line) !important;
  background: var(--mf-theme-card) !important;
  color: var(--mf-theme-ink) !important;
  -webkit-backdrop-filter: blur(22px) saturate(150%) contrast(1.04);
  backdrop-filter: blur(22px) saturate(150%) contrast(1.04);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.16),
    inset 0 -1px 0 rgba(255,255,255,0.05),
    0 16px 46px rgba(0,0,0,0.25),
    0 0 0 1px rgba(126,211,242,0.08) !important;
}

body:not(.home-mode) :is(
  .project-dashboard-upload-dialog,
  .project-module-detail-dialog,
  .project-task-list-dialog,
  .construction-task-dialog
) :is(
  .project-module-record-preview,
  .project-mini-asset-preview,
  .project-mini-assets figure > span,
  .project-ai-latest-preview > span,
  .project-content-library-media-grid > div,
  .project-upload-qr,
  .project-quote-file-icon,
  .project-quote-file-row em,
  .project-payment-bar,
  .project-payment-droplet,
  .project-payment-droplet span,
  .construction-material-thumb,
  .construction-step-dot,
  .project-ai-design-bucket > span,
  .project-ai-design-bucket .status-pill,
  .dashboard-upload-task-card .status-pill,
  .project-task-list-summary .status-pill,
  .construction-task-card .status-pill,
  .construction-task-evidence-list li,
  .construction-task-file-row
) {
  border-color: rgba(126,211,242,0.24) !important;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.075), rgba(255,255,255,0.018)),
    rgba(4, 17, 27, 0.86) !important;
  color: var(--mf-theme-ink) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12) !important;
}

body:not(.home-mode) :is(
  .project-dashboard-upload-dialog,
  .project-module-detail-dialog,
  .project-task-list-dialog,
  .construction-task-dialog
) :is(
  input:not([type="checkbox"]):not([type="file"]),
  select,
  textarea,
  button,
  .ghost,
  .primary-action
) {
  border-color: var(--mf-theme-line) !important;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.08), rgba(255,255,255,0.018)),
    rgba(4, 17, 27, 0.84) !important;
  color: var(--mf-theme-ink) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12) !important;
}

body:not(.home-mode) :is(
  .project-dashboard-upload-dialog,
  .project-module-detail-dialog,
  .project-task-list-dialog,
  .construction-task-dialog
) :is(
  h1, h2, h3, h4, h5,
  strong, b, label, span,
  .project-module-record strong,
  .dashboard-upload-task-main strong,
  .dashboard-upload-task-head strong,
  .project-task-stage-head strong,
  .construction-task-main strong,
  .construction-task-modal-card h3,
  .project-content-library-panel strong,
  .project-ai-library-group strong
) {
  color: var(--mf-theme-ink) !important;
  text-shadow: none !important;
}

body:not(.home-mode) :is(
  .project-dashboard-upload-dialog,
  .project-module-detail-dialog,
  .project-task-list-dialog,
  .construction-task-dialog
) :is(
  p, small, em, time, li,
  .project-module-record small,
  .project-module-record p,
  .project-module-note,
  .project-quote-file-row small,
  .project-payment-progress small,
  .project-payment-progress span,
  .project-contract-row em,
  .dashboard-upload-task-meta,
  .dashboard-upload-task-hint,
  .project-task-stage-head small,
  .construction-task-main small,
  .construction-task-meta,
  .construction-task-note-field span,
  .project-content-library-panel small,
  .project-ai-library-group small,
  .project-ai-library-chips small,
  .construction-material-reader small,
  .construction-material-readonly-card small,
  .project-ai-design-bucket small,
  .project-ai-generated-empty
) {
  color: var(--mf-theme-muted) !important;
  text-shadow: none !important;
}

body:not(.home-mode) :is(
  .project-dashboard-upload-dialog,
  .project-module-detail-dialog,
  .project-task-list-dialog,
  .construction-task-dialog
) :is(.dashboard-upload-preview:empty, .construction-task-file-preview:empty) {
  min-height: 86px;
}

body:not(.home-mode) :is(
  .project-dashboard-upload-dialog,
  .construction-task-dialog
) .project-upload-qr {
  border-color: rgba(196,238,255,0.14) !important;
  background:
    linear-gradient(90deg, rgba(207,241,252,0.68) 10px, transparent 10px) 0 0 / 20px 20px,
    linear-gradient(rgba(207,241,252,0.68) 10px, transparent 10px) 0 0 / 20px 20px,
    rgba(4, 17, 27, 0.90) !important;
}

body:not(.home-mode) #projectModuleDetailBody :is(
  .project-marketing-library-detail,
  .project-marketing-library-detail section,
  .project-ai-design-bucket,
  .project-ai-design-bucket > div,
  .project-ai-generated-empty,
  .construction-material-reader,
  .construction-detail-shell--timeline .construction-step-timeline,
  .construction-stage-panel,
  .construction-material-gallery,
  .construction-material-readonly-card
) {
  border-color: var(--mf-theme-line) !important;
  background: var(--mf-theme-card) !important;
  color: var(--mf-theme-ink) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.16),
    inset 0 -1px 0 rgba(255,255,255,0.05),
    0 16px 46px rgba(0,0,0,0.25) !important;
}

body:not(.home-mode) #projectModuleDetailBody :is(
  .project-ai-design-bucket span,
  .project-ai-design-bucket .status-pill,
  .project-ai-design-section header span,
  .project-marketing-library-detail span,
  .construction-step-dot
) {
  border-color: rgba(126,211,242,0.26) !important;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.075), rgba(255,255,255,0.018)),
    rgba(4, 17, 27, 0.86) !important;
  color: var(--mf-theme-ink) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12) !important;
}

body:not(.home-mode) #projectModuleDetailBody :is(
  .project-marketing-library-detail *,
  .project-ai-design-bucket *,
  .project-ai-generated-empty,
  .construction-material-reader *,
  .construction-detail-shell--timeline .construction-step-timeline *,
  .construction-stage-panel *,
  .construction-material-readonly-card *
) {
  color: var(--mf-theme-ink) !important;
  text-shadow: none !important;
}

body:not(.home-mode) #projectModuleDetailBody :is(
  .project-marketing-library-detail small,
  .project-marketing-library-detail p,
  .project-ai-design-bucket small,
  .project-ai-generated-empty,
  .construction-material-reader small,
  .construction-stage-panel small,
  .construction-material-readonly-card small
) {
  color: var(--mf-theme-muted) !important;
}

body:not(.home-mode) #projectModuleDetailBody :is(
  .project-quote-file-list,
  .project-quote-file-row,
  .project-quote-contract-side,
  .project-quote-inline-actions,
  .project-payment-progress,
  .project-contract-row,
  .construction-material-thumb,
  .construction-step-timeline
) {
  border-color: var(--mf-theme-line) !important;
  background: var(--mf-theme-card) !important;
  color: var(--mf-theme-ink) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.14),
    0 12px 32px rgba(0,0,0,0.20) !important;
}

body:not(.home-mode) #projectModuleDetailBody :is(
  .project-quote-file-icon,
  .project-quote-file-row em,
  .project-payment-droplet,
  .project-payment-droplet span,
  .project-payment-bar,
  .construction-material-thumb span
) {
  border-color: rgba(126,211,242,0.28) !important;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.08), rgba(255,255,255,0.018)),
    rgba(4, 17, 27, 0.86) !important;
  color: var(--mf-theme-ink) !important;
}

body:not(.home-mode) .project-content-script-library {
  min-height: min(48vh, 440px);
  padding: 0 !important;
  border: 1px solid rgba(126, 211, 242, 0.18) !important;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)),
    rgba(4, 17, 27, 0.78) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

body:not(.home-mode) .project-dashboard-panel--contentLibrary .project-dashboard-panel-body,
body:not(.home-mode) .project-content-script-library .project-module-empty {
  border-color: rgba(126, 211, 242, 0.18) !important;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012)),
    rgba(4, 17, 27, 0.82) !important;
  color: var(--mf-theme-ink) !important;
}

body:not(.home-mode) .project-content-script-library .project-module-empty strong,
body:not(.home-mode) .project-content-script-library .project-module-empty small {
  color: var(--mf-theme-ink) !important;
}

body:not(.home-mode) .project-content-script-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
  padding: 8px 10px 14px;
}

body:not(.home-mode) .project-content-script-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 8px;
  width: 100%;
  min-width: 0;
  aspect-ratio: 3 / 4;
  border: 1px solid rgba(126, 211, 242, 0.34);
  border-radius: 8px;
  padding: 12px;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.018)),
    rgba(4, 17, 27, 0.88);
  color: var(--mf-theme-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  cursor: pointer;
  text-align: left;
}

body:not(.home-mode) .project-content-script-card:hover,
body:not(.home-mode) .project-content-script-card:focus-visible {
  outline: none;
  border-color: rgba(126, 211, 242, 0.72);
  box-shadow: 0 0 0 2px rgba(67, 192, 232, 0.16), 0 16px 38px rgba(0, 0, 0, 0.24);
}

body:not(.home-mode) .project-content-script-card dl {
  margin: 0;
  display: grid;
  gap: 7px;
}

body:not(.home-mode) .project-content-script-card div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

body:not(.home-mode) .project-content-script-card dt {
  color: rgba(207, 241, 252, 0.72);
  font-size: 11px;
  font-weight: 800;
}

body:not(.home-mode) .project-content-script-card dd {
  margin: 0;
  overflow: hidden;
  color: var(--mf-theme-ink);
  font-size: 13px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:not(.home-mode) .project-content-script-card > strong {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 26px;
  display: block;
  text-align: center;
  color: var(--mf-theme-ink);
  font-size: clamp(18px, 1.15vw, 24px);
  line-height: 1;
}

body:not(.home-mode) .project-content-script-status-bar {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  height: 5px;
  border-radius: 999px;
  background: #75d600 !important;
  box-shadow: 0 0 12px rgba(117, 214, 0, 0.24) !important;
}

body:not(.home-mode) .project-content-script-card.is-published .project-content-script-status-bar {
  background: rgba(255, 255, 255, 0.92) !important;
  box-shadow: none !important;
}

body:not(.home-mode) .project-content-script-modal .project-module-detail-dialog {
  width: min(1180px, calc(100vw - 56px)) !important;
  max-height: calc(100vh - 52px) !important;
  overflow: hidden !important;
  border: 1px solid rgba(126, 211, 242, 0.26) !important;
  border-radius: 12px !important;
  padding: 14px !important;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.018)),
    rgba(4, 17, 27, 0.94) !important;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42) !important;
}

body:not(.home-mode) .project-content-script-modal .project-modal-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: start !important;
  gap: 14px !important;
  padding: 0 0 10px !important;
  border-bottom: 1px solid rgba(126, 211, 242, 0.18) !important;
}

body:not(.home-mode) .project-content-script-modal .project-module-detail-body {
  max-height: calc(100vh - 150px) !important;
  overflow: auto !important;
  padding: 0 !important;
  background: transparent !important;
}

body:not(.home-mode) .project-content-script-detail {
  display: grid;
  gap: 16px;
  padding: 16px 18px 12px;
}

body:not(.home-mode) .project-content-script-detail-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

body:not(.home-mode) .project-content-script-detail label {
  display: grid;
  gap: 8px;
  min-width: 0;
  color: var(--mf-theme-ink);
  font-size: 14px;
  font-weight: 850;
}

body:not(.home-mode) .project-content-script-detail label > p,
body:not(.home-mode) .project-content-script-detail label > strong {
  margin: 0;
  border: 1px solid rgba(126, 211, 242, 0.18);
  border-radius: 8px;
  padding: 10px 12px;
  min-height: 42px;
  background: rgba(4, 17, 27, 0.72);
  color: var(--mf-theme-ink);
  white-space: pre-wrap;
}

body:not(.home-mode) .project-content-script-detail textarea,
body:not(.home-mode) .project-content-script-detail input {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(126, 211, 242, 0.26);
  border-radius: 8px;
  background: rgba(4, 17, 27, 0.78);
  color: var(--mf-theme-ink);
  font: inherit;
}

body:not(.home-mode) .project-content-script-detail input {
  height: 38px;
  padding: 0 10px;
}

body:not(.home-mode) .project-content-script-detail textarea {
  min-height: 118px;
  padding: 10px 12px;
  resize: vertical;
}

body:not(.home-mode) .project-content-script-folder {
  border: 1px solid rgba(126, 211, 242, 0.24);
  border-radius: 10px;
  min-height: 270px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012)),
    rgba(4, 17, 27, 0.72);
  overflow: hidden;
}

body:not(.home-mode) .project-content-script-folder-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid rgba(126, 211, 242, 0.18);
  padding: 10px 12px;
}

body:not(.home-mode) .project-content-script-folder-head strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:not(.home-mode) .project-content-script-folder-head small {
  color: var(--mf-theme-muted);
  font-size: 12px;
}

body:not(.home-mode) .project-content-script-assets {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 12px;
  padding: 12px;
}

body:not(.home-mode) .project-content-script-assets.is-empty {
  min-height: 190px;
  place-items: center;
  color: var(--mf-theme-muted);
}

body:not(.home-mode) .project-content-script-asset-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  border: 1px solid rgba(126, 211, 242, 0.2);
  border-radius: 8px;
  padding: 8px;
  background: rgba(4, 17, 27, 0.72);
  color: var(--mf-theme-ink);
  cursor: pointer;
  text-align: left;
}

body:not(.home-mode) .project-content-script-asset-card span {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  border: 1px solid rgba(126, 211, 242, 0.16);
  border-radius: 6px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.34) !important;
}

body:not(.home-mode) .project-content-script-asset-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body:not(.home-mode) .project-content-script-asset-card small {
  min-width: 0;
  overflow: hidden;
  color: var(--mf-theme-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:not(.home-mode) .project-content-script-actions {
  display: grid;
  grid-template-columns: auto auto auto auto minmax(180px, auto);
  gap: 10px;
  align-items: center;
}

body:not(.home-mode) .project-content-script-actions button:last-child {
  justify-self: end;
  min-width: 170px;
}

body:not(.home-mode) .project-content-script-actions .selected {
  border-color: rgba(117, 214, 0, 0.72);
  background: rgba(117, 214, 0, 0.14);
}

@media (max-width: 1680px) {
  body:not(.home-mode) .project-content-script-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  body:not(.home-mode) .project-content-script-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  body:not(.home-mode) .project-content-script-assets {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body:not(.home-mode) .project-content-script-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  body:not(.home-mode) .project-content-script-grid,
  body:not(.home-mode) .project-content-script-assets,
  body:not(.home-mode) .project-content-script-actions {
    grid-template-columns: 1fr;
  }

  body:not(.home-mode) .project-content-script-modal .project-module-detail-dialog {
    width: calc(100vw - 24px) !important;
  }
}

body:not(.home-mode) #projectModuleDetailBody :is(
  .project-quote-file-row *,
  .project-quote-contract-side *,
  .project-quote-inline-actions *,
  .project-payment-progress *,
  .project-contract-row *
) {
  color: var(--mf-theme-ink) !important;
  text-shadow: none !important;
}

body:not(.home-mode) #projectModuleDetailBody :is(
  .project-quote-file-row small,
  .project-payment-progress small,
  .project-payment-progress span,
  .project-contract-row em
) {
  color: var(--mf-theme-muted) !important;
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  body:not(.home-mode) :is(.panel, .metric, .project-card, .project-create-dialog, .project-message-dialog, .ai-assist-modal-card, .case-share-dialog) {
    background: #0a1d2a;
  }
}

@media (prefers-reduced-motion: reduce) {
  body:not(.home-mode)::before {
    animation: none;
  }
}

@media (max-width: 760px) {
  body:not(.home-mode) .app-shell,
  body:not(.home-mode) .main,
  body:not(.home-mode) .view.active,
  body:not(.home-mode) :is(.panel, .project-page, .project-dashboard-shell, .system-settings-shell, .system-settings-detail, .quote-template-shell, .quote-operable-r1) {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  body:not(.home-mode) .project-dashboard-tools,
  body:not(.home-mode) .project-dashboard-tool-group {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: 1fr !important;
  }

  body:not(.home-mode) .project-dashboard-tool-group > *,
  body:not(.home-mode) :is(.project-filter-chip, .project-time-filter, .project-user-menu, #newProjectBtn, .project-alert-button) {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    justify-self: stretch;
  }

  body:not(.home-mode) :is(#systemQuoteTemplateMount, .quote-template-settings, .quote-template-scroll, .table-wrap) {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  body:not(.home-mode) .system-settings-detail {
    overflow: hidden;
  }
}

@keyframes systemBgDrift {
  0% { transform: translate3d(-0.5%, -0.25%, 0) scale(1.02); }
  100% { transform: translate3d(0.5%, 0.35%, 0) scale(1.04); }
}

/* OPS-MARKETING-CANVAS-WORKFLOW-RELAYOUT-20260618
   运营画布：项目选择上移、输入弹窗化、节点恢复可拖拽。 */
body:not(.home-mode) #opsNodeShell.ops-comfy-shell,
body:not(.home-mode) #opsNodeShell.ops-comfy-shell:has(.ops-output-drawer:not(.collapsed)),
body:not(.home-mode) #opsNodeShell.ops-comfy-shell.output-expanded {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 0.34fr) !important;
  grid-template-rows: auto minmax(640px, auto) !important;
  grid-template-areas:
    "project output"
    "stage output" !important;
  gap: 12px !important;
  padding: 12px 14px 14px !important;
  background:
    linear-gradient(145deg, rgba(15, 42, 59, 0.82), rgba(5, 20, 31, 0.94)),
    rgba(5, 19, 30, 0.92) !important;
  border: 1px solid rgba(141, 205, 232, 0.22) !important;
  box-shadow: inset 0 1px 0 rgba(236, 252, 255, 0.08), 0 18px 48px rgba(0, 0, 0, 0.18) !important;
}

body:not(.home-mode) #opsNodeShell .ops-comfy-library {
  grid-area: project !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body:not(.home-mode) #opsNodeShell .ops-project-context-bar {
  width: min(580px, 100%) !important;
  min-height: 42px !important;
  display: grid !important;
  grid-template-columns: auto minmax(260px, 1fr) auto !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 8px 10px !important;
  border-radius: 8px !important;
  border: 1px solid rgba(141, 205, 232, 0.24) !important;
  background: linear-gradient(135deg, rgba(22, 54, 72, 0.74), rgba(8, 28, 42, 0.86)) !important;
  box-shadow: inset 0 1px 0 rgba(236, 252, 255, 0.09) !important;
}

body:not(.home-mode) #opsNodeShell .ops-project-context-bar span {
  color: rgba(218, 241, 247, 0.92) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
}

body:not(.home-mode) #opsNodeShell .ops-project-context-bar small {
  color: rgba(150, 181, 190, 0.88) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
}

body:not(.home-mode) #opsNodeShell .ops-project-context-bar select,
body:not(.home-mode) #opsNodeShell .ops-config-modal-card select,
body:not(.home-mode) #opsNodeShell .ops-config-modal-card input,
body:not(.home-mode) #opsNodeShell .ops-config-modal-card textarea {
  min-height: 34px !important;
  border-radius: 7px !important;
  border: 1px solid rgba(151, 211, 238, 0.25) !important;
  background: rgba(3, 18, 29, 0.74) !important;
  color: rgba(235, 248, 251, 0.94) !important;
  box-shadow: inset 0 1px 0 rgba(236, 252, 255, 0.05) !important;
}

body:not(.home-mode) #opsNodeShell .ops-comfy-stage {
  grid-area: stage !important;
  min-width: 0 !important;
  min-height: 640px !important;
  overflow: hidden !important;
  border-radius: 8px !important;
  border: 1px solid rgba(113, 186, 220, 0.26) !important;
  background:
    radial-gradient(circle at 14px 14px, rgba(107, 178, 213, 0.24) 1.15px, transparent 1.2px) 0 0 / 22px 22px,
    linear-gradient(180deg, rgba(8, 31, 46, 0.94), rgba(3, 16, 27, 0.98)) !important;
  box-shadow: inset 0 1px 0 rgba(236, 252, 255, 0.07), inset 0 0 70px rgba(0, 127, 182, 0.08) !important;
}

body:not(.home-mode) #opsNodeShell .ops-comfy-nodes {
  position: absolute !important;
  inset: 0 !important;
  z-index: 2 !important;
}

body:not(.home-mode) #opsNodeShell .ops-comfy-edges {
  position: absolute !important;
  inset: 0 !important;
  z-index: 1 !important;
  pointer-events: none !important;
}

body:not(.home-mode) #opsNodeShell .ops-cable-outer {
  fill: none !important;
  stroke: rgba(54, 144, 255, 0.24) !important;
  stroke-width: 11px !important;
  stroke-linecap: round !important;
}

body:not(.home-mode) #opsNodeShell .ops-cable-mid {
  fill: none !important;
  stroke: url("#opsCableDeepGradient") !important;
  stroke-width: 5px !important;
  stroke-linecap: round !important;
  filter: url("#opsCableDeepGlow") !important;
}

body:not(.home-mode) #opsNodeShell .ops-cable-white-flow {
  fill: none !important;
  stroke: url("#opsCableWhiteSignalGradient") !important;
  stroke-width: 1.8px !important;
  stroke-linecap: round !important;
  stroke-dasharray: 8 16 !important;
  animation: opsCableFlow 1.5s linear infinite !important;
}

body:not(.home-mode) #opsNodeShell .ops-comfy-node.draggable-node {
  width: 156px !important;
  min-height: 72px !important;
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  gap: 6px 8px !important;
  align-items: start !important;
  padding: 12px 13px !important;
  border-radius: 8px !important;
  border: 1px solid rgba(127, 207, 238, 0.32) !important;
  background:
    linear-gradient(150deg, rgba(24, 61, 77, 0.92), rgba(6, 26, 39, 0.96)),
    rgba(5, 23, 34, 0.92) !important;
  color: rgba(237, 251, 255, 0.96) !important;
  cursor: grab !important;
  user-select: none !important;
  box-shadow: inset 0 1px 0 rgba(236, 252, 255, 0.09), 0 10px 26px rgba(0, 0, 0, 0.20) !important;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease !important;
}

body:not(.home-mode) #opsNodeShell .ops-comfy-node.draggable-node b {
  width: 24px !important;
  height: 24px !important;
  border-radius: 7px !important;
  display: inline-grid !important;
  place-items: center !important;
  background: linear-gradient(135deg, #22b98f, #47cfaa) !important;
  color: #eafff8 !important;
  font-size: 12px !important;
  line-height: 1 !important;
  box-shadow: 0 0 16px rgba(40, 206, 162, 0.24) !important;
}

body:not(.home-mode) #opsNodeShell .ops-comfy-node.draggable-node strong {
  min-width: 0 !important;
  color: rgba(239, 252, 255, 0.98) !important;
  font-size: 14px !important;
  line-height: 1.28 !important;
  font-weight: 850 !important;
  text-align: left !important;
}

body:not(.home-mode) #opsNodeShell .ops-comfy-node.draggable-node small {
  grid-column: 2 !important;
  color: rgba(164, 190, 198, 0.92) !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
  text-align: left !important;
}

body:not(.home-mode) #opsNodeShell .ops-comfy-node.draggable-node:hover,
body:not(.home-mode) #opsNodeShell .ops-comfy-node.draggable-node.active,
body:not(.home-mode) #opsNodeShell .ops-comfy-node.draggable-node.dragging {
  border-color: rgba(141, 225, 255, 0.58) !important;
  box-shadow: inset 0 1px 0 rgba(236, 252, 255, 0.13), 0 14px 34px rgba(10, 154, 214, 0.20) !important;
}

body:not(.home-mode) #opsNodeShell .ops-comfy-node.draggable-node.dragging {
  cursor: grabbing !important;
  transform: translateY(-2px) scale(1.01) !important;
  z-index: 5 !important;
}

body:not(.home-mode) #opsNodeShell .ops-comfy-node.node-script {
  width: 340px !important;
  min-height: 178px !important;
  grid-template-rows: auto auto 1fr !important;
  align-content: start !important;
  padding: 16px 18px !important;
}

body:not(.home-mode) #opsNodeShell .ops-comfy-node.node-script::after {
  content: "脚本预览";
  grid-column: 2 !important;
  align-self: end !important;
  margin-top: 26px !important;
  min-height: 54px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 8px !important;
  border: 1px dashed rgba(159, 224, 248, 0.23) !important;
  color: rgba(197, 225, 232, 0.82) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  background: rgba(2, 15, 25, 0.38) !important;
}

body:not(.home-mode) #opsNodeShell .ops-comfy-node.node-review {
  width: 318px !important;
  min-height: 96px !important;
}

body:not(.home-mode) #opsNodeShell .ops-output-drawer,
body:not(.home-mode) #opsNodeShell .ops-output-drawer.collapsed,
body:not(.home-mode) #opsNodeShell .ops-output-drawer.open {
  grid-area: output !important;
  min-width: 0 !important;
  min-height: 100% !important;
  border-radius: 8px !important;
  border: 1px solid rgba(127, 197, 229, 0.25) !important;
  background: linear-gradient(180deg, rgba(18, 50, 68, 0.78), rgba(5, 23, 36, 0.95)) !important;
  box-shadow: inset 0 1px 0 rgba(236, 252, 255, 0.08) !important;
}

body:not(.home-mode) #opsComfyPopover.ops-config-popover {
  position: fixed !important;
  inset: 0 0 0 var(--ops-modal-left-offset, 0px) !important;
  z-index: 2147483000 !important;
  display: grid !important;
  place-items: center !important;
  width: auto !important;
  height: 100vh !important;
  max-width: none !important;
  min-width: 0 !important;
  padding: 20px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: rgba(1, 10, 18, 0.58) !important;
  box-shadow: none !important;
  backdrop-filter: blur(14px) saturate(1.2) !important;
}

body #opsComfyPopover.ops-config-popover.ops-top-modal-layer {
  position: fixed !important;
  inset: 0 0 0 var(--ops-modal-left-offset, 0px) !important;
  z-index: 2147483000 !important;
  display: grid !important;
  place-items: center !important;
  width: auto !important;
  height: 100vh !important;
  max-width: none !important;
  min-width: 0 !important;
  padding: 20px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: rgba(1, 10, 18, 0.58) !important;
  box-shadow: none !important;
  pointer-events: auto !important;
  backdrop-filter: blur(14px) saturate(1.2) !important;
}

body:not(.home-mode) #opsComfyPopover.ops-config-popover.hidden {
  display: none !important;
}

body #opsComfyPopover.ops-config-popover.ops-top-modal-layer.hidden {
  display: none !important;
}

body:not(.home-mode) #opsComfyPopover .ops-config-modal-card {
  width: min(720px, calc(100vw - 42px)) !important;
  max-height: min(84vh, 780px) !important;
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) auto !important;
  overflow: hidden !important;
  border-radius: 12px !important;
  border: 1px solid rgba(146, 217, 246, 0.28) !important;
  background:
    linear-gradient(150deg, rgba(22, 58, 78, 0.96), rgba(5, 23, 37, 0.98)),
    rgba(5, 22, 35, 0.96) !important;
  box-shadow: inset 0 1px 0 rgba(236, 252, 255, 0.12), 0 28px 90px rgba(0, 0, 0, 0.42) !important;
}

body:not(.home-mode) #opsComfyPopover .ops-config-modal-head,
body:not(.home-mode) #opsComfyPopover .ops-config-modal-footer {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 14px 16px !important;
  border-color: rgba(146, 217, 246, 0.16) !important;
}

body:not(.home-mode) #opsComfyPopover .ops-config-modal-head {
  border-bottom: 1px solid rgba(146, 217, 246, 0.16) !important;
}

body:not(.home-mode) #opsComfyPopover .ops-config-modal-footer {
  border-top: 1px solid rgba(146, 217, 246, 0.16) !important;
  background: rgba(2, 15, 25, 0.28) !important;
}

body:not(.home-mode) #opsComfyPopover .ops-config-modal-title {
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  align-items: start !important;
  gap: 10px !important;
}

body:not(.home-mode) #opsComfyPopover .ops-config-modal-title b {
  width: 28px !important;
  height: 28px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 8px !important;
  background: linear-gradient(135deg, #22b98f, #47cfaa) !important;
  color: #eafff8 !important;
}

body:not(.home-mode) #opsComfyPopover .ops-config-modal-title strong,
body:not(.home-mode) #opsComfyPopover .ops-config-modal-body > strong {
  color: rgba(239, 252, 255, 0.98) !important;
  font-size: 16px !important;
  font-weight: 900 !important;
}

body:not(.home-mode) #opsComfyPopover .ops-config-modal-title small,
body:not(.home-mode) #opsComfyPopover .ops-config-modal-body small,
body:not(.home-mode) #opsComfyPopover .ops-node-note {
  color: rgba(165, 191, 199, 0.92) !important;
}

body:not(.home-mode) #opsComfyPopover .ops-config-modal-icon,
body:not(.home-mode) #opsComfyPopover .ghost-btn {
  border: 1px solid rgba(153, 215, 242, 0.22) !important;
  background: rgba(7, 30, 45, 0.72) !important;
  color: rgba(224, 244, 248, 0.94) !important;
  border-radius: 8px !important;
}

body:not(.home-mode) #opsComfyPopover .ops-config-modal-body {
  min-height: 260px !important;
  overflow: auto !important;
  padding: 16px !important;
  display: grid !important;
  gap: 12px !important;
}

body:not(.home-mode) #opsComfyPopover .ops-mini-choice,
body:not(.home-mode) #opsComfyPopover .ops-material-choice {
  border-color: rgba(145, 210, 239, 0.22) !important;
  background: rgba(5, 24, 37, 0.76) !important;
  color: rgba(230, 247, 250, 0.94) !important;
}

body:not(.home-mode) #opsComfyPopover .ops-mini-choice.active,
body:not(.home-mode) #opsComfyPopover .ops-material-choice:has(input:checked) {
  border-color: rgba(82, 210, 164, 0.62) !important;
  background: rgba(19, 83, 67, 0.52) !important;
}

@media (max-width: 1480px) {
  body:not(.home-mode) #opsNodeShell .ops-comfy-node.draggable-node {
    width: 138px !important;
    min-height: 68px !important;
    padding: 10px 11px !important;
  }

  body:not(.home-mode) #opsNodeShell .ops-comfy-node.draggable-node strong {
    font-size: 13px !important;
  }

  body:not(.home-mode) #opsNodeShell .ops-comfy-node.draggable-node small {
    font-size: 11px !important;
  }

  body:not(.home-mode) #opsNodeShell .ops-comfy-node.node-script {
    width: 260px !important;
    min-height: 164px !important;
  }

  body:not(.home-mode) #opsNodeShell .ops-comfy-node.node-review {
    width: 220px !important;
    min-height: 88px !important;
  }
}

@media (max-width: 1160px) {
  body:not(.home-mode) #opsNodeShell.ops-comfy-shell,
  body:not(.home-mode) #opsNodeShell.ops-comfy-shell:has(.ops-output-drawer:not(.collapsed)),
  body:not(.home-mode) #opsNodeShell.ops-comfy-shell.output-expanded {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto minmax(640px, auto) auto !important;
    grid-template-areas:
      "project"
      "stage"
      "output" !important;
  }

  body:not(.home-mode) #opsNodeShell .ops-project-context-bar {
    width: 100% !important;
    grid-template-columns: auto minmax(0, 1fr) !important;
  }

  body:not(.home-mode) #opsNodeShell .ops-project-context-bar small {
    grid-column: 1 / -1 !important;
  }
}

/* VIDEO-PUBLISH-WORKFLOW-DRAG-WIDE-20260618
   发布工作流：节点可拖拽、连线按节点实时重算、画布向右吃满宽屏空白。 */
body:not(.home-mode) .video-publish-workflow-panel .video-publish-shell,
body:not(.home-mode).marketing-mode .video-publish-workflow-panel .video-publish-shell {
  grid-template-columns: minmax(340px, 360px) minmax(1680px, 1fr) !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
}

body:not(.home-mode) .video-publish-workflow-panel .video-publish-stage {
  width: 100% !important;
  min-width: 1680px !important;
  flex: 1 0 1680px !important;
  overflow: hidden !important;
}

body:not(.home-mode) .video-publish-workflow-panel .video-publish-stage .video-publish-node {
  cursor: grab !important;
  touch-action: none !important;
  user-select: none !important;
  border-color: rgba(139, 216, 245, 0.30) !important;
  background: linear-gradient(150deg, rgba(22, 57, 76, 0.94), rgba(5, 23, 36, 0.96)) !important;
  box-shadow: inset 0 1px 0 rgba(236, 252, 255, 0.08), 0 10px 28px rgba(0, 0, 0, 0.20) !important;
}

body:not(.home-mode) .video-publish-workflow-panel .video-publish-stage .video-publish-node.dragging {
  cursor: grabbing !important;
  z-index: 8 !important;
  transform: translateY(-2px) scale(1.01) !important;
  border-color: rgba(146, 226, 255, 0.64) !important;
  box-shadow: inset 0 1px 0 rgba(236, 252, 255, 0.14), 0 18px 40px rgba(10, 154, 214, 0.22) !important;
}

body:not(.home-mode) .video-publish-workflow-panel .video-publish-stage .video-publish-node.platform-pool-node {
  width: 375px !important;
  min-height: 320px !important;
}

body:not(.home-mode) .video-publish-workflow-panel .video-publish-edges .video-cable-sheath {
  stroke-width: 18px !important;
  opacity: 0.42 !important;
}

body:not(.home-mode) .video-publish-workflow-panel .video-publish-edges .video-cable-rail {
  stroke-width: 10px !important;
  opacity: 0.90 !important;
}

body:not(.home-mode) .video-publish-workflow-panel .video-publish-edges .video-cable-mid {
  stroke-width: 5px !important;
  opacity: 0.98 !important;
}

body:not(.home-mode) .video-publish-workflow-panel .video-publish-edges .video-cable-white {
  stroke-width: 3px !important;
  stroke-dasharray: 12 24 !important;
}

body:not(.home-mode) .video-publish-workflow-panel .video-publish-edges .video-cable-spark {
  stroke-width: 1.2px !important;
  stroke-dasharray: 1 44 1 70 !important;
}

@media (max-width: 1460px) {
  body:not(.home-mode) .video-publish-workflow-panel .video-publish-shell,
  body:not(.home-mode).marketing-mode .video-publish-workflow-panel .video-publish-shell {
    grid-template-columns: 340px minmax(1680px, 1fr) !important;
  }
}

@media (max-width: 760px) {
  body:not(.home-mode) .video-publish-workflow-panel .video-publish-shell,
  body:not(.home-mode).marketing-mode .video-publish-workflow-panel .video-publish-shell {
    grid-template-columns: 310px minmax(1680px, 1fr) !important;
  }
}

/* GLOBAL-UI-SIDEBAR-MODAL-LAYER-20260618: first-level navigation must stay visible above every modal backdrop. */
body:not(.home-mode) {
  --mf-sidebar-width: 248px;
  --mf-layer-modal: 2147483000;
  --mf-layer-sidebar: 2147483600;
}

body:not(.home-mode) .sidebar {
  z-index: var(--mf-layer-sidebar) !important;
}

body:not(.home-mode) .account-popover {
  z-index: 2147483601 !important;
}

body:not(.home-mode) :is(
  .project-create-modal,
  .project-message-center,
  .project-dashboard-upload-modal,
  .project-module-detail-modal,
  .project-task-list-modal,
  .construction-task-modal,
  .project-material-preview-modal,
  .project-edit-modal,
  .project-review-modal,
  .case-share-modal,
  .ai-assist-modal,
  .video-disclaimer-modal,
  .aile-source-files-modal,
  /* 第600单(卡 862F4C0C): 个人 API 新建/编辑共享弹窗此前 z-index:82(css/41), 从未接入本刻度 ——
     实测 1440×1000 下遮罩 z82 < sidebar z2147483600, 分类 LABEL 中心 x=211 落在侧栏带(x0–248)内,
     elementFromPoint 命中 nav-item, 点击被吞(probe4-hittest / probe5-zindex)。
     此处按【与其余 12 个模态完全相同的既有契约】接入: 从侧栏右侧起 + --mf-layer-modal,
     一级导航仍在其上可见可点(GLOBAL-UI-SIDEBAR-MODAL-LAYER-20260618 的本意), 不降低 sidebar。 */
  .settings-account-r15-interface-backdrop
) {
  inset: 0 0 0 var(--mf-sidebar-width) !important;
  width: auto !important;
  max-width: none !important;
  z-index: var(--mf-layer-modal) !important;
}

body:not(.home-mode) :is(
  #opsComfyPopover.ops-config-popover,
  #opsComfyPopover.ops-config-popover.ops-top-modal-layer,
  #opsNodeShell .ops-config-popover.ops-top-modal-layer
) {
  --ops-modal-left-offset: var(--mf-sidebar-width);
  inset: 0 0 0 var(--mf-sidebar-width) !important;
  width: auto !important;
  max-width: none !important;
  z-index: var(--mf-layer-modal) !important;
}

/* PM08: keep the file picker's existing cap while using the paired shell constraint. */
.aile-source-files-card { --modal-max-width: 980px; }

body:not(.home-mode) :is(
  .project-create-dialog,
  .project-message-dialog,
  .project-dashboard-upload-dialog,
  .project-module-detail-dialog,
  .project-task-list-dialog,
  .construction-task-dialog,
  .project-material-preview-dialog,
  .project-edit-dialog,
  .project-review-dialog,
  .case-share-dialog,
  .ai-assist-modal-card,
  .video-disclaimer-card,
  .ops-config-modal-card,
  .aile-source-files-card,
  /* 第600单(补注 9C14A079): 个人 API 新建/编辑共享内层面板。2d7 只把 backdrop 接入了层级/inset 契约,
     内层宽度约束漏在这里 —— css/41 的 width:min(1160px, 100vw-36px) 只在 max-width:900 才改宽,
     故 1024 宽下内层声明 988 而容器可用仅 740, 面板溢出(backdrop 可用宽 776 不能替它作证)。
     接入本约束后: 1440→1120; 1024→min(1120, 736)=736 ≤ 740 不溢出;
     ≤760 时既有 @media 已把 --mf-sidebar-width 置 0, 自然退回 min(1120, 100vw-40), 与其余同族一致,
     不需要也不新增本弹窗的断点例外。 */
  .settings-account-r15-interface-modal
) {
  max-width: min(var(--modal-max-width, 1120px), calc(100vw - var(--mf-sidebar-width) - 40px)) !important;
}

/* PM08C-BEGIN: named reference/asset pickers keep their existing caps and business DOM. */
body:not(.home-mode) :is(.aile-refpick, .reflib-picker-overlay) {
  inset: 0 0 0 var(--mf-sidebar-width) !important;
  width: auto !important;
  max-width: none !important;
  z-index: var(--mf-layer-modal) !important;
}
body:not(.home-mode) .aile-refpick > .cm-modal-card { --modal-max-width: 980px; }
body:not(.home-mode) .reflib-picker { --modal-max-width: 920px; }
body:not(.home-mode) :is(.aile-refpick > .cm-modal-card, .reflib-picker) {
  max-width: min(var(--modal-max-width), calc(100vw - var(--mf-sidebar-width) - 40px)) !important;
}
/* PM08C-END */

/* PM08D-BEGIN: AI生图画布 06 两库（素材库 #aiGenMaterialLibraryModal／输出库 #aiGenOutputLibraryModal）弹层。
   弹层 DOM 挂在 .aigen-node-panel > .aigen-product-shell 里（不是 body 下），两处祖先让它离开视口／压不过侧栏：
   (1) .aigen-node-panel 的 backdrop-filter 让它成为 position:fixed 后代的包含块，inset:0 相对整块面板（1024 宽实测约 2020px 高）而非视口，
       居中的面板落在视口之下；(2) .aigen-product-shell 是 position:relative;z-index:1 的层叠上下文，弹层 z-index 压不过侧栏。
   弹层开着时撤掉这两处（同形先例：css/06 的 is-output-modal-layer-open 对节点配置弹窗的处理），再按全局弹层族契约接入（从侧栏右侧起、--mf-layer-modal；面板是 flex 子项，自己会在可用宽内收缩，不另设 max-width）。
   弹层关着时不变；不改 DOM／JS／弹层内部。 */
body:not(.home-mode) .panel.aigen-node-panel:has(:is(.aigen-material-modal, .aigen-output-library-modal).open) {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
body:not(.home-mode) .aigen-product-shell:has(:is(.aigen-material-modal, .aigen-output-library-modal).open) {
  z-index: auto !important;
}
body:not(.home-mode) :is(.aigen-material-modal, .aigen-output-library-modal) {
  inset: 0 0 0 var(--mf-sidebar-width) !important;
  z-index: var(--mf-layer-modal) !important;
}
/* PM08D-2（矮屏）：面板内容超出 max-height（≈≤700px 高）时，原先「确认／返回」掉到面板下缘之外——素材库要滚面板才点得到（1024×600、390×600 实测确认键 bottom 643／748 > 视口 600），
   输出库在 390×600 溢出面板边框。面板自己可滚，底行（确认／返回）粘在面板可视区底部，不用滚动就点得到；内容放得下时不起作用（sticky 无位移）。 */
body:not(.home-mode) :is(.aigen-material-modal-panel, .aigen-output-library-panel) {
  overflow-y: auto;
}
/* 底行底色不新造：夜间素材库＝面板自己渐变末端色（css/06_aigen_remodel_tail.css:6034 .aigen-material-modal-panel 的 linear-gradient 第二个色标）、夜间输出库＝面板自己的 rgba(7,25,38,.96)（css/06:6474，见下），日间＝css/42_platform_day_theme_r1.css:454 对这两个面板的 background:#ffffff。 */
body:not(.home-mode) :is(.aigen-material-modal-panel, .aigen-output-library-panel) > .aigen-material-modal-actions {
  position: sticky;
  bottom: 0;
  background: rgba(3, 19, 29, .98);
}
/* 输出库面板的 grid-template-rows 比子项多一条空轨道（底部本来就多 14px 间距），不补这条时粘底的底行离面板下缘只有约 5.5px（贴边）；素材库没有这个现象，不需要。 */
body:not(.home-mode) .aigen-output-library-panel > .aigen-material-modal-actions {
  background: rgba(7, 25, 38, .96);
  margin-bottom: -18px;
  padding-bottom: 18px;
}
html[data-meifan-theme="day"] body:not(.home-mode) :is(.aigen-material-modal-panel, .aigen-output-library-panel) > .aigen-material-modal-actions {
  background: #ffffff;
}
@media (max-width: 980px) {
  /* <=980 侧栏是粘性顶栏（见下方 UI-MODAL-CLOSE-BRAND-OVERLAP-1），同族契约：弹层撑满并压在顶栏之上。 */
  body:not(.home-mode) :is(.aigen-material-modal, .aigen-output-library-modal) {
    inset: 0 !important;
    z-index: calc(var(--mf-layer-sidebar) + 2) !important;
  }
}
/* PM08D-END */

/* PM08E-BEGIN: 内容营销「营销项目库」弹层（.marketing-video-output-modal，06 号 r9OpenVideoOutputLibrary 挂在 body 下）接入全局弹层族契约。
   原先它 z-index 1200、inset 0、对话框（.vl-fs-dialog，宽 1180）按整个视口居中，侧栏按契约在所有弹层之上，于是 1585 宽时对话框左缘 202.5 压进侧栏约 36（V5.3／主刀二号在 N、D 上观察）。
   与 PM08D 同形：>=981 从侧栏右缘起、--mf-layer-modal（侧栏仍在上、可见可点）；宽度上限按本遮罩 padding 24×2 减 48，让对话框落在遮罩留白之内（用族里常见的 40 时，1440 宽对话框两侧各压进留白 4）。
   <=980 侧栏是粘性顶栏：同 PM08D 与 UI-MODAL-CLOSE-BRAND-OVERLAP-1，遮罩撑满、压在顶栏之上；宽度上限不扣侧栏宽（761–980 时 --mf-sidebar-width 仍是 248，扣了会把对话框压到约 524）。
   不改 DOM／JS／弹层内部（总指挥令 CMD-1573；方案 6c57ae30、补页 59a31b09）。 */
body:not(.home-mode) > .marketing-video-output-modal {
  inset: 0 0 0 var(--mf-sidebar-width) !important;
  width: auto !important;
  max-width: none !important;
  z-index: var(--mf-layer-modal) !important;
}
body:not(.home-mode) > .marketing-video-output-modal > .marketing-video-output-dialog { --modal-max-width: 1180px; }
body:not(.home-mode) > .marketing-video-output-modal > .marketing-video-output-dialog {
  max-width: min(var(--modal-max-width), calc(100vw - var(--mf-sidebar-width) - 48px)) !important;
}
@media (max-width: 980px) {
  body:not(.home-mode) > .marketing-video-output-modal {
    inset: 0 !important;
    z-index: calc(var(--mf-layer-sidebar) + 2) !important;
  }
  body:not(.home-mode) > .marketing-video-output-modal > .marketing-video-output-dialog {
    max-width: min(var(--modal-max-width), calc(100vw - 48px)) !important;
  }
}
/* PM08E-END */

@media (max-width: 760px) {
  body:not(.home-mode) {
    --mf-sidebar-width: 0px;
  }
  /* Mobile navigation occupies the same pixels as the upload dialog header.
     Let this dialog cover the sidebar so its Close action remains reachable. */
  body:not(.home-mode) .project-dashboard-upload-modal {
    inset: 0 !important;
    z-index: calc(var(--mf-layer-sidebar) + 2) !important;
  }
  /* Keyboard users can open the account menu while upload stays open.
     Raise only the opened account surfaces above this upload dialog. */
  body:not(.home-mode):has(.project-dashboard-upload-modal:not(.hidden)) .sidebar:has(.account-popover:not(.hidden)) {
    z-index: calc(var(--mf-layer-sidebar) + 3) !important;
  }
  body:not(.home-mode):has(.project-dashboard-upload-modal:not(.hidden)) .uam-r1-backdrop {
    z-index: calc(var(--mf-layer-sidebar) + 4) !important;
  }
}

/* UI-MODAL-CLOSE-BRAND-OVERLAP-1 (GLOBAL-UI-SIDEBAR-MODAL-LAYER 补充):
   <=980px 时侧栏是粘性顶栏(02_project.css 的 max-width:980px 段),不再是左列,
   而它的层级 --mf-layer-sidebar 高于弹层 --mf-layer-modal,会盖住撑满高度的弹层头部『关闭』
   (实测 820x900: × 中心命中 BUTTON.brand, 点击回首页、弹层不关)。
   契约: <=980 弹层开着时顶栏在遮罩之下; >=981 不变(侧栏仍是左列、弹层仍从侧栏右侧起)。
   同形先例: 上方 <=760 的上传弹层特例。不改 --mf-sidebar-width(其它消费者不受波及)。
   不含: .video-disclaimer-modal(非首页模式下被通用规则设为 position:relative, 在流里, 不是视口覆盖层; 抬层级反会盖到顶栏上)
   与无 HTML/JS 使用的 .project-review-modal。 */
@media (max-width: 980px) {
  body:not(.home-mode) :is(
    .project-create-modal,
    .project-message-center,
    .project-dashboard-upload-modal,
    .project-module-detail-modal,
    .project-task-list-modal,
    .construction-task-modal,
    .project-material-preview-modal,
    .project-edit-modal,
    .case-share-modal,
    .ai-assist-modal
  ) {
    inset: 0 !important;
    z-index: calc(var(--mf-layer-sidebar) + 2) !important;
  }
  /* 与上方上传弹层同契约: 键盘用户在弹层开着时打开的账号菜单及其遮罩仍压在弹层之上。 */
  body:not(.home-mode):has(:is(
    .project-create-modal,
    .project-message-center,
    .project-dashboard-upload-modal,
    .project-module-detail-modal,
    .project-task-list-modal,
    .construction-task-modal,
    .project-material-preview-modal,
    .project-edit-modal,
    .case-share-modal,
    .ai-assist-modal
  ):not(.hidden)) .sidebar:has(.account-popover:not(.hidden)) {
    z-index: calc(var(--mf-layer-sidebar) + 3) !important;
  }
  body:not(.home-mode):has(:is(
    .project-create-modal,
    .project-message-center,
    .project-dashboard-upload-modal,
    .project-module-detail-modal,
    .project-task-list-modal,
    .construction-task-modal,
    .project-material-preview-modal,
    .project-edit-modal,
    .case-share-modal,
    .ai-assist-modal
  ):not(.hidden)) .uam-r1-backdrop {
    z-index: calc(var(--mf-layer-sidebar) + 4) !important;
  }
}

/* CONTENT-MARKETING-PUBLISHING-ACCOUNT-CARDS-20260623 */
.publishing-account-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 10px 0 8px;
}

.publishing-account-card {
  min-width: 0;
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(126, 188, 210, 0.28);
  border-radius: 8px;
  background: rgba(7, 26, 38, 0.64);
}

.publishing-account-card-head,
.publishing-account-card-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.publishing-account-card-head strong,
.publishing-account-card-foot span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.publishing-account-card-head small {
  margin-left: auto;
  color: var(--muted);
}

.publishing-account-card label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.publishing-account-card input,
.publishing-account-card textarea {
  width: 100%;
  min-width: 0;
}

.publishing-account-card-foot {
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}

.ops-account-choice-grid {
  grid-template-columns: 1fr;
}

.ops-account-meta-card {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid rgba(118, 203, 224, 0.24);
  border-radius: 8px;
  background: rgba(7, 25, 37, 0.74);
  color: var(--muted);
}

.ops-account-meta-card strong {
  color: var(--text);
}

@media (max-width: 1120px) {
  .publishing-account-grid {
    grid-template-columns: 1fr;
  }
}

/* OPS-AI-EDITING-WORKBENCH-REFOUNDATION-R1-20260623-01 */
.ai-editing-refoundation-r1 [data-mkt-tab="video-publish"],
.ai-editing-refoundation-r1 #mkt-tab-video-publish {
  display: none !important;
}

.ops-safety-gate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.ops-safety-gate-grid span,
.ai-editing-worker-card {
  border: 1px solid rgba(125, 211, 252, 0.18);
  background: rgba(8, 28, 42, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.ops-safety-gate-grid span {
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--text);
  font-size: 12px;
}

.ai-editing-worker-grid {
  align-items: stretch;
}

/* OPS-AI-EDITING-LOCAL-WORKER-CONTRACT-R2-20260623-02 */
.ai-editing-worker-status-r2 {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid rgba(94, 234, 212, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(12, 42, 56, 0.72), rgba(5, 18, 30, 0.84)),
    rgba(8, 25, 38, 0.7);
}

.ai-editing-worker-status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ai-editing-worker-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.ai-editing-worker-status-grid label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
}

.ai-editing-worker-status-grid select {
  min-width: 0;
  width: 100%;
}

.ai-editing-output-asset-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.ai-editing-output-asset-list span {
  border: 1px solid rgba(125, 211, 252, 0.2);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(7, 24, 36, 0.72);
  color: var(--text);
  font-size: 12px;
}

/* OPS-AI-EDITING-QUEUE-LIBRARY-SYNC-R3-20260623-03 */
.ai-editing-r3-actions {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(10, 36, 52, 0.76), rgba(5, 16, 28, 0.9)),
    rgba(6, 20, 34, 0.72);
}

.ai-editing-r3-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.ai-editing-r3-head div {
  display: grid;
  gap: 3px;
}

.ai-editing-r3-head small {
  color: var(--muted);
}

.ai-editing-r3-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ai-editing-r3-contract-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.ai-editing-r3-contract-grid article {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(125, 211, 252, 0.16);
  border-radius: 8px;
  background: rgba(6, 22, 36, 0.7);
}

.ai-editing-r3-contract-grid article strong {
  color: var(--text);
  font-size: 12px;
}

.ai-editing-r3-contract-grid span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.ai-editing-r3-contract-grid b {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.ai-editing-r3-contract-grid em {
  overflow: hidden;
  color: var(--text);
  font-size: 11px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-editing-r3-json {
  max-height: 240px;
  overflow: auto;
  margin: 0;
  padding: 10px;
  border: 1px dashed rgba(125, 211, 252, 0.24);
  border-radius: 8px;
  background: rgba(2, 10, 18, 0.72);
  color: #c7f9ff;
  font-size: 11px;
  line-height: 1.5;
  white-space: pre-wrap;
}

/* OPS-AI-EDITING-OPERABLE-DRYRUN-R4-20260623-04 */
.ai-editing-r4-operable {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid rgba(45, 212, 191, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(7, 37, 47, 0.82), rgba(5, 18, 29, 0.94)),
    rgba(4, 18, 30, 0.78);
}

.ai-editing-r4-head,
.ai-editing-r4-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.ai-editing-r4-head div,
.ai-editing-r4-section-head {
  min-width: 0;
}

.ai-editing-r4-head div {
  display: grid;
  gap: 3px;
}

.ai-editing-r4-head small {
  color: var(--muted);
}

.ai-editing-r4-stepbar {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.ai-editing-r4-stepbar button {
  min-width: 0;
  min-height: 38px;
  border: 1px solid rgba(125, 211, 252, 0.18);
  border-radius: 8px;
  background: rgba(8, 27, 40, 0.72);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.ai-editing-r4-stepbar button.current {
  border-color: rgba(94, 234, 212, 0.42);
  color: var(--text);
  box-shadow: 0 0 0 1px rgba(94, 234, 212, 0.08) inset;
}

.ai-editing-r4-stepbar button.done {
  border-color: rgba(52, 211, 153, 0.36);
  background: rgba(9, 55, 46, 0.6);
  color: #c9ffe9;
}

.ai-editing-r4-stepbar button.blocked {
  border-color: rgba(148, 163, 184, 0.14);
  color: rgba(190, 210, 220, 0.55);
}

.ai-editing-r4-stepbar button.neutral {
  border-style: dashed;
}

.ai-editing-r4-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ai-editing-r4-status-grid,
.ai-editing-r4-candidate-grid,
.ai-editing-r4-sync-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.ai-editing-r4-status-grid span,
.ai-editing-r4-candidate-grid span,
.ai-editing-r4-sync-grid span {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(125, 211, 252, 0.15);
  border-radius: 8px;
  background: rgba(5, 20, 33, 0.68);
}

.ai-editing-r4-status-grid .wide {
  grid-column: span 3;
}

.ai-editing-r4-status-grid b,
.ai-editing-r4-candidate-grid b,
.ai-editing-r4-sync-grid b {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.ai-editing-r4-status-grid em,
.ai-editing-r4-candidate-grid em,
.ai-editing-r4-sync-grid em {
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-editing-r4-candidate-panel,
.ai-editing-r4-sync-panel {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(56, 189, 248, 0.16);
  border-radius: 8px;
  background: rgba(7, 24, 38, 0.56);
}

@media (max-width: 960px) {
  .ai-editing-worker-status-grid {
    grid-template-columns: 1fr;
  }

  .ai-editing-r3-contract-grid {
    grid-template-columns: 1fr;
  }

  .ai-editing-r3-head,
  .ai-editing-r4-head,
  .ai-editing-r4-section-head {
    flex-direction: column;
  }

  .ai-editing-r4-stepbar,
  .ai-editing-r4-status-grid,
  .ai-editing-r4-candidate-grid,
  .ai-editing-r4-sync-grid {
    grid-template-columns: 1fr;
  }

  .ai-editing-r4-status-grid .wide {
    grid-column: span 1;
  }
}

/* OPS-AI-EDITING-CLOSEOUT-REMERGE-R9-20260624-02 */
body.marketing-mode #marketingSubTabs {
  display: none !important;
}

.api-r7-surface .api-r7-topbar,
.api-r6-owner-tools {
  display: none !important;
}

.marketing-video-output-entry {
  min-height: 34px;
  padding-inline: 14px;
  border-color: rgba(45, 212, 191, 0.35);
  background: linear-gradient(180deg, rgba(12, 42, 54, 0.86), rgba(7, 24, 36, 0.88));
  color: #d8fff7;
  font-weight: 800;
  white-space: nowrap;
}

body:not(.marketing-mode) #marketingVideoOutputLibraryButton {
  display: none !important;
}

.marketing-video-output-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(1, 8, 13, 0.68);
  backdrop-filter: blur(10px);
}

.marketing-video-output-dialog {
  display: grid;
  gap: 14px;
  width: min(760px, calc(100vw - 48px));
  max-height: min(720px, calc(100vh - 48px));
  padding: 16px;
  border: 1px solid rgba(125, 211, 252, 0.28);
  border-radius: 10px;
  background:
    linear-gradient(145deg, rgba(11, 39, 52, 0.96), rgba(3, 15, 25, 0.98)),
    rgba(4, 18, 29, 0.96);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.44);
}

.marketing-video-output-dialog header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.marketing-video-output-dialog header div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.marketing-video-output-dialog strong {
  color: #e7fbff;
  font-size: 16px;
}

.marketing-video-output-dialog header span {
  color: var(--muted);
  font-size: 12px;
}

.marketing-video-output-list {
  display: grid;
  gap: 8px;
  overflow: auto;
  max-height: min(560px, calc(100vh - 170px));
}

.marketing-video-output-row,
.marketing-video-output-empty,
.ai-editing-r9-output-owner {
  border: 1px solid rgba(45, 212, 191, 0.16);
  border-radius: 8px;
  background: rgba(3, 18, 30, 0.72);
}

.marketing-video-output-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 14px;
  align-items: center;
  padding: 11px 12px;
}

.marketing-video-output-row div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.marketing-video-output-row strong,
.marketing-video-output-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marketing-video-output-row span,
.marketing-video-output-row small {
  color: var(--muted);
  font-size: 11px;
}

.marketing-video-output-row em {
  color: #9ee7ff;
  font-size: 11px;
  font-style: normal;
}

.marketing-video-output-row small {
  grid-column: 1 / -1;
}

.marketing-video-output-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.marketing-video-output-filter-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
}

.marketing-video-output-filter-label select {
  background: rgba(3, 18, 30, 0.85);
  color: #e7fbff;
  border: 1px solid rgba(45, 212, 191, 0.24);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
}

.marketing-video-output-row .marketing-video-output-row-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.marketing-video-output-row-actions a {
  color: #9ee7ff;
  font-size: 12px;
  text-decoration: none;
}

.marketing-video-output-row-actions a:hover {
  text-decoration: underline;
}

.marketing-video-output-empty {
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

.ai-editing-r9-output-owner {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.ai-editing-r9-output-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.ai-editing-r9-output-grid label,
.ai-editing-r9-output-grid > span {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.ai-editing-r9-output-grid label span,
.ai-editing-r9-output-grid b {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.ai-editing-r9-output-grid select,
.ai-editing-r9-output-grid input {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  border: 1px solid rgba(125, 211, 252, 0.2);
  border-radius: 8px;
  padding: 7px 9px;
  background: rgba(2, 12, 22, 0.7);
  color: var(--text);
}

.ai-editing-r9-output-grid em {
  overflow: hidden;
  min-height: 34px;
  border: 1px solid rgba(125, 211, 252, 0.14);
  border-radius: 8px;
  padding: 8px 9px;
  color: #9ee7ff;
  font-size: 11px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .ai-editing-r9-output-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .ai-editing-r9-output-grid {
    grid-template-columns: 1fr;
  }
}

/* OPS-AI-LOCAL-WORKER-AUTO-ORCHESTRATION-R1-20260624-05 */
.ai-local-worker-r1 {
  margin-top: 12px;
  border: 1px solid rgba(94, 213, 255, 0.22);
  background: linear-gradient(135deg, rgba(7, 32, 42, 0.9), rgba(8, 21, 32, 0.84));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  padding: 12px;
  color: var(--text, #e8f7ff);
}

.ai-local-worker-r1-head,
.ai-local-worker-r1-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.ai-local-worker-r1-head strong,
.ai-local-worker-r1-backstage strong {
  display: block;
  font-size: 13px;
  line-height: 1.4;
}

.ai-local-worker-r1-head small {
  display: block;
  margin-top: 3px;
  color: rgba(218, 240, 247, 0.66);
  line-height: 1.5;
}

.ai-local-worker-r1-simple {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.ai-local-worker-r1-simple label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: rgba(218, 240, 247, 0.76);
  font-size: 12px;
}

.ai-local-worker-r1-simple select,
.ai-local-worker-r1-simple input {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(94, 213, 255, 0.24);
  border-radius: 6px;
  background: rgba(3, 18, 28, 0.78);
  color: var(--text, #e8f7ff);
  padding: 7px 8px;
}

.ai-local-worker-r1-runtime {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(220px, 1.2fr) minmax(150px, 0.8fr) minmax(150px, 0.8fr);
  gap: 8px;
  margin: 0 0 10px;
}

.ai-local-worker-r1-runtime span {
  min-width: 0;
  border: 1px solid rgba(45, 212, 191, 0.18);
  border-radius: 6px;
  background: rgba(2, 24, 31, 0.7);
  padding: 7px 8px;
}

.ai-local-worker-r1-runtime b {
  display: block;
  color: rgba(218, 240, 247, 0.7);
  font-size: 10px;
  line-height: 1.35;
}

.ai-local-worker-r1-runtime em,
.ai-local-worker-r1-runtime code {
  display: block;
  margin-top: 2px;
  color: #d8fff7;
  font-style: normal;
  overflow-wrap: anywhere;
}

.ai-local-worker-r1-runtime code {
  font-family: var(--mono, "Consolas", monospace);
  font-size: 11px;
}

.ai-local-worker-r1-actions {
  justify-content: flex-start;
  margin-bottom: 10px;
}

.ai-local-worker-r1-status {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.ai-local-worker-r1-status span,
.ai-local-worker-r1-node-grid span,
.ai-local-worker-r1-log span {
  min-width: 0;
  border: 1px solid rgba(94, 213, 255, 0.16);
  border-radius: 6px;
  background: rgba(0, 14, 22, 0.58);
  padding: 7px 8px;
}

.ai-local-worker-r1-status span.wide {
  grid-column: 1 / -1;
}

.ai-local-worker-r1-status b,
.ai-local-worker-r1-node-grid b,
.ai-local-worker-r1-log b {
  display: block;
  color: rgba(218, 240, 247, 0.72);
  font-size: 11px;
  line-height: 1.35;
}

.ai-local-worker-r1-status em,
.ai-local-worker-r1-node-grid em,
.ai-local-worker-r1-log em {
  display: block;
  margin-top: 2px;
  color: #e8f7ff;
  font-style: normal;
  overflow-wrap: anywhere;
  line-height: 1.45;
}

.ai-local-worker-r1-backstage {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr);
  gap: 10px;
  margin-top: 12px;
}

.ai-local-worker-r1-backstage > div {
  min-width: 0;
  border: 1px solid rgba(94, 213, 255, 0.18);
  border-radius: 8px;
  background: rgba(2, 20, 30, 0.52);
  padding: 10px;
}

.ai-local-worker-r1-node-grid,
.ai-local-worker-r1-file-grid,
.ai-local-worker-r1-log {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.ai-local-worker-r1-node-grid,
.ai-local-worker-r1-file-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ai-local-worker-r1-file-grid span {
  border: 1px dashed rgba(94, 213, 255, 0.18);
  border-radius: 6px;
  color: rgba(218, 240, 247, 0.82);
  background: rgba(0, 14, 22, 0.42);
  padding: 7px 8px;
  overflow-wrap: anywhere;
}

.ai-local-worker-r1-preview {
  display: grid;
  gap: 5px;
  min-height: 76px;
  margin-top: 8px;
  border: 1px dashed rgba(94, 213, 255, 0.24);
  border-radius: 8px;
  place-content: center;
  text-align: center;
  background: repeating-linear-gradient(
    -45deg,
    rgba(94, 213, 255, 0.04),
    rgba(94, 213, 255, 0.04) 8px,
    rgba(255, 255, 255, 0.02) 8px,
    rgba(255, 255, 255, 0.02) 16px
  );
}

.ai-local-worker-r1-preview b,
.ai-local-worker-r1-preview em {
  display: block;
  font-style: normal;
  overflow-wrap: anywhere;
}

.ai-local-worker-r1-preview em {
  color: rgba(218, 240, 247, 0.68);
}

/* OPS-CONTENT-MARKETING-INTERNAL-GATE-R1-20260624-11 */
body.marketing-mode #marketingSubTabs,
body.marketing-mode.ai-editing-refoundation-r1 #marketingSubTabs {
  display: flex !important;
  align-items: center;
  gap: 8px;
}

body.marketing-mode.ai-editing-refoundation-r1 #marketingSubTabs [data-mkt-tab="video-publish"] {
  display: inline-flex !important;
}

#marketingSubTabs [data-content-marketing-workspace-entry] {
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 7px 12px;
  border: 1px solid rgba(125, 211, 252, 0.22);
  border-radius: 8px;
  background: rgba(7, 25, 37, 0.62);
  color: rgba(229, 246, 255, 0.76);
  font-weight: 800;
}

#marketingSubTabs [data-content-marketing-workspace-entry].active {
  border-color: rgba(45, 212, 191, 0.45);
  background: linear-gradient(180deg, rgba(12, 54, 65, 0.92), rgba(6, 28, 43, 0.9));
  color: #e9feff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 0 1px rgba(45, 212, 191, 0.08);
}

#marketingSubTabs [data-content-marketing-workspace-entry="local_worker"] {
  border-color: rgba(251, 191, 36, 0.36);
  color: #ffe8ad;
}

.content-marketing-workflow-summary-r1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid rgba(45, 212, 191, 0.2);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(4, 34, 42, 0.82), rgba(5, 18, 30, 0.76));
}

.content-marketing-workflow-summary-r1 div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.content-marketing-workflow-summary-r1 strong {
  color: #e8fbff;
  font-size: 13px;
}

.content-marketing-workflow-summary-r1 span {
  color: rgba(218, 240, 247, 0.68);
  font-size: 12px;
}

.ai-local-worker-r1-debug {
  margin-top: 12px;
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: 8px;
  background: rgba(3, 18, 29, 0.48);
}

.ai-local-worker-r1-debug summary {
  cursor: pointer;
  padding: 10px 12px;
  color: #ffe8ad;
  font-weight: 800;
  list-style-position: inside;
}

.ai-local-worker-r1-debug[open] {
  padding: 0 10px 10px;
}

body[data-content-marketing-workspace="workflow"] .ai-local-worker-r1,
body[data-content-marketing-workspace="workflow"] .ai-editing-r4-operable {
  display: none !important;
}

body[data-content-marketing-workspace="local_worker"] #opsComfyStage,
body[data-content-marketing-workspace="local_worker"] #opsNodeShell .ops-comfy-stage,
body[data-content-marketing-workspace="local_worker"] #opsNodeShell .ops-project-context-bar {
  display: none !important;
}

body[data-content-marketing-workspace="local_worker"] #opsComfyLibrary {
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 12px;
}

body[data-content-marketing-workspace="local_worker"] .content-marketing-workflow-summary-r1 {
  border-color: rgba(251, 191, 36, 0.28);
  background: linear-gradient(135deg, rgba(50, 39, 9, 0.32), rgba(5, 18, 30, 0.86));
}

@media (max-width: 1100px) {
  .ai-local-worker-r1-simple,
  .ai-local-worker-r1-runtime,
  .ai-local-worker-r1-status,
  .ai-local-worker-r1-backstage {
    grid-template-columns: 1fr;
  }

  .ai-local-worker-r1-node-grid,
  .ai-local-worker-r1-file-grid {
    grid-template-columns: 1fr;
  }
}

/* TASK587-R4-PRODUCT-READABILITY-R1: shared tokens are scoped to the three
   existing role surfaces. Theme preference, routes and permissions stay intact. */
:is(#meifanPlatformWorkspaceC2Root, .pcs-shell) {
  color-scheme: dark;
  --r4-ui-bg: #04101a;
  --r4-ui-ink: #eaf4ff;
  --r4-ui-muted: #aec5dd;
  --r4-ui-panel: rgba(14, 38, 66, .90);
  --r4-ui-soft: #142d48;
  --r4-ui-line: #668baa;
  --r4-ui-accent: #4bb3ff;
  --r4-ui-selected: #020f1e;
  --r4-ui-selected-ink: #edf7ff;
  --r4-ui-hover: #244869;
  --r4-ui-focus: #9bdbff;
  --r4-ui-disabled-bg: #172e46;
  --r4-ui-glass: linear-gradient(118deg, rgba(196,229,255,.07), transparent 43%), rgba(14,38,66,.90);
  --r4-ui-highlight: rgba(207,235,255,.25);
  --r4-ui-shadow: inset 0 1px 0 var(--r4-ui-highlight), 0 12px 32px rgba(0,5,17,.26);
  /* Local aliases for generic controls rendered by the existing role modules. */
  --ink: var(--r4-ui-ink);
  --muted: var(--r4-ui-muted);
  --surface: var(--r4-ui-panel);
  --surface-strong: var(--r4-ui-soft);
  --surface-soft: var(--r4-ui-soft);
  --line: var(--r4-ui-line);
  --green: var(--r4-ui-accent);
  --teal: var(--r4-ui-accent);
}
html[data-meifan-theme="day"] :is(#meifanPlatformWorkspaceC2Root, .pcs-shell) {
  color-scheme: light;
  --r4-ui-bg: #f3f5f3;
  --r4-ui-ink: #202d28;
  --r4-ui-muted: #526159;
  --r4-ui-panel: #ffffff;
  --r4-ui-soft: #f0f4f1;
  --r4-ui-line: #758a7e;
  --r4-ui-accent: #126447;
  --r4-ui-selected: #174b39;
  --r4-ui-selected-ink: #ffffff;
  --r4-ui-hover: #e6eee8;
  --r4-ui-focus: #126447;
  --r4-ui-disabled-bg: #e6ece8;
  --r4-ui-glass: #ffffff;
  --r4-ui-highlight: rgba(255,255,255,.9);
  --r4-ui-shadow: 0 8px 24px rgba(20,45,32,.08);
}
/* Type exclusions filter native fields without outranking their disabled state. */
:is(#meifanPlatformWorkspaceC2Root, .pcs-shell) :where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]), select, textarea) {
  color: var(--r4-ui-ink);
  background: var(--r4-ui-soft);
  border: 1px solid var(--r4-ui-line);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
:is(#meifanPlatformWorkspaceC2Root, .pcs-shell) :is(input, textarea)::placeholder {
  color: var(--r4-ui-muted);
  opacity: 1;
}
:is(#meifanPlatformWorkspaceC2Root, .pcs-shell) select option {
  color: var(--r4-ui-ink);
  background: var(--r4-ui-soft);
}
html[data-meifan-theme] :is(#meifanPlatformWorkspaceC2Root, .pcs-shell) :is(button, input, select, textarea):disabled {
  color: var(--r4-ui-muted);
  background-color: var(--r4-ui-disabled-bg);
  opacity: 1;
  cursor: not-allowed;
}
:is(#meifanPlatformWorkspaceC2Root, .pcs-shell) :is(button, a, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--r4-ui-focus);
  outline-offset: 3px;
}
:is(#meifanPlatformWorkspaceC2Root, .pcs-shell) :is(input[type="checkbox"], input[type="radio"]) {
  accent-color: var(--r4-ui-accent);
}
@media (max-width: 720px) {
  :is(#meifanPlatformWorkspaceC2Root, .pcs-shell) :is(button, [role="button"], select, input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"])) { min-height: 44px; }
  :is(#meifanPlatformWorkspaceC2Root, .pcs-shell) :is(button, [role="button"]) { min-width: 44px; }
  :is(#meifanPlatformWorkspaceC2Root, .pcs-shell) {
    --r4-ui-panel: rgba(14,38,66,.96);
    --r4-ui-glass: linear-gradient(118deg, rgba(196,229,255,.035), transparent 43%), rgba(14,38,66,.96);
  }
  html[data-meifan-theme="day"] :is(#meifanPlatformWorkspaceC2Root, .pcs-shell) {
    --r4-ui-panel: #ffffff;
    --r4-ui-glass: #ffffff;
  }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  :is(#meifanPlatformWorkspaceC2Root, .pcs-shell) {
    --r4-ui-panel: #10263f;
    --r4-ui-glass: #10263f;
  }
  html[data-meifan-theme="day"] :is(#meifanPlatformWorkspaceC2Root, .pcs-shell) {
    --r4-ui-panel: #ffffff;
    --r4-ui-glass: #ffffff;
  }
}

/* UI-NIGHT-GRADIENT-1: the sticky action bar of the project modals (css/02 .project-modal-actions)
   fades from 72% white into var(--surface). In the night theme --surface is rgba(8,24,36,.76), so the
   fade showed as a pale band over the last form rows. Night/default only: start the fade from the
   same hue at zero opacity. The day theme keeps the base rule (white to white). */
html:not([data-meifan-theme="day"]) .project-modal-actions {
  background: linear-gradient(180deg, rgba(8, 24, 36, 0), var(--surface) 36%);
}

/* M01: keep the mobile create action beside the project title. The other tools
   retain their following full-width rows; permission/hidden rules stay intact. */
@media (max-width: 760px) {
  #projects .project-reference-topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
  }

  #projects .project-reference-topbar > .project-dashboard-titleblock {
    flex: 1 1 0;
    min-width: 0;
  }

  #projects .project-reference-topbar > .project-dashboard-tool-group {
    display: contents;
  }

  #projects .project-reference-topbar > .project-dashboard-tool-group > :not(#newProjectBtn) {
    order: 2;
    flex-basis: 100%;
  }

  #projects #newProjectBtn {
    order: 1;
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
    align-self: flex-start;
  }
}
/* MEIFAN-REFERENCE-LIBRARY-R1 · 素材大库模块 + 工作流选图弹窗（暗色玻璃，与系统设置一致） */

/* ---- 素材库模块（#materials）---- */
.reflib-shell { display: grid; gap: 14px; min-width: 0; max-width: 100%; overflow-x: hidden; }

.reflib-panel {
  border: 1px solid rgba(126, 158, 177, 0.22);
  background: rgba(11, 18, 28, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 18px 44px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
  border-radius: 12px;
  padding: 16px;
}

.reflib-toolbar { display: grid; gap: 10px; margin: 12px 0; }
.reflib-community-topbar {
  display: flex;
  justify-content: flex-end;
  margin: -4px 0 10px;
}
.reflib-scopetabs, .reflib-chips, .reflib-subtabs { display: flex; flex-wrap: wrap; gap: 8px; }

.reflib-scopetab, .reflib-subtab {
  padding: 7px 12px;
  border: 1px solid rgba(126, 158, 177, 0.24);
  border-radius: 8px;
  background: rgba(14, 24, 36, 0.74);
  color: rgba(226, 234, 236, 0.78);
  font-size: 13px; cursor: pointer;
}
.reflib-scopetab.active, .reflib-subtab.active {
  border-color: rgba(120, 210, 170, 0.6); color: #eafff4; background: rgba(18, 40, 34, 0.7);
}

.reflib-debug-drawer {
  margin-top: 10px;
  border: 1px dashed rgba(126, 158, 177, 0.28);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(8, 14, 22, 0.5);
}
.reflib-debug-drawer summary {
  cursor: pointer;
  color: rgba(214, 226, 226, 0.68);
  font-size: 12px;
}
.reflib-debug-drawer dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin: 8px 0 0;
}
.reflib-debug-drawer div { display: grid; gap: 3px; min-width: 0; }
.reflib-debug-drawer dt { color: rgba(90, 209, 230, 0.82); font-size: 11px; }
.reflib-debug-drawer dd { margin: 0; color: rgba(226, 234, 236, 0.7); font-size: 12px; word-break: break-word; }

/* REFLIB_SCOPE_COMMUNITY_R7 */
.reflib-community-entry {
  display: grid;
  gap: 4px;
  justify-items: start;
  width: fit-content;
  border: 1px solid rgba(120, 210, 170, 0.28);
  border-radius: 8px;
  padding: 9px 12px;
  background: rgba(9, 24, 31, 0.68);
  color: #eaf7f4;
  cursor: pointer;
}
.reflib-community-entry strong { font-size: 13px; }
.reflib-community-entry small { color: rgba(214, 226, 226, 0.64); }

.reflib-community-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 8, 12, 0.56);
  backdrop-filter: blur(14px);
}
.reflib-community-modal[hidden] { display: none; }

.reflib-community-card {
  width: min(920px, 100%);
  max-height: min(78vh, 760px);
  overflow: auto;
  display: grid;
  gap: 12px;
  border: 1px solid rgba(126, 158, 177, 0.28);
  border-radius: 12px;
  padding: 16px;
  background: rgba(9, 17, 27, 0.92);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: #eef7f7;
}
.reflib-community-dialog {
  align-content: start;
}
.reflib-community-card small,
.reflib-community-card dd {
  color: rgba(214, 226, 226, 0.68);
}
.reflib-community-card dl,
.reflib-community-rules {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}
.reflib-community-card dl div,
.reflib-community-rules div {
  display: grid;
  gap: 3px;
  padding: 8px;
  border: 1px solid rgba(126, 158, 177, 0.16);
  border-radius: 8px;
  background: rgba(6, 14, 22, 0.64);
}
.reflib-community-card dt {
  color: #9ee7bf;
  font-weight: 700;
}
.reflib-community-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
.reflib-community-asset {
  display: grid;
  gap: 9px;
  border: 1px solid rgba(126, 158, 177, 0.18);
  border-radius: 10px;
  padding: 10px;
  background: rgba(8, 18, 28, 0.72);
}
.reflib-community-asset strong {
  display: block;
  color: #f1f7f8;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.reflib-community-asset small {
  display: block;
  margin-top: 3px;
  font-size: 11px;
}
.reflib-community-thumb {
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(4, 9, 15, 0.72);
  color: rgba(214, 226, 226, 0.74);
  font-size: 12px;
}
.reflib-community-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.reflib-community-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.reflib-chip {
  padding: 5px 10px;
  border: 1px solid rgba(126, 158, 177, 0.2);
  border-radius: 999px;
  background: rgba(10, 16, 26, 0.55);
  color: rgba(214, 226, 226, 0.7);
  font-size: 12px; cursor: pointer;
}
.reflib-chip.active { border-color: #9ee7bf; color: #9ee7bf; }

.reflib-upload {
  display: grid; gap: 10px;
  padding: 12px;
  border: 1px dashed rgba(126, 158, 177, 0.3);
  border-radius: 8px;
  background: rgba(10, 16, 26, 0.45);
  margin-bottom: 12px;
}
.reflib-upload-row { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.reflib-field { display: grid; gap: 6px; color: rgba(226, 234, 236, 0.78); font-size: 12px; }
.reflib-field select {
  min-width: 220px; border: 1px solid rgba(126, 158, 177, 0.24); border-radius: 8px;
  padding: 8px 10px; background: rgba(6, 11, 18, 0.62); color: #eaf1f2; font-size: 13px;
}
.reflib-shared-note {
  min-height: 36px;
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid rgba(126, 158, 177, 0.18);
  border-radius: 8px;
  background: rgba(11, 28, 33, 0.56);
  color: rgba(214, 226, 226, 0.72);
  font-size: 12px;
}
.reflib-upload-btn { cursor: pointer; }
.reflib-dim-inputs { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; align-items: start; }
.reflib-dim-input { display: grid; gap: 4px; color: rgba(214, 226, 226, 0.66); font-size: 11px; }
.reflib-dim-input input {
  border: 1px solid rgba(126, 158, 177, 0.22); border-radius: 6px;
  padding: 6px 8px; background: rgba(6, 11, 18, 0.6); color: #eaf1f2; font-size: 12px;
}
.reflib-tag-picker {
  position: relative;
  display: grid;
  gap: 6px;
  min-width: 0;
}
.reflib-tag-toggle {
  min-height: 38px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(126, 158, 177, 0.24);
  border-radius: 8px;
  padding: 7px 9px;
  background: rgba(6, 11, 18, 0.62);
  color: #eaf1f2;
  cursor: pointer;
  text-align: left;
}
.reflib-tag-toggle span {
  font-size: 12px;
  color: rgba(214, 226, 226, 0.78);
}
.reflib-tag-toggle small {
  min-width: 0;
  justify-self: end;
  color: rgba(214, 226, 226, 0.74);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.reflib-tag-options {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(126, 158, 177, 0.2);
  border-radius: 8px;
  background: rgba(8, 15, 23, 0.82);
}
.reflib-tag-picker.open .reflib-tag-options {
  display: grid;
}
.reflib-tag-option {
  min-height: 28px;
  border: 1px solid rgba(126, 158, 177, 0.18);
  border-radius: 7px;
  background: rgba(14, 24, 36, 0.62);
  color: rgba(226, 234, 236, 0.78);
  font-size: 12px;
  cursor: pointer;
}
.reflib-tag-option.selected,
.reflib-tag-option[aria-pressed="true"] {
  border-color: rgba(120, 210, 170, 0.66);
  background: rgba(18, 40, 34, 0.72);
  color: #eafff4;
}

.reflib-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.reflib-category-tree {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(126, 158, 177, 0.2);
  border-radius: 10px;
  background: rgba(8, 15, 23, 0.58);
}
/* REFLIB_CATEGORY_EDIT_MODE_R4 */
.reflib-tree-tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(126, 158, 177, 0.18);
  border-radius: 8px;
  background: rgba(6, 14, 22, 0.72);
}
.reflib-tree-tools .danger {
  grid-column: 1 / -1;
}
.reflib-editmode {
  border-color: rgba(120, 210, 170, 0.36);
}
/* REFLIB_INLINE_SUBCATEGORY_R6 */
.reflib-tree-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.reflib-tree-row .reflib-tree-branch,
.reflib-tree-row .reflib-tree-subbranch {
  flex: 1 1 auto;
  min-width: 0;
}
.reflib-inline-add {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 5px 9px;
  border-color: rgba(120, 210, 170, 0.34);
  color: rgba(220, 255, 238, 0.88);
  background: rgba(18, 40, 34, 0.48);
}
.reflib-inline-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 6px;
  padding: 7px;
  border: 1px solid rgba(120, 210, 170, 0.28);
  border-radius: 8px;
  background: rgba(6, 14, 22, 0.78);
}
.reflib-inline-editor input {
  min-width: 0;
  border: 1px solid rgba(126, 158, 177, 0.24);
  border-radius: 7px;
  padding: 7px 9px;
  background: rgba(5, 10, 16, 0.76);
  color: #eaf1f2;
  font-size: 12px;
}
/* REFLIB_TREE_VISUAL_HIERARCHY_R3 */
.reflib-tree-root,
.reflib-tree-branch,
.reflib-tree-subbranch,
.reflib-tree-leaf {
  width: 100%;
  border: 1px solid rgba(126, 158, 177, 0.18);
  border-radius: 8px;
  background: rgba(14, 24, 36, 0.64);
  color: rgba(226, 234, 236, 0.78);
  cursor: pointer;
  text-align: left;
}
.reflib-tree-root,
.reflib-tree-branch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 800;
  background:
    linear-gradient(135deg, rgba(25, 58, 68, 0.86), rgba(9, 22, 32, 0.82));
  color: rgba(240, 250, 252, 0.94);
  letter-spacing: 0;
}
.reflib-tree-subgroup {
  display: grid;
  gap: 5px;
  padding-left: 12px;
}
.reflib-tree-subbranch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 9px;
  font-size: 12px;
  font-weight: 760;
  background: rgba(11, 29, 39, 0.7);
  color: rgba(226, 234, 236, 0.86);
}
.reflib-tree-subbranch small {
  min-width: 22px;
  border-radius: 999px;
  padding: 1px 6px;
  background: rgba(80, 205, 231, 0.1);
  color: rgba(214, 226, 226, 0.7);
  font-weight: 700;
  text-align: center;
}
.reflib-tree-branch small {
  min-width: 24px;
  border-radius: 999px;
  padding: 1px 6px;
  background: rgba(80, 205, 231, 0.12);
  color: rgba(214, 226, 226, 0.74);
  font-weight: 700;
  text-align: center;
}
.reflib-tree-leaves {
  display: grid;
  gap: 5px;
  padding-left: 14px;
}
.reflib-tree-group.collapsed .reflib-tree-leaves {
  display: none;
}
.reflib-tree-group.collapsed .reflib-tree-subgroup {
  display: none;
}
.reflib-tree-subleaves {
  display: grid;
  gap: 5px;
  padding-left: 12px;
}
.reflib-tree-subgroup.collapsed .reflib-tree-subleaves {
  display: none;
}
.reflib-tree-leaf {
  padding: 6px 8px 6px 14px;
  font-size: 12px;
  font-weight: 500;
  background: rgba(7, 17, 27, 0.48);
  color: rgba(214, 226, 226, 0.64);
}
.reflib-tree-root.active,
.reflib-tree-branch.active,
.reflib-tree-subbranch.active,
.reflib-tree-leaf.active {
  border-color: rgba(120, 210, 170, 0.66);
  background: rgba(18, 40, 34, 0.72);
  color: #eafff4;
}
/* LIB-M-C6(2026-10-27) 手机分类芯片行（定稿 M16-R2-L01）：≤760px 分类树由竖列改为可折行的芯片；
   展开后的二级内容整行落在全部芯片下方（order:1），二级本身不改（A2 不在本卡）。≥761 不动。 */
@media (max-width: 760px) {
  .reflib-category-tree { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
  .reflib-category-tree > .reflib-tree-tools { flex: 1 0 100%; }
  .reflib-category-tree .reflib-inline-editor,
  .reflib-category-tree .reflib-tree-leaves,
  .reflib-category-tree .reflib-tree-subgroup { flex: 1 0 100%; order: 1; }
  .reflib-category-tree .reflib-tree-group { display: contents; }
  .reflib-category-tree .reflib-tree-root,
  .reflib-category-tree .reflib-tree-branch { width: auto; min-height: 31px; padding: 4px 9px; gap: 5px; font-size: 13px; }
}
.reflib-content { min-width: 0; display: grid; gap: 10px; }
.reflib-content-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: rgba(226, 234, 236, 0.84);
  font-size: 13px;
}
.reflib-content-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.reflib-bulk-delete[disabled] {
  opacity: 0.48;
  cursor: not-allowed;
}
.reflib-content-head > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.reflib-content-head small { color: rgba(214, 226, 226, 0.74); }
.reflib-content-search {
  width: min(320px, 45%);
  min-width: 220px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(126, 158, 177, 0.22);
  border-radius: 8px;
  padding: 6px 9px;
  background: rgba(6, 11, 18, 0.58);
  color: rgba(214, 226, 226, 0.62);
}
.reflib-content-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #eaf1f2;
  font-size: 13px;
}
.reflib-content-search input::placeholder {
  color: rgba(214, 226, 226, 0.74);
}

.reflib-grid, .reflib-pick-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px;
}

.reflib-card {
  position: relative;
  display: grid; gap: 8px; padding: 10px;
  border: 1px solid rgba(126, 158, 177, 0.22); border-radius: 10px; background: rgba(14, 24, 36, 0.74);
  cursor: pointer;
}
.reflib-card.selected {
  border-color: rgba(120, 210, 170, 0.7);
  background: rgba(18, 42, 36, 0.78);
  box-shadow: 0 0 0 1px rgba(120, 210, 170, 0.14);
}
.reflib-card-select {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(126, 158, 177, 0.34);
  border-radius: 7px;
  background: rgba(6, 11, 18, 0.76);
  cursor: pointer;
}
.reflib-card-select input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.reflib-card-select span {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  border: 1px solid rgba(214, 226, 226, 0.58);
  background: rgba(12, 20, 30, 0.9);
}
.reflib-card-select input:checked + span {
  border-color: rgba(120, 210, 170, 0.9);
  background: linear-gradient(135deg, rgba(120, 210, 170, 0.96), rgba(70, 146, 214, 0.9));
}
.reflib-card:hover,
.reflib-card:focus-visible {
  outline: none;
  border-color: rgba(120, 210, 170, 0.58);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 0 0 1px rgba(120,210,170,0.12);
}
.reflib-thumb {
  aspect-ratio: 16 / 10; display: flex; align-items: center; justify-content: center;
  overflow: hidden; border-radius: 8px; background: rgba(6, 11, 18, 0.62);
  color: rgba(214, 226, 226, 0.74); font-size: 12px;
}
.reflib-thumb img { width: 100%; height: 100%; object-fit: cover; }
.reflib-meta { display: grid; gap: 3px; min-width: 0; }
.reflib-meta strong { color: #f1f7f8; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reflib-meta small { color: rgba(214, 226, 226, 0.6); font-size: 11px; }
.reflib-pills { display: flex; gap: 6px; }
.reflib-actions { display: flex; justify-content: flex-end; }
.reflib-ro { color: rgba(214, 226, 226, 0.74); font-size: 11px; }
.reflib-empty { grid-column: 1 / -1; padding: 18px; text-align: center; color: rgba(214, 226, 226, 0.6); font-size: 13px; }
.reflib-note { color: rgba(214, 226, 226, 0.66); font-size: 12px; margin: 0 0 8px; }

.reflib-detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(4, 8, 14, 0.66);
  backdrop-filter: blur(5px);
}
.reflib-detail-dialog {
  width: min(980px, 94vw);
  max-height: 88vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid rgba(126, 158, 177, 0.28);
  border-radius: 14px;
  background: rgba(11, 18, 28, 0.96);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}
.reflib-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(126, 158, 177, 0.18);
}
.reflib-detail-head strong { color: #f1f7f8; font-size: 16px; }
.reflib-detail-head small { display: block; color: rgba(214, 226, 226, 0.74); margin-top: 3px; }
.reflib-detail-body {
  display: grid;
  grid-template-columns: minmax(260px, 1.15fr) minmax(320px, 0.85fr);
  gap: 14px;
  min-height: 0;
  overflow: auto;
  padding: 16px;
}
.reflib-detail-media {
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(126, 158, 177, 0.18);
  border-radius: 12px;
  background: rgba(6, 11, 18, 0.62);
  color: rgba(214, 226, 226, 0.74);
}
.reflib-detail-media img {
  width: 100%;
  height: 100%;
  max-height: 58vh;
  object-fit: contain;
}
.reflib-detail-side { display: grid; gap: 12px; align-content: start; min-width: 0; }
.reflib-detail-meta {
  display: grid;
  gap: 8px;
  margin: 0;
}
.reflib-detail-meta div {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(126, 158, 177, 0.16);
  border-radius: 8px;
  background: rgba(14, 24, 36, 0.55);
}
.reflib-detail-meta dt { color: rgba(214, 226, 226, 0.74); font-size: 12px; }
.reflib-detail-meta dd { margin: 0; color: rgba(226, 234, 236, 0.84); font-size: 13px; overflow-wrap: anywhere; }
.reflib-detail-form { display: grid; gap: 10px; }
.reflib-detail-form label {
  display: grid;
  gap: 5px;
  color: rgba(214, 226, 226, 0.66);
  font-size: 12px;
}
.reflib-detail-form input {
  width: 100%;
  border: 1px solid rgba(126, 158, 177, 0.24);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(6, 11, 18, 0.62);
  color: #eaf1f2;
  font-size: 13px;
}
.reflib-detail-dims { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.reflib-detail-actions { display: flex; gap: 8px; justify-content: flex-end; align-items: center; }
.ghost.danger { color: #ffd0d0; border-color: rgba(255, 112, 112, 0.35); }

.reflib-upload-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2140;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(4, 8, 14, 0.68);
  backdrop-filter: blur(5px);
}
.reflib-upload-dialog {
  width: min(1180px, 94vw);
  max-height: 90vh;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 12px;
  border: 1px solid rgba(126, 158, 177, 0.28);
  border-radius: 14px;
  background: rgba(11, 18, 28, 0.97);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  padding: 16px;
}
.reflib-upload-modal-head,
.reflib-upload-modal-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.reflib-upload-modal-head strong {
  display: block;
  color: #f1f7f8;
  font-size: 16px;
}
.reflib-upload-modal-head small {
  display: block;
  margin-top: 4px;
  color: rgba(214, 226, 226, 0.74);
}
.reflib-upload-drop {
  min-height: 116px;
  display: grid;
  place-items: center;
  gap: 8px;
  border: 1px dashed rgba(126, 158, 177, 0.36);
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 0%, rgba(80, 205, 231, 0.09), transparent 42%),
    rgba(6, 11, 18, 0.58);
  color: rgba(226, 234, 236, 0.82);
  text-align: center;
}
.reflib-upload-drop.drag-over {
  border-color: rgba(120, 210, 170, 0.72);
  background: rgba(18, 40, 34, 0.72);
}
.reflib-upload-drop small {
  color: rgba(214, 226, 226, 0.74);
}
.reflib-upload-card-grid {
  min-height: 180px;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  align-content: start;
}
.reflib-upload-card {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(126, 158, 177, 0.22);
  border-radius: 12px;
  background: rgba(14, 24, 36, 0.76);
  padding: 10px;
}
.reflib-upload-card-media {
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(6, 11, 18, 0.64);
  color: rgba(214, 226, 226, 0.74);
}
.reflib-upload-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.reflib-upload-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.reflib-upload-name {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  gap: 4px;
  color: rgba(214, 226, 226, 0.66);
  font-size: 11px;
}
.reflib-upload-name input {
  min-width: 0;
  border: 1px solid rgba(126, 158, 177, 0.24);
  border-radius: 8px;
  padding: 7px 9px;
  background: rgba(6, 11, 18, 0.68);
  color: #eaf1f2;
  font-size: 13px;
}
.reflib-upload-name input:focus,
.reflib-inline-editor input:focus {
  outline: none;
  border-color: rgba(120, 210, 170, 0.64);
  box-shadow: 0 0 0 2px rgba(120, 210, 170, 0.12);
}
.reflib-upload-card-head strong {
  min-width: 0;
  color: #f1f7f8;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.reflib-upload-card-tags {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

/* ---- 工作流选图弹窗 ---- */
.reflib-picker-overlay {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(4, 8, 14, 0.66); backdrop-filter: blur(4px);
}
.reflib-picker {
  width: min(920px, 94vw); max-height: 88vh; display: flex; flex-direction: column;
  border: 1px solid rgba(126, 158, 177, 0.28); border-radius: 14px;
  background: rgba(11, 18, 28, 0.96);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.reflib-picker-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid rgba(126, 158, 177, 0.18); color: #f1f7f8;
}
.reflib-picker-close {
  width: 30px; height: 30px; border-radius: 8px; border: 1px solid rgba(126, 158, 177, 0.24);
  background: transparent; color: #e2eaec; font-size: 18px; cursor: pointer;
}
.reflib-srctabs { display: flex; gap: 8px; padding: 12px 16px 0; }
.reflib-srctab {
  padding: 8px 14px; border: 1px solid rgba(126, 158, 177, 0.24); border-radius: 8px 8px 0 0;
  background: rgba(14, 24, 36, 0.6); color: rgba(226, 234, 236, 0.78); font-size: 13px; cursor: pointer;
}
.reflib-srctab.active { border-color: rgba(120, 210, 170, 0.6); color: #eafff4; background: rgba(18, 40, 34, 0.7); }
.reflib-picker-body { padding: 14px 16px; overflow: auto; display: grid; gap: 12px; }
.reflib-pick-controls { display: grid; gap: 8px; }
.reflib-pick-card {
  display: grid; gap: 6px; padding: 8px; cursor: pointer;
  border: 1px solid rgba(126, 158, 177, 0.22); border-radius: 10px; background: rgba(14, 24, 36, 0.74);
  text-align: left; color: inherit;
}
.reflib-pick-card:hover { border-color: #9ee7bf; }
.reflib-pick-name { color: #eaf1f2; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.material-library-entry { margin: 10px 0; }

/* ---- 设置页诚实瘦身配套（上一轮，沿用）---- */
.settings-level3-item {
  display: grid; grid-template-columns: 18px 1fr; gap: 8px; align-items: start;
  color: rgba(226, 234, 236, 0.76); font-size: 13px;
}
.settings-level3-dot { color: rgba(157, 178, 187, 0.7); text-align: center; }
.system-settings-detail-note, .owner-prompt-note, .system-quote-note {
  margin: 8px 0 0; color: rgba(214, 226, 226, 0.6); font-size: 12px; line-height: 1.6;
}
.quote-readonly-flag {
  display: inline-flex; align-items: center; gap: 6px; color: rgba(214, 226, 226, 0.74); font-size: 13px;
}
.material-contract-rules {
  margin-top: 12px; border: 1px solid rgba(126, 158, 177, 0.18); border-radius: 8px;
  background: rgba(10, 16, 26, 0.42); padding: 8px 12px;
}
.material-contract-rules summary { cursor: pointer; color: rgba(214, 226, 226, 0.74); font-size: 12px; }
.material-contract-rules .material-contract-grid { margin-top: 10px; }

/* === 卡库平台化（人物卡/数字人卡/提示词卡）管理面板 === */
.card-lib-manager { display: grid; gap: 12px; margin-top: 10px; }
.card-lib-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.card-lib-tabs .card-tab {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px; border: 1px solid rgba(126, 158, 177, 0.24); border-radius: 8px;
  background: rgba(14, 24, 36, 0.74); color: rgba(226, 234, 236, 0.78); font-size: 13px; cursor: pointer;
}
.card-lib-tabs .card-tab.active { border-color: rgba(120, 210, 170, 0.6); color: #eafff4; background: rgba(18, 40, 34, 0.7); }
.card-lib-tabs .card-tab span { min-width: 18px; padding: 0 5px; border-radius: 999px; background: rgba(126, 158, 177, 0.22); font-size: 11px; text-align: center; }
.card-lib-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.card-lib-add input {
  border: 1px solid rgba(126, 158, 177, 0.24); border-radius: 8px; padding: 8px 10px;
  background: rgba(6, 11, 18, 0.62); color: #eaf1f2; font-size: 13px; min-width: 200px;
}
.card-lib-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.card-lib-table th, .card-lib-table td { border: 1px solid rgba(126, 158, 177, 0.18); padding: 8px 10px; text-align: left; color: rgba(226, 234, 236, 0.82); }
.card-lib-table th { color: rgba(214, 226, 226, 0.7); }
.card-lib-table strong { color: #f1f7f8; }
.card-lib-table small { display: block; color: rgba(214, 226, 226, 0.6); font-size: 11px; }
.card-lib-note { margin: 0; color: rgba(214, 226, 226, 0.74); font-size: 12px; line-height: 1.6; }

/* SYSTEM_CARD_LIBRARY_WORKSPACE_R1 */
.card-lib-manager[data-card-library="system_library"] {
  display: grid;
  gap: 12px;
  margin-top: 10px;
}
.card-lib-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.card-lib-head strong { color: #f1f7f8; font-size: 14px; }
.card-lib-head p { margin: 4px 0 0; color: rgba(214, 226, 226, 0.62); font-size: 12px; }
.card-lib-community-entry {
  align-self: flex-start;
  border: 1px solid rgba(232, 190, 92, 0.5);
  border-radius: 10px;
  padding: 8px 12px;
  background: rgba(232, 190, 92, 0.1);
  color: #ffe2a3;
  cursor: pointer;
  text-align: left;
}
.card-lib-community-entry small {
  display: block;
  margin-top: 2px;
  color: rgba(255, 226, 163, 0.62);
  font-size: 11px;
}
.card-lib-source-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.card-source-tab,
.card-edit-mode {
  border: 1px solid rgba(126, 158, 177, 0.24);
  border-radius: 8px;
  padding: 7px 12px;
  background: rgba(14, 24, 36, 0.72);
  color: rgba(226, 234, 236, 0.78);
  font-size: 12px;
  cursor: pointer;
}
.card-source-tab.active,
.card-edit-mode.active {
  border-color: rgba(120, 210, 170, 0.64);
  background: rgba(18, 48, 38, 0.72);
  color: #eafff4;
}
.card-lib-add select,
.card-lib-add textarea {
  border: 1px solid rgba(126, 158, 177, 0.24);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(6, 11, 18, 0.62);
  color: #eaf1f2;
  font-size: 13px;
}
.card-lib-add select:focus,
.card-lib-add input:focus,
.card-lib-add textarea:focus,
.prompt-edit-dialog input:focus,
.prompt-edit-dialog select:focus,
.prompt-edit-dialog textarea:focus {
  outline: none;
  border-color: rgba(120, 210, 170, 0.64);
  box-shadow: 0 0 0 2px rgba(120, 210, 170, 0.12);
}
.card-lib-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}
.card-lib-item {
  min-height: 188px;
  border: 1px solid rgba(126, 158, 177, 0.2);
  border-radius: 10px;
  padding: 10px;
  background: linear-gradient(180deg, rgba(18, 32, 45, 0.86), rgba(8, 18, 29, 0.78));
  color: rgba(226, 234, 236, 0.8);
  cursor: pointer;
}
.card-lib-item:hover {
  border-color: rgba(120, 210, 170, 0.48);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
}
.bio-card,
.digital-card,
.prompt-card {
  position: relative;
  overflow: hidden;
}
.card-lib-item-body {
  display: grid;
  gap: 5px;
  margin-top: 8px;
}
.card-lib-item-body strong,
.prompt-card-head strong { color: #f1f7f8; font-size: 14px; }
.card-lib-item-body p,
.prompt-card p {
  margin: 0;
  color: rgba(214, 226, 226, 0.66);
  font-size: 12px;
  line-height: 1.5;
}
.card-lib-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 8px;
}
.card-source-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 7px;
  background: rgba(61, 170, 135, 0.2);
  color: #91f0c8;
  font-size: 11px;
}
.bio-card-photo {
  min-height: 116px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--card-accent, #4a6f8f) 42%, transparent), transparent 58%),
    linear-gradient(135deg, rgba(70, 105, 124, 0.72), rgba(18, 28, 42, 0.88));
  color: rgba(241, 247, 248, 0.9);
  font-weight: 700;
  text-align: center;
}
.bio-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.digital-avatar-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}
.digital-avatar-strip span {
  min-height: 72px;
  border: 1px solid rgba(126, 158, 177, 0.18);
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, color-mix(in srgb, var(--card-accent, #40627a) 52%, #0b1420), rgba(6, 11, 18, 0.9));
  color: rgba(241, 247, 248, 0.82);
  font-size: 12px;
}
.digital-voice-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid rgba(126, 158, 177, 0.16);
  border-radius: 8px;
  padding: 6px 8px;
  color: rgba(214, 226, 226, 0.72);
  font-size: 12px;
}

/* SYSTEM_DIGITAL_HUMAN_LIBRARY_R1 */
.digital-card-add {
  display: grid;
  grid-template-columns: minmax(220px, 320px) auto minmax(260px, 1fr);
  align-items: center;
}
.digital-card-add small {
  color: rgba(214, 226, 226, 0.62);
  font-size: 12px;
  line-height: 1.5;
}
.digital-asset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
.digital-asset-slot {
  min-height: 76px;
  border: 1px solid rgba(126, 158, 177, 0.18);
  border-radius: 8px;
  display: grid;
  place-items: center;
  gap: 3px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(50, 74, 92, 0.64), rgba(6, 11, 18, 0.9));
  color: rgba(241, 247, 248, 0.82);
  font-size: 12px;
  text-align: center;
}
.digital-asset-slot.has-asset,
.digital-asset-slot.drag-over {
  border-color: rgba(120, 210, 170, 0.58);
  background: rgba(18, 48, 38, 0.66);
}
.digital-asset-slot img {
  width: 100%;
  height: 58px;
  object-fit: cover;
}
.digital-asset-slot small {
  max-width: 100%;
  padding: 0 5px 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(226, 234, 236, 0.7);
}
.digital-media-row {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(126, 158, 177, 0.16);
  border-radius: 8px;
  padding: 6px 8px;
  margin-top: 7px;
  color: rgba(214, 226, 226, 0.72);
  font-size: 12px;
}
.digital-media-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #eaf1f2;
}
.digital-voice-sample {
  border-color: rgba(114, 217, 246, 0.22);
}
.digital-detail-card {
  display: grid;
  gap: 10px;
}
.digital-upload-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(126, 158, 177, 0.16);
  border-radius: 10px;
  padding: 9px;
  background: rgba(6, 11, 18, 0.42);
}
.digital-upload-controls small {
  flex-basis: 100%;
  color: rgba(214, 226, 226, 0.6);
  font-size: 12px;
}
.digital-script-box {
  border: 1px solid rgba(126, 158, 177, 0.16);
  border-radius: 10px;
  padding: 9px 10px;
  background: rgba(8, 18, 29, 0.5);
}
.digital-script-box span {
  display: block;
  margin-bottom: 5px;
  color: rgba(157, 178, 187, 0.78);
  font-size: 12px;
}
.digital-script-box p {
  margin: 0;
  color: rgba(226, 234, 236, 0.82);
  line-height: 1.55;
}
.prompt-lib-layout {
  display: grid;
  grid-template-columns: minmax(190px, 230px) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.prompt-position-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.prompt-position-option {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  padding: 5px 8px;
  border: 1px solid rgba(114, 190, 214, .28);
  border-radius: 8px;
  background: rgba(6, 28, 40, .58);
  color: rgba(232, 247, 252, .82);
  font-size: 12px;
}
.prompt-position-option input {
  accent-color: #72d9f6;
}
.prompt-lib-tree {
  border: 1px solid rgba(126, 158, 177, 0.18);
  border-radius: 10px;
  padding: 8px;
  background: rgba(8, 18, 29, 0.56);
}
.prompt-tree-root,
.prompt-tree-child {
  width: 100%;
  border: 1px solid rgba(126, 158, 177, 0.18);
  border-radius: 8px;
  padding: 7px 9px;
  background: rgba(14, 24, 36, 0.72);
  color: rgba(226, 234, 236, 0.82);
  text-align: left;
  cursor: pointer;
}
.prompt-tree-root {
  margin-top: 6px;
  font-weight: 700;
  color: #eaf1f2;
  background: rgba(20, 53, 58, 0.58);
}
.prompt-tree-child {
  margin-top: 4px;
  padding-left: 18px;
  color: rgba(214, 226, 226, 0.72);
}
.prompt-tree-root.active,
.prompt-tree-child.active {
  border-color: rgba(120, 210, 170, 0.62);
  background: rgba(18, 48, 38, 0.72);
  color: #eafff4;
}
.prompt-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.prompt-card-preview {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  min-height: 118px;
  margin: -2px -2px 12px;
  padding: 14px;
  border: 1px solid rgba(120, 210, 170, 0.2);
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 20%, rgba(120, 210, 170, 0.28), transparent 34%),
    radial-gradient(circle at 82% 28%, rgba(96, 165, 250, 0.24), transparent 36%),
    linear-gradient(135deg, rgba(12, 28, 38, 0.92), rgba(7, 12, 22, 0.96));
  overflow: hidden;
}
.prompt-card-preview::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  background:
    linear-gradient(90deg, transparent 0 48%, rgba(255, 255, 255, 0.08) 49% 51%, transparent 52%),
    linear-gradient(0deg, transparent 0 48%, rgba(255, 255, 255, 0.08) 49% 51%, transparent 52%);
}
.prompt-card-preview span {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(226, 234, 236, 0.2);
  border-radius: 8px;
  color: #f1f7f8;
  background: rgba(6, 11, 18, 0.58);
  font-size: 22px;
  font-weight: 900;
}
.prompt-card-preview i {
  position: relative;
  z-index: 1;
  align-self: start;
  padding: 5px 9px;
  border: 1px solid rgba(120, 210, 170, 0.24);
  border-radius: 999px;
  color: #c9f7df;
  background: rgba(6, 11, 18, 0.52);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}
.prompt-card-taxonomy {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 0;
}
.prompt-card-taxonomy span {
  max-width: 100%;
  min-height: 24px;
  padding: 4px 8px;
  border: 1px solid rgba(126, 158, 177, 0.2);
  border-radius: 999px;
  color: rgba(226, 234, 236, 0.8);
  background: rgba(6, 11, 18, 0.42);
  font-size: 11px;
  font-weight: 800;
}
.prompt-card dl {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 6px 8px;
  margin: 10px 0;
  color: rgba(214, 226, 226, 0.72);
  font-size: 12px;
}
.prompt-card dt { color: rgba(157, 178, 187, 0.78); }
.prompt-card dd { margin: 0; color: #e2eaec; }
.prompt-card-desc {
  width: 100%;
  min-height: 72px;
  border: 1px dashed rgba(126, 158, 177, 0.24);
  border-radius: 8px;
  padding: 8px;
  background: rgba(6, 11, 18, 0.5);
  color: rgba(226, 234, 236, 0.72);
  text-align: left;
  line-height: 1.45;
  cursor: pointer;
}
.card-lib-empty {
  margin: 0;
  border: 1px dashed rgba(126, 158, 177, 0.2);
  border-radius: 10px;
  padding: 24px;
  color: rgba(214, 226, 226, 0.74);
  text-align: center;
  background: rgba(8, 18, 29, 0.42);
}
.card-lib-modal {
  position: fixed;
  inset: 0;
  z-index: 2300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(3, 8, 14, 0.68);
  backdrop-filter: blur(5px);
}
.card-lib-modal.hidden { display: none; }
.card-lib-dialog {
  width: min(820px, 92vw);
  max-height: 86vh;
  overflow: auto;
  border: 1px solid rgba(126, 158, 177, 0.28);
  border-radius: 14px;
  background: rgba(9, 16, 26, 0.96);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  padding: 14px;
}
.card-lib-dialog-head,
.card-lib-dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-lib-dialog-head {
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(126, 158, 177, 0.18);
}
.card-lib-dialog-head strong { color: #f1f7f8; }
.card-community-list { display: grid; gap: 10px; margin-top: 12px; }
.card-community-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(126, 158, 177, 0.18);
  border-radius: 10px;
  padding: 10px;
  background: rgba(14, 24, 36, 0.66);
}
.card-community-row strong { color: #f1f7f8; }
.card-community-row p { margin: 4px 0 0; color: rgba(214, 226, 226, 0.62); font-size: 12px; }
.prompt-edit-dialog {
  display: grid;
  gap: 12px;
}
.prompt-edit-dialog label {
  display: grid;
  gap: 6px;
  color: rgba(214, 226, 226, 0.72);
  font-size: 12px;
}
.prompt-edit-dialog input,
.prompt-edit-dialog select,
.prompt-edit-dialog textarea {
  width: 100%;
  border: 1px solid rgba(126, 158, 177, 0.24);
  border-radius: 8px;
  padding: 9px 10px;
  background: rgba(6, 11, 18, 0.62);
  color: #eaf1f2;
  font-size: 13px;
  resize: vertical;
}

@media (max-width: 900px) {
  .card-lib-head { display: grid; }
  .prompt-lib-layout { grid-template-columns: 1fr; }
  .digital-avatar-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* SYSTEM_CARD_LIBRARY_WORKSPACE_R2 */
.system-card-library-panel {
  position: relative;
  border: 1px solid rgba(126, 158, 177, 0.28);
  border-radius: 12px;
  padding: 9px 12px 12px;
  background: linear-gradient(180deg, rgba(16, 31, 44, 0.72), rgba(7, 17, 28, 0.58));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 18px 46px rgba(0, 0, 0, 0.18);
}
.system-card-library-panel.card-lib-manager {
  gap: 8px;
  margin-top: 8px;
}
.system-template-card-divider {
  height: 6px;
  border-top: 1px solid rgba(226, 234, 236, 0.72);
  border-bottom: 1px solid rgba(226, 234, 236, 0.28);
  margin: 14px 0 12px;
  opacity: 0.88;
}
.card-lib-community-head {
  justify-content: flex-end;
  padding-bottom: 0;
}
.card-lib-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.card-lib-toolbar .card-lib-tabs {
  flex: 1 1 auto;
  min-width: 0;
}
.card-lib-toolbar .card-lib-community-entry {
  flex: 0 0 auto;
  padding: 6px 10px;
}
.card-lib-toolbar .card-lib-community-entry small {
  font-size: 10px;
}
.card-lib-file-frame {
  border: 1px solid rgba(226, 234, 236, 0.2);
  border-radius: 10px;
  padding: 8px;
  background: rgba(6, 16, 26, 0.34);
  box-shadow: inset 0 0 0 1px rgba(126, 158, 177, 0.06);
}
.card-lib-file-frame .prompt-lib-layout {
  min-height: 0;
}
.card-detail-dialog {
  width: min(760px, 92vw);
}
.bio-detail-dialog {
  width: min(560px, 92vw);
}
.card-detail-body {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}
.bio-detail-card {
  display: grid;
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(126, 158, 177, 0.2);
  border-radius: 12px;
  background: rgba(6, 13, 22, 0.52);
}
.bio-detail-photo-box {
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 2px solid rgba(120, 210, 170, 0.52);
  border-radius: 4px;
  background:
    linear-gradient(rgba(126, 158, 177, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(126, 158, 177, 0.07) 1px, transparent 1px),
    rgba(7, 16, 26, 0.74);
  background-size: 18px 18px;
  color: rgba(226, 234, 236, 0.72);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}
.bio-detail-photo-box.drag-over {
  border-color: rgba(120, 210, 170, 0.9);
  background-color: rgba(18, 48, 38, 0.76);
  box-shadow: 0 0 0 3px rgba(120, 210, 170, 0.12);
}
.bio-detail-photo-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: rgba(2, 6, 10, 0.42);
}
.bio-upload-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  border: 1px dashed rgba(126, 158, 177, 0.24);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(6, 11, 18, 0.46);
}
.bio-upload-controls small {
  flex: 1 1 240px;
  min-width: 0;
  color: rgba(214, 226, 226, 0.74);
  font-size: 12px;
  line-height: 1.5;
}
.bio-detail-name-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: baseline;
  gap: 14px;
  color: rgba(214, 226, 226, 0.74);
}
.bio-detail-name-row span,
.bio-detail-background span {
  color: rgba(226, 234, 236, 0.82);
  font-weight: 700;
}
.bio-detail-name-row strong {
  color: #f1f7f8;
  font-size: 18px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.bio-detail-background {
  display: grid;
  gap: 8px;
}
.bio-detail-background p {
  margin: 0;
  color: rgba(226, 234, 236, 0.74);
  font-size: 13px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.bio-detail-editor {
  gap: 14px;
}
.bio-detail-form {
  grid-template-columns: minmax(0, 1fr) 132px;
}
.bio-detail-title-field {
  margin-top: 2px;
}
.card-detail-preview {
  display: grid;
  gap: 8px;
}
.card-detail-preview div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid rgba(126, 158, 177, 0.16);
  border-radius: 8px;
  padding: 9px 10px;
  background: rgba(6, 11, 18, 0.38);
}
.card-detail-preview span {
  color: rgba(157, 178, 187, 0.82);
  font-size: 12px;
}
.card-detail-preview strong {
  color: rgba(226, 234, 236, 0.88);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
}
.card-detail-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.card-detail-form label {
  display: grid;
  gap: 6px;
  color: rgba(214, 226, 226, 0.72);
  font-size: 12px;
}
.card-detail-form label.wide {
  grid-column: 1 / -1;
}
.card-detail-form input,
.card-detail-form select,
.card-detail-form textarea {
  width: 100%;
  border: 1px solid rgba(126, 158, 177, 0.24);
  border-radius: 8px;
  padding: 9px 10px;
  background: rgba(6, 11, 18, 0.62);
  color: #eaf1f2;
  font-size: 13px;
}
.card-detail-form textarea {
  resize: vertical;
  line-height: 1.55;
}
.card-detail-form input:focus,
.card-detail-form select:focus,
.card-detail-form textarea:focus {
  outline: none;
  border-color: rgba(120, 210, 170, 0.64);
  box-shadow: 0 0 0 2px rgba(120, 210, 170, 0.12);
}
.card-detail-actions {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(126, 158, 177, 0.16);
}
.card-detail-actions > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 760px) {
  .card-detail-form,
  .card-detail-preview div,
  .bio-detail-form,
  .bio-detail-name-row {
    grid-template-columns: 1fr;
  }
  .bio-detail-photo-box {
    min-height: 220px;
  }
}

/* SYSTEM_DIGITAL_HUMAN_LIBRARY_R2 */
.digital-scope-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.digital-scope-toggle label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid rgba(126, 211, 242, .26);
  border-radius: 8px;
  background: rgba(7, 24, 36, .66);
  color: rgba(233, 248, 255, .9);
  cursor: pointer;
}

.digital-scope-toggle input {
  accent-color: #58d0a0;
}

.digital-integrated-slot {
  display: grid;
  place-items: center;
  min-height: 92px;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px dashed rgba(126, 211, 242, .34);
  border-radius: 8px;
  background: rgba(8, 27, 39, .78);
  color: rgba(235, 248, 255, .92);
  text-align: center;
  overflow: hidden;
}

.digital-integrated-slot img {
  width: 100%;
  max-height: 190px;
  object-fit: contain;
  border-radius: 6px;
}

.digital-integrated-slot span {
  font-weight: 800;
}

.digital-integrated-slot small {
  display: block;
  margin-top: 4px;
  color: rgba(190, 221, 235, .72);
}

.digital-integrated-slot.drag-over,
.digital-asset-slot.drag-over {
  border-color: rgba(88, 208, 160, .76);
  box-shadow: 0 0 0 2px rgba(88, 208, 160, .16) inset;
}

.prompt-card-add {
  align-items: center;
  gap: 10px;
}

.prompt-card-add .prompt-position-options {
  flex: 1 1 520px;
}

.prompt-tag-caption {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 8px;
  color: rgba(190, 221, 235, .75);
  font-size: 12px;
}

/* SYSTEM_CARD_LIBRARY_PLATFORM_SAVE_R3 */
.card-scope-toggle {
  align-items: center;
}

.card-scope-toggle > span {
  color: rgba(190, 221, 235, .76);
  font-size: 12px;
}

.prompt-position-options.compact {
  align-items: center;
  gap: 6px;
}

.prompt-position-option {
  min-height: 28px;
}

.prompt-position-option input[type="checkbox"] {
  width: 14px;
  height: 14px;
  min-width: 14px;
  margin: 0;
  accent-color: #58d0a0;
}

/* SYSTEM_PROMPT_LIBRARY_COPY_TO_R4 */
.prompt-copy-panel {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(126, 211, 242, .22);
  border-radius: 8px;
  background: rgba(6, 18, 28, .72);
}

.prompt-copy-panel > strong {
  color: rgba(238, 249, 255, .94);
  font-size: 14px;
}

.prompt-copy-target {
  display: grid;
  gap: 6px;
  color: rgba(190, 221, 235, .76);
  font-size: 12px;
}

.prompt-copy-target select {
  min-height: 34px;
  border: 1px solid rgba(126, 211, 242, .26);
  border-radius: 8px;
  padding: 6px 10px;
  background: rgba(8, 27, 39, .88);
  color: rgba(238, 249, 255, .92);
}

.prompt-copy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* PROMPT-LIBRARY-VISUAL-R2-20260627-19 */
.prompt-visual-filters {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 150px 170px auto;
  gap: 8px;
  align-items: end;
  padding: 10px;
  border: 1px solid rgba(126, 211, 242, .18);
  border-radius: 8px;
  background: rgba(6, 18, 28, .58);
}

.prompt-visual-filters label {
  min-width: 0;
  display: grid;
  gap: 5px;
  color: rgba(190, 221, 235, .72);
  font-size: 12px;
}

.prompt-visual-filters input,
.prompt-visual-filters select {
  min-width: 0;
  min-height: 34px;
  border: 1px solid rgba(126, 211, 242, .24);
  border-radius: 8px;
  padding: 7px 9px;
  background: rgba(8, 27, 39, .84);
  color: rgba(238, 249, 255, .92);
  font-size: 13px;
}

.prompt-card-r2 {
  align-content: start;
  overflow: hidden;
}

.prompt-preview-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(126, 211, 242, .18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(10, 32, 45, .92), rgba(5, 12, 20, .92)),
    repeating-linear-gradient(90deg, rgba(126, 211, 242, .16) 0 1px, transparent 1px 28px);
  color: rgba(238, 249, 255, .78);
  font-size: 12px;
  font-weight: 800;
}

.prompt-preview-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.prompt-preview-frame.kind-wireframe {
  background:
    linear-gradient(135deg, rgba(12, 28, 38, .92), rgba(6, 14, 20, .92)),
    repeating-linear-gradient(0deg, rgba(126, 211, 242, .12) 0 1px, transparent 1px 18px),
    repeating-linear-gradient(90deg, rgba(126, 211, 242, .12) 0 1px, transparent 1px 18px);
}

.prompt-preview-frame.kind-storyboard {
  background:
    linear-gradient(135deg, rgba(44, 38, 22, .9), rgba(10, 16, 24, .94)),
    linear-gradient(90deg, transparent 0 30%, rgba(235, 181, 95, .18) 30% 32%, transparent 32% 64%, rgba(235, 181, 95, .16) 64% 66%, transparent 66%);
}

.prompt-preview-frame.kind-portrait {
  background:
    radial-gradient(circle at 50% 36%, rgba(120, 210, 170, .32) 0 22%, transparent 23%),
    linear-gradient(135deg, rgba(18, 40, 34, .92), rgba(8, 15, 23, .92));
}

.prompt-preview-frame.kind-dialogue {
  background:
    linear-gradient(135deg, rgba(36, 32, 48, .92), rgba(8, 14, 22, .92));
}

.prompt-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.prompt-card-tags span,
.prompt-workflow-chip,
.prompt-scene-chip {
  max-width: 100%;
  min-height: 23px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(126, 211, 242, .18);
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(8, 27, 39, .58);
  color: rgba(214, 235, 240, .78);
  font-size: 11px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prompt-card-scenes span,
.prompt-scene-chip {
  border-color: rgba(120, 210, 170, .24);
  background: rgba(18, 40, 34, .48);
}

.prompt-card-workflows span,
.prompt-workflow-chip {
  border-color: rgba(126, 211, 242, .22);
}

.prompt-favorite.active,
.prompt-visual-filters .active {
  border-color: rgba(235, 181, 95, .52);
  color: rgba(255, 235, 196, .94);
  background: rgba(55, 42, 20, .5);
}

.prompt-detail-preview-r2 {
  display: grid;
  grid-template-columns: minmax(220px, .85fr) minmax(260px, 1fr);
  gap: 12px;
  align-items: start;
}

@media (max-width: 760px) {
  .prompt-visual-filters {
    grid-template-columns: minmax(0, 1fr);
  }

  .prompt-detail-preview-r2 {
    grid-template-columns: minmax(0, 1fr);
  }

  .prompt-card-tags span,
  .prompt-workflow-chip,
  .prompt-scene-chip {
    white-space: normal;
  }
}

/* ===== B3(2026-07-04) Q10-B: 风格卡编辑弹窗·参考图绑定块(素材大库任选图, 选中态 .on) ===== */
.card-style-ref-binder {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(105, 185, 210, .3);
  border-radius: 10px;
  background: rgba(6, 26, 38, .45);
}

.card-style-ref-current {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}

.card-style-ref-current img {
  width: 56px;
  height: 42px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(126, 216, 240, .5);
}

.card-style-ref-current small {
  color: rgba(218, 238, 245, .72);
  font-size: 12px;
}

.card-style-ref-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
}

.card-style-ref-pick {
  display: grid;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(105, 185, 210, .32);
  border-radius: 8px;
  background: rgba(6, 26, 38, .7);
  cursor: pointer;
  text-align: left;
}

.card-style-ref-pick img {
  width: 100%;
  height: 64px;
  object-fit: cover;
  border-radius: 5px;
  display: block;
}

.card-style-ref-pick span {
  color: rgba(218, 238, 245, .78);
  font-size: 11px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-style-ref-pick:hover {
  border-color: rgba(111, 203, 229, .66);
}

.card-style-ref-pick.on {
  border-color: rgba(126, 216, 240, .92);
  box-shadow: inset 0 0 0 1px rgba(126, 216, 240, .45);
}

.card-style-ref-empty {
  margin: 0;
  color: rgba(221, 240, 246, .6);
  font-size: 12px;
  line-height: 1.55;
}
/* MEIFAN-COMFYUI-MAINDIR-R1 · ComfyUI 主目录（暗色玻璃，与全站一致） */
.comfy-shell { display: grid; gap: 14px; min-width: 0; max-width: 100%; overflow-x: hidden; }
.comfy-panel {
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  border: 1px solid rgba(126, 158, 177, 0.22);
  background: rgba(11, 18, 28, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 18px 44px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
  border-radius: 12px;
  padding: 16px;
}
.comfy-conn {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin: 12px 0;
}
.comfy-conn label { display: grid; gap: 6px; color: rgba(226, 234, 236, 0.78); font-size: 12px; }
.comfy-conn input, .comfy-conn select {
  border: 1px solid rgba(126, 158, 177, 0.24); border-radius: 8px; padding: 8px 10px;
  background: rgba(6, 11, 18, 0.62); color: #eaf1f2; font-size: 13px;
}
.comfy-conn input { min-width: min(240px, 100%); max-width: 100%; }
.comfy-wf-label, .comfy-prompt-label { display: grid; gap: 6px; color: rgba(226, 234, 236, 0.78); font-size: 13px; margin-bottom: 12px; }
.comfy-wf-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.comfy-wf-bar small { color: rgba(214, 226, 226, 0.6); font-size: 12px; }
.comfy-wf-label textarea {
  width: 100%; border: 1px solid rgba(126, 158, 177, 0.24); border-radius: 8px; padding: 10px;
  background: rgba(6, 11, 18, 0.62); color: #eaf1f2; font-size: 12px; font-family: ui-monospace, Menlo, Consolas, monospace; resize: vertical;
}
.comfy-prompt-label input {
  border: 1px solid rgba(126, 158, 177, 0.24); border-radius: 8px; padding: 9px 10px;
  background: rgba(6, 11, 18, 0.62); color: #eaf1f2; font-size: 13px;
}
.comfy-actions { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.comfy-actions small { color: rgba(214, 226, 226, 0.6); font-size: 12px; }
.comfy-runlog-wrap { display: grid; gap: 6px; }
.comfy-runlog-wrap strong { color: rgba(214, 226, 226, 0.78); font-size: 13px; }
.comfy-runlog {
  max-height: 200px; overflow: auto; padding: 10px;
  border: 1px solid rgba(126, 158, 177, 0.18); border-radius: 8px; background: rgba(6, 11, 18, 0.55);
  color: rgba(214, 226, 226, 0.78); font-size: 12px; font-family: ui-monospace, Menlo, Consolas, monospace; line-height: 1.6;
}

/* === 节点图编辑器 === */
.comfy-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 4px 0 10px; min-width: 0; max-width: 100%; }
.comfy-toolbar .comfy-addnode { display: inline-flex; align-items: center; gap: 6px; color: rgba(226,234,236,0.78); font-size: 12px; }
.comfy-toolbar select { border: 1px solid rgba(126,158,177,0.24); border-radius: 8px; padding: 7px 9px; background: rgba(6,11,18,0.62); color: #eaf1f2; font-size: 13px; }
.comfy-toolbar-hint { color: rgba(214,226,226,0.74); font-size: 12px; }
.comfy-graph {
  position: relative; overflow: auto; max-width: 100%; min-width: 0; border: 1px solid rgba(126,158,177,0.2); border-radius: 12px;
  background: rgba(6,11,18,0.5) repeating-linear-gradient(0deg, transparent 0 23px, rgba(126,158,177,0.05) 23px 24px);
  overscroll-behavior-x: contain;
}
.comfy-canvas { position: relative; max-width: none; }
.comfy-edges { position: absolute; left: 0; top: 0; pointer-events: none; }
.comfy-edge { fill: none; stroke: rgba(120, 210, 170, 0.55); stroke-width: 2; }
.comfy-edge-dels { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; }
.comfy-edge-del {
  position: absolute; width: 18px; height: 18px; line-height: 1; pointer-events: auto;
  border-radius: 50%; border: 1px solid rgba(126,158,177,0.4); background: rgba(11,18,28,0.92);
  color: #e2eaec; font-size: 13px; cursor: pointer; padding: 0;
}
.comfy-node {
  position: absolute; display: grid; gap: 6px; padding: 8px 10px;
  border: 1px solid rgba(126,158,177,0.3); border-radius: 10px; background: rgba(16,26,38,0.96);
  box-shadow: 0 6px 18px rgba(0,0,0,0.3); cursor: grab; user-select: none;
}
.comfy-node.dragging { cursor: grabbing; box-shadow: 0 10px 26px rgba(0,0,0,0.45); }
.comfy-node.selected { border-color: rgba(120,210,170,0.75); box-shadow: 0 0 0 1px rgba(120,210,170,0.3), 0 6px 18px rgba(0,0,0,0.3); }
.comfy-node.connect-src { border-color: rgba(244,190,92,0.8); }
.comfy-node-head { display: flex; justify-content: space-between; align-items: center; }
.comfy-node-stage { color: rgba(214,226,226,0.74); font-size: 11px; }
.comfy-node-del { width: 18px; height: 18px; line-height: 1; border-radius: 50%; border: 1px solid rgba(126,158,177,0.3); background: transparent; color: #c9d4d6; font-size: 12px; cursor: pointer; padding: 0; }
.comfy-node-title { color: #f1f7f8; font-size: 13px; line-height: 1.3; }
.comfy-node-foot { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.comfy-node-link { border: 1px solid rgba(126,158,177,0.3); border-radius: 6px; background: rgba(10,16,26,0.6); color: rgba(226,234,236,0.82); font-size: 11px; padding: 3px 8px; cursor: pointer; }
.comfy-config { margin: 12px 0; }
/* 节点轮盘快捷动作（科技感动作环）*/
.comfy-radial { position: absolute; inset: 0; pointer-events: none; z-index: 40; }
.comfy-radial-btn {
  position: absolute; pointer-events: auto; width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid rgba(120,210,180,0.55); background: radial-gradient(circle at 40% 35%, rgba(28,52,58,0.97), rgba(10,20,28,0.97));
  color: #d8f4ec; font-size: 11px; font-weight: 600; cursor: pointer; line-height: 1.05;
  box-shadow: 0 0 0 1px rgba(120,210,180,0.18), 0 6px 18px rgba(0,0,0,0.45), 0 0 14px rgba(90,209,230,0.18);
  display: flex; align-items: center; justify-content: center; text-align: center; padding: 2px;
  transition: transform .12s ease, box-shadow .12s ease; animation: comfyRadialIn .16s ease both;
}
.comfy-radial-btn:hover { transform: scale(1.12); border-color: #5ad1e6; box-shadow: 0 0 0 1px rgba(90,209,230,0.5), 0 8px 22px rgba(0,0,0,0.5), 0 0 18px rgba(90,209,230,0.4); color: #fff; }
@keyframes comfyRadialIn { from { opacity: 0; transform: scale(0.5); } to { opacity: 1; transform: scale(1); } }
/* 节点旁配置卡（操作走节点，不用往下滚）*/
.comfy-node-popup {
  position: absolute; z-index: 50; width: min(340px, calc(100vw - 32px)); max-height: 560px; overflow: auto;
  border: 1px solid rgba(90,209,230,0.35); border-radius: 12px; background: rgba(9,15,24,0.98);
  box-shadow: 0 14px 40px rgba(0,0,0,0.55), 0 0 0 1px rgba(90,209,230,0.12); padding: 10px 12px 12px;
  animation: comfyPopIn .14s ease both;
}
@keyframes comfyPopIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.comfy-popup-close { position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(126,158,177,0.3); background: rgba(255,140,140,0.14); color: #ff9f9f; cursor: pointer; font-size: 13px; line-height: 1; z-index: 1; }
.comfy-config-hint { margin: 12px 0; color: rgba(214,226,226,0.6); font-size: 12px; padding: 10px 12px; border: 1px dashed rgba(120,210,180,0.3); border-radius: 8px; }
/* 截图缩略图上的标注按钮 */
.comfy-shot-thumb { position: relative; }
.comfy-shot-annot { position: absolute; right: 3px; bottom: 3px; width: 26px; height: 26px; border-radius: 6px; border: 1px solid rgba(90,209,230,0.7); background: rgba(8,16,24,0.92); color: #5ad1e6; font-size: 15px; line-height: 1; cursor: pointer; padding: 0; box-shadow: 0 0 0 1px rgba(90,209,230,0.25); }
.comfy-shot-annot:hover { background: #5ad1e6; color: #06202a; }
/* 标注节点：醒目的"标注这张"入口卡片 */
.comfy-annot-entries { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.comfy-annot-entry-card { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.comfy-annot-entry-card img { width: 132px; height: 90px; object-fit: cover; border-radius: 8px; border: 1px solid rgba(126,158,177,0.3); display: block; }
.comfy-annot-entry { padding: 8px 12px; border-radius: 8px; border: 1px solid #5ad1e6; background: rgba(90,209,230,0.16); color: #d7f4fb; font-size: 13px; font-weight: 600; cursor: pointer; }
.comfy-annot-entry:hover { background: #5ad1e6; color: #06202a; box-shadow: 0 4px 14px rgba(90,209,230,0.35); }
/* 通用弹窗（提示词库 / 标注）*/
.comfy-modal { position: fixed; inset: 0; z-index: 2147483600; display: flex; align-items: center; justify-content: center; background: rgba(4,8,14,0.66); backdrop-filter: blur(2px); animation: comfyPopIn .14s ease both; }
.comfy-modal-card { width: min(940px, 94vw); max-height: 88vh; overflow: auto; border: 1px solid rgba(90,209,230,0.3); border-radius: 14px; background: rgba(10,16,24,0.99); box-shadow: 0 24px 70px rgba(0,0,0,0.6); padding: 14px 16px 16px; }
.comfy-modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; color: #f1f7f8; }
.comfy-modal-x { width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(126,158,177,0.3); background: rgba(255,140,140,0.14); color: #ff9f9f; cursor: pointer; font-size: 14px; line-height: 1; }
.comfy-pp-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.comfy-pp-card { text-align: left; display: grid; gap: 4px; padding: 10px 12px; border: 1px solid rgba(126,158,177,0.26); border-radius: 10px; background: rgba(14,22,32,0.9); color: rgba(226,234,236,0.82); cursor: pointer; }
.comfy-pp-card:hover { border-color: #5ad1e6; box-shadow: 0 0 0 1px rgba(90,209,230,0.3); }
.comfy-pp-card b { color: #eaf4f6; font-size: 13px; }
.comfy-pp-card span { font-size: 12px; color: rgba(214,226,226,0.6); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.comfy-annot-stage { display: flex; justify-content: center; background: #0b1119; border: 1px solid rgba(126,158,177,0.2); border-radius: 10px; padding: 8px; }
.comfy-annot-stage canvas { max-width: 100%; cursor: crosshair; touch-action: none; border-radius: 6px; }
.comfy-annot-tools { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.comfy-annot-lbl { color: rgba(214,226,226,0.7); font-size: 12px; }
.comfy-annot-spacer { flex: 1; }
.comfy-annot-color { width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.25); cursor: pointer; padding: 0; }
.comfy-annot-color.on { border-color: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,0.3); }
.comfy-modal-card.comfy-annot { width: min(1400px, 92vw); }
.comfy-annot-stage canvas { max-height: 74vh; }
.comfy-annot-tool, .comfy-annot-width { padding: 4px 10px; border-radius: 8px; border: 1px solid rgba(126,158,177,0.3); background: rgba(20,30,42,0.7); color: #cfe0e6; cursor: pointer; font-size: 12px; }
.comfy-annot-tool.on, .comfy-annot-width.on { border-color: #5ad1e6; color: #fff; background: rgba(90,209,230,0.18); box-shadow: 0 0 0 1px rgba(90,209,230,0.4); }
.comfy-annot-color[data-color="#ffffff"] { border-color: rgba(0,0,0,0.4); }
.comfy-annot-textinput { position: fixed; z-index: 2147483601; min-width: 80px; padding: 2px 6px; font-size: 16px; background: rgba(10,16,24,0.95); border: 1px dashed #5ad1e6; border-radius: 4px; outline: none; }
.comfy-savelib { display: grid; gap: 10px; }
.comfy-savelib label { display: grid; gap: 6px; color: rgba(226,234,236,0.8); font-size: 12px; }
.comfy-savelib select { width: 100%; border: 1px solid rgba(126,158,177,0.26); border-radius: 8px; padding: 8px 10px; background: rgba(6,11,18,0.62); color: #eaf1f2; font: inherit; }
.comfy-config-empty { color: rgba(214,226,226,0.74); font-size: 12px; padding: 10px; border: 1px dashed rgba(126,158,177,0.22); border-radius: 8px; }
.comfy-config-card { display: grid; gap: 10px; padding: 12px; border: 1px solid rgba(126,158,177,0.22); border-radius: 10px; background: rgba(10,16,26,0.55); }
.comfy-config-head { display: flex; justify-content: space-between; align-items: center; color: #f1f7f8; }
.comfy-config-desc { color: rgba(214,226,226,0.7); font-size: 12px; margin: 0; }
.comfy-config-card label { display: grid; gap: 6px; color: rgba(226,234,236,0.78); font-size: 12px; }
.comfy-config-card select, .comfy-config-card input {
  border: 1px solid rgba(126,158,177,0.24); border-radius: 8px; padding: 8px 10px;
  background: rgba(6,11,18,0.62); color: #eaf1f2; font-size: 13px;
}
.comfy-route-note { color: rgba(214,226,226,0.74); font-size: 12px; line-height: 1.6; margin: 0; }
.comfy-advanced { margin: 4px 0 12px; border: 1px solid rgba(126,158,177,0.18); border-radius: 8px; background: rgba(10,16,26,0.42); padding: 8px 12px; }
.comfy-advanced summary { cursor: pointer; color: rgba(214,226,226,0.74); font-size: 12px; }
.comfy-adv-body { display: grid; gap: 10px; margin-top: 10px; }
.comfy-adv-body textarea { width: 100%; border: 1px solid rgba(126,158,177,0.24); border-radius: 8px; padding: 10px; background: rgba(6,11,18,0.62); color: #eaf1f2; font-size: 12px; font-family: ui-monospace, Menlo, Consolas, monospace; resize: vertical; }
.comfy-adv-body input { border: 1px solid rgba(126,158,177,0.24); border-radius: 8px; padding: 9px 10px; background: rgba(6,11,18,0.62); color: #eaf1f2; font-size: 13px; }
.comfy-adv-target { display: inline-flex; align-items: center; gap: 6px; color: rgba(226,234,236,0.78); font-size: 12px; }
.comfy-adv-target select { border: 1px solid rgba(126,158,177,0.24); border-radius: 8px; padding: 7px 9px; background: rgba(6,11,18,0.62); color: #eaf1f2; font-size: 13px; }

.comfy-debug-drawer {
  margin: 6px 0 12px;
  border: 1px dashed rgba(126,158,177,0.28);
  border-radius: 10px;
  background: rgba(8,14,22,0.5);
  padding: 9px 12px;
}
.comfy-debug-drawer.compact { margin: 0; }
.comfy-debug-drawer summary {
  cursor: pointer;
  color: rgba(214,226,226,0.7);
  font-size: 12px;
}
.comfy-debug-grid { display: grid; gap: 10px; margin-top: 10px; min-width: 0; }
.comfy-debug-drawer label,
.comfy-debug-drawer textarea,
.comfy-debug-drawer input,
.comfy-debug-drawer select {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

@media (max-width: 720px) {
  .comfy-panel { padding: 12px; }
  .comfy-toolbar { gap: 8px; }
  .comfy-toolbar .comfy-addnode { width: 100%; flex-wrap: wrap; }
  .comfy-toolbar .comfy-addnode select { flex: 1 1 180px; min-width: 0; }
  .comfy-node-popup { left: 8px !important; right: 8px; width: auto; max-height: min(68vh, 520px); }
  .comfy-graph { height: min(62vh, 520px) !important; }
}

/* === API 出图节点 + 缩放 2026-06-23 === */
.comfy-render-badge { display: inline-block; font-size: 12px; color: #0c1320; background: rgba(244,190,92,0.92); border-radius: 6px; padding: 3px 9px; margin-bottom: 4px; }
.comfy-config-card textarea { width: 100%; min-height: 84px; border: 1px solid rgba(126,158,177,0.24); border-radius: 8px; padding: 8px 10px; background: rgba(6,11,18,0.62); color: #eaf1f2; font: inherit; resize: vertical; box-sizing: border-box; }
.comfy-api-result { font-size: 12px; margin-top: 2px; }
.comfy-api-ok { color: #9ee7bf; line-height: 1.6; border: 1px solid rgba(120,210,170,0.3); border-radius: 8px; padding: 8px 10px; background: rgba(20,40,34,0.4); }
.comfy-api-warn { color: #ff8f8f; }
.comfy-zoom { display: inline-flex; align-items: center; gap: 2px; margin-left: 4px; }
.comfy-zoom button { min-width: 36px; }
.comfy-floorplan-preview { margin-bottom: 8px; }
.comfy-floorplan-preview img { max-width: 100%; max-height: 220px; border-radius: 8px; border: 1px solid rgba(126,158,177,0.3); display: block; }

/* === 参考图选择（素材库联动）2026-06-23 === */
.comfy-ref-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.comfy-ref-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(126,158,177,0.3); border-radius: 8px; padding: 4px 6px 4px 4px; background: rgba(10,16,26,0.6); color: rgba(226,234,236,0.86); font-size: 12px; }
.comfy-ref-chip img { width: 34px; height: 34px; object-fit: cover; border-radius: 6px; border: 1px solid rgba(126,158,177,0.3); display: block; }
.comfy-ref-chip b { font-weight: 600; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.comfy-ref-clear { border: none; background: rgba(255,140,140,0.16); color: #ff9f9f; border-radius: 5px; width: 18px; height: 18px; line-height: 16px; cursor: pointer; font-size: 13px; }
.comfy-struct-input { display: grid; gap: 6px; border: 1px solid rgba(126,158,177,0.24); border-radius: 8px; padding: 8px 10px; background: rgba(8,14,22,0.5); }
.comfy-struct-input > b { color: rgba(226,234,236,0.9); font-size: 12px; }
.comfy-shots-row { display: flex; flex-wrap: wrap; gap: 6px; }
.comfy-shot-thumb { display: inline-block; border: 2px solid rgba(126,158,177,0.3); border-radius: 6px; overflow: hidden; cursor: pointer; line-height: 0; }
.comfy-shot-thumb img { width: 56px; height: 40px; object-fit: cover; display: block; }
.comfy-shot-thumb.on { border-color: #5ad1e6; box-shadow: 0 0 0 2px rgba(90,209,230,0.35); }
.comfy-shot-thumb[data-shot-pick]:hover { border-color: rgba(126,210,170,0.7); }
.comfy-api-struct { display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; color: rgba(226,234,236,0.82); font-size: 12px; }
.comfy-api-struct img { width: 60px; height: 42px; object-fit: cover; border-radius: 6px; border: 1px solid rgba(90,209,230,0.5); display: block; }
.comfy-io { display: grid; gap: 4px; margin: 2px 0 10px; }
.comfy-io > div { display: grid; grid-template-columns: 56px 1fr; gap: 8px; font-size: 12px; line-height: 1.4; }
.comfy-io b { color: #5ad1e6; font-weight: 600; }
.comfy-io span { color: rgba(214,226,226,0.85); }
/* ============ 场景/背景库(shard 12_scene_background_library) ============
R2(2026-07-03) T1: 该库自建库起全库零样式——.scene-grid 计算样式 display:block,
   896×1200 生成图原尺寸铺开成"巨图"。本分片按素材库同款卡片网格补全, 配色跟系统设置暗色卡片。 */
.scene-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.scene-toolbar select {
  border: 1px solid rgba(148, 163, 184, .26);
  border-radius: 8px;
  background: rgba(15, 23, 42, .54);
  color: #edf6f7;
  padding: 7px 10px;
  font-size: 12px;
  outline: none;
}
.scene-upload-btn,
.scene-import-btn {
  border: 1px solid rgba(126, 211, 242, .35);
  border-radius: 8px;
  background: rgba(37, 99, 135, .35);
  color: #dcf3fb;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
}
.scene-upload-btn:hover,
.scene-import-btn:hover { background: rgba(56, 130, 173, .45); }
/* 卡片网格: auto-fill 自适应列宽, 与素材库口径一致 —— 巨图从此变缩略 */
.scene-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.scene-card {
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 10px;
  background: rgba(15, 23, 42, .42);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.scene-card.pending { opacity: .8; border-style: dashed; }
.scene-card-media {
  height: 140px;
  overflow: hidden;
  background: rgba(0, 0, 0, .3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(211, 224, 226, 0.74);
  font-size: 12px;
}
.scene-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.scene-card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px 10px;
  position: relative;
}
.scene-card-body b {
  color: #edf6f7;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.scene-meta {
  color: rgba(211, 224, 226, .7);
  font-size: 11px;
}
.scene-pill {
  align-self: flex-start;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
}
.scene-pill.ready { background: rgba(52, 199, 143, .18); color: #7fe0bd; }
.scene-pill.pending { background: rgba(250, 204, 21, .16); color: #f7d774; }
.scene-del {
  position: absolute;
  right: 8px;
  bottom: 8px;
  border: 1px solid rgba(248, 113, 113, .35);
  border-radius: 6px;
  background: rgba(127, 29, 29, .25);
  color: #fca5a5;
  padding: 2px 8px;
  font-size: 11px;
  cursor: pointer;
}
.scene-del:hover { background: rgba(153, 27, 27, .4); }
.scene-empty {
  grid-column: 1 / -1;
  color: rgba(211, 224, 226, .6);
  font-size: 13px;
  padding: 24px 8px;
  text-align: center;
}
/* R2(2026-07-03) T7: 上传类按钮点击后 0.6s busy 视觉态——用户能看见"点到了",
   区分"没点到"和"选完没反应"(场景库上传/收编 + 角色卡 选择照片/上传声音样本 共用) */
.mf-btn-busy {
  opacity: .55;
  box-shadow: 0 0 0 2px rgba(126, 211, 242, .45) inset !important;
  pointer-events: none;
}
/* R3(2026-07-03) T-A: 新建背景卡/场景卡详情 弹窗(对齐 shard11 card-lib-modal 观感:
   全屏遮罩 + 居中暗色卡片 + 大图框 + 表单行 + 动作行) */
.scene-modal-mask {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(2, 8, 20, .62);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.scene-modal-card {
  width: min(560px, 94vw);
  max-height: 90vh;
  overflow: auto;
  border: 1px solid rgba(126, 211, 242, .28);
  border-radius: 14px;
  background: rgba(10, 18, 34, .96);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .5);
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.scene-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.scene-modal-head strong { color: #edf6f7; font-size: 15px; display: block; }
.scene-modal-head small { color: rgba(211, 224, 226, .62); font-size: 11px; }
.scene-modal-x {
  border: none;
  background: transparent;
  color: rgba(211, 224, 226, .75);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.scene-modal-x:hover { color: #fff; }
/* 大图框: 可点选/拖拽; 选中图后 .on 底色加深(铁律: 选中/激活态可辨) */
.scene-modal-drop {
  min-height: 180px;
  max-height: 300px;
  overflow: hidden;
  border: 1px dashed rgba(148, 163, 184, .4);
  border-radius: 10px;
  background: rgba(15, 23, 42, .5);
  color: rgba(211, 224, 226, .6);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.scene-modal-drop.on {
  background: rgba(30, 58, 92, .78);
  border-style: solid;
  border-color: rgba(126, 211, 242, .5);
}
.scene-modal-drop img { width: 100%; height: 100%; max-height: 300px; object-fit: contain; display: block; }
.scene-modal-media {
  max-height: 300px;
  min-height: 120px;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(0, 0, 0, .35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(211, 224, 226, 0.74);
  font-size: 12px;
}
.scene-modal-media img { width: 100%; max-height: 300px; object-fit: contain; display: block; }
.scene-modal-row { display: flex; gap: 8px; flex-wrap: wrap; }
.scene-modal-row .scene-modal-f { flex: 1 1 140px; }
.scene-modal-f {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: rgba(211, 224, 226, .8);
  font-size: 12px;
}
.scene-modal-f input,
.scene-modal-f select {
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 8px;
  background: rgba(15, 23, 42, .6);
  color: #edf6f7;
  padding: 7px 10px;
  font-size: 13px;
  outline: none;
}
.scene-modal-f input:focus,
.scene-modal-f select:focus { border-color: rgba(126, 211, 242, .55); }
.scene-modal-acts { display: flex; gap: 8px; justify-content: flex-end; margin-top: 2px; }
.scene-modal-btn {
  border: 1px solid rgba(148, 163, 184, .3);
  border-radius: 8px;
  background: rgba(30, 41, 59, .6);
  color: #dce9ee;
  padding: 8px 16px;
  font-size: 13px;
  cursor: pointer;
}
.scene-modal-btn:hover { background: rgba(51, 65, 85, .7); }
.scene-modal-btn.primary {
  border-color: rgba(126, 211, 242, .45);
  background: rgba(37, 99, 135, .5);
  color: #dcf3fb;
}
.scene-modal-btn.primary:hover { background: rgba(56, 130, 173, .6); }
.scene-modal-btn.danger {
  border-color: rgba(248, 113, 113, .4);
  background: rgba(127, 29, 29, .3);
  color: #fca5a5;
}
.scene-modal-btn.danger:hover { background: rgba(153, 27, 27, .45); }
.scene-modal-btn.ghost { background: transparent; }
/* 场景卡整卡可点开详情(跟角色卡一致), 给出手型提示 */
.scene-card { cursor: pointer; }
.scene-card:hover { border-color: rgba(126, 211, 242, .4); }
/* MEIFAN-WIREFRAME-LIBRARY-R1 · 线框库（二维线稿专用，暗色玻璃，与全站一致） */
.wflib-shell { display: grid; gap: 14px; }
.wflib-panel {
  border: 1px solid rgba(126, 158, 177, 0.22);
  background: rgba(11, 18, 28, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 18px 44px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
  border-radius: 12px;
  padding: 16px;
}
.wflib-toolbar { display: grid; gap: 10px; margin: 12px 0; }
.wflib-scopetabs, .wflib-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.wflib-scopetab {
  padding: 7px 12px; border: 1px solid rgba(126, 158, 177, 0.24); border-radius: 8px;
  background: rgba(14, 24, 36, 0.74); color: rgba(226, 234, 236, 0.78); font-size: 13px; cursor: pointer;
}
.wflib-scopetab.active { border-color: rgba(120, 210, 170, 0.6); color: #eafff4; background: rgba(18, 40, 34, 0.7); }
.wflib-chip {
  padding: 5px 10px; border: 1px solid rgba(126, 158, 177, 0.2); border-radius: 999px;
  background: rgba(10, 16, 26, 0.55); color: rgba(214, 226, 226, 0.7); font-size: 12px; cursor: pointer;
}
.wflib-chip.active { border-color: #9ee7bf; color: #9ee7bf; }
.wflib-upload {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: end;
  padding: 12px; border: 1px dashed rgba(126, 158, 177, 0.3); border-radius: 8px;
  background: rgba(10, 16, 26, 0.45); margin-bottom: 12px;
}
.wflib-field { display: grid; gap: 6px; color: rgba(226, 234, 236, 0.78); font-size: 12px; }
.wflib-field select {
  min-width: 180px; border: 1px solid rgba(126, 158, 177, 0.24); border-radius: 8px;
  padding: 8px 10px; background: rgba(6, 11, 18, 0.62); color: #eaf1f2; font-size: 13px;
}
.wflib-upload-btn { cursor: pointer; }
.wflib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.wflib-card {
  display: grid; gap: 8px; padding: 10px;
  border: 1px solid rgba(126, 158, 177, 0.22); border-radius: 10px; background: rgba(14, 24, 36, 0.74);
}
.wflib-thumb {
  aspect-ratio: 16 / 10; display: flex; align-items: center; justify-content: center;
  overflow: hidden; border-radius: 8px; background: rgba(244, 246, 248, 0.92);
  color: rgba(80, 90, 100, 0.6); font-size: 12px;
}
.wflib-thumb img { width: 100%; height: 100%; object-fit: contain; }
.wflib-meta { display: grid; gap: 4px; min-width: 0; }
.wflib-meta strong { color: #f1f7f8; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wflib-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.wflib-actions { display: flex; justify-content: flex-end; }
.wflib-ro { color: rgba(214, 226, 226, 0.74); font-size: 11px; }
.wflib-empty { grid-column: 1 / -1; padding: 18px; text-align: center; color: rgba(214, 226, 226, 0.6); font-size: 13px; }

/* 系统设置入口 + 弹窗 */
.wflib-settings-entry { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 4px 0 4px; }
.wflib-settings-entry small { color: rgba(214, 226, 226, 0.6); font-size: 12px; }
.wflib-modal-overlay {
  position: fixed; inset: 0; z-index: 2200;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(4, 8, 14, 0.66); backdrop-filter: blur(5px);
}
.wflib-modal {
  width: min(960px, 94vw); max-height: 88vh; display: grid; grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid rgba(126, 158, 177, 0.28); border-radius: 14px;
  background: rgba(11, 18, 28, 0.96); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5); overflow: hidden;
}
.wflib-modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; border-bottom: 1px solid rgba(126, 158, 177, 0.18); color: #f1f7f8;
}
.wflib-modal-close {
  width: 30px; height: 30px; border-radius: 8px; border: 1px solid rgba(126, 158, 177, 0.24);
  background: transparent; color: #e2eaec; font-size: 18px; cursor: pointer;
}
.wflib-modal-body { overflow: auto; padding: 14px 16px; }
/* 弹窗内 panel 去掉重复玻璃边框，避免双层 */
.wflib-modal-body .wflib-panel { border: none; background: transparent; box-shadow: none; backdrop-filter: none; padding: 0; }
/* 3D 白膜编辑器 2026-06-23 · body 顶层 overlay（避免被面板 backdrop-filter 困住 fixed） */
#meifanWhiteModelOverlay:empty { display: none; }
/* 满屏不透明、超高 z-index（盖住左侧主页栏）；不用 backdrop-filter（画布重绘时模糊会严重拖慢） */
.wm-shell {
  position: fixed; inset: 0; z-index: 2147483600; display: flex; flex-direction: column;
  background: #060b12;
  max-width: 100vw;
  overflow: hidden;
}
.wm-head {
  display: flex; align-items: center; gap: 12px; padding: 12px 18px;
  border-bottom: 1px solid rgba(126, 158, 177, 0.2); color: #f1f7f8;
  min-width: 0;
}
.wm-head strong { font-size: 16px; }
.wm-head small { color: rgba(214, 226, 226, 0.6); font-size: 12px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wm-tabs { margin-left: 12px; display: inline-flex; gap: 6px; flex-wrap: wrap; }
.wm-tab { border: 1px solid rgba(126, 158, 177, 0.28); background: rgba(20, 31, 45, 0.6); color: rgba(226, 234, 236, 0.78); border-radius: 999px; padding: 6px 14px; font-size: 13px; cursor: pointer; }
.wm-tab.on { color: #0c1320; background: rgba(120, 210, 170, 0.9); border-color: transparent; }
.wm-close { margin-left: auto; width: 30px; height: 30px; border-radius: 8px; border: 1px solid rgba(126, 158, 177, 0.28); background: transparent; color: #c9d4d6; font-size: 18px; cursor: pointer; }
.wm-body { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 300px; min-height: 0; min-width: 0; overflow: hidden; }
.wm-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.wm-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid rgba(126, 158, 177, 0.14); min-width: 0; }
.wm-hint { color: rgba(214, 226, 226, 0.74); font-size: 12px; }
.wm-btn { border: 1px solid rgba(126, 158, 177, 0.28); background: rgba(20, 31, 45, 0.6); color: rgba(226, 234, 236, 0.85); border-radius: 8px; padding: 7px 12px; font-size: 13px; cursor: pointer; }
.wm-btn.on { color: #0c1320; background: rgba(120, 210, 170, 0.9); border-color: transparent; }
.wm-btn-primary { color: #0c1320; background: rgba(95, 196, 214, 0.92); border-color: transparent; }
.wm-btn-danger { color: #fff; background: rgba(180, 60, 60, 0.5); border-color: rgba(220, 120, 120, 0.5); width: 100%; margin-top: 6px; }
.wm-upload { display: inline-flex; align-items: center; gap: 6px; color: rgba(226, 234, 236, 0.7); font-size: 12px; }
.wm-zoom { display: inline-flex; gap: 2px; }
.wm-zoom .wm-btn { min-width: 38px; }
.wm-stage { position: relative; flex: 1; min-height: 0; background: #0b1119; }
.wm-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.wm-canvas.hidden { display: none; }
.wm-3dhost { overflow: hidden; }
.wm-3dfallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #cdd9e0; font-size: 14px; padding: 16px; text-align: center; }
.wm-side { border-left: 1px solid rgba(126, 158, 177, 0.18); background: rgba(10, 16, 26, 0.6); padding: 12px; overflow: auto; display: grid; gap: 12px; align-content: start; }
.wm-side-card { border: 1px solid rgba(126, 158, 177, 0.18); border-radius: 10px; background: rgba(14, 24, 36, 0.55); padding: 12px; display: grid; gap: 8px; }
.wm-side-card h4 { margin: 0; color: #f1f7f8; font-size: 13px; }
.wm-side-card label { display: grid; gap: 5px; color: rgba(226, 234, 236, 0.78); font-size: 12px; }
.wm-side-card input { border: 1px solid rgba(126, 158, 177, 0.24); border-radius: 8px; padding: 7px 9px; background: rgba(6, 11, 18, 0.62); color: #eaf1f2; font-size: 13px; }
.wm-muted { color: rgba(214, 226, 226, 0.74); font-size: 12px; line-height: 1.6; }
.wm-furn-lib { display: flex; flex-wrap: wrap; gap: 6px; }
.wm-furn { display: grid; gap: 1px; border: 1px solid rgba(126, 158, 177, 0.28); background: rgba(20, 31, 45, 0.6); color: rgba(226, 234, 236, 0.85); border-radius: 8px; padding: 6px 10px; font-size: 12px; cursor: pointer; text-align: center; }
.wm-furn small { color: rgba(214, 226, 226, 0.74); font-size: 10px; }
.wm-fix { border-color: rgba(95, 196, 214, 0.42); }
.wm-fix small { color: rgba(150, 220, 235, 0.6); }
.wm-shots { display: flex; flex-wrap: wrap; gap: 6px; }
.wm-shots img { width: 78px; height: 56px; object-fit: cover; border-radius: 6px; border: 1px solid rgba(126,158,177,0.3); }
/* 白膜构件库：分类分组 + 自定义增删改 + 弹窗 */
.wm-comp-cat { margin-bottom: 8px; }
.wm-comp-cat-h { display: block; font-size: 11px; color: rgba(214,226,226,0.6); margin: 4px 0 3px; }
.wm-furn { position: relative; }
.wm-comp-edit, .wm-comp-del { position: absolute; top: -6px; width: 16px; height: 16px; border-radius: 50%; font-size: 11px; line-height: 16px; text-align: center; background: rgba(8,16,24,0.92); border: 1px solid rgba(90,209,230,0.5); color: #5ad1e6; cursor: pointer; }
.wm-comp-edit { right: 16px; }
.wm-comp-del { right: -4px; color: #ff9f9f; border-color: rgba(255,140,140,0.5); }
.wm-comp-add { margin-top: 6px; width: 100%; }
.wm-comp-modal { position: fixed; inset: 0; z-index: 2147483600; display: flex; align-items: center; justify-content: center; background: rgba(4,8,14,0.66); }
.wm-comp-card { width: min(420px, 92vw); background: rgba(10,16,24,0.99); border: 1px solid rgba(90,209,230,0.3); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.wm-comp-head { display: flex; justify-content: space-between; align-items: center; color: #f1f7f8; }
.wm-comp-x { width: 24px; height: 24px; border-radius: 50%; border: 1px solid rgba(126,158,177,0.3); background: rgba(255,140,140,0.14); color: #ff9f9f; cursor: pointer; }
.wm-comp-card label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: rgba(214,226,226,0.8); }
.wm-comp-card input, .wm-comp-card select { padding: 5px 8px; border-radius: 6px; border: 1px solid rgba(126,158,177,0.3); background: rgba(20,30,42,0.7); color: #e8eef2; }
.wm-comp-dims { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 8px; }
.wm-comp-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }

/* WHITEMODEL-PANORAMA-OPERABLE-R2-20260627-18 */
.wm-shell {
  overflow-x: hidden;
}

.wm-r2-panel {
  border-color: rgba(95, 196, 214, 0.28);
  background: linear-gradient(180deg, rgba(12, 31, 40, 0.72), rgba(9, 17, 27, 0.72));
}

.wm-r2-task-flow {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.wm-r2-flow-card {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 8px;
  border: 1px solid rgba(126, 158, 177, 0.18);
  border-radius: 8px;
  background: rgba(6, 13, 20, 0.64);
}

.wm-r2-flow-card b {
  color: rgba(241, 247, 248, 0.92);
  font-size: 12px;
}

.wm-r2-flow-card em {
  color: rgba(214, 226, 226, 0.6);
  font-size: 11px;
  font-style: normal;
}

.wm-r2-flow-card.done {
  border-color: rgba(120, 210, 170, 0.42);
  background: rgba(18, 40, 34, 0.64);
}

.wm-r2-flow-card.current {
  border-color: rgba(95, 196, 214, 0.42);
  background: rgba(13, 35, 48, 0.66);
}

.wm-r2-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.wm-r2-actions .wm-btn {
  min-width: 0;
  white-space: normal;
}

.wm-r2-status {
  margin: 0;
  color: rgba(226, 234, 236, 0.78);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.wm-r2-panorama-grid {
  display: grid;
  gap: 7px;
}

.wm-r2-panorama-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border: 1px solid rgba(126, 158, 177, 0.16);
  border-radius: 8px;
  background: rgba(6, 13, 20, 0.58);
}

.wm-r2-panorama-item b {
  color: rgba(241, 247, 248, 0.88);
  font-size: 12px;
}

.wm-r2-panorama-item em,
.wm-r2-panorama-item small {
  min-width: 0;
  color: rgba(214, 226, 226, 0.74);
  font-size: 11px;
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wm-r2-panorama-item.ready {
  border-color: rgba(120, 210, 170, 0.36);
}

.wm-r2-panorama-item.missing {
  border-color: rgba(235, 181, 95, 0.34);
}

@media (max-width: 820px) {
  .wm-head { flex-wrap: wrap; padding: 10px 12px; }
  .wm-head small { flex: 1 1 100%; white-space: normal; }
  .wm-tabs { margin-left: 0; }
  .wm-body { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) minmax(150px, 34vh); }
  .wm-side { border-left: 0; border-top: 1px solid rgba(126, 158, 177, 0.18); min-width: 0; }
  .wm-toolbar { padding: 8px 10px; }
  .wm-btn { padding: 6px 9px; }
  .wm-comp-dims { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .wm-shell {
    overflow-x: hidden;
  }

  .wm-r2-task-flow,
  .wm-r2-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .wm-r2-panorama-item {
    grid-template-columns: minmax(0, 1fr);
  }
}
/* ACCOUNT-SYSTEM-AUTH-STORAGE-MVP-R1-20260624-06 */
.account-system-r1 {
  display: grid;
  gap: 14px;
}

.account-r1-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) repeat(2, minmax(240px, 1fr));
  gap: 12px;
}

.account-r1-card,
.account-r1-section {
  border: 1px solid rgba(112, 174, 205, 0.28);
  background: rgba(8, 19, 30, 0.72);
  border-radius: 8px;
  padding: 14px;
  color: #d9edf7;
}

.account-r1-card h3,
.account-r1-section h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.account-r1-card p,
.account-r1-card small,
.account-r1-section small,
.account-r1-section span {
  color: rgba(217, 237, 247, 0.72);
}

.account-r1-current {
  align-content: start;
}

.account-r1-avatar {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 10px;
  border-radius: 8px;
  color: #04131a;
  font-size: 20px;
  font-weight: 800;
  background: linear-gradient(135deg, #c4edf6, #7fb8c8);
}

.account-r1-current label {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  color: rgba(217, 237, 247, 0.84);
}

.account-r1-current select,
.account-r1-section select {
  min-height: 34px;
  border: 1px solid rgba(112, 174, 205, 0.38);
  border-radius: 6px;
  background: #081724;
  color: #e7f6fb;
}

.account-r1-actions,
.account-r1-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.account-r1-actions {
  justify-content: flex-start;
  margin-top: 12px;
}

.account-r1-actions button,
.account-r1-section button,
.account-r1-popover-entry {
  min-height: 32px;
  border: 1px solid rgba(127, 184, 200, 0.48);
  border-radius: 6px;
  background: rgba(24, 47, 64, 0.86);
  color: #e7f6fb;
  cursor: pointer;
}

.account-r1-actions button:hover,
.account-r1-section button:hover,
.account-r1-popover-entry:hover {
  background: rgba(37, 82, 104, 0.92);
}

.account-r1-card dl {
  display: grid;
  grid-template-columns: minmax(100px, 0.45fr) 1fr;
  gap: 8px 10px;
  margin: 0;
}

.account-r1-card dt {
  color: rgba(217, 237, 247, 0.62);
}

.account-r1-card dd {
  margin: 0;
  color: #e7f6fb;
  overflow-wrap: anywhere;
}

.account-r1-role-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.account-r1-role-list span {
  border: 1px solid rgba(112, 174, 205, 0.22);
  border-radius: 999px;
  padding: 4px 8px;
}

.account-r1-role-list .active {
  border-color: rgba(73, 214, 140, 0.64);
  color: #b6ffd5;
  background: rgba(30, 115, 74, 0.22);
}

.account-r1-permission-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-size: 12px;
}

.account-r1-section:has(.account-r1-permission-table) {
  overflow-x: auto;
}

.account-r1-permission-table th,
.account-r1-permission-table td {
  border: 1px solid rgba(112, 174, 205, 0.18);
  padding: 8px;
  text-align: center;
}

.account-r1-permission-table th {
  background: rgba(16, 42, 58, 0.82);
  color: #dff5ff;
}

.account-r1-permission-table td:first-child,
.account-r1-permission-table th:first-child {
  text-align: left;
  position: sticky;
  left: 0;
  background: #0a1b29;
}

.account-r1-permission-table .allowed {
  color: #b6ffd5;
}

.account-r1-permission-table .blocked {
  color: rgba(255, 174, 174, 0.78);
}

.account-r1-library-grid,
.account-r1-profile-grid,
.account-r1-compliance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.account-r1-library-grid article,
.account-r1-profile-grid article,
.account-r1-compliance-grid article {
  display: grid;
  gap: 6px;
  min-height: 92px;
  padding: 12px;
  border: 1px solid rgba(112, 174, 205, 0.22);
  border-radius: 8px;
  background: rgba(4, 15, 24, 0.58);
}

.account-r1-profile-grid code,
.account-r1-library-grid small {
  color: #9fd3e4;
  white-space: normal;
  overflow-wrap: anywhere;
}

.account-r1-restricted {
  border-color: rgba(244, 193, 86, 0.36);
  background: rgba(57, 42, 18, 0.42);
}

.account-r1-popover-entry {
  width: 100%;
  margin-top: 10px;
  padding: 0 10px;
}

@media (max-width: 980px) {
  .account-r1-grid {
    grid-template-columns: 1fr;
  }

  .account-r1-section-head {
    align-items: flex-start;
    flex-direction: column;
  }
}
/* CODELEAD-AI-LOCAL-EDITING-BASELINE-R1-20260625-04 · 本地剪辑工作台(时间线台)样式 · 美梵青玻璃主题 */
/* 旧 Worker/节点壳 + 脚本审核区在新视图下折叠保留(仍在 DOM, 满足静态门禁; 收敛重叠, debug 默认不暴露) */
/* 09_global 用 body:not(.home-mode) #opsNodeShell.ops-comfy-shell{display:grid!important}(特异性最高 (1,4,1)) 强撑 shell,
   这里用 (1,5,1)+!important 才能折叠它; 脚本审核区特异性低, 普通 !important 即可。 */
body:not(.home-mode) .ops-comfy-panel.aile-flow-active #opsNodeShell.ops-comfy-shell.ops-node-shell,
body:not(.home-mode) .ops-comfy-panel.aile-finished-active #opsNodeShell.ops-comfy-shell.ops-node-shell,
body:not(.home-mode) .ops-comfy-panel.aile-local-active #opsNodeShell.ops-comfy-shell.ops-node-shell { display: none !important; }
.ops-comfy-panel.aile-flow-active .ops-script-review-zone,
.ops-comfy-panel.aile-finished-active .ops-script-review-zone,
.ops-comfy-panel.aile-local-active .ops-script-review-zone { display: none !important; }
body:not(.home-mode) .ops-comfy-panel.aile-local-active.aile-dev-open #opsNodeShell.ops-comfy-shell.ops-node-shell { display: grid !important; border-top:1px dashed var(--glass-line, rgba(126,211,242,.3)); margin-top:10px; padding-top:10px; }
.ops-comfy-panel.aile-local-active.aile-dev-open .ops-script-review-zone { display: grid !important; }

.aile-host { display: block; color: var(--ink, #effbff); }
.aile-btn { border:1px solid var(--glass-line, rgba(126,211,242,.3)); background: rgba(10,26,40,.5); color:#cdeefb; border-radius:8px; padding:9px 14px; font-size:13px; cursor:pointer; }
.aile-btn.primary { background:linear-gradient(180deg,#8fe3fb,#4fbbe8); color:#04212f; font-weight:700; border:0; }
.aile-btn.ghost { background: rgba(8,22,36,.4); }
.aile-btn.s { padding:6px 10px; font-size:12px; }
.aile-btn.mini { font-size:12px; padding:7px 10px; }
.aile-empty { color: var(--muted, rgba(207,230,238,.6)); font-size:12px; }

/* 默认: AI剪辑工作流(傻瓜流) */
.aile-flow { padding:16px; display:flex; flex-direction:column; gap:12px; }
.aile-flow-row { display:flex; flex-wrap:wrap; gap:8px; }
.aile-step { background: var(--glass-card, rgba(5,19,30,.76)); border:1px solid var(--glass-line, rgba(126,211,242,.28)); border-radius:8px; padding:8px 12px; font-size:13px; }
.aile-flow-note { color: var(--muted, rgba(207,230,238,.7)); font-size:12.5px; line-height:1.7; margin:0; }

/* 内部: AI本地剪辑工作台(四区) */
.aile-local { padding:14px; display:flex; flex-direction:column; gap:12px; }
.aile-local-head { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.aile-pill { color:#8be3c6; border:1px solid rgba(110,220,180,.35); border-radius:20px; padding:5px 12px; font-size:11.5px; }
.aile-proj { color: var(--muted, rgba(207,230,238,.74)); font-size:13px; flex:1; }
.aile-grid { display:grid; grid-template-columns: 220px 1fr; gap:12px; }
.aile-zone-t { font-size:12px; color: var(--teal, #76d8f6); letter-spacing:.05em; margin-bottom:8px; }

.aile-assistant { background: var(--glass-card, rgba(5,19,30,.76)); border:1px solid var(--glass-line, rgba(126,211,242,.28)); border-radius:12px; padding:14px; display:flex; flex-direction:column; gap:8px; }
.aile-assistant > b { font-size:13.5px; margin-bottom:4px; }
.aile-ai { text-align:left; border:1px solid var(--glass-line, rgba(126,211,242,.28)); background: rgba(10,26,40,.45); color:#dcf3fb; border-radius:8px; padding:9px 11px; font-size:13px; cursor:pointer; }
.aile-ai.mini { opacity:.85; font-size:12px; }
.aile-ai-note { color: var(--muted, rgba(207,230,238,.66)); font-size:11.5px; line-height:1.6; margin:6px 0 0; }

.aile-center { display:flex; flex-direction:column; gap:12px; min-width:0; }
.aile-gallery, .aile-preview, .aile-timeline { background: var(--glass-card, rgba(5,19,30,.72)); border:1px solid var(--glass-line, rgba(126,211,242,.24)); border-radius:12px; padding:12px; }
.aile-shot { border:1px solid var(--glass-line, rgba(126,211,242,.2)); border-radius:10px; padding:10px; margin-bottom:8px; }
.aile-shot-head { display:flex; justify-content:space-between; gap:8px; font-size:13px; }
.aile-tags { color: var(--teal, #76d8f6); font-size:11.5px; }
.aile-shot-prompt { color: var(--muted, rgba(207,230,238,.7)); font-size:11.5px; margin:6px 0; line-height:1.5; }
.aile-takes { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:8px; }
.aile-take { width:96px; border:1px solid var(--glass-line, rgba(126,211,242,.28)); background: rgba(8,22,36,.5); border-radius:8px; padding:7px; cursor:pointer; color:#cdeefb; display:flex; flex-direction:column; gap:3px; font-size:11px; text-align:center; }
.aile-take.chosen { border-color: var(--teal, #76d8f6); box-shadow:0 0 0 2px rgba(118,216,246,.25); }
.aile-take-thumb { height:42px; border-radius:5px; background:linear-gradient(135deg, rgba(70,150,210,.4), rgba(10,26,42,.7)); }
.aile-take b { font-size:11.5px; } .aile-take em { color: var(--muted, rgba(207,230,238,.6)); font-style:normal; }
.aile-shot-acts { display:flex; flex-wrap:wrap; gap:6px; }

.aile-preview-strip { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
.aile-timeline { display:flex; flex-direction:column; gap:8px; }
.aile-track { display:flex; align-items:center; gap:8px; background: rgba(6,18,30,.5); border-radius:8px; padding:8px; min-height:40px; }
.aile-track-l { width:64px; color: var(--muted, rgba(207,230,238,.7)); font-size:12px; flex:none; }
.aile-clip { background:linear-gradient(180deg, rgba(70,150,210,.35), rgba(10,26,42,.6)); border:1px solid var(--glass-line, rgba(126,211,242,.3)); border-radius:6px; padding:6px 12px; font-size:12px; }

.aile-dev { margin-top:4px; color: var(--muted, rgba(207,230,238,.6)); font-size:12px; }
.aile-dev > summary { cursor:pointer; padding:8px 0; }

/* R2 导演设定栏 */
.aile-director { display:flex; align-items:center; gap:14px; flex-wrap:wrap; background: var(--glass-card, rgba(5,19,30,.6)); border:1px solid var(--glass-line, rgba(126,211,242,.24)); border-radius:10px; padding:10px 14px; }
.aile-director .aile-dir-l { color: var(--teal, #76d8f6); font-size:13px; font-weight:600; }
.aile-director label { font-size:12.5px; color: var(--muted, rgba(207,230,238,.74)); display:flex; align-items:center; gap:6px; }
.aile-director select { background: rgba(6,14,26,.6); color:#dcf3fb; border:1px solid var(--glass-line, rgba(126,211,242,.3)); border-radius:7px; padding:6px 8px; font-size:12.5px; }

/* R3 顶栏: 视图切换 + 成片库入口(右上角) */
.aile-bar { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:10px; flex-wrap:wrap; }
.aile-tabs { display:flex; gap:6px; }
.aile-tab { border:1px solid var(--glass-line, rgba(126,211,242,.28)); background: rgba(8,22,36,.4); color:#bfe6f6; border-radius:8px; padding:7px 14px; font-size:13px; cursor:pointer; }
.aile-tab.on { background:linear-gradient(180deg,#8fe3fb,#4fbbe8); color:#04212f; font-weight:700; border:0; }
.aile-lib-entry { margin-left:auto; border:1px solid var(--glass-line, rgba(126,211,242,.35)); background: rgba(10,26,40,.5); color:#cdeefb; border-radius:8px; padding:7px 14px; font-size:13px; cursor:pointer; }
.aile-lib-entry.on { border-color: var(--teal, #76d8f6); box-shadow:0 0 0 2px rgba(118,216,246,.25); }

/* R3 素材输入区 */
.aile-input { background: var(--glass-card, rgba(5,19,30,.72)); border:1px solid var(--glass-line, rgba(126,211,242,.24)); border-radius:12px; padding:12px; }
.aile-input-row { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:8px; }
.aile-input-proj { font-size:12.5px; color: var(--muted, rgba(207,230,238,.74)); display:flex; align-items:center; gap:6px; }
.aile-input-proj select { background: rgba(6,14,26,.6); color:#dcf3fb; border:1px solid var(--glass-line, rgba(126,211,242,.3)); border-radius:7px; padding:6px 8px; font-size:12.5px; max-width:280px; }
.aile-drop { border:1.5px dashed var(--glass-line, rgba(126,211,242,.4)); border-radius:10px; padding:14px; text-align:center; color: var(--muted, rgba(207,230,238,.6)); font-size:12.5px; }
.aile-drop.over { border-color: var(--teal, #76d8f6); background: rgba(118,216,246,.08); color:#cdeefb; }
.aile-chips { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
.aile-chip { display:inline-flex; align-items:center; gap:6px; background: rgba(10,26,40,.5); border:1px solid var(--glass-line, rgba(126,211,242,.28)); border-radius:14px; padding:4px 6px 4px 10px; font-size:11.5px; color:#cdeefb; }
.aile-chip[data-kind="local"] { border-color: rgba(110,220,180,.4); color:#9fe6cd; }
.aile-chip-x { border:0; background:transparent; color: var(--muted, rgba(207,230,238,.7)); cursor:pointer; font-size:13px; line-height:1; }

/* R4 视频库 二级 tab(素材库/成品片库) */
.aile-videolib { display:flex; flex-direction:column; gap:12px; }
.aile-l2 { display:flex; gap:6px; }
.aile-l2tab { border:1px solid var(--glass-line, rgba(126,211,242,.28)); background: rgba(8,22,36,.4); color:#bfe6f6; border-radius:8px; padding:6px 12px; font-size:12.5px; cursor:pointer; }
.aile-l2tab.on { background: rgba(118,216,246,.16); border-color: var(--teal, #76d8f6); color:#eaf8ff; font-weight:600; }

/* R3 成片库视图 */
.aile-finished { display:flex; flex-direction:column; gap:12px; }
.aile-finished-head { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.aile-finished-head > b { font-size:15px; }
.aile-finished-head .aile-ai-note { flex:1; margin:0; }
.aile-folder { background: var(--glass-card, rgba(5,19,30,.72)); border:1px solid var(--glass-line, rgba(126,211,242,.24)); border-radius:12px; padding:12px; }
.aile-folder-head { font-size:13.5px; color: var(--teal, #76d8f6); margin-bottom:10px; }
.aile-folder-head em { color: var(--muted, rgba(207,230,238,.6)); font-style:normal; font-size:11.5px; margin-left:6px; }
.aile-folder-body { display:flex; flex-wrap:wrap; gap:10px; }
.aile-fclip { width:200px; border:1px solid var(--glass-line, rgba(126,211,242,.22)); border-radius:10px; padding:8px; }
.aile-fclip-head { display:flex; flex-direction:column; gap:6px; }
.aile-fclip-thumb { height:96px; border-radius:6px; background:linear-gradient(135deg, rgba(70,150,210,.4), rgba(10,26,42,.7)); }
.aile-fclip-title { text-align:left; border:0; background:transparent; color:#dcf3fb; font-size:12.5px; cursor:pointer; padding:0; }
.aile-clip-detail { margin-top:8px; border-top:1px dashed var(--glass-line, rgba(126,211,242,.24)); padding-top:8px; }
.aile-clip-meta { color: var(--muted, rgba(207,230,238,.66)); font-size:11px; line-height:1.6; margin-bottom:6px; }
.aile-clip-acts { display:flex; flex-wrap:wrap; gap:6px; align-items:center; }
.aile-mv { font-size:11.5px; color: var(--muted, rgba(207,230,238,.74)); display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.aile-mv select { background: rgba(6,14,26,.6); color:#dcf3fb; border:1px solid var(--glass-line, rgba(126,211,242,.3)); border-radius:6px; padding:4px 6px; font-size:11.5px; }

/* R5 服务器/API 工作流(flow 视图) */
.aile-api-hero { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; background: var(--glass-card, rgba(5,19,30,.6)); border:1px solid var(--glass-line, rgba(126,211,242,.24)); border-radius:12px; padding:12px 16px; }
.aile-api-hero strong { font-size:14.5px; } .aile-api-hero small { display:block; color: var(--muted, rgba(207,230,238,.7)); font-size:12px; line-height:1.6; margin-top:4px; }
.aile-api-layout { display:grid; grid-template-columns: 1fr 340px; gap:12px; margin-top:12px; }
.aile-api-canvas { display:grid; grid-template-columns: repeat(2, 1fr); gap:10px; align-content:start; }
.aile-api-node { text-align:left; border:1px solid var(--glass-line, rgba(126,211,242,.24)); background: var(--glass-card, rgba(5,19,30,.72)); border-radius:10px; padding:10px 12px; cursor:pointer; color:#dcf3fb; display:flex; flex-direction:column; gap:3px; position:relative; }
.aile-api-node b { color: var(--teal, #76d8f6); font-size:12px; } .aile-api-node strong { font-size:13px; } .aile-api-node small { color: var(--muted, rgba(207,230,238,.66)); font-size:11px; line-height:1.5; }
.aile-api-node em { font-style:normal; font-size:10.5px; align-self:flex-end; padding:1px 7px; border-radius:10px; }
.aile-api-node.active { border-color: var(--teal, #76d8f6); box-shadow:0 0 0 2px rgba(118,216,246,.22); }
.aile-api-node.ready em { background: rgba(110,220,180,.18); color:#8be3c6; } .aile-api-node.pending em { background: rgba(126,211,242,.14); color:#bfe6f6; } .aile-api-node.locked { opacity:.6; } .aile-api-node.locked em { background: rgba(207,230,238,.1); color: var(--muted, rgba(207,230,238,.6)); }
.aile-api-node.stale em { background: rgba(245,190,90,.20); color:#ffd58a; }
.aile-api-node.unknown em { background: rgba(180,190,210,.16); color:#c6d0e0; }
.aile-stale-note { border:1px solid rgba(245,190,90,.35); background:rgba(245,190,90,.10); color:#ffd58a; border-radius:8px; padding:7px 9px; font-size:11.5px; line-height:1.6; margin:6px 0; }
/* 令 -1354（settle ④，稿 REN-M-RESULT-B）：交付待补黄徽章、状态待核红徽章；不用"合成成功"绿态 */
.aile-compose-pending-badge { display:inline-block; border-radius:999px; padding:1px 8px; font-size:11.5px; font-weight:600; border:1px solid currentColor; }
.aile-compose-pending-badge.pending { color:#e8b65a; background:rgba(232,182,90,.12); }
.aile-compose-pending-badge.verify { color:#ef7f74; background:rgba(239,127,116,.12); }
.aile-compose-pending-sub { font-size:11.5px; opacity:.75; margin:4px 0; }
.aile-compose-pending-bar { font-size:11.5px; opacity:.7; margin-left:8px; }
.aile-api-console { background: var(--glass-card, rgba(5,19,30,.72)); border:1px solid var(--glass-line, rgba(126,211,242,.24)); border-radius:12px; padding:12px; display:flex; flex-direction:column; gap:10px; }
.aile-api-console > strong { font-size:13px; color: var(--teal, #76d8f6); }
.aile-api-detail { display:flex; flex-direction:column; gap:8px; border-bottom:1px dashed var(--glass-line, rgba(126,211,242,.2)); padding-bottom:10px; }
.aile-api-detail-head { display:flex; align-items:center; gap:8px; } .aile-api-detail-head span { color: var(--teal, #76d8f6); font-size:13px; } .aile-api-detail-head strong { font-size:13px; } .aile-api-detail-head small { display:block; color: var(--muted, rgba(207,230,238,.66)); font-size:11px; }
.aile-api-grid { display:grid; grid-template-columns: 1fr 1fr; gap:4px 10px; }
.aile-api-grid span { display:flex; flex-direction:column; font-size:10.5px; } .aile-api-grid b { color: var(--muted, rgba(207,230,238,.6)); font-weight:500; } .aile-api-grid em { font-style:normal; color:#cdeefb; }
.aile-api-cfgprev strong { font-size:11.5px; color: var(--muted, rgba(207,230,238,.7)); }
.aile-api-actions { display:flex; flex-wrap:wrap; gap:6px; }
.aile-api-status { display:flex; flex-direction:column; gap:3px; background: rgba(6,18,30,.5); border-radius:8px; padding:8px; }
.aile-api-status span { display:flex; justify-content:space-between; gap:8px; font-size:11px; } .aile-api-status b { color: var(--muted, rgba(207,230,238,.6)); font-weight:500; } .aile-api-status em { font-style:normal; color: var(--teal, #76d8f6); }
.aile-api-modal { position:fixed; inset:0; background: rgba(2,8,14,.6); display:flex; align-items:center; justify-content:center; z-index:60; }
.aile-api-modal-card { width:min(520px, 92vw); max-height:86vh; overflow:auto; background: var(--bg, #04101a); border:1px solid var(--glass-line, rgba(126,211,242,.34)); border-radius:14px; padding:16px; display:flex; flex-direction:column; gap:12px; }
.aile-api-modal-head { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; } .aile-api-modal-head span { color: var(--teal, #76d8f6); } .aile-api-modal-head small { display:block; color: var(--muted, rgba(207,230,238,.66)); font-size:11.5px; }
.aile-api-form { display:grid; grid-template-columns: 1fr 1fr; gap:8px; }
.aile-api-form label { display:flex; flex-direction:column; gap:4px; font-size:11.5px; color: var(--muted, rgba(207,230,238,.74)); }
.aile-api-form input { background: rgba(6,14,26,.6); color:#dcf3fb; border:1px solid var(--glass-line, rgba(126,211,242,.3)); border-radius:7px; padding:6px 8px; font-size:12px; }
.aile-api-modal-acts { display:flex; gap:8px; }

@media (max-width: 1100px) { .aile-grid { grid-template-columns: 1fr; } .aile-api-layout { grid-template-columns: 1fr; } .aile-api-canvas { grid-template-columns: 1fr; } .aile-api-form { grid-template-columns: 1fr; } }

.aile-debug-drawer {
  margin-top: 10px;
  border: 1px solid rgba(125, 166, 255, 0.22);
  border-radius: 8px;
  background: rgba(12, 18, 34, 0.42);
  padding: 10px 12px;
}

.aile-debug-drawer summary {
  cursor: pointer;
  color: rgba(231, 238, 255, 0.86);
  font-size: 12px;
  font-weight: 700;
}

.aile-debug-drawer:not([open]) > :not(summary) {
  display: none;
}

.aile-api-hero,
.aile-local-head,
.aile-input-row,
.aile-finished-head {
  min-width: 0;
}

@media (max-width: 760px) {
  .aile-tabs,
  .aile-input-row,
  .aile-api-actions,
  .aile-finished-head,
  .aile-l2 {
    width: 100%;
  }

  .aile-tab,
  .aile-lib-entry,
  .aile-input-row .aile-btn,
  .aile-api-actions .aile-btn,
  .aile-l2tab {
    flex: 1 1 140px;
    min-width: 0;
  }

  .aile-input-proj,
  .aile-input-proj select,
  .aile-fclip {
    width: 100%;
    max-width: none;
  }
}

/* 04 媒体生成: 逐镜行 + 模型选择 + 生成状态/预览(04体验修复) */
.aile-media-list { display:flex; flex-direction:column; gap:8px; }
.aile-media-head { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin-bottom:2px; }
.aile-media-head strong { font-size:14px; }
.aile-media-head small { color:var(--muted, rgba(207,230,238,.7)); font-size:11.5px; flex:1 1 100%; line-height:1.55; }
.aile-media-t2i-model, .aile-media-i2v-model { display:inline-flex; align-items:center; gap:5px; font-size:12px; color:var(--muted, rgba(207,230,238,.82)); }
.aile-media-t2i-model select, .aile-media-i2v-model select { font-size:12px; padding:3px 6px; }
/* v1 flex 版 .aile-media-row 已删, 改用文件下方 04 v2 grid 三分栏版(别留旧 flex 冲突) */

/* 01 三栏重排: 左大预览 / 中选择+预览图框 / 右已选计数 */
.aile-src-preview-big { display:flex; flex-direction:column; gap:8px; height:100%; min-height:280px; }
.aile-src-preview-big.empty { align-items:center; justify-content:center; color:var(--muted, rgba(207,230,238,.6)); font-size:13px; }
.aile-src-preview-big img, .aile-src-preview-big video { max-width:100%; max-height:60vh; border-radius:10px; object-fit:contain; background:#000; }
.aile-src-preview-big figcaption { font-size:12px; color:var(--muted, rgba(207,230,238,.7)); }
.aile-src-big-card { padding:24px; border:1px dashed var(--glass-line, rgba(126,211,242,.3)); border-radius:10px; font-size:15px; }
.aile-src-center { display:flex; flex-direction:column; gap:10px; }
.aile-srcfiles-bar { text-align:left; border:1px solid var(--glass-line, rgba(126,211,242,.24)); background:rgba(10,26,40,.45); color:#dcf3fb; border-radius:8px; padding:10px 12px; cursor:pointer; display:flex; justify-content:space-between; }
.aile-src-thumbs { display:grid; grid-template-columns:repeat(auto-fill, minmax(96px,1fr)); gap:10px; }
.aile-src-thumbs.empty { display:block; color:var(--muted, rgba(207,230,238,.6)); font-size:12px; padding:8px 0; }
.aile-src-thumb { padding:0; border:1px solid var(--glass-line, rgba(126,211,242,.22)); border-radius:8px; overflow:hidden; background:rgba(0,0,0,.25); height:96px; cursor:pointer; }
.aile-src-thumb img, .aile-src-thumb video { width:100%; height:96px; object-fit:cover; display:block; }
.aile-src-thumb .ph { display:flex; align-items:center; justify-content:center; width:100%; height:96px; font-size:11px; color:var(--muted, rgba(207,230,238,.7)); padding:4px; }
.aile-src-thumb.on { border-color:rgba(126,211,242,.7); box-shadow:0 0 0 2px rgba(126,211,242,.4); }
.aile-src-thumb-dh { position:relative; border-color:rgba(126,242,190,.5); cursor:default; }
.aile-src-thumb-tag { position:absolute; left:4px; bottom:4px; font-size:10px; font-style:normal; padding:1px 6px; border-radius:6px; background:rgba(46,160,120,.85); color:#fff; }
.aile-src-summary { display:flex; flex-direction:column; gap:12px; padding:4px 2px; }
.aile-src-sum-h { display:flex; flex-direction:column; gap:2px; }
.aile-src-sum-h span { font-size:12px; color:var(--teal, #76d8f6); letter-spacing:.04em; }
.aile-src-sum-h strong { font-size:16px; }
.aile-src-sum-row { display:flex; flex-direction:column; gap:3px; }
.aile-src-sum-row label { font-size:12px; color:var(--muted, rgba(207,230,238,.66)); }
.aile-src-sum-row b { font-size:13.5px; color:#eff8fc; font-weight:600; }
.aile-src-summary .aile-api-actions { margin-top:6px; }
.aile-media-ctl { display:flex; align-items:center; gap:6px; }
.aile-media-ctl select { font-size:12px; padding:4px 6px; }
.aile-media-out { width:128px; height:80px; display:flex; align-items:center; justify-content:center; background:rgba(0,0,0,.28); border-radius:8px; overflow:hidden; flex:0 0 auto; }
.aile-shot-media { max-width:128px; max-height:80px; border-radius:8px; object-fit:cover; }
video.aile-shot-media { width:128px; height:80px; background:#000; }
.aile-shot-media.none, .aile-shot-media.gen, .aile-shot-media.fail { font-size:11.5px; color:var(--muted, rgba(207,230,238,.7)); }
.aile-shot-media.fail { color:#ff9a9a; }
.aile-media-status { flex:1 1 100%; }
.aile-media-st { font-size:12px; line-height:1.55; }
.aile-media-st.gen { color:#ffd27a; }
.aile-media-st.queued { color:var(--muted, rgba(207,230,238,.7)); }
.aile-media-st.done { color:#86e6b0; }
.aile-media-st.fail { color:#ff9a9a; }
.aile-media-st.idle { color:var(--muted, rgba(207,230,238,.55)); }

/* 内容剪辑01 节点轨: 2×3 网格 + 选中加深(卡片够大, 别缩) */
.aile-flow-strip { display:block !important; grid-template-columns:none !important; padding:0 !important; background:transparent !important; border:0 !important; width:100%; }
.mkt-edit-bottom { width:100%; }
.aile-node-grid { display:grid !important; grid-template-columns:1fr 1fr; gap:14px; width:100%; }
.aile-node-card { text-align:left; display:flex !important; flex-direction:row !important; align-items:center; gap:14px; border:1px solid var(--glass-line, rgba(126,211,242,.24)); background:var(--glass-card, rgba(5,19,30,.72)); border-radius:12px; padding:18px 22px; min-height:64px; color:#dcf3fb; cursor:pointer; }
.aile-node-card .aile-node-no { font-size:14px; font-weight:700; opacity:.85; min-width:30px; flex:0 0 auto; }
.aile-node-card strong { font-size:14px; flex:1 1 auto; }
.aile-node-card .aile-node-state { font-size:12px; opacity:.75; align-self:center !important; flex:0 0 auto; padding:2px 9px; border-radius:10px; }
#marketing .aile-node-card.on, .aile-node-card.on { background:rgba(16,54,84,.97) !important; border-color:var(--teal, #76d8f6) !important; box-shadow: inset 4px 0 0 var(--teal, #76d8f6), 0 0 0 1px rgba(126,211,242,.45) inset !important; }
#marketing .aile-node-card.on .aile-node-no, #marketing .aile-node-card.on strong { color:#eaf8ff !important; }
.aile-node-card.locked { opacity:.5; }

/* 内容剪辑01 两弹窗(2#选项目 / 3#选文件) */
.cm-modal-card.wide { max-width:980px; width:92vw; }
.aile-proj-two { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.aile-proj-two h4 { font-size:13px; margin:0 0 8px; color:var(--muted, rgba(207,230,238,.8)); }
.aile-proj-col { display:flex; flex-direction:column; gap:8px; max-height:52vh; overflow-y:auto; }
.aile-proj-card { text-align:left; border:1px solid var(--glass-line, rgba(126,211,242,.22)); background:rgba(10,26,40,.45); color:#dcf3fb; border-radius:8px; padding:12px; cursor:pointer; }
.aile-proj-card:hover { border-color:rgba(126,211,242,.5); }
.aile-file-two { display:grid; grid-template-columns:1.4fr 1fr; gap:14px; }
.aile-file-left, .aile-file-right { min-height:300px; max-height:60vh; overflow-y:auto; border:1px solid var(--glass-line, rgba(126,211,242,.16)); border-radius:10px; padding:10px; }
.aile-file-rh { font-size:12px; color:var(--muted, rgba(207,230,238,.75)); margin-bottom:8px; }
.aile-file-pathbar { display:flex; align-items:center; gap:8px; font-size:12px; color:var(--muted, rgba(207,230,238,.7)); margin-bottom:8px; }
.aile-file-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(92px,1fr)); gap:10px; }
.aile-file-card { position:relative; padding:8px; border:1px solid var(--glass-line, rgba(126,211,242,.22)); border-radius:8px; background:rgba(0,0,0,.22); color:#dcf3fb; cursor:pointer; font-size:12px; display:flex; flex-direction:column; align-items:center; gap:4px; }
.aile-file-card img { width:100%; height:72px; object-fit:cover; border-radius:6px; }
.aile-file-card.folder { justify-content:center; min-height:72px; }
.aile-file-del { position:absolute; top:2px; right:2px; border:none; background:rgba(0,0,0,.6); color:#fff; border-radius:50%; width:20px; height:20px; cursor:pointer; }
.aile-empty.gate { color:#ffd27a; }
.aile-file-uploadbar { display:flex; align-items:center; gap:10px; margin-bottom:8px; }
.aile-file-uploadbar .aile-btn { cursor:pointer; }
.aile-file-drop { flex:1; border:1.5px dashed var(--glass-line, rgba(126,211,242,.4)); border-radius:8px; padding:8px 12px; font-size:12px; color:var(--muted, rgba(207,230,238,.62)); text-align:center; }
/* ---- 01 数字人库卡 / 创建数字人弹窗(Task2) ---- */
.aile-dh-card.sel, .aile-file-card.sel { border-color:var(--teal, #76d8f6); box-shadow:0 0 0 1px var(--teal, #76d8f6) inset; }
.aile-dh-voice { font-size:10px; color:var(--teal, #76d8f6); opacity:.85; word-break:break-all; line-height:1.2; }
.aile-dh-cur { font-size:12px; color:var(--teal, #76d8f6); }
.aile-cd-body { display:flex; flex-direction:column; gap:10px; max-height:64vh; overflow:auto; }
.aile-cd-name { flex:1; background:rgba(8,22,34,.5); border:1px solid var(--glass-line, rgba(126,211,242,.24)); border-radius:8px; color:#dcf3fb; padding:6px 10px; font-size:13px; }
.aile-cd-portrait.sel { border-color:var(--teal, #76d8f6); box-shadow:0 0 0 1px var(--teal, #76d8f6) inset; }
.aile-cd-preview { display:flex; flex-direction:column; align-items:center; gap:4px; }
.aile-cd-preview img { width:120px; height:120px; object-fit:cover; border-radius:10px; border:1px solid var(--glass-line, rgba(126,211,242,.3)); }
.aile-cd-preview span { font-size:12px; color:var(--muted, rgba(207,230,238,.62)); }
.aile-cd-foot { display:flex; justify-content:flex-end; padding-top:6px; }
.aile-cd-foot .aile-btn[disabled] { opacity:.55; cursor:default; }
/* ---- 03 三栏重排: 左自定义脚本 / 中输出框+工具条 / 右控制+模型(Task2) ---- */
.aile-script-custom-wrap { display:flex; flex-direction:column; gap:8px; height:100%; }
.aile-script-custom-t { font-size:12px; color:var(--muted, rgba(207,230,238,.7)); }
/* 03 重设计: 自定义提示词标题条([导入提示词])+ 提示词库弹窗卡 */
.aile-script-custom-bar { display:flex; align-items:center; justify-content:space-between; gap:8px; font-size:12px; color:var(--muted, rgba(207,230,238,.7)); }
.cm-prompt-list { display:flex; flex-direction:column; gap:8px; max-height:60vh; overflow:auto; }
.cm-prompt-card { border:1px solid rgba(118,216,246,.25); border-radius:10px; padding:10px 12px; cursor:pointer; transition:border-color .15s, background .15s; }
.cm-prompt-card:hover { border-color:rgba(118,216,246,.55); background:rgba(118,216,246,.06); }
.cm-prompt-card b { color:var(--teal, #76d8f6); }
.cm-prompt-card span { display:block; color:#9fb6c4; font-size:12px; margin-top:3px; }
.aile-script-custom { width:100%; min-height:300px; flex:1; resize:vertical; background:rgba(8,22,34,.5); border:1px solid var(--glass-line, rgba(126,211,242,.24)); border-radius:10px; color:#dcf3fb; padding:10px 12px; font-size:13px; line-height:1.6; }
.aile-script-out { display:flex; flex-direction:column; gap:10px; }
.aile-script-outbar { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.aile-script-outbar .cm-h-right { display:flex; gap:8px; }
.aile-script-acts { display:flex; flex-direction:column; align-items:stretch; gap:10px; }
.aile-script-acts .aile-script-acts-t { font-size:12px; color:var(--teal, #76d8f6); letter-spacing:.04em; margin-bottom:2px; }
.aile-script-acts .aile-btn { width:100%; text-align:center; }
.aile-script-loading { display:flex; align-items:center; gap:10px; color:var(--teal, #76d8f6); font-size:13px; }
.aile-script-spin { width:16px; height:16px; border-radius:50%; border:2px solid rgba(118,216,246,.25); border-top-color:var(--teal, #76d8f6); display:inline-block; animation:aile-script-spin .8s linear infinite; }
@keyframes aile-script-spin { to { transform:rotate(360deg); } }
.aile-script-err { border:1px solid rgba(255,107,107,.45); background:rgba(255,107,107,.10); color:#ffb4b4; border-radius:10px; padding:12px 14px; font-size:13px; line-height:1.55; }
.aile-script-acts .aile-script-model { width:100%; justify-content:space-between; }
.aile-script-acts .aile-btn[data-aile-api-script="generate"] { padding:12px 14px; font-size:14px; }
.aile-script-model { display:inline-flex; align-items:center; gap:6px; font-size:12px; color:var(--muted, rgba(207,230,238,.82)); }
.aile-script-model select { font-size:12px; padding:4px 6px; }
.cm-modal-card.aile-brief-card { width:min(700px, 94vw); max-width:700px; }
.aile-brief-modal { display:grid !important; grid-template-columns:1fr 1fr; gap:12px 18px; align-items:start; }
.aile-brief-modal label { display:flex; flex-direction:column; gap:5px; font-size:12px; color:var(--muted, rgba(207,230,238,.82)); min-width:0; }
.aile-brief-modal input, .aile-brief-modal select { width:100%; box-sizing:border-box; font-size:13px; padding:7px 9px; background:rgba(6,14,26,.6); color:#dcf3fb; border:1px solid var(--glass-line, rgba(126,211,242,.3)); border-radius:7px; }
.aile-script-cards { display:grid; grid-template-columns:repeat(auto-fill, minmax(160px,1fr)); gap:10px; }
.aile-script-card { text-align:left; border:1px solid var(--glass-line, rgba(126,211,242,.24)); background:rgba(8,22,34,.5); border-radius:10px; padding:12px; cursor:pointer; color:#dcf3fb; display:flex; flex-direction:column; gap:4px; }
.aile-script-card b { font-size:13px; } .aile-script-card em { font-style:normal; font-size:11px; color:var(--muted, rgba(207,230,238,.6)); }

/* 04 媒体节点重排 */
.aile-media-player { display:flex; flex-direction:column; gap:10px; height:100%; }
.aile-media-player-head { display:flex; align-items:baseline; gap:8px; }
.aile-media-player-head b { color:var(--teal, #76d8f6); }
.aile-media-player-head span { color:#9fb6c4; font-size:13px; }
.aile-media-player-media { width:100%; max-height:62vh; border-radius:12px; background:#0b1418; object-fit:contain; }
.aile-media-player-empty, .aile-media-player.empty { display:flex; align-items:center; justify-content:center; min-height:200px; color:#7c93a1; font-size:13px; border:1px dashed rgba(118,216,246,.25); border-radius:12px; padding:18px; text-align:center; }
.aile-media-list { display:flex; flex-direction:column; gap:10px; }
/* 04 v2 镜头框做小: 三分栏 grid(左1/2内容 · 中1/4操作+参考 · 右1/4预览) + status 满行 */
.aile-media-row { display:grid; grid-template-columns: 2fr 1fr 1fr; grid-template-areas:"info ctl prev" "status status status"; gap:8px 10px; align-items:start; border:1px solid rgba(118,216,246,.18); border-radius:10px; padding:8px 10px; cursor:pointer; background:rgba(15,30,38,.35); }
.aile-media-row.on { background:rgba(28,64,80,.65); border-color:rgba(118,216,246,.55); }
.aile-media-c-info { grid-area:info; display:flex; flex-direction:column; gap:3px; min-width:0; }
.aile-media-c-info b { color:var(--teal,#76d8f6); }
.aile-media-c-info span { font-size:12.5px; }
.aile-media-c-info em { color:#9fb6c4; font-size:11.5px; font-style:normal; }
.aile-media-c-ctl { grid-area:ctl; display:flex; flex-direction:column; gap:5px; }
.aile-media-c-ctl .aile-btn { width:100%; }
/* 批A: 每镜参考缩略区(小图40px + kind角标 + ×删 + ＋选参考) */
.aile-media-refs { display:flex; flex-wrap:wrap; gap:6px; align-items:center; }
.aile-ref-thumb { position:relative; width:40px; height:40px; flex:none; border-radius:8px; overflow:hidden; border:1px solid rgba(118,216,246,.3); background:#0c1a20; display:inline-flex; align-items:center; justify-content:center; }
.aile-ref-thumb img { width:100%; height:100%; object-fit:cover; }
.aile-ref-thumb i { font-size:10px; color:#9fb6c4; font-style:normal; }
.aile-ref-tag { position:absolute; left:0; right:0; bottom:0; font-size:9px; line-height:1.4; text-align:center; background:rgba(6,16,22,.72); color:#9fdcf3; font-style:normal; }
.aile-ref-del { position:absolute; top:0; right:0; width:14px; height:14px; line-height:12px; font-size:10px; border:0; border-radius:0 0 0 8px; background:rgba(200,60,60,.85); color:#fff; cursor:pointer; padding:0; }
.aile-ref-add { width:40px; height:40px; flex:none; border-radius:8px; border:1px dashed rgba(118,216,246,.45); background:transparent; color:#9fdcf3; font-size:10px; cursor:pointer; padding:0; }
/* 批A: 三选一动作 +【生成】行 */
.aile-media-actrow { display:flex; gap:6px; align-items:stretch; }
.aile-media-actrow select { flex:1; min-width:0; background:#0c1a20; color:#e6f3f8; border:1px solid rgba(118,216,246,.3); border-radius:7px; padding:3px 6px; font-size:11.5px; }
.aile-media-actrow .aile-btn { width:auto; flex:none; }
.aile-media-c-prev { grid-area:prev; }
.aile-media-c-prev .aile-shot-media, .aile-media-c-prev img, .aile-media-c-prev video { width:100%; max-height:84px; object-fit:cover; border-radius:8px; }
.aile-media-c-status { grid-area:status; }
.aile-media-dur { display:inline-flex; align-items:center; gap:4px; font-size:11.5px; color:#9fb6c4; margin-top:2px; }
.aile-media-dur input { width:48px; padding:3px 5px; border-radius:7px; border:1px solid rgba(118,216,246,.3); background:#0c1a20; color:#e6f3f8; }
/* 04 v2 右栏内联控件(模型路线 / 频率·清晰度 / 统一提示词 / 全部通过) */
.aile-media-route, .aile-media-fldrow, .aile-media-batch { display:flex; gap:8px; }
.aile-media-model, .aile-media-fld { display:flex; flex-direction:column; gap:3px; font-size:12px; color:#9fb6c4; flex:1; }
.aile-media-model select, .aile-media-fld select { background:#0c1a20; color:#e6f3f8; border:1px solid rgba(118,216,246,.3); border-radius:7px; padding:5px 7px; }
.aile-media-uprompt-bar { display:flex; align-items:center; justify-content:space-between; margin-top:8px; font-size:12px; color:#9fb6c4; }
.aile-media-uprompt { width:100%; min-height:54px; background:#0c1a20; color:#e6f3f8; border:1px solid rgba(118,216,246,.3); border-radius:8px; padding:7px 9px; font-size:12.5px; resize:vertical; box-sizing:border-box; }
.aile-media-allpass { width:100%; }
/* 05 各镜预览 + 排序 */
.aile-compose-list { display:flex; flex-direction:column; gap:8px; }
.aile-compose-head { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.aile-compose-row { display:flex; align-items:center; gap:10px; border:1px solid rgba(118,216,246,.18); border-radius:10px; padding:8px 10px; cursor:pointer; background:rgba(15,30,38,.35); }
.aile-compose-row.on { background:rgba(28,64,80,.65); border-color:rgba(118,216,246,.55); }
.aile-compose-no { width:22px; height:22px; flex:none; border-radius:50%; background:rgba(118,216,246,.18); color:#cdeefb; display:flex; align-items:center; justify-content:center; font-size:12px; }
.aile-compose-prev { width:96px; flex:none; }
.aile-compose-prev .aile-shot-media, .aile-compose-prev img, .aile-compose-prev video { width:100%; height:54px; object-fit:cover; border-radius:7px; }
.aile-compose-cap { flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.aile-compose-cap b { color:var(--teal,#76d8f6); font-size:12.5px; } .aile-compose-cap span { font-size:11.5px; color:#9fb6c4; }
.aile-compose-sortbtns { display:flex; gap:4px; flex:none; }

/* 批A: 04「选择参考」弹窗分区(角色表 CSS 随右栏角色表移除) */
.aile-refpick-body { display:flex; flex-direction:column; gap:12px; }
.aile-refpick-sec > h4 { margin:0 0 6px; font-size:12px; color:#9fdcf3; font-weight:600; }
.aile-media-speaker { display:inline-block; margin:0 6px; padding:0 6px; border-radius:8px; background:rgba(80,120,255,.16); color:#5478ff; font-style:normal; font-size:11px; }
.aile-shot-speaker { display:inline-block; margin-left:4px; padding:0 5px; border-radius:6px; background:rgba(80,120,255,.14); color:#5478ff; font-style:normal; font-size:11px; }
/* 01 选择文件: 整框拖放靶区 */
.aile-file-projzone { border-radius: 10px; transition: outline .1s; }
.aile-file-projzone.aile-file-dragover { outline: 2px dashed #6aa3ff; outline-offset: -4px; background: rgba(106,163,255,.06); }

/* Bug批(2026-07-03): ①选中态铁律 —— 项目选择弹窗已选项目行底色加深+描边(口径同 .aile-src-thumb.on) */
.aile-proj-card.on { background:rgba(126,211,242,.2); border-color:rgba(126,211,242,.75); box-shadow:0 0 0 2px rgba(126,211,242,.35); color:#eafaff; }
/* ②新建内容剪辑项目小弹窗(替代原生 prompt) */
.cm-modal-card.aile-clipnew-card { max-width:420px; width:min(420px, 92vw); }
.aile-clipnew-body { display:flex; flex-direction:column; gap:14px; }
.aile-clipnew-body label { display:flex; flex-direction:column; gap:6px; font-size:13px; color:#cdeefb; }
.aile-clipnew-body input { width:100%; box-sizing:border-box; padding:9px 10px; border-radius:8px; border:1px solid var(--glass-line, rgba(126,211,242,.3)); background:rgba(10,26,40,.55); color:#eafaff; }
.aile-clipnew-acts { display:flex; gap:8px; justify-content:flex-end; }

/* R2(2026-07-03) T2: 素材库 tab 筛选行(scope/分类/搜索) + 已选素材卡 .on 底色加深(铁律) */
.aile-ml-filterbar { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:8px; }
.aile-ml-filterbar select, .aile-ml-filterbar input { padding:7px 10px; border-radius:8px; border:1px solid var(--glass-line, rgba(126,211,242,.3)); background:rgba(10,26,40,.55); color:#eafaff; font-size:12px; outline:none; }
.aile-ml-filterbar input { flex:1; min-width:120px; }
.aile-file-card.on { background:rgba(80,160,255,.24); border-color:var(--teal, #76d8f6); color:#eafaff; }

/* 03改稿+P1两项(2026-07-03): 03 输出脚本区下方 改稿框(textarea+[按此修改]+[回退上一稿]) */
.aile-script-revise { display:flex; flex-direction:column; gap:8px; padding:10px; border-radius:10px; border:1px solid var(--glass-line, rgba(126,211,242,.3)); background:rgba(10,26,40,.45); }
.aile-script-revise-t { font-size:12px; color:#9fdcf3; font-weight:600; }
.aile-script-revise textarea { width:100%; box-sizing:border-box; resize:vertical; min-height:48px; padding:9px 10px; border-radius:8px; border:1px solid var(--glass-line, rgba(126,211,242,.3)); background:rgba(10,26,40,.55); color:#eafaff; font-size:12.5px; outline:none; }
.aile-script-revise textarea:focus { border-color:var(--teal, #76d8f6); }
.aile-script-revise-acts { display:flex; gap:8px; justify-content:flex-end; }

/* FE-MANUAL-SCRIPT-03: append beside the existing 03 script styles. */
.aile-manual-editor { display:flex; flex-direction:column; gap:12px; width:100%; min-width:0; box-sizing:border-box; border:1px solid var(--glass-line, rgba(126,211,242,.24)); border-radius:10px; padding:12px; background:rgba(8,22,34,.5); }
.aile-manual-head, .aile-manual-shots-head, .aile-manual-shot-head { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:6px 10px; min-width:0; }
.aile-manual-head strong, .aile-manual-shots-head strong { font-size:13px; color:var(--teal, #76d8f6); }
.aile-manual-head span, .aile-manual-shots-head span { font-size:11.5px; color:var(--muted, rgba(207,230,238,.7)); overflow-wrap:anywhere; }
.aile-manual-basics, .aile-manual-shots { display:flex; flex-direction:column; gap:10px; min-width:0; }
.aile-manual-field { display:flex; flex-direction:column; gap:4px; min-width:0; margin:0; font-size:11.5px; color:var(--muted, rgba(207,230,238,.74)); }
.aile-manual-field span { overflow-wrap:anywhere; }
.aile-manual-field input, .aile-manual-field textarea, .aile-manual-field select { box-sizing:border-box; width:100%; min-width:0; max-width:100%; background:rgba(6,14,26,.6); color:#dcf3fb; border:1px solid var(--glass-line, rgba(126,211,242,.3)); border-radius:7px; padding:7px 8px; font:inherit; font-size:12.5px; line-height:1.5; }
.aile-manual-field textarea { resize:vertical; min-height:64px; overflow-wrap:anywhere; }
.aile-manual-field input:focus-visible, .aile-manual-field textarea:focus-visible, .aile-manual-field select:focus-visible { outline:2px solid var(--teal, #76d8f6); outline-offset:2px; }
.aile-manual-shot { min-width:0; border:1px solid var(--glass-line, rgba(126,211,242,.2)); border-radius:8px; padding:10px; }
.aile-manual-shot-head { margin-bottom:8px; }
.aile-manual-shot-head strong { font-size:12px; color:var(--teal, #76d8f6); }
.aile-manual-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:8px 10px; min-width:0; }
.aile-manual-wide { grid-column:1 / -1; }
.aile-manual-empty { min-width:0; border:1px dashed var(--glass-line, rgba(126,211,242,.3)); border-radius:8px; padding:14px 10px; color:var(--muted, rgba(207,230,238,.7)); font-size:12px; line-height:1.6; overflow-wrap:anywhere; }
.aile-manual-actions { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:8px; min-width:0; }
.aile-manual-add, .aile-manual-finish, .aile-manual-remove { min-width:0; max-width:100%; white-space:normal; overflow-wrap:anywhere; }
.aile-manual-note { margin:0; font-size:11.5px; line-height:1.6; color:var(--muted, rgba(207,230,238,.66)); overflow-wrap:anywhere; }
@media (max-width:760px) {
  .aile-manual-editor { padding:10px; }
  .aile-manual-grid { grid-template-columns:minmax(0,1fr); }
  .aile-manual-actions .aile-manual-add, .aile-manual-actions .aile-manual-finish { flex:1 1 120px; }
}

/* ===== U27 视频工坊布局还原·04 屏(定稿 REN-D-SHOTS): 预览播放器 / 分镜行 / 模型选择组。
   本块覆盖上方「04 媒体节点重排」「04 v2」里的同名规则(后者未删, 以本块为准); 只用现役变量 ===== */
.mkt-edit-top[data-mkt-node="media"] .mkt-edit-right.mkt-pane { gap:12px; }
.mkt-edit-top[data-mkt-node="media"] .mkt-edit-center .mkt-preview-big { min-height:0; }
.mkt-pane-foot { display:flex; flex-direction:column; gap:12px; margin-top:0; padding-top:4px; }

/* 预览播放器(04/05 共用类; 栏头形态只在 04 输出) */
.aile-media-player { height:auto; gap:12px; }
.aile-media-player-head.mkt-pane-head { align-items:center; }
.mkt-edit-top[data-mkt-node="media"] .aile-media-player-bar { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.mkt-edit-top[data-mkt-node="media"] .aile-media-player-bar [data-aile-media-savelib] { font-size:12px; padding:5px 9px; opacity:.85; }
.aile-media-player-bar .mkt-todo .mkt-todo-tag { display:none; }
#marketing .aile-media-player-bar .mkt-todo { background:transparent !important; border:0 !important; box-shadow:none !important; padding-left:0; color:var(--teal, #76d8f6) !important; opacity:.7; }
.aile-media-player-cap { font-size:13.5px; line-height:1.5; color:var(--muted, rgba(207,230,238,.7)); margin-top:-6px; overflow-wrap:anywhere; }
.mkt-edit-top[data-mkt-node="media"] .aile-media-player-media { aspect-ratio:3 / 4; max-height:none; object-fit:cover; }
.mkt-edit-top[data-mkt-node="media"] .aile-media-player-empty { aspect-ratio:3 / 4; min-height:0; box-sizing:border-box; }
.aile-media-meta { display:grid; grid-template-columns:92px minmax(0,1fr); gap:12px; align-items:center; padding:10px; border:1px solid var(--glass-line, rgba(126,211,242,.24)); border-radius:10px; font-size:14.5px; line-height:1.9; overflow-wrap:anywhere; }
.aile-media-meta img, .aile-media-meta-ph { width:92px; height:100px; border-radius:8px; object-fit:cover; background:rgba(0,0,0,.28); display:block; }

/* 中栏头与底部参考来源条 */
.aile-media-head.mkt-pane-head { margin-bottom:4px; }
.aile-media-srcbar .aile-media-count { margin-left:auto; flex:none; font-size:12px; color:var(--muted, rgba(207,230,238,.7)); }
.aile-media-head.mkt-pane-head { flex-wrap:nowrap; }
.aile-media-head .mkt-pane-tools { flex-wrap:nowrap; }
.aile-media-head .mkt-pane-tools .aile-btn.s { white-space:nowrap; padding:8px 10px; }
.aile-media-srcbar .aile-btn.s, .aile-media-head .aile-btn.s { font-size:13.5px; padding:8px 14px; }
.aile-media-srcbar { display:flex; align-items:center; gap:10px; flex-wrap:wrap; font-size:14.5px; color:var(--muted, rgba(207,230,238,.7)); padding-top:6px; }

/* 分镜行: 镜号｜缩略｜场景/配音/参考条/时长｜生成方式+状态+行内动作 */
.aile-media-list { gap:8px; }
.aile-media-row { grid-template-columns:30px 88px minmax(0,1fr) minmax(170px,198px); grid-template-areas:"no prev info ctl"; gap:8px 12px; align-items:start; padding:10px 12px; min-height:129px; box-sizing:border-box; border-radius:10px; }
.aile-media-no { grid-area:no; width:30px; height:28px; display:inline-flex; align-items:center; justify-content:center; border-radius:6px; font-size:16px; font-weight:700; background:rgba(10,26,40,.6); }
.aile-media-row.on .aile-media-no { background:rgba(80,160,255,.5); }
.aile-media-c-prev { grid-area:prev; }
.aile-media-c-prev .aile-shot-media, .aile-media-c-prev img, .aile-media-c-prev video { width:88px; height:104px; max-width:none; max-height:none; object-fit:cover; border-radius:8px; }
.aile-media-c-prev span.aile-shot-media { display:flex; align-items:center; justify-content:center; text-align:center; background:rgba(0,0,0,.28); }
.aile-media-c-info { grid-area:info; gap:3px; }
.aile-media-c-info span, .aile-media-c-info em { font-size:15px; line-height:1.42; overflow-wrap:anywhere; font-style:normal; }
.aile-media-k { font-style:normal; margin-right:4px; opacity:.72; }
.aile-media-inforow { display:flex; align-items:center; gap:6px; min-width:0; margin-top:3px; }
.aile-media-inforow .aile-media-refs { flex:0 1 auto; min-width:0; }
.aile-media-inforow .aile-media-dur { flex:none; white-space:nowrap; font-size:11.5px; }
.aile-media-inforow .aile-media-dur input { width:40px; padding:3px 4px; }
.aile-media-c-info .aile-media-refs { margin-top:0; gap:6px; flex-wrap:nowrap; min-width:0; }
.aile-media-refs .aile-ref-chip { flex:0 1 auto; min-width:0; }
.aile-ref-chip .mkt-ico { margin-right:.3em; }
.aile-media-refs .aile-ref-add { flex:none; white-space:nowrap; }
/* 时长只对「参考生成视频」有意义: 其余生成方式下收起(切到生成视频即出现) */
.aile-media-row:not(.act-gen_video) .aile-media-dur { display:none; }
.aile-ref-chip { position:relative; display:inline-flex; align-items:center; gap:2px; max-width:100%; min-width:0; padding:4px 20px 4px 7px; border:1px solid var(--glass-line, rgba(126,211,242,.3)); border-radius:7px; font-size:12.5px; background:rgba(10,26,40,.5); box-sizing:border-box; }
.aile-ref-chip img { display:none; }
.aile-ref-chip-t { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.aile-ref-chip .aile-ref-del { top:50%; right:4px; transform:translateY(-50%); width:18px; height:18px; line-height:16px; border-radius:50%; font-size:12px; }
/* ＋选参考: 行内只显「＋」(文字仍在按钮里供读屏), 给参考名让出宽度 */
.aile-media-refs .aile-ref-add { width:26px; height:26px; padding:0; border-radius:7px; font-size:0; }
.aile-media-refs .aile-ref-add::before { content:"＋"; font-size:14px; line-height:24px; }
/* 已采用素材的镜: 状态在左, 「更换素材」＋再次采用小钮在右, 同一行 */
.aile-media-row.has-swap .aile-media-rowacts { flex-wrap:nowrap; }
.aile-media-c-info .aile-media-dur { margin-top:0; font-size:12px; }
.aile-media-c-ctl { grid-area:ctl; display:flex; flex-direction:row; flex-wrap:wrap; gap:6px 8px; align-items:center; min-width:0; }
.aile-media-c-ctl .aile-media-actrow { flex:1 1 100%; display:block; }
.aile-media-actrow select, .aile-media-actrow select.aile-btn { display:block; flex:none; width:100%; min-width:0; max-width:100%; box-sizing:border-box; min-height:40px; padding:8px 10px; font-size:14.5px; }
.aile-media-c-ctl .aile-media-c-status { grid-area:auto; flex:1 1 5em; min-width:5em; }
.aile-media-c-ctl .aile-media-rowacts { flex:0 1 auto; display:flex; gap:6px; flex-wrap:wrap; justify-content:flex-end; margin-left:auto; }
.aile-media-c-ctl .aile-media-rowacts .aile-btn { width:auto; }
.aile-media-c-status .aile-media-st { overflow-wrap:anywhere; font-size:13.5px; line-height:1.5; }
/* 长状态文字(失败原因/生成中说明): 未选中的行收成两行, 选中该行时展开全文 */
.aile-media-row:not(.on) .aile-media-c-status .aile-media-st { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; }
/* 已采用素材的镜: 再次采用收成图标小钮 */
.aile-media-c-ctl .aile-media-actrow.has-mini { display:flex; flex-direction:row; align-items:stretch; gap:6px; }
.aile-media-actrow.has-mini select, .aile-media-actrow.has-mini select.aile-btn { flex:1 1 0; width:auto; }
.aile-media-actrow .aile-media-gobtn.is-mini { flex:none; width:40px; padding:0; }
.aile-media-gobtn.is-mini .mkt-ico { margin-right:0; }
/* 参考条上的「×」: 悬停或聚焦该参考时才显 */
.aile-media-row .aile-ref-chip .aile-ref-del { opacity:0; }
.aile-media-row .aile-ref-chip:hover .aile-ref-del, .aile-media-row .aile-ref-chip:focus-within .aile-ref-del { opacity:1; }
.aile-media-rowacts .aile-btn.s { font-size:13px; padding:7px 8px; white-space:nowrap; }
.aile-media-row.has-media .aile-media-c-status .aile-media-st { white-space:nowrap; }
/* 尚无成品的镜(未生成/生成中/失败/待核): 状态独占一行, 行内动作整宽 */
.aile-media-row:not(.has-media) .aile-media-c-ctl .aile-media-c-status,
.aile-media-row:not(.has-media) .aile-media-c-ctl .aile-media-rowacts { flex:1 1 100%; }
.aile-media-row:not(.has-media) .aile-media-rowacts .aile-btn { flex:1 1 auto; }
.aile-media-row:not(.has-media) .aile-media-gobtn { min-height:40px; font-size:15px; }
/* 状态字颜色: 现役「#marketing :is(.ops-node-panel *,…){color:… !important}」把面板内文字压成同一墨色, 上方 .aile-media-st.* 的状态色不显; 此处按原色值在工坊宿主内恢复 */
#marketing .aile-flow .aile-media-st.gen { color:#ffd27a !important; }
#marketing .aile-flow .aile-media-st.done { color:#2ee6b6 !important; }
#marketing .aile-flow .aile-media-st.fail, #marketing .aile-flow .aile-shot-media.fail { color:#ff9a9a !important; }
#marketing .aile-flow .aile-media-st.idle, #marketing .aile-flow .aile-media-st.queued { color:var(--muted, rgba(207,230,238,.7)) !important; }

/* 模型选择组: 标签+整宽下拉, 竖排。下拉限宽是右栏被长模型名撑宽的根治点 */
.aile-media-route { flex-direction:column; gap:12px; }
.aile-media-model, .aile-media-fld { min-width:0; gap:8px; font-size:15px; }
.aile-media-model select, .aile-media-fld select { width:100%; min-width:0; max-width:100%; box-sizing:border-box; min-height:42px; padding:9px 12px; font-size:15px; text-overflow:ellipsis; }
.aile-media-fldrow { gap:12px; }
.aile-media-fldrow .aile-media-fld { flex:1 1 0; }
.aile-media-uprompt-bar { margin-top:0; font-size:15px; }
.aile-media-uprompt { min-height:72px; font-size:14.5px; }
.aile-media-upgen { width:100%; min-height:42px; font-size:15px; }
#marketing .aile-flow .aile-media-upgen { background:rgba(10,98,255,.14) !important; border-color:#2a85ff !important; color:#9cc6ff !important; box-shadow:none !important; }
/* 批处理两钮并排各占一半(只有一键生图时也只占左半, 不通栏) */
.aile-media-batch { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:12px; }
.aile-media-batch .aile-btn { min-width:0; min-height:52px; font-size:16px; }
.aile-media-allpass { min-height:64px; font-size:16.5px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; }
.aile-media-allpass .aile-media-ready { font-size:12.5px; font-weight:400; opacity:.85; }
.mkt-pane-foot .aile-api-status { font-size:11.5px; opacity:.8; }
/* 进度与确认(现役两行): 折叠在过门钮下方, 默认收起 */
.aile-media-more { font-size:12px; color:var(--muted, rgba(207,230,238,.7)); }
.aile-media-more > summary { cursor:pointer; list-style:none; text-align:center; opacity:.75; }
.aile-media-more > summary::-webkit-details-marker { display:none; }
.aile-media-more > summary::after { content:" ▾"; }
.aile-media-more[open] > summary::after { content:" ▴"; }

/* 手机「对当前镜操作」面板与右栏里的「生成当前镜头」: 桌面收起 */
.aile-media-cur, .aile-media-gencur { display:none; }

/* ===== U27 桌面 05(定稿 REN-D-COMPOSE): 剪辑合成三栏 ===== */
.mkt-edit-top[data-mkt-node="compose"] { grid-template-columns:minmax(240px,1.06fr) minmax(0,1.6fr) minmax(280px,1.19fr); }
@media (max-width:1100px){ .mkt-edit-top[data-mkt-node="compose"] { grid-template-columns:1fr; } }
/* 左栏: 片段预览不出「图片｜视频」切换、放大与来源卡; 当前片段卡; 三行事实 */
.mkt-edit-top[data-mkt-node="compose"] .mkt-edit-left { display:flex; flex-direction:column; gap:12px; }
.mkt-edit-top[data-mkt-node="compose"] .aile-media-player-head .mkt-seg, .mkt-edit-top[data-mkt-node="compose"] .aile-media-player-bar:not(.aile-compose-deliver), .mkt-edit-top[data-mkt-node="compose"] .aile-media-meta { display:none; }
.aile-compose-cur { display:grid; grid-template-columns:100px minmax(0,1fr); gap:14px; align-items:center; padding:12px; border:1px solid var(--mkt-card-line, rgba(126,211,242,.24)); border-radius:10px; background:var(--mkt-card-bg, rgba(15,30,38,.35)); }
.aile-compose-cur-th .aile-shot-media, .aile-compose-cur-th img, .aile-compose-cur-th video { width:100px; height:72px; object-fit:cover; border-radius:8px; display:flex; align-items:center; justify-content:center; font-size:12px; }
.aile-compose-cur-t { display:flex; flex-direction:column; gap:4px; min-width:0; font-size:15px; }
.aile-compose-cur-t small { font-size:13.5px; opacity:.85; }
.aile-compose-cur-t b { font-weight:500; overflow-wrap:anywhere; }
.aile-compose-facts { border:1px solid var(--mkt-card-line, rgba(126,211,242,.24)); border-radius:10px; background:var(--mkt-card-bg, rgba(15,30,38,.35)); padding:4px 14px; }
.aile-compose-facts > div { display:flex; align-items:center; gap:14px; min-height:50px; font-size:15px; border-bottom:1px solid var(--mkt-card-line, rgba(126,211,242,.18)); }
.aile-compose-facts > div:last-child { border-bottom:0; }
.aile-compose-facts .mkt-ico { width:1.4em; height:1.4em; margin:0; opacity:.9; }
/* 中栏: 片段行 */
.mkt-edit-top[data-mkt-node="compose"] .aile-compose-list { gap:10px; }
.aile-compose-sorthint { font-size:13px; opacity:.8; margin-right:4px; }
.mkt-edit-top[data-mkt-node="compose"] .aile-compose-row { display:grid; grid-template-columns:130px minmax(0,1fr) auto; gap:14px; align-items:center; padding:10px 12px; min-height:92px; box-sizing:border-box; border-radius:10px; }
.mkt-edit-top[data-mkt-node="compose"] .aile-compose-no { display:none; }
.mkt-edit-top[data-mkt-node="compose"] .aile-compose-prev { width:130px; }
.mkt-edit-top[data-mkt-node="compose"] .aile-compose-prev .aile-shot-media, .mkt-edit-top[data-mkt-node="compose"] .aile-compose-prev img, .mkt-edit-top[data-mkt-node="compose"] .aile-compose-prev video { width:130px; height:72px; }
.mkt-edit-top[data-mkt-node="compose"] .aile-compose-cap { display:grid; grid-template-columns:auto minmax(0,1fr); gap:6px 10px; align-items:baseline; }
.mkt-edit-top[data-mkt-node="compose"] .aile-compose-cap b { font-size:16px; font-weight:500; color:inherit; white-space:nowrap; }
.mkt-edit-top[data-mkt-node="compose"] .aile-compose-cap span { font-size:16px; color:inherit; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mkt-edit-top[data-mkt-node="compose"] .aile-compose-cap small { grid-column:1 / -1; font-size:14px; opacity:.85; display:flex; align-items:center; gap:12px; min-height:22px; }
.aile-compose-tag { font-style:normal; padding:2px 10px; border-radius:11px; font-size:12.5px; background:rgba(10,98,255,.3); border:1px solid #2a85ff; color:#dcecff; }
.mkt-edit-top[data-mkt-node="compose"] .aile-compose-sortbtns { gap:8px; align-items:center; }
.mkt-edit-top[data-mkt-node="compose"] .aile-compose-sortbtns .aile-btn { min-width:38px; min-height:38px; padding:6px 10px; font-size:15px; }
.aile-compose-sum { display:flex; align-items:center; gap:12px; min-height:44px; padding:0 14px; border:1px solid var(--mkt-card-line, rgba(126,211,242,.24)); border-radius:10px; background:var(--mkt-card-bg, rgba(15,30,38,.35)); font-size:15px; }
.aile-compose-sum b { font-weight:500; } .aile-compose-sum span { margin-left:auto; opacity:.85; font-size:14px; }
.aile-compose-sum .mkt-ico { margin:0; }
/* 右栏: 一行一项 */
.aile-compose-set { display:flex; flex-direction:column; }
.mkt-edit-top[data-mkt-node="compose"] .aile-compose-setrow { display:grid; grid-template-columns:26px 92px minmax(0,1fr); gap:10px; align-items:center; min-height:50px; font-size:15.5px; border-bottom:1px solid var(--mkt-card-line, rgba(126,211,242,.18)); flex:none; }
.aile-compose-setrow > .mkt-ico { width:1.3em; height:1.3em; margin:0; opacity:.9; }
.aile-compose-setrow select, .aile-compose-setrow input { min-height:38px; box-sizing:border-box; font-size:14.5px; min-width:0; width:100%; }
.aile-compose-setrow .aile-tts-voicebar { display:flex; gap:8px; min-width:0; }
.aile-compose-setrow .aile-tts-voicebar .aile-btn { flex:none; min-height:38px; }
.aile-compose-v { font-size:14px; opacity:.6; }
.mkt-todo-row { opacity:.75; cursor:not-allowed; }
.mkt-edit-top[data-mkt-node="compose"] .aile-vo-hint, .mkt-edit-top[data-mkt-node="compose"] .aile-voice-hint { font-size:12.5px; opacity:.8; padding:2px 0 6px 36px; }
.aile-compose-status { display:flex; align-items:center; margin:14px 0 4px; font-size:15px; }
.aile-compose-acts { display:flex; flex-direction:column; gap:12px; margin-top:8px; }
.aile-compose-acts .aile-btn { width:100%; min-height:52px; font-size:16.5px; font-weight:600; }
.aile-compose-next { display:block; text-align:center; margin-top:10px; font-size:14px; opacity:.8; }

/* ===== U27 桌面 结果入库(定稿 REN-D-RESULT): 成功态三栏 ===== */
.mkt-edit-top[data-mkt-node="library"] { grid-template-columns:minmax(260px,1.33fr) minmax(0,1.5fr) minmax(280px,1fr); }
@media (max-width:1100px){ .mkt-edit-top[data-mkt-node="library"] { grid-template-columns:1fr; } }
.mkt-edit-top[data-mkt-node="library"] .mkt-edit-left { display:flex; flex-direction:column; gap:12px; }
.mkt-edit-top[data-mkt-node="library"] .aile-media-player-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.mkt-edit-top[data-mkt-node="library"] .aile-media-player-head b { font-size:21px; font-weight:600; }
.mkt-edit-top[data-mkt-node="library"] .aile-media-player-head span { font-size:13px; opacity:.8; }
.mkt-edit-top[data-mkt-node="library"] .aile-compose-deliver { display:none; } /* 下载与复制在右栏「交付操作」里 */
.aile-lib-file, .aile-lib-ok { display:flex; align-items:center; gap:14px; padding:12px 14px; border-radius:10px; border:1px solid var(--mkt-card-line, rgba(126,211,242,.24)); background:var(--mkt-card-bg, rgba(15,30,38,.35)); font-size:15.5px; }
.aile-lib-file b { font-weight:500; overflow-wrap:anywhere; } .aile-lib-file small { display:block; margin-top:4px; font-size:13.5px; opacity:.85; }
.aile-lib-file .mkt-ico, .aile-lib-ok .mkt-ico { width:1.5em; height:1.5em; margin:0; flex:none; }
#marketing .aile-flow .aile-lib-ok { border-color:#2ee6b6; background:rgba(46,230,182,.1); color:#8ff0d2 !important; }
#marketing .aile-flow .aile-lib-ok .mkt-ico { color:inherit !important; }
/* 中栏 */
.aile-lib-center { display:flex; flex-direction:column; gap:10px; }
.aile-lib-cur { display:grid; grid-template-columns:64px minmax(0,1fr) auto; gap:10px 16px; align-items:center; padding:16px; border-radius:10px; border:1px solid var(--mkt-card-line, rgba(126,211,242,.24)); background:var(--mkt-card-bg, rgba(15,30,38,.35)); }
.aile-lib-cur-ico { width:64px; height:60px; border-radius:10px; display:flex; align-items:center; justify-content:center; background:rgba(10,98,255,.14); border:1px solid var(--mkt-card-line, rgba(126,211,242,.24)); }
.aile-lib-cur-ico .mkt-ico { width:30px; height:30px; margin:0; }
.aile-lib-cur-t b { font-size:18px; font-weight:600; margin-right:12px; } .aile-lib-cur-t small { display:block; margin-top:8px; font-size:14.5px; opacity:.9; overflow-wrap:anywhere; }
.aile-lib-badge { display:inline-block; padding:3px 12px; border-radius:8px; font-size:14.5px; background:rgba(46,230,182,.16); border:1px solid #2ee6b6; }
#marketing .aile-flow .aile-lib-badge { color:#8ff0d2 !important; }
.aile-lib-badge.warn { background:rgba(255,210,122,.14); border-color:#ffd27a; }
#marketing .aile-flow .aile-lib-badge.warn { color:#ffd27a !important; }
.aile-lib-cur .aile-lib-pub { min-height:46px; padding:8px 22px; font-size:16px; }
.aile-lib-saved { grid-column:1 / -1; display:flex; align-items:center; padding-top:12px; border-top:1px solid var(--mkt-card-line, rgba(126,211,242,.18)); font-size:16px; }
.aile-lib-acc { display:grid; grid-template-columns:44px minmax(0,1fr) auto; gap:14px; align-items:center; padding:12px 16px; border-radius:10px; border:1px solid var(--mkt-card-line, rgba(126,211,242,.24)); background:var(--mkt-card-bg, rgba(15,30,38,.35)); }
.aile-lib-acc > .mkt-ico { width:28px; height:28px; margin:0; } .aile-lib-acc b { font-size:16px; font-weight:600; } .aile-lib-acc small { display:block; margin-top:3px; font-size:13.5px; opacity:.85; }
.aile-lib-box { padding:14px 16px; border-radius:10px; border:1px solid var(--mkt-card-line, rgba(126,211,242,.24)); background:var(--mkt-card-bg, rgba(15,30,38,.35)); }
.aile-lib-list { display:flex; flex-direction:column; gap:8px; }
.aile-lib-row { display:grid; grid-template-columns:28px minmax(0,1fr) auto auto; gap:6px 12px; align-items:center; padding:12px 14px; border-radius:8px; border:1px solid var(--mkt-card-line, rgba(126,211,242,.24)); font-size:15px; }
.aile-lib-row.on { border-color:#2a85ff; box-shadow:0 0 0 1px rgba(42,133,255,.4); }
.aile-lib-row > .mkt-ico { width:1.5em; height:1.5em; margin:0; } .aile-lib-row b { font-weight:500; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.aile-lib-row span { font-size:13px; opacity:.8; white-space:nowrap; } .aile-lib-row em { display:none; }
.aile-lib-cur-mark { font-style:normal; font-size:18px; color:#4aa3ff; padding:0 6px; }
.aile-lib-badge.bad { background:rgba(255,154,154,.14); border-color:#ff9a9a; }
#marketing .aile-flow .aile-lib-badge.bad { color:#ff9a9a !important; }
.aile-lib-none { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; min-height:150px; border:1px solid var(--mkt-card-line, rgba(126,211,242,.24)); border-radius:8px; font-size:16px; }
.aile-lib-none .mkt-ico { width:40px; height:40px; margin:0; opacity:.85; }
/* 待补／待核: 左栏是现役那张待补卡(令 -1354), 这里只调它在结果页里的样子 */
.mkt-edit-top[data-mkt-node="library"] .aile-compose-pending-r1354 { display:flex; flex-direction:column; gap:12px; }
.mkt-edit-top[data-mkt-node="library"] .aile-compose-pending-r1354 .aile-media-player-empty { min-height:260px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; font-size:22px; border:1px solid var(--mkt-card-line, rgba(126,211,242,.24)); border-radius:10px; background:var(--mkt-card-bg, rgba(15,30,38,.35)); text-align:center; padding:16px; }
.mkt-edit-top[data-mkt-node="library"] .aile-compose-pending-r1354 .aile-media-player-empty small { font-size:15px; opacity:.85; }
.mkt-edit-top[data-mkt-node="library"] .aile-compose-pending-sub, .mkt-edit-top[data-mkt-node="library"] .aile-compose-pending-r1354 .aile-stale-note { font-size:15px; opacity:1; margin:0; padding:12px 14px; border-radius:10px; border:1px solid var(--mkt-card-line, rgba(126,211,242,.24)); background:var(--mkt-card-bg, rgba(15,30,38,.35)); line-height:1.7; }
#marketing .aile-flow .mkt-edit-top[data-mkt-node="library"] .aile-compose-pending-r1354 .aile-stale-note { border-color:#ffd27a; background:rgba(255,210,122,.1); color:#ffd27a !important; }
/* 右栏 */
.mkt-edit-top[data-mkt-node="library"] .aile-lib-real { display:flex; flex-direction:column; gap:14px; }
.aile-lib-state { display:flex; align-items:center; font-size:17px; margin:4px 0; }
.aile-lib-acts { display:flex; flex-direction:column; gap:14px; }
.aile-lib-acts .aile-btn { width:100%; min-height:54px; font-size:17px; }
.aile-lib-dl::before, .aile-lib-open::before, .aile-lib-copy::before { content:""; display:inline-block; width:1.15em; height:1.15em; margin-right:.5em; vertical-align:-0.2em; background-color:currentColor; -webkit-mask:center / contain no-repeat; mask:center / contain no-repeat; }
.aile-lib-dl::before { -webkit-mask-image:url("assets/ui/icons/lucide-upload.svg"); mask-image:url("assets/ui/icons/lucide-upload.svg"); transform:rotate(180deg); }
.aile-lib-open::before { -webkit-mask-image:url("assets/ui/icons/lucide-folder.svg"); mask-image:url("assets/ui/icons/lucide-folder.svg"); }
.aile-lib-copy::before { -webkit-mask-image:url("assets/ui/icons/lucide-link.svg"); mask-image:url("assets/ui/icons/lucide-link.svg"); }
.mkt-edit-top[data-mkt-node="library"] .aile-lib-planned { font-size:13.5px; line-height:1.7; opacity:.9; padding-bottom:14px; border-bottom:1px solid var(--mkt-card-line, rgba(126,211,242,.18)); }
.aile-lib-planned .mkt-ico { vertical-align:-0.25em; }
.aile-lib-back { align-self:center; font:inherit; font-size:15.5px; text-decoration:underline; padding:8px 12px; min-height:36px; }
#marketing .aile-flow .aile-lib-back { background:transparent !important; border:0 !important; box-shadow:none !important; }

/* ===== U27 桌面 01(定稿 REN-D-SOURCE): 素材准备三栏 ===== */
.mkt-edit-top[data-mkt-node="source"] { grid-template-columns:minmax(240px,1fr) minmax(0,1.54fr) minmax(280px,1.02fr); }
@media (max-width:1100px){ .mkt-edit-top[data-mkt-node="source"] { grid-template-columns:1fr; } }
/* 左栏 */
.mkt-edit-top[data-mkt-node="source"] .mkt-edit-left { display:flex; flex-direction:column; gap:12px; }
.mkt-edit-top[data-mkt-node="source"] .aile-src-preview-big { margin:0; display:flex; flex-direction:column; gap:10px; min-height:0; }
.mkt-edit-top[data-mkt-node="source"] .aile-src-preview-big img, .mkt-edit-top[data-mkt-node="source"] .aile-src-preview-big video { width:100%; max-height:450px; object-fit:cover; border-radius:10px; display:block; }
.mkt-edit-top[data-mkt-node="source"] .aile-src-preview-big figcaption { display:flex; align-items:center; font-size:15.5px; text-align:left; }
.aile-src-preview-big figcaption em { font-style:normal; opacity:.85; }
.aile-src-cur { display:grid; grid-template-columns:96px minmax(0,1fr); gap:14px; align-items:center; padding:12px; border-radius:10px; border:1px solid var(--mkt-card-line, rgba(126,211,242,.24)); background:var(--mkt-card-bg, rgba(15,30,38,.35)); }
.aile-src-cur img, .aile-src-cur-ph { width:96px; height:92px; object-fit:cover; border-radius:8px; display:block; background:rgba(0,0,0,.28); }
.aile-src-cur b { font-size:15.5px; font-weight:500; } .aile-src-cur small { display:block; margin-top:8px; font-size:13.5px; opacity:.85; overflow-wrap:anywhere; }
/* 中栏 */
.mkt-edit-top[data-mkt-node="source"] .aile-src-center { display:flex; flex-direction:column; gap:14px; }
.mkt-edit-top[data-mkt-node="source"] .aile-srcbar { display:flex; align-items:center; justify-content:space-between; gap:12px; padding-bottom:12px; border-bottom:1px solid var(--mkt-card-line, rgba(126,211,242,.18)); }
.mkt-edit-top[data-mkt-node="source"] .aile-srcbar-pick { min-height:42px; font-size:15px; }
.mkt-edit-top[data-mkt-node="source"] .aile-srcbar .aile-btn { min-height:42px; padding:8px 14px; font-size:15px; }
.mkt-edit-top[data-mkt-node="source"] .aile-srcfiles-bar { display:flex; align-items:center; justify-content:space-between; gap:12px; width:100%; min-height:48px; padding:8px 16px; font-size:16px; border-radius:8px; cursor:pointer; }
#marketing .aile-flow .mkt-edit-top[data-mkt-node="source"] .aile-srcfiles-bar { background:linear-gradient(180deg,#0a73ff,#0055fe) !important; border-color:#2a85ff !important; color:#fff !important; box-shadow:none !important; }
#marketing .aile-flow .mkt-edit-top[data-mkt-node="source"] .aile-srcfiles-bar em { color:#fff !important; font-style:normal; font-size:14.5px; opacity:.95; }
.mkt-edit-top[data-mkt-node="source"] .aile-src-thumbs { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:12px; }
.mkt-edit-top[data-mkt-node="source"] .aile-src-thumb { display:flex; flex-direction:column; align-items:stretch; gap:8px; width:auto; height:auto; padding:8px; border-radius:10px; text-align:left; cursor:pointer; overflow:hidden; }
#marketing .aile-flow .mkt-edit-top[data-mkt-node="source"] .aile-src-thumb { background:var(--mkt-card-bg, rgba(15,30,38,.35)) !important; border:1px solid var(--mkt-card-line, rgba(126,211,242,.24)) !important; box-shadow:none !important; }
#marketing .aile-flow .mkt-edit-top[data-mkt-node="source"] .aile-src-thumb.on { border-color:#2a85ff !important; box-shadow:0 0 0 1px rgba(42,133,255,.55) !important; }
.mkt-edit-top[data-mkt-node="source"] .aile-src-thumb img, .mkt-edit-top[data-mkt-node="source"] .aile-src-thumb video, .mkt-edit-top[data-mkt-node="source"] .aile-src-thumb .ph { width:100%; height:146px; object-fit:cover; border-radius:8px; display:flex; align-items:center; justify-content:center; }
.aile-src-thumb-t { display:block; padding:0 4px 4px; min-width:0; }
.aile-src-thumb-t b { display:block; font-size:15px; font-weight:500; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.aile-src-thumb-t small { display:block; margin-top:3px; font-size:13px; opacity:.8; }
.aile-src-hint { display:flex; align-items:center; justify-content:center; font-size:14.5px; opacity:.85; padding-top:6px; }
/* 右栏 */
.mkt-edit-top[data-mkt-node="source"] .aile-src-summary { display:flex; flex-direction:column; gap:8px; }
.mkt-edit-top[data-mkt-node="source"] .aile-src-sum-row { display:grid; grid-template-columns:28px auto minmax(0,1fr); gap:10px; align-items:center; min-height:60px; padding:8px 16px; box-sizing:border-box; border-radius:10px; border:1px solid var(--mkt-card-line, rgba(126,211,242,.24)); background:var(--mkt-card-bg, rgba(15,30,38,.35)); font-size:15.5px; }
.mkt-edit-top[data-mkt-node="source"] .aile-src-sum-row > .mkt-ico { width:1.4em; height:1.4em; margin:0; }
.mkt-edit-top[data-mkt-node="source"] .aile-src-sum-row label { font-size:15.5px; white-space:nowrap; color:inherit; }
/* 标签后的分隔斜杠: 全站有把 label 排成竖列的通用规则, 伪元素会掉到下一行; 这里把标签钉成行内一行 */
.mkt-edit-top[data-mkt-node="source"] .aile-src-sum-row label { display:inline-flex; flex-direction:row; align-items:center; gap:.45em; }
.mkt-edit-top[data-mkt-node="source"] .aile-src-sum-row label::after { content:"/"; opacity:.7; }
.mkt-edit-top[data-mkt-node="source"] .aile-src-sum-row b { font-weight:500; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.aile-src-sum-role .aile-btn { grid-column:1 / -1; justify-self:center; min-height:42px; padding:8px 26px; font-size:15px; margin-bottom:6px; }
.aile-src-ready { display:flex; align-items:center; justify-content:center; font-size:17px; margin:26px 0 18px; }
.mkt-edit-top[data-mkt-node="source"] .aile-src-summary .aile-btn.primary { width:100%; min-height:60px; font-size:18px; font-weight:600; }
.aile-src-next { display:block; text-align:center; margin-top:10px; font-size:14.5px; opacity:.85; }

/* ===== U27 桌面 04 样式小件(复核官对图 65427bd6 的「小处」) ===== */
/* 已完成状态: 实心圆、对勾镂空(定稿是实心绿对勾圆)。用官方 check 图标从圆里挖掉 */
.aile-media-st.done > .mkt-ico-check { border-radius:50%; -webkit-mask-image:url("assets/ui/icons/lucide-check.svg"), linear-gradient(#000, #000); mask-image:url("assets/ui/icons/lucide-check.svg"), linear-gradient(#000, #000); -webkit-mask-size:72% 72%, 100% 100%; mask-size:72% 72%, 100% 100%; -webkit-mask-position:center, center; mask-position:center, center; -webkit-mask-repeat:no-repeat, no-repeat; mask-repeat:no-repeat, no-repeat; -webkit-mask-composite:xor; mask-composite:exclude; }
/* 视频镜的缩略图上叠一个播放小标(只是标识, 不可点; 播放在左栏预览) */
.aile-media-row.has-media .aile-media-c-prev:has(video) { position:relative; }
.aile-media-row.has-media .aile-media-c-prev:has(video)::after { content:""; position:absolute; left:50%; top:50%; width:34px; height:34px; margin:-17px 0 0 -17px; border-radius:50%; background:rgba(0,0,0,.55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M9 6.5v11l9-5.5z'/%3E%3C/svg%3E") center / 60% no-repeat; border:1px solid rgba(255,255,255,.7); pointer-events:none; }
/* 过门钮右侧的信息小圆圈; 桌面收起下方的「进度与确认」折叠与来源条里的计数(内容都在悬浮提示里) */
.aile-media-allpass { position:relative; }
.aile-media-allpass-i { position:absolute; right:14px; top:50%; margin:-.575em 0 0 0; opacity:.75; }
@media (min-width:761px){
  .mkt-edit-top[data-mkt-node="media"] .aile-media-more { display:none; }
  .aile-media-srcbar .aile-media-count { display:none; }
}
/* 字重: 批处理钮与过门钮由 700 收到 600 */
.aile-media-batch .aile-btn, .aile-media-allpass, .aile-media-allpass .aile-media-allpass-t { font-weight:600; }
/* 主钮里的字与图标包在子元素里时, 现役「#marketing :is(.ops-node-panel *,…){color:… !important}」会把它们压回墨色(日间表现为绿底深字); 让它们跟随主钮自身的字色 */
#marketing .aile-flow .aile-btn.primary > span, #marketing .aile-flow .aile-btn.primary > small, #marketing .aile-flow .aile-btn.primary > i, #marketing .aile-flow .aile-btn.primary > span > i { color:inherit !important; }

/* ===== U27 桌面 03(定稿 REN-D-VIDEO): 文案脚本三栏 ===== */
.mkt-edit-top[data-mkt-node="script"] { grid-template-columns:minmax(0,1.31fr) minmax(0,1.91fr) minmax(0,1fr); }
/* 左栏: 栏头、输入框、参考素材 */
.mkt-edit-top[data-mkt-node="script"] .aile-script-custom-wrap { gap:12px; }
.aile-script-custom-bar.mkt-pane-head strong small { font-size:14px; font-weight:500; opacity:.85; }
.mkt-edit-top[data-mkt-node="script"] .aile-script-custom { min-height:260px; font-size:15px; line-height:1.7; padding:14px; }
.aile-script-refmats { display:flex; flex-direction:column; gap:10px; }
.aile-script-refmats-h { display:flex; align-items:center; justify-content:space-between; gap:8px; font-size:15px; }
.aile-script-refmats-g { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:12px; }
.aile-script-refmat { display:block; aspect-ratio:178 / 160; border-radius:10px; overflow:hidden; background:rgba(0,0,0,.28); border:1px solid var(--glass-line, rgba(126,211,242,.24)); }
.aile-script-refmat img { width:100%; height:100%; object-fit:cover; display:block; }
.aile-script-refmats-n { font-size:14px; color:var(--muted, rgba(207,230,238,.75)); }
/* 中栏: 栏头、稿面、分镜表、局部改稿 */
.mkt-edit-top[data-mkt-node="script"] .aile-script-out { gap:12px; }
.mkt-edit-top[data-mkt-node="script"] .aile-script-draft { max-height:none; overflow:visible; gap:8px; }
.aile-script-fldt { font-size:15px; margin-top:2px; }
.aile-script-box { padding:10px 14px; border:1px solid var(--glass-line, rgba(126,211,242,.24)); border-radius:8px; background:rgba(8,22,34,.45); font-size:15px; line-height:1.7; overflow-wrap:anywhere; }
.aile-script-box .aile-script-title { font-weight:600; }
.aile-script-box .aile-script-hook { font-size:13.5px; opacity:.85; }
/* 现役对面板内 table 有全局最小宽 680px, 分镜表在中栏里按栏宽排 */
#marketing .aile-flow table.aile-script-shots { min-width:0 !important; }
table.aile-script-shots { width:100%; border-collapse:collapse; table-layout:fixed; font-size:13.5px; border:1px solid var(--glass-line, rgba(126,211,242,.24)); border-radius:8px; }
table.aile-script-shots th, table.aile-script-shots td { padding:8px 10px; text-align:left; vertical-align:middle; border-bottom:1px solid var(--glass-line, rgba(126,211,242,.16)); border-right:1px solid var(--glass-line, rgba(126,211,242,.12)); overflow-wrap:anywhere; line-height:1.45; }
table.aile-script-shots th { font-weight:600; font-size:13px; background:rgba(40,110,190,.16); }
table.aile-script-shots tr:last-child td { border-bottom:0; }
table.aile-script-shots th:last-child, table.aile-script-shots td:last-child { border-right:0; }
table.aile-script-shots .c-no { width:34px; text-align:center; }
table.aile-script-shots .c-cam { width:64px; }
table.aile-script-shots .c-scene { width:27%; }
table.aile-script-shots .c-dur { width:76px; text-align:center; }
table.aile-script-shots .c-dur em { font-style:normal; opacity:1; margin:0; }
table.aile-script-shots .aile-shot-row { padding:0; background:transparent; margin:0; font-size:inherit; }
.mkt-edit-top[data-mkt-node="script"] .aile-script-revise { padding:0; border:0; background:transparent; }
.mkt-edit-top[data-mkt-node="script"] .aile-script-revise-t { font-size:15px; font-weight:500; color:inherit; display:flex; align-items:baseline; gap:10px; }
.aile-script-revise-t small { font-size:12px; opacity:.7; font-weight:400; }
.mkt-edit-top[data-mkt-node="script"] .aile-script-revise textarea { font-size:15px; min-height:42px; }
.mkt-edit-top[data-mkt-node="script"] .aile-script-revise-acts .aile-btn { min-height:46px; padding:8px 20px; font-size:15px; }
/* 右栏: 小标题、参考主题钮、脚本摘要、模型通道、生成、确认进入下一步、状态 */
.mkt-edit-top[data-mkt-node="script"] .aile-script-acts { gap:12px; }
.mkt-edit-top[data-mkt-node="script"] .aile-script-acts .aile-script-acts-t { font-size:15px; color:inherit; letter-spacing:0; margin:6px 0 -4px; }
.mkt-edit-top[data-mkt-node="script"] .aile-script-acts .aile-btn { min-height:46px; font-size:15px; }
.aile-script-sum { min-height:66px; box-sizing:border-box; padding:12px 14px; border:1px solid var(--glass-line, rgba(126,211,242,.24)); border-radius:8px; background:rgba(8,22,34,.45); font-size:15px; line-height:1.6; overflow-wrap:anywhere; }
.aile-script-sum.empty { opacity:.6; }
.mkt-edit-top[data-mkt-node="script"] .aile-script-acts .aile-script-model { display:flex; flex-wrap:wrap; gap:6px; }
.aile-script-model-l { display:none; }
.mkt-edit-top[data-mkt-node="script"] .aile-script-model select { flex:1 1 100%; width:100%; min-width:0; box-sizing:border-box; min-height:44px; padding:9px 12px; font-size:15px; text-overflow:ellipsis; }
.mkt-edit-top[data-mkt-node="script"] .aile-script-acts .aile-btn[data-aile-api-script="generate"] { min-height:60px; font-size:17px; margin-top:8px; }
.mkt-edit-top[data-mkt-node="script"] .aile-script-acts .aile-script-confirm { min-height:56px; }
#marketing .aile-flow .aile-script-confirm:not(:disabled) { background:rgba(10,98,255,.14) !important; border-color:#2a85ff !important; color:#cfe3ff !important; box-shadow:none !important; }
.mkt-edit-top[data-mkt-node="script"] .aile-script-acts .aile-btn[data-aile-api-script="reject"] { min-height:36px; font-size:13px; opacity:.85; }
.aile-script-status { margin-top:14px; font-size:15px; display:flex; align-items:center; }

/* 窄屏叠成一列(同壳层 1100px 断点); 分镜表在窄屏让「画面内容／口播文案」平分余宽 */
@media (max-width:1100px){
  .mkt-edit-top[data-mkt-node="script"] { grid-template-columns:1fr; }
}
@media (max-width:760px){
  table.aile-script-shots { font-size:12.5px; }
  table.aile-script-shots th, table.aile-script-shots td { padding:6px 6px; }
  table.aile-script-shots .c-no { width:24px; }
  table.aile-script-shots .c-cam { width:40px; }
  table.aile-script-shots .c-scene { width:32%; }
  .mkt-edit-top[data-mkt-node="script"] .aile-btn.s { min-height:36px; }
  .mkt-edit-top[data-mkt-node="script"] .aile-script-custom { min-height:120px; }
  table.aile-script-shots .c-dur { width:44px; }
  table.aile-script-shots th.c-dur { font-size:12px; }
  .aile-script-outbar.mkt-pane-head { flex-wrap:wrap; }
  .aile-script-revise-t { flex-wrap:wrap; }
  .aile-script-refmats-g { grid-template-columns:repeat(4, minmax(0,1fr)); gap:8px; }
}

/* —— U27 r5: 状态图标、短状态字、行内参考名、失败与生成中的行高 —— */
.aile-media-st .mkt-ico { margin-right:.3em; }
/* 状态字现在包在子元素里: 现役「#marketing :is(.ops-node-panel *,…){color:… !important}」会把子元素压回墨色, 这里让图标与字跟随状态行自身的颜色 */
#marketing .aile-flow .aile-media-st > .mkt-ico, #marketing .aile-flow .aile-media-st > .aile-st-l, #marketing .aile-flow .aile-media-st > .aile-st-s, #marketing .aile-flow .aile-media-st > .aile-st-l > span { color:inherit !important; }
.aile-st-s { display:none; }
/* 标题行里的小号「AI生成提示词」只在手机用 */
.aile-media-upgen-m { display:none; }
/* 「模型与提示词」摘要行只在手机用 */
.aile-media-paramtoggle { display:none; }
/* 行内参考: 「×」平时不占位(悬停或聚焦时盖在右端), 省出的宽度给参考名 */
.aile-media-row .aile-ref-chip { padding-right:7px; }
/* 生成视频的镜: 手填时长在生成方式下拉右侧(只留输入框与「秒」, 说明在悬浮提示) */
.aile-media-row.act-gen_video .aile-media-c-ctl .aile-media-actrow.has-dur { display:flex; flex-direction:row; align-items:center; gap:6px; }
.aile-media-row.act-gen_video .aile-media-actrow.has-dur select, .aile-media-row.act-gen_video .aile-media-actrow.has-dur select.aile-btn { flex:1 1 0; width:auto; }
.aile-media-actrow .aile-media-dur { flex:none; margin-top:0; white-space:nowrap; font-size:13px; }
.aile-media-actrow .aile-media-dur-l { display:none; }
.aile-media-actrow .aile-media-dur input { width:44px; min-height:40px; box-sizing:border-box; padding:4px 5px; font-size:14px; }
/* 失败原因、生成中说明: 未选中的行只留一行(全文在悬浮提示, 选中该行时展开) */
.aile-media-row:not(.on) .aile-media-c-status .aile-media-st.fail, .aile-media-row:not(.on) .aile-media-c-status .aile-media-st.gen { -webkit-line-clamp:1; }
@media (max-width:760px){
  /* —— 手机 04(定稿 REN-M-SHOTS 构图): 预览 → 镜头卡 → 镜头参考/生成方式(对当前镜) → 模型设置 → 提示词 → 生成当前镜头 → 批量 → 过门。
     取值: 字不小于 12px、可点目标高不低于 36px; 间距收紧、同类项并行、次要项收起, 目标两屏(1688)以内 —— */
  .mkt-edit-top[data-mkt-node="media"] .aile-media-player-media, .mkt-edit-top[data-mkt-node="media"] .aile-media-player-empty { aspect-ratio:330 / 120; min-height:0; padding:8px; }
  .mkt-edit-top[data-mkt-node="media"] .aile-media-player { gap:6px; }
  .mkt-edit-top[data-mkt-node="media"] .aile-media-player-bar { gap:6px; }
  .aile-media-meta { display:none; }
  /* 分镜列表: 行变镜头卡, 一排三张 */
  .aile-media-list { display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:6px; }
  .aile-media-list > .aile-media-head, .aile-media-list > .aile-media-srcbar { grid-column:1 / -1; }
  .aile-media-head.mkt-pane-head { order:0; margin-bottom:0; }
  /* 栏头三钮在手机收起: 选参考=参考条里的「＋」, 导入图片=来源里的本地上传, 素材库=来源里的素材 */
  .aile-media-head .mkt-pane-tools { display:none; }
  .aile-media-row { order:1; display:grid; grid-template-columns:auto minmax(0,1fr); grid-template-areas:"no name" "prev st"; gap:4px 6px; align-items:center; min-height:56px; padding:5px 6px; overflow:hidden; }
  .aile-media-row > * { min-width:0; }
  .aile-media-row .aile-media-no { grid-area:no; width:24px; height:20px; font-size:12px; }
  .aile-media-row .aile-media-c-info { grid-area:name; min-width:0; }
  .aile-media-row .aile-media-c-info > span { font-size:12.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; display:block; }
  .aile-media-row .aile-media-c-info > em, .aile-media-row .aile-media-inforow, .aile-media-row .aile-media-k { display:none; }
  .aile-media-row .aile-media-c-prev { grid-area:prev; }
  .aile-media-row .aile-media-c-prev .aile-shot-media, .aile-media-row .aile-media-c-prev img, .aile-media-row .aile-media-c-prev video { width:40px; height:24px; border-radius:4px; font-size:0; }
  .aile-media-row .aile-media-c-ctl { grid-area:st; display:block; min-width:0; }
  .aile-media-row .aile-media-c-ctl .aile-media-actrow, .aile-media-row .aile-media-c-ctl .aile-media-rowacts { display:none; }
  .aile-media-row .aile-media-c-status { display:block; min-width:0; }
  .aile-media-row .aile-media-c-status .aile-media-st { font-size:12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; display:block; }
  /* 当前镜面板: 各块直接进列表网格, 与来源条按定稿顺序交错 */
  .aile-media-cur { display:contents; }
  .aile-media-cur > * { grid-column:1 / -1; }
  .aile-media-cur-h { order:2; display:flex; align-items:baseline; justify-content:space-between; gap:8px; margin-top:2px; }
  .aile-media-cur-h strong { font-size:15px; white-space:nowrap; }
  .aile-media-cur-h small { font-size:12px; color:var(--muted, rgba(207,230,238,.7)); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0; }
  /* 来源条: 四钮一行, 不显标签与计数 */
  .aile-media-srcbar { order:3; display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:6px; padding-top:0; }
  .aile-media-srcbar > span, .aile-media-srcbar .aile-media-count { display:none; }
  .aile-media-srcbar .aile-btn.s { min-height:36px; padding:4px 2px; font-size:12px; white-space:nowrap; }
  .aile-media-srcbar .mkt-ico { margin-right:.2em; }
  .aile-media-cur > .aile-media-refs { order:4; flex-wrap:wrap; gap:6px; }
  .aile-media-cur > .aile-media-refs .aile-ref-chip { min-height:36px; font-size:13px; padding-right:38px; }
  .aile-media-cur > .aile-media-refs .aile-ref-chip .aile-ref-del { opacity:1; width:36px; height:36px; line-height:34px; right:0; border-radius:0 7px 7px 0; font-size:14px; }
  .aile-media-cur > .aile-media-refs .aile-ref-add { width:36px; height:36px; }
  .aile-media-actseg { order:5; display:grid; grid-template-columns:auto repeat(3, minmax(0,1fr)); gap:6px; align-items:center; font-size:13.5px; }
  .aile-media-actseg .aile-btn { min-height:36px; padding:4px 2px; font-size:12px; white-space:nowrap; }
  .aile-media-actseg .mkt-ico { display:none; }
  .aile-media-actseg > span { white-space:nowrap; }
  .aile-media-actseg .aile-btn { min-width:0; overflow:hidden; text-overflow:ellipsis; }
  .aile-media-cur > .aile-media-dur { order:6; display:none; font-size:13px; }
  .aile-media-cur > .aile-media-dur input { min-height:36px; width:64px; }
  .aile-media-cur > .aile-media-c-status { order:7; grid-area:auto; }
  .aile-media-cur > .aile-media-c-status .aile-btn { min-height:36px; }
  /* 右栏(参数): 模型设置两行两列 → 统一提示词 → AI生成提示词 → 生成当前镜头 → 批量 → 过门; 文字通道与进度折叠在后 */
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right { display:flex; flex-direction:column; gap:8px; }
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right > .mkt-pane-head { order:0; }
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right > .aile-media-route { order:1; display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:6px 8px; }
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right > .aile-media-fldrow { order:2; gap:8px; }
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right > .aile-media-uprompt-bar { order:3; }
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right > .aile-media-uprompt { order:4; min-height:44px; font-size:13px; }
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right > .aile-media-upgen { order:5; min-height:36px; font-size:13.5px; }
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right > .aile-media-gencur { order:6; display:block; width:100%; min-height:44px; font-size:15px; }
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right > .mkt-pane-foot { order:7; gap:8px; padding-top:0; }
  /* 文字通道(沿用脚本模型)是次要项: 排到过门钮之后 */
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right > .aile-media-route:has([data-aile-script-model]) { order:8; grid-template-columns:minmax(0,1fr); }
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right > details, .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right > .aile-debug-drawer { order:9; }
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right .aile-media-model, .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right .aile-media-fld { font-size:12.5px; gap:3px; }
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right select { min-height:36px; font-size:13px; padding:5px 8px; }
  .aile-media-batch .aile-btn { min-height:40px; font-size:14px; }
  .aile-media-allpass { min-height:52px; font-size:15px; }
  .aile-media-player-bar .aile-btn.s { min-height:36px; }
  .mkt-seg.mkt-todo button { min-height:36px; }
  .mkt-todo-tag { font-size:12px; }
  .mkt-pane-foot .aile-api-status, .aile-media-more { font-size:12px; }
  .aile-media-more > summary { min-height:36px; line-height:36px; }
  /* —— r3: 不碰下限(字 12、可点 36)再省高度 —— */
  .aile-media-row.act-gen_video .aile-media-c-ctl .aile-media-actrow.has-dur { display:none; }
  /* 预览之后直接是镜头卡: 「分镜媒体」栏头在手机不出(定稿没有) */
  .aile-media-head.mkt-pane-head { display:none; }
  /* 镜头卡: 状态用短字, 缩略图让出宽度给名字与状态 */
  .aile-media-row .aile-st-l { display:none; }
  .aile-media-row .aile-st-s { display:inline; }
  .aile-media-row .aile-media-no { width:22px; }
  .aile-media-row .aile-media-c-prev .aile-shot-media, .aile-media-row .aile-media-c-prev img, .aile-media-row .aile-media-c-prev video { width:26px; height:20px; }
  .aile-media-row { gap:4px 4px; }
  .aile-media-row .aile-media-c-status .aile-media-st .mkt-ico { margin-right:.15em; }
  /* 模型设置: 标签在左、下拉在右, 两行两列 */
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right .aile-media-model, .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right .aile-media-fld { flex-direction:row; flex-wrap:wrap; align-items:center; gap:4px 6px; white-space:nowrap; }
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right .aile-media-model select, .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right .aile-media-fld select { flex:1 1 0; width:auto; min-width:0; }
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right .aile-media-model small { flex:1 1 100%; white-space:normal; }
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right .aile-media-model small:empty { display:none; }
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right > .aile-media-fldrow { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:6px 8px; }
  /* 「AI生成提示词」收回标题行右侧 */
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right > .aile-media-upgen { display:none; }
  .aile-media-upgen-m { display:inline-flex; align-items:center; min-height:36px; padding:4px 10px; font-size:12.5px; white-space:nowrap; }
  #marketing .aile-flow .aile-media-upgen-m { background:rgba(10,98,255,.14) !important; border-color:#2a85ff !important; color:#9cc6ff !important; box-shadow:none !important; }
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right > .aile-media-uprompt-bar { font-size:13.5px; }
  /* 镜头卡的小缩略图上, 视频播放标缩到缩略图内 */
  .aile-media-row.has-media .aile-media-c-prev:has(video)::after { width:14px; height:14px; margin:-7px 0 0 -7px; border:0; }
  /* —— r4 —— */
  /* 镜头卡名: 给足两行, 不再单行截断(超过两行的才省略) */
  .aile-media-row { align-items:start; }
  .aile-media-row .aile-media-c-info > span { white-space:normal; overflow-wrap:anywhere; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; line-height:1.3; min-height:2.6em; }
  .aile-media-row .aile-media-no { align-self:start; }
  /* 模型设置、比例清晰度、提示词、文字通道: 默认收起成一行摘要, 点开才展开; 「模型与生成」栏头由摘要行代替 */
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right > .mkt-pane-head { display:none; }
  .aile-media-paramtoggle { order:0; display:flex; align-items:center; justify-content:space-between; gap:8px; width:100%; min-height:40px; padding:6px 10px; font-size:13px; text-align:left; }
  .aile-media-paramsum { min-width:0; display:flex; flex-direction:column; gap:1px; }
  .aile-media-paramsum > b, .aile-media-paramsum > small { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .aile-media-paramsum > b { font-size:13px; font-weight:600; }
  .aile-media-paramsum > small { font-size:12px; opacity:.8; }
  .aile-media-paramtoggle { min-height:44px; }
  .aile-media-paramcaret { flex:none; width:8px; height:8px; border-right:2px solid currentColor; border-bottom:2px solid currentColor; transform:rotate(45deg); margin:0 4px 4px 0; }
  .aile-media-paramtoggle.open .aile-media-paramcaret { transform:rotate(-135deg); margin:4px 4px 0 0; }
  .aile-media-paramtoggle:not(.open) ~ .aile-media-route, .aile-media-paramtoggle:not(.open) ~ .aile-media-fldrow, .aile-media-paramtoggle:not(.open) ~ .aile-media-uprompt-bar, .aile-media-paramtoggle:not(.open) ~ .aile-media-uprompt { display:none !important; }
  /* —— r6: 判据改为「第一屏能看到镜头卡和主按钮」(张工 2026-11-11), 不再压总屏数; 把主按钮以上的块收紧 —— */
  /* 预览压矮到定稿高度(定稿按 390 宽折算: 栏头约 27、画面约 100) */
  .mkt-edit-top[data-mkt-node="media"] .aile-media-player-media, .mkt-edit-top[data-mkt-node="media"] .aile-media-player-empty { aspect-ratio:330 / 96; }
  .mkt-edit-top[data-mkt-node="media"] .aile-media-player { position:relative; }
  .mkt-edit-top[data-mkt-node="media"] .aile-media-player-bar { display:none; } /* 手机: 预览下方这一行只剩未接的「放大参考图片」, 不出 */
  /* 「镜头参考」标题与当前镜状态并成一行(说明小字在手机不出) */
  .aile-media-cur > .aile-media-cur-h { grid-column:1 / 2; margin-top:0; }
  .aile-media-cur-h small { display:none; }
  .aile-media-cur > .aile-media-c-status { order:2; grid-column:2 / -1; display:flex; align-items:center; justify-content:flex-end; gap:6px; min-width:0; }
  .aile-media-cur > .aile-media-c-status .aile-media-st { min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  /* 选了「参考生视频」时: 时长输入并进「镜头参考｜状态」这一行的中间一格, 不另占一行 */
  .aile-media-cur:has(.aile-media-actseg [value="gen_video"].on) > .aile-media-dur { order:2; grid-column:2 / 3; justify-self:center; display:inline-flex; align-items:center; gap:3px; font-size:12px; white-space:nowrap; }
  .aile-media-cur:has(.aile-media-actseg [value="gen_video"].on) > .aile-media-dur input { width:38px; min-height:36px; padding:2px 4px; box-sizing:border-box; font-size:13px; }
  .aile-media-cur:has(.aile-media-actseg [value="gen_video"].on) > .aile-media-c-status { grid-column:3 / -1; }
  /* 栏内与栏间再收一点 */
  .mkt-edit-top[data-mkt-node="media"] { gap:6px; }
  .mkt-edit-top[data-mkt-node="media"] .mkt-pane { padding:8px; gap:6px; }
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right { gap:6px; }
  .aile-media-list { gap:5px; }
  /* 主按钮「生成当前镜头」固定在定稿顺序(模型设置 → 提示词 → 生成当前镜头), 收起与展开位置关系一致, 不跳位 */
  .mkt-edit-top[data-mkt-node="media"] .aile-media-player-media, .mkt-edit-top[data-mkt-node="media"] .aile-media-player-empty { aspect-ratio:330 / 90; }
}
/* 手机: 时长只在当前镜选了生成视频时出现 */
@media (max-width:760px){
  .aile-media-cur:has(.aile-media-actseg [value="gen_video"].on) > .aile-media-dur { display:inline-flex; }
}

/* ===== U27 小头: 还原视频工坊主钮主色 =====
   现役 css/09「body:not(.home-mode) #marketing button」对 #marketing 内所有 button 的底色/阴影/字色加了 !important,
   上方 .aile-btn.primary 的主色在工坊页内不显(与普通钮同为玻璃钮, 禁用态也看不出)。此处只在工坊宿主内(.aile-flow)提权恢复,
   夜间取定稿 REN-D-SHOTS 的蓝(取样 rgb(0,107,253)→rgb(0,87,254); 令 CMD-1402 裁定工坊内用定稿蓝); 不改全局规则, 弹窗/剧本工坊/发布工作流不在作用域内。 */
#marketing .aile-flow .aile-btn.primary { background:linear-gradient(180deg,#0a73ff,#0055fe) !important; color:#ffffff !important; border-color:transparent !important; box-shadow:none !important; }
#marketing .aile-flow .aile-btn.primary:hover { background:linear-gradient(180deg,#2a85ff,#0a62ff) !important; }
#marketing .aile-flow .aile-btn.primary:disabled { background:rgba(10,60,130,.42) !important; color:rgba(207,230,238,.6) !important; cursor:not-allowed; }

/* ===== U27 r10(张工 2026-11-11 九件一次答⑨): 列表按定稿画的条数固定高度, 超出在列表区内滚动, 整页高度不变、主按钮位置固定 =====
   定稿条数: 桌面 04 镜头 4 条(REN-D-SHOTS)、桌面 05 片段 3 条(REN-D-COMPOSE)、桌面 01 素材 2 行×2 列(REN-D-SOURCE)、
   桌面结果页成片列表画了 1 条、列表框留白到约 3 条高(REN-D-RESULT, 按 3 条高固定)、手机 04 镜头卡 1 排 3 张(REN-M-SHOTS)。 */
.aile-media-rows, .aile-compose-rows { display:flex; flex-direction:column; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; }
.aile-media-rows { gap:8px; }
.aile-compose-rows { gap:10px; }
@media (min-width:761px){
  .aile-media-rows { height:540px; }                                   /* 4 × 129 + 3 × 8 */
  .aile-media-rows > .aile-media-row { flex:none; }
  .mkt-edit-top[data-mkt-node="compose"] .aile-compose-rows { height:318px; }   /* 3 × 99 + 2 × 10, 取整 */
  .mkt-edit-top[data-mkt-node="compose"] .aile-compose-rows > .aile-compose-row { flex:none; }
  .aile-lib-list[data-aile-listfix] { height:160px; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; }
  .aile-lib-list[data-aile-listfix] > .aile-lib-row { flex:none; }
  .mkt-edit-top[data-mkt-node="source"] .aile-src-thumbs[data-aile-listfix] { height:446px; grid-auto-rows:217px; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; align-content:start; }   /* 2 × 217 + 12 */
}
@media (max-width:760px){
  /* 手机 04: 镜头卡区固定一排三张的高度; 第 4 张起在区内上下滑, 一次停一排 */
  .aile-media-rows { grid-column:1 / -1; order:1; display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:5px; grid-auto-rows:74px; height:74px; scroll-snap-type:y mandatory; scrollbar-width:auto; }
  .aile-media-rows > .aile-media-row { min-height:0; height:74px; box-sizing:border-box; scroll-snap-align:start; }
  /* 多于一排时右缘一条 4px 细滚动条, 提示还有镜头(安卓 Chrome 常显; iOS 只在滑动时出现) */
  .aile-media-rows::-webkit-scrollbar { width:4px; }
  .aile-media-rows::-webkit-scrollbar-thumb { background:#2a85ff; border-radius:2px; }
  .aile-media-rows::-webkit-scrollbar-track { background:rgba(42,133,255,.16); border-radius:2px; }
}
/* 手机 04 底部「保存当前稿」(张工 2026-11-11 九件一次答①): 只在手机显示, 桌面定稿没有 */
.aile-media-savebar { display:none; }
@media (max-width:760px){
  .aile-media-savebar { display:flex; align-items:center; justify-content:space-between; gap:8px; min-width:0; }
  .aile-media-savebar > small { min-width:0; font-size:12px; opacity:.85; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .aile-media-savebar > .aile-btn { flex:none; min-height:36px; padding:4px 12px; font-size:13px; white-space:nowrap; }
}
/* 固定高度列表的滚动条跟面板配色(不用系统白底) */
@media (min-width:761px){ [data-aile-listfix] { scrollbar-color:rgba(42,133,255,.55) transparent; } }
/* 手机页头第一行的「返回××」(15 号渲染): 默认不出, 只在内容营销页手机宽度由 css/95_mkt_mobile_header_r1420.css 放出来 */
.mkt-m-back { display:none; }
/* ===== U27 WO-1750 第 3 条: 桌面 04 每条定高 129(场景一行省略、配音两行省略), 保证固定区里正好 4 条; 结果页成片列表按定稿 1 条高 ===== */
@media (min-width:761px){
  .aile-media-rows > .aile-media-row { height:129px; min-height:0; overflow:hidden; }
  .aile-media-rows .aile-media-c-info > span { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .aile-media-rows .aile-media-c-info > em { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; }
  .aile-lib-list[data-aile-listfix] { height:50px; }
}
/* 手机 05／01／结果页列表同法固定(定稿 REN-M-COMPOSE 3 条、REN-M-SOURCE 2 行×2 列; 结果页同桌面按 1 条) */
@media (max-width:760px){
  .mkt-edit-top[data-mkt-node="compose"] .aile-compose-rows { height:318px; }
  .mkt-edit-top[data-mkt-node="compose"] .aile-compose-rows > .aile-compose-row { flex:none; }
  .mkt-edit-top[data-mkt-node="source"] .aile-src-thumbs[data-aile-listfix] { height:446px; grid-auto-rows:217px; overflow-y:auto; overscroll-behavior:contain; align-content:start; }
  .aile-lib-list[data-aile-listfix] { height:64px; overflow-y:auto; overscroll-behavior:contain; }   /* 手机成片行高 64 */
  .aile-lib-list[data-aile-listfix] > .aile-lib-row { flex:none; }
}
/* ===== U27 WO-1820 第 1 条 d: 手机 04 把比定稿长的几块压回去, 让「保存当前稿」那一行整行落在底部一级目录(上沿 787)之上 =====
   对定稿(REN-M-SHOTS 折算、去状态栏)逐块比: 预览栏 151 对 126、镜头卡区 74 对 47、来源条 36 对 18、生成方式 36 对 18、主按钮 44 对 22、批量 40 对 21、保存行 36 对 16。
   定稿这些钮只有 16–22 高, 这里不跟到那么矮(可点目标仍不低于 36), 改压: 预览画面、栏内外间距、镜头卡高、模型摘要行、批量钮。 */
@media (max-width:760px){
  .mkt-edit-top[data-mkt-node="media"] .aile-media-player-media, .mkt-edit-top[data-mkt-node="media"] .aile-media-player-empty { aspect-ratio:330 / 64; padding:5px; }
  .mkt-edit-top[data-mkt-node="media"] { gap:4px; }
  .mkt-edit-top[data-mkt-node="media"] .mkt-pane { padding:6px 8px; gap:4px; }
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right { gap:4px; }
  .mkt-edit-top[data-mkt-node="media"] .aile-media-list { gap:4px; }
  .mkt-edit-top[data-mkt-node="media"] .aile-media-rows { grid-auto-rows:66px; height:66px; }
  .mkt-edit-top[data-mkt-node="media"] .aile-media-rows > .aile-media-row { height:66px; padding:3px 6px; gap:2px 4px; }
  .mkt-edit-top[data-mkt-node="media"] .aile-media-paramtoggle { min-height:40px; padding:2px 10px; }
  .mkt-edit-top[data-mkt-node="media"] .aile-media-batch .aile-btn { min-height:36px; }
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right > .mkt-pane-foot { gap:6px; }
}
/* ===== U27 WO-1850 第 1 条(r11): 手机 04 各钮可见高度照定稿(约 22), 点击热区用不可见的伪元素上下各扩到 36;
   上下相邻的可点行按 36 的间距排(可见 22 + 行距 14), 所以相邻热区不重叠; 省出的高度还给预览(回到定稿约 96 高)。 ===== */
@media (max-width:760px){
  .mkt-edit-top[data-mkt-node="media"] .aile-media-player-media, .mkt-edit-top[data-mkt-node="media"] .aile-media-player-empty { aspect-ratio:330 / 99; padding:6px; }
  /* 行距: 可点行之间 14 */
  .mkt-edit-top[data-mkt-node="media"] .aile-media-list { gap:0; }
  .mkt-edit-top[data-mkt-node="media"] .aile-media-list > .aile-media-rows { margin-bottom:6px; }
  .mkt-edit-top[data-mkt-node="media"] .aile-media-srcbar, .mkt-edit-top[data-mkt-node="media"] .aile-media-cur > .aile-media-refs, .mkt-edit-top[data-mkt-node="media"] .aile-media-actseg { margin-top:14px; }
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-center.mkt-pane { padding-bottom:9px; }
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right, .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right > .mkt-pane-foot { gap:0; }
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right.mkt-pane { padding-top:9px; padding-bottom:9px; }
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right > .aile-media-gencur, .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right > .mkt-pane-foot, .mkt-edit-top[data-mkt-node="media"] .mkt-pane-foot > * + * { margin-top:14px; }
  /* 可见高度 22 的钮: 来源四钮、生成方式三钮、批量两钮、保存当前稿、状态行里的钮 */
  .mkt-edit-top[data-mkt-node="media"] .aile-media-srcbar .aile-btn.s,
  .mkt-edit-top[data-mkt-node="media"] .aile-media-actseg .aile-btn,
  .mkt-edit-top[data-mkt-node="media"] .aile-media-batch .aile-btn,
  .mkt-edit-top[data-mkt-node="media"] .aile-media-savebar > .aile-btn,
  .mkt-edit-top[data-mkt-node="media"] .aile-media-cur > .aile-media-c-status .aile-btn { position:relative; min-height:22px; height:22px; padding:0 4px; font-size:12px; line-height:20px; }
  .mkt-edit-top[data-mkt-node="media"] .aile-media-srcbar .aile-btn.s::after,
  .mkt-edit-top[data-mkt-node="media"] .aile-media-actseg .aile-btn::after,
  .mkt-edit-top[data-mkt-node="media"] .aile-media-batch .aile-btn::after,
  .mkt-edit-top[data-mkt-node="media"] .aile-media-savebar > .aile-btn::after,
  .mkt-edit-top[data-mkt-node="media"] .aile-media-cur > .aile-media-c-status .aile-btn::after { content:""; position:absolute; left:0; right:0; top:-8px; bottom:-8px; }
  .mkt-edit-top[data-mkt-node="media"] .aile-media-savebar > .aile-btn { padding:0 10px; }
  /* 参考条: 参考名与「＋」可见 22, 「×」热区仍 36 见方 */
  .mkt-edit-top[data-mkt-node="media"] .aile-media-cur > .aile-media-refs { align-items:center; }
  .mkt-edit-top[data-mkt-node="media"] .aile-media-cur > .aile-media-refs .aile-ref-chip { position:relative; min-height:22px; height:22px; font-size:12px; padding-right:26px; }
  .mkt-edit-top[data-mkt-node="media"] .aile-media-cur > .aile-media-refs .aile-ref-chip::after { content:""; position:absolute; left:0; right:26px; top:-8px; bottom:-8px; }
  .mkt-edit-top[data-mkt-node="media"] .aile-media-cur > .aile-media-refs .aile-ref-chip .aile-ref-del { width:22px; height:22px; line-height:20px; font-size:13px; }
  .mkt-edit-top[data-mkt-node="media"] .aile-media-cur > .aile-media-refs .aile-ref-chip .aile-ref-del::after { content:""; position:absolute; left:-7px; right:-7px; top:-8px; bottom:-8px; }
  .mkt-edit-top[data-mkt-node="media"] .aile-media-cur > .aile-media-refs .aile-ref-add { position:relative; width:22px; height:22px; }
  .mkt-edit-top[data-mkt-node="media"] .aile-media-cur > .aile-media-refs .aile-ref-add::after { content:""; position:absolute; left:-7px; right:-7px; top:-8px; bottom:-8px; }
  /* 生成视频的时长输入: 可见 22, 不再把「镜头参考｜状态」那一行撑高 */
  .mkt-edit-top[data-mkt-node="media"] .aile-media-cur:has(.aile-media-actseg [value="gen_video"].on) > .aile-media-dur input { min-height:22px; height:22px; padding:0 4px; font-size:12px; }
  /* 模型摘要行: 两行字, 可见 32, 热区上下各扩 2 */
  .mkt-edit-top[data-mkt-node="media"] .aile-media-paramtoggle { position:relative; min-height:32px; padding:0 10px; }
  .mkt-edit-top[data-mkt-node="media"] .aile-media-paramtoggle::after { content:""; position:absolute; left:0; right:0; top:-2px; bottom:-2px; }
  /* 主按钮与过门钮: 可见 26, 热区上下各扩 5; 过门钮里的就绪小字在手机不出(同一句在保存行左侧) */
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right > .aile-media-gencur,
  .mkt-edit-top[data-mkt-node="media"] .aile-media-allpass { position:relative; min-height:26px; height:26px; padding:0 8px; font-size:14px; line-height:24px; }
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right > .aile-media-gencur::after,
  .mkt-edit-top[data-mkt-node="media"] .aile-media-allpass::after { content:""; position:absolute; left:0; right:0; top:-5px; bottom:-5px; }
  .mkt-edit-top[data-mkt-node="media"] .aile-media-allpass .aile-media-ready { display:none; }
  .mkt-edit-top[data-mkt-node="media"] .aile-media-savebar { min-height:22px; }
  /* 「进度与确认」折叠条: 收在过门钮之后, 行距同上 */
  .mkt-edit-top[data-mkt-node="media"] .aile-media-more > summary { min-height:22px; line-height:22px; }
}
/* 手机结果页「当前成片」卡: 窄屏三列挤成一字一行, 改成两行(图标+标题徽标说明 / 发布钮整行) */
@media (max-width:760px){
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-cur { grid-template-columns:44px minmax(0,1fr); gap:8px 10px; padding:10px; }
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-cur-ico { width:44px; height:42px; }
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-cur-t b { font-size:15px; margin-right:8px; white-space:nowrap; }
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-cur-t .aile-lib-badge { white-space:nowrap; }
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-cur-t small { margin-top:4px; font-size:12.5px; }
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-cur > .aile-btn { grid-column:1 / -1; min-height:36px; }
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-saved { font-size:13.5px; padding-top:8px; }
}
/* r11 续: 行距按「相邻两行热区刚好不重叠」收紧; 生成方式三钮与时长输入的热区; 项目条与页签的热区; 过门钮右侧给现役的悬浮助手球让位 */
@media (max-width:760px){
  .mkt-edit-top[data-mkt-node="media"] .aile-media-actseg .aile-btn { overflow:visible; }
  .mkt-edit-top[data-mkt-node="media"] .aile-media-cur:has(.aile-media-actseg [value="gen_video"].on) > .aile-media-dur { position:relative; }
  .mkt-edit-top[data-mkt-node="media"] .aile-media-cur:has(.aile-media-actseg [value="gen_video"].on) > .aile-media-dur::after { content:""; position:absolute; left:-4px; right:-4px; top:-7px; bottom:-7px; }
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-center.mkt-pane { padding-bottom:4px; }
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right.mkt-pane { padding-top:4px; padding-bottom:8px; }
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right > .aile-media-gencur { margin-top:8px; }
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right > .mkt-pane-foot { margin-top:12px; }
  .mkt-edit-top[data-mkt-node="media"] .mkt-pane-foot > * + * { margin-top:14px; }
  .mkt-edit-top[data-mkt-node="media"] .mkt-pane-foot > .aile-media-savebar + * { margin-top:12px; }
  /* 现役悬浮助手球在右下(底栏之上约 14, 44 见方): 保存行与过门钮右侧各让出 54, 不让球压住 */
  .mkt-edit-top[data-mkt-node="media"] .aile-media-savebar { padding-right:54px; }
  .mkt-edit-top[data-mkt-node="media"] .mkt-pane-foot > .aile-api-actions:not(.aile-media-batch) { padding-right:54px; box-sizing:border-box; }
  .mkt-projbar-btn, .mkt-subtabs > button { overflow:visible; }
  .mkt-projbar, .mkt-subtabs { overflow:visible; }
  .mkt-edit-top[data-mkt-node="media"] .aile-media-cur > .aile-media-refs .aile-ref-chip { overflow:visible; }
  .mkt-edit-top[data-mkt-node="media"] .aile-media-cur > .aile-media-refs .aile-ref-chip .aile-ref-del::after { top:-9px; bottom:-9px; }
  .mkt-projbar-btn { position:relative; }
  .mkt-projbar-btn::before { content:""; position:absolute; left:0; right:0; top:-6px; bottom:-6px; }
  .mkt-subtabs > button { position:relative; }
  .mkt-subtabs > button::before { content:""; position:absolute; left:0; right:0; top:-6px; bottom:-6px; }
}
/* ===== U27 WO-1920 第 1、2 条 ===== */
@media (max-width:760px){
  /* 页签(预览｜镜头｜参数): 外框原来裁掉了按钮向上下扩出去的热区(.mkt-seg 的 overflow:hidden); 这里放开, 圆角改由首尾两个按钮自己带。
     上面步骤条的热区到它下沿之下 3, 页签可见 24: 向上扩 7(到步骤条热区下沿)、向下扩 5(到预览栏上沿之前) */
  .mkt-seg.mkt-subtabs { overflow:visible; }
  .mkt-seg.mkt-subtabs > button:first-child { border-radius:7px 0 0 7px; }
  .mkt-seg.mkt-subtabs > button:last-child { border-radius:0 7px 7px 0; }
  .mkt-seg.mkt-subtabs > button::after { top:-7px; bottom:-5px; }
  .mkt-seg.mkt-subtabs > button::before { content:none; }
}
@media (max-width:360px){
  /* 很窄的屏: 来源四钮一行挤不下(320 宽时最后一个被挤到下一行的热区底下), 改成两行两列, 行距 14 使上下两行热区(各 36)不重叠 */
  .mkt-edit-top[data-mkt-node="media"] .aile-media-srcbar { grid-template-columns:repeat(2, minmax(0,1fr)); gap:14px 6px; }
}
/* ===== U27 WO-1920 第 4 条: 手机 03(文案脚本)整屏还原(定稿 REN-M-VIDEO)。只排版, 不改任何行为与字段。
   三张卡: ① 自定义提示词 ② 输出脚本(分镜行 镜号｜画面｜口播, 固定 3 行高、区内滚——张工⑨) ③ 生成与确认; 底部一行: 退回重做｜确认脚本。
   钮可见高 22(主钮 26), 点击范围用不可见伪元素扩到 36。 ===== */
@media (max-width:760px){
  .mkt-edit-top[data-mkt-node="script"] { gap:4px; }
  .mkt-edit-top[data-mkt-node="script"] .mkt-pane { padding:6px 9px; gap:6px; min-width:0; }
  .mkt-edit-top[data-mkt-node="script"] .mkt-pane-head { min-height:24px; margin:0; gap:6px; }
  .mkt-edit-top[data-mkt-node="script"] .mkt-pane-head > strong { font-size:15px; display:inline-flex; align-items:center; gap:7px; white-space:nowrap; }
  /* 卡号 ①②③ */
  .mkt-edit-top[data-mkt-node="script"] .mkt-pane-head > strong::before { display:inline-flex; align-items:center; justify-content:center; width:20px; height:20px; border-radius:50%; background:#0a62ff; color:#fff; font-size:12.5px; font-weight:700; }
  .mkt-edit-top[data-mkt-node="script"] .mkt-edit-left .mkt-pane-head > strong::before { content:"1"; }
  .mkt-edit-top[data-mkt-node="script"] .mkt-edit-center .mkt-pane-head > strong::before { content:"2"; }
  .mkt-edit-top[data-mkt-node="script"] .mkt-edit-right .mkt-pane-head > strong::before { content:"3"; }
  .mkt-edit-top[data-mkt-node="script"] .mkt-edit-right .mkt-pane-head > strong { font-size:0; }
  .mkt-edit-top[data-mkt-node="script"] .mkt-edit-right .mkt-pane-head > strong::after { content:"生成与确认"; font-size:15px; }
  /* 小钮: 可见 22, 热区 36 */
  .mkt-edit-top[data-mkt-node="script"] .aile-btn.s,
  .mkt-edit-top[data-mkt-node="script"] .aile-script-acts .aile-btn { position:relative; min-height:22px; height:22px; padding:0 8px; font-size:12px; line-height:20px; white-space:nowrap; margin:0; }
  .mkt-edit-top[data-mkt-node="script"] .aile-btn.s::after,
  .mkt-edit-top[data-mkt-node="script"] .aile-script-acts .aile-btn::after { content:""; position:absolute; left:0; right:0; top:-7px; bottom:-7px; }
  /* ① 自定义提示词 */
  .mkt-edit-top[data-mkt-node="script"] .aile-script-custom-wrap { gap:6px; }
  .mkt-edit-top[data-mkt-node="script"] .aile-script-custom-bar > strong > small { display:none; }
  .mkt-edit-top[data-mkt-node="script"] .aile-script-custom { min-height:40px; height:40px; font-size:12.5px; line-height:1.4; padding:3px 8px; }
  .mkt-edit-top[data-mkt-node="script"] .aile-script-refmats { display:none; } /* 定稿手机 03 没有参考素材区; 换素材走步骤条回「素材」 */
  /* ② 输出脚本 */
  .mkt-edit-top[data-mkt-node="script"] .aile-script-out { gap:6px; }
  .mkt-edit-top[data-mkt-node="script"] .aile-script-outbar.mkt-pane-head { flex-wrap:wrap; row-gap:8px; }
  .mkt-edit-top[data-mkt-node="script"] .aile-script-outbar .mkt-pane-tools { gap:6px; flex-wrap:nowrap; flex:1 1 100%; justify-content:flex-start; }
  .mkt-edit-top[data-mkt-node="script"] .aile-script-outbar .aile-btn.s { padding:0 6px; }
  .mkt-edit-top[data-mkt-node="script"] .aile-script-outbar .aile-btn.s .mkt-ico { display:none; }
  .mkt-edit-top[data-mkt-node="script"] .aile-script-draft { gap:4px; }
  .mkt-edit-top[data-mkt-node="script"] .aile-script-fldt { display:none; }
  .mkt-edit-top[data-mkt-node="script"] .aile-script-box { display:none; } /* 标题与口播全文两个盒在手机不单列(定稿手机 03 只有分镜行); 全文见「手工编辑」 */
  .mkt-edit-top[data-mkt-node="script"] .aile-script-box .aile-script-title { font-size:13px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .mkt-edit-top[data-mkt-node="script"] .aile-script-box .aile-script-hook { display:none; }
  .mkt-edit-top[data-mkt-node="script"] .aile-script-box.aile-script-vo { display:none; } /* 口播全文在手机不单列(各镜口播在分镜行里; 全文见「手工编辑」) */
  /* 分镜: 一行 = 镜号｜画面｜口播(两行); 运镜与计划时长两列在手机不出; 固定 3 行高, 区内上下滚 */
  .mkt-edit-top[data-mkt-node="script"] table.aile-script-shots { display:block; min-width:0; width:100%; height:114px; overflow-y:auto; overscroll-behavior:contain; border-collapse:separate; }
  .mkt-edit-top[data-mkt-node="script"] table.aile-script-shots thead { display:none; }
  .mkt-edit-top[data-mkt-node="script"] table.aile-script-shots tbody { display:block; }
  .mkt-edit-top[data-mkt-node="script"] table.aile-script-shots tr.aile-shot-row { display:grid; grid-template-columns:26px 76px minmax(0,1fr); gap:0 8px; align-items:center; height:38px; box-sizing:border-box; padding:2px 6px; border-bottom:1px solid var(--mkt-card-line, rgba(126,211,242,.18)); }
  .mkt-edit-top[data-mkt-node="script"] table.aile-script-shots td { display:block; padding:0; border:0; width:auto; font-size:12px; line-height:1.35; min-width:0; }
  .mkt-edit-top[data-mkt-node="script"] table.aile-script-shots td.c-cam, .mkt-edit-top[data-mkt-node="script"] table.aile-script-shots td.c-dur { display:none; }
  .mkt-edit-top[data-mkt-node="script"] table.aile-script-shots td.c-scene { font-size:12.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .mkt-edit-top[data-mkt-node="script"] table.aile-script-shots td.c-cap { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; }
  .mkt-edit-top[data-mkt-node="script"] .aile-gate { font-size:12px; padding:2px 8px; margin:0; }
  /* 局部改稿: 标签与输入同一行, 两钮一行 */
  .mkt-edit-top[data-mkt-node="script"] .aile-script-revise { display:grid; grid-template-columns:auto minmax(0,1fr); gap:6px 8px; align-items:center; margin-top:2px; }
  .mkt-edit-top[data-mkt-node="script"] .aile-script-revise-t { font-size:12.5px; margin:0; white-space:nowrap; }
  .mkt-edit-top[data-mkt-node="script"] .aile-script-revise-t > small, .mkt-edit-top[data-mkt-node="script"] .aile-script-revise-t > span { display:none; }
  .mkt-edit-top[data-mkt-node="script"] .aile-script-revise textarea { min-height:26px; height:26px; font-size:12.5px; padding:3px 8px; resize:none; }
  .mkt-edit-top[data-mkt-node="script"] .aile-script-revise-acts { grid-column:1 / -1; display:flex; align-items:center; gap:8px; margin-top:8px; }
  .mkt-edit-top[data-mkt-node="script"] .aile-script-revise-acts .aile-btn { min-height:22px; height:22px; padding:0 12px; font-size:12px; }
  /* ③ 生成与确认: 参考主题｜文字模型 一行; 生成脚本整行; 状态; 底部 退回重做｜确认脚本 */
  .mkt-edit-top[data-mkt-node="script"] .aile-script-acts { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:14px 8px; align-items:center; }
  .mkt-edit-top[data-mkt-node="script"] .aile-script-acts .aile-script-acts-t { display:none; }
  .mkt-edit-top[data-mkt-node="script"] .aile-script-acts .aile-script-sum { display:none; } /* 摘要(标题·镜数·时长)在手机不单列 */
  .mkt-edit-top[data-mkt-node="script"] .aile-script-acts [data-aile-api-script="openbrief"] { order:1; }
  .mkt-edit-top[data-mkt-node="script"] .aile-script-acts .aile-script-model { order:2; position:relative; gap:2px; font-size:12px; min-width:0; }
  .mkt-edit-top[data-mkt-node="script"] .aile-script-acts .aile-script-model > span:first-child { display:none; }
  .mkt-edit-top[data-mkt-node="script"] .aile-script-model select { min-height:22px; height:22px; padding:0 6px; font-size:12px; }
  .mkt-edit-top[data-mkt-node="script"] .aile-script-acts .aile-script-model small { display:block; margin-top:2px; font-size:11px; line-height:13px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .mkt-edit-top[data-mkt-node="script"] .aile-script-acts [data-aile-api-script="openbrief"] { align-self:start; }
  .mkt-edit-top[data-mkt-node="script"] .aile-script-acts .aile-btn[data-aile-api-script="generate"] { grid-column:1 / -1; order:4; min-height:26px; height:26px; font-size:14px; line-height:24px; margin:0; }
  .mkt-edit-top[data-mkt-node="script"] .aile-script-acts .aile-btn[data-aile-api-script="generate"]::after { top:-5px; bottom:-5px; }
  .mkt-edit-top[data-mkt-node="script"] .aile-script-acts .aile-btn[data-aile-api-script="reject"] { order:6; grid-column:1 / 2; min-height:26px; height:26px; font-size:13px; opacity:1; }
  .mkt-edit-top[data-mkt-node="script"] .aile-script-acts .aile-script-confirm { order:7; grid-column:2 / 3; min-height:26px; height:26px; font-size:13px; padding:0 6px; margin-right:54px; width:auto; min-width:0; justify-self:stretch; } /* 右侧 54 让给现役悬浮助手球 */
  .mkt-edit-top[data-mkt-node="script"] .aile-script-acts .aile-btn[data-aile-api-script="reject"]::after, .mkt-edit-top[data-mkt-node="script"] .aile-script-acts .aile-script-confirm::after { top:-5px; bottom:-5px; }
  /* 确认钮: 现役字「确认脚本，进入图片与视频」在半行宽里放不下, 手机上显示定稿的短字「确认脚本，进入媒体」(只换显示, 钮与动作不变; 读屏读到的仍是原字) */
  .mkt-edit-top[data-mkt-node="script"] .aile-script-acts .aile-script-confirm { font-size:0; overflow:visible; }
  .mkt-edit-top[data-mkt-node="script"] .aile-script-acts .aile-script-confirm .mkt-ico { display:none; }
  .mkt-edit-top[data-mkt-node="script"] .aile-script-acts .aile-script-confirm::before { content:"确认脚本，进入媒体"; font-size:13px; line-height:24px; white-space:nowrap; }
  /* 局部改稿输入只留一行; 分镜区滚动条用面板配色 */
  .mkt-edit-top[data-mkt-node="script"] .aile-script-revise textarea { white-space:nowrap; overflow:hidden; }
  .mkt-edit-top[data-mkt-node="script"] table.aile-script-shots { scrollbar-width:thin; scrollbar-color:rgba(42,133,255,.55) transparent; }
  .mkt-edit-top[data-mkt-node="script"] .mkt-edit-right { display:flex; flex-direction:column; gap:6px; }
  .mkt-edit-top[data-mkt-node="script"] .mkt-edit-right > .aile-script-status { order:2; font-size:12.5px; margin:0; }
  .mkt-edit-top[data-mkt-node="script"] .mkt-edit-right > .aile-script-acts { order:1; }
  .mkt-edit-top[data-mkt-node="script"] .mkt-preview-big, .mkt-edit-top[data-mkt-node="script"] .aile-script-out, .mkt-edit-top[data-mkt-node="script"] .aile-script-draft { min-width:0; max-width:100%; }
  .mkt-edit-top[data-mkt-node="script"] .mkt-preview-big, .mkt-edit-top[data-mkt-node="script"] .mkt-edit-center, .mkt-edit-top[data-mkt-node="script"] .aile-script-out { min-height:0; height:auto; }
  .mkt-edit-top[data-mkt-node="script"] .aile-script-revise textarea, .mkt-edit-top[data-mkt-node="script"] .aile-script-custom { box-sizing:border-box; width:100%; max-width:100%; }
}
/* ===== U27 WO-1950 第 1 条(r12): 手机 04 照定稿(REN-M-SHOTS)——模型设置与提示词展开、镜头卡 47、各块高度与行距取定稿。
   相邻可点行的热区各让一半(不为凑 36 把定稿撑高); 不足 36 的在交件说明里列差额。只排版, 不改行为。 ===== */
@media (max-width:760px){
  /* 预览栏: 栏头压回定稿(约 26) */
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-left.mkt-pane { padding:4px 8px 6px; gap:3px; }
  .mkt-edit-top[data-mkt-node="media"] .aile-media-player { gap:3px; }
  .mkt-edit-top[data-mkt-node="media"] .aile-media-player-head.mkt-pane-head { min-height:22px; height:22px; margin:0; padding:0; }
  .mkt-edit-top[data-mkt-node="media"] .aile-media-player-head.mkt-pane-head > strong { font-size:13.5px; line-height:22px; }
  .mkt-edit-top[data-mkt-node="media"] .aile-media-player-head .mkt-seg button { min-height:18px; height:18px; padding:0 9px; font-size:11.5px; line-height:16px; }
  /* 镜头卡: 47 高, 名字一行 */
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-center.mkt-pane { padding:6px 8px 4px; }
  .mkt-edit-top[data-mkt-node="media"] .aile-media-rows { grid-auto-rows:47px; height:47px; }
  .mkt-edit-top[data-mkt-node="media"] .aile-media-rows > .aile-media-row { height:47px; padding:3px 6px; gap:2px 4px; align-items:center; }
  .mkt-edit-top[data-mkt-node="media"] .aile-media-row .aile-media-c-info > span { -webkit-line-clamp:1; min-height:0; line-height:18px; white-space:nowrap; display:block; overflow:hidden; text-overflow:ellipsis; }
  .mkt-edit-top[data-mkt-node="media"] .aile-media-row .aile-media-no { height:18px; line-height:18px; align-self:center; }
  .mkt-edit-top[data-mkt-node="media"] .aile-media-row .aile-media-c-prev .aile-shot-media, .mkt-edit-top[data-mkt-node="media"] .aile-media-row .aile-media-c-prev img, .mkt-edit-top[data-mkt-node="media"] .aile-media-row .aile-media-c-prev video { height:16px; }
  .mkt-edit-top[data-mkt-node="media"] .aile-media-row .aile-media-c-status .aile-media-st { line-height:16px; }
  .mkt-edit-top[data-mkt-node="media"] .aile-media-list > .aile-media-rows { margin-bottom:8px; }
  /* 镜头参考行、来源四钮、参考条、生成方式: 行距取定稿(约 8–12) */
  .mkt-edit-top[data-mkt-node="media"] .aile-media-cur-h strong { font-size:13.5px; line-height:16px; }
  .mkt-edit-top[data-mkt-node="media"] .aile-media-srcbar { margin-top:8px; }
  .mkt-edit-top[data-mkt-node="media"] .aile-media-cur > .aile-media-refs { margin-top:8px; }
  .mkt-edit-top[data-mkt-node="media"] .aile-media-actseg { margin-top:10px; }
  .mkt-edit-top[data-mkt-node="media"] .aile-media-srcbar .aile-btn.s, .mkt-edit-top[data-mkt-node="media"] .aile-media-actseg .aile-btn { min-height:20px; height:20px; line-height:18px; }
  .mkt-edit-top[data-mkt-node="media"] .aile-media-srcbar .aile-btn.s::after, .mkt-edit-top[data-mkt-node="media"] .aile-media-actseg .aile-btn::after { top:-4px; bottom:-4px; }
  .mkt-edit-top[data-mkt-node="media"] .aile-media-cur > .aile-media-refs .aile-ref-chip::after, .mkt-edit-top[data-mkt-node="media"] .aile-media-cur > .aile-media-refs .aile-ref-chip .aile-ref-del::after, .mkt-edit-top[data-mkt-node="media"] .aile-media-cur > .aile-media-refs .aile-ref-add::after { top:-4px; bottom:-5px; }
  /* 右栏: 模型设置与提示词展开(不再收成一行摘要) */
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right.mkt-pane.aile-flow-right { padding:5px 8px 6px; gap:0; row-gap:0; } /* 后面的分片里有一条同权重的 12 行距, 这里加一个类名压过它 */
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right > .aile-media-paramtoggle { display:none; }
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right > .mkt-pane-head { display:flex; order:0; min-height:14px; height:14px; margin:0; }
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right > .mkt-pane-head > strong { font-size:0; }
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right > .mkt-pane-head > strong::after { content:"模型设置"; font-size:13px; line-height:14px; font-weight:600; }
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right > .aile-media-paramtoggle:not(.open) ~ .aile-media-route:not(:has([data-aile-script-model])) { display:grid !important; }
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right > .aile-media-paramtoggle:not(.open) ~ .aile-media-fldrow { display:grid !important; }
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right > .aile-media-paramtoggle:not(.open) ~ .aile-media-uprompt-bar { display:flex !important; }
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right > .aile-media-paramtoggle:not(.open) ~ .aile-media-uprompt { display:block !important; }
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right > .aile-media-route { margin-top:6px; gap:5px 8px; }
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right > .aile-media-fldrow { margin-top:5px; gap:5px 8px; }
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right .aile-media-model, .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right .aile-media-fld { font-size:11.5px; gap:2px 5px; }
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right select { min-height:18px; height:18px; padding:0 6px; font-size:11.5px; line-height:16px; }
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right > .aile-media-uprompt-bar { margin-top:9px; min-height:16px; height:16px; align-items:center; justify-content:space-between; font-size:13px; }
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right > .aile-media-uprompt-bar .aile-media-upgen-m { position:relative; min-height:16px; height:16px; padding:0 8px; font-size:11.5px; line-height:14px; }
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right > .aile-media-uprompt-bar .aile-media-upgen-m::after { content:""; position:absolute; left:0; right:0; top:-6px; bottom:-3px; }
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right > .aile-media-uprompt { margin-top:4px; min-height:32px; height:32px; font-size:12px; line-height:1.35; padding:3px 7px; resize:none; }
  /* 主按钮 → 批量 → 保存行 → 过门钮: 按定稿行距 */
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right > .aile-media-gencur { margin-top:6px; min-height:22px; height:22px; line-height:20px; font-size:13.5px; }
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right > .aile-media-gencur::after { top:-3px; bottom:-4px; }
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right > .mkt-pane-foot { margin-top:8px; }
  .mkt-edit-top[data-mkt-node="media"] .aile-media-batch .aile-btn { min-height:21px; height:21px; line-height:19px; }
  .mkt-edit-top[data-mkt-node="media"] .aile-media-batch .aile-btn::after { top:-4px; bottom:-2px; }
  .mkt-edit-top[data-mkt-node="media"] .mkt-pane-foot > * + * { margin-top:4px; }
  .mkt-edit-top[data-mkt-node="media"] .aile-media-savebar { min-height:18px; }
  .mkt-edit-top[data-mkt-node="media"] .aile-media-savebar > .aile-btn { min-height:18px; height:18px; line-height:16px; font-size:11.5px; }
  .mkt-edit-top[data-mkt-node="media"] .aile-media-savebar > .aile-btn::after { top:-2px; bottom:-5px; }
  .mkt-edit-top[data-mkt-node="media"] .mkt-pane-foot > .aile-media-savebar + * { margin-top:10px; }
  .mkt-edit-top[data-mkt-node="media"] .aile-media-allpass { min-height:26px; height:26px; }
  .mkt-edit-top[data-mkt-node="media"] .aile-media-allpass::after { top:-5px; bottom:-5px; }
}
/* ===== U27 WO-1950 第 2 条: 手机 03 r2(总指挥对 a–f 的裁定) =====
   留位禁用的「从脚本工坊导入脚本」、第一张卡折叠箭头、「修改后请核对全文」只在手机出(桌面定稿没有, 默认不显示);
   状态行现在在动作区里: 桌面仍排在最后, 手机排在底部两钮之上; 确认钮的长字／短字用 .mkt-d／.mkt-m 两个 span(读到的与看到的一致)。 */
.aile-script-fromws, .aile-script-fold, .aile-script-revise-hint { display:none; }
.aile-script-acts > .aile-script-status { order:99; }
/* WO-2020 第 4 条桌面比对查出: 状态行挪进动作区后, 桌面上它与上一钮的距离由 24 变成 26, 这里改回原值 23.98(动作区行距 12 + 11.98; 原来是栏内行距 9.98 + 14), 桌面位置与挪之前逐像素相同 */
.mkt-edit-top[data-mkt-node="script"] .aile-script-acts > .aile-script-status { margin-top:11.98px; }
@media (max-width:760px){
  /* 留位禁用: 从脚本工坊导入脚本 */
  .mkt-edit-top[data-mkt-node="script"] .aile-script-fromws { display:flex; align-items:center; gap:7px; width:100%; min-height:22px; height:22px; padding:0 8px; margin:0 0 2px; font-size:12px; line-height:20px; text-align:left; border-radius:7px; opacity:.75; cursor:not-allowed; }
  .mkt-edit-top[data-mkt-node="script"] .aile-script-fromws > span { flex:1 1 auto; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .mkt-edit-top[data-mkt-node="script"] .aile-script-fromws .mkt-todo-tag { flex:none; font-size:11px; }
  /* 第一张卡: 折叠箭头(收起时只留标题行) */
  .mkt-edit-top[data-mkt-node="script"] .aile-script-custom-bar { flex-wrap:nowrap; }
  .mkt-edit-top[data-mkt-node="script"] .aile-script-custom-bar > strong { flex:1 1 auto; min-width:0; }
  .mkt-edit-top[data-mkt-node="script"] .aile-script-fold { display:inline-flex; align-items:center; justify-content:center; position:relative; order:9; flex:none; width:22px; height:22px; min-height:22px !important; padding:0 !important; margin-left:2px; }
  #marketing .aile-flow .mkt-edit-top[data-mkt-node="script"] .aile-script-fold { background:transparent !important; border:0 !important; box-shadow:none !important; }
  .mkt-edit-top[data-mkt-node="script"] .aile-script-fold::after { content:""; position:absolute; left:-7px; right:-7px; top:-7px; bottom:-7px; }
  .aile-script-fold-caret { width:7px; height:7px; border-right:2px solid currentColor; border-top:2px solid currentColor; transform:rotate(-45deg); margin-top:3px; }
  .aile-script-custom-wrap.is-folded .aile-script-fold-caret { transform:rotate(135deg); margin-top:-3px; }
  .mkt-edit-top[data-mkt-node="script"] .aile-script-custom-wrap.is-folded > .aile-script-custom { display:none; }
  /* 改稿: 核对提示排在两钮右侧 */
  .mkt-edit-top[data-mkt-node="script"] .aile-script-revise-hint { display:inline-flex; align-items:center; gap:3px; margin-left:auto; font-size:11.5px; opacity:.85; white-space:nowrap; }
  /* 确认钮: 不再用样式盖字 */
  .mkt-edit-top[data-mkt-node="script"] .aile-script-acts .aile-script-confirm { font-size:12px; overflow:hidden; white-space:nowrap; padding:0 3px; margin-right:48px; }
  /* 多了「从脚本工坊导入脚本」一行, 从别处收回同样的高度, 保持整屏一屏、底部两钮在底栏之上 */
  .mkt-edit-top[data-mkt-node="script"] { gap:3px; }
  .mkt-edit-top[data-mkt-node="script"] .mkt-pane { padding:5px 9px; }
  .mkt-edit-top[data-mkt-node="script"] .aile-script-custom { min-height:34px; height:34px; padding:2px 8px; }
  .mkt-edit-top[data-mkt-node="script"] table.aile-script-shots { height:108px; }
  .mkt-edit-top[data-mkt-node="script"] table.aile-script-shots tr.aile-shot-row { height:36px; padding:1px 6px; }
  .mkt-edit-top[data-mkt-node="script"] .aile-script-acts { gap:12px 8px; }
  .mkt-edit-top[data-mkt-node="script"] .aile-script-acts .aile-script-confirm::before { content:none; }
  /* 状态行: 生成脚本之下、底部两钮之上 */
  .mkt-edit-top[data-mkt-node="script"] .aile-script-acts > .aile-script-status { order:5; grid-column:1 / -1; font-size:12.5px; margin:-6px 0; min-height:0; }
}

/* ===== U27 WO-1950 第 3 条: 手机 05(配音字幕与合成) 整屏照定稿 REN-M-COMPOSE =====
   预览 → 视频片段(固定 3 行高, 区内滚) → 合成设置(一行一项) → 状态 → 「保存草稿｜合成出片」同一行, 整屏一屏、两钮在底栏之上。
   定稿没有的「当前片段」卡、三条事实、「脚本与片段」汇总行、「完成后进入结果入库」在手机不显示(状态行里已有片段数与合成状态)。
   只排版, 不改行为; 相邻可点行的热区各让一半, 不足 36 的在交件说明里列差额。 */
@media (max-width:760px){
  .mkt-edit-top[data-mkt-node="compose"] { gap:4px; }
  /* 预览 */
  .mkt-edit-top[data-mkt-node="compose"] .mkt-edit-left.mkt-pane { padding:4px 8px 6px; gap:3px; }
  .mkt-edit-top[data-mkt-node="compose"] .aile-media-player { gap:3px; }
  .mkt-edit-top[data-mkt-node="compose"] .aile-media-player-head.mkt-pane-head { min-height:22px; height:22px; margin:0; padding:0; }
  .mkt-edit-top[data-mkt-node="compose"] .aile-media-player-head.mkt-pane-head > strong { font-size:13.5px; line-height:22px; }
  .mkt-edit-top[data-mkt-node="compose"] .aile-media-player .aile-media-player-media { height:121px; min-height:0; max-height:121px; width:100%; object-fit:cover; border-radius:8px; }
  .mkt-edit-top[data-mkt-node="compose"] .aile-media-player .aile-media-player-empty { min-height:0; height:121px; }
  .mkt-edit-top[data-mkt-node="compose"] .mkt-edit-left > .aile-compose-cur, .mkt-edit-top[data-mkt-node="compose"] .mkt-edit-left > .aile-compose-facts { display:none; }
  /* 视频片段 */
  .mkt-edit-top[data-mkt-node="compose"] .mkt-edit-center.mkt-pane { padding:5px 8px 6px; }
  .mkt-edit-top[data-mkt-node="compose"] .mkt-edit-center > .aile-flow-preview.mkt-preview-big { min-height:0; }
  .mkt-edit-top[data-mkt-node="compose"] .aile-compose-list { gap:4px; }
  .mkt-edit-top[data-mkt-node="compose"] .aile-compose-head.mkt-pane-head { min-height:22px; height:22px; margin:0; padding:0; }
  .mkt-edit-top[data-mkt-node="compose"] .aile-compose-head.mkt-pane-head > strong { font-size:13.5px; line-height:22px; }
  .mkt-edit-top[data-mkt-node="compose"] .aile-compose-head .aile-btn.s { position:relative; min-height:20px; height:20px; padding:0 10px; font-size:11.5px; line-height:18px; }
  .mkt-edit-top[data-mkt-node="compose"] .aile-compose-head .aile-btn.s::after { content:""; position:absolute; left:-8px; right:-8px; top:-9px; bottom:-7px; }
  .mkt-edit-top[data-mkt-node="compose"] .aile-compose-rows[data-aile-listfix] { height:138px; gap:3px; }
  .mkt-edit-top[data-mkt-node="compose"] .aile-compose-rows > .aile-compose-row { flex:none; box-sizing:border-box; height:44px; min-height:44px; grid-template-columns:72px minmax(0,1fr) auto; gap:8px; padding:3px 6px; border-radius:8px; }
  .mkt-edit-top[data-mkt-node="compose"] .aile-compose-prev { width:72px; }
  .mkt-edit-top[data-mkt-node="compose"] .aile-compose-prev .aile-shot-media, .mkt-edit-top[data-mkt-node="compose"] .aile-compose-prev img, .mkt-edit-top[data-mkt-node="compose"] .aile-compose-prev video { width:72px; height:36px; min-height:0; border-radius:5px; display:block; }
  .mkt-edit-top[data-mkt-node="compose"] .aile-compose-cap { gap:1px 6px; align-content:center; }
  .mkt-edit-top[data-mkt-node="compose"] .aile-compose-cap b, .mkt-edit-top[data-mkt-node="compose"] .aile-compose-cap span { font-size:13px; line-height:18px; }
  .mkt-edit-top[data-mkt-node="compose"] .aile-compose-cap small { font-size:11.5px; line-height:16px; min-height:16px; gap:6px; white-space:nowrap; }
  .mkt-edit-top[data-mkt-node="compose"] .aile-compose-tag { padding:0 7px; font-size:10.5px; line-height:14px; border-radius:8px; white-space:nowrap; }
  .mkt-edit-top[data-mkt-node="compose"] .aile-compose-sortbtns { gap:5px; }
  .mkt-edit-top[data-mkt-node="compose"] .aile-compose-sortbtns .aile-btn { position:relative; min-width:24px; min-height:22px; height:22px; padding:0 6px; font-size:12px; line-height:20px; }
  .mkt-edit-top[data-mkt-node="compose"] .aile-compose-sortbtns .aile-btn::after { content:""; position:absolute; left:-2px; right:-2px; top:-7px; bottom:-7px; }
  .mkt-edit-top[data-mkt-node="compose"] .aile-compose-list > .aile-compose-sum { display:none; }
  /* 合成设置: 一行一项 */
  .mkt-edit-top[data-mkt-node="compose"] .mkt-edit-right.mkt-pane.aile-flow-right { padding:5px 8px 6px; gap:0; row-gap:0; } /* 后面的分片里有一条同权重的 12 行距, 这里多一个类名压过它 */
  .mkt-edit-top[data-mkt-node="compose"] .mkt-edit-right > .mkt-pane-head { min-height:18px; height:18px; margin:0 0 2px; padding:0; }
  .mkt-edit-top[data-mkt-node="compose"] .mkt-edit-right > .mkt-pane-head > strong { font-size:13.5px; line-height:18px; }
  .mkt-edit-top[data-mkt-node="compose"] .aile-compose-setrow { grid-template-columns:15px 66px minmax(0,1fr); gap:6px; min-height:24px; height:24px; font-size:12.5px; margin:0; padding:0; }
  .mkt-edit-top[data-mkt-node="compose"] .aile-compose-setrow > .mkt-ico { width:14px; height:14px; }
  .mkt-edit-top[data-mkt-node="compose"] .aile-compose-setrow select, .mkt-edit-top[data-mkt-node="compose"] .aile-compose-setrow input { min-height:20px; height:20px; padding:0 6px; font-size:11.5px; line-height:18px; }
  .mkt-edit-top[data-mkt-node="compose"] .aile-compose-setrow .aile-tts-voicebar { gap:5px; }
  .mkt-edit-top[data-mkt-node="compose"] .aile-compose-setrow .aile-tts-voicebar .aile-btn { position:relative; min-height:20px; height:20px; padding:0 9px; font-size:11.5px; line-height:18px; }
  .mkt-edit-top[data-mkt-node="compose"] .aile-compose-setrow .aile-tts-voicebar .aile-btn::after { content:""; position:absolute; left:-2px; right:-6px; top:-2px; bottom:-2px; }
  .mkt-edit-top[data-mkt-node="compose"] .aile-compose-v { font-size:11.5px; }
  .mkt-edit-top[data-mkt-node="compose"] .aile-compose-set > .aile-btn.s { position:relative; min-height:20px; height:20px; margin:2px 0; padding:0 10px; font-size:11.5px; line-height:18px; }
  .mkt-edit-top[data-mkt-node="compose"] .aile-compose-set > .aile-btn.s::after { content:""; position:absolute; left:0; right:0; top:-2px; bottom:-2px; }
  .mkt-edit-top[data-mkt-node="compose"] .aile-vo-hint, .mkt-edit-top[data-mkt-node="compose"] .aile-voice-hint { font-size:10.5px; line-height:13px; padding:0 0 2px 21px; }
  /* 状态: 最多两行 */
  .mkt-edit-top[data-mkt-node="compose"] .aile-compose-status { margin:4px 0 0; font-size:11.5px; line-height:14px; min-height:0; align-items:flex-start; gap:5px; }
  .mkt-edit-top[data-mkt-node="compose"] .aile-compose-status > .mkt-ico { width:13px; height:13px; margin:1px 0 0; flex:none; }
  .mkt-edit-top[data-mkt-node="compose"] .aile-compose-status .aile-st-l { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; }
  /* 保存草稿｜合成出片: 同一行, 右侧让出助手球 */
  .mkt-edit-top[data-mkt-node="compose"] .mkt-edit-right > .aile-api-actions.aile-compose-acts { flex-direction:row; gap:8px; margin:7px 0 0; padding:0 54px 0 0; }
  .mkt-edit-top[data-mkt-node="compose"] .aile-compose-acts .aile-btn { position:relative; width:auto; min-height:28px; height:28px; padding:0 8px; font-size:13.5px; line-height:26px; }
  .mkt-edit-top[data-mkt-node="compose"] .aile-compose-acts .aile-btn::after { content:""; position:absolute; left:0; right:0; top:-4px; bottom:-4px; }
  .mkt-edit-top[data-mkt-node="compose"] .aile-compose-acts > [data-aile-compose-savedraft] { flex:0 0 40%; }
  .mkt-edit-top[data-mkt-node="compose"] .aile-compose-acts > [data-aile-compose="run"] { flex:1 1 0; min-width:0; }
  .mkt-edit-top[data-mkt-node="compose"] .mkt-edit-right > .aile-compose-next { display:none; }
}

/* ===== U27 WO-1950 第 3 条: 手机 01(素材) 整屏照定稿 REN-M-SOURCE =====
   素材预览 → 已选素材(缩略网格固定 2 行高, 区内滚) → 素材确认(一行一项) → 「确认素材，进入文案脚本」, 整屏一屏、主钮在底栏之上。
   定稿没有的「当前选中素材」小卡、「选中卡片可在左侧预览」提示、「将使用本次已选素材准备脚本」在手机不显示;
   中栏里的「选择项目」钮在手机不显示(手机页头的项目条就是选项目入口)。只排版, 不改行为。 */
@media (max-width:760px){
  .mkt-edit-top[data-mkt-node="source"] { gap:4px; }
  /* 素材预览 */
  .mkt-edit-top[data-mkt-node="source"] .mkt-edit-left.mkt-pane { padding:4px 8px 5px; gap:3px; }
  .mkt-edit-top[data-mkt-node="source"] .mkt-edit-left > .mkt-pane-head { min-height:22px; height:22px; margin:0; padding:0; }
  .mkt-edit-top[data-mkt-node="source"] .mkt-edit-left > .mkt-pane-head > strong { font-size:13.5px; line-height:22px; }
  .mkt-edit-top[data-mkt-node="source"] .aile-src-preview-big { gap:3px; min-height:0; height:auto; }
  .mkt-edit-top[data-mkt-node="source"] .aile-src-preview-big img, .mkt-edit-top[data-mkt-node="source"] .aile-src-preview-big video { height:124px; max-height:124px; border-radius:8px; }
  .mkt-edit-top[data-mkt-node="source"] .aile-src-preview-big.empty { min-height:124px; }
  .mkt-edit-top[data-mkt-node="source"] .aile-src-preview-big figcaption { font-size:11.5px; line-height:16px; min-height:16px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .mkt-edit-top[data-mkt-node="source"] .aile-src-preview-big figcaption .mkt-ico { width:13px; height:13px; }
  .mkt-edit-top[data-mkt-node="source"] .mkt-edit-left > .aile-src-cur { display:none; }
  /* 已选素材 */
  .mkt-edit-top[data-mkt-node="source"] .mkt-edit-center.mkt-pane { padding:5px 8px 6px; }
  .mkt-edit-top[data-mkt-node="source"] .mkt-edit-center > .aile-flow-preview.mkt-preview-big { min-height:0; }
  .mkt-edit-top[data-mkt-node="source"] .aile-src-center { gap:5px; }
  .mkt-edit-top[data-mkt-node="source"] .aile-srcbar { justify-content:flex-end; padding:0; border-bottom:0; min-height:20px; }
  .mkt-edit-top[data-mkt-node="source"] .aile-srcbar > .aile-srcbar-pick { display:none; }
  .mkt-edit-top[data-mkt-node="source"] .aile-srcbar .aile-btn { position:relative; min-height:20px; height:20px; padding:0 10px; font-size:11.5px; line-height:18px; }
  .mkt-edit-top[data-mkt-node="source"] .aile-srcbar .aile-btn::after { content:""; position:absolute; left:-6px; right:0; top:-10px; bottom:-3px; }
  .mkt-edit-top[data-mkt-node="source"] .aile-srcfiles-bar { position:relative; min-height:24px; height:24px; margin:0; padding:0 10px; font-size:12.5px; line-height:22px; border-radius:7px; }
  .mkt-edit-top[data-mkt-node="source"] .aile-srcfiles-bar::after { content:""; position:absolute; left:0; right:0; top:-3px; bottom:-3px; }
  #marketing .aile-flow .mkt-edit-top[data-mkt-node="source"] .aile-srcfiles-bar em { font-size:11.5px; }
  .mkt-edit-top[data-mkt-node="source"] .aile-src-thumbs[data-aile-listfix] { box-sizing:border-box; height:176px; grid-auto-rows:84px; gap:8px; padding:0; margin:0; scrollbar-width:thin; }   /* 2 × 84 + 8 */
  .mkt-edit-top[data-mkt-node="source"] .aile-src-thumb { box-sizing:border-box; height:84px; gap:2px; padding:3px; border-radius:8px; }
  .mkt-edit-top[data-mkt-node="source"] .aile-src-thumb img, .mkt-edit-top[data-mkt-node="source"] .aile-src-thumb video, .mkt-edit-top[data-mkt-node="source"] .aile-src-thumb .ph { height:58px; min-height:0; flex:none; border-radius:6px; }
  .mkt-edit-top[data-mkt-node="source"] .aile-src-thumb-t { display:flex; align-items:baseline; gap:6px; padding:0 3px; min-height:18px; }
  .mkt-edit-top[data-mkt-node="source"] .aile-src-thumb-t b { flex:1 1 auto; min-width:0; font-size:12px; line-height:18px; }
  .mkt-edit-top[data-mkt-node="source"] .aile-src-thumb-t small { flex:none; margin:0; font-size:10.5px; line-height:18px; }
  .mkt-edit-top[data-mkt-node="source"] .aile-src-thumbs.empty { height:auto; }
  .mkt-edit-top[data-mkt-node="source"] .aile-src-center > .aile-src-hint { display:none; }
  /* 素材确认: 一行一项 */
  .mkt-edit-top[data-mkt-node="source"] .mkt-edit-right.mkt-pane.aile-flow-right { padding:5px 8px 6px; gap:0; row-gap:0; }
  .mkt-edit-top[data-mkt-node="source"] .mkt-edit-right > .mkt-pane-head { min-height:18px; height:18px; margin:0 0 3px; padding:0; }
  .mkt-edit-top[data-mkt-node="source"] .mkt-edit-right > .mkt-pane-head > strong { font-size:13.5px; line-height:18px; }
  .mkt-edit-top[data-mkt-node="source"] .aile-src-summary { gap:3px; padding:0; }
  .mkt-edit-top[data-mkt-node="source"] .aile-src-sum-row { grid-template-columns:15px auto minmax(0,1fr) auto; gap:6px; min-height:24px; height:24px; padding:0 8px; border-radius:7px; font-size:12.5px; }
  .mkt-edit-top[data-mkt-node="source"] .aile-src-sum-row > .mkt-ico { width:14px; height:14px; }
  .mkt-edit-top[data-mkt-node="source"] .aile-src-sum-row label, .mkt-edit-top[data-mkt-node="source"] .aile-src-sum-row b { font-size:12.5px; line-height:22px; }
  .mkt-edit-top[data-mkt-node="source"] .aile-src-sum-role .aile-btn { position:relative; grid-column:auto; justify-self:end; min-height:20px; height:20px; padding:0 8px; margin:0; font-size:11.5px; line-height:18px; white-space:nowrap; }
  .mkt-edit-top[data-mkt-node="source"] .aile-src-sum-role .aile-btn::after { content:""; position:absolute; left:-6px; right:-8px; top:-8px; bottom:-8px; }
  .mkt-edit-top[data-mkt-node="source"] .aile-src-sum-role .aile-btn .mkt-ico { display:none; }
  .mkt-edit-top[data-mkt-node="source"] .aile-src-ready { margin:3px 0 0; font-size:12.5px; line-height:18px; min-height:18px; }
  .mkt-edit-top[data-mkt-node="source"] .aile-src-ready .mkt-ico { width:14px; height:14px; }
  /* 主钮: 右侧让出助手球 */
  .mkt-edit-top[data-mkt-node="source"] .aile-src-summary > .aile-api-actions { margin:5px 0 0; padding:0 54px 0 0; }
  .mkt-edit-top[data-mkt-node="source"] .aile-src-summary .aile-btn.primary { position:relative; min-height:32px; height:32px; padding:0 8px; font-size:14px; line-height:30px; }
  .mkt-edit-top[data-mkt-node="source"] .aile-src-summary .aile-btn.primary::after { content:""; position:absolute; left:0; right:0; top:-2px; bottom:-2px; }
  .mkt-edit-top[data-mkt-node="source"] .aile-src-summary > .aile-src-next { display:none; }
}

/* ===== U27 WO-1950 第 3 条: 手机 结果页 整屏照定稿 REN-M-RESULT =====
   成片预览 → 当前成片卡(右侧「发布到公司」) → 封面与标题／导出设置／使用记录(留位) → 本项目成片(固定 1 行高, 区内滚)
   → 下载成片 → 打开营销项目库｜复制成片链接 → 说明 → 返回视频工坊; 整屏一屏、各钮在底栏之上。
   定稿没有的「当前成片可预览与下载」提示条、「交付操作」栏头在手机不显示; 版本待核时左右两句相同的提示只留中间那一句。只排版, 不改行为。 */
@media (max-width:760px){
  .mkt-edit-top[data-mkt-node="library"] { gap:4px; }
  /* 成片预览 */
  .mkt-edit-top[data-mkt-node="library"] .mkt-edit-left.mkt-pane { padding:4px 8px 5px; gap:3px; }
  .mkt-edit-top[data-mkt-node="library"] .aile-media-player { gap:3px; }
  .mkt-edit-top[data-mkt-node="library"] .aile-media-player-head { min-height:22px; height:22px; margin:0; padding:0; }
  .mkt-edit-top[data-mkt-node="library"] .aile-media-player-head b { font-size:13.5px; line-height:22px; }
  .mkt-edit-top[data-mkt-node="library"] .aile-media-player-head span { font-size:11.5px; }
  .mkt-edit-top[data-mkt-node="library"] .aile-media-player .aile-media-player-media { height:114px; min-height:0; max-height:114px; width:100%; object-fit:cover; border-radius:8px; }
  .mkt-edit-top[data-mkt-node="library"] .aile-media-player .aile-media-player-empty, .mkt-edit-top[data-mkt-node="library"] .aile-compose-pending-r1354 .aile-media-player-empty { min-height:0; height:114px; gap:4px; }
  .mkt-edit-top[data-mkt-node="library"] .aile-compose-pending-r1354 { gap:4px; }
  .mkt-edit-top[data-mkt-node="library"] .aile-compose-pending-r1354 .aile-media-player-empty small, .mkt-edit-top[data-mkt-node="library"] .aile-compose-pending-sub, .mkt-edit-top[data-mkt-node="library"] .aile-compose-pending-r1354 .aile-stale-note { font-size:11.5px; line-height:15px; }
  .mkt-edit-top[data-mkt-node="library"] .aile-media-player > .aile-stale-note { display:none; }
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-file { gap:6px; min-height:18px; padding:0 2px; border:0; background:transparent; font-size:12px; }
  #marketing .aile-flow .mkt-edit-top[data-mkt-node="library"] .aile-lib-file { background:transparent !important; border:0 !important; }
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-file .mkt-ico { width:13px; height:13px; }
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-file > div { display:flex; align-items:baseline; gap:8px; min-width:0; flex:1 1 auto; }
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-file b { flex:0 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; line-height:18px; }
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-file small { flex:none; margin:0; font-size:11px; line-height:18px; white-space:nowrap; }
  .mkt-edit-top[data-mkt-node="library"] .mkt-edit-left > .aile-lib-ok { display:none; }
  /* 当前成片卡 */
  .mkt-edit-top[data-mkt-node="library"] .mkt-edit-center.mkt-pane { padding:5px 8px 6px; }
  .mkt-edit-top[data-mkt-node="library"] .mkt-edit-center > .aile-flow-preview.mkt-preview-big { min-height:0; }
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-center { gap:4px; }
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-cur { grid-template-columns:32px minmax(0,1fr) auto; gap:3px 8px; padding:5px 8px; border-radius:8px; }
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-cur-ico { width:32px; height:32px; border-radius:7px; }
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-cur-ico .mkt-ico { width:17px; height:17px; }
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-cur-t b { font-size:13.5px; margin-right:6px; }
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-cur-t .aile-lib-badge { padding:0 7px; font-size:11px; line-height:16px; border-radius:6px; }
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-cur-t small { margin-top:1px; font-size:11.5px; line-height:15px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-cur > .aile-btn.aile-lib-pub { position:relative; grid-column:auto; min-height:24px; height:24px; padding:0 10px; font-size:12.5px; line-height:22px; white-space:nowrap; }
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-cur > .aile-btn.aile-lib-pub::after { content:""; position:absolute; left:-4px; right:-4px; top:-7px; bottom:-5px; }
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-saved { font-size:11.5px; line-height:15px; padding-top:3px; }
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-saved .mkt-ico { width:13px; height:13px; }
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-center > .aile-stale-note { margin:0; padding:3px 8px; font-size:11.5px; line-height:15px; border-radius:7px; }
  /* 三条留位行: 一行一项 */
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-acc { grid-template-columns:16px minmax(0,1fr) auto; gap:8px; min-height:25px; height:25px; padding:0 8px; border-radius:7px; }
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-acc > .mkt-ico { width:15px; height:15px; }
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-acc > div { display:flex; align-items:baseline; gap:8px; min-width:0; }
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-acc b { flex:none; font-size:12.5px; line-height:24px; }
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-acc small { flex:0 1 auto; min-width:0; margin:0; font-size:11px; line-height:24px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-acc .mkt-todo-tag { font-size:10.5px; white-space:nowrap; }
  /* 本项目成片: 固定 1 行高, 区内滚 */
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-box { padding:3px 8px 5px; border-radius:8px; }
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-box > .mkt-pane-head { min-height:18px; height:18px; margin:0 0 2px; padding:0; }
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-box > .mkt-pane-head > strong { font-size:12.5px; line-height:18px; }
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-list[data-aile-listfix] { height:30px; gap:4px; scrollbar-width:thin; }
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-list[data-aile-listfix] > .aile-lib-row { flex:none; box-sizing:border-box; min-height:30px; height:30px; grid-template-columns:15px minmax(0,1fr) auto auto; gap:6px; padding:0 8px; border-radius:7px; font-size:12px; }
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-row > .mkt-ico { width:14px; height:14px; }
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-row span { font-size:11px; }
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-row .aile-lib-cur-mark { font-size:13px; padding:0 2px; }
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-row .aile-btn.s { min-height:20px; height:20px; padding:0 8px; font-size:11px; line-height:18px; white-space:nowrap; }
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-none { min-height:0; height:48px; gap:2px; font-size:12px; flex-direction:row; }
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-none .mkt-ico { width:16px; height:16px; }
  /* 交付操作 */
  .mkt-edit-top[data-mkt-node="library"] .mkt-edit-right.mkt-pane.aile-flow-right { padding:5px 8px 5px; gap:0; row-gap:0; }
  .mkt-edit-top[data-mkt-node="library"] .mkt-edit-right > .mkt-pane-head { display:none; }
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-real { gap:4px; }
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-state { margin:0; font-size:12px; line-height:16px; min-height:16px; }
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-state .mkt-ico { width:13px; height:13px; }
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-acts { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:5px 8px; }
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-acts .aile-btn { position:relative; width:auto; min-width:0; min-height:26px; height:26px; padding:0 6px; font-size:12.5px; line-height:24px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-acts .aile-btn.aile-lib-dl { grid-column:1 / -1; min-height:30px; height:30px; font-size:14px; line-height:28px; }
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-acts .aile-btn::after { content:""; position:absolute; left:0; right:0; top:-2px; bottom:-3px; }
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-planned { padding:0 54px 0 0; border-bottom:0; font-size:11px; line-height:14px; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; }
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-planned .mkt-ico { width:12px; height:12px; }
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-back { min-height:20px; height:20px; padding:0 10px; font-size:12px; line-height:20px; }
}

/* ===== U27 WO-2020(令 CMD-1427) 第 1、2 条: 手机 05 总时长并进片段标题行; 手机结果页成片列表固定 2 条高; 手机 04 小热区加大(不撑高页面) ===== */
@media (max-width:760px){
  /* 1a 手机 05: 「N 个片段 · 总时长约 X 秒」显示在「视频片段」标题行里(排序钮左边), 不占高度 */
  .mkt-edit-top[data-mkt-node="compose"] .aile-compose-list { position:relative; }
  .mkt-edit-top[data-mkt-node="compose"] .aile-compose-list > .aile-compose-sum { display:flex; position:absolute; top:0; right:56px; height:22px; min-height:0; margin:0; padding:0; gap:0; border:0; border-radius:0; pointer-events:none; }
  #marketing .aile-flow .mkt-edit-top[data-mkt-node="compose"] .aile-compose-list > .aile-compose-sum { background:transparent !important; border:0 !important; box-shadow:none !important; }
  .mkt-edit-top[data-mkt-node="compose"] .aile-compose-sum > .mkt-ico, .mkt-edit-top[data-mkt-node="compose"] .aile-compose-sum > b { display:none; }
  .mkt-edit-top[data-mkt-node="compose"] .aile-compose-sum > span { margin:0; font-size:11px; line-height:22px; white-space:nowrap; }
  /* 1b 手机结果页: 成片列表固定 2 条高(30 + 4 + 30), 高度从预览、留位行、卡内分隔里匀 */
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-list[data-aile-listfix] { height:64px; }
  .mkt-edit-top[data-mkt-node="library"] .aile-media-player .aile-media-player-media { height:100px; max-height:100px; }
  .mkt-edit-top[data-mkt-node="library"] .aile-media-player .aile-media-player-empty, .mkt-edit-top[data-mkt-node="library"] .aile-compose-pending-r1354 .aile-media-player-empty { height:100px; }
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-file { min-height:16px; }
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-file b, .mkt-edit-top[data-mkt-node="library"] .aile-lib-file small { line-height:16px; }
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-center { gap:3px; }
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-saved { padding-top:0; border-top:0; }
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-acc { min-height:22px; height:22px; }
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-acc b, .mkt-edit-top[data-mkt-node="library"] .aile-lib-acc small { line-height:20px; }
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-row .aile-btn.s { position:relative; }
  .mkt-edit-top[data-mkt-node="library"] .aile-lib-row .aile-btn.s::after { content:""; position:absolute; left:-6px; right:-8px; top:-5px; bottom:-5px; }
  /* 2 手机 04: 四个下拉——上下各加一段透明边当热区(与相邻行平分空隙), 看得见的框不变高; 外框线改用内描边画 */
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right > .aile-media-route:not(:has([data-aile-script-model])) select { box-sizing:border-box; height:25px; min-height:25px; margin:-5px 0 -2px; border-style:solid; border-width:5px 1px 2px; border-top-color:transparent !important; border-bottom-color:transparent !important; background-clip:padding-box !important; box-shadow:inset 0 1px 0 var(--mkt-card-line, rgba(126,211,242,.35)), inset 0 -1px 0 var(--mkt-card-line, rgba(126,211,242,.35)) !important; }
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right > .aile-media-fldrow select { box-sizing:border-box; height:24px; min-height:24px; margin:-3px 0 -3px; border-style:solid; border-width:3px 1px 3px; border-top-color:transparent !important; border-bottom-color:transparent !important; background-clip:padding-box !important; box-shadow:inset 0 1px 0 var(--mkt-card-line, rgba(126,211,242,.35)), inset 0 -1px 0 var(--mkt-card-line, rgba(126,211,242,.35)) !important; }
  /* 2 来源四钮: 上面是不可点的标题行, 热区多往上要; 下面与参考条平分 */
  .mkt-edit-top[data-mkt-node="media"] .aile-media-srcbar .aile-btn.s::after { top:-8px; bottom:-3px; }
  /* 2 AI生成提示词: 上面与下拉行平分, 下面与提示词框平分 */
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right > .aile-media-uprompt-bar .aile-media-upgen-m::after { left:-10px; right:-4px; top:-6px; bottom:-3px; }
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right > .aile-media-uprompt-bar, .mkt-edit-top[data-mkt-node="media"] .aile-media-savebar { overflow:visible; }
  /* 2 保存当前稿: 上面与批量钮平分, 下面与过门钮平分 */
  .mkt-edit-top[data-mkt-node="media"] .aile-media-savebar > .aile-btn::after { left:-10px; right:-10px; top:-3px; bottom:-6px; }
}

/* ===== U28 WO-2050 第 2 条 b: 05 字幕／配音开关(定稿 REN-D-COMPOSE、REN-M-COMPOSE 都是开关)。原下拉留在页面里不显示。 ===== */
.aile-compose-setrow > select.aile-compose-swsel { display:none; }
.aile-switch { position:relative; justify-self:end; flex:none; width:46px; height:26px; min-height:26px; padding:0; border-radius:13px; border:1px solid rgba(126,211,242,.35); background:rgba(126,211,242,.14); cursor:pointer; transition:background .15s; }
#marketing .aile-flow .aile-switch { background:rgba(126,211,242,.14) !important; border:1px solid rgba(126,211,242,.35) !important; box-shadow:none !important; min-height:26px !important; padding:0 !important; }
#marketing .aile-flow .aile-switch.on { background:#0a73ff !important; border-color:#2a85ff !important; }
.aile-switch > i { position:absolute; left:3px; top:3px; width:18px; height:18px; border-radius:50%; background:#fff; transition:left .15s; }
.aile-switch.on > i { left:23px; }
.aile-switch::after { content:""; position:absolute; left:-6px; right:-6px; top:-6px; bottom:-6px; }
.aile-switch:focus-visible { outline:2px solid #7fd3f2; outline-offset:2px; }
@media (max-width:760px){
  .mkt-edit-top[data-mkt-node="compose"] .aile-switch { width:36px; height:20px; min-height:20px; border-radius:10px; }
  #marketing .aile-flow .mkt-edit-top[data-mkt-node="compose"] .aile-switch { min-height:20px !important; }
  .mkt-edit-top[data-mkt-node="compose"] .aile-switch > i { left:2px; top:2px; width:14px; height:14px; }
  .mkt-edit-top[data-mkt-node="compose"] .aile-switch.on > i { left:18px; }
  .mkt-edit-top[data-mkt-node="compose"] .aile-switch::after { left:-8px; right:-8px; top:-2px; bottom:-2px; }
}

/* U28 WO-2050: 桌面 05 片段预览——选中的片段是图片时也按定稿的预览高度(约 216)铺满裁切(原来图片只有 110 高) */
@media (min-width:761px){
  .mkt-edit-top[data-mkt-node="compose"] .aile-media-player > img.aile-media-player-media, .mkt-edit-top[data-mkt-node="compose"] .aile-media-player > video.aile-media-player-media { width:100%; height:216px; max-height:216px; object-fit:cover; }
}

/* U28 CMD-1429: 「已保存」真状态标记——默认不显示(手机定稿没有), 由桌面外壳分片(97 号)放出来 */
.mkt-projbar > .mkt-saved { display:none; }

/* U28 CMD-1429 册头②: 05 状态行「N 个片段已就绪 · 待合成」且可以合成时, 图标是绿色对勾(定稿) */
#marketing .aile-flow .aile-compose-status.ready > .mkt-ico { color:#2ee6b6 !important; opacity:1; }

/* ===== U28 WO-2120(CMD-1429 第 2 条): 桌面三处——04 右栏收紧(整页不滚)、03 分镜表固定 4 行表内滚(张工⑨)、01 左栏预览图定高(图按比例含在框内) ===== */
@media (min-width:761px){
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right.mkt-pane { gap:7px; }
  .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right > .aile-media-uprompt { min-height:58px; height:58px; }
  .mkt-edit-top[data-mkt-node="script"] table.aile-script-shots { display:block; height:252px; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; }   /* 表头 36 + 4 行 × 54 */
  .mkt-edit-top[data-mkt-node="script"] table.aile-script-shots > thead, .mkt-edit-top[data-mkt-node="script"] table.aile-script-shots > tbody { display:table; width:100%; table-layout:fixed; }
  .mkt-edit-top[data-mkt-node="script"] table.aile-script-shots > thead { position:sticky; top:0; z-index:1; }
  .mkt-edit-top[data-mkt-node="script"] table.aile-script-shots > thead th { background:#0d2a52; }
  .mkt-edit-top[data-mkt-node="script"] table.aile-script-shots > tbody > tr { height:54px; }
  .mkt-edit-top[data-mkt-node="script"] table.aile-script-shots th, .mkt-edit-top[data-mkt-node="script"] table.aile-script-shots td { padding-top:6px; padding-bottom:6px; }
  .mkt-edit-top[data-mkt-node="source"] .aile-src-preview-big img, .mkt-edit-top[data-mkt-node="source"] .aile-src-preview-big video { height:225px; max-height:225px; object-fit:contain; background:rgba(0,0,0,.28); }
}

/* U28 WO-2150 第 5 条: 手机 03「确认脚本，进入媒体」按定稿 REN-M-VIDEO 是蓝色实心主钮(桌面定稿 REN-D-VIDEO 是描边钮, 桌面不变) */
@media (max-width:760px){
  #marketing #mkt-tab-canvas .aile-flow .mkt-edit-top[data-mkt-node="script"] .aile-script-acts button.aile-btn.aile-script-confirm:not(:disabled) { background:linear-gradient(180deg,#0a73ff,#0055fe) !important; border-color:#2a85ff !important; color:#fff !important; box-shadow:none !important; }
  #marketing #mkt-tab-canvas .aile-flow .mkt-edit-top[data-mkt-node="script"] .aile-script-acts button.aile-btn.aile-script-confirm:disabled { background:rgba(10,98,255,.22) !important; border-color:rgba(42,133,255,.45) !important; color:rgba(255,255,255,.6) !important; }
}

/* U28 WO-2220 第 2 条 b: 结果页交付操作三个钮的禁用态做明显(待补／待核／没有成片时「下载成片」「复制成片链接」是禁用的, 原来看不出来) */
#marketing .aile-flow .mkt-edit-top[data-mkt-node="library"] .aile-lib-acts .aile-btn:disabled { opacity:.45 !important; border-style:dashed !important; cursor:not-allowed; filter:saturate(.35); }
#marketing .aile-flow .mkt-edit-top[data-mkt-node="library"] .aile-lib-acts .aile-btn.primary:disabled { background:rgba(10,98,255,.18) !important; color:rgba(255,255,255,.7) !important; }
/* ACCOUNT-API-SANDBOX-LOCAL-PROBE-R1-20260624-08 */
.api-sandbox-r1 {
  border-color: rgba(94, 192, 224, 0.42);
}

.api-sandbox-context {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.api-sandbox-context span,
.api-sandbox-flags span {
  min-width: 0;
  border: 1px solid rgba(105, 176, 204, 0.28);
  border-radius: 6px;
  background: rgba(7, 24, 35, 0.74);
  color: rgba(226, 244, 250, 0.86);
  font-size: 12px;
  line-height: 1.4;
  padding: 8px 10px;
  overflow-wrap: anywhere;
}

.api-sandbox-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(180px, 1fr));
  gap: 10px;
}

.api-sandbox-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 238px;
  border: 1px solid rgba(98, 174, 205, 0.3);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(18, 43, 57, 0.86), rgba(5, 19, 30, 0.92));
  padding: 12px;
}

.api-sandbox-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.api-sandbox-card-head strong {
  color: #e5f7fb;
  font-size: 14px;
  line-height: 1.35;
  text-align: right;
}

.api-sandbox-card dl {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 6px 8px;
  margin: 0;
  color: rgba(221, 241, 248, 0.86);
  font-size: 12px;
}

.api-sandbox-card dt {
  color: rgba(169, 203, 216, 0.8);
}

.api-sandbox-card dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.api-sandbox-flags {
  display: grid;
  gap: 6px;
}

.api-sandbox-card button,
.api-sandbox-module-badge button {
  align-self: flex-start;
  margin-top: auto;
  border: 1px solid rgba(122, 197, 222, 0.5);
  border-radius: 6px;
  background: rgba(22, 58, 77, 0.86);
  color: #effcff;
  padding: 7px 12px;
  font-weight: 700;
}

.api-sandbox-card button:hover {
  background: rgba(39, 91, 115, 0.95);
}

.api-sandbox-audit {
  margin-top: 12px;
  border: 1px solid rgba(98, 174, 205, 0.28);
  border-radius: 8px;
  background: rgba(4, 17, 27, 0.66);
  padding: 12px;
}

.api-sandbox-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.api-sandbox-section-head strong {
  color: #e7f9fc;
}

.api-sandbox-section-head small,
.api-sandbox-audit-row small,
.api-sandbox-audit-row span {
  color: rgba(183, 215, 225, 0.76);
}

.api-sandbox-audit-list {
  display: grid;
  gap: 8px;
}

.api-sandbox-worker-url {
  display: grid;
  gap: 5px;
  margin: 4px 0 8px;
  color: rgba(183, 215, 225, 0.76);
  font-size: 11px;
}

.api-sandbox-worker-url input {
  min-width: 0;
  border: 1px solid rgba(107, 194, 222, 0.26);
  border-radius: 6px;
  background: rgba(4, 17, 27, 0.72);
  color: #e7f9fc;
  padding: 7px 8px;
}

.api-sandbox-audit-row,
.api-sandbox-empty {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(96, 154, 179, 0.22);
  border-radius: 6px;
  background: rgba(8, 29, 42, 0.72);
  color: rgba(232, 249, 252, 0.9);
  padding: 9px 10px;
}

.api-sandbox-module-badge {
  display: grid;
  grid-template-columns: minmax(140px, auto) minmax(0, 1fr);
  gap: 6px 14px;
  margin: 0 0 12px;
  border: 1px solid rgba(107, 194, 222, 0.34);
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(16, 50, 66, 0.88), rgba(6, 23, 35, 0.72));
  color: #e7f9fc;
  padding: 10px 12px;
}

.api-sandbox-module-badge strong {
  color: #ffffff;
}

.api-sandbox-module-badge span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.api-sandbox-module-badge small {
  grid-column: 1 / -1;
  color: rgba(183, 215, 225, 0.76);
}

@media (max-width: 1280px) {
  .api-sandbox-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
  .api-sandbox-context {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .api-sandbox-grid,
  .api-sandbox-context,
  .api-sandbox-module-badge {
    grid-template-columns: 1fr;
  }
}

.api-sandbox-debug-drawer {
  border: 1px solid rgba(125, 166, 255, 0.22);
  border-radius: 8px;
  background: rgba(12, 18, 34, 0.42);
  padding: 10px 12px;
}

.api-sandbox-debug-drawer summary {
  cursor: pointer;
  color: rgba(231, 238, 255, 0.86);
  font-size: 12px;
  font-weight: 700;
}

.api-sandbox-debug-drawer:not([open]) > :not(summary) {
  display: none;
}
/* ACCOUNT-USABILITY-TRIAL-FLOW-R2-20260624-12 */
.account-usability-home,
.account-usability-module-badge {
  border-color: rgba(119, 203, 224, 0.38);
}

.account-usability-home {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.account-usability-top {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(220px, 320px) minmax(120px, 160px);
  gap: 12px;
  align-items: stretch;
}

.account-usability-identity,
.account-usability-counts,
.account-usability-switcher,
.account-usability-write-preview,
.account-usability-popover {
  border: 1px solid rgba(113, 180, 205, 0.28);
  border-radius: 8px;
  background: rgba(6, 22, 34, 0.72);
  color: #e7f8fc;
}

.account-usability-identity {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
}

.account-usability-avatar {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #d2f5fb, #7fc2d6);
  color: #04131a;
  font-size: 20px;
  font-weight: 900;
}

.account-usability-identity div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.account-usability-identity strong,
.account-usability-write-preview strong,
.account-usability-module-main strong,
.account-usability-popover strong {
  color: #ffffff;
}

.account-usability-identity small,
.account-usability-module-main small,
.account-usability-popover small {
  color: rgba(201, 229, 237, 0.76);
  overflow-wrap: anywhere;
}

.account-usability-switcher {
  display: grid;
  gap: 7px;
  padding: 10px;
  font-size: 12px;
}

.account-usability-switcher select {
  min-height: 36px;
  border: 1px solid rgba(122, 194, 218, 0.42);
  border-radius: 6px;
  background: #081724;
  color: #effcff;
  padding: 0 8px;
}

.account-usability-counts {
  display: grid;
  place-items: center;
  padding: 10px;
  text-align: center;
}

.account-usability-counts strong {
  color: #bdf6d6;
  font-size: 24px;
}

.account-usability-counts small {
  color: rgba(201, 229, 237, 0.74);
}

.account-usability-module-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  gap: 8px;
}

.account-usability-module-grid article {
  min-height: 104px;
  display: grid;
  gap: 6px;
  align-content: start;
  border: 1px solid rgba(113, 180, 205, 0.24);
  border-radius: 8px;
  background: rgba(5, 18, 29, 0.72);
  padding: 10px;
}

.account-usability-module-grid article.allowed {
  border-color: rgba(89, 220, 151, 0.35);
}

.account-usability-module-grid article.blocked {
  border-color: rgba(255, 159, 159, 0.38);
  background: rgba(44, 20, 24, 0.42);
}

.account-usability-module-grid strong {
  color: #effcff;
}

.account-usability-module-grid span {
  color: #bdf6d6;
  font-size: 12px;
  font-weight: 800;
}

.account-usability-module-grid .blocked span {
  color: #ffb9b9;
}

.account-usability-module-grid small {
  color: rgba(201, 229, 237, 0.72);
  line-height: 1.45;
}

.account-usability-sensitive-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.account-usability-sensitive-row span {
  border: 1px solid rgba(113, 180, 205, 0.26);
  border-radius: 999px;
  background: rgba(7, 25, 37, 0.74);
  color: rgba(230, 246, 250, 0.86);
  padding: 6px 10px;
  font-size: 12px;
}

.account-usability-sensitive-row span.blocked {
  border-color: rgba(255, 159, 159, 0.36);
  color: #ffcbcb;
}

.account-usability-sensitive-row span.allowed {
  border-color: rgba(89, 220, 151, 0.36);
  color: #c9ffd9;
}

.account-usability-write-preview {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.account-usability-ownership-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.account-usability-ownership-grid span {
  min-width: 0;
  border: 1px solid rgba(113, 180, 205, 0.22);
  border-radius: 6px;
  background: rgba(3, 14, 23, 0.58);
  color: rgba(231, 248, 252, 0.88);
  padding: 7px 8px;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.account-usability-ownership-grid b {
  display: block;
  margin-bottom: 3px;
  color: rgba(159, 211, 228, 0.8);
  font-size: 11px;
  font-weight: 700;
}

.account-usability-module-badge {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(360px, 1.1fr);
  gap: 12px;
  margin: 0 0 12px;
  border: 1px solid rgba(119, 203, 224, 0.34);
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(15, 48, 63, 0.86), rgba(5, 21, 33, 0.76));
  padding: 12px;
}

.account-usability-module-badge.blocked {
  border-color: rgba(255, 165, 165, 0.34);
  background: linear-gradient(90deg, rgba(55, 28, 32, 0.78), rgba(10, 21, 31, 0.76));
}

.account-usability-module-main {
  display: grid;
  gap: 7px;
}

.account-usability-popover {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
}

.account-usability-popover button {
  min-height: 32px;
  border: 1px solid rgba(127, 184, 200, 0.48);
  border-radius: 6px;
  background: rgba(24, 47, 64, 0.86);
  color: #e7f6fb;
  cursor: pointer;
}

@media (max-width: 1320px) {
  .account-usability-module-grid {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }
  .account-usability-top,
  .account-usability-module-badge {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .account-usability-module-grid,
  .account-usability-ownership-grid {
    grid-template-columns: 1fr;
  }
  .account-usability-identity {
    align-items: flex-start;
  }
}

.account-usability-debug-drawer {
  border: 1px solid rgba(125, 166, 255, 0.22);
  border-radius: 8px;
  background: rgba(12, 18, 34, 0.42);
  padding: 10px 12px;
}

.account-usability-debug-drawer summary {
  cursor: pointer;
  color: rgba(231, 238, 255, 0.86);
  font-size: 12px;
  font-weight: 700;
}

.account-usability-debug-drawer:not([open]) > :not(summary) {
  display: none;
}
/* ACCOUNT-UX-ONBOARDING-PERMISSION-REPLAN-R3-20260624-13 */
.account-ux-home-r3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 12px 0 14px;
  padding: 12px 14px;
  border: 1px solid rgba(120, 199, 224, 0.26);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(12, 38, 52, 0.78), rgba(5, 20, 31, 0.68));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.account-ux-home-r3-main,
.account-ux-menu-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.account-ux-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  background: linear-gradient(135deg, #d6f7fb, #77c5d7);
  color: #03131a;
  font-weight: 900;
}

.account-ux-home-r3 strong,
.account-ux-menu-card strong,
.account-ux-permission-r3 strong,
.account-ux-modal strong {
  color: #f2fbfd;
}

.account-ux-home-r3 small,
.account-ux-menu-card small,
.account-ux-permission-r3 small,
.account-ux-modal small {
  color: rgba(205, 229, 236, 0.72);
}

.account-ux-home-r3-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.account-ux-home-r3 button,
.account-ux-menu-card button,
.account-ux-modal button,
.account-ux-invite-row button {
  min-height: 34px;
  border: 1px solid rgba(132, 200, 219, 0.44);
  border-radius: 7px;
  background: rgba(18, 45, 61, 0.9);
  color: #ecfbff;
  padding: 0 11px;
  cursor: pointer;
}

.account-ux-home-r3 button:hover,
.account-ux-menu-card button:hover,
.account-ux-modal button:hover,
.account-ux-invite-row button:hover {
  border-color: rgba(145, 225, 246, 0.75);
  background: rgba(28, 68, 88, 0.95);
}

.account-ux-status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid rgba(104, 219, 158, 0.35);
  border-radius: 999px;
  background: rgba(20, 77, 53, 0.42);
  color: #caffdf;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.account-ux-menu-anchor-r49a {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  margin-left: auto;
}

.account-ux-menu-anchor-r49a > .account-ux-menu-r3 {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 2600;
  width: min(290px, calc(100vw - 28px));
}

.account-ux-menu-r3.hidden {
  display: none;
}

.account-ux-menu-card {
  display: grid;
  gap: 0;
  border: 1px solid rgba(124, 193, 215, 0.34);
  border-radius: 12px;
  background: rgba(5, 19, 30, 0.96);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  padding: 10px;
}

.account-menu-head-r49a {
  min-height: 64px;
  padding: 6px 8px 12px;
}

.account-menu-head-r49a .account-ux-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  font-size: 21px;
}

.account-menu-head-home-r49a {
  grid-template-columns: 44px minmax(0, 1fr) auto;
  min-height: 54px;
  padding: 2px 4px 10px;
}

.account-menu-head-home-r49a .account-ux-avatar {
  width: 42px;
  height: 42px;
  font-size: 17px;
}

.account-menu-head-home-ordinary-r49a {
  padding-right: 8px;
}

.account-menu-identity-r49a {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.account-menu-identity-r49a strong,
.account-menu-identity-r49a small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* TASK153: compact only the narrow sidebar subtitle; name and home-surface ellipsis stay above. */
.account-ux-menu-card[data-account-menu-surface="sidebar"] .account-menu-identity-r49a small {
  min-width: 0;
  max-width: 100%;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
  overflow-wrap: normal;
  font-size: 12px;
  line-height: 17px;
}

.account-menu-divider-r49a {
  height: 1px;
  margin: 2px 0;
  background: rgba(148, 193, 204, 0.22);
}

.account-menu-role-chip-r49a {
  align-self: center;
  border: 1px solid rgba(135, 164, 156, 0.32);
  border-radius: 999px;
  background: rgba(132, 155, 148, 0.12);
  color: inherit;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.account-menu-current-workspace-r49a {
  display: grid;
  gap: 7px;
  padding: 8px 8px 13px;
}

.account-menu-current-workspace-r49a small {
  color: rgba(225, 239, 236, 0.52);
  font-size: 11px;
}

.account-menu-current-workspace-r49a strong {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #edf8f8;
  font-size: 13px;
}

.account-menu-current-workspace-r49a strong > span {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #66c994;
}

.account-ux-menu-card .account-menu-action-r49a {
  width: 100%;
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #edf8f8;
  padding: 0 10px;
  text-align: left;
}

.account-ux-menu-card .account-menu-action-r49a:hover {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.08);
}

.account-ux-menu-card .account-menu-action-r49a.danger {
  border: 0 !important;
  background: transparent !important;
  color: #f07b76 !important;
}

.account-ux-menu-card .account-menu-action-r49a.danger > span {
  color: #f07b76;
}

.account-menu-workspace-state-r49a {
  display: grid;
  gap: 3px;
  margin: 6px 4px;
  padding: 10px;
  border: 1px solid rgba(132, 200, 219, 0.24);
  border-radius: 8px;
  background: rgba(13, 37, 48, 0.72);
}

.account-menu-workspace-state-r49a > span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.account-menu-workspace-state-r49a strong,
.account-menu-workspace-state-r49a small {
  line-height: 1.45;
  white-space: normal;
}

.account-menu-workspace-state-r49a strong {
  font-size: 12px;
}

.account-menu-workspace-state-r49a small {
  font-size: 11px;
}

.account-menu-workspace-state-r49a:is(.is-idle, .is-error) {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border-color: rgba(240, 123, 118, 0.34);
  background: rgba(104, 34, 38, 0.24);
}

.account-ux-menu-card .account-menu-workspace-state-r49a button {
  min-height: 28px;
  border-radius: 6px;
  padding: 0 9px;
  font-size: 12px;
}

.account-ux-menu-card .account-menu-workspace-state-r49a button:disabled {
  cursor: wait;
  opacity: 0.56;
}

.account-menu-icon-r49a {
  width: 22px;
  height: 22px;
  display: inline-block;
  flex: 0 0 auto;
  background: currentColor;
  -webkit-mask: center / contain no-repeat;
  mask: center / contain no-repeat;
}

.account-menu-icon-r49a.account {
  -webkit-mask-image: url("assets/ui/icons/lucide-user-round.svg");
  mask-image: url("assets/ui/icons/lucide-user-round.svg");
}

.account-menu-icon-r49a.logout {
  -webkit-mask-image: url("assets/ui/icons/gravity-ui-nut-hex.svg");
  mask-image: url("assets/ui/icons/gravity-ui-nut-hex.svg");
}

.account-menu-icon-r49a.workspace {
  -webkit-mask-image: url("assets/ui/icons/lucide-repeat-2.svg");
  mask-image: url("assets/ui/icons/lucide-repeat-2.svg");
}

.account-menu-icon-r49a.chevron-up {
  -webkit-mask-image: url("assets/ui/icons/lucide-chevron-up.svg");
  mask-image: url("assets/ui/icons/lucide-chevron-up.svg");
}

.account-menu-icon-r49a.chevron-right {
  width: 16px;
  height: 16px;
  margin-left: auto;
  -webkit-mask-image: url("assets/ui/icons/lucide-chevron-up.svg");
  mask-image: url("assets/ui/icons/lucide-chevron-up.svg");
  transform: rotate(90deg);
}

.account-ux-menu-card .account-menu-collapse-r49a {
  width: 30px;
  min-height: 30px;
  display: grid;
  place-items: center;
  margin-left: auto;
  border: 0;
  background: transparent;
  color: rgba(232, 246, 244, 0.76);
  padding: 0 4px;
  font-size: 12px;
}

.account-popover {
  position: static;
  left: auto;
  bottom: auto;
  width: 100%;
  margin-top: auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.account-popover .account-ux-menu-card {
  border-color: rgba(151, 223, 248, 0.28);
  background: rgba(18, 45, 43, 0.96);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* R587: keep the day surface; the inner night card uses the existing blue material. */
html[data-meifan-theme="tech-glass-blue"] .account-popover .account-ux-menu-card {
  background: var(--surface-strong);
  border-color: var(--tech-glass-border);
  color: var(--ink);
}

/* Animate the stable outer panel, not children that R49 may rebuild. Close stays immediate. */
.account-popover:not(.hidden) {
  animation: sidebarAccountEnterR587 140ms cubic-bezier(.23, 1, .32, 1);
}
@keyframes sidebarAccountEnterR587 {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .account-popover:not(.hidden) { animation: none; }
}

.account-popover .account-menu-card-r49a {
  border-radius: 18px;
  padding: 14px 16px;
}

html[data-meifan-theme="day"] body.home-mode .account-ux-menu-card {
  border-color: #dde3dc;
  background: #fffefa;
  box-shadow: 0 18px 46px rgba(38, 48, 42, 0.16);
}

html[data-meifan-theme="day"] body.home-mode .account-ux-menu-card :is(strong, small) {
  color: #27322e;
}

html[data-meifan-theme="day"] body.home-mode .account-ux-menu-card small {
  color: #737d77;
}

html[data-meifan-theme="day"] body.home-mode .account-menu-current-workspace-r49a strong,
html[data-meifan-theme="day"] body.home-mode .account-menu-role-chip-r49a {
  color: #27322e;
}

html[data-meifan-theme="day"] body.home-mode .account-ux-menu-card .account-menu-divider-r49a {
  background: #e5e9e3;
}

html[data-meifan-theme="day"] body.home-mode .account-ux-menu-card .account-menu-action-r49a {
  color: #2e3834;
}

html[data-meifan-theme="day"] body.home-mode .account-ux-menu-card .account-menu-action-r49a:hover {
  background: #f3f5f1;
}

html[data-meifan-theme="day"] body.home-mode .account-ux-menu-card .account-menu-action-r49a.danger {
  border: 0 !important;
  background: transparent !important;
  color: #f07b76 !important;
}

html[data-meifan-theme="day"] body.home-mode .account-menu-workspace-state-r49a {
  border-color: #dce3dd;
  background: #f6f8f4;
}

html[data-meifan-theme="day"] body.home-mode .account-menu-workspace-state-r49a.is-error {
  border-color: #efd0cc;
  background: #fff4f1;
}

html[data-meifan-theme="day"] body.home-mode .account-menu-workspace-state-r49a button {
  border-color: #cbd8cf;
  background: #ffffff;
  color: #27322e;
}

.account-ux-demo-switch select,
.account-ux-modal input,
.account-ux-modal select,
.account-ux-modal textarea,
.account-ux-member-table select,
.account-ux-invite-row input,
.account-ux-invite-row select {
  width: 100%;
  min-height: 34px;
  border: 1px solid rgba(128, 193, 213, 0.36);
  border-radius: 7px;
  background: rgba(5, 17, 27, 0.92);
  color: #f0fbfe;
  padding: 0 9px;
}

.account-ux-modal textarea {
  padding: 9px;
}

.account-usability-home {
  display: none !important;
}

.account-ux-r3-restricted .account-usability-module-badge .account-usability-ownership-grid {
  display: none !important;
}

.account-usability-module-badge.account-ux-r3-sanitized {
  grid-template-columns: 1fr;
}

.account-ux-permission-r3 {
  margin-bottom: 14px;
  border-color: rgba(117, 197, 224, 0.34);
}

.account-ux-permission-r3.blocked {
  border-color: rgba(255, 163, 163, 0.34);
}

.account-ux-permission-layout {
  display: grid;
  grid-template-columns: minmax(360px, 1.08fr) minmax(340px, 0.92fr);
  gap: 12px;
}

.account-ux-permission-card {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(113, 181, 205, 0.26);
  border-radius: 8px;
  background: rgba(4, 18, 29, 0.66);
  padding: 12px;
}

.account-ux-permission-card[data-account-ux-members],
.account-ux-permission-card[data-account-ux-role-policy] {
  min-height: 240px;
}

.account-ux-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.account-ux-member-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid rgba(108, 174, 198, 0.22);
  border-radius: 8px;
}

.account-ux-member-table th,
.account-ux-member-table td {
  border-bottom: 1px solid rgba(108, 174, 198, 0.18);
  padding: 8px;
  text-align: left;
  vertical-align: top;
}

.account-ux-member-table th {
  background: rgba(19, 48, 65, 0.78);
  color: rgba(216, 240, 246, 0.82);
  font-size: 12px;
}

.account-ux-member-table td {
  color: rgba(235, 249, 252, 0.9);
}

.account-ux-member-table td small {
  display: block;
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.account-ux-role-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.account-ux-role-grid article,
.account-ux-scope-grid span,
.account-ux-log-list li,
.account-ux-denied {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(110, 177, 200, 0.22);
  border-radius: 8px;
  background: rgba(6, 23, 36, 0.76);
  padding: 9px;
}

.account-ux-role-grid span {
  color: #c6f5dc;
  font-size: 12px;
  font-weight: 800;
}

.account-ux-role-grid em {
  color: rgba(247, 218, 154, 0.82);
  font-style: normal;
  font-size: 12px;
}

.account-ux-invite-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 160px auto;
  gap: 8px;
  align-items: center;
}

.account-ux-scope-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.account-ux-log-list {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.account-ux-log-list li span {
  color: rgba(225, 242, 247, 0.82);
}

.account-ux-internal-debug {
  margin-top: 12px;
  border: 1px solid rgba(247, 218, 154, 0.28);
  border-radius: 8px;
  background: rgba(43, 35, 17, 0.38);
  color: rgba(255, 241, 203, 0.9);
  padding: 10px;
}

.account-ux-internal-debug summary {
  cursor: pointer;
  font-weight: 800;
}

.account-ux-internal-debug dl {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 6px 10px;
  margin: 10px 0 0;
}

.account-ux-internal-debug dt {
  color: rgba(255, 229, 168, 0.72);
}

.account-ux-internal-debug dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.account-ux-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  background: rgba(0, 8, 14, 0.7);
  backdrop-filter: blur(14px);
}

.account-ux-modal {
  width: min(520px, calc(100vw - 28px));
  display: grid;
  gap: 12px;
  border: 1px solid rgba(126, 199, 222, 0.36);
  border-radius: 10px;
  background: rgba(6, 20, 31, 0.98);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.48);
  padding: 14px;
}

.account-ux-modal-head,
.account-ux-modal-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.account-ux-modal-tabs {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.account-ux-modal-tabs button.active {
  border-color: rgba(105, 224, 161, 0.58);
  background: rgba(15, 83, 55, 0.72);
}

.account-ux-modal-body {
  display: grid;
  gap: 10px;
}

.account-ux-modal-body label {
  display: grid;
  gap: 6px;
  color: rgba(223, 242, 247, 0.88);
}

@media (max-width: 980px) {
  .account-ux-home-r3,
  .account-ux-permission-layout,
  .account-ux-invite-row {
    grid-template-columns: 1fr;
  }
  .account-ux-home-r3 {
    display: grid;
  }
  .account-ux-home-r3-actions {
    justify-content: flex-start;
  }
  .account-ux-permission-layout,
  .account-ux-role-grid,
  .account-ux-scope-grid {
    grid-template-columns: 1fr;
  }
}
/* 第580单域B(A09): 全局公告中心 */
.global-notice-bell { position: relative; }
.global-notice-bell b[data-notice-unread] { position: absolute; top: -6px; right: -6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #b3402f; color: #fff; font-size: 10px; line-height: 16px; text-align: center; }
.global-notice-panel { position: fixed; top: 56px; right: 18px; z-index: 320; width: 340px; max-width: calc(100vw - 24px); max-height: 70vh; overflow-y: auto; background: var(--panel-bg, #fff); border: 1px solid var(--line, #e5e1d9); border-radius: 12px; box-shadow: 0 14px 40px rgba(0, 0, 0, .22); padding: 10px; }
.global-notice-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 10px; border-bottom: 1px solid var(--line, #e5e1d9); margin-bottom: 8px; }
.global-notice-empty { padding: 10px 6px; color: var(--muted, #5c6862); font-size: 12.5px; }
.global-notice-item { border-bottom: 1px dashed var(--line, #e5e1d9); padding: 6px 2px; }
.global-notice-item:last-child { border-bottom: 0; }
.global-notice-item-head { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; border: 0; background: transparent; text-align: left; cursor: pointer; font-family: inherit; padding: 6px 4px; }
.global-notice-item-head strong { flex: 1; font-size: 13px; }
.global-notice-item-head small { color: var(--muted, #5c6862); font-size: 11px; }
.global-notice-dot { width: 8px; height: 8px; border-radius: 50%; background: #b3402f; flex: 0 0 8px; }
.global-notice-body { padding: 4px 6px 8px 20px; font-size: 12.5px; line-height: 1.7; white-space: pre-wrap; }
.global-notice-acts { padding: 0 6px 6px 20px; }
/* 第580单域B(A02): 账号菜单项 44px 可达目标(a11y) */
.account-ux-menu-card .account-menu-action-r49a { min-height: 44px; display: flex; align-items: center; }

/* CMD729 Q18: share the notice typography without the fixed overlay geometry. */
.home-notice-block-r729 { margin: 12px 0 16px; padding: 14px; border: 1px solid var(--line, #e5e1d9); border-radius: 12px; background: var(--panel-bg, #fff); min-width: 0; }
.home-notice-block-r729 .global-notice-item-head strong { min-width: 0; overflow-wrap: anywhere; }
.home-notice-block-r729 .global-notice-item-head small { flex-shrink: 0; white-space: nowrap; }
@media (max-width: 480px) { .home-notice-block-r729 .global-notice-item-head { flex-wrap: wrap; } .home-notice-block-r729 .global-notice-item-head strong { flex-basis: 100%; } }
/* ACCOUNT-DEDICATED-LOGIN-PAGE-R1-20260625-01 */
/* LOGIN-PARTICLE-UX-R2-20260625-02 */
/* UI-LOGIN-HOME-CLEANUP-VISUAL-R2-SHELL-FIX-20260625-12 */
/* LOGIN-DAY-THEME-R1-20260703-01 · 登录页语义token先行收口：night=现状默认值(视觉零变化)，day=暖白+墨绿+黄铜金轻奢定调 */
body.account-login-mode {
  overflow: hidden;
  background: #020711;
}

body.account-login-mode.login-theme-day {
  background: #f4f5f2;
}

body.account-login-mode .app-shell {
  display: none !important;
}

body.account-login-mode :is(
  .app-shell,
  .sidebar,
  .main,
  #moduleGrid,
  #sidebarAccountButton,
  .home-account-badge,
  .account-popover,
  #r14-operator,
  [data-full-trial-r1],
  [data-account-ux-home-r3],
  [data-account-usability-home-r2]
) {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body.account-authenticated-mode .account-ux-home-r3,
body.account-authenticated-mode .account-usability-home {
  display: none !important;
}

.account-login-settings-denied-r1 {
  border-color: rgba(110, 204, 255, .34);
  background:
    linear-gradient(140deg, rgba(14, 45, 64, .96), rgba(4, 17, 30, .94)),
    rgba(8, 23, 38, .96);
}

.account-login-denied-card {
  margin-top: 14px;
  padding: 18px;
  border: 1px solid rgba(98, 188, 232, .22);
  border-radius: 8px;
  background: rgba(4, 15, 27, .7);
  color: #d8efff;
}

.account-login-denied-card strong {
  display: block;
  margin-bottom: 8px;
  color: #f5fbff;
}

.account-login-denied-card p {
  margin: 0;
  color: #9fb9ca;
}

#meifanDedicatedLoginRoot:empty {
  display: none;
}

/* ===== 登录页语义 token（LOGIN-DAY-THEME-R1）：night=现状值收口(视觉零变化)，day=暖白+墨绿+黄铜金 ===== */
.meifan-login-page {
  /* night 默认：值=夜晚真实生效值（部分元素夜晚实际由 09 全局科技玻璃着色，收口取 09 生效值） */
  --text-strong: #effbff;
  --text-primary: #effbff;
  --text-secondary: #effbff;
  --text-muted: rgba(206, 222, 235, 0.82);
  --text-soft: rgba(201, 219, 234, 0.72);
  --tools-ink: rgba(229, 242, 251, 0.86);
  --remember-ink: #effbff;
  --text-link: #4aa8ff;
  --border-glass: rgba(127, 184, 226, 0.24);
  --border-glass-inner: rgba(127, 184, 226, 0.2);
  --border-input: rgba(126, 211, 242, 0.24);
  --border-topbar: rgba(122, 186, 233, 0.13);
  --bg-panel: linear-gradient(145deg, rgba(10, 22, 37, 0.74), rgba(8, 20, 34, 0.58));
  --bg-input:
    linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.022)),
    rgba(5, 18, 28, 0.68);
  --bg-float-card: linear-gradient(145deg, rgba(15, 53, 88, 0.62), rgba(7, 25, 47, 0.38));
  --border-float-card: rgba(66, 163, 255, 0.4);
  --accent: linear-gradient(135deg, #4bb3ff, #2f68ff);
  --accent-contrast: #ffffff;
  --accent-shadow: 0 16px 38px rgba(40, 115, 255, 0.34);
  --brand-gold: #e7b45f;
  --tab-active-line: #43a9ff;
  --tab-active-ink: #ffffff;
  --tab-idle-ink: rgba(201, 219, 234, 0.72);
  --shadow-panel: 0 30px 120px rgba(0, 0, 0, 0.46), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  --shadow-float-card: 0 18px 70px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  --placeholder-ink: rgba(198, 224, 235, 0.46);
  --state-danger-ink: #ffb7b7;
  --checkbox-accent: #4ba9ff;
  --logo-ink: rgba(255, 255, 255, 0.92);
  --demo-border: rgba(109, 189, 255, 0.4);
  --demo-bg: rgba(17, 55, 82, 0.68);
  --demo-ink: #ffffff;
  --foot-ink: rgba(212, 226, 238, 0.72);
  --foot-line: rgba(191, 219, 239, 0.38);
  --badge-border: rgba(65, 224, 207, 0.42);
  --badge-bg: rgba(16, 91, 96, 0.35);
  --badge-ink: #a7fff5;
  --divider-gold: rgba(231, 180, 95, 0.85);
}

.meifan-login-page[data-login-theme="day"] {
 /* day：暖白影棚底 + 墨绿 ink + 黄铜金点缀 */
  --text-strong: #16211f;
  --text-primary: #1e2524;
  --text-secondary: #3c4744;
  --text-muted: #4b5450;
  --text-soft: #5f6864;
  --tools-ink: #47504c;
  --remember-ink: #3c4744;
  --text-link: #2563eb;
  --border-glass: #e3e6e0;
  --border-glass-inner: #eceee9;
  --border-input: #d8ddd6;
  --border-topbar: rgba(30, 37, 36, 0.08);
  --bg-panel: linear-gradient(160deg, #ffffff, #fbfcfa);
  --bg-input: #fbfcfa;
  --bg-float-card: linear-gradient(150deg, rgba(255, 255, 255, 0.92), rgba(250, 250, 247, 0.78));
  --border-float-card: #e6e9e4;
  --accent: linear-gradient(150deg, #24403c, #1d3230);
  --accent-contrast: #f6f3ec;
  --accent-shadow: 0 14px 30px rgba(29, 50, 48, 0.24);
  --brand-gold: #b8863b;
  --tab-active-line: #1d3230;
  --tab-active-ink: #16211f;
  --tab-idle-ink: #8b9490;
  --shadow-panel: 0 24px 70px rgba(25, 35, 32, 0.12), 0 2px 8px rgba(25, 35, 32, 0.05);
  --shadow-float-card: 0 16px 44px rgba(25, 35, 32, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --placeholder-ink: #a4aca8;
  --state-danger-ink: #b24b45;
  --checkbox-accent: #1d3230;
  --logo-ink: #1e2524;
  --demo-border: #d8ddd6;
  --demo-bg: #ffffff;
  --demo-ink: #3c4744;
  --foot-ink: #4b5450;
  --foot-line: rgba(30, 37, 36, 0.16);
  --badge-border: rgba(184, 134, 59, 0.55);
  --badge-bg: rgba(184, 134, 59, 0.07);
  --badge-ink: #9a6f2e;
  --divider-gold: #b8863b;
}

.meifan-login-page {
  position: fixed;
  inset: 0;
  z-index: 5000;
  min-height: 100dvh;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
  color: var(--text-primary);
  background:
    radial-gradient(circle at 73% 63%, rgba(42, 158, 255, 0.2), transparent 28%),
    radial-gradient(circle at 23% 68%, rgba(103, 194, 255, 0.16), transparent 26%),
    linear-gradient(125deg, #02050d 0%, #061122 42%, #020711 100%);
}

.meifan-login-canvas,
.meifan-login-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.meifan-login-canvas {
  z-index: 1;
  opacity: .92;
  mix-blend-mode: screen;
}

.login-particle-field-r2 {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: .58;
  mix-blend-mode: screen;
  background:
    linear-gradient(98deg, transparent 0 16%, rgba(115, 202, 255, .08) 16.4% 16.8%, transparent 17.2% 39%, rgba(82, 166, 255, .06) 39.3% 39.7%, transparent 40.1%),
    radial-gradient(circle at 72% 48%, rgba(101, 210, 255, .18), transparent 23%),
    radial-gradient(circle at 27% 67%, rgba(44, 149, 255, .14), transparent 27%);
  filter: saturate(1.15);
}

.login-particle-field-r2::before,
.login-particle-field-r2::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.login-particle-field-r2::before {
  left: 8%;
  right: 6%;
  bottom: 9%;
  height: 35%;
  background:
    linear-gradient(90deg, transparent, rgba(137, 220, 255, .18), transparent),
    repeating-linear-gradient(100deg, rgba(108, 202, 255, .18) 0 1px, transparent 1px 74px),
    repeating-linear-gradient(0deg, rgba(103, 184, 255, .08) 0 1px, transparent 1px 42px);
  transform: perspective(760px) rotateX(64deg) translateY(30px);
  transform-origin: bottom;
}

.login-particle-field-r2::after {
  inset: 14% 5% 20% 46%;
  border-left: 1px solid rgba(142, 220, 255, .18);
  border-right: 1px solid rgba(142, 220, 255, .10);
  background:
    linear-gradient(90deg, rgba(255,255,255,.04), transparent 40%),
    repeating-linear-gradient(90deg, rgba(134, 215, 255, .10) 0 1px, transparent 1px 92px);
  transform: skewY(-8deg);
}

.meifan-login-bg {
  z-index: 0;
}

.meifan-login-bg::before {
  content: "";
  position: absolute;
  inset: 16% -5% 0 40%;
  background:
    linear-gradient(90deg, transparent, rgba(45, 150, 255, 0.18), transparent),
    repeating-linear-gradient(90deg, rgba(101, 185, 255, 0.12) 0 1px, transparent 1px 78px);
  transform: skewY(-10deg);
  opacity: 0.56;
}

.meifan-login-bg::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10%;
  height: 34%;
  background:
    linear-gradient(90deg, transparent 0%, rgba(72, 180, 255, 0.22) 51%, transparent 100%),
    repeating-linear-gradient(100deg, rgba(85, 181, 255, 0.18) 0 1px, transparent 1px 88px);
  transform: perspective(620px) rotateX(63deg) translateY(38px);
  transform-origin: bottom;
  opacity: 0.72;
}

.login-light-door {
  position: absolute;
  left: 22%;
  bottom: 18%;
  width: 86px;
  height: 270px;
  background: linear-gradient(180deg, rgba(180, 229, 255, 0.88), rgba(52, 151, 237, 0.18));
  filter: blur(1px);
  box-shadow: 0 0 70px rgba(83, 183, 255, 0.5);
  opacity: 0.55;
}

.login-orbit {
  position: absolute;
  border: 1px solid rgba(75, 174, 255, 0.36);
  border-radius: 50%;
  transform: rotate(-8deg);
}

.orbit-a {
  right: -8%;
  top: 27%;
  width: 48vw;
  height: 10vw;
}

.orbit-b {
  left: 3%;
  bottom: 9%;
  width: 42vw;
  height: 9vw;
}

.login-glass-line {
  position: absolute;
  border: 1px solid rgba(84, 184, 255, 0.22);
  background: linear-gradient(180deg, rgba(87, 173, 255, 0.1), transparent);
}

.line-a {
  right: 22%;
  bottom: 22%;
  width: 180px;
  height: 300px;
}

.line-b {
  right: 9%;
  bottom: 18%;
  width: 260px;
  height: 380px;
}

/* 夜间「宇宙满星」：去掉背景透视网格/竖玻璃线,只留星海canvas+星云微光
 （横竖线太多没必要,要满星宇宙感） */
.meifan-login-page[data-login-theme="night"] .login-particle-field-r2::before,
.meifan-login-page[data-login-theme="night"] .login-particle-field-r2::after,
.meifan-login-page[data-login-theme="night"] .meifan-login-bg::before,
.meifan-login-page[data-login-theme="night"] .meifan-login-bg::after,
.meifan-login-page[data-login-theme="night"] .login-glass-line {
  display: none !important;
}

.meifan-login-page[data-login-theme="night"] .login-orbit {
  opacity: 0.09 !important;
}

.meifan-login-page[data-login-theme="night"] .login-particle-field-r2 {
  opacity: 0.7 !important;
  background:
    radial-gradient(circle at 72% 42%, rgba(101, 210, 255, 0.12), transparent 32%),
    radial-gradient(circle at 24% 68%, rgba(70, 140, 220, 0.09), transparent 36%),
    radial-gradient(circle at 50% 88%, rgba(58, 120, 200, 0.06), transparent 40%) !important;
}

.meifan-login-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 82px;
  padding: 0 34px;
  border-bottom: 1px solid var(--border-topbar);
}

.meifan-login-wordmark,
.meifan-login-tools {
  display: flex;
  align-items: center;
  gap: 16px;
}

.meifan-login-wordmark strong {
  letter-spacing: 10px;
  color: var(--text-strong);
  font-size: 15px;
}

.meifan-diamond,
.brand-diamond-large,
.login-brand-mark {
  display: inline-block;
  width: 34px;
  height: 34px;
  color: var(--logo-ink);
  filter: drop-shadow(0 0 10px rgba(91, 188, 255, 0.35));
}

.brand-diamond-large {
  width: 54px;
  height: 54px;
}

.meifan-login-page .login-brand-mark {
  width: 74px;
  height: 74px;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.brand-mark-wrap {
  display: inline-flex;
  line-height: 0;
}

.meifan-login-tools button {
  border: 0;
  background: transparent;
  color: var(--tools-ink);
  cursor: pointer;
  font-size: 15px;
  white-space: nowrap;
}

.meifan-login-tools [data-login-theme-toggle-r1] {
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid var(--border-input);
  border-radius: 999px;
  font-size: 13px;
}

.meifan-login-stage {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(720px, 0.62fr) minmax(380px, 0.38fr);
  align-items: center;
  width: min(1580px, calc(100vw - 80px));
  margin: 0 auto;
  gap: 34px;
}

.meifan-login-card {
  position: relative;
  z-index: 3;
  min-height: 630px;
  display: grid;
  grid-template-columns: 1fr 1.06fr;
  overflow: hidden;
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  background: var(--bg-panel);
  box-shadow: var(--shadow-panel);
  backdrop-filter: blur(18px);
}

.meifan-login-brand-panel,
.meifan-login-form-panel {
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 54px 58px;
}

.meifan-login-brand-panel {
  border-right: 1px solid var(--border-glass-inner);
  text-align: center;
}

.meifan-login-identity {
  display: grid;
  justify-items: center;
  gap: 18px;
  max-width: 430px;
}

.meifan-login-identity h1 {
  margin: 0;
}

.meifan-login-identity p {
  margin: 0;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1.7;
}

.meifan-login-brand-panel small {
  margin-top: 22px;
  color: var(--text-muted);
  letter-spacing: 8px;
}

.meifan-login-brand-panel h1 {
  margin: 10px 0 0;
  color: var(--text-strong);
  font-size: clamp(34px, 3.2vw, 48px);
  letter-spacing: 0;
}

.brand-en {
  margin: 0;
  color: var(--text-muted);
  letter-spacing: 8px;
  font-size: 13px;
}

.brand-divider {
  display: block;
  width: 46px;
  height: 3px;
  border-radius: 2px;
  background: var(--divider-gold);
}

.brand-line {
  margin: 28px 0 0;
  color: var(--text-muted);
  font-size: 18px;
}

.portal-visual {
  position: relative;
  width: min(360px, 100%);
  height: 210px;
  margin-top: 34px;
  overflow: hidden;
  border-bottom: 1px solid rgba(117, 187, 240, 0.22);
}

.portal-visual::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 70px;
  height: 180px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(236, 250, 255, 0.96), rgba(77, 171, 248, 0.05));
  box-shadow: 0 0 70px rgba(103, 201, 255, 0.48);
}

.portal-visual::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 80px;
  background: repeating-linear-gradient(100deg, rgba(86, 174, 248, 0.25) 0 1px, transparent 1px 50px);
  transform: perspective(360px) rotateX(66deg);
  transform-origin: bottom;
}

.internal-badge {
  margin-top: 20px;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  border: 1px solid var(--badge-border);
  border-radius: 7px;
  background: var(--badge-bg);
  color: var(--badge-ink);
  padding: 0 18px;
  font-weight: 800;
}

.meifan-login-form-panel {
  justify-items: stretch;
}

.login-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--border-glass-inner);
}

.login-tabs button {
  min-height: 52px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--tab-idle-ink);
  font-size: 22px;
  font-weight: 800;
  cursor: pointer;
}

.login-tabs button.active {
  border-bottom-color: var(--tab-active-line);
  color: var(--tab-active-ink);
}

.login-auth-form {
  display: grid;
  gap: 20px;
}

.login-auth-form label {
  display: grid;
  gap: 8px;
  color: var(--text-secondary);
  font-weight: 700;
}

.login-auth-form input,
.password-field {
  min-height: 58px;
  border: 1px solid var(--border-input);
  border-radius: 7px;
  background: var(--bg-input);
  color: var(--text-primary);
}

.login-auth-form input {
  padding: 0 18px;
}

.login-auth-form input::placeholder {
  color: var(--placeholder-ink);
}

.password-field {
  display: grid;
  grid-template-columns: 1fr 48px;
  align-items: center;
}

.password-field input {
  min-height: 56px;
  border: 0;
  background: transparent;
}

.password-field button {
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
}

.login-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
  color: var(--text-soft);
}

.remember-row {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 8px !important;
  font-size: 14px;
}

.remember-row input {
  min-height: auto;
  width: 18px;
  height: 18px;
  accent-color: var(--checkbox-accent);
}

.text-action,
.login-trial-link {
  border: 0;
  background: transparent;
  color: var(--text-link);
  cursor: pointer;
}

.login-primary,
.login-demo-entry {
  min-height: 60px;
  border: 0;
  border-radius: 7px;
  color: var(--accent-contrast);
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
}

.login-primary {
  margin-top: 8px;
  background: var(--accent);
  box-shadow: var(--accent-shadow);
}

.login-demo-entry {
  border: 1px solid var(--demo-border);
  background: var(--demo-bg);
  color: var(--demo-ink);
  font-size: 16px;
}

.login-trial-link {
  min-height: 34px;
}

.login-auth-error {
  min-height: 22px;
  color: var(--state-danger-ink);
  font-size: 13px;
}

.sms-placeholder {
  color: var(--text-soft);
  font-size: 13px;
}

/* 登录钮下方小字链接（BIZ-01 定稿：居中、链接色；沿用既有 --text-link 变量，零新颜色） */
.login-post-note-r1 {
  margin: 10px 0 0;
  color: var(--text-link);
  font-size: 12px;
  text-align: center;
}

.login-floating-modules {
  position: relative;
  min-height: 640px;
}

.floating-module-card {
  position: absolute;
  width: 230px;
  min-height: 112px;
  display: grid;
  align-content: center;
  gap: 10px;
  border: 1px solid var(--border-float-card);
  border-radius: 10px;
  background: var(--bg-float-card);
  box-shadow: var(--shadow-float-card);
  backdrop-filter: blur(14px);
  padding: 22px;
}

.floating-module-card strong {
  color: var(--text-primary);
  font-size: 20px;
}

.floating-module-card small {
  color: var(--text-muted);
}

.card-1 { left: 0; top: 16%; }
.card-2 { right: 9%; top: 12%; width: 275px; min-height: 150px; }
.card-3 { left: 12%; top: 40%; width: 205px; }
.card-4 { right: 0; top: 56%; }

.meifan-login-foot {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 84px;
  color: var(--foot-ink);
}

.meifan-login-foot .foot-shield {
  flex: none;
}

.meifan-login-foot::before,
.meifan-login-foot::after {
  content: "";
  width: min(280px, 18vw);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--foot-line));
}

.meifan-login-foot::after {
  background: linear-gradient(90deg, var(--foot-line), transparent);
}

/* ===== 登录页与全局科技玻璃(09)的隔离提权：09 的 body:not(.home-mode) 系规则 specificity 更高，
   这些元素夜晚实际由 09 着色；此处以 .meifan-login-page 前缀提权，让 token 在昼夜两套都真实生效 ===== */
.meifan-login-page .meifan-login-brand-panel h1,
.meifan-login-page .meifan-login-wordmark strong {
  color: var(--text-strong);
}

.meifan-login-page .floating-module-card strong {
  color: var(--text-primary);
}

.meifan-login-page .floating-module-card small {
  color: var(--text-soft);
}

.meifan-login-page .login-auth-form label {
  color: var(--text-secondary);
}

.meifan-login-page .remember-row {
  color: var(--remember-ink);
}

.meifan-login-page .meifan-login-identity p {
  color: var(--text-muted);
}

.meifan-login-page .brand-en {
  color: var(--text-muted);
  font-size: 12px;
  letter-spacing: 6px;
  white-space: nowrap;
}

.meifan-login-page .meifan-login-card .login-auth-form input,
.meifan-login-page .meifan-login-card .password-field {
  border-color: var(--border-input);
  background: var(--bg-input);
  color: var(--text-primary);
}

.meifan-login-page .meifan-login-card .password-field input {
  border: 0;
  background: transparent;
}

.meifan-login-page .meifan-login-card .login-auth-form input::placeholder {
  color: var(--placeholder-ink);
}

.meifan-login-page[data-login-theme="day"] .login-auth-form input:focus,
.meifan-login-page[data-login-theme="day"] .password-field input:focus {
  outline: 2px solid rgba(29, 50, 48, 0.35);
  outline-offset: 2px;
  border-color: #1d3230;
}

.meifan-login-page[data-login-theme="day"] .login-auth-form input,
.meifan-login-page[data-login-theme="day"] .password-field {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

/* ===== DAY 场景层重表达：白瓷影棚 + 晨光金，暗底玻璃不做反色（LOGIN-DAY-THEME-R1）===== */
.meifan-login-page[data-login-theme="day"] {
  background:
    radial-gradient(circle at 74% 20%, rgba(184, 134, 59, 0.07), transparent 34%),
    radial-gradient(circle at 18% 72%, rgba(45, 111, 122, 0.05), transparent 30%),
    linear-gradient(168deg, #f8f9f6 0%, #f2f4f0 48%, #e9ece7 100%);
}

.meifan-login-page[data-login-theme="day"] .meifan-login-canvas {
  mix-blend-mode: normal;
  opacity: .95;
}

.meifan-login-page[data-login-theme="day"] .login-particle-field-r2 {
  mix-blend-mode: normal;
  opacity: .55;
  filter: none;
  background:
    linear-gradient(98deg, transparent 0 16%, rgba(30, 37, 36, .04) 16.4% 16.8%, transparent 17.2% 39%, rgba(120, 130, 122, .05) 39.3% 39.7%, transparent 40.1%),
    radial-gradient(circle at 72% 48%, rgba(255, 255, 255, .7), transparent 23%),
    radial-gradient(circle at 27% 67%, rgba(30, 37, 36, .04), transparent 27%);
}

.meifan-login-page[data-login-theme="day"] .login-particle-field-r2::before {
  background:
    linear-gradient(90deg, transparent, rgba(30, 37, 36, .06), transparent),
    repeating-linear-gradient(100deg, rgba(30, 37, 36, .05) 0 1px, transparent 1px 74px),
    repeating-linear-gradient(0deg, rgba(30, 37, 36, .03) 0 1px, transparent 1px 42px);
}

.meifan-login-page[data-login-theme="day"] .login-particle-field-r2::after {
  border-left-color: rgba(30, 37, 36, .07);
  border-right-color: rgba(30, 37, 36, .04);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .5), transparent 40%),
    repeating-linear-gradient(90deg, rgba(30, 37, 36, .04) 0 1px, transparent 1px 92px);
}

.meifan-login-page[data-login-theme="day"] .meifan-login-bg::before {
  background:
    linear-gradient(90deg, transparent, rgba(30, 37, 36, 0.05), transparent),
    repeating-linear-gradient(90deg, rgba(30, 37, 36, 0.05) 0 1px, transparent 1px 78px);
  opacity: 0.5;
}

.meifan-login-page[data-login-theme="day"] .meifan-login-bg::after {
  background:
    linear-gradient(90deg, transparent 0%, rgba(30, 37, 36, 0.06) 51%, transparent 100%),
    repeating-linear-gradient(100deg, rgba(30, 37, 36, 0.07) 0 1px, transparent 1px 88px);
  opacity: 0.5;
}

.meifan-login-page[data-login-theme="day"] .login-light-door {
  background: linear-gradient(180deg, rgba(255, 244, 214, 0.95), rgba(184, 134, 59, 0.06));
  box-shadow: 0 0 90px rgba(222, 189, 128, 0.55);
  filter: blur(2px);
  opacity: 0.6;
}

.meifan-login-page[data-login-theme="day"] .login-orbit {
  border-color: rgba(30, 37, 36, 0.1);
}

.meifan-login-page[data-login-theme="day"] .login-glass-line {
  border-color: rgba(30, 37, 36, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.65), transparent);
  box-shadow: 0 18px 44px rgba(25, 35, 32, 0.06);
}

.meifan-login-page[data-login-theme="day"] .meifan-diamond,
.meifan-login-page[data-login-theme="day"] .login-brand-mark {
  filter: none;
}

.meifan-login-page[data-login-theme="day"] .meifan-login-card {
  backdrop-filter: none;
}

.meifan-login-page[data-login-theme="day"] .meifan-login-brand-panel {
  background: linear-gradient(165deg, #fdfdfb, #f7f8f4);
}

.meifan-login-page[data-login-theme="day"] .portal-visual {
  border-bottom-color: rgba(30, 37, 36, 0.1);
}

.meifan-login-page[data-login-theme="day"] .portal-visual::before {
  background: linear-gradient(180deg, rgba(255, 247, 226, 0.98), rgba(184, 134, 59, 0.05));
  box-shadow: 0 0 60px rgba(222, 189, 128, 0.5);
}

.meifan-login-page[data-login-theme="day"] .portal-visual::after {
  background: repeating-linear-gradient(100deg, rgba(30, 37, 36, 0.09) 0 1px, transparent 1px 50px);
}

/* ===== 登录律师正式稿 + 特殊确认（2026-07-07）：复用既有语义 token，视觉对齐 shard19，不撞主题UI =====
   token 来源：本文件登录页语义层（--text-link/--checkbox-accent/--state-danger-ink/--bg-panel/
   --border-glass/--text-soft/--text-primary/--text-secondary/--text-strong/--shadow-panel），昼夜自动跟随 */
.login-agreement-gate-r1 {
  margin: -6px 0 2px;
  font-size: 13px;
  color: var(--text-soft);
}

.login-agreement-gate-r1 .agreement-check-row {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: flex-start;
  gap: 8px !important;
  font-weight: 600;
  line-height: 1.6;
  cursor: pointer;
}

.login-agreement-gate-r1 .agreement-check-row input {
  min-height: auto;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--checkbox-accent);
  flex: none;
}

.login-agreement-gate-r1 .agreement-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-link);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.login-agreement-gate-r1 .agreement-link:hover {
  text-decoration: underline;
}

/* 未勾门禁选中态：.off 提示未同意，.on 已放行 */
.login-agreement-gate-r1.off .agreement-check-row {
  color: var(--state-danger-ink);
}

/* 主按钮门禁视觉：未勾时暗掉（门禁真行为 + 肉眼可见）；点击仍进 handler 弹人话提示 */
.login-auth-form .login-primary.agreement-gated-off,
.login-auth-form .login-demo-entry.agreement-gated-off,
.login-auth-form .login-primary[aria-disabled="true"],
.login-auth-form .login-primary:disabled,
.login-auth-form .login-demo-entry[aria-disabled="true"] {
  opacity: 0.42;
  cursor: not-allowed;
  filter: grayscale(0.3);
}

/* 协议正式稿弹层 / 特殊确认弹层：共用面板/玻璃 token，昼夜自动跟随 */
.login-agreement-modal-mask-r1,
.login-special-confirm-mask-r1 {
  position: fixed;
  inset: 0;
  z-index: 6000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(2, 7, 17, 0.62);
  backdrop-filter: blur(4px);
}

.login-agreement-modal-r1,
.login-special-confirm-r1 {
  width: min(560px, 100%);
  max-height: 78vh;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  background: var(--bg-panel);
  box-shadow: var(--shadow-panel);
  color: var(--text-primary);
  overflow: hidden;
}

.login-agreement-modal-r1 .agreement-modal-head,
.login-special-confirm-r1 .special-confirm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-glass-inner);
}

.login-agreement-modal-r1 .agreement-modal-head strong,
.login-special-confirm-r1 .special-confirm-head strong {
  color: var(--text-strong);
  font-size: 18px;
}

.login-agreement-modal-r1 .agreement-modal-ver {
  margin-left: 8px;
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
  color: var(--text-soft);
}

.login-agreement-modal-r1 .agreement-modal-close,
.login-special-confirm-r1 .special-confirm-close {
  min-height: 32px;
  min-width: 32px;
  border: 0;
  background: transparent;
  color: var(--text-soft);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

/* 正式稿性质声明条：明确 AI 起草试用稿、非真人律师终审、主体占位待填 */
.login-agreement-modal-r1 .agreement-modal-notice {
  margin: 0;
  padding: 12px 22px;
  background: rgba(214, 158, 46, 0.1);
  border-bottom: 1px solid var(--border-glass-inner);
  color: var(--state-danger-ink);
  font-size: 12.5px;
  line-height: 1.6;
}

.login-agreement-modal-r1 .agreement-modal-body,
.login-special-confirm-r1 .special-confirm-body {
  padding: 18px 22px 24px;
  overflow: auto;
}

.login-agreement-modal-r1 .agreement-modal-body p,
.login-special-confirm-r1 .special-confirm-body p {
  margin: 0 0 12px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.75;
}

.login-special-confirm-r1 .special-confirm-body p:first-child {
  color: var(--text-strong);
  font-weight: 700;
}

.login-special-confirm-r1 .special-confirm-asset {
  color: var(--text-soft) !important;
  font-size: 12.5px !important;
}

.login-special-confirm-r1 .special-confirm-foot {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 14px 22px 20px;
  border-top: 1px solid var(--border-glass-inner);
}

.login-special-confirm-r1 .special-confirm-cancel,
.login-special-confirm-r1 .special-confirm-ok {
  min-height: 38px;
  padding: 0 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.login-special-confirm-r1 .special-confirm-cancel {
  border: 1px solid var(--border-glass);
  background: transparent;
  color: var(--text-soft);
}

.login-special-confirm-r1 .special-confirm-ok {
  border: 0;
  background: var(--text-link);
  color: #fff;
}

@media (max-width: 760px) {
  .login-agreement-modal-r1,
  .login-special-confirm-r1 {
    max-height: 84vh;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .floating-module-card {
    animation: loginFloat 7s ease-in-out infinite;
  }
  .card-2 { animation-delay: -2s; }
  .card-3 { animation-delay: -4s; }
  .card-4 { animation-delay: -1s; }
  .login-orbit {
    animation: loginPulse 9s ease-in-out infinite;
  }
}

@media (prefers-reduced-motion: reduce) {
  .meifan-login-canvas,
  .login-particle-field-r2 {
    display: none;
  }
  .floating-module-card,
  .login-orbit {
    animation: none !important;
  }
}

@keyframes loginFloat {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -14px, 0); }
}

@keyframes loginPulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.72; }
}

@media (max-width: 1180px) {
  .meifan-login-stage {
    grid-template-columns: 1fr;
    width: min(930px, calc(100vw - 36px));
    padding: 34px 0;
  }
  .login-floating-modules {
    display: none;
  }
}

@media (max-width: 760px) {
  body.account-login-mode {
    overflow: auto;
  }
  .meifan-login-page {
    position: relative;
    min-height: 100dvh;
    overflow: hidden auto;
  }
  .login-particle-field-r2 {
    opacity: .34;
    background:
      radial-gradient(circle at 58% 22%, rgba(99, 196, 255, .15), transparent 26%),
      radial-gradient(circle at 50% 82%, rgba(72, 151, 255, .12), transparent 34%);
  }
  .meifan-login-page[data-login-theme="day"] .login-particle-field-r2 {
    opacity: .3;
    background:
      radial-gradient(circle at 58% 22%, rgba(255, 250, 236, .7), transparent 26%),
      radial-gradient(circle at 50% 82%, rgba(184, 134, 59, .07), transparent 34%);
  }
  .meifan-login-top {
    min-height: 70px;
    padding: 0 18px;
  }
  .meifan-login-wordmark strong {
    letter-spacing: 6px;
  }
  .meifan-login-tools {
    gap: 8px;
  }
  .meifan-login-tools button {
    font-size: 12px;
  }
  .meifan-login-tools [data-login-theme-toggle-r1] {
    min-height: 32px;
    padding: 0 10px;
  }
  .meifan-login-card {
    min-height: auto;
    grid-template-columns: 1fr;
  }
  .meifan-login-brand-panel,
  .meifan-login-form-panel {
    padding: 30px 22px;
  }
  .meifan-login-brand-panel {
    border-right: 0;
    border-bottom: 1px solid rgba(127, 184, 226, 0.2);
  }
  .meifan-login-identity {
    gap: 14px;
  }
  .meifan-login-identity p {
    font-size: 15px;
  }
  .portal-visual {
    height: 128px;
    margin-top: 20px;
  }
  .brand-en {
    letter-spacing: 4px;
  }
  .login-tabs button {
    font-size: 18px;
  }
  .login-row {
    align-items: flex-start;
    flex-direction: column;
  }
  .meifan-login-foot {
    min-height: 60px;
    padding: 0 18px 20px;
    text-align: center;
  }
  .meifan-login-foot::before,
  .meifan-login-foot::after {
    display: none;
  }
}

/* ===== 白天·静态背景(去粒子) 2026-07-10 纠: 太黄不统一→与主页同款 #f2f4f0, 去金菱形水印 ===== */
[data-login-page][data-login-theme="day"] {
  background: #f2f4f0;
}

/* ===== 修复浏览器自动填充(autofill)白底: Chrome 保存的账号密码填入时默认白底, 用 inset 阴影盖成主题色 2026-07-07 ===== */
[data-login-page][data-login-theme="night"] input:-webkit-autofill,
[data-login-page][data-login-theme="night"] input:-webkit-autofill:hover,
[data-login-page][data-login-theme="night"] input:-webkit-autofill:focus,
[data-login-page][data-login-theme="night"] input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px rgba(9, 20, 30, 0.98) inset !important;
  -webkit-text-fill-color: #eaf5ff !important;
  caret-color: #eaf5ff;
  transition: background-color 99999s ease-in-out 0s;
}
[data-login-page][data-login-theme="day"] input:-webkit-autofill,
[data-login-page][data-login-theme="day"] input:-webkit-autofill:hover,
[data-login-page][data-login-theme="day"] input:-webkit-autofill:focus,
[data-login-page][data-login-theme="day"] input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px #fbf8f1 inset !important;
  -webkit-text-fill-color: #2a2f2c !important;
  caret-color: #2a2f2c;
  transition: background-color 99999s ease-in-out 0s;
}

/* ===== UI-POLISH-BATCH-R1-20260710 优化清单v2纯视觉批(登录页) ===== */
/* 一-1 (P1·CSS部分) 「已阅读并同意…」未勾时整段常态红——错误色只应在校验失败后出现(Stripe/HIG):
   默认回中性 soft；提交未勾变红+抖动+就近提示属 JS 部分另批。昼夜共用。 */
.login-agreement-gate-r1.off .agreement-check-row {
  color: var(--text-soft);
}

/* 一-4 (P1) 忘记密码/申请试用/注册账号/区域负责人登录 全是通用蓝链接与金+墨绿品牌冲突:
   day 链接 token 换墨绿(夜间蓝玻璃语境保持现状)；hover 补下划线反馈(昼夜) */
.meifan-login-page[data-login-theme="day"] {
  --text-link: #2f5d4e;
}
.text-action:hover,
.login-trial-link:hover {
  text-decoration: underline;
}

/* 一-5 (P1) 右侧浮动卡「项目管理」(card-1)左缘顶进中间登录面板被裁:
   右移出安全边距(实测面板右缘=浮卡区左缘 0 间距)。1180px 以下浮卡区整体 display:none 不受影响。 */
.card-1 { left: 26px; }

/* ===== MOBILE-POLISH-R1-20260711 · 登录页移动端 =====
   实测 390px 视口：.meifan-login-top/.meifan-login-foot 为纵向 flex 的子项，
   min-width:auto 地板 = min-content(395px) > 视口 → 顶栏右缘"简体中文"被裁；
   顶栏工具钮实测 17px 高 < 触控最低要求。昼夜通用。 */
@media (max-width: 760px) {
  .meifan-login-top {
    min-width: 0;
    flex-wrap: wrap;
    min-height: 0;
    padding: 10px 14px;
    gap: 2px 12px;
  }
  .meifan-login-wordmark strong { letter-spacing: 4px; }
  .meifan-login-tools { flex-wrap: wrap; }
  .meifan-login-tools button {
    min-height: 40px;
    padding: 0 8px;
  }
  .meifan-login-tools [data-login-theme-toggle-r1] { min-height: 40px; }
  .meifan-login-foot {
    min-width: 0;
    flex-wrap: wrap;
    padding: 0 16px 18px;
    text-wrap: balance;
  }
}

/* SELF-SIGNUP-R1(2026-07-10 去区域·合流遗漏恢复) 错误 UX：注册字段校验失败标红(硬要求:错误可见+聚焦,禁静默)。输入即消红。 */
.account-login-mode [data-login-form-r1="register"] .field-error-r1 {
  border-color: #e5484d !important;
  box-shadow: 0 0 0 2px rgba(229, 72, 77, 0.18);
  outline: none;
}

/* PARTNER-ENTRY-20260725: 页脚【美梵业务合作中心】入口——小字低调,不影响现有排布 */
.meifan-login-partner-entry { border: none; background: none; color: var(--foot-ink); font-size: 12px; opacity: .72; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; padding: 2px 4px; font-family: inherit; }
.meifan-login-partner-entry:hover { opacity: 1; }

/* P1-6(试用批20260726): 登录页输入框交互——
   ① 夜间(默认)主题补 focus 视觉反馈(此前只有 day 变体:点击聚焦了但毫无视觉变化,被误判"点击无反应");
   ② 右侧浮动装饰卡整卡 pointer-events:none(纯展示无交互元素,杜绝任何遮挡输入框的可能)。 */
.login-auth-form input:focus,
.password-field input:focus {
  outline: 2px solid rgba(125, 211, 252, .55);
  outline-offset: 2px;
  border-color: rgba(125, 211, 252, .85);
}
.floating-module-card { pointer-events: none; }

/* LOGIN-REGISTER-FOUR-STATES-L1-20260727：只调整右侧中央表单，不改登录外壳。 */
.login-field-pair-r1 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}

/* R5 自由开通图的密码与确认密码纵排；审核模式保留原两栏。 */
[data-register-mode-r151="free"] .login-field-pair-r1 {
  grid-template-columns: minmax(0, 1fr);
}

/* O256: 注册入口只开放装修；餐饮卡保留现行图面的位置并诚实标示未接入。 */
.meifan-login-page[data-login-active-tab-r256="register"] {
  overflow-y: auto;
}
.login-register-workspaces-r256 {
  display: grid;
  gap: 10px;
  margin: -20px 0 18px;
  color: var(--text-primary);
}
.login-register-workspaces-r256 h2 {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 750;
}
.login-register-workspace-heading-mobile-r256 { display: none; }
.login-register-workspace-list-r256 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.login-register-workspace-card-r256 {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  min-width: 0;
  min-height: 91px;
  padding: 12px 10px;
  border: 1px solid var(--border-glass-inner);
  border-radius: 8px;
  background: var(--bg-input);
  cursor: pointer;
}
.login-register-workspace-card-r256.is-selected {
  border-color: var(--tab-active-line);
  background: color-mix(in srgb, var(--tab-active-line) 9%, var(--bg-input));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tab-active-line) 34%, transparent);
}
.login-register-workspace-card-r256.is-disabled {
  opacity: .68;
  cursor: not-allowed;
}
.login-register-workspace-card-r256 input {
  box-sizing: border-box;
  appearance: none;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  border: 2px solid var(--text-soft);
  border-radius: 50%;
  background: transparent;
  cursor: inherit;
}
.login-register-workspace-card-r256 input:checked {
  border-color: var(--tab-active-line);
  background: var(--tab-active-line);
}
.login-register-workspace-card-r256 input:checked::after {
  content: "✓";
  color: #fff;
  font-size: 12px;
  line-height: 1;
}
.login-register-workspace-card-r256:focus-within {
  outline: 2px solid var(--tab-active-line);
  outline-offset: 2px;
}
.login-register-workspace-copy-r256 {
  display: grid;
  min-width: 0;
  gap: 3px;
}
.login-register-workspace-copy-r256 strong {
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.25;
}
.login-register-workspace-copy-r256 small {
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.3;
}
.login-register-workspace-current-r256 {
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
}
.login-register-workspace-current-r256 strong { color: var(--tab-active-line); }

@media (max-width: 760px) {
  .login-register-workspaces-r256 { gap: 7px; margin: -12px 0 14px; }
  .login-register-workspaces-r256 h2 { font-size: 13px; }
  .login-register-workspace-heading-desktop-r256 { display: none; }
  .login-register-workspace-heading-mobile-r256 { display: inline; }
  .login-register-workspace-list-r256 { gap: 6px; }
  .login-register-workspace-card-r256 {
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 5px;
    min-height: 65px;
    padding: 8px 6px;
  }
  .login-register-workspace-card-r256 input { width: 15px; height: 15px; margin-top: 1px; }
  .login-register-workspace-card-r256 input:checked::after { font-size: 9px; }
  .login-register-workspace-copy-r256 { gap: 1px; }
  .login-register-workspace-copy-r256 strong { font-size: 12px; }
  .login-register-workspace-copy-r256 small { font-size: 9px; line-height: 1.25; }
  .login-register-workspace-current-r256 { font-size: 11px; }
}

.login-register-invite-only-r151 {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.login-register-mode-state-r151 {
  display: grid;
  gap: 16px;
  padding: 28px 24px;
  border: 1px solid var(--border-glass-inner);
  border-radius: 16px;
  color: var(--text-primary);
  background: var(--bg-input);
}

.login-register-mode-state-r151 p { margin: 0; }
.login-register-mode-state-r151 button {
  justify-self: start;
  border: 1px solid var(--border-glass-inner);
  border-radius: 10px;
  padding: 10px 16px;
  background: var(--bg-input);
  color: var(--text-primary);
  cursor: pointer;
}

[data-login-form-r1="register"],
[data-login-form-r1="reset"] {
  gap: 12px;
}

[data-login-form-r1="register"] input,
[data-login-form-r1="register"] .password-field,
[data-login-form-r1="reset"] input,
[data-login-form-r1="reset"] .password-field {
  min-height: 50px;
}

[data-login-form-r1="register"] .password-field input,
[data-login-form-r1="reset"] .password-field input {
  min-height: 48px;
}

.login-reset-heading-r1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border-glass-inner);
}

.login-reset-heading-r1 strong {
  color: var(--tab-active-ink);
  font-size: 22px;
}

/* NOTIF-07 账号暂停原因整页（有效定稿图；沿登录页现有 token，不新造色值） */
.login-paused-r1 { display: grid; gap: 14px; }
.login-paused-r1 .login-paused-sub { margin: 0; }
.login-paused-badge {
  justify-self: start;
  padding: 4px 12px;
  border: 1px solid var(--border-glass-inner);
  border-radius: 999px;
  color: var(--tab-active-ink);
  font-size: 13px;
}
.login-paused-reason {
  padding: 14px 16px;
  border: 1px solid var(--border-glass-inner);
  border-radius: 12px;
}
.login-paused-reason strong { display: block; margin-bottom: 8px; color: var(--tab-active-ink); font-size: 15px; }
.login-paused-reason p { margin: 0 0 6px; font-size: 14px; line-height: 1.7; white-space: pre-line; overflow-wrap: anywhere; }
.login-paused-reason p.sms-placeholder { font-size: 12px; }
.login-paused-lines { margin: 0; line-height: 1.9; font-size: 14px; }
.login-paused-appeal[hidden] { display: none; }
.login-paused-appeal textarea { width: 100%; min-height: 100px; padding: 10px; box-sizing: border-box; resize: vertical; color: inherit; background: transparent; border: 1px solid var(--border-glass-inner); border-radius: 8px; }
.login-paused-note { margin: 0; min-height: 1.4em; font-size: 13px; }
.login-paused-exit {
  min-height: 46px;
  border: 1px solid var(--border-glass-inner);
  border-radius: 12px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.login-paused-scope { margin: 0; font-size: 12px; line-height: 1.7; }

.meifan-login-agreement-links-r1,
.agreement-public-links-r1 {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 10px;
}

.meifan-login-agreement-links-r1 .agreement-link,
.agreement-public-links-r1 .agreement-link,
.agreement-public-back-r1 {
  color: var(--text-link);
  font-size: 12px;
  text-decoration: none;
}

.meifan-login-agreement-links-r1 .agreement-link:hover,
.agreement-public-links-r1 .agreement-link:hover,
.agreement-public-back-r1:hover {
  text-decoration: underline;
}

.meifan-agreement-public-page-r1 {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
  background: var(--bg-page);
}

.agreement-public-head-r1 {
  display: flex;
  align-items: center;
  min-height: 82px;
  padding: 0 34px;
  border-bottom: 1px solid var(--border-topbar);
}

.agreement-public-head-r1 a {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  color: var(--text-strong);
  text-decoration: none;
}

.agreement-public-logo-r1 {
  width: 34px;
  height: 34px;
  color: var(--logo-ink);
}

.agreement-public-main-r1 {
  display: grid;
  place-items: center;
  padding: 36px 20px;
}

.agreement-public-card-r1 {
  width: min(720px, 100%);
  padding: 42px;
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  background: var(--bg-panel);
  box-shadow: var(--shadow-panel);
  color: var(--text-secondary);
}

.agreement-public-card-r1 h1 {
  margin: 8px 0 22px;
  color: var(--text-strong);
}

.agreement-public-kicker-r1,
.agreement-public-path-r1 {
  color: var(--text-soft);
  font-size: 13px;
}

.agreement-public-links-r1 {
  margin: 28px 0 22px;
}

.login-workspace-selection-r1 {
  display: grid;
  gap: 18px;
}

.login-workspace-list-r1 {
  display: grid;
  gap: 12px;
}

.login-workspace-choice-r1 {
  display: grid;
  gap: 6px;
  width: 100%;
  min-height: 76px;
  padding: 16px 18px;
  border: 1px solid var(--border-input);
  border-radius: 8px;
  background: var(--bg-input);
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
}

.login-workspace-choice-r1:hover,
.login-workspace-choice-r1:focus-visible {
  border-color: var(--tab-active-line);
  outline: none;
}

.login-workspace-choice-r1 small {
  color: var(--text-soft);
}

@media (max-width: 760px) {
  .login-field-pair-r1 { grid-template-columns: 1fr; }
  .agreement-public-card-r1 { padding: 28px 22px; }
}

/* SEC-M-01 找回密码版式对图（有效定稿图 01-找回密码-v2；沿登录页现有 token，不新造色值）：
   「‹ 返回登录」在上、大标题＋副题、四个字段各占一行、「获取验证码」单行嵌在验证码框右侧；手机宽度下是整页（不画品牌栏与卡片外框）。 */
.login-reset-heading-page-r1 {
  display: grid;
  justify-content: start;
  justify-items: start;
  align-items: start;
  gap: 8px;
  min-height: auto;
  margin-bottom: 26px;
  padding-bottom: 18px;
}
.login-reset-heading-page-r1 .login-reset-back-r1 { padding: 0; font-size: 14px; }
.login-reset-heading-page-r1 strong { font-size: 28px; line-height: 1.25; }
.login-reset-heading-page-r1 .login-reset-sub-r1 { margin: 0; }
[data-login-form-r1="reset"] .password-field:has([data-reset-send-r1]) { grid-template-columns: minmax(0, 1fr) auto; }
[data-login-form-r1="reset"] [data-reset-send-r1] {
  min-height: 44px;
  padding: 0 16px;
  white-space: nowrap;
  font-weight: 800;
}
@media (max-width: 760px) {
  .meifan-login-page[data-login-active-tab-r256="reset"] .meifan-login-brand-panel { display: none; }
  .meifan-login-page[data-login-active-tab-r256="reset"] .meifan-login-card {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }
  .meifan-login-page[data-login-active-tab-r256="reset"] .meifan-login-form-panel { padding: 18px 18px 34px; }
}

/* CMD1468: SEC01 fields and labels share the approved mobile column. */
@media (max-width: 640px) {
  .meifan-login-page[data-mf-security-page="SEC-M-01"] .meifan-login-form-panel { padding-inline: 0; }
  .meifan-login-page[data-mf-security-page="SEC-M-01"] .login-reset-form-page-r1 {
    box-sizing: border-box;
    width: calc(100vw - 56px);
    max-width: none;
    min-width: 0;
  }
}

/* CMD474 P1: only the existing 19 owner screens; desktop and paused keep their original shell. */
.login-security-mobile-back-u20,
.login-security-mobile-sub-u20 { display: none; }
@media (max-width: 640px) {
  /* Hiding the host siblings removes both pointer and sequential-focus access; changing the
     original owner mode restores them without mutating their state or inline styles. */
  body.account-login-mode:has(#meifanDedicatedLoginRoot [data-mf-security-page]) {
    overflow: hidden;
  }
  body.account-login-mode:has(#meifanDedicatedLoginRoot [data-mf-security-page]) > :not(#meifanDedicatedLoginRoot):not(script):not(style):not(link) {
    display: none !important;
  }
  #meifanDedicatedLoginRoot .meifan-login-page[data-mf-security-page] {
    position: fixed;
    inset: 0;
    display: block;
    height: 100dvh;
    min-height: 0;
    overflow: hidden auto;
    overscroll-behavior: contain;
    isolation: isolate;
    padding-bottom: max(32px, env(safe-area-inset-bottom));
    box-sizing: border-box;
  }
  [data-mf-security-page] :is(.meifan-login-canvas, .login-particle-field-r2, .meifan-login-bg,
    .meifan-login-tools, .meifan-login-brand-panel, .login-floating-modules, .meifan-login-foot) {
    display: none;
  }
  [data-mf-security-page] .meifan-login-top {
    min-height: 106px;
    padding: max(36px, env(safe-area-inset-top)) 28px 20px;
    border: 0;
    box-sizing: border-box;
  }
  [data-mf-security-page] .meifan-login-wordmark { gap: 11px; }
  [data-mf-security-page] .meifan-diamond { width: 25px; height: 24px; filter: none; }
  [data-mf-security-page] .meifan-login-wordmark strong { font-size: 13px; letter-spacing: 2px; }
  [data-mf-security-page] .meifan-login-stage {
    display: block;
    width: 100%;
    margin: 0;
    padding: 12px 28px 0;
    box-sizing: border-box;
  }
  [data-mf-security-page] .meifan-login-card {
    display: block;
    min-height: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }
  [data-mf-security-page] .meifan-login-form-panel { display: block; padding: 0; }
  [data-mf-security-page] .login-security-heading-u20 {
    display: grid;
    justify-content: stretch;
    justify-items: start;
    align-items: start;
    min-height: 0;
    gap: 12px;
    margin: 0 0 4px;
    padding: 0;
    border: 0;
  }
  [data-mf-security-page] .login-security-heading-u20 strong {
    font-size: 28px;
    line-height: 35px;
    color: var(--text-strong);
  }
  [data-mf-security-page] .login-security-heading-u20 .sms-placeholder { margin: 0; font-size: 12px; line-height: 18px; }
  [data-mf-security-page] :is(.login-reset-back-r1, .login-security-mobile-back-u20, .login-security-reset-back-u20) {
    grid-row: 1;
    display: inline-flex;
    align-items: center;
    min-height: 18px;
    margin: 0;
    padding: 0;
    font-size: 12px;
    line-height: 18px;
    color: var(--text-muted);
  }
  [data-mf-security-page] .login-security-reset-back-u20::before { content: '‹ '; white-space: pre; }
  [data-mf-security-page] .login-security-mobile-sub-u20 { display: block; }
  [data-mf-security-page] .login-reset-form-page-r1 { gap: 10px; padding: 0 8px; }
  [data-mf-security-page] .login-reset-form-page-r1 label { gap: 8px; font-size: 13px; line-height: 20px; font-weight: 500; }
  [data-mf-security-page] .login-reset-form-page-r1 :is(input, .password-field) {
    width: 100%; min-width: 0; min-height: 51px; border-radius: 12px; box-sizing: border-box;
  }
  [data-mf-security-page] .login-reset-form-page-r1 input { padding: 0 13px; font-size: 14px; }
  [data-mf-security-page] .login-reset-form-page-r1 .password-field input { min-height: 49px; }
  [data-mf-security-page] [data-reset-send-r1] { padding: 0 12px; font-size: 12px; }
  [data-mf-security-page] .login-primary { min-height: 50px; border-radius: 12px; font-size: 15px; }
  [data-mf-security-page] .login-reset-form-page-r1 .login-primary { margin-top: 25px; }
  [data-mf-security-page] .login-reset-form-page-r1 > .sms-placeholder { margin: 8px 0 0; font-size: 12px; line-height: 20px; }
  [data-mf-security-page] .login-auth-error { overflow-wrap: anywhere; }
  [data-mf-security-page] .login-auth-error:empty { display: none; }
  [data-mf-security-page] .login-security-result-u20 { gap: 0; padding: 62px 8px 0; }
  [data-mf-security-page] .login-security-check-u20 {
    width: 64px !important; height: 64px !important; margin: 0 auto 24px !important;
    color: var(--text-link); background: var(--bg-panel); border-color: var(--border-input) !important;
  }
  [data-mf-security-page] .login-security-result-title-u20 { margin: 0 0 12px !important; font-size: 23px !important; line-height: 30px; }
  [data-mf-security-page] .login-security-result-state-u20 { margin: 0 0 28px !important; font-size: 12px; line-height: 18px; }
  [data-mf-security-page] .login-security-result-note-u20 {
    margin: 0 0 70px !important; padding: 18px 13px; border: 1px solid var(--border-input);
    border-radius: 12px; background: var(--bg-input); font-size: 12px; line-height: 21px;
  }
}
/* CMD474 P7: the original paused owner keeps its reason, grant and appeal controls. */
@media (max-width: 640px) {
  [data-mf-security-page="NOTIF-07"] .meifan-login-top { min-height: 106px; padding-top: max(62px, env(safe-area-inset-top)); }
  [data-mf-security-page="NOTIF-07"] .meifan-login-stage { padding-top: 5px; padding-bottom: 24px; }
  [data-mf-security-page="NOTIF-07"] .login-paused-heading-u20 { padding-top: 28px; }
  [data-mf-security-page="NOTIF-07"] .login-paused-heading-u20 strong { font-size: 27px; line-height: 35px; }
  [data-mf-security-page="NOTIF-07"] .login-paused-r1 { gap: 0; }
  [data-mf-security-page="NOTIF-07"] .login-paused-sub { margin: 0 0 27px; font-size: 12px; line-height: 18px; }
  [data-mf-security-page="NOTIF-07"] .login-paused-badge { min-height: 25px; margin-bottom: 28px; padding: 3px 10px; box-sizing: border-box; font-size: 11px; line-height: 17px; }
  [data-mf-security-page="NOTIF-07"] .login-paused-reason { min-width: 0; min-height: 171px; padding: 18px 16px; box-sizing: border-box; background: var(--bg-input); }
  [data-mf-security-page="NOTIF-07"] .login-paused-reason strong { margin-bottom: 9px; font-size: 15px; line-height: 20px; }
  [data-mf-security-page="NOTIF-07"] .login-paused-reason p { margin: 0; font-size: 12px; line-height: 27px; overflow-wrap: anywhere; }
  [data-mf-security-page="NOTIF-07"] .login-paused-lines { margin: 21px 0 50px; font-size: 12px; line-height: 27px; }
  [data-mf-security-page="NOTIF-07"] .login-paused-note:empty { display: none; }
  [data-mf-security-page="NOTIF-07"] [data-login-paused-hint-r1]:not(:empty) { margin: 0 0 16px; font-size: 12px; line-height: 21px; }
  [data-mf-security-page="NOTIF-07"] .login-paused-appeal:not([hidden]) { display: grid; gap: 12px; margin: 0 0 16px; }
  [data-mf-security-page="NOTIF-07"] .login-paused-appeal textarea { min-height: 120px; font-size: 14px; line-height: 24px; }
  [data-mf-security-page="NOTIF-07"] .login-primary,
  [data-mf-security-page="NOTIF-07"] .login-paused-exit { min-height: 46px; padding: 10px 16px; font-size: 14px; line-height: 20px; text-align: left; }
  [data-mf-security-page="NOTIF-07"] .login-paused-exit { margin: 12px 0 29px; }
  [data-mf-security-page="NOTIF-07"] .login-paused-scope { margin: 0; font-size: 11px; line-height: 20px; }
}

/* P1 SEC-M-04 visual delta: keep the real 73 legal footer and separate it from the completed form. */
@media (max-width: 640px) {
  .meifan-login-page[data-mf-security-page="SEC-M-04"] .meifan-login-stage { padding-bottom: 24px; }
}
/* CMD499: follow the original NOTIF07 left-aligned buttons; tighten its facts and center SEC04. */
@media (max-width: 640px) {
  html[data-meifan-theme] [data-mf-security-page="NOTIF-07"] .login-paused-reason { min-height: 0; height: auto; }
  html[data-meifan-theme] [data-mf-security-page="NOTIF-07"] .login-paused-badge { display: inline-flex; align-items: center; width: fit-content; border: 1px solid var(--border-input, currentColor); border-radius: 999px; background: var(--bg-input, rgba(24,70,94,.6)); color: var(--text-link, inherit); }
  html[data-meifan-theme] [data-mf-security-page="SEC-M-04"] .login-primary { display: flex; align-items: center; justify-content: center; text-align: center !important; }
}
/* CMD607 BEGIN login SVG paint; night only, no shared tokens. */
@media (max-width: 640px) {
  html:not([data-meifan-theme="day"]) .meifan-login-page:is([data-mf-security-page="SEC-M-01"],[data-mf-security-page="SEC-M-02"],[data-mf-security-page="SEC-M-04"],[data-mf-security-page="NOTIF-07"]) .login-security-heading-u20 > strong { color: #f2f7fb; }
  html:not([data-meifan-theme="day"]) .meifan-login-page[data-mf-security-page="SEC-M-01"] .meifan-login-card .login-reset-form-page-r1 > label > :is(input,.password-field) { background: #071824; border-color: #244357; }
  html:not([data-meifan-theme="day"]) .meifan-login-page[data-mf-security-page="SEC-M-01"] .meifan-login-card .login-reset-form-page-r1 input::placeholder { color: #8099ad; }
  html:not([data-meifan-theme="day"]) .meifan-login-page:is([data-mf-security-page="SEC-M-02"],[data-mf-security-page="SEC-M-04"]) .login-security-result-note-u20 { background: #0d293b; border-color: #20485f; }
  html:not([data-meifan-theme="day"]) .meifan-login-page[data-mf-security-page="NOTIF-07"] .login-paused-badge { color: #e4bf78; }
  html:not([data-meifan-theme="day"]) .meifan-login-page[data-mf-security-page="NOTIF-07"] .login-paused-reason { background: #0b2233; }
}
/* CMD607 END login */
/* WO-V17-20261109-1620 G09 BEGIN: NOTIF-07 night paint follows 07 final SVG; copy, logic and layout unchanged. */
@media (max-width: 640px) {
  html:not([data-meifan-theme="day"]) .meifan-login-page[data-mf-security-page="NOTIF-07"] .login-paused-badge { background: #0b2c3c; border-color: #244b60; border-radius: 12px; }
  html:not([data-meifan-theme="day"]) .meifan-login-page[data-mf-security-page="NOTIF-07"] .login-paused-reason { border-color: #244357; }
  html:not([data-meifan-theme="day"]) .meifan-login-page[data-mf-security-page="NOTIF-07"] .login-paused-reason strong { color: #e3edf5; }
  html:not([data-meifan-theme="day"]) .meifan-login-page[data-mf-security-page="NOTIF-07"] .login-paused-reason p { color: #a7bdcc; }
  html:not([data-meifan-theme="day"]) .meifan-login-page[data-mf-security-page="NOTIF-07"] .login-primary[data-login-paused-appeal-open-r1] { background: #29b6e9; color: #032331; }
  html:not([data-meifan-theme="day"]) .meifan-login-page[data-mf-security-page="NOTIF-07"] .login-paused-exit { background: #0b2233; border-color: #31566f; color: #c8dce9; }
}
/* WO-V17-20261109-1620 G09 END */
@media (max-width: 640px) { html:not([data-meifan-theme="day"]) .meifan-login-page[data-mf-security-page="NOTIF-07"] .login-paused-exit { font-weight: 650; } }
/* ACCOUNT-PERMISSION-MATRIX-R4-20260625-03 */
.account-permission-matrix-r4 {
  border: 1px solid rgba(125, 196, 255, 0.18);
  background: linear-gradient(145deg, rgba(8, 17, 31, 0.88), rgba(15, 36, 54, 0.78));
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.account-r4-research,
.account-r4-layer-grid,
.account-r4-domain-grid,
.account-r4-personal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.account-r4-research article,
.account-r4-layer-card,
.account-r4-domain-card,
.account-r4-personal,
.account-r4-safe-card {
  border: 1px solid rgba(150, 204, 255, 0.16);
  border-radius: 8px;
  background: rgba(8, 20, 34, 0.68);
  padding: 14px;
}

.account-r4-research article strong,
.account-r4-domain-card strong,
.account-r4-layer-card strong {
  display: block;
  color: rgba(238, 250, 255, 0.96);
}

.account-r4-research article small,
.account-r4-layer-card small,
.account-r4-domain-head small,
.account-r4-role-head small,
.account-r4-section-title small {
  display: block;
  margin-top: 4px;
  color: rgba(185, 216, 235, 0.76);
  line-height: 1.55;
}

.account-r4-role-head,
.account-r4-section-title,
.account-r4-domain-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.account-r4-role-head {
  margin: 16px 0 12px;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(71, 154, 218, 0.11);
}

.account-r4-role-head span {
  color: rgba(151, 211, 255, 0.9);
  font-size: 12px;
}

.account-r4-chip-row,
.account-r4-toggle-grid,
.account-r4-personal-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.account-r4-chip-row span,
.account-r4-readonly-toggle,
.account-r4-toggle,
.account-r4-personal-grid button {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  border: 1px solid rgba(145, 200, 244, 0.16);
  background: rgba(10, 26, 45, 0.76);
  color: rgba(232, 246, 255, 0.9);
  padding: 7px 10px;
  font-size: 12px;
}

.account-r4-toggle input {
  accent-color: #63d7ff;
}

.account-r4-toggle.allowed,
.account-r4-readonly-toggle.allowed {
  border-color: rgba(91, 220, 177, 0.38);
  background: rgba(28, 94, 79, 0.28);
}

.account-r4-toggle.blocked,
.account-r4-readonly-toggle.blocked,
.account-r4-layer-card.is-locked {
  opacity: 0.66;
}

.account-r4-readonly-toggle em {
  color: rgba(155, 216, 255, 0.78);
  font-style: normal;
}

.account-r4-domain-group {
  margin-top: 18px;
}

.account-r4-domain-group h3 {
  margin: 0 0 10px;
  color: rgba(151, 211, 255, 0.92);
  font-size: 14px;
}

.account-r4-readonly-banner {
  margin: 12px 0;
  border: 1px dashed rgba(151, 211, 255, 0.32);
  border-radius: 8px;
  padding: 10px 12px;
  color: rgba(213, 235, 247, 0.86);
}

.account-permission-matrix-r4.customer-safe {
  max-width: 760px;
}

.account-r4-safe-card {
  margin-top: 12px;
}

.account-r4-safe-card p {
  color: rgba(213, 235, 247, 0.82);
  line-height: 1.7;
}

.account-r4-safe-card span {
  display: inline-flex;
  margin-top: 8px;
  border-radius: 999px;
  background: rgba(76, 159, 255, 0.14);
  color: rgba(197, 230, 255, 0.92);
  padding: 6px 10px;
}

@media (max-width: 960px) {
  .account-r4-research,
  .account-r4-layer-grid,
  .account-r4-domain-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .account-r4-research,
  .account-r4-layer-grid,
  .account-r4-domain-grid {
    grid-template-columns: 1fr;
  }

  .account-r4-role-head,
  .account-r4-section-title,
  .account-r4-domain-head {
    flex-direction: column;
  }

  .account-r4-toggle,
  .account-r4-readonly-toggle,
  .account-r4-personal-grid button {
    width: 100%;
    justify-content: space-between;
  }
}
/* ACCOUNT-LOCAL-AUTH-OPERABLE-R5-20260625-05 */
.local-auth-r5-login-card,
.local-auth-r5-settings,
.local-auth-r5-module-badge {
  --r5-panel: rgba(10, 18, 28, 0.78);
  --r5-line: rgba(146, 232, 255, 0.18);
  --r5-ink: #eefbff;
  --r5-muted: rgba(222, 244, 250, 0.72);
  color: var(--r5-ink);
  background: linear-gradient(145deg, rgba(11, 20, 34, 0.92), rgba(18, 29, 42, 0.74));
  border: 1px solid var(--r5-line);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(22px) saturate(1.2);
}

.local-auth-r5-login-card {
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 14px;
  display: grid;
  gap: 14px;
}

.local-auth-r5-tabs,
.local-auth-r5-actions,
.local-auth-r5-demo-row,
.local-auth-r5-chip-row,
.local-auth-r5-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.local-auth-r5-tabs button,
.local-auth-r5-demo-row button,
.local-auth-r5-actions button,
.local-auth-r5-section-title button,
.local-auth-r5-inline-form button,
.local-auth-r5-module-grid button {
  border: 1px solid rgba(146, 232, 255, 0.22);
  color: var(--r5-ink);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 9px 12px;
  min-height: 36px;
  cursor: pointer;
}

.local-auth-r5-tabs button.active,
.local-auth-r5-inline-form button,
.local-auth-r5-section-title button {
  background: linear-gradient(135deg, rgba(46, 132, 255, 0.94), rgba(34, 197, 147, 0.86));
  border-color: transparent;
}

.local-auth-r5-login-card form,
.local-auth-r5-form-grid,
.local-auth-r5-inline-form {
  display: grid;
  gap: 12px;
}

.local-auth-r5-login-card form.hidden {
  display: none;
}

.local-auth-r5-login-card label,
.local-auth-r5-form-grid label {
  display: grid;
  gap: 6px;
  color: var(--r5-muted);
  font-size: 12px;
}

.local-auth-r5-login-card input,
.local-auth-r5-login-card select,
.local-auth-r5-form-grid input,
.local-auth-r5-form-grid select,
.local-auth-r5-inline-form input,
.local-auth-r5-inline-form select,
.local-auth-r5-member-row select {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(146, 232, 255, 0.2);
  border-radius: 10px;
  color: var(--r5-ink);
  background: rgba(3, 10, 18, 0.54);
  padding: 10px 11px;
  outline: none;
}

.local-auth-r5-check {
  display: flex !important;
  grid-template-columns: auto 1fr;
  align-items: center;
}

.local-auth-r5-error {
  min-height: 18px;
  color: #ffd5b0;
  font-size: 12px;
}

.local-auth-r5-settings {
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 18px;
}

.local-auth-r5-context-strip,
.local-auth-r5-business-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.local-auth-r5-context-strip span,
.local-auth-r5-business-strip span,
.local-auth-r5-layer,
.local-auth-r5-safe-card,
.local-auth-r5-module-grid article,
.local-auth-r5-member-row,
.local-auth-r5-module-badge {
  border: 1px solid rgba(146, 232, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 12px;
}

.local-auth-r5-context-strip span,
.local-auth-r5-business-strip span {
  display: grid;
  gap: 4px;
  padding: 10px;
  min-width: 0;
}

.local-auth-r5-context-strip b,
.local-auth-r5-context-strip em,
.local-auth-r5-business-strip b,
.local-auth-r5-business-strip em,
.local-auth-r5-module-grid small,
.local-auth-r5-module-grid em,
.local-auth-r5-member-row small {
  overflow-wrap: anywhere;
  font-style: normal;
}

.local-auth-r5-layer-grid,
.local-auth-r5-module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.local-auth-r5-layer,
.local-auth-r5-safe-card,
.local-auth-r5-module-grid article {
  padding: 14px;
}

.local-auth-r5-layer-head {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}

.local-auth-r5-layer-head small,
.local-auth-r5-module-grid small,
.local-auth-r5-safe-card p {
  color: var(--r5-muted);
  line-height: 1.55;
}

.local-auth-r5-chip-row span {
  border-radius: 999px;
  background: rgba(146, 232, 255, 0.11);
  border: 1px solid rgba(146, 232, 255, 0.16);
  padding: 6px 10px;
  font-size: 12px;
}

.local-auth-r5-inline-form {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) 150px auto;
  align-items: end;
  margin-bottom: 12px;
}

.local-auth-r5-member-table {
  display: grid;
  gap: 8px;
}

.local-auth-r5-member-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  gap: 10px;
  align-items: center;
  padding: 10px;
}

.local-auth-r5-member-row span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.local-auth-r5-module-panel {
  margin-top: 14px;
}

.local-auth-r5-section-title {
  justify-content: space-between;
  margin-bottom: 10px;
}

.local-auth-r5-module-grid article {
  display: grid;
  gap: 5px;
}

.local-auth-r5-module-badge {
  padding: 12px;
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1.4fr) auto;
  gap: 8px;
  align-items: center;
}

.local-auth-r5-module-badge small,
.local-auth-r5-module-badge span {
  color: var(--r5-muted);
  overflow-wrap: anywhere;
}

.local-auth-r5-debug-drawer,
.local-auth-r5-badge-debug {
  border: 1px solid rgba(146, 232, 255, 0.14);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
  padding: 10px;
}

.local-auth-r5-debug-drawer {
  margin-top: 14px;
}

.local-auth-r5-debug-drawer summary,
.local-auth-r5-badge-debug summary {
  cursor: pointer;
  color: rgba(222, 244, 250, 0.8);
}

.local-auth-r5-badge-debug em {
  display: block;
  margin-top: 6px;
  overflow-wrap: anywhere;
  color: rgba(222, 244, 250, 0.72);
  font-style: normal;
}

.local-auth-r5-settings.customer-safe .panel-head {
  margin-bottom: 12px;
}

body.account-r5-customer-export-mode .sidebar-note,
body.account-r5-customer-export-mode .customer-safe-banner {
  display: none !important;
}

@media (max-width: 760px) {
  .local-auth-r5-login-card,
  .local-auth-r5-settings {
    border-radius: 14px;
    padding: 14px;
  }

  .local-auth-r5-context-strip,
  .local-auth-r5-business-strip,
  .local-auth-r5-layer-grid,
  .local-auth-r5-module-grid,
  .local-auth-r5-inline-form,
  .local-auth-r5-member-row,
  .local-auth-r5-module-badge {
    grid-template-columns: 1fr;
  }

  .local-auth-r5-tabs button,
  .local-auth-r5-demo-row button {
    flex: 1 1 42%;
  }
}

.local-auth-r5-debug-drawer,
.local-auth-r5-module-badge.local-auth-r5-debug-drawer {
  border: 1px solid rgba(125, 166, 255, 0.22);
  border-radius: 8px;
  background: rgba(12, 18, 34, 0.42);
  padding: 10px 12px;
}

.local-auth-r5-debug-drawer summary,
.local-auth-r5-module-badge.local-auth-r5-debug-drawer summary {
  cursor: pointer;
  color: rgba(231, 238, 255, 0.86);
  font-size: 12px;
  font-weight: 700;
}

.local-auth-r5-debug-drawer:not([open]) > :not(summary),
.local-auth-r5-module-badge.local-auth-r5-debug-drawer:not([open]) > :not(summary) {
  display: none;
}
.full-local-r1-panel {
  border: 1px solid rgba(34, 31, 27, 0.12);
  background: #fffdf9;
  box-shadow: 0 14px 40px rgba(42, 35, 27, 0.08);
}

.full-local-r1-active {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(180px, 1fr);
  gap: 10px;
  margin: 14px 0;
}

.full-local-r1-active label,
.full-local-r1-selector {
  display: grid;
  gap: 6px;
}

.full-local-r1-active span,
.full-local-r1-selector small {
  color: #766b5c;
  font-size: 12px;
}

.full-local-r1-active input,
.full-local-r1-active select,
.full-local-r1-selector select {
  min-height: 38px;
  border: 1px solid rgba(34, 31, 27, 0.18);
  border-radius: 8px;
  background: #fff;
  padding: 0 10px;
  color: #27221d;
}

.full-local-r1-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.full-local-r1-actions button {
  min-height: 38px;
  border: 1px solid rgba(40, 35, 28, 0.14);
  border-radius: 8px;
  background: #f8f2e8;
  color: #2d271f;
  font-weight: 700;
}

.full-local-r1-actions button:hover {
  border-color: rgba(40, 35, 28, 0.36);
  background: #efe3d4;
}

.full-local-r1-selector-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.full-local-r1-selector {
  border: 1px solid rgba(34, 31, 27, 0.1);
  border-radius: 8px;
  background: #ffffff;
  padding: 10px;
}

.full-local-r1-selector strong {
  display: block;
  margin-bottom: 2px;
}

.full-local-r1-debug {
  margin: 12px 0;
  border: 1px dashed rgba(34, 31, 27, 0.2);
  border-radius: 8px;
  padding: 10px;
}

.full-local-r1-timeline {
  display: grid;
  gap: 6px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.full-local-r1-timeline li {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 90px;
  gap: 10px;
  align-items: center;
  min-height: 32px;
  border-bottom: 1px solid rgba(34, 31, 27, 0.08);
  font-size: 13px;
}

.full-local-r1-timeline span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.full-local-r1-timeline em {
  color: #766b5c;
  font-style: normal;
  text-align: right;
}

.full-local-r1-customer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.full-local-r1-customer-grid article {
  border: 1px solid rgba(34, 31, 27, 0.1);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.full-local-r1-customer-grid small {
  display: block;
  margin-top: 6px;
  color: #766b5c;
}

.full-local-r1-customer-safe-mode #moduleGrid {
  display: none;
}

@media (max-width: 760px) {
  .full-local-r1-active,
  .full-local-r1-selector-grid,
  .full-local-r1-customer-grid {
    grid-template-columns: 1fr;
  }

  .full-local-r1-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .full-local-r1-timeline li {
    grid-template-columns: 1fr;
  }

  .full-local-r1-timeline em {
    text-align: left;
  }
}

.full-local-r1-debug-drawer {
  border: 1px solid rgba(125, 166, 255, 0.22);
  border-radius: 8px;
  background: rgba(12, 18, 34, 0.42);
  padding: 10px 12px;
}

.full-local-r1-debug-drawer summary {
  cursor: pointer;
  color: rgba(231, 238, 255, 0.86);
  font-size: 12px;
  font-weight: 700;
}

.full-local-r1-debug-drawer:not([open]) > :not(summary) {
  display: none;
}
.account-gateway-r1-panel {
  border: 1px solid rgba(34, 31, 27, 0.12);
  background: #fffdfa;
}

.account-gateway-r1-counts {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.account-gateway-r1-counts article {
  border: 1px solid rgba(35, 31, 26, 0.12);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.account-gateway-r1-counts strong {
  display: block;
  font-size: 22px;
  line-height: 1;
}

.account-gateway-r1-counts span,
.account-gateway-r1-counts small {
  display: block;
  margin-top: 5px;
  color: #6f6557;
  font-size: 12px;
}

.account-gateway-r1-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.account-gateway-r1-actions button,
.account-gateway-r1-table button {
  min-height: 34px;
  border: 1px solid rgba(35, 31, 26, 0.16);
  border-radius: 8px;
  background: #f8f1e6;
  color: #28231c;
  font-weight: 700;
}

.account-gateway-r1-actions button:hover,
.account-gateway-r1-table button:hover {
  background: #efe2d2;
}

.account-gateway-r1-io {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(180px, 0.7fr) minmax(180px, 0.7fr);
  gap: 10px;
  margin-bottom: 12px;
}

.account-gateway-r1-io label,
.account-gateway-r1-io article {
  border: 1px solid rgba(35, 31, 26, 0.12);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.account-gateway-r1-io span,
.account-gateway-r1-io small {
  display: block;
  color: #6f6557;
  font-size: 12px;
}

.account-gateway-r1-io textarea {
  width: 100%;
  margin-top: 6px;
  border: 1px solid rgba(35, 31, 26, 0.16);
  border-radius: 8px;
  padding: 8px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
}

.account-gateway-r1-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
}

.account-gateway-r1-table th,
.account-gateway-r1-table td {
  border-bottom: 1px solid rgba(35, 31, 26, 0.1);
  padding: 9px;
  text-align: left;
  font-size: 13px;
}

.account-gateway-r1-table th {
  color: #6f6557;
  font-size: 12px;
}

.account-gateway-r1-audit {
  margin-top: 12px;
  border: 1px solid rgba(35, 31, 26, 0.12);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.account-gateway-r1-audit ol {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.account-gateway-r1-audit li {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) 180px;
  gap: 8px;
  font-size: 12px;
}

.account-gateway-r1-audit span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-gateway-r1-audit em {
  color: #6f6557;
  font-style: normal;
  text-align: right;
}

.account-gateway-r1-safe {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(35, 31, 26, 0.12);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

@media (max-width: 860px) {
  .account-gateway-r1-counts,
  .account-gateway-r1-actions,
  .account-gateway-r1-io {
    grid-template-columns: 1fr;
  }

  .account-gateway-r1-table {
    display: block;
    overflow-x: auto;
  }

  .account-gateway-r1-audit li {
    grid-template-columns: 1fr;
  }

  .account-gateway-r1-audit em {
    text-align: left;
  }
}
.account-local-server-adapter-r1 {
  display: grid;
  gap: 14px;
  border: 1px solid rgba(111, 183, 176, 0.22);
}

.account-server-status,
.account-server-counts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.account-server-status article,
.account-server-counts article,
.account-server-snapshot article,
.account-local-server-safe {
  min-width: 0;
  border: 1px solid rgba(144, 165, 175, 0.18);
  border-radius: 8px;
  padding: 10px;
  background: rgba(8, 15, 24, 0.48);
}

.account-server-status strong,
.account-server-counts strong,
.account-server-snapshot strong,
.account-local-server-safe strong {
  display: block;
  color: #edf7f5;
  font-size: 13px;
  line-height: 1.35;
  word-break: break-word;
}

.account-server-status span,
.account-server-counts span,
.account-server-counts small,
.account-server-snapshot span,
.account-server-snapshot small,
.account-local-server-safe span {
  display: block;
  margin-top: 4px;
  color: rgba(214, 226, 226, 0.62);
  font-size: 12px;
  line-height: 1.45;
}

.account-server-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.account-server-actions button,
.account-server-queue button {
  min-height: 32px;
  border: 1px solid rgba(118, 214, 193, 0.24);
  border-radius: 8px;
  padding: 7px 10px;
  background: rgba(9, 23, 31, 0.78);
  color: #e9f7f3;
  cursor: pointer;
}

.account-server-actions button:hover,
.account-server-queue button:hover:not(:disabled) {
  border-color: rgba(118, 214, 193, 0.52);
  background: rgba(16, 45, 55, 0.82);
}

.account-server-queue button:disabled {
  opacity: 0.45;
  cursor: default;
}

.account-server-snapshot {
  display: grid;
  grid-template-columns: minmax(280px, 1.4fr) minmax(160px, 0.7fr) minmax(220px, 0.9fr);
  gap: 10px;
  align-items: stretch;
}

.account-server-snapshot label {
  display: grid;
  gap: 6px;
}

.account-server-snapshot textarea {
  width: 100%;
  min-height: 132px;
  resize: vertical;
  border: 1px solid rgba(144, 165, 175, 0.22);
  border-radius: 8px;
  padding: 10px;
  background: rgba(4, 10, 17, 0.72);
  color: #eaf2f0;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
}

.account-server-snapshot ol {
  display: grid;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.account-server-snapshot li {
  display: grid;
  grid-template-columns: 0.8fr 1fr auto;
  gap: 6px;
  align-items: center;
  color: rgba(225, 236, 234, 0.82);
  font-size: 12px;
}

.account-server-snapshot li em {
  color: rgba(116, 224, 197, 0.8);
  font-style: normal;
}

.account-server-queue-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: rgba(231, 241, 239, 0.86);
  font-size: 13px;
}

.account-server-queue-head small {
  color: rgba(214, 226, 226, 0.58);
  font-size: 12px;
}

.account-server-queue {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid rgba(144, 165, 175, 0.18);
  border-radius: 8px;
  background: rgba(6, 13, 21, 0.44);
}

.account-server-queue th,
.account-server-queue td {
  border-bottom: 1px solid rgba(144, 165, 175, 0.14);
  padding: 8px;
  color: rgba(232, 240, 239, 0.82);
  font-size: 12px;
  text-align: left;
  vertical-align: top;
  word-break: break-word;
}

.account-server-queue th {
  color: rgba(188, 214, 211, 0.78);
  font-weight: 600;
}

.account-local-server-adapter-r1.customer-safe {
  background: rgba(10, 16, 25, 0.64);
}

@media (max-width: 860px) {
  .account-server-status,
  .account-server-counts,
  .account-server-snapshot {
    grid-template-columns: 1fr;
  }

  .account-server-queue {
    display: block;
    overflow-x: auto;
  }
}
/* O33 confirmations share the account dialog; checkbox labels remain readable on narrow screens. */
.overseas-check-r340 { display:flex; align-items:flex-start; gap:10px; margin:16px 0; cursor:pointer; }
.overseas-check-r340 input { flex:0 0 auto; margin-top:4px; }
.overseas-check-r340 span { min-width:0; overflow-wrap:anywhere; }
#meifanOverseasAssetConfirmRoot .special-confirm-ok:disabled { opacity:.45; cursor:not-allowed; }
#meifanOverseasAssetConfirmRoot .special-confirm-body,
#meifanLoginSpecialConfirmRoot .special-confirm-body { max-height:65vh; overflow:auto; overflow-wrap:anywhere; }
.pm-settings-minimal-r1 {
  display: grid;
  gap: 16px;
  color: #eaf7ff;
}

.pm-settings-minimal-r1 .panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.pm-settings-minimal-r1 .panel-head h2 {
  margin: 0;
  font-size: 20px;
}

.pm-settings-minimal-r1 .panel-head small,
.pm-settings-role-card small,
.pm-permission-modal header small {
  color: var(--muted, #64748b);
}

.pm-settings-entry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.pm-settings-entry-grid button,
.pm-settings-role-card button,
.pm-permission-categories button,
.pm-permission-modal header button {
  min-height: 38px;
  border: 1px solid var(--border, #d8dee9);
  border-radius: 8px;
  background: rgba(8, 29, 43, .78);
  color: #eaf7ff;
  cursor: pointer;
}

.pm-settings-minimal-r1 .pm-settings-entry-grid button,
.pm-settings-minimal-r1 .pm-settings-role-card button {
  background: #0d2230;
  color: #eaf7ff;
}

.pm-settings-entry-grid button:disabled {
  cursor: not-allowed;
  opacity: .52;
}

.pm-settings-role-list {
  display: grid;
  gap: 10px;
}

.pm-settings-role-card {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(190px, .7fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border, #d8dee9);
  border-radius: 8px;
  background: rgba(8, 29, 43, .94);
  color: #eaf7ff;
}

.pm-settings-role-card strong {
  display: block;
  margin-bottom: 3px;
}

.pm-settings-role-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pm-settings-role-meta span,
.pm-settings-lock {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border: 1px solid var(--border, #d8dee9);
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted, #64748b);
}

.pm-settings-safe-card {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--border, #d8dee9);
  border-radius: 8px;
  background: rgba(8, 29, 43, .94);
  color: #eaf7ff;
}

.pm-permission-modal-backdrop {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483000 !important;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 10%, rgba(37, 99, 235, .22), transparent 34%),
    radial-gradient(circle at 82% 78%, rgba(20, 184, 166, .14), transparent 30%),
    rgba(2, 6, 23, .72);
  backdrop-filter: blur(10px);
}

.pm-permission-modal {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(960px, calc(100vw - 48px));
  max-height: min(760px, calc(100vh - 48px));
  overflow: hidden;
  border: 1px solid rgba(148, 214, 255, .34);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(14, 41, 59, .96), rgba(6, 18, 30, .94)),
    rgba(9, 28, 42, .96);
  color: #eaf7ff;
  box-shadow: 0 24px 72px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(255, 255, 255, .08);
  backdrop-filter: blur(16px) saturate(1.18);
}

.pm-permission-modal-dark-glass-r3 {
  background:
    linear-gradient(145deg, rgba(14, 41, 59, .96), rgba(6, 18, 30, .94)),
    rgba(9, 28, 42, .96);
}

.pm-permission-modal header small,
.pm-permission-modal .pm-permission-block label {
  color: #b9d6e7;
}

.pm-permission-modal header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(148, 214, 255, .24);
  background: rgba(6, 22, 34, .72);
}

.pm-permission-modal header h2 {
  margin: 0 0 4px;
  font-size: 19px;
  color: #f2fbff !important;
}

.pm-permission-modal header .pm-permission-close {
  width: auto;
  min-width: 58px;
  min-height: 36px;
  padding: 0 12px;
  font-size: 14px;
}

.pm-permission-modal-body {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 0;
  background: rgba(3, 12, 23, .22);
}

.pm-permission-categories {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 14px;
  overflow: auto;
  border-right: 1px solid rgba(148, 214, 255, .22);
  background: rgba(4, 18, 31, .56);
}

.pm-permission-categories button {
  justify-content: flex-start;
  width: 100%;
  padding: 9px 10px;
  text-align: left;
  border-color: rgba(148, 214, 255, .24);
  background: rgba(12, 34, 50, .78);
  color: #dff6ff;
}

.pm-permission-categories button.active {
  border-color: rgba(96, 165, 250, .92);
  background: linear-gradient(135deg, rgba(37, 99, 235, .46), rgba(14, 165, 233, .28));
  color: #f8fdff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .13);
}

.pm-permission-blocks {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 16px;
  overflow: auto;
}

.pm-permission-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px 120px;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(148, 214, 255, .26);
  border-radius: 8px;
  background: rgba(10, 31, 46, .72);
  color: #eaf7ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}

.pm-permission-block strong {
  color: #f2fbff !important;
}

.pm-permission-block[data-pm-permission-locked] {
  opacity: .66;
}

.pm-permission-block label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
}

.pm-permission-block input[type="checkbox"] {
  appearance: none;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  margin: 0;
  border: 1px solid rgba(148, 214, 255, .58);
  border-radius: 4px;
  background: rgba(2, 11, 20, .72);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .35);
  accent-color: #38bdf8;
}

.pm-permission-block input[type="checkbox"]:checked {
  border-color: #67e8f9;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.pm-permission-block input[type="checkbox"]:checked::after {
  content: "";
  display: block;
  width: 8px;
  height: 4px;
  margin: 3px 0 0 3px;
  border-left: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  transform: rotate(-45deg);
}

.pm-permission-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid rgba(148, 214, 255, .24);
  background: rgba(6, 22, 34, .78);
}

.pm-permission-modal-actions button {
  min-width: 76px;
  min-height: 38px;
  border: 1px solid rgba(148, 214, 255, .3);
  border-radius: 8px;
  background: rgba(12, 34, 50, .78);
  color: #eaf7ff;
  cursor: pointer;
}

.pm-permission-modal-actions button[data-pm-save-permission] {
  border-color: rgba(103, 232, 249, .72);
  background: linear-gradient(135deg, #2563eb, #0891b2);
  color: #ffffff;
}

@media (max-width: 760px) {
  .pm-settings-minimal-r1 .panel-head,
  .pm-settings-role-card {
    grid-template-columns: 1fr;
  }

  .pm-settings-minimal-r1 .panel-head {
    align-items: flex-start;
  }

  .pm-settings-entry-grid {
    grid-template-columns: 1fr;
  }

  .pm-settings-role-card {
    align-items: stretch;
  }

  body.pm-permission-modal-open .sidebar {
    visibility: hidden;
  }

  .pm-permission-modal-backdrop {
    padding: 10px;
  }

  .pm-permission-modal {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }

  .pm-permission-modal-body {
    grid-template-columns: 1fr;
  }

  .pm-permission-modal-actions {
    justify-content: stretch;
  }

  .pm-permission-modal-actions button {
    flex: 1 1 0;
  }

  .pm-permission-categories {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border, #d8dee9);
  }

  .pm-permission-categories button {
    flex: 0 0 auto;
    width: auto;
    white-space: nowrap;
  }

  .pm-permission-block {
    grid-template-columns: 1fr;
  }
}
/* PM-AI-MEMORY-VAULT-R1-20260626-02 */
.ai-memory-r1-panel {
  color: #eefbff;
  border: 1px solid rgba(146, 232, 255, 0.18);
  background: linear-gradient(145deg, rgba(7, 13, 24, 0.9), rgba(17, 29, 44, 0.78));
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(22px) saturate(1.18);
  border-radius: 18px;
  padding: 18px;
}

.ai-memory-r1-head,
.ai-memory-r1-section-head,
.ai-memory-r1-card-actions,
.ai-memory-r1-archive {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  flex-wrap: wrap;
}

.ai-memory-r1-head h2 {
  margin: 8px 0 4px;
  font-size: 28px;
  letter-spacing: 0;
}

.ai-memory-r1-head p,
.ai-memory-r1-card p,
.ai-memory-r1-todo small,
.ai-memory-r1-boundary dd,
.ai-memory-r1-safe-card span {
  color: rgba(222, 244, 250, 0.74);
  line-height: 1.58;
}

.ai-memory-r1-panel button {
  border: 1px solid rgba(146, 232, 255, 0.22);
  color: #eefbff;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 9px 12px;
  min-height: 36px;
  cursor: pointer;
}

.ai-memory-r1-panel button:not(:disabled):hover {
  background: rgba(146, 232, 255, 0.14);
}

.ai-memory-r1-panel button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.ai-memory-r1-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 14px 0;
}

.ai-memory-r1-tabs span {
  border: 1px solid rgba(146, 232, 255, 0.16);
  background: rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
}

.ai-memory-r1-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.85fr);
  gap: 14px;
}

.ai-memory-r1-section,
.ai-memory-r1-side,
.ai-memory-r1-safe-card {
  border: 1px solid rgba(146, 232, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 14px;
}

.ai-memory-r1-card-grid,
.ai-memory-r1-todos {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.ai-memory-r1-card,
.ai-memory-r1-todo,
.ai-memory-r1-boundary {
  border: 1px solid rgba(146, 232, 255, 0.14);
  background: rgba(4, 11, 22, 0.42);
  border-radius: 12px;
  padding: 12px;
}

.ai-memory-r1-card > div:first-child,
.ai-memory-r1-todo {
  display: grid;
  gap: 6px;
}

.ai-memory-r1-card span {
  color: rgba(222, 244, 250, 0.68);
  font-size: 12px;
}

.ai-memory-r1-boundary {
  margin-top: 12px;
}

.ai-memory-r1-boundary dl {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 8px 10px;
  margin: 10px 0 0;
}

.ai-memory-r1-boundary dt {
  color: #8ce7ff;
  font-weight: 700;
}

.ai-memory-r1-boundary dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.ai-memory-r1-archive {
  margin-top: 12px;
  border: 1px solid rgba(146, 232, 255, 0.12);
  border-radius: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.05);
}

.ai-memory-r1-panel.customer-safe {
  max-width: 760px;
}

.ai-memory-r1-safe-card {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

@media (max-width: 860px) {
  .ai-memory-r1-panel {
    border-radius: 14px;
    padding: 14px;
  }

  .ai-memory-r1-head h2 {
    font-size: 22px;
  }

  .ai-memory-r1-layout,
  .ai-memory-r1-boundary dl {
    grid-template-columns: 1fr;
  }

  .ai-memory-r1-panel button {
    width: 100%;
  }
}
.platform-api-gate {
  display: grid;
  gap: 14px;
  border: 1px solid rgba(120, 220, 190, 0.18);
  background: linear-gradient(145deg, rgba(8, 18, 24, 0.84), rgba(18, 34, 42, 0.74));
  backdrop-filter: blur(18px);
}

.pm-settings-api-gate {
  margin-top: 18px;
}

.platform-api-gate.safe .panel-head {
  align-items: flex-start;
}

.platform-api-safe-grid,
.platform-api-gate-actions,
.platform-api-grid {
  display: grid;
  gap: 10px;
}

.platform-api-safe-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.platform-api-safe-grid span,
.platform-api-gate .platform-api-checklist li,
.platform-api-gate .platform-api-approvals li,
.comfy-api-gate-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--ink);
}

.platform-api-safe-grid span {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 10px;
  font-size: 13px;
}

.platform-api-gate-actions {
  grid-template-columns: repeat(3, max-content);
  align-items: center;
}

.platform-api-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
}

.platform-api-gate h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.platform-api-gate table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.16);
}

.platform-api-gate th,
.platform-api-gate td {
  padding: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

.platform-api-gate td strong,
.platform-api-gate td small {
  display: block;
}

.platform-api-gate td small {
  margin-top: 4px;
  color: var(--muted);
}

.platform-api-checklist,
.platform-api-approvals {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.platform-api-checklist li,
.platform-api-approvals li {
  padding: 9px 10px;
  font-size: 13px;
}

.platform-api-approvals li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.comfy-api-gate-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  margin: 8px 0;
}

.comfy-api-gate-card span {
  color: var(--muted);
  font-size: 13px;
}

.platform-api-gate-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.62);
}

.platform-api-gate-modal-card {
  width: min(760px, 94vw);
  max-height: min(720px, 88vh);
  overflow: auto;
  border: 1px solid rgba(120, 220, 190, 0.24);
  border-radius: 10px;
  background: rgba(8, 18, 24, 0.96);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

.platform-api-gate-modal-head {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(8, 18, 24, 0.98);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.platform-api-gate-modal pre {
  margin: 0;
  padding: 14px;
  white-space: pre-wrap;
  color: #d7f8ee;
  font-size: 12px;
  line-height: 1.55;
}

@media (max-width: 760px) {
  .platform-api-safe-grid,
  .platform-api-grid,
  .platform-api-gate-actions {
    grid-template-columns: 1fr;
  }

  .platform-api-gate th,
  .platform-api-gate td {
    padding: 8px;
    font-size: 12px;
  }
}
/* CODELEAD-AI-EDITING-LOCAL-PIPELINE-R13 · 本地链路B 真出片 UI · 美梵青玻璃主题 */
.r13-local { margin-top: 14px; background: var(--glass-card, rgba(5,19,30,.78)); border: 1px solid var(--glass-line, rgba(126,211,242,.3)); border-radius: 14px; padding: 14px; color: var(--ink, #effbff); }
.r13-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.r13-head b { font-size: 14.5px; color: #eaf8ff; }
.r13-wk { font-size: 12px; padding: 3px 10px; border-radius: 12px; }
.r13-wk.on { color: #8be3c6; background: rgba(110,220,180,.16); }
.r13-wk.off { color: #f0b48c; background: rgba(240,150,110,.14); }
.r13-wk code { color: #cdeefb; }
.r13-nodes { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.r13-node { display: flex; align-items: center; gap: 7px; font-size: 12px; color: #cdeefb; padding: 6px 10px; border-radius: 8px; background: rgba(8,22,36,.5); border-left: 3px solid var(--muted, rgba(207,230,238,.3)); }
.r13-node b { color: var(--teal, #76d8f6); font-size: 12px; }
.r13-node em { font-style: normal; font-size: 11px; padding: 1px 7px; border-radius: 9px; }
.r13-node.not_ready em { background: rgba(207,230,238,.1); color: var(--muted, rgba(207,230,238,.6)); }
.r13-node.ready { border-left-color: var(--teal, #76d8f6); } .r13-node.ready em { background: rgba(126,211,242,.15); color: #bfe6f6; }
.r13-node.running em { background: rgba(240,200,120,.18); color: #f0d08c; }
.r13-node.done { border-left-color: #6edcb4; } .r13-node.done em { background: rgba(110,220,180,.18); color: #8be3c6; }
.r13-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.r13-col { background: rgba(6,16,26,.5); border: 1px solid var(--glass-line, rgba(126,211,242,.18)); border-radius: 10px; padding: 11px; min-width: 0; }
.r13-col-t { font-size: 12.5px; color: var(--teal, #76d8f6); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.r13-empty { color: var(--muted, rgba(207,230,238,.6)); font-size: 12px; }
.r13-file { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; border: 1px solid var(--teal, #76d8f6); background: rgba(118,216,246,.12); color: #9fe9ff; border-radius: 9px; padding: 7px 13px; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.r13-file input { display: none; }
.r13-btn { border: 1px solid var(--glass-line, rgba(126,211,242,.3)); background: rgba(10,26,40,.5); color: #cdeefb; border-radius: 9px; padding: 8px 13px; font-size: 13px; cursor: pointer; margin-bottom: 8px; }
.r13-btn.primary { background: linear-gradient(180deg,#8fe3fb,#4fbbe8); color: #04212f; font-weight: 700; border: 0; }
.r13-btn.s { padding: 4px 10px; font-size: 12px; margin: 0; }
.r13-btn.ghost { background: rgba(8,22,36,.4); }
.r13-btn[disabled] { opacity: .6; cursor: default; }
.r13-thumbs { display: flex; flex-wrap: wrap; gap: 6px; }
.r13-thumb { width: 78px; display: flex; flex-direction: column; gap: 2px; }
.r13-thumb img { width: 78px; height: 110px; object-fit: cover; border-radius: 6px; background: rgba(10,26,42,.7); }
.r13-thumb em { font-style: normal; font-size: 9.5px; color: var(--muted, rgba(207,230,238,.6)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r13-cnt { margin-top: 6px; font-size: 12px; color: var(--teal, #76d8f6); }
.r13-video { width: 100%; max-height: 320px; border-radius: 8px; background: #000; }
.r13-mp4meta { margin-top: 6px; font-size: 12px; color: #8be3c6; }
.r13-lib-wrap { margin-top: 14px; }
.r13-lib { display: flex; flex-wrap: wrap; gap: 10px; }
.r13-lib-card { width: 200px; border: 1px solid var(--glass-line, rgba(126,211,242,.2)); border-radius: 10px; padding: 8px; display: flex; flex-direction: column; gap: 5px; }
.r13-lib-card img { width: 100%; height: 90px; object-fit: cover; border-radius: 6px; background: rgba(10,26,42,.7); }
.r13-lib-meta { display: flex; flex-direction: column; gap: 2px; }
.r13-lib-meta b { font-size: 12px; color: #dcf3fb; }
.r13-lib-meta span { font-size: 10.5px; color: var(--muted, rgba(207,230,238,.62)); }
.r13-route { color: var(--teal, #76d8f6) !important; }
.r13-dev { margin-top: 12px; font-size: 11.5px; color: var(--muted, rgba(207,230,238,.7)); }
.r13-dev summary { cursor: pointer; color: var(--teal, #76d8f6); }
.r13-dev-body { margin-top: 6px; line-height: 1.7; background: rgba(6,14,26,.5); padding: 8px 10px; border-radius: 8px; }
@media (max-width: 1100px) { .r13-grid { grid-template-columns: 1fr; } }
/* PM-AI-MEMORY-VAULT-R2-OBSIDIAN-GRAPH-JOURNAL-20260626-17 */
/* UI-AI-MEMORY-SYSTEM-SETTINGS-R2-VISUAL-20260626-19 */
.ai-memory-r2-panel {
  display: grid;
  gap: 16px;
  color: #e5e7eb;
  overflow-x: hidden;
}

.ai-memory-r2-head,
.ai-memory-r2-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ai-memory-r2-head h2,
.ai-memory-r2-section-head strong {
  margin: 0;
}

.ai-memory-r2-head p {
  margin: 6px 0 0;
  color: rgba(226, 232, 240, 0.74);
  line-height: 1.55;
}

.ai-memory-r2-actions,
.ai-memory-r2-section-head {
  flex-wrap: wrap;
}

.ai-memory-r2-actions button,
.ai-memory-r2-section-head button {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.68);
  color: #f8fafc;
  min-height: 36px;
  padding: 0 12px;
  cursor: pointer;
}

.ai-memory-r2-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ai-memory-r2-tabs span {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  padding: 7px 11px;
  background: rgba(15, 23, 42, 0.5);
  color: rgba(226, 232, 240, 0.86);
  font-size: 13px;
}

.ai-memory-r2-graph,
.ai-memory-r2-journal,
.ai-memory-r2-attachments,
.ai-memory-r2-list,
.ai-memory-r2-admin-boundary {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.42);
  padding: 14px;
  backdrop-filter: blur(18px);
}

.ai-memory-r2-graph {
  background:
    linear-gradient(135deg, rgba(14, 28, 48, 0.86), rgba(8, 13, 25, 0.74)),
    rgba(15, 23, 42, 0.42);
}

.ai-memory-r2-graph-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 14px;
  align-items: stretch;
  margin-top: 12px;
}

.ai-memory-r2-graph-canvas {
  position: relative;
  height: 312px;
  overflow: hidden;
  border-radius: 10px;
  background:
    radial-gradient(circle at 18% 18%, rgba(56, 189, 248, 0.2), transparent 30%),
    radial-gradient(circle at 76% 36%, rgba(167, 243, 208, 0.12), transparent 28%),
    rgba(2, 6, 23, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), inset 0 -80px 120px rgba(8, 13, 25, 0.36);
}

.ai-memory-r2-graph-canvas svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.ai-memory-r2-graph-canvas line {
  stroke: rgba(125, 211, 252, 0.36);
  stroke-width: 2;
}

.ai-memory-r2-node {
  position: absolute;
  transform: translate(-50%, -50%);
  min-width: 88px;
  min-height: 36px;
  border: 1px solid rgba(125, 211, 252, 0.35);
  border-radius: 8px;
  background: rgba(10, 22, 38, 0.92);
  color: #e0f2fe;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28), 0 0 18px rgba(56, 189, 248, 0.1);
  cursor: pointer;
}

.ai-memory-r2-node-core::before {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 10px;
  border: 1px solid rgba(125, 211, 252, 0.08);
  pointer-events: none;
}

.ai-memory-r2-node span {
  position: relative;
  z-index: 1;
}

.ai-memory-r2-node.project,
.ai-memory-r2-node.attachment {
  border-color: rgba(167, 243, 208, 0.36);
  color: #dcfce7;
}

.ai-memory-r2-node.platform_rule_ref {
  border-color: rgba(252, 211, 77, 0.38);
  color: #fef3c7;
}

.ai-memory-r2-graph-meta {
  display: grid;
  align-content: start;
  gap: 9px;
  padding: 14px;
  border: 1px solid rgba(125, 211, 252, 0.16);
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.42);
}

.ai-memory-r2-graph-meta strong {
  color: #f8fafc;
}

.ai-memory-r2-graph-meta span {
  display: inline-flex;
  width: fit-content;
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.12);
  color: #bae6fd;
  font-size: 12px;
}

.ai-memory-r2-graph-meta small {
  color: rgba(226, 232, 240, 0.68);
  line-height: 1.65;
}

.ai-memory-r2-columns,
.ai-memory-r2-journal-grid,
.ai-memory-r2-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.ai-memory-r2-columns {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 0;
}

.ai-memory-r2-entry-strip {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 12px;
}

.ai-memory-r2-card,
.ai-memory-r2-attachment-card {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.42);
  padding: 12px;
  min-height: 110px;
}

.ai-memory-r2-card strong,
.ai-memory-r2-attachment-card strong {
  display: block;
  margin-bottom: 7px;
}

.ai-memory-r2-card p,
.ai-memory-r2-attachment-card p {
  margin: 0 0 8px;
  color: rgba(226, 232, 240, 0.72);
  line-height: 1.52;
}

.ai-memory-r2-card small,
.ai-memory-r2-attachment-card small {
  color: rgba(148, 163, 184, 0.9);
}

.ai-memory-r2-photo-shell {
  display: grid;
  place-items: center;
  min-height: 92px;
  margin-bottom: 10px;
  border: 1px dashed rgba(148, 163, 184, 0.32);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.5);
  color: rgba(226, 232, 240, 0.78);
}

.ai-memory-r2-admin-boundary summary {
  cursor: pointer;
  font-weight: 700;
}

.ai-memory-r2-admin-boundary ul {
  margin: 10px 0;
  padding-left: 18px;
  line-height: 1.7;
}

.ai-memory-r2-panel.customer-safe {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.42);
  padding: 16px;
}

@media (max-width: 860px) {
  .ai-memory-r2-head,
  .ai-memory-r2-section-head {
    display: grid;
  }

  .ai-memory-r2-columns {
    grid-template-columns: 1fr;
  }

  .ai-memory-r2-graph-stage,
  .ai-memory-r2-entry-strip {
    grid-template-columns: 1fr;
  }

  .ai-memory-r2-graph-canvas {
    height: 340px;
    overflow-x: hidden;
  }

  .ai-memory-r2-node {
    min-width: 76px;
    font-size: 12px;
  }
}
/* PM-SYSTEM-SETTINGS-IA-RESTORE-R1-20260626-18 */
/* UI-AI-MEMORY-SYSTEM-SETTINGS-R2-VISUAL-20260626-19 */
.settings-ia-r1 {
  display: grid;
  gap: 16px;
  color: #f7f3ea;
  overflow-x: hidden;
}

.settings-ia-r1-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(21, 24, 30, 0.86), rgba(35, 31, 26, 0.76));
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
}

.settings-ia-r1-eyebrow {
  margin: 0 0 6px;
  color: rgba(247, 243, 234, 0.62);
  font-size: 12px;
}

.settings-ia-r1-head h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 0;
}

.settings-ia-r1-head h1 {
  margin: 0;
  font-size: 26px;
  letter-spacing: 0;
}

.settings-ia-r1-summary {
  max-width: 520px;
  color: rgba(247, 243, 234, 0.72);
  font-size: 13px;
  line-height: 1.8;
}

.settings-ia-r1-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px;
  width: fit-content;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(12, 15, 20, 0.58);
}

.settings-ia-r1-nav button {
  appearance: none;
  font: inherit;
}

.settings-ia-r1-tab {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: rgba(247, 243, 234, 0.72);
  cursor: pointer;
}

.settings-ia-r1-tab.is-active {
  border-color: rgba(219, 180, 112, 0.45);
  background: rgba(219, 180, 112, 0.15);
  color: #fff7e7;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 22px rgba(219, 180, 112, 0.11);
}

.settings-ia-r1-tab:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.settings-ia-r1-panel {
  display: grid;
  gap: 14px;
}

.settings-ia-r1-api-center {
  display: grid;
  gap: 12px;
}

.settings-ia-r1-panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(12, 16, 24, 0.62);
}

.settings-ia-r1-panel-head h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0;
}

.settings-ia-r1-panel-head span {
  color: rgba(247, 243, 234, 0.62);
  font-size: 12px;
}

.settings-ia-r1-panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.settings-ia-r1-panel-title h3 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0;
}

.settings-ia-r1-panel-title p {
  margin: 4px 0 0;
  color: rgba(247, 243, 234, 0.65);
  font-size: 13px;
}

.settings-ia-r1-count {
  min-width: 86px;
  padding: 7px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(247, 243, 234, 0.75);
  font-size: 12px;
  text-align: center;
}

.settings-ia-r1-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.settings-ia-r1-entry {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px 12px;
  min-height: 152px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(17, 20, 25, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.settings-ia-r1-entry::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(120, 190, 255, 0.08), transparent 45%);
  pointer-events: none;
}

.settings-ia-r1-entry-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(120, 190, 255, 0.18);
  border-radius: 8px;
  background: rgba(27, 44, 66, 0.52);
  color: #d7ebff;
  font-weight: 700;
}

.settings-ia-r1-entry > div,
.settings-ia-r1-entry > button {
  position: relative;
  z-index: 1;
}

.settings-ia-r1-entry h4 {
  margin: 0;
  color: #fff9ec;
  font-size: 16px;
  letter-spacing: 0;
}

.settings-ia-r1-entry p {
  margin: 0;
  color: rgba(247, 243, 234, 0.66);
  font-size: 13px;
  line-height: 1.75;
}

.settings-ia-r1-entry button,
.settings-ia-r1-modal-actions button {
  grid-column: 2;
  width: fit-content;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid rgba(219, 180, 112, 0.38);
  border-radius: 6px;
  background: rgba(219, 180, 112, 0.16);
  color: #ffe9ba;
  cursor: pointer;
}

.settings-ia-r1-entry button:hover,
.settings-ia-r1-modal-actions button:hover {
  background: rgba(219, 180, 112, 0.24);
}

.settings-ia-r1-safe {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(16, 20, 24, 0.78);
}

.settings-ia-r1-safe h3 {
  margin: 0 0 8px;
}

.settings-ia-r1-safe p {
  margin: 0;
  color: rgba(247, 243, 234, 0.68);
  line-height: 1.8;
}

.settings-ia-r1-dev-drawer {
  padding: 12px 14px;
  border: 1px solid rgba(120, 190, 255, 0.18);
  border-radius: 8px;
  background: rgba(18, 29, 42, 0.62);
  color: rgba(232, 242, 255, 0.78);
}

.settings-ia-r1-dev-drawer summary {
  cursor: pointer;
  color: #c9e5ff;
}

.settings-ia-r1-dev-drawer ul {
  margin: 10px 0 0;
  padding-left: 18px;
  line-height: 1.8;
}

.settings-ia-r1-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(4, 6, 10, 0.66);
}

.settings-ia-r1-modal-card {
  width: min(720px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(18, 20, 25, 0.94);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  color: #f7f3ea;
}

.settings-ia-r1-modal-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.settings-ia-r1-modal-card > header strong {
  color: #fff9ec;
  font-size: 18px;
}

.settings-ia-r1-modal-card > header button,
.settings-ia-r1-template-actions button,
.settings-ia-r1-modal-actions button {
  appearance: none;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(219, 180, 112, 0.42);
  border-radius: 7px;
  background: linear-gradient(145deg, rgba(219, 180, 112, 0.22), rgba(80, 61, 28, 0.42));
  color: #fff2cc;
  font: inherit;
  font-weight: 800;
  letter-spacing: 0;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.settings-ia-r1-modal-card > header button:hover,
.settings-ia-r1-template-actions button:hover,
.settings-ia-r1-modal-actions button:hover {
  border-color: rgba(255, 222, 160, 0.62);
  background: linear-gradient(145deg, rgba(219, 180, 112, 0.3), rgba(93, 67, 28, 0.5));
}

.settings-ia-r1-modal-card h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.settings-ia-r1-modal-body {
  display: grid;
  gap: 10px;
  margin: 12px 0 16px;
}

.settings-ia-r1-modal-body p,
.settings-ia-r1-modal-body li {
  color: rgba(247, 243, 234, 0.72);
  line-height: 1.75;
}

.settings-ia-r1-modal-body ul {
  margin: 0;
  padding-left: 18px;
}

.settings-ia-r1-template-list {
  display: grid;
  gap: 12px;
}

.settings-ia-r1-template-list article {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(11, 16, 24, 0.72);
}

.settings-ia-r1-template-head strong {
  font-size: 16px;
}

.settings-ia-r1-template-head span {
  padding: 5px 10px;
  border: 1px solid rgba(125, 211, 252, 0.28);
  border-radius: 999px;
  color: #c9e5ff;
  background: rgba(14, 116, 144, 0.16);
}

.settings-ia-r1-template-head,
.settings-ia-r1-template-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.settings-ia-r1-template-list label {
  display: grid;
  gap: 6px;
  color: rgba(247, 243, 234, 0.7);
  font-size: 12px;
  font-weight: 800;
}

.settings-ia-r1-template-list input,
.settings-ia-r1-template-list textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff8eb;
  font: inherit;
  padding: 8px 10px;
}

.settings-ia-r1-template-list textarea {
  min-height: 76px;
  resize: vertical;
}

.settings-ia-r1-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

@media (max-width: 860px) {
  .settings-ia-r1-head,
  .settings-ia-r1-panel-title {
    align-items: stretch;
    flex-direction: column;
  }

  .settings-ia-r1-grid {
    grid-template-columns: 1fr;
  }

  .settings-ia-r1-panel-head {
    display: grid;
  }

  .settings-ia-r1-nav {
    width: 100%;
  }

  .settings-ia-r1-tab {
    flex: 1 1 120px;
  }

  .settings-ia-r1-entry {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .settings-ia-r1-entry button,
  .settings-ia-r1-modal-actions button {
    grid-column: 1 / -1;
  }
}
/* CODELEAD-EMBEDDED-AI-OPERATOR-R14 · 浮窗 · 美梵青玻璃 */
/* UI-P0-PRODUCT-DEPTH-SUPPORT-R1-20260627-26 */
#r14-operator{ position:fixed; right:20px; bottom:20px; z-index:9000; }
.r14-bubble{ width:52px;height:52px;border-radius:50%;border:0;cursor:pointer;font-size:22px;color:#04212f;background:linear-gradient(180deg,#8fe3fb,#4fbbe8);box-shadow:0 6px 20px rgba(79,187,232,.5); }
.r14-panel{ position:absolute; right:0; bottom:64px; width:360px; max-height:70vh; display:none; flex-direction:column; background:var(--mf-theme-card-strong, rgba(6,20,32,.97)); border:1px solid var(--mf-theme-line-strong, rgba(126,211,242,.4)); border-radius:14px; overflow:hidden; box-shadow:0 12px 40px rgba(0,0,0,.5); }
.r14-panel.show{ display:flex; }
.r14-head{ display:flex; align-items:center; gap:8px; padding:10px 12px; background:rgba(126,211,242,.1); border-bottom:1px solid var(--mf-theme-line, rgba(126,211,242,.2)); }
.r14-head b{ color:var(--mf-theme-ink-strong, #eaf8ff); font-size:13.5px; }
.r14-ctx{ margin-left:auto; font-size:10px; color:var(--mf-theme-muted, #9fe9ff); background:rgba(118,216,246,.16); padding:2px 8px; border-radius:8px; max-width:170px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.r14-x{ background:none;border:0;color:var(--mf-theme-muted, #9fb8c4);font-size:18px;cursor:pointer; }
.r14-msgs{ flex:1; overflow-y:auto; padding:12px; display:flex; flex-direction:column; gap:9px; }
.r14-hint{ color:var(--mf-theme-muted, #9fb8c4); font-size:12px; line-height:1.6; }
.r14-msg{ max-width:86%; font-size:12.5px; line-height:1.5; padding:8px 11px; border-radius:10px; }
.r14-msg.me{ align-self:flex-end; background:linear-gradient(180deg,#8fe3fb,#4fbbe8); color:#04212f; font-weight:600; }
.r14-msg.ai{ align-self:flex-start; background:var(--mf-theme-card, rgba(255,255,255,.06)); color:var(--mf-theme-ink, #dcf3fb); border:1px solid var(--mf-theme-line, rgba(126,211,242,.18)); }
.r14-input{ display:flex; gap:6px; padding:10px; border-top:1px solid var(--mf-theme-line, rgba(126,211,242,.18)); }
.r14-input input{ flex:1; background:var(--mf-theme-card, rgba(8,22,36,.7)); border:1px solid var(--mf-theme-line, rgba(126,211,242,.25)); border-radius:8px; padding:8px 10px; color:var(--mf-theme-ink-strong, #eaf8ff); font-size:12.5px; }
.r14-input button{ background:linear-gradient(180deg,#8fe3fb,#4fbbe8); color:#04212f; border:0; border-radius:8px; padding:0 14px; font-weight:700; cursor:pointer; }
@media (max-width:480px){ .r14-panel{ width:calc(100vw - 32px); } }
/* 计划/确认/日志 样式(Task4/5/6 追加) */
.r14-plan{ width:100%; background:var(--mf-theme-card, rgba(8,22,36,.7)); border:1px solid var(--mf-theme-line, rgba(126,211,242,.25)); border-radius:10px; padding:10px; }
.r14-plan .pt{ font-size:11px; color:var(--mf-theme-ink-strong, #8fe3fb); font-weight:700; margin-bottom:7px; }
.r14-step{ display:flex; align-items:center; gap:8px; font-size:11.5px; color:var(--mf-theme-ink, #cdeefb); padding:4px 0; }
.r14-step .n{ width:18px;height:18px;border-radius:50%;background:rgba(126,211,242,.2);color:var(--mf-theme-muted, #8fe3fb);font-size:10px;display:flex;align-items:center;justify-content:center; }
.r14-chip{ margin-left:auto; font-size:9.5px; padding:1px 7px; border-radius:8px; }
.r14-chip.ok{ background:rgba(110,220,180,.18); color:var(--mf-theme-ink-strong, #8be3c6); } .r14-chip.cf{ background:rgba(240,200,120,.2); color:var(--mf-theme-ink-strong, #f0d08c); } .r14-chip.need{ background:rgba(240,150,110,.18); color:var(--mf-theme-ink-strong, #f0b48c); }
.r14-confirm{ width:100%; background:rgba(240,200,120,.08); border:1px solid rgba(240,200,120,.35); border-radius:10px; padding:10px; }
.r14-confirm .ct{ font-size:11px; color:var(--mf-theme-ink-strong, #f0d08c); font-weight:700; margin-bottom:6px; }
.r14-btn{ font-size:11px;border-radius:8px;padding:5px 14px;font-weight:700;cursor:pointer;border:0; }
.r14-btn.go{ background:linear-gradient(180deg,#8fe3fb,#4fbbe8); color:#04212f; }
.r14-btn.no{ background:var(--mf-theme-card, rgba(255,255,255,.06)); color:var(--mf-theme-muted, #9fb8c4); border:1px solid var(--mf-theme-line, rgba(207,230,238,.2)); }
.r14-log{ width:100%; background:var(--mf-theme-card, rgba(6,16,26,.6)); border-left:3px solid var(--mf-theme-line-strong, #6edcb4); border-radius:6px; padding:8px 10px; font-size:11px; color:var(--mf-theme-ink, #cdeefb); }
.r14-log b{ color:var(--mf-theme-ink-strong, #8be3c6); } .r14-log .res{ color:var(--mf-theme-muted, #9fe9ff); }
.r14-dev{ font-size:10.5px; color:var(--mf-theme-muted, #9fb8c4); padding:8px 12px; border-top:1px solid var(--mf-theme-line, rgba(126,211,242,.12)); }
.r14-dev summary{ cursor:pointer; color:var(--mf-theme-muted, #76d8f6); } .r14-dev-b{ margin-top:5px; }

/* UI P0 visual support only: keep R14 behavior, make it usable as a main workspace entry. */
#r14-operator {
  right: 24px;
  bottom: 24px;
}
.r14-bubble {
  width: 64px;
  height: 64px;
  font-size: 26px;
  background:
    radial-gradient(circle at 35% 20%, rgba(255,255,255,.84), transparent 26%),
    linear-gradient(180deg,#8fe3fb,#37a8dc);
  box-shadow: 0 16px 44px rgba(79,187,232,.42), 0 0 0 8px rgba(79,187,232,.08);
}
.r14-panel {
  width: min(620px, calc(100vw - 48px));
  min-height: 520px;
  max-height: min(78vh, 760px);
  border-radius: 8px;
  background: var(--mf-theme-card-strong,
    linear-gradient(145deg, rgba(10, 34, 54, .98), rgba(5, 14, 26, .97)));
  box-shadow: 0 26px 80px rgba(0,0,0,.52), inset 0 1px 0 rgba(255,255,255,.08);
}
.r14-head {
  min-height: 58px;
  padding: 13px 16px;
}
.r14-head b {
  font-size: 16px;
}
.r14-ctx {
  font-size: 12px;
  max-width: 260px;
  padding: 5px 10px;
}
.r14-msgs {
  padding: 16px;
  gap: 12px;
}
.r14-hint,
.r14-msg,
.r14-input input {
  font-size: 14px;
}
.r14-msg {
  line-height: 1.65;
  padding: 11px 13px;
  border-radius: 8px;
}
.r14-input {
  padding: 14px;
}
.r14-input input {
  min-height: 46px;
}
.r14-input button {
  min-width: 76px;
}
.r14-plan,
.r14-confirm,
.r14-log {
  border-radius: 8px;
}
.r14-step {
  font-size: 13px;
}
/* PM08: the existing six-entry bottom bar extends through 820px; the phone drawer stays at 640px. */
@media (max-width:820px){
  body[data-r15-nav-clearance="on"] #r14-operator {
    bottom: calc(max(14px, env(safe-area-inset-bottom)) + var(--mf-nav-bar-height, 0px));
  }
}
@media (max-width:640px){
  #r14-operator {
    right: 14px;
    /* 377: 右下入口球抬到六底栏之上(定稿 NY-11「右下仅原蓝助手」), --mf-nav-bar-height 由 31 量底栏实高写入(未写=0 兜底) */
    bottom: calc(max(14px, env(safe-area-inset-bottom)) + var(--mf-nav-bar-height, 0px));
    left: auto;
  }
  .r14-bubble {
    width: 44px;
    height: 44px;
    margin-left: 0;
    font-size: 18px;
    box-shadow: 0 10px 26px rgba(79,187,232,.34), 0 0 0 5px rgba(79,187,232,.06);
  }
  .r14-panel {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 86px;
    width: auto;
    min-height: 58vh;
    max-height: calc(100dvh - 112px);
  }
  .r14-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .r14-ctx {
    order: 3;
    margin-left: 0;
    max-width: 100%;
  }
  .r14-input {
    display: grid;
    grid-template-columns: 1fr;
  }
  .r14-input button {
    min-height: 42px;
  }
}

/* ===== R15-INTEGRATION-AFTER-PM-UI-20260627-07 · 仅追加: 拖动/停靠/模型指示 ·
   保留上方 UI-P0 视觉收口(尺寸/字号/移动端), 这里只补 R15 新功能元素的样式, 不改 UI-P0 默认观感 ===== */
.r14-bubble.r15-bubble { cursor:grab; touch-action:none; user-select:none; }
.r14-bubble.r15-bubble:active { cursor:grabbing; }
/* 头部容纳 模型指示 + 停靠按钮 */
.r15-head { flex-wrap:wrap; gap:10px; }
.r15-model { font-size:12px; color:var(--mf-theme-muted, #9fe9ff); background:rgba(118,216,246,.16); padding:3px 9px; border-radius:9px; white-space:nowrap; }
.r15-dockbtns { margin-left:auto; display:flex; gap:4px; }
.r15-dockbtns button { width:26px; height:24px; border-radius:7px; border:1px solid var(--mf-theme-line, rgba(126,211,242,.3)); background:var(--mf-theme-card, rgba(10,26,40,.5)); color:var(--mf-theme-ink, #cdeefb); font-size:12px; cursor:pointer; line-height:1; }
.r15-dockbtns button.on { background:linear-gradient(180deg,#8fe3fb,#4fbbe8); color:#04212f; border:0; font-weight:700; }
/* 上下文独立成行(可读) */
.r15-ctx { font-size:12px; color:var(--mf-theme-muted, #9fe9ff); background:var(--mf-theme-card, rgba(8,22,36,.55)); padding:7px 14px; border-bottom:1px solid var(--mf-theme-line, rgba(126,211,242,.12)); }
/* 停靠态: 右下(br)沿用 UI-P0 的 .r14-panel 定位与尺寸(不覆盖); 仅新增 右侧整栏 / 居中浮层 */
/* LAYOUT-FIX-FLOAT-RIGHTPANE-20260707 #1: 右侧停靠改为「内缩浮动栏」而非贴边整屏, 四周留安全间距 + 圆角 + 阴影,
   让正文右缘不被硬遮到底、浮窗读作可收起的浮层而非占满右边的墙。纯定位/尺寸, 不改停靠功能与 class。 */
#r14-operator.r15-dock-right .r15-panel {
  position:fixed; right:16px; top:16px; bottom:16px; left:auto;
  width:min(420px, calc(100vw - 32px)); max-height:calc(100vh - 32px);
  border-radius:14px; box-shadow:0 26px 80px rgba(0,0,0,.5), 0 0 0 1px rgba(126,211,242,.18);
}
#r14-operator.r15-dock-center .r15-panel { position:fixed; left:50%; top:50%; transform:translate(-50%,-50%); width:min(600px, 92vw); height:80vh; max-height:80vh; }
/* 移动端: 任何停靠态都收敛为底部安全大面板(高于桌面 dock 规则的来源顺序, 覆盖右侧/居中) */
@media (max-width:640px){
  #r14-operator.r15-dock-br .r15-panel,
  #r14-operator.r15-dock-right .r15-panel,
  #r14-operator.r15-dock-center .r15-panel {
    position:fixed; left:12px; right:12px; bottom:calc(86px + var(--mf-nav-bar-height, 0px)); top:auto; transform:none;
    width:auto; height:auto; min-height:58vh; max-height:calc(100dvh - 112px); border-radius:12px;
  }
}

/* ===== PUSH-DOCK-20260708 · 推挤式停靠: 正文让位不被浮窗盖(纯前端派生, body[data-r15-dock-layout] 驱动) =====
   布局态由 shard31 applyDockLayout() 写到 body 属性: push-right / overlay / mobile-drawer-open / mobile-collapsed。
   .main padding 只由本属性选择器施加, 不在 JS 里改 .main 内联样式(样式集中在 CSS, 易回退)。 */
/* —— 推挤式停靠(桌面 dock=right 展开够宽): 正文让位, 不被浮窗盖 ——
   让位宽度须真正清空右侧停靠浮窗: dock-right 浮窗 width:420px @ right:16px = 占右侧 436px(见上方 LAYOUT-FIX 规则),
   计划初稿写 380px 会短 56px 致正文右缘仍被盖(真机实测); 取 452px = 436 占位 + 16 正文与浮窗呼吸缝, 正文右缘完整可见。 */
.main{ transition: padding-right .2s ease; }
body[data-r15-dock-layout="push-right"] .main{ padding-right: 452px; }
/* 窄窗/默认 overlay 态不写 .main padding 覆盖: 只移除推挤, 保留基础正文留白。 */

/* —— 移动端(≤640): 下方 dock 抽屉, 正文留上半屏 —— */
@media (max-width: 640px){
  body[data-r15-dock-layout="mobile-drawer-open"] #r14-operator .r15-panel{
    /* 377: 抽屉坐在六底栏之上(bottom=栏高), 不被底栏盖(定稿 NY-11 六底栏+右下仅原蓝助手) */
    position: fixed; left: 0; right: 0; bottom: var(--mf-nav-bar-height, 0px); top: auto;
    width: 100vw; max-width: 100vw;
    /* 364(O44)+377: 抽屉高避开一级导航带(sticky sidebar 带底)与六底栏——min(60vh, 100vh−条底−栏高−8), 不伸进导航带, 不抬层级;
       下限=头+ctx+输入行实测和(O57: 输入发送区任何抽屉高下都必须落在面板/视口内, 245px=≤640 实测 59+63+123) */
    height: min(60vh, calc(100vh - var(--mf-nav-strip-bottom, 0px) - var(--mf-nav-bar-height, 0px) - 8px));
    max-height: min(60vh, calc(100vh - var(--mf-nav-strip-bottom, 0px) - var(--mf-nav-bar-height, 0px) - 8px));
    min-height: 245px;
    border-radius: 16px 16px 0 0; transform: translateY(0); transition: transform .25s ease;
  }
  body[data-r15-dock-layout="mobile-drawer-open"] #r14-operator .r15-dockbtns{ display: none; }
  /* 365(微, O44 观察项裁定修): 320 抽屉头折两行被 .r15-ctx 内遮(× 中心只剩 ~12px 暴露带)——窄屏头单行布局, 收起件必达 */
  body[data-r15-dock-layout="mobile-drawer-open"] #r14-operator .r14-head.r15-head{ flex-wrap: nowrap; flex-shrink: 0; align-items: center; min-height: 48px; }
  body[data-r15-dock-layout="mobile-drawer-open"] #r14-operator .r14-head.r15-head b{ white-space: nowrap; }
  body[data-r15-dock-layout="mobile-drawer-open"] #r14-operator .r15-model{ flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; max-width: 42%; }
  body[data-r15-dock-layout="mobile-drawer-open"] #r14-operator .r14-x{ margin-left: auto; flex-shrink: 0; min-width: 32px; min-height: 32px; }
  body[data-r15-dock-layout="mobile-drawer-open"] #r14-operator .r15-ctx{ flex-shrink: 0; }
  /* O57(342-r6): 面板 overflow:hidden 时 .r14-msgs 内容最小高把 .r14-input 发送区挤出面板底(320×568 初始 y 572-614>568)——
     msgs 让位(flex:1 1 0 + min-height:0, 自身可滚), 输入行钉底(flex-shrink:0); 头/ctx 的 flex-shrink:0 365 已有 */
  body[data-r15-dock-layout="mobile-drawer-open"] #r14-operator .r14-msgs.r15-msgs{ flex: 1 1 0; min-height: 0; overflow: auto; }
  body[data-r15-dock-layout="mobile-drawer-open"] #r14-operator .r14-input.r15-input{ flex-shrink: 0; }
  body[data-r15-dock-layout="mobile-collapsed"] #r14-operator .r15-panel{ transform: translateY(100%); }
}

/* 365: ≤360 再缩模型指示宽度, 头仍单行 */
@media (max-width: 360px){
  body[data-r15-dock-layout="mobile-drawer-open"] #r14-operator .r15-model{ max-width: 34%; }
}

/* ===== 242-S2 · 主题同源补件(记忆引用条/脚本草稿卡注) =====
   全部走 --mf-theme-* 全局变量(09 定义夜间 tech-glass-blue, 42 覆盖 day), 零新色系、不带旧菜单绿;
   引用条仅在真实检索/注入发生时才渲染(JS 侧恒空则不渲染, 样式休眠待命)。 */
.r15-cites{ font-size:11px; color:var(--mf-theme-muted, #9fb8c4); padding:6px 14px; border-bottom:1px solid var(--mf-theme-line, rgba(126,211,242,.12)); background:var(--mf-theme-card, rgba(8,22,36,.55)); }
.r15-cites summary{ cursor:pointer; color:var(--mf-theme-muted, #76d8f6); }
.r15-cite-list{ margin-top:6px; display:flex; flex-direction:column; gap:5px; }
.r15-cite{ display:flex; gap:8px; align-items:baseline; padding:5px 8px; border:1px solid var(--mf-theme-line, rgba(126,211,242,.18)); border-radius:8px; background:var(--mf-theme-card, rgba(255,255,255,.04)); }
.r15-cite b{ color:var(--mf-theme-ink-strong, #eaf8ff); font-weight:600; }
.r15-cite span{ margin-left:auto; color:var(--mf-theme-muted, #9fb8c4); font-size:10px; white-space:nowrap; }
.r15-draft-note{ display:block; margin-top:7px; font-size:10.5px; line-height:1.5; color:var(--mf-theme-muted, #9fb8c4); }

/* FE-KB: focus + visual viewport shrink only; untouched when keyboard closes. */
@media (max-width: 640px) {
  #r14-text { font-size: 16px; }
  body[data-r15-dock-layout="mobile-drawer-open"] #r14-operator[data-r15-keyboard="open"] .r15-panel {
    bottom: calc(var(--r15-keyboard-bottom) + 8px);
    height: min(60vh, calc(var(--r15-keyboard-height) - 16px));
    max-height: calc(var(--r15-keyboard-height) - 16px);
    min-height: 0;
    overflow: auto;
  }
  #r14-operator[data-r15-keyboard="open"] .r15-ctx { max-height: 48px; overflow: auto; flex-shrink: 1; }
  #r14-operator[data-r15-keyboard="open"] .r14-input input { min-width: 0; }
}

/* PM08-RW1: a fixed right panel must clear the same measured bar as its host. */
@media (640px < width <= 820px) {
  body[data-r15-nav-clearance="on"] #r14-operator.r15-dock-right .r15-panel.show {
    bottom: calc(16px + var(--mf-nav-bar-height, 0px));
    min-height: 0;
    max-height: calc(100vh - 32px - var(--mf-nav-bar-height, 0px));
  }
}

/* WO2220: streaming assistant; only input locks, cancellation aborts current fetch. */
#r14-operator .r15-assistant-thinking,
#r14-operator .r15-assistant-failure { display:grid; gap:8px; line-height:1.55; }
#r14-operator .r15-assistant-thinking small,
#r14-operator .r15-assistant-failure small { color:var(--mf-theme-muted,#9fb8c4); }
#r14-operator .r15-assistant-thinking > button { justify-self:start; }
#r14-operator .r15-thinking-dots { display:flex; gap:5px; align-items:center; min-height:12px; }
#r14-operator .r15-thinking-dots i { width:5px; height:5px; border-radius:50%; background:var(--mf-theme-ink-strong,#eaf8ff); animation:r15-assistant-thinking 1.2s ease-in-out infinite; }
#r14-operator .r15-thinking-dots i:nth-child(2) { animation-delay:.15s; }
#r14-operator .r15-thinking-dots i:nth-child(3) { animation-delay:.3s; }
#r14-operator .r14-input button:disabled { opacity:.55; cursor:wait; }
@keyframes r15-assistant-thinking { 0%,80%,100% { opacity:.35; transform:translateY(0); } 40% { opacity:1; transform:translateY(-3px); } }
@media (prefers-reduced-motion:reduce) { #r14-operator .r15-thinking-dots i { animation:none; opacity:1; } }

#r14-operator .r15-assistant-preview { margin:6px 0 0; padding:8px; max-height:100px; overflow:auto; white-space:pre-wrap; overflow-wrap:anywhere; font:inherit; background:var(--mf-theme-card,rgba(8,22,36,.55)); border:1px solid var(--mf-theme-line,rgba(126,211,242,.18)); border-radius:8px; }
#r14-operator [data-assistant-preview-shell][hidden] { display:none; }

#r14-operator .r15-assistant-status-row { display:flex; align-items:center; gap:8px; position:sticky; top:0; z-index:1; background:var(--mf-theme-card,rgba(8,22,36,.9)); }
#r14-operator .r15-assistant-status-row > button { margin-left:auto; flex-shrink:0; }
/* CODELEAD AI 模型设置 R14 */
.ai-model-settings-r14{ color:#dcf3fb; }
.ai-model-settings-r14 .ms-h{ display:flex; align-items:baseline; gap:10px; margin-bottom:8px; }
.ai-model-settings-r14 .ms-note{ font-size:11px; color:#9fb8c4; }
.ai-model-settings-r14 .ms-sec{ font-size:10px; text-transform:uppercase; letter-spacing:.5px; color:#76d8f6; margin:14px 0 6px; }
.ai-model-settings-r14 .ms-sec.team{ color:#f0b48c; }
.ai-model-settings-r14 .ms-ways{ display:flex; gap:10px; }
.ai-model-settings-r14 .ms-way{ flex:1; background:rgba(8,22,36,.6); border:1px solid rgba(126,211,242,.22); border-radius:9px; padding:9px; font-size:12.5px; color:#eaf8ff; display:block; cursor:pointer; }
.ai-model-settings-r14 .ms-way.sel{ border-color:#4fbbe8; background:rgba(79,187,232,.12); }
.ai-model-settings-r14 .ms-way small{ display:block; color:#9fb8c4; font-size:10px; margin-top:3px; }
.ai-model-settings-r14 .ms-row{ display:flex; align-items:center; gap:10px; padding:8px 0; border-bottom:1px dashed rgba(207,230,238,.12); }
.ai-model-settings-r14 .ms-name{ font-size:12.5px; color:#eaf8ff; font-weight:600; }
.ai-model-settings-r14 .ms-sub{ font-size:10px; color:#9fb8c4; margin-top:2px; }
.ai-model-settings-r14 .ms-right{ margin-left:auto; display:flex; align-items:center; gap:8px; }
.ai-model-settings-r14 .ms-tag{ font-size:9px; padding:1px 7px; border-radius:7px; }
.ai-model-settings-r14 .ms-tag.def{ background:rgba(110,220,180,.18); color:#8be3c6; } .ms-tag.bak{ background:rgba(126,211,242,.16); color:#9fe9ff; } .ms-tag.off{ background:rgba(207,230,238,.1); color:#9fb8c4; }
.ai-model-settings-r14 .ms-fld{ background:rgba(8,22,36,.7); border:1px solid rgba(126,211,242,.25); border-radius:6px; padding:4px 8px; font-size:11px; color:#cdeefb; }
.ai-model-settings-r14 .ms-fld.cap{ width:70px; }
.ai-model-settings-r14 .ms-mini{ font-size:10.5px; border-radius:7px; padding:3px 10px; background:rgba(118,216,246,.14); color:#9fe9ff; border:1px solid rgba(126,211,242,.35); cursor:pointer; }
.ai-model-settings-r14 .ms-mini.stop{ background:rgba(240,150,110,.16); color:#f0b48c; border-color:rgba(240,150,110,.4); }
.ai-model-settings-r14 .ms-add{ display:block; width:100%; margin-top:8px; font-size:11px; color:#9fe9ff; background:rgba(118,216,246,.1); border:1px dashed rgba(126,211,242,.4); border-radius:8px; padding:8px; cursor:pointer; }
.ai-model-settings-r14 .ms-cap{ background:rgba(8,22,36,.6); border:1px solid rgba(126,211,242,.2); border-radius:8px; padding:10px; }
/* UI-P0-PRODUCT-DEPTH-SUPPORT-R1-20260627-26 */
.api-center-r1 {
  display: grid;
  gap: 16px;
  color: #eef4ff;
  overflow-x: hidden;
  min-width: 0;
}
.api-center-r1.safe {
  color: inherit;
}
.api-center-r1-head,
.api-center-r1-title,
.ai-memory-r3-head,
.ai-memory-r3-section-head,
.settings-real-r2-head,
.settings-real-r2-panel-head,
.settings-real-r2-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.api-center-r1-head,
.api-center-r1-block,
.api-center-r1-provider {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(125, 211, 252, .22);
  background:
    linear-gradient(145deg, rgba(12, 32, 52, .78), rgba(8, 14, 26, .76)),
    rgba(11, 18, 32, .72);
  border-radius: 8px;
  padding: 14px;
  backdrop-filter: blur(18px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 16px 40px rgba(0, 0, 0, .16);
  min-width: 0;
  overflow-wrap: anywhere;
}
.api-center-r1-head::before,
.api-center-r1-block::before,
.api-center-r1-provider::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(125, 211, 252, .07), transparent 46%);
  pointer-events: none;
}
.api-center-r1-head h2,
.api-center-r1-head p {
  margin: 0;
}
.api-center-r1-head h2 {
  font-size: clamp(24px, 2.4vw, 32px);
}
.api-center-r1-head p {
  max-width: 760px;
  color: rgba(226, 240, 255, .72);
  line-height: 1.75;
}
.api-center-r1-head span, 
.api-center-r1-title span {
  color: #adc0d8;
  font-size: 12px;
}
.api-center-r1-nav,
.api-center-r1-tags,
.ai-memory-r3-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.api-center-r1-nav span, 
.api-center-r1-tags span, 
.ai-memory-r3-filter button {
  border: 1px solid rgba(148, 163, 184, .25);
  border-radius: 999px;
  padding: 5px 9px;
  color: #cbd8e9;
  background: rgba(15, 23, 42, .66);
  font-size: 12px;
}
.api-center-r1-metric-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.api-center-r1-metric-strip article {
  min-width: 0;
  border: 1px solid rgba(125, 211, 252, .2);
  border-radius: 8px;
  padding: 13px;
  background: linear-gradient(145deg, rgba(15, 47, 73, .68), rgba(15, 23, 42, .72));
}
.api-center-r1-metric-strip span {
  display: block;
  color: rgba(203, 216, 233, .72);
  font-size: 12px;
}
.api-center-r1-metric-strip strong {
  display: block;
  margin-top: 6px;
  color: #f8fbff;
  font-size: 20px;
}
.api-center-r1-grid,
.api-center-r1-binding-grid,
.api-center-r1-balance {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  min-width: 0;
}
.api-center-r1-coverage {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
  min-width: 0;
}
.api-center-r1-coverage article {
  display: grid;
  gap: 6px;
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, .2);
  border-radius: 8px;
  padding: 10px;
  overflow-wrap: anywhere;
}
.api-center-r1-provider {
  display: grid;
  gap: 10px;
}
.api-center-r1-provider-meta {
  display: grid;
  gap: 5px;
  color: #c7d2e5;
  font-size: 12px;
}
.api-center-r1 button,
.settings-real-r2 button,
.ai-memory-r3-panel button {
  border: 1px solid rgba(148, 163, 184, .32);
  background: rgba(30, 41, 59, .82);
  color: #eef4ff;
  border-radius: 7px;
  padding: 8px 11px;
  cursor: pointer;
  max-width: 100%;
  white-space: normal;
}
.api-center-r1 button:hover,
.settings-real-r2 button:hover,
.ai-memory-r3-panel button:hover {
  border-color: rgba(125, 211, 252, .7);
}
.api-center-r1-binding {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, .2);
  border-radius: 8px;
}
.api-center-r1-binding select,
.ai-memory-r3-form input,
.ai-memory-r3-form textarea,
.settings-real-r2-template-list input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, .28);
  background: rgba(15, 23, 42, .75);
  color: #eef4ff;
  border-radius: 7px;
  padding: 8px;
}
.api-center-r1-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  font-size: 12px;
  table-layout: fixed;
}
.api-center-r1-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 8px;
}
.api-center-r1-table th,
.api-center-r1-table td {
  border-bottom: 1px solid rgba(148, 163, 184, .16);
  padding: 8px;
  text-align: left;
  overflow-wrap: anywhere;
}
.api-center-r1-balance article {
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 8px;
  padding: 12px;
}
.api-center-r1-provider-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.api-center-r1-provider-main strong,
.api-center-r1-provider-main small {
  display: block;
}
.api-center-r1-provider-main small {
  margin-top: 3px;
  color: rgba(203, 216, 233, .66);
}
.api-center-r1-provider-main > span {
  flex-shrink: 0;
  border: 1px solid rgba(148, 163, 184, .32);
  border-radius: 999px;
  padding: 3px 9px;
  color: rgba(203, 216, 233, .76);
  font-size: 12px;
}
.api-center-r1-provider-main > span.on {
  border-color: rgba(120, 210, 170, .52);
  color: rgba(120, 210, 170, .96);
}
.api-center-r1-workflow-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.api-center-r1-workflow-pills span {
  border: 1px solid rgba(120, 210, 170, .26);
  border-radius: 999px;
  padding: 3px 8px;
  color: rgba(202, 244, 226, .88);
  background: rgba(20, 83, 45, .18);
  font-size: 12px;
}
.api-center-r1-advanced {
  position: relative;
  z-index: 1;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 8px;
  background: rgba(15, 23, 42, .48);
  padding: 8px 10px;
}
.api-center-r1-advanced summary {
  cursor: pointer;
  color: rgba(226, 240, 255, .86);
  font-weight: 700;
}
.api-center-r1-advanced-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 0;
}
.api-center-r1-advanced-grid div {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px;
  border-radius: 7px;
  background: rgba(2, 6, 23, .34);
}
.api-center-r1-advanced-grid dt,
.api-center-r1-advanced-grid dd {
  margin: 0;
}
.api-center-r1-advanced-grid dt {
  color: rgba(203, 216, 233, .64);
  font-size: 12px;
}
.api-center-r1-advanced-grid dd {
  color: #eef4ff;
  overflow-wrap: anywhere;
}
.api-center-r1-ops-drawer {
  display: block;
}
@media (max-width: 980px) {
  .api-center-r1-metric-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .api-center-r1-head,
  .api-center-r1-title,
  .ai-memory-r3-head,
  .ai-memory-r3-section-head,
  .settings-real-r2-head,
  .settings-real-r2-panel-head,
  .settings-real-r2-section-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .api-center-r1-metric-strip,
  .api-center-r1-grid,
  .api-center-r1-binding-grid,
  .api-center-r1-balance,
  .api-center-r1-coverage {
    grid-template-columns: minmax(0, 1fr);
  }
  .api-center-r1-table {
    display: block;
    overflow-x: auto;
  }
  .api-center-r1-advanced-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.api-center-r5 {
  min-width: 0;
}

.api-center-r5-nav span {
  border-color: rgba(120, 210, 170, .32);
  background: rgba(20, 83, 45, .18);
  color: rgba(202, 244, 226, .92);
}

.api-center-r5-model-catalog .api-center-r1-table {
  min-width: 980px;
}

.api-center-r5-key-pool-list {
  display: grid;
  gap: 10px;
}

.api-center-r5-key-pool {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 8px;
  background: rgba(15, 23, 42, .42);
}

.api-center-r5-key-pool > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.api-center-r5-key-pool strong,
.api-center-r5-key-pool small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.api-center-r5-key-pool small {
  color: rgba(203, 213, 225, .72);
}

.api-center-r5-detail-button,
.api-center-r5-key-toggle,
.api-center-r5-key-drawer-head button {
  flex: 0 0 auto;
  border: 1px solid rgba(120, 210, 170, .34);
  border-radius: 7px;
  background: rgba(20, 83, 45, .28);
  color: rgba(220, 252, 231, .95);
  font: inherit;
  font-size: 13px;
  line-height: 1;
  padding: 8px 11px;
  cursor: pointer;
}

.api-center-r5-key-drawer {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  justify-content: flex-end;
  min-width: 0;
  padding: 16px;
  background: rgba(2, 6, 23, .62);
}

.api-center-r5-key-drawer.hidden {
  display: none;
}

.api-center-r5-key-drawer-panel {
  display: grid;
  gap: 14px;
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  min-width: 0;
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, .24);
  border-radius: 8px;
  background: #0f172a;
  box-shadow: 0 20px 60px rgba(2, 6, 23, .42);
  padding: 16px;
}

.api-center-r5-key-drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.api-center-r5-key-drawer-head > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.api-center-r5-key-drawer-head strong,
.api-center-r5-key-drawer-head small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.api-center-r5-key-drawer-head small {
  color: rgba(203, 213, 225, .74);
}

.api-center-r5-key-table {
  min-width: 760px;
}

.api-center-r5-rules .api-center-r1-coverage article {
  background: rgba(2, 6, 23, .28);
}

.api-center-r6-toolbar,
.api-center-r6-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.api-center-r6-model-table {
  min-width: 900px;
}

.api-center-r6-model-category-row td {
  background: linear-gradient(90deg, rgba(20, 83, 45, .26), rgba(15, 23, 42, .62));
  color: rgba(230, 245, 247, .92);
}

.api-center-r6-model-category-row strong,
.api-center-r6-model-category-row small {
  display: inline-flex;
  margin-right: 10px;
}

.api-center-r6-model-table strong,
.api-center-r6-model-table small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.api-center-r6-detail-panel,
.api-center-r6-usage-panel {
  color: #eef4ff;
}

.api-center-r6-detail-form,
.api-center-r6-key-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.api-center-r6-key-row {
  align-items: end;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 8px;
  background: rgba(2, 6, 23, .28);
}

.api-center-r6-key-test-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.api-center-r6-test-result {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  border: 1px solid rgba(125, 211, 252, .2);
  border-radius: 999px;
  padding: 4px 9px;
  color: rgba(216, 232, 246, .82);
  background: rgba(15, 23, 42, .62);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.api-center-r6-detail-form label,
.api-center-r6-key-row label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: rgba(203, 213, 225, .78);
  font-size: 12px;
}

.api-center-r6-detail-form label.wide,
.api-center-r6-key-row label.wide {
  grid-column: 1 / -1;
}

.api-center-r6-detail-form input,
.api-center-r6-detail-form select,
.api-center-r6-detail-form textarea,
.api-center-r6-key-row input,
.api-center-r6-key-row select {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 7px;
  background: rgba(15, 23, 42, .72);
  color: #eef4ff;
  padding: 8px;
  resize: vertical;
}

.api-center-r6-key-editor {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.api-center-r6-usage-modal {
  position: fixed;
  inset: 0;
  z-index: 88;
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 16px;
  background: rgba(2, 6, 23, .62);
}

.api-center-r6-usage-modal.hidden {
  display: none;
}

.api-center-r6-usage-panel {
  display: grid;
  gap: 14px;
  width: min(860px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  min-width: 0;
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, .24);
  border-radius: 8px;
  background: #0f172a;
  padding: 16px;
}

.api-center-r6-usage-table {
  min-width: 760px;
}

@media (max-width: 640px) {
  .api-center-r5-model-catalog .api-center-r1-table,
  .api-center-r5-key-table {
    min-width: 820px;
  }

  .api-center-r5-key-pool {
    align-items: stretch;
    flex-direction: column;
  }

  .api-center-r5-detail-button {
    width: 100%;
  }

  .api-center-r5-key-drawer {
    padding: 0;
  }

  .api-center-r5-key-drawer-panel {
    width: 100vw;
    max-height: 100vh;
    border-radius: 0;
  }

  .api-center-r6-detail-form,
  .api-center-r6-key-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .api-center-r6-model-table,
  .api-center-r6-usage-table {
    min-width: 760px;
  }

  .api-center-r6-usage-modal {
    padding: 0;
  }

  .api-center-r6-usage-panel {
    width: 100vw;
    max-height: 100vh;
    border-radius: 0;
  }
}

/* API-R6(2026-07-04) B1/B2/B3: 境外合规显示 + 详情简化 + 节点默认模型入口 */
.api-center-r6-overseas-badge {
  /* 视觉验证修正(2026-07-04): nowrap 会顶出单元格压住「类型」列——改块级+可换行, 徽标只占本列宽度 */
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 3px 0 2px;
  padding: 2px 8px;
  border: 1px solid rgba(251, 191, 36, .45);
  border-radius: 999px;
  background: rgba(120, 53, 15, .32);
  color: #fcd34d;
  font-size: 11px;
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: anywhere;
}

.api-center-r6-provider-readonly {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 9px;
  border: 1px dashed rgba(148, 163, 184, .3);
  border-radius: 8px;
  background: rgba(2, 6, 23, .28);
  color: rgba(216, 232, 246, .78);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.api-center-r6-detail-fact {
  margin: 10px 0 0;
  padding: 8px 12px;
  border: 1px solid rgba(125, 211, 252, .22);
  border-left: 3px solid rgba(125, 211, 252, .6);
  border-radius: 8px;
  background: rgba(8, 25, 43, .55);
  color: rgba(216, 232, 246, .86);
  font-size: 12px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.api-center-r6-node-defaults-jump {
  border: 1px solid rgba(125, 211, 252, .4);
  border-radius: 999px;
  padding: 4px 12px;
  background: rgba(8, 47, 73, .55);
  color: #bae6fd;
  font-size: 12px;
  cursor: pointer;
}

.api-center-r6-node-defaults-jump:hover {
  background: rgba(8, 47, 73, .85);
  border-color: rgba(125, 211, 252, .7);
}

/* SS-14(2026-07-05): 模型目录只读态诚实说明(受限视图不再是无交互死表——明说改动走平台模型设置) */
.api-center-r1-note,
.api-center-r6-catalog-readonly {
  margin: 6px 0 10px;
  padding: 8px 12px;
  border: 1px dashed rgba(125, 211, 252, .35);
  border-radius: 10px;
  background: rgba(8, 47, 73, .35);
  color: rgba(186, 230, 253, .9);
  font-size: 12px;
  line-height: 1.6;
}

/* IMS配置UI(2026-07-07): 阿里云 IMS / 云凭证配置区(平台管理员专属·敏感凭证脱敏) */
.ims-cred-block {
  min-width: 0;
  border: 1px solid rgba(251, 191, 36, .35);
  border-radius: 12px;
  background: rgba(69, 26, 3, .28);
}

.ims-cred-note {
  margin: 6px 0 10px;
  color: rgba(253, 230, 138, .92);
  font-size: 12px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.ims-cred-status {
  display: inline-block;
  margin: 2px 0 10px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}

.ims-cred-status-dryrun {
  border: 1px solid rgba(251, 191, 36, .55);
  background: rgba(120, 53, 15, .5);
  color: #fde68a;
}

.ims-cred-status-live {
  border: 1px solid rgba(248, 113, 113, .6);
  background: rgba(127, 29, 29, .5);
  color: #fecaca;
}

.ims-cred-error {
  margin: 6px 0;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(127, 29, 29, .4);
  color: #fecaca;
  font-size: 12px;
}

.ims-cred-flash {
  margin: 6px 0;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(6, 78, 59, .5);
  color: #a7f3d0;
  font-size: 12px;
}

.ims-cred-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 8px 0 12px;
}

.ims-cred-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.ims-cred-field span {
  font-size: 12px;
  color: rgba(253, 230, 138, .85);
}

.ims-cred-field input {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid rgba(251, 191, 36, .35);
  border-radius: 8px;
  background: rgba(20, 8, 2, .55);
  color: #fef3c7;
  font-size: 13px;
}

.ims-cred-field input:focus {
  outline: none;
  border-color: rgba(251, 191, 36, .7);
}

.ims-cred-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ims-cred-save {
  padding: 8px 18px;
  border: 1px solid rgba(251, 191, 36, .6);
  border-radius: 999px;
  background: rgba(120, 53, 15, .65);
  color: #fde68a;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.ims-cred-save:hover {
  background: rgba(120, 53, 15, .95);
  border-color: rgba(251, 191, 36, .9);
}

.ims-cred-configured {
  font-size: 12px;
  color: rgba(253, 230, 138, .8);
}

/* R1-C Task3(2026-07-10): 平台 Key 行验证状态诚实小字(unverified/contract_pass 绝不写"可用") */
.api-center-r6-key-verification {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: rgba(211, 224, 226, 0.78);
  background: rgba(15, 23, 42, 0.44);
}
.api-center-r6-key-verification.is-unverified { color: rgba(253, 230, 138, 0.88); }
.api-center-r6-key-verification.is-contract_pass { color: rgba(191, 219, 254, 0.9); }
.api-center-r6-key-verification.is-live_pass { color: rgba(153, 246, 228, 0.9); }
.api-center-r6-key-verification.is-blocked { color: rgba(254, 202, 202, 0.95); }

/* R1-C Task4(2026-07-10): 地址黑名单弹窗(复用 usage-modal 壳; 390px 内不溢出) */
.api-center-blocklist-panel {
  width: min(760px, calc(100vw - 24px));
}
.api-center-blocklist-note {
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(251, 191, 36, .3);
  background: rgba(120, 53, 15, .18);
  color: rgba(253, 230, 138, .92);
  font-size: 12px;
  line-height: 1.6;
}
.api-center-blocklist-add {
  display: grid;
  gap: 8px;
}
.api-center-blocklist-add label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: rgba(211, 224, 226, .8);
}
.api-center-blocklist-add textarea,
.api-center-blocklist-add input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, .28);
  background: rgba(15, 23, 42, .6);
  color: inherit;
  font-size: 13px;
  font-family: "JetBrains Mono", Consolas, monospace;
}
.api-center-blocklist-add button[data-endpoint-blocklist-submit] {
  justify-self: start;
  padding: 7px 16px;
}
.api-center-blocklist-summary {
  margin: 0;
  font-size: 12px;
  color: rgba(191, 219, 254, .92);
}
.api-center-blocklist-line-errors {
  margin: 0;
  padding: 8px 10px 8px 26px;
  border-radius: 8px;
  border: 1px solid rgba(248, 113, 113, .34);
  background: rgba(127, 29, 29, .2);
  color: rgba(254, 202, 202, .92);
  font-size: 12px;
  display: grid;
  gap: 3px;
  word-break: break-all;
}
.api-center-blocklist-forbidden,
.api-center-blocklist-unavailable {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(248, 113, 113, .34);
  background: rgba(127, 29, 29, .18);
  color: rgba(254, 202, 202, .92);
  font-size: 12.5px;
  line-height: 1.6;
}
.api-center-blocklist-table {
  min-width: 560px;
}
.api-center-blocklist-value {
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 12px;
  word-break: break-all;
}
.api-center-blocklist-table td small {
  display: block;
  color: rgba(148, 163, 184, .8);
  font-size: 11px;
}
.api-center-blocklist-delete {
  border-color: rgba(248, 113, 113, .34);
  color: rgba(254, 202, 202, .9);
}
/* R9 同款教训(390px 粘性导航层级高于弹窗, 盖住标题/关闭钮): 弹窗置于导航之上 */
.api-center-blocklist-modal {
  z-index: 3200;
}

@media (max-width: 480px) {
  .api-center-blocklist-panel {
    width: calc(100vw - 16px);
    padding: 12px;
  }
  .api-center-blocklist-table {
    min-width: 480px; /* 表在 wrap 内横滚, 页面不横滚 */
  }
  body.api-center-blocklist-modal-open {
    overflow: hidden;
  }
  body.api-center-blocklist-modal-open .sidebar {
    visibility: hidden;
    pointer-events: none;
  }
  body.api-center-blocklist-modal-open #r14-operator {
    display: none !important;
  }
}
/* UI-P0-PRODUCT-DEPTH-SUPPORT-R1-20260627-26 */
.ai-memory-r3-panel {
  display: grid;
  gap: 18px;
  color: #eef4ff;
  overflow-x: hidden;
}
.ai-memory-r3-head,
.ai-memory-r3-graph,
.ai-memory-r3-editor,
.ai-memory-r3-attachments,
.ai-memory-r3-list,
.ai-memory-r3-admin-boundary {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(125, 211, 252, .22);
  background:
    linear-gradient(145deg, rgba(15, 35, 55, .82), rgba(8, 15, 28, .78)),
    rgba(9, 16, 30, .76);
  border-radius: 8px;
  padding: 16px;
  backdrop-filter: blur(18px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 18px 48px rgba(0, 0, 0, .18);
}
.ai-memory-r3-head::before,
.ai-memory-r3-graph::before,
.ai-memory-r3-editor::before,
.ai-memory-r3-attachments::before,
.ai-memory-r3-list::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(125, 211, 252, .08), transparent 42%);
  pointer-events: none;
}
.ai-memory-r3-head h2,
.ai-memory-r3-head p {
  margin: 0;
}
.ai-memory-r3-head h2 {
  font-size: clamp(24px, 2.4vw, 34px);
  letter-spacing: 0;
}
.ai-memory-r3-head p {
  max-width: 680px;
  color: rgba(226, 240, 255, .72);
  line-height: 1.75;
}
.ai-memory-r3-head span {
  color: #8fd3ff;
  font-size: 12px;
}
.ai-memory-r3-head-actions,
.ai-memory-r3-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.ai-memory-r3-graph-stage {
  position: relative;
  min-height: 360px;
  border: 1px solid rgba(125, 211, 252, .18);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 50%, rgba(125, 211, 252, .16), transparent 34%),
    radial-gradient(circle at 20% 28%, rgba(37, 99, 235, .16), transparent 32%),
    radial-gradient(circle at 78% 76%, rgba(14, 165, 233, .11), transparent 30%),
    rgba(2, 6, 23, .35);
  overflow: hidden;
}
.ai-memory-r3-graph-stage::before {
  content: "";
  position: absolute;
  inset: 24px;
  border-radius: 50%;
  border: 1px solid rgba(125, 211, 252, .16);
  box-shadow:
    0 0 0 72px rgba(125, 211, 252, .025),
    inset 0 0 90px rgba(14, 165, 233, .12);
  pointer-events: none;
}
.ai-memory-r3-graph-stage::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(125, 211, 252, .28), transparent);
  pointer-events: none;
}
.ai-memory-r3-node {
  position: absolute;
  width: 128px;
  min-height: 58px;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  gap: 3px;
  text-align: center;
  border-color: rgba(125, 211, 252, .32) !important;
  background:
    linear-gradient(145deg, rgba(8, 47, 73, .9), rgba(15, 23, 42, .82)) !important;
  box-shadow: 0 18px 38px rgba(0, 0, 0, .24), 0 0 28px rgba(14, 165, 233, .14);
}
.ai-memory-r3-node::after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: #7dd3fc;
  box-shadow: 0 0 16px rgba(125, 211, 252, .9);
}
.ai-memory-r3-node.is-focus {
  outline: 2px solid rgba(125, 211, 252, .85);
  background: linear-gradient(145deg, rgba(14, 116, 144, .88), rgba(30, 64, 175, .76)) !important;
}
.ai-memory-r3-node span {
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ai-memory-r3-node small {
  color: #cbd8e9;
}
.ai-memory-r3-layout,
.ai-memory-r3-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: 14px;
}
.ai-memory-r3-columns {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.ai-memory-r3-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.ai-memory-r3-form .wide {
  grid-column: 1 / -1;
}
.ai-memory-r3-journal-list,
.ai-memory-r3-attachment-grid {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.ai-memory-r3-journal-list button,
.ai-memory-r3-attachment-grid article,
.ai-memory-r3-list article {
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 8px;
  padding: 12px;
  background: rgba(15, 23, 42, .62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}
.ai-memory-r3-photo {
  min-height: 82px;
  border-radius: 7px;
  background:
    radial-gradient(circle at 50% 30%, rgba(226, 246, 255, .35), transparent 24%),
    linear-gradient(135deg, rgba(14, 116, 144, .55), rgba(51, 65, 85, .65));
  display: grid;
  place-items: center;
  color: #dff6ff;
  margin-bottom: 8px;
}
.ai-memory-r3-panel.customer-safe {
  color: inherit;
}
@media (max-width: 860px) {
  .ai-memory-r3-head,
  .ai-memory-r3-section-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .ai-memory-r3-layout,
  .ai-memory-r3-columns,
  .ai-memory-r3-form {
    grid-template-columns: 1fr;
  }
  .ai-memory-r3-graph-stage {
    min-height: 420px;
  }
  .ai-memory-r3-node {
    width: 108px;
  }
}
/* PM-AI-MEMORY-FORCE-GRAPH-R4-20260627 */
.ai-memory-r4-shell {
  display: grid;
  gap: 14px;
  color: #edf6ff;
  min-width: 0;
}

.ai-memory-r4-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(125, 211, 252, .18);
  border-radius: 8px;
  background: rgba(8, 16, 29, .86);
}

.ai-memory-r4-head h2,
.ai-memory-r4-head p {
  margin: 0;
}

.ai-memory-r4-head h2 {
  font-size: 26px;
  line-height: 1.18;
  letter-spacing: 0;
}

.ai-memory-r4-head p {
  max-width: 760px;
  color: rgba(226, 240, 255, .7);
  line-height: 1.55;
}

.ai-memory-r4-head span,
.ai-memory-r4-kind {
  color: #7dd3fc;
  font-size: 12px;
}

.ai-memory-r4-stats {
  display: grid;
  grid-template-columns: auto auto;
  gap: 2px 8px;
  align-items: baseline;
  min-width: 132px;
  text-align: right;
}

.ai-memory-r4-stats strong {
  font-size: 24px;
}

.ai-memory-r4-layout {
  display: grid;
  grid-template-columns: minmax(148px, 168px) minmax(560px, 1fr) minmax(220px, 252px);
  gap: 10px;
  min-height: 640px;
  min-width: 0;
}

.ai-memory-r4-side,
.ai-memory-r4-graph-surface {
  border: 1px solid rgba(125, 211, 252, .18);
  border-radius: 8px;
  background: rgba(6, 13, 24, .82);
  min-width: 0;
}

.ai-memory-r4-side {
  padding: 12px;
  align-content: start;
}

.ai-memory-r4-search {
  display: grid;
  gap: 7px;
  color: rgba(226, 240, 255, .72);
  font-size: 12px;
  margin-bottom: 12px;
}

.ai-memory-r4-search input {
  width: 100%;
  min-height: 36px;
  border-radius: 7px;
  border: 1px solid rgba(125, 211, 252, .24);
  background: rgba(15, 23, 42, .88);
  color: #f8fbff;
  padding: 0 10px;
}

.ai-memory-r4-filter-list {
  display: grid;
  gap: 7px;
}

.ai-memory-r4-filter-list button,
.ai-memory-r4-relations button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 34px;
  border-radius: 7px;
  border: 1px solid rgba(148, 163, 184, .18);
  background: rgba(15, 23, 42, .64);
  color: #e9f2ff;
  text-align: left;
}

.ai-memory-r4-filter-list button.active {
  border-color: rgba(125, 211, 252, .72);
  background: rgba(14, 116, 144, .36);
  color: #f8fdff;
}

.ai-memory-r4-hint {
  display: grid;
  gap: 5px;
  margin-top: 14px;
  padding: 10px;
  border-radius: 7px;
  background: rgba(15, 23, 42, .54);
  color: rgba(226, 240, 255, .66);
  line-height: 1.5;
}

.ai-memory-r4-hint strong {
  color: #f8fbff;
}

.ai-memory-r4-graph-surface {
  position: relative;
  overflow: hidden;
  min-height: 640px;
  background:
    radial-gradient(circle at 50% 48%, rgba(56, 189, 248, .10), transparent 34%),
    linear-gradient(145deg, rgba(2, 6, 23, .92), rgba(8, 18, 33, .92));
}
.ai-memory-r4-graph-toolbar {
  position: absolute;
  z-index: 3;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  pointer-events: none;
}
.ai-memory-r4-graph-toolbar button {
  min-height: 32px;
  border: 1px solid rgba(125, 211, 252, .28);
  border-radius: 7px;
  background: rgba(15, 23, 42, .78);
  color: #edf6ff;
  padding: 0 10px;
  font: inherit;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  pointer-events: auto;
}
.ai-memory-r4-graph-toolbar button:hover {
  border-color: rgba(125, 211, 252, .72);
}

.ai-memory-r4-graph-surface::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, .05) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.ai-memory-r4-graph-surface canvas {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 640px;
  cursor: grab;
  touch-action: none;
}

.ai-memory-r4-graph-surface canvas[data-pointer-state="dragging"],
.ai-memory-r4-graph-surface canvas[data-pointer-state="panning"] {
  cursor: grabbing;
}

.ai-memory-r4-detail-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.ai-memory-r4-detail-card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
  min-width: 0;
  overflow-wrap: anywhere;
}

.ai-memory-r4-detail-card p {
  margin: 0;
  color: rgba(226, 240, 255, .72);
  line-height: 1.65;
  min-width: 0;
  overflow-wrap: anywhere;
}

.ai-memory-r4-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}

.ai-memory-r4-tags span,
.ai-memory-r4-kind {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(125, 211, 252, .2);
  background: rgba(15, 23, 42, .74);
  max-width: 100%;
  overflow-wrap: anywhere;
}

.ai-memory-r4-detail-card dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  min-width: 0;
}

.ai-memory-r4-detail-card dl div {
  display: grid;
  gap: 4px;
  padding: 8px;
  border-radius: 7px;
  background: rgba(15, 23, 42, .54);
  min-width: 0;
}

.ai-memory-r4-detail-card dt,
.ai-memory-r4-detail-card dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.ai-memory-r4-detail-card dt {
  color: rgba(226, 240, 255, .58);
  font-size: 12px;
}

.ai-memory-r4-detail-card dd {
  color: #f8fbff;
  font-weight: 700;
  word-break: break-word;
}

.ai-memory-r4-relations {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  min-width: 0;
}

.ai-memory-r4-relations button {
  align-items: flex-start;
  flex-direction: column;
  min-height: 48px;
  padding: 9px 10px;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.ai-memory-r4-relations strong,
.ai-memory-r4-relations small {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.ai-memory-r4-relations small,
.ai-memory-r4-empty {
  color: rgba(226, 240, 255, .62);
}

.ai-memory-r4-shell.customer-safe {
  padding: 16px;
  border: 1px solid rgba(125, 211, 252, .18);
  border-radius: 8px;
  background: rgba(8, 16, 29, .86);
}

.ai-memory-r4-journal-composer {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(120, 210, 170, .24);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(13, 45, 39, .52), rgba(8, 16, 29, .86)),
    rgba(8, 16, 29, .86);
}

.ai-memory-r4-journal-head,
.ai-memory-r4-journal-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.ai-memory-r4-journal-head strong,
.ai-memory-r4-journal-head small {
  display: block;
}

.ai-memory-r4-journal-head small,
.ai-memory-r4-journal-actions span {
  margin-top: 3px;
  color: rgba(226, 240, 255, .66);
  line-height: 1.45;
}

.ai-memory-r4-journal-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.ai-memory-r4-journal-grid label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: rgba(226, 240, 255, .72);
  font-size: 12px;
  font-weight: 700;
}

.ai-memory-r4-journal-grid label.wide {
  grid-column: 1 / -1;
}

.ai-memory-r4-journal-grid input,
.ai-memory-r4-journal-grid textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(125, 211, 252, .24);
  border-radius: 7px;
  background: rgba(15, 23, 42, .82);
  color: #f8fbff;
  padding: 8px 10px;
  outline: none;
}

.ai-memory-r4-journal-grid textarea {
  resize: vertical;
}

.ai-memory-r4-journal-grid input:focus,
.ai-memory-r4-journal-grid textarea:focus {
  border-color: rgba(120, 210, 170, .72);
  box-shadow: 0 0 0 2px rgba(120, 210, 170, .12);
}

.ai-memory-r4-journal-composer button {
  min-height: 34px;
  border: 1px solid rgba(148, 163, 184, .32);
  border-radius: 7px;
  background: rgba(30, 41, 59, .82);
  color: #eef4ff;
  padding: 7px 11px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.ai-memory-r4-journal-composer button.primary {
  border-color: rgba(120, 210, 170, .56);
  background: rgba(20, 83, 45, .72);
  color: #f4fff9;
}
.ai-memory-r4-shell.is-mobile-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 2600;
  display: grid;
  grid-template-rows: auto 1fr;
  padding: 8px;
  background: #07111f;
}
.ai-memory-r4-shell.is-mobile-fullscreen .ai-memory-r4-layout {
  grid-template-columns: 1fr;
  min-height: 0;
}
.ai-memory-r4-shell.is-mobile-fullscreen .ai-memory-r4-left,
.ai-memory-r4-shell.is-mobile-fullscreen .ai-memory-r4-right {
  display: none;
}
.ai-memory-r4-shell.is-mobile-fullscreen .ai-memory-r4-graph-surface,
.ai-memory-r4-shell.is-mobile-fullscreen .ai-memory-r4-graph-surface canvas {
  min-height: calc(100vh - 98px);
  max-height: none;
}

@media (max-width: 1180px) {
  .ai-memory-r4-layout {
    grid-template-columns: 150px minmax(520px, 1fr) 240px;
  }
}

@media (max-width: 900px) {
  .ai-memory-r4-shell {
    gap: 8px;
  }

  .ai-memory-r4-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px;
  }

  .ai-memory-r4-head h2 {
    font-size: 21px;
  }

  .ai-memory-r4-head p {
    display: none;
  }

  .ai-memory-r4-stats {
    display: flex;
    gap: 6px;
    text-align: left;
    min-width: 0;
  }

  .ai-memory-r4-journal-head,
  .ai-memory-r4-journal-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .ai-memory-r4-journal-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .ai-memory-r4-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "graph"
      "filters"
      "detail";
    min-height: 0;
  }

  .ai-memory-r4-left {
    grid-area: filters;
  }

  .ai-memory-r4-right {
    grid-area: detail;
  }

  .ai-memory-r4-graph-surface {
    grid-area: graph;
  }

  .ai-memory-r4-filter-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ai-memory-r4-graph-surface,
  .ai-memory-r4-graph-surface canvas {
    min-height: clamp(300px, 38vh, 340px);
    max-height: 340px;
  }

  .ai-memory-r4-graph-toolbar {
    position: sticky;
    top: 0;
    padding: 8px;
    background: rgba(6, 13, 24, .88);
    border-bottom: 1px solid rgba(125, 211, 252, .14);
  }

  .ai-memory-r4-graph-toolbar button {
    flex: 1 1 96px;
  }
}
/* UI-P0-PRODUCT-DEPTH-SUPPORT-R1-20260627-26 */
.settings-real-r2 {
  position: relative;
  display: grid;
  gap: 18px;
  color: #eef4ff;
  overflow-x: hidden;
}
.settings-real-r2-head,
.settings-real-r2-panel,
.settings-real-r2-card,
.settings-real-r2-construction,
.settings-real-r2-card-manager,
.settings-real-r2-account {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(125, 211, 252, .22);
  background:
    linear-gradient(145deg, rgba(13, 31, 51, .82), rgba(8, 15, 28, .78)),
    rgba(9, 16, 30, .76);
  border-radius: 8px;
  padding: 16px;
  backdrop-filter: blur(18px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 18px 44px rgba(0, 0, 0, .16);
}
.settings-real-r2-head h1,
.settings-real-r2-head p,
.settings-real-r2-panel-head h2 {
  margin: 0;
}
.settings-real-r2-head h1 {
  font-size: clamp(24px, 2.3vw, 32px);
}
.settings-real-r2-head p {
  max-width: 720px;
  color: rgba(226, 240, 255, .72);
  line-height: 1.75;
}
.settings-real-r2-head span,
.settings-real-r2-panel-head span,
.settings-real-r2-section-head span {
  color: #a8bfdc;
  font-size: 12px;
}
.settings-real-r2-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: fit-content;
  padding: 6px;
  border: 1px solid rgba(125, 211, 252, .16);
  border-radius: 8px;
  background: rgba(8, 15, 28, .58);
}
.settings-real-r2-nav button,
.settings-real-r2-card-tabs button {
  appearance: none;
  min-height: 40px;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 7px;
  background: rgba(15, 23, 42, .68);
  color: rgba(226, 240, 255, .74);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  padding: 0 14px;
}
.settings-real-r2-nav button.active,
.settings-real-r2-card-tabs button.active {
  border-color: rgba(125, 211, 252, .85);
  background: linear-gradient(145deg, rgba(14, 116, 144, .74), rgba(30, 64, 175, .46));
  color: #f8fbff;
  box-shadow: 0 10px 24px rgba(14, 165, 233, .14);
}
.settings-real-r2-nav button:disabled {
  cursor: not-allowed;
  opacity: .36;
}
.settings-real-r2-platform-grid,
.settings-real-r2-company-grid,
.settings-real-r2-personal-grid,
.settings-real-r2-template-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}
.settings-real-r2-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}
.settings-real-r2-card strong {
  color: #f8fbff;
  font-size: 16px;
}
.settings-real-r2-card p {
  margin: 4px 0 0;
  color: rgba(200, 212, 229, .78);
  line-height: 1.65;
}
.settings-real-r2-construction,
.settings-real-r2-card-manager {
  grid-column: 1 / -1;
}
.settings-real-r2-template-list article {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 8px;
  background: rgba(15, 23, 42, .58);
}
.settings-real-r2-template-list article div {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  grid-column: 1 / -1;
}
.settings-real-r2-template-list label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: rgba(226, 240, 255, .72);
  font-size: 12px;
  font-weight: 800;
}
.settings-real-r2-card-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  grid-column: 1 / -1;
}
.settings-real-r2-card-mount {
  min-height: 120px;
}
.settings-real-r2-personal-card-list {
  display: grid;
  gap: 8px;
}
.settings-real-r2-personal-card-list article {
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 8px;
  padding: 10px;
  background: rgba(15, 23, 42, .58);
}
.settings-real-r2-account {
  position: sticky;
  bottom: 12px;
  justify-self: start;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  min-width: min(320px, 100%);
  padding: 12px 14px;
}
.settings-real-r2-account span {
  color: #c8d4e5;
  font-size: 12px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.settings-real-r2-account button {
  grid-row: 1 / span 2;
  grid-column: 2;
}
@media (max-width: 860px) {
  .settings-real-r2-head,
  .settings-real-r2-panel-head,
  .settings-real-r2-section-head,
  .settings-real-r2-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .settings-real-r2-platform-grid,
  .settings-real-r2-company-grid,
  .settings-real-r2-personal-grid,
  .settings-real-r2-template-list {
    grid-template-columns: 1fr;
  }
  .settings-real-r2-nav {
    width: 100%;
  }
  .settings-real-r2-nav button {
    flex: 1 1 120px;
  }
  .settings-real-r2-template-list article {
    grid-template-columns: 1fr;
  }
  .settings-real-r2-account {
    position: relative;
    bottom: auto;
    width: 100%;
  }
}
.ai-memory-autolog-r1 {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(126, 158, 177, 0.22);
  border-radius: 8px;
  padding: 14px;
  background: rgba(7, 16, 28, 0.72);
  backdrop-filter: blur(18px);
}
.ai-memory-autolog-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.ai-memory-autolog-head span {
  color: #9ee7bf;
  font-size: 12px;
}
.ai-memory-autolog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}
.ai-memory-autolog-grid article,
.ai-memory-autolog-list article,
.ai-memory-autolog-drafts article {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  padding: 10px;
  background: rgba(15, 23, 42, 0.58);
}
.ai-memory-autolog-grid small,
.ai-memory-autolog-list p,
.ai-memory-autolog-drafts p {
  margin: 4px 0 0;
  color: rgba(226, 234, 236, 0.68);
  font-size: 12px;
}
.ai-memory-autolog-list,
.ai-memory-autolog-drafts {
  display: grid;
  gap: 8px;
}
.ai-memory-autolog-drafts article {
  display: grid;
  gap: 4px;
}
.ai-memory-autolog-drafts span {
  width: fit-content;
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(120, 210, 170, 0.14);
  color: #c9ffe0;
  font-size: 11px;
}
.ai-memory-autolog-admin {
  border: 1px dashed rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(2, 8, 16, 0.44);
}
.ai-memory-autolog-admin summary {
  cursor: pointer;
  color: rgba(226, 234, 236, 0.72);
  font-size: 12px;
}
.prompt-card-preview-frame {
  min-height: 104px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(126, 158, 177, 0.18);
  background: linear-gradient(135deg, rgba(14, 116, 144, 0.32), rgba(51, 65, 85, 0.52));
  color: rgba(226, 234, 236, 0.72);
  font-size: 12px;
}
.prompt-card-preview-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.prompt-card-effect {
  display: block;
  color: rgba(226, 234, 236, 0.68);
  font-size: 12px;
}
.prompt-workflow-audit {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(126, 158, 177, 0.18);
  border-radius: 8px;
  background: rgba(8, 18, 28, 0.58);
}
.prompt-workflow-audit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}
.prompt-workflow-audit-grid article {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  padding: 8px;
  background: rgba(15, 23, 42, 0.56);
}
/* PROMPT_LIBRARY_WORKFLOW_COVERAGE_R2 */
.prompt-asset-filters {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) minmax(128px, 0.8fr) minmax(140px, 0.9fr) auto auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(126, 158, 177, 0.18);
  border-radius: 8px;
  background: rgba(8, 18, 28, 0.58);
}
.prompt-asset-filters input,
.prompt-asset-filters select,
.prompt-batch-import-shell textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(126, 158, 177, 0.22);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(15, 23, 42, 0.72);
  color: #e2eaec;
  font-size: 12px;
}
.prompt-favorite-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(226, 234, 236, 0.76);
  font-size: 12px;
  white-space: nowrap;
}
.prompt-manager-badge,
.prompt-safe-role-note {
  margin: 0;
  border-radius: 8px;
  padding: 7px 9px;
  background: rgba(34, 197, 94, 0.1);
  color: rgba(210, 255, 228, 0.88);
  font-size: 12px;
}
.prompt-safe-role-note {
  background: rgba(148, 163, 184, 0.12);
  color: rgba(226, 234, 236, 0.72);
}
.prompt-batch-import-shell {
  border: 1px dashed rgba(126, 158, 177, 0.26);
  border-radius: 8px;
  padding: 10px;
  background: rgba(2, 8, 16, 0.44);
}
.prompt-batch-import-shell summary {
  cursor: pointer;
  color: #f1f7f8;
  font-size: 13px;
  font-weight: 700;
}
.prompt-batch-import-shell p {
  margin: 8px 0;
  color: rgba(226, 234, 236, 0.68);
  font-size: 12px;
}
.prompt-batch-import-shell div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}
.prompt-batch-import-shell span {
  color: rgba(226, 234, 236, 0.72);
  font-size: 12px;
}
.prompt-access-point-matrix {
  border-color: rgba(94, 234, 212, 0.18);
}
.prompt-access-point-matrix article small + small {
  margin-top: 3px;
  color: rgba(190, 210, 220, 0.62);
}
.prompt-asset-card {
  gap: 8px;
}
.prompt-card-preview-frame {
  min-height: 128px;
  aspect-ratio: 16 / 10;
}
.prompt-card-preview-visual {
  display: grid;
  gap: 6px;
  justify-items: center;
  padding: 12px;
  text-align: center;
}
.prompt-card-preview-visual span {
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(226, 234, 236, 0.72);
  font-size: 11px;
}
.prompt-card-preview-visual b {
  color: #f1f7f8;
  font-size: 13px;
  line-height: 1.35;
}
.prompt-card-meta-row,
.prompt-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.prompt-card-meta-row span,
.prompt-card-tags span {
  border-radius: 999px;
  padding: 3px 7px;
  background: rgba(126, 158, 177, 0.14);
  color: rgba(226, 234, 236, 0.78);
  font-size: 11px;
}
.prompt-card-summary {
  color: rgba(226, 234, 236, 0.78);
  font-size: 12px;
  line-height: 1.45;
}
.prompt-favorite-toggle.active {
  border-color: rgba(250, 204, 21, 0.42);
  color: #fde68a;
  background: rgba(250, 204, 21, 0.1);
}
.prompt-detail-preview-r2 .prompt-safe-role-note,
.prompt-detail-form-r2 .prompt-safe-role-note {
  grid-column: 1 / -1;
}
.prompt-detail-form-r2 .prompt-platform-recommend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.api-center-r1-coverage {
  display: grid;
  gap: 8px;
}
.api-center-r1-coverage article {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  padding: 10px;
  background: rgba(15, 23, 42, 0.56);
}
.api-center-r1-coverage small {
  color: #adc0d8;
}
@media (max-width: 760px) {
  .ai-memory-autolog-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .prompt-asset-filters {
    grid-template-columns: 1fr;
  }
  .prompt-batch-import-shell div {
    display: grid;
  }
}
.next-p0-r1-workbench,
.next-p0-r1-whiteboard,
.next-p0-r1-api,
.next-p0-r1-safe {
  width: 100%;
  max-width: 1180px;
  margin: 18px auto;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  background: rgba(9, 14, 24, 0.86);
  color: #eef4ff;
  overflow-x: hidden;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.26);
}

.next-p0-r1-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.next-p0-r1-head h2 {
  margin: 0 0 6px;
  font-size: 22px;
  line-height: 1.25;
}

.next-p0-r1-head p {
  margin: 0;
  color: #b7c6dc;
  line-height: 1.6;
}

.next-p0-r1-head > span {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.14);
  color: #baf7d0;
  font-size: 12px;
}

.next-p0-r1-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 14px;
  align-items: stretch;
}

.next-p0-r1-preview,
.next-p0-r1-ai,
.next-p0-r1-timeline article,
.next-p0-r1-flow article,
.next-p0-r1-api-grid article {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.76);
}

.next-p0-r1-preview,
.next-p0-r1-ai {
  padding: 14px;
}

.next-p0-r1-preview > strong,
.next-p0-r1-ai > strong {
  display: block;
  margin-bottom: 10px;
  font-size: 15px;
}

.next-p0-r1-preview-frame {
  aspect-ratio: 16 / 9;
  min-height: 260px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(30, 64, 175, 0.44), rgba(15, 23, 42, 0.82)),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 24px);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}

.next-p0-r1-preview-frame span {
  position: absolute;
  top: 10px;
  left: 10px;
  color: #a7f3d0;
  font-size: 12px;
}

.next-p0-r1-preview-frame b {
  font-size: 24px;
  line-height: 1.25;
}

.next-p0-r1-preview-actions,
.next-p0-r1-ai {
  display: grid;
  gap: 10px;
}

.next-p0-r1-preview-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 12px;
}

.next-p0-r1-preview-actions button,
.next-p0-r1-ai button,
.next-p0-r1-api-grid button {
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  background: #34d399;
  color: #07111f;
  font-weight: 700;
  cursor: pointer;
}

.next-p0-r1-ai p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.65;
}

.next-p0-r1-timeline {
  display: grid;
  grid-template-columns: repeat(7, minmax(116px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.next-p0-r1-timeline article,
.next-p0-r1-flow article,
.next-p0-r1-api-grid article {
  min-width: 0;
  padding: 12px;
}

.next-p0-r1-timeline strong,
.next-p0-r1-flow strong,
.next-p0-r1-api-grid strong {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
}

.next-p0-r1-timeline span,
.next-p0-r1-flow span,
.next-p0-r1-api-grid span,
.next-p0-r1-timeline small,
.next-p0-r1-flow small,
.next-p0-r1-api-grid small,
.next-p0-r1-api-grid em {
  display: block;
  color: #b9c7da;
  line-height: 1.5;
  font-size: 12px;
  font-style: normal;
  overflow-wrap: anywhere;
}

.next-p0-r1-flow {
  display: grid;
  grid-template-columns: repeat(7, minmax(126px, 1fr));
  gap: 10px;
}

.next-p0-r1-flow b {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.18);
  color: #bae6fd;
  margin-bottom: 8px;
}

.next-p0-r1-api-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.next-p0-r1-api-grid article {
  display: grid;
  gap: 7px;
}

.next-p0-r1-api-grid button {
  justify-self: start;
  padding: 0 12px;
  min-height: 32px;
}

.next-p0-r1-safe {
  min-height: 120px;
}

.next-p0-r1-safe h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.next-p0-r1-safe p {
  margin: 0;
  color: #cbd5e1;
}

@media (max-width: 980px) {
  .next-p0-r1-layout {
    grid-template-columns: 1fr;
  }
  .next-p0-r1-timeline,
  .next-p0-r1-flow,
  .next-p0-r1-api-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .next-p0-r1-workbench,
  .next-p0-r1-whiteboard,
  .next-p0-r1-api,
  .next-p0-r1-safe {
    margin: 10px auto;
    padding: 12px;
    border-radius: 8px;
    overflow-x: hidden;
  }
  .next-p0-r1-head {
    display: grid;
    gap: 10px;
  }
  .next-p0-r1-head h2 {
    font-size: 19px;
  }
  .next-p0-r1-preview-frame {
    min-height: 188px;
  }
  .next-p0-r1-preview-frame b {
    font-size: 19px;
  }
  .next-p0-r1-preview-actions,
  .next-p0-r1-timeline,
  .next-p0-r1-flow,
  .next-p0-r1-api-grid {
    grid-template-columns: 1fr;
  }
}
.jy-r4 {
  margin-top: 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(6, 16, 32, 0.72);
  border-radius: 12px;
  padding: 14px;
  color: #e5edf8;
  box-shadow: 0 18px 45px rgba(2, 6, 23, 0.24);
}

.jy-r4-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.jy-r4-head b {
  font-size: 16px;
}

.jy-r4-head span,
.jy-r4-empty,
.jy-r4-draft p,
.jy-r4-result small {
  color: #9fb0c8;
  font-size: 13px;
}

.jy-r4-command {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-bottom: 12px;
}

.jy-r4-command input {
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.86);
  color: #f8fafc;
  padding: 10px 12px;
  font-size: 14px;
}

.jy-r4-command button,
.jy-r4-actions button {
  border: 0;
  border-radius: 10px;
  background: #38bdf8;
  color: #082f49;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}

.jy-r4-actions button:last-child {
  background: #22c55e;
  color: #052e16;
}

.jy-r4-draft,
.jy-r4-result,
.jy-r4-foot {
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.62);
  border-radius: 10px;
  padding: 12px;
  margin-top: 10px;
}

.jy-r4-draft-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.jy-r4-draft-head span,
.jy-r4-meta span {
  color: #b7c5d8;
  font-size: 12px;
}

.jy-r4-storyboard {
  display: grid;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.jy-r4-storyboard li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 42px minmax(120px, 1fr);
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.34);
  padding: 8px;
}

.jy-r4-storyboard li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.16);
  color: #7dd3fc;
}

.jy-r4-storyboard li b,
.jy-r4-storyboard li small {
  overflow-wrap: anywhere;
}

.jy-r4-storyboard li em {
  color: #86efac;
  font-style: normal;
}

.jy-r4-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.jy-r4-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.jy-r4-result {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 12px;
}

.jy-r4-result small {
  grid-column: 1 / -1;
}

.jy-r5-preview {
  border: 1px solid rgba(56, 189, 248, 0.2);
  background: rgba(2, 6, 23, 0.52);
  border-radius: 10px;
  margin-top: 10px;
  overflow: hidden;
}

.jy-r5-preview video {
  display: block;
  width: 100%;
  max-height: 520px;
  background: #020617;
}

.jy-r5-preview.off,
.jy-r5-preview.wait {
  padding: 16px;
  color: #cbd5e1;
}

.jy-r5-preview.off {
  border-color: rgba(248, 113, 113, 0.3);
}

.jy-r5-result-card {
  grid-template-columns: 116px minmax(0, 1fr);
}

.jy-r5-result-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(5, auto minmax(0, 1fr));
  gap: 8px 10px;
  align-items: center;
  margin-top: 8px;
}

.jy-r5-result-grid span {
  color: #8ba0ba;
  font-size: 12px;
}

.jy-r5-result-grid b {
  color: #f8fafc;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.jy-r5-links {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.jy-r5-links a,
.jy-r5-links button {
  border: 1px solid rgba(125, 211, 252, 0.28);
  border-radius: 9px;
  background: rgba(14, 165, 233, 0.14);
  color: #bae6fd;
  padding: 8px 10px;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
}

.jy-r4-log {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.jy-r4-log p {
  display: grid;
  grid-template-columns: 64px 86px minmax(0, 1fr);
  gap: 8px;
  margin: 0;
  color: #b7c5d8;
  font-size: 12px;
}

.jy-r4.safe {
  max-width: 760px;
}

@media (max-width: 720px) {
  .jy-r4 {
    border-radius: 10px;
    padding: 12px;
  }

  .jy-r4-head,
  .jy-r4-command,
  .jy-r4-draft-head,
  .jy-r4-meta,
  .jy-r4-result,
  .jy-r5-result-grid,
  .jy-r4-log p {
    grid-template-columns: 1fr;
    display: grid;
  }

  .jy-r4-storyboard li {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .jy-r4-storyboard li em,
  .jy-r4-storyboard li small {
    grid-column: 2;
  }
}
/* CODELEAD-SCRIPT-WORKSHOP-V2-20260702 · 剧本工坊 2.0(顶栏新建/打开 + 左输入/中剧本(集列表+镜头级)/右改稿聊天框), 暗色玻璃风与内容营销页一致 */
.sw-wrap{ display:flex; flex-direction:column; gap:12px; }
.sw-head{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.sw-head b{ font-size:16px; }
.sw-sub{ font-size:12px; opacity:.65; flex:1; min-width:200px; }
.sw-topbar{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; padding:8px 10px; background:rgba(255,255,255,.03); border:1px solid rgba(120,180,255,.14); border-radius:10px; }
.sw-topbar-gap{ flex:1; }
.sw-open-select{ max-width:320px; min-width:180px; }
.sw-model{ display:flex; align-items:center; gap:6px; font-size:12px; opacity:.9; }
.sw-model select{ max-width:220px; }
.sw-grid{ display:grid; grid-template-columns:280px minmax(0,1fr) 280px; gap:12px; align-items:start; }
.sw-col{ display:flex; flex-direction:column; gap:10px; min-width:0; background:rgba(255,255,255,.03); border:1px solid rgba(120,180,255,.14); border-radius:12px; padding:12px; }
.sw-col-h{ font-weight:600; opacity:.85; }
.sw-col-h em{ font-style:normal; opacity:.6; font-size:12px; }
.sw-f{ display:flex; flex-direction:column; gap:4px; font-size:13px; }
.sw-f textarea,.sw-f input,.sw-f select{ width:100%; box-sizing:border-box; }
.sw-f-idea textarea{ resize:vertical; min-height:72px; }
.sw-btn{ padding:6px 12px; border-radius:8px; cursor:pointer; }
.sw-btn.s{ padding:4px 8px; font-size:12px; }
.sw-btn.primary{ background:rgba(80,160,255,.28); border:1px solid rgba(120,180,255,.4); }
.sw-btn.ghost{ background:none; border:1px solid rgba(255,255,255,.18); }
.sw-btn[disabled]{ opacity:.5; cursor:not-allowed; }
.sw-generate{ font-size:15px; padding:10px 12px; font-weight:600; }
.sw-save{ font-size:13px; }
.sw-hint{ font-size:11px; opacity:.55; }
.sw-empty{ opacity:.6; font-size:13px; padding:10px 4px; }
.sw-error{ color:#ffb454; font-size:13px; border:1px solid rgba(255,180,84,.35); border-radius:8px; padding:8px 10px; }
.sw-result{ display:flex; flex-direction:column; gap:8px; }
.sw-title{ font-weight:600; font-size:15px; }
.sw-kind-tag{ font-style:normal; font-size:11px; opacity:.6; border:1px solid rgba(255,255,255,.2); border-radius:6px; padding:1px 6px; vertical-align:2px; }
.sw-hook{ opacity:.85; font-size:13px; }
.sw-series-meta{ font-size:12px; opacity:.65; }
.sw-vo-h{ display:flex; align-items:center; justify-content:space-between; gap:8px; font-weight:600; font-size:13px; opacity:.9; }
.sw-vo{ font-size:13px; line-height:1.6; white-space:pre-wrap; opacity:.92; background:rgba(255,255,255,.04); border-radius:8px; padding:8px 10px; max-height:220px; overflow:auto; }
.sw-shots{ width:100%; border-collapse:collapse; font-size:12px; }
.sw-shots th,.sw-shots td{ text-align:left; padding:5px 6px; border-bottom:1px solid rgba(255,255,255,.08); vertical-align:top; }
.sw-shots th{ opacity:.65; font-weight:600; }
.sw-result-meta{ font-size:11px; opacity:.55; }
/* 集列表 */
.sw-ep-list{ display:flex; flex-direction:column; gap:6px; max-height:260px; overflow:auto; }
.sw-ep-row{ display:grid; grid-template-columns:56px auto; grid-template-rows:auto auto; column-gap:8px; text-align:left; background:rgba(255,255,255,.02); border:1px solid rgba(255,255,255,.1); border-radius:10px; padding:7px 9px; cursor:pointer; color:inherit; }
.sw-ep-row b{ font-size:12px; grid-row:1 / span 2; align-self:center; }
.sw-ep-row i{ font-style:normal; font-size:13px; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sw-ep-row span{ font-size:11px; opacity:.6; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sw-ep-row.on{ border-color:rgba(126,211,242,.7); background:rgba(80,160,255,.24); box-shadow:0 0 0 2px rgba(126,211,242,.28) inset; } /* 铁律: 当前集底色加深(原 .1 太浅肉眼难辨) */
.sw-ep-row.done i{ color:#8fd48f; }
/* 当前集 · 剧本式渲染 */
.sw-ep-detail{ display:flex; flex-direction:column; gap:8px; border-top:1px dashed rgba(255,255,255,.14); padding-top:10px; }
.sw-ep-detail-h{ font-weight:600; font-size:14px; }
.sw-script{ display:flex; flex-direction:column; gap:8px; max-height:420px; overflow:auto; }
.sw-shot-block{ background:rgba(255,255,255,.03); border:1px solid rgba(255,255,255,.08); border-radius:10px; padding:8px 10px; display:flex; flex-direction:column; gap:4px; }
.sw-shot-head{ display:flex; align-items:center; gap:8px; font-size:12px; }
.sw-shot-head em{ font-style:normal; opacity:.6; }
.sw-shot-scene{ font-size:13px; opacity:.9; }
.sw-line-dialogue{ font-size:13px; line-height:1.55; border-left:3px solid rgba(80,160,255,.55); padding:3px 8px; background:rgba(80,160,255,.08); border-radius:0 8px 8px 0; }
.sw-line-dialogue .sw-speaker{ font-style:normal; font-weight:600; margin-right:6px; color:#9ecbff; }
.sw-line-voiceover{ font-size:12px; opacity:.72; font-style:italic; padding-left:8px; }
.sw-ep-acts{ display:flex; gap:6px; flex-wrap:wrap; }
/* 角色卡/场景卡 勾选生成 */
.sw-cards-btns{ display:flex; gap:6px; flex-wrap:wrap; }
.sw-cardgen{ display:flex; flex-direction:column; gap:6px; border:1px dashed rgba(120,180,255,.3); border-radius:10px; padding:8px 10px; }
.sw-cardgen-h{ font-size:12px; font-weight:600; display:flex; flex-direction:column; gap:2px; }
.sw-cardgen-h em{ font-style:normal; font-weight:400; opacity:.55; font-size:11px; }
.sw-cardgen-item{ display:flex; gap:8px; align-items:flex-start; font-size:12px; cursor:pointer; padding:4px 6px; border:1px solid transparent; border-radius:8px; }
.sw-cardgen-item.done{ opacity:.65; }
.sw-cardgen-item input{ margin-top:3px; }
.sw-cardgen-info{ display:flex; flex-direction:column; gap:2px; min-width:0; }
.sw-cardgen-info b{ font-size:13px; }
.sw-cardgen-info span{ opacity:.6; font-size:11px; }
.sw-done-mark{ font-style:normal; font-size:11px; color:#8fd48f; }
.sw-card-err{ color:#ffb454; font-size:11px; }
/* 右栏 · 改稿聊天框 */
.sw-chat{ display:flex; flex-direction:column; gap:8px; }
.sw-chat-target{ font-size:12px; opacity:.75; background:rgba(255,255,255,.04); border-radius:8px; padding:6px 8px; }
.sw-chat textarea{ width:100%; box-sizing:border-box; resize:vertical; min-height:84px; }
.sw-chat-log-h{ font-size:12px; font-weight:600; opacity:.7; margin-top:2px; }
.sw-chat-log-item{ font-size:12px; opacity:.8; border-bottom:1px dashed rgba(255,255,255,.1); padding:4px 0; display:flex; flex-direction:column; gap:2px; }
.sw-chat-log-item span{ font-size:11px; opacity:.55; }
@media (max-width:1100px){
  .sw-grid{ grid-template-columns:1fr; }
}

/* Bug批(2026-07-03)·选中态铁律: 角色/场景卡勾选行勾选时底色加深+描边 */
.sw-cardgen-item.on{ background:rgba(80,160,255,.2); border-color:rgba(126,211,242,.6); }

/* 功能批(2026-07-03)·目标市场/保存到项目/生成确认制/生图模型/改稿对象下拉 */
.sw-revise-target{ display:flex; flex-direction:column; gap:4px; }
.sw-revise-target select{ width:100%; box-sizing:border-box; }
.sw-imgmodel select{ width:100%; max-width:100%; box-sizing:border-box; }
/* 保存剧本→选项目弹窗 */
.sw-projpick .cm-modal-card{ width:min(720px,94vw); }
.sw-projpick-two{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.sw-projpick-two h4{ margin:0 0 8px; font-size:13px; opacity:.85; }
.sw-projpick-col{ display:flex; flex-direction:column; gap:8px; max-height:46vh; overflow:auto; }
.sw-projpick-item{ text-align:left; padding:10px 12px; border-radius:8px; border:1px solid rgba(126,211,242,.22); background:rgba(10,26,40,.45); color:#dcf3fb; cursor:pointer; }
.sw-projpick-item small{ display:block; opacity:.6; font-size:11px; }
.sw-projpick-item:hover{ border-color:rgba(126,211,242,.5); }
/* 铁律: 已选项目卡片底色加深 */
.sw-projpick-item.on{ background:rgba(126,211,242,.22); border-color:rgba(126,211,242,.75); box-shadow:0 0 0 2px rgba(126,211,242,.35); color:#eafaff; }
/* 生成确认弹窗(确认入库/重新生成/取消) */
.sw-cardconfirm .cm-modal-card{ width:min(520px,92vw); }
.sw-cardconfirm-body{ display:flex; flex-direction:column; gap:10px; }
.sw-cardconfirm-img{ width:100%; max-height:52vh; object-fit:contain; border-radius:10px; background:rgba(0,0,0,.25); }
.sw-cardconfirm-body textarea{ width:100%; box-sizing:border-box; resize:vertical; }
.sw-cardconfirm-acts{ display:flex; gap:8px; justify-content:flex-end; flex-wrap:wrap; }
.sw-cardconfirm-err{ color:#ff9f9f; font-size:12px; }
@media (max-width:760px){ .sw-projpick-two{ grid-template-columns:1fr; } }
/* 内容营销剪映布局壳(第二步A): 两套工具共用 */
.mkt-edit-wrap{ display:flex; flex-direction:column; gap:12px; }
.mkt-edit-top{ display:grid; grid-template-columns:minmax(200px,1.15fr) minmax(0,2fr) minmax(280px,1.35fr); gap:12px; align-items:stretch; }
.mkt-edit-left,.mkt-edit-right{ display:flex; flex-direction:column; gap:10px; min-width:0; }
.mkt-edit-center{ display:flex; flex-direction:column; min-width:0; }
.mkt-edit-center .jy-preview,.mkt-edit-center .jy-video,.mkt-edit-center .mkt-preview-big{ width:100%; min-height:340px; }
.mkt-edit-bottom{ width:100%; }
@media (max-width:1100px){
  .mkt-edit-top{ grid-template-columns:1fr; }
}
/* 收起 shard06 旧 ops-comfy 遗留内容(节点网格/旧壳/脚本复核/禁用发布行/r13旧真出片),
   内容营销页只显当前工具: 剪辑工作流=shard15 flow([data-aile-host]) / 剧本工坊=shard40([data-script-workshop-r1])。
   (剧本工坊R1: 原豁免对象 shard38 本地剪辑台已判死删除, 豁免位交给 shard40。)
   display:none 不删 DOM, shard 仍可 querySelector 定位, 业务不受影响。 */
body.marketing-mode #mkt-tab-canvas .ops-comfy-panel > *:not([data-aile-host]):not([data-script-workshop-r1]){ display:none !important; }

/* 03 文案脚本闭环: brief 表单 + 脚本草稿卡 */
.aile-brief{ display:flex; flex-direction:column; gap:8px; }
.aile-brief-t{ font-weight:600; opacity:.85; margin-bottom:2px; }
.aile-brief label{ display:flex; justify-content:space-between; gap:8px; align-items:center; font-size:13px; }
.aile-brief input,.aile-brief select{ flex:1; max-width:62%; }
.aile-script-draft{ display:flex; flex-direction:column; gap:8px; max-height:340px; overflow:auto; }
.aile-script-title{ font-weight:600; font-size:15px; }
.aile-script-hook{ opacity:.85; font-size:13px; }
.aile-script-vo{ font-size:13px; line-height:1.6; white-space:pre-wrap; opacity:.92; }
.aile-script-shots .aile-shot-row{ padding:6px 8px; border-radius:8px; background:rgba(255,255,255,.04); margin-bottom:4px; font-size:12px; }
.aile-script-shots .aile-shot-row em{ opacity:.7; margin:0 6px; }
.aile-gate{ font-weight:600; }
.aile-gate.ok{ color:#39d98a; } .aile-gate.bad{ color:#ffb454; }
.aile-script-draft.bad{ outline:1px solid rgba(255,180,84,.35); border-radius:10px; padding:8px; }

/* 01 选项目/素材: 项目选择器 + 素材区 + 视频库左侧文件夹 */
.aile-srcpick{ display:flex; flex-direction:column; gap:8px; }
.aile-srcpick-t{ font-weight:600; opacity:.85; }
.aile-srcpick label{ display:flex; flex-direction:column; gap:4px; font-size:13px; }
.aile-srcpick-cur{ font-size:13px; color:#39d98a; }
.aile-src-add{ margin:8px 0; }
.aile-src-drop{ border:1px dashed rgba(255,255,255,.25); border-radius:10px; padding:14px; text-align:center; font-size:12px; opacity:.8; }
.aile-src-list{ display:flex; flex-wrap:wrap; gap:8px; margin-top:8px; }
.aile-src-card{ position:relative; width:88px; }
.aile-src-card img{ width:88px; height:56px; object-fit:cover; border-radius:6px; background:rgba(255,255,255,.06); }
.aile-src-card span{ display:block; font-size:11px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.aile-src-card em{ font-size:10px; opacity:.6; }
.aile-src-card button{ position:absolute; top:2px; right:2px; line-height:1; }
.marketing-video-output-body{ display:flex; gap:14px; align-items:flex-start; }
.marketing-video-output-folders{ min-width:150px; max-width:190px; display:flex; flex-direction:column; gap:6px; }
.marketing-video-output-folders .cm-folders-h{ font-weight:600; opacity:.85; }
.marketing-video-output-folders .cm-project-folder{ text-align:left; padding:6px 8px; border-radius:8px; }
.marketing-video-output-folders .cm-project-folder.active{ background:rgba(80,160,255,.18); }
.marketing-video-output-folders .cm-project-folder small{ display:block; opacity:.6; font-size:11px; }

/* UI重排: cm-modal 共享弹窗 + 01选文件/大预览 + 视频库三排 */
.cm-modal{ position:fixed; inset:0; background:rgba(4,10,20,.6); display:flex; align-items:center; justify-content:center; z-index:9999; }
.cm-modal-card{ width:min(680px,92vw); max-height:84vh; overflow:auto; background:#0e1b2c; border:1px solid rgba(120,180,255,.18); border-radius:14px; padding:16px; display:flex; flex-direction:column; gap:12px; }
.cm-modal-h{ display:flex; justify-content:space-between; align-items:center; font-weight:600; gap:8px; }
.cm-h-right{ display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.cm-x{ background:none; border:none; color:#cfe; font-size:18px; cursor:pointer; }
.cm-tabs{ display:flex; gap:8px; } .cm-tab{ padding:6px 12px; border-radius:8px; cursor:pointer; } .cm-tab.on{ background:rgba(80,160,255,.18); }
.cm-f{ display:flex; flex-direction:column; gap:4px; } .cm-acts{ display:flex; gap:8px; justify-content:flex-end; }
.cm-modal-body{ min-height:120px; }
.cm-pick-list,.aile-dh-list{ display:flex; flex-wrap:wrap; gap:8px; }
.cm-pick,.aile-dh-card{ text-align:left; padding:8px 10px; border-radius:8px; background:rgba(255,255,255,.05); cursor:pointer; }
.cm-pick small,.aile-dh-card small{ display:block; opacity:.6; font-size:11px; }
.cm-empty{ opacity:.6; font-size:13px; padding:8px; }
.aile-srcbar{ display:flex; gap:8px; align-items:center; }
.aile-srcbar-pick{ flex:1; text-align:left; padding:8px 10px; border-radius:8px; background:rgba(255,255,255,.05); cursor:pointer; }
.aile-srcfiles-bar{ width:100%; text-align:left; padding:8px 10px; border-radius:8px; background:rgba(255,255,255,.05); margin:8px 0; cursor:pointer; }
.aile-src-preview{ display:flex; flex-wrap:wrap; gap:8px; min-height:120px; border:1px dashed rgba(255,255,255,.15); border-radius:10px; padding:10px; }
.aile-src-preview.empty{ align-items:center; justify-content:center; opacity:.6; }
.aile-src-preview figure{ width:108px; margin:0; } .aile-src-preview img{ width:108px; height:68px; object-fit:cover; border-radius:6px; background:rgba(255,255,255,.06); }
.aile-src-preview figcaption{ font-size:11px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.vl-head{ display:flex; justify-content:space-between; align-items:center; }
.vl-projbar{ display:flex; gap:8px; align-items:center; margin:10px 0; }
.vl-body{ display:flex; gap:14px; align-items:flex-start; }
.vl-dir{ min-width:120px; display:flex; flex-direction:column; gap:6px; }
.vl-dir button{ text-align:left; padding:8px 10px; border-radius:8px; cursor:pointer; } .vl-dir button.on{ background:rgba(80,160,255,.18); }
.vl-content{ flex:1; min-width:0; }
.vl-source-grid{ display:flex; flex-wrap:wrap; gap:8px; } .vl-other-list{ display:flex; flex-direction:column; gap:6px; }

/* 视频库 文件系统式(2#) */
.vl-fs-dialog { width: min(1180px, 94vw); height: min(82vh, 880px); display: flex; flex-direction: column; }
.vl-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,.08); }
.vl-toolbar .vl-title { font-size: 16px; margin-right: 6px; }
.vl-toolbar .vl-proj { display: flex; align-items: center; gap: 4px; font-size: 12px; }
.vl-toolbar-sp { flex: 1; }
.vl-body { flex: 1; overflow: auto; padding: 12px 14px; }
.vl-fs { min-height: 420px; }
.vl-breadcrumb { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-bottom: 10px; font-size: 13px; }
.vl-breadcrumb .vl-crumb { background: none; border: none; color: #6aa3ff; cursor: pointer; padding: 2px 4px; }
.vl-breadcrumb .vl-crumb.on { color: #cdd9e5; font-weight: 600; }
.vl-breadcrumb i { color: #6b7785; font-style: normal; }
.vl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.vl-card { position: relative; border: 1px solid rgba(255,255,255,.1); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; background: rgba(255,255,255,.02); }
.vl-card .vl-ico { font-size: 40px; }
.vl-card img { width: 100%; height: 92px; object-fit: cover; border-radius: 6px; }
.vl-card figcaption { font-size: 12px; text-align: center; color: #cdd9e5; }
.vl-card figcaption small { display: block; color: #8a93a6; font-size: 10px; }
.vl-card .vl-del { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%; border: none; background: #c0392b; color: #fff; cursor: pointer; }
.vl-card .vl-selbox { position: absolute; top: 6px; left: 6px; }
.vl-fs[data-marketing-vl-dropzone].vl-drag { outline: 2px dashed #6aa3ff; outline-offset: -6px; }
.vl-template-panel { text-align: center; padding: 48px 16px; color: #9fb0c0; }
.vl-template-panel .vl-ico { font-size: 44px; }
/* R2(2026-07-03) T6: 视频库工坊剧本只读预览文本 */
.vl-wsp-text { max-height: 56vh; overflow: auto; white-space: pre-wrap; word-break: break-word; font-size: 13px; line-height: 1.7; color: #d5e4ee; margin: 0; }

/* ===== U27 视频工坊布局还原(定稿 REN-D-SHOTS): 顶部步骤条 + 三栏栏卡。只有 15 号分片(视频工坊)输出这些类 ===== */
/* 工坊激活时外层 panel 去壳: 步骤条与三栏各自成卡, 外面不再套框。
   现役 #marketing :is(.ops-node-panel,…) 的 background 带 !important, 日间 .panel 的 padding/border 带 !important, 故此处须同级提权 */
#marketing #mkt-tab-canvas .ops-comfy-panel.aile-flow-active,
html[data-meifan-theme="day"] body:not(.home-mode) #marketing #mkt-tab-canvas .ops-comfy-panel.aile-flow-active { padding:0 !important; margin:0; border:0 !important; background:transparent !important; box-shadow:none !important; }
.aile-flow.mkt-edit-wrap { padding:0; gap:14px; }
.mkt-edit-steps { width:100%; }

/* 步骤条: .mkt-stepbar > button.mkt-step(.mkt-step-no + strong + em.aile-node-state) + i.mkt-step-line */
.mkt-stepbar { display:flex; align-items:center; gap:0; min-height:60px; margin-bottom:6px; padding:0 28px; box-sizing:border-box; border:1px solid var(--glass-line, rgba(126,211,242,.24)); border-radius:12px; background:var(--glass-card, rgba(5,19,30,.72)); }
.mkt-stepbar .mkt-step { flex:0 0 auto; display:inline-flex; align-items:center; gap:14px; padding:8px 4px; font:inherit; font-size:16px; cursor:pointer; }
/* 现役 body:not(.home-mode) #marketing button 对底色/阴影/字色加了 !important(css/09), 沿本目录 css/15「#marketing .aile-node-card.on」的既有写法提权 */
#marketing .mkt-stepbar .mkt-step { background:transparent !important; box-shadow:none !important; border:0 !important; color:var(--muted, rgba(207,230,238,.7)) !important; }
#marketing .mkt-stepbar .mkt-step.on, #marketing .mkt-stepbar .mkt-step:hover { color:var(--ink, #effbff) !important; }
.mkt-step-no { min-width:32px; height:32px; padding:0 4px; box-sizing:border-box; flex:none; border-radius:16px; display:inline-flex; align-items:center; justify-content:center; font-size:15px; font-weight:700; color:#04212f; background:#9fd0f5; }
#marketing .mkt-stepbar .mkt-step .mkt-step-no { color:#04212f !important; }
.mkt-step strong { font-weight:500; white-space:nowrap; }
.mkt-step.on strong { font-weight:700; }
.mkt-step.on .mkt-step-no { background:var(--teal, #76d8f6); box-shadow:0 0 0 4px rgba(118,216,246,.22); }
.mkt-step.locked { opacity:.9; cursor:default; }
/* 常规态不显状态字; 未解锁/旧稿/版本待核 才显(现役能力保留) */
.mkt-step .aile-node-state { display:none; font-style:normal; font-size:11px; padding:1px 7px; border-radius:10px; }
/* 旧稿/版本待核: 不占步骤条的字位, 收成步名右上的小点(全文在悬浮提示) */
.mkt-step.stale .aile-node-state, .mkt-step.unknown .aile-node-state { display:inline-block; width:8px; height:8px; padding:0; border-radius:50%; overflow:hidden; text-indent:-999px; align-self:flex-start; margin-left:-8px; }
.mkt-step.locked .aile-node-state { background:rgba(207,230,238,.1); }
.mkt-step.stale .aile-node-state { background:#ffd58a; }
#marketing .mkt-stepbar .mkt-step.stale .aile-node-state { color:#ffd58a !important; }
.mkt-step.unknown .aile-node-state { background:#c6d0e0; }
.mkt-step-line { flex:1 1 40px; min-width:24px; height:1px; margin:0 18px; background:var(--glass-line, rgba(126,211,242,.3)); }

/* 图标: 复用 assets/ui/icons 的 lucide 图标, 用 mask 让颜色跟随文字(同 css/18 既有写法) */
.mkt-ico { display:inline-block; width:1.15em; height:1.15em; flex:none; vertical-align:-0.2em; margin-right:.4em; background-color:currentColor; -webkit-mask:center / contain no-repeat; mask:center / contain no-repeat; }
.mkt-ico-image { -webkit-mask-image:url("assets/ui/icons/lucide-image.svg"); mask-image:url("assets/ui/icons/lucide-image.svg"); }
.mkt-ico-video { -webkit-mask-image:url("assets/ui/icons/lucide-video.svg"); mask-image:url("assets/ui/icons/lucide-video.svg"); }
.mkt-ico-repeat { -webkit-mask-image:url("assets/ui/icons/lucide-repeat-2.svg"); mask-image:url("assets/ui/icons/lucide-repeat-2.svg"); }
.mkt-ico-user { -webkit-mask-image:url("assets/ui/icons/lucide-user-round.svg"); mask-image:url("assets/ui/icons/lucide-user-round.svg"); }
.mkt-ico-search { -webkit-mask-image:url("assets/ui/icons/lucide-search.svg"); mask-image:url("assets/ui/icons/lucide-search.svg"); }
.mkt-ico-sparkles { -webkit-mask-image:url("assets/ui/icons/lucide-sparkles.svg"); mask-image:url("assets/ui/icons/lucide-sparkles.svg"); }
.mkt-ico-upload { -webkit-mask-image:url("assets/ui/icons/lucide-upload.svg"); mask-image:url("assets/ui/icons/lucide-upload.svg"); }
.mkt-ico-folder { -webkit-mask-image:url("assets/ui/icons/lucide-folder.svg"); mask-image:url("assets/ui/icons/lucide-folder.svg"); }
.mkt-ico-arrow { -webkit-mask-image:url("assets/ui/icons/lucide-arrow-right.svg"); mask-image:url("assets/ui/icons/lucide-arrow-right.svg"); }
.mkt-ico-info { -webkit-mask-image:url("assets/ui/icons/lucide-info.svg"); mask-image:url("assets/ui/icons/lucide-info.svg"); }
.mkt-ico-file { -webkit-mask-image:url("assets/ui/icons/lucide-file-text.svg"); mask-image:url("assets/ui/icons/lucide-file-text.svg"); }
.mkt-ico-pencil { -webkit-mask-image:url("assets/ui/icons/lucide-pencil.svg"); mask-image:url("assets/ui/icons/lucide-pencil.svg"); }
.mkt-ico-check { -webkit-mask-image:url("assets/ui/icons/lucide-circle-check.svg"); mask-image:url("assets/ui/icons/lucide-circle-check.svg"); }
.mkt-ico-clock { -webkit-mask-image:url("assets/ui/icons/lucide-clock.svg"); mask-image:url("assets/ui/icons/lucide-clock.svg"); }
.mkt-ico-x { -webkit-mask-image:url("assets/ui/icons/lucide-circle-x.svg"); mask-image:url("assets/ui/icons/lucide-circle-x.svg"); }
/* 未接: 定稿有、现役尚无行为的入口——出位置、置灰、带「未接」小标 */
.mkt-todo { opacity:.55; cursor:not-allowed; }
.mkt-seg.mkt-todo { opacity:1; }
.mkt-todo-tag { display:inline-block; margin-left:6px; padding:0 5px; border:1px dashed currentColor; border-radius:6px; font-style:normal; font-size:10.5px; line-height:1.5; opacity:.9; vertical-align:middle; }
.mkt-seg.mkt-todo { align-items:center; }
.mkt-seg.mkt-todo button { border:0; background:transparent; font:inherit; cursor:not-allowed; }
.mkt-seg.mkt-todo .mkt-todo-tag { margin:0 6px 0 2px; padding:0 4px; }
#marketing .mkt-seg.mkt-todo button { background:transparent !important; box-shadow:none !important; border:0 !important; }
#marketing .mkt-seg.mkt-todo button { color:var(--muted, rgba(207,230,238,.7)) !important; opacity:1; }
#marketing .mkt-seg.mkt-todo button.on { background:linear-gradient(180deg,#0a73ff,#0055fe) !important; color:#ffffff !important; }
/* 栏头(标题+工具区)与分段标 */
.mkt-pane-head { display:flex; align-items:center; justify-content:space-between; gap:10px; min-width:0; flex-wrap:wrap; }
.mkt-pane-head > strong { font-size:21px; font-weight:600; color:var(--ink, #effbff); white-space:nowrap; }
.mkt-pane-tools { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.mkt-seg { display:inline-flex; border:1px solid var(--glass-line, rgba(126,211,242,.3)); border-radius:8px; overflow:hidden; }
.mkt-seg > * { font-size:14px; padding:7px 18px; color:var(--muted, rgba(207,230,238,.7)); }
.mkt-seg > .on { background:rgba(80,160,255,.38); color:var(--ink, #effbff); }
/* 手机构图专用块: 营销项目条、04 次级页签。桌面收起, ≤760px 显示 */
.mkt-projbar, .mkt-subtabs { display:none; }
/* 同一位置的桌面字／手机短字: 桌面显 .mkt-d, ≤760px 显 .mkt-m */
.mkt-m { display:none; }
/* 三栏栏卡: 三列各加 .mkt-pane。列比例只对已有桌面定稿的 04 屏调整, 其余屏沿用上方既有比例 */
.mkt-pane { min-width:0; padding:16px 14px; border:1px solid var(--glass-line, rgba(126,211,242,.24)); border-radius:12px; background:var(--glass-card, rgba(5,19,30,.72)); box-sizing:border-box; }
.mkt-edit-top[data-mkt-node="media"] { grid-template-columns:minmax(240px,1.06fr) minmax(0,1.79fr) minmax(280px,1fr); }

@media (max-width:1100px){
  .mkt-edit-top[data-mkt-node="media"] { grid-template-columns:1fr; }
  .mkt-stepbar { padding:0 12px; overflow-x:auto; }
  .mkt-step-line { margin:0 8px; }
}
@media (max-width:760px){
  /* 步骤条窄屏形态: 圆点在上、步名在下、虚线相连(同一标记) */
  .mkt-stepbar { min-height:0; padding:8px 10px 4px; margin-bottom:0; align-items:flex-start; border:0; background:transparent; overflow:visible; }
  .mkt-stepbar .mkt-step { flex-direction:column; gap:6px; padding:0; font-size:12px; min-width:0; min-height:36px; }
  .mkt-step-no { min-width:12px; width:12px; height:12px; padding:0; font-size:0; }
  .mkt-step.on .mkt-step-no { width:14px; height:14px; margin-top:-1px; box-shadow:0 0 0 3px rgba(118,216,246,.28); }
  .mkt-step-line { flex:1 1 8px; min-width:6px; margin:6px 4px 0; height:0; background:transparent; border-top:1px dashed var(--glass-line, rgba(126,211,242,.45)); }
  .mkt-step .aile-node-state { display:none !important; }
  .mkt-pane { padding:12px; border-radius:10px; }
  .aile-flow.mkt-edit-wrap { gap:8px; }
  .mkt-d { display:none; }
  .mkt-m { display:inline; }
  .mkt-edit-top { gap:8px; }
  .mkt-pane { padding:10px; gap:8px; }
  .mkt-stepbar { padding:6px 8px 2px; }
  .mkt-projbar { display:flex; align-items:center; gap:10px; min-height:40px; padding:0 12px; border:1px solid var(--glass-line, rgba(126,211,242,.24)); border-radius:10px; background:var(--glass-card, rgba(5,19,30,.72)); font-size:13px; color:var(--muted, rgba(207,230,238,.7)); }
  .mkt-projbar-btn { flex:1 1 auto; min-width:0; min-height:36px; text-align:left; font:inherit; font-size:15px; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; cursor:pointer; }
  #marketing .mkt-projbar .mkt-projbar-btn { background:transparent !important; border:0 !important; box-shadow:none !important; border-left:1px solid var(--glass-line, rgba(126,211,242,.3)) !important; border-radius:0; padding:0 0 0 12px; }
  .mkt-subtabs { display:flex; width:100%; box-sizing:border-box; }
  .mkt-subtabs button { flex:1 1 0; min-height:36px; padding:4px 6px; font:inherit; font-size:14px; cursor:pointer; }
  #marketing .mkt-subtabs button { background:transparent !important; border:0 !important; box-shadow:none !important; color:var(--muted, rgba(207,230,238,.7)) !important; }
  #marketing .mkt-subtabs button.on { background:linear-gradient(180deg,#0a73ff,#0055fe) !important; color:#ffffff !important; }
  .mkt-pane-head > strong { font-size:16px; }
}

@media (max-width:760px){
  /* —— r8: 顶上三条(项目条、步骤条、页签)可见高度按定稿(26／30／24); 可点区域用不可见的伪元素外扩补到不低于 36;
        三条之间的间距取 8／9、页签到预览 7, 使相邻热区不重叠(项目条 ±5、步骤 ±3、页签 ±6) —— */
  .aile-flow.mkt-edit-wrap { gap:0; }
  .mkt-projbar { min-height:26px; height:26px; padding:0 10px; gap:8px; font-size:12px; border-radius:8px; box-sizing:border-box; }
  .mkt-projbar-btn { position:relative; min-height:24px; height:24px; font-size:13.5px; line-height:24px; overflow:visible; }
  #marketing .mkt-projbar .mkt-projbar-btn { padding:0 0 0 10px; }
  .mkt-projbar-btn::after { content:""; position:absolute; left:0; right:0; top:-6px; bottom:-6px; }
  .mkt-edit-steps { margin-top:8px; }
  .mkt-stepbar { padding:0 8px; }
  .mkt-stepbar .mkt-step { position:relative; min-height:30px; height:30px; gap:3px; line-height:14px; }
  .mkt-stepbar .mkt-step::after { content:""; position:absolute; left:-4px; right:-4px; top:-3px; bottom:-3px; }
  .mkt-step-line { margin-top:6px; }
  .mkt-subtabs { margin-top:9px; }
  .mkt-subtabs button { position:relative; min-height:24px; height:24px; padding:0 6px; font-size:13px; line-height:24px; }
  .mkt-subtabs button::after { content:""; position:absolute; left:0; right:0; top:-6px; bottom:-6px; }
  .mkt-edit-top { margin-top:7px; }
}

/* ===== U27 内容营销·夜间面板定稿蓝(张工 2026-11-11 裁定: 最终全站换, 本次只做内容营销) =====
   只在 #marketing 内、只在夜间生效; 用本区自己的 --mkt-* 变量, 不改全站主题变量的定义。
   取色采自定稿 REN-D-SHOTS: 面板 #032c4e→#00203f, 面板边 #1d4a73, 行卡 #032848 边 #0d496e, 输入框 #00294b, 文本框 #033466。 */
html:not([data-meifan-theme="day"]) body:not(.home-mode) #marketing {
  --mkt-panel-bg: linear-gradient(180deg, #032c4e 0%, #00203f 100%);
  --mkt-panel-line: #1d4a73;
  --mkt-card-bg: #032848;
  --mkt-card-line: #0d496e;
  --mkt-field-bg: #00294b;
  --mkt-text-bg: #033466;
}
/* 视频工坊: 步骤条、三栏面板 */
html:not([data-meifan-theme="day"]) body:not(.home-mode) #marketing .mkt-stepbar, html:not([data-meifan-theme="day"]) body:not(.home-mode) #marketing .mkt-pane { background:var(--mkt-panel-bg); border-color:var(--mkt-panel-line); }
/* 视频工坊: 行卡、来源卡、稿面框、摘要框、分镜表 */
html:not([data-meifan-theme="day"]) body:not(.home-mode) #marketing .aile-media-row, html:not([data-meifan-theme="day"]) body:not(.home-mode) #marketing .aile-media-meta, html:not([data-meifan-theme="day"]) body:not(.home-mode) #marketing .aile-script-box, html:not([data-meifan-theme="day"]) body:not(.home-mode) #marketing .aile-script-sum { background:var(--mkt-card-bg); border-color:var(--mkt-card-line); }
html:not([data-meifan-theme="day"]) body:not(.home-mode) #marketing .aile-media-row.on { background:#00284a; border-color:#2a85ff; box-shadow:0 0 0 1px rgba(42,133,255,.45); }
html:not([data-meifan-theme="day"]) body:not(.home-mode) #marketing table.aile-script-shots { border-color:var(--mkt-card-line); }
html:not([data-meifan-theme="day"]) body:not(.home-mode) #marketing table.aile-script-shots th { background:#07365f; }
html:not([data-meifan-theme="day"]) body:not(.home-mode) #marketing table.aile-script-shots th, html:not([data-meifan-theme="day"]) body:not(.home-mode) #marketing table.aile-script-shots td { border-color:rgba(13,73,110,.8); }
/* 视频工坊: 下拉、输入框、文本框 */
html:not([data-meifan-theme="day"]) body:not(.home-mode) #marketing .aile-flow select, html:not([data-meifan-theme="day"]) body:not(.home-mode) #marketing .aile-flow input[type="number"], html:not([data-meifan-theme="day"]) body:not(.home-mode) #marketing .aile-flow input[type="text"] { background-color:var(--mkt-field-bg) !important; border-color:var(--mkt-card-line) !important; } /* 现役对输入控件的底色带 !important, 此处在本区内同级压过 */
html:not([data-meifan-theme="day"]) body:not(.home-mode) #marketing .aile-flow textarea { background-color:var(--mkt-text-bg) !important; border-color:var(--mkt-card-line) !important; }
/* 剧本工坊: 顶条与各栏(原为半透明白叠在外壳上) */
html:not([data-meifan-theme="day"]) body:not(.home-mode) #marketing .sw-topbar, html:not([data-meifan-theme="day"]) body:not(.home-mode) #marketing .sw-col { background:var(--mkt-panel-bg); border-color:var(--mkt-panel-line); }
html:not([data-meifan-theme="day"]) body:not(.home-mode) #marketing .sw-shot-block, html:not([data-meifan-theme="day"]) body:not(.home-mode) #marketing .sw-ep-row, html:not([data-meifan-theme="day"]) body:not(.home-mode) #marketing .sw-vo, html:not([data-meifan-theme="day"]) body:not(.home-mode) #marketing .sw-chat-target { background-color:var(--mkt-card-bg); border-color:var(--mkt-card-line); }
@media (max-width:760px){
  html:not([data-meifan-theme="day"]) body:not(.home-mode) #marketing .mkt-stepbar { background:transparent; border-color:transparent; }
}
/* ===== U27 内容营销·夜间页面区底与次要按钮按定稿取色(总指挥令 CMD-1417 第 6 条; 张工 2026-11-11「这次先只做内容营销」) =====
   只在 #marketing 容器内、只在夜间; 不改全站变量, 不动外壳(顶栏、底部导航、容器外)。
   取色采自定稿 REN-D-SHOTS: 页面区底 上 #002e57 → 中 #00132b → 下 #001a34; 次要按钮 底 #00274b、边 #1a4f7d。 */
html:not([data-meifan-theme="day"]) body:not(.home-mode) #marketing { background:linear-gradient(180deg, #002e57 0%, #00132b 36%, #001a34 100%); border-radius:12px; }
/* 次要按钮(非主钮): 视频工坊 .aile-btn、剧本工坊 .sw-btn。现役对 #marketing 内所有按钮有带 !important 的玻璃钮规则, 这里在本区内同级压过 */
html:not([data-meifan-theme="day"]) body:not(.home-mode) #marketing .aile-flow .aile-btn:not(.primary):not(:disabled), html:not([data-meifan-theme="day"]) body:not(.home-mode) #marketing .sw-btn:not(.primary):not(:disabled) { background:#00274b !important; border-color:#1a4f7d !important; box-shadow:none !important; }
html:not([data-meifan-theme="day"]) body:not(.home-mode) #marketing .aile-flow .aile-btn:not(.primary):not(:disabled):hover, html:not([data-meifan-theme="day"]) body:not(.home-mode) #marketing .sw-btn:not(.primary):not(:disabled):hover { background:#02436f !important; border-color:#2a85ff !important; }
.settings-account-r3 {
  display: grid;
  gap: 12px;
  color: #edf7f6;
  max-width: 100%;
  overflow-x: hidden;
}

.settings-account-r3 *,
.settings-account-r3 *::before,
.settings-account-r3 *::after {
  box-sizing: border-box;
}

.settings-account-r3-head,
.settings-account-r3-panel {
  border: 1px solid rgba(125, 211, 252, .2);
  border-radius: 8px;
  background: rgba(7, 14, 22, .78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}

.settings-account-r3-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
}

/* SS-34(2026-07-05): 视图外壳(01_core_config)已给「系统设置」一级标题——本壳不再重复 H1, 只留一行引导副标题,
   消解"两个系统设置上下叠放"的双标题(截图肉眼验出的视觉重叠, 静态 innerHTML 分析看不出)。 */
.settings-account-r3-head-lead {
  padding: 4px 18px 12px;
}
.settings-account-r3-head-lead p {
  color: rgba(211, 224, 226, .68);
  line-height: 1.55;
  margin: 0;
  font-size: 13px;
}

.settings-account-r3-head h1,
.settings-account-r3-head p,
.settings-account-r3-panel-head h2,
.settings-account-r3-panel-head p {
  margin: 0;
}

.settings-account-r3-head h1 {
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: 0;
}

.settings-account-r3-head p,
.settings-account-r3-panel-head p,
.settings-account-r3-note,
.settings-account-r3-grid small,
.settings-account-r3-api-actions small,
.settings-account-r3-table small {
  color: rgba(211, 224, 226, .68);
  line-height: 1.55;
}

.settings-account-r3-head > span,
.settings-account-r3-panel-head > span,
.settings-account-r3-section-title > span {
  flex-shrink: 0;
  border: 1px solid rgba(244, 190, 92, .36);
  border-radius: 999px;
  color: rgba(244, 190, 92, .96);
  padding: 3px 10px;
  font-size: 12px;
}

.settings-account-r3-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  width: fit-content;
  padding: 5px;
  border: 1px solid rgba(125, 211, 252, .16);
  border-radius: 8px;
  background: rgba(5, 10, 16, .72);
}

.settings-account-r3-nav button,
.settings-account-r3 button {
  min-height: 34px;
  border: 1px solid rgba(148, 163, 184, .26);
  border-radius: 7px;
  background: rgba(18, 28, 38, .82);
  color: rgba(230, 240, 241, .82);
  font: inherit;
  font-weight: 700;
  padding: 0 12px;
  cursor: pointer;
}

.settings-account-r3-nav button.active,
.settings-account-r3 button:hover {
  border-color: rgba(120, 210, 170, .68);
  background: rgba(24, 56, 48, .78);
  color: #f5fffb;
}

/* R587: only this navigation changes at night; day and other settings buttons keep their rules. */
html[data-meifan-theme="tech-glass-blue"] .settings-account-r3-nav button:hover:not(.active),
html[data-meifan-theme="tech-glass-blue"] .settings-account-r5-side button:hover:not(.active) {
  background: var(--nav-soft);
  border-color: var(--line);
  color: var(--ink);
}
html[data-meifan-theme="tech-glass-blue"] .settings-account-r3-nav button.active,
html[data-meifan-theme="tech-glass-blue"] .settings-account-r5-side button.active {
  background: var(--surface-strong);
  border-color: var(--green);
  color: var(--ink);
  box-shadow: inset 2px 0 var(--green);
}

.settings-account-r3-nav button:disabled {
  opacity: .38;
  cursor: not-allowed;
}

.settings-account-r3-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.settings-account-r3-panel-head,
.settings-account-r3-section-title,
.settings-account-r3-api-profile-head,
.settings-account-r3-api-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.settings-account-r3-panel-head h2 {
  font-size: 22px;
  letter-spacing: 0;
}

.settings-account-r3-grid {
  display: grid;
  gap: 10px;
}

.settings-account-r3-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.settings-account-r3-grid article,
.settings-account-r3-platform-api,
.settings-account-r3-table-wrap,
.settings-account-r3-construction,
.settings-account-r3-personal-api,
.settings-account-r3-api-profile {
  border: 1px solid rgba(126, 158, 177, .18);
  border-radius: 8px;
  background: rgba(10, 20, 30, .72);
  padding: 12px;
}

.settings-account-r3-grid article {
  display: grid;
  gap: 5px;
  align-content: start;
}

.settings-account-r3-grid strong,
.settings-account-r3-section-title strong,
.settings-account-r3-api-profile-head strong {
  color: #f4fbfb;
}

.settings-account-r3-grid article button {
  justify-self: start;
  margin-top: 4px;
}

.settings-account-r3-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 13px;
}

.settings-account-r3-table th,
.settings-account-r3-table td {
  border: 1px solid rgba(126, 158, 177, .18);
  padding: 9px 10px;
  text-align: left;
  vertical-align: top;
}

.settings-account-r3-table th {
  color: rgba(211, 224, 226, .72);
  font-weight: 700;
}

.settings-account-r3-table td:first-child {
  display: grid;
  gap: 3px;
}

.settings-account-r3-construction-mount {
  min-height: 112px;
  margin-top: 10px;
}

.settings-account-r3-api-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.settings-account-r12-api-list {
  gap: 14px;
}

.settings-account-r12-api-group {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.settings-account-r12-api-group h3 {
  margin: 4px 0 0;
  color: rgba(225, 245, 246, .9);
  font-size: 15px;
  letter-spacing: 0;
}

.settings-account-r12-api-card {
  border-color: rgba(125, 211, 252, .28);
  background:
    linear-gradient(145deg, rgba(13, 35, 48, .72), rgba(8, 15, 23, .76)),
    rgba(10, 20, 30, .7);
}

.settings-account-r12-api-badge,
.settings-account-r12-test-result {
  border: 1px solid rgba(125, 211, 252, .24);
  border-radius: 999px;
  padding: 3px 8px;
  color: rgba(210, 231, 244, .88);
  background: rgba(10, 23, 34, .68);
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.settings-account-r12-test-result {
  border-color: rgba(120, 210, 170, .26);
  color: rgba(196, 239, 219, .92);
}

.settings-account-r3-api-profile {
  display: grid;
  gap: 10px;
}

.settings-account-r3-api-profile-head span {
  flex-shrink: 0;
  border: 1px solid rgba(148, 163, 184, .26);
  border-radius: 999px;
  color: rgba(211, 224, 226, .7);
  padding: 2px 9px;
  font-size: 12px;
}

.settings-account-r3-api-profile-head span.on {
  border-color: rgba(120, 210, 170, .48);
  color: rgba(120, 210, 170, .95);
}

.settings-account-r3-api-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.settings-account-r3-api-form label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: rgba(211, 224, 226, .72);
  font-size: 12px;
  font-weight: 700;
}

.settings-account-r3-api-form input {
  width: 100%;
  min-width: 0;
  height: 34px;
  border: 1px solid rgba(126, 158, 177, .24);
  border-radius: 7px;
  background: rgba(5, 11, 18, .82);
  color: #edf7f6;
  padding: 7px 9px;
  outline: none;
}

.settings-account-r3-api-form input:focus {
  border-color: rgba(120, 210, 170, .72);
  box-shadow: 0 0 0 2px rgba(120, 210, 170, .12);
}

.settings-account-r3-check {
  align-content: end;
}

.settings-account-r3-check input {
  width: auto;
  height: auto;
  margin-right: 6px;
}

.settings-account-r3-api-actions {
  align-items: center;
  border-top: 1px solid rgba(126, 158, 177, .14);
  padding-top: 9px;
}

.settings-account-r3-api-actions small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.settings-account-r3-add {
  justify-self: start;
  margin-top: 10px;
}
.settings-account-r3-business-tags,
.settings-account-r3-capability-pills,
.settings-account-r3-workflow-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.settings-account-r3-business-tags span,
.settings-account-r3-business-pill,
.settings-account-r3-capability-pills span,
.settings-account-r3-workflow-pills span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid rgba(120, 210, 170, .3);
  border-radius: 999px;
  padding: 2px 9px;
  background: rgba(20, 83, 45, .18);
  color: rgba(202, 244, 226, .92);
  font-size: 12px;
  font-weight: 700;
}
.settings-account-r3-business-pill.strong {
  border-color: rgba(244, 190, 92, .36);
  background: rgba(120, 83, 20, .18);
  color: rgba(255, 232, 184, .94);
}
.settings-account-r3-connection-card {
  gap: 12px;
}
.settings-account-r3-api-profile-head small {
  display: block;
  margin-top: 3px;
  color: rgba(211, 224, 226, .58);
}
.settings-account-r3-connection-main {
  display: grid;
  grid-template-columns: minmax(120px, .8fr) minmax(160px, 1.2fr) minmax(160px, 1.2fr) minmax(88px, .6fr);
  gap: 10px;
}
.settings-account-r3-connection-main > div,
.settings-account-r3-switch {
  display: grid;
  gap: 5px;
  min-width: 0;
  border: 1px solid rgba(126, 158, 177, .16);
  border-radius: 8px;
  background: rgba(5, 11, 18, .48);
  padding: 9px;
}
.settings-account-r3-connection-main small {
  color: rgba(211, 224, 226, .62);
}
.settings-account-r3-switch {
  align-content: center;
  color: rgba(230, 240, 241, .86);
  font-weight: 700;
}
.settings-account-r3-switch input {
  width: auto;
  height: auto;
  margin-right: 6px;
}
.settings-account-r3-api-advanced {
  border: 1px solid rgba(126, 158, 177, .16);
  border-radius: 8px;
  background: rgba(5, 11, 18, .42);
  padding: 9px;
}
.settings-account-r3-api-advanced summary {
  cursor: pointer;
  color: rgba(230, 240, 241, .88);
  font-weight: 700;
}
.settings-account-r3-api-advanced .settings-account-r3-api-form {
  margin-top: 10px;
}

@media (max-width: 1180px) {
  .settings-account-r3-api-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .settings-account-r3-connection-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .settings-account-r3-head,
  .settings-account-r3-panel-head,
  .settings-account-r3-section-title,
  .settings-account-r3-api-profile-head,
  .settings-account-r3-api-actions,
  .settings-account-r14-modal-head,
  .settings-account-r14-modal-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .settings-account-r3-nav {
    width: 100%;
  }

  .settings-account-r3-nav button {
    flex: 1 1 120px;
  }

  .settings-account-r3-grid.compact,
  .settings-account-r3-api-form,
  .settings-account-r3-connection-main {
    grid-template-columns: 1fr;
  }

  .settings-account-r3-table-wrap {
    overflow-x: auto;
  }

  .settings-account-r14-modal-backdrop {
    align-items: stretch;
    padding: 10px;
  }

  .settings-account-r14-modal {
    width: min(100%, calc(100vw - 20px));
    max-height: calc(100vh - 20px);
    padding: 10px;
    overflow-x: hidden;
  }

  .settings-account-r14-tabs button {
    flex: 1 1 120px;
  }

  .settings-account-r14-route-note,
  .settings-account-r14-modal-actions {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .settings-account-r14-modal-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .settings-account-r14-modal-actions > * {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
}

.settings-account-r5-layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
}

.settings-account-r5-side {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
}

.settings-account-r5-side button {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
}

.settings-account-r5-side button.active {
  border-color: rgba(120, 210, 170, .68);
  background: rgba(20, 83, 45, .34);
}

.settings-account-r5-main {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.settings-account-r5-company-block,
.settings-account-r5-personal-block {
  display: grid;
  gap: 10px;
  min-width: 0;
  border: 1px solid rgba(126, 158, 177, .18);
  border-radius: 8px;
  background: rgba(10, 20, 30, .72);
  padding: 12px;
}

.settings-account-r5-entry-grid,
.settings-account-r5-account-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  min-width: 0;
}

/* P1-3(2026-07-08): 账号设置顶部四状态卡（订阅/余额/存储/安全）——信息层级清晰, 数据由 hydratePersonalAccountReal 接真 */
.settings-account-r17-status-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 6px 0 14px;
  min-width: 0;
}
.settings-account-r17-status-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  border: 1px solid rgba(126, 158, 177, .22);
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(12, 22, 32, .72), rgba(6, 12, 19, .58));
  padding: 14px;
}
.settings-account-r17-status-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(211, 224, 226, .72);
  font-size: 12.5px;
  font-weight: 700;
}
.settings-account-r17-status-card-head strong { color: #cfe6ea; }
.settings-account-r17-status-ico {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba(45, 122, 122, .26);
  color: #7ed3c6;
  font-size: 13px;
}
.settings-account-r17-status-main {
  color: #edf7f6;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.settings-account-r17-status-sub {
  color: rgba(180, 199, 205, .66);
  font-size: 11.5px;
  line-height: 1.4;
}
.settings-account-r17-status-line {
  color: rgba(214, 227, 229, .9);
  font-size: 13px;
  line-height: 1.5;
}
.settings-account-r17-status-line b { color: #edf7f6; font-weight: 700; }
.settings-account-r17-status-line small { color: rgba(180, 199, 205, .6); font-size: 11px; margin-left: 4px; }
.settings-account-r17-status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
}
.settings-account-r17-status-btn {
  border: 1px solid rgba(126, 158, 177, .3);
  border-radius: 8px;
  background: rgba(9, 17, 25, .7);
  color: #d6ecec;
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 12px;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.settings-account-r17-status-btn:hover { border-color: rgba(126, 200, 190, .5); }
.settings-account-r17-status-btn.primary {
  background: linear-gradient(135deg, rgba(45, 150, 138, .9), rgba(38, 120, 130, .9));
  border-color: rgba(120, 210, 190, .55);
  color: #f2fbfa;
}

.settings-account-r18-contact-modal {
  max-width: 520px;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.settings-account-r18-contact-body {
  display: grid;
  gap: 10px;
  min-width: 0;
  overflow: auto;
}

.settings-account-r18-contact-body label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: rgba(211, 224, 226, .72);
  font-size: 12px;
  font-weight: 700;
}

.settings-account-r18-contact-body input {
  width: 100%;
  min-width: 0;
  height: 36px;
  border: 1px solid rgba(126, 158, 177, .24);
  border-radius: 7px;
  background: rgba(4, 12, 20, .52);
  color: #eaf6f7;
  padding: 0 10px;
  box-sizing: border-box;
}

.settings-account-r18-contact-hint,
.settings-account-r18-contact-target {
  margin: 0;
  border: 1px solid rgba(234, 179, 8, .28);
  border-radius: 8px;
  background: rgba(113, 63, 18, .16);
  color: rgba(254, 240, 138, .92);
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.55;
}

.settings-account-r18-contact-target {
  border-color: rgba(45, 212, 191, .25);
  background: rgba(20, 184, 166, .12);
  color: rgba(204, 251, 241, .92);
}

[data-personal-contact-modal-status][data-contact-tone="error"] {
  color: #fca5a5;
}

[data-personal-contact-modal-status][data-contact-tone="warn"] {
  color: #facc15;
}

.settings-account-r5-entry-grid article,
.settings-account-r5-account-grid article,
.settings-account-r5-account-grid label,
.settings-account-r5-jobtitle-entry {
  display: grid;
  gap: 6px;
  min-width: 0;
  border: 1px solid rgba(126, 158, 177, .16);
  border-radius: 8px;
  background: rgba(5, 11, 18, .48);
  padding: 10px;
}

/* SS-08(2026-07-05): 个人 AI 大脑入口卡真实计数摘要(日志/个人记忆条数) */
.settings-account-r5-brain-count {
  color: #7ed3f2;
  font-size: 11.5px;
  font-weight: 600;
}

.settings-account-r5-account-grid label {
  color: rgba(211, 224, 226, .72);
  font-size: 12px;
  font-weight: 700;
}

.settings-account-r5-account-grid label.wide {
  grid-column: span 2;
}

.settings-account-r5-account-grid input,
.settings-account-r5-model-ledger input {
  width: 100%;
  min-width: 0;
  height: 34px;
  border: 1px solid rgba(126, 158, 177, .24);
  border-radius: 7px;
  background: rgba(5, 11, 18, .82);
  color: #edf7f6;
  padding: 7px 9px;
  outline: none;
}

.settings-account-r5-model-row {
  display: grid;
  gap: 10px;
  min-width: 0;
  border: 1px solid rgba(126, 158, 177, .18);
  border-radius: 8px;
  background: rgba(10, 20, 30, .7);
  padding: 12px;
}

.settings-account-r5-model-row-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.settings-account-r5-model-row-head strong,
.settings-account-r5-model-row-head small {
  display: block;
}

.settings-account-r5-model-row-head small {
  margin-top: 3px;
  color: rgba(211, 224, 226, .62);
}

.settings-account-r5-model-ledger {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.settings-account-r5-model-ledger label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: rgba(211, 224, 226, .72);
  font-size: 12px;
  font-weight: 700;
}

.settings-account-r14-api-title {
  align-items: center;
}

.settings-account-r14-open {
  display: inline-grid;
  gap: 2px;
  justify-items: start;
  min-width: 0;
  white-space: normal;
}

.settings-account-r15-interface-open {
  display: inline-grid;
  gap: 2px;
  justify-items: start;
  min-width: 0;
  white-space: normal;
}

.settings-account-r14-open small {
  color: rgba(196, 239, 219, .8);
  font-size: 11px;
  font-weight: 700;
}

.settings-account-r15-interface-open small {
  color: rgba(191, 219, 254, .82);
  font-size: 11px;
  font-weight: 700;
}

.settings-account-r14-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(1, 7, 12, .72);
  overflow: auto;
}

.settings-account-r15-interface-backdrop {
  position: fixed;
  inset: 0;
  z-index: 82;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(1, 7, 12, .74);
  overflow: auto;
}

.settings-account-r14-modal {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 12px;
  width: min(1080px, calc(100vw - 36px));
  max-height: min(820px, calc(100vh - 36px));
  min-width: 0;
  border: 1px solid rgba(125, 211, 252, .28);
  border-radius: 8px;
  background: rgba(7, 14, 22, .96);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .44);
  padding: 14px;
  overflow: hidden;
}

.settings-account-r15-interface-modal {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
  gap: 12px;
  width: min(1160px, calc(100vw - 36px));
  max-height: min(840px, calc(100vh - 36px));
  min-width: 0;
  border: 1px solid rgba(125, 211, 252, .28);
  border-radius: 8px;
  background: rgba(7, 14, 22, .97);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .44);
  padding: 14px;
  overflow: hidden;
}

.settings-account-r14-modal-head,
.settings-account-r14-modal-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.settings-account-r15-interface-head,
.settings-account-r15-interface-actions,
.settings-account-r15-interface-subhead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.settings-account-r15-interface-head h3,
.settings-account-r15-interface-head p {
  margin: 0;
}

.settings-account-r15-interface-head > button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.settings-account-r15-interface-head h3 {
  font-size: 20px;
  letter-spacing: 0;
}

.settings-account-r15-interface-head p,
.settings-account-r15-interface-hint,
.settings-account-r15-interface-empty,
.settings-account-r15-interface-row small {
  color: rgba(211, 224, 226, .64);
  line-height: 1.45;
}

.settings-account-r15-interface-body {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, .82fr);
  gap: 12px;
  min-width: 0;
  overflow: hidden;
}

.settings-account-r15-interface-list,
.settings-account-r15-interface-editor {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  border: 1px solid rgba(126, 158, 177, .16);
  border-radius: 8px;
  background: rgba(10, 20, 30, .64);
  padding: 11px;
  overflow: hidden;
}

.settings-account-r15-interface-list {
  overflow-y: auto;
}

.settings-account-r15-interface-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.3fr) minmax(72px, .45fr) minmax(84px, .55fr) minmax(84px, .55fr) minmax(54px, .36fr) minmax(150px, .8fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  border: 1px solid rgba(126, 158, 177, .16);
  border-radius: 8px;
  background: rgba(5, 11, 18, .5);
  padding: 9px;
  overflow: hidden;
}

.settings-account-r15-interface-row > *,
.settings-account-r15-interface-row strong,
.settings-account-r15-interface-row small,
.settings-account-r15-interface-row span {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.settings-account-r15-interface-row strong,
.settings-account-r15-interface-row small {
  display: block;
}

.settings-account-r15-interface-row > span,
.settings-account-r15-interface-test {
  border: 1px solid rgba(125, 211, 252, .22);
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(10, 23, 34, .68);
  color: rgba(210, 231, 244, .88);
  font-size: 12px;
  font-weight: 700;
}

.settings-account-r15-interface-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.settings-account-r15-interface-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  min-width: 0;
}

.settings-account-r15-interface-form label,
.settings-account-r15-interface-toggle {
  display: grid;
  gap: 5px;
  min-width: 0;
  border: 1px solid rgba(126, 158, 177, .14);
  border-radius: 8px;
  background: rgba(5, 11, 18, .48);
  padding: 9px;
  color: rgba(211, 224, 226, .72);
  font-size: 12px;
  font-weight: 700;
}

.settings-account-r15-interface-form input,
.settings-account-r15-interface-form select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 34px;
  border: 1px solid rgba(126, 158, 177, .24);
  border-radius: 7px;
  background: rgba(5, 11, 18, .88);
  color: #edf7f6;
  padding: 6px 8px;
  outline: none;
}

.settings-account-r15-interface-toggle {
  grid-auto-flow: column;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
}

.settings-account-r15-interface-status {
  margin: 0;
  border: 1px solid rgba(120, 210, 170, .32);
  border-radius: 8px;
  background: rgba(20, 83, 45, .18);
  color: rgba(196, 239, 219, .94);
  padding: 9px 10px;
}

.settings-account-r15-interface-actions {
  align-items: center;
  border-top: 1px solid rgba(126, 158, 177, .14);
  padding-top: 10px;
}

.settings-account-r14-modal-head h3,
.settings-account-r14-modal-head p {
  margin: 0;
}

.settings-account-r14-modal-head h3 {
  font-size: 20px;
  letter-spacing: 0;
}

.settings-account-r14-modal-head p,
.settings-account-r14-route-note small {
  color: rgba(211, 224, 226, .64);
  line-height: 1.45;
}

.settings-account-r14-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.settings-account-r14-tabs button.active {
  border-color: rgba(120, 210, 170, .68);
  background: rgba(20, 83, 45, .34);
  color: #f5fffb;
}

.settings-account-r14-test-result {
  flex-shrink: 0;
  border: 1px solid rgba(125, 211, 252, .24);
  border-radius: 999px;
  padding: 3px 8px;
  color: rgba(210, 231, 244, .88);
  background: rgba(10, 23, 34, .68);
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

/* 03改稿+P1两项(2026-07-03): 工作流默认模型 多选 chips(顺序=优先级) + 空态 */
.settings-account-r14-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 30px;
  align-items: center;
}
.settings-account-r14-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  border: 1px solid rgba(126, 158, 177, .3);
  border-radius: 999px;
  padding: 3px 6px 3px 8px;
  font-size: 12px;
  color: rgba(211, 224, 226, .86);
  background: rgba(10, 23, 34, .6);
}
.settings-account-r14-chip.on {
 /* 选中态 .on 加深: 底色+描边同步加深 */
  border-color: rgba(120, 210, 170, .68);
  background: rgba(20, 83, 45, .42);
  color: #f0fff8;
  box-shadow: 0 0 0 1px rgba(120, 210, 170, .22);
}
.settings-account-r14-chip b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(120, 210, 170, .28);
  color: #d9ffee;
  font-size: 10.5px;
  flex: none;
}
.settings-account-r14-chip i {
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 180px;
}
.settings-account-r14-chip button {
  flex: none;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(126, 158, 177, .3);
  border-radius: 50%;
  background: rgba(5, 11, 18, .6);
  color: rgba(211, 224, 226, .82);
  font-size: 11px;
  cursor: pointer;
  line-height: 1;
}
.settings-account-r14-chip button:hover:not(:disabled) {
  border-color: rgba(125, 211, 252, .6);
  color: #eafaff;
}
.settings-account-r14-chip button:disabled {
  opacity: .35;
  cursor: default;
}
.settings-account-r14-chips-empty {
  font-style: normal;
  color: rgba(211, 224, 226, .5);
  font-size: 12px;
}
.settings-account-r14-route-note {
  display: grid;
  gap: 5px;
  min-width: 0;
  max-width: 100%;
  border: 1px solid rgba(126, 158, 177, .14);
  border-radius: 8px;
  background: rgba(5, 11, 18, .48);
  padding: 9px;
  color: rgba(211, 224, 226, .72);
  font-size: 12px;
  font-weight: 700;
}

.settings-account-r14-modal-actions {
  align-items: center;
  border-top: 1px solid rgba(126, 158, 177, .14);
  padding-top: 10px;
}

.settings-account-r14-error {
  margin: 0;
  border: 1px solid rgba(248, 113, 113, .3);
  border-radius: 8px;
  background: rgba(127, 29, 29, .2);
  color: rgba(254, 226, 226, .94);
  padding: 9px 10px;
}

.settings-account-r5-table-scroll {
  max-width: 100%;
  overflow-x: auto;
}

.settings-account-r5-permission-table input {
  width: 18px;
  height: 18px;
}

.settings-account-r5-card-mount,
.settings-account-r3-construction-mount {
  max-width: 100%;
  overflow-x: hidden;
}

.settings-account-r5-lan-company,
.settings-account-r5-lan-company * {
  min-width: 0;
}

.settings-account-r5-lan-actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.settings-account-r5-lan-actions label {
  display: grid;
  gap: 6px;
  color: rgba(211, 224, 226, .78);
  font-size: 12px;
}

.settings-account-r5-lan-actions input,
.settings-account-r5-lan-actions select {
  width: 100%;
  max-width: 100%;
  border: 1px solid rgba(148, 163, 184, .26);
  border-radius: 8px;
  background: rgba(15, 23, 42, .54);
  color: #edf6f7;
  padding: 9px 10px;
  outline: none;
}

.settings-account-r5-lan-pending {
  display: grid;
  gap: 8px;
}

/* SS-22(2026-07-05): 邀请就地反馈——成败分色 + 内嵌"申请加名额"按钮(替代原生 confirm/alert) */
.settings-account-r5-lan-invite-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 4px 0 2px;
}
.settings-account-r5-lan-invite-status .settings-account-r3-note { margin: 0; }
.settings-account-r5-lan-invite-status[data-lan-invite-status-tone="ok"] .settings-account-r3-note { color: #3ec98b; }
.settings-account-r5-lan-invite-status[data-lan-invite-status-tone="warn"] .settings-account-r3-note { color: #d59a4f; }
.settings-account-r5-lan-invite-status[data-lan-invite-status-tone="error"] .settings-account-r3-note { color: #e07a7a; }
.settings-account-r5-lan-seat-request {
  padding: 6px 14px;
  border-radius: 7px;
  border: 1px solid rgba(190, 130, 60, 0.5);
  background: rgba(190, 130, 60, 0.14);
  color: #e6b877;
  cursor: pointer;
  font-size: 12.5px;
  white-space: nowrap;
}
.settings-account-r5-lan-seat-request:hover { background: rgba(190, 130, 60, 0.24); }
.settings-account-r5-lan-seat-req-state { color: #3ec98b; }

.settings-account-r5-lan-invite {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 8px;
  padding: 10px;
  background: rgba(15, 23, 42, .36);
}

.settings-account-r5-lan-invite span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.settings-account-r5-lan-invite small,
.settings-account-r5-lan-empty {
  color: rgba(211, 224, 226, .64);
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  .settings-account-r15-interface-modal {
    width: min(100%, calc(100vw - 20px));
    max-width: calc(100vw - 20px);
    overflow-x: hidden;
  }

  .settings-account-r15-interface-body,
  .settings-account-r15-interface-list,
  .settings-account-r15-interface-editor,
  .settings-account-r15-interface-row,
  .settings-account-r15-interface-form,
  .settings-account-r15-interface-form label,
  .settings-account-r15-interface-actions {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  .settings-account-r15-interface-body,
  .settings-account-r15-interface-row,
  .settings-account-r15-interface-form,
  .settings-account-r15-interface-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .settings-account-r15-interface-form label {
    overflow: visible;
  }

  .settings-account-r15-interface-row-actions,
  .settings-account-r15-interface-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .settings-account-r15-interface-row-actions > *,
  .settings-account-r15-interface-actions > *,
  .settings-account-r15-interface-form input,
  .settings-account-r15-interface-form select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  body.settings-account-r15-interface-modal-open #r14-operator {
    display: none !important;
  }

  body.settings-account-r15-interface-modal-open {
    overflow: hidden;
  }

  body.settings-account-r15-interface-modal-open .sidebar {
    visibility: hidden;
    pointer-events: none;
  }

  .settings-account-r14-modal {
    width: min(100%, calc(100vw - 20px));
    max-width: calc(100vw - 20px);
    overflow-x: hidden;
  }

  .settings-account-r14-route-note,
  .settings-account-r14-modal-actions {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  .settings-account-r14-modal-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .settings-account-r14-modal-actions > * {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  body.settings-account-r14-workflow-modal-open #r14-operator {
    display: none !important;
  }
}

@media (max-width: 1180px) {
  .settings-account-r5-model-ledger {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .settings-account-r5-lan-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .settings-account-r5-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .settings-account-r5-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-account-r5-model-ledger,
  .settings-account-r5-account-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .settings-account-r5-account-grid label.wide {
    grid-column: auto;
  }

  .settings-account-r5-model-row-head {
    flex-direction: column;
    align-items: stretch;
  }

  .settings-account-r5-lan-invite {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 430px) {
  .settings-account-r5-side {
    grid-template-columns: minmax(0, 1fr);
  }

  .settings-account-r5-company-block,
  .settings-account-r5-personal-block,
  .settings-account-r5-model-row {
    padding: 10px;
  }

  .settings-account-r5-lan-actions {
    grid-template-columns: minmax(0, 1fr);
    padding-bottom: 58px;
  }

  .settings-account-r5-lan-company {
    padding-bottom: 68px;
  }
}

/* SALES-AGENT-COMMISSION-R1 · 渠道伙伴 */
/* UX-ROUND-A(2026-07-05 试用反馈): 原亮色卡(白底/深灰字)落在全站暗色主题里整块发灰,
 看起来像"禁用死区", 点了以为没反应。改成与兄弟区块(节点默认/重置密码)同一暗色系。 */
.settings-partner-r1 { margin-top: 18px; }
.settings-partner-r1-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 12px; }
.settings-partner-r1-tabs button {
  min-height: 32px; padding: 6px 12px; border-radius: 999px;
  background: rgba(15, 23, 42, 0.45); color: rgba(211, 224, 226, 0.82);
  border: 1px solid rgba(126, 158, 177, 0.3); font-size: 12px; font-weight: 700;
  cursor: pointer;
}
.settings-partner-r1-tabs button.active {
  background: rgba(13, 148, 136, 0.28); color: #9ef3e4; border-color: rgba(94, 234, 212, 0.55);
}
.settings-partner-r1-body { font-size: 13px; min-width: 0; }
.settings-partner-r1-panel {
  display: grid; gap: 10px; padding: 12px; border-radius: 12px;
  background: rgba(15, 23, 42, 0.42); border: 1px solid rgba(126, 158, 177, 0.22);
  box-shadow: 0 10px 28px rgba(2, 8, 20, 0.28); min-width: 0;
}
.settings-partner-r1-panel-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; min-width: 0;
}
.settings-partner-r1-panel-head strong { display: block; color: #edf6f7; font-size: 14px; }
.settings-partner-r1-panel-head small { display: block; margin-top: 4px; color: rgba(211, 224, 226, 0.6); line-height: 1.55; }
.settings-partner-r1-panel-head span {
  flex: 0 0 auto; padding: 4px 8px; border-radius: 999px;
  color: #9ef3e4; background: rgba(13, 148, 136, 0.2); border: 1px solid rgba(94, 234, 212, 0.35);
  font-size: 11px; font-weight: 700;
}
.settings-partner-r1-table td:last-child { white-space: nowrap; }
.settings-partner-r1-table td { color: rgba(211, 224, 226, 0.78); }
.settings-partner-r1-action {
  min-height: 28px; padding: 4px 10px; border-radius: 8px;
  background: rgba(13, 148, 136, 0.3); color: #d9fef6;
  border: 1px solid rgba(94, 234, 212, 0.42); font-size: 12px; font-weight: 700; cursor: pointer;
}
.settings-partner-r1-action:hover { background: rgba(13, 148, 136, 0.45); }
.settings-partner-r1-empty {
  margin: 0; padding: 8px 10px; border-radius: 10px;
  color: rgba(211, 224, 226, 0.6); background: rgba(126, 158, 177, 0.1); line-height: 1.55;
}

@media (max-width: 900px) {
  .settings-partner-r1-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-partner-r1-tabs button { width: 100%; }
  .settings-partner-r1-panel-head { flex-direction: column; }
}

@media (max-width: 430px) {
  .settings-partner-r1-tabs { grid-template-columns: 1fr; }
  .settings-partner-r1-panel { padding: 10px; }
}

/* ===== API表格化+平台节点默认(2026-07-03, 契约) ===== */
/* 个人 API 设置: 卡片墙 → 一张表(三组分组小标题行); Key/地址只显脱敏状态 */
.settings-account-r16-api-table-wrap {
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 10px;
  background: rgba(15, 23, 42, .36);
  overflow-x: auto;
}

.settings-account-r16-api-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
  font-size: 13px;
}

.settings-account-r16-api-table th,
.settings-account-r16-api-table td {
  padding: 9px 10px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid rgba(148, 163, 184, .14);
}

/* 修复: 全局 .settings-account-r3-table td:first-child 的 display:grid 会让 colspan 分组行失效 → 本表恢复 table-cell */
.settings-account-r16-api-table td:first-child {
  display: table-cell;
  min-width: 110px;
}

.settings-account-r16-api-table td:first-child strong {
  display: block;
}

.settings-account-r16-api-table th {
  color: rgba(211, 224, 226, .72);
  font-weight: 600;
  font-size: 12px;
  background: rgba(15, 23, 42, .5);
}

.settings-account-r16-api-group-row td {
  background: rgba(30, 41, 59, .6);
  border-bottom: 1px solid rgba(148, 163, 184, .22);
  padding-top: 10px;
  padding-bottom: 10px;
}

.settings-account-r16-api-category-row td {
  /* 371-r2(371A 退修): 371-O53 的 var 嵌 linear-gradient 色标位致 computed background-image:none 透明(只剩字重可辨)——改实底简写: --mf-theme-card-strong(09 渐变列表)整个进 background, computed 出主题分层渐变+实底成带(白天 42:1988 浅鼠尾草覆盖不回归) */
  background: var(--mf-theme-card-strong, rgba(6,20,32,.97));
}

.settings-account-r16-api-group-row strong {
  color: #e8f4f5;
  font-size: 12.5px;
}

.settings-account-r16-api-group-row small {
  margin-left: 10px;
  color: rgba(211, 224, 226, .6);
  font-size: 11.5px;
}

.settings-account-r16-api-empty-row td {
  color: rgba(211, 224, 226, .55);
  font-size: 12px;
}

.settings-account-r16-model-name {
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 12px;
  color: rgba(211, 224, 226, .85);
  word-break: break-all;
  max-width: 180px;
}

.settings-account-r16-key,
.settings-account-r16-url {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 12px;
  padding: 2px 9px;
  font-size: 11.5px;
  border: 1px solid rgba(148, 163, 184, .22);
  color: rgba(211, 224, 226, .78);
  background: rgba(15, 23, 42, .44);
  line-height: 1.4;
  max-width: 200px;
  white-space: normal; /* 长文案(待填写·点编辑填你的 Key)允许换行, 表格不横向撑爆 */
}

.settings-account-r16-key.hosted,
.settings-account-r16-url.hosted {
  border-color: rgba(45, 212, 191, .32);
  color: rgba(153, 246, 228, .9);
  background: rgba(19, 78, 74, .28);
}

.settings-account-r16-key.pending,
.settings-account-r16-url.pending {
  border-color: rgba(251, 191, 36, .3);
  color: rgba(253, 230, 138, .88);
  background: rgba(120, 53, 15, .22);
}

.settings-account-r16-key.masked,
.settings-account-r16-url.saved {
  border-color: rgba(96, 165, 250, .3);
  color: rgba(191, 219, 254, .9);
  background: rgba(30, 58, 138, .26);
  font-family: "JetBrains Mono", Consolas, monospace;
}

.settings-account-r16-api-row.is-disabled td {
  opacity: .55;
}

.settings-account-r16-api-row.is-just-saved td {
  background: rgba(22, 163, 74, .16);
  box-shadow: inset 0 1px rgba(34, 197, 94, .55), inset 0 -1px rgba(34, 197, 94, .55);
  transition: background-color .2s ease, box-shadow .2s ease;
}

.settings-account-r16-api-actions {
  white-space: nowrap;
}

.settings-account-r16-api-actions button {
  padding: 5px 12px;
  font-size: 12px;
}

.settings-account-r16-api-actions .settings-account-r16-delete {
  margin-left: 6px;
  border-color: rgba(248, 113, 113, .34);
  color: rgba(254, 202, 202, .9);
}

.settings-account-r16-api-add {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.settings-account-r16-api-add small {
  color: rgba(211, 224, 226, .55);
  font-size: 12px;
}

/* 行[编辑]弹窗: 复用 r15 接口设置壳, 收窄为单表单 */
.settings-account-r16-row-edit-modal {
  max-width: 560px;
  width: min(560px, calc(100vw - 20px));
  display: grid;
  gap: 12px;
}

.settings-account-r16-row-edit-modal .settings-account-r15-interface-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* API表格化R5·去重绑真(2026-07-04): 中转系列折叠行提示 + 编辑弹窗脱敏回读/系列同步说明 */
.settings-account-r16-series {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  color: rgba(148, 163, 184, .92);
  word-break: break-all;
}

/* R1-C Task2(2026-07-10): 行内家族/上游原名/验证状态小字; 373-O48 起验证状态小字随「状态」列展示(家族/上游仍在模型名称列) */
.settings-account-r16-family,
.settings-account-r16-upstream,
.settings-account-r16-verification {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  color: rgba(148, 163, 184, .92);
  word-break: break-all;
}

.settings-account-r16-verification.is-unverified {
  color: rgba(253, 230, 138, .88);
}

.settings-account-r16-verification.is-contract_pass {
  color: rgba(191, 219, 254, .9);
}

.settings-account-r16-verification.is-live_pass {
  color: rgba(153, 246, 228, .9);
}

.settings-account-r16-verification.is-blocked {
  color: rgba(254, 202, 202, .95);
}

/* R1-C Task2: 编辑弹窗家族建议 + 上游原名/适配器只读说明(contract_pending 不虚标) */
.settings-account-r16-family-hint {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  color: rgba(148, 163, 184, .92);
}

.settings-account-r16-upstream-note,
.settings-account-r16-adapter-note {
  margin: 0;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(15, 23, 42, .44);
  border: 1px solid rgba(148, 163, 184, .22);
  color: rgba(211, 224, 226, .78);
  font-size: 12px;
  word-break: break-all;
}

.settings-account-r16-adapter-note small {
  display: block;
  margin-top: 3px;
  color: rgba(148, 163, 184, .8);
  font-size: 11px;
}

.settings-account-r16-row-edit-saved {
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(13, 148, 136, .14);
  border: 1px solid rgba(94, 234, 212, .22);
  color: #bff5ec;
  font-size: 12px;
}

.settings-account-r16-row-edit-series {
  margin: 0;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(59, 130, 246, .12);
  border: 1px solid rgba(147, 197, 253, .22);
  color: #cfe4ff;
  font-size: 12px;
}

@media (max-width: 900px) {
  /* 移动端: 表格设最小宽度走外层横向滚动(.settings-account-r5-table-scroll), 不许把列压成竖排字 */
  .settings-account-r16-api-table {
    font-size: 12px;
    min-width: 560px;
  }

  .settings-account-r16-model-name {
    word-break: normal;
    max-width: 160px;
  }

  .settings-account-r16-api-table th,
  .settings-account-r16-api-table td {
    padding: 8px 8px;
  }

  .settings-account-r16-row-edit-modal .settings-account-r15-interface-form {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* API R8(2026-07-05) T1: 启用勾选门禁——无 Key 灰态小字(填入接口 Key 后才能启用) */
.settings-account-r15-interface-toggle[data-api-interface-enable-gate="locked"] {
  opacity: .78;
}
.settings-account-r16-enable-gate-hint {
  margin-left: 8px;
  font-size: 12px;
  color: rgba(251, 191, 36, .92);
}
/* P0-1.3(2026-07-08): 地址栏脱敏回显本人已存地址(非完整外部地址) */
.settings-account-r16-base-url-saved {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: rgba(148, 197, 209, .86);
  overflow-wrap: anywhere;
}

/* 批C·SS-28 费率核价 UI(暗色玻璃系统设置主题, 占位价标红) */
.settings-model-rates .settings-model-rate-token-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 8px 0 12px;
}
.settings-model-rates .settings-model-rate-token-row label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: rgba(211, 224, 226, .82);
  flex: 1 1 260px;
}
.settings-model-rates .settings-model-rate-token-row input {
  background: rgba(15, 23, 42, .55);
  border: 1px solid rgba(148, 163, 184, .34);
  border-radius: 8px;
  padding: 7px 10px;
  color: #e2e8f0;
}
.settings-model-rates .settings-model-rate-token-row button {
  border: 1px solid rgba(96, 165, 250, .5);
  background: rgba(37, 99, 235, .28);
  color: #dbeafe;
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
}
.settings-model-rate-markup {
  font-size: 12px;
  color: rgba(148, 163, 184, .82);
}
.settings-model-rate-table td input[type="number"],
.settings-model-rate-table td input[type="text"] {
  width: 96px;
  background: rgba(15, 23, 42, .5);
  border: 1px solid rgba(148, 163, 184, .3);
  border-radius: 6px;
  padding: 5px 8px;
  color: #e2e8f0;
}
.settings-model-rate-table td input[type="text"] { width: 150px; }
.settings-model-rate-verify { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; }
.settings-model-rate-table tr.settings-model-rate-unverified {
  background: rgba(220, 38, 38, .14);
}
.settings-model-rate-table tr.settings-model-rate-unverified td { border-color: rgba(248, 113, 113, .35); }
.settings-model-rate-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  white-space: nowrap;
}
.settings-model-rate-badge.ok { background: rgba(34, 197, 94, .2); color: #bbf7d0; }
.settings-model-rate-badge.warn { background: rgba(239, 68, 68, .24); color: #fecaca; }
/* 费率核价拆区(2026-07-07): 区二境外/个人公司 Key 参考——中性蓝灰,不用红底阻塞样式 */
.settings-model-rate-badge.ref { background: rgba(100, 116, 139, .28); color: #cbd5e1; }
.settings-model-rate-zone { margin-top: 14px; }
.settings-model-rate-zone-reference { opacity: .96; }
.settings-model-rate-table tr.settings-model-rate-reference { background: rgba(51, 65, 85, .18); }
.settings-model-rate-zone-disabled > summary { cursor: pointer; color: rgba(148, 163, 184, .9); font-size: 12px; padding: 6px 0; }
.settings-model-rate-table td button {
  border: 1px solid rgba(148, 163, 184, .4);
  background: rgba(30, 41, 59, .6);
  color: #e2e8f0;
  border-radius: 7px;
  padding: 6px 12px;
  cursor: pointer;
}
.settings-model-rate-warn-summary { color: rgba(252, 165, 165, .95) !important; }
.settings-model-rate-status { color: rgba(148, 197, 255, .95) !important; }

/* 批2·账号习惯记录: 总开关 + 隐私记录表 */
.settings-habit-track .settings-habit-track-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #e2e8f0;
  cursor: pointer;
}
.settings-habit-track .settings-habit-track-toggle input {
  width: 18px;
  height: 18px;
}
.settings-habit-track .settings-account-r3-section-title.compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}
.settings-habit-track [data-habit-clear-all],
.settings-habit-track-table td button {
  border: 1px solid rgba(248, 113, 113, .45);
  background: rgba(127, 29, 29, .3);
  color: #fecaca;
  border-radius: 7px;
  padding: 5px 11px;
  cursor: pointer;
  font-size: 12px;
}
.settings-habit-track-status { color: rgba(148, 197, 255, .95) !important; }
.settings-habit-track-table td { font-size: 12px; }

/* 一模型多能力(2026-07-05 spec): 受控分类多选 checkbox 组 + 表格分类列多标签.
   视觉对齐现有下拉(teal 描边/深底), 选中态 .on 加深高亮——填一次勾多个能力. */
.mc-capability-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.mc-cap-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid rgba(126, 158, 177, .24);
  border-radius: 8px;
  background: rgba(5, 11, 18, .72);
  color: rgba(211, 224, 226, .88);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.mc-cap-option:hover {
  border-color: rgba(126, 158, 177, .44);
}
.mc-cap-option.on {
  background: rgba(45, 122, 122, .28);
  border-color: rgba(120, 210, 190, .58);
  color: #edf7f6;
}
.mc-cap-option input {
  width: auto;
  height: auto;
  margin: 0;
  accent-color: rgba(120, 210, 190, .9);
}
.mc-cap-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.mc-cap-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid rgba(126, 158, 177, .2);
  background: rgba(126, 158, 177, .12);
  color: rgba(224, 237, 235, .92);
  font-size: 12px;
  white-space: nowrap;
}

/* 设置A境外折叠(2026-07-07): 国际引导组(境外模型)可折叠分组头 —— 平铺一堆 → 收拢成一个可展开分组 */

/* ===== COMPANY-PROFILE-4STATE-20260724 公司资料页定稿四状态(定稿图工单) =====
   VISUAL-FIX-20260725(返修单7处): ①Logo 90x90深绿圆角+铅笔角标 ②简称28px大字+胶囊分离 ③副标题在标题下左侧(不用section-title金色胶囊span)
   ④编辑资料卡片右上角 ⑤订阅信息四栏+竖分隔线+管理订阅最右 ⑥解散/退出=窄按钮左+说明右(创建=深绿整宽) ⑦左下身份区(01分片渲染)。
   色值沿用设计体系:主绿 #1c6b57 / 红 #b3402f / 金 #e7b45f;文字色不硬编深色,跟随主题(day 由 41703 区规则上色),暗色对比度兼容。 */
.cp-card-head { display: grid; gap: 3px; }
.cp-card-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cp-readonly-badge { flex: none; border-radius: 6px; padding: 3px 9px; background: color-mix(in srgb, var(--muted, #5c6862) 12%, transparent); color: var(--muted, #5c6862); font-size: 12px; font-weight: 600; }
.cp-card-title { font-size: 17px; font-weight: 700; }
.cp-card-sub { font-size: 12.5px; color: var(--muted, #5c6862); }
.cp-profile-head { display: flex; align-items: center; gap: 16px; }
.cp-logo { width: 90px; height: 90px; border-radius: 16px; background: #1c6b57; display: grid; place-items: center; flex: none; overflow: hidden; }
.cp-logo img { width: 100%; height: 100%; object-fit: cover; }
.cp-logo svg { width: 48px; height: 48px; }
.cp-logo-sm { width: 56px; height: 56px; border-radius: 12px; }
.cp-logo-sm svg { width: 30px; height: 30px; }
.cp-logo-lg { width: 76px; height: 76px; }
.cp-logo-wrap { position: relative; flex: none; }
.cp-logo-edit { position: absolute; right: -6px; bottom: -6px; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 1px solid var(--line, #e5e1d9); display: grid; place-items: center; cursor: pointer; padding: 0; box-shadow: 0 1px 4px rgba(0,0,0,.18); }
.cp-profile-names { display: grid; gap: 4px; min-width: 0; }
.cp-profile-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cp-profile-title strong { font-size: 28px; line-height: 1.2; }
.cp-profile-names small { color: var(--muted, #5c6862); font-size: 13px; }
.cp-role-pill { display: inline-flex; justify-self: start; width: fit-content; background: #f6ead2; color: #8a6d1f; border-radius: 999px; padding: 3px 12px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.cp-edit-btn { margin-left: auto; align-self: flex-start; border: 1px solid var(--line, #e5e1d9); background: #fff; border-radius: 9px; padding: 7px 14px; font-size: 13px; cursor: pointer; color: #3d4944; font-family: inherit; }
.cp-empty { display: grid; place-items: center; gap: 10px; padding: 44px 0; color: #8a938e; }
.cp-empty p { margin: 0; font-size: 13.5px; }
/* 订阅信息:四栏对齐+竖分隔线,管理订阅按钮最右(定稿⑤) */
.cp-sub-grid { display: flex; align-items: center; flex-wrap: wrap; font-size: 13.5px; color: var(--muted, #5c6862); }
.cp-sub-grid > span { padding: 2px 26px; border-left: 1px solid var(--line, #e5e1d9); white-space: nowrap; }
.cp-sub-grid > span:first-of-type { padding-left: 0; border-left: none; }
.cp-sub-grid b { font-weight: 600; }
html[data-meifan-theme="day"] body:not(.home-mode) .cp-sub-grid b { color: #1f2b26; }
.cp-sub-grid .cp-edit-btn { margin-left: auto; }
.cp-invite-row { display: flex; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.cp-invite-row input { flex: 1; min-width: 180px; padding: 8px 12px; border: 1px solid var(--line, #e5e1d9); border-radius: 9px; font-family: inherit; }
.cp-invite-row select { padding: 8px 12px; border: 1px solid var(--line, #e5e1d9); border-radius: 9px; font-family: inherit; background: #fff; }
.cp-btn-primary { border: none; background: #1c6b57; color: #fff; border-radius: 9px; padding: 8px 18px; font-weight: 700; cursor: pointer; font-family: inherit; }
.cp-btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.cp-btn-ghost { border: 1px solid var(--line, #e5e1d9); background: #fff; color: #3d4944; border-radius: 9px; padding: 8px 16px; font-weight: 600; cursor: pointer; font-family: inherit; }
.cp-btn-block { width: 100%; padding: 12px; font-size: 14px; }
.cp-recycle .settings-account-r3-section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cp-recycle [data-cp-recycle-content] { display: grid; gap: 10px; }
.cp-recycle [data-cp-recycle-content] h4 { margin: 10px 0 0; font-size: 14px; }
.cp-recycle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line, #e5e1d9); }
.cp-recycle-row > div { min-width: 0; display: grid; gap: 3px; overflow-wrap: anywhere; }
.cp-recycle-row small { color: var(--muted, #5c6862); }
.cp-recycle-row button { flex: none; }
@media (max-width: 560px) { .cp-recycle-row { align-items: flex-start; flex-direction: column; } }
/* 公司操作:解散/退出=窄按钮左+说明右(定稿⑥);cp-btn-danger=红描边白底红字窄按钮 */
.cp-actions-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.cp-actions-row .cp-actions-note { flex: 1; min-width: 220px; margin: 0; }
.cp-btn-danger { border: 1px solid color-mix(in srgb, #b3402f 55%, transparent); background: #fff; color: #b3402f; border-radius: 9px; padding: 8px 18px; font-size: 13.5px; font-weight: 700; cursor: pointer; font-family: inherit; white-space: nowrap; }
.cp-btn-danger-block { width: 100%; padding: 12px; font-size: 14px; border: 1px solid color-mix(in srgb, #b3402f 45%, transparent); background: color-mix(in srgb, #b3402f 6%, #fff); color: #b3402f; border-radius: 10px; font-weight: 700; cursor: pointer; font-family: inherit; }
.cp-btn-ghost-block { width: 100%; padding: 12px; font-size: 14px; border: 1px solid var(--line, #e5e1d9); background: #fff; color: #3d4944; border-radius: 10px; font-weight: 600; cursor: pointer; font-family: inherit; }
.cp-actions-note { margin: 10px 0 0; font-size: 12px; color: var(--muted, #9aa39e); display: grid; gap: 2px; }
.cp-actions-sub { color: var(--muted, #b6bdb8); font-size: 11.5px; }
/* 主体移交入口: 解散公司主按钮上方的次级文字操作 —— 文字链形态, 视觉权重明显低于主按钮(❌ 不成为并列主按钮)。
   ★宽选择器 .settings-account-r3 button 与 day 主题 .settings-account-r5-company-block:not(...) button
   白底 !important(特异度 0,4,3)会把它打回按钮胶囊形态(实测级联枚举定位);
   故选择器带 [data-cp-owner-transfer-open] 提到 (0,5,2)+!important, 双主题统一压住。 */
.cp-owner-transfer-entry { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 0 0 10px; }
.settings-account-r3 .cp-owner-transfer-link[data-cp-owner-transfer-open],
html[data-meifan-theme] body:not(.home-mode) .settings-account-r3 .cp-owner-transfer-link[data-cp-owner-transfer-open] {
  min-height: 0; border: none !important; background: none !important; padding: 0 2px;
  color: #1c6b57 !important; font-size: 12.5px; font-weight: 600;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-family: inherit;
}
.settings-account-r3 .cp-owner-transfer-link[data-cp-owner-transfer-open]:hover,
html[data-meifan-theme] body:not(.home-mode) .settings-account-r3 .cp-owner-transfer-link[data-cp-owner-transfer-open]:hover {
  color: #14523f !important; background: none !important; border: none !important;
}
.cp-owner-transfer-target:has(input:checked) { border-color: #1c6b57; background: color-mix(in srgb, #1c6b57 5%, #fff); }
.cp-member-avatar { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #e8b64c; color: #fff; font-size: 12px; margin-right: 8px; vertical-align: middle; }
.cp-status-ok { color: #1c6b57; }
.cp-status-ok::before { content: "\25CF"; font-size: 9px; margin-right: 4px; }
.cp-status-warn { color: #b3402f; }
.cp-status-warn::before { content: "\25CF"; font-size: 9px; margin-right: 4px; }
.cp-invite-item { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line, #e5e1d9); flex-wrap: wrap; }
.cp-invite-item:first-of-type { border-top: none; }
.cp-invite-names { display: grid; gap: 2px; min-width: 0; }
.cp-invite-names strong { font-size: 15px; }
.cp-invite-names small { color: var(--muted, #5c6862); font-size: 12px; }
.cp-invite-meta { display: grid; gap: 4px; font-size: 12.5px; color: var(--muted, #5c6862); margin-left: auto; }
.cp-invite-meta b { font-weight: 600; }
html[data-meifan-theme="day"] body:not(.home-mode) .cp-invite-meta b { color: #22312b; }
.cp-invite-btns { display: grid; gap: 8px; }
.cp-logo-picker { display: flex; align-items: center; gap: 12px; }

/* VISUAL-FIX-20260725: cam 弹窗(创建/编辑公司+解散/注销/退出)输入控件固定浅色卡深字——暗色主题下全局 input 暗底会盖进白底弹窗。 */
[data-company-action-modal] input, [data-company-action-modal] select { background: #fff; color: #22312b; }

/* VISUAL-FIX-20260725: cp 按钮颜色压过设置页通用按钮规则——
   style 41727 day 规则(.settings-account-r5-company-block:not(...) button)带 !important 且特异性 (0,4,3),
   37274/40688 同型规则亦盖 .cp-btn-*;只有 !important+更高特异 (0,5,2) 能压回,解散红/创建绿/幽灵白底必须照定稿生效。 */
html[data-meifan-theme] body:not(.home-mode) .settings-account-r3 .settings-account-r5-company-block .cp-btn-primary { border: none !important; background: #1c6b57 !important; color: #fff !important; }
html[data-meifan-theme] body:not(.home-mode) .settings-account-r3 .settings-account-r5-company-block .cp-btn-primary:hover { border: none !important; background: #175a49 !important; color: #fff !important; }
html[data-meifan-theme] body:not(.home-mode) .settings-account-r3 .settings-account-r5-company-block .cp-btn-danger { border: 1px solid color-mix(in srgb, #b3402f 55%, transparent) !important; background: #fff !important; color: #b3402f !important; }
html[data-meifan-theme] body:not(.home-mode) .settings-account-r3 .settings-account-r5-company-block .cp-btn-danger-block { border: 1px solid color-mix(in srgb, #b3402f 45%, transparent) !important; background: color-mix(in srgb, #b3402f 6%, #fff) !important; color: #b3402f !important; }
html[data-meifan-theme] body:not(.home-mode) .settings-account-r3 .settings-account-r5-company-block .cp-btn-ghost-block,
html[data-meifan-theme] body:not(.home-mode) .settings-account-r3 .settings-account-r5-company-block .cp-btn-ghost,
html[data-meifan-theme] body:not(.home-mode) .settings-account-r3 .settings-account-r5-company-block .cp-edit-btn { border: 1px solid #d8ddd6 !important; background: #fff !important; color: #3d4944 !important; }

/* VISUAL-FIX-20260725 补修§3: 成员行「主体」标记收窄为小标签——
   成员表 td:first-child 是 grid(css/41 L192),胶囊默认 stretch 拉成整格黄色长条;justify-self:start 收回定稿尺寸感。 */
[data-cp-member-table] td .cp-role-pill, [data-cp-member-table] td .cp-principal-tag { justify-self: start; }

/* L3-FLAT-PERMISSIONS-20260727: 定稿图02/03——左职位列表 + 右侧十项扁平权限 */
.cp-pos-workspace {
  display: grid;
  grid-template-columns: minmax(170px, 0.34fr) minmax(0, 1fr);
  min-height: 360px;
  margin-top: 14px;
  border: 1px solid var(--line, #e5e1d9);
  border-radius: 10px;
  overflow: hidden;
  background: color-mix(in srgb, var(--panel, #fff) 96%, #edf4f0);
}
.cp-pos-sidebar { padding: 16px 12px; border-right: 1px solid var(--line, #e5e1d9); background: color-mix(in srgb, var(--panel, #fff) 92%, #edf4f0); }
.cp-pos-list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 4px 12px; }
.cp-pos-list-head strong { font-size: 13px; color: var(--ink, #22312b); }
.cp-pos-list-head span { font-size: 11px; color: var(--muted, #7e8983); }
.cp-pos-list { display: grid; gap: 6px; }
.cp-pos-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink, #26352f);
  text-align: left;
  cursor: pointer;
}
.cp-pos-list-item:hover { border-color: color-mix(in srgb, #1c6b57 24%, transparent); background: color-mix(in srgb, #1c6b57 6%, transparent); }
.cp-pos-list-item.is-active { border-color: color-mix(in srgb, #1c6b57 38%, transparent); background: color-mix(in srgb, #1c6b57 10%, transparent); }
.cp-pos-list-item > span { display: grid; gap: 2px; min-width: 0; }
.cp-pos-list-item strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.cp-pos-list-item small { color: var(--muted, #7e8983); font-size: 10.5px; }
.cp-pos-list-item em { flex: 0 0 auto; color: #1c6b57; font-size: 11px; font-style: normal; }
.cp-pos-create { display: grid; gap: 6px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line, #e5e1d9); }
.cp-pos-create input,
.cp-pos-rename input { min-width: 0; padding: 8px 10px; border: 1px solid var(--line, #d8ddd6); border-radius: 7px; background: #fff; color: #22312b; font-family: inherit; }
.cp-pos-detail { min-width: 0; padding: 20px 22px; }
.cp-pos-editor { min-width: 0; }
.cp-pos-editor-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.cp-pos-editor-head > div { display: grid; gap: 4px; }
.cp-pos-editor-head strong { color: var(--ink, #22312b); font-size: 18px; }
.cp-pos-editor-head span { color: var(--muted, #7e8983); font-size: 11.5px; }
.cp-pos-rename { display: grid; gap: 5px; max-width: 280px; margin: 0 0 16px; color: var(--muted, #66736d); font-size: 11.5px; }
.cp-pos-permission-columns { display: grid; grid-template-columns: minmax(180px, 0.72fr) minmax(280px, 1.28fr); gap: 22px; }
.cp-pos-permission-columns > section { min-width: 0; }
.cp-pos-permission-columns > section > strong { display: block; color: var(--ink, #22312b); font-size: 13px; }
.cp-pos-permission-columns > section > small { display: block; margin-top: 3px; color: var(--muted, #7e8983); font-size: 10.5px; }
.cp-pos-grid { display: grid; gap: 8px; margin-top: 11px; }
.cp-pos-grid-actions { grid-template-columns: repeat(4, minmax(105px, 1fr)); }
.cp-pos-grid-settings { grid-template-columns: 1fr; }
.cp-pos-cell {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid var(--line, #dfe5e0);
  border-radius: 7px;
  background: color-mix(in srgb, var(--panel, #fff) 97%, #edf4f0);
  color: var(--ink, #304039);
  font-size: 12px;
}
.cp-pos-cell input { width: 15px; height: 15px; margin: 0; accent-color: #1c6b57; }
.cp-pos-default-note { margin: 18px 0 0; color: var(--muted, #78847e); font-size: 11px; }
.cp-pos-editor-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line, #e5e1d9); }
.cp-pos-editor-actions > span { margin-right: auto; color: var(--muted, #7e8983); font-size: 10.5px; }
.cp-pos-empty { display: grid; place-content: center; min-height: 260px; gap: 5px; color: var(--muted, #7e8983); text-align: center; }
.cp-pos-notice { margin-top: 10px; }
.cp-pos-builtin { color: var(--muted, #8a938e); font-size: 11.5px; margin-left: 6px; }
.cp-pos-no-authority {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 390px;
  padding: 34px;
  text-align: center;
}
.cp-pos-no-authority-icon {
  width: 34px;
  height: 34px;
  margin-bottom: 13px;
  background: color-mix(in srgb, var(--muted, #758079) 72%, transparent);
  -webkit-mask: url("assets/ui/icons/lucide-lock-keyhole.svg") center / contain no-repeat;
  mask: url("assets/ui/icons/lucide-lock-keyhole.svg") center / contain no-repeat;
}
.cp-pos-no-authority > strong { color: var(--ink, #22312b); font-size: 16px; }
.cp-pos-no-authority > p { max-width: 430px; margin: 8px 0 0; color: var(--muted, #7e8983); font-size: 12px; line-height: 1.7; }
.cp-pos-no-authority > p + p { margin-top: 1px; }
.cp-pos-no-authority > button { margin-top: 18px; }
[data-cp-member-position] { padding: 4px 8px; border: 1px solid var(--line, #e5e1d9); border-radius: 7px; font-family: inherit; background: #fff; margin-right: 6px; }

/* 42 号白天主题对公司卡片 button 有 !important 通配规则；用更高特异性压回定稿的职位选中态。 */
html[data-meifan-theme="day"] body:not(.home-mode) .settings-account-r3 .settings-account-r5-company-block .cp-pos-list-item {
  border: 1px solid transparent !important;
  background: transparent !important;
  border-radius: 8px !important;
  color: #26352f !important;
}
html[data-meifan-theme="day"] body:not(.home-mode) .settings-account-r3 .settings-account-r5-company-block .cp-pos-list-item:hover {
  border-color: color-mix(in srgb, #1c6b57 24%, transparent) !important;
  background: color-mix(in srgb, #1c6b57 6%, transparent) !important;
}
html[data-meifan-theme="day"] body:not(.home-mode) .settings-account-r3 .settings-account-r5-company-block .cp-pos-list-item.is-active {
  border-color: color-mix(in srgb, #1c6b57 38%, transparent) !important;
  background: color-mix(in srgb, #1c6b57 10%, transparent) !important;
}
html[data-meifan-theme="day"] body:not(.home-mode) .settings-account-r3 .settings-account-r5-company-block .cp-pos-list-item.is-active em {
  color: #1c6b57 !important;
}

@media (max-width: 980px) {
  .cp-pos-grid-actions { grid-template-columns: repeat(2, minmax(112px, 1fr)); }
}
@media (max-width: 760px) {
  .cp-pos-workspace { grid-template-columns: 1fr; }
  .cp-pos-sidebar { border-right: 0; border-bottom: 1px solid var(--line, #e5e1d9); }
  .cp-pos-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cp-pos-permission-columns { grid-template-columns: 1fr; }
  .cp-pos-detail { padding: 18px 14px; }
  .cp-pos-editor-actions { align-items: stretch; flex-wrap: wrap; }
  .cp-pos-editor-actions > span { flex-basis: 100%; }
}

/* P0-3(试用批20260726): 公司ID/用户ID 展示行(只读+一键复制) */
.cp-id-line { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--muted, #5c6862); margin: 2px 0 0; }
.cp-id-line code { font-size: 11.5px; background: color-mix(in srgb, currentColor 8%, transparent); padding: 1px 6px; border-radius: 5px; }
.cp-id-copy { border: 1px solid var(--line, #e5e1d9); background: #fff; color: #3d4944; border-radius: 6px; padding: 1px 8px; font-size: 11px; cursor: pointer; font-family: inherit; }
/* 窄屏ID行可换行不横向溢出;复制按钮特异性高于通用设置按钮,窄屏达44px触达,桌面基线不动 */
@media (max-width: 430px) {
  .cp-id-line code { overflow-wrap: anywhere; }
  .settings-account-r3 .cp-id-line .cp-id-copy { min-height: 44px; min-width: 44px; padding: 8px 14px; font-size: 12px; }
}

/* TASK-118 A-4/A-7 · 设备会话 + 注销合同 */
.settings-account-r19-sessions-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0;
}
.settings-account-r19-sessions-head p { margin: 0; color: var(--muted, #91a099); font-size: 13px; }
.settings-account-r19-session-list { display: grid; gap: 10px; }
.settings-account-r19-session {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 14px;
  border: 1px solid var(--line, rgba(255,255,255,.12));
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface, #17211e) 88%, transparent);
}
.settings-account-r19-session.is-current {
  border-color: color-mix(in srgb, #1c8b6e 48%, var(--line, transparent));
  background: color-mix(in srgb, #1c8b6e 9%, var(--surface, #17211e));
}
.settings-account-r19-session-main { min-width: 0; }
.settings-account-r19-session-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.settings-account-r19-session-title strong { overflow-wrap: anywhere; }
.settings-account-r19-session-main > p { margin: 5px 0 8px; color: var(--muted, #91a099); font-size: 12px; }
.settings-account-r19-session dl {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0;
  font-size: 11.5px;
}
.settings-account-r19-session dl > div { display: flex; gap: 5px; }
.settings-account-r19-session dt { color: var(--muted, #91a099); }
.settings-account-r19-session dd { margin: 0; }
.settings-account-r19-current-badge {
  border-radius: 999px;
  padding: 2px 7px;
  color: #eafff8;
  background: #1c6b57;
  font-size: 10.5px;
  font-weight: 700;
}
.settings-account-r19-session-protected { flex: 0 0 auto; color: var(--muted, #91a099); font-size: 11.5px; }
.settings-account-r19-session-revoke {
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, #b3402f 54%, transparent);
  border-radius: 9px;
  padding: 7px 11px;
  color: #d86a57;
  background: transparent;
  font: 700 12px/1.2 inherit;
  cursor: pointer;
}
.settings-account-r19-session-revoke:disabled { cursor: wait; opacity: .58; }
.settings-account-r19-session-empty { margin: 0; color: var(--muted, #91a099); font-size: 12.5px; }
[data-account-sessions-status][data-session-tone="error"] { color: #d86a57; }
[data-account-sessions-status][data-session-tone="ok"] { color: #55aa8e; }

.settings-account-r19-action-dialog {
  background: #fff !important;
  color: #22312b !important;
}
.settings-account-r19-action-dialog :is(h1,h2,h3,h4,strong,label,dd) { color: #22312b !important; }
.settings-account-r19-action-dialog :is(p,span,li,dt) { color: #53615b; }
.settings-account-r19-action-dialog button { font-family: inherit; }
.settings-account-r19-close h3 { margin: 0 0 10px; padding-right: 28px; font-size: 17px; }
.settings-account-r19-close label { display: grid; gap: 5px; margin: 12px 0; font-size: 12px; font-weight: 700; }
.settings-account-r19-close input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #cfd8d3;
  border-radius: 8px;
  padding: 9px 10px;
  color: #22312b !important;
  background: #fff !important;
  font-family: inherit;
}
.settings-account-r19-close-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.settings-account-r19-close-outcomes,
.settings-account-r19-close-blockers {
  margin: 10px 0;
  border-radius: 10px;
  padding: 11px 12px;
}
.settings-account-r19-close-outcomes { border: 1px solid #e3c98d; background: #fff9e9; }
.settings-account-r19-close-blockers { border: 1px solid #e7b9b0; background: #fff4f1; }
.settings-account-r19-close :is(.settings-account-r19-close-outcomes,.settings-account-r19-close-blockers) > p {
  margin: 0 0 7px;
  color: #35443e;
  font-weight: 700;
}
.settings-account-r19-close ul { display: grid; gap: 7px; margin: 0; padding-left: 20px; }
.settings-account-r19-close-blockers li { display: grid; gap: 4px; }
.settings-account-r19-close-blockers li button { justify-self: start; margin-top: 3px; }
.settings-account-r19-close-confirm-copy { margin: 12px 0 4px; line-height: 1.65; }
.settings-account-r19-close-contract-error { color: #9d3527 !important; line-height: 1.65; }
.settings-account-r19-close-status { min-height: 18px; margin: 10px 0 0; font-size: 12.5px; }

@media (max-width: 720px) {
  .settings-account-r19-session { align-items: stretch; flex-direction: column; }
  .settings-account-r19-session-revoke,
  .settings-account-r19-session-protected { align-self: flex-start; }
  .settings-account-r19-session dl { display: grid; gap: 5px; }
}
/* 第580单域B(A10): 个人头像行 */
.settings-account-r5-avatar-row { display: flex; align-items: center; gap: 14px; padding: 10px 0 4px; }
.settings-account-r5-avatar-preview { width: 56px; height: 56px; border-radius: 50%; background: color-mix(in srgb, #1c6b57 14%, transparent); color: #1c6b57; font-size: 22px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; flex: 0 0 56px; }
.settings-account-r5-avatar-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 640px) {
  /* CMD206 NY-05: display-only default; uploaded photos and desktop retain their styles. */
  .settings-account-r374-profile-summary > .settings-account-mobile-default-avatar { border-radius: 50%; background: #3f7fc5; }
  .settings-account-mobile-default-avatar > svg { display: block; width: 100%; height: 100%; flex: 0 0 auto; }
}
.settings-account-r5-avatar-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.settings-account-r5-avatar-actions button { min-height: 32px; padding: 4px 12px; border: 1px solid var(--line, #e5e1d9); background: transparent; border-radius: 8px; cursor: pointer; font-family: inherit; }
.settings-account-r5-avatar-actions small { flex-basis: 100%; color: var(--muted, #5c6862); font-size: 11px; }

/* 第580单域B补正2(B2-4): 公司 API 设置页——共骨架恢复+退役态诚实消费(命名空间 settings-account-company-api-) */
.settings-account-company-api-status { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.settings-account-company-api-status.is-warn { color: #9a6a1f; }
.settings-account-company-api-status.is-error { color: #d86a57; }
.settings-account-company-api-status.is-ok { color: #55aa8e; }
.settings-account-company-api .settings-account-r16-api-row.is-selected td { background: color-mix(in srgb, #1c6b57 8%, transparent); }
.settings-account-company-api-detail { margin-top: 12px; border: 1px solid var(--line, #e5e1d9); border-radius: 10px; padding: 12px 14px; }
.settings-account-company-api-detail.is-empty { border-style: dashed; }
.settings-account-company-api-detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px 16px; margin: 8px 0 0; }
.settings-account-company-api-detail-field dt { font-size: 11.5px; color: var(--muted, #91a099); }
.settings-account-company-api-detail-field dd { margin: 2px 0 0; font-size: 13px; word-break: break-all; }
.settings-account-company-api-keypool { margin-top: 12px; border: 1px dashed var(--line, #e5e1d9); border-radius: 10px; padding: 12px 14px; }
.settings-account-company-api-keypool.is-disabled { opacity: .82; }
.settings-account-company-api-keypool-ops { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.settings-account-company-api-keypool-ops button { min-height: 32px; padding: 4px 12px; border: 1px solid var(--line, #e5e1d9); background: transparent; border-radius: 8px; cursor: pointer; font-family: inherit; }
.settings-account-company-api-keypool-ops button:disabled { cursor: not-allowed; opacity: .55; }

/* 第372单(N+Y 页面对图收口二, 定稿 NY-08/NY-09): 平台积分使用日志——摘要三卡 / 日期筛选+类型 tabs / 手机按日期消费卡(命名空间 settings-usage-r372-) */
.settings-usage-r372-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 6px 0 12px; min-width: 0; }
@media (min-width: 641px) { .settings-usage-r372-summary { margin-bottom: 2px; } }
.settings-usage-r372-summary-card { display: flex; flex-direction: column; gap: 6px; min-width: 0; border: 1px solid rgba(126, 158, 177, .22); border-radius: 12px; background: linear-gradient(160deg, rgba(12, 22, 32, .72), rgba(6, 12, 19, .58)); padding: 14px; }
.settings-usage-r372-summary-label { color: rgba(211, 224, 226, .72); font-size: 12.5px; font-weight: 700; }
.settings-usage-r372-summary-card > strong { color: #f4fbfb; font-size: 24px; line-height: 1.15; overflow-wrap: anywhere; }
.settings-usage-r372-summary-card > small { color: rgba(211, 224, 226, .6); font-size: 11.5px; overflow-wrap: anywhere; }
.settings-usage-r372-summary-link { align-self: flex-start; min-height: 28px; padding: 3px 10px; border: 1px solid rgba(126, 158, 177, .3); border-radius: 7px; background: transparent; color: #9fd8e2; font-size: 12px; cursor: pointer; font-family: inherit; }
.settings-usage-r372-summary-link:hover { background: rgba(126, 158, 177, .12); }
.settings-usage-r372-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 2px 0 10px; min-width: 0; }
.settings-usage-r372-select-pair { display: grid; grid-template-columns: 266px 271px; gap: 16px; margin-left: 8px; max-width: 100%; }
.settings-usage-r372-range { display: inline-flex; align-items: center; gap: 6px; color: rgba(211, 224, 226, .78); font-size: 12px; }
.settings-usage-r372-select-pair .settings-usage-r372-range { min-width: 0; }
.settings-usage-r372-range-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.settings-usage-r372-select-pair select { width: 100%; height: 54px; }
@media (min-width: 641px) and (max-width: 1100px) {
  .settings-usage-r372-select-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); width: calc(100% - 8px); }
}
.settings-usage-r372-range select,
.settings-usage-r372-custom input { border: 1px solid rgba(148, 163, 184, .26); border-radius: 8px; background: rgba(15, 23, 42, .54); color: #edf6f7; padding: 7px 9px; font-size: 12.5px; outline: none; max-width: 100%; color-scheme: dark; }
.settings-usage-r372-custom { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.settings-usage-r372-custom[hidden] { display: none; }
.settings-usage-r372-tabs { display: inline-flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.settings-usage-r372-tab { min-height: 30px; padding: 4px 12px; border: 1px solid rgba(126, 158, 177, .28); border-radius: 999px; background: transparent; color: rgba(211, 224, 226, .82); font-size: 12px; cursor: pointer; font-family: inherit; }
.settings-usage-r372-tab.is-active { background: rgba(72, 148, 166, .28); border-color: rgba(126, 188, 205, .55); color: #eafcff; }
.settings-usage-r372-visible { margin-left: auto; color: rgba(211, 224, 226, .66); font-size: 12px; white-space: nowrap; }
/* 手机卡默认隐藏(桌面 >640 只显表格, data-personal-usage-tbody 结构不动) */
.settings-usage-r372-cards { display: none; }

@media (max-width: 640px) {
  /* 定稿 NY-09: ≤640 表格退役为按日期分组消费卡(同一行数据渲染); 摘要卡两列; 筛选行换行不横向溢出 */
  .settings-usage-r372-table-wrap { display: none; }
  .settings-usage-r372-select-pair { box-sizing: border-box; flex: 0 0 calc(100vw - 34px); width: calc(100vw - 34px); max-width: none; height: 58px; margin-left: -25px; padding: 11px 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; border: 1px solid rgba(126, 158, 177, .28); border-radius: 8px; background: rgba(10, 20, 30, .72); }
  .settings-usage-r372-select-pair select { height: 34px; padding-block: 5px; }
  .settings-usage-r372-cards { display: grid; gap: 12px; min-width: 0; }
  .settings-usage-r372-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .settings-usage-r372-summary-card { padding: 12px; }
  .settings-usage-r372-summary-card > strong { font-size: 20px; }
  .settings-usage-r372-day { display: grid; gap: 8px; min-width: 0; }
  .settings-usage-r372-day-head { margin: 2px 0 0; padding-left: 8px; border-left: 3px solid rgba(126, 188, 205, .6); color: #d8edf2; font-size: 13px; }
  .settings-usage-r372-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: start; border: 1px solid rgba(126, 158, 177, .22); border-radius: 12px; background: linear-gradient(160deg, rgba(12, 22, 32, .72), rgba(6, 12, 19, .58)); padding: 11px 12px; min-width: 0; }
  .settings-usage-r372-card-time { color: rgba(211, 224, 226, .72); font-size: 12px; padding-top: 2px; white-space: nowrap; }
  .settings-usage-r372-card-main { min-width: 0; display: grid; gap: 4px; }
  .settings-usage-r372-card-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
  .settings-usage-r372-card-title strong { color: #f4fbfb; font-size: 13.5px; overflow-wrap: anywhere; }
  .settings-usage-r372-kind-badge { font-style: normal; font-size: 11px; padding: 1px 8px; border-radius: 999px; border: 1px solid rgba(126, 188, 205, .45); color: #bfe9f2; white-space: nowrap; }
  .settings-usage-r372-card-sub { color: rgba(211, 224, 226, .62); font-size: 11.5px; overflow-wrap: anywhere; }
  .settings-usage-r372-card-nums { display: grid; gap: 3px; justify-items: end; text-align: right; }
  .settings-usage-r372-card-nums b { font-size: 15px; color: #f4fbfb; }
  .settings-usage-r372-card-nums b[data-sign="minus"] { color: #f0a38e; }
  .settings-usage-r372-card-nums b[data-sign="plus"] { color: #7fd8a8; }
  .settings-usage-r372-card-nums small { color: rgba(211, 224, 226, .6); font-size: 11px; white-space: nowrap; }
  .settings-usage-r372-card-state { margin: 0; border: 1px dashed rgba(126, 158, 177, .3); border-radius: 10px; padding: 14px; color: rgba(211, 224, 226, .75); font-size: 12.5px; overflow-wrap: anywhere; }
  .settings-usage-r372-visible { margin-left: 0; flex-basis: 100%; }
}
@media (max-width: 360px) {
  .settings-usage-r372-summary { gap: 8px; }
  .settings-usage-r372-card { grid-template-columns: minmax(0, 1fr) auto; }
  .settings-usage-r372-card-time { grid-column: 1 / -1; padding-top: 0; }
}

/* ==================== 第373单(N+Y 页面对图收口三, 定稿 NY-06/NY-07, UI窗342-r5 O48/O49) ====================
   个人 API: 桌面「状态」列 + 模型搜索框 / 手机 ≤640 单列模型卡 + 2×2 分类导航 / 桌面 >1100 右侧窄编辑栏。
   命名空间 settings-personal-api-r373-; 状态徽标复用 settings-account-r16-api-status。 */
.settings-personal-api-r373-search { margin: 8px 0 10px; min-width: 0; }
.settings-personal-api-r373-search input[type="search"] { width: min(360px, 100%); max-width: 100%; padding: 8px 12px; border: 1px solid rgba(126, 158, 177, .3); border-radius: 8px; background: rgba(15, 23, 42, .54); color: #edf6f7; font-size: 13px; outline: none; font-family: inherit; color-scheme: dark; }
.settings-personal-api-r373-search input[type="search"]:focus { border-color: rgba(126, 188, 205, .6); }
.settings-personal-api-r373-group-count { margin-left: 8px; color: rgba(159, 216, 226, .85); font-size: 11.5px; white-space: nowrap; }

/* O48 状态列三态(已启用/已停用/待验证)——同一徽标桌面表格与手机卡共用 */
.settings-account-r16-api-status-cell { white-space: nowrap; }
.settings-account-r16-api-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; white-space: nowrap; }
.settings-account-r16-api-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.settings-account-r16-api-status.is-enabled { color: #7fd8a8; }
.settings-account-r16-api-status.is-disabled { color: rgba(211, 224, 226, .55); }
.settings-account-r16-api-status.is-pending { color: rgba(253, 230, 138, .88); }

/* O49 手机卡默认隐藏(桌面 >640 只显表格, 表格 DOM 结构不动) */
.settings-personal-api-r373-mobile { display: none; }
.settings-personal-api-r373-mobile-nav-cell[hidden] { display: none !important; }

@media (max-width: 640px) {
  /* 定稿 NY-07: ≤640 表格退役为单列模型卡(同一行数据渲染); 只退个人 API 表, 公司 API 表不动(作用域限定本 section) */
  [data-settings-account-r3-personal-api] .settings-account-r16-api-table-wrap { display: none; }
  .settings-personal-api-r373-mobile { display: block; min-width: 0; }
  .settings-personal-api-r373-mobile-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 60px; gap: 8px; width: calc(100vw - 34px); margin: 4px 0 14px -25px; min-width: 0; }
  .settings-personal-api-r373-mobile-nav-cell { display: grid; justify-items: start; align-content: center; gap: 4px; min-width: 0; padding: 12px 10px; border: 1px solid rgba(126, 158, 177, .28); border-radius: 12px; background: linear-gradient(160deg, rgba(12, 22, 32, .72), rgba(6, 12, 19, .58)); color: #eafcff; font-size: 13px; cursor: pointer; font-family: inherit; text-align: left; }
  .settings-personal-api-r373-mobile-nav-cell strong { white-space: nowrap; line-height: 1.4; overflow-wrap: normal; }
  .settings-personal-api-r373-mobile-nav-cell small { color: rgba(211, 224, 226, .6); font-size: 11px; white-space: nowrap; }
  .settings-personal-api-r373-mobile-nav-cell.is-active { border-color: rgba(126, 188, 205, .65); background: rgba(72, 148, 166, .3); }
  .settings-personal-api-r373-mobile-group { display: grid; gap: 10px; margin-bottom: 16px; min-width: 0; }
  .settings-personal-api-r373-mobile-group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding-left: 8px; border-left: 3px solid rgba(126, 188, 205, .6); color: #d8edf2; font-size: 13.5px; min-width: 0; }
  .settings-personal-api-r373-mobile-group-head small { color: rgba(211, 224, 226, .6); font-size: 11.5px; white-space: nowrap; }
  .settings-personal-api-r373-mobile-group.is-nav-target .settings-personal-api-r373-mobile-group-head { border-left-color: #9fd8e2; color: #ffffff; }
  .settings-personal-api-r373-model-card { display: grid; gap: 10px; min-width: 0; border: 1px solid rgba(126, 158, 177, .22); border-radius: 12px; background: linear-gradient(160deg, rgba(12, 22, 32, .72), rgba(6, 12, 19, .58)); padding: 12px 13px; }
  .settings-personal-api-r373-model-card.is-disabled { opacity: .72; }
  .settings-personal-api-r373-model-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
  .settings-personal-api-r373-model-card-head strong { color: #f4fbfb; font-size: 14px; overflow-wrap: anywhere; min-width: 0; }
  .settings-personal-api-r373-model-card-fields { display: grid; gap: 5px; margin: 0; min-width: 0; }
  .settings-personal-api-r373-model-card-fields > div { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 8px; align-items: baseline; min-width: 0; }
  .settings-personal-api-r373-model-card-fields dt { color: rgba(211, 224, 226, .58); font-size: 11.5px; }
  .settings-personal-api-r373-model-card-fields dd { margin: 0; color: rgba(237, 246, 247, .92); font-size: 12.5px; overflow-wrap: anywhere; min-width: 0; }
  .settings-personal-api-r373-card-sub { display: block; margin-top: 2px; color: rgba(148, 163, 184, .92); font-size: 11px; overflow-wrap: anywhere; }
  .settings-personal-api-r373-model-card-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
  .settings-personal-api-r373-model-card-actions button { min-height: 30px; padding: 4px 14px; border: 1px solid rgba(126, 158, 177, .32); border-radius: 8px; background: transparent; color: #cfe4ff; font-size: 12px; cursor: pointer; font-family: inherit; }
  .settings-personal-api-r373-model-card-actions .settings-account-r16-delete { border-color: rgba(248, 113, 113, .34); color: rgba(254, 202, 202, .9); }
  .settings-personal-api-r373-mobile-empty { margin: 0; border: 1px dashed rgba(126, 158, 177, .3); border-radius: 10px; padding: 12px; color: rgba(211, 224, 226, .75); font-size: 12.5px; overflow-wrap: anywhere; }
}

/* 373 定稿 NY-06: 桌面 >1100 行「编辑」= 表右侧滑出栏——复用同一表单 DOM 与保存/测试处理器, 只改容器与定位;
   中央弹层 DOM 结构不重排; <1100 仍中央表单(既有规则不动)。 */
@media (min-width: 1101px) {
  .settings-account-r15-interface-backdrop.settings-account-r16-row-edit {
    place-items: stretch end;
    padding: 0;
    background: transparent;
    pointer-events: none;
  }
  .settings-account-r15-interface-backdrop.settings-account-r16-row-edit .settings-account-r16-row-edit-modal {
    pointer-events: auto;
    width: 400px;
    max-width: 400px;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    border-top: 0;
    border-bottom: 0;
    border-right: 0;
    overflow-y: auto;
    animation: settingsPersonalApiR373PanelIn .22s ease-out;
  }
  .settings-account-r15-interface-backdrop.settings-account-r16-row-edit .settings-account-r15-interface-form {
    grid-template-columns: minmax(0, 1fr);
  }
  /* 侧栏在位时内容区让出栏宽, 表格(含首列与操作列)不被遮——:has 仅命中行编辑弹层(接口新建弹层无 r16-row-edit 类, 仍中央) */
  .settings-account-r3-personal-api:has(> .settings-account-r16-row-edit) {
    margin-right: 400px;
    transition: margin-right .22s ease-out;
  }
}
@keyframes settingsPersonalApiR373PanelIn { from { transform: translateX(48px); opacity: .35; } to { transform: translateX(0); opacity: 1; } }

/* ==================== 第374单(N+Y 页面对图收口四, 定稿 NY-05, UI窗342-r5 O47) ====================
   装修手机个人账号页: 紧凑头像卡(资料编辑区随卡折叠) + <details> 折叠入口列表(不持久化) + 「订阅与订单」同级行(接既有 45 弹层)。
   ≤640 默认全折叠(渲染期按 matchMedia 不落 open; #settings/<块> 直链目标落 open);
   374-r2(总监 372A-374A 裁定 b): >640 不渲染 r374 结构(基线原 DOM, 渲染分支而非 CSS 隐藏)——
   下方 >641 规则仅作跨档重渲前过渡窗的兜底隐藏, 桌面定稿不动。命名空间 settings-account-r374-。 */

/* details 原生三角一律退役(双端), 用自绘右箭头(手机件) */
.settings-account-r374-entry > summary,
.settings-account-r374-profile > summary { list-style: none; }
.settings-account-r374-entry > summary::-webkit-details-marker,
.settings-account-r374-profile > summary::-webkit-details-marker { display: none; }

.settings-account-r374-entry-summary { display: flex; align-items: center; gap: 10px; min-width: 0; cursor: pointer; }
.settings-account-r374-entry-title { flex: 1 1 auto; min-width: 0; }
.settings-account-r374-entry-text { display: grid; gap: 2px; min-width: 0; flex: 1 1 auto; }
.settings-account-r374-entry-text strong { color: #eafcff; font-size: 13.5px; overflow-wrap: anywhere; }
.settings-account-r374-entry-text small { color: rgba(211, 224, 226, .6); font-size: 11.5px; overflow-wrap: anywhere; }
.settings-account-r374-entry-ico { display: inline-flex; width: 24px; height: 24px; align-items: center; justify-content: center; border-radius: 7px; background: rgba(45, 122, 122, .26); color: #7ed3c6; font-size: 13px; flex: 0 0 auto; }
.settings-account-r374-entry-chev { color: rgba(159, 216, 226, .75); font-size: 15px; flex: 0 0 auto; transition: transform .18s ease; }
.settings-account-r374-entry-body { display: grid; gap: 10px; min-width: 0; padding-top: 10px; }

/* 同级独立行(订阅与订单 / 个人 API / 平台积分日志 / 个人 AI 大脑)——整行按钮, 双端同 DOM */
.settings-account-r374-entry-link > .settings-account-r374-entry-summary { width: 100%; border: 1px solid rgba(126, 158, 177, .22); border-radius: 12px; background: linear-gradient(160deg, rgba(12, 22, 32, .72), rgba(6, 12, 19, .58)); padding: 11px 12px; color: inherit; font-family: inherit; font-size: inherit; text-align: left; }
.settings-account-r374-entry-link > .settings-account-r374-entry-summary:hover { border-color: rgba(126, 188, 205, .45); }

/* 紧凑头像卡(页顶) */
.settings-account-r374-profile-card { display: grid; gap: 8px; min-width: 0; }
.settings-account-r374-profile { display: grid; min-width: 0; }
.settings-account-r374-profile-summary { display: flex; align-items: center; gap: 12px; min-width: 0; cursor: pointer; }
.settings-account-r374-profile-meta { display: grid; gap: 3px; min-width: 0; flex: 1 1 auto; }
.settings-account-r374-profile-name { color: #f4fbfb; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.settings-account-r374-profile-bio { display: block; color: rgba(211, 224, 226, .66); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.settings-account-r374-profile-edit-btn { flex: 0 0 auto; border: 1px solid rgba(126, 188, 205, .45); border-radius: 8px; padding: 6px 12px; color: #bfe9f2; font-size: 12.5px; white-space: nowrap; }
.settings-account-r374-profile-edit { display: grid; gap: 10px; min-width: 0; padding-top: 10px; }

/* 桌面 >640(374-r2): r374 结构不再渲染(基线原 DOM); 本组规则只在跨档重渲前的过渡窗兜底——
   隐藏手机件(链接行/编辑钮/箭头), 摘要禁点; 桌面定稿布局不动。 */
@media (min-width: 641px) {
  .settings-account-r374-entry-link { display: none; }
  .settings-account-r374-entry > summary,
  .settings-account-r374-profile > summary { pointer-events: none; cursor: default; }
  .settings-account-r374-entry-ico,
  .settings-account-r374-entry-chev { display: none; }
  .settings-account-r374-profile-meta,
  .settings-account-r374-profile-edit-btn { display: none; }
  .settings-account-r374-entry-body { padding-top: 0; }
  .settings-account-r374-profile-edit { padding-top: 0; }
  .settings-account-r374-entry-title > span { flex-shrink: 0; }
}

/* 手机 ≤640: 定稿 NY-05 形——页顶紧凑卡最先(卡 §一.1), 六入口单行+右箭头(卡 §一.2) */
@media (max-width: 640px) {
  .settings-account-r374-profile-card { order: -1; border: 1px solid rgba(126, 158, 177, .22); border-radius: 12px; background: linear-gradient(160deg, rgba(12, 22, 32, .72), rgba(6, 12, 19, .58)); padding: 12px; }
  .settings-account-r374-profile-summary { min-height: 56px; }
  .settings-account-r374-profile-edit-btn { min-height: 32px; display: inline-flex; align-items: center; }
  .settings-account-r374-entry { border: 1px solid rgba(126, 158, 177, .22); border-radius: 12px; background: linear-gradient(160deg, rgba(12, 22, 32, .72), rgba(6, 12, 19, .58)); min-width: 0; }
  .settings-account-r374-entry > summary { padding: 11px 12px; min-height: 44px; }
  .settings-account-r374-entry[open] > summary .settings-account-r374-entry-chev { transform: rotate(90deg); }
  .settings-account-r374-entry-body { padding: 0 12px 12px; padding-top: 0; }
  .settings-account-r374-entry-title { display: grid; gap: 2px; }
  .settings-account-r374-entry-title > span { border: 0; border-radius: 0; padding: 0; color: rgba(211, 224, 226, .6); font-size: 11px; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .settings-account-r374-entry-link { border: 0; background: none; }
  .settings-account-r374-entry-link > .settings-account-r374-entry-summary { min-height: 44px; }
  .settings-account-r374-profile-edit .settings-account-r5-lan-actions { padding-bottom: 0; }
}

/* 374 补: Chrome≥131 的 details 折叠隐藏是普通 UA 样式(details:not([open]) > :not(summary){display:none}),
   会被作者 display 规则覆盖——折叠态隐藏显式落作者层(Chrome149 实测逼出: 不开 body 仍 853px)。 */
.settings-account-r374-entry:not([open]) > .settings-account-r374-entry-body,
.settings-account-r374-profile:not([open]) > .settings-account-r374-profile-edit { display: none; }

@media (max-width: 640px) {
  /* 374 定稿 NY-05 首屏收敛: 个人面板头描述行/身份行 ≤640 退役(信息已由页顶紧凑头像卡承载); 桌面不动 */
  [data-settings-account-r3-personal] > .settings-account-r3-panel-head > div > p,
  [data-settings-account-r3-personal] > .settings-account-r3-panel-head > span { display: none; }
}

@media (max-width: 640px) {
  /* 374(O47): ≤640 手机账号页下, 07 旧注入的报价模板设置面板(.quote-template-settings)让位——
     41 为系统设置唯一 canonical 壳(第580单域B A03 同旨: 旧注入不整页占位), 折叠入口收口手机长页(W1f ≤1600);
     桌面 >640 面板照常(quote_template_operable 门跑桌面视口不受影响)。 */
  #settings .quote-template-settings { display: none; }
}

@media (max-width: 640px) {
  /* 374(W1f ≤1600 收口补): ≤640 行距/卡距再收一档(定稿 NY-05 紧凑口径; 桌面 >640 不动) */
  .settings-account-r374-profile-card { padding: 10px 12px; }
  .settings-account-r374-profile-summary { min-height: 48px; }
  .settings-account-r374-entry > summary { padding: 8px 12px; min-height: 40px; }
  .settings-account-r374-entry-link > .settings-account-r374-entry-summary { padding-top: 8px; padding-bottom: 8px; min-height: 40px; }
}
/* FE-A10: approved NOTIF-03/04/05 surfaces; keep styling inside the ticket host. */
[data-fe-a10] { min-width: 0; }
[data-fe-a10] .settings-account-r3-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
[data-fe-a10] form {
  display: grid;
  gap: 12px;
  max-width: 720px;
}
[data-fe-a10] form label { display: grid; gap: 6px; min-width: 0; }
[data-fe-a10] form input,
[data-fe-a10] form select,
[data-fe-a10] form textarea {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  font: inherit;
}
[data-fe-a10] form textarea { resize: vertical; min-height: 144px; }
[data-fe-a10] [role="alert"] { border-inline-start: 3px solid currentColor; padding-inline-start: 10px; }
[data-fe-a10] .settings-account-r5-table-scroll { max-width: 100%; overflow-x: auto; }
[data-fe-a10] table { width: 100%; border-collapse: collapse; }
[data-fe-a10] th,
[data-fe-a10] td { padding: 10px; text-align: start; vertical-align: top; overflow-wrap: anywhere; }
[data-fe-a10] article p { overflow-wrap: anywhere; }
/* NOTIF-04 本人反馈／申诉：卡片版式与进度条（有效定稿图，沿现有 token，不新造色值） */
.settings-account-fea10-cards { margin: 0 0 12px; padding: 0; list-style: none; display: grid; gap: 10px; }
.settings-account-fea10-card { display: grid; gap: 4px; width: 100%; text-align: left; padding: 12px 14px; border: 1px solid var(--line, #e5e1d9); border-radius: 12px; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.settings-account-fea10-card strong { font-size: 14px; line-height: 1.5; }
.settings-account-fea10-card [data-fe-a10-card-status] { font-size: 13px; color: var(--teal, #2f6f62); }
.settings-account-fea10-card time { font-size: 12px; color: var(--muted, #91a099); }
.settings-account-fea10-progress { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 12px; padding: 0; list-style: none; font-size: 13px; }
.settings-account-fea10-progress li { color: var(--muted, #91a099); }
.settings-account-fea10-progress li + li::before { content: "→"; margin-right: 6px; color: var(--muted, #91a099); }
.settings-account-fea10-progress li[data-state="done"] { color: inherit; }
.settings-account-fea10-progress li[data-state="current"] { color: var(--teal, #2f6f62); font-weight: 700; }
/* NOTIF-03 反馈与申诉表单（有效定稿图 03-手机反馈申诉表单；沿现有 token）：副题、问题类型胶囊、提交后提示 */
.settings-account-fea10-sub { margin: 0 0 4px; color: var(--muted, #6d7a74); font-size: 14px; }
.settings-account-fea10-kind { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.settings-account-fea10-kind-label { flex: 1 0 100%; font-weight: 600; }
.settings-account-fea10-pill { min-height: 40px; padding: 0 22px; border: 1px solid var(--line, #e5e1d9); border-radius: 999px; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.settings-account-fea10-pill[data-active="true"] { border-color: var(--teal, #2f6f62); color: var(--teal, #2f6f62); font-weight: 700; box-shadow: inset 0 0 0 1px var(--teal, #2f6f62); }
[data-fe-a10] form select.settings-account-fea10-kind-select { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); opacity: 0; }
[data-fe-a10] [data-fe-a10-appeal-note][hidden] { display: none; }
@media (max-width: 640px) {
  [data-fe-a10] th,
  [data-fe-a10] td { padding: 8px 6px; }
  [data-fe-a10] form button[type="submit"] { width: 100%; }
}

/* MOBILE-UI-P2-2: 手机(≤430)「企业人员」五列表改成卡片行——定稿 M17a:头像＋姓名与标签＋「手机｜职位」＋右侧操作,不再逐字竖排、不再超出容器。
   根因:全局 table{min-width:680px}(css/01)在 ≤390 被 css/03 改成 width:max-content,五列要么压成 34px 竖排字,要么 679px 撑出容器。
   只动 [data-cp-member-table](员工列表仅有的两处:公司资料页、成员分区);单元格内容、职位下拉与踢出按钮一行不动;≥431 不动。 */
@media (max-width: 430px) {
  [data-cp-member-table] { display: block; width: 100%; min-width: 0; margin-top: 6px; }
  [data-cp-member-table] thead { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  [data-cp-member-table] tbody { display: block; }
  [data-cp-member-table] tbody tr { position: relative; display: flex; flex-wrap: wrap; align-content: center; gap: 4px 0; min-height: 56px; padding: 10px 12px 10px 54px; }
  [data-cp-member-table] tbody tr + tr { border-top: 1px solid var(--line, rgba(126, 158, 177, .18)); }
  [data-cp-member-table] tbody tr:has(> td[colspan]) { padding: 0; }
  [data-cp-member-table] tbody td[colspan] { display: block; flex: 1 1 100%; border: 0; padding: 12px; }
  [data-cp-member-table] tbody td:not([colspan]) { display: block; flex: 0 0 auto; min-width: 0; border: 0; padding: 0; }
  /* 第 1 格:姓名与标签同一行,右端给状态留 64px;头像绝对定位在卡片左侧 */
  [data-cp-member-table] tbody td:first-child:not([colspan]) { display: flex; order: 0; flex: 1 0 calc(100% - 64px); max-width: calc(100% - 64px); flex-wrap: wrap; align-items: center; gap: 4px 6px; }
  [data-cp-member-table] .cp-member-avatar { position: absolute; left: 12px; top: 11px; width: 34px; height: 34px; margin: 0; font-size: 14px; }
  [data-cp-member-table] tbody td:first-child strong { overflow-wrap: anywhere; }
  /* 第 2、3 格:「手机｜职位」一行(分隔线跟在手机后,职位折行时不孤悬行首)；按 order 排在姓名行之后 */
  [data-cp-member-table] tbody td:nth-child(2):not([colspan]) { order: 2; }
  [data-cp-member-table] tbody td:nth-child(3):not([colspan]) { order: 3; }
  [data-cp-member-table] tbody td:nth-child(2):not([colspan]),
  [data-cp-member-table] tbody td:nth-child(3):not([colspan]) { font-size: 12.5px; color: var(--muted, #5c6862); white-space: nowrap; }
  [data-cp-member-table] tbody td:nth-child(2):not([colspan])::after { content: "\2502"; margin: 0 8px; opacity: .5; }
  /* 第 4 格:状态排在姓名行右端(与姓名同一行、在「踢出」所在栏之左) */
  [data-cp-member-table] tbody td:nth-child(4):not([colspan]) { order: 1; align-self: flex-start; margin-left: auto; font-size: 12px; white-space: nowrap; }
  /* 第 5 格:职位下拉独占一行(定稿没画,现役真操作);只有「—」(无可用操作)的行不占高度 */
  [data-cp-member-table] tbody td:nth-child(5):not([colspan]) { display: flex; order: 4; flex: 1 1 100%; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding-top: 4px; }
  [data-cp-member-table] tbody td:nth-child(5):not([colspan]):not(:has(> select, > button)) { display: none; }
  [data-cp-member-table] [data-cp-member-position] { flex: 1 1 100%; width: auto; min-width: 0; margin-right: 0; }
  /* 「踢出」按行右侧(定稿 M17a 的位置),与头部两行垂直居中;该行右侧给它留位,职位下拉行用负边距回到整行宽 */
  [data-cp-member-table] tbody tr:has([data-cam-kick]) { padding-right: 72px; }
  [data-cp-member-table] tbody tr:has([data-cam-kick]) > td:nth-child(5) { flex: 0 0 calc(100% + 60px); margin-right: -60px; }
  [data-cp-member-table] [data-cam-kick] { position: absolute; right: 12px; top: 11px; }
  [data-cp-member-table] tbody td:nth-child(5):not([colspan]):not(:has(> select)) { padding: 0; }
}

/* SEC-M-03 修改密码独立整页 / SEC-M-09 会话详情与撤销其他会话（有效定稿图，沿现有 token，不新造色值） */
.settings-account-r19-password-page {
  position: fixed;
  inset: 0;
  z-index: 95;
  overflow: auto;
  background: var(--surface, #fff);
  color: var(--text, #22312b);
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
}
.settings-account-r19-password-page[hidden] { display: none; }
/* CMD474: the original form stays in its owner; dialog top-layer prevents the
   transformed settings shell and its global bars from containing this page. */
dialog.mf-security-page-r474 {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  height: 100%;
  height: 100dvh;
  max-height: none;
  margin: 0;
  border: 0;
  font: inherit;
}
dialog.mf-security-page-r474::backdrop { background: var(--bg, #04101a); }
.mf-security-page-brand-r474 { display: none; }
body:has(dialog.mf-security-page-r474[open]) { overflow: hidden; }
@media (max-width: 640px) {
  dialog.mf-security-page-r474 {
    padding: max(28px, env(safe-area-inset-top)) 24px max(28px, env(safe-area-inset-bottom));
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    background: var(--bg, #04101a);
    color: var(--mf-theme-ink, var(--ink, #effbff));
  }
  .mf-security-page-r474 .settings-account-r19-password-page-inner { gap: 16px; }
  .mf-security-page-brand-r474 { display: flex; align-items: center; gap: 10px; min-height: 32px; margin-bottom: 10px; }
  .mf-security-page-logo-r474 { width: 26px; height: 26px; color: inherit; }
  .mf-security-page-brand-r474 strong { font-size: 14px; letter-spacing: .08em; }
  dialog.mf-security-page-r474 .settings-account-r19-password-back { min-height: 24px; padding: 0; border: 0; background: transparent; box-shadow: none; font-size: 12px; text-align: left; color: var(--muted, #6d7a74); }
  .mf-security-page-r474 h2 { font-size: 24px; line-height: 1.3; }
  .mf-security-page-r474 h2 + .settings-account-r3-note { margin-top: -12px; font-size: 12px; }
  dialog.mf-security-page-r474 .settings-account-r3-note { color: var(--muted, #6d7a74); }
  .mf-security-page-r474 label { font-size: 13px; }
  dialog.mf-security-page-r474 input { min-height: 48px; width: 100%; box-sizing: border-box; border-radius: 12px; background: var(--surface, #fff); }
  .mf-security-page-r474 .primary-action { min-height: 48px; width: 100%; border-radius: 12px; }
  body:not(.home-mode) dialog.mf-security-page-r474[data-mf-security-page] .primary-action { border-color: transparent; background: var(--green, #6dcdf1); color: var(--bg, #04101a); box-shadow: none; }
}
.settings-account-r19-password-page-inner { max-width: 460px; margin: 0 auto; display: grid; gap: 14px; }
.settings-account-r19-password-page h2 { margin: 0; font-size: 24px; }
.settings-account-r19-password-page label { display: grid; gap: 6px; font-weight: 600; }
.settings-account-r19-password-page input { min-height: 44px; border: 1px solid var(--line, #e5e1d9); border-radius: 10px; padding: 0 12px; font: inherit; background: transparent; color: inherit; }
.settings-account-r19-password-back { justify-self: start; border: 0; background: transparent; color: inherit; font: inherit; padding: 6px 0; cursor: pointer; }
.settings-account-r19-password-note { border: 1px solid var(--line, #e5e1d9); border-radius: 12px; padding: 12px 14px; font-size: 13px; line-height: 1.6; color: var(--muted, #6d7a74); }
.settings-account-r19-sessions-bulk[hidden] { display: none; }
.settings-account-r19-sessions-bulk { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.settings-account-r19-sessions-bulk small { color: var(--muted, #91a099); font-size: 12px; }
.settings-account-r19-session-detail summary { cursor: pointer; font-size: 12px; color: var(--muted, #91a099); margin: 4px 0; }
.settings-account-r19-session-detail dl { margin-top: 6px; }
/* SEC-M-05 换绑手机号整页（图 05／06）：验证码输入行（「获取验证码」嵌在输入框右侧）；其余沿 .settings-account-r19-password-page */
.settings-account-r20-code-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: stretch; }
.settings-account-r20-code-row input { min-width: 0; }
.settings-account-r20-code-row button { min-height: 44px; padding: 0 14px; border: 1px solid var(--line, #e5e1d9); border-radius: 10px; background: transparent; color: inherit; font: inherit; font-weight: 700; white-space: nowrap; cursor: pointer; }
.settings-account-r20-code-row button:disabled { opacity: .5; cursor: default; }
.settings-account-r20-phone-page input[readonly] { opacity: .8; }
/* ≤980px：顶栏（粘性、层级 --mf-layer-sidebar）会盖住整页顶部的「返回账号安全」；与 UI-MODAL-CLOSE-BRAND-OVERLAP 同一合同，层级抬到顶栏之上 */
@media (max-width: 980px) { .settings-account-r20-phone-page { z-index: calc(var(--mf-layer-sidebar, 2147483600) + 2); } }
/* SEC-M-07／08 注销两屏（图 07 注销范围／08 注销确认）：沿 .settings-account-r19-password-page 与 .settings-account-r20-code-row；只用既有 token，危险提示卡用半透明红底、文字取页面文字色，日／夜都可读 */
.settings-account-r21-close-danger { border: 1px solid color-mix(in srgb, #d0584a 55%, transparent); background: color-mix(in srgb, #d0584a 14%, transparent); border-radius: 12px; padding: 12px 14px; font-size: 13px; line-height: 1.6; }
.settings-account-r21-close-danger p, .settings-account-r21-close-note p { margin: 0; }
.settings-account-r21-close-card { position: relative; display: grid; gap: 4px; border: 1px solid var(--line, #e5e1d9); border-radius: 14px; padding: 14px 16px; }
.settings-account-r21-close-card strong { font-size: 15px; }
.settings-account-r21-close-card small { font-size: 12px; color: var(--muted, #6d7a74); }
.settings-account-r21-close-card ul { margin: 6px 0 0; padding-left: 18px; font-size: 12.5px; line-height: 1.6; }
.settings-account-r21-close-tag { position: absolute; top: 14px; right: 16px; font-style: normal; font-size: 11px; font-weight: 600; color: var(--accent, #1c6b57); }
.settings-account-r21-close-note { border: 1px solid var(--line, #e5e1d9); border-radius: 12px; padding: 12px 14px; font-size: 12.5px; line-height: 1.7; color: var(--muted, #6d7a74); }
.settings-account-r21-close-page .settings-account-r21-close-ack { display: flex; align-items: center; gap: 10px; font-weight: 400; }
.settings-account-r21-close-page .settings-account-r21-close-ack input { min-height: 0; width: 18px; height: 18px; padding: 0; flex: none; }
.settings-account-r21-close-page .primary-action:disabled { opacity: .5; cursor: default; }
.settings-account-r21-close-page .settings-account-r19-close { padding: 0; }
@media (max-width: 980px) { .settings-account-r21-close-page { z-index: calc(var(--mf-layer-sidebar, 2147483600) + 2); } }

/* NOTIF-05: reuse the platform theme; no change to personal ticket surfaces. */
[data-fe-a10="admin"] [data-fe-notif05] { padding: 20px; color: var(--r4-ui-ink, var(--ink)); }
[data-fe-a10="admin"] .notif05-heading { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 16px; margin-bottom: 20px; }
[data-fe-a10="admin"] .notif05-heading h2 { color: inherit; font-size: 24px; }
[data-fe-a10="admin"] .notif05-muted { color: var(--r4-ui-muted, var(--muted)); font-size: 13px; line-height: 1.6; }
[data-fe-a10="admin"] .notif05-heading p { margin: 6px 0 0; }
[data-fe-a10="admin"] .notif05-status-legend { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
[data-fe-a10="admin"] .notif05-status { display: inline-flex; align-items: center; padding: 4px 10px; border: 1px solid var(--r4-ui-line, var(--line)); border-radius: 20px; color: var(--r4-ui-accent, var(--green)); font-size: 12px; white-space: nowrap; }
[data-fe-a10="admin"] .notif05-status[data-fe-notif05-status="closed"] { color: var(--r4-ui-muted, var(--muted)); }
[data-fe-a10="admin"] .notif05-layout { display: grid; grid-template-columns: minmax(260px, .56fr) minmax(0, 1fr); align-items: start; gap: 24px; }
[data-fe-a10="admin"] .notif05-queue,
[data-fe-a10="admin"] .notif05-detail { min-width: 0; padding: 20px; border: 1px solid var(--r4-ui-line, var(--line)); border-radius: 12px; background: var(--r4-ui-panel, var(--surface)); }
[data-fe-a10="admin"] .notif05-queue > header,
[data-fe-a10="admin"] .notif05-detail-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
[data-fe-a10="admin"] .notif05-queue h3,
[data-fe-a10="admin"] .notif05-detail h3 { margin: 0; font-size: 20px; line-height: 1.4; color: inherit; }
[data-fe-a10="admin"] .notif05-queue-list { display: grid; gap: 12px; list-style: none; padding: 0; margin: 18px 0; }
[data-fe-a10="admin"] .notif05-queue-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; width: 100%; min-height: 92px; padding: 16px; border: 1px solid var(--r4-ui-line, var(--line)); border-radius: 10px; background: var(--r4-ui-soft, var(--surface-soft)); color: inherit; font: inherit; text-align: start; cursor: pointer; }
[data-fe-a10="admin"] .notif05-queue-item.is-selected { border-color: var(--r4-ui-accent, var(--green)); background: var(--r4-ui-selected, var(--surface-strong)); color: var(--r4-ui-selected-ink, var(--ink)); box-shadow: inset 3px 0 0 var(--r4-ui-accent, var(--green)); }
[data-fe-a10="admin"] .notif05-queue-item:hover { border-color: var(--r4-ui-accent, var(--green)); }
[data-fe-a10="admin"] .notif05-queue-item:focus-visible { outline: 2px solid var(--r4-ui-focus, var(--green)); outline-offset: 3px; }
[data-fe-a10="admin"] .notif05-ticket-id { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
[data-fe-a10="admin"] .notif05-queue-item time { grid-column: 1 / -1; color: var(--r4-ui-muted, var(--muted)); font-size: 12px; }
[data-fe-a10="admin"] .notif05-pagination { justify-content: space-between; }
[data-fe-a10="admin"] .notif05-detail { min-height: 540px; }
[data-fe-a10="admin"] .notif05-detail-placeholder { display: grid; align-content: center; min-height: 440px; text-align: center; color: var(--r4-ui-muted, var(--muted)); }
[data-fe-a10="admin"] .notif05-meta { display: grid; gap: 8px; font-size: 12px; color: var(--r4-ui-muted, var(--muted)); }
[data-fe-a10="admin"] .notif05-meta > div { display: grid; grid-template-columns: 6em minmax(0, 1fr); gap: 12px; }
[data-fe-a10="admin"] .notif05-meta dd { margin: 0; overflow-wrap: anywhere; }
[data-fe-a10="admin"] .notif05-body,
[data-fe-a10="admin"] .notif05-public,
[data-fe-a10="admin"] .notif05-related,
[data-fe-a10="admin"] .notif05-editor { margin-top: 24px; }
[data-fe-a10="admin"] .notif05-detail h4 { margin: 0 0 12px; font-size: 15px; color: inherit; }
[data-fe-a10="admin"] .notif05-body p,
[data-fe-a10="admin"] .notif05-public p { line-height: 1.7; overflow-wrap: anywhere; }
[data-fe-a10="admin"] .notif05-related { padding: 16px; border: 1px solid var(--r4-ui-line, var(--line)); border-radius: 10px; background: var(--r4-ui-selected, var(--surface-soft)); }
[data-fe-a10="admin"] .notif05-editor label { display: grid; gap: 8px; margin-top: 14px; font-size: 14px; }
[data-fe-a10="admin"] .notif05-editor :is(textarea, select) { box-sizing: border-box; width: 100%; min-width: 0; padding: 12px; border: 1px solid var(--r4-ui-line, var(--line)); border-radius: 10px; background: var(--r4-ui-soft, var(--surface-soft)); color: inherit; font: inherit; }
[data-fe-a10="admin"] .notif05-editor textarea { min-height: 150px; resize: vertical; }
[data-fe-a10="admin"] .notif05-editor label:has(> textarea[data-fe-notif05-draft]) { font-weight: 600; }
[data-fe-a10="admin"] .notif05-editor label > textarea[data-fe-notif05-draft] { font-weight: 400; }
[data-fe-a10="admin"] .notif05-editor :disabled { cursor: not-allowed; }
@media (max-width: 900px) {
  [data-fe-a10="admin"] [data-fe-notif05] { padding: 14px; }
  [data-fe-a10="admin"] .notif05-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  [data-fe-a10="admin"] .notif05-queue,
  [data-fe-a10="admin"] .notif05-detail { padding: 16px; }
  [data-fe-a10="admin"] .notif05-queue-list { max-height: 310px; overflow-y: auto; padding: 3px; }
  [data-fe-a10="admin"] .notif05-detail-placeholder { min-height: 180px; }
  [data-fe-a10="admin"] .notif05-detail { min-height: 0; }
  [data-fe-a10="admin"] .notif05-heading h2 { font-size: 22px; }
}

/* CMD474 P2: phone owner reuses the P1 native security-page shell; only 05/06 spacing differs. */
@media (max-width: 640px) {
  dialog.settings-account-r20-phone-page.mf-security-page-r474 {
    padding: max(62px, env(safe-area-inset-top)) 28px max(32px, env(safe-area-inset-bottom));
    scrollbar-gutter: auto;
  }
  .settings-account-r20-phone-page:not([data-mf-phone-step="done"]) .settings-account-r19-password-page-inner { gap: 0; }
  .settings-account-r20-phone-page .mf-security-page-brand-r474 { min-height: 24px; margin: 0 0 26px; }
  .settings-account-r20-phone-page .mf-security-page-logo-r474 { width: 25px; height: 24px; }
  .settings-account-r20-phone-page .mf-security-page-brand-r474 strong { font-size: 13px; }
  dialog.settings-account-r20-phone-page .settings-account-r19-password-back { margin: 0 0 16px; }
  .settings-account-r20-phone-page h2 { margin: 0 0 4px; font-size: 28px; line-height: 35px; }
  .settings-account-r20-phone-page h2 + .settings-account-r3-note { margin: 0; line-height: 18px; }
  .settings-account-r20-phone-page label { margin: 0 8px; gap: 8px; font-size: 13px; line-height: 20px; font-weight: 500; }
  dialog.settings-account-r20-phone-page input { min-height: 51px; font-size: 14px; }
  .settings-account-r20-phone-page .settings-account-r20-code-row {
    min-height: 51px; gap: 0; overflow: hidden; box-sizing: border-box;
    border: 1px solid var(--line, #e5e1d9); border-radius: 12px; background: var(--surface, #fff);
  }
  dialog.settings-account-r20-phone-page .settings-account-r20-code-row input { min-height: 49px; border: 0; border-radius: 0; }
  .settings-account-r20-phone-page .settings-account-r20-code-row button {
    min-height: 49px; padding: 0 12px; border: 0; border-radius: 0; font-size: 12px;
    color: var(--green, #6dcdf1); background: transparent;
  }
  .settings-account-r20-phone-page .settings-account-r19-password-note {
    min-height: 66px; margin: 0 8px; padding: 11px 12px; box-sizing: border-box;
    font-size: 12px; line-height: 21px; background: var(--surface, #fff);
  }
  .settings-account-r20-phone-page [data-personal-phone-status] { margin: 12px 8px 0; overflow-wrap: anywhere; }
  .settings-account-r20-phone-page [data-personal-phone-status]:empty { display: none; }
  .settings-account-r20-phone-page .primary-action { min-height: 50px; width: calc(100% - 16px); margin: 0 8px; font-size: 15px; }
  .settings-account-r20-phone-page[data-mf-phone-step="old"] h2 + .settings-account-r3-note { margin-bottom: 18px; }
  .settings-account-r20-phone-page[data-mf-phone-step="old"] .settings-account-r19-password-note { margin-bottom: 36px; }
  .settings-account-r20-phone-page[data-mf-phone-step="old"] label:has([data-personal-phone-current]) { margin-bottom: 14px; }
  .settings-account-r20-phone-page[data-mf-phone-step="old"] .primary-action { margin-top: 52px; }
  .settings-account-r20-phone-page[data-mf-phone-step="new"] h2 + .settings-account-r3-note { margin-bottom: 7px; }
  .settings-account-r20-phone-page[data-mf-phone-step="new"] label:has([data-personal-phone-new]) { margin-bottom: 20px; }
  .settings-account-r20-phone-page[data-mf-phone-step="new"] label:has([data-personal-phone-code]) { margin-bottom: 39px; }
  .settings-account-r20-phone-page[data-mf-phone-step="new"] .settings-account-r19-password-note { margin-bottom: 54px; }
  .settings-account-r20-phone-page[data-mf-phone-step="new"] .primary-action + .settings-account-r3-note { margin: 42px 8px 0; font-size: 12px; line-height: 20px; }
}

/* CMD474 P3: existing close-account scope/confirm keep their own draft, blockers and outcomes. */
@media (max-width: 640px) {
  dialog.settings-account-r21-close-page.mf-security-page-r474 {
    padding: max(62px, env(safe-area-inset-top)) 28px max(32px, env(safe-area-inset-bottom));
    scrollbar-gutter: auto;
  }
  .settings-account-r21-close-page:is([data-mf-close-view="scope"], [data-mf-close-view="confirm"]) .settings-account-r19-password-page-inner { gap: 0; }
  .settings-account-r21-close-page .mf-security-page-brand-r474 { min-height: 24px; margin: 0 0 26px; }
  .settings-account-r21-close-page .mf-security-page-logo-r474 { width: 25px; height: 24px; }
  .settings-account-r21-close-page .mf-security-page-brand-r474 strong { font-size: 13px; }
  dialog.settings-account-r21-close-page .settings-account-r19-password-back { margin: 0 0 16px; }
  .settings-account-r21-close-page h2 { margin: 0 0 4px; font-size: 28px; line-height: 35px; }
  .settings-account-r21-close-page h2 + .settings-account-r3-note { margin: 0; line-height: 18px; }
  .settings-account-r21-close-page .settings-account-r21-close-danger,
  .settings-account-r21-close-page .settings-account-r21-close-note { min-height: 66px; margin: 0 8px; padding: 11px 12px; box-sizing: border-box; font-size: 12px; line-height: 21px; }
  .settings-account-r21-close-page [data-cam-status] { margin: 12px 8px 0; overflow-wrap: anywhere; }
  .settings-account-r21-close-page [data-cam-status]:empty { display: none; }
  .settings-account-r21-close-page .primary-action { min-height: 50px; width: calc(100% - 16px); margin: 0 8px; font-size: 15px; }
  .settings-account-r21-close-page[data-mf-close-view="scope"] h2 + .settings-account-r3-note { margin-bottom: 16px; }
  .settings-account-r21-close-page[data-mf-close-view="scope"] .settings-account-r21-close-danger { margin-bottom: 31px; }
  .settings-account-r21-close-page[data-mf-close-view="scope"] .settings-account-r21-close-card { min-height: 86px; margin-bottom: 14px; padding: 14px 20px; box-sizing: border-box; align-content: start; gap: 5px; border-radius: 16px; background: var(--surface, #fff); }
  .settings-account-r21-close-page [data-close-scope-card="principal"] strong { padding-right: 28px; }
  .settings-account-r21-close-page[data-mf-close-view="scope"] [data-close-scope-card="principal"] { margin-bottom: 21px; }
  .settings-account-r21-close-page[data-mf-close-view="scope"] .settings-account-r21-close-note { margin-bottom: 52px; }
  body:not(.home-mode) dialog.settings-account-r21-close-page.mf-security-page-r474[data-mf-security-page] [data-personal-close-continue] { border: 1px solid var(--line, #e5e1d9); background: var(--surface, #fff); color: var(--mf-theme-ink, var(--ink, #22312b)); }
  .settings-account-r21-close-page[data-mf-close-view="confirm"] h2 + .settings-account-r3-note { margin-bottom: 7px; }
  .settings-account-r21-close-page label { margin: 0 8px; gap: 8px; font-size: 13px; line-height: 20px; font-weight: 500; }
  dialog.settings-account-r21-close-page input:not([type="checkbox"]) { min-height: 51px; font-size: 14px; }
  .settings-account-r21-close-page label:has([data-cam-close-pw]) { margin-bottom: 20px; }
  .settings-account-r21-close-page label:has([data-cam-close-code]) { margin-bottom: 40px; }
  .settings-account-r21-close-page .settings-account-r20-code-row { min-height: 51px; gap: 0; overflow: hidden; box-sizing: border-box; border: 1px solid var(--line, #e5e1d9); border-radius: 12px; background: var(--surface, #fff); }
  dialog.settings-account-r21-close-page .settings-account-r20-code-row input { min-height: 49px; border: 0; border-radius: 0; }
  .settings-account-r21-close-page .settings-account-r20-code-row button { min-height: 49px; padding: 0 12px; border: 0; border-radius: 0; font-size: 12px; color: var(--green, #6dcdf1); background: transparent; }
  .settings-account-r21-close-page[data-mf-close-view="confirm"] .settings-account-r21-close-danger { margin-bottom: 33px; }
  .settings-account-r21-close-page .settings-account-r21-close-ack { min-height: 24px; margin: 0 8px 42px; font-size: 13px; }
  .settings-account-r21-close-page .settings-account-r21-close-ack input { min-height: 0; width: 18px; height: 18px; accent-color: var(--green, #6dcdf1); }
  body:not(.home-mode) dialog.settings-account-r21-close-page.mf-security-page-r474[data-mf-security-page] .settings-account-r21-close-submit { border: 1px solid color-mix(in srgb, #d0584a 55%, transparent); background: color-mix(in srgb, #d0584a 14%, var(--surface, #fff)); color: var(--mf-theme-ink, var(--ink, #22312b)); }
  .settings-account-r21-close-page .settings-account-r19-close-actions { display: grid; gap: 12px; margin: 0 8px; }
  .settings-account-r21-close-page .settings-account-r19-close-actions .primary-action { width: 100%; margin: 0; }
  .settings-account-r21-close-page .settings-close-final-note-u20 { margin: 24px 8px 0; font-size: 12px; line-height: 20px; }
  .settings-account-r21-close-page .settings-close-final-note-u20 + .settings-close-final-note-u20 { margin-top: 8px; font-size: 11px; }
}

/* CMD474 P4: unique original session hosts move into 09; 10 keeps the original confirm owner. */
@media (max-width: 640px) {
  dialog:is(.mf-account-sessions-page-r474, .mf-account-session-confirm-page-r474) {
    padding: max(62px, env(safe-area-inset-top)) 28px max(32px, env(safe-area-inset-bottom));
    scrollbar-gutter: auto;
  }
  :is(.mf-account-sessions-page-r474, .mf-account-session-confirm-page-r474) .settings-account-r19-password-page-inner { gap: 0; }
  :is(.mf-account-sessions-page-r474, .mf-account-session-confirm-page-r474) .mf-security-page-brand-r474 { min-height: 24px; margin: 0 0 26px; }
  :is(.mf-account-sessions-page-r474, .mf-account-session-confirm-page-r474) .mf-security-page-logo-r474 { width: 25px; height: 24px; }
  :is(.mf-account-sessions-page-r474, .mf-account-session-confirm-page-r474) .mf-security-page-brand-r474 strong { font-size: 13px; }
  dialog:is(.mf-account-sessions-page-r474, .mf-account-session-confirm-page-r474) .settings-account-r19-password-back { margin: 0 0 16px; }
  .mf-account-sessions-page-r474 h2,
  .mf-account-session-confirm-page-r474 h3 { margin: 0 0 4px; padding: 0; font-size: 28px; line-height: 35px; }
  .mf-account-sessions-page-r474 h2 + .settings-account-r3-note,
  .mf-account-session-confirm-page-r474 .mf-session-confirm-sub-r474 { margin: 0 0 18px; font-size: 12px; line-height: 18px; }
  .mf-account-sessions-page-r474 .settings-account-r19-sessions-head { gap: 10px; margin: 0 0 16px; align-items: start; }
  .mf-account-sessions-page-r474 .settings-account-r19-sessions-head p { flex: 1; min-width: 0; font-size: 12px; line-height: 20px; }
  .mf-account-sessions-page-r474 .settings-account-r19-session-list { gap: 14px; }
  .mf-account-sessions-page-r474 .settings-account-r19-session { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; min-height: 86px; padding: 14px 20px; border-radius: 16px; box-sizing: border-box; }
  .mf-account-sessions-page-r474 .settings-account-r19-session-title { justify-content: space-between; align-items: start; gap: 6px; }
  .mf-account-sessions-page-r474 .settings-account-r19-session-title strong { font-size: 15px; }
  .mf-account-sessions-page-r474 .settings-account-r19-session-main > p { line-height: 20px; overflow-wrap: anywhere; }
  .mf-account-sessions-page-r474 .settings-account-r19-session dl { display: grid; gap: 8px; }
  .mf-account-sessions-page-r474 .settings-account-r19-session dl > div { flex-wrap: wrap; }
  .mf-account-sessions-page-r474 :is(.settings-account-r19-session-protected, .settings-account-r19-session-revoke) { justify-self: end; }
  .mf-account-sessions-page-r474 .settings-account-r19-sessions-bulk { display: grid; gap: 16px; margin: 40px 8px 0; }
  .mf-account-sessions-page-r474 .settings-account-r19-sessions-bulk[hidden] { display: none; }
  body:not(.home-mode) dialog.mf-account-sessions-page-r474 [data-account-sessions-revoke-others] { width: 100%; min-height: 50px; border: 1px solid var(--line, #e5e1d9); border-radius: 12px; background: var(--surface, #fff); color: var(--mf-theme-ink, var(--ink, #22312b)); font-size: 15px; }
  .mf-account-sessions-page-r474 .settings-account-r19-sessions-bulk small { padding: 12px; border: 1px solid var(--line, #e5e1d9); border-radius: 12px; font-size: 12px; line-height: 21px; }
  .mf-account-sessions-page-r474 [data-account-sessions-status] { margin: 20px 8px 0; line-height: 21px; overflow-wrap: anywhere; }
  .mf-account-sessions-page-r474 [data-account-sessions-status]:empty { display: none; }
  dialog.mf-account-session-confirm-page-r474 { background: var(--bg, #04101a) !important; color: var(--mf-theme-ink, var(--ink, #effbff)) !important; }
  dialog.mf-account-session-confirm-page-r474 :is(h1,h2,h3,h4,strong,label,dd) { color: var(--mf-theme-ink, var(--ink, #effbff)) !important; }
  dialog.mf-account-session-confirm-page-r474 :is(p,span,li,dt) { color: var(--muted, #91a099); }
  .mf-account-session-confirm-page-r474 [data-account-session-confirm] { padding: 0; }
  .mf-account-session-confirm-page-r474 .mf-session-confirm-targets-r474 { min-height: 86px; padding: 14px 20px; border: 1px solid var(--line, #e5e1d9); border-radius: 16px; box-sizing: border-box; background: var(--surface, #fff); }
  .mf-account-session-confirm-page-r474 .mf-session-confirm-targets-r474 > strong { display: block; font-size: 15px; line-height: 20px; }
  .mf-account-session-confirm-page-r474 .settings-account-r19-close-confirm-copy { margin: 8px 0; font-size: 12px; line-height: 21px; }
  .mf-account-session-confirm-page-r474 ul { font-size: 12px; line-height: 21px; overflow-wrap: anywhere; }
  .mf-account-session-confirm-page-r474 .mf-session-confirm-question-r474 { min-height: 66px; margin: 35px 8px 0; padding: 11px 12px; border: 1px solid var(--line, #e5e1d9); border-radius: 12px; box-sizing: border-box; font-size: 12px; line-height: 21px; }
  .mf-account-session-confirm-page-r474 .mf-session-confirm-question-r474 + .settings-account-r19-close-confirm-copy { margin: 14px 8px 0; }
  .mf-account-session-confirm-page-r474 .settings-account-r19-close-actions { display: grid; gap: 17px; margin: 60px 8px 0; }
  .mf-account-session-confirm-page-r474 .settings-account-r19-close-actions button { min-height: 50px; width: 100%; border-radius: 12px !important; font-size: 15px; }
  .mf-account-session-confirm-page-r474 [data-cam-status] { margin: 30px 8px 0; overflow-wrap: anywhere; }
  .mf-account-session-confirm-page-r474 [data-cam-status]:empty { display: none; }
}

/* An already-open mobile confirmation keeps its object while crossing to the desktop viewport. */
@media (min-width: 641px) {
  dialog.mf-account-session-confirm-page-r474 {
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    width: min(460px, calc(100vw - 32px));
    max-width: 460px;
    height: auto;
    min-height: 0;
    max-height: calc(100dvh - 32px);
    margin: 0;
    padding: 20px;
    overflow: auto;
    border: 1px solid var(--line, #e5e1d9);
    border-radius: 14px;
    box-shadow: 0 18px 50px -18px rgba(0,0,0,.35);
  }
  dialog.mf-account-session-confirm-page-r474::backdrop { background: transparent; }
  .mf-account-session-confirm-page-r474 .mf-security-page-brand-r474,
  .mf-account-session-confirm-page-r474 .settings-account-r19-password-page-inner > .settings-account-r19-password-back { display: none; }
}
/* CMD474 P5: personal tickets share visual tokens only; their native page has its own owner. */
@media (max-width: 640px) {
  dialog.mf-feedback-page-r474 {
    position: fixed; inset: 0; overflow: auto; box-sizing: border-box;
    padding: max(62px, env(safe-area-inset-top)) 28px max(32px, env(safe-area-inset-bottom));
    overscroll-behavior: contain; scrollbar-gutter: auto;
    background: var(--bg, #04101a); color: var(--mf-theme-ink, var(--ink, #effbff));
  }
  .mf-feedback-page-r474[hidden] { display: none; }
  .mf-feedback-page-inner-r474 { display: grid; gap: 0; width: 100%; max-width: 460px; margin: 0 auto; }
  .mf-feedback-page-r474 .mf-security-page-brand-r474 { min-height: 24px; margin: 0 0 25px; }
  .mf-feedback-page-r474 .mf-security-page-logo-r474 { width: 25px; height: 24px; }
  .mf-feedback-page-r474 .mf-security-page-brand-r474 strong { font-size: 13px; }
  .mf-feedback-page-back-r474 { justify-self: start; min-height: 20px; margin: 0 0 8px; padding: 0; border: 0; background: transparent; color: var(--muted, #91a099); font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
  /* The legacy day settings button rules are important; this owner-specific return remains text-only. */
  html[data-meifan-theme] #settings [data-fe-a10="personal"] dialog.mf-feedback-page-r474.mf-security-page-r474 [data-fe-a10-personal-back] { border: 0 !important; background: transparent !important; box-shadow: none !important; }
  .mf-feedback-page-r474 .settings-account-r3-section-title { margin: 0 0 8px; padding: 0; }
  .mf-feedback-page-r474 .settings-account-r3-section-title h2 { margin: 0; font-size: 27px; line-height: 34px; color: inherit; }
  .mf-feedback-page-r474 [data-fe-a10-message] { margin: 0 0 16px; font-size: 13px; line-height: 21px; overflow-wrap: anywhere; }
  .mf-feedback-page-r474 [data-fe-a10-message]:empty { display: none; }
  .mf-feedback-page-r474 [data-fe-a10-form] { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; width: 100%; margin: 0; }
  .mf-feedback-page-r474 :is([data-fe-a10-sub], [data-fe-a10-mine-sub]) { margin: 0 0 20px; color: var(--muted, #91a099); font-size: 12px; line-height: 18px; }
  .mf-feedback-page-r474 .settings-account-fea10-kind { gap: 10px 42px; margin-bottom: 27px; }
  .mf-feedback-page-r474 .settings-account-fea10-kind-label { font-size: 13px; line-height: 20px; font-weight: 400; }
  .mf-feedback-page-r474 .settings-account-fea10-pill { min-height: 25px; padding: 0 10px; font-size: 11px; }
  .mf-feedback-page-r474 [data-fe-a10-form] label { display: grid; gap: 12px; margin: 0 0 18px; font-size: 13px; line-height: 20px; }
  .mf-feedback-page-r474 [data-fe-a10-form] :is(input,select,textarea) { min-width: 0; max-width: 100%; border: 1px solid var(--line, #e5e1d9); border-radius: 12px; padding: 12px 14px; color: inherit; background: var(--surface, #fff); font: inherit; }
  .mf-feedback-page-r474 [data-fe-a10-form] textarea { min-height: 179px; height: 179px; width: 100%; font-size: 12px; line-height: 24px; resize: vertical; }
  .mf-feedback-page-r474 [data-fe-a10-form] label:has(textarea) { margin-bottom: 6px; }
  .mf-feedback-page-r474 [data-fe-a10-count] { margin: 0 0 18px; color: var(--muted, #91a099); font-size: 11px; line-height: 18px; text-align: right; }
  .mf-feedback-page-r474 [data-fe-a10-appeal-note] { margin: 8px 0 24px; color: var(--muted, #91a099); font-size: 12px; line-height: 21px; }
  .mf-feedback-page-r474 [data-fe-a10-form] .primary-action { min-height: 46px; width: 100%; border-radius: 12px; font-size: 14px; text-align: left; }
  .mf-feedback-page-r474 [data-fe-a10-after] { margin: 24px 0 0; color: var(--muted, #91a099); font-size: 11px; line-height: 20px; }
  .mf-feedback-page-r474 .settings-account-r3-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 0; }
  .mf-feedback-page-r474 .settings-account-fea10-cards { gap: 12px; margin: 0; }
  .mf-feedback-page-r474 .settings-account-fea10-card { min-height: 64px; padding: 14px 16px; border-radius: 16px; background: var(--surface, #fff); color: inherit; }
  .mf-feedback-page-r474 .settings-account-fea10-card strong { font-size: 15px; line-height: 22px; }
  .mf-feedback-page-r474 :is([data-fe-a10-card-status], .settings-account-fea10-card time) { font-size: 12px; line-height: 20px; }
  .mf-feedback-page-r474 article.settings-account-r5-personal-block { margin: 0; padding: 16px; border: 1px solid var(--line, #e5e1d9); border-radius: 12px; background: var(--surface, #fff); color: inherit; overflow-wrap: anywhere; }
  .mf-feedback-page-r474 article h3 { margin: 0 0 16px; font-size: 18px; line-height: 26px; }
  .mf-feedback-page-r474 article p { font-size: 12px; line-height: 24px; }
  .mf-feedback-page-r474 .settings-account-fea10-progress { gap: 8px; margin-bottom: 16px; font-size: 12px; line-height: 20px; }
}

/* CMD528: SVG target fills the inner width; lower panels retain their 8px insets. */
@media (max-width: 640px) {
  .mf-account-session-confirm-page-r474 .mf-session-confirm-targets-r474 { margin: 0; }
}

/* CMD494: mobile feedback action hierarchy and real list/selected-detail relationship. */
@media (max-width: 640px) {
  html[data-meifan-theme] #settings [data-fe-a10="personal"] dialog.mf-feedback-page-r474 [data-fe-a10-form] button[type="submit"] { display: flex; align-items: center; justify-content: center; text-align: center !important; width: 100%; min-height: 50px; background: #28b9e3 !important; color: #05202a !important; font-weight: 650; }
  .mf-feedback-page-r474 .mf-feedback-secondary-nav-r494 .settings-account-r3-actions { align-items: center; gap: 8px 20px; }
  html[data-meifan-theme] #settings [data-fe-a10="personal"] dialog.mf-feedback-page-r474 .mf-feedback-secondary-nav-r494 button { width: auto !important; min-height: 36px; padding: 8px 0 !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; background: transparent !important; color: var(--muted, #91a099) !important; font-size: 12px !important; font-weight: 400; text-align: left; }
  .mf-feedback-page-r474[data-fe-a10-personal-view="detail"] .mf-feedback-list-r494 { max-height: min(200px, 28vh); overflow: auto; overscroll-behavior: contain; padding: 2px; }
  .mf-feedback-page-r474 .mf-feedback-list-r494 [aria-current="true"] { outline: 2px solid var(--accent, #28b9e3); outline-offset: -2px; }
  .mf-feedback-page-r474 .mf-feedback-detail-title-r494 { margin: 24px 0 16px; font-size: 18px; line-height: 26px; }
  html[data-meifan-theme] #settings [data-fe-a10="personal"] dialog.mf-feedback-page-r474 [data-fe-a10-view-reply-r494] { display: block; width: 100%; min-height: 46px; margin-top: 24px; padding: 12px; border: 1px solid var(--line, #20485f); border-radius: 12px; background: var(--surface, #0b2030); color: inherit; text-align: left; }
  .mf-feedback-page-r474 [data-fe-a10-select-hint-r494], .mf-feedback-page-r474 [data-fe-a10-list-stale-r494] { line-height: 21px; }
}
/* CMD589 BEGIN: SVG attributes for SEC-M-03 and NOTIF-04 list cards only. */
@media (max-width: 640px) {
  dialog[data-mf-security-page="SEC-M-03"] h2 { font-size: 28px; /* CMD589 title */ }
  dialog[data-mf-security-page="SEC-M-03"] .mf-security-page-brand-r474 strong { font-size: 13px; /* CMD589 brand */ }
  dialog[data-mf-security-page="SEC-M-03"] .mf-security-page-logo-r474 { width: 25px; height: 24px; /* CMD589 logo */ }
  dialog[data-mf-security-page="SEC-M-03"] .settings-account-r19-password-note { font-size: 12px; /* CMD589 note */ }
  #settings dialog.mf-feedback-page-r474[data-mf-security-page="NOTIF-04"] .mf-feedback-list-r494 .settings-account-fea10-card { border-radius: 12px !important; /* CMD589 list radius */ }
}
/* CMD589 END */
/* CMD607 BEGIN named controls; preserve code-row inner inputs and checkboxes. */
@media (max-width: 640px) {
  html[data-meifan-theme="day"] #settings dialog.mf-security-page-r474[data-mf-security-page="SEC-M-03"] :is([data-personal-password-old],[data-personal-password-new],[data-personal-password-confirm],[data-personal-password-submit]) { border-radius: 12px !important; }
  html[data-meifan-theme="day"] #settings dialog.mf-security-page-r474[data-mf-security-page="SEC-M-05"] :is([data-personal-phone-current],[data-personal-phone-verify-old]) { border-radius: 12px !important; }
  html[data-meifan-theme="day"] #settings dialog.mf-security-page-r474[data-mf-security-page="SEC-M-06"] :is([data-personal-phone-new],[data-personal-phone-confirm]) { border-radius: 12px !important; }
  html[data-meifan-theme="day"] #settings dialog.mf-security-page-r474[data-mf-security-page="SEC-M-07"] [data-personal-close-continue] { border-radius: 12px !important; }
  html[data-meifan-theme="day"] #settings dialog.mf-security-page-r474[data-mf-security-page="SEC-M-08"] :is([data-cam-close-pw],[data-cam-close-confirm]) { border-radius: 12px !important; }
  html[data-meifan-theme="day"] #settings dialog.mf-feedback-page-r474[data-mf-security-page="NOTIF-03"] [data-fe-a10-form] :is(textarea[name="body"],select[name="related_type"],input[name="related_id"],button[type="submit"],button[data-fe-a10-kind="feedback"],button[data-fe-a10-kind="appeal"]) { border-radius: 12px !important; }
  html:not([data-meifan-theme="day"]) #settings [data-fe-a10="personal"] dialog.mf-feedback-page-r474[data-mf-security-page="NOTIF-03"] [data-fe-a10-form] button[type="submit"] { background: #29b6e9 !important; color: #032331 !important; }
  html:not([data-meifan-theme="day"]) #settings dialog:is(.mf-security-page-r474, .mf-feedback-page-r474) :is(input:not([type="checkbox"]):not([type="radio"]), textarea, select):not(.settings-account-r20-code-row *):focus-visible { border-radius: 12px; }
}
/* CMD607 END controls */

/* CMD695: sent invitations use their own four-column/card layout. */
[data-cp-sent-invites] .cp-sent-mobile-label { display: none; }
[data-cp-sent-invites] .cp-sent-invite-table td:first-child { display: table-cell; }
[data-cp-sent-invites] .cp-sent-status { color: var(--muted); white-space: nowrap; }
@media (max-width: 430px) {
  [data-cp-sent-invites] .settings-account-r5-table-scroll { overflow: visible; }
  [data-cp-sent-invites] .cp-sent-invite-table { display: block; width: 100%; min-width: 0; }
  [data-cp-sent-invites] .cp-sent-invite-table thead { display: none; }
  [data-cp-sent-invites] .cp-sent-invite-table tbody { display: grid; gap: 10px; }
  [data-cp-sent-invites] .cp-sent-invite-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
  [data-cp-sent-invites] .cp-sent-invite-table td { display: block; min-width: 0; padding: 0; border: 0; overflow-wrap: anywhere; }
  [data-cp-sent-invites] .cp-sent-invite-table [data-cp-sent-invite-phone] { display: block; grid-column: 1; grid-row: 1; }
  [data-cp-sent-invites] .cp-sent-invite-table [data-cp-sent-invite-status] { grid-column: 2; grid-row: 1; justify-self: end; }
  [data-cp-sent-invites] .cp-sent-invite-table [data-cp-sent-invite-position] { grid-column: 1; grid-row: 2; color: var(--muted); }
  [data-cp-sent-invites] .cp-sent-invite-table [data-cp-sent-invite-action] { grid-column: 2; grid-row: 2; justify-self: end; max-width: 100%; }
  [data-cp-sent-invites] .cp-sent-invite-table [data-cp-sent-invite-action] button { max-width: 100%; white-space: normal; }
  [data-cp-sent-invites] .cp-sent-mobile-label { display: inline; }
}

/* SEC-M-03 approved empty-submit-disabled night state; other controls keep their palette. */
@media (max-width: 640px) {
  html:not([data-meifan-theme="day"]) #settings dialog[data-mf-security-page="SEC-M-03"] [data-personal-password-submit]:disabled {
    background: #253b4b !important; border-color: #3a5263 !important; color: #92a9ba !important;
    opacity: 1 !important; box-shadow: none !important;
  }
}

/* WO1920 G01 approved mobile preference geometry BEGIN */
@media (max-width: 640px) {
  #settings [data-watermark-preference-host] > .settings-account-r3-section-title {
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }
  #settings [data-watermark-preference-host] > [data-watermark-reload] {
    width: 88px;
    max-width: 100%;
    height: 34px;
    padding: 0 12px;
    font-size: 12px;
    white-space: nowrap;
  }
}
/* WO1920 G01 approved mobile preference geometry END */
/* WO1920 M17a: company profile only. Keep global announcement/notification nodes. */
@media (max-width: 640px) {
  body:has(#settings.active [data-cp-m17a-home]) .main > .topbar > div:has(> #pageTitle),
  body:has(#settings.active [data-cp-m17a-home]) .sidebar > .brand { display: none !important; }
  body:has(#settings.active [data-cp-m17a-home]) .app-shell > .main { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; }
  body:has(#settings.active [data-cp-m17a-home]) .main > #settings { grid-area: 1 / 1; min-width: 0; }
  body:has(#settings.active [data-cp-m17a-home]) .main > .topbar { grid-area: 1 / 1; align-self: start; position: relative !important; top: auto !important; z-index: 3; pointer-events: none; min-height: 46px !important; height: 46px; box-sizing: border-box; flex-direction: row !important; align-items: center; justify-content: flex-end; gap: 4px; padding: 0 48px 0 0 !important; margin: 0 !important; border: 0 !important; background: transparent !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; box-shadow: none !important; }
  body:has(#settings.active [data-cp-m17a-home]) #globalNoticeButton { pointer-events: auto; flex: 0 0 34px; width: 34px !important; min-width: 34px !important; height: 26px !important; min-height: 26px !important; padding: 0 !important; margin: 0 !important; font-size: 10px !important; border-radius: 6px; }
  body:has(#settings.active [data-cp-m17a-home]) #userNotificationsButton { pointer-events: auto; flex: 0 0 56px; width: 56px !important; min-width: 56px !important; height: 26px !important; min-height: 26px !important; padding: 0 !important; margin: 0 !important; font-size: 10px !important; border-radius: 6px; }
  body:has(#settings.active [data-cp-m17a-home]) #userNotificationsButton > svg { width: 14px; height: 14px; }
  body:has(#settings.active [data-cp-m17a-home]) .sidebar { min-height: 0; height: auto; padding-top: 0; padding-bottom: 0; }
  [data-cp-m17a-home] { display: block; padding: 0; border: 0; background: transparent; }
  [data-cp-m17a-home] .cp-m17a-header { position: relative; display: flex; align-items: center; justify-content: center; min-height: 46px; margin-bottom: 5px; }
  [data-cp-m17a-home] .cp-m17a-header h1 { margin: 0; font-size: 17px; font-weight: 600; line-height: 24px; }
  [data-cp-m17a-home] .cp-m17a-header button { position: absolute; right: 0; padding: 10px 4px; border: 0; background: transparent; color: inherit; font: inherit; font-size: 12px; }
  [data-cp-m17a-home] .cp-m17a-header [data-cp-m17a-back] { left: 0; right: auto; }
  [data-cp-m17a-home] > [data-settings-account-r3-lead],
  [data-cp-m17a-home] [data-settings-account-r3-company] > .settings-account-r3-panel-head { display: none; }
  [data-cp-m17a-home] [data-settings-account-r3-company] { padding: 0; border: 0; background: transparent; }
  [data-cp-m17a-home] .settings-account-r5-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
  [data-cp-m17a-home] .settings-account-r5-main { min-width: 0; display: grid; gap: 10px; }
  [data-cp-m17a-home] .cp-card { min-width: 0; margin: 0; padding: 12px; border-radius: 9px; }
  [data-cp-m17a-home] .cp-card-head { margin-bottom: 10px; }
  [data-cp-m17a-home] .cp-card-sub { display: none; }
  [data-cp-m17a-home] .cp-profile-head { position: relative; gap: 10px; flex-wrap: nowrap; }
  [data-cp-m17a-home] .cp-profile-head .cp-logo { width: 52px; height: 62px; border-radius: 8px; }
  [data-cp-m17a-home] .cp-profile-head .cp-logo svg { width: 34px; height: 34px; }
  [data-cp-m17a-home] .cp-profile-names { min-width: 0; flex: 1 1 160px; }
  [data-cp-m17a-home] .cp-profile-title { flex-wrap: wrap; gap: 5px; padding-right: 76px; }
  [data-cp-m17a-home] .cp-profile-title > strong { font-size: 16px; overflow-wrap: anywhere; }
  [data-cp-m17a-home] .cp-profile-names > small { overflow-wrap: anywhere; }
  [data-cp-m17a-home] .cp-profile-names small { font-size: 11px; }
  [data-cp-m17a-home] .cp-profile-title .cp-role-pill { padding: 3px 6px; font-size: 10px; }
  [data-cp-m17a-home] .cp-profile-head > .cp-edit-btn { position: absolute; top: 0; right: 0; padding: 6px 7px; font-size: 11px; }
  [data-cp-m17a-home] .cp-id-line { flex-wrap: wrap; }
  [data-cp-m17a-home] [data-cp-members] { position: relative; display: block; }
  [data-cp-m17a-home] [data-cp-members] > .settings-account-r3-section-title { min-height: 34px; padding-right: 108px; }
  [data-cp-m17a-home] [data-cp-members] > .settings-account-r3-section-title > span { display: none; }
  [data-cp-m17a-home] .cp-m17a-invite { margin: 0; }
  [data-cp-m17a-home] .cp-m17a-invite[open] { margin-bottom: 10px; }
  [data-cp-m17a-home] .settings-account-r5-lan-invite-status:has(> [data-lan-invite-status]:empty):not(:has(button, span)) { display: none; }
  [data-cp-m17a-home] .cp-m17a-invite > summary { position: absolute; top: 12px; right: 12px; list-style: none; border-radius: 7px; padding: 8px 10px; background: var(--teal, #1c6b57); color: #fff; font-size: 12px; font-weight: 600; cursor: pointer; }
  [data-cp-m17a-home] .cp-m17a-invite > summary::-webkit-details-marker { display: none; }
  [data-cp-m17a-home] .cp-invite-row { gap: 8px; margin: 0; }
  [data-cp-m17a-home] .cp-invite-row input { min-width: 0; flex: 1 1 100%; width: 100%; box-sizing: border-box; }
  [data-cp-m17a-home] .cp-invite-row select { min-width: 0; flex: 1; }
  [data-cp-m17a-home] [data-cp-member-table] { display: block; width: 100%; min-width: 0; margin: 6px 0 0; }
  [data-cp-m17a-home] [data-cp-member-table] thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  [data-cp-m17a-home] [data-cp-member-table] tbody { display: grid; gap: 8px; }
  [data-cp-m17a-home] [data-cp-member-table] tbody tr { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 8px; min-height: 58px; padding: 11px 12px 11px 54px; border: 1px solid var(--line, rgba(126, 158, 177, .22)); border-radius: 8px; background: color-mix(in srgb, var(--teal, #1c6b57) 5%, transparent); }
  [data-cp-m17a-home] [data-cp-member-table] tbody td:not([colspan]) { display: block; min-width: 0; max-width: none; margin: 0; padding: 0; border: 0; order: initial; white-space: normal; }
  [data-cp-m17a-home] [data-cp-member-table] tbody td:first-child:not([colspan]) { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 5px; grid-column: 1; grid-row: 1; max-width: none; }
  [data-cp-m17a-home] [data-cp-member-table] .cp-member-avatar { position: absolute; left: 12px; top: 11px; width: 32px; height: 32px; margin: 0; font-size: 14px; }
  [data-cp-m17a-home] [data-cp-member-table] tbody td:nth-child(2):not([colspan]) { grid-column: 1; grid-row: 2; font-size: 12px; overflow-wrap: anywhere; }
  [data-cp-m17a-home] [data-cp-member-table] tbody td:nth-child(2):not([colspan])::after { content: none; }
  [data-cp-m17a-home] [data-cp-member-table] tbody td:nth-child(3):not([colspan]) { grid-column: 2; grid-row: 2; font-size: 12px; overflow-wrap: anywhere; }
  [data-cp-m17a-home] [data-cp-member-table] tbody td:nth-child(4):not([colspan]) { grid-column: 2; grid-row: 1; font-size: 12px; }
  [data-cp-m17a-home] [data-cp-member-table] tbody td:nth-child(5):not([colspan]) { grid-column: 1 / -1; grid-row: 3; display: flex; flex-wrap: wrap; gap: 8px; width: auto; margin: 0; padding-top: 3px; }
  [data-cp-m17a-home] [data-cp-member-table] tbody td:nth-child(5):not([colspan]):not(:has(> select, > button)) { display: none; }
  [data-cp-m17a-home] [data-cp-member-table] [data-cp-member-position] { flex: 1 1 100px; min-width: 0; width: auto; }
  [data-cp-m17a-home] [data-cp-member-table] [data-cam-kick] { position: static; flex: 0 0 auto; }
  [data-cp-m17a-home] [data-cp-member-table] tbody tr:has(> td[colspan]) { display: block; min-height: 0; padding: 10px; }
  [data-cp-m17a-home] [data-cp-member-table] tbody td[colspan] { border: 0; padding: 0; }
  [data-cp-m17a-home] .cp-sub-grid { gap: 7px 12px; font-size: 12px; }
  [data-cp-m17a-home] .settings-account-r5-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 7px; }
  [data-cp-m17a-home] .settings-account-r5-side button { min-height: 42px; margin: 0; border-radius: 8px; text-align: left; }
  [data-cp-m17a-home] button:focus-visible,
  [data-cp-m17a-home] summary:focus-visible { outline: 2px solid var(--teal, #1c6b57); outline-offset: 3px; }
}
.card5-recovery-code { display: grid; gap: 6px; margin: 10px 0; }
.card5-recovery-code input { width: 100%; max-width: 100%; box-sizing: border-box; }
.card5-recovery-actions { display: flex; gap: 8px; }
.card5-recovery-actions button { flex: 1; min-width: 0; }
.card5-recovery-actions .card5-delete-secondary { color: #8d3e32; border: 1px solid #b76b5c; background: transparent; }
.card5-delete-scope { margin: 12px 0; padding: 12px; border: 1px solid #dfb6ad; border-radius: 8px; background: #fff2ef; color: #703b32; line-height: 1.65; }
@media (max-width: 640px) {
  .card5-recovery-actions { flex-direction: column; }
  .card5-recovery-actions button { width: 100%; min-height: 40px; }
}
@media (max-width: 373px) {
  [data-cp-m17a-home] .cp-m17a-header h1 { transform: translateX(-30px); font-size: 15px; }
}

/* WO1920 CMD1337: approved empty disabled palette, only SEC-M-06/08 mobile submit buttons. */
@media (max-width: 640px) {
  #settings dialog[data-mf-security-page="SEC-M-06"] [data-personal-phone-confirm]:disabled {
    background: #253b4b !important; border-color: #3a5263 !important; color: #92a9ba !important;
    opacity: 1 !important; box-shadow: none !important;
  }
  #settings dialog[data-mf-security-page="SEC-M-08"] [data-cam-close-confirm]:disabled {
    background: #3b303b !important; border-color: #584651 !important; color: #9b8997 !important;
    opacity: 1 !important; box-shadow: none !important;
  }
}

/* CS-HISTORY-02: only the final irreversible confirmation uses the solid danger action. */
[data-company-action-modal] .card5-delete-confirm-final { background: #b3402f !important; color: #fff !important; }
@media (max-width:640px){dialog.mf-security-page-r474[data-mf-security-page="SEC-M-03"] :is([data-personal-password-old],[data-personal-password-new],[data-personal-password-confirm]){min-height:51px;}}
@media (max-width:640px){dialog.mf-security-page-r474[data-mf-security-page="SEC-M-03"] :is([data-personal-password-old],[data-personal-password-new],[data-personal-password-confirm]){font-size:14px;font-weight:400;}}
@media (max-width:640px){#settings dialog.mf-feedback-page-r474[data-mf-security-page="NOTIF-03"] .settings-account-fea10-pill:is([data-fe-a10-kind="feedback"],[data-fe-a10-kind="appeal"]){font-weight:500;}}

/* CMD1373: SEC-M-05 night empty-submit-disabled palette only. */
@media (max-width: 640px) {
  html:not([data-meifan-theme="day"]) #settings dialog[data-mf-security-page="SEC-M-05"] [data-personal-phone-verify-old]:disabled {
    background: #253b4b !important; border-color: #3a5263 !important; color: #92a9ba !important;
    opacity: 1 !important; box-shadow: none !important;
  }
}

/* CMD1405: SEC-M-03 mobile label geometry; shared dialogs and inputs keep their rules. */
@media (max-width: 640px) {
  #settings dialog.mf-security-page-r474[data-mf-security-page="SEC-M-03"] #personalPasswordPageTitle { margin-inline-start: 4px; }
  #settings dialog.mf-security-page-r474[data-mf-security-page="SEC-M-03"] .settings-account-r19-password-page-inner > label { min-width: 0; width: min(calc(100vw - 72px), 100%); margin-inline-start: 12px; font-weight: 500; }
  #settings dialog.mf-security-page-r474[data-mf-security-page="SEC-M-03"] .settings-account-r19-password-page-inner > label + label { margin-block-start: 9px; }
}

/* CMD1445: day selected queue direct foregrounds, including closed status. */
html[data-meifan-theme="day"] #meifanPlatformWorkspaceC2Root [data-fe-a10="admin"] .notif05-queue-item.is-selected > :is(strong,time,.notif05-status) { color: var(--r4-ui-selected-ink); }
/* PM07-MKT-PUBLISH-R1：发布到公司对话框 + 项目成果文件夹视图（仅用于 app-src/41b_marketing_publish_r1.js 生成的节点） */
.cm-modal.mkt-publish .mkt-publish-card { width: min(520px, 94vw); max-width: 520px; }
.mkt-publish-body { display: grid; gap: 12px; }
.mkt-publish-what { margin: 0; overflow-wrap: anywhere; }
.mkt-publish-field { display: grid; gap: 6px; }
.mkt-publish-field select { width: 100%; min-height: 36px; }
.mkt-publish-mode { border: 0; margin: 0; padding: 0; display: grid; gap: 6px; }
.mkt-publish-mode label { display: flex; gap: 8px; align-items: center; }
.mkt-publish-mode .mkt-mode-off { opacity: .55; }
.mkt-publish-note, .mkt-publish-off { margin: 0; font-size: 13px; opacity: .85; line-height: 1.5; }
.mkt-publish-off { padding: 8px 10px; border: 1px dashed currentColor; border-radius: 8px; }
.mkt-publish-status { min-height: 1.4em; margin: 0; font-size: 13px; }
.mkt-publish-status.bad { color: #c0392b; }
.mkt-publish-acts { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.mkt-outputs-view { display: grid; gap: 10px; }
.mkt-out-folders, .mkt-out-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mkt-out-folders { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.mkt-out-folder { width: 100%; text-align: left; display: grid; gap: 2px; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(127, 127, 127, .35); background: transparent; color: inherit; cursor: pointer; }
.mkt-out-folder small, .mkt-out-item small { opacity: .75; }
.mkt-out-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid rgba(127, 127, 127, .3); border-radius: 10px; flex-wrap: wrap; }
.mkt-out-item strong { overflow-wrap: anywhere; }
.mkt-out-item > div:first-child { display: grid; gap: 2px; min-width: 0; flex: 1 1 200px; }
.mkt-out-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.mkt-out-bar { display: flex; align-items: center; gap: 10px; }
.mkt-out-notice { margin: 0; padding: 6px 10px; border-radius: 8px; background: rgba(127, 127, 127, .12); font-size: 13px; }
@media (max-width: 640px) {
  .mkt-out-folders { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .mkt-out-item { align-items: flex-start; }
}
/* 区域负责人城市后台(42分片) · 汇总条样式(补:settings-partner-r1-summary 原无规则,四项数字会挤成一坨) */
.settings-partner-r1-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin: 10px 0 6px;
}
.settings-partner-r1-summary > span {
  padding: 6px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  font-size: 13px;
  line-height: 1.4;
  color: #cfd6e4;
  white-space: nowrap;
}
/* PLATFORM-DAY-THEME-R1-20260703-01
 平台内页白天主题：暖白+墨绿+黄铜金（延续登录页 R1 定调）。
   架构：只此一个覆盖分片（排序在 09 之后），night=现状默认零改动；
   day 通过 ① 重定义 09 的三层变量(:root基础/--mf-theme-x/--glass-x自动跟随)
      [ZG-MORNING-FIX-R1-20260711 拆雷: 原文 "--mf-theme-*" 后紧跟 "/" 构成 "*​/" 把本注释提前闭合,
       后续注释文字变成非法选择器,连带吞掉紧随其后的 .sidebar-theme-toggle 基础规则(浏览器实测整条丢弃,
       夜间开关露出 UA 灰底黑边)。故把星号改写为 x,注释不再含早闭合序列。]
        ② 对 09 硬编码深色规则做同选择器+day前缀提权覆盖。
   白天侧栏保持深墨绿（审美裁定：浅色页面+深色侧栏）。 */

/* ===== 侧栏主题开关（账号下方，替代原调试字样行）===== */
.sidebar-theme-toggle {
  margin: 10px 12px 12px;
  min-height: 38px;
  border: 1px solid rgba(151, 223, 248, 0.26);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.032)),
    rgba(7, 24, 36, 0.64);
  color: rgba(229, 242, 251, 0.86);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.sidebar-theme-toggle:hover {
  border-color: rgba(151, 223, 248, 0.5);
}

/* ===================== 通病1：业务视图首屏去「开发调试」壳 + 「可进入本模块」徽章卡 =====================
   竞品(Linear/Notion)首屏即内容；这些调试抽屉/徽章对正式使用是噪音,占首屏近1/3。
   只清一级业务视图容器内的。不分昼夜。
   R587B-SETTINGS-DEBUG-RETIRE(第587单域B同ID续办,4D05): settings 抽屉已从产品挂载链退役(21 decorateModuleView
   对 settings 无条件不挂且残留即清),原「不碰 #settings(owner 可在设置内展开 debug 抽屉)」豁免作废——
   本规则对 #settings 同步生效作兜底,防任何残留/回潮节点可见。 */
body :is(#projects, #ai, #aiMemory, #marketing, #quote, #cases, #materials, #comfyui, #settings) > :is(
  .account-usability-module-badge,
  .account-usability-debug-drawer,
  .full-local-r1-debug-drawer,
  .full-local-r1-selector,
  .local-auth-r5-module-badge
),
body :is(#projects, #ai, #aiMemory, #marketing, #quote, #cases, #materials, #comfyui, #settings) > [data-global-ui-debug-guard-r1] {
  display: none !important;
}

/* ===================== DAY 变量层 ===================== */
html[data-meifan-theme="day"] {
  color-scheme: light;
  --bg: #f2f4f0;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --surface-soft: #f7f8f5;
  --ink: #1e2524;
  --muted: #4b5450;
  --line: #dfe4df;
  --nav: #1d2a28;
  --nav-soft: rgba(29, 50, 48, 0.12);
  --green: #327a5e;
  --teal: #2d6f7a;
  --amber: #b47a28;
  --red: #b24b45;
  --shadow: 0 14px 34px rgba(25, 35, 32, 0.08);
  --tech-glass-bg: linear-gradient(160deg, #ffffff, #fbfcfa);
  --tech-glass-border: #e3e6e0;
  --tech-glass-highlight: rgba(255, 255, 255, 0.9);
  --tech-glass-glow: rgba(184, 134, 59, 0.1);
  --mf-theme-id: day;
  --mf-theme-ink: #1e2524;
  --mf-theme-ink-strong: #16211f;
  --mf-theme-muted: #4b5450;
  --mf-theme-muted-soft: #5f6864;
  --mf-theme-line: #e3e6e0;
  --mf-theme-line-strong: #cfd6cf;
  --mf-theme-card: linear-gradient(160deg, #ffffff, #fbfcfa);
  --mf-theme-card-strong: #ffffff;
  --mf-theme-dots:
    radial-gradient(circle, rgba(30, 37, 36, 0.12) 1px, transparent 1.4px),
    linear-gradient(160deg, #f4f5f1, #ebeee8);
  --mf-theme-glass-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 14px 34px rgba(25, 35, 32, 0.1),
    0 0 0 1px rgba(30, 37, 36, 0.02);
}

/* ===================== 平台底与氛围层 ===================== */
html[data-meifan-theme="day"] body:not(.home-mode) {
  color: var(--ink);
  background:
    radial-gradient(ellipse at 74% 6%, rgba(184, 134, 59, 0.06), transparent 38%),
    radial-gradient(ellipse at 12% 18%, rgba(45, 111, 122, 0.05), transparent 34%),
    linear-gradient(168deg, #f7f8f5 0%, #f0f2ee 52%, #e9ece6 100%);
}

html[data-meifan-theme="day"] body:not(.home-mode)::before {
  background-image: none;
  background:
    radial-gradient(ellipse at 80% 0%, rgba(255, 249, 235, 0.9), transparent 42%),
    radial-gradient(ellipse at 8% 92%, rgba(184, 134, 59, 0.05), transparent 40%);
  opacity: 0.8;
  filter: none;
}

html[data-meifan-theme="day"] body:not(.home-mode)::after {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.3), transparent 40%, rgba(233, 236, 230, 0.5));
}

/* ===================== 侧栏：白天保持深墨绿 ===================== */
html[data-meifan-theme="day"] body:not(.home-mode) .sidebar {
  border-right: 1px solid rgba(25, 35, 32, 0.16);
  background: linear-gradient(180deg, #233431, #182421);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: 14px 0 44px rgba(25, 35, 32, 0.14);
}

html[data-meifan-theme="day"] body:not(.home-mode) .sidebar :is(h1, h2, h3, strong, label) {
  color: #f2f5f1;
}

html[data-meifan-theme="day"] body:not(.home-mode) .sidebar :is(p, small, span) {
  color: rgba(219, 227, 221, 0.75);
}

html[data-meifan-theme="day"] body:not(.home-mode) .sidebar .account-ux-menu-card .account-menu-action-r49a.danger > span {
  color: #f07b76 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) .nav-item {
  color: rgba(233, 239, 233, 0.85);
}

html[data-meifan-theme="day"] body:not(.home-mode) .nav-item:hover,
html[data-meifan-theme="day"] body:not(.home-mode) .nav-item.active,
html[data-meifan-theme="day"] body:not(.home-mode) .brand:hover {
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 3px 0 0 #b8863b;
}

html[data-meifan-theme="day"] body:not(.home-mode) .brand-mark,
html[data-meifan-theme="day"] body:not(.home-mode) .account-avatar {
  background: linear-gradient(135deg, #e2c98f, #b8863b);
  color: #1d2a28;
  box-shadow: 0 0 18px rgba(184, 134, 59, 0.22);
}

html[data-meifan-theme="day"] body:not(.home-mode) .sidebar-account,
html[data-meifan-theme="day"] body:not(.home-mode) .account-popover,
html[data-meifan-theme="day"] body:not(.home-mode) .home-account-badge {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

html[data-meifan-theme="day"] body:not(.home-mode) .account-popover {
  color: #f2f5f1;
  background: linear-gradient(180deg, #253632, #1b2825);
  box-shadow: 0 22px 56px rgba(25, 35, 32, 0.3);
}

html[data-meifan-theme="day"] .sidebar-theme-toggle {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.07);
  color: rgba(240, 244, 240, 0.9);
}

html[data-meifan-theme="day"] .sidebar-theme-toggle:hover {
  border-color: rgba(226, 201, 143, 0.6);
  color: #ffffff;
}

/* ===================== 顶栏与通用面板 ===================== */
html[data-meifan-theme="day"] body:not(.home-mode) .topbar {
  border: 1px solid #e3e6e0;
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: blur(14px) saturate(110%);
  backdrop-filter: blur(14px) saturate(110%);
  box-shadow: 0 14px 34px rgba(25, 35, 32, 0.07);
}

html[data-meifan-theme="day"] body:not(.home-mode) :is(
  .panel, .metric, .quick-grid button, .work-flow-card, .step, .summary-pill,
  .upload-preview-row, .asset-folder, .review-board article, .content-lanes div,
  .case-card, .project-time-card, .project-kpi-card, .project-list-panel,
  .project-cockpit-panel, .project-card, .project-cockpit-card
) {
  border-color: #e3e6e0;
  background: linear-gradient(160deg, #ffffff, #fbfcfa);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 12px 30px rgba(25, 35, 32, 0.07);
}

html[data-meifan-theme="day"] body:not(.home-mode) :is(
  .panel, .metric, .work-flow-card, .ai-main-flow-card, .project-card,
  .project-cockpit-card, .case-card, .quote-template-board, .system-settings-level2-card
)::before {
  border: 1px solid rgba(255, 255, 255, 0.75);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.6), transparent 40%);
}

html[data-meifan-theme="day"] body:not(.home-mode) :is(
  .project-card, .project-kpi-card, .project-mini-asset-card, .ai-metric-card,
  .radar-card, .case-card, .quick-grid button, .work-flow-card
):hover,
html[data-meifan-theme="day"] body:not(.home-mode) :is(
  .project-card, .project-kpi-card, .project-mini-asset-card, .ai-metric-card,
  .radar-card, .case-card, .quick-grid button, .work-flow-card
):focus-visible {
  border-color: rgba(184, 134, 59, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 0 0 1px rgba(184, 134, 59, 0.12), 0 18px 44px rgba(25, 35, 32, 0.12);
}

/* ===================== 输入 / 按钮 / 分段控件 ===================== */
html[data-meifan-theme="day"] body:not(.home-mode) :is(
  .project-filter-chip, .project-user-menu,
  .quote-template-select select, input, select, textarea
) {
  border-color: #d8ddd6;
  background: #fbfcfa;
  color: var(--ink);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

html[data-meifan-theme="day"] body:not(.home-mode) :is(input, select, textarea)::placeholder {
  /* 第553单 P1-B(D1): #a4aca8 对浅底 #fbfcfa 实测仅 2.26, 提到 muted-soft 档(实测约 5.3), night 不动。 */
  color: #5f6864;
}

html[data-meifan-theme="day"] body:not(.home-mode) :is(input, select, textarea):focus {
  outline: 2px solid rgba(29, 50, 48, 0.3);
  outline-offset: 2px;
  border-color: #1d3230;
}

html[data-meifan-theme="day"] body:not(.home-mode) :is(
  .primary-action, .ghost, .quick-grid button, .segmented button,
  .project-alert-button, .project-list-page-controls button, .quote-step-nav button,
  .system-settings-rolebar button, .owner-backoffice-nav button,
  .admin-prompt-name-list button, .system-settings-category-nav button
) {
  border-color: #d8ddd6;
  color: var(--ink);
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 2px 8px rgba(25, 35, 32, 0.05);
}

html[data-meifan-theme="day"] body:not(.home-mode) .primary-action,
html[data-meifan-theme="day"] body:not(.home-mode) :is(
  .segmented .selected, .quote-step-nav button.active, .system-settings-rolebar button.active,
  .owner-backoffice-nav button.active, .system-settings-category-nav button.active
) {
  border-color: #1d3230;
  background: linear-gradient(150deg, #24403c, #1d3230);
  color: #f6f3ec;
  box-shadow: 0 10px 24px rgba(29, 50, 48, 0.24);
}

html[data-meifan-theme="day"] body:not(.home-mode) :is(.segmented button.selected, .segmented .selected) {
  border-color: #1d3230;
  background: linear-gradient(150deg, #24403c, #1d3230);
  color: #f6f3ec;
  box-shadow: 0 8px 20px rgba(29, 50, 48, 0.22);
}

html[data-meifan-theme="day"] body:not(.home-mode) #ai .segmented button.selected {
  border-color: #1d3230 !important;
  background: linear-gradient(150deg, #24403c, #1d3230) !important;
  color: #f6f3ec !important;
  box-shadow: 0 8px 20px rgba(29, 50, 48, 0.22) !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) :is(
  .ghost:hover, .quick-grid button:hover, .segmented button:hover,
  .project-list-page-controls button:hover:not(:disabled), .quote-step-nav button:hover
) {
  border-color: rgba(29, 50, 48, 0.5);
  color: #16211f;
}

/* ===================== 表格 / 状态徽章 ===================== */
html[data-meifan-theme="day"] body:not(.home-mode) :is(.table-wrap, .quote-template-scroll, .owner-account-table, .system-feature-map-table) {
  border-color: #e3e6e0;
}

html[data-meifan-theme="day"] body:not(.home-mode) :is(th, .quote-template-table th, .system-feature-map-table th) {
  color: #3c4744;
  background: #f1f3ee;
}

html[data-meifan-theme="day"] body:not(.home-mode) :is(td, .quote-template-table td, .system-feature-map-table td) {
  color: #1e2524;
  border-color: #e8ebe5;
}

html[data-meifan-theme="day"] body:not(.home-mode) :is(.status-pill, .badge, .status) {
  border: 1px solid rgba(30, 37, 36, 0.1);
  background: rgba(30, 37, 36, 0.05);
  color: #3c4744;
}

html[data-meifan-theme="day"] body:not(.home-mode) .status-pill.ready,
html[data-meifan-theme="day"] body:not(.home-mode) .badge,
html[data-meifan-theme="day"] body:not(.home-mode) .status {
  background: rgba(50, 122, 94, 0.1);
  color: #2c6b52;
}

html[data-meifan-theme="day"] body:not(.home-mode) .status-pill.review,
html[data-meifan-theme="day"] body:not(.home-mode) .status-pill.warn {
  background: rgba(180, 122, 40, 0.12);
  color: #96661f;
}

html[data-meifan-theme="day"] body:not(.home-mode) .status-pill.pending,
html[data-meifan-theme="day"] body:not(.home-mode) .status-pill.static {
  background: rgba(30, 37, 36, 0.06);
  color: #4b5450;
}

html[data-meifan-theme="day"] body:not(.home-mode) .status-pill.internal {
  background: rgba(45, 111, 122, 0.1);
  color: #285f68;
}

html[data-meifan-theme="day"] body:not(.home-mode) .status-pill.blocked,
html[data-meifan-theme="day"] body:not(.home-mode) .status-pill.urgent {
  background: rgba(178, 75, 69, 0.1);
  color: #9c3f39;
}

/* ===================== 弹窗 / 抽屉 / Toast（全景族）===================== */
/* 蒙层白天保持暗色隔离（标准做法），卡体换白瓷 */
html[data-meifan-theme="day"] body:not(.home-mode) :is(
  .project-create-modal, .project-message-center, .project-dashboard-upload-modal,
  .project-module-detail-modal, .project-task-list-modal, .construction-task-modal,
  .project-material-preview-modal, .project-edit-modal, .project-review-modal,
  .case-share-modal, .ai-assist-modal, .video-disclaimer-modal
) {
  background: rgba(24, 30, 28, 0.45);
  -webkit-backdrop-filter: blur(10px) saturate(105%);
  backdrop-filter: blur(10px) saturate(105%);
}

html[data-meifan-theme="day"] body:not(.home-mode) :is(
  .project-create-dialog, .project-message-dialog, .project-dashboard-upload-dialog,
  .project-module-detail-dialog, .project-task-list-dialog, .construction-task-dialog,
  .project-material-preview-dialog, .project-edit-dialog, .project-review-dialog,
  .case-share-dialog, .ai-assist-modal-card, .video-disclaimer-card
) {
  border: 1px solid #e3e6e0;
  background: #ffffff;
  color: var(--ink);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: 0 30px 80px rgba(25, 35, 32, 0.24);
}

html[data-meifan-theme="day"] body:not(.home-mode) .project-modal-head {
  border-bottom: 1px solid #e8ebe5;
}

html[data-meifan-theme="day"] body:not(.home-mode) :is(.toast, .ops-canvas-toast) {
  border: 1px solid #e3e6e0;
  background: #ffffff;
  color: var(--ink);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: 0 18px 48px rgba(25, 35, 32, 0.18);
}

html[data-meifan-theme="day"] body:not(.home-mode) :is(.modal-card, .saved-drawer) {
  border-color: #e3e6e0 !important;
  background: #ffffff !important;
  color: var(--ink) !important;
}

/* 弹窗内文字：09 对多数 dialog 的 p/small 显式染了浅色，白天统一翻墨色/muted */
html[data-meifan-theme="day"] body:not(.home-mode) :is(
  .project-create-dialog, .project-message-dialog, .project-dashboard-upload-dialog,
  .project-module-detail-dialog, .project-task-list-dialog, .construction-task-dialog,
  .project-material-preview-dialog, .project-edit-dialog, .project-review-dialog,
  .case-share-dialog, .ai-assist-modal-card, .ai-assist-ppt-modal-card, .video-disclaimer-card,
  .modal-card, .marketing-video-output-dialog, .project-content-script-modal
) :is(h1, h2, h3, h4, strong, b, label) {
  color: #16211f !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) :is(
  .project-create-dialog, .project-message-dialog, .project-dashboard-upload-dialog,
  .project-module-detail-dialog, .project-task-list-dialog, .construction-task-dialog,
  .project-material-preview-dialog, .project-edit-dialog, .project-review-dialog,
  .case-share-dialog, .ai-assist-modal-card, .ai-assist-ppt-modal-card, .video-disclaimer-card,
  .modal-card, .marketing-video-output-dialog, .project-content-script-modal
) :is(p, small, span, em, time, li, dt, dd, .detail-body) {
  color: #4b5450 !important;
}

/* 项目弹窗内部件（09:137-174 对应） */
html[data-meifan-theme="day"] body:not(.home-mode) :is(
  .project-dashboard-upload-dialog, .project-module-detail-dialog,
  .project-task-list-dialog, .construction-task-dialog
) :is(
  input:not([type="checkbox"]):not([type="file"]), select, textarea, button, .ghost, .primary-action
) {
  border-color: #d8ddd6 !important;
  background: #fbfcfa !important;
  color: var(--ink) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) :is(
  .project-dashboard-upload-dialog, .project-module-detail-dialog,
  .project-task-list-dialog, .construction-task-dialog
) .primary-action {
  border-color: #1d3230 !important;
  background: linear-gradient(150deg, #24403c, #1d3230) !important;
  color: #f6f3ec !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) :is(
  .project-dashboard-upload-dialog, .project-module-detail-dialog,
  .project-task-list-dialog, .construction-task-dialog
) :is(
  .project-module-record-preview, .project-mini-asset-preview, .project-mini-assets figure > span,
  .project-ai-latest-preview > span, .project-content-library-media-grid > div, .project-upload-qr,
  .project-quote-file-icon, .project-quote-file-row em, .project-payment-bar, .project-payment-droplet,
  .project-payment-droplet span, .construction-material-thumb, .construction-step-dot,
  .project-ai-design-bucket > span, .project-ai-design-bucket .status-pill,
  .dashboard-upload-task-card .status-pill, .project-task-list-summary .status-pill,
  .construction-task-card .status-pill, .construction-task-evidence-list li, .construction-task-file-row
) {
  border-color: #e3e6e0 !important;
  background: #f7f8f5 !important;
  color: var(--ink) !important;
}

/* ===================== 各分片自定义弹窗面板（非09族，蒙层保留深，面板本体翻白）=====================
   已核：这些分片自绘弹窗默认 hidden，运行时可见元素审计扫不到，靠 CSS 静态清单收全。
   蒙层(*-modal/-overlay/-backdrop 半透明)保留深色隔离；此处只翻面板本体。
   画布节点(ai-assist-node/aile-node-card/*-choice/aigen-flow-node/wm-comp-card)白天保留深色，不在此列。 */
html[data-meifan-theme="day"] body:not(.home-mode) :is(
  .aigen-node-config-dialog, .aigen-material-modal-panel, .aigen-output-detail-card, .aigen-output-library-panel,
  .ai-assist-modal-card, .ai-assist-ppt-modal-card,
  .quote-builder-preview-dialog, .ctpl-wizard-panel, .ctpl-modal-card,
  .reflib-community-card, .reflib-detail-dialog, .reflib-upload-dialog, .card-lib-dialog, .system-card-library-panel,
  .comfy-modal-card,
  .platform-api-gate-modal-card, .settings-ia-r1-modal-card,
  .api-center-r5-key-drawer-panel, .api-center-r6-usage-panel,
  .cm-modal-card
) {
  border: 1px solid #e3e6e0 !important;
  background: #ffffff !important;
  color: var(--ink) !important;
  box-shadow: 0 30px 80px rgba(25, 35, 32, 0.24) !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) :is(
  .aigen-node-config-dialog, .aigen-material-modal-panel, .aigen-output-detail-card, .aigen-output-library-panel,
  .ai-assist-modal-card, .ai-assist-ppt-modal-card,
  .quote-builder-preview-dialog, .ctpl-wizard-panel, .ctpl-modal-card,
  .reflib-community-card, .reflib-detail-dialog, .reflib-upload-dialog, .card-lib-dialog, .system-card-library-panel,
  .comfy-modal-card, .platform-api-gate-modal-card, .settings-ia-r1-modal-card,
  .api-center-r5-key-drawer-panel, .api-center-r6-usage-panel, .cm-modal-card
) :is(h1, h2, h3, h4, strong, b, label, dt) {
  color: #16211f !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) :is(
  .aigen-node-config-dialog, .aigen-material-modal-panel, .aigen-output-detail-card, .aigen-output-library-panel,
  .ai-assist-modal-card, .ai-assist-ppt-modal-card,
  .quote-builder-preview-dialog, .ctpl-wizard-panel, .ctpl-modal-card,
  .reflib-community-card, .reflib-detail-dialog, .reflib-upload-dialog, .card-lib-dialog, .system-card-library-panel,
  .comfy-modal-card, .platform-api-gate-modal-card, .settings-ia-r1-modal-card,
  .api-center-r5-key-drawer-panel, .api-center-r6-usage-panel, .cm-modal-card
) :is(p, small, span, em, time, li, dd, .detail-body) {
  color: #4b5450 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) :is(
  .aigen-node-config-dialog, .aigen-material-modal-panel, .aigen-output-detail-card, .aigen-output-library-panel,
  .ai-assist-modal-card, .ai-assist-ppt-modal-card,
  .quote-builder-preview-dialog, .ctpl-wizard-panel, .ctpl-modal-card,
  .reflib-community-card, .reflib-detail-dialog, .reflib-upload-dialog, .card-lib-dialog, .system-card-library-panel,
  .comfy-modal-card, .platform-api-gate-modal-card, .settings-ia-r1-modal-card,
  .api-center-r5-key-drawer-panel, .api-center-r6-usage-panel, .cm-modal-card
) :is(input, select, textarea) {
  border: 1px solid #d8ddd6 !important;
  background: #fbfcfa !important;
  color: #1e2524 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) :is(
  .aigen-node-config-dialog, .aigen-material-modal-panel, .aigen-output-detail-card, .aigen-output-library-panel,
  .ai-assist-modal-card, .ai-assist-ppt-modal-card,
  .quote-builder-preview-dialog, .ctpl-wizard-panel, .ctpl-modal-card,
  .reflib-detail-dialog, .reflib-upload-dialog, .card-lib-dialog, .system-card-library-panel,
  .comfy-modal-card, .platform-api-gate-modal-card, .settings-ia-r1-modal-card,
  .api-center-r5-key-drawer-panel, .api-center-r6-usage-panel, .cm-modal-card
) button:not(.danger):not(.primary-action):not(.active):not(.selected) {
  border: 1px solid #d8ddd6 !important;
  background: #ffffff !important;
  color: #3c4744 !important;
}

/* 弹窗内表格 */
html[data-meifan-theme="day"] body:not(.home-mode) :is(
  .api-center-r5-key-drawer-panel, .api-center-r6-usage-panel, .aigen-output-library-panel, .cm-modal-card
) :is(td, th) {
  color: #1e2524 !important;
  border-color: #e8ebe5 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) :is(
  .api-center-r5-key-drawer-panel, .api-center-r6-usage-panel, .aigen-output-library-panel, .cm-modal-card
) th {
  background: #f1f3ee !important;
}

/* ops 配置弹窗（09:194-205 对应） */
html[data-meifan-theme="day"] body:not(.home-mode) #opsComfyPopover.ops-config-popover,
html[data-meifan-theme="day"] body #opsComfyPopover.ops-config-popover.ops-top-modal-layer {
  background: rgba(24, 30, 28, 0.42) !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) #opsComfyPopover .ops-config-modal-card {
  border: 1px solid #e3e6e0 !important;
  background: #ffffff !important;
  box-shadow: 0 28px 80px rgba(25, 35, 32, 0.26) !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) #opsComfyPopover :is(.ops-config-modal-head, .ops-config-modal-footer) {
  border-color: #e8ebe5 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) #opsComfyPopover .ops-config-modal-footer {
  background: #f7f8f5 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) #opsComfyPopover :is(.ops-config-modal-title strong, .ops-config-modal-body > strong) {
  color: #16211f !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) #opsComfyPopover :is(.ops-config-modal-title small, .ops-config-modal-body small, .ops-node-note) {
  color: #4b5450 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) #opsComfyPopover :is(.ops-config-modal-icon, .ghost-btn) {
  border: 1px solid #d8ddd6 !important;
  background: #ffffff !important;
  color: #3c4744 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) #opsComfyPopover :is(.ops-mini-choice, .ops-material-choice) {
  border-color: #d8ddd6 !important;
  background: #fbfcfa !important;
  color: #3c4744 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) #opsComfyPopover .ops-mini-choice.active,
html[data-meifan-theme="day"] body:not(.home-mode) #opsComfyPopover .ops-material-choice:has(input:checked) {
  border-color: rgba(50, 122, 94, 0.6) !important;
  background: rgba(50, 122, 94, 0.1) !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) #opsNodeShell .ops-project-context-bar select,
html[data-meifan-theme="day"] body:not(.home-mode) #opsNodeShell .ops-config-modal-card select,
html[data-meifan-theme="day"] body:not(.home-mode) #opsNodeShell .ops-config-modal-card input,
html[data-meifan-theme="day"] body:not(.home-mode) #opsNodeShell .ops-config-modal-card textarea {
  border: 1px solid #d8ddd6 !important;
  background: #fbfcfa !important;
  color: #1e2524 !important;
  box-shadow: none !important;
}

/* marketing 视频出片弹窗（09:243-256 对应） */
html[data-meifan-theme="day"] .marketing-video-output-modal {
  background: rgba(24, 30, 28, 0.45);
}

html[data-meifan-theme="day"] .marketing-video-output-dialog {
  border: 1px solid #e3e6e0;
  background: #ffffff;
  box-shadow: 0 28px 76px rgba(25, 35, 32, 0.24);
}

html[data-meifan-theme="day"] .marketing-video-output-dialog strong {
  color: #16211f;
}

html[data-meifan-theme="day"] :is(.marketing-video-output-row, .marketing-video-output-empty, .ai-editing-r9-output-owner) {
  border-color: #e3e6e0;
  background: #f7f8f5;
}

html[data-meifan-theme="day"] .marketing-video-output-row em,
html[data-meifan-theme="day"] .marketing-video-output-row-actions a,
html[data-meifan-theme="day"] .ai-editing-r9-output-grid em {
  color: #2d6f7a;
}

html[data-meifan-theme="day"] .marketing-video-output-filter-label select,
html[data-meifan-theme="day"] .ai-editing-r9-output-grid select,
html[data-meifan-theme="day"] .ai-editing-r9-output-grid input {
  border-color: #d8ddd6;
  background: #fbfcfa;
  color: #1e2524;
}

/* ===================== 报价 quote 系列 ===================== */
html[data-meifan-theme="day"] body:not(.home-mode) .quote-template-board {
  border-color: #e3e6e0;
  background: linear-gradient(160deg, #ffffff, #fbfcfa);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 16px 40px rgba(25, 35, 32, 0.08);
}

html[data-meifan-theme="day"] body:not(.home-mode) .quote-template-board-head {
  border-bottom-color: #e8ebe5;
  background: #f7f8f5;
}

html[data-meifan-theme="day"] body:not(.home-mode) .quote-step-nav {
  border-bottom-color: #e8ebe5;
  background: #f4f5f1;
}

html[data-meifan-theme="day"] body:not(.home-mode) .quote-step-nav button {
  border-right-color: #e8ebe5;
}

html[data-meifan-theme="day"] body:not(.home-mode) :is(
  .quote-template-board-head h2, .quote-template-board-head h3, .quote-template-inputs label,
  .quote-config-grid label, .quote-config-multi, .quote-operable-section-head h3,
  .quote-template-table td, .quote-card-preview strong, .quote-card-preview p,
  .quote-template-architecture strong
) {
  color: #1e2524;
}

html[data-meifan-theme="day"] body:not(.home-mode) :is(
  .quote-template-board-head small, .quote-template-inputs small, .quote-operable-section-head span,
  .quote-template-meta, .quote-card-preview, .quote-template-export-preview, .quote-template-architecture span
) {
  color: #4b5450;
}

html[data-meifan-theme="day"] body:not(.home-mode) :is(
  .quote-template-totals span, .quote-output-cards article, .quote-config-multi,
  .quote-readonly-bridge, .quote-card-preview, .quote-template-export-preview, .quote-template-architecture
) {
  border-color: #e3e6e0;
  background: #ffffff;
  color: #3c4744;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 8px 22px rgba(25, 35, 32, 0.06);
}

html[data-meifan-theme="day"] body:not(.home-mode) :is(.quote-template-totals strong, .quote-output-cards strong) {
  color: #16211f;
}

html[data-meifan-theme="day"] body:not(.home-mode) .quote-output-cards article.internal,
html[data-meifan-theme="day"] body:not(.home-mode) .quote-template-internal,
html[data-meifan-theme="day"] body:not(.home-mode) .danger {
  border-color: rgba(180, 122, 40, 0.4);
  background: rgba(180, 122, 40, 0.08);
  color: #96661f;
}

html[data-meifan-theme="day"] body:not(.home-mode) .quote-template-table th {
  background: #f1f3ee;
  color: #3c4744;
  border-bottom-color: #e3e6e0;
}

html[data-meifan-theme="day"] body:not(.home-mode) .quote-template-table td {
  border-bottom-color: #e8ebe5;
}

html[data-meifan-theme="day"] body:not(.home-mode) :is(
  .quote-template-select select, .quote-template-inputs input, .quote-template-inputs select,
  .quote-config-grid input, .quote-config-grid select, .quote-detail-editor input
) {
  border-color: #d8ddd6;
  background: #fbfcfa;
  color: #1e2524;
  box-shadow: none;
}

html[data-meifan-theme="day"] body:not(.home-mode) :is(.quote-meifan-final-shell, .quote-meifan-final-frame) {
  background: #f7f8f5;
}

html[data-meifan-theme="day"] body:not(.home-mode) .quote-meifan-final-shell {
  border: 1px solid #e3e6e0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 12px 32px rgba(25, 35, 32, 0.07);
}

/* ===================== 画布 / 节点流（AI设计师 / 营销 / 白膜）===================== */
html[data-meifan-theme="day"] body:not(.home-mode) .flow-canvas {
  background:
    radial-gradient(circle, rgba(30, 37, 36, 0.1) 1px, transparent 1.4px) 0 0 / 20px 20px,
    linear-gradient(160deg, #f4f5f1, #ecefe9);
}

html[data-meifan-theme="day"] body:not(.home-mode) .flow-edge-layer path {
  stroke: rgba(45, 111, 122, 0.5);
}

html[data-meifan-theme="day"] body:not(.home-mode) .flow-edge-layer text {
  fill: #3c4744;
  stroke: rgba(255, 255, 255, 0.9);
}

html[data-meifan-theme="day"] body:not(.home-mode) .project-card.selected,
html[data-meifan-theme="day"] body:not(.home-mode) .project-kpi-card.selected {
  border-color: rgba(29, 50, 48, 0.55);
  box-shadow: inset 3px 0 0 #b8863b, inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 18px 44px rgba(25, 35, 32, 0.12);
}

html[data-meifan-theme="day"] body:not(.home-mode) #ai :is(.aigen-product-stage, .ai-assist-canvas) {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 12px 32px rgba(25, 35, 32, 0.07) !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) #marketing :is(.ops-flow-canvas, .ops-node-stage, .video-publish-stage) {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 12px 32px rgba(25, 35, 32, 0.07) !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) #ai :is(
  .ai-assist-modal-card input, .ai-assist-modal-card select, .ai-assist-modal-card textarea,
  .aigen-project-picker select, .aigen-project-selector select,
  .technical-details input, .technical-details select, .technical-details textarea
) {
  border-color: #d8ddd6 !important;
  background: #fbfcfa !important;
  color: #1e2524 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) #marketing :is(input:not([type="checkbox"]), select, textarea) {
  border-color: #d8ddd6 !important;
  background: #fbfcfa !important;
  color: #1e2524 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) #marketing button {
  border-color: #d8ddd6 !important;
  background: #ffffff !important;
  color: #3c4744 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 2px 8px rgba(25, 35, 32, 0.05) !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) #marketing button:hover {
  border-color: rgba(29, 50, 48, 0.45) !important;
  background: #f7f8f5 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) #opsNodeShell.ops-comfy-shell,
html[data-meifan-theme="day"] body:not(.home-mode) #opsNodeShell.ops-comfy-shell:has(.ops-output-drawer:not(.collapsed)),
html[data-meifan-theme="day"] body:not(.home-mode) #opsNodeShell.ops-comfy-shell.output-expanded {
  background: linear-gradient(160deg, #ffffff, #f4f6f2) !important;
  border: 1px solid #e3e6e0 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 14px 36px rgba(25, 35, 32, 0.08) !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) #opsNodeShell .ops-project-context-bar {
  border: 1px solid #e3e6e0 !important;
  background: #f7f8f5 !important;
  box-shadow: none !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) #opsNodeShell .ops-project-context-bar span {
  color: #1e2524 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) #opsNodeShell .ops-project-context-bar small {
  color: #4b5450 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) #opsNodeShell .ops-comfy-stage {
  border: 1px solid #e3e6e0 !important;
  background:
    radial-gradient(circle at 14px 14px, rgba(30, 37, 36, 0.12) 1.15px, transparent 1.2px) 0 0 / 22px 22px,
    linear-gradient(180deg, #f4f5f1, #ecefe9) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) #opsNodeShell .ops-comfy-node.draggable-node {
  border: 1px solid #d8ddd6 !important;
  background: linear-gradient(160deg, #ffffff, #f7f8f4) !important;
  color: #1e2524 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 8px 20px rgba(25, 35, 32, 0.1) !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) #opsNodeShell .ops-comfy-node.draggable-node strong {
  color: #16211f !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) #opsNodeShell .ops-comfy-node.draggable-node small {
  color: #4b5450 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) #opsNodeShell .ops-comfy-node.draggable-node:hover,
html[data-meifan-theme="day"] body:not(.home-mode) #opsNodeShell .ops-comfy-node.draggable-node.active,
html[data-meifan-theme="day"] body:not(.home-mode) #opsNodeShell .ops-comfy-node.draggable-node.dragging {
  border-color: rgba(184, 134, 59, 0.55) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 12px 28px rgba(25, 35, 32, 0.14) !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) #opsNodeShell .ops-comfy-node.node-script::after {
  border: 1px dashed rgba(30, 37, 36, 0.25) !important;
  color: #4b5450 !important;
  background: rgba(30, 37, 36, 0.04) !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) #opsNodeShell :is(.ops-output-drawer, .ops-output-drawer.collapsed, .ops-output-drawer.open) {
  border: 1px solid #e3e6e0 !important;
  background: linear-gradient(180deg, #ffffff, #f4f6f2) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) .video-publish-workflow-panel .video-publish-stage .video-publish-node {
  border-color: #d8ddd6 !important;
  background: linear-gradient(160deg, #ffffff, #f7f8f4) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 8px 20px rgba(25, 35, 32, 0.1) !important;
}

/* ===================== 营销尾部深色卡族（09:213-279 对应）===================== */
html[data-meifan-theme="day"] :is(.publishing-account-card, .ops-account-meta-card) {
  border-color: #e3e6e0;
  background: #ffffff;
}

html[data-meifan-theme="day"] :is(.ops-safety-gate-grid span, .ai-editing-worker-card) {
  border-color: #e3e6e0;
  background: #f7f8f5;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

html[data-meifan-theme="day"] :is(.ai-editing-worker-status-r2, .ai-editing-r3-actions, .ai-editing-r4-operable, .ai-local-worker-r1) {
  border-color: #e3e6e0;
  background: #ffffff;
}

html[data-meifan-theme="day"] :is(
  .ai-editing-r3-contract-grid article, .ai-editing-r4-status-grid span, .ai-editing-r4-candidate-grid span,
  .ai-editing-r4-sync-grid span, .ai-editing-r4-candidate-panel, .ai-editing-r4-sync-panel,
  .ai-editing-output-asset-list span, .ai-local-worker-r1-runtime span, .ai-local-worker-r1-status span,
  .ai-local-worker-r1-node-grid span, .ai-local-worker-r1-log span, .ai-local-worker-r1-backstage > div
) {
  border-color: #e3e6e0;
  background: #f7f8f5;
  color: #3c4744;
}

html[data-meifan-theme="day"] .ai-editing-r3-json {
  border-color: #d8ddd6;
  background: #f4f5f1;
  color: #285f68;
}

html[data-meifan-theme="day"] .ai-editing-r4-stepbar button {
  border-color: #d8ddd6;
  background: #ffffff;
  color: #4b5450;
}

html[data-meifan-theme="day"] .ai-editing-r4-stepbar button.current {
  border-color: rgba(50, 122, 94, 0.55);
  color: #1e2524;
}

html[data-meifan-theme="day"] .ai-editing-r4-stepbar button.done {
  border-color: rgba(50, 122, 94, 0.45);
  background: rgba(50, 122, 94, 0.1);
  color: #2c6b52;
}

html[data-meifan-theme="day"] .ai-local-worker-r1 :is(b, em, code, small, span, label) {
  color: #3c4744;
}

html[data-meifan-theme="day"] .ai-local-worker-r1-simple select,
html[data-meifan-theme="day"] .ai-local-worker-r1-simple input {
  border-color: #d8ddd6;
  background: #fbfcfa;
  color: #1e2524;
}

html[data-meifan-theme="day"] .ai-local-worker-r1-preview {
  border-color: rgba(30, 37, 36, 0.2);
  background: repeating-linear-gradient(-45deg, rgba(30, 37, 36, 0.03), rgba(30, 37, 36, 0.03) 8px, rgba(255, 255, 255, 0.5) 8px, rgba(255, 255, 255, 0.5) 16px);
}

html[data-meifan-theme="day"] .ai-local-worker-r1-debug {
  border-color: rgba(180, 122, 40, 0.35);
  background: #fbf8f2;
}

html[data-meifan-theme="day"] .ai-local-worker-r1-debug summary {
  color: #96661f;
}

html[data-meifan-theme="day"] #marketingSubTabs [data-content-marketing-workspace-entry] {
  border-color: #d8ddd6;
  background: #ffffff;
  color: #4b5450;
}

html[data-meifan-theme="day"] #marketingSubTabs [data-content-marketing-workspace-entry].active {
  border-color: rgba(50, 122, 94, 0.55);
  background: rgba(50, 122, 94, 0.1);
  color: #1e2524;
  box-shadow: none;
}

html[data-meifan-theme="day"] #marketingSubTabs [data-content-marketing-workspace-entry="local_worker"] {
  border-color: rgba(180, 122, 40, 0.4);
  color: #96661f;
}

html[data-meifan-theme="day"] .content-marketing-workflow-summary-r1 {
  border-color: #e3e6e0;
  background: #ffffff;
}

html[data-meifan-theme="day"] .content-marketing-workflow-summary-r1 strong {
  color: #16211f;
}

html[data-meifan-theme="day"] .content-marketing-workflow-summary-r1 span {
  color: #4b5450;
}

/* ===================== 项目内容剧本卡（09:149-172 对应）===================== */
html[data-meifan-theme="day"] body:not(.home-mode) .project-content-script-library {
  border: 1px solid #e3e6e0 !important;
  background: #f7f8f5 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) .project-dashboard-panel--contentLibrary .project-dashboard-panel-body,
html[data-meifan-theme="day"] body:not(.home-mode) .project-content-script-library .project-module-empty {
  border-color: #e3e6e0 !important;
  background: #fbfcfa !important;
  color: var(--ink) !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) .project-content-script-card {
  border: 1px solid #e3e6e0;
  background: linear-gradient(160deg, #ffffff, #fbfcfa);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 8px 20px rgba(25, 35, 32, 0.06);
}

html[data-meifan-theme="day"] body:not(.home-mode) .project-content-script-card dt {
  color: #4b5450;
}

html[data-meifan-theme="day"] body:not(.home-mode) .project-content-script-modal .project-module-detail-dialog {
  border: 1px solid #e3e6e0 !important;
  background: #ffffff !important;
  box-shadow: 0 24px 70px rgba(25, 35, 32, 0.24) !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) .project-content-script-modal .project-modal-head {
  border-bottom: 1px solid #e8ebe5 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) .project-content-script-detail label > p,
html[data-meifan-theme="day"] body:not(.home-mode) .project-content-script-detail label > strong {
  border-color: #e3e6e0;
  background: #f7f8f5;
  color: var(--ink);
}

html[data-meifan-theme="day"] body:not(.home-mode) .project-content-script-detail textarea,
html[data-meifan-theme="day"] body:not(.home-mode) .project-content-script-detail input {
  border-color: #d8ddd6;
  background: #fbfcfa;
  color: var(--ink);
}

html[data-meifan-theme="day"] body:not(.home-mode) .project-content-script-folder {
  border-color: #e3e6e0;
  background: #fbfcfa;
}

html[data-meifan-theme="day"] body:not(.home-mode) .project-content-script-folder-head {
  border-bottom-color: #e8ebe5;
}

html[data-meifan-theme="day"] body:not(.home-mode) .project-content-script-asset-card {
  border-color: #e3e6e0;
  background: #ffffff;
  color: var(--ink);
}

html[data-meifan-theme="day"] body:not(.home-mode) .project-content-script-asset-card span {
  border-color: #e8ebe5;
  background: #f1f3ee !important;
}

/* ===================== 空状态 / 杂项 ===================== */
html[data-meifan-theme="day"] body:not(.home-mode) :is(
  .project-empty-state, .ad-validation-box, .ad-validation-box.ok,
  .project-site-stage-empty-upload, .quote-output-cards article.internal,
  .quote-template-internal, .danger
) {
  border-color: #e3e6e0;
  background: #f7f8f5;
  color: #4b5450;
}

html[data-meifan-theme="day"] body:not(.home-mode) :is(
  .project-mini-asset-preview, .project-mini-assets figure > span,
  .project-placeholder-asset-card .project-mini-asset-preview,
  .project-content-library-media-grid, .project-ai-latest-preview,
  .construction-task-dropzone, .aigen-generated-slot-grid i
) {
  border-color: #e3e6e0 !important;
  background: #f4f5f1 !important;
  color: #4b5450 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) :is(.project-upload-slot b, .aigen-flow-node b, .video-publish-node b) {
  color: #f6f3ec !important;
  background: linear-gradient(135deg, #b8863b, #96661f) !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) :is(
  .project-ai-material-action, .project-cockpit-actions button, .project-mini-asset-preview-button,
  .aigen-product-left input, .aigen-product-left select, .aigen-product-left textarea,
  .aigen-product-right input, .aigen-product-right select, .ai-assist-output-item input,
  .case-share-filters input, .case-share-filters select, .case-share-edit-form input,
  .case-share-edit-form select, .case-share-edit-form textarea
) {
  border-color: #d8ddd6 !important;
  background: #fbfcfa !important;
  color: #1e2524 !important;
  box-shadow: none !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) :is(
  .aigen-flow-node.active, .project-mini-asset-card:hover, .project-upload-slot:hover, .case-share-card:hover
) {
  border-color: rgba(184, 134, 59, 0.5) !important;
  background: #ffffff !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 0 0 1px rgba(184, 134, 59, 0.12), 0 16px 40px rgba(25, 35, 32, 0.12) !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) .project-brand-title .project-brand-mark,
html[data-meifan-theme="day"] body:not(.home-mode) .project-card .project-card-side,
html[data-meifan-theme="day"] body:not(.home-mode) .project-card .project-card-side em {
  border: 1px solid #e3e6e0 !important;
  background: #f7f8f5 !important;
  color: var(--ink) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) .project-ai-design-library :is(
  .project-ai-library-group, .project-ai-library-chips, .project-ai-library-chips .project-ai-library-stat-card
) {
  background: #f7f8f5 !important;
  color: var(--ink) !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) .project-card-progress {
  background: linear-gradient(90deg, rgba(50, 122, 94, 0.7), rgba(50, 122, 94, 0.2)), rgba(30, 37, 36, 0.08) !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) .project-card-progress i,
html[data-meifan-theme="day"] body:not(.home-mode) .project-card-progress span {
  background: rgba(50, 122, 94, 0.85) !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) #ai .ai-board-inline-panel {
  border: 1px solid #e3e6e0 !important;
  background: #ffffff !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 16px 40px rgba(25, 35, 32, 0.1) !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) #ai .ai-board-inline-frame {
  border: 1px solid #e3e6e0 !important;
  background: #fbfcfa !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7) !important;
}

/* ===================== 账号线徽章卡 / 开发调试抽屉 / 项目页残块（运行时审计命中）===================== */
html[data-meifan-theme="day"] body:not(.home-mode) .account-usability-module-badge {
  border-color: #e3e6e0;
  background: linear-gradient(160deg, #ffffff, #fbfcfa);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 12px 30px rgba(25, 35, 32, 0.07);
}

html[data-meifan-theme="day"] body:not(.home-mode) .account-usability-module-badge :is(strong, small) {
  color: var(--ink);
}

html[data-meifan-theme="day"] body:not(.home-mode) .account-usability-module-badge small {
  color: #4b5450;
}

html[data-meifan-theme="day"] body:not(.home-mode) :is(
  .account-usability-debug-drawer,
  .full-local-r1-debug-drawer,
  .local-auth-r5-debug-drawer,
  .aile-debug-drawer,
  [data-global-ui-debug-guard-r1]
) {
  border-color: #e3e6e0 !important;
  background: #f4f5f1 !important;
  color: #4b5450 !important;
  box-shadow: none !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) :is(
  .account-usability-debug-drawer summary,
  .full-local-r1-debug-drawer summary,
  .local-auth-r5-debug-drawer summary,
  .aile-debug-drawer summary,
  [data-global-ui-debug-guard-r1] summary
) {
  color: #5f6864 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) .project-reference-topbar {
  border-color: #e3e6e0 !important;
  background: linear-gradient(160deg, #ffffff, #f6f7f3) !important;
  color: var(--ink) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 12px 30px rgba(25, 35, 32, 0.07) !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) .project-reference-topbar :is(h1, h2, h3, strong, b) {
  color: #16211f !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) .project-reference-topbar :is(p, small, span) {
  color: #4b5450 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) :is(.project-module-empty, .project-module-empty.compact) {
  border-color: #e3e6e0 !important;
  background: #f4f5f1 !important;
  color: #4b5450 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) .project-module-empty :is(strong, small, p) {
  color: #4b5450 !important;
}

/* ===================== 素材库 reflib（10号分片）===================== */
html[data-meifan-theme="day"] body:not(.home-mode) :is(
  .reflib-upload, .reflib-category-tree, .reflib-card, .reflib-shared-note,
  .reflib-content-search, .reflib-community-entry, .reflib-upload-scope-note
) {
  border-color: #e3e6e0 !important;
  background: linear-gradient(160deg, #ffffff, #fbfcfa) !important;
  color: var(--ink) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 8px 22px rgba(25, 35, 32, 0.06) !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) .reflib-thumb {
  border-color: #e8ebe5 !important;
  background: #f1f3ee !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) :is(.reflib-upload, .reflib-category-tree, .reflib-card, .reflib-shared-note) :is(strong, b, label, h3, h4) {
  color: #16211f !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) :is(.reflib-upload, .reflib-category-tree, .reflib-card, .reflib-shared-note) :is(p, small, span, em) {
  color: #4b5450 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) .reflib-category-tree button {
  border-color: #d8ddd6 !important;
  background: #ffffff !important;
  color: #3c4744 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) .reflib-category-tree button.active {
  border-color: #1d3230 !important;
  background: linear-gradient(150deg, #24403c, #1d3230) !important;
  color: #f6f3ec !important;
}

/* 社区弹窗内：规则卡 + 素材卡 + 缩略图占位 */
html[data-meifan-theme="day"] body:not(.home-mode) :is(.reflib-community-rules div, .reflib-community-asset) {
  border-color: #e3e6e0 !important;
  background: #f7f8f5 !important;
  color: var(--ink) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) :is(.reflib-community-rules, .reflib-community-asset) :is(dt, strong, b) {
  color: #16211f !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) :is(.reflib-community-rules, .reflib-community-asset) :is(dd, small, span, p) {
  color: #4b5450 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) .reflib-community-thumb {
  border-color: #e8ebe5 !important;
  background: #eef0eb !important;
}

/* ===================== AI记忆库（34/35号 R4 面板；星图 surface 保留深色可视化）===================== */
html[data-meifan-theme="day"] body:not(.home-mode) :is(
  .ai-memory-r4-journal-composer, .ai-memory-r4-side, .ai-memory-r4-head, .ai-memory-r4-hint
) {
  border-color: #e3e6e0 !important;
  background: linear-gradient(160deg, #ffffff, #fbfcfa) !important;
  color: var(--ink) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 8px 22px rgba(25, 35, 32, 0.06) !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) :is(
  .ai-memory-r4-journal-composer, .ai-memory-r4-side, .ai-memory-r4-head, .ai-memory-r4-hint
) :is(strong, b, label, h2, h3, h4) {
  color: #16211f !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) :is(
  .ai-memory-r4-journal-composer, .ai-memory-r4-side, .ai-memory-r4-head, .ai-memory-r4-hint
) :is(p, small, span, em, time) {
  color: #4b5450 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) :is(
  .ai-memory-r4-journal-composer, .ai-memory-r4-side
) :is(input, textarea, select) {
  border-color: #d8ddd6 !important;
  background: #fbfcfa !important;
  color: #1e2524 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) :is(
  .ai-memory-r4-journal-composer, .ai-memory-r4-side, .ai-memory-r4-head
) button {
  border-color: #d8ddd6 !important;
  background: #ffffff !important;
  color: #3c4744 !important;
}

/* 星图画布保留深色可视化（同 AI 生图画布/白膜画布裁定），只描一圈日间边 */
html[data-meifan-theme="day"] body:not(.home-mode) .ai-memory-r4-graph-surface {
  border-color: #e3e6e0 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 12px 30px rgba(25, 35, 32, 0.1) !important;
}

/* ===================== AI白膜出图（12号；节点画布保留深色，运行日志翻白）===================== */
html[data-meifan-theme="day"] body:not(.home-mode) .comfy-runlog {
  border-color: #e3e6e0 !important;
  background: #f7f8f5 !important;
  color: #3c4744 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) .comfy-runlog :is(strong, b) {
  color: #16211f !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) .comfy-graph {
  border-color: #e3e6e0 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 12px 30px rgba(25, 35, 32, 0.1) !important;
}

/* 深色画布区文字豁免：这些区域白天仍保留深色底(画布节点裁定),
   但 09 的通用 strong{color:var(--ink)} 会把节点文字染成 day 墨色→压深底看不见。
   强制这些区内文字回浅色,恢复对比度(≥4.5:1)。根治白膜节点标题黑压黑硬伤。 */
html[data-meifan-theme="day"] body:not(.home-mode) .comfy-graph :is(strong, b, span, small, label, em, .comfy-node-title) {
  color: #eef8ff !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) .comfy-graph .comfy-node-stage {
  color: rgba(224, 236, 236, 0.82) !important;
}

/* ===================== 系统设置（41/33号 R3/R5 + API中心）===================== */
html[data-meifan-theme="day"] body:not(.home-mode) :is(
  .settings-account-r3-panel, .settings-account-r3-platform-api, .api-center-r1-block
) {
  border-color: #e3e6e0 !important;
  background: linear-gradient(160deg, #ffffff, #fbfcfa) !important;
  color: var(--ink) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 12px 30px rgba(25, 35, 32, 0.07) !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) :is(.settings-account-r3-head, .api-center-r1-head) {
  border-color: #e8ebe5 !important;
  background: #f7f8f5 !important;
  color: var(--ink) !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) :is(
  .settings-account-r3-panel, .settings-account-r3-platform-api, .api-center-r1-block
) :is(h2, h3, h4, strong, b, label) {
  color: #16211f !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) :is(
  .settings-account-r3-panel, .settings-account-r3-platform-api, .api-center-r1-block
) :is(p, small, span, em, time, li) {
  color: #4b5450 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) :is(
  .settings-account-r3-panel, .settings-account-r3-platform-api, .api-center-r1-block
) :is(input, select, textarea) {
  border-color: #d8ddd6 !important;
  background: #fbfcfa !important;
  color: #1e2524 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) :is(
  .settings-account-r3-panel, .settings-account-r3-platform-api, .api-center-r1-block
) button {
  border-color: #d8ddd6 !important;
  background: #ffffff !important;
  color: #3c4744 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) :is(
  .settings-account-r3-panel, .settings-account-r3-platform-api, .api-center-r1-block
) :is(td, th) {
  color: #1e2524 !important;
  border-color: #e8ebe5 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) :is(
  .settings-account-r3-panel, .settings-account-r3-platform-api, .api-center-r1-block
) th {
  background: #f1f3ee !important;
}

/* 系统设置分区顶部 tab 条（platform/company/personal）+ 宽选择器 .settings-account-r3 button */
html[data-meifan-theme="day"] body:not(.home-mode) .settings-account-r3-nav button,
html[data-meifan-theme="day"] body:not(.home-mode) .settings-account-r3 button {
  border: 1px solid #d8ddd6;
  background: #ffffff;
  color: #3c4744;
}

html[data-meifan-theme="day"] body:not(.home-mode) .settings-account-r3-nav button.active,
html[data-meifan-theme="day"] body:not(.home-mode) .settings-account-r3 button:hover {
  border-color: #1d3230;
  background: linear-gradient(150deg, #24403c, #1d3230);
  color: #f6f3ec;
}

html[data-meifan-theme="day"] body:not(.home-mode) .settings-account-r3-nav button:disabled {
  opacity: 0.42;
}

/* ===================== 主页（home-mode）白天 ===================== */
html[data-meifan-theme="day"] body.home-mode {
  background: #f2f4f0;
  color: #1e2524;
}

html[data-meifan-theme="day"] .home-mode .main {
  background: #eef0ec;
}

html[data-meifan-theme="day"] .home-mode .main::before {
  background-image: none;
  background:
    radial-gradient(ellipse at 76% 8%, rgba(255, 249, 235, 0.95), transparent 46%),
    radial-gradient(ellipse at 10% 88%, rgba(184, 134, 59, 0.07), transparent 42%),
    linear-gradient(168deg, #f7f8f5, #e9ece6);
  filter: none;
}

html[data-meifan-theme="day"] .home-mode .main::after {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), transparent 44%, rgba(233, 236, 230, 0.4));
  mix-blend-mode: normal;
}

html[data-meifan-theme="day"] .home-mode .topbar {
  color: #16211f;
}

html[data-meifan-theme="day"] .home-mode #pageTitle {
  text-shadow: none;
}

html[data-meifan-theme="day"] .home-mode #pageSubtitle {
  color: #4b5450;
}

html[data-meifan-theme="day"] .home-mode :is(h1, h2, h3, strong) {
  color: #16211f;
}

html[data-meifan-theme="day"] .home-mode :is(p, small) {
  color: #4b5450;
}

/* 主页模块卡：白瓷表达（与登录页浮动卡同语言），不做深卡反色 */
html[data-meifan-theme="day"] .home-mode .module-card,
html[data-meifan-theme="day"] .home-mode .module-card.primary,
html[data-meifan-theme="day"] .home-mode .module-card.secondary,
html[data-meifan-theme="day"] .home-mode .module-card.support {
  border: 1px solid #e3e6e0;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.94), rgba(250, 250, 247, 0.86));
  color: #1e2524;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 16px 40px rgba(25, 35, 32, 0.09);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

html[data-meifan-theme="day"] .home-mode .module-card::before {
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.65), transparent 42%);
}

html[data-meifan-theme="day"] .home-mode .module-card::after {
  background: radial-gradient(ellipse at 82% 88%, rgba(184, 134, 59, 0.08), transparent 55%);
}

html[data-meifan-theme="day"] .home-mode .module-card:hover {
  border-color: rgba(184, 134, 59, 0.5);
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 0 0 1px rgba(184, 134, 59, 0.14), 0 22px 52px rgba(25, 35, 32, 0.14);
}

html[data-meifan-theme="day"] .home-mode .module-card :is(span, i, b, em) {
  color: inherit;
}

html[data-meifan-theme="day"] .home-mode .home-account-badge {
  border-color: #e3e6e0;
  background: rgba(255, 255, 255, 0.9);
  color: #1e2524;
  box-shadow: 0 10px 26px rgba(25, 35, 32, 0.1);
}

html[data-meifan-theme="day"] .home-mode .home-account-badge :is(strong, span, small) {
  color: #3c4744;
}

/* ===================== 批2 · P1视觉增强（纯CSS,不撞业务分片）===================== */
/* 全局焦点环（无障碍刚需,昼夜通用,竞品/WCAG标准） */
html[data-meifan-theme] body:not(.account-login-mode) :is(button, a[href], input, select, textarea, [tabindex]:not([tabindex="-1"])):focus-visible {
  outline: 2px solid var(--mf-focus-ring, rgba(112, 220, 246, 0.7));
  outline-offset: 2px;
  border-radius: 4px;
}
html[data-meifan-theme="day"] { --mf-focus-ring: rgba(29, 50, 48, 0.55); }

/* press 反馈：可点元素轻缩（微交互2026:反馈优先,150-300ms ease-out） */
html[data-meifan-theme="day"] body:not(.home-mode) :is(.primary-action, .ghost, .module-card, .project-card, .case-share-card, .reflib-card, .quick-grid button):active {
  transform: scale(0.985);
}

/* 卡片 hover 统一轻移 + 过渡（day 平台内页,不动夜晚已验收视觉） */
html[data-meifan-theme="day"] body:not(.home-mode) :is(.project-card, .case-share-card, .reflib-card, .quick-grid button) {
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
html[data-meifan-theme="day"] body:not(.home-mode) :is(.project-card, .case-share-card, .reflib-card, .quick-grid button):hover {
  transform: translateY(-2px);
}
html[data-meifan-theme="day"] .home-mode .module-card {
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
html[data-meifan-theme="day"] .home-mode .module-card:hover {
  transform: translateY(-3px);
}

/* 数据表格：hover 行高亮 + 粘性表头（企业表格标准） */
html[data-meifan-theme="day"] body:not(.home-mode) :is(.settings-account-r3-table, .quote-template-table, .system-feature-map-table, .api-center-r5-key-table, .owner-account-table) tbody tr:hover {
  background: #f2f4f0 !important;
}
html[data-meifan-theme="day"] body:not(.home-mode) :is(.settings-account-r3-table, .api-center-r5-key-table, .owner-account-table) thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

/* 案例/素材封面：day 降饱和去糖果感,保留色相分类（Mobbin 中性占位范式） */
html[data-meifan-theme="day"] body:not(.home-mode) :is(.case-share-cover, .reflib-thumb, .card-lib-thumb) {
  filter: saturate(0.5) brightness(1.05);
}

/* 切页淡入过渡（motion 传达空间连续性,尊重 reduced-motion） */
@media (prefers-reduced-motion: no-preference) {
  body:not(.home-mode) .mf-view-fade {
    animation: mfViewFade 0.24s ease-out;
  }
}
@keyframes mfViewFade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ==========================================================================
   白天设计系统精修（DESIGN-SYSTEM-REFINE-DAY）: 统一圆角/阴影/字号层级/留白
   全挂 day 前缀,夜间(已验收暗蓝玻璃)零影响。目标:从"工具感"到"高级产品感"。
   ========================================================================== */

/* --- 卡片族: 统一圆角16 + 柔和多层阴影 + 细边(高级感来自一致+克制) --- */
html[data-meifan-theme="day"] body:not(.home-mode) :is(
  .panel, .metric, .work-flow-card, .ai-main-flow-card,
  .project-card, .project-cockpit-card, .project-cockpit-panel, .project-list-panel,
  .project-kpi-card, .project-time-card, .project-mini-asset-card, .ai-metric-card, .radar-card,
  .case-share-card, .reflib-card, .card-lib-item, .quote-template-board,
  .settings-account-r3-panel, .settings-account-r3-platform-api, .api-center-r1-block,
  .summary-card, .content-marketing-workflow-summary-r1, .system-card-library-panel
) {
  border-radius: 16px !important;
  border: 1px solid #e7eae4 !important;
  box-shadow: 0 1px 2px rgba(25, 35, 32, 0.03), 0 10px 30px rgba(25, 35, 32, 0.05) !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) :is(
  .project-card, .case-share-card, .reflib-card, .card-lib-item, .project-kpi-card
):hover {
  border-color: #dfe3dc !important;
  box-shadow: 0 2px 4px rgba(25, 35, 32, 0.04), 0 18px 46px rgba(25, 35, 32, 0.11) !important;
}

/* --- 按钮族: 统一圆角10 --- */
html[data-meifan-theme="day"] body:not(.home-mode) :is(
  .primary-action, .ghost, .quick-grid button, .segmented button,
  .project-alert-button, .quote-step-nav button, .settings-account-r3-nav button,
  .reflib-category-tree button, .project-list-page-controls button
) {
  border-radius: 10px !important;
}

/* --- 输入族: 统一圆角10 --- */
html[data-meifan-theme="day"] body:not(.home-mode) :is(
  input:not([type="checkbox"]):not([type="radio"]), select, textarea
) {
  border-radius: 10px !important;
}

/* --- 顶栏: 统一大圆角容器 --- */
html[data-meifan-theme="day"] body:not(.home-mode) .topbar {
  border-radius: 18px !important;
}

/* --- 字号层级: 页面标题更大更沉,副题克制,建立呼吸的层级 --- */
html[data-meifan-theme="day"] body:not(.home-mode) .topbar h1,
html[data-meifan-theme="day"] body:not(.home-mode) #pageTitle {
  font-size: clamp(24px, 2vw, 30px) !important;
  font-weight: 800 !important;
  letter-spacing: -0.01em !important;
  line-height: 1.2 !important;
}
html[data-meifan-theme="day"] body:not(.home-mode) .topbar p,
html[data-meifan-theme="day"] body:not(.home-mode) #pageSubtitle {
  font-size: 14px !important;
  line-height: 1.6 !important;
  color: #5f6864 !important;
}

/* --- 留白: 卡片内距 + 主内容呼吸(适度,逐页验证无溢出) --- */
html[data-meifan-theme="day"] body:not(.home-mode) :is(
  .panel, .project-list-panel, .project-cockpit-panel, .quote-template-board,
  .settings-account-r3-panel, .settings-account-r3-platform-api, .api-center-r1-block
) {
  padding: 22px !important;
}

/* ==========================================================================
 合并后新功能 day 补全(POST-MERGE-NEW-FEATURES): 功能批 + 3D脑图
   的新分片(41 R5个人账号/46 brain-graph-3d/06 aigen新条/10 reflib树)白天翻白。
   全 day 前缀,夜间不动。3D脑图舞台=画布保留深色(同06/白膜裁定)。
   ========================================================================== */

/* --- 系统设置 R5 个人账号块 --- */
html[data-meifan-theme="day"] body:not(.home-mode) .settings-account-r5-personal-block {
  border: 1px solid #e7eae4 !important;
  border-radius: 16px !important;
  background: linear-gradient(160deg, #ffffff, #fbfcfa) !important;
  color: var(--ink) !important;
  box-shadow: 0 1px 2px rgba(25,35,32,.03), 0 10px 30px rgba(25,35,32,.05) !important;
}
html[data-meifan-theme="day"] body:not(.home-mode) .settings-account-r5-personal-block :is(h1,h2,h3,h4,strong,b,label,dt) { color: #16211f !important; }
html[data-meifan-theme="day"] body:not(.home-mode) .settings-account-r5-personal-block :is(p,small,span,em,li,dd) { color: #4b5450 !important; }
html[data-meifan-theme="day"] body:not(.home-mode) .settings-account-r5-personal-block :is(article, .settings-account-r5-personal-block > div) {
  border: 1px solid #e7eae4 !important; background: #f7f8f5 !important; border-radius: 12px !important;
}
html[data-meifan-theme="day"] body:not(.home-mode) .settings-account-r5-personal-block :is(input,select,textarea) {
  border: 1px solid #d8ddd6 !important; background: #fbfcfa !important; color: #1e2524 !important; border-radius: 10px !important;
}
html[data-meifan-theme="day"] body:not(.home-mode) .settings-account-r5-personal-block button {
  border: 1px solid #d8ddd6 !important; background: #ffffff !important; color: #3c4744 !important; border-radius: 10px !important;
}

/* --- 3D 脑图: 工具条翻白,舞台画布保留深(只加日间边框) --- */
html[data-meifan-theme="day"] body:not(.home-mode) .brain-graph-3d-toolbar {
  border: 1px solid #e7eae4 !important; background: #ffffff !important; color: var(--ink) !important;
  border-radius: 12px !important; box-shadow: 0 8px 22px rgba(25,35,32,.06) !important;
}
html[data-meifan-theme="day"] body:not(.home-mode) .brain-graph-3d-toolbar :is(strong,b,label,span) { color: #3c4744 !important; }
html[data-meifan-theme="day"] body:not(.home-mode) .brain-graph-3d-toolbar button {
  border: 1px solid #d8ddd6 !important; background: #ffffff !important; color: #3c4744 !important; border-radius: 9px !important;
}
html[data-meifan-theme="day"] body:not(.home-mode) .brain-graph-3d-toolbar button.active {
  border-color: #1d3230 !important; background: linear-gradient(150deg,#24403c,#1d3230) !important; color: #f6f3ec !important;
}
html[data-meifan-theme="day"] body:not(.home-mode) .brain-graph-3d-stage {
  border: 1px solid #e7eae4 !important; border-radius: 14px !important; box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 12px 30px rgba(25,35,32,.1) !important;
}

/* --- AI设计师 场景预设条 + 项目条 --- */
html[data-meifan-theme="day"] body:not(.home-mode) :is(.aigen-scene-preset-bar, .aigen-canvas-project-bar) {
  border: 1px solid #e7eae4 !important; background: linear-gradient(160deg,#ffffff,#f6f7f3) !important;
  color: var(--ink) !important; border-radius: 12px !important; box-shadow: 0 8px 22px rgba(25,35,32,.06) !important;
}
html[data-meifan-theme="day"] body:not(.home-mode) :is(.aigen-scene-preset-bar, .aigen-canvas-project-bar) :is(strong,b,label) { color: #16211f !important; }
html[data-meifan-theme="day"] body:not(.home-mode) :is(.aigen-scene-preset-bar, .aigen-canvas-project-bar) :is(p,small,span) { color: #4b5450 !important; }
html[data-meifan-theme="day"] body:not(.home-mode) :is(.aigen-scene-preset-bar, .aigen-canvas-project-bar) :is(select,input) {
  border: 1px solid #d8ddd6 !important; background: #fbfcfa !important; color: #1e2524 !important; border-radius: 9px !important;
}
html[data-meifan-theme="day"] body:not(.home-mode) :is(.aigen-scene-preset-bar, .aigen-canvas-project-bar) button {
  border: 1px solid #d8ddd6 !important; background: #ffffff !important; color: #3c4744 !important; border-radius: 9px !important;
}
html[data-meifan-theme="day"] body:not(.home-mode) :is(.aigen-scene-preset-bar, .aigen-canvas-project-bar) button.selected {
  border-color: #1d3230 !important; background: linear-gradient(150deg,#24403c,#1d3230) !important; color: #f6f3ec !important;
}

/* --- 素材库 分类树根 --- */
html[data-meifan-theme="day"] body:not(.home-mode) .reflib-tree-root {
  border: 1px solid #d8ddd6 !important; background: #ffffff !important; color: #3c4744 !important; border-radius: 9px !important;
}
html[data-meifan-theme="day"] body:not(.home-mode) .reflib-tree-root.active {
  border-color: #1d3230 !important; background: linear-gradient(150deg,#24403c,#1d3230) !important; color: #f6f3ec !important;
}

/* --- R5 nav tab条 + 个人块内标签 补白(合并后残留) --- */
html[data-meifan-theme="day"] body:not(.home-mode) .settings-account-r5-nav {
  background: transparent !important;
}
html[data-meifan-theme="day"] body:not(.home-mode) .settings-account-r5-nav button {
  border: 1px solid #d8ddd6 !important; background: #ffffff !important; color: #3c4744 !important; border-radius: 10px !important;
}
html[data-meifan-theme="day"] body:not(.home-mode) .settings-account-r5-nav button.active {
  border-color: #1d3230 !important; background: linear-gradient(150deg,#24403c,#1d3230) !important; color: #f6f3ec !important;
}
html[data-meifan-theme="day"] body:not(.home-mode) .settings-account-r5-personal-block :is(label.wide, label) {
  background: transparent !important;
}
html[data-meifan-theme="day"] body:not(.home-mode) .settings-account-r5-personal-block :is(label.wide, label) > :is(p, strong, span, div) {
  background: #f7f8f5 !important; border-color: #e7eae4 !important; color: #1e2524 !important;
}

/* ==========================================================================
   模块卡·简洁化(MODULE-CARD-CLEAN): 只留真实数字(去状态芯片文字)
 + 图标浅墨绿突出 + 白天去右下蓝装饰(要简洁/图标突出/蓝色眼花)
   ========================================================================== */
/* 真实数字: 克制,只一个数,不塞文字 */
.module-stat { display: flex; align-items: center; margin-top: 8px; }
.module-metric { font-size: 14px; font-weight: 800; color: inherit; letter-spacing: -0.01em; opacity: 0.9; }
html[data-meifan-theme="day"] .home-mode .module-metric { color: #1d3230; }

/* 图标: 白天浅墨绿底+深墨绿字,鲜艳突出(替灰蓝调) */
html[data-meifan-theme="day"] .home-mode .module-icon {
  background: linear-gradient(150deg, #d8f0e2, #c3e6d3) !important;
  border: 1px solid rgba(29, 50, 48, 0.1) !important;
  color: #1d3230 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 4px 12px rgba(29, 50, 48, 0.08) !important;
}
html[data-meifan-theme="day"] .home-mode .module-card:hover .module-icon {
  background: linear-gradient(150deg, #c8ecd8, #b3ddc7) !important;
}

/* 去掉卡片右下的透明蓝装饰(白天眼花) */
html[data-meifan-theme="day"] .home-mode .module-visual::before,
html[data-meifan-theme="day"] .home-mode .module-visual::after {
  display: none !important;
}

/* ==========================================================================
   首页主题开关(HOME-THEME-TOGGLE): 首页home-mode侧栏隐藏,顶栏补一个主题开关
 仅首页可见(其它视图用侧栏开关)。昼夜样式。首页没有主题切换按键。
   ========================================================================== */
.home-theme-toggle { display: none; }
.home-mode .home-theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px; padding: 0 18px; margin-left: auto; margin-right: 12px;
  border-radius: 999px; font-size: 13px; font-weight: 700; cursor: pointer;
  white-space: nowrap; line-height: 1;
  border: 1px solid rgba(179, 246, 255, 0.24);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.05)), rgba(7, 24, 36, 0.5);
  color: rgba(229, 242, 251, 0.9);
  transition: border-color 0.16s ease, background 0.16s ease;
}
.home-mode .home-theme-toggle:hover { border-color: rgba(179, 246, 255, 0.5); }

/* day: 白天首页开关(浅底墨字,轻奢) */
html[data-meifan-theme="day"] .home-mode .home-theme-toggle {
  border-color: #e3e6e0;
  background: rgba(255, 255, 255, 0.92);
  color: #3c4744;
  box-shadow: 0 4px 14px rgba(25, 35, 32, 0.08);
}
html[data-meifan-theme="day"] .home-mode .home-theme-toggle:hover { border-color: #b8863b; color: #1d3230; }

/* CMD114: contact panel uses the existing day surface; night and geometry stay in their original rules. */
html[data-meifan-theme="day"] body:not(.home-mode) .settings-account-r18-contact-modal {
  background: var(--surface-strong, #fff);
}

/* ==========================================================================
   个人API编辑弹窗 day 补全(R2-CLOSEOUT): settings-account-r15-interface-modal
   面板深色rgba(7,14,22,.97)→白;蒙层backdrop保留深色隔离。收尾复查发现的漏项。
   ========================================================================== */
html[data-meifan-theme="day"] body:not(.home-mode) .settings-account-r15-interface-modal {
  background: #ffffff !important;
  border: 1px solid #e7eae4 !important;
  color: var(--ink) !important;
  box-shadow: 0 30px 80px rgba(25, 35, 32, 0.24) !important;
}
html[data-meifan-theme="day"] body:not(.home-mode) .settings-account-r15-interface-modal :is(
  section, article, fieldset, .settings-account-r16-row-edit-saved,
  .settings-account-r15-interface-head, [class*="capability"], [class*="group"]
) {
  background: #f7f8f5 !important;
  border-color: #e7eae4 !important;
  color: var(--ink) !important;
}
html[data-meifan-theme="day"] body:not(.home-mode) .settings-account-r15-interface-modal :is(h1, h2, h3, h4, strong, b, label, dt) {
  color: #16211f !important;
}
html[data-meifan-theme="day"] body:not(.home-mode) .settings-account-r15-interface-modal :is(p, small, span, em, li, dd) {
  color: #4b5450 !important;
}
html[data-meifan-theme="day"] body:not(.home-mode) .settings-account-r15-interface-modal :is(input, select, textarea) {
  border: 1px solid #d8ddd6 !important;
  background: #fbfcfa !important;
  color: #1e2524 !important;
}
html[data-meifan-theme="day"] body:not(.home-mode) .settings-account-r15-interface-modal button:not(.primary-action) {
  border: 1px solid #d8ddd6 !important;
  background: #ffffff !important;
  color: #3c4744 !important;
}
html[data-meifan-theme="day"] body:not(.home-mode) .settings-account-r15-interface-modal .primary-action {
  border-color: #1d3230 !important;
  background: linear-gradient(150deg, #24403c, #1d3230) !important;
  color: #f6f3ec !important;
}

/* THEME-UI-R2-MOBILE-FIX-20260706: day home mobile title must stay inside viewport. */
@media (max-width: 560px) {
  html[data-meifan-theme="day"] body.home-mode .main {
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    padding: max(20px, calc(env(safe-area-inset-top) + 14px)) 14px 20px !important;
  }

  html[data-meifan-theme="day"] body.home-mode .topbar {
    position: relative;
    top: 0 !important;
    transform: none !important;
    margin: 0 auto 18px !important;
    min-height: 112px !important;
    align-items: flex-start;
    overflow: visible !important;
  }

  html[data-meifan-theme="day"] body.home-mode .topbar > div:first-child {
    max-width: calc(100% - 118px) !important;
    padding-left: 18px !important;
  }

  html[data-meifan-theme="day"] body.home-mode .topbar > div:first-child::before {
    height: 66px;
  }

  html[data-meifan-theme="day"] body.home-mode .topbar h1,
  html[data-meifan-theme="day"] body.home-mode #pageTitle {
    margin-top: 0 !important;
    font-size: 24px !important;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.18 !important;
  }

  html[data-meifan-theme="day"] body.home-mode .home-theme-toggle {
    position: absolute;
    top: 2px !important;
    right: 0 !important;
    max-width: 112px !important;
    margin-right: 0 !important;
  }
}

/* THEME-UI-R2-SUBSCRIPTION-MODAL-DAY-20260706: subscription modal follows day theme. */
html[data-meifan-theme="day"] body:not(.home-mode) [data-subscription-modal-r1],
html[data-meifan-theme="day"] body:not(.home-mode) .submodal-r1-mask {
  background: rgba(25, 35, 32, 0.36) !important;
  -webkit-backdrop-filter: blur(8px) saturate(105%);
  backdrop-filter: blur(8px) saturate(105%);
}

html[data-meifan-theme="day"] body:not(.home-mode) [data-subscription-modal-r1] .submodal-r1-dialog,
html[data-meifan-theme="day"] body:not(.home-mode) .submodal-r1-dialog {
  border: 1px solid #dfe5dd !important;
  background: linear-gradient(160deg, #ffffff, #fbfcfa) !important;
  color: #1e2524 !important;
  box-shadow: 0 30px 80px rgba(25, 35, 32, 0.24) !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) [data-subscription-modal-r1] :is(
  h3, strong, b, label, dt, dd, .submodal-r1-card-name, .submodal-r1-price, .submodal-r1-section-title,
  .submodal-r1-current-plain, .submodal-r1-back-title
) {
  color: #16211f !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) [data-subscription-modal-r1] :is(
  p, small, span, em, li, .submodal-r1-perks, .submodal-r1-oneoff-label, .submodal-r1-footnote,
  .submodal-r1-dim, .submodal-r1-back-note
) {
  color: #4b5450 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) [data-subscription-modal-r1] :is(
  .submodal-r1-statusline, .submodal-r1-readonly-banner, .submodal-r1-face, .submodal-r1-oneoff-panel
) {
  border-color: #e3e6e0 !important;
  background: #f7f8f5 !important;
  color: #1e2524 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) [data-subscription-modal-r1] .submodal-r1-readonly-banner {
  border-left-color: #b8863b !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) [data-subscription-modal-r1] :is(.submodal-r1-front, .submodal-r1-back) {
  background: #f7f8f5 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) [data-subscription-modal-r1] .submodal-r1-card.is-reco .submodal-r1-front {
  border-color: rgba(184, 134, 59, 0.56) !important;
  box-shadow: 0 0 0 1px rgba(184, 134, 59, 0.18) inset, 0 8px 22px rgba(184, 134, 59, 0.08) !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) [data-subscription-modal-r1] .submodal-r1-card.is-current .submodal-r1-front {
  border-color: #1d3230 !important;
  box-shadow: 0 0 0 1px rgba(29, 50, 48, 0.18) inset !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) [data-subscription-modal-r1] :is(
  .submodal-r1-tab, .submodal-r1-x, .submodal-r1-period, .submodal-r1-btn-ghost,
  .submodal-r1-oneoff-btn, .submodal-r1-current-badge
) {
  border-color: #d8ddd6 !important;
  background: #ffffff !important;
  color: #3c4744 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) [data-subscription-modal-r1] :is(.submodal-r1-tab.is-active, .submodal-r1-btn-main) {
  border-color: #1d3230 !important;
  background: linear-gradient(150deg, #24403c, #1d3230) !important;
  color: #f6f3ec !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) [data-subscription-modal-r1] .submodal-r1-mock-tag {
  background: rgba(184, 134, 59, 0.13) !important;
  color: #8b6423 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) [data-subscription-modal-r1] .submodal-r1-back-title strong {
  color: #1d3230 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) [data-subscription-modal-r1] .submodal-r1-back-error {
  color: #9c3f39 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) [data-subscription-modal-r1] .submodal-r1-oneoff {
  border-top-color: #dfe5dd !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) [data-subscription-modal-r1] .submodal-r1-period option {
  background: #ffffff !important;
  color: #1e2524 !important;
}

/* ===== DAY-SWEEP-20260710: 全站白天扫描补漏。5处夜浅字/夜渐变白天残留 ===== */
/* ① 面板体 p/small 夜浅青(09 L822)白天翻muted——镜像09同选择器保证同特异性,42在09后加载必胜。
      画布节点small不受影响(09对aigen-flow-node small等有!important专规) */
html[data-meifan-theme="day"] body:not(.home-mode) :is(
  .panel,
  .project-list-panel,
  .project-cockpit-panel,
  .project-cockpit-card,
  .ops-canvas-panel,
  .video-publish-workflow-panel,
  .system-settings-detail,
  .quote-template-board,
  .case-share-dialog,
  .project-create-dialog,
  .project-dashboard-upload-dialog
) :is(p, small, .detail-body) {
  color: #4b5450;
}
/* ② 案例封面标签chip: 09有#cases ID规则用var(--ink)染字,day里--ink=墨色→深字压深chip。
      带#cases对齐ID特异性,chip字回浅 */
html[data-meifan-theme="day"] body:not(.home-mode) #cases .case-share-cover b,
html[data-meifan-theme="day"] body:not(.home-mode) .case-share-cover b {
  color: #f3fdff !important;
}
/* ③ AI白膜出图工具条: 加节点标签/提示行 夜浅字压白 */
html[data-meifan-theme="day"] body:not(.home-mode) :is(.comfy-addnode, .comfy-toolbar-hint) {
  color: #4b5450;
}
/* ④ AI记忆库图谱引擎图例: 浅蓝字压白工具条 */
html[data-meifan-theme="day"] body:not(.home-mode) .bg3d-legend .bg3d-dot {
  color: #47504c;
}
/* ===== DAY-FIX-20260710 三纠 ===== */
html[data-meifan-theme="day"] body:not(.home-mode) .settings-company-node-defaults :is(h1, h2, h3, h4, strong, b, label, dt) {
  color: #16211f !important;
}
html[data-meifan-theme="day"] body:not(.home-mode) .settings-company-node-defaults :is(p, small, span, li, dd, td, th) {
  color: #4b5450;
}
html[data-meifan-theme="day"] body:not(.home-mode) .settings-company-node-defaults :is(input, select, textarea, button) {
  background: #fbfcfa !important;
  border-color: #d8ddd6 !important;
  color: #1e2524 !important;
}
/* ②模型"已选"态白天要明显变深(不知道点了哪)——通用选中反馈:
     墨绿描边+浅绿底+微阴影, 覆盖常见 selected/active/on 选项类 */
html[data-meifan-theme="day"] body:not(.home-mode) .settings-company-node-defaults :is(button, .option, li, [role="option"], [class*="option"], [class*="model"]):is(.active, .selected, .on, [aria-selected="true"], [data-selected="1"], [data-selected="true"]) {
  background: #e3efe6 !important;
  border: 1.5px solid #1d3230 !important;
  color: #16211f !important;
  box-shadow: 0 2px 10px rgba(29, 50, 48, 0.18) !important;
  font-weight: 600;
}
/* ③模型选择 select 生效态(.on)白天变深可辨(已选没变深不知道点了哪) + 未选hover也给反馈 */
html[data-meifan-theme="day"] body:not(.home-mode) :is(.settings-platform-node-defaults-table, .settings-company-node-defaults) select.on {
  background: #e3efe6 !important;
  border: 1.5px solid #1d3230 !important;
  color: #16211f !important;
  font-weight: 600;
}
html[data-meifan-theme="day"] body:not(.home-mode) :is(.settings-platform-node-defaults-table, .settings-company-node-defaults) select:hover {
  border-color: #1d3230 !important;
}
/* 节点默认模型弹窗(隐藏态审计扫不到的惯犯)白天翻白 */
html[data-meifan-theme="day"] body:not(.home-mode) :is(.node-default-modal, .node-default-modal-body) {
  background: #ffffff !important;
  border-color: #e3e6e0 !important;
  color: #1e2524 !important;
}

/* ===== UI-POLISH-BATCH-R1-20260710 优化清单v2纯视觉批 ===== */
/* 依据: F:\第二大脑\02_项目\美梵平台UI逐页优化点清单-v2-20260710.md
   编号=清单「页-序号」。昼夜通用的布局/affordance 修复不挂 day 前缀，
   day 专属规则挂 html[data-meifan-theme="day"]。 */

/* —— 三-1 (P0) 项目管理左列表被压 ~220px、标题只剩「项」: 宽屏左列最小 280px。
      1180px 以下 02_project L7245 切单列，故套 min-width 媒体查询避免压回单列规则。 */
@media (min-width: 1181px) {
  .project-dashboard-layout {
    grid-template-columns: minmax(280px, 0.62fr) minmax(0, 3fr);
  }
}
/* 三-1 附: 「项目列表」标题与筛选/搜索/排序挤一行互相截断 → 标题独占一行(Linear 列表面板范式) */
.project-list-title { flex-wrap: wrap; }
.project-list-title > strong { flex: 1 0 100%; }
.project-list-title .project-list-tools { justify-content: flex-start; width: 100%; }

/* —— 十一-1 (P0) settings 模型表「操作」列被裁: 操作列 sticky 固定右缘 + 左缘阴影提示下方有内容
      (Airtable/飞书多维表范式)。背景走 --surface-strong token 昼夜自适应；:not([colspan]) 排除分组行。 */
.settings-account-r16-api-table th:last-child,
.settings-account-r16-api-table td:last-child:not([colspan]) {
  position: sticky;
  right: 0;
  z-index: 2;
  background: var(--surface-strong);
  box-shadow: -10px 0 12px -10px rgba(8, 18, 26, 0.4);
}
/* 十一-1 附: 整格 opacity 会让钉住格透出底下滚动的内容 → 钉住格保持不透明，只淡格内内容 */
.settings-account-r16-api-row.is-disabled td:last-child:not([colspan]) {
  opacity: 1; /* 41号分片 is-disabled td 有 opacity:.55 */
}
.settings-account-r16-api-row.is-disabled td:last-child:not([colspan]) > * {
  opacity: 0.55;
}
/* 389-O76: 个人模型分类/分组头使用现行日间主题变量，不保留旧绿渐变覆盖。 */
html[data-meifan-theme="day"] body:not(.home-mode) :is(.settings-account-r16-api-group-row, .settings-account-r16-api-category-row) > td {
  background: var(--mf-theme-card-strong);
  color: var(--mf-theme-ink);
}
html[data-meifan-theme="day"] body:not(.home-mode) .settings-account-r16-api-group-row :is(strong, small, span) {
  color: var(--mf-theme-ink-strong);
}

/* —— 六-1 (P0) marketing 当前步骤卡标题几乎不可见: 夜色白字(15号分片 .on strong #eaf8ff!important)
      残留压 day 白底 → 标题/编号翻墨；配品牌绿左缘色条+描边；「待办」badge 升语义实底 */
html[data-meifan-theme="day"] body:not(.home-mode) #marketing .aile-node-card.on :is(strong, .aile-node-no) {
  color: #16211f !important;
}
html[data-meifan-theme="day"] body:not(.home-mode) #marketing .aile-node-card.on {
  border-color: #327a5e !important;
  box-shadow: inset 4px 0 0 #327a5e, inset 0 0 0 1px rgba(50, 122, 94, 0.22) !important;
}
html[data-meifan-theme="day"] body:not(.home-mode) #marketing .aile-node-card.on .aile-node-state {
  background: #b47a28 !important;
  color: #ffffff !important;
  opacity: 1;
}

/* —— 六-3 (P1) marketing 预览区无容器边界: 空态给虚线画框+占位图形(token 昼夜自适应) */
#marketing .aile-src-preview-big.empty {
  gap: 10px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  padding: 18px;
}
#marketing .aile-src-preview-big.empty::before {
  content: "▦";
  font-size: 30px;
  line-height: 1;
  opacity: 0.4;
}

/* —— 六-4 (P1·CSS部分) 03-06 锁定卡不解释: 「未解锁」前加锁形图标+可读度提一档
      (解锁条件文案属渲染层，另批) */
#marketing .aile-node-card.locked { opacity: 0.66; }
#marketing .aile-node-card.locked .aile-node-state::before {
  content: "🔒";
  margin-right: 4px;
  font-size: 11px;
}

/* —— 十-1 (P0) comfyui 连线浅色细线读不出 13 节点流程: day 下走深品牌绿加粗
      (.comfy-edge 为 SVG path，夜间深底现状可读，不动) */
html[data-meifan-theme="day"] body:not(.home-mode) .comfy-edge {
  stroke: rgba(38, 96, 75, 0.9);
  stroke-width: 2.5;
}

/* —— 十-4 (P1) comfyui day 画布中灰显脏: 浅中性+点阵(复用 --mf-theme-dots，同 #ai 画布口径)，
      深色节点浅底依然可读(Figma 白天画布范式) */
html[data-meifan-theme="day"] body:not(.home-mode) .comfy-graph {
  background: var(--mf-theme-dots);
  background-size: 18px 18px, auto;
  border-color: var(--mf-theme-line);
}

/* —— 四-3 (P1·CSS部分) 记忆库图谱空态标题被 day 加深规则翻墨、压在保留的深色画布上不可见:
      回浅色(画布豁免)。CTA 按钮属 JS 批。 */
html[data-meifan-theme="day"] body:not(.home-mode) .brain-graph-3d-stage .bg3d-empty strong {
  color: #dbeafe !important;
}

/* —— 九-1 (P1) 素材库「上传去向」两条静态说明长得像输入框/按钮: 去框降级为 icon+灰字 helper
      (NN/g: 静态帮助文本不得有交互 affordance)。day 白化规则带 !important 故此处同级压制。 */
.reflib-upload .reflib-upload-scope-note,
.reflib-upload-row .reflib-upload-scope-note,
.reflib-upload-row .reflib-shared-note[data-reflib-shared-upload] {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  min-height: 0;
  padding: 2px 0;
}
.reflib-upload-scope-note::before,
.reflib-upload-row .reflib-shared-note[data-reflib-shared-upload]::before {
  content: "ⓘ";
  margin-right: 6px;
  opacity: 0.7;
}
html[data-meifan-theme="day"] body:not(.home-mode) .reflib-upload-scope-note,
html[data-meifan-theme="day"] body:not(.home-mode) .reflib-upload-row .reflib-shared-note[data-reflib-shared-upload] {
  color: #4b5450 !important;
}

/* —— 九-2 (P1·CSS部分) 「编辑模式」混进 全部/平台内嵌/公司库/回收站 范围 tab 组:
      推到行尾+虚线描边，把模式开关与数据范围视觉分组(Figma 资源面板范式) */
.reflib-scopetabs .reflib-editmode {
  margin-left: auto;
  border-style: dashed;
}

/* —— 十一-2 (P1) settings 左菜单无当前选中态(夜间绿底被 day 白化盖掉):
      填充底+左缘品牌色条(Notion/Linear settings 范式)。active 类 JS 已有，纯 CSS 即可。 */
html[data-meifan-theme="day"] body:not(.home-mode) .settings-account-r5-side button.active {
  background: #e9f1ea !important;
  border-color: #327a5e !important;
  box-shadow: inset 3px 0 0 #327a5e !important;
  color: #16211f !important;
  font-weight: 600;
}

/* —— 二-2 (P1) home 9 张模块卡过大、900px 首屏只见 2 行: day 压高——图标缩、副文案单行截断、
      留白收紧，3×3 进一屏(夜间玻璃首页已批方向不动)。 */
html[data-meifan-theme="day"] .home-mode .module-card,
html[data-meifan-theme="day"] .home-mode .module-card.primary,
html[data-meifan-theme="day"] .home-mode .module-card.secondary,
html[data-meifan-theme="day"] .home-mode .module-card.support {
  min-height: 0;
  padding: 16px 20px;
}
html[data-meifan-theme="day"] .home-mode main { padding-top: 22px; }
html[data-meifan-theme="day"] .home-mode .module-grid { gap: 18px; }
html[data-meifan-theme="day"] .home-mode .module-icon {
  width: 36px;
  height: 36px;
  font-size: 18px;
  border-radius: 12px;
}
html[data-meifan-theme="day"] .home-mode .module-copy {
  margin-top: 10px;
  gap: 5px;
  max-width: none;
}
html[data-meifan-theme="day"] .home-mode .module-card strong { font-size: 18px; }
html[data-meifan-theme="day"] .home-mode .module-card small {
  font-size: 12.5px;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
html[data-meifan-theme="day"] .home-mode .module-enter {
  width: 28px;
  height: 28px;
  font-size: 15px;
}
html[data-meifan-theme="day"] .home-mode .module-visual {
  width: 120px;
  height: 96px;
}

/* —— 二-4 (P1·CSS部分) AI浮球亮蓝玻璃与金+墨绿品牌游离: day 换墨绿底+金环
      (贴边收起/拖拽属功能JS另批；夜间蓝玻璃语境保持现状) */
html[data-meifan-theme="day"] .r14-bubble {
  color: #f6f3ec;
  border: 1px solid rgba(184, 134, 59, 0.6);
  background:
    radial-gradient(circle at 35% 20%, rgba(255, 255, 255, 0.35), transparent 32%),
    linear-gradient(160deg, #2f5d4e, #1d3230 70%);
  box-shadow: 0 14px 36px rgba(29, 50, 48, 0.35), 0 0 0 6px rgba(184, 134, 59, 0.1);
}

/* ===== MOBILE-POLISH-R1-20260711 =====
   通宵移动端优化批（≤760px 手机档，昼夜通用不挂 day 前缀）。
   范式依据（本批竞品调研）：
   ① 移动导航不常驻占屏——拇指区原则(底部1/3最易触达)、Linear/Notion 移动网页导航滚动让位或收抽屉；
      现状 980px 档侧栏块 sticky 常驻吃掉 ~310px(37% 视口)，手机档改为随页滚动让位（底部tab/抽屉属JS另批）。
   ② 多列布局窄屏塌单列、宽表卡片化或独立横滚容器（UXmatters/NN-g 移动表格范式，横滚仅限画布类必需场景）。
   ③ 触控目标：WCAG 2.5.8 AA ≥24px、iOS HIG 44pt、Material 48dp；<44px 错误率约3倍——主操作按 44、次级按 36。
   ④ 画布类（AI生图画布/AI白膜出图/记忆库3D）移动端不重做交互，只保证不溢出+顶部"建议桌面端"提示条
     （Figma/酷家乐范式：移动端定位为浏览与轻查看，编辑重活留桌面端）。 */

@media (max-width: 760px) {
  /* —— 1. 侧栏去常驻：sticky→static，导航块随页滚动让出整屏；块内间距压缩 —— */
  .sidebar {
    position: static;
    padding: 10px 12px;
    gap: 8px;
  }
  /* 主题开关触点实测仅 27px 高（min-height 被上游重置），提到 44px */
  .sidebar .sidebar-theme-toggle {
    min-height: 44px;
    padding: 10px 12px;
  }

  /* —— 2. 项目管理：筛选行换行铺满 + 触点加大 —— */
  #projects .project-list-title { flex-wrap: wrap; }
  #projects .project-list-tools {
    width: 100%;
    flex-wrap: wrap;
    gap: 6px;
  }
  #projects .project-list-type-filter {
    height: 38px;
    flex: 0 0 96px;
  }
  #projects .project-list-tools small { height: 38px; }
  /* 「全景图制作」入口实测 24px 高 */
  #projects #projectPanoramaProductionEntry { min-height: 40px; }

  /* —— 3. 素材库参考大库：220px 左栏+内容双栏在手机上左栏被压扁、右栏溢出到 514px，塌成单列 —— */
  .reflib-layout { grid-template-columns: minmax(0, 1fr); }
  .reflib-grid, .reflib-pick-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
  .reflib-content-head { flex-wrap: wrap; }
  .reflib-content-search {
    width: 100%;
    min-width: 0;
  }

  /* —— 4. 内容营销工作流节点卡：双列每卡仅 ~165px，中文标题被迫竖排逐字断行；塌单列横读 —— */
  .aile-node-grid { grid-template-columns: 1fr; }

  /* —— 5. 画布类"建议桌面端"提示条（纯 CSS ::before，sticky 在滚动画布内双轴钉住）—— */
  .comfy-graph::before,
  .aigen-node-stage::before {
    content: "画布编辑建议在桌面端进行 · 手机上适合查看预览";
    position: sticky;
    top: 8px;
    left: 8px;
    z-index: 60;
    display: block;
    width: max-content;
    max-width: calc(100vw - 80px);
    margin: 8px;
    padding: 7px 14px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(12, 22, 20, 0.85);
    color: #eef4f0;
    font-size: 12px;
    line-height: 1.4;
  }
  .brain-graph-3d-stage::before {
    content: "3D 记忆图谱建议在桌面端交互 · 手机上适合查看预览";
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    width: max-content;
    max-width: calc(100% - 24px);
    padding: 7px 14px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(12, 22, 20, 0.85);
    color: #eef4f0;
    font-size: 12px;
    line-height: 1.4;
    pointer-events: none;
  }

  /* —— 6. 页头去常驻：09 的玻璃页头(标题+描述+全局搜索) sticky top:14px，
        手机上叠到 163px 高(≈19% 视口)悬浮盖内容，与侧栏同理改随页滚动让位 —— */
  body:not(.home-mode) .topbar {
    position: static;
    padding: 12px 14px;
  }

  /* —— 7. 底部安全区（刘海屏 home indicator；未开 viewport-fit=cover 时 env()=0 无副作用）—— */
  .main { padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)); }
}

/* ===== MOBILE-POLISH-R1-20260711 顺手 P2（清单v2·AI白膜出图-8）=====
   工具条「加节点」label 仍偏淡：并入已修 toolbar 深字 token(#3c4744, 同 brain-graph-3d-toolbar label)。只修白天。 */
html[data-meifan-theme="day"] body:not(.home-mode) .comfy-addnode {
  color: #3c4744;
}

/* ===== ZG-MORNING-FIX-R1-20260711 晨验7处 =====
   1/2 昼夜通用不挂 day 前缀(2 的夜色统一用 :not(day) 只作用夜间,day 自有配方不动);
   3/4/6/7 全挂 day 前缀,夜间零回归; 5(AI画板)=iframe 独立文档纯CSS修不了,登记需JS另批。 */

/* —— 1. 首页模块卡标题不同线(昼夜通用):
      根因 = .module-copy{align-self:end} 底锚,标题纵位随副文案行数(1行vs2行)与有无 .module-stat 行浮动
      (实测同排 strongTop 327 vs 353 / 631 vs 655)。改顶锚: icon 区 48px 固定+copy 上边距 22px 固定
      → 所有卡标题距卡顶恒定,同排必同线;副文案向下延展,stat/enter 仍沉底。 —— */
.module-grid .module-card .module-copy {
  align-self: start;
}

/* —— 2. 侧栏底部账号块+主题开关与侧栏主体色不统一(夜间):
      根因① 42 头部注释早闭合吞掉 .sidebar-theme-toggle 基础规则(见头部拆雷注),开关露 UA 灰底黑边——已拆雷复活,昼夜同收益;
      根因② 夜间 09 给账号块的白 12% 提亮渐变叠出灰蓝,与侧栏本体(白 5.5% + rgba(4,14,22,.78))不同族。
      统一夜间为侧栏同色系(白 5.5%→2% + 深海底),day 自有配方(白 6%/7% 平涂)специф更高不受影响,再用 :not(day) 双保险。 —— */
html:not([data-meifan-theme="day"]) body:not(.home-mode) .sidebar-account,
html:not([data-meifan-theme="day"]) .sidebar .sidebar-theme-toggle {
  border-color: rgba(126, 211, 242, 0.18);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02)),
    rgba(7, 20, 30, 0.55);
}

/* —— 3. 白天·项目管理 四组小字翻 ink(点名: 项目卡角标日期/资料栏六卡两行计数/右上"待办事件·0个事件"/待办事件标题旁计数):
 本构建实测已是 --muted #4b5450(49f00ae 已加深一档),按晨验口径再压到 ink 级,保证任何屏上可读。 —— */
html[data-meifan-theme="day"] body:not(.home-mode) #projects .project-card .project-card-side small,
html[data-meifan-theme="day"] body:not(.home-mode) #projects .project-dashboard-tab :is(span, small),
html[data-meifan-theme="day"] body:not(.home-mode) #projects .project-dashboard-workbench-head small,
html[data-meifan-theme="day"] body:not(.home-mode) #projects .project-dashboard-panel-head small {
  color: #1e2524 !important;
}

/* —— 4. 白天·内容营销 步骤卡选中态(15号分片 aile-node-card):
      实测本构建已由上批修复(.on strong 翻墨 #16211f + 品牌绿左缘,locked 0.66×ink≈#6a6f6e 淡但可读,
      8 组类态组合全模拟深字)。此处补一条防回归保险: 任何态的标题/编号 day 兜底墨色,
      不带 !important 不与 .on 专项规则竞争,locked 淡化仍由卡层 opacity 承担。 —— */
html[data-meifan-theme="day"] body:not(.home-mode) #marketing .aile-node-card :is(strong, .aile-node-no) {
  color: #16211f;
}

/* —— 6. 白天·案例分享详情 缩略图卡夜深底(全景图/PPT视频/设计效果图/现场资料图):
      根因 = 09 夜玻璃大合集 body:not(.home-mode) #cases :is(...preview-card, preview-thumb...) 带 !important
      压过 02 的白卡原色,42 原 day 批未覆盖到这组。同族(卡/缩略占位/文件夹卡)一并翻白。 —— */
html[data-meifan-theme="day"] body:not(.home-mode) #cases :is(
  .case-share-preview-card,
  .case-share-folder-card,
  .case-share-folder-item
) {
  border-color: #e3e6e0 !important;
  background: #ffffff !important;
  color: var(--ink) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 10px 24px rgba(25, 35, 32, 0.08) !important;
}
html[data-meifan-theme="day"] body:not(.home-mode) #cases :is(
  .case-share-preview-thumb,
  .case-share-folder-thumb,
  .case-share-media-preview,
  .case-share-folder-media,
  .case-share-folder-detail-media
) {
  border-color: #dce6e1 !important;
  background: linear-gradient(145deg, #e7f1ed, #c7dbd3) !important;
  color: #245d4f !important;
  box-shadow: none !important;
}

/* —— 7. 白天·系统设置·公司管理 区块卡暗底(公司资料/账号与公司等 6 卡):
      根因 = 41 分片 .settings-account-r5-company-block 与 .settings-account-r3-grid article
      夜底 rgba(10,20,30,.72) 无 day 覆盖(之前只翻了 node-defaults 子面板),而文字已翻墨 → 黑压黑。
      按 personal-block 已定配方 1:1 镜像; :not(.settings-company-node-defaults) 避开已定案的节点默认面板。 —— */
html[data-meifan-theme="day"] body:not(.home-mode) .settings-account-r5-company-block:not(.settings-company-node-defaults) {
  border: 1px solid #e7eae4 !important;
  border-radius: 16px !important;
  background: linear-gradient(160deg, #ffffff, #fbfcfa) !important;
  color: var(--ink) !important;
  box-shadow: 0 1px 2px rgba(25, 35, 32, 0.03), 0 10px 30px rgba(25, 35, 32, 0.05) !important;
}
html[data-meifan-theme="day"] body:not(.home-mode) .settings-account-r5-company-block:not(.settings-company-node-defaults) :is(h1, h2, h3, h4, strong, b, label, dt) {
  color: #16211f !important;
}
html[data-meifan-theme="day"] body:not(.home-mode) .settings-account-r5-company-block:not(.settings-company-node-defaults) :is(p, small, span, em, li, dd, td, th) {
  color: #4b5450 !important;
}
html[data-meifan-theme="day"] body:not(.home-mode) .settings-account-r5-company-block:not(.settings-company-node-defaults) :is(article, .settings-account-r3-grid article) {
  border: 1px solid #e7eae4 !important;
  background: #f7f8f5 !important;
  border-radius: 12px !important;
}
html[data-meifan-theme="day"] body:not(.home-mode) .settings-account-r5-company-block:not(.settings-company-node-defaults) :is(input, select, textarea) {
  border: 1px solid #d8ddd6 !important;
  background: #fbfcfa !important;
  color: #1e2524 !important;
  border-radius: 10px !important;
}
html[data-meifan-theme="day"] body:not(.home-mode) .settings-account-r5-company-block:not(.settings-company-node-defaults) button {
  border: 1px solid #d8ddd6 !important;
  background: #ffffff !important;
  color: #3c4744 !important;
  border-radius: 10px !important;
}
html[data-meifan-theme="day"] body:not(.home-mode) .settings-account-r5-company-block:not(.settings-company-node-defaults) :is(th, td) {
  border-color: #e7eae4 !important;
  background: #fbfcfa !important;
}

/* =======================================================================================
 DAY-CONTRAST-FIX-20260726 · 白天对比度批(裁定一,清单第三节 8 条)
   打法统一 = 只在本分片加 day 前缀段,原分片夜色规则一行不动 —— 夜间零回归。
   每条都经隔离实例真登录进内页 + 像素取证(截图回灌 canvas 直方图)昼夜双测。
   ======================================================================================= */

/* —— #1 P0 · 3D白膜编辑器(14号分片, 全屏 overlay) ——
   现象: 标题与整条说明黑压黑,day ratio 实测 .wm-shell 1.21 / .wm-side 1.19 / .wm-side-card 1.19。
   根因: 壳按裁定白天仍保留深底(同 comfy-graph / 画布节点口径),但 09 与本分片的通用
   color:var(--ink) 渗进来把内层文字染成 day 墨色 → 深底压深字。
   修法: 照本文件 1264 行 .comfy-graph 已验证打法,day 作用域强制内层回浅色。 */
html[data-meifan-theme="day"] body:not(.home-mode) :is(.wm-shell, .wm-side, .wm-side-card) {
  color: #eef8ff !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) .wm-shell :is(strong, b, span, small, label, em, p, h3, h4) {
  color: #eef8ff !important;
}

/* 次级说明文字留一档灰,保持层级(与 comfy-node-stage 同口径) */
html[data-meifan-theme="day"] body:not(.home-mode) .wm-shell :is(
  .wm-hint, .wm-muted, .wm-comp-cat-h, .wm-head small, .wm-furn small, .wm-upload
) {
  color: rgba(224, 236, 236, 0.82) !important;
}

/* 例外: 亮底强调态(选中 tab / 主按钮 / 危险按钮)本就是深字压亮底,不跟着翻浅 */
html[data-meifan-theme="day"] body:not(.home-mode) .wm-shell :is(.wm-tab.on, .wm-btn.on, .wm-btn-primary),
html[data-meifan-theme="day"] body:not(.home-mode) .wm-shell :is(.wm-tab.on, .wm-btn.on, .wm-btn-primary) :is(span, small, b, strong, em) {
  color: #0c1320 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) .wm-shell .wm-btn-danger,
html[data-meifan-theme="day"] body:not(.home-mode) .wm-shell .wm-btn-danger :is(span, small, b, strong) {
  color: #ffffff !important;
}

/* —— #2 P0 · 案例分享弹窗内层(02 分片写的是浅底,深底来自 09 的 #cases 玻璃覆盖) ——
   实测 day: .case-share-upload-dropzone 1.64 / -file-picker 1.05 / -edit-danger-row 1.64
             / -profile-edit-grid 1.05 / -profile-field 1.03(「选择文件/未选择任何文件」完全不可读)。
   注: 本文件原已覆盖 .case-share-dialog 外壳,漏的是这些内层。
   另: 清单里同列的 .case-share-archive-section 实测 day 15.30 —— 它走 mf-theme-card 变量、
       白天自动跟随,【本来就是好的】,故不在本段内,避免无谓改动。 */
html[data-meifan-theme="day"] body:not(.home-mode) #cases :is(
  .case-share-upload-dropzone,
  .case-share-file-picker,
  .case-share-profile-edit-grid,
  .case-share-profile-field,
  .case-share-profile-field textarea,
  .case-share-upload-dropzone input[type="file"],
  .case-share-edit-list input[type="file"]
) {
  border-color: #d9e2dd !important;
  background: #ffffff !important;
  color: #1e2524 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) #cases .case-share-upload-dropzone input[type="file"]::file-selector-button,
html[data-meifan-theme="day"] body:not(.home-mode) #cases .case-share-edit-list input[type="file"]::file-selector-button {
  border-color: #d9e2dd !important;
  background: #f2f7f4 !important;
  color: #1e2524 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) #cases .case-share-upload-dropzone input[type="file"]::-webkit-file-upload-button,
html[data-meifan-theme="day"] body:not(.home-mode) #cases .case-share-edit-list input[type="file"]::-webkit-file-upload-button {
  border-color: #d9e2dd !important;
  background: #f2f7f4 !important;
  color: #1e2524 !important;
}

/* 危险区保留浅红语义底(02 原设计 #fff8f8 / #e5c1c1),只把夜底翻回来 */
html[data-meifan-theme="day"] body:not(.home-mode) #cases :is(.case-share-edit-danger-row, .case-share-recycle-actions) {
  border-color: #e5c1c1 !important;
  background: #fff8f8 !important;
  color: #1e2524 !important;
  box-shadow: none !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) #cases :is(
  .case-share-upload-dropzone, .case-share-file-picker, .case-share-profile-edit-grid,
  .case-share-profile-field, .case-share-edit-danger-row, .case-share-recycle-actions
) :is(strong, b, label) {
  color: #16211f !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) #cases :is(
  .case-share-upload-dropzone, .case-share-file-picker, .case-share-profile-edit-grid,
  .case-share-profile-field, .case-share-edit-danger-row, .case-share-recycle-actions
) :is(small, span, em, p) {
  color: #4b5450 !important;
}

/* —— #3 P0 · 素材库上传弹窗投放区(10 分片硬编码 rgba(6,11,18,.58),本分片零覆盖) ——
   实测 day: .reflib-upload-drop 3.48 / 内 small 1.70。 */
html[data-meifan-theme="day"] body:not(.home-mode) .reflib-upload-drop {
  border-color: #d8ddd6 !important;
  background: #fbfcfa !important;
  color: #3c4744 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) .reflib-upload-drop small {
  color: #4b5450 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) .reflib-upload-drop :is(strong, b) {
  color: #16211f !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) .reflib-upload-drop.drag-over {
  border-color: #327a5e !important;
  background: #eef5f1 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) .reflib-upload-modal-head small {
  color: #4b5450 !important;
}

/* —— #4 P1 · AI白膜出图配置说明族(12 分片硬编码 rgba(214,226,226,.6) 落白底) ——
   实测 day: .comfy-config-hint 1.14(运行时实证)。同族其余按同型一并翻墨(见回传如实标注)。 */
html[data-meifan-theme="day"] body:not(.home-mode) :is(
  .comfy-config-hint, .comfy-config-empty, .comfy-config-desc, .comfy-route-note
) {
  border-color: #d8ddd6 !important;
  color: #4b5450 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) .comfy-advanced {
  border-color: #e3e6e0 !important;
  background: #f7f8f5 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) .comfy-advanced summary {
  color: #3c4744 !important;
}

/* —— #5 P1 · 线框库(13 分片) ——
   运行时渲染入口已定位: 系统设置「线框库」条目 → app-src/13_wireframe_library.js openModal()。
   ⚠ 清单原开的方子是「同 #4,day 墨色」—— 实测推翻: .wflib-card 白天并【不是】浅底,而是石板深灰
   (像素实测 L50=0.0846)。按墨色改,ratio 反而从 3.44 掉到 1.00(肉眼实锤「只读」消失),已回退。
   卡片保留深底属既有设计(本批不改版),故照 comfy-graph / wm-shell 同一口径: 深面留深,文字加亮到达标。 */
html[data-meifan-theme="day"] body:not(.home-mode) :is(.wflib-ro, .wflib-empty) {
  color: rgba(226, 234, 236, 0.88) !important;
}

/* —— #6 P1 · AI记忆库 R4 节点类型徽章(35 分片,深底药丸 rgba(15,23,42,.74) 无 day 覆盖) ——
   实测 day 1.02(深底 + day 墨字 = 几乎不可见)。徽章保留深底,文字翻回浅蓝。 */
html[data-meifan-theme="day"] body:not(.home-mode) :is(.ai-memory-r4-kind, .ai-memory-r4-tags span) {
  border-color: rgba(125, 211, 252, 0.28) !important;
  color: #d8eefc !important;
}

/* —— #7 P2 · AI设计辅助节点状态徽章 em(「已配置」等) ——
   06 分片给 em 的是深底(rgba(12,58,72,.94) / 已配置态 rgba(8,71,57,.96))+ 浅字,
   但白天通用墨色把字染深 → 实测 day 1.22。徽章保留深底,文字翻回浅色。 */
html[data-meifan-theme="day"] body:not(.home-mode) .ai-assist-node em {
  color: rgba(236, 253, 255, 0.96) !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) .ai-assist-node.configured em {
  color: rgba(230, 255, 248, 0.98) !important;
}

/* —— #8 P2 · 项目管理列表工具条(清单标「存疑」,本轮目视 + 直方图复核后【判定为真缺陷】) ——
   复核结论: 不是「直方图取到字形本身」的假阳 —— 实测 L95≈L50(0.4422 vs 0.4418)说明取到的
   就是背景而非字形;放大 6 倍目视亦见控件底是一块灰片压在白天近白页面上。
   真根因在【容器底色】而非文字: 02 分片 .project-list-type-filter /
   .project-list-tools small 硬编码夜底 rgba(2,17,28,.32),本分片零 day 覆盖 →
   白天渲染成中灰药丸,文字(--muted)压上去 ratio 3.67,低于 AA 4.5。
   修法: 容器翻白天浅底,文字随之达标(不动尺寸与结构)。 */
html[data-meifan-theme="day"] body:not(.home-mode) #projects :is(
  .project-list-type-filter, .project-list-tools small
) {
  border-color: #d8ddd6 !important;
  background: #ffffff !important;
  color: #3c4744 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) #projects .project-list-type-filter select {
  color: #1e2524 !important;
}

/* —— 全局底座 A(白天侧) · 侧栏品牌角标 ——
   css/01 已让 .brand-mark span 继承角标深墨色,夜间实测 1.00 → 10.46 已达标;
   但白天另有一条 .sidebar :is(p, small, span) 侧栏浅字规则(特异度 0,3,2)把它又染回浅灰,
   实测白天仍是 1.42。这里用 (0,4,2) 精确豁免角标内文字,不动那条侧栏通用浅字规则。 */
html[data-meifan-theme="day"] body:not(.home-mode) .sidebar .brand-mark span {
  color: inherit !important;
}

/* —— 全局底座 B(白天侧) · 全站禁用按钮 ——
   夜间侧补在 css/09;白天必须单独给,否则 09 的浅色值会落到白天的浅底上。
   特异度 (0,3,2) 高于 09 的 (0,2,1),白天稳定胜出;仍不碰任何已有专属禁用样式的结构。 */
html[data-meifan-theme="day"] body:not(.home-mode) button:disabled {
  color: #5f6864;
}

/* TASK-118 A-7: action modal is appended under body, outside the personal-block day-theme scope. */
html[data-meifan-theme="day"] body:not(.home-mode) .settings-account-r19-action-dialog {
  background: #fff !important;
  color: #22312b !important;
}
html[data-meifan-theme="day"] body:not(.home-mode) .settings-account-r19-action-dialog :is(h1,h2,h3,h4,strong,label,dd) {
  color: #22312b !important;
}
html[data-meifan-theme="day"] body:not(.home-mode) .settings-account-r19-action-dialog :is(p,span,li,dt):not([data-cam-status]) {
  color: #53615b !important;
}
html[data-meifan-theme="day"] body:not(.home-mode) .settings-account-r19-action-dialog [data-cam-status][data-cam-tone="error"] {
  color: #9d3527 !important;
}
html[data-meifan-theme="day"] body:not(.home-mode) .settings-account-r19-action-dialog [data-cam-status][data-cam-tone="ok"] {
  color: #1c6b57 !important;
}
html[data-meifan-theme="day"] body:not(.home-mode) .settings-account-r19-close input {
  border-color: #cfd8d3 !important;
  background: #fff !important;
  color: #22312b !important;
}
html[data-meifan-theme="day"] body:not(.home-mode) .settings-account-r19-close-contract-error {
  color: #9d3527 !important;
}

/* ══ O106 · 378(NY-10/11) 生成节点模型选择面板/抽屉 白天态 —— 深蓝底+深字低反差修复 ══
   症状(342-r8 实测): 白天下 .mf-ny-panel(桌面浮层)/.mf-ny-drawer(手机抽屉) 仍是 06 的深蓝渐变底,
   而 09 的 body:not(.home-mode) strong/small/p(特异度 0,1,2) 把标题/副题/原因染成 day --ink rgb(30,37,36)
   与 --muted —— 深字落深蓝渐变, 标题对比度保守上界 1.21(WCAG 正文要求 4.5)。
   修法: 白天浅底 + 深字(本块尾部覆盖, 面板内全部文字一并翻墨, 否则旧浅字落浅底反向不可见);
   几何零改动(width / max-height / border-radius / padding / gap 一概不写, O75 已闭);
   夜间零改动(全部选择器挂在 html[data-meifan-theme="day"] 下, css/06 一字不动)。
   颜色溯源: 深蓝渐变 linear-gradient(180deg, rgba(10,35,50,.98), rgba(3,19,29,.98)) 与 color: #effcff
   由 798e4668c(378 生成节点选择面板按定稿 NY-10/11) 引入; fd4981cc(389) 只改几何未改颜色 —— 既有。 */
html[data-meifan-theme="day"] body:not(.home-mode) .mf-ny-panel {
  border-color: #e3e6e0 !important;
  background: linear-gradient(180deg, #ffffff, #f7f8f5) !important;
  color: #1e2524 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) .mf-ny-group-title {
  color: #16211f !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) .mf-ny-item {
  color: #1e2524 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) button.mf-ny-item:hover,
html[data-meifan-theme="day"] body:not(.home-mode) button.mf-ny-item:focus-visible {
  background: #eef5f1 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) .mf-ny-item.is-selected {
  border-color: rgba(50, 122, 94, 0.45) !important;
  background: #eef5f1 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) .mf-ny-item-check {
  color: #2c6b52 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) .mf-ny-badge {
  border-color: #d8ddd6 !important;
  color: #4b5450 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) .mf-ny-badge-default {
  border-color: rgba(50, 122, 94, 0.5) !important;
  color: #2c6b52 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) .mf-ny-item-radio {
  border-color: #cfd6cf !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) .mf-ny-item.is-selected .mf-ny-item-radio {
  background: #2c6b52 !important;
  border-color: #2c6b52 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) .mf-ny-reason {
  color: #8a5a0b !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) .mf-ny-foot {
  border-top-color: #e3e6e0 !important;
  color: #4b5450 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) .mf-ny-drawer {
  border-color: #e3e6e0 !important;
  background: linear-gradient(180deg, #ffffff, #f7f8f5) !important;
  color: #1e2524 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) .mf-ny-drawer-head strong {
  color: #16211f !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) .mf-ny-drawer-head small {
  color: #4b5450 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) .mf-ny-drawer-close {
  border-color: #d8ddd6 !important;
  color: #1e2524 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) .mf-ny-drawer-count {
  color: #4b5450 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) .mf-ny-drawer .mf-ny-item {
  border-color: #e3e6e0 !important;
  background: #fbfcfa !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) .mf-ny-drawer .mf-ny-item.is-selected {
  border-color: rgba(50, 122, 94, 0.5) !important;
  background: #eef5f1 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) .mf-ny-drawer-foot {
  color: #4b5450 !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) .mf-ny-drawer-foot a {
  color: #2d6f7a !important;
}

html[data-meifan-theme="day"] body:not(.home-mode) .mf-ny-drawer-confirm {
  background: linear-gradient(180deg, #24403c, #1d3230) !important;
  color: #f6f3ec !important;
}

/* MOBILE-UI-P2-1: 驾驶舱「施工进度」卡的节点名字色是夜间浅色（css/02_project.css .project-dashboard-bottom-card--construction .construction-step-name，
   rgba(235,248,252,.9)），白底下对比度约 1.07:1 几乎不可见。日间改用日间次要文字 token；当前节点(.active)仍走原绿色规则；夜间不动。 */
html[data-meifan-theme="day"] .project-dashboard-bottom-card--construction .construction-step-node:not(.active) .construction-step-name {
  color: var(--muted);
}

/* —— U27 视频工坊布局还原·日间: 步骤条与栏卡。取值沿本文件既有的 marketing 步骤卡口径(墨 #16211f / 品牌绿 #327a5e / 线 #cfd6cf) —— */
html[data-meifan-theme="day"] .mkt-stepbar, html[data-meifan-theme="day"] .mkt-pane { background:var(--mf-theme-card-strong, #ffffff); border-color:var(--mf-theme-line-strong, #cfd6cf); }
html[data-meifan-theme="day"] body:not(.home-mode) #marketing .mkt-stepbar .mkt-step { background:transparent !important; box-shadow:none !important; border:0 !important; color:#4b5450 !important; }
html[data-meifan-theme="day"] body:not(.home-mode) #marketing .mkt-stepbar .mkt-step.on, html[data-meifan-theme="day"] body:not(.home-mode) #marketing .mkt-stepbar .mkt-step:hover { color:#16211f !important; }
html[data-meifan-theme="day"] .mkt-step-no { background:#dfe4df; }
html[data-meifan-theme="day"] body:not(.home-mode) #marketing .mkt-stepbar .mkt-step .mkt-step-no { color:#16211f !important; }
html[data-meifan-theme="day"] .mkt-step.on .mkt-step-no { background:#327a5e; box-shadow:0 0 0 4px rgba(50,122,94,.22); }
html[data-meifan-theme="day"] body:not(.home-mode) #marketing .mkt-stepbar .mkt-step.on .mkt-step-no { color:#ffffff !important; }
html[data-meifan-theme="day"] .mkt-step-line { background:#cfd6cf; }
html[data-meifan-theme="day"] .mkt-pane-head > strong { color:#16211f; }
html[data-meifan-theme="day"] .mkt-seg { border-color:#cfd6cf; }
html[data-meifan-theme="day"] .mkt-seg > * { color:#4b5450; }
html[data-meifan-theme="day"] .mkt-seg > .on { background:#327a5e; color:#ffffff; }
html[data-meifan-theme="day"] body:not(.home-mode) #marketing .mkt-seg > .on { color:#ffffff !important; }
html[data-meifan-theme="day"] body:not(.home-mode) #marketing .mkt-stepbar .mkt-step.stale .aile-node-state { color:#7a5215 !important; }
@media (max-width:760px){
  html[data-meifan-theme="day"] .mkt-stepbar { background:transparent; }
  html[data-meifan-theme="day"] .mkt-step-line { background:transparent; border-top-color:#cfd6cf; }
}

/* —— U27 视频工坊布局还原·日间: 04 屏预览 / 分镜行 / 模型选择组 —— */
html[data-meifan-theme="day"] .aile-media-row { background:#ffffff; border-color:#dfe4df; }
html[data-meifan-theme="day"] .aile-media-row.on { background:#f1f6f2; border-color:#327a5e; }
/* 日间: 镜号块用浅底(夜间的深底块在白面板上太重); 主钮里的子元素跟随主钮字色 */
html[data-meifan-theme="day"] .aile-media-no { background:#e9efe9; }
html[data-meifan-theme="day"] body:not(.home-mode) #marketing .aile-flow .aile-btn.primary > span, html[data-meifan-theme="day"] body:not(.home-mode) #marketing .aile-flow .aile-btn.primary > small, html[data-meifan-theme="day"] body:not(.home-mode) #marketing .aile-flow .aile-btn.primary > i, html[data-meifan-theme="day"] body:not(.home-mode) #marketing .aile-flow .aile-btn.primary > span > i { color:inherit !important; }
html[data-meifan-theme="day"] .aile-media-row.on .aile-media-no { background:#327a5e; }
html[data-meifan-theme="day"] body:not(.home-mode) #marketing .aile-media-row.on .aile-media-no { color:#ffffff !important; }
html[data-meifan-theme="day"] .aile-media-c-prev span.aile-shot-media, html[data-meifan-theme="day"] .aile-media-meta-ph { background:#f0f4f1; }
html[data-meifan-theme="day"] .aile-media-meta { border-color:#dfe4df; }
html[data-meifan-theme="day"] .aile-ref-chip { background:#f7f8f5; border-color:#dfe4df; }
@media (max-width:760px){
  html[data-meifan-theme="day"] .mkt-projbar { background:#ffffff; border-color:#cfd6cf; color:#4b5450; }
  html[data-meifan-theme="day"] body:not(.home-mode) #marketing .mkt-projbar .mkt-projbar-btn { background:transparent !important; border:0 !important; border-left:1px solid #cfd6cf !important; box-shadow:none !important; color:#16211f !important; }
  html[data-meifan-theme="day"] body:not(.home-mode) #marketing .mkt-subtabs button { background:transparent !important; border:0 !important; box-shadow:none !important; color:#4b5450 !important; }
  html[data-meifan-theme="day"] body:not(.home-mode) #marketing .mkt-subtabs button.on { background:#327a5e !important; color:#ffffff !important; }
  html[data-meifan-theme="day"] .aile-media-cur-h small { color:#4b5450; }
}
html[data-meifan-theme="day"] .mkt-pane-foot .aile-api-status { background:transparent; }
html[data-meifan-theme="day"] body:not(.home-mode) #marketing .mkt-seg.mkt-todo button.on { background:#327a5e !important; color:#ffffff !important; }
html[data-meifan-theme="day"] .aile-media-actrow select, html[data-meifan-theme="day"] .aile-media-model select, html[data-meifan-theme="day"] .aile-media-fld select, html[data-meifan-theme="day"] .aile-media-uprompt { background:#ffffff; color:#1e2524; border-color:#cfd6cf; }
html[data-meifan-theme="day"] .aile-media-player-cap, html[data-meifan-theme="day"] .aile-media-srcbar .aile-media-count, html[data-meifan-theme="day"] .aile-media-srcbar, html[data-meifan-theme="day"] .aile-media-ready { color:#4b5450; }
html[data-meifan-theme="day"] body:not(.home-mode) #marketing .aile-flow .aile-media-st > .mkt-ico, html[data-meifan-theme="day"] body:not(.home-mode) #marketing .aile-flow .aile-media-st > .aile-st-l, html[data-meifan-theme="day"] body:not(.home-mode) #marketing .aile-flow .aile-media-st > .aile-st-s, html[data-meifan-theme="day"] body:not(.home-mode) #marketing .aile-flow .aile-media-st > .aile-st-l > span { color:inherit !important; }
html[data-meifan-theme="day"] body:not(.home-mode) #marketing .aile-flow .aile-media-st.done { color:#327a5e !important; }
html[data-meifan-theme="day"] body:not(.home-mode) #marketing .aile-flow .aile-media-st.gen { color:#b47a28 !important; }
html[data-meifan-theme="day"] body:not(.home-mode) #marketing .aile-flow .aile-media-st.fail, html[data-meifan-theme="day"] body:not(.home-mode) #marketing .aile-flow .aile-shot-media.fail { color:#b24b45 !important; }
html[data-meifan-theme="day"] body:not(.home-mode) #marketing .aile-flow .aile-media-st.idle, html[data-meifan-theme="day"] body:not(.home-mode) #marketing .aile-flow .aile-media-st.queued { color:#4b5450 !important; }

/* —— U27 小头·日间: 视频工坊主钮主色(品牌绿, 与日间步骤卡当前态同值; 禁用同日间全局禁用口径) —— */
html[data-meifan-theme="day"] body:not(.home-mode) #marketing .aile-flow .aile-btn.primary { background:#327a5e !important; color:#ffffff !important; border-color:#327a5e !important; box-shadow:none !important; }
html[data-meifan-theme="day"] body:not(.home-mode) #marketing .aile-flow .aile-btn.primary:hover { background:#2a6a51 !important; }
html[data-meifan-theme="day"] body:not(.home-mode) #marketing .aile-flow .aile-btn.primary:disabled { background:#e6ece8 !important; color:#7b857f !important; border-color:#d8ddd6 !important; }
/* ENTITLEMENT-OBSERVATION-R1 · 优2·计费观察面板卡片样式（独立类前缀 entobs-r1-*，不影响 33/41 既有 API 管理样式） */
.entobs-r1 { margin-top: 16px; }
.entobs-r1-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.entobs-r1-head h3 { margin: 0; font-size: 15px; font-weight: 600; }
.entobs-r1-head small { color: #6b7280; font-size: 12px; }
.entobs-r1-hint { background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; border-radius: 8px; padding: 8px 12px; font-size: 12.5px; margin-bottom: 12px; }
.entobs-r1-loading, .entobs-r1-empty { color: #6b7280; font-size: 13px; padding: 12px 0; }

.entobs-r1-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.entobs-r1-card { background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 10px; padding: 12px 14px; }
.entobs-r1-card-title { font-size: 12px; color: #6b7280; margin-bottom: 6px; }
.entobs-r1-card-big { font-size: 22px; font-weight: 700; color: #111827; line-height: 1.2; }
.entobs-r1-card-sub { font-size: 12px; color: #9ca3af; margin-top: 4px; }

.entobs-r1-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.entobs-r1-block { background: #ffffff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 12px 14px; }
.entobs-r1-block-title { font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 8px; }

.entobs-r1-reason-list, .entobs-r1-model-list { list-style: none; margin: 0; padding: 0; }
.entobs-r1-reason-list li, .entobs-r1-model-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid #f3f4f6; font-size: 13px; }
.entobs-r1-reason-list li:last-child, .entobs-r1-model-list li:last-child { border-bottom: none; }
.entobs-r1-reason-name, .entobs-r1-model-name { color: #374151; }
.entobs-r1-reason-count { color: #b45309; font-weight: 600; }
.entobs-r1-model-points { color: #1d4ed8; font-weight: 600; }

/* 可灵对账行(深化点②)：正常=绿框(终态误计0)，双计=红框告警 */
.entobs-r1-recon { margin-top: 12px; }
.entobs-r1-recon-ok { border-color: #bbf7d0; background: #f0fdf4; }
.entobs-r1-recon-ok .entobs-r1-recon .entobs-r1-reason-count, .entobs-r1-recon-ok .entobs-r1-reason-count { color: #15803d; }
.entobs-r1-recon-bad { border-color: #fecaca; background: #fef2f2; }
.entobs-r1-recon-bad .entobs-r1-reason-count { color: #b91c1c; }

/* 视频失败率块(深化点③)：失败率分级着色 ok=绿 / mid=黄 / hi(≥20%)=红 */
.entobs-r1-vf { margin-top: 12px; }
.entobs-r1-vf-ok { color: #15803d; }
.entobs-r1-vf-mid { color: #b45309; }
.entobs-r1-vf-hi { color: #b91c1c; font-weight: 700; }
.entobs-r1-vf-note { font-size: 11.5px; color: #9ca3af; margin-top: 8px; }

@media (max-width: 760px) {
  .entobs-r1-cards { grid-template-columns: 1fr; }
  .entobs-r1-cols { grid-template-columns: 1fr; }
}

/* ===== NIGHT-CONTRAST-FIX-20260725 · 清单#3 计费观察面板夜间覆盖段 =====
   本分片原按白天配色成文(白/米白大块 + 浅灰字)，夜晚主题(tech-glass-blue,默认态)下
   整片白底割裂且正文 ratio 1.05~1.24 不可读。夜间 = 默认态，故用
   html:not([data-meifan-theme="day"]) 选择器兜住"未写 attr"与"tech-glass-blue"两种情形；
   白天(html[data-meifan-theme="day"])完全不匹配 → 上方白天规则原样保留，零改动。 */
html:not([data-meifan-theme="day"]) body:not(.home-mode) .entobs-r1-head small {
  color: var(--mf-theme-muted);
}
html:not([data-meifan-theme="day"]) body:not(.home-mode) .entobs-r1-hint {
  background: rgba(231, 180, 95, 0.12);
  border-color: rgba(231, 180, 95, 0.34);
  color: #f2c789;
}
html:not([data-meifan-theme="day"]) body:not(.home-mode) .entobs-r1-loading,
html:not([data-meifan-theme="day"]) body:not(.home-mode) .entobs-r1-empty {
  color: var(--mf-theme-muted);
}
html:not([data-meifan-theme="day"]) body:not(.home-mode) .entobs-r1-card,
html:not([data-meifan-theme="day"]) body:not(.home-mode) .entobs-r1-block {
  background: var(--mf-theme-card);
  border-color: var(--mf-theme-line);
  box-shadow: var(--mf-theme-glass-shadow);
}
html:not([data-meifan-theme="day"]) body:not(.home-mode) .entobs-r1-card-title,
html:not([data-meifan-theme="day"]) body:not(.home-mode) .entobs-r1-card-sub {
  color: var(--mf-theme-muted);
}
html:not([data-meifan-theme="day"]) body:not(.home-mode) .entobs-r1-card-big,
html:not([data-meifan-theme="day"]) body:not(.home-mode) .entobs-r1-block-title,
html:not([data-meifan-theme="day"]) body:not(.home-mode) .entobs-r1-reason-name,
html:not([data-meifan-theme="day"]) body:not(.home-mode) .entobs-r1-model-name {
  color: var(--mf-theme-ink);
}
html:not([data-meifan-theme="day"]) body:not(.home-mode) .entobs-r1-reason-list li,
html:not([data-meifan-theme="day"]) body:not(.home-mode) .entobs-r1-model-list li {
  border-bottom-color: var(--mf-theme-line);
}
html:not([data-meifan-theme="day"]) body:not(.home-mode) .entobs-r1-reason-list li:last-child,
html:not([data-meifan-theme="day"]) body:not(.home-mode) .entobs-r1-model-list li:last-child {
  border-bottom-color: transparent;
}
html:not([data-meifan-theme="day"]) body:not(.home-mode) .entobs-r1-reason-count {
  color: #f2c789;
}
html:not([data-meifan-theme="day"]) body:not(.home-mode) .entobs-r1-model-points {
  color: #93d6ff;
}
html:not([data-meifan-theme="day"]) body:not(.home-mode) .entobs-r1-recon-ok {
  border-color: rgba(112, 224, 173, 0.40);
  background:
    linear-gradient(145deg, rgba(112, 224, 173, 0.10), rgba(112, 224, 173, 0.03) 46%),
    rgba(5, 26, 30, 0.82);
}
html:not([data-meifan-theme="day"]) body:not(.home-mode) .entobs-r1-recon-ok .entobs-r1-recon .entobs-r1-reason-count,
html:not([data-meifan-theme="day"]) body:not(.home-mode) .entobs-r1-recon-ok .entobs-r1-reason-count,
html:not([data-meifan-theme="day"]) body:not(.home-mode) .entobs-r1-vf-ok {
  color: #7ce6b6;
}
html:not([data-meifan-theme="day"]) body:not(.home-mode) .entobs-r1-recon-bad {
  border-color: rgba(255, 156, 144, 0.42);
  background:
    linear-gradient(145deg, rgba(255, 156, 144, 0.10), rgba(255, 156, 144, 0.03) 46%),
    rgba(30, 10, 12, 0.82);
}
html:not([data-meifan-theme="day"]) body:not(.home-mode) .entobs-r1-recon-bad .entobs-r1-reason-count,
html:not([data-meifan-theme="day"]) body:not(.home-mode) .entobs-r1-vf-hi {
  color: #ffa093;
}
html:not([data-meifan-theme="day"]) body:not(.home-mode) .entobs-r1-vf-mid {
  color: #f2c789;
}
html:not([data-meifan-theme="day"]) body:not(.home-mode) .entobs-r1-vf-note {
  color: var(--mf-theme-muted);
}
/* SUBSCRIPTION-MODAL-R1 · 订阅弹窗（全站唯一订阅/充值面子）
   独立类前缀 submodal-r1-*；延续夜色主题（深底+青蓝描边+金色推荐），复用 --mf-theme-* token，
   不发明新设计语言。移动端(390px)卡片纵向单列。关闭万无一失：[hidden] 带 !important。 */

.submodal-r1-mask {
  position: fixed;
  inset: 0;
  z-index: var(--mf-layer-modal, 9999);
  background: rgba(6, 10, 18, 0.62);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.submodal-r1-mask[hidden] { display: none !important; }

.submodal-r1-dialog {
  width: min(1020px, 100%);
  max-height: 92vh;
  overflow: auto;
  border-radius: 16px;
  border: 1px solid var(--mf-theme-line, rgba(126, 211, 242, 0.30));
  background: #10141f;
  color: var(--mf-theme-ink, #e8f6fb);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  padding: 18px 22px 20px;
}

.submodal-r1-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.submodal-r1-head h3 { margin: 0; font-size: 17px; letter-spacing: 0.5px; }
.submodal-r1-x {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--mf-theme-line, rgba(126, 211, 242, 0.30));
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}
.submodal-r1-x:hover { background: rgba(126, 211, 242, 0.16); }

.submodal-r1-tabs { display: flex; gap: 10px; margin: 14px 0 12px; }
.submodal-r1-tab {
  padding: 9px 20px;
  border-radius: 10px;
  border: 1px solid rgba(126, 211, 242, 0.20);
  background: rgba(255, 255, 255, 0.02);
  color: var(--mf-theme-muted, rgba(207, 230, 238, 0.74));
  font-size: 14px;
  cursor: pointer;
}
.submodal-r1-tab.is-active {
  border-color: var(--mf-theme-line-strong, rgba(126, 211, 242, 0.50));
  background: rgba(70, 150, 220, 0.16);
  color: var(--mf-theme-ink-strong, #f1fbff);
  font-weight: 600;
}

.submodal-r1-statusline {
  font-size: 13px;
  color: var(--mf-theme-muted, rgba(207, 230, 238, 0.74));
  padding: 8px 12px;
  border: 1px solid rgba(126, 211, 242, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.015);
  margin-bottom: 14px;
}
.submodal-r1-statusline strong { color: var(--mf-theme-ink-strong, #f1fbff); }
.submodal-r1-mock-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  background: rgba(190, 130, 60, 0.16);
  color: #d59a4f;
}
.submodal-r1-dim { opacity: 0.6; }
.submodal-r1-loading-line { padding: 18px 4px; text-align: center; margin: 0; }

/* SS-30(2026-07-05): 员工只读引导条——工作区订阅是公司级动作, 员工只能查看不能下单 */
.submodal-r1-readonly-banner {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--mf-theme-muted, rgba(207, 230, 238, 0.74));
  padding: 9px 12px;
  margin-bottom: 12px;
  border: 1px solid rgba(126, 211, 242, 0.2);
  border-left: 3px solid #7ed3f2;
  border-radius: 8px;
  background: rgba(126, 211, 242, 0.07);
}

/* ---------- 卡片一排 ---------- */
.submodal-r1-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  align-items: stretch;
}
.submodal-r1-cards-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.submodal-r1-card { perspective: 1200px; min-height: 292px; }
.submodal-r1-act384-direct-order { min-height: 420px; }
.submodal-r1-flip {
  position: relative;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.45s ease;
}
.submodal-r1-card.is-flipped .submodal-r1-flip { transform: rotateY(180deg); }
.submodal-r1-face {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 14px;
  border: 1px solid rgba(126, 211, 242, 0.20);
  background: rgba(255, 255, 255, 0.02);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.submodal-r1-front { position: relative; min-height: 100%; box-sizing: border-box; }
.submodal-r1-back {
  position: absolute;
  inset: 0;
  transform: rotateY(180deg);
  overflow: auto;
  scrollbar-width: none;
  background: #131a28;
  padding: 12px;
  gap: 7px;
}
.submodal-r1-back::-webkit-scrollbar { display: none; }

.submodal-r1-card.is-reco .submodal-r1-front {
  border-color: rgba(231, 180, 95, 0.55);
  box-shadow: 0 0 0 1px rgba(231, 180, 95, 0.22) inset, 0 6px 22px rgba(231, 180, 95, 0.07);
}
.submodal-r1-card.is-current .submodal-r1-front {
  border-color: var(--mf-theme-line-strong, rgba(126, 211, 242, 0.50));
  box-shadow: 0 0 0 1px rgba(126, 211, 242, 0.22) inset;
}
@keyframes submodal-r1-glow {
  0% { box-shadow: 0 0 0 0 rgba(231, 180, 95, 0); }
  40% { box-shadow: 0 0 0 2px rgba(231, 180, 95, 0.45); }
  100% { box-shadow: 0 0 0 0 rgba(231, 180, 95, 0); }
}
.submodal-r1-card.is-upsell-glow .submodal-r1-front { animation: submodal-r1-glow 1.6s ease; }

.submodal-r1-card-name { font-size: 15px; font-weight: 600; color: var(--mf-theme-ink-strong, #f1fbff); }
.submodal-r1-star { color: #e7b45f; font-size: 12px; font-weight: 600; margin-left: 2px; white-space: nowrap; }
.submodal-r1-price { font-size: 24px; font-weight: 700; color: var(--mf-theme-ink-strong, #f1fbff); }
.submodal-r1-price small { font-size: 12px; font-weight: 400; opacity: 0.6; margin-left: 2px; }

.submodal-r1-current-badge {
  align-self: flex-start;
  font-size: 11px;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(70, 150, 220, 0.18);
  color: #7ec8f2;
}
.submodal-r1-current-plain { font-size: 13px; opacity: 0.75; padding: 7px 0; }

.submodal-r1-perks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12.5px;
  color: var(--mf-theme-muted, rgba(207, 230, 238, 0.74));
}
.submodal-r1-perks li { line-height: 1.5; }

.submodal-r1-card-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.submodal-r1-btn-row { display: flex; gap: 8px; }
.submodal-r1-btn-row > * { flex: 1; }
.submodal-r1-period {
  width: 100%;
  padding: 7px 9px;
  border-radius: 8px;
  border: 1px solid rgba(126, 211, 242, 0.28);
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  font-size: 12.5px;
}
.submodal-r1-period option { background: #131a28; color: #e8f6fb; }
.submodal-r1-btn-main {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--mf-theme-line-strong, rgba(126, 211, 242, 0.50));
  background: rgba(70, 150, 220, 0.18);
  color: var(--mf-theme-ink-strong, #f1fbff);
  font-size: 13px;
  letter-spacing: 2px;
  cursor: pointer;
}
.submodal-r1-btn-main:hover { background: rgba(70, 150, 220, 0.30); }
.submodal-r1-btn-main:disabled { opacity: 0.55; cursor: default; letter-spacing: 0; }
.submodal-r1-btn-ghost {
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid rgba(126, 211, 242, 0.22);
  background: transparent;
  color: var(--mf-theme-muted, rgba(207, 230, 238, 0.74));
  font-size: 12.5px;
  cursor: pointer;
}
.submodal-r1-btn-ghost:hover { background: rgba(126, 211, 242, 0.10); }

/* 翻转背面：对公转账信息（内容必须收进卡内，不出滚动条不裁切） */
.submodal-r1-back-title { font-size: 12.5px; color: var(--mf-theme-muted, rgba(207, 230, 238, 0.74)); }
.submodal-r1-back-title strong { font-size: 18px; color: #7ec8f2; margin-left: 4px; }
.submodal-r1-remit { margin: 0; display: flex; flex-direction: column; gap: 5px; }
.submodal-r1-remit > div { display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; }
.submodal-r1-remit dt { opacity: 0.55; margin: 0; white-space: nowrap; }
.submodal-r1-remit dd { margin: 0; font-weight: 600; text-align: right; word-break: break-all; line-height: 1.4; }
.submodal-r1-back-note { margin: 0; font-size: 11px; opacity: 0.62; line-height: 1.5; }
.submodal-r1-back-error { margin: 0; font-size: 12.5px; color: #e07a7a; line-height: 1.6; }
.submodal-r1-back .submodal-r1-btn-main { margin-top: auto; padding: 7px 10px; font-size: 12.5px; }
.submodal-r1-back .submodal-r1-btn-ghost { padding: 5px 10px; font-size: 12px; }

/* ---------- 积分 tab ---------- */
.submodal-r1-section-title { font-size: 13.5px; font-weight: 600; margin: 2px 0 10px; color: var(--mf-theme-ink-strong, #f1fbff); }
.submodal-r1-oneoff {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed rgba(126, 211, 242, 0.18);
}
.submodal-r1-oneoff-label { font-size: 12.5px; color: var(--mf-theme-muted, rgba(207, 230, 238, 0.74)); margin-bottom: 9px; }
.submodal-r1-oneoff-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.submodal-r1-oneoff-btn {
  padding: 8px 16px;
  border-radius: 9px;
  border: 1px solid rgba(126, 211, 242, 0.30);
  background: rgba(255, 255, 255, 0.03);
  color: var(--mf-theme-ink, #e8f6fb);
  font-size: 13px;
  cursor: pointer;
}
.submodal-r1-oneoff-btn:hover { background: rgba(70, 150, 220, 0.18); border-color: var(--mf-theme-line-strong, rgba(126, 211, 242, 0.50)); }
.submodal-r1-oneoff-btn:disabled { opacity: 0.55; cursor: default; }
.submodal-r1-oneoff-btn:disabled:hover { background: rgba(255, 255, 255, 0.03); border-color: rgba(126, 211, 242, 0.30); }

/* 支付未开放占位钮: 不靠 opacity 压淡(暗色主题下会糊成不可读), 显式灰面+可读字色 */
.submodal-r1-btn-main[data-payment-pending],
.submodal-r1-oneoff-btn[data-payment-pending] {
  opacity: 1;
  background: rgba(148, 163, 184, 0.14);
  border: 1px dashed rgba(148, 163, 184, 0.45);
  color: var(--mf-theme-muted, rgba(207, 230, 238, 0.78));
  cursor: not-allowed;
  letter-spacing: 0;
}
.submodal-r1-oneoff-panel {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(126, 211, 242, 0.20);
  border-radius: 12px;
  background: #131a28;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 420px;
}

/* TASK407-V2：公司创建主体专属充值区。成员态仍保留只读信息，但 DOM 中没有收费按钮。 */
.submodal-r1-company-recharge {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(126, 211, 242, 0.22);
  border-radius: 14px;
  background: rgba(126, 211, 242, 0.055);
}
.submodal-r1-company-recharge.is-readonly { border-style: dashed; background: rgba(255, 255, 255, 0.018); }
.submodal-r1-company-recharge-head,
.submodal-r1-company-recharge.is-readonly > div { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.submodal-r1-company-recharge.is-readonly > div { margin-bottom: 0; }
.submodal-r1-company-recharge strong { color: var(--mf-theme-ink-strong, #f1fbff); font-size: 13px; }
.submodal-r1-company-recharge span { display: block; margin-top: 3px; color: var(--mf-theme-muted, rgba(207, 230, 238, 0.68)); font-size: 11.5px; line-height: 1.5; }
.submodal-r1-company-recharge-order { margin-top: 12px; }
.submodal-r1-company-recharge-order .submodal-r1-back {
  position: relative;
  inset: auto;
  transform: none;
  min-height: 210px;
  box-sizing: border-box;
}
.submodal-r1-order-points { margin: 0; color: #f4d67a; font-size: 12px; }
.submodal-r1-catalog-error {
  padding: 18px;
  border: 1px dashed rgba(224, 122, 122, 0.38);
  border-radius: 12px;
  color: #e8b0b0;
  background: rgba(224, 122, 122, 0.055);
  text-align: center;
  font-size: 12.5px;
}

.submodal-r1-footnote {
  margin-top: 14px;
  font-size: 12px;
  text-align: center;
  color: var(--mf-theme-muted-soft, rgba(207, 230, 238, 0.58));
}

/* 设置D积分排版(2026-07-07): 出图会员月度积分发放摘要(每月额度/剩余批次/下次发放/有效期) */
.submodal-r1-grant-summary {
  margin: 2px 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--mf-theme-line-soft, rgba(126, 158, 177, 0.22));
  background: var(--mf-theme-surface-soft, rgba(30, 41, 59, 0.5));
}
.submodal-r1-grant-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--mf-theme-ink-strong, #f1fbff);
  margin-bottom: 8px;
}
.submodal-r1-grant-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 18px;
  margin: 0;
}
.submodal-r1-grant-item { display: flex; align-items: baseline; gap: 8px; margin: 0; }
.submodal-r1-grant-item dt {
  font-size: 11.5px;
  color: var(--mf-theme-muted-soft, rgba(207, 230, 238, 0.58));
  white-space: nowrap;
}
.submodal-r1-grant-item dd { margin: 0; font-size: 12px; color: var(--mf-theme-ink, #dcecef); }
.submodal-r1-grant-item dd strong { color: #f4d67a; }
.submodal-r1-grant-note {
  margin: 10px 0 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--mf-theme-muted-soft, rgba(207, 230, 238, 0.55));
}

/* ---------- 移动端 390px：纵向单列 ---------- */
@media (max-width: 480px) {
  .submodal-r1-mask { padding: 10px; align-items: flex-start; }
  .submodal-r1-dialog { padding: 14px 14px 16px; max-height: 96vh; margin-top: 2vh; }
  .submodal-r1-cards, .submodal-r1-cards-3 { grid-template-columns: 1fr; }
  .submodal-r1-card { min-height: 0; }
  .submodal-r1-front { min-height: 252px; }
  .submodal-r1-tabs { gap: 8px; }
  .submodal-r1-tab { flex: 1; padding: 9px 8px; text-align: center; }
  .submodal-r1-oneoff-btns { flex-direction: column; }
  .submodal-r1-oneoff-btn { width: 100%; }
  .submodal-r1-oneoff-panel { max-width: none; }
  .submodal-r1-company-recharge { padding: 12px; }
  .submodal-r1-company-recharge-head,
  .submodal-r1-company-recharge.is-readonly > div { display: block; }
  .submodal-r1-grant-list { grid-template-columns: 1fr; } /* 设置D积分排版: 窄屏月度发放摘要单列 */
}

/* ---------- 384: 「活动与公告」区 + 选券结算（命名空间 sub-act384-*；色与节奏沿用 submodal-r1-* 变量） ---------- */
.submodal-r1-act384 {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--mf-theme-line-soft, rgba(126, 158, 177, 0.22));
  background: var(--mf-theme-surface-soft, rgba(30, 41, 59, 0.5));
}
.submodal-r1-act384-head { font-size: 13.5px; font-weight: 600; color: var(--mf-theme-ink-strong, #f1fbff); margin-bottom: 10px; }
.submodal-r1-act384-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.submodal-r1-act384-card {
  border: 1px solid rgba(126, 211, 242, 0.20);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.submodal-r1-act384-card-head { display: flex; align-items: center; gap: 8px; }
.submodal-r1-act384-pill {
  flex: none;
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(96, 190, 130, 0.16);
  color: #8fd9a8;
}
.submodal-r1-act384-title { font-size: 13px; font-weight: 600; color: var(--mf-theme-ink-strong, #f1fbff); }
.submodal-r1-act384-summary { margin: 0; font-size: 12px; line-height: 1.5; color: var(--mf-theme-muted, rgba(207, 230, 238, 0.74)); }
.submodal-r1-act384-audience { margin: 0; font-size: 11.5px; color: #7ec8f2; }
.submodal-r1-act384-range { margin: 0; font-size: 11.5px; color: var(--mf-theme-muted-soft, rgba(207, 230, 238, 0.58)); }
.submodal-r1-act384-open { align-self: flex-start; }
.submodal-r1-act384-notices { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.submodal-r1-act384-notice,
.submodal-r1-act384-rewards {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid rgba(126, 211, 242, 0.18);
  background: rgba(255, 255, 255, 0.02);
  color: var(--mf-theme-ink, #e8f6fb);
  font-size: 12.5px;
  cursor: pointer;
  text-align: left;
}
.submodal-r1-act384-notice:hover,
.submodal-r1-act384-rewards:hover { background: rgba(126, 211, 242, 0.10); }
.submodal-r1-act384-notice-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.submodal-r1-act384-notice-go { opacity: 0.55; }
.submodal-r1-act384-rewards { margin-top: 6px; }
.submodal-r1-act384-rewards-label { flex: 1; }
.submodal-r1-act384-foot { margin: 10px 0 0; font-size: 11px; color: var(--mf-theme-muted-soft, rgba(207, 230, 238, 0.55)); }

/* 384 选券结算视图（选券→下单到待支付止；支付/mark-paid 仍禁） */
.submodal-r1-act384-settle { display: flex; flex-direction: column; gap: 10px; max-width: 520px; }
.submodal-r1-act384-settle-title { font-size: 14px; font-weight: 600; color: var(--mf-theme-ink-strong, #f1fbff); }
.submodal-r1-act384-coupon-panel { display: contents; }
.submodal-r1-act384-order-card {
  border: 1px solid var(--mf-theme-line-strong, rgba(126, 211, 242, 0.50));
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(70, 150, 220, 0.08);
}
.submodal-r1-act384-order-name { font-size: 13.5px; font-weight: 600; color: var(--mf-theme-ink-strong, #f1fbff); }
.submodal-r1-act384-order-meta { margin-top: 3px; font-size: 12px; color: var(--mf-theme-muted, rgba(207, 230, 238, 0.74)); }
.submodal-r1-act384-coupons-head { font-size: 12.5px; color: var(--mf-theme-muted, rgba(207, 230, 238, 0.74)); }
.submodal-r1-act384-coupons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.submodal-r1-act384-coupon {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 8px;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid rgba(126, 211, 242, 0.22);
  background: rgba(255, 255, 255, 0.02);
  color: inherit;
  font-size: 12px;
  line-height: 1.45;
  cursor: pointer;
  text-align: left;
}
.submodal-r1-act384-coupon:hover { background: rgba(126, 211, 242, 0.08); }
.submodal-r1-act384-coupon.is-picked { border-color: rgba(231, 180, 95, 0.60); background: rgba(231, 180, 95, 0.08); }
.submodal-r1-act384-coupon:disabled { opacity: 0.72; cursor: default; }
.submodal-r1-act384-coupon:disabled:hover { background: rgba(255, 255, 255, 0.02); }
.submodal-r1-act384-coupon-amount { font-weight: 700; color: #f4d67a; }
.submodal-r1-act384-coupon-src { color: var(--mf-theme-muted, rgba(207, 230, 238, 0.74)); }
.submodal-r1-act384-coupon-scope {
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(126, 211, 242, 0.12);
  color: #7ec8f2;
}
.submodal-r1-act384-coupon-applicability {
  flex-basis: 100%;
  color: var(--mf-theme-muted, rgba(207, 230, 238, 0.74));
  font-size: 11px;
}
.submodal-r1-act384-coupon[data-sub-act384-applicable="false"] .submodal-r1-act384-coupon-applicability {
  color: var(--mf-theme-muted-soft, rgba(207, 230, 238, 0.58));
}
.submodal-r1-act384-coupon-radio { margin-left: auto; color: #e7b45f; }
.submodal-r1-act384-coupons-loading,
.submodal-r1-act384-coupons-empty { grid-column: 1 / -1; margin: 0; font-size: 12px; }
.submodal-r1-act384-coupons-error { grid-column: 1 / -1; margin: 0; color: #ffd0c4; font-size: 12px; }
.submodal-r1-act384-coupons-error button { margin-left: 6px; }
.submodal-r1-act384-coupon-note { margin: 0; font-size: 11px; color: var(--mf-theme-muted-soft, rgba(207, 230, 238, 0.55)); }
.submodal-r1-act384-fees {
  margin: 0;
  padding-top: 10px;
  border-top: 1px dashed rgba(126, 211, 242, 0.18);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.submodal-r1-act384-fees > div { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; }
.submodal-r1-act384-fees dt { margin: 0; opacity: 0.6; }
.submodal-r1-act384-fees dd { margin: 0; font-weight: 600; }
.submodal-r1-act384-fee-total dd { color: #7ec8f2; font-size: 14px; }
.submodal-r1-act384-gift-pill {
  align-self: flex-start;
  font-size: 11px;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(231, 180, 95, 0.16);
  color: #e7b45f;
}
.submodal-r1-act384-settle-error { margin: 0; font-size: 12.5px; color: #e07a7a; line-height: 1.6; }
.submodal-r1-act384-settle-actions { display: flex; gap: 8px; }
.submodal-r1-act384-settle-actions > * { flex: 1; }
.submodal-r1-act384-amounts { padding-bottom: 6px; border-bottom: 1px dashed rgba(126, 211, 242, 0.14); }

/* 384 窄屏：券卡/明细收单列 */
@media (max-width: 480px) {
  .submodal-r1-act384-cards { grid-template-columns: 1fr; }
  .submodal-r1-act384-coupons { grid-template-columns: 1fr; }
  .submodal-r1-act384-settle { max-width: none; }
  .submodal-r1-act384-settle-actions { flex-direction: column; }
}

/* AF-13 / AF-09: 手机上的订阅和结算沿用原数据与按钮，外壳改为工作台独立子页。 */
@media (max-width: 640px) {
  .submodal-r1-mask.is-mobile-page {
    z-index: calc(var(--mf-layer-sidebar, 2147483600) + 2);
    display: block;
    padding: 0;
    background: #082548;
    backdrop-filter: none;
  }
  body:not(.home-mode) .submodal-r1-mask.is-mobile-page {
    bottom: calc(56px + env(safe-area-inset-bottom, 0px));
  }
  body:has(.submodal-r1-mask.is-mobile-page:not([hidden])) #r14-operator,
  body:not(.home-mode):has(.submodal-r1-mask.is-mobile-page:not([hidden])) .mf-nav-bottom {
    z-index: calc(var(--mf-layer-sidebar, 2147483600) + 3);
  }
  .submodal-r1-mask.is-mobile-page .submodal-r1-dialog {
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    max-height: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: linear-gradient(160deg, #102e56, #071c35 65%, #0a284a);
    color: #f4faff;
  }
  .submodal-r1-mobile-topbar {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    min-height: 44px;
    padding: 4px 18px;
    background: #0a2445;
    border-bottom: 1px solid #214b76;
  }
  .submodal-r1-mobile-topbar button {
    justify-self: start;
    padding: 5px 0;
    border: 0;
    background: transparent;
    color: #b9daff;
    font: inherit;
    cursor: pointer;
  }
  .submodal-r1-mobile-topbar strong { font-size: 14px; white-space: nowrap; }
  .submodal-r1-mobile-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 20px calc(72px + env(safe-area-inset-bottom, 0px));
  }
  .submodal-r1-mobile-heading { min-height: 91px; box-sizing: border-box; padding-top: 35px; }
  .submodal-r1-mobile-heading h3 { margin: 0; font-size: 22px; line-height: 1.3; }
  .submodal-r1-mobile-account { margin: 4px 0 0; color: #c4daf0; font-size: 12px; }
  .submodal-r1-mask.is-mobile-page .submodal-r1-body { display: grid; align-content: start; gap: 12px; }
  .submodal-r1-mobile-status { font-size: 12px; color: #c0d7ef; }
  .submodal-r1-mobile-status strong { color: #fff; }
  .submodal-r1-mobile-switch {
    width: 100%;
    min-height: 42px;
    border: 1px solid #285d91;
    border-radius: 10px;
    background: #123d6b;
    color: #d8ecff;
    text-align: left;
    padding: 9px 12px;
    font: inherit;
    cursor: pointer;
  }
  .submodal-r1-mobile-feature .submodal-r1-card { min-height: 161px; }
  .submodal-r1-mobile-feature .submodal-r1-front {
    min-height: 161px;
    padding: 10px;
    gap: 6px;
    background: linear-gradient(130deg, #174d84, #103663);
    border-color: #3679bd;
  }
  .submodal-r1-mobile-feature .submodal-r1-perks { display: none; }
  .submodal-r1-mobile-feature .submodal-r1-price { font-size: 28px; }
  .submodal-r1-mobile-feature .submodal-r1-current-badge {
    position: absolute; top: 10px; right: 10px; margin: 0;
    max-width: 64%; text-align: right;
  }
  .submodal-r1-mobile-feature .submodal-r1-card-actions { gap: 5px; }
  .submodal-r1-mobile-feature .submodal-r1-period { padding: 4px 7px; }
  .submodal-r1-mobile-feature .submodal-r1-btn-main {
    min-height: 37px;
    color: #fff;
    background: #197bf0;
    border-color: #3895ff;
  }
  .submodal-r1-mobile-perks { margin-top: 7px; color: #c4ddf5; font-size: 12px; }
  .submodal-r1-mobile-perks summary { cursor: pointer; }
  .submodal-r1-mobile-perks ul { margin: 6px 0; padding-left: 21px; }
  .submodal-r1-mobile-catalog { border: 1px solid #285d91; border-radius: 10px; padding: 10px; }
  .submodal-r1-mobile-catalog summary { cursor: pointer; color: #cfe5ff; }
  .submodal-r1-mobile-catalog .submodal-r1-cards { margin-top: 10px; }
  .submodal-r1-mask.is-mobile-page .submodal-r1-act384 {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
  }
  .submodal-r1-mask.is-mobile-page .submodal-r1-act384-head { font-size: 20px; margin: 17px 0 9px; }
  .submodal-r1-mask.is-mobile-page .submodal-r1-act384-cards { grid-template-columns: 1fr; }
  .submodal-r1-mask.is-mobile-page .submodal-r1-act384-card {
    min-height: 165px;
    padding: 11px 12px;
    border-color: #3479b7;
    background: linear-gradient(120deg, #164a80, #10345e);
  }
  .submodal-r1-mask.is-mobile-page .submodal-r1-act384-notice,
  .submodal-r1-mask.is-mobile-page .submodal-r1-act384-rewards {
    min-height: 55px;
    margin-top: 0;
    background: #123d6b;
    border-color: #2b6199;
  }
  .submodal-r1-mask.is-mobile-page .submodal-r1-act384-notices { margin-top: 8px; }
  /* AF-13: the rewards entry follows the notice with the spacing in the mobile design. */
  .submodal-r1-mask.is-mobile-page .submodal-r1-act384-notices + .submodal-r1-act384-rewards { margin-top: 13px; }
  .submodal-r1-mask.is-mobile-page .submodal-r1-act384-settle {
    width: 100%;
    max-width: none;
    gap: 7px;
  }
  .submodal-r1-mask.is-mobile-page .submodal-r1-act384-settle-title { display: none; }
  .submodal-r1-mask.is-mobile-page .submodal-r1-act384-order-card,
  .submodal-r1-mask.is-mobile-page .submodal-r1-act384-fees {
    padding: 11px 12px;
    border: 1px solid #2c6ba8;
    border-radius: 12px;
    background: #103b6b;
  }
  .submodal-r1-mask.is-mobile-page .submodal-r1-act384-order-card { min-height: 84px; }
  .submodal-r1-mask.is-mobile-page .submodal-r1-act384-coupon-panel {
    display: grid;
    gap: 4px;
    padding: 6px;
    border: 1px solid #2c6ba8;
    border-radius: 12px;
    background: #103b6b;
  }
  .submodal-r1-mask.is-mobile-page .submodal-r1-act384-coupons-head { font-size: 11.5px; }
  .submodal-r1-mask.is-mobile-page .submodal-r1-act384-coupons {
    grid-template-columns: 1fr;
    gap: 5px;
  }
  .submodal-r1-mask.is-mobile-page .submodal-r1-act384-coupon {
    display: grid;
    grid-template-columns: 18px 76px minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-content: center;
    gap: 2px 7px;
    min-height: 56px;
    padding: 5px 8px;
    border-color: #2d6ea9;
    background: #123d6b;
  }
  .submodal-r1-mask.is-mobile-page .submodal-r1-act384-coupon-radio { grid-column: 1; grid-row: 1 / 3; margin: 0; align-self: center; }
  .submodal-r1-mask.is-mobile-page .submodal-r1-act384-coupon-amount { grid-column: 2; grid-row: 1; font-size: 11px; white-space: nowrap; }
  .submodal-r1-mask.is-mobile-page .submodal-r1-act384-coupon-scope { grid-column: 2; grid-row: 2; padding: 0; background: none; font-size: 9px; }
  .submodal-r1-mask.is-mobile-page .submodal-r1-act384-coupon-src { grid-column: 3; grid-row: 1; min-width: 0; font-size: 11px; }
  .submodal-r1-mask.is-mobile-page .submodal-r1-act384-coupon-applicability { grid-column: 3; grid-row: 2; min-width: 0; font-size: 10px; }
  .submodal-r1-mask.is-mobile-page .submodal-r1-act384-coupon[data-sub-act384-coupon-pick=""] { display: flex; min-height: 37px; }
  .submodal-r1-mask.is-mobile-page .submodal-r1-act384-coupon-note { line-height: 1.35; }
  .submodal-r1-mask.is-mobile-page .submodal-r1-act384-coupon-help { color: #b9d2ee; font-size: 11px; }
  .submodal-r1-mask.is-mobile-page .submodal-r1-act384-coupon-help summary { cursor: pointer; }
  .submodal-r1-mask.is-mobile-page .submodal-r1-act384-fees { min-height: 122px; justify-content: center; }
  .submodal-r1-mobile-payment {
    min-height: 126px;
    padding: 10px 12px;
    border: 1px solid #2c6ba8;
    border-radius: 12px;
    background: #103b6b;
  }
  .submodal-r1-mobile-payment strong { font-size: 13px; }
  .submodal-r1-mobile-payment-options { display: flex; gap: 8px; margin-top: 9px; }
  .submodal-r1-mobile-payment-options span {
    flex: 1 1 0;
    padding: 8px 4px;
    border: 1px solid #356a9f;
    border-radius: 8px;
    color: #aac7e5;
    text-align: center;
    opacity: .68;
  }
  .submodal-r1-mobile-payment p { margin: 4px 0 0; color: #b9d2ee; font-size: 12px; }
  .submodal-r1-mask.is-mobile-page .submodal-r1-act384-settle-actions {
    position: sticky;
    bottom: -1px;
    z-index: 1;
    flex-direction: column;
    padding: 9px 0;
    background: #0a284a;
  }
  .submodal-r1-mask.is-mobile-page .submodal-r1-act384-settle-actions button { min-height: 39px; }
  .submodal-r1-mask.is-mobile-page .submodal-r1-footnote { margin-top: 0; }
}
/* ========== P5P6(2026-07-05) 快速出图表单 + 图片任务队列 ==========
   工单 CODELEAD-P5-P6-AIGEN-CONTENT-CONTINUATION-20260705: B3 场景预设条旁入口 + 一屏表单 + 五态任务队列。
   选中态纪律: 可选 chip 一律 .on。 */
.aigen-canvas-topbar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  flex-wrap: wrap;
}
.aigen-quick-form-open-btn {
  border: 1px solid var(--teal, #0f766e);
  background: var(--teal, #0f766e);
  color: #fff;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.aigen-quick-form-open-btn:hover { filter: brightness(1.08); }
.aigen-quick-task-queue-btn {
  border: 1px solid rgba(15, 118, 110, 0.4);
  background: var(--surface, #fff);
  color: var(--ink, #1e2524);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.aigen-quick-task-badge {
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  background: rgba(15, 118, 110, 0.12);
  color: var(--teal, #0f766e);
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  padding: 0 4px;
}
.aigen-quick-task-badge.is-active { background: var(--teal, #0f766e); color: #fff; }

/* 弹层: 高于 05/06 节点配置弹窗(z-index 990), 低于全局 toast */
.aigen-quick-form-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 22, 0.55);
  padding: 20px;
}
.aigen-quick-form-modal.hidden { display: none; }
.aigen-quick-form-card {
  width: min(860px, 96vw);
  max-height: 90vh;
  overflow: auto;
  background: var(--surface, #fff);
  border-radius: 14px;
  border: 1px solid rgba(30, 37, 36, 0.12);
  box-shadow: 0 24px 60px rgba(15, 23, 22, 0.28);
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.aigen-quick-form-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.aigen-quick-form-head h3 { margin: 6px 0 4px; font-size: 17px; }
.aigen-quick-account-strip {
  display: block;
  color: var(--muted, #6b7671);
  font-size: 12px;
}
.aigen-quick-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}
.aigen-quick-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--muted, #6b7671);
}
.aigen-quick-field select,
.aigen-quick-field textarea {
  width: 100%;
  border: 1px solid rgba(30, 37, 36, 0.16);
  border-radius: 8px;
  padding: 7px 9px;
  font-size: 13px;
  color: var(--ink, #1e2524);
  background: var(--bg, #f5f6f4);
}
.aigen-quick-field-wide { grid-column: 1 / -1; }
.aigen-quick-source-field span { font-size: 12px; }
.aigen-quick-source-pick {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px dashed rgba(15, 118, 110, 0.5);
  border-radius: 10px;
  background: rgba(15, 118, 110, 0.05);
  padding: 6px 10px;
  cursor: pointer;
  text-align: left;
  min-height: 52px;
}
.aigen-quick-source-pick.on { border-style: solid; background: rgba(15, 118, 110, 0.1); }
.aigen-quick-source-pick img {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border-radius: 8px;
}
.aigen-quick-source-pick i { color: var(--muted, #6b7671); font-style: normal; font-size: 12px; }
.aigen-quick-source-pick em {
  font-style: normal;
  font-size: 12px;
  color: var(--ink, #1e2524);
  word-break: break-all;
}
.aigen-quick-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.aigen-quick-generate-btn { min-width: 180px; }
.aigen-quick-generate-btn[disabled] { opacity: 0.6; cursor: not-allowed; }
.aigen-quick-form-statusline {
  min-height: 16px;
  font-size: 12px;
  color: var(--teal, #0f766e);
}

/* 任务队列(表单下方, 工单 P6): 五态 + 可读原因 + 重试/取消 */
.aigen-quick-task-panel {
  border-top: 1px solid rgba(30, 37, 36, 0.1);
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.aigen-quick-task-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.aigen-quick-task-panel-head h4 { margin: 0; font-size: 14px; }
.aigen-quick-task-filters { display: flex; gap: 6px; }
.aigen-quick-task-filter-chip {
  border: 1px solid rgba(30, 37, 36, 0.16);
  background: var(--surface, #fff);
  color: var(--muted, #6b7671);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  cursor: pointer;
}
.aigen-quick-task-filter-chip.on {
  border-color: var(--teal, #0f766e);
  background: rgba(15, 118, 110, 0.1);
  color: var(--teal, #0f766e);
  font-weight: 600;
}
.aigen-quick-task-list { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow: auto; }
.aigen-quick-task-empty {
  color: var(--muted, #6b7671);
  font-size: 12px;
  padding: 10px;
  text-align: center;
  border: 1px dashed rgba(30, 37, 36, 0.16);
  border-radius: 10px;
}
.aigen-quick-task-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(30, 37, 36, 0.1);
  border-radius: 10px;
  padding: 8px 10px;
  background: var(--bg, #f5f6f4);
}
.aigen-quick-task-main { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
.aigen-quick-task-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.aigen-quick-task-meta strong { font-size: 13px; color: var(--ink, #1e2524); word-break: break-all; }
.aigen-quick-task-meta small { font-size: 11px; color: var(--muted, #6b7671); word-break: break-all; }
.aigen-quick-task-reason { color: #b45309; }
.aigen-quick-task-row.s-failed .aigen-quick-task-reason { color: #b91c1c; }
.aigen-quick-task-pill {
  flex: none;
  border-radius: 999px;
  font-size: 11px;
  padding: 2px 8px;
  line-height: 16px;
  border: 1px solid transparent;
}
.aigen-quick-task-pill.s-queued { background: rgba(107, 118, 113, 0.12); color: var(--muted, #6b7671); border-color: rgba(107, 118, 113, 0.3); }
.aigen-quick-task-pill.s-generating { background: rgba(180, 83, 9, 0.12); color: #b45309; border-color: rgba(180, 83, 9, 0.32); }
.aigen-quick-task-pill.s-succeeded { background: rgba(21, 128, 61, 0.12); color: #15803d; border-color: rgba(21, 128, 61, 0.3); }
.aigen-quick-task-pill.s-failed { background: rgba(185, 28, 28, 0.1); color: #b91c1c; border-color: rgba(185, 28, 28, 0.3); }
.aigen-quick-task-pill.s-cancelled { background: rgba(30, 37, 36, 0.08); color: var(--muted, #6b7671); border-color: rgba(30, 37, 36, 0.2); }
.aigen-quick-task-actions { display: flex; gap: 6px; flex: none; }

/* 移动端(390 宽门禁): 单列表单 + 弹层贴边 */
@media (max-width: 720px) {
  .aigen-quick-form-modal { padding: 8px; align-items: flex-end; }
  .aigen-quick-form-card { width: 100%; max-height: 94vh; border-radius: 12px 12px 0 0; padding: 12px; }
  .aigen-quick-form-grid { grid-template-columns: 1fr; }
  .aigen-quick-task-row { flex-direction: column; align-items: stretch; }
  .aigen-quick-task-actions { justify-content: flex-end; }
}
/* PM-BRAIN-GRAPH-3D-R1-20260705 · AI大脑关系网络图 3D 升级·批1 */

.brain-graph-3d-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding: 10px 14px;
  border: 1px solid rgba(125, 211, 252, .18);
  border-radius: 8px;
  background: rgba(8, 16, 29, .86);
  color: #dbeafe;
  font-size: 12px;
}

.brain-graph-3d-toolbar .bg3d-name {
  color: #7dd3fc;
  font-weight: 600;
  letter-spacing: .04em;
}

.brain-graph-3d-toolbar .bg3d-modes {
  display: inline-flex;
  border: 1px solid rgba(125, 211, 252, .28);
  border-radius: 6px;
  overflow: hidden;
}

.brain-graph-3d-toolbar .bg3d-modes button {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(219, 234, 254, .72);
  font-size: 12px;
  padding: 5px 14px;
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
}

.brain-graph-3d-toolbar .bg3d-modes button + button {
  border-left: 1px solid rgba(125, 211, 252, .22);
}

.brain-graph-3d-toolbar .bg3d-modes button.active {
  background: rgba(56, 189, 248, .22);
  color: #e0f2fe;
  font-weight: 600;
}

.brain-graph-3d-toolbar .bg3d-recenter {
  appearance: none;
  border: 1px solid rgba(125, 211, 252, .28);
  border-radius: 6px;
  background: rgba(15, 30, 52, .8);
  color: #bae6fd;
  font-size: 12px;
  padding: 5px 12px;
  cursor: pointer;
}

.brain-graph-3d-toolbar .bg3d-recenter:hover {
  background: rgba(56, 189, 248, .18);
}

.brain-graph-3d-toolbar .bg3d-legend {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-left: auto;
}

.brain-graph-3d-toolbar .bg3d-dot {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-style: normal;
  color: rgba(226, 240, 255, .68);
}

.brain-graph-3d-toolbar .bg3d-dot b {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(125, 211, 252, .35);
}

.brain-graph-3d-toolbar .bg3d-note {
  flex-basis: 100%;
  color: #fcd34d;
}

.brain-graph-3d-toolbar .bg3d-note:empty {
  display: none;
}

/* 3D 舞台:深空底,默认隐藏,进入 3D 模式才展示 */
.brain-graph-3d-stage {
  display: none;
  position: relative;
  min-height: 560px;
  height: clamp(480px, 62vh, 660px);
  border: 1px solid rgba(125, 211, 252, .2);
  border-radius: 10px;
  overflow: hidden;
  background:
    radial-gradient(1100px 460px at 24% 8%, rgba(56, 132, 255, .14), transparent 60%),
    radial-gradient(900px 420px at 82% 88%, rgba(167, 139, 250, .1), transparent 55%),
    #050b18;
}

.brain-graph-3d-on .brain-graph-3d-stage {
  display: block;
}

/* 深空细节:平铺微星点 + 边缘暗角,盖在渲染画布上但不挡交互 */
.brain-graph-3d-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 22% 34%, rgba(255, 255, 255, .34) 0, rgba(255, 255, 255, 0) 1.3px),
    radial-gradient(circle at 74% 68%, rgba(186, 214, 255, .26) 0, rgba(186, 214, 255, 0) 1.1px),
    radial-gradient(circle at 48% 12%, rgba(148, 190, 255, .2) 0, rgba(148, 190, 255, 0) 1px),
    radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 52%, rgba(2, 6, 14, .5) 100%);
  background-size: 210px 190px, 260px 230px, 170px 210px, 100% 100%;
}

/* 3D 开启时隐藏 2D 区域(35 分片布局 / 29 分片小图),分片本体一行未动,可随时切回 */
.ai-memory-r4-shell.brain-graph-3d-on .ai-memory-r4-layout,
.ai-memory-r2-graph.brain-graph-3d-on .ai-memory-r2-graph-stage {
  display: none !important;
}

.brain-graph-3d-canvas,
.brain-graph-3d-canvas > div {
  width: 100%;
  height: 100%;
}

.brain-graph-3d-canvas,
.brain-graph-3d-canvas .scene-container,
.brain-graph-3d-canvas canvas {
  background-color: #050b18;
}

/* 悬停 tooltip 卡(引擎生成 .float-tooltip-kap/.scene-tooltip,内容为我们的 .bg3d-tip) */
.brain-graph-3d-stage .scene-tooltip,
.brain-graph-3d-stage .float-tooltip-kap {
  pointer-events: none;
  z-index: 6;
}

.brain-graph-3d-stage .bg3d-tip {
  display: grid;
  gap: 3px;
  min-width: 150px;
  max-width: 260px;
  padding: 9px 12px;
  border: 1px solid rgba(125, 211, 252, .35);
  border-radius: 8px;
  background: rgba(7, 14, 26, .94);
  box-shadow: 0 10px 28px rgba(2, 8, 20, .55);
  color: #edf6ff;
  font-size: 12px;
  line-height: 1.4;
}

.brain-graph-3d-stage .bg3d-tip strong {
  font-size: 13px;
  color: #f2f8ff;
}

.brain-graph-3d-stage .bg3d-tip small {
  color: rgba(203, 220, 240, .62);
}

/* 诚实空态:无记忆时引导写第一条日志 */
.brain-graph-3d-stage .bg3d-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  text-align: center;
  padding: 24px;
  color: #dbeafe;
}

.brain-graph-3d-stage .bg3d-empty strong {
  font-size: 18px;
}

.brain-graph-3d-stage .bg3d-empty p {
  margin: 0;
  max-width: 420px;
  color: rgba(203, 220, 240, .7);
  font-size: 13px;
  line-height: 1.6;
}

.brain-graph-3d-stage .bg3d-empty button {
  appearance: none;
  border: 1px solid rgba(125, 211, 252, .4);
  border-radius: 8px;
  background: rgba(56, 189, 248, .18);
  color: #e0f2fe;
  font-size: 13px;
  padding: 8px 18px;
  cursor: pointer;
}

.brain-graph-3d-stage .bg3d-empty button:hover {
  background: rgba(56, 189, 248, .3);
}

@media (max-width: 640px) {
  .brain-graph-3d-stage {
    min-height: 380px;
    height: clamp(360px, 58vh, 480px);
  }

  .brain-graph-3d-toolbar {
    gap: 8px 10px;
  }

  .brain-graph-3d-toolbar .bg3d-legend {
    margin-left: 0;
    flex-basis: 100%;
  }
}
/* CM-R3FIX(2026-07-05) 内容营销任务级反推R3 ★4 强推项样式
   ★1 C6 对白镜时长如实 / ★2 C1 成片交付出口+06 诚实化 / ★3 工坊送入确认弹窗 */

/* 05 成片区交付条(下载成片/复制链接) */
.aile-compose-deliver { display: flex; gap: 8px; padding: 8px 10px; }

/* C6: 对白镜时长如实标注(置灰说明, 非可调旋钮) */
.aile-media-dur.aile-dur-auto em { font-style: normal; color: var(--muted, #8a93a6); border: 1px dashed rgba(138, 147, 166, .45); border-radius: 6px; padding: 1px 8px; font-size: 12px; }

/* C5: 双音轨守卫 / 音色继承提示 */
.aile-vo-hint, .aile-voice-hint { display: block; color: var(--muted, #8a93a6); font-size: 12px; line-height: 1.5; margin: 2px 0 6px; }
.aile-vo-hint { color: #d9a441; }

/* ★2 B2: 06 结果入库诚实面板 */
.aile-lib-real { display: flex; flex-direction: column; gap: 10px; }
.aile-lib-real .aile-api-actions { flex-wrap: wrap; }
.aile-lib-planned { font-size: 12px; line-height: 1.6; color: var(--muted, #8a93a6); border: 1px dashed rgba(138, 147, 166, .4); border-radius: 8px; padding: 8px 10px; }
.aile-lib-planned b { color: #d9a441; }
.aile-lib-center .aile-lib-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.aile-lib-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid rgba(138, 147, 166, .25); border-radius: 8px; font-size: 13px; }
.aile-lib-row b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aile-lib-row span, .aile-lib-row em { color: var(--muted, #8a93a6); font-style: normal; font-size: 12px; white-space: nowrap; }

/* ★3 C12: 工坊送入确认弹窗 */
.sw-sendmodal-body { display: flex; flex-direction: column; gap: 12px; }
.sw-sendmodal-title { font-weight: 600; }
.sw-sendmodal-warn { font-size: 12.5px; line-height: 1.6; color: #d9a441; border: 1px dashed rgba(217, 164, 65, .5); border-radius: 8px; padding: 8px 10px; }
.sw-sendmodal-acts { display: flex; justify-content: flex-end; gap: 8px; }

/* ★2 C1: 营销项目库成片/镜头视频卡[下载](与「打开」同排, 卡为纵向 flex, 顺流排列即可) */
.vl-card .vl-download { font-size: 12px; padding: 2px 10px; border-radius: 6px; border: 1px solid rgba(138, 147, 166, .45); background: rgba(20, 24, 34, .72); color: #cdd9e5; cursor: pointer; }
.vl-card .vl-download:hover { border-color: #d9a441; color: #d9a441; }
/* LAUNCH-READINESS-BOARD-R2 · 上线就绪度看板样式（七项·独立类前缀 lrb-r2-*，复用现有语义 token，不影响 41/44 既有样式） */
.lrb-r2 { margin-top: 16px; }
.lrb-r2-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.lrb-r2-head h3 { margin: 0; font-size: 15px; font-weight: 600; color: var(--ink); }
.lrb-r2-head small { color: var(--muted); font-size: 12px; }
.lrb-r2-count { font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.lrb-r2-hint { background: var(--surface); border: 1px solid var(--line); color: var(--muted); border-radius: 8px; padding: 8px 12px; font-size: 12.5px; margin-bottom: 12px; line-height: 1.5; }
.lrb-r2-loading, .lrb-r2-empty { color: var(--muted); font-size: 13px; padding: 12px 0; }

/* 总判定横幅 */
.lrb-r2-banner { display: flex; align-items: center; gap: 12px; border-radius: 10px; padding: 12px 16px; margin-bottom: 14px; border: 1px solid var(--line); }
.lrb-r2-banner-icon { font-size: 22px; line-height: 1; }
.lrb-r2-banner strong { display: block; font-size: 15px; }
.lrb-r2-banner small { display: block; font-size: 12px; opacity: 0.85; margin-top: 2px; }
.lrb-r2-banner-ok { background: rgba(50, 122, 94, 0.10); border-color: rgba(50, 122, 94, 0.35); color: var(--green); }
.lrb-r2-banner-blocked { background: rgba(178, 75, 69, 0.10); border-color: rgba(178, 75, 69, 0.35); color: var(--red); }

/* 七项表 */
.lrb-r2-table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.lrb-r2-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.lrb-r2-table thead th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.lrb-r2-table tbody td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.lrb-r2-table tbody tr:last-child td { border-bottom: none; }
.lrb-r2-td-name { font-weight: 600; color: var(--ink); white-space: nowrap; }
.lrb-r2-td-action { color: var(--muted); font-size: 12.5px; max-width: 240px; }

/* 当前模式徽标(门禁闸 off/log/enforce) */
.lrb-r2-mode { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.lrb-r2-mode-off { background: rgba(102, 112, 110, 0.14); color: var(--muted); }
.lrb-r2-mode-log { background: rgba(180, 122, 40, 0.14); color: var(--amber); }
.lrb-r2-mode-enforce { background: rgba(45, 111, 122, 0.14); color: var(--teal); }

/* 当前值 chip(注册模式/覆盖率/部署证据——非门禁项，显各自当前值) */
.lrb-r2-value { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 600; white-space: nowrap; background: rgba(45, 111, 122, 0.10); color: var(--teal); border: 1px solid rgba(45, 111, 122, 0.20); }

/* 就绪灯 */
.lrb-r2-td-light { white-space: nowrap; }
.lrb-r2-light { font-size: 14px; margin-right: 5px; }
.lrb-r2-light-green { color: var(--green); }
.lrb-r2-light-red { color: var(--red); }
.lrb-r2-light-label { font-size: 12px; color: var(--muted); }
.lrb-r2-row-ok .lrb-r2-light-label { color: var(--green); }
.lrb-r2-row-blocked .lrb-r2-light-label { color: var(--red); }

/* 缺什么 */
.lrb-r2-ok-text { color: var(--green); font-weight: 600; font-size: 12.5px; }
.lrb-r2-blocker-list { list-style: none; margin: 0; padding: 0; }
.lrb-r2-blocker-list li { position: relative; padding-left: 14px; margin: 2px 0; color: var(--red); font-size: 12.5px; line-height: 1.45; }
.lrb-r2-blocker-list li::before { content: "•"; position: absolute; left: 2px; color: var(--red); }

@media (max-width: 760px) {
  .lrb-r2-td-action { max-width: none; }
}
/* COMPANY-PRICING-PAGE-R1 · 公司订阅定价页（方案A定稿视觉移植：卡片网格/双价/配额2x2/能力分层）
   纪律：类名一律 pricing-r1- 前缀；只用既有主题 token(--mf-theme-*/--glass-*)不发明新设计语言；
   夜色默认，day 主题经 42 引擎重定义 token 自动跟随；移动端 @media 480px 单列。 */
.pricing-r1-wrap { max-width: 1140px; margin: 0 auto; padding: 18px 6px 48px; color: var(--mf-theme-ink, #e8ecf8); }
.pricing-r1-eyebrow { font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--mf-theme-muted, #9aa7c7); margin: 0 0 8px; }
.pricing-r1-h1 { font-size: 26px; line-height: 1.2; margin: 0 0 8px; font-weight: 700; }
.pricing-r1-lede { font-size: 14px; color: var(--mf-theme-muted, #9aa7c7); max-width: 62ch; margin: 0 0 16px; }
.pricing-r1-loading { padding: 28px 0; color: var(--mf-theme-muted, #9aa7c7); }
.pricing-r1-error { margin: 14px 0; padding: 10px 14px; border: 1px solid var(--mf-theme-line-strong, rgba(255,255,255,.22)); border-left: 3px solid #d98a8a; border-radius: 8px; background: var(--mf-theme-card, rgba(20,26,44,.66)); color: var(--mf-theme-ink, #e8ecf8); font-size: 13px; }

/* 当前订阅态条（真实公司名） */
.pricing-r1-status { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; padding: 12px 16px; margin: 0 0 16px; border: 1px solid var(--mf-theme-line, rgba(255,255,255,.14)); border-radius: 12px; background: var(--mf-theme-card, rgba(20,26,44,.66)); font-size: 13px; color: var(--mf-theme-muted, #9aa7c7); }
.pricing-r1-status strong { color: var(--mf-theme-ink, #e8ecf8); font-size: 14px; }
.pricing-r1-status b { color: var(--mf-theme-ink, #e8ecf8); }
.pricing-r1-status.is-active { border-color: rgba(231, 180, 95, .45); }
.pricing-r1-status-quota { font-variant-numeric: tabular-nums; }
.pricing-r1-role-note { font-size: 12px; color: var(--mf-theme-faint, #7f8aa5); }
.pricing-r1-principal-note { font-size: 12px; color: #8fb083; }
.pricing-r1-link { background: none; border: none; color: #e7b45f; cursor: pointer; font-size: 13px; text-decoration: underline; padding: 0; }

/* 顶部四横幅 chip */
.pricing-r1-banner { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin: 0 0 14px; }
.pricing-r1-chip { border: 1px solid var(--mf-theme-line, rgba(255,255,255,.14)); border-radius: 10px; padding: 10px 14px; background: var(--mf-theme-card, rgba(20,26,44,.66)); }
.pricing-r1-chip b { display: block; font-size: 12px; color: #e7b45f; margin-bottom: 2px; font-weight: 600; }
.pricing-r1-chip span { font-size: 13px; color: var(--mf-theme-muted, #9aa7c7); }

/* 试用横条 */
.pricing-r1-trial { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; border: 1px dashed var(--mf-theme-line-strong, rgba(255,255,255,.22)); border-radius: 10px; padding: 11px 16px; margin: 0 0 18px; font-size: 13px; color: var(--mf-theme-muted, #9aa7c7); }
.pricing-r1-trial b { color: var(--mf-theme-ink, #e8ecf8); }
.pricing-r1-wm { color: #e7b45f; font-weight: 600; }

/* 三档卡片 */
.pricing-r1-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.pricing-r1-card { position: relative; display: flex; flex-direction: column; border: 1px solid var(--mf-theme-line, rgba(255,255,255,.14)); border-radius: 14px; padding: 20px 18px; background: var(--mf-theme-card, rgba(20,26,44,.66)); box-shadow: var(--mf-theme-glass-shadow, 0 10px 30px -20px rgba(0,0,0,.5)); }
.pricing-r1-card.is-recommend { border-color: rgba(231, 180, 95, .55); }
.pricing-r1-recommend { position: absolute; top: -10px; right: 14px; font-size: 12px; font-weight: 700; color: #1d1608; background: #e7b45f; border-radius: 999px; padding: 2px 10px; }
.pricing-r1-name { font-size: 17px; font-weight: 700; margin: 0 0 10px; }
.pricing-r1-listprice { color: var(--mf-theme-muted, #9aa7c7); font-size: 12px; text-decoration: line-through; font-variant-numeric: tabular-nums; }
.pricing-r1-now { font-size: 28px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; margin: 2px 0 6px; }
.pricing-r1-now small { font-size: 12px; font-weight: 400; color: var(--mf-theme-muted, #9aa7c7); }
.pricing-r1-firstyear { display: inline-block; align-self: flex-start; font-size: 11px; font-weight: 600; color: #e7b45f; border: 1px solid rgba(231, 180, 95, .5); border-radius: 999px; padding: 2px 9px; margin-right: 6px; }
.pricing-r1-pending { display: inline-block; align-self: flex-start; font-size: 11px; color: var(--mf-theme-muted, #9aa7c7); border: 1px dashed var(--mf-theme-line-strong, rgba(255,255,255,.22)); border-radius: 999px; padding: 2px 9px; }
.pricing-r1-daily { margin: 8px 0 12px; font-size: 13px; color: #8fb083; font-weight: 600; }
.pricing-r1-quota { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--mf-theme-line, rgba(255,255,255,.14)); border: 1px solid var(--mf-theme-line, rgba(255,255,255,.14)); border-radius: 10px; overflow: hidden; margin-bottom: 12px; }
.pricing-r1-quota div { background: var(--mf-theme-card-strong, rgba(14,18,32,.85)); padding: 8px 10px; display: flex; flex-direction: column; gap: 1px; }
.pricing-r1-qn { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pricing-r1-ql { font-size: 11px; color: var(--mf-theme-muted, #9aa7c7); letter-spacing: .03em; }
.pricing-r1-feat { list-style: none; margin: 0 0 14px; padding: 12px 0 0; border-top: 1px solid var(--mf-theme-line, rgba(255,255,255,.14)); display: flex; flex-direction: column; gap: 7px; flex: 1; }
.pricing-r1-feat li { display: flex; gap: 8px; font-size: 13px; }
.pricing-r1-k { color: var(--mf-theme-muted, #9aa7c7); font-size: 12px; min-width: 32px; padding-top: 1px; }
.pricing-r1-inc { color: var(--mf-theme-muted, #9aa7c7); font-size: 12px; }
.pricing-r1-tick { color: #e7b45f; flex: none; font-weight: 700; }
.pricing-r1-btn { border: 1px solid rgba(231, 180, 95, .5); background: rgba(231, 180, 95, .12); color: var(--mf-theme-ink, #e8ecf8); border-radius: 10px; padding: 9px 16px; font-size: 14px; cursor: pointer; }
.pricing-r1-btn:hover { background: rgba(231, 180, 95, .22); }
.pricing-r1-btn:disabled { opacity: .55; cursor: default; }
/* 支付未开放占位钮: 显式灰面+可读字色, 不靠 opacity(暗色主题下会糊成不可读) */
.pricing-r1-btn[data-payment-pending] {
  opacity: 1;
  background: rgba(148, 163, 184, 0.14);
  border: 1px dashed rgba(148, 163, 184, 0.45);
  color: var(--mf-theme-muted, rgba(207, 230, 238, 0.78));
  cursor: not-allowed;
}
.pricing-r1-btn.is-ghost { border-color: var(--mf-theme-line, rgba(255,255,255,.14)); background: none; color: var(--mf-theme-muted, #9aa7c7); }
.pricing-r1-btn.pricing-r1-quick { padding: 4px 12px; font-size: 12px; margin-left: auto; } /* 快捷入口紧凑变体(公司资料标题行右侧) */
.pricing-r1-readonly-action {
  border: 1px dashed var(--mf-theme-line, rgba(255,255,255,.14));
  border-radius: 10px;
  padding: 9px 16px;
  color: var(--mf-theme-faint, #7f8aa5);
  text-align: center;
  font-size: 13px;
  cursor: default;
}

/* 加购条 / 说明 */
.pricing-r1-addon { margin: 16px 0 0; padding: 12px 16px; border: 1px solid var(--mf-theme-line, rgba(255,255,255,.14)); border-radius: 10px; background: var(--mf-theme-card, rgba(20,26,44,.66)); font-size: 13px; color: var(--mf-theme-muted, #9aa7c7); }
.pricing-r1-note { margin-top: 20px; font-size: 12px; color: var(--mf-theme-muted, #9aa7c7); border-left: 2px solid var(--mf-theme-line-strong, rgba(255,255,255,.22)); padding: 2px 0 2px 14px; }
.pricing-r1-note p { margin: 0 0 6px; }
.pricing-r1-note b { color: var(--mf-theme-ink, #e8ecf8); }

/* 确认页 / 回单 / 开通 */
.pricing-r1-panel { max-width: 640px; border: 1px solid var(--mf-theme-line, rgba(255,255,255,.14)); border-radius: 14px; padding: 20px 22px; background: var(--mf-theme-card, rgba(20,26,44,.66)); }
.pricing-r1-panel h3 { margin: 0 0 14px; font-size: 18px; }
.pricing-r1-panel.is-done { border-color: rgba(143, 176, 131, .5); }
.pricing-r1-confirm-list { margin: 0 0 12px; display: flex; flex-direction: column; gap: 8px; }
.pricing-r1-confirm-list div { display: flex; gap: 12px; font-size: 13px; }
.pricing-r1-confirm-list dt { color: var(--mf-theme-muted, #9aa7c7); min-width: 120px; }
.pricing-r1-confirm-list dd { margin: 0; color: var(--mf-theme-ink, #e8ecf8); }
.pricing-r1-confirm-price { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pricing-r1-api-note { font-size: 12px; color: var(--mf-theme-muted, #9aa7c7); border: 1px dashed var(--mf-theme-line-strong, rgba(255,255,255,.22)); border-radius: 8px; padding: 8px 12px; margin: 0 0 10px; }
.pricing-r1-pending-note { font-size: 12px; color: #e7b45f; margin: 0 0 10px; }
.pricing-r1-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }

@media (max-width: 480px) {
  .pricing-r1-cards { grid-template-columns: 1fr; }
  .pricing-r1-banner { grid-template-columns: 1fr 1fr; }
  .pricing-r1-confirm-list dt { min-width: 92px; }
  .pricing-r1-actions .pricing-r1-btn { width: 100%; }
}
/* PARTNER-SELF-INVITE-FRONTEND-R1(2026-07-10 ·) · 业务员自助工作台样式
   照设计 Artifact edc6ff9a token（轻奢克制）：teal/amber/paper/raised/line/muted，圆角 14，卡片阴影，等宽字体显码。
   双主题：跟随 prefers-color-scheme + :root[data-theme]（对齐平台主题机制，不硬编码单色）。面向手机（卡片居中，大按钮好点）。 */

/* ===== token（默认=亮色；暗色由 prefers-color-scheme + data-theme 覆盖，两向都让显式主题赢） ===== */
.pwb-shell {
  --pwb-ink: #171e27; --pwb-paper: #f5f7f9; --pwb-raised: #ffffff; --pwb-line: #e4e8ee; --pwb-muted: #697585;
  --pwb-teal: #1c6b57; --pwb-teal-soft: #e6f0ec; --pwb-amber: #b26622; --pwb-amber-soft: #f6ecdf; --pwb-red: #b3402f;
  --pwb-shadow: 0 1px 2px rgba(23, 30, 39, .04), 0 8px 24px -12px rgba(23, 30, 39, .18);
  --pwb-radius: 14px;
  --pwb-mono: ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", Menlo, Consolas, monospace;
  --pwb-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}
@media (prefers-color-scheme: dark) {
  .pwb-shell {
    --pwb-ink: #e9edf2; --pwb-paper: #0f141b; --pwb-raised: #171e28; --pwb-line: #28323f; --pwb-muted: #94a1b2;
    --pwb-teal: #4bbf9f; --pwb-teal-soft: #132a25; --pwb-amber: #e0a25a; --pwb-amber-soft: #2a2113; --pwb-red: #e77a68;
    --pwb-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -14px rgba(0, 0, 0, .6);
  }
}
:root[data-theme="light"] .pwb-shell {
  --pwb-ink: #171e27; --pwb-paper: #f5f7f9; --pwb-raised: #ffffff; --pwb-line: #e4e8ee; --pwb-muted: #697585;
  --pwb-teal: #1c6b57; --pwb-teal-soft: #e6f0ec; --pwb-amber: #b26622; --pwb-amber-soft: #f6ecdf; --pwb-red: #b3402f;
  --pwb-shadow: 0 1px 2px rgba(23, 30, 39, .04), 0 8px 24px -12px rgba(23, 30, 39, .18);
}
:root[data-theme="dark"] .pwb-shell {
  --pwb-ink: #e9edf2; --pwb-paper: #0f141b; --pwb-raised: #171e28; --pwb-line: #28323f; --pwb-muted: #94a1b2;
  --pwb-teal: #4bbf9f; --pwb-teal-soft: #132a25; --pwb-amber: #e0a25a; --pwb-amber-soft: #2a2113; --pwb-red: #e77a68;
  --pwb-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -14px rgba(0, 0, 0, .6);
}

/* ===== 版面：手机优先，卡片居中，全屏可滚 ===== */
.pwb-shell {
  min-height: 100vh;
  background: var(--pwb-paper);
  color: var(--pwb-ink);
  font-family: var(--pwb-sans);
  -webkit-font-smoothing: antialiased;
  padding: clamp(16px, 5vw, 40px) 14px 48px;
  box-sizing: border-box;
}
.pwb-shell * { box-sizing: border-box; }
.pwb-phone {
  max-width: 380px;
  margin: 0 auto;
  background: var(--pwb-raised);
  border: 1px solid var(--pwb-line);
  border-radius: 22px;
  box-shadow: var(--pwb-shadow);
  overflow: hidden;
}
.pwb-top {
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--pwb-line);
  display: flex;
  align-items: center;
  gap: 10px;
}
.pwb-avatar {
  width: 34px; height: 34px; flex: 0 0 auto;
  border-radius: 10px;
  background: var(--pwb-teal);
  color: #fff;
  display: grid; place-items: center;
  font-weight: 800; font-size: 14px;
}
.pwb-who { flex: 1 1 auto; min-width: 0; }
.pwb-who span { font-size: 14px; font-weight: 650; color: var(--pwb-ink); display: block; }
.pwb-who small { display: block; color: var(--pwb-muted); font-weight: 400; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pwb-logout {
  flex: 0 0 auto;
  border: 1px solid var(--pwb-line);
  background: transparent;
  color: var(--pwb-muted);
  border-radius: 9px;
  padding: 6px 12px;
  font-size: 12.5px; font-weight: 600; cursor: pointer;
  font-family: inherit;
}
.pwb-body { padding: 18px; }

.pwb-gen-btn {
  width: 100%; border: 0; border-radius: 12px;
  background: var(--pwb-teal); color: #fff;
  font-weight: 750; font-size: 16px;
  padding: 14px; cursor: pointer; font-family: inherit; letter-spacing: .01em;
}
.pwb-gen-btn:disabled { opacity: .6; cursor: default; }
.pwb-gen-hint { color: var(--pwb-muted); font-size: 12px; line-height: 1.55; margin: 10px 2px 0; }

/* 刚生成的码卡 */
.pwb-code-card {
  margin-top: 16px;
  border: 1px dashed color-mix(in srgb, var(--pwb-teal) 45%, transparent);
  border-radius: 12px;
  padding: 14px;
  background: var(--pwb-teal-soft);
}
.pwb-code-empty { border-style: solid; border-color: var(--pwb-line); background: transparent; }
.pwb-code-empty p { margin: 0; color: var(--pwb-muted); font-size: 13px; line-height: 1.55; }
.pwb-code-empty code { font-family: var(--pwb-mono); font-size: 12px; }
.pwb-code-val {
  font-family: var(--pwb-mono);
  font-size: 23px; font-weight: 700; letter-spacing: .04em;
  color: var(--pwb-ink); font-variant-numeric: tabular-nums;
  word-break: break-all;
}
.pwb-code-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: 12px; color: var(--pwb-muted); }
.pwb-timer, .pwb-mini-timer {
  font-family: var(--pwb-mono); font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--pwb-amber); background: var(--pwb-amber-soft);
  padding: 2px 9px; border-radius: 7px;
}
.pwb-timer.is-expired, .pwb-mini-timer.is-expired {
  color: var(--pwb-muted);
  background: color-mix(in srgb, var(--pwb-muted) 16%, transparent);
}
.pwb-share-link {
  margin-top: 10px; font-family: var(--pwb-mono); font-size: 12px;
  color: var(--pwb-teal); word-break: break-all; line-height: 1.5;
}
.pwb-share-row { display: flex; gap: 8px; margin-top: 12px; }
.pwb-share-btn {
  flex: 1; border: 1px solid var(--pwb-line); background: transparent; color: var(--pwb-ink);
  border-radius: 9px; padding: 9px; font-size: 12.5px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.pwb-share-btn:active { background: color-mix(in srgb, var(--pwb-teal) 8%, transparent); }

/* 分区 */
.pwb-section { margin-top: 18px; border-top: 1px solid var(--pwb-line); padding-top: 14px; }
.pwb-section-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.pwb-section-head b { font-size: 14px; color: var(--pwb-ink); font-weight: 700; }
.pwb-section-head span { font-size: 11.5px; color: var(--pwb-muted); }
.pwb-loading, .pwb-empty, .pwb-await { font-size: 12.5px; color: var(--pwb-muted); line-height: 1.55; margin: 4px 0; }
.pwb-await code { font-family: var(--pwb-mono); font-size: 11.5px; color: var(--pwb-amber); }

/* 我的码列表 */
.pwb-code-item {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 8px 0; border-bottom: 1px solid var(--pwb-line);
}
.pwb-code-item:last-child { border-bottom: 0; }
.pwb-mono { font-family: var(--pwb-mono); font-size: 13px; color: var(--pwb-ink); word-break: break-all; }
.pwb-code-right { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; }
.pwb-chip { font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.pwb-chip.live { background: var(--pwb-teal-soft); color: var(--pwb-teal); }
.pwb-chip.dead { background: color-mix(in srgb, var(--pwb-muted) 16%, transparent); color: var(--pwb-muted); }
.pwb-mini-disable {
  border: 1px solid color-mix(in srgb, var(--pwb-red) 45%, transparent);
  background: transparent; color: var(--pwb-red);
  border-radius: 8px; padding: 3px 9px; font-size: 11.5px; font-weight: 600; cursor: pointer; font-family: inherit;
}

/* 我的客户（脱敏） */
.pwb-cust-item { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--pwb-line); font-size: 12.5px; }
.pwb-cust-item:last-child { border-bottom: 0; }
.pwb-cust-who { color: var(--pwb-ink); font-weight: 600; }
.pwb-cust-who small { color: var(--pwb-muted); font-weight: 400; margin-left: 7px; }
.pwb-cust-when { color: var(--pwb-muted); }

/* 我的提成 */
.pwb-summary { display: flex; gap: 10px; }
.pwb-sum-cell { flex: 1; border: 1px solid var(--pwb-line); border-radius: 10px; padding: 10px 12px; background: color-mix(in srgb, var(--pwb-teal) 5%, transparent); }
.pwb-sum-cell small { display: block; color: var(--pwb-muted); font-size: 11px; margin-bottom: 3px; }
.pwb-sum-cell b { font-size: 16px; color: var(--pwb-ink); font-weight: 750; font-variant-numeric: tabular-nums; }
.pwb-sum-note { margin: 10px 2px 0; font-size: 11.5px; color: var(--pwb-muted); }

.pwb-status { margin: 14px 2px 0; min-height: 16px; font-size: 12.5px; color: var(--pwb-teal); }

/* ===== 系统设置 41 分片「渠道伙伴」→ 业务员自助工作台入口 banner（轻奢 teal 强调，适配亮/暗） ===== */
.settings-partner-r1-entry {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin: 12px 0 14px; padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, #1c6b57 30%, transparent);
  background: color-mix(in srgb, #1c6b57 8%, transparent);
}
.settings-partner-r1-entry-copy { flex: 1 1 260px; min-width: 0; }
.settings-partner-r1-entry-copy strong { display: block; font-size: 14px; color: #edf6f7; margin-bottom: 4px; }
.settings-partner-r1-entry-copy small { display: block; font-size: 12px; line-height: 1.6; color: rgba(206, 222, 235, .78); }
.settings-partner-r1-entry-btn {
  flex: 0 0 auto;
  display: inline-flex; align-items: center;
  padding: 9px 16px; border-radius: 10px;
  background: #1c6b57; color: #fff; text-decoration: none;
  font-size: 13px; font-weight: 700; white-space: nowrap;
}
.settings-partner-r1-entry-btn:hover { background: #23806a; }
.settings-partner-r1-empty-cell { color: rgba(206, 222, 235, .62); font-size: 12.5px; padding: 14px 10px; text-align: center; }
@media (prefers-color-scheme: light) {
  .settings-partner-r1-entry-copy strong { color: #143b31; }
  .settings-partner-r1-entry-copy small { color: #5a6b64; }
  .settings-partner-r1-empty-cell { color: #6b7a74; }
}
:root[data-theme="light"] .settings-partner-r1-entry-copy strong { color: #143b31; }
:root[data-theme="light"] .settings-partner-r1-entry-copy small { color: #5a6b64; }
:root[data-theme="light"] .settings-partner-r1-empty-cell { color: #6b7a74; }

/* ===== 「二维码 + 下载」区（本地生成，零网络；颜色只复用既有变量） ===== */
.pwb-qr-box { display: grid; justify-items: center; gap: 10px; padding: 6px 0 2px; text-align: center; }
.pwb-qr-canvas { min-height: 40px; display: grid; place-items: center; }
.pwb-qr-tip { margin: 0; font-size: 12px; color: var(--pwb-muted); line-height: 1.7; }
.pwb-qr-tip b { color: var(--pwb-ink); }
.pwb-qr-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
/* PLATFORM-SETTINGS-CREDENTIAL-UI-20260722 · 平台设置·凭据页样式（psc- 前缀）
   双主题：prefers-color-scheme + :root[data-theme]（对齐平台主题机制）。卡片克制、表单清晰、掩码等宽。 */

.psc-wrap {
  --psc-ink: #171e27; --psc-paper: #f5f7f9; --psc-raised: #ffffff; --psc-line: #e4e8ee; --psc-muted: #697585;
  --psc-teal: #1c6b57; --psc-teal-soft: #e6f0ec; --psc-amber: #b26622; --psc-amber-soft: #f6ecdf; --psc-red: #b3402f;
  --psc-shadow: 0 1px 2px rgba(23, 30, 39, .04), 0 8px 24px -12px rgba(23, 30, 39, .16);
  --psc-mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  color: var(--psc-ink);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .psc-wrap {
    --psc-ink: #e9edf2; --psc-paper: #0f141b; --psc-raised: #171e28; --psc-line: #28323f; --psc-muted: #94a1b2;
    --psc-teal: #4bbf9f; --psc-teal-soft: #132a25; --psc-amber: #e0a25a; --psc-amber-soft: #2a2113; --psc-red: #e77a68;
    --psc-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -14px rgba(0, 0, 0, .6);
  }
}
:root[data-theme="dark"] .psc-wrap {
  --psc-ink: #e9edf2; --psc-paper: #0f141b; --psc-raised: #171e28; --psc-line: #28323f; --psc-muted: #94a1b2;
  --psc-teal: #4bbf9f; --psc-teal-soft: #132a25; --psc-amber: #e0a25a; --psc-amber-soft: #2a2113; --psc-red: #e77a68;
  --psc-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -14px rgba(0, 0, 0, .6);
}

.psc-wrap { display: grid; gap: 14px; margin: 12px 0 18px; }
.psc-title h2 { margin: 0 0 6px; font-size: 17px; }
.psc-title p { margin: 0; color: var(--psc-muted); font-size: 13px; line-height: 1.7; max-width: 90ch; }

.psc-card {
  background: var(--psc-raised); border: 1px solid var(--psc-line);
  border-radius: 12px; padding: 16px 18px 14px; box-shadow: var(--psc-shadow);
}
.psc-card.is-pending { opacity: .82; }
.psc-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; }
.psc-head h3 { margin: 0; font-size: 15.5px; }
.psc-chip {
  flex: 0 0 auto; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px;
  background: color-mix(in srgb, var(--psc-muted) 14%, transparent); color: var(--psc-muted); white-space: nowrap;
}
.psc-chip.ok { background: var(--psc-teal-soft); color: var(--psc-teal); }
.psc-chip.warn { background: var(--psc-amber-soft); color: var(--psc-amber); }
.psc-chip.bad { background: color-mix(in srgb, var(--psc-red) 14%, transparent); color: var(--psc-red); }
.psc-desc { margin: 0 0 10px; color: var(--psc-muted); font-size: 12.5px; line-height: 1.65; }
.psc-await { margin: 4px 0 0; color: var(--psc-muted); font-size: 12.5px; line-height: 1.7; border-top: 1px dashed var(--psc-line); padding-top: 10px; }

.psc-status { margin: 0 0 4px; }
.psc-mask-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 6px 0; border-bottom: 1px solid var(--psc-line); font-size: 13px;
}
.psc-mask-row:last-child { border-bottom: 0; }
.psc-mask-row span { color: var(--psc-muted); flex: 0 0 auto; }
.psc-mask-row code, .psc-mono { font-family: var(--psc-mono); font-size: 12.5px; color: var(--psc-ink); word-break: break-all; min-width: 0; overflow-wrap: anywhere; text-align: right; }
.psc-empty { color: var(--psc-muted); font-size: 12.5px; margin: 6px 0; }
.psc-err { color: var(--psc-red); font-size: 12.5px; margin: 6px 0; font-weight: 600; }

.psc-form { display: grid; gap: 10px; margin-top: 10px; border-top: 1px dashed var(--psc-line); padding-top: 12px; }
.psc-field { display: grid; gap: 4px; }
.psc-field span { font-size: 12px; color: var(--psc-muted); font-weight: 600; }
.psc-field input, .psc-field select {
  width: 100%; border: 1px solid var(--psc-line); border-radius: 9px;
  background: var(--psc-paper); color: var(--psc-ink);
  padding: 9px 11px; font-size: 13.5px; font-family: inherit; box-sizing: border-box;
}
.psc-field input:focus, .psc-field select:focus { outline: 2px solid color-mix(in srgb, var(--psc-teal) 35%, transparent); border-color: var(--psc-teal); }
.psc-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 2px; }
.psc-btn {
  border: 0; border-radius: 9px; background: var(--psc-teal); color: #fff;
  padding: 9px 16px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit;
}
.psc-btn:disabled { opacity: .6; cursor: default; }
.psc-btn.ghost { background: transparent; color: var(--psc-teal); border: 1px solid color-mix(in srgb, var(--psc-teal) 45%, transparent); }
.psc-btn.danger { background: transparent; color: var(--psc-red); border: 1px solid color-mix(in srgb, var(--psc-red) 45%, transparent); }

.psc-keys { display: grid; gap: 6px; margin-top: 10px; }
.psc-key-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  border: 1px solid var(--psc-line); border-radius: 9px; padding: 8px 10px; font-size: 12.5px;
}
.psc-key-row .psc-meta { color: var(--psc-muted); font-size: 12px; flex: 1; min-width: 120px; }
.psc-mini-btn {
  border: 1px solid var(--psc-line); background: transparent; color: var(--psc-ink);
  border-radius: 8px; padding: 4px 10px; font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.psc-mini-btn:hover { border-color: var(--psc-teal); color: var(--psc-teal); }
.psc-mini-btn:disabled { opacity: .6; }

.psc-toast { margin: 8px 0 0; min-height: 16px; font-size: 12.5px; }
.psc-toast.ok { color: var(--psc-teal); }
.psc-toast.bad { color: var(--psc-red); font-weight: 600; }

@media (min-width: 760px) {
  .psc-form { grid-template-columns: repeat(2, 1fr); }
  .psc-field[data-psc-wide], .psc-actions { grid-column: 1 / -1; }
}

.psc-card-drawer-mode { display: block; margin: 0; }
.psc-credential-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.psc-credential-card {
  min-height: 248px;
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  padding: 20px;
  box-shadow: none;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.psc-credential-card:hover,
.psc-credential-card:focus-visible { border-color: #d69a50; outline: none; }
.psc-credential-card.is-selected { border-color: #d78628; box-shadow: 0 0 0 1px rgba(215, 134, 40, .15); }
.psc-credential-card .psc-head { margin-bottom: 10px; }
.psc-credential-card .psc-head h3 { font-size: 17px; }
.psc-credential-card .psc-desc { min-height: 40px; }
.psc-card-summary { display: grid; gap: 0; }
.psc-card-summary > div { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 10px; padding: 8px 0; }
.psc-card-summary span { color: var(--psc-muted); font-size: 12px; }
.psc-card-summary strong { min-width: 0; overflow-wrap: anywhere; font-size: 13px; font-weight: 600; }
.psc-card-actions { margin-top: auto; padding-top: 16px; display: flex; gap: 10px; flex-wrap: nowrap; border-top: 1px solid var(--psc-line); }
.psc-card-actions .psc-btn { flex: 1; min-width: 0; padding-inline: 8px; }
.psc-drawer {
  position: fixed;
  z-index: 980;
  inset: 0 0 0 auto;
  width: min(352px, 100vw);
  height: 100vh;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  color: #171e27;
  background: #fff;
  border-left: 1px solid #dfe5e2;
  box-shadow: -16px 0 36px rgba(23, 30, 39, .12);
}
.psc-drawer > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 26px 24px 18px; border-bottom: 1px solid #e4e8ee; }
.psc-drawer > header small { color: #697585; font-size: 12px; }
.psc-drawer > header h3 { margin: 5px 0 0; font-size: 20px; }
.psc-drawer-close { border: 1px solid #d5ddd9; border-radius: 8px; color: #173b33; background: #fff; padding: 7px 10px; cursor: pointer; }
.psc-drawer-status { padding: 14px 24px; border-bottom: 1px solid #edf0ef; }
.psc-drawer-status > div { display: flex; justify-content: space-between; gap: 14px; }
.psc-drawer-status span { color: #697585; font-size: 12px; }
.psc-drawer-status strong { color: #173b33; }
.psc-drawer-status p { margin: 7px 0 0; color: #697585; font-size: 12px; line-height: 1.5; }
.psc-drawer-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 14px 24px 0; padding: 4px; border-radius: 9px; background: #f3f6f5; }
.psc-drawer-tabs button { min-height: 34px; border: 1px solid transparent; border-radius: 7px; color: #697585; background: transparent; cursor: pointer; }
.psc-drawer-tabs button.is-active { color: #176b55; border-color: #ceded8; background: #fff; font-weight: 700; }
.psc-drawer-panels { min-height: 0; overflow: auto; padding: 18px 24px 24px; }
.psc-drawer-panels [hidden] { display: none !important; }
.psc-drawer-form { display: grid; gap: 13px; }
.psc-drawer-form .psc-field { gap: 6px; }
.psc-drawer-form .psc-field span { color: #303a38; font-size: 13px; }
.psc-drawer-form input,
.psc-drawer-form select,
.psc-sms-form input,
.psc-sms-form select,
.psc-sms-form textarea { width: 100%; box-sizing: border-box; border: 1px solid #d9dfdc; border-radius: 8px; padding: 10px 11px; color: #171e27; background: #fff; font: inherit; }
.psc-drawer-note { margin-top: 18px; padding: 12px; border: 1px solid #efc88e; border-radius: 8px; color: #69491f; background: #fff9f0; }
.psc-drawer-note p { margin: 5px 0 0; font-size: 12px; line-height: 1.55; }
.psc-drawer-secondary { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; }
.psc-drawer > footer { display: flex; justify-content: flex-end; gap: 12px; padding: 16px 24px; border-top: 1px solid #e4e8ee; background: #fff; }
.psc-drawer .psc-btn { min-height: 38px; }
.psc-drawer .psc-btn:not(.ghost):not(.danger) { color: #fff; -webkit-text-fill-color: #fff; background: #176b55; }
.psc-drawer .psc-btn:not(.ghost):not(.danger):hover:not(:disabled),
.psc-drawer .psc-btn:not(.ghost):not(.danger):focus-visible:not(:disabled) { color: #fff; -webkit-text-fill-color: #fff; background: #0e5945; }
.psc-sms-catalog { display: grid; gap: 14px; }
.psc-sms-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.psc-sms-head small,
.psc-sms-editor > header small,
.psc-sms-history header small { color: #176b55; font-size: 11px; font-weight: 700; }
.psc-sms-head h4,
.psc-sms-editor h5,
.psc-sms-history h5 { margin: 4px 0; color: #173b33; }
.psc-sms-head p { margin: 0; color: #697585; font-size: 12px; line-height: 1.5; }
.psc-sms-state { padding: 18px; border: 1px dashed #d9dfdc; border-radius: 9px; color: #697585; background: #fafcfc; }
.psc-sms-state.is-error { color: #9f3d3d; background: #fff6f5; }
.psc-sms-scenes { display: grid; gap: 7px; }
.psc-sms-scenes button { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 10px; padding: 10px; border: 1px solid #dce7e2; border-radius: 8px; text-align: left; color: #173b33; background: #fff; cursor: pointer; }
.psc-sms-scenes button strong { overflow-wrap: anywhere; }
.psc-sms-scenes button code { grid-column: 1 / -1; color: #697585; font-size: 10px; overflow-wrap: anywhere; }
.psc-sms-scenes button small { color: #697585; font-size: 11px; }
.psc-sms-scenes button.is-active { border-color: #176b55; background: #eff7f4; }
.psc-sms-editor { padding-top: 14px; border-top: 1px solid #e4e8ee; }
.psc-sms-editor > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.psc-sms-editor > header code { color: #697585; font-size: 10px; overflow-wrap: anywhere; }
.psc-sms-editor dl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.psc-sms-editor dl > div { padding: 8px; border-radius: 7px; background: #f5f8f7; }
.psc-sms-editor dt { color: #697585; font-size: 10px; }
.psc-sms-editor dd { margin: 3px 0 0; font-size: 12px; font-weight: 700; overflow-wrap: anywhere; }
.psc-sms-form { display: grid; gap: 10px; }
.psc-sms-form label { display: grid; gap: 5px; color: #697585; font-size: 11px; font-weight: 600; }
.psc-sms-form label.is-wide { grid-column: 1 / -1; }
.psc-sms-editor > footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #e4e8ee; }
.psc-sms-editor > footer p { margin: 0; color: #697585; font-size: 11px; }
.psc-sms-message { margin: 10px 0 0; padding: 9px 10px; border-radius: 7px; font-size: 12px; }
.psc-sms-message.is-error { color: #9f3d3d; background: #fff0f0; }
.psc-sms-message.is-success { color: #176b55; background: #edf8f3; }
.psc-sms-history { margin-top: 12px; padding-top: 12px; border-top: 1px solid #e4e8ee; }
.psc-sms-history header { display: flex; justify-content: space-between; gap: 10px; }
.psc-sms-history ol { display: grid; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.psc-sms-history li { display: grid; grid-template-columns: 34px 54px minmax(0, 1fr); gap: 6px; padding: 8px; border-radius: 7px; background: #f7f9f8; }
.psc-sms-history li small { grid-column: 1 / -1; color: #697585; }
body.psc-credential-drawer-open .platform-admin-b1-workspace { margin-right: 352px; }
body.psc-credential-drawer-open { overflow: hidden; }

@media (max-width: 1100px) {
  body.psc-credential-drawer-open .platform-admin-b1-workspace { margin-right: 0; }
  .psc-drawer { width: min(420px, 100vw); }
}
@media (max-width: 760px) {
  .psc-credential-grid { grid-template-columns: 1fr; }
  .psc-credential-card { min-height: 220px; }
  .psc-drawer { width: 100vw; }
  .psc-card-actions { flex-wrap: wrap; }
  .psc-card-actions .psc-btn { min-width: calc(50% - 5px); }
  .psc-sms-editor dl { grid-template-columns: 1fr; }
  .psc-sms-editor > footer { align-items: stretch; flex-direction: column; }
}

/* ===== NIGHT-CONTRAST-FIX-20260725 · 清单#2 平台自营 Key 池夜间覆盖段 =====
   本分片的深色只挂在 prefers-color-scheme / :root[data-theme=dark] 上，
   与平台自身的昼夜引擎(html[data-meifan-theme])完全没接上 → 夜晚主题下整块纯白卡、
   标题/描述/空态/错误浅字 ratio 1.05~1.24。这里把同一套深色变量接到平台夜间态。
   夜间 = 默认态，用 :not([data-meifan-theme="day"]) 兜住"未写 attr"与"tech-glass-blue"；
   白天分支不匹配 → 上方白天规则与既有 dark 两块原样保留，零改动。 */
html:not([data-meifan-theme="day"]) .psc-wrap {
  --psc-ink: var(--mf-theme-ink, #e8f6fb);
  --psc-paper: rgba(4, 18, 30, 0.72);
  --psc-raised: var(--mf-theme-card,
    linear-gradient(145deg, rgba(255,255,255,0.095), rgba(255,255,255,0.024) 44%, rgba(70,185,230,0.055) 100%));
  --psc-line: var(--mf-theme-line, rgba(126, 211, 242, 0.30));
  --psc-muted: rgba(207, 230, 238, 0.78);
  --psc-teal: #76d8f6;
  --psc-teal-soft: rgba(118, 216, 246, 0.16);
  --psc-amber: #e7b45f;
  --psc-amber-soft: rgba(231, 180, 95, 0.16);
  --psc-red: #ff9c90;
  --psc-shadow: var(--mf-theme-glass-shadow,
    inset 0 1px 0 rgba(255,255,255,0.18), 0 22px 70px rgba(0,0,0,0.34));
}
/* 主按钮底色在夜间是亮青，白字会掉到 ~2:1 → 翻成深墨字 */
html:not([data-meifan-theme="day"]) .psc-wrap .psc-btn {
  color: #04202e;
}
html:not([data-meifan-theme="day"]) .psc-wrap .psc-btn.ghost {
  color: var(--psc-teal);
}
html:not([data-meifan-theme="day"]) .psc-wrap .psc-btn.danger {
  color: var(--psc-red);
}
/* 令 -1295：内容安全卡启用／停用开关，沿用本分片 --psc-* 变量，日夜两态自动跟随 */
.psc-cs-enable { margin-top: 2px; }
.psc-cs-switch { justify-self: start; min-height: 36px; border: 1px solid var(--psc-line); color: var(--psc-amber); background: var(--psc-amber-soft); }
.psc-cs-switch.is-on { color: var(--psc-teal); background: var(--psc-teal-soft); }
.psc-cs-enable-note { color: var(--psc-muted); font-size: 12px; line-height: 1.6; }
/* 平台后台宿主里 ghost 钮被宿主规则统一着色，开关的启用／停用要用宿主已有的成功／提醒色对（两套主题各有值）区分 */
#meifanPlatformWorkspaceC2Root .platform-admin-b3-credential-host .psc-cs-switch { color: var(--pa-r4-warning); -webkit-text-fill-color: var(--pa-r4-warning); background: var(--pa-r4-warning-bg); border-color: var(--pa-r4-warning); }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-credential-host .psc-cs-switch.is-on { color: var(--pa-r4-success); -webkit-text-fill-color: var(--pa-r4-success); background: var(--pa-r4-success-bg); border-color: var(--pa-r4-success); }
.platform-admin-b1-open {
  overflow: hidden;
}

/* PLATFORM-ADMIN-SPACE-ISOLATION-R1 ·
   平台主管后台是独立工作空间。打开期间只允许平台主管根层参与布局与命中，
   用户工作台壳、账号/主题、toast、AI 悬浮入口及动态用户浮层全部退出渲染树。
   script 仅为资源节点，不参与视觉/命中；保留它可避免把空间隔离误写成资源装卸。
   09 的用户侧栏/弹窗层级合同保持原样，离开本空间后自然恢复。 */
body.platform-admin-b1-open > :not(#meifanPlatformWorkspaceC2Root):not(script) {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

#meifanPlatformWorkspaceC2Root {
  position: fixed;
  inset: 0;
  z-index: 5200;
  overflow: auto;
  color: #1e2d29;
  background: #f4f2ec;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, sans-serif;
}

.platform-admin-b1-space-notice {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 8;
  width: min(420px, calc(100vw - 36px));
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid #d8c58e;
  border-radius: 9px;
  color: #3c3321;
  background: #fff8e7;
  box-shadow: 0 14px 38px rgba(30, 45, 41, 0.18);
}

.platform-admin-b1-space-notice span {
  min-width: 0;
  flex: 1 1 auto;
  line-height: 1.55;
}

.platform-admin-b1-space-notice button {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border: 0;
  border-radius: 6px;
  color: #5f5131;
  background: rgba(95, 81, 49, 0.08);
  cursor: pointer;
}

.platform-admin-b1-space-notice button:focus-visible {
  outline: 2px solid #236b57;
  outline-offset: 2px;
}

.platform-admin-b1-shell {
  --pa-green-950: #063c2e;
  --pa-green-900: #0a4938;
  --pa-green-800: #155846;
  --pa-green-700: #236b57;
  --pa-green-100: #dfece6;
  --pa-ink: #1d2d29;
  --pa-muted: #72807c;
  --pa-line: #e6e2d8;
  --pa-paper: #fffefa;
  min-height: 100%;
  display: grid;
  grid-template-columns: 226px minmax(0, 1fr);
  background: #f7f5ef;
}

.platform-admin-b1-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 640px;
  display: flex;
  flex-direction: column;
  padding: 28px 18px 20px;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 28%),
    var(--pa-green-950);
  box-shadow: 12px 0 36px rgba(17, 56, 45, 0.08);
}

.platform-admin-b1-brand {
  display: grid;
  gap: 5px;
  padding: 0 12px 25px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.platform-admin-b1-brand strong {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.035em;
}

.platform-admin-b1-brand small {
  color: rgba(255, 255, 255, 0.64);
  font-size: 11px;
  letter-spacing: 0.16em;
}

.platform-admin-b1-primary-nav {
  display: grid;
  gap: 7px;
  padding-top: 24px;
}

.platform-admin-b1-primary-item,
.platform-admin-b1-profile,
.platform-admin-b1-settings-item,
.platform-admin-b1-top-actions button,
.platform-admin-b1-route-error button,
.platform-admin-b1-boundary-card button {
  appearance: none;
  border: 0;
  font: inherit;
  cursor: pointer;
}

.platform-admin-b1-primary-item {
  position: relative;
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 13px;
  border-radius: 7px;
  color: rgba(255, 255, 255, 0.76);
  background: transparent;
  font-size: 14px;
  text-align: left;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.platform-admin-b1-primary-item::before {
  content: "";
  position: absolute;
  left: -18px;
  width: 3px;
  height: 24px;
  border-radius: 0 4px 4px 0;
  background: transparent;
}

.platform-admin-b1-primary-item svg,
.platform-admin-b1-top-actions svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.platform-admin-b1-primary-item:hover,
.platform-admin-b1-primary-item:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.platform-admin-b1-primary-item.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.045);
}

.platform-admin-b1-primary-item.is-active::before {
  background: #c6ad71;
}

.platform-admin-b1-profile {
  width: 100%;
  min-height: 62px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 10px;
  border-radius: 9px;
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  text-align: left;
}

.platform-admin-b1-profile:hover,
.platform-admin-b1-profile:focus-visible,
.platform-admin-b1-profile.is-active {
  background: rgba(255, 255, 255, 0.13);
  outline: none;
}

.platform-admin-b1-profile > span:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.platform-admin-b1-profile strong {
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.platform-admin-b1-profile small {
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
}

.platform-admin-b1-profile b {
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
}

.platform-admin-b1-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: 50%;
  color: var(--pa-green-950);
  background: #f0dfb7;
  font-size: 14px;
  font-weight: 900;
}

.platform-admin-b1-workspace {
  min-width: 0;
  min-height: 100vh;
}

.platform-admin-b1-topbar {
  min-height: 112px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  padding: 30px clamp(28px, 4vw, 58px) 22px;
  border-bottom: 1px solid var(--pa-line);
  background: rgba(255, 254, 250, 0.94);
}

.platform-admin-b1-topbar > div:first-child {
  min-width: 0;
}

.platform-admin-b1-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 9px;
  color: #89938f;
  font-size: 11px;
}

.platform-admin-b1-breadcrumb b {
  color: #c4c5bd;
  font-weight: 400;
}

.platform-admin-b1-breadcrumb [aria-current="page"] {
  color: var(--pa-green-700);
}

.platform-admin-b1-topbar h1 {
  margin: 0;
  color: var(--pa-ink);
  font-size: clamp(23px, 2.3vw, 30px);
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.platform-admin-b1-topbar p {
  margin: 7px 0 0;
  color: var(--pa-muted);
  font-size: 12px;
}

.platform-admin-b1-top-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-top: 9px;
}

.platform-admin-b1-top-actions button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 14px;
  border: 1px solid #d8d7cf;
  border-radius: 5px;
  color: #46534f;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
}

.platform-admin-b1-top-actions button:hover,
.platform-admin-b1-top-actions button:focus-visible {
  border-color: #9eb6ac;
  color: var(--pa-green-800);
  outline: none;
}

.platform-admin-b1-top-actions button.is-primary {
  border-color: var(--pa-green-900);
  color: #fff;
  background: var(--pa-green-900);
}

.platform-admin-b1-top-actions button.is-primary:hover,
.platform-admin-b1-top-actions button.is-primary:focus-visible {
  color: #fff;
  background: var(--pa-green-800);
}

.platform-admin-b1-content {
  min-height: calc(100vh - 112px);
  padding: 30px clamp(28px, 4vw, 58px) 54px;
}

.platform-admin-b1-content.has-settings-nav {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 24px;
}

.platform-admin-b1-settings-nav {
  align-self: start;
  display: grid;
  gap: 2px;
  padding: 9px 0;
  border: 1px solid var(--pa-line);
  border-radius: 8px;
  background: #f8f5ee;
  box-shadow: 0 10px 28px rgba(50, 61, 55, 0.04);
}

.platform-admin-b1-settings-item {
  position: relative;
  min-height: 43px;
  padding: 0 18px 0 23px;
  color: #66736f;
  background: transparent;
  font-size: 13px;
  text-align: left;
}

.platform-admin-b1-settings-item::before {
  content: "";
  position: absolute;
  inset: 8px auto 8px 0;
  width: 3px;
  background: transparent;
}

.platform-admin-b1-settings-item:hover,
.platform-admin-b1-settings-item:focus-visible {
  color: var(--pa-green-800);
  background: #f0eee7;
  outline: none;
}

.platform-admin-b1-settings-item.is-active {
  color: var(--pa-green-900);
  background: #efe8d9;
  font-weight: 800;
}

.platform-admin-b1-settings-item.is-active::before {
  background: var(--pa-green-700);
}

.platform-admin-b1-outlet {
  min-width: 0;
  min-height: 420px;
  display: grid;
  border: 1px solid var(--pa-line);
  border-radius: 9px;
  background: var(--pa-paper);
  box-shadow: 0 14px 36px rgba(46, 58, 52, 0.05);
}

.platform-admin-b1-empty,
.platform-admin-b1-route-error {
  width: min(560px, calc(100% - 40px));
  align-self: center;
  justify-self: center;
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 42px 32px;
  border: 1px dashed #d7d4c9;
  border-radius: 10px;
  color: var(--pa-muted);
  background: #fbfaf6;
  text-align: center;
}

.platform-admin-b1-empty-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  margin-bottom: 2px;
  border-radius: 50%;
  color: var(--pa-green-700);
  background: var(--pa-green-100);
}

.platform-admin-b1-empty-icon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.platform-admin-b1-empty h2,
.platform-admin-b1-route-error h2 {
  margin: 0;
  color: #34433f;
  font-size: 18px;
}

.platform-admin-b1-empty p,
.platform-admin-b1-route-error p {
  max-width: 470px;
  margin: 0;
  font-size: 13px;
  line-height: 1.75;
}

.platform-admin-b1-empty small {
  margin-top: 4px;
  color: #9a8f76;
  font-size: 11px;
}

.platform-admin-b1-route-error > span {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #9f6b21;
  background: #f8ebce;
  font-size: 20px;
  font-weight: 900;
}

.platform-admin-b1-route-error button,
.platform-admin-b1-boundary-card button {
  min-height: 38px;
  margin-top: 7px;
  padding: 0 17px;
  border-radius: 5px;
  color: #fff;
  background: var(--pa-green-900, #0a4938);
  font-size: 12px;
  font-weight: 800;
}

.platform-admin-b1-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(20, 30, 27, 0.52);
  backdrop-filter: blur(2px);
}

.platform-admin-b1-account-modal {
  width: min(760px, 100%);
  overflow: hidden;
  border-radius: 9px;
  background: #fffefa;
  box-shadow: 0 30px 90px rgba(9, 34, 27, 0.28);
}

.platform-admin-b1-account-modal > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 26px 18px;
  border-bottom: 1px solid var(--pa-line);
}

.platform-admin-b1-account-modal > header span {
  color: #8c978f;
  font-size: 11px;
}

.platform-admin-b1-account-modal > header h2 {
  margin: 4px 0 0;
  color: var(--pa-ink);
  font-size: 22px;
}

.platform-admin-b1-account-modal > header button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: #64716d;
  background: #f1efe8;
  font-size: 21px;
  cursor: pointer;
}

.platform-admin-b1-account-empty {
  min-height: 300px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 38px;
  color: var(--pa-muted);
  text-align: center;
}

.platform-admin-b1-account-empty svg {
  width: 40px;
  height: 40px;
  padding: 11px;
  border-radius: 50%;
  color: var(--pa-green-700);
  background: var(--pa-green-100);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.platform-admin-b1-account-empty strong {
  color: #34433f;
  font-size: 18px;
}

.platform-admin-b1-account-empty p {
  max-width: 500px;
  margin: 0;
  font-size: 13px;
  line-height: 1.75;
}

.platform-admin-b1-boundary {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 50% 22%, rgba(42, 105, 85, 0.16), transparent 32%),
    linear-gradient(145deg, #eaece5, #f8f6ef 54%, #e7ece7);
}

.platform-admin-b1-boundary-card {
  width: min(520px, 100%);
  display: grid;
  justify-items: center;
  gap: 11px;
  padding: 48px 42px;
  border: 1px solid rgba(27, 71, 58, 0.12);
  border-radius: 12px;
  background: rgba(255, 254, 250, 0.96);
  box-shadow: 0 26px 80px rgba(25, 53, 45, 0.13);
  text-align: center;
}

.platform-admin-b1-boundary-mark {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  margin-bottom: 5px;
  border-radius: 12px;
  color: #fff;
  background: var(--pa-green-900, #0a4938);
  font-family: Georgia, serif;
  font-size: 25px;
  font-weight: 900;
}

.platform-admin-b1-boundary-card small {
  color: #7a8782;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.platform-admin-b1-boundary-card h1 {
  margin: 5px 0 0;
  color: #263a34;
  font-size: 24px;
}

.platform-admin-b1-boundary-card p {
  margin: 0;
  color: #697873;
  font-size: 13px;
  line-height: 1.75;
}

@media (max-width: 980px) {
  .platform-admin-b1-shell {
    grid-template-columns: 196px minmax(0, 1fr);
  }

  .platform-admin-b1-sidebar {
    padding-inline: 12px;
  }

  .platform-admin-b1-primary-item::before {
    left: -12px;
  }

  .platform-admin-b1-topbar {
    align-items: stretch;
    flex-direction: column;
    gap: 16px;
  }

  .platform-admin-b1-top-actions {
    padding-top: 0;
  }

  .platform-admin-b1-content.has-settings-nav {
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 16px;
  }
}

@media (max-width: 760px) {
  .platform-admin-b1-shell {
    display: block;
  }

  .platform-admin-b1-sidebar {
    position: static;
    width: auto;
    height: auto;
    min-height: 0;
    padding: 16px;
  }

  .platform-admin-b1-brand {
    padding: 0 4px 15px;
  }

  .platform-admin-b1-primary-nav {
    display: flex;
    overflow-x: auto;
    gap: 6px;
    padding: 14px 0 2px;
    scrollbar-width: thin;
  }

  .platform-admin-b1-primary-item {
    width: auto;
    min-width: max-content;
    min-height: 40px;
    padding: 0 11px;
  }

  .platform-admin-b1-primary-item::before {
    inset: auto 10px -2px;
    width: auto;
    height: 2px;
  }

  .platform-admin-b1-profile {
    margin-top: 14px;
  }

  .platform-admin-b1-topbar {
    min-height: 0;
    padding: 24px 18px 18px;
  }

  .platform-admin-b1-top-actions {
    flex-wrap: wrap;
  }

  .platform-admin-b1-top-actions button {
    flex: 1 1 180px;
  }

  .platform-admin-b1-content {
    min-height: 520px;
    padding: 18px;
  }

  .platform-admin-b1-content.has-settings-nav {
    display: block;
  }

  .platform-admin-b1-settings-nav {
    display: flex;
    overflow-x: auto;
    margin-bottom: 14px;
    padding: 6px;
  }

  .platform-admin-b1-settings-item {
    min-width: max-content;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 5px;
  }

  .platform-admin-b1-settings-item::before {
    display: none;
  }

  .platform-admin-b1-outlet {
    min-height: 390px;
  }

  .platform-admin-b1-empty,
  .platform-admin-b1-route-error {
    width: calc(100% - 24px);
    padding: 32px 18px;
  }

  .platform-admin-b1-boundary {
    padding: 18px;
  }

  .platform-admin-b1-boundary-card {
    padding: 38px 22px;
  }

  .platform-admin-b1-modal-backdrop {
    align-items: end;
    padding: 0;
  }

  .platform-admin-b1-account-modal {
    border-radius: 14px 14px 0 0;
  }
}

/* 587 R4 actual product: paired surface/text tokens within the platform role root.
   The existing role isolation and responsive 04B grid remain unchanged. */
#meifanPlatformWorkspaceC2Root {
  --pa-r4-warning: #855100;
  --pa-r4-warning-bg: #fff3d9;
  --pa-r4-danger: #aa3333;
  --pa-r4-danger-bg: #ffefed;
  --pa-r4-success: #1d6943;
  --pa-r4-success-bg: #e7f3ea;
  color: var(--r4-ui-ink);
  background: var(--r4-ui-bg, var(--r4-ui-soft));
}
html[data-meifan-theme="tech-glass-blue"] #meifanPlatformWorkspaceC2Root {
  --pa-r4-warning: #f1c47a;
  --pa-r4-warning-bg: #3b3020;
  --pa-r4-danger: #ffb4ae;
  --pa-r4-danger-bg: #412a28;
  --pa-r4-success: #a0d8b0;
  --pa-r4-success-bg: #263e2e;
  background: radial-gradient(ellipse at 80% 0, rgba(53,133,207,.18), transparent 58%), #04101a;
}
#meifanPlatformWorkspaceC2Root .platform-admin-b1-shell {
  --pa-ink: var(--r4-ui-ink);
  --pa-muted: var(--r4-ui-muted);
  --pa-line: var(--r4-ui-line);
  --pa-paper: var(--r4-ui-panel);
  --pa-green-950: var(--r4-ui-selected);
  --pa-green-900: var(--r4-ui-selected);
  --pa-green-800: var(--r4-ui-accent);
  --pa-green-700: var(--r4-ui-accent);
  --pa-green-100: var(--r4-ui-soft);
  color: var(--r4-ui-ink);
  background: transparent;
}
#meifanPlatformWorkspaceC2Root :is(.platform-admin-b1-sidebar, .platform-admin-b1-topbar, .platform-admin-b1-settings-nav, .platform-admin-b1-outlet, .platform-admin-b1-account-modal, .platform-admin-b1-boundary-card) {
  color: var(--r4-ui-ink);
  background: var(--r4-ui-panel);
  border-color: var(--r4-ui-line);
  box-shadow: inset 0 1px 0 rgba(200,229,255,.15), 0 12px 30px rgba(0,8,24,.12);
}
#meifanPlatformWorkspaceC2Root .platform-admin-b1-sidebar { border-right: 1px solid var(--r4-ui-line); }
#meifanPlatformWorkspaceC2Root .platform-admin-b1-outlet.has-b2-content { border: 0; background: transparent; box-shadow: none; }
#meifanPlatformWorkspaceC2Root :is(.platform-admin-b1-brand, .platform-admin-b1-account-modal > header) { border-color: var(--r4-ui-line); }
#meifanPlatformWorkspaceC2Root :is(.platform-admin-b1-brand strong, .platform-admin-b1-topbar h1, .platform-admin-b1-empty h2, .platform-admin-b1-route-error h2, .platform-admin-b1-account-modal h2, .platform-admin-b1-account-empty strong, .platform-admin-b1-boundary-card h1) { color: var(--r4-ui-ink); }
#meifanPlatformWorkspaceC2Root :is(.platform-admin-b1-brand small, .platform-admin-b1-breadcrumb, .platform-admin-b1-breadcrumb b, .platform-admin-b1-topbar p, .platform-admin-b1-empty p, .platform-admin-b1-empty small, .platform-admin-b1-route-error p, .platform-admin-b1-account-modal > header span, .platform-admin-b1-account-empty p, .platform-admin-b1-boundary-card p, .platform-admin-b1-boundary-card small) { color: var(--r4-ui-muted); }
#meifanPlatformWorkspaceC2Root .platform-admin-b1-breadcrumb [aria-current="page"] { color: var(--r4-ui-accent); }
#meifanPlatformWorkspaceC2Root :is(.platform-admin-b1-empty, .platform-admin-b1-route-error) { background: var(--r4-ui-soft); border-color: var(--r4-ui-line); }
#meifanPlatformWorkspaceC2Root .platform-admin-b1-boundary { background: transparent; }
#meifanPlatformWorkspaceC2Root :is(.platform-admin-b1-primary-item, .platform-admin-b1-settings-item, .platform-admin-b1-profile, .platform-admin-b1-top-actions button, .platform-admin-b1-account-modal > header button) {
  color: var(--r4-ui-ink);
  background: transparent;
  border-color: var(--r4-ui-line);
  /* Frequent navigation and keyboard selection respond without animation delay. */
  transition: none;
}
#meifanPlatformWorkspaceC2Root :is(.platform-admin-b1-profile small, .platform-admin-b1-profile b) { color: var(--r4-ui-muted); }
#meifanPlatformWorkspaceC2Root :is(.platform-admin-b1-primary-item, .platform-admin-b1-settings-item, .platform-admin-b1-profile, .platform-admin-b1-top-actions button, .platform-admin-b1-account-modal > header button):hover:not(:disabled):not(.is-active):not(.is-primary) { background: var(--r4-ui-hover); }
#meifanPlatformWorkspaceC2Root :is(.platform-admin-b1-primary-item.is-active, .platform-admin-b1-settings-item.is-active, .platform-admin-b1-profile.is-active, .platform-admin-b1-top-actions button.is-primary, .platform-admin-b1-route-error button, .platform-admin-b1-boundary-card button, .platform-admin-b1-boundary-mark) {
  color: var(--r4-ui-selected-ink);
  background: var(--r4-ui-selected);
  box-shadow: inset 0 0 0 1px var(--r4-ui-accent);
  font-weight: 800;
}
#meifanPlatformWorkspaceC2Root .platform-admin-b1-profile.is-active :is(strong, small, b) { color: var(--r4-ui-selected-ink); }
#meifanPlatformWorkspaceC2Root :is(.platform-admin-b1-primary-item.is-active, .platform-admin-b1-settings-item.is-active)::before { background: var(--r4-ui-accent); }
#meifanPlatformWorkspaceC2Root .platform-admin-b1-avatar { color: var(--r4-ui-selected-ink); background: var(--r4-ui-selected); border-color: var(--r4-ui-accent); }
#meifanPlatformWorkspaceC2Root .platform-admin-b1-space-notice { color: var(--pa-r4-warning); background: var(--pa-r4-warning-bg); border-color: currentColor; }
#meifanPlatformWorkspaceC2Root .platform-admin-b1-space-notice button { color: inherit; background: transparent; }
#meifanPlatformWorkspaceC2Root :is(.platform-admin-b1-route-error > span) { color: var(--pa-r4-warning); background: var(--pa-r4-warning-bg); }
#meifanPlatformWorkspaceC2Root .platform-admin-b1-shell button:focus-visible,
#meifanPlatformWorkspaceC2Root .platform-admin-b1-space-notice button:focus-visible,
#meifanPlatformWorkspaceC2Root .platform-admin-b1-boundary-card button:focus-visible {
  outline: 2px solid var(--r4-ui-focus);
  outline-offset: 2px;
}
@media (max-width: 760px) {
  #meifanPlatformWorkspaceC2Root :is(.platform-admin-b1-primary-item, .platform-admin-b1-settings-item, .platform-admin-b1-top-actions button) { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  #meifanPlatformWorkspaceC2Root :is(.platform-admin-b1-primary-item, .platform-admin-b1-settings-item, .platform-admin-b1-profile, .platform-admin-b1-top-actions button, .platform-admin-b1-account-modal > header button) { transition: none; }
}
/* Day sidebar retains its independent deep-green navigation material. */
html[data-meifan-theme="day"] #meifanPlatformWorkspaceC2Root .platform-admin-b1-sidebar {
  --r4-ui-ink: #e7f0eb;
  --r4-ui-muted: #b7cec3;
  --r4-ui-panel: #073f35;
  --r4-ui-soft: #134d40;
  --r4-ui-hover: #205e4c;
  --r4-ui-selected: #012f26;
  --r4-ui-selected-ink: #fff;
  --r4-ui-accent: #a7d9be;
  --r4-ui-focus: #c1f0d5;
  --r4-ui-line: #63897a;
}
/* AUDIT-PLATFORM-UI-BATCH1 · 用户操作审计三页样式(挂载于 B1 壳层 audit 表面) */
.platform-admin-b1-outlet .audit-page,
.platform-admin-b1-outlet .audit-modal-backdrop {
  --au-ink: #1d2d29;
  --au-muted: #6b7a76;
  --au-line: #e6e2d8;
  --au-paper: #fffefa;
  --au-green: #0a4938;
  --au-green-bg: #dfece6;
  --au-red: #b3261e;
  --au-red-bg: #fdeceb;
  --au-amber-bg: #fdf3e3;
  color: var(--au-ink);
  font-size: 14px;
  line-height: 1.6;
}
.audit-page h2 { margin: 0; font-size: 20px; }
.audit-page h3 { margin: 0 0 10px; font-size: 14px; }
.audit-page code {
  font-family: Consolas, monospace;
  background: #f1efe8;
  padding: 0 5px;
  border-radius: 4px;
}
.audit-page .audit-muted { color: var(--au-muted); font-size: 12px; }
.audit-page dl { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 6px 12px; margin: 0; }
.audit-page dt { color: var(--au-muted); }
.audit-page dd { margin: 0; word-break: break-all; }

.audit-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}
.audit-header p { margin: 2px 0 0; color: var(--au-muted); font-size: 13px; }
.audit-header-actions { display: flex; gap: 8px; flex-shrink: 0; }
.audit-header-actions button,
.audit-page .audit-tabs button,
.audit-page .audit-pager button,
.audit-page .audit-filters button {
  border: 1px solid var(--au-line);
  background: var(--au-paper);
  color: var(--au-ink);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
}
.audit-header-actions button.is-primary,
.audit-page .audit-filters button.is-primary {
  background: var(--au-green);
  border-color: var(--au-green);
  color: #fff;
}
.audit-page button:focus-visible,
.audit-page input:focus-visible,
.audit-page select:focus-visible,
.audit-modal button:focus-visible,
.audit-modal textarea:focus-visible {
  outline: 3px solid rgba(10, 73, 56, 0.28);
  outline-offset: 2px;
}
.audit-header-actions button.audit-export-disabled,
.audit-page .audit-disabled-actions button {
  cursor: not-allowed;
  opacity: 0.62;
  border-style: dashed;
}
.audit-export-note { font-size: 11px; color: #a35c00; margin-left: 6px; }

.audit-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.audit-tabs button { min-height: 42px; text-align: left; }
.audit-tabs button b { margin-left: 4px; color: var(--au-green); }
.audit-tabs button.is-active { background: var(--au-green-bg); border-color: var(--au-green); }

.audit-note-bar {
  margin: 0 0 10px;
  padding: 7px 10px;
  background: var(--au-amber-bg);
  border-left: 3px solid #c98a2d;
  color: #5c4a17;
  font-size: 12px;
}
.audit-lookup-note small { display: block; margin-top: 4px; font-size: 11px; opacity: 0.9; }
.audit-settings-filter { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin: 0 0 10px; padding: 10px; border: 1px solid var(--au-line); border-radius: 8px; background: var(--au-paper); font-size: 12px; }
.audit-settings-filter > div { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.audit-settings-filter label { display: inline-flex; align-items: center; gap: 5px; }
.audit-settings-filter p { flex-basis: 100%; margin: 0; color: var(--au-muted); line-height: 1.5; }

.audit-filters { border: 1px solid var(--au-line); border-radius: 8px; padding: 10px; margin-bottom: 12px; background: #fbfaf6; }
.audit-filter-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 8px; }
.audit-filter-row:last-child { margin-bottom: 0; }
.audit-filters label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--au-muted); }
.audit-filters input,
.audit-filters select {
  border: 1px solid var(--au-line);
  border-radius: 6px;
  padding: 5px 8px;
  min-width: 130px;
  background: #fff;
  font-size: 13px;
}

.audit-table-wrap { overflow-x: auto; border: 1px solid var(--au-line); border-radius: 8px; background: var(--au-paper); }
.audit-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.audit-table th, .audit-table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--au-line); vertical-align: top; }
.audit-table th { background: #f3f1ea; font-weight: 600; white-space: nowrap; }
.audit-table tr:last-child td { border-bottom: none; }
.audit-table tbody tr:hover { background: #faf8f2; }
.audit-cell-time time { display: block; font-variant-numeric: tabular-nums; }
.audit-cell-time small { color: var(--au-muted); font-size: 11px; }

/* 553-P2-B2 #28②: 结果(第6列)/风险(第7列)列保最小宽 + 不折行, 杜绝「未/采/集」「高/风/险」逐字竖排;
   移动端允许其它内容换行, 徽标自身始终不折行(不逐字竖排), 超宽由 .audit-table-wrap 横向滚动承接。 */
.audit-table th:nth-child(6), .audit-table td:nth-child(6),
.audit-table th:nth-child(7), .audit-table td:nth-child(7) { min-width: 64px; white-space: nowrap; }
/* AUD-03 独有八列表格：817px 左栏给操作留 17%，事件 ID 截显但保留 title 全值。 */
.audit-trail-table { table-layout: fixed; }
.audit-trail-table th, .audit-trail-table td { padding-left: 6px; padding-right: 6px; }
.audit-trail-table th:nth-child(1) { width: 13%; }
.audit-trail-table th:nth-child(2) { width: 14%; }
.audit-trail-table th:nth-child(3) { width: 12%; }
.audit-trail-table th:nth-child(4) { width: 13%; }
.audit-trail-table th:nth-child(5) { width: 11%; }
.audit-trail-table th:nth-child(6) { width: 8%; }
.audit-trail-table th:nth-child(7) { width: 12%; }
.audit-trail-table th:nth-child(8) { width: 17%; }
.audit-trail-table th:nth-child(6), .audit-trail-table td:nth-child(6),
.audit-trail-table th:nth-child(7), .audit-trail-table td:nth-child(7) { min-width: 0; }
.audit-trail-table td:nth-child(7) small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audit-trail-table td:nth-child(8) { white-space: nowrap; }
.audit-trail-table td:nth-child(8) .audit-link { font-size: 12px; }
@media (max-width: 900px) { .audit-trail-table { min-width: 817px; } }
.audit-badge { white-space: nowrap; }

.audit-badge { display: inline-block; padding: 1px 7px; border-radius: 10px; font-size: 12px; }
.audit-badge.risk.is-high { background: var(--au-red-bg); color: var(--au-red); }
.audit-badge.risk.is-low { background: var(--au-green-bg); color: var(--au-green); }
.audit-badge.risk.is-unknown, .audit-badge.result.is-unknown { background: #efede6; color: var(--au-muted); }
.audit-badge.result.is-ok { background: var(--au-green-bg); color: var(--au-green); }
.audit-badge.result.is-denied, .audit-badge.result.is-error { background: var(--au-red-bg); color: var(--au-red); }
.audit-module { color: var(--au-green); }
.audit-action { font-size: 12px; }
.audit-missing {
  font-style: normal;
  color: #a35c00;
  background: var(--au-amber-bg);
  border: 1px dashed #d9b36a;
  padding: 0 5px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
}
.audit-link {
  border: none;
  background: none;
  color: var(--au-green);
  cursor: pointer;
  font-size: 13px;
  text-decoration: underline;
  padding: 0;
}
.audit-triple { color: var(--au-muted); font-size: 12px; }

.audit-state { padding: 48px 20px; text-align: center; color: var(--au-muted); }
.audit-state strong { display: block; font-size: 16px; color: var(--au-ink); margin-bottom: 6px; }
.audit-state button {
  margin-top: 12px;
  border: 1px solid var(--au-line);
  background: var(--au-paper);
  border-radius: 6px;
  padding: 6px 14px;
  cursor: pointer;
}
.audit-state[data-audit-state="failed"] { background: var(--au-red-bg); border: 1px solid #ecc7c4; border-radius: 8px; }
.audit-state[data-audit-state="forbidden"] { background: #f4f1ea; border: 1px solid var(--au-line); border-radius: 8px; }
.audit-state[data-audit-state="empty"] { background: #faf8f2; border: 1px dashed var(--au-line); border-radius: 8px; }
.audit-spinner {
  display: inline-block;
  width: 20px; height: 20px;
  border: 2px solid var(--au-line);
  border-top-color: var(--au-green);
  border-radius: 50%;
  animation: audit-spin 0.8s linear infinite;
}
@keyframes audit-spin { to { transform: rotate(360deg); } }

.audit-pager { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; font-size: 13px; color: var(--au-muted); }
.audit-pager-btns { display: flex; gap: 6px; }
.audit-pager-btns button { min-width: 30px; text-align: center; }
.audit-pager-btns button.is-current { background: var(--au-green); border-color: var(--au-green); color: #fff; }
.audit-notice { margin-top: 8px; color: var(--au-green); font-size: 12px; }

.audit-breadcrumb { color: var(--au-muted); font-size: 12px; margin-bottom: 8px; }
.audit-readonly-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  background: var(--au-red-bg);
  border: 1px solid #ecc7c4;
  color: var(--au-red);
  font-size: 13px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.audit-detail-grid, .audit-trail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 400px);
  gap: 14px;
  align-items: start;
}
.audit-detail-main, .audit-trail-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.audit-detail-side, .audit-trail-side { display: flex; flex-direction: column; gap: 12px; }
.audit-card { border: 1px solid var(--au-line); border-radius: 8px; padding: 12px; background: var(--au-paper); }
.audit-detail-main { gap: 0; overflow: hidden; border: 1px solid var(--au-line); border-radius: 8px; background: var(--au-paper); }
.audit-detail-main > .audit-card { border: 0; border-bottom: 1px solid var(--au-line); border-radius: 0; }
.audit-detail-main > .audit-card:last-child { border-bottom: 0; }
.audit-card h3 small { color: var(--au-muted); font-weight: normal; font-size: 12px; margin-left: 6px; }
.audit-changes { width: 100%; border-collapse: collapse; font-size: 13px; }
.audit-changes th, .audit-changes td { border: 1px solid var(--au-line); padding: 6px 8px; text-align: left; }
.audit-changes-note { color: var(--au-muted); font-size: 12px; }
.audit-disabled-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.audit-disabled-actions button {
  border: 1px dashed var(--au-line);
  background: #f6f4ee;
  border-radius: 6px;
  padding: 6px 10px;
  cursor: not-allowed;
  opacity: 0.62;
  font-size: 13px;
}
.audit-timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.audit-timeline li { border-left: 2px solid var(--au-line); padding: 0 0 6px 12px; }
.audit-timeline time { display: block; font-size: 12px; color: var(--au-muted); font-variant-numeric: tabular-nums; }
.audit-timeline p { margin: 2px 0; }
.audit-timeline .audit-trail-sub { color: var(--au-muted); font-size: 12px; }
.audit-tag { display: inline-block; font-size: 11px; padding: 0 6px; border-radius: 4px; margin-right: 4px; }
.audit-tag.is-own { background: var(--au-green-bg); color: var(--au-green); }
.audit-tag.is-related { background: var(--au-red-bg); color: var(--au-red); }
.audit-trail-identity {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) repeat(3, minmax(130px, 1fr));
  gap: 1px;
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid var(--au-line);
  border-radius: 8px;
  background: var(--au-line);
}
.audit-trail-identity > div { display: grid; gap: 2px; padding: 10px 12px; background: var(--au-paper); }
.audit-trail-identity span, .audit-trail-identity small { color: var(--au-muted); font-size: 11px; }
.audit-trail-identity b { font-size: 14px; }
.audit-trail-filters { margin-bottom: 12px; }
.audit-triple { display: block; margin-top: 2px; }

@media (max-width: 1100px) {
  .audit-detail-grid, .audit-trail-grid { grid-template-columns: 1fr; }
  .audit-trail-identity { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .audit-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* 553-P2-B2 #28②: mobile 允许换行, 但徽标 white-space: nowrap 仍保证不逐字竖排 */
  .audit-table th:nth-child(6), .audit-table td:nth-child(6),
  .audit-table th:nth-child(7), .audit-table td:nth-child(7) { min-width: 0; white-space: normal; }
}

/* AUDIT-CONTROLLED-EXPORT-R1: 申请导出弹窗 */
.audit-modal-backdrop {
  position: fixed; inset: 0; z-index: 5600;
  background: rgba(13, 27, 23, 0.45);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 8vh 16px;
}
.audit-modal {
  width: min(560px, 94vw); max-height: 82vh; overflow: auto;
  background: var(--au-paper); border-radius: 10px; border: 1px solid var(--au-line);
  padding: 18px 20px; color: var(--au-ink);
}
.audit-modal header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.audit-modal header h2 { font-size: 17px; margin: 0; }
.audit-modal header button { border: none; background: none; font-size: 20px; cursor: pointer; }
.audit-modal label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--au-muted); margin-bottom: 10px; }
.audit-modal textarea { border: 1px solid var(--au-line); border-radius: 6px; padding: 8px; min-height: 64px; font-size: 13px; }
.audit-modal dl { display: grid; grid-template-columns: 60px 1fr; gap: 6px 10px; }
.audit-modal dd { margin: 0; word-break: break-all; }
.audit-modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.audit-modal-actions button { border: 1px solid var(--au-line); background: var(--au-paper); border-radius: 6px; padding: 7px 14px; cursor: pointer; }
.audit-modal-actions button.is-primary { background: var(--au-green); border-color: var(--au-green); color: #fff; }
.audit-export-result.is-ok { color: var(--au-green); }
.audit-export-result.is-error { color: var(--au-red); }

/* 587 R4: audit surface pairs; scope is the existing platform role root only. */
#meifanPlatformWorkspaceC2Root :is(.audit-page, .audit-modal-backdrop) {
  --au-ink: var(--r4-ui-ink);
  --au-muted: var(--r4-ui-muted);
  --au-line: var(--r4-ui-line);
  --au-paper: var(--r4-ui-panel);
  --au-green: var(--pa-r4-success);
  --au-green-bg: var(--pa-r4-success-bg);
  --au-red: var(--pa-r4-danger);
  --au-red-bg: var(--pa-r4-danger-bg);
  --au-amber-bg: var(--pa-r4-warning-bg);
  color: var(--r4-ui-ink);
}
#meifanPlatformWorkspaceC2Root :is(.audit-page, .audit-modal) :is(h2, h3, th, td, dd) { color: var(--r4-ui-ink); }
#meifanPlatformWorkspaceC2Root :is(.audit-header p, .audit-card > p.audit-muted, .audit-card h3 small, .audit-timeline p, .audit-timeline .audit-muted, .audit-cell-time small) { color: var(--r4-ui-muted); }
#meifanPlatformWorkspaceC2Root :is(.audit-state strong, .audit-timeline li b, .audit-timeline li strong) { color: var(--r4-ui-ink); }
#meifanPlatformWorkspaceC2Root :is(.audit-filters, .audit-table th, .audit-page code, .audit-state[data-audit-state="empty"], .audit-state[data-audit-state="forbidden"], .audit-badge.is-unknown) { color: var(--r4-ui-muted); background: var(--r4-ui-soft); border-color: var(--r4-ui-line); }
#meifanPlatformWorkspaceC2Root .audit-settings-filter { color: var(--r4-ui-ink); background: var(--r4-ui-soft); border-color: var(--r4-ui-line); }
#meifanPlatformWorkspaceC2Root .audit-settings-filter p { color: var(--r4-ui-muted); }
#meifanPlatformWorkspaceC2Root :is(.audit-page, .audit-modal) :is(input, select, textarea, option) { color: var(--r4-ui-ink); background: var(--r4-ui-soft); border-color: var(--r4-ui-line); }
#meifanPlatformWorkspaceC2Root :is(.audit-page, .audit-modal) :is(input, textarea)::placeholder { color: var(--r4-ui-muted); opacity: 1; }
#meifanPlatformWorkspaceC2Root :is(.audit-page, .audit-modal) button { color: var(--r4-ui-ink); }
#meifanPlatformWorkspaceC2Root .audit-table tbody tr:hover { background: var(--r4-ui-hover); }
#meifanPlatformWorkspaceC2Root :is(.audit-page, .audit-modal) button:hover:not(:disabled):not(.is-active):not(.is-current):not(.is-primary) { color: var(--r4-ui-ink); background: var(--r4-ui-hover); }
#meifanPlatformWorkspaceC2Root :is(.audit-tabs button.is-active, .audit-pager-btns button.is-current, .audit-header-actions button.is-primary, .audit-filters button.is-primary, .audit-modal-actions button.is-primary) { color: var(--r4-ui-selected-ink); background: var(--r4-ui-selected); border-color: var(--r4-ui-accent); box-shadow: inset 3px 0 0 var(--r4-ui-accent); font-weight: 800; }
#meifanPlatformWorkspaceC2Root .audit-tabs button.is-active :is(b, span) { color: var(--r4-ui-selected-ink); }
#meifanPlatformWorkspaceC2Root :is(.audit-page, .audit-modal) :is(button, input, select, textarea):disabled,
#meifanPlatformWorkspaceC2Root :is(.audit-export-disabled, .audit-disabled-actions button) { color: var(--r4-ui-muted); background: var(--r4-ui-soft); border: 1px dashed var(--r4-ui-line); opacity: 1; }
#meifanPlatformWorkspaceC2Root :is(.audit-page, .audit-modal) :is(button, input, select, textarea):focus-visible { outline: 2px solid var(--r4-ui-focus); outline-offset: 2px; }
#meifanPlatformWorkspaceC2Root :is(.audit-missing, .audit-note-bar) { color: var(--pa-r4-warning); background: var(--pa-r4-warning-bg); border-color: var(--pa-r4-warning); }
#meifanPlatformWorkspaceC2Root .audit-export-note { color: var(--pa-r4-warning); }
#meifanPlatformWorkspaceC2Root .audit-link { color: var(--r4-ui-accent); }
@media (prefers-reduced-motion: reduce) {
  #meifanPlatformWorkspaceC2Root .audit-spinner { animation: none; }
}
/* PLATFORM-ADMIN-CONSOLE-B2-BATCH1-20260802 · */
.platform-admin-b1-outlet.has-b2-content {
  display: block;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.platform-admin-b2-page {
  --b2-green: #0b513f;
  --b2-green-soft: #e8f1ed;
  --b2-gold: #b68838;
  --b2-orange: #da7a16;
  --b2-red: #b85147;
  --b2-line: #e7e4dc;
  color: #263631;
}

.platform-admin-b2-page button,
.platform-admin-b2-page input,
.platform-admin-b2-page select,
.platform-admin-b2-page textarea {
  font: inherit;
}

.platform-admin-b2-page button {
  appearance: none;
  border: 0;
  cursor: pointer;
}

.platform-admin-b2-page button:focus-visible,
.platform-admin-b2-page input:focus-visible,
.platform-admin-b2-page select:focus-visible,
.platform-admin-b2-page textarea:focus-visible {
  outline: 3px solid rgba(27, 115, 88, 0.23);
  outline-offset: 2px;
}

.platform-admin-b1-shell button:focus-visible {
  outline: 3px solid rgba(198, 173, 113, 0.52);
  outline-offset: 2px;
}

.platform-admin-b2-page button:disabled,
.platform-admin-b2-page [aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.58;
}

.platform-admin-b2-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.platform-admin-b2-page-tools {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin: -4px 0 18px;
}

.platform-admin-b2-page-tools button,
.platform-admin-b2-filters > button,
.platform-admin-b2-alert button {
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid #d8d7cf;
  border-radius: 5px;
  color: #40504b;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
}

.platform-admin-b2-page-tools button.is-primary,
.platform-admin-b2-filters > button:not(.is-quiet) {
  border-color: var(--b2-green);
  color: #fff;
  background: var(--b2-green);
}

.platform-admin-b2-alert {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  padding: 10px 14px;
  border: 1px solid #ead3aa;
  border-radius: 7px;
  color: #76551f;
  background: #fff8e9;
  font-size: 12px;
}

.platform-admin-b2-alert > div {
  display: grid;
  gap: 3px;
}

.platform-admin-b2-alert.is-error {
  border-color: #e7c8c4;
  color: #843e38;
  background: #fff3f1;
}

.platform-admin-b2-alert.is-success {
  border-color: #c5ded3;
  color: #205f4d;
  background: #eff8f4;
}

.platform-admin-b2-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.platform-admin-b2-metric {
  min-height: 126px;
  display: grid;
  align-content: space-between;
  gap: 8px;
  padding: 18px 19px 16px;
  border: 1px solid var(--b2-line);
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(36, 54, 47, 0.035);
}

.platform-admin-b2-metric > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #687670;
  font-size: 12px;
  font-weight: 700;
}

.platform-admin-b2-metric > div b {
  color: #8b9994;
  font-size: 20px;
  font-weight: 500;
}

.platform-admin-b2-metric strong {
  color: #1d2c28;
  font-size: clamp(27px, 3vw, 38px);
  font-weight: 700;
  line-height: 1;
}

.platform-admin-b2-metric small {
  color: #8b9590;
  font-size: 10px;
}

.platform-admin-b2-metric.is-pending strong,
.platform-admin-b2-metric.is-pending > div b {
  color: var(--b2-orange);
}

/* 今日模型调用卡失败态: 卡内直给重试按钮(失败要响, 下一步就在手边) */
.platform-admin-b2-metric button[data-platform-admin-b2-model-calls-retry] {
  justify-self: start;
  padding: 4px 12px;
  border: 1px solid var(--b2-line);
  border-radius: 5px;
  background: #fff;
  color: #1d2c28;
  font-size: 12px;
  cursor: pointer;
}
.platform-admin-b2-metric button[data-platform-admin-b2-model-calls-retry]:hover {
  border-color: #1d2c28;
}

.platform-admin-b2-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.75fr);
  gap: 16px;
  margin-top: 16px;
}

.platform-admin-b2-panel,
.platform-admin-b2-registration-list,
.platform-admin-b2-review {
  border: 1px solid var(--b2-line);
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(42, 57, 51, 0.035);
}

.platform-admin-b2-panel > header {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 18px;
  border-bottom: 1px solid var(--b2-line);
}

.platform-admin-b2-panel h2,
.platform-admin-b2-review h2 {
  margin: 0;
  color: #24342f;
  font-size: 15px;
}

.platform-admin-b2-panel header small {
  color: #909a96;
  font-size: 10px;
}

.platform-admin-b2-panel footer {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 0 18px;
  border-top: 1px solid var(--b2-line);
  color: #8b7552;
  background: #fffbf2;
  font-size: 10px;
}

.platform-admin-b2-panel-state {
  min-height: 180px;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #7b8782;
  font-size: 12px;
  text-align: center;
}

.platform-admin-b2-panel-state.is-error {
  color: #944d46;
}

.platform-admin-b2-panel-state.is-caution {
  color: #7a5a22;
  background: #fffaf0;
}

.platform-admin-b2-panel-state.is-count {
  min-height: 0;
  display: block;
  padding: 10px 16px;
  text-align: left;
}

.platform-admin-b2-panel-state button {
  margin-left: 8px;
  padding: 7px 12px;
  border: 1px solid #d6b7b3;
  border-radius: 4px;
  color: #8b413a;
  background: #fff;
}

.platform-admin-b2-table-scroll {
  min-width: 0;
  overflow-x: auto;
}

.platform-admin-b2-table {
  width: 100%;
  border-collapse: collapse;
  color: #4b5a55;
  font-size: 11px;
}

.platform-admin-b2-table th,
.platform-admin-b2-table td {
  padding: 13px 14px;
  border-bottom: 1px solid #eeeae2;
  text-align: left;
  vertical-align: middle;
}

.platform-admin-b2-table th {
  color: #78847f;
  background: #fbfaf7;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.platform-admin-b2-table td strong,
.platform-admin-b2-table td small {
  display: block;
}

.platform-admin-b2-table td strong {
  color: #2d3d38;
  font-size: 11px;
}

.platform-admin-b2-table td small {
  margin-top: 3px;
  color: #9a9284;
  font-size: 9px;
}

.platform-admin-b2-table tbody tr:last-child td {
  border-bottom: 0;
}

.platform-admin-b2-table tbody tr:hover,
.platform-admin-b2-table tbody tr.is-selected {
  background: #f7fbf9;
}

.platform-admin-b2-status {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.platform-admin-b2-status.is-pending {
  color: #93651e;
  background: #fff1d5;
}

.platform-admin-b2-status.is-active {
  color: #1b6a53;
  background: #e6f4ee;
}

.platform-admin-b2-link {
  padding: 4px 0;
  color: var(--b2-green);
  background: transparent;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.platform-admin-b2-panel.is-services ul {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.platform-admin-b2-service {
  min-height: 66px;
  display: grid;
  grid-template-columns: 11px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 9px;
  padding: 8px 15px;
  border-bottom: 1px solid #eeeae2;
  font-size: 10px;
}

.platform-admin-b2-service:last-child {
  border-bottom: 0;
}

.platform-admin-b2-service-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #9aa49f;
  box-shadow: 0 0 0 4px #eff1ef;
}

.platform-admin-b2-service.is-ready .platform-admin-b2-service-dot {
  background: #2c8a6c;
  box-shadow: 0 0 0 4px #e6f3ee;
}

.platform-admin-b2-service.is-error .platform-admin-b2-service-dot {
  background: #bb554a;
  box-shadow: 0 0 0 4px #f8e9e7;
}

.platform-admin-b2-service > div {
  display: grid;
  gap: 3px;
}

.platform-admin-b2-service > div strong {
  color: #30413b;
  font-size: 11px;
}

.platform-admin-b2-service > div small {
  color: #8a9691;
  font-size: 9px;
}

.platform-admin-b2-service > button,
.platform-admin-b2-service > span:last-child {
  padding: 5px 7px;
  border-radius: 4px;
  color: var(--b2-green);
  background: #edf5f1;
  font-size: 9px;
  font-weight: 800;
}

.platform-admin-b2-footnote {
  margin-top: 14px;
  padding: 12px 15px;
  border: 1px solid #eadcbf;
  border-radius: 6px;
  color: #826d49;
  background: #fffbf3;
  font-size: 10px;
}

.platform-admin-b2-registration-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 360px);
  align-items: start;
  gap: 16px;
}

.platform-admin-b2-tabs {
  min-height: 58px;
  display: flex;
  align-items: stretch;
  padding: 0 16px;
  border-bottom: 1px solid var(--b2-line);
}

.platform-admin-b2-tabs button {
  position: relative;
  min-width: 112px;
  padding: 0 18px;
  color: #71807a;
  background: transparent;
  font-size: 11px;
  font-weight: 700;
}

.platform-admin-b2-tabs button::after {
  content: "";
  position: absolute;
  inset: auto 16px 0;
  height: 3px;
  background: transparent;
}

.platform-admin-b2-tabs button.is-active {
  color: var(--b2-green);
}

.platform-admin-b2-tabs button.is-active::after {
  background: var(--b2-green);
}

.platform-admin-b2-tabs span {
  display: inline-grid;
  min-width: 22px;
  min-height: 20px;
  place-items: center;
  margin-left: 5px;
  border-radius: 10px;
  background: #eef1ef;
  font-size: 9px;
}

.platform-admin-b2-unavailable {
  margin: 0;
  padding: 8px 16px;
  border-bottom: 1px solid var(--b2-line);
  color: #8b7552;
  background: #fffbf2;
  font-size: 9px;
}

.platform-admin-b2-filters {
  display: grid;
  grid-template-columns: 150px minmax(190px, 1fr) auto auto;
  align-items: end;
  gap: 9px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--b2-line);
  background: #fbfaf7;
}

.platform-admin-b2-filters label {
  display: grid;
  gap: 5px;
  color: #7a8782;
  font-size: 9px;
}

.platform-admin-b2-filters select,
.platform-admin-b2-filters input {
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid #dad8d0;
  border-radius: 4px;
  color: #3f4e49;
  background: #fff;
  font-size: 10px;
}

.platform-admin-b2-registration-list > footer {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 16px;
  border-top: 1px solid var(--b2-line);
  color: #68756f;
  font-size: 10px;
}

.platform-admin-b2-registration-list > footer small {
  color: #918c80;
  font-size: 9px;
  text-align: right;
}

.platform-admin-b2-review {
  position: sticky;
  top: 18px;
  overflow: hidden;
}

.platform-admin-b2-review > header {
  min-height: 67px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 18px;
  border-bottom: 1px solid var(--b2-line);
}

.platform-admin-b2-review > header > div {
  display: grid;
  gap: 3px;
}

.platform-admin-b2-review > header small {
  color: #8a9691;
  font-size: 9px;
}

.platform-admin-b2-review > header button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #68756f;
  background: transparent;
  font-size: 20px;
}

.platform-admin-b2-review > section {
  display: grid;
  gap: 9px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--b2-line);
}

.platform-admin-b2-review h3 {
  margin: 0 0 2px;
  color: #586761;
  font-size: 10px;
}

.platform-admin-b2-detail-field {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 4px 10px;
  font-size: 10px;
}

.platform-admin-b2-detail-field > span {
  color: #88938f;
}

.platform-admin-b2-detail-field > strong {
  color: #394943;
  font-size: 10px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.platform-admin-b2-detail-field > small {
  grid-column: 2;
  color: #9a9284;
  font-size: 8px;
}

.platform-admin-b2-consent-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  text-align: left;
  font-size: 10px;
}
.platform-admin-b2-consent-table th,
.platform-admin-b2-consent-table td {
  padding: 7px 4px;
  border-bottom: 1px solid var(--b2-line);
  overflow-wrap: anywhere;
}
.platform-admin-b2-consent-table th { color: #586761; font-weight: 600; }
.platform-admin-b2-consent-table td small { display: block; color: #88938f; }

.platform-admin-b2-warning {
  margin: 3px 0 0;
  padding: 9px 10px;
  border-left: 3px solid #d99b35;
  color: #7c602f;
  background: #fff8e8;
  font-size: 9px;
  line-height: 1.65;
}

.platform-admin-b2-review textarea {
  resize: vertical;
  width: 100%;
  min-height: 64px;
  padding: 9px;
  border: 1px solid #ddd9d0;
  border-radius: 4px;
  color: #68756f;
  background: #f6f4ef;
  font-size: 9px;
  box-sizing: border-box;
}

.platform-admin-b2-review > footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  padding: 14px 18px;
}

.platform-admin-b2-review > footer button {
  min-height: 39px;
  border: 1px solid #d5d4cd;
  border-radius: 4px;
  color: #4a5954;
  background: #fff;
  font-size: 11px;
  font-weight: 800;
}

.platform-admin-b2-review > footer button.is-primary {
  border-color: var(--b2-green);
  color: #fff;
  background: var(--b2-green);
}

/* EN-2 餐饮开通申请：原位二次确认的说明行占满两列 */
.platform-admin-b2-review > footer > .platform-admin-b2-footnote {
  grid-column: 1 / -1;
  margin-top: 0;
}

/* EN-2 餐饮开通申请：列表容器允许收缩到栅格轨道宽，表格在自己的横滚容器里滚（现役两个页签没有这条，手机上列表会比视口宽出几十像素） */
.platform-admin-b2-registration-layout[data-platform-admin-b2-catering-addon] > .platform-admin-b2-registration-list {
  min-width: 0;
}

/* EN-2 餐饮开通申请：详情里的两行小字（计数、驳回原因说明）按主题的弱化色、11px，不再落回 16px 正文字号 */
#meifanPlatformWorkspaceC2Root .platform-admin-b2-review[data-platform-admin-b2-catering-detail] > section > small {
  color: var(--r4-ui-muted);
  font-size: 11px;
}

.platform-admin-b2-detail-empty {
  min-height: 320px;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #8b9691;
  font-size: 11px;
  text-align: center;
}

@media (max-width: 1180px) {
  .platform-admin-b2-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .platform-admin-b2-overview-grid,
  .platform-admin-b2-registration-layout {
    grid-template-columns: 1fr;
  }

  .platform-admin-b2-review {
    position: static;
  }
}

@media (max-width: 760px) {
  .platform-admin-b2-page-tools {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 0;
  }

  .platform-admin-b2-metrics {
    grid-template-columns: 1fr;
  }

  .platform-admin-b2-overview-grid {
    display: block;
  }

  .platform-admin-b2-panel + .platform-admin-b2-panel {
    margin-top: 14px;
  }

  .platform-admin-b2-filters {
    grid-template-columns: 1fr 1fr;
  }

  .platform-admin-b2-filters label.is-search {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .platform-admin-b2-tabs {
    overflow-x: auto;
    padding-inline: 5px;
  }

  .platform-admin-b2-tabs button {
    min-width: max-content;
  }

  .platform-admin-b2-review > section,
  .platform-admin-b2-review > header,
  .platform-admin-b2-review > footer {
    padding-inline: 14px;
  }

  .platform-admin-b2-detail-field {
    grid-template-columns: 1fr;
  }

  .platform-admin-b2-detail-field > small {
    grid-column: 1;
  }
}

/* 587 R4: platform overview/registration must pair text with the new workspace surface. */
#meifanPlatformWorkspaceC2Root .platform-admin-b2-page {
  --b2-green: var(--r4-ui-accent);
  --b2-green-soft: var(--r4-ui-soft);
  --b2-line: var(--r4-ui-line);
  --b2-orange: var(--pa-r4-warning);
  --b2-red: var(--pa-r4-danger);
  color: var(--r4-ui-ink);
}
#meifanPlatformWorkspaceC2Root :is(.platform-admin-b2-metric, .platform-admin-b2-panel, .platform-admin-b2-registration-list, .platform-admin-b2-review) { color: var(--r4-ui-ink); background: var(--r4-ui-panel); border-color: var(--r4-ui-line); }
#meifanPlatformWorkspaceC2Root :is(.platform-admin-b2-metric strong, .platform-admin-b2-panel h2, .platform-admin-b2-review h2, .platform-admin-b2-table td strong, .platform-admin-b2-service > div strong, .platform-admin-b2-detail-field strong) { color: var(--r4-ui-ink); }
#meifanPlatformWorkspaceC2Root :is(.platform-admin-b2-metric > div, .platform-admin-b2-metric > div b, .platform-admin-b2-metric small, .platform-admin-b2-panel header small, .platform-admin-b2-panel-state, .platform-admin-b2-table td small, .platform-admin-b2-service > div small, .platform-admin-b2-filters label, .platform-admin-b2-registration-list > footer, .platform-admin-b2-registration-list > footer small, .platform-admin-b2-review > header small, .platform-admin-b2-review h3, .platform-admin-b2-detail-field span, .platform-admin-b2-review > footer) { color: var(--r4-ui-muted); }
#meifanPlatformWorkspaceC2Root :is(.platform-admin-b2-table th, .platform-admin-b2-table td, .platform-admin-b2-service) { border-color: var(--r4-ui-line); }
#meifanPlatformWorkspaceC2Root .platform-admin-b2-table { color: var(--r4-ui-ink); font-size: 12px; }
#meifanPlatformWorkspaceC2Root .platform-admin-b2-table th { color: var(--r4-ui-muted); background: var(--r4-ui-soft); font-size: 11px; }
#meifanPlatformWorkspaceC2Root :is(.platform-admin-b2-metric small, .platform-admin-b2-table td small, .platform-admin-b2-service > div small, .platform-admin-b2-filters label, .platform-admin-b2-review > header small, .platform-admin-b2-registration-list > footer small) { font-size: 11px; }
#meifanPlatformWorkspaceC2Root :is(.platform-admin-b2-filters, .platform-admin-b2-tabs span) { color: var(--r4-ui-muted); background: var(--r4-ui-soft); }
#meifanPlatformWorkspaceC2Root :is(.platform-admin-b2-page-tools button, .platform-admin-b2-filters > button, .platform-admin-b2-alert button, .platform-admin-b2-panel-state button, .platform-admin-b2-metric button, .platform-admin-b2-review > header button, .platform-admin-b2-tabs button) { color: var(--r4-ui-ink); background: var(--r4-ui-soft); border-color: var(--r4-ui-line); }
#meifanPlatformWorkspaceC2Root .platform-admin-b2-page button:hover:not(:disabled):not(.is-active):not(.is-primary) { color: var(--r4-ui-ink); background: var(--r4-ui-hover); }
#meifanPlatformWorkspaceC2Root :is(.platform-admin-b2-page-tools button.is-primary, .platform-admin-b2-filters > button:not(.is-quiet), .platform-admin-b2-tabs button.is-active) { color: var(--r4-ui-selected-ink); background: var(--r4-ui-selected); border-color: var(--r4-ui-accent); }
#meifanPlatformWorkspaceC2Root .platform-admin-b2-tabs button.is-active::after { background: var(--r4-ui-accent); }
#meifanPlatformWorkspaceC2Root .platform-admin-b2-tabs button.is-active span { color: var(--r4-ui-selected-ink); background: transparent; }
#meifanPlatformWorkspaceC2Root .platform-admin-b2-table tbody tr:hover:not(.is-selected) { background: var(--r4-ui-hover); }
#meifanPlatformWorkspaceC2Root .platform-admin-b2-table tbody tr.is-selected { background: var(--r4-ui-selected); color: var(--r4-ui-selected-ink); box-shadow: inset 3px 0 0 var(--r4-ui-accent); }
#meifanPlatformWorkspaceC2Root .platform-admin-b2-table tbody tr.is-selected :is(strong, small, .platform-admin-b2-link) { color: var(--r4-ui-selected-ink); }
#meifanPlatformWorkspaceC2Root .platform-admin-b2-page :is(button, input, select, textarea):disabled,
#meifanPlatformWorkspaceC2Root .platform-admin-b2-page [aria-disabled="true"] { color: var(--r4-ui-muted); background: var(--r4-ui-soft); border: 1px dashed var(--r4-ui-line); opacity: 1; }
#meifanPlatformWorkspaceC2Root :is(.platform-admin-b2-alert, .platform-admin-b2-panel footer, .platform-admin-b2-panel-state.is-caution, .platform-admin-b2-footnote, .platform-admin-b2-unavailable) { color: var(--pa-r4-warning); background: var(--pa-r4-warning-bg); border-color: var(--pa-r4-warning); }
#meifanPlatformWorkspaceC2Root .platform-admin-b2-alert.is-error { color: var(--pa-r4-danger); background: var(--pa-r4-danger-bg); border-color: var(--pa-r4-danger); }
#meifanPlatformWorkspaceC2Root .platform-admin-b2-alert.is-success { color: var(--pa-r4-success); background: var(--pa-r4-success-bg); border-color: var(--pa-r4-success); }
#meifanPlatformWorkspaceC2Root .platform-admin-b2-alert :is(strong, small) { color: inherit; }
#meifanPlatformWorkspaceC2Root .platform-admin-b2-panel-state.is-error { color: var(--pa-r4-danger); }
#meifanPlatformWorkspaceC2Root .platform-admin-b2-metric.is-pending :is(strong, div b) { color: var(--pa-r4-warning); }
#meifanPlatformWorkspaceC2Root .platform-admin-b2-status.is-pending { color: var(--pa-r4-warning); background: var(--pa-r4-warning-bg); }
#meifanPlatformWorkspaceC2Root .platform-admin-b2-status.is-active { color: var(--pa-r4-success); background: var(--pa-r4-success-bg); }
#meifanPlatformWorkspaceC2Root .platform-admin-b2-service > :is(button, span:last-child) { color: var(--r4-ui-accent); background: var(--r4-ui-soft); }
#meifanPlatformWorkspaceC2Root :is(.platform-admin-b2-detail-field > small, .platform-admin-b2-detail-empty) { color: var(--r4-ui-muted); font-size: 11px; }
#meifanPlatformWorkspaceC2Root .platform-admin-b2-warning { color: var(--pa-r4-warning); background: var(--pa-r4-warning-bg); font-size: 11px; }
#meifanPlatformWorkspaceC2Root .platform-admin-b2-review > footer button { color: var(--r4-ui-ink); background: var(--r4-ui-soft); border-color: var(--r4-ui-line); }
#meifanPlatformWorkspaceC2Root .platform-admin-b2-review > footer button.is-primary:not(:disabled) { color: var(--r4-ui-selected-ink); background: var(--r4-ui-selected); border-color: var(--r4-ui-accent); }
/* PLATFORM-ADMIN-CONSOLE-B2-BATCH2-20260803 · */
.platform-admin-b2b2-page {
  display: grid;
  gap: 0;
  border: 1px solid #e4e3dc;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 10px 28px rgba(28, 54, 46, 0.06);
}

.platform-admin-b2b2-tabs {
  background: #fbfcfa;
}

.platform-admin-b2b2-tabs button {
  min-width: 150px;
}

.platform-admin-b2b2-tabs button span {
  min-width: auto;
  padding: 0 8px;
}

.platform-admin-b2b2-panel {
  display: grid;
}

.platform-admin-b2b2-scope-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 52px;
  padding: 10px 18px;
  border-bottom: 1px solid #eeeae0;
  color: #66766f;
  background: #fffaf0;
  font-size: 11px;
}

.platform-admin-b2b2-scope-note strong {
  flex: 0 0 auto;
  color: #755f34;
  font-size: 11px;
}

.platform-admin-b2b2-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(5, auto);
  align-items: end;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid #eceae3;
  background: #fbfaf7;
}

/* PA-03B: 公司列表与只读详情共用现有后台容器, 详情在宽屏右侧。 */
.platform-admin-b2b2-companies.is-detail-open {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 34%);
  gap: 14px;
  align-items: start;
}

.platform-admin-b2b2-companies > .platform-admin-b2-panel { min-width: 0; }

.platform-admin-b2b2-toolbar.is-company {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  padding: 0;
  border-bottom: none;
  background: none;
}

.platform-admin-b2b2-toolbar.is-company label {
  min-width: 132px;
}

.platform-admin-b2b2-toolbar.is-company select {
  width: 100%;
}

.platform-admin-b2b2-toolbar.is-company input { width: 100%; }

.platform-admin-b2b2-company-name {
  display: flex;
  align-items: center;
  gap: 9px;
}

.platform-admin-b2b2-company-name > span:last-child { min-width: 0; }
.platform-admin-b2b2-company-name small { display: block; }
.platform-admin-b2b2-company-logo {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  object-fit: contain;
  border-radius: 7px;
}
.platform-admin-b2b2-company-logo.is-empty {
  display: grid;
  place-items: center;
  background: var(--r4-ui-soft, #edf2ef);
}

.platform-admin-b2b2-company-detail { min-width: 0; }
.platform-admin-b2b2-company-facts,
.platform-admin-b2b2-company-entitlements dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 18px;
}
.platform-admin-b2b2-company-facts div,
.platform-admin-b2b2-company-entitlements dl div { min-width: 0; }
.platform-admin-b2b2-company-facts dt,
.platform-admin-b2b2-company-entitlements dt { color: var(--r4-ui-muted, #697972); font-size: 11px; }
.platform-admin-b2b2-company-facts dd,
.platform-admin-b2b2-company-entitlements dd { margin: 5px 0 0; overflow-wrap: anywhere; font-weight: 700; }
.platform-admin-b2b2-company-entitlements,
.platform-admin-b2b2-company-members { border-top: 1px solid var(--r4-ui-line, #e4e3dc); }
.platform-admin-b2b2-company-entitlements h3,
.platform-admin-b2b2-company-members h3 { margin: 0; padding: 16px 18px 0; font-size: 14px; }
.platform-admin-b2b2-company-entitlements > small { display: block; padding: 0 18px 16px; color: var(--r4-ui-muted, #697972); }

@media (max-width: 980px) {
  .platform-admin-b2b2-companies.is-detail-open { grid-template-columns: minmax(0, 1fr); }
  .platform-admin-b2b2-company-facts,
  .platform-admin-b2b2-company-entitlements dl { grid-template-columns: minmax(0, 1fr); }
}

.platform-admin-b2b2-toolbar label {
  display: grid;
  gap: 6px;
  color: #697972;
  font-size: 10px;
  font-weight: 700;
}

.platform-admin-b2b2-toolbar input {
  min-width: 0;
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid #d9d9d2;
  border-radius: 6px;
  color: #253831;
  background: #fff;
}

/* 553-P2-B1(#18/#19): 筛选下拉与输入同款刻度; 禁用态=fail-closed(无真源维度不假过滤) */
.platform-admin-b2b2-toolbar select {
  min-width: 120px;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid #d9d9d2;
  border-radius: 6px;
  color: #253831;
  background: #fff;
  font-size: 11px;
  font-weight: 700;
}

.platform-admin-b2b2-toolbar select:disabled {
  color: #8b9691;
  background: #f1f3f1;
  border-style: dashed;
  cursor: not-allowed;
}

.platform-admin-b2b2-filter-note {
  padding: 8px 18px;
  border-bottom: 1px solid #eceae3;
  color: #66766f;
  background: #f4f7f2;
  font-size: 10px;
}

.platform-admin-b2b2-toolbar button,
.platform-admin-b2b2-panel-state button {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid #d6d7d1;
  border-radius: 6px;
  color: #43534d;
  background: #fff;
  font-size: 11px;
  font-weight: 800;
}

.platform-admin-b2b2-toolbar button.is-primary {
  border-color: var(--b2-green);
  color: #fff;
  background: var(--b2-green);
}

.platform-admin-b2b2-query-error {
  padding: 9px 18px;
  border-bottom: 1px solid #ebd1cd;
  color: #934c44;
  background: #fff5f3;
  font-size: 11px;
  font-weight: 700;
}

.platform-admin-b2b2-directory {
  min-width: 0;
}

.platform-admin-b2b2-directory > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px 13px;
}

.platform-admin-b2b2-directory > header > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.platform-admin-b2b2-directory > header small {
  color: #74827d;
  font-size: 10px;
}

.platform-admin-b2b2-directory > header strong {
  color: #163f33;
  font-size: 20px;
}

.platform-admin-b2b2-directory > header p {
  margin: 0;
  color: #7a8782;
  font-size: 10px;
}

.platform-admin-b2b2-table-wrap {
  min-width: 0;
  overflow-x: auto;
  border-top: 1px solid #eeece6;
  border-bottom: 1px solid #eeece6;
}

.platform-admin-b2b2-table-wrap table {
  width: 100%;
  min-width: 1040px;
  border-collapse: collapse;
  table-layout: fixed;
}

.platform-admin-b2b2-table-wrap th {
  padding: 11px 14px;
  color: #6e7d77;
  background: #f7f8f6;
  font-size: 9px;
  font-weight: 800;
  text-align: left;
}

/* 定稿03: 8 列(账号/脱敏手机/平台身份/当前公司·职位/状态/注册时间/最近登录/操作) */
.platform-admin-b2b2-table-wrap th:nth-child(1) { width: 21%; }
.platform-admin-b2b2-table-wrap th:nth-child(2) { width: 10%; }
.platform-admin-b2b2-table-wrap th:nth-child(3) { width: 13%; }
.platform-admin-b2b2-table-wrap th:nth-child(4) { width: 18%; }
.platform-admin-b2b2-table-wrap th:nth-child(5) { width: 9%; }
.platform-admin-b2b2-table-wrap th:nth-child(6) { width: 11%; }
.platform-admin-b2b2-table-wrap th:nth-child(7) { width: 11%; }
.platform-admin-b2b2-table-wrap th:nth-child(8) { width: 7%; }

.platform-admin-b2b2-table-wrap td {
  padding: 14px;
  border-top: 1px solid #f0eee8;
  color: #40504a;
  font-size: 11px;
  vertical-align: middle;
}

.platform-admin-b2b2-identity {
  display: flex;
  align-items: center;
  gap: 9px;
}

/* 头像=首字母诚实兜底(个人头像上传归已登记的统一资料包, 这里不装已完成) */
.platform-admin-b2b2-avatar {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #e8efe9;
  color: #2f4a40;
  font-size: 12px;
  font-weight: 700;
}

.platform-admin-b2b2-identity-text {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.platform-admin-b2b2-identity-text strong {
  color: #243a33;
  font-size: 12px;
}

.platform-admin-b2b2-identity-text small {
  color: #88938f;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 9px;
}

/* 单项读失败/多公司歧义: 显式异常字, ❌ 不空着装正常 */
.platform-admin-b2b2-cell-error {
  color: #b4544a;
  font-weight: 600;
}

td .platform-admin-b2b2-cell-error + small,
.platform-admin-b2b2-table-wrap td strong + small {
  display: block;
  margin-top: 3px;
  color: #88938f;
  font-size: 9px;
}

.platform-admin-b2b2-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.platform-admin-b2b2-roles span,
.platform-admin-b2b2-status,
.platform-admin-b2b2-readonly {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 12px;
  font-size: 9px;
  font-weight: 800;
}

.platform-admin-b2b2-roles span {
  color: #23644f;
  background: #e7f2ed;
}

/* 553-P2-B1(#18附带): 身份徽标三色编码(定稿 绿/蓝/橙) —— 真源=active_platform_roles 白名单三值 */
.platform-admin-b2b2-roles span.is-role-platform_manager {
  color: #23644f;
  background: #e7f2ed;
}

.platform-admin-b2b2-roles span.is-role-business_admin {
  color: #24557a;
  background: #e6eff6;
}

.platform-admin-b2b2-roles span.is-role-super_admin {
  color: #8a5a1e;
  background: #f7ecdd;
}

.platform-admin-b2b2-status.is-active {
  color: #23644f;
  background: #e8f2ed;
}

.platform-admin-b2b2-status.is-neutral {
  color: #765f42;
  background: #f3eee4;
}

.platform-admin-b2b2-readonly {
  color: #68766f;
  background: #f1f3f1;
}

.platform-admin-b2b2-muted {
  color: #8b9691;
  font-size: 10px;
}

.platform-admin-b2b2-directory > footer {
  padding: 11px 18px 14px;
  color: #7e8a85;
  font-size: 10px;
}

.platform-admin-b2b2-page .platform-admin-b2-panel-state {
  min-height: 148px;
  display: grid;
  place-content: center;
  gap: 8px;
  padding: 26px;
  text-align: center;
}

.platform-admin-b2b2-page .platform-admin-b2-panel-state button {
  justify-self: center;
  margin-top: 4px;
}

.platform-admin-b2b2-company-unavailable {
  min-height: 360px;
  display: grid;
  grid-template-columns: 86px minmax(0, 560px);
  place-content: center;
  align-items: start;
  gap: 24px;
  padding: 48px;
  background: linear-gradient(145deg, #fbfcfa, #f4f2ea);
}

.platform-admin-b2b2-company-unavailable > span {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border: 1px solid #cddbd5;
  border-radius: 18px;
  color: #0b513f;
  background: #e8f1ed;
  font-size: 16px;
  font-weight: 900;
}

.platform-admin-b2b2-company-unavailable > div {
  display: grid;
  gap: 10px;
}

.platform-admin-b2b2-company-unavailable small {
  color: #8b744b;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.platform-admin-b2b2-company-unavailable h2 {
  margin: 0;
  color: #253b34;
  font-size: 22px;
}

.platform-admin-b2b2-company-unavailable p {
  max-width: 620px;
  margin: 0;
  color: #68766f;
  font-size: 12px;
  line-height: 1.8;
}

.platform-admin-b2b2-company-unavailable strong {
  color: #8a5d24;
  font-size: 11px;
}

@media (max-width: 880px) {
  .platform-admin-b2b2-toolbar {
    grid-template-columns: minmax(210px, 1fr) repeat(5, auto);
  }

  .platform-admin-b2b2-scope-note {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }
}

@media (max-width: 680px) {
  .platform-admin-b2b2-tabs button {
    min-width: 50%;
    padding: 0 8px;
  }

  .platform-admin-b2b2-toolbar {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .platform-admin-b2b2-toolbar label {
    grid-column: 1 / -1;
  }

  .platform-admin-b2b2-directory > header {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .platform-admin-b2b2-company-unavailable {
    min-height: 330px;
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 34px 24px;
  }
}

/* 587 R4: directory has explicit light pins, so pair them within the role root. */
#meifanPlatformWorkspaceC2Root .platform-admin-b2b2-page { color: var(--r4-ui-ink); background: var(--r4-ui-panel); border-color: var(--r4-ui-line); }
#meifanPlatformWorkspaceC2Root :is(.platform-admin-b2b2-tabs, .platform-admin-b2b2-toolbar, .platform-admin-b2b2-filter-note, .platform-admin-b2b2-table-wrap th, .platform-admin-b2b2-avatar, .platform-admin-b2b2-readonly) { color: var(--r4-ui-muted); background: var(--r4-ui-soft); border-color: var(--r4-ui-line); }
#meifanPlatformWorkspaceC2Root .platform-admin-b2b2-toolbar.is-company { background: none; }
#meifanPlatformWorkspaceC2Root :is(.platform-admin-b2b2-directory > header strong, .platform-admin-b2b2-identity-text strong, .platform-admin-b2b2-table-wrap td) { color: var(--r4-ui-ink); }
#meifanPlatformWorkspaceC2Root :is(.platform-admin-b2b2-toolbar label, .platform-admin-b2b2-directory > header small, .platform-admin-b2b2-directory > header p, .platform-admin-b2b2-identity-text small, .platform-admin-b2b2-table-wrap td strong + small, .platform-admin-b2b2-muted, .platform-admin-b2b2-directory > footer) { color: var(--r4-ui-muted); font-size: 11px; }
#meifanPlatformWorkspaceC2Root :is(.platform-admin-b2b2-table-wrap, .platform-admin-b2b2-table-wrap td) { border-color: var(--r4-ui-line); }
#meifanPlatformWorkspaceC2Root .platform-admin-b2b2-table-wrap th { font-size: 11px; }
#meifanPlatformWorkspaceC2Root .platform-admin-b2b2-table-wrap td { font-size: 12px; }
#meifanPlatformWorkspaceC2Root :is(.platform-admin-b2b2-toolbar button, .platform-admin-b2b2-panel-state button) { color: var(--r4-ui-ink); background: var(--r4-ui-soft); border-color: var(--r4-ui-line); }
#meifanPlatformWorkspaceC2Root .platform-admin-b2b2-toolbar button.is-primary { color: var(--r4-ui-selected-ink); background: var(--r4-ui-selected); border-color: var(--r4-ui-accent); }
#meifanPlatformWorkspaceC2Root :is(.platform-admin-b2b2-scope-note, .platform-admin-b2b2-company-unavailable) { color: var(--pa-r4-warning); background: var(--pa-r4-warning-bg); border-color: var(--r4-ui-line); }
#meifanPlatformWorkspaceC2Root .platform-admin-b2b2-scope-note strong { color: inherit; }
#meifanPlatformWorkspaceC2Root .platform-admin-b2b2-query-error { color: var(--pa-r4-danger); background: var(--pa-r4-danger-bg); border-color: var(--pa-r4-danger); }
#meifanPlatformWorkspaceC2Root .platform-admin-b2b2-cell-error { color: var(--pa-r4-danger); }
/* Role badges intentionally retain their established distinct green/blue/orange pairs. */
#meifanPlatformWorkspaceC2Root .platform-admin-b2b2-company-unavailable :is(span, small, h2, p, strong) { color: inherit; }
#meifanPlatformWorkspaceC2Root .platform-admin-b2b2-company-unavailable > span { background: var(--pa-r4-warning-bg); border-color: var(--pa-r4-warning); }
/* R5 USER-LIST and PA-03. Colors inherit the platform shell's day/night tokens. */
#meifanPlatformWorkspaceC2Root .pa-unified-page {
  display: grid;
  gap: 14px;
  min-width: 0;
  color: var(--r4-ui-ink);
}
#meifanPlatformWorkspaceC2Root .pa-unified-page > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
#meifanPlatformWorkspaceC2Root .pa-unified-page h2,
#meifanPlatformWorkspaceC2Root .pa-unified-page h3 { margin: 0; color: var(--r4-ui-ink); }
#meifanPlatformWorkspaceC2Root .pa-unified-page p { margin: 4px 0 0; color: var(--r4-ui-muted); }
#meifanPlatformWorkspaceC2Root .pa-unified-page button,
#meifanPlatformWorkspaceC2Root .pa-unified-page input,
#meifanPlatformWorkspaceC2Root .pa-unified-page select {
  min-height: 36px;
  border: 1px solid var(--r4-ui-line);
  border-radius: 8px;
  color: var(--r4-ui-ink);
  background: var(--r4-ui-panel);
  font: inherit;
}
#meifanPlatformWorkspaceC2Root .pa-unified-page button { padding: 6px 12px; cursor: pointer; }
#meifanPlatformWorkspaceC2Root .pa-unified-page button:hover:not(:disabled) { background: var(--r4-ui-hover); }
#meifanPlatformWorkspaceC2Root .pa-unified-page button:disabled { opacity: .45; cursor: not-allowed; }
#meifanPlatformWorkspaceC2Root .pa-unified-page :is(button, input, select):focus-visible { outline: 2px solid var(--r4-ui-focus); outline-offset: 2px; }
#meifanPlatformWorkspaceC2Root .pa-unified-tabs,
#meifanPlatformWorkspaceC2Root .pa-unified-detail-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
#meifanPlatformWorkspaceC2Root .pa-unified-page .is-active { color: var(--r4-ui-selected-ink); background: var(--r4-ui-selected); border-color: var(--r4-ui-accent); }
#meifanPlatformWorkspaceC2Root .pa-unified-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
#meifanPlatformWorkspaceC2Root .pa-unified-summary > div,
#meifanPlatformWorkspaceC2Root .pa-unified-filter,
#meifanPlatformWorkspaceC2Root .pa-unified-table,
#meifanPlatformWorkspaceC2Root .pa-unified-person,
#meifanPlatformWorkspaceC2Root .pa-unified-card,
#meifanPlatformWorkspaceC2Root .pa-unified-workspace,
#meifanPlatformWorkspaceC2Root .pa-unified-security {
  min-width: 0;
  border: 1px solid var(--r4-ui-line);
  border-radius: 11px;
  color: var(--r4-ui-ink);
  background: var(--r4-ui-panel);
}
#meifanPlatformWorkspaceC2Root .pa-unified-summary > div { display: grid; gap: 4px; padding: 14px 18px; }
#meifanPlatformWorkspaceC2Root .pa-unified-summary small,
#meifanPlatformWorkspaceC2Root .pa-unified-page dt,
#meifanPlatformWorkspaceC2Root .pa-unified-workspace > small { color: var(--r4-ui-muted); }
#meifanPlatformWorkspaceC2Root .pa-unified-summary strong { font-size: 24px; line-height: 1.2; }
#meifanPlatformWorkspaceC2Root .pa-unified-filter { display: grid; gap: 14px; padding: 16px 18px; }
#meifanPlatformWorkspaceC2Root .pa-unified-workspaces { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
#meifanPlatformWorkspaceC2Root .pa-unified-workspaces strong { margin-right: 12px; }
#meifanPlatformWorkspaceC2Root .pa-unified-fields { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
#meifanPlatformWorkspaceC2Root .pa-unified-fields label { display: grid; gap: 5px; flex: 1 1 145px; min-width: 0; font-size: 12px; }
#meifanPlatformWorkspaceC2Root .pa-unified-fields label:last-of-type { flex: 1.4 1 200px; }
#meifanPlatformWorkspaceC2Root .pa-unified-fields :is(input, select) { width: 100%; padding: 0 10px; }
#meifanPlatformWorkspaceC2Root .pa-unified-table { overflow-x: auto; }
#meifanPlatformWorkspaceC2Root .pa-unified-table table { width: 100%; min-width: 850px; border-collapse: collapse; }
#meifanPlatformWorkspaceC2Root .pa-unified-table :is(th, td) { padding: 12px 14px; border-bottom: 1px solid var(--r4-ui-line); text-align: left; vertical-align: middle; }
#meifanPlatformWorkspaceC2Root .pa-unified-table th { color: var(--r4-ui-muted); font-size: 12px; white-space: nowrap; }
#meifanPlatformWorkspaceC2Root .pa-unified-table td { font-size: 13px; }
#meifanPlatformWorkspaceC2Root .pa-unified-table td:first-child { display: flex; align-items: center; gap: 10px; }
#meifanPlatformWorkspaceC2Root .pa-unified-table td:first-child > span:last-child { display: grid; gap: 3px; }
#meifanPlatformWorkspaceC2Root .pa-unified-table td small { color: var(--r4-ui-muted); }
#meifanPlatformWorkspaceC2Root .pa-unified-avatar { display: inline-grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%; color: var(--r4-ui-selected-ink); background: var(--r4-ui-selected); }
#meifanPlatformWorkspaceC2Root .pa-unified-page > footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
#meifanPlatformWorkspaceC2Root .pa-unified-page > footer > div { display: flex; align-items: center; gap: 8px; }
#meifanPlatformWorkspaceC2Root .pa-unified-note { padding: 12px 16px; border: 1px solid var(--r4-ui-line); border-radius: 8px; background: var(--r4-ui-soft); }
#meifanPlatformWorkspaceC2Root .pa-unified-person { display: flex; align-items: center; gap: 14px; padding: 16px 18px; flex-wrap: wrap; }
#meifanPlatformWorkspaceC2Root .pa-unified-person > div { display: grid; gap: 4px; }
#meifanPlatformWorkspaceC2Root .pa-unified-person > div small { color: var(--r4-ui-muted); }
#meifanPlatformWorkspaceC2Root .pa-unified-person dl { display: flex; flex-wrap: wrap; gap: 12px 24px; margin: 0 0 0 auto; }
#meifanPlatformWorkspaceC2Root .pa-unified-person dl > div { display: grid; gap: 4px; }
#meifanPlatformWorkspaceC2Root .pa-unified-person dd { margin: 0; }
#meifanPlatformWorkspaceC2Root .pa-unified-workspace-list { display: grid; gap: 12px; }
#meifanPlatformWorkspaceC2Root .pa-unified-workspace-list > p { margin-top: -8px; }
#meifanPlatformWorkspaceC2Root .pa-unified-workspace { padding: 16px 18px; }
#meifanPlatformWorkspaceC2Root .pa-unified-workspace > header { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
#meifanPlatformWorkspaceC2Root .pa-unified-workspace > header > span { padding: 4px 9px; border: 1px solid var(--r4-ui-line); border-radius: 12px; white-space: nowrap; }
#meifanPlatformWorkspaceC2Root .pa-unified-workspace > header > span.is-open { border-color: var(--r4-ui-accent); color: var(--r4-ui-accent); }
#meifanPlatformWorkspaceC2Root .pa-unified-workspace dl,
#meifanPlatformWorkspaceC2Root .pa-unified-card dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 16px 0 8px; }
#meifanPlatformWorkspaceC2Root .pa-unified-workspace dl > div,
#meifanPlatformWorkspaceC2Root .pa-unified-card dl > div { display: grid; align-content: start; gap: 6px; }
#meifanPlatformWorkspaceC2Root .pa-unified-workspace dd,
#meifanPlatformWorkspaceC2Root .pa-unified-card dd { margin: 0; overflow-wrap: anywhere; }
#meifanPlatformWorkspaceC2Root .pa-unified-workspace-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 6px; }
#meifanPlatformWorkspaceC2Root .pa-unified-relations { margin-top: 14px; overflow-x: auto; }
#meifanPlatformWorkspaceC2Root .pa-unified-relations h4 { margin: 0 0 8px; }
#meifanPlatformWorkspaceC2Root .pa-unified-relation-head,
#meifanPlatformWorkspaceC2Root .pa-unified-relation { display: grid; grid-template-columns: minmax(140px, 2fr) repeat(3, minmax(72px, 1fr)) minmax(150px, 2fr); gap: 8px; min-width: 620px; padding: 8px 0; border-bottom: 1px solid var(--r4-ui-line); }
#meifanPlatformWorkspaceC2Root .pa-unified-relation-head { color: var(--r4-ui-muted); font-size: 12px; }
#meifanPlatformWorkspaceC2Root .pa-unified-records { min-width: 0; padding: 16px 18px; border: 1px solid var(--r4-ui-line); border-radius: 11px; background: var(--r4-ui-panel); }
#meifanPlatformWorkspaceC2Root .pa-unified-records header { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
#meifanPlatformWorkspaceC2Root .pa-unified-records-scroll { overflow-x: auto; margin-top: 12px; }
#meifanPlatformWorkspaceC2Root .pa-unified-records table { width: 100%; min-width: 720px; border-collapse: collapse; }
#meifanPlatformWorkspaceC2Root .pa-unified-records :is(th,td) { padding: 9px 11px; border-bottom: 1px solid var(--r4-ui-line); text-align: left; }
#meifanPlatformWorkspaceC2Root .pa-unified-records th { color: var(--r4-ui-muted); font-size: 12px; }
#meifanPlatformWorkspaceC2Root .pa-unified-records footer { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
#meifanPlatformWorkspaceC2Root .pa-unified-card,
#meifanPlatformWorkspaceC2Root .pa-unified-security { padding: 18px; }
#meifanPlatformWorkspaceC2Root .pa-unified-security .platform-admin-b2b2-detail { margin-top: 14px; }
#meifanPlatformWorkspaceC2Root .pa-unified-security .platform-admin-b2b2-detail > header,
#meifanPlatformWorkspaceC2Root .pa-unified-security .platform-admin-b2b2-detail > dl { display: none; }
@media (max-width: 850px) {
  #meifanPlatformWorkspaceC2Root .pa-unified-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #meifanPlatformWorkspaceC2Root .pa-unified-person dl { margin-left: 0; width: 100%; }
  #meifanPlatformWorkspaceC2Root .pa-unified-workspace dl,
  #meifanPlatformWorkspaceC2Root .pa-unified-card dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  #meifanPlatformWorkspaceC2Root .pa-unified-summary { gap: 5px; }
  #meifanPlatformWorkspaceC2Root .pa-unified-summary > div { padding: 10px 7px; }
  #meifanPlatformWorkspaceC2Root .pa-unified-summary strong { font-size: 18px; }
  #meifanPlatformWorkspaceC2Root .pa-unified-workspace dl,
  #meifanPlatformWorkspaceC2Root .pa-unified-card dl { grid-template-columns: 1fr; }
  #meifanPlatformWorkspaceC2Root .pa-unified-page > header { align-items: start; }
}
/* SECURITY-AUDIT-UI-BATCH2 · 安全与等保审计四页样式(挂载于 B1 壳层 security 表面) */
.platform-admin-b1-outlet .sec-page,
.platform-admin-b1-outlet .sec-modal-backdrop {
  --sec-ink: #1d2d29;
  --sec-muted: #5f6864;
  --sec-line: #e6e2d8;
  --sec-paper: #fffefa;
  --sec-green: #0a4938;
  --sec-green-bg: #dfece6;
  --sec-red: #b3261e;
  --sec-red-bg: #fdeceb;
  --sec-amber-bg: #fdf3e3;
  color: var(--sec-ink);
  font-size: 14px;
  line-height: 1.6;
}
.sec-page h2 { margin: 0; font-size: 20px; }
.sec-page h3 { margin: 0 0 10px; font-size: 14px; }
.sec-page h4 { margin: 8px 0 4px; font-size: 13px; color: var(--sec-muted); }
.sec-page code { font-family: Consolas, monospace; background: #f1efe8; padding: 0 5px; border-radius: 4px; }
.sec-page dl { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 6px 12px; margin: 0; }
.sec-page dt { color: var(--sec-muted); }
.sec-page dd { margin: 0; word-break: break-all; }
.sec-muted { color: var(--sec-muted); font-size: 12px; }
.sec-meta { color: var(--sec-muted); font-size: 12px; margin: 0 0 10px; }

.sec-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; }
.sec-header p { margin: 2px 0 0; color: var(--sec-muted); font-size: 13px; }
.sec-header-actions { display: flex; gap: 8px; flex-shrink: 0; }
.sec-header-actions button,
.sec-page .sec-tabs button,
.sec-page .sec-pager button,
.sec-page .sec-filters button {
  border: 1px solid var(--sec-line);
  background: var(--sec-paper);
  color: var(--sec-ink);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
}
.sec-header-actions button.is-primary,
.sec-page .sec-filters button.is-primary { background: var(--sec-green); border-color: var(--sec-green); color: #fff; }
.sec-header-actions .sec-export-disabled { cursor: not-allowed; opacity: 0.62; border-style: dashed; }
.sec-export-note { font-size: 11px; color: #a35c00; margin-left: 6px; }

.sec-tabs { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.sec-tabs button.is-active { background: var(--sec-green-bg); border-color: var(--sec-green); }

.sec-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; border: 1px solid var(--sec-line); border-radius: 8px; padding: 10px; margin-bottom: 12px; background: #fbfaf6; }
.sec-filters label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--sec-muted); }
.sec-filters input, .sec-filters select { border: 1px solid var(--sec-line); border-radius: 6px; padding: 5px 8px; min-width: 120px; background: #fff; font-size: 13px; color: var(--sec-ink); }

.sec-card { border: 1px solid var(--sec-line); border-radius: 8px; padding: 12px; background: var(--sec-paper); }
.sec-card h3 small { color: var(--sec-muted); font-weight: normal; font-size: 12px; margin-left: 6px; }
.sec-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-bottom: 12px; }
.sec-metric h4 { margin: 0 0 4px; font-size: 13px; }
.sec-metric-value { font-size: 22px; font-weight: 700; margin: 0; color: var(--sec-green); }
.sec-metric small { color: var(--sec-muted); }
.sec-metric.is-unavailable .sec-metric-value { color: var(--sec-muted); }
.sec-overview-grid, .sec-detail-grid, .sec-integrity-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; align-items: start; margin-bottom: 12px; }
.sec-main-col, .sec-detail-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.sec-side-col, .sec-detail-side { display: flex; flex-direction: column; gap: 12px; }
.sec-integrity-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

.sec-table-wrap { overflow-x: auto; border: 1px solid var(--sec-line); border-radius: 8px; background: var(--sec-paper); }
.sec-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sec-table th, .sec-table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--sec-line); vertical-align: top; }
/* 553-P2-B1(#31/#32): 表头文字色显式锁定 —— 平台后台页 body 常驻 home-mode, 01_base 的
   th{color:var(--muted)} 在 tech-glass-blue 变量下是 rgba(198,224,235,.68) 近白,
   压在本 fragment 浅色表头底上整行不可读(实测最暗像素≈215); day 用深色字。 */
.sec-table th { background: #f3f1ea; font-weight: 600; white-space: nowrap; }
.platform-admin-b1-outlet .sec-table th { color: #1d2d29; background: #f3f1ea; }
html[data-meifan-theme="day"] .platform-admin-b1-outlet .sec-table th { color: #1d2d29; background: #f3f1ea; }
/* night(tech-glass-blue) 同型成套覆盖(参照 css/64 写法; 锚点类名非数字开头, 无死选择器) */
html[data-meifan-theme="tech-glass-blue"] .platform-admin-b1-outlet .sec-table th {
  color: #1d2d29; background: #f3f1ea; border-bottom-color: #e6e2d8;
}
html[data-meifan-theme="tech-glass-blue"] .platform-admin-b1-outlet .sec-filters :is(input, select) {
  color: #1d2d29; background: #fff; border-color: #e6e2d8;
}
html[data-meifan-theme="tech-glass-blue"] .platform-admin-b1-outlet .sec-filters option { color: #1d2d29; background: #fff; }
.sec-table tr:last-child td { border-bottom: none; }
.sec-cell-time time { display: block; font-variant-numeric: tabular-nums; }
.sec-cell-time small { color: var(--sec-muted); font-size: 11px; display: block; }
/* 553-P2-B1(#31): 来源列「账号审计链」等短文本不竖排折行 */
.sec-cell-source { white-space: nowrap; }
/* 553-P2-B1(#32): 事件列=中文动词主文案 + 「·」类别分隔; 全部页签计数 */
.sec-action-label { font-weight: 600; }
.sec-action-module { display: inline-block; margin-left: 4px; }
.sec-tab-count { font-weight: 400; font-variant-numeric: tabular-nums; }
/* 553-P2-B1(#33): 详情页顶部风险等级/处置状态醒目标识条(真源=risk/disposal.status) */
.sec-detail-flags {
  display: flex; gap: 18px; flex-wrap: wrap; align-items: center;
  padding: 10px 12px; margin-bottom: 12px;
  border: 1px solid var(--sec-line); border-radius: 8px; background: var(--sec-paper);
}
.sec-detail-flag { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
.sec-detail-flag small { color: var(--sec-muted); font-size: 12px; }

.sec-badge { display: inline-block; padding: 1px 7px; border-radius: 10px; font-size: 12px; white-space: nowrap; }
.sec-badge.is-high, .sec-badge.is-error { background: var(--sec-red-bg); color: var(--sec-red); }
.sec-badge.is-low, .sec-badge.is-ok { background: var(--sec-green-bg); color: var(--sec-green); }
.sec-badge.is-unknown { background: #efede6; color: var(--sec-muted); }
.sec-badge.is-warn { background: var(--sec-amber-bg); color: #8a5a00; }

.sec-missing { font-style: normal; color: #a35c00; background: var(--sec-amber-bg); border: 1px dashed #d9b36a; padding: 0 5px; border-radius: 4px; font-size: 12px; white-space: nowrap; }
.sec-link { border: none; background: none; color: var(--sec-green); cursor: pointer; font-size: 13px; text-decoration: underline; padding: 0; }
.sec-redline { color: var(--sec-red); font-size: 12px; }

.sec-state { padding: 48px 20px; text-align: center; color: var(--sec-muted); }
.sec-state strong { display: block; font-size: 16px; color: var(--sec-ink); margin-bottom: 6px; }
.sec-state button { margin-top: 12px; border: 1px solid var(--sec-line); background: var(--sec-paper); border-radius: 6px; padding: 6px 14px; cursor: pointer; }
.sec-state[data-sec-state="failed"] { background: var(--sec-red-bg); border: 1px solid #ecc7c4; border-radius: 8px; }
.sec-state[data-sec-state="forbidden"] { background: #f4f1ea; border: 1px solid var(--sec-line); border-radius: 8px; }
.sec-state[data-sec-state="empty"] { background: #faf8f2; border: 1px dashed var(--sec-line); border-radius: 8px; }
.sec-state-inline { background: #faf8f2; border: 1px dashed var(--sec-line); border-radius: 8px; padding: 14px; color: var(--sec-muted); }
.sec-disposal-error { background: var(--sec-red-bg); border: 1px solid #ecc7c4; border-radius: 8px; color: var(--sec-red); padding: 12px; }
.sec-disposal-error p { margin: 4px 0 8px; word-break: break-word; }
.sec-disposal-error button { border: 1px solid #dca8a4; background: #fff; color: var(--sec-red); border-radius: 6px; padding: 5px 12px; cursor: pointer; }
.sec-spinner { display: inline-block; width: 20px; height: 20px; border: 2px solid var(--sec-line); border-top-color: var(--sec-green); border-radius: 50%; animation: sec-spin 0.8s linear infinite; }
@keyframes sec-spin { to { transform: rotate(360deg); } }

.sec-pager { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; font-size: 13px; color: var(--sec-muted); }
.sec-timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.sec-timeline li { border-left: 2px solid var(--sec-line); padding: 0 0 6px 12px; }
.sec-timeline time { display: block; font-size: 12px; color: var(--sec-muted); font-variant-numeric: tabular-nums; }
.sec-timeline p { margin: 2px 0; }
.sec-sources { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sec-sources small { display: block; }
.sec-rel-list { list-style: none; margin: 0; padding: 0; }
.sec-rel-list li { padding: 2px 0; }
.sec-readonly-banner { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; background: var(--sec-red-bg); border: 1px solid #ecc7c4; color: var(--sec-red); font-size: 13px; margin-bottom: 12px; flex-wrap: wrap; }
.sec-breadcrumb { color: var(--sec-muted); font-size: 12px; margin-bottom: 8px; }
.sec-policy-banner { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; background: var(--sec-amber-bg); border: 1px solid #ecd9ae; margin-bottom: 12px; flex-wrap: wrap; }
.sec-policy-banner p { margin: 0; }
.sec-source-detail { margin-top: 12px; }
.sec-source-detail > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sec-source-detail > header h3 { margin: 0; }
.sec-source-detail > header button { border: 1px solid var(--sec-line); background: var(--sec-paper); border-radius: 6px; padding: 5px 10px; cursor: pointer; }
.sec-source-category { margin-top: 12px; }
.sec-source-category h4 { margin: 0 0 6px; }
.sec-source-category h4 small { font-weight: normal; color: var(--sec-muted); }
.sec-source-category td small { display: block; color: var(--sec-muted); }
.sec-states-note { color: var(--sec-muted); font-size: 12px; }

@media (max-width: 1100px) {
  .sec-overview-grid, .sec-detail-grid, .sec-integrity-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .sec-header { flex-direction: column; }
  .sec-header-actions { width: 100%; flex-wrap: wrap; }
  .sec-header-actions button { flex: 1 1 140px; }
  .sec-filters { align-items: stretch; }
  .sec-filters label { width: 100%; }
  .sec-filters input, .sec-filters select { width: 100%; min-width: 0; box-sizing: border-box; }
  .sec-page dl { grid-template-columns: 92px minmax(0, 1fr); }
  .sec-modal-backdrop { padding: 4vh 10px; }
  .sec-modal { width: 100%; max-height: 90vh; box-sizing: border-box; }
}

/* AUDIT-CONTROLLED-EXPORT-R1: 审批弹窗 */
.sec-modal-backdrop {
  position: fixed; inset: 0; z-index: 5600;
  background: rgba(13, 27, 23, 0.45);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 8vh 16px;
}
.sec-modal {
  width: min(520px, 94vw); max-height: 82vh; overflow: auto;
  background: var(--sec-paper); border-radius: 10px; border: 1px solid var(--sec-line);
  padding: 18px 20px; color: var(--sec-ink);
}
.sec-modal header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.sec-modal header h2 { font-size: 17px; margin: 0; }
.sec-modal header button { border: none; background: none; font-size: 20px; cursor: pointer; }
.sec-modal-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--sec-muted); margin: 10px 0; }
.sec-modal textarea { border: 1px solid var(--sec-line); border-radius: 6px; padding: 8px; min-height: 64px; font-size: 13px; }
.sec-modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.sec-modal-actions button { border: 1px solid var(--sec-line); background: var(--sec-paper); border-radius: 6px; padding: 7px 14px; cursor: pointer; }
.sec-modal-actions button.is-primary { background: var(--sec-green); border-color: var(--sec-green); color: #fff; }
.sec-modal .is-ok { color: var(--sec-green); }
.sec-modal .is-error { color: var(--sec-red); }
/* 553续办 P2-D(#31): 指标卡/详情标识条/时间格注释小字 —— 高优先级主题规则把 muted 档压成
   rgba(198,224,235,.68)≈1.36(压浅底); 锚 .platform-admin-b1-outlet 按真实挂载点成套锁定深色字(day/night 同型, 非强制day)。 */
.platform-admin-b1-outlet .sec-metric small,
.platform-admin-b1-outlet .sec-detail-flag small,
.platform-admin-b1-outlet .sec-cell-time small { color: #4b5450; }
html[data-meifan-theme="day"] .platform-admin-b1-outlet .sec-metric small,
html[data-meifan-theme="day"] .platform-admin-b1-outlet .sec-detail-flag small,
html[data-meifan-theme="day"] .platform-admin-b1-outlet .sec-cell-time small { color: #4b5450; }
html[data-meifan-theme="tech-glass-blue"] .platform-admin-b1-outlet .sec-metric small,
html[data-meifan-theme="tech-glass-blue"] .platform-admin-b1-outlet .sec-detail-flag small,
html[data-meifan-theme="tech-glass-blue"] .platform-admin-b1-outlet .sec-cell-time small { color: #4b5450; }
/* 553续办 P2-D(#31)同族闭合: 夜档全局浅色变量级联把页标题/卡标题/指标大数字压成近白(实测 h2=1.05, value=1.23)——
   同根同锚成套锁定; 指标大数字保持既有绿 tone(#0a4938), 不回退。 */
html[data-meifan-theme="tech-glass-blue"] .platform-admin-b1-outlet .sec-header :is(h2, p) { color: #1d2d29; }
html[data-meifan-theme="tech-glass-blue"] .platform-admin-b1-outlet .sec-metric h4 { color: #1d2d29; }
html[data-meifan-theme="tech-glass-blue"] .platform-admin-b1-outlet .sec-metric .sec-metric-value { color: #0a4938; }
/* 553续办 P2-D(#31)同族闭合(表体/区块标题/截至行): 夜档浅色级联压浅卡——表体 td 深字、卡 h3 深字、.sec-meta 归 muted 深档。 */
.platform-admin-b1-outlet .sec-table td,
.platform-admin-b1-outlet .sec-card h3 { color: #1d2d29; }
.platform-admin-b1-outlet .sec-meta { color: #4b5450; }
html[data-meifan-theme="day"] .platform-admin-b1-outlet .sec-table td,
html[data-meifan-theme="day"] .platform-admin-b1-outlet .sec-card h3 { color: #1d2d29; }
html[data-meifan-theme="day"] .platform-admin-b1-outlet .sec-meta { color: #4b5450; }
html[data-meifan-theme="tech-glass-blue"] .platform-admin-b1-outlet .sec-table td,
html[data-meifan-theme="tech-glass-blue"] .platform-admin-b1-outlet .sec-card h3 { color: #1d2d29; }
html[data-meifan-theme="tech-glass-blue"] .platform-admin-b1-outlet .sec-meta { color: #4b5450; }
/* 553续办 P2-D(#31)同族闭合(右栏时间轴): 夜档 li b 动作文案锁深字; muted 系走已提标的 --sec-muted(#5f6864, 对浅卡≥4.5)。 */
html[data-meifan-theme="tech-glass-blue"] .platform-admin-b1-outlet .sec-timeline :is(li b, li strong) { color: #1d2d29; }
/* 553续办 P2-D(#31)同族闭合(时间轴 muted p): 夜档全局 p 规则压浅, 锚定深档(含空态同款)。 */
html[data-meifan-theme="tech-glass-blue"] .platform-admin-b1-outlet .sec-timeline :is(p, .sec-muted) { color: #4b5450; }
/* 557 P2-D(#31)夜档纵向闭合(最后 9 处实义 muted): 概览页两处卡片【空态】p.sec-muted 与
   「日志来源健康」ul.sec-sources 内 7 条 small.sec-muted —— 空态 p 是 .sec-timeline 规则的
   else 分支(不在时间轴内)故此前未被覆盖; 夜档全局浅色级联把二者压成近白叠浅卡。
   仍锚 .platform-admin-b1-outlet 真实挂载点、按直系子选择器成套锁定 muted 深档(#4b5450),
   不做全局 p/small/li 扫射, 零优先级强制声明, 不强制 day。 */
.platform-admin-b1-outlet .sec-card > p.sec-muted,
.platform-admin-b1-outlet .sec-sources > li > small.sec-muted { color: #4b5450; }
html[data-meifan-theme="day"] .platform-admin-b1-outlet .sec-card > p.sec-muted,
html[data-meifan-theme="day"] .platform-admin-b1-outlet .sec-sources > li > small.sec-muted { color: #4b5450; }
html[data-meifan-theme="tech-glass-blue"] .platform-admin-b1-outlet .sec-card > p.sec-muted,
html[data-meifan-theme="tech-glass-blue"] .platform-admin-b1-outlet .sec-sources > li > small.sec-muted { color: #4b5450; }

/* 587 R4: sec surface pairs; scope is the existing platform role root only. */
#meifanPlatformWorkspaceC2Root :is(.sec-page, .sec-modal-backdrop) {
  --sec-ink: var(--r4-ui-ink);
  --sec-muted: var(--r4-ui-muted);
  --sec-line: var(--r4-ui-line);
  --sec-paper: var(--r4-ui-panel);
  --sec-green: var(--pa-r4-success);
  --sec-green-bg: var(--pa-r4-success-bg);
  --sec-red: var(--pa-r4-danger);
  --sec-red-bg: var(--pa-r4-danger-bg);
  --sec-amber-bg: var(--pa-r4-warning-bg);
  color: var(--r4-ui-ink);
}
#meifanPlatformWorkspaceC2Root :is(.sec-page, .sec-modal) :is(h2, h3, th, td, dd) { color: var(--r4-ui-ink); }
#meifanPlatformWorkspaceC2Root :is(.sec-header p, .sec-card > p.sec-muted, .sec-card h3 small, .sec-timeline p, .sec-timeline .sec-muted, .sec-meta, .sec-cell-time small, .sec-metric small, .sec-detail-flag small, .sec-sources > li > small.sec-muted) { color: var(--r4-ui-muted); }
#meifanPlatformWorkspaceC2Root :is(.sec-state strong, .sec-timeline li b, .sec-timeline li strong, .sec-metric h4) { color: var(--r4-ui-ink); }
#meifanPlatformWorkspaceC2Root :is(.sec-filters, .sec-table th, .sec-page code, .sec-state-inline, .sec-state[data-sec-state="empty"], .sec-state[data-sec-state="forbidden"], .sec-badge.is-unknown) { color: var(--r4-ui-muted); background: var(--r4-ui-soft); border-color: var(--r4-ui-line); }
#meifanPlatformWorkspaceC2Root :is(.sec-page, .sec-modal) :is(input, select, textarea, option) { color: var(--r4-ui-ink); background: var(--r4-ui-soft); border-color: var(--r4-ui-line); }
#meifanPlatformWorkspaceC2Root :is(.sec-page, .sec-modal) :is(input, textarea)::placeholder { color: var(--r4-ui-muted); opacity: 1; }
#meifanPlatformWorkspaceC2Root :is(.sec-page, .sec-modal) button { color: var(--r4-ui-ink); }
#meifanPlatformWorkspaceC2Root .sec-table tbody tr:hover { background: var(--r4-ui-hover); }
#meifanPlatformWorkspaceC2Root :is(.sec-page, .sec-modal) button:hover:not(:disabled):not(.is-active):not(.is-current):not(.is-primary) { color: var(--r4-ui-ink); background: var(--r4-ui-hover); }
#meifanPlatformWorkspaceC2Root :is(.sec-tabs button.is-active, .sec-pager-btns button.is-current, .sec-header-actions button.is-primary, .sec-filters button.is-primary, .sec-modal-actions button.is-primary) { color: var(--r4-ui-selected-ink); background: var(--r4-ui-selected); border-color: var(--r4-ui-accent); box-shadow: inset 3px 0 0 var(--r4-ui-accent); font-weight: 800; }
#meifanPlatformWorkspaceC2Root .sec-tabs button.is-active :is(b, span) { color: var(--r4-ui-selected-ink); }
#meifanPlatformWorkspaceC2Root :is(.sec-page, .sec-modal) :is(button, input, select, textarea):disabled,
#meifanPlatformWorkspaceC2Root :is(.sec-export-disabled, .sec-disabled-actions button) { color: var(--r4-ui-muted); background: var(--r4-ui-soft); border: 1px dashed var(--r4-ui-line); opacity: 1; }
#meifanPlatformWorkspaceC2Root :is(.sec-page, .sec-modal) :is(button, input, select, textarea):focus-visible { outline: 2px solid var(--r4-ui-focus); outline-offset: 2px; }
#meifanPlatformWorkspaceC2Root :is(.sec-missing, .sec-badge.is-warn) { color: var(--pa-r4-warning); background: var(--pa-r4-warning-bg); border-color: var(--pa-r4-warning); }
#meifanPlatformWorkspaceC2Root .sec-export-note { color: var(--pa-r4-warning); }
#meifanPlatformWorkspaceC2Root .sec-link { color: var(--r4-ui-accent); }
@media (prefers-reduced-motion: reduce) {
  #meifanPlatformWorkspaceC2Root .sec-spinner { animation: none; }
}
#meifanPlatformWorkspaceC2Root .sec-metric .sec-metric-value { color: var(--pa-r4-success); }
#meifanPlatformWorkspaceC2Root .sec-metric.is-unavailable .sec-metric-value { color: var(--r4-ui-muted); }
#meifanPlatformWorkspaceC2Root .sec-disposal-error button:not(:disabled) {
  color: var(--r4-ui-ink);
  background: var(--r4-ui-soft);
  border-color: var(--r4-ui-line);
}
.pcf-shell{--pcf-ink:#17231d;--pcf-muted:#69756f;--pcf-line:#e3e9e5;--pcf-green:#176b47;--pcf-pale:#eef7f1;color:var(--pcf-ink);padding:30px 34px 54px;background:#f7f9f7;min-height:100%;font-family:"Microsoft YaHei","PingFang SC",sans-serif}.pcf-shell *{box-sizing:border-box}.pcf-head{display:flex;align-items:flex-end;justify-content:space-between;margin-bottom:22px}.pcf-head h2{margin:0;font-size:28px;line-height:1.2;letter-spacing:-.02em}.pcf-head p{margin:8px 0 0;color:var(--pcf-muted);font-size:14px}.pcf-head-side{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}.pcf-search{min-width:220px;border:1px solid #d8e0db;border-radius:9px;padding:9px 11px;background:#fff;color:var(--pcf-ink);font:inherit;font-size:13px;outline:0}.pcf-search:focus{border-color:#57a17d;box-shadow:0 0 0 3px rgba(42,128,87,.1)}.pcf-footnote{margin:14px 2px 0;color:var(--pcf-muted);font-size:12px}.pcf-tabs{display:flex;gap:8px;padding:5px;width:max-content;border:1px solid var(--pcf-line);border-radius:13px;background:#fff;margin-bottom:18px}.pcf-tabs button{border:0;border-radius:9px;padding:10px 16px;background:transparent;color:#637068;cursor:pointer;font-size:14px;font-weight:600}.pcf-tabs button span{display:inline-flex;min-width:22px;justify-content:center;margin-left:5px;color:#839089}.pcf-tabs button.is-active{color:#fff;background:var(--pcf-green);box-shadow:0 5px 14px rgba(23,107,71,.16)}.pcf-tabs button.is-active span{color:#dceee4}.pcf-grid{display:grid;grid-template-columns:minmax(480px,1.3fr) minmax(330px,.7fr);gap:18px;align-items:start}.pcf-panel,.pcf-detail{background:#fff;border:1px solid var(--pcf-line);border-radius:17px;box-shadow:0 10px 30px rgba(33,54,43,.045);overflow:hidden}.pcf-detail{padding:23px;position:sticky;top:18px;min-height:280px}.pcf-list-head,.pcf-row{display:grid;grid-template-columns:minmax(180px,1.4fr) minmax(110px,.7fr) minmax(96px,.7fr) 92px;gap:14px;align-items:center}.pcf-list-head{padding:12px 18px;color:#89938d;background:#fafbfa;border-bottom:1px solid var(--pcf-line);font-size:12px;font-weight:700}.pcf-row{padding:16px 18px;border-bottom:1px solid #edf1ee;transition:background .16s ease,border-color .16s ease;outline:0}.pcf-row:last-child{border-bottom:0}.pcf-row[role=button]{cursor:pointer}.pcf-row[role=button]:hover,.pcf-row[role=button]:focus-visible{background:#f5faf7}.pcf-row.is-selected{background:var(--pcf-pale);box-shadow:inset 3px 0 var(--pcf-green)}.pcf-row span:first-child{min-width:0}.pcf-row b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:15px}.pcf-row small{display:block;margin-top:5px;color:var(--pcf-muted);font-size:12px}.pcf-origin-row{cursor:default}.pcf-origin-lock{color:#98a19c;font-size:12px}.pcf-chip{display:inline-flex;align-items:center;min-height:25px;padding:3px 9px;border-radius:99px;background:#e8f4ed;color:#286648;font-style:normal;font-size:12px;font-weight:700}.pcf-chip.is-muted{background:#f0f2f1;color:#727b76}.pcf-link{padding:5px 0;border:0;background:transparent;color:var(--pcf-green);cursor:pointer;font-weight:700}.pcf-link:hover{text-decoration:underline}.pcf-detail-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;padding-bottom:19px;border-bottom:1px solid var(--pcf-line)}.pcf-detail-head h3{margin:0;font-size:21px}.pcf-detail-head p{margin:7px 0 0;color:var(--pcf-muted);font-size:13px}.pcf-block{padding-top:20px}.pcf-block+.pcf-block{margin-top:18px;border-top:1px solid var(--pcf-line)}.pcf-block-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.pcf-block h4{margin:0;font-size:15px}.pcf-entitlement-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:0}.pcf-entitlement-grid>div{padding:11px;border:1px solid #e5ebe7;border-radius:10px;background:#fafcfb}.pcf-entitlement-grid dt{color:var(--pcf-muted);font-size:11px}.pcf-entitlement-grid dd{margin:5px 0 0;font-size:13px;font-weight:700}.pcf-actions{display:flex;flex-wrap:wrap;gap:9px;margin:20px 0}.pcf-btn{display:inline-flex;align-items:center;justify-content:center;min-height:38px;padding:0 14px;border:1px solid #cfd9d3;border-radius:9px;background:#fff;color:#31423a;text-decoration:none;cursor:pointer;font:inherit;font-size:13px;font-weight:700}.pcf-btn.primary{color:#fff;border-color:var(--pcf-green);background:var(--pcf-green)}.pcf-btn.ghost{background:#f8faf9}.pcf-btn:disabled{cursor:not-allowed;opacity:.55}.pcf-followup{padding:12px 0;border-bottom:1px solid #edf1ee}.pcf-followup:last-child{border-bottom:0}.pcf-followup header{display:flex;justify-content:space-between;align-items:center}.pcf-followup time{color:#8a948f;font-size:11px}.pcf-followup p{margin:9px 0 4px;color:#3f4d46;font-size:13px;line-height:1.65}.pcf-followup small{color:var(--pcf-muted);font-size:12px}.pcf-guardrail{margin:22px 0 0;padding:11px 13px;border-radius:9px;background:#f4f6f4;color:#758079;font-size:11px;line-height:1.6}.pcf-state,.pcf-inline-state{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:150px;padding:24px;text-align:center;color:var(--pcf-muted)}.pcf-inline-state{min-height:82px;padding:14px;border-radius:10px;background:#f8faf9;font-size:12px}.pcf-state p,.pcf-inline-state p{margin:0 0 12px}.pcf-loading{color:#68776f}.pcf-error{color:#9a493e;background:#fff8f6}.pcf-empty{color:#7a857f}.pcf-modal-mask{position:fixed;z-index:9100;inset:0;display:flex;align-items:center;justify-content:center;padding:24px;background:rgba(15,28,21,.52);backdrop-filter:blur(3px)}.pcf-modal-mask[hidden]{display:none}.pcf-modal{width:min(620px,100%);max-height:calc(100vh - 48px);overflow:auto;padding:24px;border-radius:18px;background:#fff;box-shadow:0 24px 80px rgba(10,27,18,.22)}.pcf-modal>header{display:flex;justify-content:space-between;gap:16px;margin-bottom:20px}.pcf-modal h3{margin:0;font-size:21px}.pcf-modal header p{margin:6px 0 0;color:var(--pcf-muted);font-size:13px}.pcf-close{width:34px;height:34px;border:0;border-radius:50%;background:#f1f4f2;color:#536159;cursor:pointer;font-size:23px;line-height:1}.pcf-modal label{display:flex;flex-direction:column;gap:7px;margin:0 0 15px;color:#435048;font-size:13px;font-weight:700}.pcf-modal input,.pcf-modal select,.pcf-modal textarea{width:100%;border:1px solid #d8e0db;border-radius:9px;padding:10px 11px;background:#fff;color:var(--pcf-ink);font:inherit;outline:0}.pcf-modal input:focus,.pcf-modal select:focus,.pcf-modal textarea:focus{border-color:#57a17d;box-shadow:0 0 0 3px rgba(42,128,87,.1)}.pcf-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.pcf-form-error{min-height:20px;margin:0;color:#a33e34;font-size:12px}.pcf-modal footer{display:flex;justify-content:flex-end;gap:9px;margin-top:12px}.pcf-status{position:fixed;z-index:9200;right:24px;bottom:24px;margin:0;padding:10px 15px;border-radius:9px;background:#1e3328;color:#fff;box-shadow:0 8px 30px rgba(0,0,0,.18);font-size:13px}.pcf-status:empty{display:none}@media(max-width:900px){.pcf-shell{padding:22px 18px 42px}.pcf-grid{grid-template-columns:1fr}.pcf-detail{position:static}.pcf-list-head,.pcf-row{grid-template-columns:minmax(140px,1.3fr) minmax(100px,.7fr) minmax(88px,.7fr) 82px}}@media(max-width:620px){.pcf-list-head{display:none}.pcf-row{grid-template-columns:1fr auto;padding:14px}.pcf-row>span:last-child{grid-column:2;grid-row:1/4}.pcf-form-grid{grid-template-columns:1fr}.pcf-entitlement-grid{grid-template-columns:1fr}.pcf-tabs{width:100%}.pcf-tabs button{flex:1;padding:9px 8px}.pcf-modal-mask{padding:12px}}
/* PLATFORM-ADMIN-CONSOLE-B2-BATCH3-20260803 · */
.platform-admin-b3-page {
  --b3-ink: #173b33;
  --b3-muted: #697d77;
  --b3-line: #dce7e2;
  --b3-soft: #f5f8f7;
  --b3-green: #176b55;
  --b3-green-2: #0e5945;
  --b3-warn: #9a6613;
  --b3-warn-bg: #fff8e8;
  --b3-bad: #9f3d3d;
  min-width: 0;
  display: grid;
  gap: 18px;
  color: var(--b3-ink);
}

.platform-admin-b3-page button,
.platform-admin-b3-page input,
.platform-admin-b3-page select {
  font: inherit;
}

.platform-admin-b3-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 2px 2px 16px;
  border-bottom: 1px solid var(--b3-line);
}

.platform-admin-b3-head > div:first-child { max-width: 760px; }
.platform-admin-b3-head small,
.platform-admin-b3-page article > small,
.platform-admin-b3-table-card header small,
.platform-admin-b3-node-detail header small,
.platform-admin-b3-rule-card header small {
  color: var(--b3-green);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .06em;
}

.platform-admin-b3-head h2 {
  margin: 5px 0 6px;
  font-size: 25px;
  line-height: 1.2;
  letter-spacing: -.02em;
}

.platform-admin-b3-head p,
.platform-admin-b3-page p {
  margin: 0;
  color: var(--b3-muted);
  line-height: 1.65;
}

.platform-admin-b3-head-actions,
.platform-admin-b3-entry-row,
.platform-admin-b3-tabs,
.platform-admin-b3-subtabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.platform-admin-b3-page button {
  min-height: 36px;
  padding: 7px 13px;
  border: 1px solid #cbdad4;
  border-radius: 9px;
  color: var(--b3-ink);
  background: #fff;
  cursor: pointer;
}

.platform-admin-b3-page button:hover:not(:disabled) { border-color: var(--b3-green); color: var(--b3-green); }
.platform-admin-b3-page button.is-primary,
.platform-admin-b3-head-actions button:not(:disabled) { border-color: var(--b3-green); color: #fff; background: var(--b3-green); }
.platform-admin-b3-page button:disabled { color: #94a39e; background: #f1f4f3; border-color: #e0e6e4; cursor: not-allowed; }

.platform-admin-b3-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border-radius: 999px;
  color: #60726d;
  background: #edf2f0;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.platform-admin-b3-chip.is-ok { color: #116247; background: #e7f5ef; }
.platform-admin-b3-chip.is-warn { color: var(--b3-warn); background: var(--b3-warn-bg); }

.platform-admin-b3-state,
.platform-admin-b3-unavailable {
  min-height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 30px;
  border: 1px dashed #cbd9d4;
  border-radius: 14px;
  background: var(--b3-soft);
  text-align: left;
}

.platform-admin-b3-state > span:not(.platform-admin-b3-spinner),
.platform-admin-b3-unavailable > span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 12px;
  color: var(--b3-warn);
  background: #fff2d7;
  font-size: 22px;
  font-weight: 800;
}

.platform-admin-b3-unavailable small { color: var(--b3-warn); font-weight: 750; }
.platform-admin-b3-unavailable h3,
.platform-admin-b3-state h3 { margin: 4px 0 8px; }
.platform-admin-b3-unavailable strong { display: block; margin-top: 12px; font-size: 13px; }
.platform-admin-b3-state.is-error { color: var(--b3-bad); border-color: #e7caca; background: #fff8f8; }
.platform-admin-b3-state.is-error p { margin: 6px 0 12px; }

.platform-admin-b3-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid #d6e5df;
  border-top-color: var(--b3-green);
  border-radius: 50%;
  animation: platformAdminB3Spin .8s linear infinite;
}

@keyframes platformAdminB3Spin { to { transform: rotate(360deg); } }

.platform-admin-b3-form-card,
.platform-admin-b3-rule-card,
.platform-admin-b3-table-card,
.platform-admin-b3-node-detail,
.platform-admin-b3-observation,
.platform-admin-b3-readiness {
  border: 1px solid var(--b3-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 7px 22px rgba(26, 71, 58, .045);
}

.platform-admin-b3-form-card { padding: 22px; }
.platform-admin-b3-form-card.is-disabled { background: #fbfcfc; }
.platform-admin-b3-logo-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--b3-line);
}

.platform-admin-b3-logo-placeholder {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px dashed #aebfb9;
  border-radius: 15px;
  color: #879993;
  background: #f1f5f3;
  font-size: 12px;
  font-weight: 800;
}

.platform-admin-b3-logo-row p { margin: 3px 0 10px; }
.platform-admin-b3-logo-row > div:last-child { min-width: 0; display: grid; align-content: center; gap: 7px; }
.platform-admin-b3-logo-row input[type="file"] { max-width: 100%; }
.platform-admin-b3-logo-row button { justify-self: start; }
.platform-admin-b3-logo-placeholder img { max-width: 100%; max-height: 100%; object-fit: contain; }
.platform-admin-b3-logo-history, .platform-admin-b3-legacy-logo { margin-top: 14px; color: var(--b3-ink); }
.platform-admin-b3-logo-history h4 { margin: 0 0 8px; font-size: 13px; font-weight: 650; }
.platform-admin-b3-logo-history ol { max-height: 150px; overflow: auto; margin: 9px 0 0; padding-left: 24px; }
.platform-admin-b3-logo-history li { margin: 5px 0; overflow-wrap: anywhere; }
.platform-admin-b3-legacy-logo label { display: grid; gap: 5px; margin-top: 10px; }
.platform-admin-b3-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px 18px;
  padding: 20px 0;
}

.platform-admin-b3-form-grid label,
.platform-admin-b3-node-detail label,
.platform-admin-b3-asset-layout label {
  display: grid;
  gap: 7px;
  color: #4b615a;
  font-size: 13px;
  font-weight: 650;
}

.platform-admin-b3-form-grid input,
.platform-admin-b3-node-detail input,
.platform-admin-b3-node-detail select,
.platform-admin-b3-asset-layout input {
  width: 100%;
  min-height: 40px;
  padding: 8px 11px;
  border: 1px solid #d4dfdb;
  border-radius: 9px;
  color: var(--b3-ink);
  background: #fff;
  box-sizing: border-box;
}

.platform-admin-b3-form-grid input:disabled,
.platform-admin-b3-node-detail input:disabled,
.platform-admin-b3-node-detail select:disabled,
.platform-admin-b3-asset-layout input:disabled { color: #879993; background: #f2f5f4; }
.platform-admin-b3-form-card > footer,
.platform-admin-b3-node-detail > footer,
.platform-admin-b3-table-card > footer,
.platform-admin-b3-observation > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 15px;
  border-top: 1px solid var(--b3-line);
  color: var(--b3-muted);
  font-size: 12px;
}

.platform-admin-b3-agreement-layout { display: grid; grid-template-columns: minmax(230px, .62fr) minmax(0, 1.8fr); gap: 16px; }
.platform-admin-b3-rule-card { padding: 19px; }
.platform-admin-b3-rule-card header,
.platform-admin-b3-table-card > header,
.platform-admin-b3-node-detail > header,
.platform-admin-b3-observation > header,
.platform-admin-b3-readiness > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.platform-admin-b3-rule-card h3,
.platform-admin-b3-table-card h3,
.platform-admin-b3-node-detail h3,
.platform-admin-b3-observation h3,
.platform-admin-b3-readiness h3 { margin: 4px 0 0; }
.platform-admin-b3-rule-card dl { display: grid; gap: 13px; margin: 20px 0 0; }
.platform-admin-b3-rule-card dl > div { padding: 12px; border-radius: 10px; background: var(--b3-soft); }
.platform-admin-b3-rule-card dt { color: var(--b3-muted); font-size: 12px; }
.platform-admin-b3-rule-card dd { margin: 5px 0 0; line-height: 1.55; font-weight: 650; }

.platform-admin-b3-table-card { overflow: hidden; }
.platform-admin-b3-table-card > header { padding: 18px 19px; }
.platform-admin-b3-table-wrap { width: 100%; overflow: auto; }
.platform-admin-b3-table-wrap table { width: 100%; border-collapse: collapse; min-width: 680px; }
.platform-admin-b3-table-wrap th,
.platform-admin-b3-table-wrap td { padding: 12px 14px; border-top: 1px solid var(--b3-line); text-align: left; vertical-align: middle; }
.platform-admin-b3-table-wrap th { color: #60736c; background: #f7f9f8; font-size: 12px; }
.platform-admin-b3-table-wrap td { font-size: 13px; }
.platform-admin-b3-table-wrap td strong { display: block; }
.platform-admin-b3-table-wrap td small { display: block; margin-top: 3px; color: var(--b3-muted); }
.platform-admin-b3-table-wrap code { color: #245949; background: #edf5f2; padding: 3px 7px; border-radius: 6px; }
.platform-admin-b3-table-card > footer { padding: 13px 18px; }

/* 04A 协议正文只读展开行:正文来自版本记录 content/body 真源, 只读呈现, 不提供编辑 */
.platform-admin-b3-version-content-row td { padding: 4px 14px 14px; background: var(--b3-soft); }
.platform-admin-b3-version-content-row pre {
  margin: 0;
  max-height: 260px;
  overflow: auto;
  padding: 12px 14px;
  border: 1px solid var(--b3-line);
  border-radius: 9px;
  background: #fff;
  color: var(--b3-ink);
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.platform-admin-b3-safety-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #cfe1da;
  border-radius: 11px;
  color: #315d4f;
  background: #eff8f4;
  font-size: 13px;
}

.platform-admin-b3-safety-strip strong { white-space: nowrap; }
.platform-admin-b3-safety-strip span { flex: 1; line-height: 1.55; }
.platform-admin-b3-entry-row { justify-content: flex-end; }
.platform-admin-b3-credential-host { min-width: 0; }
.platform-admin-b3-credential-host .psc-wrap { display: grid; gap: 14px; }
.platform-admin-b3-credential-host .psc-title { padding: 17px 19px; border: 1px solid var(--b3-line); border-radius: 13px; background: #fff; }
.platform-admin-b3-credential-host .psc-title h2 { margin: 0 0 6px; font-size: 18px; color: var(--b3-ink); }
.platform-admin-b3-credential-host .psc-title p { font-size: 13px; }
.platform-admin-b3-credential-host .psc-card { margin: 0; border-radius: 13px; box-shadow: none; }
.platform-admin-b3-credential-host.is-cloud .psc-wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.platform-admin-b3-credential-host.is-cloud .psc-title { grid-column: 1 / -1; }
.platform-admin-b3-credential-host.is-cloud .psc-wrap.psc-card-drawer-mode { display: block; margin: 0; }

.platform-admin-b3-node-layout { display: grid; grid-template-columns: minmax(240px, .72fr) minmax(0, 2fr); gap: 16px; }
.platform-admin-b3-node-list {
  max-height: 680px;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--b3-line);
  border-radius: 14px;
  background: #f8faf9;
}

.platform-admin-b3-node-list header { padding: 7px 8px 12px; border-bottom: 1px solid var(--b3-line); }
.platform-admin-b3-node-list header small { display: block; color: var(--b3-muted); }
.platform-admin-b3-node-list header strong { display: block; margin-top: 5px; font-size: 13px; line-height: 1.55; }
/* 节点项容器:分类标签+节点名两行起步(min-height 两行高), 内容增高容器随动,
   ❌ 不再用固定高度把节点名压出边框; 子项 min-width:0 让省略号生效 */
.platform-admin-b3-node-list button { display: grid; grid-template-rows: auto auto; gap: 3px; min-height: 58px; height: auto; padding: 11px; text-align: left; }
.platform-admin-b3-node-list button > * { min-width: 0; }
.platform-admin-b3-node-list button span { color: var(--b3-green); font-size: 11px; font-weight: 750; }
.platform-admin-b3-node-list button strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.platform-admin-b3-node-list button small { color: var(--b3-muted); }
.platform-admin-b3-node-list button.is-active { color: #fff; border-color: var(--b3-green); background: var(--b3-green); }
/* 选中态深绿底上必须浅字:strong 会被全局 strong 深色规则压成深字, 这里显式钉回 #fff */
.platform-admin-b3-node-list button.is-active strong { color: #fff; }
.platform-admin-b3-node-list button.is-active span,
.platform-admin-b3-node-list button.is-active small { color: #dff2eb; }
/* 悬停描边只改色不改盒, 两行容器已留足高度, 边框不再切字 */
.platform-admin-b3-node-list button:hover:not(:disabled):not(.is-active) { border-color: var(--b3-green); }
.platform-admin-b3-node-detail { padding: 19px; }
.platform-admin-b3-channel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; margin: 18px 0 13px; }
.platform-admin-b3-channel-grid article { padding: 16px; border: 1px solid var(--b3-line); border-radius: 12px; background: #fbfcfc; }
.platform-admin-b3-channel-grid article.is-disabled { border-style: dashed; background: #f5f7f6; }
.platform-admin-b3-channel-grid h4 { margin: 4px 0 15px; font-size: 16px; }
.platform-admin-b3-channel-grid label + label { margin-top: 12px; }
.platform-admin-b3-channel-grid p { margin-top: 12px; font-size: 12px; }
.platform-admin-b3-nplus { display: flex; gap: 14px; padding: 12px 14px; border-radius: 10px; background: #edf6f2; font-size: 13px; }
.platform-admin-b3-nplus strong { white-space: nowrap; }
.platform-admin-b3-inline-error,
.platform-admin-b3-inline-success { margin: 12px 0 0 !important; padding: 10px 12px; border-radius: 9px; font-size: 13px; }
.platform-admin-b3-inline-error { color: var(--b3-bad) !important; background: #fff0f0; }
.platform-admin-b3-inline-success { color: var(--b3-green) !important; background: #edf8f3; }
.platform-admin-b3-node-detail > footer { margin-top: 16px; }

.platform-admin-b3-tabs,
.platform-admin-b3-subtabs { padding: 4px; border: 1px solid var(--b3-line); border-radius: 11px; background: #f4f7f6; }
.platform-admin-b3-tabs button,
.platform-admin-b3-subtabs button { min-height: 34px; border-color: transparent; background: transparent; }
.platform-admin-b3-tabs button.is-active,
.platform-admin-b3-subtabs button.is-active { color: var(--b3-green); border-color: #c9ddd5; background: #fff; box-shadow: 0 2px 8px rgba(22, 72, 56, .06); }
.platform-admin-b3-subtabs { width: fit-content; margin-bottom: 14px; }

.platform-admin-b3-plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.platform-admin-b3-plan-grid article,
.platform-admin-b3-rule-grid > article {
  padding: 17px;
  border: 1px solid var(--b3-line);
  border-radius: 13px;
  background: #fff;
}
.platform-admin-b3-plan-grid article > header { display: flex; justify-content: space-between; gap: 10px; }
.platform-admin-b3-plan-grid h4 { margin: 4px 0 0; font-size: 16px; }
.platform-admin-b3-price { display: block; margin: 16px 0; font-size: 20px; }
.platform-admin-b3-plan-grid dl { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 0 0 16px; }
.platform-admin-b3-plan-grid dl > div { padding: 8px; border-radius: 8px; background: var(--b3-soft); }
.platform-admin-b3-plan-grid dt { color: var(--b3-muted); font-size: 11px; }
.platform-admin-b3-plan-grid dd { margin: 3px 0 0; font-weight: 700; }
.platform-admin-b3-plan-grid button { width: 100%; }

.platform-admin-b3-rule-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.platform-admin-b3-rule-grid > article.is-freeze { border-color: #e8d6ad; background: #fffaf0; }
.platform-admin-b3-rule-grid h3 { margin: 5px 0 7px; font-size: 17px; }
.platform-admin-b3-readiness { grid-column: 1 / -1; padding: 17px; }
.platform-admin-b3-readiness ul { margin: 14px 0; padding-left: 20px; color: var(--b3-muted); line-height: 1.7; }
.platform-admin-b3-observation { padding: 18px; }
.platform-admin-b3-observation > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 17px 0; }
.platform-admin-b3-observation article { padding: 15px; border-radius: 11px; background: var(--b3-soft); }
.platform-admin-b3-observation article small,
.platform-admin-b3-observation article span { display: block; color: var(--b3-muted); }
.platform-admin-b3-observation article strong { display: block; margin: 6px 0; font-size: 22px; }

.platform-admin-b3-asset-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 14px; }
.platform-admin-b3-asset-layout > aside { display: grid; align-content: start; gap: 7px; padding: 14px; border: 1px solid var(--b3-line); border-radius: 13px; background: #f7f9f8; }
.platform-admin-b3-asset-layout > aside strong { padding: 4px 7px 9px; }
.platform-admin-b3-asset-layout > aside button { display: flex; justify-content: space-between; }
.platform-admin-b3-asset-layout > aside button.is-active { color: #fff; border-color: var(--b3-green); background: var(--b3-green); }
.platform-admin-b3-asset-layout > section { min-width: 0; display: grid; gap: 12px; }
.platform-admin-b3-asset-layout > section > header { display: flex; align-items: end; justify-content: space-between; gap: 15px; padding: 13px; border: 1px solid var(--b3-line); border-radius: 12px; background: #fff; }
.platform-admin-b3-asset-layout label { min-width: min(360px, 100%); }
.platform-admin-b3-asset-editor, .platform-admin-b3-asset-detail { display: grid; gap: 12px; min-width: 0; padding: 18px; border: 1px solid var(--b3-line); border-radius: 13px; background: #fff; }
.platform-admin-b3-asset-editor label { display: grid; gap: 6px; }
.platform-admin-b3-asset-editor input { min-width: 0; max-width: 100%; }
.platform-admin-b3-asset-editor > div:last-child, .platform-admin-b3-asset-detail > header { display: flex; gap: 10px; justify-content: flex-end; align-items: center; }
.platform-admin-b3-asset-detail > header h3 { margin-right: auto; }
.platform-admin-b3-asset-detail-body { display: grid; grid-template-columns: minmax(140px, 260px) minmax(0, 1fr); gap: 18px; }
.platform-admin-b3-asset-detail-body img { width: 100%; max-height: 260px; object-fit: contain; }
.platform-admin-b3-asset-detail-body dl { display: grid; gap: 7px; margin: 0; }
.platform-admin-b3-asset-detail-body dl > div { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 8px; }
.platform-admin-b3-asset-detail-body dt { color: var(--b3-muted); }
.platform-admin-b3-asset-detail-body dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }

@media (max-width: 1120px) {
  .platform-admin-b3-agreement-layout,
  .platform-admin-b3-node-layout { grid-template-columns: 1fr; }
  .platform-admin-b3-node-list { max-height: 310px; }
  .platform-admin-b3-plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .platform-admin-b3-credential-host.is-cloud .psc-wrap { grid-template-columns: 1fr; }
  .platform-admin-b3-credential-host.is-cloud .psc-title { grid-column: auto; }
}

@media (max-width: 760px) {
  .platform-admin-b3-head,
  .platform-admin-b3-safety-strip,
  .platform-admin-b3-form-card > footer,
  .platform-admin-b3-node-detail > footer { align-items: stretch; flex-direction: column; }
  .platform-admin-b3-form-grid,
  .platform-admin-b3-channel-grid,
  .platform-admin-b3-plan-grid,
  .platform-admin-b3-rule-grid,
  .platform-admin-b3-observation > div { grid-template-columns: 1fr; }
  .platform-admin-b3-asset-layout { grid-template-columns: 1fr; }
  .platform-admin-b3-asset-layout > section > header { align-items: stretch; flex-direction: column; }
  .platform-admin-b3-logo-row { align-items: flex-start; }
  .platform-admin-b3-asset-detail-body { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .platform-admin-b3-spinner { animation: none; }
}

/* ════════════════════════════════════════════════════════════════════
   第580单域B增补1 · 04B 平台 API 设置定稿重排(papi- 命名空间)
   白色工作台 + 清晰卡片边界 + 分组表头 + 稳定列宽 + 右详情面板;
   ★昼夜两态对比度: 平台工作空间壳(54)钉死浅色底, 但全局夜态规则
     (body:not(.home-mode) strong/small/p/th 等, --ink 夜=近白)会渗进来 ——
     故本区一律 .platform-admin-b3-page .papi-root 双类前缀钉色(0,2,1+ 压过全局),
     day(html[data-meifan-theme="day"])与 night(tech-glass-blue)下同色同对比度(≥4.5)。
   ════════════════════════════════════════════════════════════════════ */
.platform-admin-b3-page .papi-root {
  --papi-ink: #173b33;
  --papi-muted: #4f6159;
  --papi-line: #cfddd6;
  --papi-soft: #f4f8f6;
  --papi-card: #ffffff;
  --papi-green: #176b55;
  --papi-green-ink: #0f5c43;
  --papi-warn: #8a5a0b;
  --papi-bad: #a03030;
  min-width: 0;
  display: grid;
  gap: 16px;
  color: var(--papi-ink);
}

.platform-admin-b3-page .papi-root h2,
.platform-admin-b3-page .papi-root h3,
.platform-admin-b3-page .papi-root h4,
.platform-admin-b3-page .papi-root strong,
.platform-admin-b3-page .papi-root label,
.platform-admin-b3-page .papi-root th,
.platform-admin-b3-page .papi-root td { color: var(--papi-ink); }

.platform-admin-b3-page .papi-root p,
.platform-admin-b3-page .papi-root small,
.platform-admin-b3-page .papi-root span,
.platform-admin-b3-page .papi-root dt { color: var(--papi-muted); }

.platform-admin-b3-page .papi-root dd { color: var(--papi-ink); }

/* 按钮层级: 主(绿实底) / 次(白底描边) / 禁用(灰, 文案仍可读≥4.5); 触控目标≥44px */
.platform-admin-b3-page .papi-root button {
  min-height: 44px;
  padding: 9px 15px;
  border: 1px solid #b9ccc5;
  border-radius: 9px;
  color: var(--papi-ink);
  background: #fff;
  cursor: pointer;
  font-weight: 650;
}
.platform-admin-b3-page .papi-root button:hover:not(:disabled) { border-color: var(--papi-green); color: var(--papi-green-ink); }
.platform-admin-b3-page .papi-root button:focus-visible { outline: 2px solid var(--papi-green); outline-offset: 2px; }
.platform-admin-b3-page .papi-root button.is-primary,
.platform-admin-b3-page .papi-root [data-papi-key-save],
.platform-admin-b3-page .papi-root [data-papi-add-model-submit] {
  border-color: var(--papi-green);
  color: #fff;
  background: var(--papi-green);
}
.platform-admin-b3-page .papi-root button.is-primary:hover:not(:disabled),
.platform-admin-b3-page .papi-root [data-papi-key-save]:hover:not(:disabled),
.platform-admin-b3-page .papi-root [data-papi-add-model-submit]:hover:not(:disabled) { color: #fff; background: #125842; }
.platform-admin-b3-page .papi-root button:disabled {
  color: #5c6b66;
  background: #eef2f0;
  border-color: #d8e1dd;
  cursor: not-allowed;
}

.platform-admin-b3-page .papi-root input,
.platform-admin-b3-page .papi-root select {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid #b9ccc5;
  border-radius: 9px;
  color: var(--papi-ink);
  background: #fff;
  box-sizing: border-box;
}
.platform-admin-b3-page .papi-root input::placeholder { color: #7d8f88; }
.platform-admin-b3-page .papi-root input:focus-visible,
.platform-admin-b3-page .papi-root select:focus-visible { outline: 2px solid var(--papi-green); outline-offset: 1px; border-color: var(--papi-green); }

/* 状态徽标: 文字+底色双通道(不靠颜色单传), 全部满足白/浅底上≥4.5 */
.platform-admin-b3-page .papi-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 10px;
  border: 1px solid #d5e0db;
  border-radius: 999px;
  color: #45574f;
  background: #eef3f1;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}
.platform-admin-b3-page .papi-chip.is-ok { color: var(--papi-green-ink); background: #e3f3ec; border-color: #bcdccf; }
.platform-admin-b3-page .papi-chip.is-warn { color: var(--papi-warn); background: #fff4dd; border-color: #ecd9a8; }
.platform-admin-b3-page .papi-chip.is-off { color: #4d5a55; background: #e8ecea; border-color: #d2dad6; }
.platform-admin-b3-page .papi-chip.is-bad { color: var(--papi-bad); background: #fdeaea; border-color: #efc3c3; }

/* 中(列表)+右(详情) 双栏; ≤1120px 纵排 */
.platform-admin-b3-page .papi-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(340px, 1fr);
  gap: 16px;
  align-items: start;
}
.platform-admin-b3-page .papi-main { min-width: 0; display: grid; gap: 14px; }
.platform-admin-b3-page .papi-list-note { margin: 0; font-size: 13px; line-height: 1.6; }

/* 分组卡片: 白底+清晰边界+分组表头 */
.platform-admin-b3-page .papi-group {
  border: 1px solid var(--papi-line);
  border-radius: 13px;
  background: var(--papi-card);
  box-shadow: 0 6px 18px rgba(26, 71, 58, .05);
  overflow: hidden;
}
.platform-admin-b3-page .papi-group > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--papi-line);
  background: var(--papi-soft);
}
.platform-admin-b3-page .papi-group > header h3 { margin: 0; font-size: 15px; }
.platform-admin-b3-page .papi-group-empty { margin: 0; padding: 16px; font-size: 13px; }

/* 列表: 稳定列宽(table-layout:fixed), 行可选中, 横滚只在 wrap 内。
   桌面前提(1440)中栏约 540px ⇒ 基线 min-width 540 保六列同屏全可见(长名省略号+title);
   ≤1120 单栏后列表吃满内容列, 放宽到 700。 */
.platform-admin-b3-page .papi-table-wrap { width: 100%; overflow-x: auto; }
.platform-admin-b3-page .papi-table {
  width: 100%;
  min-width: 540px;
  border-collapse: collapse;
  table-layout: fixed;
}
.platform-admin-b3-page .papi-table .papi-col-alias { width: 16%; }
.platform-admin-b3-page .papi-table .papi-col-model { width: 20%; }
.platform-admin-b3-page .papi-table .papi-col-key { width: 16%; }
.platform-admin-b3-page .papi-table .papi-col-url { width: 14%; }
.platform-admin-b3-page .papi-table .papi-col-cap { width: 12%; }
.platform-admin-b3-page .papi-table .papi-col-ops { width: 22%; }
.platform-admin-b3-page .papi-table th,
.platform-admin-b3-page .papi-table td {
  padding: 10px 9px;
  border-top: 1px solid var(--papi-line);
  text-align: left;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
}
.platform-admin-b3-page .papi-table thead th {
  border-top: 0;
  color: var(--papi-muted);
  background: #f7faf8;
  font-size: 12px;
  font-weight: 750;
  white-space: normal;
}
.platform-admin-b3-page .papi-table td { font-size: 13px; }
.platform-admin-b3-page .papi-table td strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.platform-admin-b3-page .papi-table td small { display: block; margin-top: 3px; }
.platform-admin-b3-page .papi-table code {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
  color: #1c5c47;
  background: #eef6f2;
  padding: 3px 7px;
  border-radius: 6px;
  font-size: 12px;
}
.platform-admin-b3-page .papi-row { cursor: pointer; }
.platform-admin-b3-page .papi-row:hover td { background: #f2f8f5; }
.platform-admin-b3-page .papi-row.is-selected td { background: #e4f2ec; box-shadow: inset 3px 0 0 var(--papi-green); }
.platform-admin-b3-page .papi-row.is-off td { background: #f6f7f6; }
.platform-admin-b3-page .papi-row:focus-visible { outline: 2px solid var(--papi-green); outline-offset: -2px; }
.platform-admin-b3-page .papi-row-flag { color: var(--papi-warn); font-weight: 700; }
.platform-admin-b3-page .papi-row [data-papi-row-select] { min-height: 44px; width: 100%; }
.platform-admin-b3-page .papi-model-actions { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 5px; align-items: center; }
.platform-admin-b3-page .papi-model-actions [data-papi-row-select] { width: auto; min-width: 0; }
.platform-admin-b3-page .papi-model-actions [data-papi-model-menu] { min-width: 44px; min-height: 44px; font-size: 20px; line-height: 1; }
.platform-admin-b3-page .papi-model-menu { grid-column: 1 / -1; min-width: 0; padding: 5px; display: grid; gap: 3px; border: 1px solid var(--papi-line); border-radius: 8px; background: var(--papi-card); box-shadow: 0 8px 24px rgba(20, 43, 38, .16); }
.platform-admin-b3-page .papi-model-menu button { min-height: 38px; text-align: left; white-space: nowrap; }

/* 右详情面板 */
.platform-admin-b3-page .papi-detail {
  min-width: 0;
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--papi-line);
  border-radius: 13px;
  background: var(--papi-card);
  box-shadow: 0 6px 18px rgba(26, 71, 58, .05);
}
.platform-admin-b3-page .papi-detail.is-empty { padding: 0; border: 0; background: transparent; box-shadow: none; }
.platform-admin-b3-page .papi-detail > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--papi-line);
}
.platform-admin-b3-page .papi-detail > header h3 { margin: 3px 0 0; font-size: 17px; }
.platform-admin-b3-page .papi-detail > header small { color: var(--papi-green); font-weight: 750; }
.platform-admin-b3-page .papi-back { display: none; }
.platform-admin-b3-page .papi-detail-grid { display: grid; gap: 9px; margin: 0; }
.platform-admin-b3-page .papi-detail-field {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid #dbe6e1;
  border-radius: 9px;
  background: var(--papi-soft);
}
.platform-admin-b3-page .papi-detail-field dt { font-size: 12px; font-weight: 700; }
.platform-admin-b3-page .papi-detail-field dd { margin: 0; font-size: 13px; line-height: 1.55; word-break: break-word; }
.platform-admin-b3-page .papi-detail-field code { color: #1c5c47; background: #e6f2ed; padding: 2px 6px; border-radius: 5px; }
.platform-admin-b3-page .papi-detail-note { margin: 0; font-size: 12px; }

/* Key 池卡片 */
.platform-admin-b3-page .papi-keypool { display: grid; gap: 12px; }
.platform-admin-b3-page .papi-keypool > header h3 { margin: 3px 0 0; font-size: 15px; }
.platform-admin-b3-page .papi-keypool > header small { color: var(--papi-green); font-weight: 750; }
.platform-admin-b3-page .papi-key-grid { display: grid; gap: 12px; }
.platform-admin-b3-page .papi-key-card {
  display: grid;
  gap: 11px;
  padding: 13px;
  border: 1px solid var(--papi-line);
  border-radius: 11px;
  background: #fff;
}
.platform-admin-b3-page .papi-key-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.platform-admin-b3-page .papi-key-card > header small { display: block; font-size: 11px; font-weight: 700; }
.platform-admin-b3-page .papi-key-masked { font-family: Consolas, monospace; font-size: 13px; word-break: break-all; }
.platform-admin-b3-page .papi-key-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.platform-admin-b3-page .papi-key-meta > div { padding: 8px 9px; border-radius: 8px; background: var(--papi-soft); }
.platform-admin-b3-page .papi-key-meta dt { font-size: 11px; }
.platform-admin-b3-page .papi-key-meta dd { margin: 3px 0 0; font-size: 12px; word-break: break-word; }
.platform-admin-b3-page .papi-key-errcode { display: block; color: var(--papi-bad); }
.platform-admin-b3-page .papi-key-limits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 8px;
  align-items: end;
}
.platform-admin-b3-page .papi-key-limits label { display: grid; gap: 4px; font-size: 12px; font-weight: 650; }
.platform-admin-b3-page .papi-key-limits button { white-space: nowrap; }
.platform-admin-b3-page .papi-key-card > footer { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.platform-admin-b3-page .papi-key-card > footer small { margin-left: auto; font-size: 11px; }
/* 第587单域C(2026-09-02 B03): Key 池紧凑列表——默认一行一把,点击展开编辑卡;新增 Key 不再无限堆长 */
.platform-admin-b3-page .papi-key-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.platform-admin-b3-page .papi-key-row { border: 1px solid var(--papi-line); border-radius: 10px; background: #fff; }
.platform-admin-b3-page .papi-key-row.is-off { opacity: 0.72; }
.platform-admin-b3-page .papi-key-row.is-expanded { border-color: var(--papi-green); }
.platform-admin-b3-page .papi-key-row-head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; width: 100%;
  padding: 9px 11px; border: 0; background: transparent; text-align: left; cursor: pointer; font: inherit; color: inherit;
}
.platform-admin-b3-page .papi-key-row-head:focus-visible { outline: 2px solid var(--papi-green); outline-offset: -2px; border-radius: 10px; }
.platform-admin-b3-page .papi-key-index { font-size: 11px; font-weight: 750; color: var(--papi-green); min-width: 24px; }
.platform-admin-b3-page .papi-key-row-head .papi-key-masked { font-size: 12px; }
.platform-admin-b3-page .papi-key-health, .platform-admin-b3-page .papi-key-daily { font-size: 11px; white-space: nowrap; }
.platform-admin-b3-page .papi-key-caret { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--papi-green); }
.platform-admin-b3-page .papi-key-row.is-expanded .papi-key-card { border: 0; border-top: 1px solid var(--papi-line); border-radius: 0 0 10px 10px; }
.platform-admin-b3-page .papi-key-limit-note { margin: 0; font-size: 11px; line-height: 1.5; }
.platform-admin-b3-page .papi-key-cell { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.platform-admin-b3-page .papi-keypool > header { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.platform-admin-b3-page .papi-keypool > header > small:last-child { color: inherit; font-weight: 500; font-size: 11px; }

/* 新增 Key 占位卡 */
.platform-admin-b3-page .papi-key-add {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px dashed #a9c4ba;
  border-radius: 11px;
  background: #f2f8f5;
}
.platform-admin-b3-page .papi-key-add h4 { margin: 2px 0 0; font-size: 13px; }
.platform-admin-b3-page .papi-key-add > header small { color: var(--papi-green); font-weight: 750; }
.platform-admin-b3-page .papi-key-add-grid { display: grid; gap: 9px; }
.platform-admin-b3-page .papi-key-add-grid label { display: grid; gap: 5px; font-size: 12px; font-weight: 650; }

.platform-admin-b3-page .papi-inline-error,
.platform-admin-b3-page .papi-inline-note {
  margin: 0;
  padding: 9px 11px;
  border-radius: 8px;
  font-size: 12.5px;
  line-height: 1.55;
}
.platform-admin-b3-page .papi-inline-error { color: var(--papi-bad); background: #fdeaea; border: 1px solid #efc3c3; }
.platform-admin-b3-page .papi-inline-note { color: var(--papi-green-ink); background: #e3f3ec; border: 1px solid #bcdccf; }

/* 新增模型弹窗(工作空间内 fixed 覆盖, 不横溢) */
.platform-admin-b3-page .papi-modal {
  position: fixed;
  inset: 0;
  z-index: 3400;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(18, 32, 28, .48);
}
.platform-admin-b3-page .papi-modal-panel {
  display: grid;
  gap: 13px;
  width: min(560px, calc(100vw - 28px));
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--papi-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 40, 33, .28);
}
.platform-admin-b3-page .papi-modal-panel > header small { color: var(--papi-green); font-weight: 750; }
.platform-admin-b3-page .papi-modal-panel > header h3 { margin: 3px 0 0; }
.platform-admin-b3-page .papi-modal-grid { display: grid; gap: 10px; }
.platform-admin-b3-page .papi-modal-grid label { display: grid; gap: 5px; font-size: 13px; font-weight: 650; }
.platform-admin-b3-page .papi-modal-panel > footer { display: flex; gap: 9px; flex-wrap: wrap; }
.platform-admin-b3-page .papi-modal-panel > small { line-height: 1.6; }

/* 桥接弹窗宿主不占位(弹窗本体 fixed) */
.platform-admin-b3-page [data-papi-usagelog-host],
.platform-admin-b3-page [data-platform-admin-b3-blocklist-host] { display: contents; }

@media (max-width: 1120px) {
  .platform-admin-b3-page .papi-layout { grid-template-columns: 1fr; }
  .platform-admin-b3-page .papi-table { min-width: 700px; }
}

@media (max-width: 760px) {
  .platform-admin-b3-page .papi-key-limits { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .platform-admin-b3-page .papi-key-limits button { grid-column: 1 / -1; }
  .platform-admin-b3-page .papi-detail-field { grid-template-columns: 1fr; gap: 3px; }
}

/* ≤430px(390×844): 列表→详情抽屉式 —— 选中后列表让位, 「返回列表」/Esc 回到列表 */
@media (max-width: 430px) {
  .platform-admin-b3-page .papi-layout.has-selection .papi-main { display: none; }
  .platform-admin-b3-page .papi-back { display: inline-flex; align-items: center; align-self: start; }
  .platform-admin-b3-page .papi-key-meta { grid-template-columns: 1fr; }
  .platform-admin-b3-page .papi-key-limits { grid-template-columns: 1fr 1fr; }
  .platform-admin-b3-page .papi-table { min-width: 720px; }
}

/* 夜态钉色(与 59/64/66-70 各壳同款修法): 09 全局夜态规则
   body:not(.home-mode) :is(.search, …, .quote-template-select select, input, select, textarea)
   因 :is() 内含「类+元素」组合被抬到 (0,2,2), 本区基础钉色 (0,2,1) 压不过 ——
   实测夜态输入框被打成 近白字(#effbff)+深玻璃底, 白台上成"深色块"。
   ⇒ 夜态用 html[data-meifan-theme] 锚抬权(不依赖 body 类, home-mode 残留同样生效)。 */
html[data-meifan-theme="tech-glass-blue"] .platform-admin-b3-page .papi-root :is(input, select, textarea) {
  background: #fff;
  color: #173b33;
  caret-color: #173b33;
  border-color: #b9ccc5;
}
html[data-meifan-theme="tech-glass-blue"] .platform-admin-b3-page .papi-root :is(input, select, textarea)::placeholder { color: #7d8f88; }
html[data-meifan-theme="tech-glass-blue"] .platform-admin-b3-page .papi-root :is(input, select, textarea):focus-visible {
  outline: 2px solid #176b55;
  outline-offset: 1px;
  border-color: #176b55;
}

/* 夜态壳顶栏同修(04B 是本批最高视觉锚, 顺修同 bug 类): 09 全局 body:not(.home-mode) h1/p (0,1,2)
   压过 54 自家 .platform-admin-b1-topbar h1/p (0,1,1) ⇒ 夜态标题/描述近白字钉在浅色工作台上不可见。
   与 56 安全面 css 修壳内区域同款先例, 锚 html[data-meifan-theme] 抬权钉回壳色变量原值。 */
html[data-meifan-theme="tech-glass-blue"] #meifanPlatformWorkspaceC2Root .platform-admin-b1-topbar h1 { color: var(--r4-ui-ink); }
html[data-meifan-theme="tech-glass-blue"] #meifanPlatformWorkspaceC2Root .platform-admin-b1-topbar p { color: var(--r4-ui-muted); }

/* 桥接弹窗(使用日志/地址黑名单)两态钉浅: 33 原生面板是深色 #0f172a + 浅字, 本面文本钉色是深字 ——
   夜态若保留深面板 ⇒ 深字钉在深底上不可读。统一钉白面板(两态一致, 与白色工作台同壳),
   内部文字/输入已被 papi 钉色覆盖; 错误/告警块同步钉浅底深字。 */
.platform-admin-b3-page [data-papi-usagelog-host] .api-center-r6-usage-panel,
.platform-admin-b3-page [data-platform-admin-b3-blocklist-host] .api-center-r6-usage-panel {
  background: #fff;
  color: #173b33;
  border-color: #cfddd6;
}
.platform-admin-b3-page [data-platform-admin-b3-blocklist-host] .api-center-blocklist-forbidden,
.platform-admin-b3-page [data-platform-admin-b3-blocklist-host] .api-center-blocklist-unavailable,
.platform-admin-b3-page [data-platform-admin-b3-blocklist-host] .api-center-blocklist-line-errors {
  background: #fdeaea;
  color: #a03030;
  border-color: #efc3c3;
}
.platform-admin-b3-page [data-platform-admin-b3-blocklist-host] .api-center-blocklist-note {
  background: #fff4dd;
  color: #8a5a0b;
  border-color: #ecd9a8;
}
.platform-admin-b3-page [data-platform-admin-b3-blocklist-host] .api-center-blocklist-summary { color: #0f5c43; }
.platform-admin-b3-page [data-platform-admin-b3-blocklist-host] .api-center-blocklist-table td small,
.platform-admin-b3-page [data-papi-usagelog-host] .api-center-r6-usage-total { color: #4f6159; }

/* 587 R4: the previous day/night white pins above are superseded only in this role root.
   Semantic status pairs stay separate from navigation selection. No API behavior changes. */
#meifanPlatformWorkspaceC2Root .platform-admin-b3-page {
  --b3-ink: var(--r4-ui-ink);
  --b3-muted: var(--r4-ui-muted);
  --b3-line: var(--r4-ui-line);
  --b3-soft: var(--r4-ui-soft);
  --b3-green: var(--r4-ui-accent);
  --b3-green-2: var(--r4-ui-accent);
  --b3-warn: var(--pa-r4-warning);
  --b3-warn-bg: var(--pa-r4-warning-bg);
  --b3-bad: var(--pa-r4-danger);
}
#meifanPlatformWorkspaceC2Root .platform-admin-b3-page .papi-root {
  --papi-ink: var(--r4-ui-ink);
  --papi-muted: var(--r4-ui-muted);
  --papi-line: var(--r4-ui-line);
  --papi-soft: var(--r4-ui-soft);
  --papi-card: var(--r4-ui-panel);
  --papi-green: var(--r4-ui-accent);
  --papi-green-ink: var(--r4-ui-accent);
  --papi-warn: var(--pa-r4-warning);
  --papi-bad: var(--pa-r4-danger);
}
#meifanPlatformWorkspaceC2Root .platform-admin-b3-page :is(h2, h3, h4, label, th, td, dd, strong) { color: var(--r4-ui-ink); }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-page :is(p, small, dt, .papi-key-health, .papi-key-daily) { color: var(--r4-ui-muted); }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-page :is(.platform-admin-b3-form-card, .platform-admin-b3-rule-card, .platform-admin-b3-table-card, .platform-admin-b3-node-detail, .platform-admin-b3-observation, .platform-admin-b3-readiness, .platform-admin-b3-plan-grid > article, .platform-admin-b3-rule-grid > article, .platform-admin-b3-channel-grid article, .platform-admin-b3-asset-layout > section > header, .platform-admin-b3-asset-editor, .platform-admin-b3-asset-detail, .platform-admin-b3-credential-host .psc-title, .papi-key-card, .papi-key-row, .papi-modal-panel) {
  color: var(--r4-ui-ink);
  background: var(--r4-ui-panel);
  border-color: var(--r4-ui-line);
  box-shadow: inset 0 1px 0 rgba(200,229,255,.12);
}
#meifanPlatformWorkspaceC2Root .platform-admin-b3-page :is(.platform-admin-b3-node-list, .platform-admin-b3-tabs, .platform-admin-b3-subtabs, .platform-admin-b3-asset-layout > aside, .platform-admin-b3-table-wrap th, .papi-table thead th, .papi-key-add, .platform-admin-b3-logo-placeholder, .platform-admin-b3-version-content-row pre) {
  color: var(--r4-ui-ink);
  background: var(--r4-ui-soft);
  border-color: var(--r4-ui-line);
}
#meifanPlatformWorkspaceC2Root .platform-admin-b3-page :is(.papi-detail-field, .platform-admin-b3-table-wrap td, .papi-table td, .papi-table th) { border-color: var(--r4-ui-line); }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-page :is(.papi-table code, .papi-detail-field code, .platform-admin-b3-table-wrap code) { color: var(--r4-ui-ink); background: var(--r4-ui-soft); }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-page :is(input, select, textarea, option, button) {
  color: var(--r4-ui-ink);
  background: var(--r4-ui-soft);
  border-color: var(--r4-ui-line);
  caret-color: var(--r4-ui-ink);
}
#meifanPlatformWorkspaceC2Root .platform-admin-b3-page :is(input, select, textarea) { -webkit-backdrop-filter: none; backdrop-filter: none; }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-page :is(input, textarea)::placeholder { color: var(--r4-ui-muted); opacity: 1; }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-page button:where(:hover:not(:disabled):not(.is-active):not(.is-primary):not([aria-selected="true"]):not([aria-expanded="true"]):not([data-papi-key-save]):not([data-papi-add-model-submit])) {
  color: var(--r4-ui-ink);
  background: var(--r4-ui-hover);
  border-color: var(--r4-ui-accent);
}
#meifanPlatformWorkspaceC2Root .platform-admin-b3-page :is(button.is-primary, .platform-admin-b3-head-actions button:not(:disabled), [data-papi-key-save], [data-papi-add-model-submit]) {
  color: var(--r4-ui-selected-ink);
  background: var(--r4-ui-selected);
  border-color: var(--r4-ui-accent);
}
#meifanPlatformWorkspaceC2Root .platform-admin-b3-page :is(.platform-admin-b3-node-list button.is-active, .platform-admin-b3-tabs button.is-active, .platform-admin-b3-subtabs button.is-active, .platform-admin-b3-asset-layout > aside button.is-active) {
  color: var(--r4-ui-selected-ink);
  background: var(--r4-ui-selected);
  border-color: var(--r4-ui-accent);
  box-shadow: inset 3px 0 0 var(--r4-ui-accent);
  font-weight: 800;
}
#meifanPlatformWorkspaceC2Root .platform-admin-b3-page :is(.platform-admin-b3-node-list button.is-active, .platform-admin-b3-tabs button.is-active, .platform-admin-b3-subtabs button.is-active, .platform-admin-b3-asset-layout > aside button.is-active) :is(strong, small, span) { color: var(--r4-ui-selected-ink); }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-page :is(button, input, select, textarea):disabled {
  color: var(--r4-ui-muted);
  -webkit-text-fill-color: var(--r4-ui-muted);
  background: var(--r4-ui-soft);
  border-color: var(--r4-ui-line);
  border-style: dashed;
  opacity: 1;
  cursor: not-allowed;
}
#meifanPlatformWorkspaceC2Root .platform-admin-b3-page :is(button, input, select, textarea, .papi-row):focus-visible { outline: 2px solid var(--r4-ui-focus); outline-offset: 2px; }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-page .papi-row:focus-visible { outline-offset: -2px; }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-page .papi-row.is-off td { background: var(--r4-ui-soft); }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-page .papi-row:hover:not(.is-selected) td { background: var(--r4-ui-hover); }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-page .papi-row.is-selected td {
  color: var(--r4-ui-selected-ink);
  background: var(--r4-ui-selected);
  box-shadow: none;
}
#meifanPlatformWorkspaceC2Root .platform-admin-b3-page .papi-row.is-selected td:first-child { box-shadow: inset 3px 0 0 var(--r4-ui-accent); }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-page .papi-row.is-selected :is(strong, small, code, [data-papi-row-select]) { color: var(--r4-ui-selected-ink); }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-page .papi-row.is-selected code { background: transparent; }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-page .papi-row.is-selected [data-papi-row-select] { background: var(--r4-ui-selected); border-color: var(--r4-ui-accent); box-shadow: inset 0 -2px 0 var(--r4-ui-accent); }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-page .papi-key-row.is-off { opacity: 1; border-style: dashed; }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-page .papi-key-row.is-expanded { border-color: var(--r4-ui-accent); }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-page .papi-key-row.is-expanded .papi-key-row-head { color: var(--r4-ui-selected-ink); background: var(--r4-ui-selected); box-shadow: inset 3px 0 0 var(--r4-ui-accent); }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-page .papi-key-row.is-expanded .papi-key-row-head :is(.papi-key-masked, .papi-key-index, .papi-key-health, .papi-key-daily, .papi-key-caret) { color: var(--r4-ui-selected-ink); }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-page :is(.platform-admin-b3-chip, .papi-chip, .papi-chip.is-off) { color: var(--r4-ui-muted); background: var(--r4-ui-soft); border-color: var(--r4-ui-line); }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-page :is(.platform-admin-b3-chip.is-ok, .papi-chip.is-ok, .platform-admin-b3-safety-strip, .platform-admin-b3-nplus, .papi-inline-note) { color: var(--pa-r4-success); background: var(--pa-r4-success-bg); border-color: var(--pa-r4-success); }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-page :is(.platform-admin-b3-chip.is-warn, .papi-chip.is-warn, .platform-admin-b3-rule-grid > article.is-freeze, .platform-admin-b3-unavailable > span) { color: var(--pa-r4-warning); background: var(--pa-r4-warning-bg); border-color: var(--pa-r4-warning); }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-page :is(.papi-chip.is-bad, .papi-inline-error, .platform-admin-b3-state.is-error) { color: var(--pa-r4-danger); background: var(--pa-r4-danger-bg); border-color: var(--pa-r4-danger); }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-page .platform-admin-b3-inline-error { background: var(--pa-r4-danger-bg); }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-page .platform-admin-b3-inline-success { --b3-green: var(--pa-r4-success); background: var(--pa-r4-success-bg); }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-page :is(.platform-admin-b3-safety-strip, .platform-admin-b3-nplus, .platform-admin-b3-rule-grid > article.is-freeze, .platform-admin-b3-state.is-error) :is(strong, small, p, span) { color: inherit; }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-page .papi-key-errcode { color: var(--pa-r4-danger); }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-page .papi-row-flag { color: var(--pa-r4-warning); }
/* Native usage/blocklist bridge remains in this role workspace; theme both sides of each pair. */
#meifanPlatformWorkspaceC2Root .platform-admin-b3-page :is([data-papi-usagelog-host], [data-platform-admin-b3-blocklist-host]) .api-center-r6-usage-panel { color: var(--r4-ui-ink); background: var(--r4-ui-panel); border-color: var(--r4-ui-line); }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-page :is(.api-center-blocklist-forbidden, .api-center-blocklist-unavailable, .api-center-blocklist-line-errors) { color: var(--pa-r4-danger); background: var(--pa-r4-danger-bg); border-color: var(--pa-r4-danger); }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-page .api-center-blocklist-note { color: var(--pa-r4-warning); background: var(--pa-r4-warning-bg); border-color: var(--pa-r4-warning); }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-page .api-center-blocklist-summary { color: var(--pa-r4-success); }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-page .api-center-r6-usage-total { color: var(--r4-ui-muted); }
/* 04D credentials are mounted inside B3; their legacy data-theme colors must
   follow the product's shared data-meifan-theme contract in this host. */
#meifanPlatformWorkspaceC2Root .platform-admin-b3-credential-host .psc-wrap {
  --psc-ink: var(--r4-ui-ink);
  --psc-paper: var(--r4-ui-soft);
  --psc-raised: var(--r4-ui-panel);
  --psc-line: var(--r4-ui-line);
  --psc-muted: var(--r4-ui-muted);
  --psc-teal: var(--pa-r4-success);
  --psc-teal-soft: var(--pa-r4-success-bg);
  --psc-amber: var(--pa-r4-warning);
  --psc-amber-soft: var(--pa-r4-warning-bg);
  --psc-red: var(--pa-r4-danger);
}
#meifanPlatformWorkspaceC2Root .platform-admin-b3-credential-host :is(.psc-drawer, .psc-drawer > footer) { color: var(--r4-ui-ink); background: var(--r4-ui-panel); border-color: var(--r4-ui-line); }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-credential-host :is(.psc-drawer-tabs, .psc-sms-state, .psc-sms-editor dl > div) { color: var(--r4-ui-muted); background: var(--r4-ui-soft); border-color: var(--r4-ui-line); }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-credential-host :is(.psc-drawer-status span, .psc-drawer-form .psc-field span, .psc-sms-scenes button code, .psc-sms-editor > header code) { color: var(--r4-ui-muted); }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-credential-host :is(h5, .psc-drawer-status strong) { color: var(--r4-ui-ink); }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-credential-host :is(.psc-drawer > header, .psc-drawer-status, .psc-sms-editor, .psc-sms-editor > footer) { border-color: var(--r4-ui-line); }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-credential-host :is(.psc-drawer-tabs button.is-active, .psc-sms-scenes button.is-active, .psc-credential-card.is-selected) { color: var(--r4-ui-selected-ink); background: var(--r4-ui-selected); border-color: var(--r4-ui-accent); box-shadow: inset 3px 0 0 var(--r4-ui-accent); }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-credential-host :is(.psc-sms-scenes button.is-active, .psc-credential-card.is-selected) :is(h3, p, small, strong, code, .psc-card-summary span) { color: var(--r4-ui-selected-ink); }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-credential-host .psc-btn:not(.ghost):not(.danger):not(:disabled) { color: var(--r4-ui-selected-ink); -webkit-text-fill-color: var(--r4-ui-selected-ink); background: var(--r4-ui-selected); border: 1px solid var(--r4-ui-accent); }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-credential-host :is(.psc-err, .psc-toast.bad) { color: var(--pa-r4-danger); }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-credential-host .psc-toast.ok { color: var(--pa-r4-success); }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-credential-host .psc-chip { color: var(--r4-ui-muted); background: var(--r4-ui-soft); }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-credential-host .psc-chip.ok { color: var(--pa-r4-success); background: var(--pa-r4-success-bg); }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-credential-host :is(.psc-chip.warn, .psc-drawer-note) { color: var(--pa-r4-warning); background: var(--pa-r4-warning-bg); border-color: var(--pa-r4-warning); }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-credential-host :is(.psc-chip.bad, .psc-sms-state.is-error, .psc-sms-message.is-error) { color: var(--pa-r4-danger); background: var(--pa-r4-danger-bg); }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-credential-host .psc-sms-message.is-success { color: var(--pa-r4-success); background: var(--pa-r4-success-bg); }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-credential-host .psc-drawer-note :is(p, strong) { color: inherit; }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-credential-host .psc-card.is-pending { opacity: 1; border-style: dashed; }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-credential-host .psc-credential-card { transition: none; }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-credential-host .psc-credential-card:focus-visible { outline: 2px solid var(--r4-ui-focus); outline-offset: 2px; }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-page :is(.api-center-r6-usage-table, .api-center-blocklist-table) :is(th, td) { border-color: var(--r4-ui-line); }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-page :is(.api-center-r6-usage-table, .api-center-blocklist-table) th { color: var(--r4-ui-muted); background: var(--r4-ui-soft); }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-page .api-center-blocklist-delete:not(:disabled) { color: var(--pa-r4-danger); border-color: var(--pa-r4-danger); }

/* R4-S1: actual 53 SMS history stays inside the B3 cloud credential host. */
#meifanPlatformWorkspaceC2Root .platform-admin-b3-credential-host .psc-sms-history {
  border-color: var(--r4-ui-line);
}
#meifanPlatformWorkspaceC2Root .platform-admin-b3-credential-host .psc-sms-history li {
  color: var(--r4-ui-ink);
  background: var(--r4-ui-soft);
}
#meifanPlatformWorkspaceC2Root .platform-admin-b3-credential-host .psc-sms-history li :is(strong, code) {
  color: var(--r4-ui-ink);
  background: transparent;
}
#meifanPlatformWorkspaceC2Root .platform-admin-b3-credential-host .psc-sms-history li :is(span, small) {
  color: var(--r4-ui-muted);
}

/* ── 376-r2 · 04C 平台模型通道(NY-01/02 定稿收口): 四能力 tabs + 通道维护卡 + 平台选项预览 ── */
.platform-admin-b3-page .pach-ny-tabs {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  flex-wrap: wrap;
  border-bottom: 2px solid var(--b3-line);
}

.platform-admin-b3-page .pach-ny-tabs [role="tab"] {
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  background: transparent;
  color: var(--b3-muted);
  font-weight: 700;
}

.platform-admin-b3-page .pach-ny-tabs [role="tab"] small {
  display: block;
  margin-top: 2px;
  color: var(--b3-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
}

.platform-admin-b3-page .pach-ny-tabs [role="tab"]:hover { color: var(--b3-green); }
.platform-admin-b3-page .pach-ny-tabs [role="tab"][aria-selected="true"] {
  color: var(--b3-green-2);
  background: #fff;
  border-color: var(--b3-line);
  box-shadow: inset 0 -3px 0 var(--b3-green);
}
.platform-admin-b3-page .pach-ny-tabs [role="tab"][aria-selected="true"] small { color: var(--b3-green); }
.platform-admin-b3-page .pach-ny-tabs [role="tab"]:focus-visible { outline: 2px solid var(--b3-green); outline-offset: -2px; }

.platform-admin-b3-page .pach-ny-panel { display: grid; gap: 10px; }
.platform-admin-b3-page .pach-ny-panel[hidden] { display: none; }

.platform-admin-b3-page .pach-ny-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.platform-admin-b3-page .pach-ny-panel-head h3 { margin: 0; font-size: 18px; }
.platform-admin-b3-page .pach-ny-panel-head p { margin: 3px 0 0; font-size: 12.5px; }
.platform-admin-b3-page .pach-ny-panel-head > button {
  border-color: var(--b3-green);
  color: #fff;
  background: var(--b3-green);
}

.platform-admin-b3-page .pach-ny-table { min-width: 720px; }
.platform-admin-b3-page .pach-ny-table .pach-ny-col-index { width: 84px; color: var(--b3-muted); text-align: center; white-space: nowrap; }
/* 1d: 管理列 ≥96px 不竖排 */
.platform-admin-b3-page .pach-ny-table .pach-ny-col-manage {
  min-width: 96px;
  white-space: nowrap;
}
.platform-admin-b3-page .pach-ny-table .pach-ny-col-manage > * { margin-right: 6px; }
.platform-admin-b3-page .pach-ny-table .pach-ny-col-manage > *:last-child { margin-right: 0; }
.platform-admin-b3-page .pach-ny-table .pach-ny-col-manage button,
.platform-admin-b3-page .pach-ny-table .pach-ny-col-manage a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  white-space: nowrap;
}
.platform-admin-b3-page .pach-ny-table td small.pach-ny-meta { font-size: 11.5px; }

.platform-admin-b3-page .pach-ny-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 1px 8px;
  border-radius: 999px;
  color: var(--b3-green-2);
  background: #e7f5ef;
  border: 1px solid #bcded0;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.platform-admin-b3-page .pach-ny-maintain-row > td { padding: 0 14px 14px; background: var(--b3-soft); }
.platform-admin-b3-page .pach-ny-maintain {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 1fr);
  gap: 8px 14px;
  padding: 10px 14px;
  border: 1px solid var(--b3-line);
  border-radius: 0 0 10px 10px;
  background: #fff;
}
.platform-admin-b3-page .pach-ny-maintain label span {
  display: block;
  margin-bottom: 4px;
  color: var(--b3-muted);
  font-size: 12px;
  font-weight: 700;
}
.platform-admin-b3-page .pach-ny-maintain input,
.platform-admin-b3-page .pach-ny-maintain select {
  width: 100%;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid #cbdad4;
  border-radius: 8px;
  background: #fff;
}
.platform-admin-b3-page .pach-ny-maintain-ops { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.platform-admin-b3-page .pach-ny-maintain-ops button {
  border-color: var(--b3-green);
  color: #fff;
  background: var(--b3-green);
}
.platform-admin-b3-page .pach-ny-maintain-ops small { color: var(--b3-muted); }

.platform-admin-b3-page .pach-ny-add {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px dashed #b9d3c8;
  border-radius: 12px;
  background: var(--b3-soft);
}
.platform-admin-b3-page .pach-ny-add > header { display: grid; gap: 4px; }
.platform-admin-b3-page .pach-ny-add > header small { color: var(--b3-muted); }
.platform-admin-b3-page .pach-ny-add-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
}
.platform-admin-b3-page .pach-ny-add-grid label span {
  display: block;
  margin-bottom: 4px;
  color: var(--b3-muted);
  font-size: 12px;
  font-weight: 700;
}
.platform-admin-b3-page .pach-ny-add-grid input {
  width: 100%;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid #cbdad4;
  border-radius: 8px;
  background: #fff;
}
.platform-admin-b3-page .pach-ny-add footer { display: flex; gap: 10px; align-items: center; }
.platform-admin-b3-page .pach-ny-add > small { color: var(--b3-muted); }

.platform-admin-b3-page .pach-ny-preview {
  display: grid;
  gap: 6px;
  padding: 12px 16px;
  border: 1px solid var(--b3-line);
  border-radius: 12px;
  background: #fff;
}
.platform-admin-b3-page .pach-ny-preview > header { display: grid; gap: 3px; }
.platform-admin-b3-page .pach-ny-preview > header small { color: var(--b3-muted); }
.platform-admin-b3-page .pach-ny-preview ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 7px;
}
.platform-admin-b3-page .pach-ny-preview ol li {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border: 1px solid var(--b3-line);
  border-radius: 9px;
  background: var(--b3-soft);
  font-weight: 650;
}
.platform-admin-b3-page .pach-ny-preview ol li > span[aria-hidden] { color: var(--b3-green); }

.platform-admin-b3-page .pach-ny-diag {
  border: 1px solid var(--b3-line);
  border-radius: 10px;
  background: var(--b3-soft);
  padding: 9px 13px;
}
.platform-admin-b3-page .pach-ny-diag summary { cursor: pointer; color: var(--b3-muted); font-size: 12.5px; font-weight: 700; }
.platform-admin-b3-page .pach-ny-diag p { margin: 8px 0 2px; font-size: 12.5px; }

@media (max-width: 760px) {
  .platform-admin-b3-page .pach-ny-tabs { gap: 4px; }
  .platform-admin-b3-page .pach-ny-tabs [role="tab"] { padding: 7px 10px; }
  .platform-admin-b3-page .pach-ny-maintain,
  .platform-admin-b3-page .pach-ny-add-grid { grid-template-columns: minmax(0, 1fr); }
  .platform-admin-b3-page .pach-ny-table .pach-ny-col-manage { min-width: 96px; white-space: nowrap; }
}

/* ══ 383 · 活动与福利(计费规则 tab 追加两块): 活动发奖开关 + 活动设置 —— 配色仅沿用 b3 既有变量, 不新造色 ══ */
.platform-admin-b3-page .settings-act383-switch,
.platform-admin-b3-page .settings-act383-settings { display: grid; gap: 12px; }
.platform-admin-b3-page .settings-act383-switch-status {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border: 1px solid var(--b3-line);
  border-radius: 10px;
  background: var(--b3-soft);
}
.platform-admin-b3-page .settings-act383-switch-status > strong { font-size: 26px; line-height: 1; }
.platform-admin-b3-page .settings-act383-switch-status > strong.is-on { color: var(--b3-green); }
.platform-admin-b3-page .settings-act383-switch-status > strong.is-off { color: var(--b3-muted); }
.platform-admin-b3-page .settings-act383-switch-status small { color: var(--b3-muted); }
.platform-admin-b3-page .settings-act383-issued { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.platform-admin-b3-page .settings-act383-issued article {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--b3-line);
  border-radius: 10px;
  background: #fff;
}
.platform-admin-b3-page .settings-act383-issued article small { color: var(--b3-muted); font-size: 12px; }
.platform-admin-b3-page .settings-act383-issued article strong { font-size: 20px; color: var(--b3-ink); }
.platform-admin-b3-page .settings-act383-issued-total { color: var(--b3-muted); font-size: 12.5px; }
.platform-admin-b3-page .settings-act383-issued-meta,
.platform-admin-b3-page .settings-act383-card-head,
.platform-admin-b3-page .settings-act383-head-actions {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.platform-admin-b3-page .settings-act383-issued-meta,
.platform-admin-b3-page .settings-act383-card-head { justify-content: space-between; }
.platform-admin-b3-page .settings-act383-card-head h3 { margin: 0; }
.platform-admin-b3-page .settings-act383-recent {
  max-width: 100%;
  border: 1px solid var(--b3-line);
  border-radius: 10px;
  background: #fff;
}
.platform-admin-b3-page .settings-act383-recent table { width: 100%; border-collapse: collapse; }
.platform-admin-b3-page .settings-act383-recent th,
.platform-admin-b3-page .settings-act383-recent td {
  padding: 10px 12px;
  border-top: 1px solid var(--b3-line);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}
.platform-admin-b3-page .settings-act383-recent thead th { border-top: none; color: var(--b3-muted); font-size: 12px; background: var(--b3-soft); }
.platform-admin-b3-page .settings-act383-recent td small { color: var(--b3-muted); }
.platform-admin-b3-page .settings-act383-row {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--b3-line);
  border-radius: 10px;
  background: var(--b3-soft);
}
.platform-admin-b3-page .settings-act383-row > small { color: var(--b3-muted); font-size: 12px; }
.platform-admin-b3-page .settings-act383-row > strong { color: var(--b3-ink); }
.platform-admin-b3-page .settings-act383-settings textarea {
  width: 100%;
  min-height: 72px;
  padding: 8px 10px;
  border: 1px solid var(--b3-line);
  border-radius: 8px;
  font: inherit;
  color: var(--b3-ink);
  background: #fff;
}
.platform-admin-b3-page .settings-act383-settings input[type="number"] {
  width: 140px;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid var(--b3-line);
  border-radius: 8px;
  background: #fff;
}
.platform-admin-b3-page .settings-act383-audit { color: var(--b3-muted); font-size: 12px; }

/* ≤640: 明细表容器内横滚(overflow-x:auto), ❌ 不整页溢出 */
@media (max-width: 640px) {
  .platform-admin-b3-page .settings-act383-issued { grid-template-columns: minmax(0, 1fr); }
  .platform-admin-b3-page .settings-act383-recent { overflow-x: auto; }
  .platform-admin-b3-page .settings-act383-recent table { min-width: 560px; }
}

/* 383-r2 AF-02 增量: 身份徽章/切换确认预览/活动设置五行(色板沿 --b3-*) */
.platform-admin-b3-page .settings-act383-switch-sub { margin: 0; color: var(--b3-muted); font-size: 12.5px; }
.platform-admin-b3-page .settings-act383-confirm-preview {
  border: 1px dashed var(--b3-line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 6px;
  background: var(--b3-soft); font-size: 12.5px; color: var(--b3-muted);
}
.platform-admin-b3-page .settings-act383-confirm-preview p { margin: 0; }
.platform-admin-b3-page .settings-act383-confirm-preview ul { margin: 0; padding-left: 18px; }
.platform-admin-b3-page .settings-act383-settings .settings-act383-row {
  display: grid; grid-template-columns: 110px auto 1fr; gap: 10px; align-items: baseline;
  padding: 8px 0; border-bottom: 1px solid var(--b3-line); font-size: 13px;
}
.platform-admin-b3-page .settings-act383-settings .settings-act383-row > small { color: var(--b3-muted); }
.platform-admin-b3-page .settings-act383-settings .settings-act383-row > strong { font-weight: 500; color: var(--b3-ink); }
@media (max-width: 640px) {
  .platform-admin-b3-page .settings-act383-settings .settings-act383-row { grid-template-columns: minmax(0, 1fr); }
}

/* 393-r2 · R5 NY-01/02/12/15/16: explicit group drafts and evidence editor. */
.platform-admin-b3-page .ny-channel-panel,
.platform-admin-b3-page .ny-channel-stack { min-width: 0; }
.platform-admin-b3-page .ny-channel-stack { display: grid; gap: 8px; }
.platform-admin-b3-page .ny-channel-card,
.platform-admin-b3-page .ny-channel-preview,
.platform-admin-b3-page .papi-fact-editor {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--b3-line);
  border-radius: 10px;
  color: var(--b3-ink);
  background: var(--r4-ui-panel, #fff);
}
.platform-admin-b3-page .ny-channel-card > header,
.platform-admin-b3-page .papi-fact-editor > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.platform-admin-b3-page .ny-channel-card > header > strong { font-size: 15px; }
.platform-admin-b3-page .ny-channel-card { gap: 6px; padding: 10px 14px; }
.platform-admin-b3-page .ny-channel-order,
.platform-admin-b3-page .ny-channel-tools,
.platform-admin-b3-page .ny-channel-actions,
.platform-admin-b3-page .papi-fact-options,
.platform-admin-b3-page .papi-fact-editor footer {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.platform-admin-b3-page .ny-channel-order button,
.platform-admin-b3-page .ny-channel-tools button,
.platform-admin-b3-page .ny-channel-tools a { min-height: 30px; padding: 4px 10px; }
.platform-admin-b3-page .ny-channel-status { font-size: 12px; color: var(--b3-muted); }
.platform-admin-b3-page .ny-channel-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
}
.platform-admin-b3-page .ny-channel-fields label {
  grid-template-columns: minmax(145px, 210px) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}
.platform-admin-b3-page .ny-channel-fields label,
.platform-admin-b3-page .papi-fact-fields label { display: grid; min-width: 0; gap: 4px; font-size: 12px; font-weight: 700; }
.platform-admin-b3-page .ny-channel-fields :is(input, select),
.platform-admin-b3-page .papi-fact-fields :is(input, select) {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 6px 9px;
  border: 1px solid var(--b3-line);
  border-radius: 6px;
  color: var(--b3-ink);
  background: var(--r4-ui-soft, #f5f8f7);
}
.platform-admin-b3-page .ny-channel-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.platform-admin-b3-page .ny-channel-meta small { min-width: 0; overflow-wrap: anywhere; }
.platform-admin-b3-page .ny-channel-stop-note {
  padding: 9px 12px;
  border: 1px solid var(--pa-r4-warning, #b27725);
  border-radius: 7px;
  background: var(--pa-r4-warning-bg, #fff8e8);
  font-size: 12px;
}
.platform-admin-b3-page .ny-channel-preview { gap: 3px; padding: 10px 14px; }
.platform-admin-b3-page .ny-channel-preview ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 20px; margin: 0; padding-left: 22px; }
.platform-admin-b3-page .ny-channel-preview li { padding: 0; min-width: 0; }
.platform-admin-b3-page .ny-channel-actions { justify-content: flex-end; }
.platform-admin-b3-page .ny-channel-actions small { margin-right: auto; }

/* R5 NY-01/02: measure positions inside the settings outlet. Its width is
   owned by the outer workspace shell, so these insets preserve the drawing's
   relative anchors without stretching past the available main column. */
@media (min-width: 981px) {
  .platform-admin-b3-page[data-platform-admin-b3-surface="node-defaults"] { gap: 5px; }
  .platform-admin-b3-page[data-platform-admin-b3-surface="node-defaults"] > .platform-admin-b3-head { padding-bottom: 0; }
  .platform-admin-b3-page[data-platform-admin-b3-surface="node-defaults"] > .pach-ny-tabs {
    height: 44px;
    margin-left: 31px;
    margin-right: 28px;
  }
  .platform-admin-b3-page[data-platform-admin-b3-surface="node-defaults"] > .pach-ny-tabs [role="tab"] {
    min-height: 42px;
    height: 42px;
    padding: 2px 12px;
  }
  .platform-admin-b3-page[data-platform-admin-b3-surface="node-defaults"] > .ny-channel-panel {
    margin-top: 20px;
    padding-left: 52px;
    padding-right: 45px;
  }
  .platform-admin-b3-page[data-platform-admin-b3-surface="node-defaults"] .ny-channel-card {
    gap: 5px;
    padding: 7px 14px;
  }
  .platform-admin-b3-page[data-platform-admin-b3-surface="node-defaults"] .ny-channel-preview {
    padding: 6px 14px 7px;
  }
  .platform-admin-b3-page[data-platform-admin-b3-surface="node-defaults"] .ny-channel-stack > .ny-channel-card:only-child {
    min-height: 205px;
  }
}
.platform-admin-b3-page .ny-channel-actions [data-ny-channel-save],
.platform-admin-b3-page .papi-fact-editor [data-papi-fact-save] {
  color: var(--r4-ui-selected-ink, #fff);
  background: var(--r4-ui-selected, #2563eb);
  border-color: var(--r4-ui-accent, #2563eb);
}
.platform-admin-b3-page .ny-channel-detail {
  display: grid;
  gap: 5px;
  padding: 11px;
  border: 1px solid var(--b3-line);
  border-radius: 7px;
  background: var(--r4-ui-soft, #f5f8f7);
  overflow-wrap: anywhere;
}
.platform-admin-b3-page .ny-channel-detail p { font-size: 12px; }
.platform-admin-b3-page .ny-channel-dialog-backdrop {
  position: fixed;
  z-index: 10020;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(4, 18, 34, .65);
}
.platform-admin-b3-page .ny-channel-dialog-backdrop > section {
  width: min(100%, 440px);
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--b3-line);
  border-radius: 10px;
  background: var(--r4-ui-panel, #fff);
}
.platform-admin-b3-page .ny-channel-dialog-backdrop > section > div { display: flex; flex-wrap: wrap; gap: 8px; }
.platform-admin-b3-page .papi-layout.has-selection { grid-template-columns: minmax(0, 1fr); }
.platform-admin-b3-page .papi-layout.has-selection .papi-main { display: none; }
.platform-admin-b3-page .papi-layout.has-selection .papi-back { display: inline-flex; align-items: center; }
.platform-admin-b3-page .papi-layout.has-selection .papi-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.platform-admin-b3-page .papi-fact-editor { margin: 0; }
.platform-admin-b3-page .papi-layout.has-selection .papi-fact-editor { padding: 22px; }
.platform-admin-b3-page .papi-layout.has-selection .papi-fact-fields label { grid-template-columns: 210px minmax(0, 1fr); align-items: center; }
.platform-admin-b3-page .papi-fact-options label { display: flex; align-items: center; gap: 4px; min-height: 32px; }
.platform-admin-b3-page .papi-fact-fields { display: grid; gap: 9px; }
.platform-admin-b3-page .papi-fact-editor footer small { flex: 1; }
@media (max-width: 680px) {
  .platform-admin-b3-page .ny-channel-fields label,
  .platform-admin-b3-page .papi-layout.has-selection .papi-fact-fields label { grid-template-columns: minmax(0, 1fr); }
  .platform-admin-b3-page .ny-channel-meta { flex-wrap: wrap; }
  .platform-admin-b3-page .ny-channel-preview ol { grid-template-columns: minmax(0, 1fr); }
  .platform-admin-b3-page .ny-channel-actions { justify-content: flex-start; }
  .platform-admin-b3-page .ny-channel-actions small { flex-basis: 100%; }
}

/* O151c / PA-04A: registration policy stays inside the existing system-settings shell. */
#meifanPlatformWorkspaceC2Root .platform-admin-b3-page[data-platform-admin-b3-surface="registration-agreements"] {
  display: grid;
  gap: 12px;
}
#meifanPlatformWorkspaceC2Root .platform-admin-b1-shell:has(.platform-admin-b3-page[data-platform-admin-b3-surface="registration-agreements"]) .platform-admin-b1-topbar {
  min-height: 90px;
  padding-top: 19px;
  padding-bottom: 10px;
}
#meifanPlatformWorkspaceC2Root .platform-admin-b1-shell:has(.platform-admin-b3-page[data-platform-admin-b3-surface="registration-agreements"]) .platform-admin-b1-breadcrumb { display: none; }
#meifanPlatformWorkspaceC2Root .platform-admin-b1-shell:has(.platform-admin-b3-page[data-platform-admin-b3-surface="registration-agreements"]) .platform-admin-b1-content { padding-top: 15px; }
.platform-admin-b3-signup-settings { display: grid; gap: 12px; }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-signup-master { display: grid; grid-template-columns: minmax(190px, 1fr) auto; align-items: center; gap: 8px 22px; min-height: 136px; padding: 16px 20px; box-sizing: border-box; }
.platform-admin-b3-signup-master > header { grid-column: 1 / -1; align-items: center; }
.platform-admin-b3-signup-master > p { margin: 0; }
.platform-admin-b3-signup-master > small { grid-column: 1 / -1; }
.platform-admin-b3-signup-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.platform-admin-b3-signup-switch input { width: 42px; height: 23px; margin: 0; accent-color: var(--r4-ui-accent, #2563eb); }
.platform-admin-b3-signup-workspaces > header { align-items: center; }
.platform-admin-b3-signup-workspaces { min-height: 329px; }
.platform-admin-b3-signup-header-actions { display: flex; align-items: center; gap: 12px; }
.platform-admin-b3-signup-header-actions > span { color: var(--b3-muted); font-size: 12px; }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-signup-header-actions > button:not(:disabled) { color: var(--r4-ui-selected-ink); background: var(--r4-ui-selected); border-color: var(--r4-ui-accent); }
.platform-admin-b3-signup-workspaces table { table-layout: fixed; min-width: 900px; }
.platform-admin-b3-signup-workspaces th:nth-child(1) { width: 8%; }
.platform-admin-b3-signup-workspaces th:nth-child(2) { width: 15%; }
.platform-admin-b3-signup-workspaces th:nth-child(3) { width: 18%; }
.platform-admin-b3-signup-workspaces th:nth-child(4) { width: 34%; }
.platform-admin-b3-signup-workspaces th:nth-child(5) { width: 12%; }
.platform-admin-b3-signup-workspaces th:nth-child(6) { width: 13%; }
.platform-admin-b3-signup-workspaces td { line-height: 1.5; }
.platform-admin-b3-signup-workspaces td select { width: 100%; min-height: 35px; }
.platform-admin-b3-signup-workspaces td small { overflow-wrap: anywhere; }
.platform-admin-b3-signup-workspaces [data-platform-admin-b3-signup-select] { width: 18px; height: 18px; accent-color: var(--r4-ui-accent, #2563eb); }
.platform-admin-b3-signup-workspaces [data-platform-admin-b3-signup-message] { display: block; margin-top: 5px; }
.platform-admin-b3-signup-workspaces .is-pending { color: var(--pa-r4-warning, #e6ad52); }
.platform-admin-b3-signup-actions { flex-wrap: wrap; }
.platform-admin-b3-signup-actions > span { flex: 1; }
.platform-admin-b3-signup-bottom-actions { display: flex; justify-content: flex-end; gap: 12px; }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-page[data-platform-admin-b3-surface="registration-agreements"] > .platform-admin-b3-table-card { min-height: 300px; }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-page[data-platform-admin-b3-surface="registration-agreements"] > .platform-admin-b3-table-card > header { align-items: center; padding: 11px 16px; }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-page[data-platform-admin-b3-surface="registration-agreements"] > .platform-admin-b3-table-card :is(th, td) { padding: 7px 12px; }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-page[data-platform-admin-b3-surface="registration-agreements"] > .platform-admin-b3-table-card > footer { padding: 8px 12px; }
.platform-admin-b3-signup-bottom-actions button { min-width: 112px; }
#meifanPlatformWorkspaceC2Root .platform-admin-b3-signup-bottom-actions [data-platform-admin-b3-signup-save] { color: var(--r4-ui-selected-ink); background: var(--r4-ui-selected); border-color: var(--r4-ui-accent); }
.platform-admin-b3-signup-legacy { padding: 8px 18px; margin: 0; }
.platform-admin-b3-signup-public-versions { margin: 0; color: var(--b3-muted); }
.platform-admin-b3-signup-public-versions > summary { cursor: pointer; font-size: 12px; }
.platform-admin-b3-signup-public-versions > .platform-admin-b3-agreement-layout { margin-top: 12px; }
.platform-admin-b3-signup-dialog-backdrop { position: fixed; z-index: 10030; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(3, 15, 35, .7); }
.platform-admin-b3-signup-dialog { width: min(100%, 480px); display: grid; gap: 12px; padding: 22px; border: 1px solid var(--r4-ui-line, #466b93); border-radius: 12px; color: var(--r4-ui-ink, #fff); background: var(--r4-ui-panel, #102d51); }
.platform-admin-b3-signup-dialog h3, .platform-admin-b3-signup-dialog p { margin: 0; }
.platform-admin-b3-signup-dialog footer { display: flex; justify-content: flex-end; gap: 10px; }
@media (max-width: 800px) {
  #meifanPlatformWorkspaceC2Root .platform-admin-b3-signup-master { grid-template-columns: minmax(0, 1fr); }
  .platform-admin-b3-signup-header-actions { flex-wrap: wrap; justify-content: flex-start; }
  .platform-admin-b3-signup-workspaces table { min-width: 860px; }
}
/* NOTIF-06 内容待复核（有效定稿图 06；框架补充 A11）。令牌沿用平台后台 --r4-ui-*；≤980px 一次只显示队列或详情一栏（data-pane）。 */
.content-review-r1 { display: grid; gap: 14px; padding: 16px; color: var(--r4-ui-ink, #202d28); }
.content-review-r1-scope { display: grid; gap: 4px; padding: 14px 18px; border: 1px solid var(--r4-ui-line, #758a7e); border-radius: 12px; background: var(--r4-ui-soft, #f0f4f1); }
.content-review-r1-scope strong { font-size: 16px; }
.content-review-r1-scope span { color: var(--r4-ui-muted, #526159); font-size: 13px; }
.content-review-r1-body { display: grid; grid-template-columns: minmax(260px, 5fr) minmax(0, 8fr); gap: 16px; align-items: start; }
.content-review-r1-queue,
.content-review-r1-detail { min-width: 0; display: grid; gap: 14px; align-content: start; padding: 18px; border: 1px solid var(--r4-ui-line, #758a7e); border-radius: 12px; background: var(--r4-ui-panel, #fff); }
.content-review-r1 h2 { margin: 0; font-size: 18px; color: var(--r4-ui-ink, #202d28); }
.content-review-r1 h3 { margin: 0; font-size: 14px; color: var(--r4-ui-ink, #202d28); }
.content-review-r1-note { margin: 0; color: var(--r4-ui-muted, #526159); font-size: 13px; }
.content-review-r1-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.content-review-r1-item { width: 100%; display: grid; gap: 6px; padding: 14px 16px; border: 1px solid var(--r4-ui-line, #758a7e); border-radius: 12px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.content-review-r1-item[aria-current="true"] { background: var(--r4-ui-soft, #f0f4f1); border-color: var(--r4-ui-accent, #126447); box-shadow: inset 0 0 0 1px var(--r4-ui-accent, #126447); }
.content-review-r1-item strong { font-size: 15px; }
.content-review-r1-item span { color: var(--r4-ui-muted, #526159); font-size: 13px; overflow-wrap: anywhere; }
.content-review-r1-pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--r4-ui-muted, #526159); font-size: 13px; }
.content-review-r1-pager button,
.content-review-r1-back { min-height: 40px; padding: 0 16px; border: 1px solid var(--r4-ui-line, #758a7e); border-radius: 10px; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.content-review-r1-pager button:disabled { opacity: .5; cursor: default; }
.content-review-r1-back { display: none; justify-self: start; }
.content-review-r1-detail > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.content-review-r1-badge { padding: 4px 12px; border: 1px solid var(--r4-ui-accent, #126447); border-radius: 999px; color: var(--r4-ui-accent, #126447); font-size: 12px; white-space: nowrap; }
.content-review-r1-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 0; }
.content-review-r1-meta div { min-width: 0; display: grid; gap: 4px; }
.content-review-r1-meta dt { color: var(--r4-ui-muted, #526159); font-size: 12px; }
.content-review-r1-meta dd { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.content-review-r1-summary { padding: 16px 18px; border: 1px solid var(--r4-ui-line, #758a7e); border-radius: 12px; background: var(--r4-ui-soft, #f0f4f1); font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
.content-review-r1-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.content-review-r1-chips li { padding: 4px 12px; border: 1px solid var(--r4-ui-accent, #126447); border-radius: 999px; color: var(--r4-ui-accent, #126447); font-size: 12px; overflow-wrap: anywhere; }
.content-review-r1-opinion { display: grid; gap: 8px; font-size: 14px; font-weight: 600; }
.content-review-r1-opinion textarea { width: 100%; min-height: 112px; box-sizing: border-box; padding: 14px 16px; border: 1px solid var(--r4-ui-line, #758a7e); border-radius: 12px; background: var(--r4-ui-soft, #f0f4f1); color: inherit; font: inherit; font-weight: 400; resize: vertical; }
.content-review-r1-opinion textarea:disabled { opacity: .7; }
.content-review-r1-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 14px; }
.content-review-r1-actions > button,
.content-review-r1-menu > summary { min-height: 44px; box-sizing: border-box; display: inline-flex; align-items: center; padding: 0 22px; border: 1px solid var(--r4-ui-line, #758a7e); border-radius: 12px; background: transparent; color: inherit; font: inherit; font-weight: 600; cursor: pointer; list-style: none; }
.content-review-r1-menu > summary::-webkit-details-marker { display: none; }
.content-review-r1-actions > button:disabled { opacity: .6; cursor: default; }
.content-review-r1-menu ul { display: grid; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.content-review-r1-menu li button { width: 100%; min-height: 40px; padding: 0 16px; border: 1px solid var(--r4-ui-line, #758a7e); border-radius: 10px; background: transparent; color: inherit; font: inherit; text-align: left; }
.content-review-r1-menu li button:disabled { opacity: .6; cursor: default; }
.content-review-r1-foot { margin: 0; color: var(--r4-ui-muted, #526159); font-size: 12px; }
/* FE-2：写动作反馈／确认条／单条聚焦（05→06 openReview） */
.content-review-r1[data-focus="true"] .content-review-r1-queue { display: none; }
.content-review-r1[data-focus="true"] .content-review-r1-body { grid-template-columns: minmax(0, 1fr); }
.content-review-r1-open-queue { justify-self: start; min-height: 40px; padding: 0 16px; border: 1px solid var(--r4-ui-line, #758a7e); border-radius: 10px; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.content-review-r1-message { margin: 0; min-height: 1.4em; color: var(--r4-ui-muted, #526159); font-size: 13px; overflow-wrap: anywhere; }
.content-review-r1-message[data-kind="error"] { color: var(--pa-r4-danger, #b3261e); }
.content-review-r1-message[data-kind="ok"] { color: var(--r4-ui-accent, #126447); }
.content-review-r1-confirm { display: grid; gap: 10px; padding: 14px 16px; border: 1px solid var(--r4-ui-accent, #126447); border-radius: 12px; background: var(--r4-ui-soft, #f0f4f1); }
.content-review-r1-confirm label { display: grid; gap: 6px; font-size: 13px; }
.content-review-r1-confirm textarea { width: 100%; min-height: 80px; box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--r4-ui-line, #758a7e); border-radius: 10px; background: var(--r4-ui-panel, #fff); color: inherit; font: inherit; resize: vertical; }
.content-review-r1-confirm small { color: var(--r4-ui-muted, #526159); font-size: 12px; }
.content-review-r1-confirm-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.content-review-r1-confirm-actions button { min-height: 40px; padding: 0 18px; border: 1px solid var(--r4-ui-line, #758a7e); border-radius: 10px; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.content-review-r1-confirm-actions button:disabled { opacity: .5; cursor: default; }
@media (max-width: 980px) {
  .content-review-r1 { padding: 12px; }
  .content-review-r1-body { grid-template-columns: minmax(0, 1fr); }
  .content-review-r1[data-pane="queue"] .content-review-r1-detail { display: none; }
  .content-review-r1[data-pane="detail"] .content-review-r1-queue { display: none; }
  .content-review-r1-back { display: inline-flex; align-items: center; }
}

/* WO2020 NOTIF-06B: additive masked-excerpt recheck facts, original verdict/actions remain. */
.content-review-r1-recheck { display: grid; gap: 10px; padding: 16px 18px; border: 1px solid var(--r4-ui-line, #758a7e); border-radius: 12px; background: var(--r4-ui-soft, #f0f4f1); overflow-wrap: anywhere; }
.content-review-r1-recheck-status { margin: 0; font-size: 18px; font-weight: 700; color: var(--r4-ui-accent, #126447); }
.content-review-r1-recheck[data-phase="running"] .content-review-r1-recheck-status { color: var(--warning, #e4bf78); }
.content-review-r1-recheck[data-phase="error"] .content-review-r1-recheck-status,
.content-review-r1-recheck[data-phase="unconfirmed"] .content-review-r1-recheck-status { color: var(--danger, #b3402f); }
.content-review-r1-recheck-basis { margin: 0; padding-left: 10px; border-left: 3px solid var(--r4-ui-accent, #126447); color: var(--r4-ui-muted, #526159); font-size: 13px; line-height: 1.8; }
.content-review-r1-recheck [data-content-review-recheck-previous] { display: grid; gap: 8px; }
/* PARTNER-CENTER-BATCH2-FE · 业务合作中心壳层（58 分片配套）
   左侧导航 + 主区 outlet。保留角色壳结构，R587 R4 在文末接入共享明暗主题。 */
.pcs-shell { --pcs-green: #16382c; --pcs-green-2: #1c4a3a; --pcs-line: #e3e0d8; --pcs-ink: #2a2a26; --pcs-muted: #8a877e; --pcs-bg: #f6f5f1; --pcs-teal: #2f7a5f;
  display: flex; min-height: 100vh; background: var(--pcs-bg); color: var(--pcs-ink); font-family: inherit; }
.pcs-shell * { box-sizing: border-box; }
.pcs-side { width: 220px; flex: 0 0 220px; background: var(--pcs-green); color: #e8efe9; display: flex; flex-direction: column; padding: 18px 12px; }
.pcs-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; border-bottom: 1px solid rgba(255, 255, 255, .12); margin-bottom: 14px; }
.pcs-brand-mark { flex: 0 0 auto; width: 28px; height: auto; display: block; }
.pcs-brand-text { display: flex; flex-direction: column; min-width: 0; }
.pcs-brand b { display: block; font-size: 15px; font-weight: 700; color: #fff; line-height: 1.25; }
.pcs-brand small { display: block; font-size: 11px; color: rgba(232, 239, 233, .6); margin-top: 3px; }
.pcs-nav { display: flex; flex-direction: column; gap: 12px; flex: 1; }
.pcs-nav-group { display: flex; flex-direction: column; gap: 2px; }
.pcs-nav-group-label { display: block; padding: 0 12px 4px; color: rgba(232, 239, 233, .48); font-size: 10px; letter-spacing: .08em; }
.pcs-nav-item { display: flex; align-items: center; padding: 10px 12px; border-radius: 9px; color: rgba(232, 239, 233, .82); font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; user-select: none; }
/* R5 16图对齐: 一级导航每项前小圆点（定稿图 ● 圆点，选中态亮起）；色值复用本分片既有色板，不新造颜色。 */
.pcs-nav-item::before { content: ""; flex: 0 0 auto; width: 6px; height: 6px; border-radius: 50%; background: rgba(232, 239, 233, .48); margin-right: 9px; }
.pcs-nav-label { display: inline-block; white-space: nowrap; }
.pcs-nav-item:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.pcs-nav-item.is-active { background: var(--pcs-green-2); color: #fff; box-shadow: inset 3px 0 0 #7fd4a8; }
.pcs-nav-item.is-active::before { background: #7fd4a8; box-shadow: 0 0 6px rgba(127, 212, 168, .9); }
.pcs-nav-item.is-disabled { opacity: .45; cursor: not-allowed; }
.pcs-me { display: flex; align-items: center; gap: 9px; padding: 10px 8px; border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 14px; width: 100%; border-left: 0; border-right: 0; border-bottom: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; font-family: inherit; border-radius: 10px; }
.pcs-me:hover { background: rgba(255, 255, 255, .07); }
.pcs-me:focus-visible { outline: 2px solid #d9c184; outline-offset: 2px; }
.pcs-me-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--pcs-green-2); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; flex: 0 0 34px; }
.pcs-me-who span { display: block; font-size: 13px; font-weight: 600; color: #fff; }
.pcs-me-who small { display: block; font-size: 11px; color: rgba(232, 239, 233, .6); }
.pcs-main { flex: 1; min-width: 0; overflow-y: auto; }
.pcs-empty { padding: 60px 32px; max-width: 560px; }
.pcs-empty h2 { margin: 0 0 10px; font-size: 19px; font-weight: 700; }
.pcs-empty p { color: var(--pcs-muted); font-size: 14px; line-height: 1.65; margin: 0 0 12px; }
.pcs-empty small { color: var(--pcs-muted); font-size: 12px; }
.pcs-status { position: fixed; left: 232px; bottom: 12px; min-height: 18px; font-size: 12px; color: var(--pcs-teal); }
@media (max-width: 720px) {
  .pcs-shell { display: block; min-height: 100dvh; }
  .pcs-side { position: sticky; top: 0; z-index: 50; width: 100%; height: auto; padding: 8px; display: block; }
  .pcs-brand { display: flex; align-items: center; gap: 8px; padding: 2px 4px 8px; margin-bottom: 6px; }
  .pcs-brand-mark { width: 20px; }
  .pcs-brand b { font-size: 13px; }
  .pcs-brand small { margin: 0; font-size: 10px; }
  .pcs-nav { display: flex; flex-direction: row; gap: 12px; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; padding-bottom: 2px; }
  .pcs-nav-group { flex: 0 0 auto; display: flex; flex-direction: row; gap: 4px; align-items: center; }
  .pcs-nav-group + .pcs-nav-group { padding-left: 10px; border-left: 1px solid rgba(255, 255, 255, .15); }
  .pcs-nav-group-label { padding: 0 2px; writing-mode: horizontal-tb; white-space: nowrap; }
  .pcs-nav-item { min-height: 44px; display: inline-flex; align-items: center; padding: 8px 12px; }
  .pcs-me { display: none; }
  .pcs-main { min-height: calc(100dvh - 100px); overflow: visible; }
  .pcs-status { left: 12px; right: 12px; bottom: 8px; }
}
/* 第564单 R564-1 首屏接管(2026-08-28): 业务合作中心在场态(partner_console)下装修主壳从渲染/hit-test 移除,
   业务挂载根从 viewport 顶部独占——不靠 scrollIntoView, 追加在下方的旧形态退役。 */
body[data-account-auth-state="partner_console"] .app-shell { display: none; }
body[data-account-auth-state="partner_console"] #meifanDedicatedLoginRoot { display: block; min-height: 100vh; min-height: 100dvh; }
/* 第580单域B(A02): 业务合作中心账号卡弹层(账号/空间/主题/订阅/退出) */
/* 第587单域B: 桌面侧栏钉在视口(定稿: 身份卡固定在视口左下). 原 position:relative 让侧栏随长页拉高, 身份卡被推到页底看不见;
   sticky 同样是定位元素, 账号卡弹层的 absolute 仍以侧栏为包含块. 移动端(≤720px)保持自己的 sticky 顶栏形态. */
.pcs-side { position: sticky; top: 0; align-self: flex-start; height: 100vh; height: 100dvh; overflow-y: auto; }
@media (max-width: 720px) { .pcs-side { align-self: auto; height: auto; overflow-y: visible; } }
.pcs-account-menu-r580 { position: absolute; left: 10px; bottom: 64px; z-index: 220; min-width: 196px; background: #17352b; border: 1px solid rgba(255, 255, 255, .14); border-radius: 12px; padding: 6px; box-shadow: 0 12px 32px rgba(0, 0, 0, .35); }
.pcs-account-menu-r580-head { padding: 8px 10px 10px; border-bottom: 1px solid rgba(255, 255, 255, .1); margin-bottom: 4px; }
.pcs-account-menu-r580-head b { display: block; font-size: 13px; color: #fff; }
.pcs-account-menu-r580-head small { display: block; font-size: 11px; color: rgba(232, 239, 233, .62); margin-top: 2px; }
.pcs-account-menu-r580 [role="menuitem"] { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 8px 10px; border: 0; background: transparent; color: #eaf3ec; font-size: 13px; text-align: left; border-radius: 8px; cursor: pointer; font-family: inherit; }
.pcs-account-menu-r580 [role="menuitem"]:hover { background: rgba(255, 255, 255, .08); }
.pcs-account-menu-r580 [role="menuitem"]:focus-visible { outline: 2px solid #d9c184; outline-offset: 1px; }
.pcs-account-menu-r580-danger { color: #f2b8b0 !important; }

/* R587 R4 product readability: theme only; role branches and navigation stay in 58 JS. */
html[data-meifan-theme] body .pcs-shell {
  --pcs-ink: var(--r4-ui-ink); --pcs-muted: var(--r4-ui-muted);
  --pcs-line: var(--r4-ui-line); --pcs-teal: var(--r4-ui-accent);
  color: var(--pcs-ink); background: var(--r4-ui-bg);
}
html[data-meifan-theme="tech-glass-blue"] body .pcs-shell {
  background: radial-gradient(ellipse at 12% 0, rgba(50,126,191,.14), transparent 50%), var(--r4-ui-bg);
}
html[data-meifan-theme] body .pcs-side {
  background: var(--r4-ui-glass); color: var(--pcs-ink);
  border-right: 1px solid var(--pcs-line);
  box-shadow: inset 0 1px 0 rgba(207,235,255,.16);
}
/* Day keeps its established dark sidebar; these values stay inside that region. */
html[data-meifan-theme="day"] body .pcs-side {
  --pcs-ink: #edf5f0; --pcs-muted: #becfc4; --pcs-line: #748e7f;
  --r4-ui-ink: #edf5f0; --r4-ui-muted: #becfc4; --r4-ui-line: #748e7f;
  --r4-ui-panel: #17352b; --r4-ui-glass: #17352b; --r4-ui-soft: #214332;
  --r4-ui-accent: #a5d6bb; --r4-ui-selected: #082819; --r4-ui-selected-ink: #ffffff;
  --r4-ui-hover: #2b5140; --r4-ui-focus: #c5ead2; --r4-ui-disabled-bg: #214332;
}
html[data-meifan-theme] body .pcs-shell :is(.pcs-brand,.pcs-me,.pcs-account-menu-r580-head) { border-color: var(--pcs-line); }
html[data-meifan-theme] body .pcs-shell :is(.pcs-brand b,.pcs-me-who span,.pcs-account-menu-r580-head b) { color: var(--pcs-ink); }
html[data-meifan-theme] body .pcs-shell :is(.pcs-brand small,.pcs-nav-group-label,.pcs-me-who small,.pcs-account-menu-r580-head small) { color: var(--pcs-muted); }
html[data-meifan-theme] body .pcs-nav-item { border: 1px solid transparent; color: var(--pcs-ink); }
html[data-meifan-theme] body .pcs-nav-item .pcs-nav-label { color: inherit; }
html[data-meifan-theme] body .pcs-nav-item::before { background: var(--pcs-muted); box-shadow: none; }
html[data-meifan-theme] body .pcs-nav-item:is(.is-active,[aria-current="page"]) {
  background: var(--r4-ui-selected); color: var(--r4-ui-selected-ink);
  border-color: var(--r4-ui-accent); box-shadow: inset 3px 0 0 var(--r4-ui-accent);
}
html[data-meifan-theme] body .pcs-nav-item:is(.is-active,[aria-current="page"])::before { background: var(--r4-ui-accent); box-shadow: 0 0 6px var(--r4-ui-accent); }
html[data-meifan-theme] body .pcs-nav-item.is-disabled {
  opacity: 1; color: var(--pcs-muted); background: var(--r4-ui-soft);
  border-color: var(--pcs-line); border-style: dashed;
}
html[data-meifan-theme] body .pcs-me-avatar { background: var(--r4-ui-selected); color: var(--r4-ui-selected-ink); }
html[data-meifan-theme] body .pcs-account-menu-r580 {
  background: var(--r4-ui-panel); border-color: var(--pcs-line); color: var(--pcs-ink);
}
html[data-meifan-theme] body .pcs-account-menu-r580 [role="menuitem"] { color: var(--pcs-ink); }
html[data-meifan-theme] body .pcs-shell :is(a,button,[role="menuitem"]):focus-visible {
  outline: 2px solid var(--r4-ui-focus); outline-offset: 2px;
}
@media (hover: hover) and (pointer: fine) {
  html[data-meifan-theme] body .pcs-nav-item:hover:not(.is-active):not(.is-disabled):not([aria-current="page"]),
  html[data-meifan-theme] body .pcs-shell :is(.pcs-me,.pcs-account-menu-r580 [role="menuitem"]):hover { background: var(--r4-ui-hover); }
}
@media (max-width: 720px) {
  html[data-meifan-theme] body .pcs-side { border-right: 0; border-bottom: 1px solid var(--pcs-line); }
  html[data-meifan-theme] body .pcs-nav-group + .pcs-nav-group { border-color: var(--pcs-line); }
  html[data-meifan-theme] body .pcs-nav { padding: 3px 3px 5px; }
}
.pwb2-shell{--pwb-ink:#14231b;--pwb-muted:#6d7972;--pwb-line:#e2e9e5;--pwb-green:#176b47;min-height:100%;padding:30px 34px 56px;background:linear-gradient(180deg,#f3f8f4 0,#f8faf8 180px);color:var(--pwb-ink);font-family:"Microsoft YaHei","PingFang SC",sans-serif}.pwb2-shell *{box-sizing:border-box}.pwb2-head{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:24px}.pwb2-kicker{margin:0 0 7px!important;color:#3f8361!important;font-size:10px!important;font-weight:800;letter-spacing:.16em}.pwb2-head h2{margin:0;font-size:29px;letter-spacing:-.03em}.pwb2-head p{margin:7px 0 0;color:var(--pwb-muted);font-size:14px}.pwb2-refresh{min-height:39px;padding:0 15px;border:1px solid #cfdad3;border-radius:10px;background:rgba(255,255,255,.8);color:#385044;cursor:pointer;font-weight:700}.pwb2-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px;margin-bottom:18px}.pwb2-card{position:relative;min-height:132px;padding:18px;border:1px solid var(--pwb-line);border-radius:15px;background:rgba(255,255,255,.9);box-shadow:0 8px 24px rgba(39,66,51,.045);overflow:hidden}.pwb2-card:after{content:"";position:absolute;right:-18px;bottom:-35px;width:90px;height:90px;border-radius:50%;background:#edf7f0}.pwb2-card small{position:relative;z-index:1;display:flex;align-items:center;gap:6px;color:#58665e;font-size:12px;font-weight:700}.pwb2-card-icon{width:16px;height:16px;flex:none}.pwb2-card>p{position:absolute;z-index:1;bottom:14px;left:18px;margin:0;color:#929b96;font-size:11px}.pwb2-metric-state{position:relative;z-index:1;display:block;margin-top:12px;font-size:28px;font-weight:800;line-height:1.2}.pwb2-metric-state.pwb2-loading{color:#98a19c;font-size:13px;font-weight:500}.pwb2-metric-state.pwb2-error{color:#a5483e;font-size:12px;font-weight:600}.pwb2-metric-state.pwb2-error button{margin-left:4px;border:0;background:none;color:#176b47;cursor:pointer;text-decoration:underline}.pwb2-main-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(300px,.65fr);gap:18px;margin-bottom:18px}.pwb2-block{border:1px solid var(--pwb-line);border-radius:16px;background:#fff;box-shadow:0 8px 28px rgba(39,66,51,.04);overflow:hidden}.pwb2-block-head{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:18px 20px;border-bottom:1px solid var(--pwb-line)}.pwb2-block-head h3{margin:0;font-size:17px}.pwb2-block-head p{margin:5px 0 0;color:var(--pwb-muted);font-size:11px}.pwb2-table-head,.pwb2-row{display:grid;grid-template-columns:minmax(150px,1.1fr) minmax(70px,.55fr) minmax(90px,.65fr) 96px minmax(130px,1fr) 64px;gap:12px;align-items:center}.pwb2-table-head{padding:11px 18px;background:#fafbfa;color:#8a948f;font-size:11px;font-weight:700}.pwb2-row{padding:14px 18px;border-top:1px solid #edf1ee;font-size:13px}.pwb2-table-head+.pwb2-row{border-top:0}.pwb2-row b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pwb2-row small{display:block;margin-top:4px;color:var(--pwb-muted);font-size:11px}.pwb2-row time{color:#536159;font-size:12px}.pwb2-chip{display:inline-flex;padding:4px 8px;border-radius:99px;background:#eaf4ed;color:#286648;font-style:normal;font-size:11px;font-weight:700}.pwb2-link{border:0;background:transparent;color:var(--pwb-green);cursor:pointer;font-size:12px;font-weight:700}.pwb2-activity-list{padding:3px 18px}.pwb2-activity{display:grid;grid-template-columns:10px 1fr;gap:11px;padding:15px 0;border-bottom:1px solid #edf1ee}.pwb2-activity:last-child{border-bottom:0}.pwb2-activity-dot{width:8px;height:8px;margin-top:6px;border-radius:50%;background:#4b9b72;box-shadow:0 0 0 4px #edf7f1}.pwb2-activity b{font-size:13px}.pwb2-activity p{margin:5px 0;color:#526159;font-size:12px;line-height:1.5}.pwb2-activity time{color:#98a19c;font-size:10px}.pwb2-summary-block .pwb2-block-head{background:#fbfcfb}.pwb2-periods{display:flex;padding:3px;border:1px solid var(--pwb-line);border-radius:9px;background:#fff}.pwb2-periods button{padding:7px 13px;border:0;border-radius:6px;background:transparent;color:#738078;cursor:pointer;font-size:12px;font-weight:700}.pwb2-periods button.is-active{background:var(--pwb-green);color:#fff}.pwb2-aggregate{display:grid;grid-template-columns:repeat(2,1fr);gap:1px;background:var(--pwb-line);border-bottom:1px solid var(--pwb-line)}.pwb2-aggregate>div{padding:18px 20px;background:#fff}.pwb2-aggregate small{display:block;color:var(--pwb-muted);font-size:11px}.pwb2-aggregate b{display:block;margin-top:7px;font-size:20px}.pwb2-breakdown{padding:0 20px 14px}.pwb2-breakdown>div{display:grid;grid-template-columns:minmax(160px,1.4fr) repeat(3,minmax(110px,.7fr));gap:12px;padding:12px 0;border-bottom:1px solid #edf1ee;font-size:12px}.pwb2-breakdown-head{color:#8a948f;font-size:11px!important;font-weight:700}.pwb2-state{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:155px;padding:25px;color:var(--pwb-muted);text-align:center}.pwb2-state p{margin:0 0 13px;font-size:12px;line-height:1.6}.pwb2-state.pwb2-error{background:#fff9f7;color:#9a493e}.pwb2-spinner{width:22px;height:22px;margin-bottom:10px;border:2px solid #dbe6df;border-top-color:var(--pwb-green);border-radius:50%;animation:pwb-spin .75s linear infinite}.pwb2-btn{min-height:34px;padding:0 12px;border:1px solid #ced9d2;border-radius:8px;background:#fff;color:#35473e;cursor:pointer;font-weight:700}.pwb2-status:empty{display:none}@keyframes pwb-spin{to{transform:rotate(360deg)}}@media(max-width:1000px){.pwb2-cards{grid-template-columns:repeat(2,1fr)}.pwb2-main-grid{grid-template-columns:1fr}}@media(max-width:680px){.pwb2-shell{padding:22px 16px 44px}.pwb2-head{align-items:flex-start}.pwb2-cards{grid-template-columns:1fr 1fr}.pwb2-card{min-height:120px}.pwb2-table-head{display:none}.pwb2-row{grid-template-columns:1fr auto}.pwb2-row>*:nth-child(2),.pwb2-row>*:nth-child(3),.pwb2-row>*:nth-child(4){grid-column:1}.pwb2-row>*:last-child{grid-column:2;grid-row:1/4}.pwb2-aggregate{grid-template-columns:1fr}.pwb2-breakdown{overflow-x:auto}.pwb2-breakdown>div{min-width:580px}.pwb2-block-head{align-items:flex-start;flex-direction:column}}@media(max-width:430px){.pwb2-cards{grid-template-columns:1fr}.pwb2-head{flex-direction:column}.pwb2-refresh{width:100%}}
.pwb2-metric-state.pwb2-empty{color:#98a19c;font-size:13px;font-weight:500}
.pwb2-redemption-block{margin-bottom:18px}.pwb2-prd-form{display:grid;gap:12px}.pwb2-prd-field{display:grid;gap:6px}.pwb2-prd-field span{font-size:12px;font-weight:700;color:#58665e}.pwb2-prd-field select{min-height:38px;padding:0 10px;border:1px solid #cfdad3;border-radius:10px;background:#fff;font-size:13px}.pwb2-prd-products{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:10px}.pwb2-prd-product{display:grid;gap:4px;padding:12px;border:1px solid var(--pwb-line);border-radius:12px;background:#fff;text-align:left;cursor:pointer}.pwb2-prd-product:disabled{opacity:.55;cursor:not-allowed}.pwb2-prd-product.is-selected{border-color:var(--pwb-green);box-shadow:0 0 0 2px rgba(23,107,71,.15)}.pwb2-prd-product small{color:var(--pwb-muted)}.pwb2-prd-once{margin-bottom:14px;padding:14px;border:1px solid #ecd9a8;border-radius:12px;background:#fffaf0}.pwb2-prd-once h4{margin:0 0 8px}.pwb2-prd-once p{margin:6px 0;color:#6d5a2e;font-size:12px}.pwb2-prd-once-code{margin:8px 0;padding:10px 12px;border:1px dashed #c9a544;border-radius:10px;background:#fff;font-family:ui-monospace,Consolas,monospace;font-size:16px;letter-spacing:.06em;word-break:break-all}.pwb2-prd-once div{display:flex;gap:10px}.pwb2-prd-error{min-height:16px;margin:0;color:#a5483e;font-size:12px}.pwb2-prd-actions{display:flex;gap:10px}.pwb2-prd-head,.pwb2-prd-row{grid-template-columns:1fr .9fr 1.1fr .8fr 1.1fr .6fr 1fr .5fr}.pwb2-link.is-danger{color:#a5483e}@media(max-width:720px){.pwb2-prd-products{grid-template-columns:1fr}.pwb2-prd-once div{flex-direction:column}.pwb2-prd-head{display:none}.pwb2-prd-row{grid-template-columns:1fr;gap:6px}}
.pwb2-table-head{color:#5a655f}
.pwb2-btn.primary{background:var(--pwb-green);border-color:var(--pwb-green);color:#fff}
/* 卡24: 「当前发码权限」状态卡 + 兑换码列表新增两列(权益期限/兑换失效时间); 颜色只复用既有变量 */
.pwb2-prd-perm{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:14px 20px 0;padding:10px 14px;border:1px dashed var(--pwb-line);border-radius:10px}
.pwb2-prd-perm small{color:var(--pwb-muted);font-size:11px;font-weight:700}
.pwb2-prd-perm p{margin:0;color:var(--pwb-muted);font-size:11px;line-height:1.6;flex:1;min-width:200px}
.pwb2-chip.pwb2-chip-off{background:transparent;border:1px solid var(--pwb-line);color:var(--pwb-muted)}

/* R5 BIZ-02: 头部三钮 + 关联工作台筛选(数据面未就绪→禁用并诚实标注) + 订阅业绩/福利记录双栏 */
.pwb2-head-side{display:grid;gap:10px;justify-items:end}
.pwb2-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.pwb2-filter{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--pwb-muted)}
.pwb2-filter select{min-height:32px;padding:0 8px;border:1px solid #cfdad3;border-radius:8px;background:#fff;font-size:12px;color:var(--pwb-ink)}
.pwb2-filter small{color:var(--pwb-muted);font-size:11px}
.pwb2-duo{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px;margin-bottom:18px}
.pwb2-note{margin:0;padding:12px 20px 16px;border-top:1px dashed var(--pwb-line);color:var(--pwb-muted);font-size:11px;line-height:1.6}
.pwb2-hint{display:block;margin-top:6px;color:var(--pwb-muted);font-size:11px;font-weight:400}
.pwb2-breakdown.pwb2-welfare{padding:14px 20px 16px}
.pwb2-breakdown.pwb2-welfare>div{grid-template-columns:minmax(160px,1.4fr) minmax(110px,.7fr)}
@media(max-width:1000px){.pwb2-duo{grid-template-columns:1fr}}
@media(max-width:680px){.pwb2-head-side{justify-items:stretch;width:100%}.pwb2-actions{justify-content:flex-start}.pwb2-filter{flex-wrap:wrap}}

/* D2 避让: AI 悬浮球(#r14-operator position:fixed;right:20px;bottom:20px;球52px, z-index:9000)默认停右下,
   兑换码区(本页最后一个区块)头行右侧「我的兑换码」按钮可能被压。球是共享组件(31 分片)不动本体,
   本页壳底安全留白 132px(20+52+60 余量), 保证该操作区总能滚出球的覆盖区, 按钮文字完整可点。 */
.pwb2-shell{padding-bottom:132px}

/* R587 R4: the workbench inherits the product theme, including honest data states. */
/* The public enter() compatibility path can render directly into the login root. */
html[data-meifan-theme] #meifanDedicatedLoginRoot > .pwb2-shell {
  color-scheme: dark;
  --r4-ui-bg: #04101a; --r4-ui-ink: #eaf4ff; --r4-ui-muted: #aec5dd;
  --r4-ui-panel: rgba(14,38,66,.90); --r4-ui-soft: #142d48; --r4-ui-line: #668baa;
  --r4-ui-accent: #4bb3ff; --r4-ui-selected: #020f1e; --r4-ui-selected-ink: #edf7ff;
  --r4-ui-hover: #244869; --r4-ui-focus: #9bdbff;
  --r4-ui-glass: linear-gradient(118deg,rgba(196,229,255,.07),transparent 43%),rgba(14,38,66,.90);
  background: var(--r4-ui-bg); min-height: 100dvh;
}
html[data-meifan-theme="day"] #meifanDedicatedLoginRoot > .pwb2-shell {
  color-scheme: light;
  --r4-ui-bg: #f3f5f3; --r4-ui-ink: #202d28; --r4-ui-muted: #526159;
  --r4-ui-panel: #ffffff; --r4-ui-soft: #f0f4f1; --r4-ui-line: #758a7e;
  --r4-ui-accent: #126447; --r4-ui-selected: #174b39; --r4-ui-selected-ink: #ffffff;
  --r4-ui-hover: #e6eee8; --r4-ui-focus: #126447; --r4-ui-glass: #ffffff;
}
html[data-meifan-theme] body .pwb2-shell {
  --pwb-ink: var(--r4-ui-ink); --pwb-muted: var(--r4-ui-muted);
  --pwb-line: var(--r4-ui-line); --pwb-green: var(--r4-ui-accent);
  --pwb-danger: #ffb4aa; --pwb-warning: #f4d28e;
  color: var(--pwb-ink); background: transparent;
}
html[data-meifan-theme="day"] body .pwb2-shell { --pwb-danger: #9c302b; --pwb-warning: #785218; }
html[data-meifan-theme] body .pwb2-shell :is(h1,h2,h3,h4,strong,b,label,th,td,dt,dd,code,em,i,time) { color: var(--pwb-ink); }
html[data-meifan-theme] body .pwb2-shell :is(p,small,span) { color: var(--pwb-muted); }
html[data-meifan-theme] body .pwb2-shell .pwb2-kicker { color: var(--pwb-muted) !important; }
html[data-meifan-theme] body .pwb2-shell :is(.pwb2-card,.pwb2-block,.pwb2-periods,.pwb2-aggregate>div,.pwb2-prd-product) {
  color: var(--pwb-ink); background: var(--r4-ui-glass); border-color: var(--pwb-line);
  box-shadow: inset 0 1px 0 rgba(207,235,255,.12);
}
html[data-meifan-theme] body .pwb2-shell .pwb2-card:after { background: var(--r4-ui-soft); }
html[data-meifan-theme] body .pwb2-shell :is(.pwb2-table-head,.pwb2-summary-block .pwb2-block-head,.pwb2-chip) {
  color: var(--pwb-muted); background: var(--r4-ui-soft);
}
html[data-meifan-theme] body .pwb2-shell :is(.pwb2-row,.pwb2-activity,.pwb2-breakdown>div) { border-color: var(--pwb-line); }
html[data-meifan-theme] body .pwb2-shell :is(.pwb2-metric-state,.pwb2-activity b) { color: var(--pwb-ink); }
html[data-meifan-theme] body .pwb2-shell :is(.pwb2-metric-state.pwb2-loading,.pwb2-metric-state.pwb2-empty,.pwb2-breakdown-head) { color: var(--pwb-muted); }
html[data-meifan-theme] body .pwb2-shell .pwb2-activity-dot { background: var(--pwb-green); box-shadow: 0 0 0 4px var(--r4-ui-soft); }
html[data-meifan-theme] body .pwb2-shell .pwb2-spinner { border-color: var(--pwb-line); border-top-color: var(--pwb-green); }
html[data-meifan-theme] body .pwb2-shell :is(input,select,textarea) {
  color: var(--pwb-ink); background: var(--r4-ui-soft); border-color: var(--pwb-line);
}
html[data-meifan-theme] body .pwb2-shell :is(input,select,textarea)::placeholder { color: var(--pwb-muted); opacity: 1; }
html[data-meifan-theme] body .pwb2-shell :is(button,.pwb2-btn,.pwb2-link) { color: var(--pwb-green); }
html[data-meifan-theme] body .pwb2-shell :is(.pwb2-btn,.pwb2-btn.ghost,.pwb2-refresh) {
  color: var(--pwb-ink); background: var(--r4-ui-soft); border-color: var(--pwb-line);
}
html[data-meifan-theme] body .pwb2-shell .pwb2-btn.primary,
html[data-meifan-theme] body .pwb2-shell .pwb2-periods .is-active,
html[data-meifan-theme] body .pwb2-shell .pwb2-prd-product.is-selected {
  color: var(--r4-ui-selected-ink); background: var(--r4-ui-selected);
  border-color: var(--pwb-green); box-shadow: inset 3px 0 0 var(--pwb-green), inset 0 0 0 1px var(--pwb-green);
}
html[data-meifan-theme] body .pwb2-shell .pwb2-prd-product.is-selected :is(b,small,span) { color: var(--r4-ui-selected-ink); }
html[data-meifan-theme] body .pwb2-shell :is(button:disabled,input:disabled,select:disabled) {
  opacity: 1; color: var(--pwb-muted); background: var(--r4-ui-soft); border-color: var(--pwb-line); border-style: dashed; cursor: not-allowed;
}
html[data-meifan-theme] body .pwb2-shell .pwb2-prd-product:disabled :is(b,small,span) { color: var(--pwb-muted); }
html[data-meifan-theme] body .pwb2-shell :is(.pwb2-prd-once,.pwb2-state.pwb2-error) { background: var(--r4-ui-soft); border-color: var(--pwb-warning); }
html[data-meifan-theme] body .pwb2-shell .pwb2-prd-once p { color: var(--pwb-warning); }
html[data-meifan-theme] body .pwb2-shell .pwb2-prd-once-code { color: var(--pwb-ink); background: var(--r4-ui-panel); border-color: var(--pwb-warning); }
html[data-meifan-theme] body .pwb2-shell :is(.pwb2-prd-error,.pwb2-metric-state.pwb2-error,.pwb2-link.is-danger,.pwb2-state.pwb2-error p) { color: var(--pwb-danger); }
html[data-meifan-theme] body .pwb2-shell :is(button,input,select,textarea,a):focus-visible {
  outline: 2px solid var(--r4-ui-focus); outline-offset: 2px;
}
@media (hover: hover) and (pointer: fine) {
  html[data-meifan-theme] body .pwb2-shell :is(.pwb2-btn,.pwb2-refresh,.pwb2-periods button,.pwb2-prd-product):hover:not(:disabled):not(.is-active):not(.is-selected):not(.primary) { background: var(--r4-ui-hover); }
}
@media (max-width: 720px) {
  html[data-meifan-theme] body .pwb2-shell :is(.pwb2-btn,.pwb2-link,.pwb2-refresh,.pwb2-prd-field select,.pwb2-periods button,[data-pwb2-retry]) { min-height: 44px; }
}
@media (max-width: 720px), (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  html[data-meifan-theme="tech-glass-blue"] #meifanDedicatedLoginRoot > .pwb2-shell {
    --r4-ui-panel: #10263f; --r4-ui-glass: #10263f;
  }
}
@media (prefers-reduced-motion: reduce) {
  html[data-meifan-theme] body .pwb2-shell .pwb2-spinner { animation: none; }
}
/* PLATFORM-ADMIN-ACTIVITIES-R383-20260922 ·
   383 卡：活动与福利后台四页(ACT-LIST/EDIT/QUESTIONS/RECORDS, 定稿 R5-15)。
   色板沿用 .platform-admin-b3-page 的 --b3-* 变量(57 同族); ≤640 表格容器内横滚, 不整页溢出。 */

.settings-act383 .settings-act383-toolbar {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px;
}
.settings-act383 .settings-act383-filter {
  display: grid; gap: 4px; font-size: 12.5px; color: var(--b3-muted);
}
.settings-act383 .settings-act383-filter input,
.settings-act383 .settings-act383-filter select {
  min-width: 150px; padding: 7px 10px; border: 1px solid var(--b3-line); border-radius: 8px; background: var(--b3-soft); color: var(--b3-ink);
}
.settings-act383 .settings-act383-toolbar > button,
.settings-act383 .settings-act383-primary {
  padding: 8px 18px; border: 1px solid var(--b3-green); border-radius: 8px;
  background: var(--b3-green); color: #fff; cursor: pointer;
}
.settings-act383 .settings-act383-toolbar > button { background: transparent; color: var(--b3-green); }
.settings-act383 .settings-act383-primary[disabled], .settings-act383 button[disabled] { opacity: .55; cursor: not-allowed; }

.settings-act383 .settings-act383-table-wrap {
  overflow-x: auto; border: 1px solid var(--b3-line); border-radius: 10px; max-width: 100%;
}
.settings-act383 .settings-act383-table { width: 100%; border-collapse: collapse; min-width: 760px; font-size: 13px; }
.settings-act383 .settings-act383-table th,
.settings-act383 .settings-act383-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--b3-line); vertical-align: top; }
.settings-act383 .settings-act383-table thead th { color: var(--b3-muted); font-weight: 500; font-size: 12px; white-space: nowrap; }
.settings-act383 .settings-act383-table tbody tr.is-active { background: var(--b3-soft); }
.settings-act383 .settings-act383-ops { white-space: nowrap; }
.settings-act383 .settings-act383-link {
  background: none; border: none; padding: 2px 6px; color: var(--b3-green); cursor: pointer; font-size: 13px;
}
.settings-act383 .settings-act383-link.is-danger { color: var(--b3-bad); }
.settings-act383 .settings-act383-link[disabled] { opacity: .5; cursor: not-allowed; }

/* ACT-LIST 选中详情卡(定稿: 三信息块 + 四键值) */
.settings-act383 .settings-act383-detail {
  border: 1px solid var(--b3-line); border-radius: 12px; padding: 16px; display: grid; gap: 14px; background: var(--b3-soft);
}
.settings-act383 .settings-act383-detail > header { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.settings-act383 .settings-act383-detail-groups { display: grid; gap: 12px; }
.settings-act383 .settings-act383-detail-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.settings-act383 .settings-act383-detail-summary article { min-width: 0; border: 1px solid var(--b3-line); border-radius: 10px; padding: 12px; display: grid; align-content: start; gap: 4px; background: var(--b3-soft); color: var(--b3-ink); }
.settings-act383 .settings-act383-detail-summary strong { overflow-wrap: anywhere; }
.settings-act383 .settings-act383-detail-summary small { color: var(--b3-muted); font-size: 12px; }
.settings-act383 .settings-act383-detail-summary [data-act383-linked-notices] { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.settings-act383 .settings-act383-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.settings-act383 .settings-act383-detail-grid article {
  border: 1px solid var(--b3-line); border-radius: 10px; padding: 12px; display: grid; gap: 4px; background: #fff;
}
.settings-act383 .settings-act383-detail-grid small { color: var(--b3-green); font-size: 12px; }
.settings-act383 .settings-act383-detail-kv { display: flex; flex-wrap: wrap; gap: 24px; }
.settings-act383 .settings-act383-detail-kv span { display: grid; gap: 2px; }
.settings-act383 .settings-act383-detail-kv small { color: var(--b3-muted); }

/* ACT-EDIT 双列卡(定稿: 左基本信息 / 右奖励设置) */
.settings-act383 .settings-act383-edit-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.settings-act383 .settings-act383-edit-head h2 { margin: 0; font-size: 18px; }
.settings-act383 .settings-act383-edit-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.settings-act383 .settings-act383-edit-grid .platform-admin-b3-card { display: grid; gap: 12px; }
.settings-act383 .settings-act383-dates { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.settings-act383 .settings-act383-dates input, .settings-act383 .settings-act383-dates select {
  padding: 7px 10px; border: 1px solid var(--b3-line); border-radius: 8px; background: var(--b3-soft); color: var(--b3-ink);
}
.settings-act383 .settings-act383-ws { display: grid; gap: 6px; }
.settings-act383 .settings-act383-ws label { display: flex; align-items: center; gap: 6px; }
.settings-act383 .settings-act383-edit-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.settings-act383 .settings-act383-edit-actions button { padding: 9px 20px; border-radius: 8px; border: 1px solid var(--b3-green); background: transparent; color: var(--b3-green); cursor: pointer; }
.settings-act383 .settings-act383-edit-actions .settings-act383-primary { background: var(--b3-green); color: #fff; }

/* ACT-EDIT 福利动态列表(1–N) */
.settings-act383 .settings-act383-benefit {
  border: 1px solid var(--b3-line); border-radius: 10px; padding: 12px; display: grid; gap: 10px; background: #fff;
}
.settings-act383 .settings-act383-benefit-group { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--b3-line); border-radius: 10px; }
.settings-act383 .settings-act383-benefit-group h4 { margin: 0; font-size: 14px; color: var(--b3-ink); }
.settings-act383 .settings-act383-benefit-group h4 small,
.settings-act383 .settings-act383-benefit-group > p { color: var(--b3-muted); font-size: 12px; font-weight: 400; margin: 0; }
.settings-act383 .settings-act383-benefit-add { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.settings-act383 .settings-act383-benefit-add label { display: grid; gap: 4px; color: var(--b3-muted); font-size: 12px; }
.settings-act383 .settings-act383-benefit-add select { min-width: 154px; padding: 7px 10px; border: 1px solid var(--b3-line); border-radius: 8px; background: var(--b3-soft); color: var(--b3-ink); }
.settings-act383 .settings-act383-benefit-add > button { min-height: 34px; border: 1px solid var(--b3-green); border-radius: 8px; padding: 6px 12px; }
.settings-act383 .settings-act383-benefit > header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.settings-act383 .settings-act383-benefit-label { flex: 1 1 180px; min-width: 0; padding: 6px 10px; border: 1px solid var(--b3-line); border-radius: 8px; }
.settings-act383 .settings-act383-benefit-cfg { display: grid; gap: 8px; }
.settings-act383 .settings-act383-benefit-cfg label { display: grid; gap: 4px; font-size: 12.5px; color: var(--b3-muted); }
.settings-act383 .settings-act383-benefit-cfg input { padding: 7px 10px; border: 1px solid var(--b3-line); border-radius: 8px; }
.settings-act383 .settings-act383-applies { border: 1px solid var(--b3-line); border-radius: 8px; padding: 8px 10px; display: flex; gap: 14px; }
.settings-act383 .settings-act383-applies legend { font-size: 12px; color: var(--b3-muted); }
.settings-act383 .settings-act383-applies label { display: flex; align-items: center; gap: 6px; }
.settings-act383 .settings-act383-limits { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.settings-act383 .settings-act383-limits label { display: grid; gap: 4px; font-size: 12.5px; color: var(--b3-muted); }
.settings-act383 .settings-act383-limits input { padding: 7px 10px; border: 1px solid var(--b3-line); border-radius: 8px; }
.settings-act383 .settings-act383-questions-preview {
  border: 1px solid var(--b3-line); border-radius: 10px; padding: 12px; display: grid; gap: 8px; background: var(--b3-soft);
}
.settings-act383 .settings-act383-questions-preview header { display: flex; justify-content: space-between; align-items: center; }

/* ACT-QUESTIONS */
.settings-act383 .settings-act383-qrow {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  border: 1px solid var(--b3-line); border-radius: 10px; padding: 10px 12px; background: #fff; cursor: pointer; margin-bottom: 8px;
}
.settings-act383 .settings-act383-qrow.is-active { border-color: var(--b3-green); background: var(--b3-soft); }
.settings-act383 .settings-act383-qrow > strong { color: var(--b3-green); }
.settings-act383 .settings-act383-qrow > span { flex: 1 1 auto; min-width: 0; }
.settings-act383 .settings-act383-qopt { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.settings-act383 .settings-act383-qopt > strong { color: var(--b3-green); width: 16px; }
.settings-act383 .settings-act383-qopt > input { flex: 1 1 auto; min-width: 0; padding: 6px 10px; border: 1px solid var(--b3-line); border-radius: 8px; }
.settings-act383 .settings-act383-qans-ok { color: var(--b3-green); font-size: 12px; font-style: normal; }

/* ACT-RECORDS 展开/作废/订单三数/分页 */
.settings-act383 .settings-act383-expand-row > td { background: var(--b3-soft); }
.settings-act383 .settings-act383-expand { display: grid; gap: 10px; }
.settings-act383 .settings-act383-order {
  display: flex; flex-wrap: wrap; gap: 18px; border: 1px solid var(--b3-line); border-radius: 10px; padding: 10px 12px; background: #fff;
}
.settings-act383 .settings-act383-order strong { width: 100%; }
.settings-act383 .settings-act383-revoke-box { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.settings-act383 .settings-act383-revoke-box input { flex: 1 1 260px; padding: 7px 10px; border: 1px solid var(--b3-line); border-radius: 8px; }
.settings-act383 .settings-act383-revoke-box button { padding: 7px 14px; border-radius: 8px; border: 1px solid var(--b3-bad); background: transparent; color: var(--b3-bad); cursor: pointer; }
.settings-act383 .settings-act383-revoke-box button[disabled] { opacity: .55; cursor: not-allowed; }
.settings-act383 .settings-act383-pager { display: flex; align-items: center; gap: 10px; justify-content: flex-end; font-size: 12.5px; color: var(--b3-muted); }
.settings-act383 .settings-act383-pager button { border: 1px solid var(--b3-line); background: #fff; border-radius: 6px; padding: 4px 10px; cursor: pointer; }
.settings-act383 .settings-act383-pager button[disabled] { opacity: .5; cursor: not-allowed; }

/* ≤640: 表格容器内横滚(不整页溢出), 编辑双列收单列, 筛选行纵向 */
@media (max-width: 640px) {
  .settings-act383 .settings-act383-detail-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-act383 .settings-act383-edit-grid { grid-template-columns: minmax(0, 1fr); }
  .settings-act383 .settings-act383-detail-grid { grid-template-columns: minmax(0, 1fr); }
  .settings-act383 .settings-act383-filter { width: 100%; }
  .settings-act383 .settings-act383-filter input, .settings-act383 .settings-act383-filter select { width: 100%; min-width: 0; }
  .settings-act383 .settings-act383-limits { grid-template-columns: minmax(0, 1fr); }
  .settings-act383 .settings-act383-detail-kv { gap: 12px; }
}

/* 383-r2 AF-01/03/04/12 增量(定稿 20260922-R1; 色板沿 --b3-*, 不乱入颜色) */
.settings-act383 .settings-act383-drag { color: var(--b3-muted); cursor: grab; letter-spacing: -2px; user-select: none; }
.settings-act383 .settings-act383-benefit-kind-name { color: var(--b3-green); font-size: 13px; }
.settings-act383 .settings-act383-benefit-hint {
  margin: 0; padding: 8px 10px; border: 1px dashed var(--b3-line); border-radius: 8px;
  font-size: 12px; color: var(--b3-muted); background: var(--b3-soft);
}
.settings-act383 .settings-act383-benefit-limits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.settings-act383 .settings-act383-benefit-limits label { display: grid; gap: 4px; min-width: 0; font-size: 12.5px; color: var(--b3-muted); }
.settings-act383 .settings-act383-benefit-limits input { width: 100%; min-width: 0; padding: 7px 10px; border: 1px solid var(--b3-line); border-radius: 8px; }
.settings-act383 .settings-act383-benefit-limits small { grid-column: 1 / -1; color: var(--b3-muted); }
@media (max-width: 640px) { .settings-act383 .settings-act383-benefit-limits { grid-template-columns: minmax(0, 1fr); } }
.settings-act383 .settings-act383-side-hint {
  margin: 0; padding: 10px 12px; border: 1px solid var(--b3-line); border-radius: 8px;
  font-size: 12px; color: var(--b3-muted); line-height: 1.7; background: var(--b3-soft);
}
.settings-act383 .settings-act383-result-preview {
  margin: 0; padding: 10px 12px; border: 1px solid var(--b3-green); border-radius: 8px;
  font-size: 12.5px; color: var(--b3-green); background: var(--b3-soft);
}
.settings-act383 .settings-act383-coupon-mode { border: 1px solid var(--b3-line); border-radius: 8px; padding: 8px 10px; display: flex; gap: 14px; }
.settings-act383 .settings-act383-coupon-mode legend { font-size: 12px; color: var(--b3-muted); }
.settings-act383 .settings-act383-coupon-mode label { display: flex; align-items: center; gap: 6px; }
.settings-act383 .settings-act383-benefit.is-collapsed > header { border-bottom: none; }
.settings-act383 .settings-act383-detail-ws { margin: 0; font-size: 13px; }
.settings-act383 .settings-act383-subtab-note { margin-left: 12px; font-size: 12px; color: var(--b3-muted); }
.settings-act383 .settings-act383-local-draft {
  padding: 3px 10px; border: 1px solid var(--b3-green); border-radius: 999px;
  font-size: 11.5px; color: var(--b3-green); white-space: nowrap;
}
.settings-act383 .settings-act383-note-sub { width: 100%; font-size: 11.5px; color: var(--b3-muted); }
.settings-act383 .settings-act383-qset-actions { align-items: flex-start; }

/* AF-03 作废二次确认弹窗(逐字三句 + 原因必填) */
.settings-act383 .settings-act383-modal {
  position: fixed; inset: 0; z-index: 10050; background: rgba(15, 30, 40, .45);
  display: flex; align-items: center; justify-content: center; padding: 18px;
}
.settings-act383 .settings-act383-modal-card {
  width: min(440px, 100%); background: #fff; border: 1px solid var(--b3-line); border-radius: 12px;
  padding: 18px; display: grid; gap: 10px;
}
.settings-act383 .settings-act383-modal-card > header { display: flex; justify-content: space-between; align-items: center; font-size: 15px; }
.settings-act383 .settings-act383-modal-card p { margin: 0; font-size: 13px; color: var(--b3-muted); }
.settings-act383 .settings-act383-modal-card textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--b3-line); border-radius: 8px; }
.settings-act383 .settings-act383-modal-actions { display: flex; justify-content: flex-end; gap: 10px; }
.settings-act383 .settings-act383-modal-actions button { padding: 8px 16px; border-radius: 8px; border: 1px solid var(--b3-line); background: #fff; cursor: pointer; }
.settings-act383 .settings-act383-modal-actions button.is-danger { border-color: var(--b3-bad); background: var(--b3-bad); color: #fff; }
.settings-act383 .settings-act383-modal-actions button[disabled] { opacity: .55; cursor: not-allowed; }

/* AF-03: the confirmation sits below the reward detail on the right of the
   approved desktop art. Preserve the dialog and its existing action wiring. */
@media (min-width: 981px) {
  .settings-act383 .settings-act383-modal {
    align-items: flex-end;
    justify-content: flex-end;
    padding: 25px 13px;
  }
  .settings-act383 .settings-act383-modal-card {
    width: min(390px, 100%);
    min-height: 381px;
    box-sizing: border-box;
  }
}
[data-meifan-theme="tech-glass-blue"] .settings-act383 .settings-act383-modal {
  background: rgba(3, 14, 34, .08);
}
[data-meifan-theme="tech-glass-blue"] .settings-act383 .settings-act383-modal-card {
  background: #071f42;
  border-color: #27568e;
  box-shadow: 0 14px 34px rgba(0, 9, 28, .35);
  color: #eef5ff;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
[data-meifan-theme="tech-glass-blue"] .settings-act383 .settings-act383-modal-card > header {
  gap: 8px;
  color: #f3f7ff;
}
[data-meifan-theme="tech-glass-blue"] .settings-act383 .settings-act383-modal-card > header strong::before {
  content: "!";
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: 8px;
  border-radius: 50%;
  background: #e34d65;
  color: #fff;
  font-weight: 700;
}
[data-meifan-theme="tech-glass-blue"] .settings-act383 .settings-act383-modal-card > header [data-act383-revoke-cancel] {
  margin-left: auto;
  color: #c9d9ef;
}
[data-meifan-theme="tech-glass-blue"] .settings-act383 .settings-act383-modal-card p,
[data-meifan-theme="tech-glass-blue"] .settings-act383 .settings-act383-modal-card label {
  color: #c8d9ef;
}
[data-meifan-theme="tech-glass-blue"] .settings-act383 .settings-act383-modal-card textarea {
  box-sizing: border-box;
  min-height: 78px;
  border-color: #2b619e;
  background: #0b2b52;
  color: #f3f7ff;
  resize: vertical;
}
[data-meifan-theme="tech-glass-blue"] .settings-act383 .settings-act383-modal-card textarea::placeholder { color: #9bb8d7; }
[data-meifan-theme="tech-glass-blue"] .settings-act383 .settings-act383-modal-actions { margin-top: auto; }
[data-meifan-theme="tech-glass-blue"] .settings-act383 .settings-act383-modal-actions button {
  min-width: 116px;
  border-color: #31639d;
  background: #0c2b51;
  color: #edf5ff;
}
[data-meifan-theme="tech-glass-blue"] .settings-act383 .settings-act383-modal-actions button.is-danger {
  border-color: #de4562;
  background: #d94560;
  color: #fff;
}
[data-meifan-theme="tech-glass-blue"] #meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-modal-actions button.is-danger:not(:disabled) {
  border-color: #de4562;
  background: #d94560;
  color: #fff;
}

/* AF-03: the selected reward is a sibling of the records table in a right
   rail. The original row, filters and pager stay in the left work area. */
@media (min-width: 981px) {
  #meifanPlatformWorkspaceC2Root .settings-act383[data-act383-detail-open] {
    box-sizing: border-box;
    padding-right: 355px;
  }
}
.settings-act383 .settings-act383-side-rail {
  position: fixed;
  z-index: 2147483620;
  top: 15px;
  right: 13px;
  bottom: 25px;
  width: min(390px, calc(100vw - 26px));
  display: flex;
  flex-direction: column;
  pointer-events: none;
}
.settings-act383 .settings-act383-side-rail > * { pointer-events: auto; }
.settings-act383 .settings-act383-reward-drawer {
  box-sizing: border-box;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--b3-line);
  border-radius: 12px;
  background: var(--b3-soft);
  color: var(--b3-ink);
  box-shadow: 0 10px 28px rgba(5, 19, 38, .22);
}
.settings-act383 .settings-act383-reward-drawer > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--b3-line);
}
.settings-act383 .settings-act383-reward-drawer > header strong { font-size: 17px; }
.settings-act383 .settings-act383-reward-drawer > header button { font-size: 22px; line-height: 1; }
.settings-act383 .settings-act383-drawer-title { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 5px 8px; }
.settings-act383 .settings-act383-drawer-title strong { min-width: 0; overflow-wrap: anywhere; font-size: 16px; }
.settings-act383 .settings-act383-drawer-title small { grid-column: 1 / -1; color: var(--b3-muted); }
.settings-act383 .settings-act383-drawer-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; margin: 0; }
.settings-act383 .settings-act383-drawer-facts > div { min-width: 0; }
.settings-act383 .settings-act383-drawer-facts dt { color: var(--b3-muted); font-size: 12px; }
.settings-act383 .settings-act383-drawer-facts dd { margin: 2px 0 0; font-size: 13px; overflow-wrap: anywhere; }
.settings-act383 .settings-act383-drawer-description { margin: 0; color: var(--b3-ink); font-size: 13px; line-height: 1.6; }
.settings-act383 .settings-act383-drawer-reference { color: var(--b3-muted); font-size: 11px; overflow-wrap: anywhere; }
.settings-act383 .settings-act383-reward-drawer .settings-act383-revoke-box { display: grid; margin-top: auto; }
.settings-act383 .settings-act383-reward-drawer .settings-act383-revoke-box button { justify-self: end; }
@media (min-width: 981px) {
  .settings-act383 .settings-act383-side-rail .settings-act383-modal {
    position: static;
    inset: auto;
    flex: 0 0 auto;
    display: block;
    width: 100%;
    padding: 0;
    background: none;
  }
  .settings-act383 .settings-act383-side-rail .settings-act383-modal-card {
    box-sizing: border-box;
    width: 100%;
    min-height: 381px;
  }
}
[data-meifan-theme="tech-glass-blue"] .settings-act383 .settings-act383-reward-drawer {
  border-color: #27568e;
  background: #071f42;
  color: #eef5ff;
}
[data-meifan-theme="tech-glass-blue"] .settings-act383 .settings-act383-reward-drawer > header { border-color: #27568e; }
@media (max-width: 980px) {
  .settings-act383 .settings-act383-side-rail { inset: 0; width: 100%; bottom: 0; display: block; }
  .settings-act383 .settings-act383-reward-drawer { position: absolute; inset: 0; width: 100%; border-radius: 0; }
}

@media (max-width: 640px) {
  .settings-act383 .settings-act383-modal-card { padding: 14px; }
  .settings-act383 .settings-act383-subtab-note { display: block; margin: 6px 0 0; }
}

/* C2 AF-01: dense, readable activity editor. Keep every existing form control
   present while giving the reward column the width used by the approved art. */
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-edit {
  --act383-panel: #fff;
  --act383-panel-raised: var(--b3-soft);
  --act383-group: var(--b3-soft);
  --act383-hint: var(--b3-soft);
  --act383-input: #fff;
  --act383-line: var(--b3-line);
  --act383-ink: var(--b3-ink);
  --act383-muted: var(--b3-muted);
  --act383-accent: var(--b3-green);
  --act383-primary: var(--b3-green);
  --act383-kind: var(--b3-green);
  --act383-background: var(--b3-soft);
  --act383-color-scheme: light;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--act383-line);
  border-radius: 10px;
  background: var(--act383-background);
  color: var(--act383-ink);
}
[data-meifan-theme="tech-glass-blue"] #meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-edit {
  --act383-panel: #0b2a4b;
  --act383-panel-raised: #10365e;
  --act383-group: #0c2c50;
  --act383-hint: #123e6b;
  --act383-input: #0d3055;
  --act383-line: #2866a9;
  --act383-ink: #edf5ff;
  --act383-muted: #b6cde5;
  --act383-accent: #368bff;
  --act383-primary: #1768e4;
  --act383-kind: #d4e8ff;
  --act383-background: linear-gradient(125deg, #092643, #0b2a51 68%, #102f59);
  --act383-color-scheme: dark;
}
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-edit-head {
  min-height: 36px;
  gap: 8px;
  margin-bottom: 10px;
}
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-edit-head h2 {
  color: var(--act383-ink);
  font-size: 17px;
}
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-edit-grid {
  grid-template-columns: minmax(0, 40fr) minmax(0, 60fr);
  gap: 10px;
}
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-edit-grid > .platform-admin-b3-card {
  min-width: 0;
  align-content: start;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--act383-line);
  border-radius: 8px;
  background: var(--act383-panel);
  color: var(--act383-ink);
}
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-edit-grid > .platform-admin-b3-card > h3 {
  margin: 0 0 4px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--act383-line);
  color: var(--act383-ink);
  font-size: 15px;
}
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-edit :is(label, legend, h4, strong) {
  color: var(--act383-ink);
}
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-edit :is(small, .platform-admin-b3-note, .settings-act383-benefit-hint, .settings-act383-side-hint) {
  color: var(--act383-muted);
}
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-edit :is(input, select, textarea) {
  min-width: 0;
  min-height: 31px;
  box-sizing: border-box;
  border: 1px solid var(--act383-line);
  border-radius: 6px;
  background: var(--act383-input);
  color: var(--act383-ink);
  color-scheme: var(--act383-color-scheme);
  font-size: 12px;
}
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-edit :is(input, select, textarea):disabled {
  opacity: .7;
}
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-edit :is(input, select, textarea):focus-visible,
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-edit button:focus-visible {
  outline: 2px solid var(--act383-accent);
  outline-offset: 1px;
}
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-edit input::placeholder,
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-edit textarea::placeholder { color: var(--act383-muted); }
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-edit :is(input[type="checkbox"], input[type="radio"]) {
  width: 16px;
  height: 16px;
  min-height: 0;
  flex: 0 0 16px;
  margin: 0;
  padding: 0;
  accent-color: var(--act383-accent);
}
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-edit button:not(:disabled) {
  min-height: 30px;
  padding: 4px 10px;
  border-color: var(--act383-line);
  background: var(--act383-panel-raised);
  color: var(--act383-ink);
}
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-edit button.settings-act383-primary:not(:disabled) {
  background: var(--act383-primary);
  color: #fff;
}
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-basics > .platform-admin-b3-field {
  display: grid;
  gap: 3px;
  margin: 0;
  font-size: 12px;
}
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-basics > .platform-admin-b3-field :is(input, select, textarea) {
  width: 100%;
  padding: 5px 8px;
}
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-basics textarea {
  min-height: 48px;
  resize: vertical;
}
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-basics .settings-act383-dates {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
}
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-basics .settings-act383-dates > :is(input, select) {
  flex: 1 1 0;
  width: 0;
  padding: 5px 7px;
}
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-basics .settings-act383-dates > button {
  flex: 0 0 auto;
}
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-basics .settings-act383-ws,
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-basics fieldset.platform-admin-b3-field {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px 12px;
  padding: 5px 8px;
  border: 1px solid var(--act383-line);
  border-radius: 6px;
}
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-basics fieldset.platform-admin-b3-field legend { padding: 0 4px; }
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-basics fieldset.platform-admin-b3-field label { display: inline-flex; gap: 4px; align-items: center; }
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-basics fieldset.platform-admin-b3-field label { width: auto; white-space: nowrap; }
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-basics .settings-act383-side-hint {
  padding: 6px 9px;
  border-color: var(--act383-line);
  background: var(--act383-panel-raised);
  line-height: 1.35;
}
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-rewards > .platform-admin-b3-note {
  line-height: 1.35;
  font-size: 11px;
}
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-benefit-group {
  gap: 6px;
  padding: 7px;
  border-color: var(--act383-line);
  background: var(--act383-group);
}
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-benefit-group > h4 {
  display: flex;
  gap: 6px;
  font-size: 13px;
  line-height: 1.25;
}
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-benefit-group > p {
  color: var(--act383-muted);
  line-height: 1.25;
  font-size: 11px;
}
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-benefit {
  gap: 6px;
  min-width: 0;
  padding: 7px;
  border-color: var(--act383-line);
  background: var(--act383-panel-raised);
}
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-benefit > header {
  display: grid;
  grid-template-columns: 10px 18px minmax(74px, .8fr) minmax(90px, .9fr) minmax(110px, 1.4fr) 28px 46px;
  gap: 4px;
  align-items: center;
  min-width: 0;
}
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-benefit > header :is(select, input) { width: 100%; padding: 3px 5px; }
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-benefit > header .settings-act383-benefit-label { flex: none; width: 100%; }
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-benefit > header button { padding: 3px 2px; }
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-benefit > header button { white-space: nowrap; }
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-benefit-kind-name { color: var(--act383-kind); font-size: 11px; }
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-benefit-cfg {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-benefit-cfg label,
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-benefit-limits label {
  min-width: 0;
  gap: 2px;
  font-size: 11px;
}
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-benefit-cfg label > :is(input, select) { width: 100%; padding: 4px 6px; }
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-benefit-cfg.is-coupon > :is(.settings-act383-coupon-mode, .settings-act383-benefit-hint, label:has(select[multiple])) {
  grid-column: 1 / -1;
}
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-benefit-cfg.is-coupon > label:has(select[multiple]) select {
  height: 65px;
  padding: 2px 6px;
}
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-coupon-mode,
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-applies {
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 2px 7px;
  border-color: var(--act383-line);
}
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-coupon-mode label,
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-applies label { display: inline-flex; align-items: center; gap: 4px; width: auto; white-space: nowrap; }
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-benefit-hint {
  grid-column: 1 / -1;
  padding: 5px 7px;
  border-color: var(--act383-line);
  background: var(--act383-hint);
  line-height: 1.3;
  font-size: 11px;
}
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-benefit-cfg.is-points > small { grid-column: 1 / -1; }
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-benefit-limits {
  gap: 6px;
}
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-benefit-limits input { padding: 4px 6px; }
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-benefit-add {
  flex-wrap: nowrap;
  gap: 6px;
}
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-benefit-add label { min-width: 0; flex: 1; }
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-benefit-add select { width: 100%; min-width: 0; padding: 4px 6px; }
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-limits label { font-size: 11px; }
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-limits input { width: 100%; padding: 4px 6px; }
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-result-preview {
  padding: 6px 9px;
  border-color: var(--act383-line);
  background: var(--act383-hint);
  color: var(--act383-ink);
  line-height: 1.35;
}
#meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-edit-actions {
  justify-content: flex-end;
  margin-top: 8px;
}
@media (max-width: 900px) {
  #meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-edit-grid { grid-template-columns: minmax(0, 1fr); }
  #meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-benefit > header {
    grid-template-columns: 10px 18px minmax(70px, 1fr) minmax(90px, 1fr) 28px 38px;
  }
  #meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-benefit > header .settings-act383-benefit-label { grid-column: 3 / 5; }
}
@media (max-width: 580px) {
  #meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-benefit-cfg { grid-template-columns: minmax(0, 1fr); }
  #meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-benefit-cfg > * { grid-column: 1 / -1; }
  #meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-benefit-add { flex-wrap: wrap; }
  #meifanPlatformWorkspaceC2Root .settings-act383 .settings-act383-basics .settings-act383-dates { flex-wrap: wrap; }
}
/* PARTNER-REGISTER-REVIEW-UI · 04B 业务员-客户注册审核（60 分片配套）
   复用业务合作中心壳层（58），主色同 57/59（深绿）。功能性样式，定稿布局不改（279 §六）。 */
.prr-shell { --prr-green: #1c4a3a; --prr-green-2: #256151; --prr-line: #e3e0d8; --prr-ink: #2a2a26; --prr-muted: #8a877e; --prr-bg: #f6f5f1; --prr-teal: #2f7a5f;
  color: var(--prr-ink); font-family: inherit; padding: 20px; background: var(--prr-bg); min-height: 100vh; box-sizing: border-box; }
.prr-shell * { box-sizing: border-box; }
.prr-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 14px; gap: 12px; }
.prr-title { margin: 0; font-size: 22px; font-weight: 700; }
.prr-sub { margin: 4px 0 0; color: var(--prr-muted); font-size: 13px; }
.prr-btn { border: 1px solid var(--prr-line); background: #fff; color: var(--prr-ink); border-radius: 9px; padding: 8px 16px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; }
.prr-btn.primary { background: var(--prr-green); border-color: var(--prr-green); color: #fff; }
.prr-btn.primary:hover:not(:disabled) { background: var(--prr-green-2); }
.prr-btn.ghost { background: transparent; }
.prr-btn:disabled { opacity: .5; cursor: not-allowed; }
.prr-tabs { display: flex; gap: 6px; margin-bottom: 14px; border-bottom: 1px solid var(--prr-line); }
.prr-tab { background: none; border: 0; border-bottom: 2px solid transparent; padding: 9px 14px; font-size: 14px; font-weight: 600; color: var(--prr-muted); cursor: pointer; font-family: inherit; }
.prr-tab.is-active { color: var(--prr-green); border-bottom-color: var(--prr-green); }
.prr-tab b { font-weight: 700; }
.prr-main { display: grid; grid-template-columns: 1fr 370px; gap: 16px; align-items: start; }
@media (max-width: 980px) { .prr-main { grid-template-columns: 1fr; } }
.prr-list-wrap { background: #fff; border: 1px solid var(--prr-line); border-radius: 12px; overflow: hidden; }
.prr-list-head { display: grid; grid-template-columns: 1.3fr .9fr 1.1fr .9fr .8fr .8fr .8fr; gap: 6px; padding: 11px 16px; background: #faf9f6; border-bottom: 1px solid var(--prr-line); font-size: 12px; color: var(--prr-muted); font-weight: 600; }
.prr-list-wrap [data-prr-list] > .prr-row { display: grid; grid-template-columns: 1.3fr .9fr 1.1fr .9fr .8fr .8fr .8fr; gap: 6px; padding: 13px 16px; border-bottom: 1px solid var(--prr-line); cursor: pointer; align-items: center; font-size: 13px; }
.prr-list-wrap [data-prr-list] > .prr-row:last-child { border-bottom: 0; }
.prr-list-wrap [data-prr-list] > .prr-row:hover, .prr-list-wrap [data-prr-list] > .prr-row.is-sel { background: #f2f5f3; }
.prr-list-wrap [data-prr-list] > .prr-row.is-sel { box-shadow: inset 3px 0 0 var(--prr-green); }
.prr-cell.who { font-weight: 600; }
.prr-cell.mono, .prr-field b.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.prr-chip { display: inline-block; padding: 3px 9px; border-radius: 10px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.prr-chip.wait { background: #f7ecd8; color: #9a6b1a; }
.prr-chip.ok { background: #e7f0ea; color: var(--prr-teal); }
.prr-chip.no { background: #f6e3e0; color: #b0402f; }
.prr-link { background: none; border: 0; color: var(--prr-teal); font-size: 13px; font-weight: 600; cursor: pointer; padding: 4px 6px; font-family: inherit; }
.prr-link:hover { text-decoration: underline; }
.prr-detail { background: #fff; border: 1px solid var(--prr-line); border-radius: 12px; padding: 18px; position: sticky; top: 16px; max-height: calc(100vh - 40px); overflow-y: auto; }
.prr-detail-title { margin: 0 0 12px; font-size: 17px; font-weight: 700; }
.prr-block { margin: 0 0 14px; padding-top: 12px; border-top: 1px solid var(--prr-line); }
.prr-block:first-of-type { border-top: 0; padding-top: 0; }
.prr-block h4 { margin: 0 0 8px; font-size: 13px; font-weight: 700; }
.prr-block h4 i { font-weight: 400; color: #b0402f; font-style: normal; font-size: 11px; }
.prr-field { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; font-size: 13px; }
.prr-field span { color: var(--prr-muted); }
.prr-field b { font-weight: 600; text-align: right; }
.prr-boundary { margin: 4px 0 14px; padding: 11px 12px; background: #eef5f0; border: 1px solid #cfe3d6; border-radius: 9px; font-size: 12.5px; color: var(--prr-teal); line-height: 1.6; }
.prr-detail textarea { width: 100%; border: 1px solid var(--prr-line); border-radius: 8px; padding: 8px 10px; font-size: 13px; font-family: inherit; color: var(--prr-ink); resize: vertical; }
.prr-acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.prr-await { color: var(--prr-muted); font-size: 13px; }
.prr-loading { color: var(--prr-muted); font-size: 13px; padding: 18px 16px; }
.prr-state { padding: 24px 16px; text-align: center; }
.prr-state p { color: var(--prr-muted); font-size: 13px; margin: 0 0 10px; line-height: 1.6; }
.prr-state p b { color: var(--prr-ink); }
.prr-err-detail { font-size: 12px; opacity: .8; }
.prr-status { min-height: 18px; font-size: 12px; color: var(--prr-teal); margin-top: 10px; }
.prr-pending { color: var(--prr-muted); font-weight: 600; }
/* 256卡-15: 驳回原因计数 + 手机验证列隐藏(开关关闭/DTO 未下发时整列收口为 6 列)。 */
.prr-reject-count { margin: 4px 0 0; text-align: right; color: var(--prr-muted); font-size: 11px; }
.prr-list-wrap.prr-no-phoneverify .prr-list-head, .prr-list-wrap.prr-no-phoneverify [data-prr-list] > .prr-row { grid-template-columns: 1.3fr .9fr 1.1fr .9fr .8fr .8fr; }
.prr-list-wrap.prr-no-phoneverify [data-prr-phoneverify-col] { display: none; }
/* AF-05/06/07/08/14 · 活动是独立子页，覆盖一级侧栏；原侧栏节点仍在，关闭后恢复。 */
.uact384-root { position: fixed; inset: 0; z-index: calc(var(--mf-layer-sidebar, 2147483600) + 4); }
/* 全局 AI 助手在活动子页中继续可见、可点；只在子页存在时抬层。 */
body:has(.uact384-root) #r14-operator { z-index: calc(var(--mf-layer-sidebar, 2147483600) + 5); }
/* 从手机订阅页进入活动时，订阅层也会抬助手；活动页的助手须仍在最上层。 */
body:has(.submodal-r1-mask.is-mobile-page:not([hidden])):has(.uact384-root) #r14-operator {
  z-index: calc(var(--mf-layer-sidebar, 2147483600) + 5);
}
/* ≤640 保留来源工作台六底栏，活动页让出其实际高度。 */
@media (max-width: 640px) {
  /* 底栏可能晚于活动子页挂载；56px 是现役底栏 CSS 高度，实测值若更高仍优先。 */
  body:not(.home-mode) .uact384-root { bottom: max(var(--uact384-bottom-bar, 0px), calc(56px + env(safe-area-inset-bottom, 0px))); }
  /* 仅活动子页期间抬起底栏，避免被订阅弹窗遮罩吞点击。 */
  body:not(.home-mode):has(.uact384-root) .mf-nav-bottom {
    z-index: calc(var(--mf-layer-sidebar, 2147483600) + 5);
  }
}
.uact384-root .uact384-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; overflow: hidden;
  color: #f4faff; background: linear-gradient(160deg, #102e56, #071c35 65%, #0a284a);
  --uact-ink: #f4faff; --uact-muted: #b3c9e1; --uact-line: #285580; --uact-soft: #123b67;
  --uact-blue: #2486f8; --uact-warn: #f2cf84; --uact-bad: #ffd2ce;
  font: 14px/1.5 "Microsoft YaHei", "PingFang SC", sans-serif;
}
.uact384-root *, .uact384-root *::before, .uact384-root *::after { box-sizing: border-box; }
.uact384-root button { font: inherit; }
.uact384-root .uact384-topbar {
  display: flex; align-items: center; gap: 12px; padding: 12px 18px;
  background: #0a2445; border-bottom: 1px solid #214b76; flex: 0 0 auto;
}
.uact384-root .uact384-topbar-title { flex: 1 1 auto; min-width: 0; text-align: center; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uact384-root .uact384-topbar-workspace-title { display: none; }
.uact384-root .uact384-link { background: none; border: none; color: #b9daff; cursor: pointer; font-size: 14px; padding: 4px 6px; }
.uact384-root .uact384-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 22px 18px calc(42px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 16px; align-content: start; }
.uact384-root .uact384-body > * { max-width: 960px; width: 100%; min-width: 0; margin: 0 auto; }
.uact384-root .uact384-state { padding: 20px; text-align: center; color: var(--uact-muted); }
.uact384-root .uact384-state.is-error { color: var(--uact-bad); }
.uact384-root .uact384-state button { margin-left: 8px; border: 1px solid #4f82b4; border-radius: 7px; color: #fff; background: #174b7e; padding: 5px 10px; }
.uact384-root .uact384-chip { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; font-size: 11.5px; background: #17436e; border: 1px solid #3974ad; color: #c8e4ff; white-space: nowrap; }
.uact384-root .uact384-chip.is-live { background: #11626d; border-color: #2eb5a5; color: #a5fff0; }
.uact384-root .uact384-detail, .uact384-root .uact384-result, .uact384-root .uact384-rewards { display: grid; gap: 16px; }
.uact384-root .uact384-detail-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.uact384-root .uact384-detail-head h2 { margin: 0; font-size: clamp(22px, 4vw, 30px); line-height: 1.2; }
.uact384-root .uact384-sub { color: #d4e6f8; margin: 0; }
.uact384-root .uact384-dates, .uact384-root .uact384-pass-rule { color: var(--uact-muted); font-size: 13px; margin: 0; }
.uact384-root .uact384-pass-rule { width: fit-content; padding: 4px 12px; border: 1px solid #3b71aa; border-radius: 999px; color: #d6ebff; }
.uact384-root .uact384-account-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid #2b75b9; border-radius: 14px; background: linear-gradient(115deg, #154a82, #103762); overflow: hidden; }
.uact384-root .uact384-account-summary > div { min-width: 0; padding: 13px 18px; display: grid; gap: 2px; }
.uact384-root .uact384-account-summary > div + div { border-left: 1px solid #3b75ab; }
.uact384-root .uact384-account-summary small { color: #b9d2ee; }
.uact384-root .uact384-account-summary strong { font-size: 15px; overflow-wrap: anywhere; }
.uact384-root .uact384-benefits-list, .uact384-root .uact384-reward-group { display: grid; gap: 10px; min-width: 0; }
.uact384-root .uact384-benefit-group { display: grid; gap: 8px; min-width: 0; }
.uact384-root .uact384-benefit-group h3, .uact384-root .uact384-benefit-group h4, .uact384-root .uact384-reward-group h4 { margin: 4px 0 0; font-size: 13px; color: #a9d9ff; }
.uact384-root .uact384-benefit-group + .uact384-benefit-group { border-top: 1px solid #315c89; padding-top: 10px; }
.uact384-root .uact384-benefits-list { border: 1px solid #245785; border-radius: 14px; background: #0d315b; padding: 12px; }
.uact384-root .uact384-benefits-list h3, .uact384-root .uact384-reward-group h3 { margin: 0 0 4px; font-size: 16px; }
.uact384-root .uact384-benefit { display: grid; gap: 5px; min-width: 0; padding: 15px; border: 1px solid #2c6ba8; border-radius: 12px; background: linear-gradient(105deg, #164a80, #10345e); color: #eef7ff; }
.uact384-root .uact384-benefit > strong { font-size: 16px; }
.uact384-root .uact384-benefit > span, .uact384-root .uact384-benefit > header + span { color: #c5dcf3; font-size: 12.5px; }
.uact384-root .uact384-benefit > header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.uact384-root .uact384-benefit > header strong { overflow-wrap: anywhere; }
.uact384-root .uact384-benefit-eligibility, .uact384-root .uact384-result-reward { grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.uact384-root .uact384-benefit-eligibility.is-skipped, .uact384-root .uact384-result-reward.is-skipped { border-color: #937345; background: linear-gradient(105deg, #423b2d, #293546); }
.uact384-root .uact384-result-reward.is-issued { border-color: #328d9a; }
.uact384-root .uact384-benefit-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: white; font-size: 25px; font-weight: 700; background: linear-gradient(155deg, #259aff, #1766d3); }
.uact384-root .is-skipped > .uact384-benefit-icon { background: linear-gradient(155deg, #b99132, #7c5927); }
.uact384-root .uact384-benefit-copy { display: grid; min-width: 0; gap: 2px; }
.uact384-root .uact384-benefit-copy strong { font-size: 15px; overflow-wrap: anywhere; }
.uact384-root .uact384-benefit-copy span { font-size: 12.5px; color: #c8ddef; overflow-wrap: anywhere; }
.uact384-root .uact384-benefit-copy .uact384-benefit-quota { color: #9edcff; }
.uact384-root .uact384-benefit-copy .uact384-benefit-message { color: #f0cf8e; }
.uact384-root .uact384-qualification { color: #8cf6bf; font-size: 12.5px; font-weight: 650; white-space: nowrap; }
.uact384-root .uact384-qualification.is-skipped { color: #f4d084; }
.uact384-root .uact384-rules { background: #10345d; border: 1px solid #285a89; border-radius: 12px; padding: 15px; display: grid; gap: 8px; }
.uact384-root .uact384-rules h3, .uact384-root .uact384-rules h4 { margin: 0; font-size: 14px; color: #d8edff; }
.uact384-root .uact384-rules-mobile { display: none; }
.uact384-root .uact384-rules-detail { display: grid; gap: 8px; }
.uact384-root .uact384-rules-detail > summary { display: none; }
.uact384-root .uact384-rules dl { display: grid; gap: 8px; margin: 0; }
.uact384-root .uact384-rules dl > div { display: flex; gap: 10px; }
.uact384-root .uact384-rules dt { color: var(--uact-muted); flex: 0 0 72px; }
.uact384-root .uact384-rules dd { margin: 0; flex: 1 1 auto; min-width: 0; }
.uact384-root .uact384-rules ol { margin: 0; padding-left: 18px; display: grid; gap: 4px; color: #cadcf0; font-size: 13px; }
.uact384-root .uact384-eligibility { margin: 0; padding: 10px 12px; border-radius: 10px; font-size: 13px; }
.uact384-root .uact384-eligibility.is-warn { background: #3b3426; color: var(--uact-warn); border: 1px solid #8d754d; }
.uact384-root .uact384-eligibility.is-blocked { background: #40282e; color: var(--uact-bad); border: 1px solid #96565b; }
.uact384-root .uact384-note { color: var(--uact-muted); font-size: 12.5px; margin: 0; }
.uact384-root .uact384-note.is-ok { color: #8cf6bf; }
.uact384-root .uact384-footnote { color: #a7bfda; font-size: 12px; text-align: center; margin: 0; }
.uact384-root .uact384-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.uact384-root .uact384-btn-main, .uact384-root .uact384-btn-ghost { padding: 11px 22px; border-radius: 10px; cursor: pointer; min-width: 0; }
.uact384-root .uact384-btn-main { border: 1px solid #55b8ff; background: linear-gradient(90deg, #21a2f9, #1e65eb); color: #fff; font-size: 15px; font-weight: 650; box-shadow: 0 2px 10px #0068c980; }
.uact384-root .uact384-btn-ghost { border: 1px solid #4479ab; background: #113b68; color: #d9ecff; }
.uact384-root .uact384-btn-main[disabled], .uact384-root .uact384-btn-ghost[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }
.uact384-root .uact384-use-coupon { justify-self: start; margin-top: 3px; }
.uact384-root .uact384-coupon-mobile, .uact384-root .uact384-coupon-mobile-meta { display: none; }
/* 桌面答题双栏，手机按题单页展示。 */
.uact384-root .uact384-quiz-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; max-width: 1100px; margin: 0 auto; width: 100%; }
.uact384-root .uact384-quiz-main, .uact384-root .uact384-quiz-side { display: grid; gap: 12px; min-width: 0; align-content: start; }
.uact384-root .uact384-quiz-title { margin: 0; font-size: 24px; }
.uact384-root .uact384-quiz-workspace, .uact384-root .uact384-quiz-subtitle { display: none; }
.uact384-root .uact384-progress { margin: 0; color: var(--uact-muted); }
.uact384-root .uact384-progress strong { color: #79beff; }
.uact384-root .uact384-mobile-step, .uact384-root .uact384-question-nav { display: none; }
.uact384-root .uact384-question { background: #10345d; border: 1px solid #285a89; border-radius: 12px; padding: 15px; display: grid; gap: 10px; }
.uact384-root .uact384-question > header { display: flex; align-items: center; gap: 8px; color: #cbe9ff; }
.uact384-root .uact384-question > header strong { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: #fff; background: #267fed; }
.uact384-root .uact384-question > p { margin: 0; font-size: 15px; }
.uact384-root .uact384-options { display: grid; gap: 8px; }
.uact384-root .uact384-option { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px 12px; text-align: left; border: 1px solid #2b5681; border-radius: 9px; background: #0d2d53; color: #e5f3ff; cursor: pointer; font-size: 14px; overflow-wrap: anywhere; }
.uact384-root .uact384-option-dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #6696c5; flex: 0 0 auto; }
.uact384-root .uact384-option.is-picked { border-color: #4da6ff; background: #134c89; color: #fff; }
.uact384-root .uact384-option.is-picked .uact384-option-dot { border-color: #84c8ff; background: #3b9afb; }
.uact384-root .uact384-account-confirm { background: #10345d; border: 1px solid #3278b9; border-radius: 12px; padding: 15px; display: grid; gap: 10px; }
.uact384-root .uact384-account-confirm dl { margin: 0; display: grid; gap: 6px; }
.uact384-root .uact384-account-confirm dl > div { display: flex; gap: 10px; }
.uact384-root .uact384-account-confirm dt { color: var(--uact-muted); flex: 0 0 72px; }
.uact384-root .uact384-account-confirm dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.uact384-root .uact384-account-confirm label { display: flex; align-items: center; gap: 8px; color: #d8ecff; cursor: pointer; }
.uact384-root .uact384-account-confirm input { accent-color: #278ff7; width: 17px; height: 17px; }
.uact384-root .uact384-confirm-counts { display: grid; gap: 7px; border-top: 1px solid #315c89; padding-top: 10px; }
.uact384-root .uact384-confirm-counts > strong { font-size: 13px; color: #d8ecff; }
.uact384-root .uact384-confirm-counts p { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 3px 10px; margin: 0; font-size: 12px; color: #c1d9f2; }
.uact384-root .uact384-quiz-side h3 { margin: 0; font-size: 16px; }
@media (min-width: 1000px) {
  .uact384-root .uact384-quiz-layout { grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); align-items: start; }
  .uact384-root .uact384-options { grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); }
  .uact384-root .uact384-quiz-side { position: sticky; top: 12px; }
}
/* 结果与奖励包。 */
.uact384-root .uact384-result { justify-items: stretch; }
.uact384-root .uact384-result > h2, .uact384-root .uact384-result > .uact384-note { text-align: center; }
.uact384-root .uact384-result-icon { font-size: 38px; color: #a9c0d8; line-height: 1; text-align: center; }
.uact384-root .uact384-result-icon.is-ok { color: #88d2ff; }
.uact384-root .uact384-result h2 { margin: 0; }
/* AF-07：结果卡按奖励自身状态与次数分层，三类使用同一可读结构。 */
.uact384-root .uact384-result[data-uact384-result="passed"] { max-width: 780px; }
.uact384-root .uact384-result-reward {
  grid-template-columns: 136px minmax(0, 1fr); align-items: center; gap: 28px;
  min-height: 208px; padding: 26px 30px; border-radius: 22px;
  background: linear-gradient(115deg, #0b4744 0%, #103b53 46%, #113851 100%);
  border-color: #13d99b;
}
.uact384-root .uact384-result-reward[data-kind="subscription_gift"] {
  background: linear-gradient(115deg, #4a411a 0%, #343b35 44%, #263d50 100%);
  border-color: #f3cb4d;
}
.uact384-root .uact384-result-reward[data-kind="coupon"] {
  background: linear-gradient(115deg, #0b4c93 0%, #0b3d7d 48%, #113964 100%);
  border-color: #3aa6ff;
}
.uact384-root .uact384-result-reward.is-pending {
  background: linear-gradient(115deg, #263d59, #1e344d); border-color: #86a6c7;
}
.uact384-root .uact384-result-art {
  display: grid; place-items: center; width: 136px; height: 136px; border-radius: 50%;
  border: 3px solid #15e99d; color: #f2fff8;
  background: radial-gradient(circle at 33% 25%, #12bd78, #04734e 69%, #035c45);
  box-shadow: 0 0 22px #05dc893d, inset 0 0 18px #10ff9629;
}
.uact384-root .uact384-result-art svg { display: block; width: 68px; height: 68px; }
.uact384-root .uact384-result-reward[data-kind="subscription_gift"] .uact384-result-art {
  color: #fff4bf; border-color: #ffd442;
  background: radial-gradient(circle at 33% 25%, #dfb827, #765b0e 72%, #5b460c);
  box-shadow: 0 0 22px #ffd4423d, inset 0 0 18px #ffdf4a29;
}
.uact384-root .uact384-result-reward[data-kind="coupon"] .uact384-result-art {
  color: #f4fbff; border-color: #2bd0ff;
  background: radial-gradient(circle at 33% 25%, #338fff, #0769ba 72%, #07528f);
  box-shadow: 0 0 22px #2ad0ff3d, inset 0 0 18px #30c8ff29;
}
.uact384-root .uact384-result-reward.is-pending .uact384-result-art {
  color: #e5efff; border-color: #91b4d8; background: radial-gradient(circle at 33% 25%, #4a739d, #254563 72%);
  box-shadow: none;
}
.uact384-root .uact384-result-content { gap: 0; }
.uact384-root .uact384-result-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; }
.uact384-root .uact384-result-card-head > strong { font-size: clamp(22px, 3.3vw, 30px); line-height: 1.28; letter-spacing: .01em; }
.uact384-root .uact384-result-badge {
  display: inline-flex; align-items: center; gap: 9px; flex: 0 0 auto;
  min-height: 42px; padding: 5px 16px; border: 2px solid #17e699; border-radius: 999px;
  background: #025e4c88; color: #acffe0; font-size: 17px; font-weight: 650;
}
.uact384-root .uact384-result-badge > span { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: #1ee6a0; color: #074738; font-weight: 800; }
.uact384-root .uact384-result-badge.is-skipped { border-color: #ffd343; background: #74600d77; color: #ffdf70; }
.uact384-root .uact384-result-badge.is-skipped > span { background: #ffd343; color: #65480c; }
.uact384-root .uact384-result-reward[data-kind="coupon"] .uact384-result-badge { border-color: #29b9ff; background: #064a8b88; color: #adf0ff; }
.uact384-root .uact384-result-reward[data-kind="coupon"] .uact384-result-badge > span { background: #29b9ff; color: #064073; }
.uact384-root .uact384-result-reward.is-pending .uact384-result-badge { border-color: #aac5df; background: #304d69; color: #d8e9f9; }
.uact384-root .uact384-result-reward.is-pending .uact384-result-badge > span { background: #a2bdd8; color: #304b64; }
.uact384-root .uact384-result-custom-label { margin-top: 7px; color: #dceeff; font-size: 14px; }
.uact384-root .uact384-result-message { margin: 16px 0 0; color: #fff7dd; font-size: 18px; line-height: 1.5; }
.uact384-root .uact384-result-facts {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 18px;
  margin-top: 16px; padding-top: 13px; border-top: 1px solid #77b7dc9c;
  color: #e5f5ff; font-size: 17px;
}
.uact384-root .uact384-result-count { font-weight: 650; }
.uact384-root .uact384-result-explain { margin: 10px 0 0; color: #cbdff0; font-size: 14px; line-height: 1.5; }
.uact384-root .uact384-result-reward[data-kind="coupon"] .uact384-result-explain { color: #e1f2ff; }
.uact384-root .uact384-result-summary { margin: 0; padding: 10px 12px; border: 1px solid #3276a8; border-radius: 10px; color: #cde8fc; background: #10375e; }
@media (min-width: 641px) and (max-width: 980px) {
  .uact384-root .uact384-result-reward[data-kind="points"] { min-height: 260px; }
}
.uact384-root .uact384-rewards-headrow { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.uact384-root .uact384-rewards-heading { text-align: left; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; justify-items: start; column-gap: 10px; row-gap: 3px; }
.uact384-root .uact384-rewards-heading > span { grid-row: span 2; }
.uact384-root .uact384-rewards-heading > span { font-size: 32px; color: #87c5ff; }
.uact384-root .uact384-rewards-heading h2, .uact384-root .uact384-rewards-heading p { margin: 0; }
.uact384-root .uact384-rewards-heading p { color: var(--uact-muted); }
.uact384-root .uact384-reward-workspace { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.uact384-root .uact384-rewards-headrow > .uact384-reward-workspace { margin-left: auto; }
.uact384-root .uact384-reward-workspace select {
  min-height: 38px; max-width: 100%; padding: 0 12px;
  border: 1px solid #237bc0; border-radius: 8px;
  color: #f4faff; background: #0a2445; color-scheme: dark;
}
.uact384-root .uact384-reward-workspace select option { color: #f4faff; background: #0a2445; }
.uact384-root .uact384-rewards[data-tab="records"] .cac-shell.cac-embedded { min-height: 0; padding: 18px; border-radius: 12px; }
.uact384-root .uact384-rewards[data-tab="records"] .cac-head { max-width: none; }
.uact384-root .uact384-rewards[data-tab="records"] .cac-claim-list { max-width: none; }
.uact384-root .uact384-rewards[data-tab="records"] .cac-redeem { max-width: none; }
@media (max-width: 640px) {
  /* AF-08 单工作台保留静态标题；多工作台沿既有顶栏切换，待补图前不自创位置。 */
  .uact384-root[data-view="rewards"]:has(.uact384-topbar-workspace-title) .uact384-topbar-default-title { display: none; }
  .uact384-root[data-view="rewards"] .uact384-topbar-workspace-title { display: inline; }
  .uact384-root[data-view="rewards"] .uact384-reward-workspace {
    position: fixed;
    top: 9px;
    left: 82px;
    right: 48px;
    z-index: 1;
    height: 22px;
    justify-content: center;
    font-size: 0;
  }
  .uact384-root[data-view="rewards"] .uact384-reward-workspace:has(select:disabled) { display: none; }
  .uact384-root[data-view="rewards"]:has(.uact384-reward-workspace select:not(:disabled)) .uact384-topbar-title { visibility: hidden; }
  .uact384-root[data-view="rewards"] .uact384-reward-workspace select {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    height: 22px;
    min-height: 22px;
    padding: 0 8px;
    border: 0;
    background: #0a2445;
    color: #f4faff;
    font-size: 14px;
    text-align: center;
  }
  .uact384-root .uact384-rewards[data-tab="records"] .cac-shell.cac-embedded { padding: 12px; }
}
.uact384-root .uact384-tabs { display: flex; gap: 4px; min-width: 0; border: 1px solid #315c89; background: #0d315b; border-radius: 10px; padding: 3px; }
.uact384-root .uact384-tab { min-width: 0; flex: 1 1 0; padding: 8px 6px; border-radius: 7px; border: 0; background: transparent; color: #c1d6ec; cursor: pointer; font-size: 13px; }
.uact384-root .uact384-tab.is-active { background: #1c75df; color: #fff; }
.uact384-root .uact384-tabs.is-sub { background: transparent; border: 0; flex-wrap: wrap; }
.uact384-root .uact384-tabs.is-sub .uact384-tab { flex: 1 1 auto; padding: 6px 9px; border: 1px solid #3d638a; font-size: 12px; }
@media (max-width: 640px) {
  .uact384-root .uact384-tabs:not(.is-sub) { overflow-x: auto; }
  .uact384-root .uact384-tabs:not(.is-sub) .uact384-tab { flex: 0 0 auto; white-space: nowrap; }
  .uact384-root .uact384-topbar { padding: 9px 12px; }
  .uact384-root .uact384-body { padding: 13px 12px calc(94px + env(safe-area-inset-bottom, 0px)); }
  .uact384-root .uact384-detail, .uact384-root .uact384-result, .uact384-root .uact384-rewards { gap: 12px; }
  .uact384-root .uact384-account-summary > div { padding: 11px 9px; }
  .uact384-root .uact384-account-summary strong { font-size: 12px; }
  .uact384-root .uact384-benefit-eligibility, .uact384-root .uact384-result-reward { grid-template-columns: 38px minmax(0, 1fr) auto; gap: 8px; padding: 10px; }
  .uact384-root .uact384-result-reward { grid-template-columns: 56px minmax(0, 1fr); gap: 13px; padding: 16px; min-height: 0; border-radius: 16px; }
  .uact384-root .uact384-result-art { width: 56px; height: 56px; border-width: 2px; align-self: start; }
  .uact384-root .uact384-result-art svg { width: 30px; height: 30px; }
  .uact384-root .uact384-result-card-head > strong { font-size: 17px; }
  .uact384-root .uact384-result-badge { min-height: 28px; padding: 3px 9px; gap: 5px; border-width: 1px; font-size: 12px; }
  .uact384-root .uact384-result-badge > span { width: 17px; height: 17px; }
  .uact384-root .uact384-result-message { margin-top: 10px; font-size: 13px; }
  .uact384-root .uact384-result-facts { margin-top: 10px; padding-top: 8px; font-size: 12.5px; }
  .uact384-root .uact384-result-explain { margin-top: 7px; font-size: 12px; }
  .uact384-root .uact384-result-custom-label { font-size: 12px; }
  .uact384-root .uact384-benefit-icon { width: 36px; height: 36px; font-size: 21px; }
  .uact384-root .uact384-benefit-copy strong { font-size: 13px; }
  .uact384-root .uact384-qualification { font-size: 11px; }
  .uact384-root .uact384-actions .uact384-btn-main, .uact384-root .uact384-actions .uact384-btn-ghost { flex: 1 1 auto; }
  .uact384-root .uact384-mobile-step { display: block; margin: 0; color: #c1d9f2; }
  .uact384-root .uact384-question:not(.is-current) { display: none; }
  .uact384-root .uact384-question-nav { display: flex; gap: 8px; }
  .uact384-root .uact384-question-nav button { flex: 1 1 0; padding: 7px 8px; font-size: 12px; }

  /* AF-06: the mobile activity sheet uses the full 390px page width. Keep
     every eligibility fact while putting the quota beside its own count. */
  .uact384-root[data-view="detail"] .uact384-body,
  .uact384-root[data-view="result"] .uact384-body { padding-left: 18px; padding-right: 18px; padding-top: 8px; }
  .uact384-root[data-view="detail"] .uact384-body { padding-top: 0; }
  .uact384-root .uact384-detail { gap: 5px; }
  .uact384-root .uact384-detail-head { justify-content: center; gap: 4px; }
  .uact384-root .uact384-detail-head h2 { order: -1; flex-basis: 100%; text-align: center; font-size: 24px; }
  .uact384-root .uact384-detail-head .uact384-chip { font-size: 10px; padding: 1px 8px; }
  .uact384-root .uact384-detail > .uact384-sub,
  .uact384-root .uact384-detail > .uact384-dates { text-align: center; font-size: 11px; line-height: 1.25; }
  .uact384-root .uact384-detail > .uact384-pass-rule { justify-self: center; padding: 2px 8px; font-size: 11px; line-height: 1.25; }
  .uact384-root .uact384-account-summary > div { padding: 4px 9px; }
  .uact384-root .uact384-account-summary small { font-size: 10px; }
  .uact384-root .uact384-benefits-list { margin-top: 5px; padding: 8px; border: 1px solid #2c6ba8; background: #0d315b; gap: 5px; }
  .uact384-root .uact384-benefits-list h3 { font-size: 14px; margin: 0; }
  .uact384-root .uact384-benefit-group { gap: 5px; }
  .uact384-root .uact384-benefit-group h4 { margin: 0; font-size: 11px; }
  .uact384-root .uact384-benefit-group + .uact384-benefit-group { padding-top: 5px; }
  .uact384-root .uact384-benefits-list [data-uact384-benefit-group="direct"] { padding-bottom: 22px; }
  .uact384-root .uact384-benefits-list [data-uact384-benefit-group="checkout"] { margin-left: -9px; margin-right: -9px; }
  .uact384-root .uact384-benefit-eligibility { grid-template-columns: 30px minmax(0, 1fr) auto; gap: 6px; padding: 7px; border-radius: 9px; }
  .uact384-root .uact384-benefit-eligibility .uact384-benefit-icon { width: 28px; height: 28px; border-radius: 7px; font-size: 17px; }
  .uact384-root .uact384-benefit-eligibility .uact384-benefit-copy { gap: 1px; line-height: 1.22; }
  .uact384-root .uact384-benefit-eligibility .uact384-benefit-copy strong { font-size: 12px; }
  .uact384-root .uact384-benefit-eligibility .uact384-benefit-copy span { font-size: 10px; }
  .uact384-root .uact384-benefit-metrics { display: flex; flex-wrap: wrap; column-gap: 7px; }
  .uact384-root .uact384-benefit-eligibility .uact384-qualification { align-self: start; font-size: 10px; }
  .uact384-root .uact384-detail .uact384-rules { padding: 8px 10px; gap: 3px; font-size: 11px; line-height: 1.25; }
  .uact384-root[data-view="detail"] .uact384-rules { position: relative; margin-top: -13px; }
  .uact384-root .uact384-detail .uact384-rules h3 { font-size: 12px; }
  .uact384-root .uact384-detail .uact384-rules h3 { padding-right: 96px; }
  .uact384-root .uact384-detail .uact384-rules-mobile { display: grid; gap: 2px; margin: 0; padding-left: 16px; }
  .uact384-root .uact384-detail .uact384-rules-mobile { font-size: 11px; line-height: 1.25; }
  .uact384-root .uact384-detail .uact384-rules-detail { display: block; }
  .uact384-root .uact384-detail .uact384-rules-detail:not([open]) { position: absolute; top: 8px; right: 10px; }
  .uact384-root .uact384-detail .uact384-rules-detail > summary { display: list-item; color: #b9d9f5; cursor: pointer; }
  .uact384-root .uact384-detail .uact384-rules-detail > summary { font-size: 10px; }
  .uact384-root .uact384-detail .uact384-rules dl { gap: 2px; padding-top: 6px; }
  .uact384-root .uact384-detail .uact384-rules dt { flex-basis: 60px; }
  .uact384-root .uact384-detail .uact384-rules .uact384-note { font-size: 10px; }
  .uact384-root .uact384-detail .uact384-eligibility { padding: 6px 8px; font-size: 11px; }
  .uact384-root .uact384-detail .uact384-actions { display: grid; gap: 3px; }
  .uact384-root .uact384-detail .uact384-actions .uact384-btn-main { width: 100%; }
  .uact384-root .uact384-detail .uact384-actions .uact384-btn-main { height: 41px; padding-top: 0; padding-bottom: 0; }
  .uact384-root .uact384-detail .uact384-actions .uact384-btn-ghost { border: 0; background: none; padding: 3px; }

  /* AF-07: the three real reward rows stay distinct and retain their server
     status/counts; the page header and buttons use the compact mobile rhythm. */
  .uact384-root[data-view="result"] .uact384-body { padding-top: 41px; }
  .uact384-root .uact384-result { gap: 7px; }
  .uact384-root .uact384-result-icon { font-size: 32px; }
  .uact384-root .uact384-result > .uact384-note { font-size: 11px; line-height: 1.25; }
  .uact384-root .uact384-result > h2 { font-size: 21px; }
  .uact384-root .uact384-result-reward { min-height: 126px; padding: 8px; gap: 6px; }
  .uact384-root .uact384-result-reward[data-kind="subscription_gift"] { min-height: 131px; }
  .uact384-root .uact384-result-reward[data-kind="subscription_gift"] { padding-top: 3px; padding-bottom: 3px; }
  .uact384-root .uact384-result-reward[data-kind="coupon"] { min-height: 164px; }
  .uact384-root .uact384-result-content { gap: 1px; line-height: 1.18; }
  .uact384-root .uact384-result-card-head > strong { font-size: 13px; }
  .uact384-root .uact384-result-badge { font-size: 10px; padding: 2px 6px; }
  .uact384-root .uact384-result-message { margin-top: 4px; font-size: 11px; line-height: 1.2; }
  .uact384-root .uact384-result-facts { margin-top: 4px; padding-top: 4px; font-size: 10px; }
  .uact384-root .uact384-result-explain { margin-top: 3px; font-size: 10px; line-height: 1.2; }
  .uact384-root .uact384-result-art { width: 42px; height: 42px; }
  .uact384-root .uact384-result-art svg { width: 27px; height: 27px; }
  .uact384-root .uact384-result .uact384-actions { display: grid; gap: 5px; }
  .uact384-root .uact384-result .uact384-actions .uact384-btn-main { width: 100%; }
  .uact384-root .uact384-result .uact384-actions .uact384-btn-main { height: 42px; padding-top: 0; padding-bottom: 0; }
  .uact384-root .uact384-result [data-uact384-result-group="checkout"] > h3 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .uact384-root .uact384-result [data-uact384-result-group="checkout"] { border-top: 0; padding-top: 0; }
  .uact384-root .uact384-result-summary { padding: 7px 10px; font-size: 11px; line-height: 1.22; }

  /* AF-08: the tabs precede status detail; cards use a compact icon/content/
     action row without removing the source, scope, expiry or action text. */
  .uact384-root[data-view="rewards"] .uact384-body { padding: 9px 16px calc(94px + env(safe-area-inset-bottom, 0px)); }
  .uact384-root .uact384-rewards { gap: 7px; }
  .uact384-root .uact384-rewards-headrow { display: block; }
  .uact384-root .uact384-rewards-heading { grid-template-columns: minmax(0, 1fr); text-align: center; justify-items: center; gap: 1px; padding-bottom: 32px; }
  .uact384-root .uact384-rewards-heading > span { grid-row: auto; }
  .uact384-root .uact384-rewards-heading > span { font-size: 26px; }
  .uact384-root .uact384-rewards-heading h2 { font-size: 20px; }
  .uact384-root .uact384-rewards-heading p { font-size: 11px; }
  .uact384-root .uact384-rewards > .uact384-tabs { order: 1; }
  .uact384-root .uact384-rewards > .uact384-tabs .uact384-tab { padding-top: 5px; padding-bottom: 5px; }
  .uact384-root .uact384-rewards > .uact384-reward-group { order: 2; }
  .uact384-root .uact384-rewards > [data-uact384-benefit-active] { order: 3; margin: 0; padding: 6px 8px; font-size: 11px; }
  .uact384-root .uact384-rewards > [data-uact384-union] { order: 3; margin: 0; padding: 6px 8px; font-size: 11px; }
  .uact384-root .uact384-rewards > [data-uact384-first-open] { order: 4; }
  .uact384-root .uact384-rewards > .uact384-footnote { order: 5; }
  .uact384-root .uact384-rewards[data-tab="all"] > .uact384-reward-group > h3,
  .uact384-root .uact384-rewards[data-tab="all"] > .uact384-reward-group > h4 {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0, 0, 0, 0); white-space: nowrap;
  }
  .uact384-root .uact384-reward-group { gap: 6px; }
  .uact384-root .uact384-rewards .uact384-benefit {
    display: grid; grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center; gap: 2px 8px; padding: 8px; border-radius: 10px;
    font-size: 11px; line-height: 1.24;
  }
  .uact384-root .uact384-rewards .uact384-benefit::before {
    content: "✦"; grid-column: 1; grid-row: 1 / span 4; align-self: start;
    display: grid; place-items: center; width: 34px; height: 34px;
    border-radius: 9px; background: #1d78cb; color: #fff; font-size: 19px;
  }
  .uact384-root .uact384-rewards [data-uact384-points]::before { content: "+"; background: #187fa8; }
  .uact384-root .uact384-rewards [data-uact384-coupon]::before { content: "券"; background: #1974cf; font-size: 14px; }
  .uact384-root .uact384-rewards .uact384-benefit > header,
  .uact384-root .uact384-rewards .uact384-benefit > span { grid-column: 2 / -1; min-width: 0; }
  .uact384-root .uact384-rewards .uact384-benefit > header { gap: 4px; }
  .uact384-root .uact384-rewards .uact384-benefit > header strong { font-size: 12px; }
  .uact384-root .uact384-rewards .uact384-benefit > span { font-size: 10px; line-height: 1.2; }
  .uact384-root .uact384-rewards .uact384-benefit > .uact384-use-coupon { grid-column: 3; justify-self: end; padding: 6px 10px; font-size: 11px; }
  .uact384-root .uact384-rewards [data-uact384-gift] { min-height: 86px; }
  .uact384-root .uact384-rewards [data-uact384-points] { min-height: 78px; }
  .uact384-root .uact384-rewards [data-uact384-coupon] {
    position: relative; grid-template-columns: 38px minmax(0, 1fr) 70px;
    min-height: 91px; gap: 2px 8px;
  }
  .uact384-root .uact384-rewards [data-uact384-coupon] > header,
  .uact384-root .uact384-rewards [data-uact384-coupon] > span,
  .uact384-root .uact384-rewards [data-uact384-coupon] > details { grid-column: 2; }
  .uact384-root .uact384-rewards [data-uact384-coupon] > .uact384-coupon-desktop { display: none; }
  .uact384-root .uact384-rewards [data-uact384-coupon] > .uact384-coupon-mobile { display: block; }
  .uact384-root .uact384-rewards [data-uact384-coupon] > .uact384-coupon-mobile-meta {
    display: block; min-width: 0; font-size: 9px; color: #bcd8f0;
  }
  .uact384-root .uact384-coupon-mobile-meta summary { cursor: pointer; }
  .uact384-root .uact384-coupon-mobile-meta span { display: block; overflow-wrap: anywhere; }
  .uact384-root .uact384-rewards [data-uact384-coupon] > .uact384-use-coupon {
    grid-column: 3; grid-row: 1 / span 4; align-self: center; padding: 6px 4px;
  }

  /* AF-14: show the current question in a real progress card; keep the full
     per-benefit count table in an expandable section inside account confirm. */
  .uact384-root[data-view="quiz"] .uact384-body { padding: 9px 20px calc(94px + env(safe-area-inset-bottom, 0px)); }
  .uact384-root .uact384-quiz-main { gap: 9px; padding-top: 11px; }
  .uact384-root .uact384-quiz-workspace, .uact384-root .uact384-quiz-subtitle {
    display: block; margin: 0; font-size: 12px; line-height: 1.4; color: #bdd6f0;
  }
  .uact384-root .uact384-quiz-main > .uact384-progress { display: none; }
  .uact384-root .uact384-mobile-step {
    display: grid; grid-template-columns: 1fr auto; gap: 6px 8px;
    padding: 15px 12px; border: 1px solid #356a9a; border-radius: 11px;
    background: #10345d; color: #d9edff; font-size: 11px;
  }
  .uact384-root .uact384-step-track { grid-column: 1 / -1; display: flex; justify-content: space-around; align-items: center; gap: 8px; }
  .uact384-root .uact384-step-track span { display: grid; place-items: center; width: 22px; height: 22px; border: 1px solid #4c78a3; border-radius: 50%; color: #bbd6ed; }
  .uact384-root .uact384-step-track span.is-current { border-color: #73c4ff; background: #267fed; color: #fff; }
  .uact384-root .uact384-step-track span.is-past { border-color: #5c9cce; background: #1b5d9d; color: #fff; }
  .uact384-root .uact384-question { padding: 11px; gap: 8px; min-height: 261px; }
  .uact384-root .uact384-options { gap: 6px; }
  .uact384-root .uact384-option { padding: 8px 10px; }
  .uact384-root .uact384-question-nav .uact384-btn-ghost { padding: 0; border: 0; background: transparent; font-size: 11px; line-height: 17px; }
  .uact384-root .uact384-account-confirm { margin-top: 6px; padding: 11px; gap: 6px; }
  .uact384-root .uact384-account-confirm .uact384-eligibility { margin: 0; padding: 5px 7px; font-size: 11px; line-height: 1.25; }
  .uact384-root .uact384-account-confirm dl { gap: 2px; font-size: 11px; line-height: 1.3; }
  .uact384-root .uact384-account-confirm dt { flex-basis: 58px; }
  .uact384-root .uact384-account-confirm label { font-size: 11px; }
  .uact384-root .uact384-confirm-counts { display: block; padding-top: 5px; font-size: 11px; }
  .uact384-root .uact384-confirm-counts summary { cursor: pointer; color: #d8ecff; font-weight: 650; }
  .uact384-root .uact384-confirm-counts p { padding-top: 5px; }
  .uact384-root .uact384-quiz-main > .uact384-actions .uact384-btn-main { width: 100%; }
}
/* PLATFORM-ADMIN-CONSOLE-REMAINING-3 · 第301-补3 · 统一账号中心 */
:root {
  --uam-ink: #17211f;
  --uam-muted: #64716d;
  --uam-line: #dfe6e2;
  --uam-canvas: #f4f7f5;
  --uam-paper: #ffffff;
  --uam-forest: #18362f;
  --uam-forest-2: #244a40;
  --uam-mint: #8ce0c4;
  --uam-mint-soft: #e5f7f0;
  --uam-amber: #b87822;
  --uam-red: #b44747;
  --uam-shadow: 0 28px 80px rgba(12, 29, 24, 0.26), 0 4px 18px rgba(12, 29, 24, 0.12);
}

body.unified-account-modal-r1-open {
  overflow: hidden;
}

.uam-r1-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147483600;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  padding: 28px;
  background: rgba(9, 23, 19, 0.56);
  backdrop-filter: blur(8px) saturate(0.84);
  -webkit-backdrop-filter: blur(8px) saturate(0.84);
  pointer-events: auto;
}

.uam-r1-backdrop *,
.uam-r1-backdrop *::before,
.uam-r1-backdrop *::after {
  box-sizing: border-box;
}

.uam-r1-dialog {
  width: min(1120px, calc(100vw - 56px));
  height: min(760px, calc(100vh - 56px));
  min-height: 560px;
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  overflow: hidden;
  color: var(--uam-ink);
  background: var(--uam-paper);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 22px;
  box-shadow: var(--uam-shadow);
  animation: uam-r1-enter 180ms ease-out both;
}

@keyframes uam-r1-enter {
  from { opacity: 0; transform: translateY(8px) scale(0.992); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.uam-r1-side {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 24px 16px 18px;
  color: #eaf4f0;
  background:
    radial-gradient(circle at 18% 0, rgba(140, 224, 196, 0.16), transparent 34%),
    var(--uam-forest);
}

.uam-r1-side::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 76px;
  width: 70px;
  height: 70px;
  border: 1px solid rgba(140, 224, 196, 0.12);
  border-radius: 50%;
  box-shadow: 0 0 0 18px rgba(140, 224, 196, 0.035), 0 0 0 36px rgba(140, 224, 196, 0.02);
  pointer-events: none;
}

.uam-r1-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 8px 22px;
  border-bottom: 1px solid rgba(234, 244, 240, 0.11);
}

.uam-r1-brand > span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--uam-forest);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21px;
  font-weight: 700;
  background: var(--uam-mint);
  border-radius: 11px 11px 11px 3px;
}

.uam-r1-brand div {
  display: grid;
  gap: 2px;
}

.uam-r1-brand strong {
  font-size: 15px;
  letter-spacing: 0.02em;
}

.uam-r1-brand small {
  color: rgba(234, 244, 240, 0.62);
  font-size: 11px;
}

.uam-r1-side nav {
  display: grid;
  gap: 7px;
  margin-top: 24px;
}

.uam-r1-side nav button {
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: center;
  min-height: 46px;
  padding: 7px 10px;
  color: rgba(234, 244, 240, 0.74);
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 11px;
  cursor: pointer;
  transition: 140ms ease;
}

.uam-r1-side nav button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}

.uam-r1-side nav button.is-active {
  color: #fff;
  background: rgba(140, 224, 196, 0.13);
  border-color: rgba(140, 224, 196, 0.2);
}

.uam-r1-side nav button > span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: var(--uam-mint);
  font-size: 11px;
  font-weight: 800;
  background: rgba(140, 224, 196, 0.08);
  border: 1px solid rgba(140, 224, 196, 0.16);
  border-radius: 8px;
}

.uam-r1-side nav button b {
  font-size: 13px;
  font-weight: 600;
}

.uam-r1-trust {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: auto;
  padding: 13px 10px;
  background: rgba(4, 17, 13, 0.18);
  border: 1px solid rgba(234, 244, 240, 0.09);
  border-radius: 12px;
}

.uam-r1-trust i,
.uam-r1-state i {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  background: var(--uam-mint);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(140, 224, 196, 0.1);
}

.uam-r1-trust div {
  display: grid;
  gap: 2px;
}

.uam-r1-trust strong { font-size: 11px; }
.uam-r1-trust small { color: rgba(234, 244, 240, 0.52); font-size: 10px; }

.uam-r1-main {
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  background: var(--uam-canvas);
}

.uam-r1-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 27px 32px 22px;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--uam-line);
}

.uam-r1-topbar > div { min-width: 0; }
.uam-r1-topbar span,
.uam-r1-eyebrow {
  display: block;
  margin-bottom: 5px;
  color: #3b806c;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.uam-r1-topbar h2 {
  margin: 0;
  color: var(--uam-ink);
  font-family: "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.uam-r1-topbar p {
  margin: 7px 0 0;
  color: var(--uam-muted);
  font-size: 12px;
}

.uam-r1-close {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0 0 3px;
  color: #50615c;
  font-size: 26px;
  font-weight: 300;
  line-height: 1;
  background: #f3f6f4;
  border: 1px solid #dbe3df;
  border-radius: 10px;
  cursor: pointer;
}

.uam-r1-close:hover { color: var(--uam-ink); background: #e9efec; }

.uam-r1-notice {
  margin: 14px 32px 0;
  padding: 10px 13px;
  color: #25634f;
  font-size: 12px;
  background: #e8f6f1;
  border: 1px solid #c7e7dc;
  border-radius: 9px;
}

.uam-r1-notice.is-error {
  color: #8c3333;
  background: #fff0f0;
  border-color: #f1cccc;
}

.uam-r1-scroll {
  min-height: 0;
  overflow: auto;
  padding: 26px 32px 34px;
  scrollbar-color: #b8c9c2 transparent;
}

.uam-r1-panel {
  display: grid;
  gap: 20px;
  max-width: 860px;
  margin: 0 auto;
}

.uam-r1-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.uam-r1-panel-head h3 {
  margin: 0;
  color: var(--uam-ink);
  font-size: 20px;
  font-weight: 700;
}

.uam-r1-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  color: #2b6c58;
  font-size: 11px;
  font-weight: 700;
  background: var(--uam-mint-soft);
  border-radius: 999px;
}

.uam-r1-state.is-muted { color: #66736f; background: #e8edeb; }

.uam-r1-profile-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 22px;
  background: var(--uam-paper);
  border: 1px solid var(--uam-line);
  border-radius: 15px;
  box-shadow: 0 5px 18px rgba(23, 45, 38, 0.05);
}

.uam-r1-avatar,
.uam-r1-admin-avatar {
  display: grid;
  place-items: center;
  color: #174638;
  font-size: 20px;
  font-weight: 800;
  background: #d9f2e8;
  border: 1px solid #bce1d4;
  border-radius: 16px 16px 16px 5px;
}

.uam-r1-avatar { width: 58px; height: 58px; }
.uam-r1-profile-card strong { font-size: 16px; }
.uam-r1-profile-card p,
.uam-r1-admin-card p { margin: 5px 0 0; color: var(--uam-muted); font-size: 11px; }

.uam-r1-profile-card .uam-r1-phone-note { display: block; margin-top: 3px; color: var(--uam-muted); font-size: 10px; }

.uam-r1-role-chips {
  display: flex;
  max-width: 280px;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.uam-r1-chip {
  display: inline-flex;
  padding: 6px 9px;
  color: #245f4e;
  font-size: 10px;
  font-weight: 700;
  background: var(--uam-mint-soft);
  border: 1px solid #c8e9dd;
  border-radius: 999px;
}

.uam-r1-chip.is-neutral { color: #66736f; background: #eef2f0; border-color: #dde5e1; }

.uam-r1-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.uam-r1-facts article {
  padding: 17px 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--uam-line);
  border-radius: 13px;
}

.uam-r1-facts small { color: var(--uam-muted); font-size: 10px; }
.uam-r1-facts strong { display: block; margin-top: 8px; font-size: 13px; }
.uam-r1-facts p { margin: 5px 0 0; color: var(--uam-muted); font-size: 11px; }

.uam-r1-danger-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid #eadede;
  border-radius: 13px;
}

.uam-r1-danger-row strong { font-size: 13px; }
.uam-r1-danger-row p { margin: 4px 0 0; color: var(--uam-muted); font-size: 11px; }

.uam-r1-button,
.uam-r1-form button,
.uam-r1-admin-toolbar button,
.uam-r1-grant-actions button {
  min-height: 36px;
  padding: 8px 13px;
  color: var(--uam-ink);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  background: #fff;
  border: 1px solid #ccd8d3;
  border-radius: 9px;
  cursor: pointer;
  transition: 140ms ease;
}

.uam-r1-button:hover,
.uam-r1-form button:hover,
.uam-r1-admin-toolbar button:hover,
.uam-r1-grant-actions button:hover { border-color: #8db8aa; transform: translateY(-1px); }

.uam-r1-button.is-primary,
.uam-r1-form button[type="submit"] {
  color: #fff;
  background: var(--uam-forest-2);
  border-color: var(--uam-forest-2);
}

.uam-r1-button.is-quiet-danger { color: #973f3f; background: #fff7f7; border-color: #efcece; }
.uam-r1-button.is-secondary { color: #2b6553; background: #edf8f4; border-color: #c9e6dc; }

.uam-r1-backdrop button:disabled {
  color: #9ba6a2;
  background: #edf1ef;
  border-color: #dde4e1;
  cursor: not-allowed;
  transform: none;
}

.uam-r1-form {
  display: grid;
  gap: 17px;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--uam-line);
  border-radius: 15px;
}

.uam-r1-form-grid,
.uam-r1-reverify {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.uam-r1-form label,
.uam-r1-admin-toolbar label {
  display: grid;
  gap: 7px;
  color: #4f5f5a;
  font-size: 10px;
  font-weight: 700;
}

.uam-r1-form input,
.uam-r1-admin-toolbar input {
  width: 100%;
  height: 41px;
  padding: 9px 11px;
  color: var(--uam-ink);
  font: inherit;
  font-size: 12px;
  background: #fbfcfb;
  border: 1px solid #ced9d4;
  border-radius: 9px;
  outline: none;
}

.uam-r1-form input:focus,
.uam-r1-admin-toolbar input:focus {
  background: #fff;
  border-color: #5c9d88;
  box-shadow: 0 0 0 3px rgba(92, 157, 136, 0.12);
}

.uam-r1-form-note { margin: -5px 0 0; color: var(--uam-muted); font-size: 10px; }
.uam-r1-form-actions { display: flex; justify-content: flex-end; }
.uam-r1-ba-confirm { display: flex; align-items: center; gap: 8px; color: var(--uam-ink); font-size: 11px; line-height: 1.5; }
.uam-r1-ba-confirm input { width: 16px; height: 16px; flex: 0 0 auto; margin: 0; }

.uam-r1-admin-toolbar {
  display: grid;
  gap: 14px;
  padding: 17px;
  background: #fff;
  border: 1px solid var(--uam-line);
  border-radius: 14px;
}

.uam-r1-admin-toolbar > form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.uam-r1-admin-toolbar > form button { height: 41px; color: #fff; background: var(--uam-forest-2); border-color: var(--uam-forest-2); }

.uam-r1-search-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px;
  background: #f3faf7;
  border: 1px solid #cfe8df;
  border-radius: 10px;
}

.uam-r1-search-result strong { font-size: 12px; }
.uam-r1-search-result p { margin: 3px 0 0; color: var(--uam-muted); font-size: 10px; }
.uam-r1-search-result.is-pending { color: var(--uam-muted); font-size: 11px; }
.uam-r1-search-result.is-disabled { background: #f5f6f5; border-color: #dfe4e2; }

.uam-r1-grant-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.uam-r1-grant-actions button { color: #285f4f; background: #fff; }

.uam-r1-directory-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 0 2px;
}

.uam-r1-directory-head div { display: flex; align-items: center; gap: 9px; }
.uam-r1-directory-head strong { font-size: 14px; }
.uam-r1-directory-head span { color: #38735f; font-size: 10px; font-weight: 700; }
.uam-r1-directory-head p { margin: 0; color: var(--uam-muted); font-size: 10px; }

.uam-r1-admin-list { display: grid; gap: 11px; }

.uam-r1-admin-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--uam-line);
  border-radius: 13px;
}

.uam-r1-admin-card > header {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #fafcfb;
  border-bottom: 1px solid #e7ece9;
}

.uam-r1-admin-avatar { width: 42px; height: 42px; font-size: 14px; border-radius: 12px 12px 12px 4px; }
.uam-r1-admin-card header strong { font-size: 12px; }
.uam-r1-admin-card time { color: var(--uam-muted); font-size: 10px; }

.uam-r1-admin-card ul { margin: 0; padding: 0; list-style: none; }
.uam-r1-admin-card li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 70px;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 9px 16px;
  border-bottom: 1px solid #edf1ef;
}

.uam-r1-admin-card li:last-child { border-bottom: 0; }
.uam-r1-admin-card li > span:first-child { display: grid; gap: 3px; }
.uam-r1-admin-card li strong { font-size: 11px; }
.uam-r1-admin-card li small { color: var(--uam-muted); font-size: 9px; }

.uam-r1-role-status {
  min-width: 50px;
  padding: 5px 7px;
  color: #29705a;
  font-size: 9px;
  font-weight: 800;
  text-align: center;
  background: #e6f6f0;
  border-radius: 999px;
}

.uam-r1-role-status.is-revoked { color: #8a5b25; background: #f8eedf; }
/* 定稿05四状态: 待接受(蓝)/已撤回(灰), 与生效(绿)/停用(橙)拉开 */
.uam-r1-role-status.is-pending_acceptance { color: #2b5f8f; background: #e7f1fa; }
.uam-r1-role-status.is-withdrawn { color: #6d7672; background: #eef0ee; }

/* 我的账号面·待接受邀请卡: 只本人可接受, 卡内单一主行动 */
.uam-r1-invites { display: grid; gap: 8px; margin-top: 12px; }
.uam-r1-invite-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: #eff6fb;
  border: 1px solid #cfe3f2;
  border-radius: 10px;
}
.uam-r1-invite-card strong { font-size: 12px; color: #234a6b; }
.uam-r1-invite-card p { margin: 3px 0 0; color: #557089; font-size: 10px; }

.uam-r1-link {
  padding: 5px 7px;
  color: #52625d;
  font: inherit;
  font-size: 10px;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.uam-r1-link:hover { color: var(--uam-forest-2); text-decoration: underline; }
.uam-r1-protected { text-align: right; }

.uam-r1-empty,
.uam-r1-loading {
  display: grid;
  min-height: 240px;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 30px;
  color: var(--uam-muted);
  text-align: center;
  background: #fff;
  border: 1px dashed #ccd8d3;
  border-radius: 14px;
}

.uam-r1-loading > span {
  width: 28px;
  height: 28px;
  border: 2px solid #d5e4de;
  border-top-color: #3f806b;
  border-radius: 50%;
  animation: uam-r1-spin 700ms linear infinite;
}

@keyframes uam-r1-spin { to { transform: rotate(360deg); } }
.uam-r1-loading strong, .uam-r1-empty strong { color: var(--uam-ink); font-size: 13px; }
.uam-r1-loading p, .uam-r1-empty p { margin: 0; font-size: 10px; }
.uam-r1-loading.is-error { border-color: #e7c7c7; }

.uam-r1-backdrop :focus-visible {
  outline: 2px solid #4f9c83;
  outline-offset: 2px;
}

@media (max-width: 820px) {
  .uam-r1-backdrop { padding: 12px; }
  .uam-r1-dialog {
    width: calc(100vw - 24px);
    height: calc(100vh - 24px);
    min-height: 0;
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    border-radius: 16px;
  }
  .uam-r1-side { padding: 12px 14px; }
  .uam-r1-brand { padding: 0 0 10px; border-bottom: 0; }
  .uam-r1-brand > span { width: 32px; height: 32px; font-size: 17px; }
  .uam-r1-side nav { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; margin-top: 2px; }
  .uam-r1-side nav button { grid-template-columns: 1fr; justify-items: center; min-height: 38px; padding: 5px; text-align: center; }
  .uam-r1-side nav button > span { display: none; }
  .uam-r1-trust, .uam-r1-side::after { display: none; }
  .uam-r1-topbar { padding: 18px 18px 14px; }
  .uam-r1-topbar p { display: none; }
  .uam-r1-scroll { padding: 18px; }
  .uam-r1-notice { margin: 10px 18px 0; }
  .uam-r1-profile-card { grid-template-columns: 48px minmax(0, 1fr); }
  .uam-r1-avatar { width: 48px; height: 48px; }
  .uam-r1-role-chips { grid-column: 1 / -1; max-width: none; justify-content: flex-start; }
  .uam-r1-facts, .uam-r1-form-grid, .uam-r1-reverify { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .uam-r1-topbar h2 { font-size: 19px; }
  .uam-r1-panel-head, .uam-r1-danger-row, .uam-r1-directory-head, .uam-r1-search-result { align-items: flex-start; flex-direction: column; }
  .uam-r1-panel-head { display: flex; }
  .uam-r1-admin-toolbar > form { grid-template-columns: 1fr; }
  .uam-r1-admin-card > header { grid-template-columns: 38px minmax(0, 1fr); }
  .uam-r1-admin-card header time { grid-column: 2; }
  .uam-r1-admin-card li { grid-template-columns: 1fr auto; }
  .uam-r1-admin-card li .uam-r1-link,
  .uam-r1-admin-card li .uam-r1-protected { grid-column: 2; }
}

@media (prefers-reduced-motion: reduce) {
  .uam-r1-dialog,
  .uam-r1-loading > span { animation: none; }
  .uam-r1-backdrop button { transition: none; }
}
/* 08 个人账号当前服务管理 */
.paa-shell { --paa-green:#16382c; --paa-green-2:#225744; --paa-teal:#2f7a5f; --paa-line:#dedbd2; --paa-ink:#292923; --paa-muted:#77746b; --paa-bg:#f6f5f1; --paa-red:#ad4334; --paa-amber:#94681d;
  min-height:100vh; padding:20px; color:var(--paa-ink); background:var(--paa-bg); font-family:inherit; box-sizing:border-box; }
.paa-shell * { box-sizing:border-box; }
.paa-head { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; margin-bottom:8px; }
.paa-head h2 { margin:0; font-size:23px; line-height:1.25; }
.paa-head p { margin:4px 0 0; color:var(--paa-muted); font-size:13px; }
.paa-page-boundary,.paa-boundary,.paa-lock-note { margin:0 0 14px; padding:11px 13px; border:1px solid #cfe3d6; border-radius:10px; background:#edf5ef; color:var(--paa-teal); font-size:12.5px; line-height:1.65; }
.paa-lock-note { border-color:#ead8b7; background:#fbf4e8; color:var(--paa-amber); }
.paa-filters { display:grid; grid-template-columns:minmax(170px,1.4fr) minmax(140px,1fr) minmax(140px,1fr) minmax(110px,.8fr) auto; align-items:end; gap:10px; margin-bottom:14px; padding:12px; background:#fff; border:1px solid var(--paa-line); border-radius:12px; }
.paa-filter-note { grid-column:1/-1; margin:0; color:var(--paa-muted); font-size:11px; }
.paa-asof { color:var(--paa-muted); font-size:12px; white-space:nowrap; }
.paa-reason-count { color:var(--paa-muted); font-size:11px; text-align:right; }
.paa-filters label,.paa-field { display:flex; flex-direction:column; gap:5px; }
.paa-filters label>span,.paa-field>span,.paa-service-choices legend { color:var(--paa-muted); font-size:11px; font-weight:700; }
.paa-filters input,.paa-filters select,.paa-field input,.paa-field textarea { width:100%; min-height:40px; border:1px solid var(--paa-line); border-radius:8px; padding:8px 10px; color:var(--paa-ink); background:#fff; font:inherit; font-size:13px; }
.paa-field textarea { resize:vertical; }
.paa-btn { min-height:40px; padding:8px 14px; border:1px solid var(--paa-line); border-radius:9px; background:#fff; color:var(--paa-ink); cursor:pointer; font:inherit; font-size:13px; font-weight:700; }
.paa-btn.primary { background:var(--paa-green); border-color:var(--paa-green); color:#fff; }
.paa-btn.primary:hover:not(:disabled) { background:var(--paa-green-2); }
.paa-btn.ghost { background:transparent; }
.paa-btn:disabled { opacity:.52; cursor:not-allowed; }
.paa-link { border:0; background:transparent; color:var(--paa-teal); padding:5px 4px; font:inherit; font-size:12px; font-weight:700; cursor:pointer; }
.paa-link:hover { text-decoration:underline; }
.paa-main { display:grid; grid-template-columns:minmax(0,1fr) 370px; gap:16px; align-items:start; }
.paa-list-wrap,.paa-detail { min-width:0; border:1px solid var(--paa-line); border-radius:12px; background:#fff; overflow:hidden; }
.paa-detail { position:sticky; top:16px; max-height:calc(100vh - 32px); overflow-y:auto; padding:18px; }
.paa-table-head,.paa-row { display:grid; grid-template-columns:1.15fr 1.25fr 1.12fr 1.12fr 1fr .85fr 1fr; gap:8px; align-items:center; }
.paa-table-head { padding:11px 12px; border-bottom:1px solid var(--paa-line); background:#faf9f6; color:var(--paa-muted); font-size:11px; font-weight:700; }
.paa-row { padding:13px 12px; border-bottom:1px solid var(--paa-line); font-size:12px; outline:none; }
.paa-row:last-child { border-bottom:0; }
.paa-row:hover,.paa-row:focus-visible,.paa-row.is-selected { background:#f1f5f2; }
.paa-row.is-selected { box-shadow:inset 3px 0 0 var(--paa-green); }
.paa-cell { min-width:0; overflow-wrap:anywhere; }
.paa-account,.paa-person { display:flex; flex-direction:column; gap:2px; }
.paa-account b,.paa-person { font-size:13px; font-weight:700; }
.paa-cell small,.paa-person+small,.paa-company small,.paa-muted { color:var(--paa-muted); font-size:11px; line-height:1.45; }
.paa-companies { display:flex; flex-direction:column; gap:5px; }
.paa-company { display:flex; flex-direction:column; gap:1px; }
.paa-company b { font-size:12px; }
.paa-status-cell { display:flex; flex-wrap:wrap; gap:4px; }
.paa-chip { display:inline-flex; align-items:center; width:max-content; max-width:100%; padding:3px 7px; border-radius:999px; background:#f5ead5; color:var(--paa-amber); font-size:10.5px; font-weight:700; }
.paa-chip.ok { background:#e4f0e8; color:var(--paa-teal); }
.paa-chip.lock { background:#eceae4; color:#5f5c55; }
.paa-actions { display:flex; flex-wrap:wrap; gap:2px; }
.paa-state,.paa-detail-empty { padding:48px 22px; text-align:center; }
.paa-state h3 { margin:0 0 8px; font-size:16px; }
.paa-state p,.paa-detail-empty p { margin:0 0 12px; color:var(--paa-muted); font-size:13px; line-height:1.6; }
.paa-state small { display:block; margin:0 0 12px; color:var(--paa-muted); font-size:11px; overflow-wrap:anywhere; }
.paa-more { padding:12px; text-align:center; border-top:1px solid var(--paa-line); }
.paa-card-list { display:none; }
.paa-detail-title { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:14px; }
.paa-detail-title h3 { margin:0; font-size:18px; }
.paa-detail-title p { margin:3px 0 0; color:var(--paa-muted); font-size:12px; }
.paa-icon-btn { width:38px; height:38px; border:0; border-radius:8px; background:transparent; color:var(--paa-muted); cursor:pointer; font-size:22px; line-height:1; }
.paa-icon-btn:hover { background:#f0efe9; }
.paa-detail section { padding:13px 0; border-top:1px solid var(--paa-line); }
.paa-detail section h4 { margin:0 0 10px; font-size:13px; }
.paa-fact { display:grid; grid-template-columns:135px minmax(0,1fr); gap:10px; padding:6px 0; font-size:12px; }
.paa-fact>span { color:var(--paa-muted); }
.paa-detail-actions { display:flex; justify-content:flex-end; margin:12px 0; }
.paa-audit-list { display:flex; flex-direction:column; gap:8px; }
.paa-audit { padding:10px; border:1px solid var(--paa-line); border-radius:9px; background:#faf9f6; }
.paa-audit>div { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.paa-audit b { font-size:12px; }
.paa-audit time,.paa-audit small { color:var(--paa-muted); font-size:10.5px; }
.paa-audit p { margin:6px 0 3px; font-size:12px; }
.paa-read-error,.paa-modal-error { color:var(--paa-red); }
.paa-live { min-height:18px; margin:8px 0 0; color:var(--paa-teal); font-size:12px; }
.paa-modal-mask { position:fixed; inset:0; z-index:80; display:flex; align-items:center; justify-content:center; padding:20px; background:rgba(25,27,24,.48); }
.paa-modal { width:min(580px,100%); max-height:calc(100vh - 40px); overflow-y:auto; padding:20px; border-radius:15px; background:#fff; box-shadow:0 24px 70px rgba(0,0,0,.24); }
.paa-modal>header { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:12px; }
.paa-modal h3 { margin:0; font-size:18px; }
.paa-modal header p { margin:3px 0 0; color:var(--paa-muted); font-size:12px; }
.paa-modal .paa-field { margin:12px 0; }
.paa-service-choices { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin:12px 0; padding:0; border:0; }
.paa-service-choices legend { grid-column:1/-1; margin-bottom:2px; }
.paa-service-option { display:flex; align-items:flex-start; gap:8px; min-height:48px; padding:9px 10px; border:1px solid var(--paa-line); border-radius:9px; cursor:pointer; }
.paa-service-option:has(input:checked) { border-color:var(--paa-green); background:#edf5ef; }
.paa-service-option input { margin-top:3px; accent-color:var(--paa-green); }
.paa-service-option span { display:flex; flex-direction:column; gap:2px; }
.paa-service-option b { font-size:12px; }
.paa-service-option small { color:var(--paa-muted); font-size:10.5px; }
.paa-modal-error { min-height:18px; margin:8px 0; font-size:12px; line-height:1.5; }
.paa-modal-success { margin:8px 0; padding:10px 12px; border-radius:8px; background:#e7f2ea; color:var(--paa-teal); font-size:12px; }
.paa-modal>footer { position:sticky; bottom:-20px; display:flex; justify-content:flex-end; gap:8px; margin:12px -20px -20px; padding:12px 20px; border-top:1px solid var(--paa-line); background:#fff; }

@media (max-width:1100px) {
  .paa-main { grid-template-columns:1fr; }
  .paa-detail { position:static; max-height:none; }
  .paa-table-head,.paa-row { grid-template-columns:1.1fr 1.1fr 1fr 1fr .9fr .8fr .9fr; }
}
@media (max-width:720px) {
  .paa-shell { min-height:calc(100dvh - 90px); padding:12px; }
  .paa-head h2 { font-size:20px; }
  .paa-page-boundary { font-size:12px; }
  .paa-filters { grid-template-columns:1fr 1fr; }
  .paa-filters label:first-child { grid-column:1/-1; }
  .paa-filters .paa-btn { min-height:44px; }
  .paa-table { display:none; }
  .paa-card-list { display:flex; flex-direction:column; gap:10px; padding:10px; }
  .paa-card { padding:13px; border:1px solid var(--paa-line); border-radius:11px; background:#fff; }
  .paa-card.is-selected { border-color:var(--paa-green); box-shadow:0 0 0 1px var(--paa-green); }
  .paa-card>header { display:flex; align-items:flex-start; justify-content:space-between; gap:8px; }
  .paa-card>header>div:first-child { display:flex; flex-direction:column; gap:2px; }
  .paa-card>header small { color:var(--paa-muted); font-size:11px; }
  .paa-card .paa-status-cell { justify-content:flex-end; }
  .paa-card dl { margin:10px 0; }
  .paa-card dl>div { padding:8px 0; border-top:1px solid var(--paa-line); }
  .paa-card dt { margin-bottom:4px; color:var(--paa-muted); font-size:10.5px; font-weight:700; }
  .paa-card dd { margin:0; font-size:12px; }
  .paa-card footer { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
  .paa-card .paa-btn { min-height:44px; padding:8px; }
  .paa-detail { padding:14px; }
  .paa-fact { grid-template-columns:1fr; gap:3px; }
  .paa-modal-mask { align-items:flex-end; padding:8px; }
  .paa-modal { width:100%; max-height:calc(100dvh - 16px); padding:16px; border-radius:16px 16px 10px 10px; }
  .paa-service-choices { grid-template-columns:1fr; }
  .paa-service-option { min-height:48px; }
  .paa-modal>footer { bottom:-16px; margin:12px -16px -16px; padding:12px 16px; }
  .paa-modal>footer .paa-btn { min-height:44px; }
}
@media (max-width:420px) {
  .paa-filters { grid-template-columns:1fr; }
  .paa-filters label:first-child { grid-column:auto; }
  .paa-card footer { grid-template-columns:1fr; }
}
.pas-modal-mask{position:fixed;z-index:9400;inset:0;display:flex;align-items:center;justify-content:center;padding:24px;background:rgba(13,27,20,.58);backdrop-filter:blur(4px);font-family:"Microsoft YaHei","PingFang SC",sans-serif}.pas-modal-mask *{box-sizing:border-box}.pas-modal{width:min(760px,100%);max-height:calc(100vh - 48px);overflow:auto;border:1px solid rgba(255,255,255,.65);border-radius:20px;background:#f8faf8;color:#17251d;box-shadow:0 30px 100px rgba(4,20,12,.28)}.pas-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding:24px 26px 20px;border-bottom:1px solid #e1e8e3;background:#fff}.pas-kicker{margin:0 0 6px!important;color:#3e8762!important;font-size:10px!important;font-weight:800;letter-spacing:.16em}.pas-head h3{margin:0;font-size:23px;letter-spacing:-.02em}.pas-head p{margin:7px 0 0;color:#718078;font-size:13px}.pas-close{flex:0 0 auto;width:35px;height:35px;border:0;border-radius:50%;background:#f0f4f1;color:#536259;cursor:pointer;font-size:23px;line-height:1}.pas-context-facts{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:18px 22px 0}.pas-context-facts>div{padding:12px;border:1px solid #e2e9e4;border-radius:11px;background:#fff}.pas-context-facts dt{color:#7b8780;font-size:10px}.pas-context-facts dd{margin:5px 0 0;font-size:12px;font-weight:700;line-height:1.5}.pas-step{padding:20px 22px;border-bottom:1px solid #e2e9e4}.pas-step-title{display:flex;align-items:flex-start;gap:11px;margin-bottom:14px}.pas-step-title>span{display:flex;align-items:center;justify-content:center;flex:0 0 27px;height:27px;border-radius:50%;background:#176b47;color:#fff;font-size:12px;font-weight:800}.pas-step-title h4{margin:1px 0 0;font-size:15px}.pas-step-title p{margin:4px 0 0;color:#7a867f;font-size:11px}.pas-subject{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 14px;border:1px solid #dfe7e2;border-radius:11px;background:#fff;color:#4c5c53;font-size:12px;font-weight:700}.pas-subject select{min-width:210px;padding:8px 30px 8px 10px;border:1px solid #cfdbd3;border-radius:8px;background:#fff;color:#203128;font:inherit}.pas-products{display:grid;grid-template-columns:1fr 1fr;gap:10px}.pas-product{display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:80px;padding:14px;border:1px solid #dce5df;border-radius:12px;background:#fff;color:#26372e;text-align:left;cursor:pointer;transition:border-color .16s,box-shadow .16s,transform .16s}.pas-product:hover:not(:disabled){border-color:#72a98b;transform:translateY(-1px)}.pas-product.is-selected{border-color:#247a54;box-shadow:0 0 0 3px rgba(36,122,84,.1)}.pas-product:disabled{cursor:not-allowed;opacity:.58;background:#f2f4f2}.pas-product b{display:block;font-size:13px}.pas-product small{display:block;margin-top:6px;color:#748078;font-size:10px;line-height:1.5}.pas-product em{flex:0 0 auto;max-width:105px;color:#176b47;font-size:11px;font-style:normal;font-weight:800;text-align:right}.pas-product:disabled em{color:#8b938e}.pas-qr{display:flex;align-items:center;gap:16px;margin:0;padding:14px;border:1px dashed #cfdcd4;border-radius:12px;background:#fff}.pas-qr img{width:104px;height:104px;object-fit:contain;border-radius:7px}.pas-qr figcaption{color:#65736b;font-size:12px;line-height:1.7}.pas-qr.pas-empty{justify-content:center;min-height:70px;color:#85908a}.pas-error{min-height:18px;margin:14px 22px 0;color:#a33f35;font-size:12px}.pas-link{border:0;background:transparent;color:#176b47;cursor:pointer;text-decoration:underline}.pas-actions{display:flex;justify-content:flex-end;gap:9px;padding:14px 22px 22px}.pas-btn{min-height:39px;padding:0 16px;border:1px solid #cfdad3;border-radius:9px;background:#fff;color:#33473c;cursor:pointer;font:inherit;font-size:13px;font-weight:700}.pas-btn.primary{border-color:#176b47;background:#176b47;color:#fff}.pas-btn:disabled{cursor:not-allowed;opacity:.5}.pas-state,.pas-success{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:330px;padding:38px;text-align:center;color:#6c7971}.pas-state p,.pas-success p{margin:10px 0 16px;line-height:1.7}.pas-state.pas-loading>span{width:27px;height:27px;border:2px solid #d9e4dd;border-top-color:#176b47;border-radius:50%;animation:pas-spin .75s linear infinite}.pas-state.pas-error{color:#9b493f}.pas-success>span{display:flex;align-items:center;justify-content:center;width:54px;height:54px;border-radius:50%;background:#e4f4ea;color:#176b47;font-size:27px;font-weight:800}.pas-success h4{margin:15px 0 0;font-size:19px}@keyframes pas-spin{to{transform:rotate(360deg)}}@media(max-width:680px){.pas-modal-mask{align-items:flex-end;padding:0}.pas-modal{width:100%;max-height:92vh;border-radius:20px 20px 0 0}.pas-head,.pas-step{padding-left:17px;padding-right:17px}.pas-products{grid-template-columns:1fr}.pas-context-facts{grid-template-columns:1fr;margin-left:17px;margin-right:17px}.pas-subject{align-items:flex-start;flex-direction:column}.pas-subject select{width:100%;min-width:0}.pas-actions{position:sticky;bottom:0;padding:12px 17px;background:#f8faf8}}
.pas-payment-confirm{display:flex;align-items:flex-start;gap:10px;margin-top:13px;padding:12px 14px;border:1px solid #cfded5;border-radius:10px;background:#f2f8f4;color:#30483b;font-size:12px;font-weight:700;line-height:1.55;cursor:pointer}.pas-payment-confirm input{flex:0 0 auto;width:17px;height:17px;margin:1px 0 0;accent-color:#176b47}.pas-payment-confirm:has(input:focus-visible){outline:3px solid rgba(36,122,84,.14)}
.pas-verified{flex:0 0 auto;align-self:flex-start;padding:3px 8px;border-radius:99px;background:#e4f4ea;color:#176b47;font-size:10px;font-style:normal;font-weight:800;white-space:nowrap}.pas-preview[hidden]{display:none}.pas-preview-head{margin-bottom:12px}.pas-preview-head h4{margin:0;font-size:15px}.pas-preview-head p{margin:4px 0 0;color:#7a867f;font-size:11px}.pas-preview-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:0}.pas-preview-grid>div{padding:11px;border:1px solid #e2e9e4;border-radius:10px;background:#fff}.pas-preview-grid dt{color:#7a867f;font-size:11px}.pas-preview-grid dd{margin:5px 0 0;font-size:13px;font-weight:700;line-height:1.5}@media(max-width:680px){.pas-preview-grid{grid-template-columns:1fr}}.pcl-shell{--pcl-ink:#17231d;--pcl-muted:#6e7b74;--pcl-line:#e2e9e5;--pcl-green:#176b47;min-height:100%;padding:30px 34px 56px;background:#f7f9f7;color:var(--pcl-ink);font-family:"Microsoft YaHei","PingFang SC",sans-serif}.pcl-shell *{box-sizing:border-box}.pcl-head{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin-bottom:22px}.pcl-kicker{margin:0 0 7px!important;color:#3e8360!important;font-size:10px!important;font-weight:800;letter-spacing:.16em}.pcl-head h2{margin:0;font-size:29px;letter-spacing:-.03em}.pcl-head p{margin:7px 0 0;color:var(--pcl-muted);font-size:13px}.pcl-period{display:flex;padding:4px;border:1px solid var(--pcl-line);border-radius:11px;background:#fff}.pcl-period button{padding:8px 16px;border:0;border-radius:8px;background:transparent;color:#6e7b74;cursor:pointer;font-size:12px;font-weight:700}.pcl-period button.is-active{background:var(--pcl-green);color:#fff}.pcl-summary-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:13px;margin-bottom:18px}.pcl-summary-grid article{min-height:122px;padding:18px;border:1px solid var(--pcl-line);border-radius:15px;background:#fff;box-shadow:0 8px 25px rgba(35,61,46,.04)}.pcl-summary-grid small{display:block;color:var(--pcl-muted);font-size:11px;font-weight:700}.pcl-summary-grid b{display:block;margin-top:15px;font-size:25px}.pcl-rule{margin:-3px 0 18px;padding:11px 14px;border-left:3px solid #7ea88f;border-radius:0 8px 8px 0;background:#edf5f0;color:#52635a;font-size:11px;line-height:1.65}.pcl-block{margin-top:18px;border:1px solid var(--pcl-line);border-radius:16px;background:#fff;box-shadow:0 8px 26px rgba(35,61,46,.035);overflow:hidden}.pcl-block>header{display:flex;align-items:center;justify-content:space-between;padding:17px 20px;border-bottom:1px solid var(--pcl-line)}.pcl-block h3{margin:0;font-size:16px}.pcl-block header p{margin:5px 0 0;color:var(--pcl-muted);font-size:11px}.pcl-table>div{display:grid;grid-template-columns:minmax(180px,1.4fr) repeat(4,minmax(100px,.7fr));gap:14px;align-items:center;padding:14px 20px;border-bottom:1px solid #edf1ee;font-size:12px}.pcl-table>div:last-child{border-bottom:0}.pcl-table-head{background:#fafbfa;color:#849088;font-size:11px!important;font-weight:700}.pcl-period-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:18px}.pcl-period-list article{padding:16px;border:1px solid #e2e9e5;border-radius:12px;background:#fbfcfb}.pcl-period-list article>div{display:flex;align-items:center;justify-content:space-between;gap:14px}.pcl-period-list b{font-size:13px}.pcl-period-list small{padding:4px 8px;border-radius:99px;background:#edf4ef;color:#4d6c5b;font-size:10px}.pcl-period-list dl{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:14px 0 0}.pcl-period-list dl>div{padding:10px;border-radius:8px;background:#f2f5f3}.pcl-period-list dt{color:#78847d;font-size:10px}.pcl-period-list dd{margin:5px 0 0;font-size:14px;font-weight:800}.pcl-state{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:150px;padding:28px;color:var(--pcl-muted);text-align:center}.pcl-state p{margin:8px 0 13px;font-size:12px;line-height:1.6}.pcl-state.pcl-loading>span{width:23px;height:23px;border:2px solid #dbe5df;border-top-color:var(--pcl-green);border-radius:50%;animation:pcl-spin .75s linear infinite}.pcl-state.pcl-error{background:#fff9f7;color:#9b493f}.pcl-btn{min-height:35px;padding:0 13px;border:1px solid #cdd8d1;border-radius:8px;background:#fff;color:#35473e;cursor:pointer;font-weight:700}@keyframes pcl-spin{to{transform:rotate(360deg)}}@media(max-width:900px){.pcl-summary-grid{grid-template-columns:repeat(2,1fr)}.pcl-table{overflow-x:auto}.pcl-table>div{min-width:720px}}@media(max-width:620px){.pcl-shell{padding:22px 16px 45px}.pcl-head{align-items:flex-start;flex-direction:column}.pcl-period{width:100%}.pcl-period button{flex:1}.pcl-summary-grid{grid-template-columns:1fr 1fr}.pcl-period-list{grid-template-columns:1fr;padding:14px}}@media(max-width:410px){.pcl-summary-grid{grid-template-columns:1fr}}
.pcl-shell .pcl-summary-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.pcl-shell .pcl-period-list{grid-template-columns:1fr}.pcl-period-list article dl{grid-template-columns:repeat(5,minmax(0,1fr))}.pcl-status-card b,.pcl-status-value{color:#286648!important;font-size:14px!important}.pcl-status-value{display:inline-flex;align-items:center;width:max-content;padding:4px 8px;border-radius:99px;background:#e9f4ed}@media(max-width:900px){.pcl-shell .pcl-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.pcl-period-list article dl{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:620px){.pcl-period-list article dl{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:410px){.pcl-shell .pcl-summary-grid,.pcl-period-list article dl{grid-template-columns:1fr}}
html[data-meifan-theme="tech-glass-blue"] body:not(.home-mode) .pcl-shell :is(h1,h2,h3,h4,strong,b,label,th,td,dt,dd,code,em,i,time){color:#14231b}html[data-meifan-theme="tech-glass-blue"] body:not(.home-mode) .pcl-shell :is(p,small,span){color:#4f5a54}html[data-meifan-theme="tech-glass-blue"] body:not(.home-mode) .pcl-shell :is(input,select,textarea){background:#fff;color:#14231b;border-color:#cfdad3}html[data-meifan-theme="tech-glass-blue"] body:not(.home-mode) .pcl-shell :is(input,select,textarea)::placeholder{color:#55605a}html[data-meifan-theme="tech-glass-blue"] body:not(.home-mode) .pcl-shell th{background:#f2f5f3}html[data-meifan-theme="tech-glass-blue"] body:not(.home-mode) .pcl-shell td{border-color:#edf0ee}html[data-meifan-theme="tech-glass-blue"] body:not(.home-mode) .pcl-shell :is(button,[class$="-btn"],[class$="-link"]){color:#176b47}html[data-meifan-theme="tech-glass-blue"] body:not(.home-mode) .pcl-shell [class$="-btn"].primary,html[data-meifan-theme="tech-glass-blue"] body:not(.home-mode) .pcl-shell [class$="-btn"].is-active{color:#fff}
html[data-meifan-theme="tech-glass-blue"] body:not(.home-mode) .64_-shell [class$="-btn"].ghost{background:#fff;border-color:#cfdad3}
.pcl-shell{--pcl-muted:#55605a}.pcl-head p{color:var(--pcl-muted)}.pcl-period button{color:#55605a}.pcl-kicker{color:#2f6b4c!important}
.pcl-head-side{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.pcl-btn:disabled{opacity:.55;cursor:not-allowed}
.pcl-filters{display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap;margin:-6px 0 18px}
.pcl-filters label{display:grid;gap:6px}
.pcl-filters label span{color:var(--pcl-muted);font-size:11px;font-weight:700}
.pcl-filters select{min-height:36px;padding:0 12px;border:1px solid var(--pcl-line);border-radius:8px;background:#fff;color:var(--pcl-ink);font:inherit;font-size:12px}
.pcl-filters select:disabled{opacity:.6;cursor:not-allowed;border-style:dashed}
.pcl-filters small{color:var(--pcl-muted);font-size:11px}
.pcl-honest{margin:-3px 0 18px;color:var(--pcl-muted);font-size:11px;line-height:1.65}
.pcl-block-note{margin:0;padding:12px 20px;border-top:1px solid var(--pcl-line);color:var(--pcl-muted);font-size:11px;line-height:1.6}
footer.pcl-note{display:block;margin:18px 0 0;padding:12px 16px;border:1px solid var(--pcl-line);border-radius:10px;background:#fff;color:var(--pcl-muted);font-size:11px;line-height:1.7}
footer.pcl-note b{color:var(--pcl-ink)}
@media(max-width:620px){.pcl-head-side{width:100%}}
/* 264⑧ 前100名标记 chip：复用既有变量，零新颜色。 */
.pcl-chip{display:inline-block;padding:1px 8px;border-radius:999px;font-size:11px}
.pcl-chip.is-good{color:var(--pcl-green);border:1px solid currentColor;background:transparent}
.cac-shell{--cac-ink:#18241d;--cac-muted:#6e7b74;--cac-line:#e2e9e5;--cac-green:#176b47;min-height:100%;padding:30px 34px 54px;background:linear-gradient(180deg,#eff7f2 0,#f8faf8 190px);color:var(--cac-ink);font-family:"Microsoft YaHei","PingFang SC",sans-serif}.cac-shell *{box-sizing:border-box}.cac-head{display:flex;align-items:center;justify-content:space-between;gap:22px;margin:0 auto 24px;max-width:880px}.cac-kicker{margin:0 0 7px!important;color:#3d8260!important;font-size:10px!important;font-weight:800;letter-spacing:.16em}.cac-head h2{margin:0;font-size:28px;letter-spacing:-.025em}.cac-head p{margin:7px 0 0;color:var(--cac-muted);font-size:13px}.cac-refresh{min-height:38px;padding:0 15px;border:1px solid #ccd8d0;border-radius:9px;background:rgba(255,255,255,.85);color:#385044;cursor:pointer;font-weight:700}.cac-claim-list{display:grid;gap:13px;max-width:880px;margin:0 auto}.cac-claim{padding:20px;border:1px solid var(--cac-line);border-radius:16px;background:#fff;box-shadow:0 8px 28px rgba(36,62,47,.045)}.cac-claim>header{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}.cac-source{margin:0 0 5px;color:#4a8263;font-size:10px;font-weight:800;letter-spacing:.08em}.cac-claim h3{margin:0;font-size:18px}.cac-chip{display:inline-flex;align-items:center;padding:5px 9px;border-radius:99px;font-size:11px;font-weight:800}.cac-chip.is-pending{background:#fff1d7;color:#8c5a10}.cac-chip.is-done{background:#e5f4ea;color:#246647}.cac-chip.is-muted{background:#eff2f0;color:#758078}.cac-benefit{margin:17px 0;padding:14px;border:1px solid #e1e8e3;border-radius:11px;background:#f8faf8}.cac-benefit small{color:#7b8780;font-size:10px}.cac-benefit p{margin:6px 0 0;color:#34463c;font-size:13px;line-height:1.7}.cac-claim>footer{display:flex;align-items:center;justify-content:space-between;gap:18px}.cac-claim time{color:#89938d;font-size:11px}.cac-btn{min-height:38px;padding:0 15px;border:1px solid #ccd8d0;border-radius:9px;background:#fff;color:#35473e;cursor:pointer;font:inherit;font-size:12px;font-weight:800}.cac-btn.primary{border-color:var(--cac-green);background:var(--cac-green);color:#fff}.cac-btn:disabled{cursor:not-allowed;opacity:.55}.cac-inline-error{min-height:17px;margin:10px 0 0;color:#a44036;font-size:11px}.cac-link{border:0;background:transparent;color:#176b47;cursor:pointer;text-decoration:underline}.cac-state{display:flex;flex-direction:column;align-items:center;justify-content:center;max-width:880px;min-height:300px;margin:0 auto;padding:40px;border:1px solid var(--cac-line);border-radius:16px;background:#fff;color:var(--cac-muted);text-align:center}.cac-state>span{width:26px;height:26px;border:2px solid #dbe5df;border-top-color:var(--cac-green);border-radius:50%;animation:cac-spin .75s linear infinite}.cac-state p{margin:11px 0 16px;font-size:13px;line-height:1.65}.cac-state.cac-error{color:#9c493f;background:#fff9f7}.cac-status{max-width:880px;margin:14px auto 0;padding:11px 14px;border-radius:9px;background:#e8f4ed;color:#245e42;font-size:12px}.cac-status:empty{display:none}@keyframes cac-spin{to{transform:rotate(360deg)}}@media(max-width:640px){.cac-shell{padding:22px 15px 44px}.cac-head{align-items:flex-start;flex-direction:column}.cac-refresh{width:100%}.cac-claim{padding:16px}.cac-claim>footer{align-items:flex-start;flex-direction:column}.cac-btn.primary{width:100%}}
.customer-assisted-sales-claim-mode{overflow:hidden}#meifanCustomerAssistedSalesClaimRoot{position:fixed;z-index:9300;inset:0;overflow:auto;background:#f7faf8}.cac-head-actions{display:flex;align-items:center;gap:9px}.cac-back{min-height:38px;padding:0 15px;border:1px solid #176b47;border-radius:9px;background:#176b47;color:#fff;cursor:pointer;font-weight:700}@media(max-width:640px){.cac-head-actions{width:100%}.cac-head-actions .cac-refresh,.cac-head-actions .cac-back{flex:1}}
.cac-redeem{margin-top:18px;padding:18px;border:1px solid #e2e9e5;border-radius:14px;background:#fff}.cac-redeem h3{margin:0 0 4px}.cac-redeem header p{margin:0 0 10px;color:#6d7972;font-size:12px}.cac-redeem-form{display:flex;gap:10px;margin-bottom:8px}.cac-redeem-form input{flex:1;min-height:40px;padding:0 12px;border:1px solid #cfdad3;border-radius:10px;font-size:14px}.cac-redeem-ok{min-height:16px;margin:6px 0;color:#176b47;font-size:13px}.cac-redeem code{font-family:ui-monospace,Consolas,monospace}@media(max-width:720px){.cac-redeem-form{flex-direction:column}}
.cac-shell{--cac-muted:#4f5a54}.cac-head p{color:var(--cac-muted)}.cac-claim time{color:#55605a}
.cac-kicker{color:#2f6b4c!important}
html[data-meifan-theme="tech-glass-blue"] body:not(.home-mode) .cac-shell :is(h1,h2,h3,h4,strong,b,label,th,td,dt,dd,code,em,i,time){color:#14231b}html[data-meifan-theme="tech-glass-blue"] body:not(.home-mode) .cac-shell :is(p,small,span){color:#4f5a54}/* 客户兑换专用页是盖在首页上的 fixed overlay, body 全程保留 home-mode(switchView 只在回首页时切类), 前一次深色态补正 的 body:not(.home-mode) 前提在本页永不成立——夜档输入框被 css/02 未限定作用域的 select,input,textarea{background:#fff;color:var(--ink)} 打成近白字白底(实测1.05)。本组规则改锚 html[data-meifan-theme]+.cac-shell, 不依赖 body 类。 */
html[data-meifan-theme="tech-glass-blue"] .cac-shell :is(input,select,textarea){background:#fff;color:#14231b;caret-color:#2a2f2c;border-color:#cfdad3}html[data-meifan-theme="tech-glass-blue"] .cac-shell :is(input,select,textarea)::placeholder{color:#55605a}html[data-meifan-theme="tech-glass-blue"] body .cac-shell :is(input,select,textarea):focus{border-color:#176b47}html[data-meifan-theme="tech-glass-blue"] .cac-shell :is(input,select,textarea):disabled{background:#f1f4f2;color:#55605a;border-color:#dbe3de;caret-color:#55605a}html[data-meifan-theme="tech-glass-blue"] .cac-shell .cac-inline-error{color:#a44036}html[data-meifan-theme="tech-glass-blue"] body:not(.home-mode) .cac-shell :is(button,.cac-btn,.cac-link){color:#176b47}html[data-meifan-theme="tech-glass-blue"] body:not(.home-mode) .cac-shell .cac-btn.primary{color:#fff}
.pma-shell{--pma-green:#075e53;--pma-ink:#142723;--pma-muted:#68736f;--pma-line:#dfe5e1;--pma-soft:#f5f7f3;color:var(--pma-ink);display:grid;gap:18px;min-width:0}
.pma-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}.pma-head h2{font-size:30px;line-height:1.2;margin:0 0 5px}.pma-head p{color:var(--pma-muted);margin:0}
.pma-filters{display:grid;grid-template-columns:minmax(220px,1.5fr) minmax(150px,.7fr) minmax(160px,.7fr) auto;gap:10px;align-items:end}.pma-filters label,.pma-field{display:grid;gap:6px}.pma-filters label span,.pma-field span{color:#53605c;font-size:13px;font-weight:650}.pma-filters input,.pma-filters select,.pma-field input,.pma-field select,.pma-field textarea{background:#fff;border:1px solid #cfd8d3;border-radius:8px;color:var(--pma-ink);font:inherit;min-height:42px;padding:9px 12px}.pma-filters input:focus,.pma-filters select:focus,.pma-field input:focus,.pma-field textarea:focus{border-color:#168676;box-shadow:0 0 0 3px rgba(22,134,118,.13);outline:0}
.pma-btn{border:1px solid transparent;border-radius:8px;cursor:pointer;font:inherit;font-weight:700;min-height:42px;padding:9px 18px}.pma-btn.primary{background:var(--pma-green);box-shadow:0 5px 12px rgba(7,94,83,.16);color:#fff}.pma-btn.ghost{background:#fff;border-color:#cad6d0;color:var(--pma-green)}.pma-btn:disabled{cursor:not-allowed;opacity:.55}
.pma-card{background:#fff;border:1px solid var(--pma-line);border-radius:10px;overflow:hidden}.pma-card>header{align-items:center;border-bottom:1px solid var(--pma-line);display:flex;gap:18px;justify-content:space-between;padding:16px}.pma-card>header h3{font-size:18px;margin:0 0 4px}.pma-card>header p,.pma-card>header small{color:var(--pma-muted);margin:0}.pma-card>header small{max-width:420px;text-align:right}
.pma-table-wrap{overflow:auto}.pma-table{border-collapse:collapse;min-width:1040px;width:100%}.pma-table th{background:#f2f5f3;color:#44514c;font-size:13px;font-weight:700;padding:12px;text-align:left;white-space:nowrap}.pma-table td{border-top:1px solid #edf0ee;padding:14px 12px;vertical-align:middle;white-space:nowrap}.pma-table td:first-child b,.pma-table td:first-child small{display:block}.pma-table td:first-child small{color:#7a8581;font-size:12px;margin-top:3px}.pma-table tr:hover td{background:#fbfcfa}
.pma-badge{background:#eef1ef;border:1px solid #d7ddda;border-radius:6px;color:#59635f;display:inline-flex;font-size:12px;font-weight:700;padding:4px 8px}.pma-badge.is-good{background:#eaf5ef;border-color:#cbe3d5;color:#226747}.pma-badge.is-warn{background:#fff5dc;border-color:#ead9a8;color:#7c5b17}.pma-badge.is-muted{background:#f0f1f1;border-color:#d8dcda;color:#66706c}.pma-table .is-good{color:#177052}.pma-table .is-bad{color:#a94a3e}.pma-table .is-muted{color:#7d8783}
.pma-benefit-state{color:#69746f;display:block;font-size:11px;margin-top:5px}
.pma-actions{align-items:flex-start;display:flex;flex-direction:column;gap:6px}.pma-link{background:none;border:0;color:#09695d;cursor:pointer;font:inherit;font-size:13px;font-weight:700;padding:0;text-decoration:none}.pma-link:hover{text-decoration:underline}.pma-link.is-action{color:#8b6414}
.pma-link:disabled{cursor:wait;opacity:.7;text-decoration:none}.pma-issue-error{color:#a2473e;display:block;font-size:11px;max-width:180px;white-space:normal}
.pma-note{background:#fff9e9;border:1px solid #ead7a6;border-radius:8px;color:#6f5b28;font-size:13px;margin:0;padding:11px 14px}.pma-live{height:0;margin:0;overflow:hidden}
.pma-state{align-items:center;color:#65716d;display:flex;flex-direction:column;gap:10px;justify-content:center;min-height:230px;padding:30px;text-align:center}.pma-state h3,.pma-state p{margin:0}.pma-state small{max-width:620px;overflow-wrap:anywhere}.pma-state.is-error{color:#7d3f36}.pma-state.is-loading span{animation:pma-spin .8s linear infinite;border:3px solid #d9e3df;border-radius:50%;border-top-color:#138172;height:24px;width:24px}@keyframes pma-spin{to{transform:rotate(360deg)}}
.pma-mask{align-items:center;background:rgba(11,31,27,.48);display:flex;inset:0;justify-content:center;padding:24px;position:fixed;z-index:7200}.pma-dialog{background:#fff;border-radius:12px;box-shadow:0 22px 70px rgba(7,35,29,.26);max-height:min(720px,calc(100vh - 48px));overflow:auto;padding:20px;width:min(620px,100%)}.pma-dialog>header{align-items:flex-start;border-bottom:1px solid var(--pma-line);display:flex;justify-content:space-between;margin:-2px 0 16px;padding-bottom:14px}.pma-dialog h3{font-size:21px;margin:0 0 4px}.pma-dialog header p{color:var(--pma-muted);font-size:13px;margin:0}.pma-icon{background:#f4f6f4;border:0;border-radius:8px;color:#46534f;cursor:pointer;font-size:22px;height:36px;line-height:1;width:36px}.pma-boundary{background:#edf7f3;border-left:3px solid #19816f;color:#3d5e56;font-size:13px;padding:10px 12px}.pma-action-dialog footer{display:flex;gap:10px;justify-content:flex-end;margin-top:18px}.pma-form-error{color:#a2473e;min-height:20px}.pma-audit-list{display:grid;gap:10px;list-style:none;margin:0;padding:0}.pma-audit-list li{background:var(--pma-soft);border:1px solid var(--pma-line);border-radius:8px;padding:12px}.pma-audit-list li>div{display:flex;gap:14px;justify-content:space-between}.pma-audit-list time,.pma-audit-list small{color:var(--pma-muted);font-size:12px}.pma-audit-list p{margin:8px 0 4px}
.pma-audit-list .pma-audit-code{color:#275e53}.pma-audit-code code{background:#e4f2ed;border-radius:5px;color:#145f52;display:inline-block;font:700 12px/1.45 ui-monospace,SFMono-Regular,Consolas,monospace;padding:2px 6px}
@media(max-width:900px){.pma-filters{grid-template-columns:1fr 1fr}.pma-filters .pma-btn{width:100%}.pma-card>header{align-items:flex-start;flex-direction:column}.pma-card>header small{text-align:left}.pma-head h2{font-size:26px}}
@media(max-width:560px){.pma-filters{grid-template-columns:1fr}.pma-mask{padding:10px}.pma-dialog{max-height:calc(100vh - 20px)}.pma-head h2{font-size:24px}}
.pma-redemption-range{display:flex;gap:10px;align-items:flex-end;margin-bottom:12px}.pma-redemption-range label{display:grid;gap:4px;font-size:12px;color:#6d7972}.pma-redemption-range input{min-height:34px;padding:0 8px;border:1px solid #cfdad3;border-radius:8px}.pma-redemption-stats{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin:0 0 10px}.pma-redemption-stats div{padding:10px;border:1px solid #e2e9e5;border-radius:10px;background:#fafcfa}.pma-redemption-stats dt{font-size:11px;color:#6d7972}.pma-redemption-stats dd{margin:4px 0 0;font-size:18px;font-weight:800}.pma-redemption-revoke{margin-top:12px;padding-top:10px;border-top:1px dashed #e2e9e5}.pma-redemption-revoke h4{margin:0 0 6px}.pma-link.is-danger{color:#a5483e}@media(max-width:720px){.pma-redemption-stats{grid-template-columns:repeat(2,1fr)}.pma-redemption-range{flex-wrap:wrap}}
.pma-codes-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:12px 0 8px}.pma-codes-toolbar h4{margin:0}.pma-codes-toolbar select{min-height:32px;padding:0 8px;border:1px solid #cfdad3;border-radius:8px;background:#fff;color:#14231b}.pma-codes-table{display:grid;gap:0;border:1px solid #e2e9e5;border-radius:10px;overflow:hidden}.pma-codes-head,.pma-codes-row{display:grid;grid-template-columns:1.1fr 1fr 1fr .9fr 1.3fr .5fr;gap:8px;padding:8px 12px;align-items:center}.pma-codes-head{background:#f0f4f1;font-size:11px;font-weight:700;color:#3f4f46}.pma-codes-row{background:#fff;border-top:1px solid #eef2ef;font-size:12px;color:#14231b}.pma-codes-row code{font-family:ui-monospace,Consolas,monospace}.pma-codes-row time{color:#3f4f46;font-size:11px}.pma-codes-row.is-armed{background:#fdf6e8}.pma-codes-pager{display:flex;gap:8px;justify-content:flex-end;align-items:center;margin-top:8px}.pma-codes-page{color:var(--pma-muted);font-size:12px}.pma-revoke-confirm{margin:10px 0;padding:12px;border:1px solid #ecd9a8;border-radius:10px;background:#fffaf0}.pma-revoke-confirm p{margin:0 0 8px;color:#14231b;font-size:13px}.pma-revoke-confirm code{background:#fff;padding:2px 6px;border-radius:6px}@media(max-width:720px){.pma-codes-head{display:none}.pma-codes-row{grid-template-columns:1fr;gap:4px}}
.pma-switch{display:inline-flex;align-items:center;gap:8px;background:#fff;border:1px solid var(--pma-line);border-radius:999px;color:var(--pma-muted);cursor:pointer;font:inherit;font-size:12px;font-weight:700;min-height:30px;padding:3px 12px 3px 4px}.pma-switch-dot{background:#d7ddda;border-radius:50%;display:inline-block;height:14px;width:14px}.pma-switch.is-on{color:var(--pma-green)}.pma-switch.is-on .pma-switch-dot{background:var(--pma-green)}
.pma-detail-tabs{border-bottom:1px solid var(--pma-line);display:flex;gap:8px;margin-bottom:14px}.pma-detail-tab{background:none;border:0;border-bottom:2px solid transparent;color:var(--pma-muted);cursor:pointer;font:inherit;font-size:13px;font-weight:700;padding:8px 10px}.pma-detail-tab.is-active{border-bottom-color:var(--pma-green);color:var(--pma-green);cursor:default}
.pma-benefit-line{align-items:center;border:1px solid var(--pma-line);border-radius:8px;display:flex;flex-wrap:wrap;gap:10px;margin-bottom:14px;padding:10px 12px}.pma-benefit-line>span{font-size:13px;font-weight:650}
.pma-table td:first-child small{color:#5f6a65}.pma-redemption-stats dt{color:#4f5a54}
/* R587 R4: business administrator personnel page and its own dialogs. */
html[data-meifan-theme] body .pma-shell {
  --pma-ink: var(--r4-ui-ink); --pma-muted: var(--r4-ui-muted);
  --pma-line: var(--r4-ui-line); --pma-soft: var(--r4-ui-soft); --pma-green: var(--r4-ui-accent);
  --pma-danger: #ffb4aa; --pma-warning: #f4d28e; --pma-good: #a2dfc5;
  color: var(--pma-ink); padding: 30px 34px 132px;
}
html[data-meifan-theme="day"] body .pma-shell { --pma-danger: #9c302b; --pma-warning: #785218; --pma-good: #226747; }
html[data-meifan-theme] body .pma-shell :is(h1,h2,h3,h4,strong,b,label,th,td,dt,dd,code,em,i,time) { color: var(--pma-ink); }
html[data-meifan-theme] body .pma-shell :is(p,small,span) { color: var(--pma-muted); }
html[data-meifan-theme] body .pma-shell :is(.pma-card,.pma-dialog) {
  color: var(--pma-ink); background: var(--r4-ui-glass); border: 1px solid var(--pma-line);
  box-shadow: inset 0 1px 0 rgba(207,235,255,.16);
}
html[data-meifan-theme] body .pma-shell .pma-dialog { box-shadow: inset 0 1px 0 rgba(207,235,255,.2), 0 22px 70px rgba(0,12,25,.3); }
html[data-meifan-theme="tech-glass-blue"] body .pma-shell .pma-mask { background: rgba(2,12,24,.62); }
html[data-meifan-theme] body .pma-shell :is(.pma-table th,.pma-codes-head,.pma-redemption-stats div,.pma-audit-list li,.pma-icon) {
  color: var(--pma-ink); background: var(--pma-soft); border-color: var(--pma-line);
}
html[data-meifan-theme] body .pma-shell :is(.pma-table td,.pma-codes-table,.pma-codes-row,.pma-redemption-revoke) { border-color: var(--pma-line); }
html[data-meifan-theme] body .pma-shell .pma-codes-row { color: var(--pma-ink); background: var(--r4-ui-panel); }
html[data-meifan-theme] body .pma-shell .pma-table tr:hover td { background: var(--r4-ui-panel); }
html[data-meifan-theme] body .pma-shell .pma-state.is-loading span { border-color: var(--pma-line); border-top-color: var(--pma-green); }
html[data-meifan-theme] body .pma-shell :is(input,select,textarea) { background: var(--pma-soft); color: var(--pma-ink); border-color: var(--pma-line); }
html[data-meifan-theme] body .pma-shell :is(input,select,textarea)::placeholder { color: var(--pma-muted); opacity: 1; }
html[data-meifan-theme] body .pma-shell :is(button,.pma-btn,.pma-link) { color: var(--pma-green); }
html[data-meifan-theme] body .pma-shell .pma-btn.ghost { background: var(--pma-soft); border-color: var(--pma-line); color: var(--pma-ink); }
html[data-meifan-theme] body .pma-shell .pma-btn.primary {
  background: var(--r4-ui-selected); border-color: var(--pma-green); color: var(--r4-ui-selected-ink); box-shadow: none;
}
html[data-meifan-theme] body .pma-shell :is(.pma-badge,.pma-note,.pma-boundary,.pma-revoke-confirm) {
  color: var(--pma-muted); background: var(--pma-soft); border-color: var(--pma-line);
}
html[data-meifan-theme] body .pma-shell :is(.pma-note,.pma-badge.is-warn,.pma-link.is-action) { color: var(--pma-warning); }
html[data-meifan-theme] body .pma-shell :is(.pma-table .is-good,.pma-badge.is-good) { color: var(--pma-good); }
html[data-meifan-theme] body .pma-shell :is(.pma-table .is-bad,.pma-link.is-danger,.pma-issue-error,.pma-form-error,.pma-state.is-error,.pma-state.is-error p) { color: var(--pma-danger); }
html[data-meifan-theme] body .pma-shell :is(.pma-table .is-muted,.pma-table td:first-child small,.pma-redemption-stats dt,.pma-benefit-state) { color: var(--pma-muted); }
html[data-meifan-theme] body .pma-shell .pma-codes-row.is-armed {
  background: var(--r4-ui-selected); color: var(--r4-ui-selected-ink); box-shadow: inset 3px 0 0 var(--pma-warning);
}
html[data-meifan-theme] body .pma-shell .pma-codes-row.is-armed :is(code,time,span) { color: var(--r4-ui-selected-ink); }
html[data-meifan-theme] body .pma-shell :is(.pma-audit-code code,.pma-revoke-confirm code) { color: var(--pma-ink); background: var(--r4-ui-panel); }
html[data-meifan-theme] body .pma-shell .pma-audit-list .pma-audit-code { color: var(--pma-muted); }
html[data-meifan-theme] body .pma-shell .pma-switch { background: var(--pma-soft); border-color: var(--pma-line); color: var(--pma-muted); }
html[data-meifan-theme] body .pma-shell .pma-switch.is-on { color: var(--pma-green); }
html[data-meifan-theme] body .pma-shell .pma-switch.is-on .pma-switch-dot { background: var(--pma-green); }
html[data-meifan-theme] body .pma-shell .pma-detail-tab { color: var(--pma-muted); }
html[data-meifan-theme] body .pma-shell .pma-detail-tab.is-active { border-bottom-color: var(--pma-green); color: var(--pma-green); }
html[data-meifan-theme] body .pma-shell .pma-benefit-line { background: var(--pma-soft); border-color: var(--pma-line); }
html[data-meifan-theme] body .pma-shell .pma-codes-page { color: var(--pma-muted); }
html[data-meifan-theme] body .pma-shell :is(button:disabled,input:disabled,select:disabled,textarea:disabled) {
  opacity: 1; color: var(--pma-muted); background: var(--pma-soft); border-color: var(--pma-line); border-style: dashed; cursor: not-allowed;
}
html[data-meifan-theme] body .pma-shell :is(button,input,select,textarea,a):focus-visible {
  outline: 2px solid var(--r4-ui-focus); outline-offset: 2px; box-shadow: none;
}
@media (hover: hover) and (pointer: fine) {
  html[data-meifan-theme] body .pma-shell .pma-table tr:hover td { background: var(--r4-ui-hover); }
  html[data-meifan-theme] body .pma-shell :is(.pma-btn.ghost,.pma-icon):hover:not(:disabled) { background: var(--r4-ui-hover); }
}
@media (max-width: 720px) {
  html[data-meifan-theme] body .pma-shell { padding: 22px 16px 132px; }
  html[data-meifan-theme] body .pma-shell :is(.pma-btn,.pma-link,.pma-icon,.pma-redemption-range input,.pma-codes-toolbar select) { min-height: 44px; }
  html[data-meifan-theme] body .pma-shell .pma-icon { min-width: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  html[data-meifan-theme] body .pma-shell .pma-state.is-loading span { animation: none; }
}
/* 264④ 入职日区块（查看弹层内）：复用既有变量，零新颜色。 */
.pma-hiredate{margin:10px 0 4px;padding-top:10px;border-top:1px solid var(--pma-line,#d7ddda)}
.pma-hiredate h4{margin:0 0 4px;font-size:13px}
.pma-hiredate p{margin:0 0 6px;font-size:12px;color:var(--pma-muted,#68736f)}
.pma-hiredate-form{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.pma-hiredate-form input[type="date"],.pma-hiredate-form input[type="text"]{padding:6px 8px;font-size:12px}
.pma-hiredate-form input[type="text"]{flex:1;min-width:160px}
.pma-field-note{display:block;margin-top:2px;font-size:11px;color:var(--pma-muted,#68736f)}
.psm-shell{--psm-green:#075e53;--psm-ink:#142723;--psm-muted:#69746f;--psm-line:#dee5e0;color:var(--psm-ink);display:grid;gap:18px;min-width:0}
.psm-head{align-items:flex-start;display:flex;gap:18px;justify-content:space-between}.psm-head h2{font-size:30px;line-height:1.2;margin:0 0 5px}.psm-head p{color:var(--psm-muted);margin:0}.psm-btn{border:1px solid transparent;border-radius:8px;cursor:pointer;font:inherit;font-weight:700;min-height:42px;padding:9px 18px}.psm-btn.primary{background:var(--psm-green);box-shadow:0 5px 12px rgba(7,94,83,.16);color:#fff}.psm-btn.ghost{background:#fff;border-color:#cad6d0;color:var(--psm-green)}.psm-btn:disabled{cursor:not-allowed;opacity:.55}
.psm-summary{background:#fff;border:1px solid var(--psm-line);border-radius:10px;display:grid;grid-template-columns:repeat(4,1fr);overflow:hidden}.psm-summary article{padding:20px 24px;text-align:center}.psm-summary article+article{border-left:1px solid var(--psm-line)}.psm-summary small{color:#68736f;display:block;margin-bottom:8px}.psm-summary b{color:#173b34;font-size:28px;letter-spacing:-.02em}
.psm-filters{align-items:end;display:flex;flex-wrap:wrap;gap:10px}.psm-filters label{display:grid;gap:6px;min-width:150px}.psm-filters label span{color:#53605c;font-size:13px;font-weight:650}.psm-filters input,.psm-filters select{background:#fff;border:1px solid #cfd8d3;border-radius:8px;color:var(--psm-ink);font:inherit;min-height:42px;padding:9px 12px}.psm-filters input:focus,.psm-filters select:focus{border-color:#168676;box-shadow:0 0 0 3px rgba(22,134,118,.13);outline:0}.psm-filters>small{color:var(--psm-muted);margin-left:auto;padding-bottom:11px}
.psm-card{background:#fff;border:1px solid var(--psm-line);border-radius:10px;overflow:hidden}.psm-card>header{align-items:center;border-bottom:1px solid var(--psm-line);display:flex;gap:18px;justify-content:space-between;padding:16px}.psm-card>header h3{font-size:18px;margin:0 0 4px}.psm-card>header p{color:var(--psm-muted);margin:0}.psm-table-wrap{overflow:auto}.psm-table{border-collapse:collapse;min-width:1050px;width:100%}.psm-table th{background:#f2f5f3;color:#44514c;font-size:13px;font-weight:700;padding:12px;text-align:left;white-space:nowrap}.psm-table td{border-top:1px solid #edf0ee;padding:14px 12px;vertical-align:middle;white-space:nowrap}.psm-table tr:hover td{background:#fbfcfa}.psm-table .psm-check{padding-left:16px;padding-right:2px;width:26px}.psm-table input[type=checkbox]{accent-color:#087163;height:17px;width:17px}.psm-table code{background:#f2f5f3;border-radius:4px;color:#31574f;font-size:12px;padding:3px 5px}.psm-table .is-good{color:#177052}.psm-table .is-bad{color:#a94a3e}
.psm-badge{background:#eef1ef;border:1px solid #d7ddda;border-radius:6px;color:#59635f;display:inline-flex;font-size:12px;font-weight:700;padding:4px 8px}.psm-badge.is-good{background:#eaf5ef;border-color:#cbe3d5;color:#226747}.psm-badge.is-warn{background:#fff5dc;border-color:#ead9a8;color:#7c5b17}.psm-badge.is-bad{background:#fff0ee;border-color:#edcbc5;color:#a3483d}.psm-badge.is-muted{background:#f0f1f1;border-color:#d8dcda;color:#66706c}.psm-block-reason{color:#9b5148;display:block;font-size:11px;margin-top:5px;max-width:190px;white-space:normal}.psm-muted{color:#89928e}.psm-link{background:none;border:0;color:#09695d;cursor:pointer;font:inherit;font-size:13px;font-weight:700;padding:0}.psm-link:hover{text-decoration:underline}
.psm-row-actions{align-items:flex-start;display:flex;flex-direction:column;gap:6px}.psm-detail-dialog{width:min(680px,100%)}.psm-detail-list{display:grid;gap:10px}.psm-detail-list article{background:#f6f8f6;border:1px solid var(--psm-line);border-radius:8px;padding:12px}.psm-detail-list article>div{align-items:center;display:flex;gap:12px;justify-content:space-between}.psm-detail-list article>div span{color:var(--psm-muted);font-size:12px}.psm-detail-list dl{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:12px 0 0}.psm-detail-list dl>div{display:flex;justify-content:space-between}.psm-detail-list dt{color:var(--psm-muted)}.psm-detail-list dd{font-weight:700;margin:0}
.psm-form-error{color:#a2473e;min-height:20px;padding:0 16px}.psm-note{background:#edf7f3;border:1px solid #cfe2da;border-radius:8px;color:#3c6157;font-size:13px;margin:0;padding:11px 14px}.psm-live{height:0;margin:0;overflow:hidden}.psm-state{align-items:center;color:#65716d;display:flex;flex-direction:column;gap:10px;justify-content:center;min-height:230px;padding:30px;text-align:center}.psm-state.is-compact{min-height:110px}.psm-state h3,.psm-state p{margin:0}.psm-state small{max-width:620px;overflow-wrap:anywhere}.psm-state.is-error{color:#7d3f36}.psm-state.is-loading span{animation:psm-spin .8s linear infinite;border:3px solid #d9e3df;border-radius:50%;border-top-color:#138172;height:24px;width:24px}@keyframes psm-spin{to{transform:rotate(360deg)}}
.psm-mask{align-items:center;background:rgba(11,31,27,.48);display:flex;inset:0;justify-content:center;padding:24px;position:fixed;z-index:7200}.psm-dialog{background:#fff;border-radius:12px;box-shadow:0 22px 70px rgba(7,35,29,.26);max-height:min(720px,calc(100vh - 48px));overflow:auto;padding:20px;width:min(560px,100%)}.psm-dialog>header{align-items:flex-start;border-bottom:1px solid var(--psm-line);display:flex;justify-content:space-between;margin:-2px 0 16px;padding-bottom:14px}.psm-dialog h3{font-size:21px;margin:0 0 4px}.psm-dialog header p{color:var(--psm-muted);font-size:13px;margin:0}.psm-icon{background:#f4f6f4;border:0;border-radius:8px;color:#46534f;cursor:pointer;font-size:22px;height:36px;line-height:1;width:36px}.psm-boundary{background:#fff8e6;border-left:3px solid #cf9c2d;color:#705923;font-size:13px;padding:10px 12px}.psm-dialog fieldset{border:0;display:grid;gap:8px;margin:18px 0 0;padding:0}.psm-dialog legend{font-size:13px;font-weight:700;margin-bottom:8px}.psm-option{align-items:center;background:#f7f9f7;border:1px solid var(--psm-line);border-radius:8px;display:flex;gap:10px;padding:11px 12px}.psm-option:has(input:checked){background:#edf7f3;border-color:#79b8aa}.psm-option input{accent-color:#087163}.psm-dialog footer{display:flex;gap:10px;justify-content:flex-end;margin-top:18px}
.psm-reason{display:grid;gap:6px;margin-top:16px}.psm-reason span{font-size:13px;font-weight:700}.psm-reason textarea{border:1px solid #cfd8d3;border-radius:8px;color:var(--psm-ink);font:inherit;padding:10px 12px;resize:vertical}.psm-reason textarea:focus{border-color:#168676;box-shadow:0 0 0 3px rgba(22,134,118,.13);outline:0}
@media(max-width:900px){.psm-summary{grid-template-columns:1fr 1fr}.psm-summary article:nth-child(3){border-left:0;border-top:1px solid var(--psm-line)}.psm-summary article:nth-child(4){border-top:1px solid var(--psm-line)}.psm-head{align-items:stretch;flex-direction:column}.psm-head .psm-btn{align-self:flex-start}.psm-filters>small{flex-basis:100%;margin-left:0;padding:0}.psm-head h2{font-size:26px}}
@media(max-width:560px){.psm-summary{grid-template-columns:1fr}.psm-summary article+article,.psm-summary article:nth-child(3){border-left:0;border-top:1px solid var(--psm-line)}.psm-summary article{text-align:left}.psm-card>header{align-items:flex-start;flex-direction:column}.psm-filters{align-items:stretch;display:grid}.psm-filters label{min-width:0}.psm-mask{padding:10px}.psm-dialog{max-height:calc(100vh - 20px)}.psm-head h2{font-size:24px}}
html[data-meifan-theme="tech-glass-blue"] body:not(.home-mode) .psm-shell :is(h1,h2,h3,h4,strong,b,label,th,td,dt,dd,code,em,i,time){color:#14231b}html[data-meifan-theme="tech-glass-blue"] body:not(.home-mode) .psm-shell :is(p,small,span){color:#4f5a54}html[data-meifan-theme="tech-glass-blue"] body:not(.home-mode) .psm-shell :is(input,select,textarea){background:#fff;color:#14231b;border-color:#cfdad3}html[data-meifan-theme="tech-glass-blue"] body:not(.home-mode) .psm-shell :is(input,select,textarea)::placeholder{color:#7a8581}html[data-meifan-theme="tech-glass-blue"] body:not(.home-mode) .psm-shell th{background:#f2f5f3}html[data-meifan-theme="tech-glass-blue"] body:not(.home-mode) .psm-shell td{border-color:#edf0ee}html[data-meifan-theme="tech-glass-blue"] body:not(.home-mode) .psm-shell :is(button,[class$="-btn"],[class$="-link"]){color:#176b47}html[data-meifan-theme="tech-glass-blue"] body:not(.home-mode) .psm-shell [class$="-btn"].primary,html[data-meifan-theme="tech-glass-blue"] body:not(.home-mode) .psm-shell [class$="-btn"].is-active{color:#fff}
html[data-meifan-theme="tech-glass-blue"] body:not(.home-mode) .67_-shell [class$="-btn"].ghost{background:#fff;border-color:#cfdad3}
.psm-ic{color:var(--psm-muted);display:inline-flex;margin-right:6px;vertical-align:-2px}.psm-ic svg{display:block}
.psm-summary-note{color:#89928e;font-size:12px;margin:-8px 0 0;padding:0 4px}
.psm-foot{font-size:12px;margin:0;padding:0 16px 14px}
.psm-link:disabled{cursor:not-allowed;opacity:.55}
.psm-top100-table td small{display:block;margin-top:4px;white-space:normal}
.pco-shell{--pco-green:#075e53;--pco-ink:#142723;--pco-muted:#69746f;--pco-line:#dce4df;color:var(--pco-ink);display:grid;gap:16px;min-width:0}
.pco-head{align-items:flex-start;display:flex;justify-content:space-between}.pco-head h2{font-size:30px;line-height:1.2;margin:0 0 5px}.pco-head p{color:var(--pco-muted);margin:0}
.pco-btn{border:1px solid transparent;border-radius:8px;cursor:pointer;font:inherit;font-weight:700;min-height:42px;padding:9px 18px}.pco-btn.primary{background:var(--pco-green);box-shadow:0 5px 12px rgba(7,94,83,.16);color:#fff}.pco-btn.ghost{background:#fff;border-color:#cad6d0;color:var(--pco-green)}.pco-btn:disabled{cursor:not-allowed;opacity:.55}
.pco-filters{align-items:end;display:flex;flex-wrap:wrap;gap:10px}.pco-filters label{display:grid;gap:6px;min-width:150px}.pco-filters label span,.pco-field span{color:#53605c;font-size:13px;font-weight:650}.pco-filters input,.pco-filters select,.pco-field input,.pco-field textarea{background:#fff;border:1px solid #cfd8d3;border-radius:8px;color:var(--pco-ink);font:inherit;min-height:42px;padding:9px 12px}.pco-filters input:focus,.pco-filters select:focus,.pco-field input:focus,.pco-field textarea:focus{border-color:#168676;box-shadow:0 0 0 3px rgba(22,134,118,.13);outline:0}
.pco-layout{display:grid;gap:14px;grid-template-columns:minmax(0,1fr) minmax(300px,365px);min-height:560px}.pco-card,.pco-detail{background:#fff;border:1px solid var(--pco-line);border-radius:10px;overflow:hidden}.pco-card>header,.pco-detail>header{border-bottom:1px solid var(--pco-line);padding:16px}.pco-card>header{align-items:flex-start;display:flex;gap:12px;justify-content:space-between}.pco-card>header h3,.pco-detail>header h3{font-size:18px;margin:0 0 4px}.pco-card>header p,.pco-detail>header p{color:var(--pco-muted);margin:0}.pco-head-side{display:grid;gap:4px;justify-items:end}.pco-export-note{color:var(--pco-muted);font-size:11px}.pco-asof{color:var(--pco-muted);font-size:12px;white-space:nowrap}.pco-filter-note{color:var(--pco-muted);font-size:11px;align-self:center}
.pco-table-wrap{overflow-x:auto;overflow-y:auto}.pco-table{border-collapse:collapse;min-width:720px;width:100%}.pco-table th{background:#f2f5f3;color:#44514c;font-size:13px;font-weight:700;padding:12px;text-align:left;white-space:nowrap}.pco-table td{border-top:1px solid #edf0ee;padding:14px 12px;vertical-align:middle;white-space:nowrap}.pco-table td:first-child b,.pco-table td:first-child small,.pco-table td:nth-child(2) small{display:block}.pco-table td small{color:#7b8581;font-size:11px;margin-top:4px}.pco-table tr:hover td,.pco-table tr.is-selected td{background:#f4faf7}.pco-table .is-good{color:#177052}.pco-table .is-warn{color:#7c5b17}.pco-table .is-bad{color:#a94a3e}.pco-table .is-muted{color:#77817d}
.pco-badge{background:#eef1ef;border:1px solid #d7ddda;border-radius:6px;color:#59635f;display:inline-flex;font-size:12px;font-weight:700;padding:4px 8px}.pco-badge.is-good{background:#eaf5ef;border-color:#cbe3d5;color:#226747}.pco-badge.is-warn{background:#fff5dc;border-color:#ead9a8;color:#7c5b17}.pco-badge.is-bad{background:#fff0ee;border-color:#edcbc5;color:#a3483d}.pco-badge.is-muted{background:#f0f1f1;border-color:#d8dcda;color:#66706c}.pco-link{background:none;border:0;color:#09695d;cursor:pointer;font:inherit;font-size:13px;font-weight:700;padding:0}.pco-link:hover{text-decoration:underline}
.pco-detail{align-content:start;display:grid;padding-bottom:16px}.pco-detail-empty{align-items:center;color:var(--pco-muted);display:flex;justify-content:center;min-height:360px;padding:28px;text-align:center}.pco-products{display:grid;margin:14px 16px}.pco-products>div{align-items:center;border-bottom:1px solid #edf0ee;display:grid;gap:8px;grid-template-columns:1fr 58px 90px;padding:10px 0}.pco-products>div:first-child{background:#f2f5f3;border:0;margin:0 -8px;padding:10px 8px}.pco-products>div>:nth-child(2),.pco-products>div>:nth-child(3){text-align:right}.pco-totals{display:grid;gap:10px;margin:4px 16px 14px}.pco-totals>div{display:flex;gap:12px;justify-content:space-between}.pco-totals dt{color:var(--pco-muted)}.pco-totals dd{font-weight:750;margin:0}.pco-totals .is-good{color:#177052}.pco-totals .is-bad{color:#a94a3e}.pco-detail>.pco-badge,.pco-detail>.pco-btn,.pco-detail>.pco-boundary{margin-left:16px;margin-right:16px}.pco-detail>.pco-btn{margin-top:14px}.pco-detail>.pco-badge{justify-self:start}
.pco-boundary,.pco-note{background:#edf7f3;border:1px solid #cfe2da;border-radius:8px;color:#3c6157;font-size:13px;padding:11px 13px}.pco-boundary{margin-top:14px}.pco-note{margin:0}.pco-live{height:0;margin:0;overflow:hidden}.pco-state{align-items:center;color:#65716d;display:flex;flex-direction:column;gap:10px;justify-content:center;min-height:300px;padding:30px;text-align:center}.pco-state.is-compact{min-height:250px}.pco-state h3,.pco-state p{margin:0}.pco-state small{max-width:620px;overflow-wrap:anywhere}.pco-state.is-error{color:#7d3f36}.pco-state.is-loading span{animation:pco-spin .8s linear infinite;border:3px solid #d9e3df;border-radius:50%;border-top-color:#138172;height:24px;width:24px}@keyframes pco-spin{to{transform:rotate(360deg)}}
.pco-mask{align-items:center;background:rgba(11,31,27,.48);display:flex;inset:0;justify-content:center;padding:24px;position:fixed;z-index:7200}.pco-dialog{background:#fff;border-radius:12px;box-shadow:0 22px 70px rgba(7,35,29,.26);max-height:min(720px,calc(100vh - 48px));overflow:auto;padding:20px;width:min(560px,100%)}.pco-dialog>header{align-items:flex-start;border-bottom:1px solid var(--pco-line);display:flex;justify-content:space-between;margin-bottom:16px;padding-bottom:14px}.pco-dialog h3{font-size:21px;margin:0 0 4px}.pco-dialog header p{color:var(--pco-muted);margin:0}.pco-icon{background:#f4f6f4;border:0;border-radius:8px;color:#46534f;cursor:pointer;font-size:22px;height:36px;line-height:1;width:36px}.pco-field{display:grid;gap:6px;margin-top:14px}.pco-field textarea{resize:vertical}.pco-form-error{color:#a2473e;min-height:20px}.pco-dialog footer{display:flex;gap:10px;justify-content:flex-end;margin-top:18px}
@media(max-width:980px){.pco-layout{grid-template-columns:1fr}.pco-detail{min-height:320px}.pco-head h2{font-size:26px}}
@media(max-width:560px){.pco-filters{align-items:stretch;display:grid}.pco-filters label{min-width:0}.pco-layout{min-height:0}.pco-mask{padding:10px}.pco-dialog{max-height:calc(100vh - 20px)}.pco-head h2{font-size:24px}}
html[data-meifan-theme="tech-glass-blue"] body:not(.home-mode) .pco-shell :is(h1,h2,h3,h4,strong,b,label,th,td,dt,dd,code,em,i,time){color:#14231b}html[data-meifan-theme="tech-glass-blue"] body:not(.home-mode) .pco-shell :is(p,small,span){color:#4f5a54}html[data-meifan-theme="tech-glass-blue"] body:not(.home-mode) .pco-shell :is(input,select,textarea){background:#fff;color:#14231b;border-color:#cfdad3}html[data-meifan-theme="tech-glass-blue"] body:not(.home-mode) .pco-shell :is(input,select,textarea)::placeholder{color:#55605a}html[data-meifan-theme="tech-glass-blue"] body:not(.home-mode) .pco-shell th{background:#f2f5f3}html[data-meifan-theme="tech-glass-blue"] body:not(.home-mode) .pco-shell td{border-color:#edf0ee}html[data-meifan-theme="tech-glass-blue"] body:not(.home-mode) .pco-shell :is(button,[class$="-btn"],[class$="-link"]){color:#176b47}html[data-meifan-theme="tech-glass-blue"] body:not(.home-mode) .pco-shell [class$="-btn"].primary,html[data-meifan-theme="tech-glass-blue"] body:not(.home-mode) .pco-shell [class$="-btn"].is-active{color:#fff}
html[data-meifan-theme="tech-glass-blue"] body:not(.home-mode) .68_-shell [class$="-btn"].ghost{background:#fff;border-color:#cfdad3}
.pex-shell{--pex-green:#075e53;--pex-ink:#142723;--pex-muted:#69746f;--pex-line:#dce4df;color:var(--pex-ink);display:grid;gap:16px;min-width:0}
.pex-head h2{font-size:30px;line-height:1.2;margin:0 0 5px}.pex-head p{color:var(--pex-muted);margin:0}.pex-btn{border:1px solid transparent;border-radius:8px;cursor:pointer;font:inherit;font-weight:700;min-height:42px;padding:9px 18px}.pex-btn.primary{background:var(--pex-green);box-shadow:0 5px 12px rgba(7,94,83,.16);color:#fff}.pex-btn.ghost{background:#fff;border-color:#cad6d0;color:var(--pex-green)}.pex-btn:disabled{cursor:not-allowed;opacity:.55}
.pex-filters{align-items:end;display:flex;flex-wrap:wrap;gap:10px}.pex-filters label{display:grid;gap:6px;min-width:145px}.pex-filters label span,.pex-field span{color:#53605c;font-size:13px;font-weight:650}.pex-filters input,.pex-filters select,.pex-field textarea{background:#fff;border:1px solid #cfd8d3;border-radius:8px;color:var(--pex-ink);font:inherit;min-height:42px;padding:9px 12px}.pex-filters input:focus,.pex-filters select:focus,.pex-field textarea:focus{border-color:#168676;box-shadow:0 0 0 3px rgba(22,134,118,.13);outline:0}
.pex-layout{display:grid;gap:14px;grid-template-columns:minmax(0,1fr) minmax(310px,390px);min-height:560px}.pex-card,.pex-detail{background:#fff;border:1px solid var(--pex-line);border-radius:10px;overflow:hidden}.pex-card>header,.pex-detail>header{border-bottom:1px solid var(--pex-line);padding:16px}.pex-card>header h3,.pex-detail>header h3{font-size:18px;margin:0 0 4px}.pex-card>header p,.pex-detail>header p{color:var(--pex-muted);margin:0}
.pex-table-wrap{overflow:auto}.pex-table{border-collapse:collapse;min-width:920px;width:100%}.pex-table th{background:#f2f5f3;color:#44514c;font-size:13px;font-weight:700;padding:12px;text-align:left;white-space:nowrap}.pex-table td{border-top:1px solid #edf0ee;padding:14px 12px;vertical-align:middle;white-space:nowrap}.pex-table tr:hover td,.pex-table tr.is-selected td{background:#fff8f5}.pex-table .is-good{color:#177052}.pex-table .is-warn{color:#7c5b17}.pex-table .is-bad{color:#a94a3e}.pex-table .is-muted{color:#77817d}.pex-link{background:none;border:0;color:#09695d;cursor:pointer;font:inherit;font-size:13px;font-weight:700;padding:0}.pex-link:hover{text-decoration:underline}
.pex-badge{background:#eef1ef;border:1px solid #d7ddda;border-radius:6px;color:#59635f;display:inline-flex;font-size:12px;font-weight:700;padding:4px 8px}.pex-badge.is-good{background:#eaf5ef;border-color:#cbe3d5;color:#226747}.pex-badge.is-warn{background:#fff5dc;border-color:#ead9a8;color:#7c5b17}.pex-badge.is-bad{background:#fff0ee;border-color:#edcbc5;color:#a3483d}.pex-badge.is-muted{background:#f0f1f1;border-color:#d8dcda;color:#66706c}
.pex-detail{align-content:start;display:grid;padding-bottom:16px}.pex-detail-empty{align-items:center;color:var(--pex-muted);display:flex;justify-content:center;min-height:360px;padding:28px;text-align:center}.pex-facts{display:grid;gap:10px;margin:16px}.pex-facts>div{display:flex;gap:12px;justify-content:space-between}.pex-facts dt{color:var(--pex-muted)}.pex-facts dd{font-weight:750;margin:0}.pex-facts .is-good{color:#177052}.pex-facts .is-bad{color:#a94a3e}.pex-resolution{background:#fff7e5;border-left:3px solid #d5a232;margin:0 16px 16px;padding:10px 12px}.pex-audits{border-top:1px solid var(--pex-line);padding:14px 16px}.pex-audits h4{margin:0 0 10px}.pex-audits>p{color:var(--pex-muted)}.pex-audits ol{display:grid;gap:9px;list-style:none;margin:0;padding:0}.pex-audits li{background:#f6f8f6;border:1px solid var(--pex-line);border-radius:8px;padding:10px}.pex-audits li>div{display:flex;gap:12px;justify-content:space-between}.pex-audits time{color:var(--pex-muted);font-size:11px}.pex-audits li p{margin:6px 0 0}.pex-actions{display:flex;flex-wrap:wrap;gap:9px;padding:0 16px}.pex-boundary,.pex-note{background:#edf7f3;border:1px solid #cfe2da;border-radius:8px;color:#3c6157;font-size:13px;padding:11px 13px}.pex-detail>.pex-boundary{margin:14px 16px 0}.pex-note{margin:0}.pex-live{height:0;margin:0;overflow:hidden}
.pex-state{align-items:center;color:#65716d;display:flex;flex-direction:column;gap:10px;justify-content:center;min-height:300px;padding:30px;text-align:center}.pex-state.is-compact{min-height:260px}.pex-state h3,.pex-state p{margin:0}.pex-state small{max-width:620px;overflow-wrap:anywhere}.pex-state.is-error{color:#7d3f36}.pex-state.is-loading span{animation:pex-spin .8s linear infinite;border:3px solid #d9e3df;border-radius:50%;border-top-color:#138172;height:24px;width:24px}@keyframes pex-spin{to{transform:rotate(360deg)}}
.pex-mask{align-items:center;background:rgba(11,31,27,.48);display:flex;inset:0;justify-content:center;padding:24px;position:fixed;z-index:7200}.pex-dialog{background:#fff;border-radius:12px;box-shadow:0 22px 70px rgba(7,35,29,.26);max-height:min(720px,calc(100vh - 48px));overflow:auto;padding:20px;width:min(560px,100%)}.pex-dialog>header{align-items:flex-start;border-bottom:1px solid var(--pex-line);display:flex;justify-content:space-between;margin-bottom:16px;padding-bottom:14px}.pex-dialog h3{font-size:21px;margin:0 0 4px}.pex-dialog header p{color:var(--pex-muted);margin:0}.pex-icon{background:#f4f6f4;border:0;border-radius:8px;color:#46534f;cursor:pointer;font-size:22px;height:36px;line-height:1;width:36px}.pex-field{display:grid;gap:6px;margin-top:14px}.pex-field textarea{resize:vertical}.pex-form-error{color:#a2473e;min-height:20px}.pex-dialog footer{display:flex;gap:10px;justify-content:flex-end;margin-top:18px}
@media(max-width:1000px){.pex-layout{grid-template-columns:1fr}.pex-detail{min-height:320px}.pex-head h2{font-size:26px}}
@media(max-width:620px){.pex-filters{align-items:stretch;display:grid}.pex-filters label{min-width:0}.pex-layout{min-height:0}.pex-mask{padding:10px}.pex-dialog{max-height:calc(100vh - 20px)}.pex-head h2{font-size:24px}}
html[data-meifan-theme="tech-glass-blue"] body:not(.home-mode) .pex-shell :is(h1,h2,h3,h4,strong,b,label,th,td,dt,dd,code,em,i,time){color:#14231b}html[data-meifan-theme="tech-glass-blue"] body:not(.home-mode) .pex-shell :is(p,small,span){color:#4f5a54}html[data-meifan-theme="tech-glass-blue"] body:not(.home-mode) .pex-shell :is(input,select,textarea){background:#fff;color:#14231b;border-color:#cfdad3}html[data-meifan-theme="tech-glass-blue"] body:not(.home-mode) .pex-shell :is(input,select,textarea)::placeholder{color:#7a8581}html[data-meifan-theme="tech-glass-blue"] body:not(.home-mode) .pex-shell th{background:#f2f5f3}html[data-meifan-theme="tech-glass-blue"] body:not(.home-mode) .pex-shell td{border-color:#edf0ee}html[data-meifan-theme="tech-glass-blue"] body:not(.home-mode) .pex-shell :is(button,[class$="-btn"],[class$="-link"]){color:#176b47}html[data-meifan-theme="tech-glass-blue"] body:not(.home-mode) .pex-shell [class$="-btn"].primary,html[data-meifan-theme="tech-glass-blue"] body:not(.home-mode) .pex-shell [class$="-btn"].is-active{color:#fff}
html[data-meifan-theme="tech-glass-blue"] body:not(.home-mode) .69_-shell [class$="-btn"].ghost{background:#fff;border-color:#cfdad3}
.pov-shell{--pov-green:#075e53;--pov-ink:#142723;--pov-muted:#69746f;--pov-line:#dce4df;color:var(--pov-ink);display:grid;gap:16px;min-width:0}.pov-head h2{font-size:30px;line-height:1.2;margin:0 0 5px}.pov-head p{color:var(--pov-muted);margin:0}.pov-btn{border:1px solid transparent;border-radius:8px;cursor:pointer;font:inherit;font-weight:700;min-height:40px;padding:8px 16px}.pov-btn.ghost{background:#fff;border-color:#cad6d0;color:var(--pov-green)}
.pov-summary{background:#fff;border:1px solid var(--pov-line);border-radius:10px;display:grid;grid-template-columns:repeat(4,1fr);overflow:hidden}.pov-summary article{padding:20px 24px;text-align:center}.pov-summary article+article{border-left:1px solid var(--pov-line)}.pov-summary small{color:#68736f;display:block;margin-bottom:8px}.pov-summary b{color:#173b34;font-size:28px;letter-spacing:-.02em}.pov-icon{display:inline-block;height:18px;margin-right:6px;vertical-align:-4px;width:18px}
.pov-card{background:#fff;border:1px solid var(--pov-line);border-radius:10px;overflow:hidden}.pov-card>header{align-items:center;border-bottom:1px solid var(--pov-line);display:flex;gap:18px;justify-content:space-between;padding:16px}.pov-card>header h3{font-size:18px;margin:0 0 4px}.pov-card>header p,.pov-card>header small{color:var(--pov-muted);margin:0}.pov-card>header small{max-width:420px;text-align:right}
.pov-table-wrap{overflow:auto}.pov-table{border-collapse:collapse;min-width:800px;width:100%}.pov-table.partner{min-width:920px}.pov-table th{background:#f2f5f3;color:#44514c;font-size:13px;font-weight:700;padding:12px;text-align:left;white-space:nowrap}.pov-table td{border-top:1px solid #edf0ee;padding:14px 12px;vertical-align:middle;white-space:nowrap}.pov-table td:first-child b,.pov-table.partner td:first-child small{display:block}.pov-table.partner td:first-child small{color:#7b8581;font-size:11px;margin-top:4px}.pov-table tr:hover td{background:#fbfcfa}.pov-table .is-good{color:#177052}.pov-table .is-warn{color:#7c5b17}.pov-table .is-bad{color:#a94a3e}.pov-table .is-muted{color:#77817d}.pov-link{background:none;border:0;color:#09695d;cursor:pointer;font:inherit;font-size:13px;font-weight:700;padding:0}.pov-link:hover{text-decoration:underline}
.pov-badge{background:#eef1ef;border:1px solid #d7ddda;border-radius:6px;color:#59635f;display:inline-flex;font-size:12px;font-weight:700;padding:4px 8px}.pov-badge.is-good{background:#eaf5ef;border-color:#cbe3d5;color:#226747}.pov-badge.is-warn{background:#fff5dc;border-color:#ead9a8;color:#7c5b17}.pov-badge.is-bad{background:#fff0ee;border-color:#edcbc5;color:#a3483d}.pov-badge.is-muted{background:#f0f1f1;border-color:#d8dcda;color:#66706c}
.pov-empty-line{color:var(--pov-muted);padding:28px;text-align:center}.pov-empty-line p{margin:0}.pov-note{background:#edf7f3;border:1px solid #cfe2da;border-radius:8px;color:#3c6157;font-size:13px;margin:0;padding:11px 14px}.pov-state{align-items:center;color:#65716d;display:flex;flex-direction:column;gap:10px;justify-content:center;min-height:360px;padding:30px;text-align:center}.pov-state h3,.pov-state p{margin:0}.pov-state small{max-width:620px;overflow-wrap:anywhere}.pov-state.is-error{color:#7d3f36}.pov-state.is-loading span{animation:pov-spin .8s linear infinite;border:3px solid #d9e3df;border-radius:50%;border-top-color:#138172;height:24px;width:24px}@keyframes pov-spin{to{transform:rotate(360deg)}}.pov-failed-sources{background:#fff2ef;border-radius:6px;font-size:12px;max-width:620px;padding:8px 10px;overflow-wrap:anywhere}
@media(max-width:900px){.pov-summary{grid-template-columns:1fr 1fr}.pov-summary article:nth-child(3){border-left:0;border-top:1px solid var(--pov-line)}.pov-summary article:nth-child(4){border-top:1px solid var(--pov-line)}.pov-card>header{align-items:flex-start;flex-direction:column}.pov-card>header small{text-align:left}.pov-head h2{font-size:26px}}
@media(max-width:560px){.pov-summary{grid-template-columns:1fr}.pov-summary article+article,.pov-summary article:nth-child(3){border-left:0;border-top:1px solid var(--pov-line)}.pov-summary article{text-align:left}.pov-head h2{font-size:24px}}
/* R587 R4: management overview remains a separate role surface. */
html[data-meifan-theme] body .pov-shell {
  --pov-ink: var(--r4-ui-ink); --pov-muted: var(--r4-ui-muted);
  --pov-line: var(--r4-ui-line); --pov-green: var(--r4-ui-accent);
  --pov-danger: #ffb4aa; --pov-warning: #f4d28e; --pov-good: #a2dfc5;
  color: var(--pov-ink); padding: 30px 34px 132px;
}
html[data-meifan-theme="day"] body .pov-shell { --pov-danger: #9c302b; --pov-warning: #785218; --pov-good: #226747; }
html[data-meifan-theme] body .pov-shell :is(h1,h2,h3,h4,strong,b,label,th,td,dt,dd,code,em,i,time) { color: var(--pov-ink); }
html[data-meifan-theme] body .pov-shell :is(p,small,span) { color: var(--pov-muted); }
html[data-meifan-theme] body .pov-shell :is(.pov-summary,.pov-card) {
  background: var(--r4-ui-glass); color: var(--pov-ink); border-color: var(--pov-line);
  box-shadow: inset 0 1px 0 rgba(207,235,255,.16);
}
html[data-meifan-theme] body .pov-shell .pov-summary b { color: var(--pov-ink); }
html[data-meifan-theme] body .pov-shell th { background: var(--r4-ui-soft); color: var(--pov-muted); }
html[data-meifan-theme] body .pov-shell td { border-color: var(--pov-line); }
html[data-meifan-theme] body .pov-shell .pov-table tr:hover td { background: var(--r4-ui-panel); }
html[data-meifan-theme] body .pov-shell .pov-state.is-loading span { border-color: var(--pov-line); border-top-color: var(--pov-green); }
html[data-meifan-theme] body .pov-shell :is(button,.pov-btn,.pov-link) { color: var(--pov-green); }
html[data-meifan-theme] body .pov-shell .pov-btn.ghost { background: var(--r4-ui-soft); border-color: var(--pov-line); color: var(--pov-ink); }
html[data-meifan-theme] body .pov-shell :is(.pov-badge,.pov-note,.pov-failed-sources) {
  color: var(--pov-muted); background: var(--r4-ui-soft); border-color: var(--pov-line);
}
html[data-meifan-theme] body .pov-shell :is(.pov-table .is-good,.pov-badge.is-good) { color: var(--pov-good); }
html[data-meifan-theme] body .pov-shell :is(.pov-table .is-warn,.pov-badge.is-warn) { color: var(--pov-warning); }
html[data-meifan-theme] body .pov-shell :is(.pov-table .is-bad,.pov-badge.is-bad,.pov-state.is-error,.pov-state.is-error p,.pov-failed-sources) { color: var(--pov-danger); }
html[data-meifan-theme] body .pov-shell :is(.pov-table .is-muted,.pov-table.partner td:first-child small,.pov-state) { color: var(--pov-muted); }
html[data-meifan-theme] body .pov-shell :is(input,select,textarea) { background: var(--r4-ui-soft); color: var(--pov-ink); border-color: var(--pov-line); }
html[data-meifan-theme] body .pov-shell :is(input,select,textarea)::placeholder { color: var(--pov-muted); opacity: 1; }
html[data-meifan-theme] body .pov-shell :is(button:disabled,input:disabled,select:disabled) {
  opacity: 1; color: var(--pov-muted); background: var(--r4-ui-soft); border-color: var(--pov-line); border-style: dashed; cursor: not-allowed;
}
html[data-meifan-theme] body .pov-shell :is(button,input,select,textarea,a):focus-visible { outline: 2px solid var(--r4-ui-focus); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) {
  html[data-meifan-theme] body .pov-shell .pov-table tr:hover td { background: var(--r4-ui-hover); }
  html[data-meifan-theme] body .pov-shell .pov-btn.ghost:hover:not(:disabled) { background: var(--r4-ui-hover); }
}
@media (max-width: 720px) {
  html[data-meifan-theme] body .pov-shell { padding: 22px 16px 132px; }
  html[data-meifan-theme] body .pov-shell :is(.pov-btn,.pov-link) { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  html[data-meifan-theme] body .pov-shell .pov-state.is-loading span { animation: none; }
}
.pov-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;flex-wrap:wrap}
.pov-btn.primary{background:var(--pov-green);border-color:var(--pov-green);color:#fff}
.pov-btn:disabled,.pov-link:disabled{cursor:not-allowed;opacity:.55}
.pov-link:disabled:hover{text-decoration:none}
.pov-honest{margin:0;padding:12px 16px;border-top:1px solid var(--pov-line);color:var(--pov-muted);font-size:12px;line-height:1.6}
html[data-meifan-theme] body .pov-shell .pov-btn.primary{background:var(--pov-green);border-color:var(--pov-green);color:#fff}
html[data-meifan-theme] body .pov-shell .pov-honest{color:var(--pov-muted)}
/* AI-MEMORY-LEDGER-R4-20260917-01 · 242 Slice S3 · AI记忆库 R4 账本体
   默认颜色复用既有主题变量；CMD420 深色手机动作/选中态按有效 M08 局部蓝色定稿，
   day 与 tech-glass-blue 双主题随 42/09 分片变量重定义自动跟随，无需 day 专用覆盖。 */

.aml-shell {
  display: grid;
  gap: 14px;
  min-width: 0;
  color: var(--mf-theme-ink);
}
.aml-shell * { box-sizing: border-box; }

/* ---------- 顶行：分类条 + 记一条（362：删 88px 内层重复标题块，页头已有「我的AI大脑」） ---------- */
.aml-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}
.aml-topline .aml-tabs { flex: 1 1 auto; min-width: 0; }
.aml-topline .aml-new { flex-shrink: 0; }

/* ---------- 按钮 ---------- */
.aml-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--mf-theme-line);
  border-radius: 9px;
  background: var(--mf-theme-card);
  color: var(--mf-theme-ink);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
}
.aml-btn:hover {
  border-color: var(--mf-theme-line-strong);
  color: var(--mf-theme-ink-strong);
}
.aml-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.aml-btn.is-primary {
  border-color: var(--tech-glass-border);
  background: linear-gradient(135deg, var(--tech-glass-highlight), transparent 55%), var(--tech-glass-bg);
  color: var(--mf-theme-ink-strong);
  box-shadow: 0 8px 24px var(--tech-glass-glow), inset 0 1px 0 var(--tech-glass-highlight);
}
.aml-btn.is-primary:hover { border-color: var(--mf-theme-line-strong); }
.aml-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--teal);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}
.aml-link:hover { text-decoration: underline; }
.aml-link:disabled { opacity: 0.55; cursor: not-allowed; }

/* ---------- 分类行 tab ---------- */
.aml-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--mf-theme-line);
  border-radius: 12px;
  background: var(--mf-theme-card);
}
.aml-tab {
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 9px 16px;
  background: transparent;
  color: var(--mf-theme-muted);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
}
.aml-tab:hover { color: var(--mf-theme-ink-strong); }
.aml-tab.is-active {
  color: var(--mf-theme-ink-strong);
  border-color: var(--tech-glass-border);
  background: var(--tech-glass-bg);
  box-shadow: inset 0 1px 0 var(--tech-glass-highlight), 0 4px 16px var(--tech-glass-glow);
}
.aml-tab:focus-visible,
.aml-btn:focus-visible,
.aml-filter:focus-visible,
.aml-row:focus-visible,
.aml-link:focus-visible,
.aml-modal-close:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

/* ---------- 主体两列 ---------- */
.aml-body { min-height: 420px; min-width: 0; }
.aml-columns {
  display: grid;
  grid-template-columns: minmax(280px, 28%) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.aml-list-col,
.aml-detail-col,
.aml-panel {
  border: 1px solid var(--mf-theme-line);
  border-radius: 12px;
  background: var(--mf-theme-card);
}
.aml-list-col {
  display: grid;
  gap: 10px;
  padding: 12px;
}
.aml-list-tools { display: grid; gap: 10px; }
.aml-search {
  width: 100%;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--mf-theme-line);
  border-radius: 9px;
  background: var(--mf-theme-card-strong);
  color: var(--mf-theme-ink);
  font: inherit;
  font-size: 13px;
}
.aml-search:focus {
  outline: none;
  border-color: var(--tech-glass-border);
  box-shadow: 0 0 0 3px var(--tech-glass-glow);
}
.aml-filters { display: flex; gap: 6px; }
.aml-filter {
  flex: 1;
  min-height: 30px;
  border: 1px solid var(--mf-theme-line);
  border-radius: 8px;
  background: transparent;
  color: var(--mf-theme-muted);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
}
.aml-filter:hover { color: var(--mf-theme-ink-strong); }
.aml-filter.is-active {
  color: var(--mf-theme-ink-strong);
  border-color: var(--tech-glass-border);
  background: var(--tech-glass-bg);
}
.aml-rows {
  display: grid;
  gap: 0;
  max-height: 640px;
  overflow: auto;
}
/* 362-r3: 定稿连续列表行——行间分隔线、选中整行反差底色；去掉 per-row 圆角描边卡与选中左亮线。标题/日期/草稿标记位置不变。 */
.aml-row {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 12px 8px;
  border: 0;
  border-bottom: 1px solid var(--mf-theme-line);
  border-radius: 0;
  background: transparent;
  color: var(--mf-theme-ink);
  cursor: pointer;
  text-align: left;
  font: inherit;
}
.aml-row:last-child { border-bottom: 0; }
.aml-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  color: var(--mf-theme-ink-strong);
}
.aml-row:hover { background: var(--mf-theme-card-strong); }
.aml-row.is-active {
  background: var(--tech-glass-bg);
  box-shadow: none;
}
.aml-row-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--mf-theme-muted-soft);
  font-size: 12px;
}
.aml-rows-hint {
  display: grid;
  gap: 10px;
  justify-items: center;
  padding: 18px 12px;
  color: var(--mf-theme-muted);
  font-size: 13px;
  line-height: 1.7;
  text-align: center;
}
.aml-rows-hint p { margin: 0; }
.aml-rows-error p { color: var(--red); }

/* ---------- chip ---------- */
.aml-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 9px;
  border: 1px solid var(--mf-theme-line);
  border-radius: 99px;
  color: var(--mf-theme-muted);
  font-size: 12px;
  font-weight: 700;
}
.aml-chip.is-ok { color: var(--green); border-color: var(--mf-theme-line-strong); }
.aml-chip.is-warn { color: var(--amber); }
.aml-chip.is-info { color: var(--teal); }
.aml-chip.is-muted { color: var(--mf-theme-muted-soft); }
.aml-chip.is-stale { color: var(--amber); border-style: dashed; }

/* ---------- 正文区 ---------- */
.aml-detail-col {
  min-width: 0;
  min-height: 420px;
  padding: 18px 20px;
}
.aml-detail-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  color: var(--mf-theme-muted);
  font-size: 14px;
}
/* 362-r4: 让位/窄宽下动作行折到标题下方，标题区保持最小可读宽、换行不截断。 */
.aml-detail-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--mf-theme-line);
}
.aml-detail-title { min-width: min(240px, 100%); flex: 1 1 240px; }
.aml-detail-title h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.3;
  overflow-wrap: break-word;
  color: var(--mf-theme-ink-strong);
}
.aml-detail-meta {
  margin: 8px 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--mf-theme-muted);
  font-size: 12px;
}
.aml-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex-shrink: 0;
}
.aml-block {
  padding: 14px 0;
  border-bottom: 1px solid var(--mf-theme-line);
}
.aml-block:last-child { border-bottom: 0; }
.aml-block h4 {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--teal);
}
.aml-block p {
  margin: 0 0 8px;
  line-height: 1.8;
  color: var(--mf-theme-ink);
}
.aml-block p:last-child { margin-bottom: 0; }
.aml-block-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.aml-block-head h4 { margin: 0; }
.aml-bullets {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  line-height: 1.7;
}
.aml-muted { color: var(--mf-theme-muted); font-size: 13px; }
.aml-stale-note {
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px dashed var(--amber);
  border-radius: 9px;
  color: var(--amber);
  font-size: 13px;
  line-height: 1.6;
}
.aml-related {
  margin: 12px 0 0;
  color: var(--mf-theme-muted);
  font-size: 13px;
}

/* ---------- 来源与更正 ---------- */
.aml-sources { display: grid; gap: 8px; }
.aml-source-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--mf-theme-line);
  border-radius: 9px;
  color: var(--mf-theme-muted);
  font-size: 12px;
}
.aml-source-row time { color: var(--mf-theme-muted-soft); }
.aml-source-kind { font-weight: 700; color: var(--mf-theme-ink); }

/* ---------- 发布记录 ---------- */
.aml-publish-row {
  display: grid;
  grid-template-columns: minmax(64px, auto) auto minmax(120px, auto) minmax(80px, auto) 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px;
  margin-bottom: 8px;
  border: 1px solid var(--mf-theme-line);
  border-radius: 9px;
  color: var(--mf-theme-muted);
  font-size: 12px;
}
.aml-platform {
  font-weight: 700;
  font-size: 13px;
  color: var(--mf-theme-ink-strong);
}
.aml-publish-row time { color: var(--mf-theme-muted-soft); }
.aml-publish-effect { justify-self: end; }
.aml-publish-feedback { margin: 10px 0 0; font-size: 13px; }
.aml-publish-feedback.is-ok { color: var(--green); }
.aml-publish-feedback.is-error { color: var(--red); }
.aml-inline-error {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--mf-theme-line);
  border-radius: 9px;
  color: var(--red);
  font-size: 13px;
}
.aml-inline-error p { margin: 0; }

/* ---------- 状态块（空 / 未就绪 / 无权限 / 失败） ---------- */
.aml-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 300px;
  padding: 32px;
  text-align: center;
  border: 1px solid var(--mf-theme-line);
  border-radius: 12px;
  background: var(--mf-theme-card);
  color: var(--mf-theme-muted);
}
.aml-state strong {
  font-size: 18px;
  color: var(--mf-theme-ink-strong);
}
.aml-state p {
  margin: 0;
  max-width: 420px;
  line-height: 1.8;
}
.aml-state-unready,
.aml-state-forbidden { border-style: dashed; }

/* ---------- 编辑态 / 表单 ---------- */
.aml-edit { display: grid; gap: 12px; padding-top: 14px; }
.aml-edit label,
.aml-modal label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--mf-theme-muted);
  font-size: 13px;
  font-weight: 700;
}
.aml-edit input,
.aml-edit textarea,
.aml-modal input,
.aml-modal select,
.aml-modal textarea,
.aml-profile-editor textarea {
  width: 100%;
  border: 1px solid var(--mf-theme-line);
  border-radius: 9px;
  padding: 10px 12px;
  background: var(--mf-theme-card-strong);
  color: var(--mf-theme-ink);
  font: inherit;
  font-size: 13px;
  line-height: 1.7;
}
.aml-edit input:focus,
.aml-edit textarea:focus,
.aml-modal input:focus,
.aml-modal select:focus,
.aml-modal textarea:focus,
.aml-profile-editor textarea:focus {
  outline: none;
  border-color: var(--tech-glass-border);
  box-shadow: 0 0 0 3px var(--tech-glass-glow);
}
.aml-form-hint {
  margin: 0;
  color: var(--mf-theme-muted-soft);
  font-size: 12px;
  line-height: 1.6;
}
.aml-form-error {
  min-height: 18px;
  margin: 0;
  color: var(--red);
  font-size: 12px;
  line-height: 1.5;
}
.aml-form-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}
.aml-dirty {
  margin-right: auto;
  color: var(--amber);
  font-size: 12px;
  font-weight: 700;
}

/* ---------- 弹层 ---------- */
.aml-modal-host:empty { display: none; }
.aml-modal-mask {
  position: fixed;
  z-index: 9100;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(2, 8, 16, 0.58);
  backdrop-filter: blur(3px);
}
.aml-modal {
  display: grid;
  gap: 13px;
  width: min(640px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 22px;
  border: 1px solid var(--mf-theme-line);
  border-radius: 16px;
  background: var(--mf-theme-card-strong);
  box-shadow: var(--mf-theme-glass-shadow);
  color: var(--mf-theme-ink);
}
.aml-modal > header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.aml-modal h3 {
  margin: 0;
  font-size: 20px;
  color: var(--mf-theme-ink-strong);
}
.aml-modal-close {
  width: 32px;
  height: 32px;
  border: 1px solid var(--mf-theme-line);
  border-radius: 50%;
  background: transparent;
  color: var(--mf-theme-muted);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}
.aml-modal footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.aml-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ---------- 我的背景 ---------- */
.aml-panel { padding: 18px 20px; }
.aml-profile { display: grid; gap: 14px; }
.aml-profile-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.aml-profile-head h3 {
  margin: 0;
  font-size: 20px;
  color: var(--mf-theme-ink-strong);
}
.aml-profile-head p { margin: 6px 0 0; }
.aml-profile-content p {
  margin: 0 0 10px;
  line-height: 1.8;
}
.aml-profile-editor { display: grid; }
.aml-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- 轻提示（左下, 避开右下悬浮球区域） ---------- */
.aml-status {
  position: fixed;
  z-index: 9050;
  left: 24px;
  bottom: 24px;
  margin: 0;
  padding: 10px 15px;
  border: 1px solid var(--mf-theme-line);
  border-radius: 9px;
  background: var(--mf-theme-card-strong);
  color: var(--mf-theme-ink);
  box-shadow: var(--mf-theme-glass-shadow);
  font-size: 13px;
}
.aml-status:empty { display: none; }

/* ---------- 窄屏：列表/正文纵排 ---------- */
@media (max-width: 900px) {
  .aml-columns { grid-template-columns: 1fr; }
  .aml-rows { max-height: 320px; }
  .aml-topline { flex-direction: column; align-items: stretch; }
  .aml-topline .aml-new { align-self: flex-end; }
  .aml-publish-row { grid-template-columns: 1fr 1fr; row-gap: 6px; }
  .aml-publish-effect { justify-self: start; }
  .aml-form-grid { grid-template-columns: 1fr; }
  .aml-detail-head { flex-direction: column; }
  .aml-modal-mask { padding: 12px; }
}
/* 242-r2 M3/M5: profile KV 编辑器 + fields 展示 + scope 选择器（复用既有变量, 零新颜色）。 */
.aml-scope{margin-left:8px;padding:5px 8px;font-size:12px;border-radius:7px;border:1px solid var(--aml-line,#d7ddda);background:transparent;color:inherit}
.aml-profile-kv{display:grid;gap:8px;margin:10px 0}
.aml-profile-kv-row{display:grid;grid-template-columns:minmax(120px,.6fr) minmax(200px,1.4fr) auto;gap:8px;align-items:center}
.aml-profile-kv-row input{padding:7px 9px;font-size:12px;border:1px solid var(--aml-line,#d7ddda);border-radius:8px;background:transparent;color:inherit}
.aml-kv-remove{padding:4px 10px}
.aml-profile-fields{display:grid;gap:10px;margin:0}
.aml-profile-fields>div{display:grid;grid-template-columns:minmax(110px,.5fr) 1fr;gap:10px;padding:8px 0;border-bottom:1px dashed var(--aml-line,#e2e9e5)}
.aml-profile-fields dt{font-size:12px;font-weight:700}
.aml-profile-fields dd{margin:0;font-size:13px;line-height:1.6;white-space:normal}
/* CMD206 M08: mobile list shell; the settings controller and six categories stay shared. */
.aml-category { flex: 1 1 auto; min-width: 0; }
.aml-mobile-category { display: none; }
.aml-row-summary { display: none; }
@media (max-width: 640px) {
  .aml-topline { flex-direction: row; align-items: center; }
  .aml-category { flex: 1; min-width: 0; }
  .aml-tabs { display: none; }
  .aml-mobile-category { display: flex; align-items: center; gap: 8px; font-size: 13px; }
  .aml-mobile-category select { flex: 1; min-width: 0; min-height: 44px; padding: 8px; border: 1px solid var(--mf-theme-line); border-radius: 8px; background: var(--mf-theme-card-strong); color: var(--mf-theme-ink); font: inherit; }
  .aml-topline .aml-new { align-self: auto; min-height: 44px; }
  [data-aml-shell] [data-memory-settings-host] { display: grid; grid-template-columns: 1fr auto; gap: 6px 8px; padding: 10px; margin: 8px 0; }
  [data-aml-shell] [data-memory-settings-host] > .settings-account-r3-section-title,
  [data-aml-shell] [data-memory-settings-host] > p,
  [data-aml-shell] [data-memory-settings-host] > [data-memory-first-notice] { grid-column: 1 / -1; margin: 0; font-size: 12px; line-height: 1.5; }
  [data-aml-shell] [data-memory-settings-host] > button { min-height: 44px; }
  [data-aml-shell] [data-memory-settings-host] > [data-memory-settings-status]:empty { display: none; }
  .aml-rows { max-height: none; }
  .aml-row { padding: 14px; margin: 0 0 10px; border: 1px solid var(--mf-theme-line); border-radius: 10px; background: var(--mf-theme-card-strong); }
  .aml-row:last-child { border-bottom: 1px solid var(--mf-theme-line); }
  .aml-row.is-active { border-color: var(--teal); background: var(--tech-glass-bg); }
  .aml-row-summary { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--mf-theme-muted); font-size: 13px; line-height: 1.5; }
}
.aml-mobile-heading, .aml-mobile-plus, .aml-row-category { display: none; }
/* CMD249 M08: decorative no-image slot; real records and desktop text geometry stay shared. */
.aml-row-main { display: contents; }
.aml-row-preview, .aml-row-chevron { display: none; }
@media (max-width: 640px) {
  .aml-row {
    grid-template-columns: 80px minmax(0, 1fr) 12px;
    align-items: center;
    column-gap: 12px;
    row-gap: 0;
    min-height: 112px;
    padding: 12px;
  }
  .aml-row-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border: 1px solid var(--mf-theme-line);
    border-radius: 8px;
    background: var(--mf-theme-card);
    color: var(--mf-theme-muted-soft);
  }
  .aml-row-preview svg { display: block; width: 40px; height: 40px; fill: currentColor; }
  .aml-row-main { display: grid; gap: 6px; min-width: 0; align-content: center; }
  .aml-row-chevron { display: block; color: var(--mf-theme-muted-soft); font-size: 22px; line-height: 1; }
}
@media (max-width: 360px) {
  .aml-row { grid-template-columns: 64px minmax(0, 1fr) 10px; column-gap: 10px; min-height: 104px; padding: 10px; }
  .aml-row-preview { width: 64px; height: 64px; }
}

/* CMD420 M08: mobile-only visual composition; real settings/records/handlers remain. */
@media (max-width: 640px) {
  body:has(#aiMemory.active [data-aml-shell]) .main > .topbar > div:has(> #pageTitle) { display: none; }
  body:has(#aiMemory.active [data-aml-shell]) .main > .topbar { min-height: 0; padding: 0; margin-bottom: 0; border: 0; background: transparent; box-shadow: none; }
  .aml-shell { gap: 12px; }
  .aml-topline { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "heading new" "category category"; column-gap: 12px; row-gap: 12px; }
  .aml-mobile-heading { display: block; grid-area: heading; min-width: 0; }
  .aml-mobile-heading h2 { margin: 0 0 5px; color: var(--mf-theme-ink-strong); font-size: 25px; font-weight: 700; line-height: 1.3; }
  .aml-mobile-heading p { margin: 0; color: var(--mf-theme-muted); font-size: 12px; line-height: 1.5; }
  .aml-topline .aml-new { grid-area: new; min-height: 38px; align-self: start; padding: 0 12px; border-radius: 7px; font-size: 13px; }
  .aml-mobile-plus { display: inline; white-space: pre; }
  .aml-category { grid-area: category; width: 100%; }
  .aml-category-caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .aml-mobile-category { display: flex; margin: 0; }
  .aml-mobile-category select { width: 100%; min-height: 38px; border-radius: 7px; font-size: 13px; }
  /* Move only boxes, not DOM or controller state: all original settings remain
     after the list and before the original detail. No notice or switch is removed. */
  .aml-body { display: block; min-height: 0; }
  .aml-columns { display: grid; grid-template-columns: minmax(0, 1fr); }
  .aml-list-col { min-width: 0; padding: 0; border: 0; background: transparent; gap: 10px; }
  .aml-list-tools { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 8px; }
  .aml-search { grid-column: 1 / -1; min-height: 38px; font-size: 13px; }
  .aml-filters { min-width: 0; gap: 3px; }
  .aml-filter { flex: 0 1 72px; min-height: 32px; border-radius: 6px; }
  .aml-scope { width: 72px; min-height: 32px; margin: 0; padding: 4px 7px; font-size: 11px; }
  .aml-rows { overflow: visible; }
  .aml-row { text-align: left; border-radius: 8px; padding: 10px; column-gap: 12px; }
  .aml-row strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; text-overflow: ellipsis; font-size: 14px; line-height: 1.45; color: var(--mf-theme-ink-strong); }
  .aml-row-main { gap: 5px; }
  .aml-row-summary { font-size: 12px; line-height: 1.5; color: var(--mf-theme-muted); }
  .aml-row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 5px; font-size: 10px; line-height: 1.45; }
  .aml-row-meta .aml-chip { max-width: 100%; padding: 2px 5px; font-size: 10px; line-height: 1.35; }
  .aml-row-category { display: inline; color: var(--mf-theme-muted); order: 1; }
  .aml-row-meta time { order: 2; color: var(--mf-theme-muted); font-size: 10px; }
  .aml-row-type-icon { display: block; width: 36px; height: 36px; background: currentColor; mask: var(--aml-preview-icon) center / contain no-repeat; }
  .aml-preview-content { color: var(--teal); }
}

/* CMD420 M08 approved night action/selection color; day and shared theme unchanged. */
@media (max-width: 640px) {
  html[data-meifan-theme="tech-glass-blue"] #aiMemory .aml-new,
  html[data-meifan-theme="tech-glass-blue"] #aiMemory .aml-filter.is-active { background: #086de2; border-color: #388cfa; color: #fff; }
}

/* CMD448: unconfirmed consent is before category/list; DOM order is also focus order. */
@media (max-width: 640px) {
  .aml-topline:has(> [data-memory-settings-host]) { grid-template-areas: "heading new" "notice notice" "category category"; }
  .aml-topline > [data-memory-settings-host] { grid-area: notice; width: 100%; min-width: 0; margin: 0; }
  .aml-row-summary.is-title-duplicate { display: none; }
}
/* 242卡 Slice S4 · 生成式 AI 画板(R5) —— AI设计师第三页签(286 起 data-ai-tab="ai-board", 原 "measure" 量房遗留值)。
   前缀 adb-; 零新颜色: 全部走既有变量(--mf-theme-* 双主题定义于 09/42 分片, 退化 --bg/--surface/--ink 等通用变量);
   双主题不破; 窄屏左参考区/图层面板可折叠(adb-collapsed)。锚点 data-adb-* 与 72_ai_design_board_r5.js 一一对应。 */

.adb-root {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 720px;
  color: var(--mf-theme-ink, var(--ink));
}
/* 组件内 display 规则会盖过 UA 的 [hidden]{display:none}, 显式回收(新建画板表单/版本回看/空态提示等依赖 hidden) */
.adb-root [hidden] { display: none !important; }

/* ---------- 顶条 ---------- */
.adb-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.adb-field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--mf-theme-muted, var(--muted));
}
.adb-field select,
.adb-field input {
  font: inherit;
  color: var(--mf-theme-ink, var(--ink));
  background: var(--mf-theme-card, var(--surface));
  border: 1px solid var(--mf-theme-line, var(--line));
  border-radius: 8px;
  padding: 5px 8px;
  max-width: 200px;
}
.adb-field select:focus-visible,
.adb-field input:focus-visible,
.adb-genbar textarea:focus-visible,
.adb-tool:focus-visible,
.adb-collapse:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 1px;
}
.adb-field-block {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  margin-top: 8px;
}
.adb-topbar-spacer { flex: 1; }
.adb-board-new-form {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.adb-board-new-form input {
  font: inherit;
  color: var(--mf-theme-ink, var(--ink));
  background: var(--mf-theme-card, var(--surface));
  border: 1px solid var(--mf-theme-line, var(--line));
  border-radius: 8px;
  padding: 5px 8px;
  width: 140px;
}
.adb-save-status { font-size: 12px; color: var(--mf-theme-muted, var(--muted)); }
.adb-save-status.adb-save-ok { color: var(--green); }
.adb-save-status.adb-save-dirty { color: var(--amber); }
.adb-save-status.adb-save-fail { color: var(--red); }

.adb-service-note,
.adb-history-note {
  font-size: 12px;
  color: var(--amber);
  border: 1px dashed var(--mf-theme-line-strong, var(--line));
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--mf-theme-card, var(--surface));
}

/* ---------- 主区三列 ---------- */
.adb-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
}
.adb-side {
  width: 196px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--mf-theme-line, var(--line));
  border-radius: 12px;
  background: var(--mf-theme-card, var(--surface));
  overflow: hidden;
}
.adb-right { width: 222px; }
.adb-side.adb-collapsed { width: auto; }
.adb-side.adb-collapsed .adb-side-body { display: none; }
.adb-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
  font-size: 13px;
  border-bottom: 1px solid var(--mf-theme-line, var(--line));
}
.adb-side.adb-collapsed .adb-side-head { border-bottom: none; }
.adb-collapse {
  border: none;
  background: transparent;
  color: var(--mf-theme-muted, var(--muted));
  font-size: 14px;
  padding: 2px 6px;
  border-radius: 6px;
}
.adb-collapse:hover { color: var(--teal); }
.adb-side-body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  max-height: 560px;
}
.adb-block-btn { width: 100%; text-align: left; }
.adb-upload-drop {
  width: 100%;
  border: 1px dashed var(--mf-theme-line-strong, var(--line));
  border-radius: 10px;
  background: transparent;
  color: var(--mf-theme-ink, var(--ink));
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  font-size: 13px;
}
.adb-upload-drop small { color: var(--mf-theme-muted, var(--muted)); font-size: 11px; text-align: center; }
.adb-upload-drop:hover { border-color: var(--teal); color: var(--teal); }
.adb-empty-note { font-size: 12px; color: var(--mf-theme-muted, var(--muted)); padding: 6px 2px; }

/* 参考区：按用途分组的三列缩略图，操作只在点击菜单中显示。 */
.adb-ref-list { position: relative; min-width: 0; }
.adb-ref-group { display: flex; flex-direction: column; gap: 6px; }
.adb-ref-group-head {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--mf-theme-muted, var(--muted));
  margin-top: 4px;
}
.adb-ref-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.adb-ref-thumb {
  position: relative;
  width: 100%;
  max-width: 80px;
  min-width: 0;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--mf-theme-line, var(--line));
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
  display: grid;
  place-items: center;
  font: inherit;
  font-size: 11px;
  color: var(--mf-theme-muted, var(--muted));
  background: var(--mf-theme-card-strong, var(--surface-soft));
  cursor: pointer;
}
.adb-ref-thumb:hover, .adb-ref-thumb[aria-expanded="true"] { border-color: var(--teal); }
.adb-ref-thumb:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.adb-ref-thumb img { width: 100%; height: 100%; object-fit: cover; }
.adb-ref-badge {
  position: absolute;
  left: 3px;
  bottom: 3px;
  font-size: 10px;
  line-height: 1.4;
  padding: 1px 4px;
  border-radius: 4px;
  color: #fff;
  background: rgba(37, 99, 235, .9);
}
.adb-ref-menu {
  position: absolute;
  z-index: 10;
  box-sizing: border-box;
  width: min(230px, 100%);
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--mf-theme-line, var(--line));
  border-radius: 10px;
  color: var(--mf-theme-ink, var(--ink));
  background: var(--mf-theme-card, var(--surface));
  box-shadow: var(--shadow);
}
.adb-ref-menu strong { font-size: 12px; overflow-wrap: anywhere; }
.adb-ref-menu small { font-size: 11px; color: var(--mf-theme-muted, var(--muted)); }
.adb-ref-menu .adb-field, .adb-ref-menu select, .adb-ref-menu button { width: 100%; min-width: 0; }
.adb-ref-menu select { box-sizing: border-box; }

/* ---------- 中央画板 ---------- */
.adb-center { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.adb-canvas-wrap {
  position: relative;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  grid-template-rows: 22px minmax(0, 1fr);
  border: 1px solid var(--mf-theme-line, var(--line));
  border-radius: 12px;
  background: var(--mf-theme-card, var(--surface));
  overflow: hidden;
  height: clamp(420px, 56vh, 680px);
}
.adb-ruler-corner {
  border-right: 1px solid var(--mf-theme-line, var(--line));
  border-bottom: 1px solid var(--mf-theme-line, var(--line));
  background: var(--mf-theme-card-strong, var(--surface-soft));
}
.adb-ruler {
  position: relative;
  overflow: hidden;
  background: var(--mf-theme-card-strong, var(--surface-soft));
}
.adb-ruler-top { border-bottom: 1px solid var(--mf-theme-line, var(--line)); }
.adb-ruler-left { border-right: 1px solid var(--mf-theme-line, var(--line)); }
.adb-ruler-content { position: absolute; left: 0; top: 0; will-change: transform; }
.adb-tick {
  position: absolute;
  top: 0;
  height: 100%;
  padding-left: 3px;
  font-size: 9px;
  line-height: 22px;
  color: var(--mf-theme-muted, var(--muted));
  border-left: 1px solid var(--mf-theme-line, var(--line));
  white-space: nowrap;
}
.adb-tick-v {
  top: auto;
  left: 0;
  width: 100%;
  height: auto;
  line-height: 1;
  padding: 2px 0 0 2px;
  border-left: none;
  border-top: 1px solid var(--mf-theme-line, var(--line));
}
.adb-viewport {
  overflow: hidden;
  position: relative;
  background: var(--mf-theme-dots, var(--bg));
}
.adb-engine-host { position: absolute; inset: 0; min-width: 0; min-height: 0; touch-action: none; }
.adb-engine-host canvas { touch-action: none; }
.adb-engine-missing { padding: 24px; color: var(--mf-theme-muted, var(--muted)); }
.adb-canvas-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
  font-size: 13px;
  color: var(--mf-theme-muted, var(--muted));
  pointer-events: none;
}

/* 工具条 / 缩放 */
.adb-toolbar {
  position: absolute;
  left: 34px;
  top: 30px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--mf-theme-line, var(--line));
  border-radius: 10px;
  background: var(--mf-theme-card-strong, var(--surface));
  box-shadow: var(--shadow);
}
.adb-tool {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--mf-theme-ink, var(--ink));
  font-size: 14px;
}
.adb-tool:hover { border-color: var(--mf-theme-line-strong, var(--line)); }
.adb-tool.active {
  border-color: var(--teal);
  color: var(--teal);
}
.adb-zoom {
  position: absolute;
  left: 34px;
  bottom: 8px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--mf-theme-muted, var(--muted));
  padding: 4px 8px;
  border: 1px solid var(--mf-theme-line, var(--line));
  border-radius: 8px;
  background: var(--mf-theme-card-strong, var(--surface));
}
.adb-zoom select {
  font: inherit;
  color: var(--mf-theme-ink, var(--ink));
  background: transparent;
  border: none;
}

/* ---------- 右栏: 图层/标注 ---------- */
.adb-panel-title {
  font-size: 12px;
  color: var(--mf-theme-muted, var(--muted));
  margin: 2px 0;
}
.adb-info-dot { cursor: help; }
.adb-layer-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.adb-layer-row {
  display: grid;
  grid-template-columns: 24px 30px minmax(0, 1fr) 22px 22px 24px;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--mf-theme-line, var(--line));
  border-radius: 8px;
  font-size: 12px;
}
.adb-layer-row.adb-layer-selected { border-color: var(--teal); }
.adb-layer-row .adb-eye,
.adb-layer-row .adb-lock,
.adb-layer-row .adb-order {
  border: none;
  background: transparent;
  color: var(--mf-theme-ink, var(--ink));
  font-size: 12px;
  padding: 2px;
  border-radius: 6px;
}
.adb-layer-row .adb-eye.adb-off { opacity: 0.38; }
.adb-layer-row .adb-lock.adb-on { color: var(--amber); }
.adb-layer-row .adb-order:hover,
.adb-layer-row .adb-eye:hover,
.adb-layer-row .adb-lock:hover { color: var(--teal); }
.adb-layer-thumb {
  width: 30px;
  height: 22px;
  object-fit: cover;
  border-radius: 4px;
  font-size: 9px;
  color: var(--mf-theme-muted, var(--muted));
  display: grid;
  place-items: center;
  background: var(--mf-theme-card-strong, var(--surface-soft));
}
.adb-layer-chip {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--teal);
  background: var(--mf-theme-card-strong, var(--surface-soft));
  border: 1px solid var(--mf-theme-line, var(--line));
}
.adb-layer-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.adb-ann-placeholder { font-size: 12px; color: var(--mf-theme-muted, var(--muted)); }
.adb-ann-placeholder strong { color: var(--mf-theme-ink, var(--ink)); }
.adb-ann-placeholder p { margin: 6px 0 0; line-height: 1.6; }
.adb-ann-form-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}
.adb-ann-form-head small { color: var(--mf-theme-muted, var(--muted)); }
.adb-ann-coords {
  margin-top: 8px;
  font-size: 12px;
  color: var(--mf-theme-muted, var(--muted));
  border: 1px dashed var(--mf-theme-line, var(--line));
  border-radius: 8px;
  padding: 6px 8px;
}
.adb-ann-form-actions { margin-top: 10px; display: flex; justify-content: flex-end; }

/* 候选属于中央列；生成区跨左栏和中央列，右栏延伸到生成区底。 */
.adb-bottom {
  grid-column: 1 / 3;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.adb-candidates {
  border: 1px solid var(--mf-theme-line, var(--line));
  border-radius: 12px;
  background: var(--mf-theme-card, var(--surface));
  padding: 10px;
  min-height: 76px;
}
.adb-cand-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  margin-bottom: 8px;
}
.adb-cand-head strong { min-width: 0; overflow-wrap: anywhere; }
.adb-candidates-empty { font-size: 12px; color: var(--mf-theme-muted, var(--muted)); padding: 10px 2px; }
.adb-honest-note { font-size: 12px; color: var(--amber); margin: 4px 0; }
.adb-cand-row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.adb-cand-thumbs { display: flex; flex: 1; flex-wrap: wrap; gap: 8px; min-width: 0; }
.adb-cand-thumb {
  position: relative;
  box-sizing: border-box;
  flex: 0 0 120px;
  width: 120px;
  height: 90px;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  padding: 0;
  display: grid;
  place-items: center;
  font: inherit;
  color: var(--mf-theme-ink, var(--ink));
  background: var(--mf-theme-card-strong, var(--surface-soft));
  cursor: pointer;
}
.adb-cand-thumb img { width: 100%; height: 100%; object-fit: cover; }
.adb-cand-thumb[aria-pressed="true"] { border-color: var(--teal); }
.adb-cand-thumb:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.adb-cand-badge { position: absolute; bottom: 0; left: 0; right: 0; padding: 3px 4px; font-size: 10px; line-height: 1.3; color: #fff; background: rgba(0, 0, 0, .66); }
.adb-size-trace { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 10px; overflow-wrap: anywhere; }
.adb-cand-failed { color: var(--mf-theme-muted, var(--muted)); border-color: var(--mf-theme-line, var(--line)); }
.adb-cand-error { box-sizing: border-box; width: 100%; max-height: 100%; overflow-y: auto; padding: 5px 6px 23px; font-size: 12px; overflow-wrap: anywhere; }
.adb-cand-error small { display: block; margin-top: 3px; font-size: 10px; }
.adb-cand-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px; flex-shrink: 0; }
.adb-no-thumb { font-size: 11px; color: var(--mf-theme-muted, var(--muted)); }
@media (max-width: 980px) {
  .adb-cand-row { flex-wrap: wrap; }
  .adb-cand-thumbs { flex-basis: 100%; }
  .adb-cand-actions { width: 100%; }
}
.adb-genbar {
  display: grid;
  position: relative;
  grid-template-columns: minmax(0, 1fr) auto auto auto auto;
  gap: 8px;
  align-items: end;
  border: 1px solid var(--mf-theme-line, var(--line));
  border-radius: 12px;
  background: var(--mf-theme-card, var(--surface));
  padding: 10px;
}
.adb-genbar > .mf-ny-panel {
  position: absolute;
  z-index: 2602;
  left: max(8px, 28%);
  bottom: calc(100% + 4px);
  width: min(420px, calc(100vw - 48px));
  max-height: min(55vh, 480px);
  overflow: auto;
  box-sizing: border-box;
}
.adb-genbar textarea {
  font: inherit;
  resize: vertical;
  min-height: 44px;
  color: var(--mf-theme-ink, var(--ink));
  background: var(--mf-theme-card-strong, var(--surface));
  border: 1px solid var(--mf-theme-line, var(--line));
  border-radius: 8px;
  padding: 8px 10px;
}
.adb-param-note {
  display: block;
  font-size: 10px;
  color: var(--mf-theme-muted, var(--muted));
}
.adb-gen-note { font-size: 12px; color: var(--mf-theme-muted, var(--muted)); min-height: 14px; }

/* ---------- 模态 ---------- */
.adb-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9500; /* 高于右下悬浮球(9000)与侧栏(2500): 确认/对比为阻断式模态 */
  display: flex;
  align-items: center;
  justify-content: center;
}
.adb-modal-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--nav);
  opacity: 0.66;
}
.adb-modal {
  position: relative;
  width: min(520px, 92vw);
  max-height: 86vh;
  overflow: auto;
  border: 1px solid var(--mf-theme-line, var(--line));
  border-radius: 14px;
  background: var(--mf-theme-card-strong, var(--surface));
  box-shadow: var(--mf-theme-glass-shadow, var(--shadow));
  padding: 14px;
}
.adb-modal-wide { width: min(960px, 94vw); }
.adb-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 10px;
}
.adb-modal-x {
  border: none;
  background: transparent;
  color: var(--mf-theme-muted, var(--muted));
  font-size: 18px;
  border-radius: 6px;
  padding: 0 6px;
}
.adb-modal-x:hover { color: var(--teal); }
.adb-modal-body { font-size: 13px; line-height: 1.7; }
.adb-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}
.adb-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.adb-compare figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.adb-compare figcaption { font-size: 12px; color: var(--mf-theme-muted, var(--muted)); }
.adb-compare img {
  width: 100%;
  max-height: 52vh;
  object-fit: contain;
  border: 1px solid var(--mf-theme-line, var(--line));
  border-radius: 10px;
  background: var(--mf-theme-card, var(--surface));
}

/* ---------- 窄屏 ---------- */
@media (max-width: 1180px) {
  .adb-main { grid-template-columns: auto minmax(0, 1fr) auto; }
}
@media (max-width: 900px) {
  .adb-genbar { grid-template-columns: minmax(0, 1fr); }
  .adb-compare { grid-template-columns: 1fr; }
}
/* ≤980 单列堆叠，中央优先；画布保留 ≥60vh 的有效视口，生成区单独避让悬浮球。 */
@media (max-width: 980px) {
  .adb-main { grid-template-columns: minmax(0, 1fr); }
  .adb-center { order: -1; width: 100%; min-width: 0; }
  .adb-bottom { grid-column: auto; padding-right: 88px; }
  .adb-main > .adb-side,
  .adb-main > .adb-side:not(.adb-collapsed),
  .adb-main > .adb-right { width: 100%; }
  .adb-canvas-wrap { height: max(calc(60vh + 30px), 400px); }
}

/* 331 Task9：四档缩放与桌面定稿几何。画布、侧栏和悬浮球避让沿既有通过口径。 */
.adb-zoom { border-radius: 999px; gap: 2px; padding: 3px 4px; }
.adb-zoom button { min-height: 28px; border-radius: 999px; padding: 0 8px; }
.adb-zoom [data-adb-zoom-out], .adb-zoom [data-adb-zoom-in] { width: 28px; padding: 0; font-size: 18px; line-height: 1; }
.adb-zoom select { max-width: 88px; padding: 3px 4px; }
.adb-cand-failed { height: auto; min-height: 90px; }
.adb-cand-error { max-height: none; overflow: visible; }
@media (min-width: 981px) {
  .adb-topbar { min-height: 57px; }
  .adb-right { margin-bottom: -10px; } /* 图层栏跨过行间距，延伸到生成区顶。 */
  .adb-candidates { padding: 4px 10px; }
  .adb-cand-thumb { height: 70px; }
  .adb-cand-failed { height: auto; min-height: 70px; }
  .adb-cand-head { min-height: 20px; line-height: 20px; margin-bottom: 0; }
  .adb-cand-head .status-pill { box-sizing: border-box; min-height: 20px; line-height: 18px; }
  .adb-cand-head [data-adb-refresh-request] { min-height: 20px; padding: 0 6px; line-height: 18px; font-size: 11px; }
  .adb-genbar { padding-top: 9px; padding-bottom: 9px; }
}

/* 331-r5 图 02：三个 AI 子页共用页签行，统一行高；画板外包层按页签行与视口推导。 */
@media (min-width: 981px) {
  #aiSubTabs button { min-height: min(37px, 2.28536vw); }
  #aiSubTabs:has([data-ai-tab="ai-board"].selected) { margin-bottom: min(8px, 0.49413vw) !important; }
  body:not(.home-mode) #ai #ai-tab-ai-board > .ai-board-inline-panel {
    padding: 0 !important;
    margin: 0;
    min-height: 0;
    overflow: visible;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  .adb-root {
    box-sizing: border-box;
    height: var(--adb-layout-height, auto);
    min-height: 0;
    gap: 0;
  }
  .adb-topbar {
    box-sizing: border-box;
    flex: 0 0 var(--adb-topbar-height, 63px);
    height: var(--adb-topbar-height, 63px);
    min-height: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
  }
  .adb-main {
    box-sizing: border-box;
    flex: 1 1 auto;
    min-height: 0;
    grid-template-columns: var(--adb-first-track, 229px) minmax(0, 1fr) var(--adb-right-width, 250px);
    grid-template-rows: minmax(0, 1fr) var(--adb-genbar-height, 79px);
    column-gap: var(--adb-column-gap, 6px);
    row-gap: var(--adb-row-gap, 6px);
    margin-inline: var(--adb-outer-gutter, 10px);
  }
  .adb-side { min-height: 0; }
  .adb-left { grid-column: 1; grid-row: 1; width: var(--adb-left-width, 228px); }
  .adb-center {
    grid-column: 2;
    grid-row: 1;
    min-height: 0;
    gap: var(--adb-canvas-gap, 2px);
  }
  .adb-canvas-wrap {
    box-sizing: border-box;
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
  }
  .adb-candidates {
    box-sizing: border-box;
    flex: 0 0 var(--adb-candidate-height, 119px);
    height: var(--adb-candidate-height, 119px);
    min-height: 0;
    overflow-y: auto;
  }
  .adb-right {
    grid-column: 3;
    grid-row: 1 / 3;
    width: var(--adb-right-width, 250px);
    margin: 0;
  }
  .adb-right .adb-side-body {
    box-sizing: border-box;
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    padding-bottom: 80px; /* 64px 固定悬浮球 + 16px 可操作净距 */
  }
  .adb-bottom { grid-column: 1 / 3; grid-row: 2; display: block; min-height: 0; }
  .adb-genbar {
    box-sizing: border-box;
    width: 100%;
    height: var(--adb-genbar-height, 79px);
    min-height: 0;
    grid-template-rows: minmax(0, 1fr) 14px;
    align-items: center;
    padding: 7px 10px 5px;
    gap: 4px 8px;
  }
  .adb-genbar textarea { box-sizing: border-box; height: 100%; min-height: 0; }
  .adb-gen-status {
    grid-column: 1 / -1;
    display: flex;
    gap: 12px;
    min-width: 0;
    height: 14px;
    overflow: hidden;
  }
  .adb-gen-status .adb-gen-note {
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
}

/* FE-VERSION-OVERFLOW-1024:BEGIN */
/* Keep the existing version text; constrain the control rather than its data. */
.adb-topbar [data-adb-version-wrap] {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  flex: 0 1 auto;
}
.adb-topbar [data-adb-version-select] {
  box-sizing: border-box;
  min-width: 0;
  max-width: min(200px, 100%);
  flex-shrink: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Only a visible version control opts this desktop bar into another row. */
@media (min-width: 981px) {
  .adb-topbar:has(> [data-adb-version-wrap]:not([hidden])) {
    flex-wrap: wrap;
    flex: 0 0 auto;
    height: auto;
    min-height: var(--adb-topbar-height, 63px);
  }
}
/* FE-VERSION-OVERFLOW-1024:END */

/* R328 · 与现有主题保持一致；法务信息位于内容底部，不覆盖画布或表单。 */
.meifan-public-legal-footer-r328 {
  width: 100%; min-width: 0; max-width: 100%; margin: 24px auto 0; padding: 18px 12px;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 9px 18px;
  border-top: 1px solid var(--line, rgba(127,184,226,.24)); color: var(--muted, #66706e);
  font-size: 12px; line-height: 1.7; text-align: center; overflow-wrap: anywhere;
}
.meifan-public-legal-footer-r328[hidden], [data-legal-ai-link-r328][hidden], .login-agreement-version-r328[hidden] { display: none !important; }
.meifan-public-legal-footer-r328 a { color: inherit; text-underline-offset: 3px; }
.meifan-public-legal-footer-r328 a:hover { color: var(--text-link, #327a5e); }
.meifan-public-legal-footer-r328 a:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.meifan-public-legal-footer-r328 [data-legal-item="psb"] { display: inline-flex; align-items: center; gap: 5px; }
.meifan-public-legal-footer-r328 img { flex: none; object-fit: contain; }
.meifan-public-legal-footer-r328 nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 16px; max-width: 100%; }
.meifan-login-page:has(> .meifan-public-legal-footer-r328:not([hidden])) { overflow-y: auto; grid-template-rows: auto minmax(min-content, 1fr) auto auto; }
.meifan-login-page > .meifan-public-legal-footer-r328 { margin-top: 0; color: var(--foot-ink, var(--text-muted)); border-color: var(--border-glass); position: relative; z-index: 1; }
.login-agreement-version-r328 { display: block; margin-top: 5px; color: var(--text-muted, var(--muted)); font-size: 12px; line-height: 1.6; }
.pricing-r328-legal { margin: 16px 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; line-height: 1.7; overflow-wrap: anywhere; }
.pricing-r328-legal p { margin: 0 0 8px; }
.pricing-r328-legal nav { display: flex; flex-wrap: wrap; gap: 8px 16px; }
@media (max-width: 980px) {
  .meifan-public-legal-footer-r328 { padding: 16px 8px; gap: 8px 12px; }
  .meifan-public-legal-footer-r328 [data-legal-item="copyright"], .meifan-public-legal-footer-r328 [data-legal-item="legal_links"], .meifan-public-legal-footer-r328 [data-legal-item="complaint"] { flex-basis: 100%; }
  .meifan-public-legal-footer-r328 [data-legal-item="psb"] { max-width: 100%; }
}
/* FE-NOTIF-BELL-20261021: one account notification entry, list and detail.
   Reuse product theme and modal/sidebar layers; do not cap the real count. */
.user-notif-bell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  flex: 0 1 auto;
  gap: 5px;
  min-width: 40px;
  min-height: 40px;
  max-width: min(100%, 150px);
  padding: 7px 9px;
  border: 1px solid var(--mf-theme-line, var(--line));
  border-radius: 8px;
  background: var(--mf-theme-card, var(--surface));
  color: var(--mf-theme-ink, var(--ink));
  font: inherit;
  line-height: 1.4;
  white-space: normal;
  overflow-wrap: anywhere;
}
.user-notif-bell svg {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}
.user-notif-bell [data-user-notif-count] {
  min-width: 19px;
  max-width: 100%;
  padding: 1px 5px;
  border-radius: 10px;
  background: var(--red);
  color: var(--surface);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.user-notif-overlay[hidden],
.user-notif-overlay [hidden],
.user-notif-bell[hidden],
.user-notif-bell [hidden] {
  display: none !important;
}
.user-notif-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--mf-layer-modal, 2147483000);
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 20px;
  padding-top: max(20px, env(safe-area-inset-top));
  padding-right: max(20px, env(safe-area-inset-right));
  padding-bottom: max(20px, env(safe-area-inset-bottom));
  background: rgba(0, 0, 0, 0.38);
  overflow: hidden;
  overscroll-behavior: contain;
}
/* Keep the existing first-level navigation visible and clickable. */
body:not(.home-mode) > .user-notif-overlay {
  left: var(--mf-sidebar-width, 248px);
}
.user-notif-overlay,
.user-notif-overlay *,
.user-notif-overlay *::before,
.user-notif-overlay *::after {
  box-sizing: border-box;
}
.user-notif-panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 520px;
  min-width: 0;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
  border: 1px solid var(--mf-theme-line, var(--line));
  border-radius: 12px;
  background: var(--mf-theme-card-strong, var(--surface));
  color: var(--mf-theme-ink, var(--ink));
  box-shadow: var(--shadow);
  font-size: 14px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.user-notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--mf-theme-line, var(--line));
}
.user-notif-header h2 {
  min-width: 0;
  margin: 0;
  font-size: 17px;
  line-height: 1.5;
}
.user-notif-overlay button {
  min-width: 0;
  min-height: 40px;
  max-width: 100%;
  padding: 7px 11px;
  border: 1px solid var(--mf-theme-line, var(--line));
  border-radius: 8px;
  background: var(--mf-theme-card, var(--surface));
  color: var(--mf-theme-ink, var(--ink));
  font: inherit;
  line-height: 1.5;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.user-notif-header > button { flex: 0 1 auto; }
.user-notif-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
}
.user-notif-toolbar button[data-active="true"] {
  border-color: var(--teal);
  color: var(--teal);
  font-weight: 700;
  box-shadow: inset 0 -2px var(--teal);
}
.user-notif-status {
  min-width: 0;
  margin: 0;
  padding: 0 16px 12px;
  color: var(--mf-theme-muted, var(--muted));
  font-size: 13px;
}
.user-notif-header,
.user-notif-toolbar,
.user-notif-status,
.user-notif-footer {
  flex: 0 1 auto;
  min-height: 0;
  overflow-y: auto;
}
.user-notif-content {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.user-notif-list { margin: 0; padding: 0; list-style: none; }
.user-notif-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, auto);
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 12px 16px;
  border-top: 1px solid var(--mf-theme-line, var(--line));
}
.user-notif-row[data-unread="true"]::before {
  content: "";
  position: absolute;
  top: 23px;
  left: 5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
}
.user-notif-row .user-notif-summary {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 4px 0;
  border-color: transparent;
  border-radius: 4px;
  background: transparent;
  text-align: left;
}
.user-notif-summary > * { min-width: 0; max-width: 100%; }
.user-notif-summary strong { font-size: 14px; line-height: 1.6; }
.user-notif-summary small,
.user-notif-summary time {
  color: var(--mf-theme-muted, var(--muted));
  font-size: 12px;
}
.user-notif-markread { font-size: 12px !important; }
.user-notif-detail { min-width: 0; padding: 16px; }
.user-notif-detail h3 { margin: 0 0 12px; font-size: 18px; line-height: 1.5; }
.user-notif-detail p { margin: 0 0 12px; }
.user-notif-body {
  max-width: 100%;
  margin: 0 0 16px;
  font: inherit;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: normal;
}
.user-notif-detail > button { margin: 4px 8px 4px 0; }
/* NOTIF-DTO-FE-1：详情「任务信息」卡／来源行／入口不可用提示（定稿图 02） */
.user-notif-taskinfo { min-width: 0; margin: 0 0 16px; padding: 12px 14px; border: 1px solid var(--mf-theme-line, var(--line)); border-radius: 8px; }
.user-notif-taskinfo h4 { margin: 0 0 8px; font-size: 14px; line-height: 1.5; }
.user-notif-detail .user-notif-taskinfo p { margin: 0; }
.user-notif-taskinfo p,
.user-notif-detail .user-notif-source,
.user-notif-detail .user-notif-nodest { overflow-wrap: anywhere; color: var(--mf-theme-muted, var(--muted)); }
.user-notif-footer {
  display: flex;
  justify-content: center;
  padding: 12px 16px;
  border-top: 1px solid var(--mf-theme-line, var(--line));
}
/* NOTIF-01：列表页脚说明（站内通知为主；短信范围） */
.user-notif-note {
  flex: 0 0 auto;
  margin: 0;
  padding: 10px 16px 0;
  color: var(--mf-theme-muted, var(--muted));
  font-size: 12px;
  line-height: 1.6;
}
.user-notif-bell:hover,
.user-notif-overlay button:hover { border-color: var(--mf-theme-line-strong, var(--teal)); }
.user-notif-bell:focus-visible,
.user-notif-overlay button:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}
.user-notif-bell:disabled,
.user-notif-overlay button:disabled { opacity: 0.6; cursor: not-allowed; }
@media (max-width: 760px) {
  body:not(.home-mode) > .user-notif-overlay { left: 0; }
  .user-notif-overlay {
    padding: 10px;
    padding-top: max(10px, env(safe-area-inset-top));
    padding-right: max(10px, env(safe-area-inset-right));
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    padding-left: max(10px, env(safe-area-inset-left));
  }
  .user-notif-panel { max-width: 520px; }
  .user-notif-overlay button { min-height: 44px; }
  .user-notif-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .user-notif-row .user-notif-markread { justify-self: start; }
  .user-notif-detail > button { width: 100%; margin: 4px 0; }
}
@media (prefers-reduced-motion: reduce) {
  .user-notif-bell,
  .user-notif-overlay,
  .user-notif-overlay * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* NOTIF-MOBILE-LAYER-1：<=980px 时侧栏是粘性顶栏（层级 --mf-layer-sidebar 高于弹层 --mf-layer-modal），
   会盖住通知面板的标题行与「关闭」（实测 390／375／820 宽：关闭按钮中心命中 BUTTON.brand）。
   沿 UI-MODAL-CLOSE-BRAND-OVERLAP-1 的同一契约：<=980 弹层撑满视口并压在顶栏之上；>=981 不变（侧栏仍是左列，面板从侧栏右侧起）。
   只动通知遮罩，不动 .brand／侧栏本身。 */
@media (max-width: 980px) {
  body:not(.home-mode) > .user-notif-overlay {
    left: 0;
    z-index: calc(var(--mf-layer-sidebar, 2147483600) + 2);
  }
}
/* CMD206 NOTIF-01: same component/entrance, full phone screen; desktop remains a panel. */
.user-notif-mobile-return { display: none; }
.user-notif-subtitle, .user-notif-preview { display: none; }
@media (max-width: 760px) {
  .user-notif-overlay { padding: 0; z-index: calc(var(--mf-layer-sidebar, 2147483600) + 2); background: var(--mf-theme-card-strong, var(--surface)); }
  .user-notif-panel { max-width: none; height: 100%; border: 0; border-radius: 0; box-shadow: none; padding-bottom: env(safe-area-inset-bottom); }
  body:has(.user-notif-overlay:not([hidden])) { overflow: hidden; }
  .user-notif-header { display: grid; grid-template-columns: 1fr; gap: 6px; padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 16px max(16px, env(safe-area-inset-left)); }
  .user-notif-header > button { grid-row: 1; justify-self: start; border: 0; padding-left: 0; background: transparent; }
  .user-notif-header h2 { grid-row: 2; font-size: 24px; }
  .user-notif-mobile-return { display: inline; }
  .user-notif-desktop-close { display: none; }
  .user-notif-subtitle { display: block; margin: 0; color: var(--mf-theme-muted, var(--muted)); font-size: 13px; }
  .user-notif-toolbar { padding: 10px 16px; }
  .user-notif-toolbar [data-notif-action="read-all"] { margin-left: auto; }
  .user-notif-content { padding: 0 16px; }
  .user-notif-row { margin: 0 0 12px; border: 1px solid var(--mf-theme-line, var(--line)); border-radius: 12px; background: var(--mf-theme-card, var(--surface)); padding: 12px 14px; }
  .user-notif-row[data-unread="true"]::before { top: 22px; left: 6px; }
  .user-notif-preview { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--mf-theme-muted, var(--muted)); font-size: 13px; }
}

/* CMD358 NOTIF-01: approved mobile list; extra live controls stay in the existing flow.
   The drawing's approval/demo footer is document metadata, not a notification status. */
.user-notif-mobile-brand { display: none; }
@media (max-width: 760px) {
  .user-notif-header { padding: max(60px, env(safe-area-inset-top)) max(28px, env(safe-area-inset-right)) 18px max(28px, env(safe-area-inset-left)); gap: 0; border-bottom: 0; }
  .user-notif-mobile-brand { display: flex; grid-row: 1; align-items: center; gap: 11px; height: 24px; margin-bottom: 18px; font-size: 13px; font-weight: 650; letter-spacing: .1px; }
  .user-notif-mobile-brand img { flex: 0 0 25px; width: 25px; height: 24px; object-fit: contain; }
  .user-notif-header > button { grid-row: 2; min-height: 28px; padding: 0; margin: 0 0 10px; font-size: 12px; line-height: 28px; }
  .user-notif-header h2 { grid-row: 3; font-size: 27px; font-weight: 650; line-height: 40px; }
  .user-notif-subtitle { grid-row: 4; font-size: 12px; line-height: 18px; }
  .user-notif-toolbar { padding: 2px 28px 21px; gap: 8px 18px; }
  .user-notif-toolbar button { min-height: 25px; padding: 3px 10px; border-radius: 12px; font-size: 11px; line-height: 17px; }
  .user-notif-toolbar :is([data-notif-action="all"], [data-notif-action="unread"]) { min-width: 74px; text-align: left; }
  .user-notif-toolbar button[data-active="true"] { box-shadow: none; font-weight: 500; }
  .user-notif-toolbar [data-notif-action="read-all"] { padding-right: 0; padding-left: 0; border-color: transparent; border-radius: 0; background: transparent; font-size: 12px; }
  .user-notif-status { padding-right: 28px; padding-left: 28px; }
  .user-notif-status:empty { padding-bottom: 0; }
  .user-notif-content { padding: 0 28px; scrollbar-gutter: auto; }
  .user-notif-row { gap: 4px; margin-bottom: 9px; padding: 12px 14px; }
  .user-notif-row[data-unread="true"]::before { top: 17px; right: 14px; left: auto; }
  .user-notif-row .user-notif-summary { padding: 0; gap: 4px; }
  .user-notif-kind { padding-right: 70px; font-size: 14px; font-weight: 600; line-height: 20px; }
  .user-notif-summary strong { font-size: 12px; font-weight: 400; line-height: 19px; }
  .user-notif-preview { font-size: 12px; line-height: 19px; }
  .user-notif-summary time, .user-notif-summary > span:last-child { font-size: 11px; line-height: 16px; }
  .user-notif-summary > span:last-child { position: absolute; top: 12px; right: 31px; color: #718da0; }
  .user-notif-row[data-unread="true"] .user-notif-summary > span:last-child { color: var(--teal); }
  .user-notif-row .user-notif-markread { min-height: 26px; padding: 3px 8px; font-size: 11px !important; line-height: 18px; }
  .user-notif-note { padding: 18px 28px 0; font-size: 10px; }
  .user-notif-footer { min-height: 90px; padding: 6px 28px 18px; border-top: 0; }
  html:not([data-meifan-theme="day"]) .user-notif-panel { background: #020d17 url("assets/ui/notif01-approved-backdrop.svg") center top / 100% 100% no-repeat; color: #e3edf5; }
  html:not([data-meifan-theme="day"]) .user-notif-header > button { color: #9bb6ca; }
  html:not([data-meifan-theme="day"]) .user-notif-header h2 { color: #f2f7fb; }
  html:not([data-meifan-theme="day"]) .user-notif-subtitle,
  html:not([data-meifan-theme="day"]) .user-notif-summary :is(strong, .user-notif-preview, time) { color: #8cacc3; }
  html:not([data-meifan-theme="day"]) .user-notif-toolbar button { background: #0b2c3c; border-color: #244b60; color: #35c4f4; }
  html:not([data-meifan-theme="day"]) .user-notif-toolbar [data-notif-action="read-all"] { background: transparent; border-color: transparent; }
  html:not([data-meifan-theme="day"]) .user-notif-row { background: #0b2233; border-color: #244357; }
  html:not([data-meifan-theme="day"]) .user-notif-row[data-unread="true"]::before { background: #35c4f4; }
  html:not([data-meifan-theme="day"]) .user-notif-note { color: #7f9db2; }
  html[data-meifan-theme="day"] .user-notif-mobile-brand img { filter: brightness(.35); }
}

/* CMD358 v3: preserve duplicate title data/desktop; only the approved phone range hides it. */
@media (max-width: 640px) {
  .user-notif-summary > .user-notif-duplicate-title { display: none; }
}

/* CMD474 P6: only the selected phone detail enters a native top layer; NOTIF-01 and desktop remain unchanged. */
@media (max-width: 640px) {
  body:has(dialog.user-notif-detail-page-r474[open]) { overflow: hidden; }
  dialog.user-notif-detail-page-r474 {
    position: fixed; inset: 0; width: 100%; max-width: none; height: 100dvh; max-height: none;
    margin: 0; padding: max(62px, env(safe-area-inset-top)) 28px max(32px, env(safe-area-inset-bottom));
    border: 0; box-sizing: border-box; overflow: auto; overscroll-behavior: contain;
    background: var(--bg, #04101a); color: var(--mf-theme-ink, var(--ink)); font: inherit;
  }
  .user-notif-detail-page-r474::backdrop { background: var(--bg, #04101a); }
  .user-notif-detail-page-r474[hidden] { display: none; }
  .user-notif-detail-inner-r474 { width: 100%; max-width: 460px; margin: 0 auto; }
  .user-notif-detail-brand-r474 { display: flex; align-items: center; gap: 11px; height: 24px; margin: 0 0 25px; }
  .user-notif-detail-logo-r474 { width: 25px; height: 24px; flex: 0 0 25px; color: inherit; }
  .user-notif-detail-brand-r474 strong { font-size: 13px; letter-spacing: .1px; }
  .user-notif-overlay .user-notif-detail-back-r474 { min-height: 20px; margin: 0 0 8px; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--mf-theme-muted, var(--muted)); font-size: 12px; line-height: 20px; text-align: left; }
  .user-notif-detail-page-r474 h2 { margin: 0 0 8px; font-size: 27px; line-height: 34px; }
  .user-notif-detail-sub-r474 { margin: 0 0 20px; color: var(--mf-theme-muted, var(--muted)); font-size: 12px; line-height: 18px; }
  .user-notif-detail-page-r474 .user-notif-detail { padding: 0; }
  .user-notif-detail-page-r474 .user-notif-detail-meta-caption-r707 { display: inline-block; max-width: 100%; margin: 0 0 16px; padding: 3px 10px; border: 1px solid var(--mf-theme-line, var(--line)); border-radius: 12px; font-size: 11px; line-height: 19px; }
  .user-notif-detail-page-r474 .user-notif-detail h3 { margin: 0 0 16px; font-size: 21px; line-height: 30px; }
  .user-notif-detail-page-r474 .user-notif-body { margin: 0 0 26px; font-size: 13px; line-height: 24px; }
  .user-notif-detail-page-r474 .user-notif-taskinfo { min-height: 111px; margin: 0 0 30px; padding: 18px; border-radius: 12px; background: var(--mf-theme-card, var(--surface)); }
  .user-notif-detail-page-r474 .user-notif-taskinfo h4 { margin: 0 0 14px; font-size: 13px; line-height: 20px; }
  .user-notif-detail-page-r474 :is(.user-notif-source, .user-notif-taskinfo p, .user-notif-nodest) { font-size: 12px; line-height: 24px; }
  .user-notif-detail-page-r474 .user-notif-detail-actions { display: grid; gap: 13px; margin-top: 30px; }
  .user-notif-overlay .user-notif-detail-page-r474 .user-notif-detail-actions button { width: 100%; min-height: 46px; margin: 0; border-radius: 12px; padding: 10px 16px; font-size: 14px; text-align: left; }
  .user-notif-detail-page-r474 [data-notif-detail-status] { margin: 28px 0 0; color: var(--mf-theme-muted, var(--muted)); font-size: 12px; line-height: 22px; overflow-wrap: anywhere; }
  .user-notif-detail-page-r474 [data-notif-detail-status]:empty { display: none; }
}
/* CMD607 BEGIN notification SVG accents; night only. */
@media (max-width: 640px) {
  html:not([data-meifan-theme="day"]) .user-notif-panel .user-notif-row[data-unread="true"] .user-notif-summary > span:last-child { color: #35c4f4; }
  html:not([data-meifan-theme="day"]) dialog.user-notif-detail-page-r474[data-mf-security-page="NOTIF-02"] .user-notif-detail-actions [data-notif-action="navigate"] { background: #29b6e9; color: #032331; border-color: transparent; }
}
/* CMD607 END notifications */

/* CMD707: mobile detail hierarchy follows NOTIF-02, with mark-read as a secondary status action. */
@media (max-width: 640px) {
  .user-notif-detail-breadcrumb-r707 { min-height: 20px; margin: 0 0 8px; font-size: 12px; line-height: 20px; color: var(--mf-theme-muted, var(--muted)); }
  .user-notif-detail-meta-r707 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
  .user-notif-detail-page-r474 .user-notif-detail-meta-caption-r707 { margin: 0; }
  .user-notif-overlay .user-notif-detail-page-r474 [data-notif-status-row] .user-notif-markread { width: auto; min-height: 26px; margin: 0; padding: 3px 8px; border: 0; border-radius: 0; background: transparent; box-shadow: none; color: var(--mf-theme-muted, var(--muted)); font-size: 11px; line-height: 20px; }
  .user-notif-overlay .user-notif-detail-page-r474 .user-notif-detail-actions button { font-weight: 650; line-height: 21px; }
  .user-notif-overlay dialog.user-notif-detail-page-r474[data-mf-security-page="NOTIF-02"] .user-notif-detail-actions [data-notif-action="navigate"] { background: #29b6e9; color: #032331; border: 0; padding-left: 16px; }
  html:not([data-meifan-theme="day"]) .user-notif-overlay .user-notif-detail-page-r474 .user-notif-detail-actions [data-notif-action="back"] { background: #0b2233; color: #c8dce9; border: 1px solid #31566f; padding-left: 15px; }
}
/* R367: existing project workbench modal, design 03 v1.1. */
.os367-layer { box-sizing: border-box; width: min(620px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); margin: auto; padding: 28px; border: 1px solid var(--line, #e4e5e1); border-radius: 14px; background: var(--panel, #fff); color: var(--text, #24342e); box-shadow: 0 20px 64px #0003; overflow: auto; font-size: 14px; }
.os367-layer::backdrop { background: #17241d55; }
.os367-layer *, .os367-layer *::before, .os367-layer *::after { box-sizing: border-box; }
.os367-layer h2, .os367-layer h3, .os367-layer p { margin: 0; }
.os367-layer h2 { font-size: 24px; line-height: 1.4; }
.os367-layer h3 { font-size: 15px; margin-bottom: 10px; }
.os367-layer header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--line, #e9e9e5); }
.os367-layer header p { margin-top: 4px; overflow-wrap: anywhere; }
.os367-layer section { margin-top: 20px; }
.os367-layer button, .os367-layer input, .os367-layer select { font: inherit; }
.os367-layer button { border: 1px solid var(--line, #e2e5e1); background: var(--panel, #fff); color: inherit; padding: 8px 12px; border-radius: 5px; cursor: pointer; line-height: 1.35; }
.os367-layer button:disabled { opacity: .48; cursor: not-allowed; }
.os367-layer button:focus-visible, .os367-layer input:focus-visible, .os367-layer select:focus-visible { outline: 2px solid #23745d; outline-offset: 2px; }
.os367-layer input:not([type=checkbox]), .os367-layer select { width: 100%; min-width: 0; padding: 8px 10px; border: 1px solid var(--line, #e2e5e1); border-radius: 4px; background: var(--panel, #fff); color: inherit; height: 36px; }
.os367-layer input[readonly] { background: var(--bg-soft, #f7f8f5); }
.os367-layer .os367-x { border: 0; font-size: 25px; padding: 0 3px; line-height: 1.1; }
.os367-status { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.os367-status small, .os367-layer small, .os367-muted { color: var(--muted, #788079); font-size: 12px; }
#ownerShareStatusR367 { padding: 3px 10px; border-radius: 20px; font-size: 12px; background: #fbefe1; color: #966833; }
#ownerShareStatusR367[data-open=true] { background: #e5f1ea; color: #195e43; }
.os367-status small { flex: 1 1 240px; }
.os367-line { display: flex; align-items: flex-start; gap: 14px; margin-top: 14px; }
.os367-line > label { width: 70px; flex: 0 0 70px; padding-top: 8px; color: var(--muted, #69736c); }
.os367-field, .os367-link { flex: 1; min-width: 0; }
.os367-password { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.os367-field small { display: block; margin-top: 5px; }
.os367-link { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 7px; }
.os367-link button { padding-inline: 8px; white-space: nowrap; }
.os367-sync { padding: 9px 12px; background: #e8f1ec; color: #215b49; border-radius: 4px; font-size: 13px; line-height: 1.55; }
.os367-contacts { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.os367-contacts label { display: grid; gap: 6px; min-width: 0; font-size: 12px; }
.os367-contacts small:empty { display: none; }
.os367-hint { font-size: 12px; margin-bottom: 9px !important; }
.os367-panoramas { border: 1px solid var(--line, #e8e9e5); border-radius: 4px; }
.os367-panoramas > div { padding: 10px; }
.os367-panoramas > div + div { border-top: 1px solid var(--line, #edf0ec); }
.os367-panorama-head { display: flex; align-items: center; gap: 16px; font-size: 12px; }
.os367-panorama-head button { margin-left: auto; padding: 5px 10px; }
.os367-panorama-head span { color: var(--muted, #788079); }
.os367-panorama-options { display: grid; gap: 8px; min-width: 0; max-height: 150px; overflow: auto; margin-top: 10px; }
.os367-panorama-options[hidden] { display: none; }
.os367-panorama-options label { display: flex; align-items: flex-start; gap: 7px; font-size: 12px; overflow-wrap: anywhere; }
.os367-panorama-options input { flex-shrink: 0; accent-color: #1d7056; }
.os367-readonly { margin-top: 20px !important; padding: 8px 10px; background: #fdf4e9; color: #a47b46; border-radius: 4px; font-size: 12px; }
#ownerShareErrorR367 { color: var(--muted, #6b756e); font-size: 13px; overflow-wrap: anywhere; }
#ownerShareErrorR367:not(:empty) { margin-top: 12px; }
.os367-layer footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.os367-actions { display: flex; justify-content: flex-end; gap: 10px; margin-left: auto; }
.os367-layer .os367-primary { background: #00694d; color: #fff; border-color: #00694d; }
.os367-layer .os367-close-share { background: transparent; border-color: transparent; color: #926248; padding-left: 0; }
.os367-layer .os367-danger { background: #975333; color: #fff; border-color: #975333; }
.os367-small { width: min(420px, calc(100vw - 32px)); }
.os367-small p { margin: 16px 0; line-height: 1.6; }
.os367-qr { text-align: center; }
.os367-qr canvas { width: min(100%, 280px); height: auto; display: block; margin: 20px auto; image-rendering: pixelated; }
@media (max-width: 480px) {
  .os367-layer { width: calc(100vw - 20px); max-height: calc(100dvh - 24px); padding: 18px 14px; }
  .os367-layer h2 { font-size: 21px; }
  .os367-line { display: block; }
  .os367-line > label { display: block; width: auto; padding: 0 0 6px; }
  .os367-link { grid-template-columns: 1fr 1fr; }
  .os367-link input { grid-column: 1 / -1; }
  .os367-contacts { gap: 12px; }
  .os367-panorama-head { gap: 9px; flex-wrap: wrap; }
  .os367-panorama-head .os367-muted { flex: 1; min-width: 0; }
  .os367-layer footer { align-items: stretch; }
  .os367-actions { gap: 7px; }
  .os367-actions button { padding-inline: 9px; }
}
/* CMD291 M15a: only the active mobile case list; desktop/recycle/detail keep their layout. */
#cases .case-share-mobile, #cases .case-share-mobile-filter-name { display: none; }
@media (max-width: 640px) {
  body[data-active-view="cases"]:has(#cases.active > .case-share-mobile-list) .topbar { display: none; }
  body[data-active-view="cases"]:has(#cases.active > .case-share-mobile-list) > .app-shell > .sidebar { display: none; }
  #cases .case-share-panel.case-share-mobile-list { gap: 10px; padding: 4px !important; min-width: 0; border: 0; background: transparent !important; box-shadow: none !important; }
  #cases .case-share-mobile-list .case-share-mobile { display: block; }
  #cases .case-share-mobile-list .case-share-head { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; margin: 0; }
  #cases .case-share-mobile-list #caseShareMoreBtn { display: inline-flex; align-items: center; gap: 4px; border: 0; padding: 4px 0; background: transparent; }
  #cases .case-share-mobile-list .case-share-back-icon { width: 18px; height: 18px; transform: rotate(-90deg); }
  #cases .case-share-mobile-list #newCaseShareBtn { width: auto; min-width: 78px; min-height: 36px; margin-left: auto; }
  #cases .case-share-mobile-list .case-share-desktop-label { display: none; }
  #cases .case-share-mobile-list .case-share-mobile-title { font-size: 23px; line-height: 30px; margin: 0; }
  #cases .case-share-mobile-list .case-share-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) 66px; gap: 8px; padding: 0; border: 0; background: transparent; }
  #cases .case-share-mobile-list .case-share-filters label { min-width: 0; gap: 0; position: relative; }
  #cases .case-share-mobile-list .case-share-filter-all > select { color: transparent !important; }
  #cases .case-share-mobile-list .case-share-filter-all > select option { color: var(--ink); }
  #cases .case-share-mobile-list .case-share-filters .case-share-filter-all > .case-share-mobile-filter-name { display: block; position: absolute; left: 12px; top: 10px; pointer-events: none; z-index: 1; color: var(--ink); font-size: 12px; line-height: 16px; }
  #cases .case-share-mobile-list .case-share-filters label > span { display: none; }
  #cases .case-share-mobile-list .case-share-search { grid-column: 1 / -1; }
  #cases .case-share-mobile-list .case-share-search input { height: 38px; padding: 0 12px 0 36px; }
  #cases .case-share-mobile-list .case-share-filters select { height: 36px; padding: 0 22px 0 5px; font-size: 12px; appearance: none; }
  #cases .case-share-mobile-list #caseShareArchiveControl { display: none; grid-column: 1 / -1; }
  #cases .case-share-mobile-list #caseShareArchiveControl.case-share-filter-expanded { display: grid; }
  #cases .case-share-mobile-list .case-share-search-icon { position: absolute; left: 11px; top: 11px; width: 16px; height: 16px; pointer-events: none; z-index: 1; }
  #cases .case-share-mobile-list .case-share-filter-arrow { position: absolute; right: 7px; top: 12px; width: 12px; height: 12px; transform: rotate(180deg); pointer-events: none; z-index: 1; }
  #cases .case-share-mobile-list #caseShareFilterBtn { display: flex; align-items: center; justify-content: center; gap: 4px; min-width: 0; padding: 0 6px; height: 36px; min-height: 36px; }
  #cases .case-share-mobile-list .case-share-funnel-icon { width: 14px; height: 14px; }
  #cases .case-share-mobile-list .case-share-mobile-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 8px; padding: 3px; gap: 3px; }
  #cases .case-share-mobile-list .case-share-mobile-tabs button { min-width: 0; min-height: 32px; border: 0; background: transparent; color: var(--muted); }
  #cases .case-share-mobile-list .case-share-mobile-tabs [aria-pressed="true"] { background: var(--accent, #0878e8); color: #fff; }
  #cases .case-share-mobile-list .case-share-library-head { order: 8; }
  #cases .case-share-mobile-list .case-share-library-head > strong,
  #cases .case-share-mobile-list #caseShareScopeTabs { display: none; }
  #cases .case-share-mobile-list #caseShareQuotaLine { order: 9; font-size: 11px; color: var(--muted); }
  #cases .case-share-mobile-list .case-share-mobile-recycle { order: 10; justify-self: start; }
  #cases .case-share-mobile-list #caseShareGrid { grid-template-columns: minmax(0, 1fr); align-content: start; gap: 10px; padding: 0; border: 0; min-height: 0; background: transparent !important; box-shadow: none !important; }
  #cases .case-share-mobile-list #caseShareGrid .case-share-card-shell { min-width: 0; position: relative; border: 1px solid var(--line); border-radius: 10px; padding: 7px; background: var(--surface); }
  #cases .case-share-mobile-list #caseShareGrid .case-share-card { display: block; width: 100%; min-height: 0; border: 0; box-shadow: none !important; background: transparent !important; transform: none; }
  #cases .case-share-mobile-list #caseShareGrid .case-share-card > .case-share-cover,
  #cases .case-share-mobile-list #caseShareGrid .case-share-card > .case-share-info { display: none; }
  #cases .case-share-mobile-list #caseShareGrid .case-share-mobile-cover { position: relative; aspect-ratio: 1.94; border-radius: 7px; overflow: hidden; background: var(--surface-2, var(--surface)); }
  #cases .case-share-mobile-list #caseShareGrid .case-share-mobile-cover > img { display: none; width: 100%; height: 100%; object-fit: cover; }
  #cases .case-share-mobile-list #caseShareGrid .has-photo > img { display: block; }
  #cases .case-share-mobile-list #caseShareGrid .case-share-photo-tag { display: none; position: absolute; top: 9px; left: 9px; background: #182a3cba; color: #fff; padding: 4px 7px; border-radius: 5px; font-size: 10px; }
  #cases .case-share-mobile-list #caseShareGrid .has-photo > .case-share-photo-tag { display: block; }
  #cases .case-share-mobile-list #caseShareGrid .case-share-photo-missing { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--muted); font-size: 12px; }
  #cases .case-share-mobile-list #caseShareGrid .has-photo > .case-share-photo-missing { display: none; }
  #cases .case-share-mobile-list #caseShareGrid .case-share-mobile-info { display: grid; gap: 4px; position: relative; padding: 10px 22px 3px 2px; }
  #cases .case-share-mobile-list #caseShareGrid .case-share-mobile-info strong { font-size: 14px; line-height: 20px; overflow-wrap: anywhere; }
  #cases .case-share-mobile-list #caseShareGrid .case-share-mobile-info small { color: var(--muted); font-size: 11px; line-height: 16px; overflow-wrap: anywhere; }
  #cases .case-share-mobile-list #caseShareGrid .case-share-next-icon { position: absolute; right: 0; top: 19px; width: 16px; height: 16px; transform: rotate(90deg); }
  #cases .case-share-mobile-list #caseShareGrid .case-share-card-menu { margin-top: 6px; font-size: 11px; }
  html:not([data-meifan-theme="day"]) #cases .case-share-mobile-list :is(.case-share-back-icon, .case-share-next-icon, .case-share-filter-arrow, .case-share-search-icon, .case-share-funnel-icon) { filter: brightness(0) invert(1); }
}
/* CMD358 NY-05 mobile account home. No desktop, company-pane or child-page rules. */
@media (max-width: 640px) {
  /* WO2050: the personal home scrollport ends above the existing six-item bar.
     Do not paint selectable entries behind it or add scripted scrolling. */
  body[data-active-view="settings"]:has(#settings.active [data-ny05-home]) .app-shell {
    align-content: start;
  }
  body[data-active-view="settings"]:has(#settings.active [data-ny05-home]) .app-shell > .main {
    height: calc(100dvh - 56px - env(safe-area-inset-bottom, 0px));
    min-height: 0;
    overflow-y: auto;
    padding-bottom: 14px;
    scroll-padding-bottom: 14px;
  }
  /* The NY-05 heading and existing More/Home routes replace duplicate headings
     only while this mobile account home is active. Global DOM/handlers remain. */
  body:has(#settings.active [data-ny05-home]) .main > .topbar > div:has(> #pageTitle),
  body:has(#settings.active [data-ny05-home]) .sidebar > .brand { display: none !important; }
  body:has(#settings.active [data-ny05-home]) .main > .topbar { min-height: 0 !important; padding: 0 !important; margin: 0 !important; border: 0 !important; background: transparent !important; box-shadow: none !important; }
  body:has(#settings.active [data-ny05-home]) .sidebar { min-height: 0; height: auto; padding-top: 0; padding-bottom: 0; }
  /* WO1620: existing global controls and the NY05 heading share one row only here. */
  body:has(#settings.active [data-ny05-home]) .main { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; }
  body:has(#settings.active [data-ny05-home]) .main > #settings,
  body:has(#settings.active [data-ny05-home]) .main > .topbar { grid-column: 1; grid-row: 1; }
  body:has(#settings.active [data-ny05-home]) .main > .topbar { display: flex !important; align-self: start; justify-self: end; align-items: center; justify-content: flex-end; flex-direction: row !important; flex-wrap: nowrap; gap: 5px; width: auto; height: 46px; position: relative; inset: auto !important; z-index: 1; pointer-events: none; }
  body:has(#settings.active [data-ny05-home]) .topbar > :is(#globalNoticeButton, #userNotificationsButton) { pointer-events: auto; position: static !important; inset: auto !important; margin: 0 !important; width: auto !important; min-width: 0; min-height: 28px !important; height: 28px; padding: 3px 5px !important; font-size: 11px; line-height: 18px; gap: 2px; }
  body:has(#settings.active [data-ny05-home]) #userNotificationsButton svg { width: 13px; height: 13px; }
  [data-ny05-home] { --ny05-gap: 7px; --ny05-radius: 6px; --ny05-line: rgba(70, 141, 197, .23); --ny05-surface: rgba(5, 38, 65, .68); --ny05-muted: #a0b8ce; display: block; padding: 0; border: 0; background: transparent; }
  [data-ny05-home] .ny05-header { position: relative; display: flex; align-items: center; justify-content: center; height: 46px; margin: 0 0 5px; }
  [data-ny05-home] .ny05-header h1 { margin: 0; font-size: 17px; line-height: 24px; font-weight: 600; color: #eef6ff; }
  [data-ny05-home] .ny05-header > button { position: absolute; inset: 0 auto 0 0; border: 0; background: transparent; color: #c9d9e8; padding: 0 4px; font: inherit; }
  [data-ny05-home] > [data-settings-account-r3-lead],
  [data-ny05-home] [data-settings-account-r3-personal] > .settings-account-r3-panel-head,
  [data-ny05-home] [data-settings-account-r3-personal] .settings-account-r5-side { display: none; }
  [data-ny05-home] > .settings-account-r3-nav { display: grid; grid-template-columns: 1fr 1fr; padding: 0; gap: 0; margin: 0 0 10px; min-height: 38px; border: 1px solid var(--ny05-line); border-radius: 8px; background: rgba(4, 30, 53, .8); }
  [data-ny05-home] > .settings-account-r3-nav button { border: 0; border-radius: 7px; min-height: 36px; padding: 6px; background: transparent; color: #cfdfef; font-size: 14px; }
  [data-ny05-home] > .settings-account-r3-nav button.active { color: white; background: linear-gradient(105deg, #0085fc, #0044cf) !important; box-shadow: inset 0 0 0 1px rgba(48, 135, 255, .7); }
  [data-ny05-home] .settings-account-r3-body,
  [data-ny05-home] [data-settings-account-r3-personal],
  [data-ny05-home] .settings-account-r5-layout,
  [data-ny05-home] [data-settings-account-r7-personal-main] { display: block; padding: 0; margin: 0; border: 0; background: transparent; box-shadow: none; min-width: 0; }
  [data-ny05-home] [data-settings-account-r5-account-settings] { display: flex; flex-direction: column; gap: var(--ny05-gap); padding: 0; margin: 0; border: 0; background: transparent; }
  [data-ny05-home] .settings-account-r374-profile-card,
  [data-ny05-home] .settings-account-r374-entry { padding: 0; margin: 0; border: 1px solid var(--ny05-line); border-radius: var(--ny05-radius); background: var(--ny05-surface); box-shadow: inset 0 0 0 3px rgba(7, 23, 39, .32); }
  [data-ny05-home] .settings-account-r374-profile-summary { display: flex; align-items: center; min-height: 84px; gap: 15px; padding: 11px 12px; }
  [data-ny05-home] .settings-account-r374-profile-summary > .settings-account-r5-avatar-preview { flex: 0 0 56px; width: 56px; height: 56px; }
  [data-ny05-home] .settings-account-r374-profile-meta { display: grid; gap: 3px; flex: 1 1 auto; min-width: 0; }
  [data-ny05-home] .settings-account-r374-profile-name { font-size: 14px; line-height: 20px; color: #eff6ff; overflow-wrap: anywhere; }
  [data-ny05-home] .ny05-profile-phone { font-size: 12px; line-height: 16px; color: #d0e0ef; }
  [data-ny05-home] .settings-account-r374-profile-bio { font-size: 11px; line-height: 15px; color: var(--ny05-muted); }
  [data-ny05-home] .settings-account-r374-profile-edit-btn { flex: 0 0 auto; font-size: 10px; padding: 7px 8px; border-radius: 5px; color: #cfdfef; background: rgba(38, 91, 133, .28); border: 1px solid var(--ny05-line); }
  [data-ny05-home] .settings-account-r374-entry-summary { min-height: 39px; padding: 8px 12px; gap: 10px; background: transparent; width: 100%; border: 0; border-radius: 6px; color: #e8f2fc; text-align: left; box-sizing: border-box; }
  [data-ny05-home] .settings-account-r374-entry-text strong,
  [data-ny05-home] .settings-account-r374-entry-title strong { font-size: 13px; font-weight: 500; color: #e8f2fc; }
  [data-ny05-home] .settings-account-r374-entry-summary small,
  [data-ny05-home] .settings-account-r374-entry-title > span { display: none; }
  [data-ny05-home] .settings-account-r374-entry-ico { background: none; border-radius: 0; width: 20px; height: 20px; }
  [data-ny05-home] .settings-account-r374-entry-chev { margin-left: auto; color: #a0b8ce; font-size: 0; width: 14px; height: 18px; background: currentColor; mask: url(../assets/ui/icons/lucide-chevron-right.svg) center / contain no-repeat; }
  [data-ny05-home] [data-personal-entry-r374="usage_log"] { margin-bottom: calc(-1 * var(--ny05-gap)); border-bottom: 0; border-radius: var(--ny05-radius) var(--ny05-radius) 0 0; }
  [data-ny05-home] [data-personal-entry-r374="subscription"] { border-radius: 0 0 var(--ny05-radius) var(--ny05-radius); }
  [data-ny05-home] [data-personal-entry-r374="usage_log"] > button,
  [data-ny05-home] [data-personal-entry-r374="subscription"] > button { min-height: 33px; padding-top: 5px; padding-bottom: 5px; }
  [data-ny05-home] .ny05-api-preview[open] > summary { border-bottom: 1px solid var(--ny05-line); }
  [data-ny05-home] .ny05-api-preview[open] > summary .settings-account-r374-entry-chev { transform: rotate(-90deg); }
  [data-ny05-home] .ny05-api-content { padding: 10px 14px 8px; }
  [data-ny05-home] .ny05-api-content h3 { font-size: 12px; line-height: 18px; margin: 0 0 4px; color: #d5e6f5; font-weight: 500; }
  [data-ny05-home] .ny05-api-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 8px; }
  [data-ny05-home] .ny05-api-grid button { min-height: 30px; min-width: 0; border: 1px solid rgba(97, 151, 191, .25); border-radius: 7px; padding: 5px 8px; color: #d3e7f8; background: rgba(30, 75, 110, .35); font-size: 10px; text-align: left; }
  [data-ny05-home] .ny05-icon { display: inline-block; width: 20px; height: 20px; flex: 0 0 20px; vertical-align: middle; background: currentColor; mask: var(--ny05-icon) center / contain no-repeat; }
  [data-ny05-home] .ny05-api-grid button { display: flex; align-items: center; gap: 10px; }
  [data-ny05-home] .ny05-api-grid .ny05-icon { width: 16px; height: 16px; flex-basis: 16px; }
  [data-ny05-home] .ny05-empty-illustration { display: grid; place-items: center; width: 51px; height: 51px; border: 1px solid var(--ny05-line); border-radius: 50%; background: rgba(19, 64, 99, .2); margin-bottom: 4px; color: #b9e1ff; }
  [data-ny05-home] .ny05-empty-illustration .ny05-icon { width: 27px; height: 27px; }
  [data-ny05-home] .ny05-logout .ny05-icon { width: 16px; height: 16px; margin-right: 9px; }
  [data-ny05-home] .settings-account-r374-profile-edit-btn::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 5px; vertical-align: -2px; background: currentColor; mask: url(../assets/ui/icons/lucide-pencil.svg) center / contain no-repeat; }
  [data-ny05-home] .ny05-api-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 142px; gap: 5px; padding: 12px 0 0; }
  [data-ny05-home] .ny05-api-empty > strong { font-size: 13px; font-weight: 500; color: #e9f3ff; }
  [data-ny05-home] .ny05-api-empty p { margin: 0; color: var(--ny05-muted); font-size: 10px; }
  [data-ny05-home] .ny05-api-empty button { color: white; min-height: 30px; border: 1px solid #2873ea; border-radius: 6px; background: linear-gradient(115deg, #0095ff, #0059e6); padding: 5px 16px; font-size: 12px; }
  [data-ny05-home] .ny05-api-empty small { color: var(--ny05-muted); font-size: 10px; }
  [data-ny05-home] .ny05-theme { display: flex; align-items: center; min-height: 39px; padding: 5px 12px; gap: 10px; }
  [data-ny05-home] .ny05-theme > strong { flex: 1 1 auto; font-size: 13px; font-weight: 500; }
  [data-ny05-home] .ny05-theme > div { display: flex; gap: 2px; }
  [data-ny05-home] .ny05-theme button { padding: 4px 10px; min-height: 28px; font-size: 11px; color: #c4d6e8; border: 1px solid transparent; border-radius: 6px; background: transparent; }
  [data-ny05-home] .ny05-theme button[aria-pressed="true"] { background: linear-gradient(110deg,#008dfc,#0059df); color: white; border-color: #2f81ed; }
  [data-ny05-home] .ny05-logout { min-height: 37px; margin: 0; width: 100%; border: 1px solid var(--ny05-line) !important; border-radius: var(--ny05-radius) !important; color: #f47772; background: rgba(48, 37, 54, .35); font-size: 12px; }
  [data-ny05-home] .ny05-extras[open] > summary { margin-bottom: var(--ny05-gap); border-bottom: 1px solid var(--ny05-line); }
  [data-ny05-home] .ny05-extras > .settings-account-r374-entry { margin: 0 var(--ny05-gap) var(--ny05-gap); }
  [data-ny05-home] .ny05-api-preview > summary .settings-account-r374-entry-text { display: flex; align-items: baseline; gap: 7px; }
  [data-ny05-home] .ny05-api-preview > summary small { display: inline; color: var(--ny05-muted); font-size: 10px; }
  [data-ny05-home] .settings-account-r374-entry-body,
  [data-ny05-home] .settings-account-r374-profile-edit { padding: 12px; }
  [data-ny05-home] button:focus-visible, [data-ny05-home] summary:focus-visible { outline: 2px solid #69b6ff; outline-offset: 2px; }
  html[data-meifan-theme="day"] [data-ny05-home] { --ny05-line: #d2deda; --ny05-surface: #fff; --ny05-muted: #647774; }
  html[data-meifan-theme="day"] [data-ny05-home] .ny05-header h1,
  html[data-meifan-theme="day"] [data-ny05-home] .settings-account-r374-profile-name,
  html[data-meifan-theme="day"] [data-ny05-home] .settings-account-r374-entry-text strong,
  html[data-meifan-theme="day"] [data-ny05-home] .settings-account-r374-entry-title strong,
  html[data-meifan-theme="day"] [data-ny05-home] .ny05-api-empty strong,
  html[data-meifan-theme="day"] [data-ny05-home] .ny05-theme > strong,
  html[data-meifan-theme="day"] [data-ny05-home] .ny05-extras > .settings-account-r374-entry-summary { color: #233b36; }
  html[data-meifan-theme="day"] [data-ny05-home] .ny05-header > button { background: transparent !important; color: #47605a !important; border: 0 !important; box-shadow: none !important; }
  html[data-meifan-theme="day"] [data-ny05-home] .ny05-header > button,
  html[data-meifan-theme="day"] [data-ny05-home] .ny05-profile-phone,
  html[data-meifan-theme="day"] [data-ny05-home] .ny05-api-content h3 { color: #47605a; }
  html[data-meifan-theme="day"] #settings [data-ny05-home] :is(.settings-account-r3-body,[data-settings-account-r3-personal],.settings-account-r5-layout,[data-settings-account-r7-personal-main],[data-settings-account-r5-account-settings]) { padding: 0 !important; margin: 0 !important; border: 0 !important; background: transparent !important; box-shadow: none !important; }
  html[data-meifan-theme="day"] #settings [data-ny05-home] .ny05-logout { border: 1px solid var(--ny05-line) !important; border-radius: var(--ny05-radius) !important; }
  html[data-meifan-theme="day"] #settings [data-ny05-home] .settings-account-r374-profile-card { border: 1px solid var(--ny05-line) !important; border-radius: var(--ny05-radius) !important; background: var(--ny05-surface) !important; }
  html[data-meifan-theme="day"] [data-ny05-home] .settings-account-r374-entry,
  html[data-meifan-theme="day"] [data-ny05-home] .settings-account-r374-profile-card { box-shadow: none; }
  html[data-meifan-theme="day"] [data-ny05-home] > .settings-account-r3-nav,
  html[data-meifan-theme="day"] [data-ny05-home] .ny05-api-grid button { background: #edf3f1; color: #29413b; }
}
/* CMD1051: the approved hand drawing has exactly two aligned rows.
   The existing account entry is retained beside the title, outside the drawing.
   No business nodes are moved; the first wrapper participates through contents. */
html[data-meifan-theme] body.home-mode .topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  grid-template-rows: auto auto;
  column-gap: 8px;
  row-gap: 8px;
  align-items: center;
  min-height: 0 !important;
}
html[data-meifan-theme] body.home-mode .topbar > div:first-child { display: contents; }
html[data-meifan-theme] body.home-mode .topbar > div:first-child::before { display: none; }
html[data-meifan-theme] body.home-mode .topbar h1 {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  max-width: none;
  white-space: nowrap;
}
html[data-meifan-theme] body.home-mode .topbar #pageSubtitle {
  grid-column: 1 / 3;
  grid-row: 2;
  min-width: 0;
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
}
html[data-meifan-theme] body.home-mode .topbar .home-theme-toggle {
  grid-column: 3 / 5;
  grid-row: 1;
  justify-self: end;
  position: static;
  top: auto !important;
  right: auto !important;
  margin: 0;
  white-space: nowrap;
}
html[data-meifan-theme] body.home-mode .topbar .home-theme-toggle {
  gap: 6px;
  padding: 4px 8px;
  cursor: default;
}
html[data-meifan-theme] body.home-mode .topbar .home-theme-toggle > button {
  min-height: 28px;
  height: 28px;
  padding: 0 6px;
  margin: 0;
  font: inherit;
  line-height: 1;
  white-space: nowrap;
}
html[data-meifan-theme] body.home-mode .topbar #globalNoticeButton {
  grid-column: 3;
  grid-row: 2;
}
html[data-meifan-theme] body.home-mode .topbar #userNotificationsButton {
  grid-column: 4;
  grid-row: 2;
}
html[data-meifan-theme] body.home-mode .topbar :is(#globalNoticeButton, #userNotificationsButton) {
  position: relative;
  min-width: 0;
  min-height: 28px;
  height: 28px;
  padding: 0 8px;
  margin: 0;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
  justify-self: end;
  gap: 3px;
}
html[data-meifan-theme] body.home-mode .topbar #userNotificationsButton svg { display: none; }
html[data-meifan-theme] body.home-mode .topbar .account-ux-menu-anchor-r49a {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  margin: 0;
}
@media (max-width: 820px) {
  html[data-meifan-theme] body.home-mode .topbar { column-gap: 5px; }
  html[data-meifan-theme] body.home-mode .topbar h1 { font-size: 23px; }
  html[data-meifan-theme] body.home-mode .topbar #pageSubtitle { font-size: 11px; }
  html[data-meifan-theme] body.home-mode .topbar .home-theme-toggle {
    min-width: 0;
    padding: 4px 6px;
    font-size: 11px;
  }
  html[data-meifan-theme] body.home-mode .topbar :is(#globalNoticeButton, #userNotificationsButton) {
    padding: 0 5px;
    font-size: 11px;
  }
  html[data-meifan-theme] body.home-mode .topbar .home-account-badge {
    position: relative;
    top: auto;
    right: auto;
    min-width: 30px;
    min-height: 30px;
    padding: 2px;
  }
  html[data-meifan-theme] body.home-mode .topbar .home-account-avatar { width: 26px; height: 26px; }
  html[data-meifan-theme] body.home-mode .topbar .home-account-badge > span + span { display: none; }
}
/* ===== 内容营销页 · 手机页头紧凑三行(张工 2026-11-11 九件一次答⑧; 总指挥令 CMD-V17-20261105-1420 册头 e、CMD-1421 第 1 条 a–f) =====
   范围: 只在「手机宽度(≤760, 与工坊区同一个断点) + body.marketing-mode」生效; 不改任何全站文件, 这里只做覆盖。
   定稿 REN-M-SHOTS(折算 390 宽, 去掉手机系统状态栏约 29): 返回行约 10–25 / 标题 34–55 / 两工坊切换 58–84 / 项目条顶 89。
   第一行: 01/04/05/结果 =「‹ 返回××」(15 号渲染 .mkt-m-back) + 右侧「通知」「营销项目库」; 03 = 品牌行(现役顶条品牌), 这两个钮在标题行右侧。
   公告: 不显示(回首页后可见)。通知: 压小保留, 未读角标照旧。「返回主页」不出(回首页走底栏「更多 → 首页」)。底部一级目录不动(现役 56)。
   高度钉死: 标题行固定 21 高, 里面再多出什么元素(例如登录后的)也只会自己溢出, 不推动下面各行——「返回××」是按固定偏移提到第一行的, 依赖这一点。 */

@media (max-width:760px){
  /* U28 CMD-1429: 内容营销页现在有副标题(桌面定稿有)；手机定稿页头没有这一行, 不显示 */
  body.marketing-mode:not(.home-mode) .main > .topbar #pageSubtitle { display:none; }
  /* —— 外层: 页头不再是一张卡; 标题行定高 —— */
  /* 外层网格(顶条品牌行｜正文)在手机是上下两行: 正文比一屏短时, 浏览器会把多出来的高度平分给两行, 品牌行被撑高、标题被推下去。
     这里把第一行钉成内容高, 多出来的高度都给正文那一行 */
  html[data-meifan-theme] body.marketing-mode:not(.home-mode) .app-shell { grid-template-rows:auto minmax(0, 1fr); }
  html[data-meifan-theme] body.marketing-mode:not(.home-mode) .main { position:relative; padding-top:8px; }
  html[data-meifan-theme] body.marketing-mode:not(.home-mode) .main > .topbar {
    position:static; display:flex; flex-direction:row; flex-wrap:nowrap; align-items:center; gap:6px;
    padding:0; margin:0 0 3px; border:0; border-radius:0 !important; background:transparent; box-shadow:none;
    -webkit-backdrop-filter:none; backdrop-filter:none; height:21px; min-height:0; overflow:visible;
  }
  html[data-meifan-theme] body.marketing-mode:not(.home-mode) .main > .topbar > div:first-child { flex:1 1 auto; min-width:0; }
  html[data-meifan-theme] body.marketing-mode:not(.home-mode) .main > .topbar #pageTitle { font-size:18px !important; line-height:21px; font-weight:650; margin:0; white-space:nowrap; }
  /* 「返回主页」、公告在手机不出 */
  html[data-meifan-theme] body.marketing-mode:not(.home-mode) .main > .topbar #topActions,
  html[data-meifan-theme] body.marketing-mode:not(.home-mode) .main > .topbar #globalNoticeButton { display:none; }
  /* 通知: 28 高小钮, 脱离标题行、放到「营销项目库」左边(同一行); 点击热区用伪元素上下各扩到 36; 角标不裁 */
  html[data-meifan-theme] body.marketing-mode:not(.home-mode) .main > .topbar #userNotificationsButton {
    position:absolute; right:107px; top:8px; z-index:2; min-width:0; width:auto; min-height:28px; height:28px; padding:0 9px; font-size:12px; line-height:26px; border-radius:8px; margin:0; overflow:visible;
  }
  /* 通知钮只留铃铛与未读数; 「通知」两个字在视觉上收起(读屏仍读得到), 免得未读数位数多时钮向左长、碰到「‹ 返回××」 */
  html[data-meifan-theme] body.marketing-mode:not(.home-mode) .main > .topbar #userNotificationsButton > span:not([data-user-notif-count]) { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
  html[data-meifan-theme] body.marketing-mode:not(.home-mode) .main > .topbar #userNotificationsButton::after { content:""; position:absolute; left:0; right:0; top:-5px; bottom:-5px; }

  /* —— 两工坊切换: 左右两半的分段条(26 高), 点击热区上下各扩 5 到 36 —— */
  html[data-meifan-theme] body.marketing-mode:not(.home-mode) #marketingSubTabs {
    gap:0; margin:0 0 5px !important; padding:0; flex-wrap:nowrap; align-items:stretch; box-sizing:border-box; height:26px;
    border:1px solid rgba(42,133,255,.45); border-radius:8px; overflow:visible;
  }
  html[data-meifan-theme] body.marketing-mode:not(.home-mode) #marketingSubTabs > [data-content-marketing-workspace-entry] {
    position:relative; z-index:1; flex:1 1 0; min-width:0; min-height:24px !important; height:24px; padding:0 6px !important; font-size:13px; line-height:22px;
    white-space:nowrap; text-align:center; justify-content:center; border:0 !important; border-radius:7px !important; box-shadow:none !important;
  }
  html[data-meifan-theme] body.marketing-mode:not(.home-mode) #marketingSubTabs > [data-content-marketing-workspace-entry]::after { content:""; position:absolute; left:0; right:0; top:-6px; bottom:-6px; }

  /* —— 营销项目库: DOM 不挪(仍在切换条里), 视觉上提到右上; 26 高, 热区上下各扩到 36 —— */
  html[data-meifan-theme] body.marketing-mode:not(.home-mode) #marketingSubTabs > #marketingVideoOutputLibraryButton {
    position:absolute; right:14px; top:9px; z-index:2; min-height:26px !important; height:26px; padding:0 10px !important; font-size:12.5px; line-height:24px; white-space:nowrap; border-radius:8px !important;
  }
  html[data-meifan-theme] body.marketing-mode:not(.home-mode) #marketingSubTabs > #marketingVideoOutputLibraryButton::after { content:""; position:absolute; left:0; right:0; top:-6px; bottom:-6px; }

  /* —— 第一行有「返回」的各步(01/04/05/结果): 顶条品牌行不出, 让出第一行; 标题行在第一行之下 —— */
  html[data-meifan-theme] body.marketing-mode:not(.home-mode):has(.mkt-m-back) .app-shell > .sidebar { display:none; }
  html[data-meifan-theme] body.marketing-mode:not(.home-mode):has(.mkt-m-back) .main { padding-top:34px; }
  html[data-meifan-theme] body.marketing-mode:not(.home-mode):has(.mkt-m-back) #marketingSubTabs > #marketingVideoOutputLibraryButton { top:5px; }
  html[data-meifan-theme] body.marketing-mode:not(.home-mode):has(.mkt-m-back) .main > .topbar #userNotificationsButton { top:4px; }
  body.marketing-mode:not(.home-mode) #marketing .mkt-m-back {
    display:inline-flex; align-items:center; position:absolute; left:0; top:-89px; z-index:2; height:36px; min-height:36px !important; padding:0 8px 0 0 !important;
    font-size:14px; line-height:1; white-space:nowrap; background:transparent !important; border:0 !important; box-shadow:none !important; border-radius:0 !important;
    -webkit-backdrop-filter:none !important; backdrop-filter:none !important; color:inherit;
  }
  /* 「返回××」的定位容器是工坊宿主(.aile-host, 它的顶就是工坊面板的顶)——不能用它的父元素 .aile-flow:
     15 号有条件地在 .aile-flow 前面插迁移提示／同名冲突横幅, 横幅出现时 .aile-flow 会下移, 返回钮不能跟着下移。
     页头各行高度由本分片定死(标题顶 34、高 21; 切换 58–84; 工坊面板顶 89), 所以用 -89 把它提到第一行 */
  body.marketing-mode:not(.home-mode) #marketing .aile-host { position:relative; }
  body.marketing-mode:not(.home-mode) #marketing .aile-flow { position:static; }
  /* 工坊面板(内容营销专用元素)自身裁切溢出, 「返回××」提到面板之上会被裁掉; 只在这里放开 */
  body.marketing-mode:not(.home-mode) #marketing #mkt-tab-canvas .ops-comfy-panel.aile-flow-active { overflow:visible; }

  /* —— 没有「返回」的步(03): 保留品牌行并压紧; 通知与营销项目库在标题行右侧; 标题行与切换条之间留出热区 —— */
  html[data-meifan-theme] body.marketing-mode:not(.home-mode):not(:has(.mkt-m-back)) .app-shell > .sidebar { padding:6px 12px; min-height:0; }
  html[data-meifan-theme] body.marketing-mode:not(.home-mode):not(:has(.mkt-m-back)) .main > .topbar { margin-bottom:12px; }
  html[data-meifan-theme] body.marketing-mode:not(.home-mode):not(:has(.mkt-m-back)) #marketingSubTabs > #marketingVideoOutputLibraryButton { top:5px; }
  html[data-meifan-theme] body.marketing-mode:not(.home-mode):not(:has(.mkt-m-back)) .main > .topbar #userNotificationsButton { top:4px; }
  /* 很窄的屏(≤360): 第一行再收一点, 给「‹ 返回××」与通知未读数留出间隔 */
  @media (max-width:360px){
    html[data-meifan-theme] body.marketing-mode:not(.home-mode) .main > .topbar #userNotificationsButton { padding:0 5px; }
    html[data-meifan-theme] body.marketing-mode:not(.home-mode) #marketingSubTabs > #marketingVideoOutputLibraryButton { padding:0 7px !important; }
    body.marketing-mode:not(.home-mode) #marketing .mkt-m-back { font-size:13px; }
  }
}
/* Read-only governance announcements in the existing workspace. */
.platform-admin-b1-shell .platform-gov-notices-r1 { position: relative; }
.platform-admin-b1-shell .platform-gov-notices-toggle { display: inline-flex; align-items: center; gap: 8px; }
.platform-admin-b1-shell .platform-gov-notices-toggle > span { min-width: 1.5em; text-align: center; }
.platform-admin-b1-shell .platform-gov-notices-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; width: min(360px, calc(100vw - 32px)); max-height: 65vh; overflow: auto; padding: 16px; background: var(--surface-strong, var(--panel-bg)); border: 1px solid var(--line); border-radius: 12px; }
.platform-admin-b1-shell .platform-gov-notices-panel[hidden] { display: none; }
.platform-admin-b1-shell .platform-gov-notices-panel header { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.platform-admin-b1-shell .platform-gov-notices-panel ul { margin: 12px 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.platform-admin-b1-shell .platform-gov-notices-panel li button { width: 100%; text-align: left; overflow-wrap: anywhere; }
.platform-admin-b1-shell .platform-gov-notice-body { margin-top: 16px; overflow-wrap: anywhere; }
.platform-admin-b1-shell .platform-admin-b3-notice-full p { white-space: pre-wrap; overflow-wrap: anywhere; }

.platform-admin-b1-shell .platform-gov-notice-meta { display: block; margin-top: 6px; color: var(--muted); line-height: 1.6; overflow-wrap: anywhere; }
/* Read-only governance surfaces, within the existing platform workspace only. */
.platform-admin-b1-shell .platform-internal-jobs-r1 { display: grid; gap: 16px; min-width: 0; }
.platform-admin-b1-shell .platform-internal-jobs-r1 header,
.platform-admin-b1-shell .platform-internal-jobs-r1 nav { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.platform-admin-b1-shell .platform-internal-jobs-r1 table { width: 100%; border-collapse: collapse; }
.platform-admin-b1-shell .platform-internal-jobs-r1 :is(th, td) { padding: 10px; text-align: left; overflow-wrap: anywhere; border-bottom: 1px solid var(--line); }
.platform-admin-b1-shell .platform-internal-jobs-detail { padding: 16px; border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.platform-admin-b1-shell .platform-internal-jobs-r1 dl { display: grid; grid-template-columns: minmax(90px, auto) minmax(0, 1fr); gap: 8px 16px; }
.platform-admin-b1-shell .platform-internal-jobs-r1 dd { margin: 0; overflow-wrap: anywhere; }
.platform-admin-b1-shell .platform-internal-jobs-r1 :is(img, video) { display: block; max-width: 100%; max-height: 60vh; margin-top: 12px; }
@media (max-width: 640px) {
  .platform-admin-b1-shell .platform-internal-jobs-r1 table { display: block; overflow: auto; }
  .platform-admin-b1-shell .platform-internal-jobs-r1 dl { grid-template-columns: 1fr; }
}
/* U28 内容营销·桌面外壳(张工 2026-11-11 20:35 桌面还原令；总指挥令 CMD-1429 第 1 条；定稿 REN-D-SOURCE／VIDEO／SHOTS／COMPOSE／RESULT 的页头与切换行)
   范围: 只在「桌面宽度(≥761) + body.marketing-mode 且非首页」生效; 不改任何全站文件, 这里只做覆盖。左侧一级目录栏是全站共用的, 这里一条也不碰。
   页头: 去掉大卡, 留标题与副标题; 右上只留铃铛(通知)与「营销项目库」; 「返回主页」「公告」不显示(左栏有首页; 公告与手机同口径)。
   切换行: 一条通栏, 左边两个页签, 右边「营销项目」(15 号已有的项目条, 点开是现役选项目弹窗)与「已保存」(15 号给的真状态, 存稿没核实成功就不出)。
   「营销项目库」钮的 DOM 仍在 #marketingSubTabs 里(现役检查锁它的父节点), 只是视觉上提到右上。
   A3(总指挥令 CMD-1561；预案 19b360bf)：钮提到页头后落在 header.topbar(全局 z-index 30)的盒子里，二者同一层叠上下文，钮 z-index auto，
   普通点击被 topbar 接走(V5.3 在 N 上 1585×992 观察)。钮加 z-index:31 压过 topbar；不降 topbar、不加 pointer-events:none(会影响铃铛)。
   铃铛通知面板挂在 body 下、z-index 约 21 亿，不受影响。 */
@media (min-width:761px){
  body.marketing-mode:not(.home-mode) .main > .topbar { position:relative; top:auto; align-items:flex-start; justify-content:flex-start; gap:12px; box-sizing:border-box; min-height:58px; height:58px; padding:0 2px; margin-bottom:16px; border:0; border-radius:0; background:none; box-shadow:none; -webkit-backdrop-filter:none; backdrop-filter:none; }
  body.marketing-mode:not(.home-mode) .main > .topbar #pageTitle { font-size:var(--mf-font-title) !important; line-height:34px !important; margin:0 0 4px; }
  body.marketing-mode:not(.home-mode) .main > .topbar #pageSubtitle { font-size:var(--mf-font-body) !important; line-height:20px !important; margin:0; white-space:nowrap; }
  body.marketing-mode:not(.home-mode) .main > .topbar #topActions { display:none; }
  body.marketing-mode:not(.home-mode) .main > .topbar #globalNoticeButton { display:none; }
  body.marketing-mode:not(.home-mode) .main > .topbar #userNotificationsButton { position:absolute; right:206px; top:4px; box-sizing:border-box; width:52px; height:50px; min-height:50px; padding:0; display:inline-flex; align-items:center; justify-content:center; border-radius:10px; }
  body.marketing-mode:not(.home-mode) .main > .topbar #userNotificationsButton > span:not([data-user-notif-count]) { position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }
  body.marketing-mode:not(.home-mode) .main > .topbar #userNotificationsButton > svg { width:24px; height:24px; }
  body.marketing-mode:not(.home-mode) .main > .topbar #userNotificationsButton > [data-user-notif-count] { position:absolute; right:6px; top:6px; }
  body.marketing-mode:not(.home-mode) #marketing > #marketingSubTabs { position:relative; display:flex; align-items:center; gap:36px; box-sizing:border-box; height:60px; padding:0 30px; margin-bottom:14px !important; border:1px solid var(--mkt-card-line, rgba(126,211,242,.24)); border-radius:12px; background:var(--mkt-card-bg, rgba(15,30,38,.35)); }
  body.marketing-mode:not(.home-mode) #marketing > #marketingSubTabs > button:not(#marketingVideoOutputLibraryButton) { box-sizing:border-box; height:58px; min-height:58px; padding:0 18px; font-size:var(--mf-font-tab); background:transparent !important; border:0 !important; border-bottom:3px solid transparent !important; border-radius:0; box-shadow:none !important; }
  body.marketing-mode:not(.home-mode) #marketing > #marketingSubTabs > button.selected:not(#marketingVideoOutputLibraryButton) { border-bottom-color:#2a85ff !important; }
  body.marketing-mode:not(.home-mode) #marketing > #marketingSubTabs > #marketingVideoOutputLibraryButton { position:absolute; right:0; top:-71px; box-sizing:border-box; width:190px; height:50px; min-height:50px; font-size:var(--mf-font-btn); border-radius:10px; z-index:31; }
  body.marketing-mode:not(.home-mode) #marketing #mkt-tab-canvas .aile-host { position:relative; }
  body.marketing-mode:not(.home-mode) #marketing #mkt-tab-canvas .mkt-projbar { display:flex; align-items:center; justify-content:flex-end; gap:12px; position:absolute; right:30px; top:-64px; width:520px; height:40px; z-index:2; font-size:var(--mf-font-body); }
  body.marketing-mode:not(.home-mode) #marketing #mkt-tab-canvas .mkt-projbar > span:first-child { flex:none; }
  body.marketing-mode:not(.home-mode) #marketing #mkt-tab-canvas .mkt-projbar > .mkt-projbar-btn { flex:0 1 258px; min-width:0; box-sizing:border-box; position:relative; height:40px; padding:0 38px 0 14px; text-align:left; font-size:var(--mf-font-body); border-radius:8px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  body.marketing-mode:not(.home-mode) #marketing #mkt-tab-canvas .mkt-projbar > .mkt-projbar-btn::after { content:""; position:absolute; right:15px; top:50%; width:8px; height:8px; margin-top:-7px; border-right:2px solid currentColor; border-bottom:2px solid currentColor; transform:rotate(45deg); opacity:.9; pointer-events:none; }
  body.marketing-mode:not(.home-mode) #marketing #mkt-tab-canvas .mkt-projbar > .mkt-saved { position:relative; display:inline-flex; align-items:center; gap:8px; flex:none; margin-left:20px; font-size:var(--mf-font-body); color:#2ee6b6; white-space:nowrap; }
  body.marketing-mode:not(.home-mode) #marketing #mkt-tab-canvas .mkt-projbar > .mkt-saved > .mkt-ico { display:none; }
  body.marketing-mode:not(.home-mode) #marketing #mkt-tab-canvas .mkt-projbar > .mkt-saved::before { content:""; flex:none; width:20px; height:20px; border-radius:50%; background:#19c29a; }
  body.marketing-mode:not(.home-mode) #marketing #mkt-tab-canvas .mkt-projbar > .mkt-saved::after { content:""; position:absolute; left:7px; top:50%; width:5px; height:9px; margin-top:-7px; border-right:2px solid #fff; border-bottom:2px solid #fff; transform:rotate(45deg); }
  /* 右下角全站悬浮助手球(定稿没有, 这轮不动它): 04「全部通过，进入合成」右侧让出它的位置 */
  body.marketing-mode:not(.home-mode) #marketing .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right > .mkt-pane-foot > .aile-api-actions:not(.aile-media-batch) { padding-right:72px; }
  body.marketing-mode:not(.home-mode) #marketing .mkt-edit-top[data-mkt-node="media"] .mkt-edit-right > .mkt-pane-foot > .aile-api-actions:not(.aile-media-batch) .aile-media-allpass { padding-left:8px; padding-right:8px; }
}
/* 工坊三栏的底边齐左栏底部(张工 2026-11-12 本人在复原岗窗指出: 定稿里功能板块基本齐平左侧栏底部。定稿七张三栏 248→942–950, 主题钮底 945)。
   原来三栏高度是「里面内容加起来多高就多高」, 五屏底边各不相同(素材 918／脚本 965／图片与视频 943／合成 919／结果 852)。
   现在三栏顶在 248, 底边「至少」到视口高−43——也就是左栏主题钮底往下 4(主题钮底＝视口高−47; 992 高时主题钮底 945、三栏底 949)。对齐的是主题钮底这条线, 不是视口底。
   用的是最小高度不是固定高度: 窗口够高时栏内不够的留白在栏底; 窗口矮、内容比这条线长时, 栏跟着内容长、整页照原来那样滚(不让内容溢出栏框)。脚本屏原本超出的 17 从两处块间距里收。只在 ≥981(左栏在左侧)生效。 */
@media (min-width:981px){
  body.marketing-mode:not(.home-mode) #marketing .aile-flow.mkt-edit-wrap > .mkt-edit-top { box-sizing:border-box; min-height:calc(100dvh - 291px); margin-top:-2px; }
  body.marketing-mode:not(.home-mode) #marketing .aile-flow.mkt-edit-wrap > .mkt-edit-top > * { min-height:0; }
  body.marketing-mode:not(.home-mode) #marketing .mkt-edit-top[data-mkt-node="script"] .aile-script-custom-wrap, body.marketing-mode:not(.home-mode) #marketing .mkt-edit-top[data-mkt-node="script"] .mkt-edit-center > .aile-flow-preview, body.marketing-mode:not(.home-mode) #marketing .mkt-edit-top[data-mkt-node="script"] textarea.aile-script-custom { min-height:0; }
  body.marketing-mode:not(.home-mode) #marketing .mkt-edit-top[data-mkt-node="script"] .aile-script-out { gap:4px; }
}
/* 全站外壳基础 r1（张工 2026-11-12 令③「设计变量→基础组件小批：第一批全站左栏与页头」；总指挥令 CMD-1468／1470；定稿 REN-D 七张的左栏）
   做法: 只在这里盖一层, 不改 01／02／09／42 等旧分片; 不动任何脚本。数值走下面的变量(设计变量页第一批), 日夜两套。
   变量块对全站可见但只有本分片的规则消费; 规则全部在「≥981 且非首页」内——≤980 的顶上四列、≤820 的底部六项栏、≤760、≤640 都不碰。
   日间: 定稿没有日间外壳图, 颜色保持现役日间主题(深墨绿左栏＋金色标记), 只跟几何。 */
:root {
  /* 颜色·夜间(默认) */
  --mf-shell-nav-ink: var(--muted);
  --mf-shell-nav-selected-bg: #0f4efe;
  --mf-shell-nav-selected-ink: var(--ink);
  --mf-shell-nav-selected-mark: none;
  --mf-shell-nav-selected-dot: #ffffff;
  --mf-shell-nav-hover-bg: rgba(15, 78, 254, 0.20);
  --mf-shell-nav-hover-mark: none;
  --mf-shell-accent: #0f4efe;
  --mf-ctl-disabled-ink: rgba(198, 224, 235, 0.40);
  /* 圆角(日夜同) */
  --mf-radius-control: 12px;
  --mf-radius-nav-item: 12px;
  --mf-radius-card: 14px;
  --mf-radius-modal: 18px;
  --mf-radius-pill: 999px;
  /* 尺寸与间距(日夜同) */
  --mf-shell-nav-item-h: 44px;
  --mf-shell-nav-item-gap: 4.6px;
  --mf-shell-nav-inset-l: 13px;
  --mf-shell-nav-inset-r: 11px;
  --mf-space-1: 4px;
  --mf-space-2: 8px;
  --mf-space-3: 12px;
  --mf-space-4: 16px;
  --mf-space-5: 20px;
  --mf-space-6: 24px;
  /* 字号(日夜同) */
  --mf-font-title: 28px;
  --mf-font-tab: 19px;
  --mf-font-btn: 17px;
  --mf-font-body: 15px;
  --mf-font-small: 13px;
}
html[data-meifan-theme="day"] {
  /* 颜色·日间: 取现役日间主题的值, 不引入夜间的壳蓝 */
  --mf-shell-nav-ink: rgba(233, 239, 233, 0.85);
  --mf-shell-nav-selected-bg: rgba(255, 255, 255, 0.07);
  --mf-shell-nav-selected-ink: rgba(233, 239, 233, 0.85);
  --mf-shell-nav-selected-mark: inset 3px 0 0 #b8863b;
  --mf-shell-nav-selected-dot: #b8863b;
  --mf-shell-nav-hover-bg: rgba(255, 255, 255, 0.07);
  --mf-shell-nav-hover-mark: inset 3px 0 0 #b8863b;
  --mf-shell-accent: var(--green);
  --mf-ctl-disabled-ink: rgba(75, 84, 80, 0.45);
}
@media (min-width: 981px) {
  /* 栏宽: 网格列与 --mf-sidebar-width 一起改(后者被弹窗避让左栏的规则消费) */
  body:not(.home-mode) { --mf-sidebar-width: 239px; }
  body:not(.home-mode) .app-shell { grid-template-columns: var(--mf-sidebar-width) minmax(0, 1fr); }
  /* 左栏几何(定稿 1585×992: 品牌标 L21 T20; 九项首项顶 91、行高 44、顶到顶约 48.6(91→480 共八档)、选中条 L13–R227; 账号卡 16–226×814–877; 主题钮 30–217×902–945) */
  body:not(.home-mode) .app-shell > .sidebar { padding: 12px 0 47px; gap: 0; }
  body:not(.home-mode) .app-shell > .sidebar > .brand { width: auto; margin: 0 var(--mf-shell-nav-inset-r) 0 var(--mf-shell-nav-inset-l); }
  body:not(.home-mode) .app-shell > .sidebar > .nav-list { margin: 21px var(--mf-shell-nav-inset-r) 0 var(--mf-shell-nav-inset-l); gap: var(--mf-shell-nav-item-gap); align-content: start; }
  body:not(.home-mode) .app-shell > .sidebar .nav-item { box-sizing: border-box; height: var(--mf-shell-nav-item-h); min-height: var(--mf-shell-nav-item-h); padding: 0 14px 3px; border-radius: var(--mf-radius-nav-item); font-size: var(--mf-font-body); }
  body:not(.home-mode) .app-shell > .sidebar > .sidebar-account { box-sizing: border-box; width: auto; min-height: 64px; margin: auto 12px 0 16px; }
  body:not(.home-mode) .app-shell > .sidebar > .sidebar-theme-toggle { box-sizing: border-box; min-height: 44px; margin: 25px 21px 0 30px; }
  /* 左栏各态。夜间: 选中是整条实心蓝; 日间经变量保持现役(浅底＋金线)。 */
  html body:not(.home-mode) .app-shell > .sidebar .nav-item { color: var(--mf-shell-nav-ink); }
  html body:not(.home-mode) .app-shell > .sidebar .nav-item:hover { background: var(--mf-shell-nav-hover-bg); box-shadow: var(--mf-shell-nav-hover-mark); }
  html body:not(.home-mode) .app-shell > .sidebar .nav-item.active,
  html body:not(.home-mode) .app-shell > .sidebar .nav-item.active:hover { background: var(--mf-shell-nav-selected-bg); box-shadow: var(--mf-shell-nav-selected-mark); color: var(--mf-shell-nav-selected-ink); }
  html body:not(.home-mode) .app-shell > .sidebar .nav-item.active::before { background: var(--mf-shell-nav-selected-dot); }
  html body:not(.home-mode) .app-shell > .sidebar .nav-item:focus-visible { outline: 2px solid var(--mf-focus-ring, rgba(112, 220, 246, 0.7)); outline-offset: 2px; }
  /* 禁用: 只是样子(现役没有被禁用的目录项, 没权限的项是不显示); 不拦点击、不改权限 */
  html body:not(.home-mode) .app-shell > .sidebar .nav-item[aria-disabled="true"],
  html body:not(.home-mode) .app-shell > .sidebar .nav-item[aria-disabled="true"]:hover { color: var(--mf-ctl-disabled-ink); background: transparent; box-shadow: none; cursor: not-allowed; }
}

/* ===== 99_ai_board_frame_r1：AI 画板外框底留白(张工令 2026-11-12 先外框) =====
   画板根的高度由 72 号脚本按「视口高 − 底留白 − 画板顶」算；底留白从这里读。定稿(AI 画板二级页，原图 1619×971)最外层卡底坐标 957，留白 14。
   只在桌面(≥981)、非首页；≤980 脚本本来就不设高度。读不到这个变量时脚本用原来的 23。
   r2(U31 装后 V5.3 原生量出整页多 8 可滚)：画板根下面还有全站 main 的下内边距 22，14＋22 超出视口 8。
   只在画板页签显示时把 main 的下内边距收为 14，使画板根底正好在视口高−14、整页不滚；别的页面 main 不变。 */
@media (min-width: 981px) {
  body:not(.home-mode) #ai-tab-ai-board [data-adb-root] { --mf-frame-bottom-gap: 14px; }
  body:not(.home-mode) .main:has(> #ai.view.active > #ai-tab-ai-board:not(.hidden) [data-adb-root]) { padding-bottom: 14px; }
}

/* ===== 99_ai_d01_frame_r1：AI 设计师·图片生成(AD-D01)外框——先外框后块内(张工令 2026-11-12) =====
   只在桌面(≥981)、非首页、且生图画布处于图片生成态(.is-d01-image)时生效；视频、局部优化、旧节点视图与手机不碰。
   做了什么：
   1) 三栏上方收成一条带：项目下拉并进「图片生成｜视频生成｜局部优化」那一行；面板头的标题与说明视觉隐藏(仍在页面里)，
      那排钮(检查节点／保存草稿／生成候选草稿／读取草稿)保留——≥1500 宽时排到同一条带的右端，窄于 1500 时压成单行留在上面。
   2) 三栏外面那层大面板在这一态下不再画描边、底色、阴影，收掉内边距(上 16 除外)，三栏卡自己成为最外层卡片(定稿如此)。
      日间主题那条 22 内边距与面板描边阴影带 !important，这里同样带 !important 才压得住。
   3) 三栏底钉线(≥1121，三栏并排时才钉；≤1120 结果栏换到下一行，不钉)：栏高＝视口高−三栏顶−留白，
      留白取本屏定稿值 41(变量 --mf-frame-bottom-gap)；下限 520，栏内各自滚动。
      三栏顶是常数(变量 --mf-ad-d01-top)：夜间 250.2，日间 252.6(全站页头日间高 2.4，归全站页头卡)；
      1121–1499 宽取 300(那时三栏顶约 283–292，底不钉死，只保证不低于留白线)。
   不动任何脚本、不动旧分片；钮一个不少。 */
@media (min-width: 981px) {
  body:not(.home-mode) #ai-tab-generate .aigen-node-panel:has(> .aigen-product-shell.is-d01-image) { padding: 16px 0 0 !important; margin-bottom: 0; border-color: transparent !important; background: none !important; box-shadow: none !important; backdrop-filter: none; }
  body:not(.home-mode) #ai-tab-generate .aigen-node-panel:has(> .aigen-product-shell.is-d01-image)::before, body:not(.home-mode) #ai-tab-generate .aigen-node-panel:has(> .aigen-product-shell.is-d01-image)::after { content: none; }
  body:not(.home-mode) #ai-tab-generate .aigen-node-panel:has(> .aigen-product-shell.is-d01-image) > .panel-head > div:first-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  body:not(.home-mode) #ai-tab-generate .aigen-product-shell.aigen-remodel-shell.is-d01-image { column-gap: 12px; padding: 0; margin: 0; border: 0; }
  body:not(.home-mode) #ai-tab-generate .is-d01-image > .aigen-d01-toolbar { display: contents; }
  body:not(.home-mode) #ai-tab-generate .is-d01-image > .aigen-d01-toolbar > .aigen-d01-tabs { grid-area: d01tabs; align-self: center; margin: 0 0 14px; }
  body:not(.home-mode) #ai-tab-generate .is-d01-image > .aigen-d01-toolbar > :not(.aigen-d01-tabs) { grid-area: d01tools; align-self: center; margin: 0 0 14px; }
  body:not(.home-mode) #ai-tab-generate .is-d01-image > .aigen-canvas-project-bar { grid-area: project; align-self: center; width: 300px; min-height: 0; height: 39px; margin: 0 0 14px; padding: 0 8px; box-sizing: border-box; }
  body:not(.home-mode) #ai-tab-generate .is-d01-image > #aiGenNodeConfigModal { grid-area: workspace; border: 0; margin: 0; }
  body:not(.home-mode) #ai-tab-generate .is-d01-image .aigen-node-config-dialog { display: block; border: 0 !important; }
}
@media (min-width: 1121px) {
  body:not(.home-mode) #ai-tab-generate .aigen-node-panel:has(> .aigen-product-shell.is-d01-image) { --mf-frame-bottom-gap: 41px; --mf-ad-d01-top: 250.2px; }
  html[data-meifan-theme="day"] body:not(.home-mode) #ai-tab-generate .aigen-node-panel:has(> .aigen-product-shell.is-d01-image) { --mf-ad-d01-top: 252.6px; }
  body:not(.home-mode) #ai-tab-generate .is-d01-image .aigen-d01-grid { align-items: stretch; }
  body:not(.home-mode) #ai-tab-generate .is-d01-image .aigen-d01-pane { box-sizing: border-box; max-height: none; height: max(520px, calc(100dvh - var(--mf-ad-d01-top) - var(--mf-frame-bottom-gap))); }
}
@media (min-width: 1500px) {
  body:not(.home-mode) #ai-tab-generate .aigen-node-panel:has(> .aigen-product-shell.is-d01-image) > .panel-head { position: absolute; top: 17px; right: 0; z-index: 2; margin: 0; padding: 0; height: 39px; width: auto; align-items: center; border: 0; background: none; }
  body:not(.home-mode) #ai-tab-generate .aigen-product-shell.aigen-remodel-shell.is-d01-image { grid-template-columns: auto auto minmax(0, 1fr) auto 424px; grid-template-areas: "d01tabs project . d01tools ." "workspace workspace workspace workspace workspace"; }
}
@media (min-width: 981px) and (max-width: 1499.98px) {
  body:not(.home-mode) #ai-tab-generate .aigen-node-panel:has(> .aigen-product-shell.is-d01-image) > .panel-head { min-height: 0; height: 34px; margin: 0 0 12px; padding: 0; justify-content: flex-end; border: 0; background: none; }
  body:not(.home-mode) #ai-tab-generate .aigen-node-panel:has(> .aigen-product-shell.is-d01-image) > .panel-head .panel-actions { flex-wrap: nowrap; }
  body:not(.home-mode) #ai-tab-generate .aigen-product-shell.aigen-remodel-shell.is-d01-image { grid-template-columns: auto auto minmax(0, 1fr) auto; grid-template-areas: "d01tabs project . d01tools" "workspace workspace workspace workspace"; }
}
@media (min-width: 1121px) and (max-width: 1499.98px) {
  body:not(.home-mode) #ai-tab-generate .aigen-node-panel:has(> .aigen-product-shell.is-d01-image), html[data-meifan-theme="day"] body:not(.home-mode) #ai-tab-generate .aigen-node-panel:has(> .aigen-product-shell.is-d01-image) { --mf-ad-d01-top: 300px; }
}

/* ===== 99_ai_d03_frame_r1：AI 设计师·局部优化(AD-D03)内联舞台外框——先外框后块内(张工令 2026-11-12) =====
   只在桌面(≥981)、非首页、AI 设计辅助的「局部」视图且内联舞台已挂上时生效(data-d03-view="local" 且 data-d03-stage="1")；
   开关关着、舞台没挂上、全案视图、手机，一条都不生效。不动任何脚本。
   1) 外层工作台大面板不画描边、底色、阴影，收掉内边距；舞台外那张卡同样不画——定稿没有总框，是舞台、右栏、版本条三块各自描边。
   2) 「局部辅助｜全案辅助」与项目下拉并成一行。
   3) ≥1181(三块并排时)：三块钉到视口，版本条底＝视口高−16(本屏定稿留白，变量 --mf-frame-bottom-gap)；舞台与右栏吃掉剩余高度，
      画布在舞台里吃剩余高度；右栏栏内滚，「预览确认并生成」「保存标注」那一组贴在右栏底部、始终看得见。下限 640，窗口矮时整页滚。
      顶常数(变量 --mf-ad-d03-top)：1500 宽及以上夜 242.2／日 244.6，1181–1499 夜 236／日 238.4(全站页头日间高 2.4，归全站页头卡)。
   4) 旧的局部节点行照总指挥令 1491(甲)留在首屏之下，不藏、不改——它里面有舞台没覆盖到的入口。
   块内(工具条与缩放的排法、右栏字段、版本条按钮)只做了让外框成立所需的最少几处，余下另对。 */
@media (min-width: 981px) {
  body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view="local"][data-d03-stage="1"] { padding: 0 !important; border-color: transparent !important; background: none !important; box-shadow: none !important; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; row-gap: 16px; align-items: start; }
  body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view="local"][data-d03-stage="1"]::before, body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view="local"][data-d03-stage="1"]::after { content: none; }
  body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view="local"][data-d03-stage="1"] > [data-aigen-d03-tabs] { grid-column: 1; grid-row: 1; margin: 0; }
  body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view="local"][data-d03-stage="1"] > .ai-assist-project-bar { grid-column: 2; grid-row: 1; justify-self: start; align-self: center; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; }
  body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view="local"][data-d03-stage="1"] > .ai-assist-d03-stage { grid-column: 1 / -1; grid-row: 2; }
  body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view="local"][data-d03-stage="1"] > .ai-assist-row-local { grid-column: 1 / -1; grid-row: 3; }
  body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view="local"][data-d03-stage="1"] .ai-assist-d03-stage .ai-assist-modal-card-annotate { padding: 0 !important; border-color: transparent !important; background: none !important; }
  body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view="local"][data-d03-stage="1"] .ai-assist-d03-stage .ai-assist-modal-fields { padding: 0; margin: 0; overflow: visible; max-height: none; }
}
@media (min-width: 1181px) {
  body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view="local"][data-d03-stage="1"] { --mf-frame-bottom-gap: 16px; --mf-ad-d03-top: 242.2px; }
  html[data-meifan-theme="day"] body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view="local"][data-d03-stage="1"] { --mf-ad-d03-top: 244.6px; }
  body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view="local"][data-d03-stage="1"] .ai-assist-d03-stage .ai-assist-annotation-panel { box-sizing: border-box; height: max(640px, calc(100dvh - var(--mf-ad-d03-top) - var(--mf-frame-bottom-gap))); grid-template-rows: minmax(0, 1fr) auto; grid-template-areas: "main rail" "strip strip"; align-items: stretch; }
  body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view="local"][data-d03-stage="1"] .ai-assist-d03-stage .ai-assist-annotation-board { grid-area: main; box-sizing: border-box; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto minmax(0, 1fr) auto auto; gap: 10px 16px; min-height: 0; overflow: hidden; padding: 14px; border: 1px solid var(--mf-theme-line, rgba(118, 197, 222, 0.28)); border-radius: 12px; background: var(--mf-theme-card, rgba(4, 21, 31, 0.42)); }
  body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view="local"][data-d03-stage="1"] .ai-assist-d03-stage .ai-assist-annotation-board > * { grid-column: 1 / -1; min-width: 0; margin: 0; }
  body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view="local"][data-d03-stage="1"] .ai-assist-d03-stage .ai-assist-annotation-board > .ai-assist-d03-stage-head { grid-column: 1; grid-row: 1; }
  body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view="local"][data-d03-stage="1"] .ai-assist-d03-stage .ai-assist-annotation-board > .ai-assist-shared-zoom { grid-column: 2; grid-row: 1; display: flex; align-items: center; gap: 8px; align-self: center; }
  body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view="local"][data-d03-stage="1"] .ai-assist-d03-stage .ai-assist-annotation-board > .ai-assist-shared-canvas { grid-row: 3; min-height: 200px; height: auto; aspect-ratio: auto; }
  body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view="local"][data-d03-stage="1"] .ai-assist-d03-stage .ai-assist-d03-rail { grid-area: rail; box-sizing: border-box; min-height: 0; overflow-y: auto; align-content: start; }
  body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view="local"][data-d03-stage="1"] .ai-assist-d03-stage .ai-assist-d03-rail > .ai-assist-d03-rail-actions { position: sticky; bottom: -14px; margin: 0 -14px -14px; padding: 12px 14px 14px; border-top: 1px solid var(--mf-theme-line); background: var(--bg); }
  body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view="local"][data-d03-stage="1"] .ai-assist-d03-stage .ai-assist-d03-strip { grid-area: strip; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title title" "vers actions"; align-items: center; column-gap: 16px; row-gap: 8px; }
  body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view="local"][data-d03-stage="1"] .ai-assist-d03-stage .ai-assist-d03-strip > strong { grid-area: title; }
  body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view="local"][data-d03-stage="1"] .ai-assist-d03-stage .ai-assist-d03-strip > .ai-assist-d03-vers { grid-area: vers; min-width: 0; }
  body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view="local"][data-d03-stage="1"] .ai-assist-d03-stage .ai-assist-d03-strip .ai-assist-d03-ver-img { height: 64px; overflow: hidden; }
  body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view="local"][data-d03-stage="1"] .ai-assist-d03-stage .ai-assist-d03-strip > .ai-assist-d03-vers-actions { grid-area: actions; }
}
@media (min-width: 1181px) and (max-width: 1499.98px) {
  body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view="local"][data-d03-stage="1"] { --mf-ad-d03-top: 236px; }
  html[data-meifan-theme="day"] body:not(.home-mode) #ai #ai-tab-polish .ai-assist-workbench[data-d03-view="local"][data-d03-stage="1"] { --mf-ad-d03-top: 238.4px; }
}

/* ===== 99_mobile_security_r1：手机账号安全小卡(张工令 2026-11-12 先外框后块内；总指挥令 CMD-1495) =====
   一、SEC-M-01 找回密码纵向(施工前页 8c2c14b2)：
       19 号分片专给找回页签的旧规则 padding: 18px 18px 34px 在 SEC-M-01 上压过了安全屏统一的 padding: 0，整列多下移 18；
       这里把上下内边距收回 0(效果同把 19 号 CMD1468 那条的 padding-inline:0 改成 padding:0——不改原文，是为了不动既有 CMD1468 检查锚定的那一行)；
       下内边距 34 在 r1 漏清(复核官 af5ba1de 指出)，r2 补上：它只让找回屏底部多出 34 的空白、整页更早出现滚动，定稿没有。
       头部三行间距只在找回屏单写：返回→标题 9、标题→副题 8、头部下边距 10(共用的 .login-security-heading-u20 不改，其余九屏不碰)。
   二、手机安全屏主按钮夜间键盘焦点圆角：42 号全局 :focus-visible 写成 4px，41 号夜间补丁只照顾输入框漏了按钮；
       逐个点名补 12px：SEC-M-03 提交、05 下一步、06 确认绑定、07 继续、08 确认注销、NOTIF-03 反馈提交(r1 只有 07；r2 补齐，半页 82119003)。
       焦点环(outline、offset)不动、全站 4px 规则不动、日间不动(日间 41 号已逐个补成 12)。
   三、SEC-M-05／06／07／08／09 返回／标题／副题纵向(半页 73d408b8)：41 号按页族写了三遍的同一组间距
       (品牌行下 26、返回行下 16、标题下 4)，对定稿基线 132／174／201 改为 29／6／7；不改 41 号原文，按屏号覆盖。
   四、r3(总指挥令 CMD-1501)：
       a) r2 只改头部，副题上移 4、副题以下整体跟着上移 4(补页 51b3d1f8)——05–09 副题下边距各加 4，副题下第一个块回到改前位置(＝定稿：227／244／225／244／227)；
       b) SEC-M-10 手机上与 09 同页族(标题是 h3)，并进同组：品牌行下 29、返回行下 6、标题下 7、副题下 18→22(对象卡保持 227)；
       c) SEC-M-03 旧模板：上内边距 62、品牌行高 24 下 13、返回行下 −10、标题行高 35 下 3，头部到 115／145／187；
          副题下边距 −0.6 让三个框顶落在定稿 244／343／442(改前 236／335／434)。SEC-M-01／02／04(登录页)不碰。
   五、r4(总指挥令 CMD-1511；对量页 b67a0eeb)：
       a) SEC-M-02 找回完成、SEC-M-04 改密完成(登录页族)：头部改前 118／148／195(与 V5.3 在 N 上量的相同)，照 SEC-M-01 的做法
          返回→标题 9、标题→副题 8，到 118／145／188；头部下边距 4→10，下面的勾、结果标题、状态行只上移 1；
          说明卡上下内边距 18→11，高 80→66(定稿 454–520)；主按钮上边距 8→−8，顶 613→582(定稿 582–632)。
          19 号给说明卡下边距写了 !important(70)，本分片不写 !important，所以在主按钮上边距上抵。
       b) SEC-M-10 对象卡以下：真实对象卡里有设备列表(定稿没画)，单条时卡高 108(定稿 86)，提示卡与两个按钮整体低 22；
          提示卡上边距 35→13，单条时提示卡、两个按钮回到 348／474／541(定稿)。多条或批量(多一段说明)时照内容往下排，不定死。
   六、r5(作者自查；总指挥令 CMD-1537 核执行单时发现)：手机上 SEC-M-10 不在 #settings 里——41 号源第 5831–5832 行在 innerWidth≤640 时
       把它交给 openCompanyActionModal，宿主 [data-company-action-modal] 挂在 document.body(第 9163–9176 行)。r3、r4 的五条 SEC-M-10 规则
       写成 #settings dialog…，在产品里一条都不生效(离线台子当时把它错放进 #settings 才量出了效果)。五条改挂 [data-company-action-modal] dialog…，值不变。
   七、r6(总指挥令 CMD-1552；预案 a8dc5f4c #1／#2、预案 v2 cfc122ed #4)：
       a) SEC-M-02／04 结果标题行高 30→24(基线 390→387)，状态行下内边距 6(基线 422→416，说明卡与主按钮不动)；19 号给这两处的 margin 写了 !important，本分片不写 !important，改行高与内边距。
       b) SEC-M-10 批量态：确认段落改成纵向 flex，批量说明段 order 1、状态行 order 2，排到两个按钮之后——批量时两个按钮 530／597→474／541(定稿)；单条不变；DOM 与读屏顺序不变。
   八、r7(总指挥令 CMD-1558 采纳预案 6ee59fab 方案 B)：SEC-M-02／04 保留 73 号法务页脚(框架：19 专用登录页保留七项法务页脚)，
       页脚上下内边距 16→8／0、行间距 8→2、行高 1.7→1.5(字号 12、七项与顺序不变)，页脚 656–809，页根内部可滚 67→0；
       02 补上 19 号只给 04 的主按钮与页脚间隔 24(02 原来页脚贴着主按钮)。只钉 02／04 屏号、只在 ≤640。
   九、r8(总指挥令 CMD-1564 采纳预案 3c4b419d)：SEC-M-10 对象卡里有设备列表(定稿没画)，单条时卡高 108(定稿 86)，r4 只好把提示卡上边距收到 13。
       现在对象卡上下内边距 14→8、卡内说明行上下外边距 8→3，单条卡高 86；提示卡上边距改回 35(定稿)；提示卡与两个按钮仍在 348／474／541。
       卡内两行字比定稿各高约 5～7(多放一行列表的代价)。
   十、r9(总指挥令 CMD-1571；自查 3acffdb6 修法 B，UI 窗 84785bb0 判要补)：上面那 5～7 是 r8 收的两处间距造成的，字号行高不差。
       对象卡上下内边距改 12／4、卡内说明行外边距改 6／0：标题基线 252→256、说明基线 274→281(＝定稿)，卡仍 86，提示卡与两钮不动，
       批量会话数每多 1 仍下移 28。代价是列表离卡底 4。标题字重 700(定稿 600)属 41 号原样，不动。 */
@media (max-width: 640px) {
  .meifan-login-page[data-mf-security-page="SEC-M-01"] .meifan-login-form-panel { padding-top: 0; padding-bottom: 0; }
  .meifan-login-page[data-mf-security-page="SEC-M-01"] .login-security-heading-u20 { row-gap: 8px; margin-bottom: 10px; }
  .meifan-login-page[data-mf-security-page="SEC-M-01"] .login-security-heading-u20 > strong { margin-top: 1px; }
  html:not([data-meifan-theme="day"]) #settings dialog.mf-security-page-r474[data-mf-security-page="SEC-M-03"] [data-personal-password-submit]:focus-visible,
  html:not([data-meifan-theme="day"]) #settings dialog.mf-security-page-r474[data-mf-security-page="SEC-M-05"] [data-personal-phone-verify-old]:focus-visible,
  html:not([data-meifan-theme="day"]) #settings dialog.mf-security-page-r474[data-mf-security-page="SEC-M-06"] [data-personal-phone-confirm]:focus-visible,
  html:not([data-meifan-theme="day"]) #settings dialog.mf-security-page-r474[data-mf-security-page="SEC-M-07"] [data-personal-close-continue]:focus-visible,
  html:not([data-meifan-theme="day"]) #settings dialog.mf-security-page-r474[data-mf-security-page="SEC-M-08"] [data-cam-close-confirm]:focus-visible,
  html:not([data-meifan-theme="day"]) #settings dialog.mf-feedback-page-r474[data-mf-security-page="NOTIF-03"] [data-fe-a10-form] button[type="submit"]:focus-visible { border-radius: 12px; }
  #settings dialog.mf-security-page-r474:is([data-mf-security-page="SEC-M-05"], [data-mf-security-page="SEC-M-06"], [data-mf-security-page="SEC-M-07"], [data-mf-security-page="SEC-M-08"], [data-mf-security-page="SEC-M-09"]) .mf-security-page-brand-r474 { margin-bottom: 29px; }
  #settings dialog.mf-security-page-r474:is([data-mf-security-page="SEC-M-05"], [data-mf-security-page="SEC-M-06"], [data-mf-security-page="SEC-M-07"], [data-mf-security-page="SEC-M-08"], [data-mf-security-page="SEC-M-09"]) .settings-account-r19-password-back { margin-bottom: 6px; }
  #settings dialog.mf-security-page-r474:is([data-mf-security-page="SEC-M-05"], [data-mf-security-page="SEC-M-06"], [data-mf-security-page="SEC-M-07"], [data-mf-security-page="SEC-M-08"], [data-mf-security-page="SEC-M-09"]) h2 { margin-bottom: 7px; }
  #settings dialog.mf-security-page-r474[data-mf-security-page="SEC-M-05"] h2 + .settings-account-r3-note { margin-bottom: 22px; }
  #settings dialog.mf-security-page-r474[data-mf-security-page="SEC-M-06"] h2 + .settings-account-r3-note { margin-bottom: 11px; }
  #settings dialog.mf-security-page-r474[data-mf-security-page="SEC-M-07"] h2 + .settings-account-r3-note { margin-bottom: 20px; }
  #settings dialog.mf-security-page-r474[data-mf-security-page="SEC-M-08"] h2 + .settings-account-r3-note { margin-bottom: 11px; }
  #settings dialog.mf-security-page-r474[data-mf-security-page="SEC-M-09"] h2 + .settings-account-r3-note { margin-bottom: 22px; }
  [data-company-action-modal] dialog.mf-security-page-r474[data-mf-security-page="SEC-M-10"] .mf-security-page-brand-r474 { margin-bottom: 29px; }
  [data-company-action-modal] dialog.mf-security-page-r474[data-mf-security-page="SEC-M-10"] .settings-account-r19-password-back { margin-bottom: 6px; }
  [data-company-action-modal] dialog.mf-security-page-r474[data-mf-security-page="SEC-M-10"] h3 { margin-bottom: 7px; }
  [data-company-action-modal] dialog.mf-security-page-r474[data-mf-security-page="SEC-M-10"] h3 + .mf-session-confirm-sub-r474 { margin-bottom: 22px; }
  #settings dialog.mf-security-page-r474[data-mf-security-page="SEC-M-03"] { padding-top: 62px; }
  #settings dialog.mf-security-page-r474[data-mf-security-page="SEC-M-03"] .mf-security-page-brand-r474 { min-height: 24px; margin-bottom: 13px; }
  #settings dialog.mf-security-page-r474[data-mf-security-page="SEC-M-03"] .settings-account-r19-password-back { margin-bottom: -10px; }
  #settings dialog.mf-security-page-r474[data-mf-security-page="SEC-M-03"] h2 { line-height: 35px; margin-bottom: 3px; }
  #settings dialog.mf-security-page-r474[data-mf-security-page="SEC-M-03"] h2 + .settings-account-r3-note { margin-bottom: -0.6px; }
  .meifan-login-page:is([data-mf-security-page="SEC-M-02"], [data-mf-security-page="SEC-M-04"]) .login-security-heading-u20 { margin-bottom: 10px; row-gap: 8px; }
  .meifan-login-page:is([data-mf-security-page="SEC-M-02"], [data-mf-security-page="SEC-M-04"]) .login-security-heading-u20 > strong { margin-block-start: 1px; }
  .meifan-login-page:is([data-mf-security-page="SEC-M-02"], [data-mf-security-page="SEC-M-04"]) .login-security-result-note-u20 { padding-block: 11px; }
  .meifan-login-page:is([data-mf-security-page="SEC-M-02"], [data-mf-security-page="SEC-M-04"]) .login-security-result-u20 > .login-primary { margin-top: -8px; }
  [data-company-action-modal] dialog.mf-security-page-r474[data-mf-security-page="SEC-M-10"] .mf-session-confirm-question-r474 { margin-top: 35px; }
  .meifan-login-page:is([data-mf-security-page="SEC-M-02"], [data-mf-security-page="SEC-M-04"]) .login-security-result-title-u20 { line-height: 24px; }
  .meifan-login-page:is([data-mf-security-page="SEC-M-02"], [data-mf-security-page="SEC-M-04"]) .login-security-result-state-u20 { padding-bottom: 6px; }
  [data-company-action-modal] dialog.mf-security-page-r474[data-mf-security-page="SEC-M-10"] .settings-account-r19-close { display: flex; flex-direction: column; }
  [data-company-action-modal] dialog.mf-security-page-r474[data-mf-security-page="SEC-M-10"] .mf-session-confirm-question-r474 + .settings-account-r19-close-confirm-copy { order: 1; }
  [data-company-action-modal] dialog.mf-security-page-r474[data-mf-security-page="SEC-M-10"] [data-cam-status] { order: 2; }
  .meifan-login-page:is([data-mf-security-page="SEC-M-02"], [data-mf-security-page="SEC-M-04"]) > .meifan-public-legal-footer-r328 { padding-block: 8px 0; row-gap: 2px; line-height: 1.5; }
  .meifan-login-page[data-mf-security-page="SEC-M-02"] .meifan-login-stage { padding-bottom: 24px; }
  [data-company-action-modal] dialog.mf-security-page-r474[data-mf-security-page="SEC-M-10"] .mf-session-confirm-targets-r474 { padding-block: 12px 4px; }
  [data-company-action-modal] dialog.mf-security-page-r474[data-mf-security-page="SEC-M-10"] .mf-session-confirm-targets-r474 > .settings-account-r19-close-confirm-copy { margin-block: 6px 0; }
}

/* ===== 99_platform_notif_r1：平台后台·反馈与申诉(NOTIF-05)、内容审核待复核(NOTIF-06)内容区拆套层(张工令 2026-11-12 先外框后块内；总指挥令 CMD-1497) =====
   定稿 05／06 的内容区是几张独立的卡直接放在底色上：范围卡在上，队列卡与详情卡并排(宽 435:712，间距 21，范围卡与下方间距 22)。
   现役两屏外面多套一层带底色的大面板，里面再缩进 16–20。这里只在这两个面板上：
   1) 外层面板不画底色、阴影、描边，收掉内边距；
   2) NOTIF-05 的标题与四态说明那一块成为第一张卡(范围卡)；NOTIF-06 原本就有范围卡，只调间距；
   3) 队列与详情按定稿比例分栏。
   平台后台共用外壳(侧栏 226、页头、内容区左右内边距)以现役为准、不动(总指挥令 CMD-1497 自判①)。不动脚本，后台其它页、用户侧反馈页(NOTIF-03)不碰。
   r2 块内(半页 4b35ffec；总指挥令 CMD-1499)：
   4) NOTIF-05 范围卡里的标题与说明和平台页头重复(定稿把它们画在页头)，视觉隐藏(仍在页面里给读屏)；范围卡只剩四态胶囊，高约 64；
      「已确认处理能力／重新确认处理权限」那一行排进范围卡右侧(容器两列网格、与范围卡同一行，DOM 不动、按钮不动)。
   5) 队列卡与详情卡照定稿定高(05 为 710、06 为 700)，条多了区内滚——不是只显示几条(总指挥令 CMD-1499 对九件答的执行理解)。
   6) r3：06 范围卡高 72→67(定稿 118→185 高 67；上下内边距 14→11.5)。
   7) r4 聚焦保护(副总监 392fa886；总指挥令 CMD-1508)：57 号 05→06 单条打开时面板带 data-focus="true"，旧 57 号样式在聚焦时隐藏队列、正文一列。
      2) 与 3) 的双列和队列 flex 只限非聚焦(:not([data-focus="true"]))，聚焦时仍按 57 号原样(一列、队列隐藏)；退出聚焦回双列。 */
@media (min-width: 981px) {
  #meifanPlatformWorkspaceC2Root .platform-admin-b1-outlet > .platform-admin-b2-panel[data-fe-a10="admin"] { padding: 0; border-color: transparent; background: none; box-shadow: none; }
  #meifanPlatformWorkspaceC2Root .platform-admin-b2-panel[data-fe-a10="admin"] > [data-fe-notif05] { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding: 0; }
  #meifanPlatformWorkspaceC2Root .platform-admin-b2-panel[data-fe-a10="admin"] > [data-fe-notif05] > * { grid-column: 1 / -1; }
  #meifanPlatformWorkspaceC2Root .platform-admin-b2-panel[data-fe-a10="admin"] > [data-fe-notif05] > .notif05-heading { grid-row: 1; }
  #meifanPlatformWorkspaceC2Root .platform-admin-b2-panel[data-fe-a10="admin"] > [data-fe-notif05] > .settings-account-r3-actions { grid-column: 2; grid-row: 1; position: relative; z-index: 1; margin: 0 20px 22px 0; }
  #meifanPlatformWorkspaceC2Root .platform-admin-b2-panel[data-fe-a10="admin"] > [data-fe-notif05] > [data-fe-a10-message] { margin: 0; }
  #meifanPlatformWorkspaceC2Root .platform-admin-b2-panel[data-fe-a10="admin"] .notif05-heading > div:first-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  #meifanPlatformWorkspaceC2Root .platform-admin-b2-panel[data-fe-a10="admin"] .notif05-heading { box-sizing: border-box; min-height: 64px; align-items: center; margin-bottom: 22px; padding: 0 20px; border: 1px solid var(--r4-ui-line, var(--line)); border-radius: 12px; background: var(--r4-ui-panel, var(--surface)); }
  #meifanPlatformWorkspaceC2Root .platform-admin-b2-panel[data-fe-a10="admin"] .notif05-layout { grid-template-columns: minmax(260px, 435fr) minmax(0, 712fr); gap: 21px; align-items: stretch; }
  #meifanPlatformWorkspaceC2Root .platform-admin-b2-panel[data-fe-a10="admin"] .notif05-queue { box-sizing: border-box; display: flex; flex-direction: column; height: 710px; min-height: 0; }
  #meifanPlatformWorkspaceC2Root .platform-admin-b2-panel[data-fe-a10="admin"] .notif05-queue > .notif05-queue-list { flex: 1 1 0; min-height: 0; overflow-y: auto; }
  #meifanPlatformWorkspaceC2Root .platform-admin-b2-panel[data-fe-a10="admin"] .notif05-detail { box-sizing: border-box; height: 710px; min-height: 0; overflow-y: auto; }
  #meifanPlatformWorkspaceC2Root .platform-admin-b1-outlet > .platform-admin-b2-panel.content-review-r1 { gap: 22px; padding: 0; border-color: transparent; background: none; box-shadow: none; }
  #meifanPlatformWorkspaceC2Root .platform-admin-b2-panel.content-review-r1:not([data-focus="true"]) > .content-review-r1-body { grid-template-columns: minmax(260px, 435fr) minmax(0, 712fr); gap: 21px; align-items: stretch; }
  #meifanPlatformWorkspaceC2Root .platform-admin-b2-panel.content-review-r1:not([data-focus="true"]) .content-review-r1-queue { box-sizing: border-box; display: flex; flex-direction: column; height: 700px; min-height: 0; }
  #meifanPlatformWorkspaceC2Root .platform-admin-b2-panel.content-review-r1 .content-review-r1-queue > .content-review-r1-list { flex: 1 1 0; min-height: 0; overflow-y: auto; }
  #meifanPlatformWorkspaceC2Root .platform-admin-b2-panel.content-review-r1 .content-review-r1-detail { box-sizing: border-box; height: 700px; min-height: 0; overflow-y: auto; }
  #meifanPlatformWorkspaceC2Root .platform-admin-b2-panel.content-review-r1 > .content-review-r1-scope { padding-block: 11.5px; }
}
