/* ============================================================
   Airshelf · Restraint V2.1 · Firecrawl-aligned · 纯净版
   ============================================================
   严格遵循 DESIGN_SPEC_V2.md V2.1 · 不含任何 V1/V2 legacy alias
   ============================================================ */

/* ============ Web font · Alibaba PuHuiTi 3.0 ============ */
@font-face {
  font-family: 'Alibaba PuHuiTi';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: local('Alibaba PuHuiTi 3.0'),
       local('AlibabaPuHuiTi-3-55-Regular'),
       local('Alibaba PuHuiTi 2.0'),
       local('AlibabaPuHuiTi-2-55-Regular'),
       url('https://chinese-fonts-cdn.deno.dev/packages/alibaba_puhuiti/dist/AlibabaPuHuiTi-3-55-Regular/AlibabaPuHuiTi-3-55-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Alibaba PuHuiTi';
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: local('Alibaba PuHuiTi 3.0 Medium'),
       local('AlibabaPuHuiTi-3-65-Medium'),
       local('AlibabaPuHuiTi-2-65-Medium'),
       url('https://chinese-fonts-cdn.deno.dev/packages/alibaba_puhuiti/dist/AlibabaPuHuiTi-3-65-Medium/AlibabaPuHuiTi-3-65-Medium.woff2') format('woff2');
}
@font-face {
  font-family: 'Alibaba PuHuiTi';
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: local('AlibabaPuHuiTi-3-75-SemiBold'),
       local('AlibabaPuHuiTi-2-75-SemiBold'),
       url('https://chinese-fonts-cdn.deno.dev/packages/alibaba_puhuiti/dist/AlibabaPuHuiTi-3-75-SemiBold/AlibabaPuHuiTi-3-75-SemiBold.woff2') format('woff2');
}
@font-face {
  font-family: 'Alibaba PuHuiTi';
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: local('Alibaba PuHuiTi 3.0 Bold'),
       local('AlibabaPuHuiTi-3-85-Bold'),
       local('AlibabaPuHuiTi-2-85-Bold'),
       url('https://chinese-fonts-cdn.deno.dev/packages/alibaba_puhuiti/dist/AlibabaPuHuiTi-3-85-Bold/AlibabaPuHuiTi-3-85-Bold.woff2') format('woff2');
}

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* ===== Backgrounds (冷灰) ===== */
  --background-base:    #f9f9f9;
  --background-lighter: #fbfbfb;
  --surface:            #ffffff;
  --surface-raised:     #ffffff;

  /* ===== Borders (冷灰 3 档,语义优先) ===== */
  --border-faint: #ededed;
  --border-muted: #e8e8e8;
  --border-loud:  #e6e6e6;

  /* ===== Accent multi-color (5 色信号) ===== */
  --accent-black:    #262626;
  --accent-white:    #ffffff;
  --accent-amethyst: #9061ff;
  --accent-bluetron: #2a6dfb;
  --accent-crimson:  #eb3424;
  --accent-forest:   #42c366;
  --accent-honey:    #ecb730;

  /* status 配套底/边 */
  --forest-bg:  rgba(66, 195, 102, .08);
  --forest-bd:  rgba(66, 195, 102, .20);
  --crimson-bg: rgba(235, 52,  36,  .08);
  --crimson-bd: rgba(235, 52,  36,  .20);
  --honey-bg:   rgba(236, 183, 48,  .08);
  --honey-bd:   rgba(236, 183, 48,  .20);

  /* ===== Heat · 单 hue + 8 档 alpha ===== */
  --heat:    #fa5d19;
  --heat-90: rgba(250, 93, 25, .90);
  --heat-40: rgba(250, 93, 25, .40);
  --heat-20: rgba(250, 93, 25, .20);
  --heat-16: rgba(250, 93, 25, .16);
  --heat-12: rgba(250, 93, 25, .12);
  --heat-8:  rgba(250, 93, 25, .08);
  --heat-4:  rgba(250, 93, 25, .04);

  /* ===== Black-alpha 阶梯 (20 档) ===== */
  --black-alpha-1:  rgba(0, 0, 0, .01);
  --black-alpha-2:  rgba(0, 0, 0, .02);
  --black-alpha-3:  rgba(0, 0, 0, .03);
  --black-alpha-4:  rgba(0, 0, 0, .04);
  --black-alpha-5:  rgba(0, 0, 0, .05);
  --black-alpha-6:  rgba(0, 0, 0, .06);
  --black-alpha-7:  rgba(0, 0, 0, .07);
  --black-alpha-8:  rgba(0, 0, 0, .08);
  --black-alpha-10: rgba(0, 0, 0, .10);
  --black-alpha-12: rgba(0, 0, 0, .12);
  --black-alpha-16: rgba(0, 0, 0, .16);
  --black-alpha-20: rgba(0, 0, 0, .20);
  --black-alpha-24: rgba(0, 0, 0, .24);
  --black-alpha-32: rgba(38, 38, 38, .32);
  --black-alpha-40: rgba(38, 38, 38, .40);
  --black-alpha-48: rgba(38, 38, 38, .48);
  --black-alpha-56: rgba(38, 38, 38, .56);
  --black-alpha-64: rgba(38, 38, 38, .64);
  --black-alpha-72: rgba(38, 38, 38, .72);
  --black-alpha-88: rgba(38, 38, 38, .88);

  /* ===== Radius ===== */
  --r-sm:   4px;
  --r-md:   8px;
  --r-pill: 999px;

  /* ===== Font · 关键:--font-mono 必须含 PuHuiTi 中文 fallback ===== */
  /* Inter 不含 CJK 字形。
     字体链按字符级 fallthrough,中文字符会找下一个候选 —— 必须包含 PuHuiTi。 */
  --font-sans:  'Inter', 'Alibaba PuHuiTi', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --font-inter: 'Inter', system-ui, sans-serif;
  --font-mono:  'Inter', 'Alibaba PuHuiTi', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;

  /* ===== Transition ===== */
  --t-fast: 100ms ease;
  --t-base: 200ms ease;
  --t-slow: 300ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* ===== Shadows ===== */
  --shadow-cta:
    inset 0 -4px 8px rgba(250, 93, 25, .20),
    0 1px 1px rgba(250, 93, 25, .12),
    0 2px 4px rgba(250, 93, 25, .10),
    0 .5px .5px rgba(250, 93, 25, .16);
  --shadow-cta-hover:
    inset 0 -4px 8px rgba(250, 93, 25, .20),
    0 1px 1px rgba(250, 93, 25, .16),
    0 4px 8px rgba(250, 93, 25, .20),
    0 .5px .5px rgba(250, 93, 25, .16);
  --shadow-cta-active:
    inset 0 -4px 8px rgba(250, 93, 25, .28),
    0 1px 2px rgba(250, 93, 25, .16);
  --shadow-floating: 0 4px 20px rgba(21, 20, 15, .06);
}

::selection { background: var(--heat-20); color: var(--heat); }

html, body {
  background: var(--background-base);
  color: var(--accent-black);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, textarea, select { font: inherit; color: inherit; outline: none; }
img, svg, video { display: block; max-width: 100%; }

/* ─── Icon system · Lucide-line only ─── */
:root {
  --icon-stroke: 1.5;
  --icon-xs: 12px;
  --icon-s: 14px;
  --icon-m: 16px;
  --icon-l: 20px;
  --icon-xl: 24px;
}
.ui-icon {
  width: var(--icon-m);
  height: var(--icon-m);
  flex: 0 0 auto;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: var(--icon-stroke);
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ui-icon * { vector-effect: non-scaling-stroke; }
.ui-icon [stroke="none"] {
  fill: currentColor;
  stroke: none;
}
:where(nav a, .search-box, .balance-chip, .queue-chip, .icon-btn, .btn, .chip, .toolbar, .page-head, .toast, .modal, .drawer, .card-del-btn, .row-more, .gen-img-btn, .shortcut, .empty-state) svg:not(.corner):not(.quote-icon) {
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: var(--icon-stroke);
  stroke-linecap: round;
  stroke-linejoin: round;
}
:where(nav a, .search-box, .balance-chip, .queue-chip, .icon-btn, .btn, .chip, .toolbar, .page-head, .toast, .modal, .drawer, .card-del-btn, .row-more, .gen-img-btn, .shortcut, .empty-state) svg:not(.corner):not(.quote-icon) [fill="currentColor"] {
  fill: none;
  stroke: currentColor;
}
:where(nav a, .search-box, .balance-chip, .queue-chip, .icon-btn, .btn, .chip, .toolbar, .page-head, .toast, .modal, .drawer, .card-del-btn, .row-more, .gen-img-btn, .shortcut, .empty-state) svg:not(.corner):not(.quote-icon) [stroke="none"] {
  fill: currentColor;
  stroke: none;
}
.row-more svg circle {
  fill: currentColor !important;
  stroke: none !important;
}

.num, .tnum { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--black-alpha-56); }
.muted-2 { color: var(--black-alpha-48); }
.spacer { flex: 1; }
.hstack { display: flex; align-items: center; gap: 8px; }
.hstack[hidden], .vstack[hidden] { display: none; }
.vstack { display: flex; flex-direction: column; gap: 8px; }
.divider { height: 1px; background: var(--border-faint); margin: 16px 0; }

/* ─── App shell ─── */
.app {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
  transition: grid-template-columns var(--t-base);
}
body.sidebar-collapsed .app { grid-template-columns: 96px 1fr; }

/* ─── Sidebar ─── */
aside.sidebar {
  padding: 22px 16px;
  border-right: 1px solid var(--border-faint);
  background: var(--background-base);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  transition: padding var(--t-base);
}
.sidebar-head {
  display: flex;
  align-items: center;
  padding: 2px 8px 16px;
  min-height: 44px;
}
.brand { display: flex; align-items: center; min-width: 0; color: var(--accent-black); }
.brand-clip {
  display: block;
  width: 142px;
  overflow: hidden;
  transition: width var(--t-base);
}
.brand-logo { display: block; width: 142px; max-width: none; height: auto; margin: -8px 0 -6px -8px; object-fit: contain; }
.brand-mark, .flame { width: 22px; height: 22px; color: var(--heat); }
.brand-mark svg, .flame svg { width: 100%; height: 100%; }
.brand .name { font-weight: 600; font-size: 18px; letter-spacing: -.012em; color: var(--accent-black); }
.sidebar-toggle {
  position: fixed;
  top: 0;
  left: 220px;
  z-index: 70;
  width: 28px;
  height: 100vh;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--black-alpha-48);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 1;
  pointer-events: auto;
  transition: color var(--t-base), background var(--t-base);
}
.sidebar-toggle:hover,
.sidebar-toggle:focus-visible {
  background: var(--black-alpha-4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: var(--accent-black);
  outline: none;
}
.sidebar-toggle-icon {
  display: block;
  opacity: 0;
  line-height: 1;
  transition: opacity var(--t-base);
}
.sidebar-toggle:hover .sidebar-toggle-icon,
.sidebar-toggle:focus-visible .sidebar-toggle-icon { opacity: 1; }
.sidebar-toggle-icon--expand { display: none; }

/* sidebar search · Ctrl K Inter Bold 平铺 */
.search-box {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  background: var(--surface);
  border: 1px solid var(--border-faint);
  border-radius: var(--r-md);
  color: var(--black-alpha-48);
  margin-bottom: 18px;
  cursor: text;
  transition: border-color var(--t-base);
}
.search-box:hover { border-color: var(--black-alpha-24); }
.search-box:focus-within { border-color: var(--heat-40); box-shadow: inset 0 0 0 1px var(--heat-40); }
.search-box svg { width: var(--icon-m); height: var(--icon-m); flex-shrink: 0; color: var(--black-alpha-56); }
.search-box input {
  flex: 1; min-width: 0;
  border: 0; background: transparent;
  font-size: 13.5px; color: var(--accent-black);
  padding: 0;
}
.search-box input::placeholder { color: var(--black-alpha-48); }
.search-box .kbd {
  margin-left: auto;
  flex-shrink: 0;
  white-space: nowrap;
  font-family: var(--font-inter);
  font-weight: 700;
  font-size: 11px;
  color: var(--black-alpha-48);
  letter-spacing: .02em;
}

.nav-section {
  font-size: 11px; color: var(--black-alpha-48);
  padding: 16px 12px 8px;
  letter-spacing: .04em;
  font-weight: 500;
  /* 中文标签用 sans 字体,不用 mono + uppercase */
}
nav { display: flex; flex-direction: column; gap: 2px; }
nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px;
  color: var(--black-alpha-56);
  font-size: 13.5px; font-weight: 500;
  border-radius: var(--r-md);
  cursor: pointer;
  user-select: none;
  transition: background var(--t-base), color var(--t-base);
}
nav a:hover { background: var(--black-alpha-4); color: var(--accent-black); }
nav a.active { background: var(--heat-12); color: var(--heat); }
nav a svg { width: var(--icon-m); height: var(--icon-m); opacity: .85; }
nav a.active svg { opacity: 1; }
nav a .pill-mini {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 9.5px; font-weight: 600;
  padding: 2px 7px;
  background: var(--surface);
  color: var(--black-alpha-48);
  border: 1px solid var(--border-faint);
  border-radius: var(--r-pill);
  letter-spacing: .04em;
}
nav a.disabled { color: var(--black-alpha-32); cursor: not-allowed; }
nav a.disabled:hover { background: transparent; color: var(--black-alpha-32); }
.aside-foot { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border-faint); }
.user {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background var(--t-base);
}
.user:hover { background: var(--black-alpha-4); }
.user .av {
  width: 26px; height: 26px;
  border-radius: 6px;
  background: var(--accent-black);
  color: var(--accent-white);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 11px;
}
.user .em { font-size: 13px; color: var(--accent-black); }

body.sidebar-collapsed aside.sidebar { padding: 22px 12px; }
body.sidebar-collapsed .sidebar-head { gap: 6px; padding: 2px 0 16px; }
body.sidebar-collapsed .brand-clip {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
}
body.sidebar-collapsed .sidebar-toggle { left: 68px; }
body.sidebar-collapsed .sidebar-toggle-icon--collapse { display: none; }
body.sidebar-collapsed .sidebar-toggle-icon--expand { display: block; }
body.sidebar-collapsed .search-box {
  justify-content: center;
  gap: 0;
  padding: 9px 0;
  cursor: pointer;
}
body.sidebar-collapsed .search-box input,
body.sidebar-collapsed .search-box .kbd,
body.sidebar-collapsed aside.sidebar nav a span,
body.sidebar-collapsed aside.sidebar nav a .pill-mini,
body.sidebar-collapsed .user .em { display: none; }
body.sidebar-collapsed .nav-section {
  height: 1px;
  margin: 10px 0 8px;
  padding: 0;
  overflow: hidden;
  color: transparent;
  background: var(--border-faint);
}
body.sidebar-collapsed aside.sidebar nav a {
  justify-content: center;
  gap: 0;
  padding: 10px 0;
}
body.sidebar-collapsed .aside-foot { padding-top: 12px; }
body.sidebar-collapsed .user {
  justify-content: center;
  padding: 8px 0;
}

/* ─── Main + grid background ─── */
main { position: relative; background: var(--background-base); min-width: 0; }
.grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><g stroke='%23c8c8c8' stroke-width='1' fill='none'><path d='M-5 0 L5 0 M0 -5 L0 5'/><path d='M235 0 L245 0 M240 -5 L240 5'/><path d='M-5 240 L5 240 M0 235 L0 245'/><path d='M235 240 L245 240 M240 235 L240 245'/></g></svg>"),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='60' height='60'><circle cx='60' cy='60' r='0.9' fill='%23d8d8d8'/></svg>"),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><g stroke='%23ebebeb' stroke-width='1' fill='none' stroke-dasharray='1.5 4'><path d='M240 0 L240 240'/><path d='M0 240 L240 240'/></g></svg>");
  background-size: 240px 240px, 60px 60px, 240px 240px;
  mask-image: radial-gradient(ellipse 95% 80% at 50% 35%, #000 25%, transparent 95%);
  -webkit-mask-image: radial-gradient(ellipse 95% 80% at 50% 35%, #000 25%, transparent 95%);
}
.scatter {
  position: absolute;
  font-family: var(--font-mono); font-size: 8.5px; line-height: 1.05;
  color: var(--black-alpha-20); white-space: pre; pointer-events: none;
  opacity: .85; letter-spacing: .04em;
}
.tag-corner {
  position: absolute;
  color: var(--black-alpha-48);
  font-family: var(--font-mono);
  font-size: 10.5px; letter-spacing: .06em;
  pointer-events: none; opacity: .85; z-index: 1;
}
.sq-mark { position: absolute; width: 5px; height: 5px; background: var(--black-alpha-24); pointer-events: none; }

/* ─── Topbar ─── */
.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--border-faint);
  background: var(--background-base);
  position: sticky; top: 0; z-index: 50;
}
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--black-alpha-48); }
.crumbs .sep { color: var(--black-alpha-32); }
.crumbs .here { color: var(--accent-black); font-weight: 500; }
.crumbs a:hover { color: var(--accent-black); }
.topbar .right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.balance-chip {
  display: inline-flex; align-items: center; gap: 7px;
  height: 36px;
  padding: 0 14px 0 12px;
  background: var(--surface);
  border: 1px solid var(--border-faint);
  border-radius: var(--r-pill);
  font-size: 13px;
  color: var(--black-alpha-56);
  cursor: pointer;
  transition: background var(--t-base), border-color var(--t-base);
}
.balance-chip:hover { background: var(--black-alpha-4); border-color: var(--black-alpha-24); }
.balance-chip strong { color: var(--accent-black); font-weight: 600; font-variant-numeric: tabular-nums; }
.balance-chip svg { width: var(--icon-m); height: var(--icon-m); color: var(--heat); }
.icon-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border-faint);
  border-radius: var(--r-pill);
  color: var(--black-alpha-56);
  cursor: pointer;
  position: relative;
  transition: background var(--t-base), border-color var(--t-base), color var(--t-base);
}
.icon-btn:hover { background: var(--black-alpha-4); color: var(--accent-black); border-color: var(--black-alpha-24); }
.icon-btn svg { width: var(--icon-m); height: var(--icon-m); }
.icon-btn .dot-noti {
  position: absolute; top: 8px; right: 9px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--heat); border: 1.5px solid var(--surface);
}
.icon-btn .count-noti {
  position: absolute; top: -4px; right: -4px;
  min-width: 16px; height: 16px; padding: 0 4px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-crimson); color: var(--accent-white);
  border: 1.5px solid var(--surface);
  border-radius: var(--r-pill);
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 600;
  letter-spacing: .02em; line-height: 1;
  pointer-events: none;
}

/* ─── Topbar · 任务队列 chip ─── */
.queue-chip {
  display: inline-flex; align-items: center; gap: 7px;
  height: 36px;
  padding: 0 8px 0 12px;
  background: var(--surface);
  border: 1px solid var(--border-faint);
  border-radius: var(--r-pill);
  font-size: 13px;
  color: var(--accent-black);
  cursor: pointer;
  transition: background var(--t-base), border-color var(--t-base);
}
.queue-chip:hover { background: var(--black-alpha-4); border-color: var(--black-alpha-24); }
.queue-chip[hidden] { display: none; }
.queue-chip svg { width: var(--icon-m); height: var(--icon-m); color: var(--black-alpha-56); }
.queue-chip .count {
  display: inline-flex; align-items: center; justify-content: center;
  height: 20px; min-width: 20px; padding: 0 6px;
  background: var(--heat-12); color: var(--heat);
  border: 1px solid var(--heat-20);
  border-radius: var(--r-pill);
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 600;
  letter-spacing: .02em;
}

/* ─── Topbar · 头像 ─── */
.topbar-avatar {
  width: 36px; height: 36px;
  border-radius: var(--r-pill);
  background: var(--accent-black);
  color: var(--accent-white);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border-faint);
  transition: transform var(--t-fast), box-shadow var(--t-base);
  flex-shrink: 0;
  overflow: hidden;
}
.topbar-avatar:hover {
  transform: scale(1.04);
  box-shadow: 0 0 0 3px var(--heat-12);
}
.topbar-avatar img {
  width: 100%; height: 100%; object-fit: cover;
}

/* ─── Content ─── */
.content {
  padding: 48px 28px 72px;
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 64px);
}

.content > .corner-mark { display: none; }
.page-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 36px; gap: 16px; flex-wrap: wrap;
}
.page-head h1 {
  font-size: 28px; font-weight: 600; letter-spacing: -.02em; line-height: 1.25;
  color: var(--accent-black);
}
.page-head .sub {
  font-size: 14px; color: var(--black-alpha-56);
  margin-top: 10px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.page-head .sub .mono { font-family: var(--font-mono); font-size: 11.5px; color: var(--black-alpha-48); letter-spacing: .04em; }
.page-head .actions { display: flex; gap: 10px; align-items: center; }
/* page-head 右上角主操作按钮 · 统一尺寸(对齐 .btn-lg),覆盖各页里 btn / btn-sm / btn-lg 混用 */
.page-head .actions > .btn,
.page-head .actions > a.btn,
.page-head .actions > button.btn {
  height: 40px;
  padding: 0 20px;
  font-size: 13.5px;
}
.page-head .actions > .btn svg { width: var(--icon-s); height: var(--icon-s); }
.page-head .actions > .btn.btn-create svg { width: var(--icon-m); height: var(--icon-m); }

.section-h { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.section-h h2 { font-size: 16px; font-weight: 600; letter-spacing: -.01em; color: var(--accent-black); }
.section-h .more {
  font-family: var(--font-mono); font-size: 11.5px;
  color: var(--black-alpha-48); letter-spacing: .04em;
  cursor: pointer;
  transition: color var(--t-base);
}
.section-h .more:hover { color: var(--heat); }

/* ─── Buttons · 统一高度 36 / 8 px 圆角 / 真 1px border / hover bg 切换 ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px;
  padding: 0 16px;
  border-radius: var(--r-md);
  font-size: 13px; font-weight: 500;
  background: var(--surface);
  color: var(--accent-black);
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  border: 1px solid var(--black-alpha-12);
  transition: background var(--t-base), border-color var(--t-base), transform var(--t-fast);
}
.btn:hover { background: var(--black-alpha-4); border-color: var(--black-alpha-24); }
.btn:active { background: var(--black-alpha-7); transform: scale(.99); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--background-base), 0 0 0 4px var(--heat-40); }
.btn:disabled, .btn.disabled {
  color: var(--black-alpha-32);
  background: var(--black-alpha-5);
  border-color: var(--black-alpha-12);
  cursor: not-allowed;
  transform: none;
}
.btn:disabled:hover, .btn.disabled:hover {
  background: var(--black-alpha-5);
  border-color: var(--black-alpha-12);
}
.btn svg { width: var(--icon-s); height: var(--icon-s); }
.btn[hidden] { display: none; }

.btn-primary {
  background: var(--heat);
  color: var(--accent-white);
  border-color: var(--heat);
  font-weight: 600;
  /* 继承 .btn 的 height: 36px / padding: 0 16px */
  box-shadow: var(--shadow-cta);
}
.btn-primary:hover {
  background: var(--heat);
  border-color: var(--heat);
  box-shadow: var(--shadow-cta-hover);
}
.btn-primary:active {
  background: var(--heat);
  transform: scale(.995);
  box-shadow: var(--shadow-cta-active);
}
.btn-primary:disabled, .btn-primary.disabled {
  background: var(--heat-40);
  color: var(--accent-white);
  border-color: var(--heat-40);
  box-shadow: none;
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--black-alpha-56);
}
.btn-ghost:hover { background: var(--black-alpha-4); border-color: transparent; color: var(--accent-black); }
.btn-ghost:active { background: var(--black-alpha-7); }

.btn-sm { height: 28px; padding: 0 12px; font-size: 12px; border-radius: var(--r-md); }
.btn-lg { height: 40px; padding: 0 20px; font-size: 13.5px; }

/* ─── Pills ─── */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: 11.5px; font-weight: 500;
  border: 1px solid var(--border-faint);
  background: var(--surface);
  color: var(--black-alpha-56);
  white-space: nowrap;
}
.pill.info { background: var(--heat-12); color: var(--heat); border-color: var(--heat-20); }
.pill.ok { background: var(--forest-bg); color: var(--accent-forest); border-color: var(--forest-bd); }
.pill.err { background: var(--crimson-bg); color: var(--accent-crimson); border-color: var(--crimson-bd); }
.pill.neutral { background: var(--black-alpha-4); color: var(--black-alpha-56); border-color: var(--border-faint); }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ─── Cards / containers · V2.1 统一 8 px 圆角 ─── */
.card-hard {
  background: var(--surface);
  border: 1px solid var(--border-faint);
  border-radius: var(--r-md);
  position: relative;
}
/* V2.1 spec §5.3 · 容器四角准星 · SVG 圆弧内凹(22×21 viewBox) */
.card-hard.with-corners::before, .card-hard.with-corners::after,
.with-corners .corner-tr, .with-corners .corner-bl {
  content: ''; position: absolute;
  width: 14px; height: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 21' fill='%23e8e8e8'%3E%3Cpath d='M10.5 4C10.5 7.31371 7.81371 10 4.5 10H0.5V11H4.5C7.81371 11 10.5 13.6863 10.5 17V21H11.5V17C11.5 13.6863 14.1863 11 17.5 11H21.5V10H17.5C14.1863 10 11.5 7.31371 11.5 4V0H10.5V4Z'/%3E%3C/svg%3E") no-repeat center;
  background-size: contain;
  pointer-events: none;
}
.card-hard.with-corners::before { top: -7px; left: -7px; }
.card-hard.with-corners::after { bottom: -7px; right: -7px; }
.with-corners .corner-tr { top: -7px; right: -7px; }
.with-corners .corner-bl { bottom: -7px; left: -7px; }

/* ─── Stats (KPI bar) ─── */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border-faint);
  border-radius: var(--r-md);
  position: relative;
  margin-bottom: 36px;
  overflow: hidden;
}
.stat {
  padding: 24px 28px;
  border-right: 1px solid var(--border-faint);
  position: relative;
  cursor: pointer;
  transition: background var(--t-base);
}
.stat:hover { background: var(--black-alpha-4); }
.stat:last-child { border-right: 0; }
.stat .lbl {
  font-size: 12.5px; color: var(--black-alpha-48);
  font-weight: 500; display: flex; align-items: center; gap: 8px;
}
.stat .lbl .badge {
  font-family: var(--font-mono);
  font-size: 10px; color: var(--black-alpha-48);
  background: var(--black-alpha-4);
  padding: 1px 7px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-faint);
  letter-spacing: .04em;
}
.stat .v {
  font-size: 32px; font-weight: 600; letter-spacing: -.02em;
  line-height: 1.1; margin-top: 14px;
  font-variant-numeric: tabular-nums;
  color: var(--accent-black);
}
.stat .v small { font-size: 15px; color: var(--black-alpha-48); font-weight: 500; margin-left: 2px; }
.stat .delta {
  font-family: var(--font-mono); font-size: 11px;
  margin-top: 10px; color: var(--black-alpha-48); letter-spacing: .02em;
}
.stat .delta.up { color: var(--accent-forest); }
.stat .bar { height: 5px; background: var(--black-alpha-7); border-radius: 3px; margin-top: 14px; overflow: hidden; }
.stat .bar > span { display: block; height: 100%; background: var(--heat); border-radius: 3px; }
.stat .sub {
  font-family: var(--font-mono); font-size: 10.5px;
  color: var(--black-alpha-48); margin-top: 10px; letter-spacing: .02em;
}

/* ─── Form fields ─── */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.field-label { font-size: 13px; font-weight: 500; color: var(--accent-black); }
.field-label .req { color: var(--accent-crimson); margin-left: 2px; }
.field-hint { font-size: 12px; color: var(--black-alpha-48); }
.input, .textarea, .select {
  height: 36px;
  padding: 0 14px;
  background: var(--surface);
  border: 1px solid var(--black-alpha-12);
  border-radius: var(--r-md);
  font-size: 13.5px;
  width: 100%;
  font-family: inherit;
  color: var(--accent-black);
  transition: border-color var(--t-base), box-shadow var(--t-base), background var(--t-base);
}
.input:hover, .textarea:hover, .select:hover { border-color: var(--black-alpha-24); }
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--heat-40);
  box-shadow: inset 0 0 0 1px var(--heat-40);
}
.input::placeholder, .textarea::placeholder { color: var(--black-alpha-48); }
.input:disabled, .textarea:disabled, .select:disabled {
  background: var(--black-alpha-5);
  color: var(--black-alpha-32);
  cursor: not-allowed;
}
.textarea { height: auto; min-height: 88px; padding: 12px 14px; line-height: 1.6; resize: vertical; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16' fill='none'><path d='M4 6l4 4 4-4' stroke='%237a7a7a' stroke-width='1.4'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

/* ─── Tabs ─── */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border-faint); margin-bottom: 20px; }
.tab {
  padding: 10px 14px; font-size: 13px;
  color: var(--black-alpha-56);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  font-weight: 500; user-select: none;
  transition: color var(--t-base), background var(--t-base);
  border-radius: var(--r-md) var(--r-md) 0 0;
}
.tab:hover { color: var(--accent-black); background: var(--black-alpha-4); }
.tab.active { color: var(--accent-black); border-bottom-color: var(--heat); }
.tab .count {
  font-family: var(--font-mono); font-size: 10.5px;
  color: var(--black-alpha-48); margin-left: 6px;
  padding: 1px 7px;
  background: var(--black-alpha-4);
  border-radius: var(--r-sm); letter-spacing: .04em;
}
.tab.active .count { background: var(--heat-12); color: var(--heat); }

/* ─── Filter chips · 统一高度 36 px 与 .btn / .input 对齐 ─── */
.chip {
  height: 36px; padding: 0 14px;
  border: 1px solid var(--border-faint);
  background: var(--surface);
  border-radius: var(--r-md);
  font-size: 13px;
  color: var(--black-alpha-56);
  display: inline-flex; align-items: center; gap: 6px;
  cursor: pointer;
  font-family: inherit;
  transition: background var(--t-base), border-color var(--t-base), color var(--t-base);
}
.chip:hover { background: var(--black-alpha-4); border-color: var(--black-alpha-24); color: var(--accent-black); }
.chip.active { border-color: var(--heat-40); color: var(--heat); background: var(--heat-12); }
.chip svg { width: 12px; height: 12px; }

/* ─── Toolbar ─── */
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.toolbar .search-inline {
  position: relative; flex: 1; max-width: 360px;
}
.toolbar .search-inline svg {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--black-alpha-56); width: 14px; height: 14px;
  z-index: 2; pointer-events: none;
}
.toolbar .search-inline input { padding-left: 36px; }

/* ─── Chip dropdown · 共享组件 ─── */
.chip-wrap { position: relative; display: inline-flex; }
.chip-wrap .chip svg.caret { transition: transform .15s; }
.chip-wrap.open .chip svg.caret { transform: rotate(180deg); }
.chip-menu {
  position: absolute; top: calc(100% + 4px); left: 0;
  min-width: 200px;
  background: var(--surface);
  border: 1px solid var(--border-faint);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-floating);
  padding: 4px;
  z-index: 50;
  display: none;
  max-height: 320px;
  overflow-y: auto;
}
.chip-wrap.open .chip-menu { display: block; }
.chip-menu.align-right { left: auto; right: 0; }
.chip-menu .mi {
  height: 32px; padding: 0 10px;
  font-size: 13px; color: var(--accent-black);
  display: flex; align-items: center; gap: 8px;
  border-radius: var(--r-sm);
  cursor: pointer;
  white-space: nowrap;
}
.chip-menu .mi:hover { background: var(--black-alpha-4); }
.chip-menu .mi.selected { color: var(--heat); background: var(--heat-12); }
.chip-menu .mi .mi-check { width: 13px; height: 13px; color: var(--heat); opacity: 0; flex-shrink: 0; }
.chip-menu .mi.selected .mi-check { opacity: 1; }
.chip-menu .mi-sep { height: 1px; background: var(--border-faint); margin: 4px 6px; }

/* ─── Dropdown unification · 下拉框 / 菜单视觉收口 ─── */
select.select,
select.v-select,
select.nm-select,
select.duration-select,
.filter-bar select {
  appearance: none !important;
  height: 36px !important;
  padding: 0 32px 0 14px !important;
  background-color: var(--surface) !important;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16' fill='none'><path d='M4 6l4 4 4-4' stroke='%237a7a7a' stroke-width='1.4'/></svg>") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  border: 1px solid var(--black-alpha-12) !important;
  border-radius: var(--r-md) !important;
  color: var(--accent-black) !important;
  font-family: inherit !important;
  font-size: 13.5px !important;
  transition: border-color var(--t-base), box-shadow var(--t-base), background var(--t-base) !important;
}
select.select:hover,
select.v-select:hover,
select.nm-select:hover,
select.duration-select:hover,
.filter-bar select:hover {
  border-color: var(--black-alpha-24) !important;
}
select.select:focus,
select.v-select:focus,
select.nm-select:focus,
select.duration-select:focus,
.filter-bar select:focus {
  border-color: var(--heat-40) !important;
  box-shadow: inset 0 0 0 1px var(--heat-40) !important;
}

.pd-toolbar .filter,
.pp-toolbar .pp-chip,
.mp-main-h .tb-chip,
.pc-main-h .tb-chip {
  height: 36px !important;
  padding: 0 14px !important;
  gap: 6px !important;
  background: var(--surface) !important;
  border: 1px solid var(--border-faint) !important;
  border-radius: var(--r-md) !important;
  color: var(--black-alpha-56) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  transition: background var(--t-base), border-color var(--t-base), color var(--t-base) !important;
}
.pd-toolbar .filter:hover,
.pp-toolbar .pp-chip:hover,
.mp-main-h .tb-chip:hover,
.pc-main-h .tb-chip:hover {
  background: var(--black-alpha-4) !important;
  border-color: var(--black-alpha-24) !important;
  color: var(--accent-black) !important;
}
.pd-toolbar .filter.open,
.pd-toolbar .filter.filtered,
.pp-toolbar .pp-chip.active,
.mp-main-h .tb-chip.active,
.pc-main-h .tb-chip.active {
  background: var(--heat-12) !important;
  border-color: var(--heat-40) !important;
  color: var(--heat) !important;
}

:where(.chip-menu, .filter-pop, .pp-menu, .tb-menu, .io-param-menu, .move-menu, .cell-more-menu, .msg-more-menu, .batch-more-menu) {
  background: var(--surface) !important;
  border: 1px solid var(--border-faint) !important;
  border-radius: var(--r-md) !important;
  box-shadow: var(--shadow-floating) !important;
  padding: 4px !important;
}
:where(
  .chip-menu .mi,
  .filter-pop button,
  .pp-menu .mi,
  .tb-menu-item,
  .io-param-menu .mi,
  .move-menu .mv-item,
  .cell-more-menu button,
  .msg-more-menu button,
  .batch-more-menu button
) {
  min-height: 32px !important;
  padding: 0 10px !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: var(--r-sm) !important;
  color: var(--accent-black) !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-family: inherit !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  text-align: left !important;
  cursor: pointer !important;
  transition: background var(--t-base), color var(--t-base) !important;
}
:where(
  .chip-menu .mi,
  .filter-pop button,
  .pp-menu .mi,
  .tb-menu-item,
  .io-param-menu .mi,
  .move-menu .mv-item,
  .cell-more-menu button,
  .msg-more-menu button,
  .batch-more-menu button
):hover {
  background: var(--black-alpha-4) !important;
  color: var(--accent-black) !important;
}
:where(
  .chip-menu .mi.selected,
  .filter-pop button.selected,
  .pp-menu .mi.selected,
  .tb-menu-item.active,
  .io-param-menu .mi.selected
) {
  background: var(--heat-12) !important;
  color: var(--heat) !important;
  font-weight: 500 !important;
}
:where(.cell-more-menu button.danger:hover, .msg-more-menu button.danger:hover, .batch-more-menu button.danger:hover) {
  background: var(--crimson-bg) !important;
  color: var(--accent-crimson) !important;
}
:where(.tb-menu-empty) {
  color: var(--black-alpha-48) !important;
  font-family: var(--font-mono) !important;
  font-size: 11.5px !important;
  letter-spacing: .02em !important;
}

.rs-select {
  position: relative;
  display: inline-flex;
  min-width: 126px;
  vertical-align: middle;
}
.rs-select.rs-select-fill { width: 100%; }
.rs-select.rs-select-filter { min-width: 126px; }
.rs-select > select[data-rs-select-bound="1"] {
  position: absolute !important;
  inset: 0 auto auto 0 !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.rs-select-btn {
  width: 100%;
  height: 36px;
  padding: 0 12px 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--black-alpha-12);
  border-radius: var(--r-md);
  color: var(--accent-black);
  font-family: inherit;
  font-size: 13.5px;
  cursor: pointer;
  transition: background var(--t-base), border-color var(--t-base), box-shadow var(--t-base), color var(--t-base);
}
.rs-select-btn:hover {
  background: var(--black-alpha-4);
  border-color: var(--black-alpha-24);
}
.rs-select.open .rs-select-btn,
.rs-select-btn:focus-visible {
  border-color: var(--heat-40);
  box-shadow: inset 0 0 0 1px var(--heat-40);
}
.rs-select-btn[disabled] {
  background: var(--black-alpha-5);
  color: var(--black-alpha-32);
  cursor: not-allowed;
}
.rs-select-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rs-select-btn svg {
  width: 12px;
  height: 12px;
  color: var(--black-alpha-56);
  flex-shrink: 0;
  transition: transform var(--t-base), color var(--t-base);
}
.rs-select.open .rs-select-btn svg {
  transform: rotate(180deg);
  color: var(--heat);
}
.rs-select-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 100%;
  width: max-content;
  max-width: min(260px, calc(100vw - 24px));
  max-height: 320px;
  overflow-y: auto;
  display: none;
  z-index: 1600;
  background: var(--surface);
  border: 1px solid var(--border-faint);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-floating);
  padding: 4px;
}
.rs-select-menu.align-right {
  left: auto;
  right: 0;
}
.rs-select.open .rs-select-menu { display: block; }
.rs-select-option {
  width: 100%;
  min-height: 32px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 0;
  border-radius: var(--r-sm);
  color: var(--accent-black);
  font-family: inherit;
  font-size: 13px;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--t-base), color var(--t-base);
}
.rs-select-option:hover,
.rs-select-option.is-active {
  background: var(--black-alpha-4);
}
.rs-select-option.selected {
  background: var(--heat-12);
  color: var(--heat);
  font-weight: 500;
}
.rs-select-option[disabled] {
  color: var(--black-alpha-32);
  cursor: not-allowed;
}
.rs-select-option .mi-check {
  width: 13px;
  height: 13px;
  color: var(--heat);
  opacity: 0;
  flex-shrink: 0;
}
.rs-select-option.selected .mi-check { opacity: 1; }

/* ─── Clear-filters btn · 共享组件 ─── */
.clear-filters {
  height: 36px; padding: 0 12px;
  background: transparent; border: 0; border-radius: var(--r-md);
  color: var(--black-alpha-56); font-size: 13px; font-family: inherit;
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  transition: background var(--t-base), color var(--t-base);
}
.clear-filters:hover { background: var(--black-alpha-4); color: var(--heat); }
.clear-filters svg { width: 13px; height: 13px; }
.clear-filters[hidden] { display: none; }

/* ─── Result count · 共享组件 ─── */
.result-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--black-alpha-48);
  margin-bottom: 14px;
  letter-spacing: .04em;
}
.result-meta .count { color: var(--heat); font-weight: 600; }

/* ─── 新建商品 Modal (Upload Form · 居中弹窗) ─── */
.new-product-modal {
  max-width: 1080px !important;
  width: 94%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}
/* 左图右文 双栏 · 等宽 */
.np-body-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}
.np-left, .np-right { min-width: 0; }
@media (max-width: 880px) {
  .np-body-grid { grid-template-columns: 1fr; gap: 20px; }
}
.np-header {
  padding: 18px 24px 16px;
  border-bottom: 1px solid var(--border-faint);
  display: flex; align-items: center; gap: 14px;
  flex-shrink: 0;
}
.np-header .np-title-ic {
  width: 36px; height: 36px;
  background: var(--heat-12);
  color: var(--heat);
  border-radius: var(--r-md);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.np-header .np-title-ic svg { width: 17px; height: 17px; }
.np-header h2 {
  font-size: 16px; font-weight: 600; color: var(--accent-black);
  margin: 0;
}
.np-header .np-mode-pill {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--heat);
  background: var(--heat-12);
  border: 1px solid var(--heat-20);
  border-radius: var(--r-sm);
  padding: 2px 8px;
  letter-spacing: .04em;
  font-weight: 500;
}
.np-header .np-x {
  margin-left: auto;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  background: transparent; border: 0;
  border-radius: var(--r-md);
  color: var(--black-alpha-56);
  cursor: pointer;
  transition: background var(--t-base), color var(--t-base);
}
.np-header .np-x:hover { background: var(--crimson-bg); color: var(--accent-crimson); }
.np-header .np-x svg { width: 14px; height: 14px; }

.np-body {
  flex: 1;
  overflow-y: auto;
  padding: 22px 24px;
}

/* AI CTA · 独立全宽 CTA 区域 · 放在"商品图册"上方 */
.np-ai-cta {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  height: 40px;
  padding: 0 14px;
  margin-bottom: 14px;
  background: transparent;
  border: 1px solid var(--border-faint);
  border-radius: var(--r-md);
  font-size: 13px;
  color: var(--black-alpha-72);
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  transition: background var(--t-base), border-color var(--t-base), color var(--t-base);
}
.np-ai-cta:hover { background: var(--heat-8); border-color: var(--heat); color: var(--accent-black); }
.np-ai-cta .ai-icon { color: var(--heat); display: grid; place-items: center; flex-shrink: 0; }
.np-ai-cta .ai-icon svg { width: 14px; height: 14px; }
.np-ai-cta .ai-label { font-weight: 500; color: var(--accent-black); flex: 1; }
.np-ai-cta .ai-arrow { color: var(--black-alpha-48); transition: transform var(--t-fast), color var(--t-base); flex-shrink: 0; display: grid; place-items: center; }
.np-ai-cta .ai-arrow svg { width: 14px; height: 14px; }
.np-ai-cta:hover .ai-arrow { color: var(--heat); transform: translateX(2px); }
/* 主推态: 用户还没上传图 → 醒目橙色描边 */
.np-ai-cta.primary { border-color: var(--heat-40); background: var(--heat-8); }
.np-ai-cta.primary .ai-label { color: var(--heat); font-weight: 600; }
.np-ai-cta.primary .ai-arrow { color: var(--heat); }
.np-ai-cta.primary:hover { background: var(--heat-12); border-color: var(--heat); }

/* Footer (sticky inside modal) */
.np-footer {
  border-top: 1px solid var(--border-faint);
  padding: 14px 24px;
  display: flex; align-items: center; gap: 12px;
  flex-shrink: 0;
  background: var(--background-lighter);
}
.np-footer .np-meta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--black-alpha-48);
  letter-spacing: .02em;
  margin-right: auto;
}
.np-footer .np-meta .accent { color: var(--heat); font-weight: 600; }

/* Upload zone · 弹窗内尺寸略缩 */
.np-body .upload-zone {
  border: 1.5px dashed var(--black-alpha-24);
  border-radius: var(--r-md);
  padding: 22px 20px;
  text-align: center;
  background: var(--background-lighter);
  color: var(--black-alpha-56);
  font-size: 13px;
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  transition: border-color var(--t-base), background var(--t-base), color var(--t-base);
}
.np-body .upload-zone:hover { border-color: var(--heat); background: var(--heat-8); color: var(--heat); }
.np-body .upload-zone:hover .uz-ic { background: var(--heat); color: #fff; border-color: var(--heat); }
.np-body .upload-zone strong { color: var(--heat); font-weight: 600; }
.np-body .upload-zone .uz-ic {
  width: 40px; height: 40px;
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--heat);
  border: 1px solid var(--heat-20);
  display: grid; place-items: center;
  margin-bottom: 8px;
  transition: background var(--t-base), color var(--t-base), border-color var(--t-base);
}
.np-body .upload-zone .uz-ic svg { width: 18px; height: 18px; }
.np-body .upload-zone .uz-hint { display: block; margin-top: 2px; font-family: var(--font-mono); font-size: 11px; color: var(--black-alpha-48); letter-spacing: .02em; }
/* 上传子区域标题 (图片案例 / 我的上传) */
.np-section-h {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 500;
  color: var(--accent-black);
  margin: 12px 0 4px;
}
.np-section-h .check-ic {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent-forest);
  color: #fff;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.np-section-h .check-ic svg { width: 8px; height: 8px; }
.np-section-h .counter {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--black-alpha-48);
  letter-spacing: .04em;
  font-weight: 400;
}
.np-section-h .counter .num { color: var(--heat); font-weight: 600; }
.np-section-sub {
  font-size: 11.5px;
  color: var(--black-alpha-56);
  margin-bottom: 8px;
  line-height: 1.5;
}

/* 图片案例 grid (静态展示) */
.np-examples {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
}
.np-examples .ex {
  aspect-ratio: 1;
  border-radius: var(--r-sm);
  background: var(--background-lighter);
  border: 1px solid var(--border-faint);
  position: relative;
  display: grid;
  place-items: center;
  font-size: 9.5px;
  color: var(--black-alpha-48);
  font-family: var(--font-mono);
  letter-spacing: .04em;
  text-align: center;
  padding: 4px;
  overflow: hidden;
}
.np-examples .ex-badge {
  position: absolute;
  bottom: 3px; right: 3px;
  width: 15px; height: 15px;
  background: var(--accent-forest);
  color: #fff;
  border-radius: 50%;
  display: grid; place-items: center;
  z-index: 2;
}
.np-examples .ex-badge svg { width: 9px; height: 9px; }

/* 我的上传 grid · 始终 5 列, 含填充和空插槽 */
.np-body .upload-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
}
.up-slot-empty {
  aspect-ratio: 1;
  border-radius: var(--r-sm);
  background: var(--background-lighter);
  border: 1px dashed var(--border-faint);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 9.5px;
  color: var(--black-alpha-32);
  font-family: var(--font-mono);
  letter-spacing: .04em;
  transition: border-color var(--t-base), background var(--t-base), color var(--t-base);
}
.up-slot-empty:hover {
  border-color: var(--heat);
  background: var(--heat-8);
  color: var(--heat);
}

/* dropzone 满 5 张时禁用态 */
.np-body .upload-zone.full {
  cursor: not-allowed;
  opacity: .55;
  pointer-events: none;
}
.np-body .upload-zone.full .uz-ic { background: var(--background-lighter); color: var(--black-alpha-32); border-color: var(--border-faint); }
.up-thumb {
  aspect-ratio: 1;
  border-radius: var(--r-md);
  overflow: hidden;
  position: relative;
  background: var(--background-lighter);
  border: 1px solid var(--border-faint);
  cursor: zoom-in;
  transition: transform var(--t-fast), border-color var(--t-base);
}
.up-thumb:hover { transform: scale(1.02); border-color: var(--heat); }
.up-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.up-thumb .slot-x {
  position: absolute;
  top: 3px; right: 3px;
  width: 18px; height: 18px;
  background: rgba(0, 0, 0, .7);
  color: #fff;
  border-radius: 50%;
  display: none;
  place-items: center;
  cursor: pointer;
  z-index: 3;
  border: 0;
  padding: 0;
  transition: background var(--t-base), transform var(--t-fast);
}
.up-thumb:hover .slot-x { display: grid; }
.up-thumb .slot-x:hover { background: var(--accent-crimson); transform: scale(1.1); }
.up-thumb .slot-x svg { width: 9px; height: 9px; }
/* 5 列尺寸太小,文件名 overlay 仅在 lightbox 显示,缩略图上隐藏 */
.up-thumb .slot-name { display: none; }

/* Lightbox: 点击缩略图全屏预览 */
.np-lightbox {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, .9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  cursor: zoom-out;
  opacity: 0;
  transition: opacity .2s;
}
.np-lightbox.show { display: flex; opacity: 1; }
.np-lightbox img {
  max-width: 90vw;
  max-height: 88vh;
  border-radius: var(--r-md);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}
.np-lightbox .lb-x {
  position: fixed;
  top: 24px; right: 24px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  border: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background var(--t-base);
}
.np-lightbox .lb-x:hover { background: rgba(255, 255, 255, .24); }
.np-lightbox .lb-x svg { width: 18px; height: 18px; }
.np-lightbox .lb-name {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(255, 255, 255, .7);
  letter-spacing: .04em;
}

/* Bullet list · 弹窗内 (复用样式) */
.np-body .bullet-list { list-style: none; padding: 0; }
.np-body .bullet-list li {
  display: flex; gap: 10px; align-items: center;
  padding: 10px 12px;
  background: var(--background-lighter);
  border: 1px solid var(--border-faint);
  border-radius: var(--r-sm);
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--accent-black);
  transition: border-color var(--t-base), background var(--t-base);
}
.np-body .bullet-list li.bl-item:hover { border-color: var(--black-alpha-24); }
.np-body .bullet-list li.bl-add { background: var(--surface); border-style: dashed; }
.np-body .bullet-list li.bl-add:focus-within { border-color: var(--heat-40); }
.np-body .bullet-list .num {
  width: 20px; height: 20px;
  background: var(--surface);
  border: 1px solid var(--border-faint);
  border-radius: var(--r-sm);
  font-size: 11px; color: var(--black-alpha-56);
  display: grid; place-items: center;
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-weight: 600;
}
.np-body .bullet-list li.bl-add .num { background: transparent; color: var(--heat); border-color: var(--heat-40); }
.np-body .bullet-list .bl-text { flex: 1; min-width: 0; }
.np-body .bullet-list .bl-input {
  flex: 1; min-width: 0;
  height: 24px; border: 0; padding: 0 4px;
  background: transparent; font-size: 13px;
  color: var(--accent-black); font-family: inherit;
  outline: none;
}
.np-body .bullet-list .bl-input::placeholder { color: var(--black-alpha-48); }
.np-body .bullet-list .bl-x {
  width: 24px; height: 24px;
  display: grid; place-items: center;
  color: var(--black-alpha-32);
  border-radius: var(--r-sm);
  cursor: pointer;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity var(--t-base), background var(--t-base), color var(--t-base);
}
.np-body .bullet-list li.bl-item:hover .bl-x { opacity: 1; }
.np-body .bullet-list .bl-x:hover { background: var(--crimson-bg); color: var(--accent-crimson); }
.np-body .bullet-list .bl-x svg { width: 11px; height: 11px; }

/* ─── Empty state · 共享组件 ─── */
.empty-state {
  background: var(--surface);
  border: 1px dashed var(--border-faint);
  border-radius: var(--r-md);
  padding: 80px 40px;
  text-align: center;
  color: var(--black-alpha-56);
  display: none;
}
.empty-state.show { display: block; }
.empty-state .ic-empty {
  width: 48px; height: 48px;
  margin: 0 auto 14px;
  background: var(--background-lighter);
  border: 1px solid var(--border-faint);
  border-radius: var(--r-md);
  display: grid; place-items: center;
  color: var(--black-alpha-48);
}
.empty-state h3 { font-size: 14px; font-weight: 600; color: var(--accent-black); margin-bottom: 6px; }
.empty-state p { font-size: 12.5px; color: var(--black-alpha-48); font-family: var(--font-mono); letter-spacing: .02em; }

/* ─── Progress (5 段流水线 · V2.1 语义色 + 脉动) ─── */
.prog { display: flex; gap: 3px; }
.prog span {
  width: 18px; height: 5px; border-radius: 2px;
  background: var(--black-alpha-8);
  transition: background var(--t-base);
}
.prog span.done { background: var(--accent-forest); }
.prog span.cur  {
  background: var(--heat);
  animation: prog-pulse 1.4s ease-in-out infinite;
}
.prog span.fail { background: var(--accent-crimson); }
@keyframes prog-pulse {
  0%, 100% { opacity: 1;    transform: scaleY(1); }
  50%      { opacity: .55;  transform: scaleY(.7); }
}

/* ─── Table ─── */
table.t {
  width: 100%; border-collapse: separate; border-spacing: 0;
  background: var(--surface);
  border: 1px solid var(--border-muted);
  border-radius: var(--r-md);
  overflow: hidden;
}
table.t thead th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--black-alpha-48);
  padding: 14px 16px;
  background: var(--black-alpha-3);
  border-bottom: 1px solid var(--border-muted);
  letter-spacing: .04em;
  text-transform: uppercase;
  font-family: var(--font-mono);
}
table.t tbody td {
  padding: 16px;
  border-bottom: 0;
  font-size: 13px;
  vertical-align: middle;
  color: var(--accent-black);
}
table.t tbody tr { cursor: pointer; transition: background var(--t-base); }
table.t tbody tr:hover { background: var(--black-alpha-4); }

/* ─── Placeholder thumb ─── */
.placeholder {
  background:
    repeating-linear-gradient(135deg, rgba(0,0,0,0.025) 0 1px, transparent 1px 12px),
    var(--black-alpha-4);
  border: 1px solid var(--border-faint);
  border-radius: var(--r-md);
  display: grid; place-items: center;
  color: var(--black-alpha-48);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .04em;
  user-select: none;
  overflow: hidden;
  position: relative;
  text-align: center;
  padding: 6px;
}
.placeholder .ph-frame {
  background: rgba(255, 255, 255, .92);
  border: 1px solid var(--border-faint);
  border-radius: var(--r-sm);
  padding: 3px 8px;
  font-size: 10.5px;
  color: var(--black-alpha-56);
  font-weight: 500;
}
.placeholder.has-mock-media {
  background-color: var(--background-lighter);
  background-image: var(--mock-media-url);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  padding: 0;
}
.placeholder.has-mock-media .ph-frame {
  opacity: 0;
  pointer-events: none;
}
.placeholder.has-mock-media.mock-label .ph-frame {
  position: absolute;
  left: 8px;
  bottom: 8px;
  max-width: calc(100% - 16px);
  opacity: 1;
}

/* ─── Toast ─── */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--surface);
  border: 1px solid var(--border-faint);
  border-radius: var(--r-md);
  padding: 14px 18px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: var(--shadow-floating);
  transform: translateX(420px);
  transition: transform var(--t-slow);
  z-index: 1000;
  min-width: 260px;
}
.toast.show { transform: translateX(0); }
.toast .ic-t {
  width: 26px; height: 26px;
  background: var(--heat-12);
  color: var(--heat);
  border-radius: var(--r-md);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.toast .ic-t svg { width: 13px; height: 13px; }
.toast .txt { font-size: 13px; color: var(--accent-black); font-weight: 500; }
.toast .txt .mono {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--black-alpha-48); display: block; margin-top: 2px;
  letter-spacing: .04em; font-weight: 400;
}

/* ─── Global command palette + account menu ─── */
.shell-command-bg {
  position: fixed;
  inset: 0;
  z-index: 1800;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 16px 24px;
  background: var(--black-alpha-48);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.shell-command-bg.show { display: flex; }
.shell-command {
  width: min(640px, 100%);
  max-height: min(680px, 76vh);
  display: flex;
  flex-direction: column;
  background: var(--surface-raised);
  border: 1px solid var(--border-faint);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-floating);
  overflow: hidden;
}
.shell-command-h {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-faint);
}
.shell-command-h .ic {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: var(--heat-12);
  color: var(--heat);
  border: 1px solid var(--heat-20);
  border-radius: var(--r-md);
  flex-shrink: 0;
}
.shell-command-h .ic svg { width: 14px; height: 14px; }
.shell-command-h input {
  flex: 1;
  min-width: 0;
  height: 34px;
  border: 0;
  background: transparent;
  color: var(--accent-black);
  font-family: inherit;
  font-size: 15px;
  outline: none;
}
.shell-command-h input::placeholder { color: var(--black-alpha-48); }
.shell-command-close {
  height: 26px;
  padding: 0 8px;
  border: 1px solid var(--border-faint);
  border-radius: var(--r-sm);
  background: var(--background-lighter);
  color: var(--black-alpha-48);
  font-family: var(--font-inter);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  cursor: pointer;
}
.shell-command-close:hover { color: var(--accent-black); border-color: var(--black-alpha-24); }
.shell-command-list {
  padding: 8px;
  overflow-y: auto;
}
.shell-command-section {
  padding: 8px 10px 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--black-alpha-48);
  letter-spacing: .06em;
}
.shell-command-item {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--r-md);
  background: transparent;
  color: var(--accent-black);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.shell-command-item:hover,
.shell-command-item.active {
  background: var(--heat-12);
  color: var(--heat);
}
.shell-command-item .cmd-ic {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-faint);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: currentColor;
  flex-shrink: 0;
}
.shell-command-item .cmd-ic svg { width: 14px; height: 14px; }
.shell-command-item .cmd-main {
  flex: 1;
  min-width: 0;
}
.shell-command-item .cmd-title {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: currentColor;
}
.shell-command-item .cmd-sub {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--black-alpha-56);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shell-command-item:hover .cmd-sub,
.shell-command-item.active .cmd-sub { color: var(--black-alpha-72); }
.shell-command-item .cmd-key {
  min-width: 26px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
  border: 1px solid var(--border-faint);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--black-alpha-48);
  font-family: var(--font-inter);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
}
.shell-command-empty {
  padding: 48px 20px;
  display: grid;
  place-items: center;
  gap: 8px;
  color: var(--black-alpha-48);
  font-size: 13px;
}
.shell-command-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-top: 1px solid var(--border-faint);
  color: var(--black-alpha-48);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .04em;
}
.shell-command-foot .spacer { flex: 1; }

.shell-account-menu {
  position: fixed;
  z-index: 1700;
  min-width: 232px;
  display: none;
  padding: 8px;
  background: var(--surface-raised);
  border: 1px solid var(--border-faint);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-floating);
}
.shell-account-menu.show { display: block; }
.shell-account-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 10px;
  border-bottom: 1px solid var(--border-faint);
  margin-bottom: 6px;
}
.shell-account-head .av {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--accent-black);
  color: var(--accent-white);
  font-size: 12px;
  font-weight: 600;
}
.shell-account-head .nm {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-black);
}
.shell-account-head .mail {
  display: block;
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--black-alpha-48);
  letter-spacing: .02em;
}
.shell-account-menu button {
  width: 100%;
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 9px;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--accent-black);
  font-family: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.shell-account-menu button svg {
  width: 14px;
  height: 14px;
  color: var(--black-alpha-56);
}
.shell-account-menu button:hover {
  background: var(--black-alpha-4);
  color: var(--heat);
}
.shell-account-menu button:hover svg { color: var(--heat); }
.shell-account-menu .sep {
  height: 1px;
  background: var(--border-faint);
  margin: 6px 4px;
}

/* ─── Modal ─── */
.modal-bg {
  position: fixed; inset: 0;
  background: rgba(21, 20, 15, .42);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center;
  z-index: 999;
  opacity: 0;
  transition: opacity .2s;
}
.modal-bg.show { display: flex; opacity: 1; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border-faint);
  border-radius: var(--r-md);
  max-width: 480px; width: 90%;
  position: relative;
  transform: scale(.96);
  transition: transform .25s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.modal-bg.show .modal { transform: scale(1); }
.modal::before, .modal::after {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 21' fill='%23e8e8e8'%3E%3Cpath d='M10.5 4C10.5 7.31371 7.81371 10 4.5 10H0.5V11H4.5C7.81371 11 10.5 13.6863 10.5 17V21H11.5V17C11.5 13.6863 14.1863 11 17.5 11H21.5V10H17.5C14.1863 10 11.5 7.31371 11.5 4V0H10.5V4Z'/%3E%3C/svg%3E") no-repeat center;
  background-size: contain;
  pointer-events: none;
  color: var(--black-alpha-48);
  font-family: var(--font-mono);
  font-size: 13px; line-height: 1;
}
.modal::before { top: -7px; left: -7px; }
.modal::after { bottom: -7px; right: -7px; }
.modal .corner-tr, .modal .corner-bl {
  position: absolute;
  width: 14px; height: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 21' fill='%23e8e8e8'%3E%3Cpath d='M10.5 4C10.5 7.31371 7.81371 10 4.5 10H0.5V11H4.5C7.81371 11 10.5 13.6863 10.5 17V21H11.5V17C11.5 13.6863 14.1863 11 17.5 11H21.5V10H17.5C14.1863 10 11.5 7.31371 11.5 4V0H10.5V4Z'/%3E%3C/svg%3E") no-repeat center;
  background-size: contain;
  pointer-events: none;
}
.modal .corner-tr { top: -7px; right: -7px; }
.modal .corner-bl { bottom: -7px; left: -7px; }
.modal-h {
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--border-faint);
  display: flex; align-items: center; gap: 14px;
  flex-shrink: 0;
}
.modal-h .ic-m {
  width: 36px; height: 36px;
  background: var(--heat-12);
  color: var(--heat);
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.modal-h .ic-m svg { width: 17px; height: 17px; }
.modal-h .ti { font-size: 16px; font-weight: 600; line-height: 1.4; color: var(--accent-black); }
.modal-h .ti span {
  display: block; font-family: var(--font-mono); font-size: 11px;
  color: var(--black-alpha-48); font-weight: 400; margin-top: 4px; letter-spacing: .04em;
}
.modal-b {
  padding: 20px 24px;
  font-size: 13.5px;
  color: var(--black-alpha-72);
  line-height: 1.75;
  overflow-y: auto;
  overscroll-behavior: contain;
  flex: 1 1 auto;
  min-height: 0;
}
.modal-b .mono-acc {
  font-family: var(--font-mono); color: var(--heat);
  background: var(--heat-12); padding: 2px 6px;
  font-size: 11.5px; border-radius: var(--r-sm);
}
.modal-f {
  padding: 16px 24px;
  border-top: 1px solid var(--border-faint);
  display: flex; justify-content: flex-end; gap: 10px;
  flex-shrink: 0;
}

/* ─── 统一卡片删除按钮 ────────────────────────────────────────
   矩形 + 删除 icon, hover 卡片才显示
   用法: 卡片内放 <button class="card-del-btn">[icon]</button>
   外层卡片需 position: relative
   触发: .product-card / .asset-card / .project-card / .task-card / .model-card hover
   --------------------------------------------------------- */
.card-del-btn {
  position: absolute;
  top: 8px; right: 8px;
  width: 32px; height: 32px;
  background: rgba(255,255,255,.95);
  border: 1px solid var(--black-alpha-12);
  border-radius: var(--r-md);
  display: grid; place-items: center;
  color: var(--black-alpha-56);
  cursor: pointer;
  opacity: 0;
  transition: opacity .18s, color .18s, border-color .18s, background .18s;
  box-shadow: 0 2px 6px rgba(0,0,0,.06);
  z-index: 5;
  padding: 0;
  font-family: inherit;
}
.card-del-btn svg { width: 14px; height: 14px; }
.product-card:hover .card-del-btn,
.asset-card:hover .card-del-btn,
.project-card:hover .card-del-btn,
.task-card:hover .card-del-btn,
.model-card:hover .card-del-btn {
  opacity: 1;
}
.card-del-btn:hover {
  color: var(--accent-crimson);
  border-color: var(--accent-crimson);
  background: var(--surface);
}
.card-del-btn:active { transform: scale(.95); }

/* ─── Drawer ─── */
.drawer-bg {
  position: fixed; inset: 0;
  background: rgba(21, 20, 15, .32);
  display: none;
  z-index: 90;
}
.drawer-bg.show { display: block; }
.drawer {
  position: fixed; right: 0; top: 0; bottom: 0;
  width: 540px; max-width: 100vw;
  background: var(--surface);
  border-left: 1px solid var(--border-faint);
  z-index: 95;
  transform: translateX(100%);
  transition: transform .25s cubic-bezier(.32, .72, 0, 1);
  display: flex; flex-direction: column;
  box-shadow: -4px 0 24px rgba(21, 20, 15, .04);
}
.drawer.show { transform: translateX(0); }
.drawer-h {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-faint);
  display: flex; align-items: center;
}
.drawer-h h3 { font-size: 16px; font-weight: 600; color: var(--accent-black); }
.drawer-h .x {
  margin-left: auto; width: 32px; height: 32px;
  border-radius: var(--r-md);
  display: grid; place-items: center;
  color: var(--black-alpha-56); cursor: pointer;
  transition: background var(--t-base);
}
.drawer-h .x:hover { background: var(--black-alpha-4); color: var(--accent-black); }
.drawer-b { padding: 24px; overflow-y: auto; flex: 1; overscroll-behavior: contain; }
.drawer-f {
  padding: 16px 24px;
  border-top: 1px solid var(--border-faint);
  display: flex; gap: 10px; justify-content: flex-end;
  background: var(--background-lighter);
}

/* ─── Scrollbar · 全局隐藏可视滚动条,保留滚动能力
   用 !important 覆盖各页 inline <style> 里残留的 scrollbar-width:thin / 自定义 webkit 滚动条 ─── */
* { scrollbar-width: none !important; -ms-overflow-style: none !important; }
*::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
  -webkit-appearance: none !important;
}
*::-webkit-scrollbar-track,
*::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-thumb:hover,
*::-webkit-scrollbar-corner {
  background: transparent !important;
  display: none !important;
}

/* ─── Responsive ─── */
@media (max-width: 1100px) {
  .app { grid-template-columns: 1fr; }
  aside.sidebar { display: none; }
  .sidebar-toggle { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid var(--border-faint); }
  .content { padding: 28px 24px 48px; }
}

/* ─── Spinner ─── */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid var(--border-faint);
  border-top-color: var(--heat);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── 缺三视图 badge · 商品 / 人物 卡片 thumb 左上角提示 ─── */
.tri-missing-badge {
  position: absolute;
  top: 8px; left: 8px;
  z-index: 2;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px 3px 6px;
  background: var(--heat);
  color: var(--accent-white);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .03em;
  border-radius: var(--r-sm);
  box-shadow: 0 1px 2px rgba(0,0,0,.12);
  cursor: help;
  user-select: none;
  transition: background var(--t-base), box-shadow var(--t-base), transform var(--t-base);
}
.tri-missing-badge[hidden] { display: none; }
.tri-missing-badge:hover {
  box-shadow: 0 3px 8px rgba(0,0,0,.18);
  transform: translateY(-1px);
}
.tri-missing-badge .ico {
  width: 12px; height: 12px;
  border: 1px solid currentColor;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 9px; font-weight: 700;
  line-height: 1;
  font-family: var(--font-mono);
}
.tri-missing-badge .ico::before { content: '!'; }
.tri-missing-badge .lbl-mono { font-family: var(--font-mono); letter-spacing: .04em; }

/* 兼容旧 markup(没有 .ico 子元素的也保留 ! 圆点) */
.tri-missing-badge:not(:has(.ico))::before {
  content: '!';
  width: 12px; height: 12px;
  border: 1px solid currentColor;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 9px; font-weight: 700;
  line-height: 1;
}

/* hover popover · V2.1 dark tooltip with arrow */
.tri-missing-pop {
  position: absolute;
  top: calc(100% + 9px);
  left: 0;
  width: 252px;
  padding: 11px 13px 12px;
  background: var(--accent-black);
  color: var(--accent-white);
  border-radius: var(--r-md);
  box-shadow: 0 8px 24px rgba(0,0,0,.20), 0 2px 6px rgba(0,0,0,.10);
  opacity: 0; visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .15s ease, visibility .15s ease, transform .15s ease;
  pointer-events: none;
  z-index: 30;
  font-family: var(--font-sans);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  text-align: left;
  cursor: default;
}
.tri-missing-pop::before {
  content: '';
  position: absolute;
  top: -5px; left: 14px;
  width: 10px; height: 10px;
  background: var(--accent-black);
  transform: rotate(45deg);
  border-radius: 2px;
}
.tri-missing-pop .pop-h {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--heat);
  margin-bottom: 6px;
}
.tri-missing-pop .pop-h svg { display: block; }
.tri-missing-pop .pop-body {
  font-size: 12px;
  line-height: 1.6;
  color: rgba(255,255,255,.88);
}
.tri-missing-pop .pop-tip {
  display: block;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,.12);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.55;
  letter-spacing: .02em;
  color: rgba(255,255,255,.78);
}
.tri-missing-pop .pop-tip b {
  color: var(--accent-white);
  font-weight: 600;
  letter-spacing: .03em;
}
.tri-missing-badge:hover .tri-missing-pop,
.tri-missing-badge:focus-within .tri-missing-pop {
  opacity: 1; visibility: visible; transform: translateY(0);
  transition-delay: .12s;
}

/* 让 popover 能溢出 thumb / 卡片 容器(否则被 overflow:hidden 裁切) */
.placeholder:has(.tri-missing-badge:hover),
.placeholder:has(.tri-missing-badge:focus-within) {
  overflow: visible;
  z-index: 4;
}
.product-card:has(.tri-missing-badge:hover),
.product-card:has(.tri-missing-badge:focus-within),
.asset-card:has(.tri-missing-badge:hover),
.asset-card:has(.tri-missing-badge:focus-within),
.asset-card-2:has(.tri-missing-badge:hover),
.asset-card-2:has(.tri-missing-badge:focus-within) {
  overflow: visible;
  z-index: 5;
  position: relative;
}
