: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; }
.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;
}

.nav-item span { width: 22px; text-align: center; color: #e6bc6d; font-weight: 700; }
.nav-item:hover, .nav-item.active { background: var(--nav-soft); }
.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 #topActions .search,
.marketing-mode #newTaskButton { display: none; }
.marketing-mode #topActions .home-return-action { display: inline-flex; }
.project-mode .topbar { display: none; }

.search {
  height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.search input { border: 0; outline: 0; min-width: 210px; background: transparent; }
.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: calc(100dvh - 154px);
  display: none;
  align-content: center;
  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");
  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;
}

.home-mode .topbar {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  width: 100%;
  margin: 26px auto 94px;
  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);
}



/* ======= 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: minmax(230px, 0.9fr) minmax(106px, 0.34fr) minmax(108px, 0.34fr) auto 34px auto;
  gap: 8px;
  align-items: center;
}

.project-dashboard-tool-group > #newProjectBtn {
  grid-column: 4;
}

.project-dashboard-tool-group > .project-alert-button {
  grid-column: 5;
}

.project-dashboard-tool-group > .project-user-menu {
  grid-column: 6;
}

.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-search-field {
  min-width: 220px;
  color: var(--muted);
  font-size: 12px;
}

.project-search-field--compact {
  min-width: 0;
}

.project-search-compact {
  height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 0 10px;
}

.project-search-compact b {
  color: var(--muted);
  font-weight: 700;
}

.project-search-submit {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.project-search-submit:hover {
  background: #eef6f1;
  color: var(--green);
}

.project-search-compact input {
  height: auto;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0;
  background: transparent;
}

.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-reference-topbar #newProjectBtn {
  padding-inline: 12px;
  white-space: nowrap;
}

.project-ai-style-topbar .project-search-compact,
.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-search-compact {
  height: 36px;
}

.project-ai-style-topbar .project-search-compact input,
.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-search-compact input::placeholder {
  color: rgba(205, 226, 232, 0.56);
}

.project-ai-style-topbar .project-time-filter > span[aria-hidden="true"],
.project-ai-style-topbar .project-search-submit {
  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-local-search {
  width: 92px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(126, 211, 242, 0.2);
  border-radius: 8px;
  padding: 0 7px;
  background: rgba(2, 17, 28, 0.32);
}

.project-list-local-search input {
  width: 100%;
  min-width: 0;
  height: auto;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font-size: 12px;
}

.project-list-local-search input::placeholder {
  color: rgba(205, 226, 232, 0.58);
}

.project-list-local-search-btn {
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 6px;
  padding: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.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: 42px minmax(0, 1fr) auto;
  gap: 8px;
  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-thumb {
  width: 40px;
  aspect-ratio: 1;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f7f2e8, #d7ddd6);
  color: #24423a;
  font-size: 22px;
  font-weight: 800;
}
.project-card-main {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.project-card-main strong,
.project-card-main small {
  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-main small {
  white-space: nowrap;
}
.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-card-side {
  display: grid;
  gap: 8px;
  justify-items: end;
  align-self: stretch;
}
.project-card-side em {
  min-width: 54px;
  text-align: center;
  border-radius: 6px;
  padding: 3px 7px;
  font-style: normal;
  font-size: 12px;
  color: var(--green);
  background: #eaf6ee;
}
.project-card-side em.quote { color: var(--amber); background: #fff4df; }
.project-card-side em.review { color: #9a6b00; background: #fff7d7; }
.project-card-side em.build { color: #1f65aa; background: #eaf3ff; }
.project-card-side em.delivered { color: var(--green); background: #e7f5eb; }
.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-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);
}

.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-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 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;
    grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(94px, 0.35fr)) auto 34px auto;
  }
  .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-search-field,
  .project-search-field input { width: 100%; min-width: 0; }
  .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: 64px minmax(0, 1fr); }
  .project-card-thumb { width: 60px; }
  .project-card-side { grid-column: 1 / -1; grid-template-columns: auto 1fr; justify-items: start; 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; }
  .search input { min-width: 0; width: 100%; }
  .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;
  }
}

@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;
  }
  .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; }
  .search { height: 44px; }
  .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);
  }
}


@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;
  }
}

/* ======= 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%;
  }
}

/* ======= 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(2, minmax(0, 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;
}

.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%;
  min-height: 120px;
  max-height: 180px;
  display: block;
  border-radius: 6px;
  background: #0b2633;
  object-fit: cover;
}

.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);
}
.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-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;
}

@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;
}

.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.58); 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.58);
}

/* === 施工模板三步向导 2026-06-21 === */
.ctpl-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ctpl-hint { color: rgba(214, 226, 226, 0.55); 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.5); 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.55); 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.5); }
.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.55); 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.58);
  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.56);
}

/* === 职务管理 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");
  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;
}

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(.search, .project-search-field, .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;
}

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;
}

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, .project-search-field, .project-search-field input, #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
) {
  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;
}

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
) {
  max-width: min(var(--modal-max-width, 1120px), calc(100vw - var(--mf-sidebar-width) - 40px)) !important;
}

@media (max-width: 760px) {
  body:not(.home-mode) {
    --mf-sidebar-width: 0px;
  }
}

/* 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;
  }
}
/* 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.54);
  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.56);
  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;
}
.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.56); }
.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.45);
}

.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.5); 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.5); 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.58); 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.56);
}
.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.54); 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.58);
}
.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.58);
}
.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.52);
}
.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.58); 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.58);
  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.58);
  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.55); 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.55); 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.55); 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.58); 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, .55);
  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, .55);
  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.5); 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.5); 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.55); 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.5); 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.58);
  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-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; }
/* 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-r3 {
  position: fixed;
  top: 72px;
  right: 28px;
  z-index: 2600;
  width: min(360px, calc(100vw - 28px));
}

.account-ux-menu-r3.hidden {
  display: none;
}

.account-ux-menu-card {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(124, 193, 215, 0.34);
  border-radius: 10px;
  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: 12px;
}

.account-ux-menu-card button {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
}

.account-ux-demo-switch {
  display: grid;
  gap: 6px;
  margin-top: 5px;
  padding-top: 10px;
  border-top: 1px solid rgba(117, 181, 203, 0.22);
}

.account-ux-demo-switch label {
  color: rgba(191, 224, 233, 0.76);
  font-size: 12px;
}

.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;
  }
}
/* 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 + 黄铜金点缀（张工2026-07-03批） */
  --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+星云微光
   （张工2026-07-05:横竖线太多没必要,要满星宇宙感） */
.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;
}

.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-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;
}
/* 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;
  }
}
.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:rgba(6,20,32,.97); border:1px solid 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 rgba(126,211,242,.2); }
.r14-head b{ color:#eaf8ff; font-size:13.5px; }
.r14-ctx{ margin-left:auto; font-size:10px; color:#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:#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:#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:rgba(255,255,255,.06); color:#dcf3fb; border:1px solid rgba(126,211,242,.18); }
.r14-input{ display:flex; gap:6px; padding:10px; border-top:1px solid rgba(126,211,242,.18); }
.r14-input input{ flex:1; background:rgba(8,22,36,.7); border:1px solid rgba(126,211,242,.25); border-radius:8px; padding:8px 10px; color:#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:rgba(8,22,36,.7); border:1px solid rgba(126,211,242,.25); border-radius:10px; padding:10px; }
.r14-plan .pt{ font-size:11px; color:#8fe3fb; font-weight:700; margin-bottom:7px; }
.r14-step{ display:flex; align-items:center; gap:8px; font-size:11.5px; color:#cdeefb; padding:4px 0; }
.r14-step .n{ width:18px;height:18px;border-radius:50%;background:rgba(126,211,242,.2);color:#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:#8be3c6; } .r14-chip.cf{ background:rgba(240,200,120,.2); color:#f0d08c; } .r14-chip.need{ background:rgba(240,150,110,.18); color:#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:#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:rgba(255,255,255,.06); color:#9fb8c4; border:1px solid rgba(207,230,238,.2); }
.r14-log{ width:100%; background:rgba(6,16,26,.6); border-left:3px solid #6edcb4; border-radius:6px; padding:8px 10px; font-size:11px; color:#cdeefb; }
.r14-log b{ color:#8be3c6; } .r14-log .res{ color:#9fe9ff; }
.r14-dev{ font-size:10.5px; color:#9fb8c4; padding:8px 12px; border-top:1px solid rgba(126,211,242,.12); }
.r14-dev summary{ cursor:pointer; color:#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:
    linear-gradient(145deg, rgba(10, 34, 54, .98), rgba(5, 14, 26, .97)),
    rgba(6,20,32,.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;
}
@media (max-width:640px){
  #r14-operator {
    right: 14px;
    bottom: max(14px, env(safe-area-inset-bottom));
    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:#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 rgba(126,211,242,.3); background:rgba(10,26,40,.5); color:#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:#9fe9ff; background:rgba(8,22,36,.55); padding:7px 14px; border-bottom:1px solid 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:86px; 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{
    position: fixed; left: 0; right: 0; bottom: 0; top: auto;
    width: 100vw; max-width: 100vw; height: 60vh; max-height: 60vh;
    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; }
  body[data-r15-dock-layout="mobile-collapsed"] #r14-operator .r15-panel{ transform: translateY(100%); }
}
/* 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) {
  body:has(#aiMemory.view.active) .main > .topbar,
  body:has(#aiMemory.view.active) .r14-bubble.r15-bubble[data-r15="bubble"] {
    display: none;
  }

  .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; }
.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;
}

.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,
  .settings-account-r14-node-head,
  .settings-account-r14-node-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-node-form {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .settings-account-r14-node-list,
  .settings-account-r14-node-card,
  .settings-account-r14-node-form,
  .settings-account-r14-node-form label,
  .settings-account-r14-route-note,
  .settings-account-r14-node-actions,
  .settings-account-r14-modal-actions {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .settings-account-r14-node-actions,
  .settings-account-r14-modal-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .settings-account-r14-node-actions > *,
  .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,
.settings-account-r14-node-head,
.settings-account-r14-node-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-node-head small,
.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-node-list {
  display: grid;
  /* 03改稿+P1两项(2026-07-03): 节点卡网格两列自适应(窄屏自然回落单列) */
  grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr));
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
  align-content: start;
}

.settings-account-r14-node-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  border: 1px solid rgba(126, 158, 177, .18);
  border-radius: 8px;
  background: rgba(10, 20, 30, .78);
  padding: 11px;
}

.settings-account-r14-node-head > div {
  min-width: 0;
}

.settings-account-r14-node-head strong,
.settings-account-r14-node-head small {
  display: block;
  overflow-wrap: anywhere;
}

.settings-account-r14-node-head > span,
.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;
}

.settings-account-r14-node-card[data-test-state="ok"] .settings-account-r14-test-result {
  border-color: rgba(120, 210, 170, .42);
  color: rgba(196, 239, 219, .94);
}

.settings-account-r14-node-card[data-test-state="fail"] .settings-account-r14-test-result {
  border-color: rgba(248, 113, 113, .42);
  color: rgba(254, 202, 202, .96);
}

.settings-account-r14-node-form {
  display: grid;
  /* 03改稿+P1两项(2026-07-03): 卡内两栏——已选chips+添加下拉 / 失败策略 */
  grid-template-columns: minmax(0, 1.6fr) minmax(170px, .9fr);
  gap: 9px;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

/* 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-node-empty {
  margin: 6px 0 0;
  padding: 8px 10px;
  border: 1px dashed rgba(248, 180, 113, .4);
  border-radius: 8px;
  color: rgba(254, 230, 202, .9);
  background: rgba(120, 70, 20, .14);
  font-size: 12px;
  font-weight: 400;
}

/* 03改稿+P1两项(2026-07-03): "输入框空白/排布乱"真根因修复——
   卡/表单原 overflow-x:hidden 使其变成滚动容器(自动最小高度=0), 弹窗列表定高(1fr)时
   网格把 10 张卡等分压扁(每卡~117px), 字段全被竖向裁掉→看起来"空白"。
   修法: 行高按内容(max-content)+卡内不再作滚动容器; 横向防溢出由 min-width:0+flex-wrap+width:100% 兜住。 */
.settings-account-r14-node-list {
  grid-auto-rows: max-content;
}
.settings-account-r14-node-card,
.settings-account-r14-node-form {
  overflow: visible;
  min-height: max-content;
}

/* 03改稿+P1两项(2026-07-03): 本段规则在文件后段, 会盖过前面 900px 媒体查询的单列口径——此处补回窄屏单列 */
@media (max-width: 900px) {
  .settings-account-r14-node-list,
  .settings-account-r14-node-form {
    grid-template-columns: minmax(0, 1fr);
  }
}

.settings-account-r14-node-form label,
.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-node-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-r14-node-actions {
  align-items: center;
  flex-wrap: wrap;
  max-width: 100%;
  overflow-x: hidden;
  border-top: 1px solid rgba(126, 158, 177, .14);
  padding-top: 9px;
}

.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; }

/* SS-23(2026-07-05): 重置用户密码反馈——成功绿/失败红+图标, 视觉分成败(原成败同款灰字) */
.settings-admin-pwreset [data-admin-pwreset-status] {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.settings-admin-pwreset [data-admin-pwreset-status]:empty { display: none; }
.settings-admin-pwreset [data-admin-pwreset-status]::before {
  flex: 0 0 auto;
  font-weight: 700;
  line-height: 1.5;
}
.settings-admin-pwreset [data-admin-pwreset-status][data-pwreset-tone="ok"] { color: #3ec98b; }
.settings-admin-pwreset [data-admin-pwreset-status][data-pwreset-tone="ok"]::before { content: "\2713"; }
.settings-admin-pwreset [data-admin-pwreset-status][data-pwreset-tone="error"] { color: #e07a7a; }
.settings-admin-pwreset [data-admin-pwreset-status][data-pwreset-tone="error"]::before { content: "\26A0"; }
.settings-admin-pwreset [data-admin-pwreset-status][data-pwreset-tone="pending"] { color: var(--mf-theme-muted, rgba(207, 230, 238, 0.74)); }

.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-node-list,
  .settings-account-r14-node-card,
  .settings-account-r14-node-form,
  .settings-account-r14-node-form label,
  .settings-account-r14-route-note,
  .settings-account-r14-node-actions,
  .settings-account-r14-modal-actions {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  .settings-account-r14-node-form,
  .settings-account-r14-node-actions,
  .settings-account-r14-modal-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .settings-account-r14-node-form select,
  .settings-account-r14-node-actions > *,
  .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,
.settings-platform-node-defaults-table td:first-child {
  display: table-cell;
  min-width: 110px;
}

.settings-account-r16-api-table td:first-child strong,
.settings-platform-node-defaults-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 {
  background: linear-gradient(90deg, rgba(20, 83, 45, .28), rgba(15, 23, 42, .64));
}

.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): 行内家族/上游原名/验证状态小字——原六列排版不变, 只在模型名称列内追加小字 */
.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;
}

/* 平台后台·节点默认模型 */
.settings-platform-node-defaults {
  margin-top: 18px;
}

.settings-platform-node-defaults-table select {
  width: 100%;
  max-width: 360px;
  border: 1px solid rgba(148, 163, 184, .26);
  border-radius: 8px;
  background: rgba(15, 23, 42, .54);
  color: #edf6f7;
  padding: 7px 9px;
  outline: none;
}

.settings-platform-node-defaults-table select.on {
  border-color: rgba(94, 234, 212, .6);
  background: rgba(13, 148, 136, .26);
  box-shadow: 0 0 0 1px rgba(94, 234, 212, .22) inset;
}

.settings-platform-node-defaults-table td small {
  display: block;
  margin-top: 2px;
  color: rgba(211, 224, 226, .5);
  font-size: 11px;
  font-family: "JetBrains Mono", Consolas, monospace;
}

.settings-platform-node-defaults-actions {
  white-space: nowrap;
}

.settings-platform-node-defaults-actions button {
  padding: 5px 12px;
  font-size: 12px;
}

.settings-platform-node-defaults-actions button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.settings-platform-node-defaults-status {
  margin: 0 0 8px;
  border: 1px solid rgba(94, 234, 212, .3);
  border-radius: 8px;
  background: rgba(13, 148, 136, .18);
  color: rgba(204, 251, 241, .92);
  padding: 8px 10px;
  font-size: 12.5px;
}

/* UX-ROUND-A(2026-07-05 张工试用反馈): 节点默认单节点弹窗——外壳复用 r14 个人偏好弹窗形态 */
.settings-platform-node-defaults-name { cursor: pointer; }
.settings-platform-node-defaults-name:hover strong { color: #9ef3e4; }
.settings-platform-node-default-modal { max-width: 520px; }
.settings-platform-node-default-modal .settings-account-r14-modal-head button { white-space: nowrap; }
.settings-platform-node-default-modal-body { display: grid; gap: 10px; }
.settings-platform-node-default-modal-body label {
  display: grid; gap: 6px; font-size: 12.5px; color: rgba(211, 224, 226, .72); font-weight: 700;
}
.settings-platform-node-default-modal-body select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, .26);
  border-radius: 8px;
  background: rgba(15, 23, 42, .54);
  color: #edf6f7;
  padding: 8px 10px;
  outline: none;
}
body.settings-platform-node-default-modal-open { overflow: hidden; }

.settings-platform-node-defaults-empty {
  border: 1px dashed rgba(148, 163, 184, .35);
  border-radius: 8px;
  padding: 14px 12px;
}

@media (max-width: 900px) {
  /* 移动端: 表格设最小宽度走外层横向滚动(.settings-account-r5-table-scroll), 不许把列压成竖排字 */
  .settings-account-r16-api-table,
  .settings-platform-node-defaults-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);
  }

  .settings-platform-node-defaults-table select {
    max-width: 240px;
  }
}

/* API-R6(2026-07-04) B3: 平台模型设置条「节点默认模型」跳转后的区块高亮 */
.settings-platform-node-defaults-focus {
  outline: 2px solid rgba(125, 211, 252, .7);
  outline-offset: 4px;
  border-radius: 12px;
  transition: outline-color .4s ease;
}

/* 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): 国际引导组(境外模型)可折叠分组头 —— 平铺一堆 → 收拢成一个可展开分组 */
/* 区域负责人城市后台(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
   平台内页白天主题：暖白+墨绿+黄铜金（张工 2026-07-03 批，延续登录页 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。
   只清一级业务视图容器内的,不碰 #settings(owner 可在设置内展开 debug 抽屉)。不分昼夜。 */
body :is(#projects, #ai, #aiMemory, #marketing, #quote, #cases, #materials, #comfyui) > :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) > [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) .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(
  .search, .project-search-field, .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 {
  color: #a4aca8;
}

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,
  .search, .project-search-field
) {
  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; }

/* ==========================================================================
   个人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;
}
/* ⑤ 公司API四分类表分组头(master 257dbb8新恢复): 夜深绿黑渐变白天显脏→浅鼠尾草渐变 */
html[data-meifan-theme="day"] body:not(.home-mode) tr.company-api-r1-category-row > td {
  background: linear-gradient(90deg, #e9f1ea, #f7faf7) !important;
  color: #1e2524;
}

/* ===== DAY-FIX-20260710 张工三纠 ===== */
/* ①节点默认模型面板(settings-company-node-defaults)整块夜深底白天残留→翻白;
     此前只补了 r5-personal-block, company 的这个子面板漏了 */
html[data-meifan-theme="day"] body:not(.home-mode) .settings-company-node-defaults {
  background: #ffffff !important;
  border-color: #e3e6e0 !important;
  color: #1e2524 !important;
}
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]) 排除分组行。 */
.company-api-r1-api-table th:last-child,
.company-api-r1-api-table td:last-child: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 会让钉住格透出底下滚动的内容 → 钉住格保持不透明，只淡格内内容 */
.company-api-r1-api-table th:last-child {
  opacity: 1; /* 43号分片 th 有 opacity:.6 */
}
.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;
}
/* 十一-1 附: 个人模型表分组头夜深底渐变白天显脏——对齐 DAY-SWEEP 已修的公司四分类表分组头口径(浅鼠尾草渐变) */
html[data-meifan-theme="day"] body:not(.home-mode) :is(.settings-account-r16-api-group-row, .settings-account-r16-api-category-row) > td {
  background: linear-gradient(90deg, #e9f1ea, #f7faf7) !important;
  color: #1e2524;
}
html[data-meifan-theme="day"] body:not(.home-mode) .settings-account-r16-api-group-row :is(strong, small, span) {
  color: #16211f;
}

/* —— 六-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-local-search {
    height: 38px;
    width: auto;
    flex: 1 1 150px;
    min-width: 0;
  }
  #projects .project-list-local-search-btn {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
  }
  #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;
}
/* COMPANY-API-SUBSCRIPTION-R1 · 公司 API 管理(只读)+订阅购买页
   独立类 company-api-r1-*，镜像干净 Key 池列表观感，不依赖 R6 未合类。 */

.company-api-r1-entry {
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid rgba(120, 130, 160, 0.24);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}
.company-api-r1-entry-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.company-api-r1-entry-head strong { font-size: 15px; }
.company-api-r1-entry-head small { display: block; margin-top: 2px; opacity: 0.7; font-size: 12px; }
.company-api-r1-entry-head button {
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid rgba(90, 130, 255, 0.4);
  background: rgba(70, 110, 240, 0.14);
  color: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.company-api-r1-entry-head button:hover { background: rgba(70, 110, 240, 0.24); }
.company-api-r1-entry-host { margin-top: 14px; }

.company-api-r1 { display: flex; flex-direction: column; gap: 16px; }
.company-api-r1-head h3 { margin: 0; font-size: 16px; }
.company-api-r1-head small { opacity: 0.7; font-size: 12px; }
.company-api-r1-loading,
.company-api-r1-empty { opacity: 0.7; padding: 14px 4px; text-align: center; }

.company-api-r1-panel {
  border: 1px solid rgba(120, 130, 160, 0.22);
  border-radius: 12px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.015);
}
.company-api-r1-panel-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}
.company-api-r1-panel-head strong { font-size: 14px; }
.company-api-r1-panel-head span { opacity: 0.65; font-size: 12px; }

/* 干净列表 */
.company-api-r1-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(120, 130, 160, 0.14);
  border-radius: 8px;
}

.company-api-r1-model-table {
  width: 100%;
  min-width: 960px;
  border-collapse: collapse;
  font-size: 13px;
}
.company-api-r1-model-table th {
  text-align: left;
  font-weight: 600;
  opacity: 0.6;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(120, 130, 160, 0.2);
}
.company-api-r1-model-table td {
  padding: 10px;
  border-bottom: 1px solid rgba(120, 130, 160, 0.12);
  vertical-align: middle;
}

.company-api-r1-category-row td {
  background: linear-gradient(90deg, rgba(20, 83, 45, 0.24), rgba(7, 16, 28, 0.58));
  color: rgba(230, 245, 247, 0.92);
}

.company-api-r1-category-row strong,
.company-api-r1-category-row small {
  display: inline-flex;
  margin-right: 10px;
}
.company-api-r1-model-name { font-weight: 600; }
.company-api-r1-model-name small { display: block; font-weight: 400; opacity: 0.55; font-size: 11px; margin-top: 2px; }
.company-api-r1-cell-action { text-align: right; }

.company-api-r1-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
}
.company-api-r1-pill.is-ok { background: rgba(48, 170, 110, 0.16); color: #3ec98b; }
.company-api-r1-pill.is-off { background: rgba(190, 130, 60, 0.16); color: #d59a4f; }

.company-api-r1-keypool-btn {
  padding: 5px 12px;
  border-radius: 7px;
  border: 1px solid rgba(120, 130, 160, 0.4);
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  cursor: pointer;
  font-size: 12px;
}
.company-api-r1-keypool-btn:hover { background: rgba(120, 130, 160, 0.16); }

/* 用量摘要 */
.company-api-r1-sub-state { font-size: 14px; margin-bottom: 10px; }
.company-api-r1-sub-badge,
.company-api-r1-sub-state.is-active .company-api-r1-sub-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
}
.company-api-r1-sub-state.is-active .company-api-r1-sub-badge { background: rgba(48, 170, 110, 0.16); color: #3ec98b; }
.company-api-r1-sub-state.is-pending .company-api-r1-sub-badge { background: rgba(190, 130, 60, 0.16); color: #d59a4f; }
.company-api-r1-sub-state.is-expired .company-api-r1-sub-badge { background: rgba(200, 80, 80, 0.16); color: #e07a7a; }
.company-api-r1-usage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}
.company-api-r1-usage-grid article {
  border: 1px solid rgba(120, 130, 160, 0.18);
  border-radius: 10px;
  padding: 10px 12px;
}
.company-api-r1-usage-grid strong { display: block; font-size: 18px; }
.company-api-r1-usage-grid span { opacity: 0.6; font-size: 12px; }

/* 套餐卡 */
.company-api-r1-tier-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}
.company-api-r1-tier-card {
  border: 1px solid rgba(120, 130, 160, 0.24);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.company-api-r1-tier-card.is-current {
  border-color: rgba(90, 130, 255, 0.55);
  box-shadow: 0 0 0 1px rgba(90, 130, 255, 0.3) inset;
}
.company-api-r1-tier-card header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.company-api-r1-tier-card h4 { margin: 0; font-size: 15px; }
.company-api-r1-current-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(90, 130, 255, 0.18);
  color: #7ea0ff;
}
.company-api-r1-tier-prices { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.company-api-r1-price { font-size: 15px; font-weight: 600; }
.company-api-r1-price em { display: block; font-size: 11px; font-weight: 400; opacity: 0.55; font-style: normal; }
.company-api-r1-price-free { opacity: 0.6; font-size: 13px; }
.company-api-r1-tier-meta { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; font-size: 12px; opacity: 0.85; }
.company-api-r1-tier-meta strong { font-weight: 600; }
.company-api-r1-tier-buy { display: flex; gap: 8px; margin-top: auto; }
.company-api-r1-period-select {
  flex: 1;
  min-width: 0;
  padding: 6px 8px;
  border-radius: 7px;
  border: 1px solid rgba(120, 130, 160, 0.4);
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
}
.company-api-r1-apply-btn {
  padding: 6px 14px;
  border-radius: 7px;
  border: 1px solid rgba(90, 130, 255, 0.45);
  background: rgba(70, 110, 240, 0.16);
  color: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.company-api-r1-apply-btn:hover { background: rgba(70, 110, 240, 0.28); }
.company-api-r1-apply-btn:disabled { opacity: 0.6; cursor: default; }
/* SS-30(2026-07-05): 员工态"查看档位"钮=中性只读样式(非蓝色行动色, 不暗示可下单) */
.company-api-r1-apply-btn.is-readonly {
  border-color: rgba(126, 211, 242, 0.35);
  background: rgba(126, 211, 242, 0.08);
}
.company-api-r1-apply-btn.is-readonly:hover { background: rgba(126, 211, 242, 0.14); }
.company-api-r1-sub-readonly-note {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--mf-theme-muted, rgba(207, 230, 238, 0.7));
}

/* 弹层 */
.company-api-r1-modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 24, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}
.company-api-r1-modal-mask[hidden] { display: none; }
.company-api-r1-modal {
  width: min(440px, 100%);
  max-height: 86vh;
  overflow: auto;
  border-radius: 14px;
  border: 1px solid rgba(120, 130, 160, 0.35);
  background: #171b26;
  color: #e6e9f2;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.company-api-r1-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(120, 130, 160, 0.2);
}
.company-api-r1-modal-head strong { font-size: 14px; }
.company-api-r1-modal-close {
  padding: 5px 11px;
  border-radius: 7px;
  border: 1px solid rgba(120, 130, 160, 0.4);
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.company-api-r1-keypool { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.company-api-r1-keypool-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}
.company-api-r1-keypool-row span { opacity: 0.6; }
.company-api-r1-keypool-row strong.is-ok { color: #3ec98b; }
.company-api-r1-keypool-row strong.is-off { color: #d59a4f; }
.company-api-r1-keypool-note { margin: 6px 0 0; font-size: 12px; opacity: 0.6; line-height: 1.6; }

.company-api-r1-order { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.company-api-r1-order-amount { font-size: 14px; }
.company-api-r1-order-amount strong { font-size: 24px; color: #7ea0ff; }
.company-api-r1-order-amount span { display: block; opacity: 0.6; font-size: 12px; margin-top: 2px; }
.company-api-r1-order-remit { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.company-api-r1-order-remit > div { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.company-api-r1-order-remit dt { opacity: 0.6; margin: 0; }
.company-api-r1-order-remit dd { margin: 0; font-weight: 600; text-align: right; word-break: break-all; }
.company-api-r1-order-note { margin: 0; font-size: 12px; opacity: 0.72; line-height: 1.7; }
.company-api-r1-order-note em { font-style: normal; color: #7ea0ff; }

/* SUBSCRIPTION-MODAL-R1(2026-07-05): 订阅购买区收口——当前档位摘要卡 + 订阅/变更按钮(打开全站统一订阅弹窗) */
.company-api-r1-current-tier-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(120, 130, 160, 0.24);
  border-radius: 10px;
  padding: 12px 14px;
}
.company-api-r1-current-tier-summary .company-api-r1-sub-state { margin-bottom: 0; }
.company-api-r1-tier-cards[hidden] { display: none !important; }

/* SS-27 真实用量卡 / SS-29 调用消费记录(2026-07-05) */
.company-api-r1-usage-space { margin: 8px 0 4px; }
.company-api-r1-usage-note {
  margin: 6px 0 0;
  font-size: 11px;
  opacity: 0.55;
  line-height: 1.6;
}
.company-api-r1-usage-log-table { margin-top: 10px; }
.company-api-r1-usage-log-table td small { display: block; opacity: 0.55; font-size: 11px; }

/* 公司Key池前端(2026-07-06) R2-C: 配Key CRUD / 员工只读 / 后端未就绪灰置 */
.company-api-r1-keypool-panel .company-api-r1-panel-head { flex-wrap: wrap; gap: 6px 12px; }
.company-api-r1-keypool-panel.is-backend-pending { opacity: 0.7; }
.company-api-r1-keypool-pending .company-api-r1-empty { padding: 10px 4px 4px; }
.company-api-r1-keypool-table { margin-top: 10px; }
.company-api-r1-key-masked { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; letter-spacing: 0.5px; opacity: 0.85; }
.company-api-r1-cap-chip {
  display: inline-block;
  margin: 0 4px 4px 0;
  padding: 1px 8px;
  font-size: 11px;
  border-radius: 999px;
  background: rgba(120, 130, 160, 0.14);
  border: 1px solid rgba(120, 130, 160, 0.22);
}
.company-api-r1-keypool-btn.is-danger { color: #ff8a8a; border-color: rgba(255, 120, 120, 0.32); }
.company-api-r1-keypool-btn.is-danger:hover { background: rgba(255, 120, 120, 0.14); }
.company-api-r1-keypool-editwrap { margin-top: 12px; }
.company-api-r1-keypool-editwrap[hidden] { display: none !important; }
.company-api-r1-keyform {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(120, 130, 160, 0.24);
  border-radius: 10px;
  background: rgba(120, 130, 160, 0.05);
}
.company-api-r1-keyform-head { font-size: 14px; }
.company-api-r1-keyform label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; opacity: 0.85; }
.company-api-r1-keyform input {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(120, 130, 160, 0.28);
  background: rgba(20, 24, 34, 0.4);
  color: inherit;
  font-size: 13px;
}
.company-api-r1-cap-checks { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 12px; opacity: 0.85; }
.company-api-r1-cap-checks > span { width: 100%; opacity: 0.7; }
.company-api-r1-cap-check { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.company-api-r1-keyform-actions { display: flex; gap: 10px; margin-top: 4px; }
/* 公司Key池R2C契约接通(2026-07-07): 公司自带 Key 免费用量卡(不扣平台积分/免费记录用量)——与调用记录卡同视觉, 上边界分隔。 */
.company-api-r1-keypool-usage { margin-top: 10px; padding-top: 10px; border-top: 1px dashed rgba(120, 130, 160, 0.22); }
.company-api-r1-keypool-usage .company-api-r1-usage-grid { margin: 4px 0 6px; }

/* R1-C Task3(2026-07-10): 公司 Key 行内上游原名/验证状态小字——原六列排版不变, 只在模型名称列内追加 */
.company-api-r1-upstream,
.company-api-r1-verification {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  color: rgba(148, 163, 184, 0.92);
  word-break: break-all;
}
.company-api-r1-verification.is-unverified { color: rgba(253, 230, 138, 0.88); }
.company-api-r1-verification.is-contract_pass { color: rgba(191, 219, 254, 0.9); }
.company-api-r1-verification.is-live_pass { color: rgba(153, 246, 228, 0.9); }
.company-api-r1-verification.is-blocked { color: rgba(254, 202, 202, 0.95); }
/* 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; }
}
/* 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-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-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;
}

.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-grant-list { grid-template-columns: 1fr; } /* 设置D积分排版: 窄屏月度发放摘要单列 */
}
/* ========== 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-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; }
.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-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; }
}
/* 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; }
/* 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; }
}
