/* image-to-ascii-theme.css —— 由 docs/demo-blkswn-v3/css/theme.css 生成（勿手改）。
   生成脚本：node scripts/blkswn-v3/gen-tool-theme.mjs image-to-ascii
   本页按 demo 三层加载：image-to-ascii.css（机制）→ 本文件（demo 主题词汇）→ image-to-ascii-v3.css（覆盖层）。
   剔除下列共享组件独占类的规则，让站头/站尾/FAQ/相关工具继续吃 app.css，与全站其他 v3 页一致：
   bs-footer bs-footer-brand bs-footer-cols bs-footer-legal bs-faq bs-faq-item bs-faq-q bs-faq-a bs-card bs-card-top bs-card-num bs-card-cat bs-card-arrow bs-grid bs-breadcrumb */
/* 构建产物：theme.css = theme-base.css + workspace.css + pages.css。勿手改，运行 node scripts/blkswn-v3/build.mjs 重新生成。 */

/* ==========================================================================
   OneImageTool — blkswn v3 demo · 基线主题（源文件，构建合并进 theme.css）
   风格基准：v1 docs/demo/css/theme-blkswn.css（用户已确认满意，勿改设计语言）
   单色编辑部风格：纯白底 / 纯黑字 / 发丝线 / 胶囊按钮 / 荧光黄强调
   ========================================================================== */

:root {
  /* 配色 —— 与 blkswn 原站变量一一对应 */
  --bs-bg: #ffffff;
  --bs-bg-sub: #ededed;
  --bs-surface: #ffffff;
  --bs-text: #000000;
  --bs-text-sub: #666666;
  --bs-border: #cccccc;
  --bs-accent: #fdf497;
  --bs-invert-bg: #000000;
  --bs-invert-text: #ffffff;

  /* 造型 */
  --bs-radius-pill: 60px;
  --bs-radius-sm: 5px;

  /* 字体：GT America Condensed（商业字体）→ Oswald 替代 */
  --bs-font-condensed: "Oswald", "Archivo Narrow", "Arial Narrow",
    "Zen Kaku Gothic New", "Noto Sans SC", sans-serif;
  --bs-font-body: "Zen Kaku Gothic New", "Noto Sans SC", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;

  /* 动效：blkswn 的 expo-out 缓动 */
  --bs-ease: cubic-bezier(0.19, 1, 0.22, 1);
}

/* ---------- 基础 ---------- */

* { box-sizing: border-box; }

html {
  font-size: clamp(12px, 1vw, 18px); /* blkswn 原样：整站随视口缩放 */
  line-height: 1.6;
  font-feature-settings: "palt" 1;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--bs-font-body);
  font-weight: 400;
  letter-spacing: 0.02rem;
  color: var(--bs-text);
  background: var(--bs-bg);
}

::selection { background: var(--bs-accent); color: var(--bs-text); }

.bs-wrap {
  max-width: 84rem;
  margin: 0 auto;
  padding: 0 2rem;
}

/* 文字链接：下划线 + hover 出现 ☞ */
.bs-link {
  color: var(--bs-text);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.bs-link:hover::before { content: "☞ "; }

/* 荧光笔高亮 */
.bs-mark {
  background: var(--bs-accent);
  padding: 0 0.3em;
}

/* ---------- 页头 ---------- */

.bs-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bs-bg);
  border-bottom: 1px solid var(--bs-border);
}

.bs-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  height: 4rem;
}

.bs-brand {
  font-family: var(--bs-font-condensed);
  font-weight: 500;
  font-size: 1.35rem;
  letter-spacing: 0.04rem;
  text-transform: uppercase;
  color: var(--bs-text);
  text-decoration: none;
  white-space: nowrap;
}
.bs-brand small {
  font-weight: 300;
  color: var(--bs-text-sub);
  margin-left: 0.6em;
  font-size: 0.75rem;
  letter-spacing: 0.08rem;
}

.bs-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}
.bs-nav a {
  color: var(--bs-text);
  text-decoration: none;
  font-size: 0.9rem;
}
.bs-nav a:hover,
.bs-nav a.is-active {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* 移动端菜单入口（桌面隐藏，≤720px 显示） */
.bs-nav-toggle {
  display: none;
  align-items: center;
  height: 2.25rem;
  padding: 0 1.1rem;
  font-family: var(--bs-font-condensed);
  font-weight: 400;
  font-size: 0.85rem;
  letter-spacing: 0.08rem;
  text-transform: uppercase;
  color: var(--bs-text);
  background: var(--bs-bg);
  border: 1px solid var(--bs-text);
  border-radius: var(--bs-radius-pill);
  cursor: pointer;
}
.bs-header.is-open .bs-nav-toggle {
  background: var(--bs-invert-bg);
  color: var(--bs-invert-text);
}

/* 登录/注册入口对：桌面融入导航行，移动端变成一行两列按钮 */
.bs-nav-auth { display: contents; }

/* 登录态用户头像 + 下拉资料卡 */
.bs-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--bs-invert-bg);
  color: var(--bs-invert-text);
  font-family: var(--bs-font-condensed);
  font-weight: 500;
  font-size: 0.85rem;
  text-transform: uppercase;
}
.bs-avatar--lg { width: 2.5rem; height: 2.5rem; font-size: 1.1rem; }

.bs-menu--user > summary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.bs-menu--user .bs-menu-panel { min-width: 16rem; }

.bs-user-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  background: var(--bs-bg-sub);
  border-bottom: 1px solid var(--bs-border);
}
.bs-user-meta { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.bs-user-meta strong {
  font-weight: 500;
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bs-user-meta small { font-size: 0.75rem; color: var(--bs-text-sub); }

/* ---------- 按钮 ---------- */

.bs-btn {
  font-family: var(--bs-font-body);
  font-weight: 400;
  letter-spacing: 0.02rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 3rem;
  padding: 0 2rem;
  font-size: 0.95rem;
  border-radius: var(--bs-radius-pill);
  border: 1px solid var(--bs-invert-bg);
  background: var(--bs-invert-bg);
  color: var(--bs-invert-text);
  text-decoration: none;
  transition: none; /* blkswn 原样：即时切换，不做渐变 */
}
.bs-btn:hover {
  background: var(--bs-bg);
  color: var(--bs-text);
}

.bs-btn--secondary {
  background: var(--bs-bg);
  color: var(--bs-text);
  border-color: var(--bs-border);
}
.bs-btn--secondary:hover { background: var(--bs-bg-sub); }

/* 强调按钮：荧光黄底 + 黑字（页头 Get started） */
.bs-btn--accent {
  background: var(--bs-accent);
  color: var(--bs-text);
  border-color: var(--bs-text);
}
.bs-btn--accent:hover {
  background: var(--bs-invert-bg);
  color: var(--bs-accent);
  border-color: var(--bs-invert-bg);
}

/* 带图标按钮（如 Google 登录）：图标与文字留缝 */
.bs-btn--oauth { gap: 0.6rem; }
.bs-btn--oauth svg { flex: none; }

.bs-btn--small {
  height: 2.25rem;
  padding: 0 1.25rem;
  font-size: 0.85rem;
}

.bs-btn--block { width: 100%; }

.bs-btn[disabled] {
  cursor: not-allowed;
  background: var(--bs-bg-sub);
  color: var(--bs-text-sub);
  border-color: var(--bs-border);
}

/* ---------- Hero ---------- */

.bs-hero {
  padding: 5rem 0 3.5rem;
  border-bottom: 1px solid var(--bs-border);
}

.bs-hero-kicker {
  font-size: clamp(10px, 0.7vw, 14px);
  letter-spacing: 0.04rem;
  color: var(--bs-text-sub);
  text-transform: uppercase;
  margin: 0 0 1.5rem;
}

.bs-hero h1 {
  font-family: var(--bs-font-condensed);
  font-weight: 500;
  font-size: clamp(2.6rem, 7vw, 6rem);
  line-height: 1.05;
  letter-spacing: 0;
  text-transform: uppercase;
  margin: 0 0 1.75rem;
}

.bs-hero p {
  max-width: 38rem;
  margin: 0 0 2.25rem;
  color: var(--bs-text-sub);
  font-size: 1rem;
}

.bs-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ---------- 关键词滚动带 ---------- */

.bs-keywords {
  overflow: hidden;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--bs-border);
}

.bs-keywords-track {
  display: flex;
  gap: 0.6rem;
  width: max-content;
  animation: bs-marquee 40s linear infinite;
}
.bs-keywords:hover .bs-keywords-track { animation-play-state: paused; }

@keyframes bs-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.bs-tag {
  display: inline-block;
  padding: 0.25rem 1rem;
  font-size: clamp(10px, 0.7vw, 14px);
  line-height: 1.6;
  white-space: nowrap;
  color: var(--bs-text);
  background: var(--bs-bg);
  border: 1px solid var(--bs-border);
  border-radius: var(--bs-radius-pill);
  text-decoration: none;
}
.bs-tag:nth-child(3n) { background: var(--bs-bg-sub); }
.bs-tag:hover { background: var(--bs-accent); border-color: var(--bs-text); }

/* ---------- 区块标题 ---------- */

.bs-section { padding: 3.5rem 0; }

.bs-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}
.bs-section-head h2 {
  font-family: var(--bs-font-condensed);
  font-weight: 500;
  font-size: 1.5rem;
  letter-spacing: 0.04rem;
  text-transform: uppercase;
  margin: 0;
}
.bs-section-head .bs-count {
  font-family: var(--bs-font-condensed);
  font-weight: 300;
  color: var(--bs-text-sub);
  font-size: 1rem;
}

/* ---------- 工具卡片网格：共享发丝线（表格化边框） ---------- */






















/* ---------- 工具面板 ---------- */

.bs-panel {
  border: 1px solid var(--bs-border);
  background: var(--bs-surface);
}

.bs-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--bs-border);
}
.bs-panel-head h3 {
  font-family: var(--bs-font-condensed);
  font-weight: 500;
  font-size: 1.1rem;
  letter-spacing: 0.04rem;
  text-transform: uppercase;
  margin: 0;
}

.bs-panel-body {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 1px;
  background: var(--bs-border);
}
.bs-panel-body > * { background: var(--bs-surface); }

.bs-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 16rem;
  margin: 1.5rem;
  border: 1px dashed var(--bs-border);
  color: var(--bs-text-sub);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.bs-dropzone:hover { background: var(--bs-bg-sub); }
.bs-dropzone strong {
  font-weight: 500;
  color: var(--bs-text);
  font-size: 1rem;
}

.bs-controls {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.bs-field label {
  display: block;
  font-size: clamp(10px, 0.7vw, 13px);
  letter-spacing: 0.04rem;
  text-transform: uppercase;
  color: var(--bs-text-sub);
  margin-bottom: 0.4rem;
}

.bs-input,
.bs-select {
  width: 100%;
  height: 2.5rem;
  padding: 0 0.75rem;
  font-family: var(--bs-font-body);
  font-size: 0.9rem;
  color: var(--bs-text);
  background: var(--bs-bg);
  border: 1px solid var(--bs-border);
  border-radius: var(--bs-radius-sm);
  outline: none;
}
.bs-input:focus,
.bs-select:focus { border-color: var(--bs-text); }

/* 胶囊单选组：选中态 = 荧光黄 */
.bs-choices { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.bs-choice {
  padding: 0.25rem 1rem;
  font-size: 0.85rem;
  border: 1px solid var(--bs-border);
  border-radius: var(--bs-radius-pill);
  background: var(--bs-bg);
  cursor: pointer;
  user-select: none;
}
.bs-choice:hover { background: var(--bs-bg-sub); }
.bs-choice.is-selected {
  background: var(--bs-accent);
  border-color: var(--bs-text);
}

.bs-range {
  width: 100%;
  accent-color: var(--bs-text);
}

/* ---------- 时间轴列表 ---------- */

.bs-list { border-top: 1px solid var(--bs-border); }
.bs-list-item {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  padding: 1rem 0.25rem;
  border-bottom: 1px solid var(--bs-border);
  color: var(--bs-text);
  text-decoration: none;
  transition: background-color 0.15s ease;
}
.bs-list-item:hover { background: var(--bs-bg-sub); }
.bs-list-item .bs-list-date {
  font-family: var(--bs-font-condensed);
  font-weight: 300;
  color: var(--bs-text-sub);
  min-width: 5rem;
  font-size: 0.9rem;
}
.bs-list-item h4 { margin: 0; font-weight: 500; font-size: 1rem; flex: 1; }

/* ---------- 页脚（反白） ---------- */












/* ---------- 首页组件（搜索 / 信任条 / 分类导航 / SEO 分栏） ---------- */

.bs-search {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 34rem;
  height: 3.25rem;
  padding: 0 0.5rem 0 1.5rem;
  margin: 0 0 1.75rem;
  background: var(--bs-bg);
  border: 1px solid var(--bs-border);
  border-radius: var(--bs-radius-pill);
}
.bs-search:focus-within { border-color: var(--bs-text); }
.bs-search-glyph {
  font-family: var(--bs-font-condensed);
  color: var(--bs-text-sub);
  font-size: 1rem;
}
.bs-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: none;
  background: transparent;
  font-family: var(--bs-font-body);
  font-size: 0.95rem;
  color: var(--bs-text);
}
.bs-search input::placeholder { color: var(--bs-text-sub); }
.bs-search kbd {
  font-family: var(--bs-font-condensed);
  font-weight: 300;
  font-size: clamp(10px, 0.7vw, 13px);
  letter-spacing: 0.04rem;
  color: var(--bs-text-sub);
  border: 1px solid var(--bs-border);
  border-radius: var(--bs-radius-pill);
  padding: 0.2rem 0.75rem;
  white-space: nowrap;
}

.bs-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  font-size: clamp(10px, 0.7vw, 14px);
  letter-spacing: 0.04rem;
  color: var(--bs-text-sub);
}
.bs-trust span::before { content: "✓ "; color: var(--bs-text); }

.bs-cat-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.bs-cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1.1rem;
  font-size: 0.85rem;
  color: var(--bs-text);
  background: var(--bs-bg);
  border: 1px solid var(--bs-border);
  border-radius: var(--bs-radius-pill);
  text-decoration: none;
}
.bs-cat-chip:hover { background: var(--bs-bg-sub); }
.bs-cat-chip .bs-cat-count {
  font-family: var(--bs-font-condensed);
  font-weight: 300;
  font-size: 0.8rem;
  color: var(--bs-text-sub);
}

.bs-cat-desc {
  margin: -1.25rem 0 1.5rem;
  max-width: 42rem;
  font-size: 0.9rem;
  color: var(--bs-text-sub);
}
.bs-section[id] { scroll-margin-top: 5rem; }

.bs-seo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1px;
  background: var(--bs-border);
  border: 1px solid var(--bs-border);
}
.bs-seo > div {
  background: var(--bs-surface);
  padding: 1.5rem;
}
.bs-seo h2 {
  font-family: var(--bs-font-condensed);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.04rem;
  text-transform: uppercase;
  margin: 0 0 0.75rem;
}
.bs-seo p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--bs-text-sub);
}
.bs-seo a {
  color: var(--bs-text);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

/* ---------- 响应式 / 无障碍 ---------- */

@media (max-width: 720px) {
  .bs-wrap { padding: 0 1.25rem; }

  /* 顶栏折叠为全屏抽屉：MENU 按钮开合，面板从 sticky 头部下方铺满视口 */
  .bs-nav-toggle { display: inline-flex; }
  body.bs-nav-open { overflow: hidden; }

  .bs-nav {
    position: fixed;
    top: calc(4rem + 1px);
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.75rem 1.25rem 2rem;
    background: var(--bs-bg);
    overflow-y: auto;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-0.75rem);
    transition: opacity 0.35s var(--bs-ease), transform 0.55s var(--bs-ease),
      visibility 0s linear 0.35s;
  }
  .bs-header.is-open .bs-nav {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: opacity 0.35s var(--bs-ease), transform 0.55s var(--bs-ease);
  }

  /* 行项目错峰淡入 */
  .bs-nav > * {
    opacity: 0;
    transform: translateY(0.75rem);
    transition: opacity 0.45s var(--bs-ease), transform 0.65s var(--bs-ease);
  }
  .bs-header.is-open .bs-nav > * { opacity: 1; transform: none; }
  .bs-header.is-open .bs-nav > *:nth-child(1) { transition-delay: 0.05s; }
  .bs-header.is-open .bs-nav > *:nth-child(2) { transition-delay: 0.1s; }
  .bs-header.is-open .bs-nav > *:nth-child(3) { transition-delay: 0.15s; }
  .bs-header.is-open .bs-nav > *:nth-child(4) { transition-delay: 0.2s; }
  .bs-header.is-open .bs-nav > *:nth-child(5) { transition-delay: 0.25s; }

  /* 主导航链接：编辑部风格大字 */
  .bs-nav > a {
    padding: 1.1rem 0;
    font-family: var(--bs-font-condensed);
    font-weight: 500;
    font-size: 1.9rem;
    line-height: 1.1;
    letter-spacing: 0.02rem;
    text-transform: uppercase;
    border-bottom: 1px solid var(--bs-border);
  }

  /* 下拉（语言 / 用户）：整行入口 + 内嵌展开面板 */
  .bs-nav > details.bs-menu { border-bottom: 1px solid var(--bs-border); }
  .bs-nav > details.bs-menu > summary { padding: 1rem 0; font-size: 1rem; }
  .bs-nav .bs-menu-panel {
    position: static;
    min-width: 0;
    margin: 0 0 1rem;
    border: 0;
    border-left: 2px solid var(--bs-text);
  }

  /* 语言切换排到最后 */
  .bs-nav > .bs-menu--lang { order: 99; margin-top: 0.5rem; }

  /* 登录/注册按钮：一行两列 */
  .bs-nav-auth {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 1.75rem;
  }
  .bs-nav-auth .bs-nav-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 3rem;
    border: 1px solid var(--bs-text);
    border-radius: var(--bs-radius-pill);
    font-size: 0.95rem;
  }
  .bs-nav-auth .bs-btn { width: 100%; height: 3rem; font-size: 0.95rem; }

  /* 登录态：summary 即头像行；资料卡与 summary 重复，抽屉里隐藏 */
  .bs-nav .bs-menu--user > summary { display: flex; gap: 0.75rem; }
  .bs-nav .bs-menu--user .bs-avatar { width: 2.25rem; height: 2.25rem; font-size: 1rem; }
  .bs-nav .bs-user-card { display: none; }
  .bs-nav .bs-menu--user .bs-menu-panel a { padding: 0.75rem 1rem; font-size: 0.95rem; }

  .bs-panel-body { grid-template-columns: 1fr; }
  .bs-search kbd { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .bs-keywords-track { animation: none; }

  .bs-nav,
  .bs-nav > * { transition: none !important; }
}


/* ==========================================================================
   blkswn v3 demo — 交互组件与工作区状态（源文件，构建合并进 theme.css）
   toast / modal / 下拉菜单 / 广告位 / demo 状态切换器 / 上传流程状态机
   ========================================================================== */

/* hidden 属性必须永远生效：组件里大量 display:flex/grid 会覆盖 UA 的 [hidden] 规则 */
[hidden] { display: none !important; }

/* ---------- 页头下拉菜单（<details>，用户菜单 / 语言菜单） ---------- */

.bs-menu { position: relative; }
.bs-menu summary {
  list-style: none;
  cursor: pointer;
  font-size: 0.9rem;
  user-select: none;
  white-space: nowrap;
}
.bs-menu summary::-webkit-details-marker { display: none; }
.bs-menu summary::after { content: " ▾"; color: var(--bs-text-sub); font-size: 0.75em; }
.bs-menu[open] summary { text-decoration: underline; text-underline-offset: 4px; }
.bs-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.75rem);
  min-width: 11rem;
  background: var(--bs-bg);
  border: 1px solid var(--bs-text);
  z-index: 120;
}
.bs-menu-panel a {
  display: block;
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  color: var(--bs-text);
  text-decoration: none;
  border-bottom: 1px solid var(--bs-border);
}
.bs-menu-panel a:last-child { border-bottom: 0; }
.bs-menu-panel a:hover { background: var(--bs-bg-sub); text-decoration: none; }
.bs-menu-panel a.is-active { background: var(--bs-accent); }

/* ---------- Toast ---------- */

#bs-toast-root {
  position: fixed;
  left: 50%;
  bottom: 2rem;
  transform: translateX(-50%);
  z-index: 400;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  pointer-events: none;
}
.bs-toast {
  padding: 0.6rem 1.5rem;
  font-size: 0.9rem;
  background: var(--bs-invert-bg);
  color: var(--bs-invert-text);
  border: 1px solid var(--bs-invert-bg);
  border-radius: var(--bs-radius-pill);
  white-space: nowrap;
}
.bs-toast--error {
  background: var(--bs-bg);
  color: var(--bs-text);
  border-color: var(--bs-text);
}
.bs-toast--error::before { content: "☞ "; background: var(--bs-accent); }

/* ---------- Modal ---------- */

.bs-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(0, 0, 0, 0.45);
}
.bs-modal[hidden] { display: none; }
.bs-modal-panel {
  width: 100%;
  max-width: 28rem;
  max-height: 85vh;
  overflow: auto;
  background: var(--bs-bg);
  border: 1px solid var(--bs-text);
}
.bs-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--bs-border);
}
.bs-modal-head h3 {
  font-family: var(--bs-font-condensed);
  font-weight: 500;
  font-size: 1.1rem;
  letter-spacing: 0.04rem;
  text-transform: uppercase;
  margin: 0;
}
.bs-modal-close {
  border: 0;
  background: none;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0.25rem;
  color: var(--bs-text);
}
.bs-modal-body { padding: 1.5rem; }
.bs-modal-body p { margin: 0 0 1rem; font-size: 0.9rem; color: var(--bs-text-sub); }
.bs-modal-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

/* ---------- 广告位占位框 ---------- */

.bs-ad {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 6rem;
  margin: 2rem 0;
  border: 1px dashed var(--bs-border);
  color: var(--bs-text-sub);
}
.bs-ad-label {
  font-family: var(--bs-font-condensed);
  font-weight: 300;
  font-size: 1.5rem;
  letter-spacing: 0.1rem;
}
.bs-ad-place {
  font-size: clamp(10px, 0.7vw, 12px);
  letter-spacing: 0.04rem;
  text-transform: uppercase;
  border: 1px solid var(--bs-border);
  border-radius: var(--bs-radius-pill);
  padding: 0.1rem 0.75rem;
}

/* ---------- demo 状态切换器（仅评审用，右下角） ---------- */

.bs-devbar {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 350;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.6rem;
  background: var(--bs-bg);
  border: 1px solid var(--bs-text);
  border-radius: var(--bs-radius-pill);
}
.bs-devbar-label {
  font-family: var(--bs-font-condensed);
  font-weight: 300;
  font-size: 10px;
  letter-spacing: 0.08rem;
  text-transform: uppercase;
  color: var(--bs-text-sub);
  padding: 0 0.25rem;
}
.bs-devbar button {
  font-family: var(--bs-font-condensed);
  font-weight: 400;
  font-size: 10px;
  letter-spacing: 0.05rem;
  text-transform: uppercase;
  padding: 0.25rem 0.7rem;
  border: 1px solid var(--bs-border);
  border-radius: var(--bs-radius-pill);
  background: var(--bs-bg);
  color: var(--bs-text);
  cursor: pointer;
  transition: none;
}
.bs-devbar button:hover { background: var(--bs-bg-sub); }
.bs-devbar button.is-active {
  background: var(--bs-accent);
  border-color: var(--bs-text);
}

/* ---------- 上传流程状态机 ----------
   容器 [data-flow] 持有 data-state ∈ empty|ready|processing|done|error；
   子元素 data-show="state1 state2" 由 core.js 按状态切换 hidden。
   ------------------------------------------------------------------ */

[data-flow] [data-show] { /* 可见性由 JS 管理（hidden 属性），此处仅留钩子 */ }

.bs-dropzone.is-dragover {
  background: var(--bs-accent);
  border-color: var(--bs-text);
  color: var(--bs-text);
}

/* 预览画布：示例图 + 可叠加水印/遮罩层 */
.bs-preview {
  position: relative;
  margin: 1.5rem;
  border: 1px solid var(--bs-border);
  background:
    repeating-conic-gradient(var(--bs-bg-sub) 0% 25%, var(--bs-bg) 0% 50%)
    0 0 / 20px 20px; /* 透明棋盘格底 */
  overflow: hidden;
}
.bs-preview img,
.bs-preview svg {
  display: block;
  width: 100%;
  height: auto;
}

/* 处理中：发丝线不定进度条 + 遮罩 */
.bs-processing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-height: 16rem;
  margin: 1.5rem;
  border: 1px solid var(--bs-border);
  color: var(--bs-text-sub);
  font-size: 0.9rem;
}
.bs-progress {
  width: min(18rem, 70%);
  height: 2px;
  background: var(--bs-border);
  overflow: hidden;
  position: relative;
}
.bs-progress::after {
  content: "";
  position: absolute;
  left: -40%;
  width: 40%;
  height: 100%;
  background: var(--bs-text);
  animation: bs-progress-slide 1.1s var(--bs-ease) infinite;
}
@keyframes bs-progress-slide {
  to { left: 100%; }
}
.bs-progress--value::after { animation: none; left: 0; width: var(--value, 0%); transition: width 0.3s ease; }

/* 完成态结果条：文件名 + 体积变化 */
.bs-result-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0 1.5rem 1.5rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--bs-text);
  font-size: 0.85rem;
}
.bs-result-bar strong { font-weight: 500; }
.bs-result-bar .bs-saving { background: var(--bs-accent); padding: 0 0.4em; }

/* 错误态 */
.bs-flow-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 16rem;
  margin: 1.5rem;
  border: 1px solid var(--bs-text);
  text-align: center;
  padding: 1.5rem;
}
.bs-flow-error strong { font-weight: 500; }
.bs-flow-error strong::before { content: "☞ "; background: var(--bs-accent); }
.bs-flow-error p { margin: 0; font-size: 0.85rem; color: var(--bs-text-sub); }

/* 表单校验错误态（认证页等复用） */
.bs-field.has-error .bs-input { border-color: var(--bs-text); }
.bs-field .bs-field-error {
  display: none;
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: var(--bs-text);
}
.bs-field.has-error .bs-field-error { display: block; }
.bs-field.has-error .bs-field-error::before { content: "☞ "; background: var(--bs-accent); }

/* ---------- B · 前后对比滑块（compress） ---------- */

.bs-preview.has-compare { touch-action: none; cursor: ew-resize; }
.bs-compare-top {
  position: absolute;
  inset: 0;
  overflow: hidden;
  clip-path: inset(0 calc(100% - var(--split, 50%)) 0 0);
}
.bs-compare-top img { display: block; width: 100%; height: auto; }
.bs-compare-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--split, 50%);
  width: 1px;
  background: var(--bs-text);
}
.bs-compare-divider::after {
  content: "◂ ▸";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  background: var(--bs-invert-bg);
  color: var(--bs-invert-text);
  border-radius: var(--bs-radius-pill);
  padding: 0.2rem 0.6rem;
  white-space: nowrap;
}
.bs-compare-label {
  position: absolute;
  top: 0.6rem;
  font-family: var(--bs-font-condensed);
  font-weight: 300;
  font-size: clamp(10px, 0.7vw, 12px);
  letter-spacing: 0.06rem;
  text-transform: uppercase;
  padding: 0.1rem 0.7rem;
  background: var(--bs-bg);
  border: 1px solid var(--bs-border);
  border-radius: var(--bs-radius-pill);
  pointer-events: none;
}
.bs-compare-label--before { left: 0.6rem; }
.bs-compare-label--after { right: 0.6rem; }

/* ---------- C · 裁剪框（8 控制点 + 遮罩） ---------- */

.bs-crop-box {
  position: absolute;
  border: 1px solid var(--bs-bg);
  outline: 1px solid var(--bs-text);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.45);
  cursor: move;
  touch-action: none;
}
.bs-crop-h {
  position: absolute;
  width: 12px;
  height: 12px;
  background: var(--bs-bg);
  border: 1px solid var(--bs-text);
  touch-action: none;
}
.bs-crop-h[data-h="nw"] { top: -7px; left: -7px; cursor: nwse-resize; }
.bs-crop-h[data-h="n"]  { top: -7px; left: 50%; margin-left: -6px; cursor: ns-resize; }
.bs-crop-h[data-h="ne"] { top: -7px; right: -7px; cursor: nesw-resize; }
.bs-crop-h[data-h="e"]  { top: 50%; right: -7px; margin-top: -6px; cursor: ew-resize; }
.bs-crop-h[data-h="se"] { bottom: -7px; right: -7px; cursor: nwse-resize; }
.bs-crop-h[data-h="s"]  { bottom: -7px; left: 50%; margin-left: -6px; cursor: ns-resize; }
.bs-crop-h[data-h="sw"] { bottom: -7px; left: -7px; cursor: nesw-resize; }
.bs-crop-h[data-h="w"]  { top: 50%; left: -7px; margin-top: -6px; cursor: ew-resize; }
.bs-crop-dims {
  position: absolute;
  bottom: -1.8rem;
  left: 0;
  font-family: var(--bs-font-condensed);
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.05rem;
  color: var(--bs-bg);
  background: var(--bs-invert-bg);
  padding: 0.1rem 0.6rem;
  white-space: nowrap;
}

/* ---------- D · 透视四角控制点 ---------- */

.bs-persp-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.bs-persp-svg polygon {
  fill: rgba(253, 244, 151, 0.18); /* 荧光黄浅罩 */
  stroke: var(--bs-text);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.bs-persp-h {
  position: absolute;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  background: var(--bs-accent);
  border: 1px solid var(--bs-text);
  border-radius: 50%;
  cursor: grab;
  touch-action: none;
}
.bs-persp-h:active { cursor: grabbing; }

/* ---------- E · 套索绘制 ---------- */

.bs-lasso-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
}
.bs-lasso-svg polyline,
.bs-lasso-svg polygon {
  fill: rgba(253, 244, 151, 0.25);
  stroke: var(--bs-text);
  stroke-width: 1.5;
  stroke-dasharray: 4 3;
  vector-effect: non-scaling-stroke;
}

@media (max-width: 720px) {
  .bs-devbar { right: 0.75rem; bottom: 0.75rem; flex-wrap: wrap; max-width: calc(100vw - 1.5rem); }
  .bs-menu-panel { position: fixed; left: 1rem; right: 1rem; min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .bs-progress::after { animation: none; width: 100%; left: 0; }
}


/* ==========================================================================
   blkswn v3 demo — 页面级组件（源文件，构建合并进 theme.css）
   工具页骨架 / how-to / FAQ / 滤镜缩略图 / 水印九宫格 等
   ========================================================================== */

/* ---------- 工具页 hero 与导航 ---------- */

.bs-page-hero {
  padding: 3.5rem 0 2.5rem;
  border-bottom: 1px solid var(--bs-border);
}
.bs-page-hero--compact { padding: 2.5rem 0 2rem; }
.bs-page-hero h1 {
  font-family: var(--bs-font-condensed);
  font-weight: 500;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.1;
  letter-spacing: 0;
  text-transform: uppercase;
  margin: 0 0 1rem;
}
.bs-page-hero p { max-width: 40rem; margin: 0; color: var(--bs-text-sub); }

/* 生产 hero.tags 关键词条 */
.bs-hero-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1rem; }
.bs-hero-tags span {
  font-size: clamp(9px, 0.65vw, 12px);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.15rem 0.6rem;
  border: 1px solid var(--bs-border);
  color: var(--bs-text-sub);
}





.bs-tool-nav { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.5rem; }
.bs-tool-nav a {
  padding: 0.25rem 1rem;
  font-size: 0.85rem;
  border: 1px solid var(--bs-border);
  border-radius: var(--bs-radius-pill);
  color: var(--bs-text);
  text-decoration: none;
}
.bs-tool-nav a:hover { background: var(--bs-bg-sub); }

.bs-main { padding-bottom: 2rem; }

/* ---------- 工作区左列（stage）内的次要文字按钮 ---------- */

.bs-linkish {
  border: 0;
  background: none;
  padding: 0;
  font-family: var(--bs-font-body);
  font-size: 0.8rem;
  color: var(--bs-text-sub);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.bs-linkish:hover { color: var(--bs-text); }

.bs-stage-note {
  margin: 0 1.5rem 1.5rem;
  font-size: 0.8rem;
  color: var(--bs-text-sub);
}

/* ---------- how-to 步骤（发丝线分栏） ---------- */

.bs-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1px;
  background: var(--bs-border);
  border: 1px solid var(--bs-border);
}
.bs-steps > div { background: var(--bs-surface); padding: 1.5rem; }
.bs-steps h3 {
  font-family: var(--bs-font-condensed);
  font-size: 1rem;
  text-transform: uppercase;
  margin: 0 0 0.5rem;
}
.bs-steps p { margin: 0; font-size: 0.85rem; color: var(--bs-text-sub); }
.bs-step-num {
  font-family: var(--bs-font-condensed);
  font-weight: 300;
  font-size: 2rem;
  color: var(--bs-text-sub);
  margin-bottom: 0.5rem;
}

/* ---------- FAQ 手风琴 ---------- */










/* ---------- 滤镜缩略图网格（A4 photo-filters） ---------- */

.bs-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr));
  gap: 0.5rem;
}
.bs-filter-thumb {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.35rem;
  border: 1px solid var(--bs-border);
  background: var(--bs-bg);
  cursor: pointer;
  text-align: center;
}
.bs-filter-thumb img { display: block; width: 100%; height: auto; }
.bs-filter-thumb span {
  font-size: clamp(10px, 0.7vw, 12px);
  color: var(--bs-text-sub);
  letter-spacing: 0.04rem;
}
.bs-filter-thumb:hover { background: var(--bs-bg-sub); }
.bs-filter-thumb.is-selected { border-color: var(--bs-text); background: var(--bs-accent); }
.bs-filter-thumb.is-selected span { color: var(--bs-text); }

/* ---------- 水印九宫格位置选择（A6 text-watermark） ---------- */

.bs-pos-grid {
  display: grid;
  grid-template-columns: repeat(3, 2.25rem);
  gap: 0.35rem;
}
.bs-pos-grid button {
  height: 2.25rem;
  border: 1px solid var(--bs-border);
  background: var(--bs-bg);
  cursor: pointer;
  font-size: 0.7rem;
  color: var(--bs-text-sub);
  transition: none;
}
.bs-pos-grid button:hover { background: var(--bs-bg-sub); }
.bs-pos-grid button.is-selected {
  background: var(--bs-accent);
  border-color: var(--bs-text);
  color: var(--bs-text);
}

/* 预览上的水印叠加层 */
.bs-wm {
  position: absolute;
  padding: 0.25rem 0.5rem;
  font-family: var(--bs-font-body);
  white-space: nowrap;
  pointer-events: none;
}
.bs-wm[data-pos="1"] { top: 4%; left: 4%; }
.bs-wm[data-pos="2"] { top: 4%; left: 50%; transform: translateX(-50%); }
.bs-wm[data-pos="3"] { top: 4%; right: 4%; }
.bs-wm[data-pos="4"] { top: 50%; left: 4%; transform: translateY(-50%); }
.bs-wm[data-pos="5"] { top: 50%; left: 50%; transform: translate(-50%, -50%); }
.bs-wm[data-pos="6"] { top: 50%; right: 4%; transform: translateY(-50%); }
.bs-wm[data-pos="7"] { bottom: 4%; left: 4%; }
.bs-wm[data-pos="8"] { bottom: 4%; left: 50%; transform: translateX(-50%); }
.bs-wm[data-pos="9"] { bottom: 4%; right: 4%; }

/* ---------- 通用小组件 ---------- */

.bs-badge {
  display: inline-block;
  padding: 0.15rem 0.75rem;
  font-size: 0.8rem;
  border: 1px solid var(--bs-border);
  border-radius: var(--bs-radius-pill);
}
.bs-badge--accent { background: var(--bs-accent); border-color: var(--bs-text); }

/* 行内数值输出（滑杆右侧） */
.bs-field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.bs-field-row output {
  font-family: var(--bs-font-condensed);
  font-weight: 300;
  font-size: 0.9rem;
  color: var(--bs-text-sub);
  min-width: 3em;
  text-align: right;
}

/* 复选框 */
.bs-checkbox { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; cursor: pointer; }
.bs-checkbox input { accent-color: var(--bs-text); }

/* ---------- F · 批量队列 ---------- */

.bs-queue { list-style: none; margin: 0 1.5rem 1.5rem; padding: 0; border-top: 1px solid var(--bs-border); }
.bs-queue li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0.25rem;
  border-bottom: 1px solid var(--bs-border);
  font-size: 0.85rem;
}
.bs-queue .bs-queue-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bs-queue .bs-queue-size { color: var(--bs-text-sub); font-family: var(--bs-font-condensed); font-weight: 300; }
.bs-queue .bs-queue-status { min-width: 7em; text-align: right; color: var(--bs-text-sub); }
.bs-queue .bs-queue-status.is-done { color: var(--bs-text); }
.bs-queue .bs-queue-status.is-done .bs-saving { background: var(--bs-accent); padding: 0 0.35em; }
.bs-queue .bs-progress { width: 6rem; }

/* ---------- G · 切片 ---------- */

.bs-tallwrap {
  margin: 1.5rem;
  max-height: 24rem;
  overflow-y: auto;
  border: 1px solid var(--bs-border);
  position: relative;
}
.bs-tallwrap img { display: block; width: 100%; height: auto; }
.bs-tallinner { position: relative; }
.bs-slice-line {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px dashed var(--bs-text);
}
.bs-slice-line::after {
  content: attr(data-n);
  position: absolute;
  right: 0.4rem;
  top: -0.65rem;
  font-family: var(--bs-font-condensed);
  font-weight: 300;
  font-size: 10px;
  background: var(--bs-accent);
  border: 1px solid var(--bs-text);
  padding: 0 0.4rem;
}
.bs-slice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(6rem, 1fr));
  gap: 0.75rem;
  margin: 1.5rem;
}
.bs-slice-cell { border: 1px solid var(--bs-border); background: var(--bs-bg); }
.bs-slice-cell .bs-slice-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  background-image: url("../assets/sample-tall.svg");
  background-size: 100% auto;
  background-repeat: no-repeat;
}
.bs-slice-cell span {
  display: block;
  padding: 0.2rem 0.4rem;
  font-family: var(--bs-font-condensed);
  font-weight: 300;
  font-size: 10px;
  letter-spacing: 0.05rem;
  color: var(--bs-text-sub);
  border-top: 1px solid var(--bs-border);
}

/* ---------- H · 图标多尺寸 ---------- */

.bs-icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr));
  gap: 0.75rem;
  margin: 1.5rem;
}
.bs-icon-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 0.5rem;
  border: 1px solid var(--bs-border);
}
.bs-icon-cell img { image-rendering: auto; border: 1px solid var(--bs-border); background: #fff; }
.bs-icon-cell span {
  font-family: var(--bs-font-condensed);
  font-weight: 300;
  font-size: 11px;
  color: var(--bs-text-sub);
  letter-spacing: 0.05rem;
}
.bs-device-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 0 1.5rem 1.5rem;
}
.bs-device {
  flex: 1;
  min-width: 12rem;
  border: 1px solid var(--bs-border);
  padding: 0.75rem;
}
.bs-device h4 {
  margin: 0 0 0.5rem;
  font-family: var(--bs-font-condensed);
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.05rem;
  text-transform: uppercase;
  color: var(--bs-text-sub);
}
.bs-device-tab {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bs-bg-sub);
  border: 1px solid var(--bs-border);
  border-radius: var(--bs-radius-sm);
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
}
.bs-device-tab img { width: 16px; height: 16px; }
.bs-device-home {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
}
.bs-device-home img { width: 48px; height: 48px; border-radius: 10px; }

/* ---------- I · 生成器（QR / 条码 / 占位图） ---------- */

.bs-gen-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 18rem;
  margin: 1.5rem;
  border: 1px solid var(--bs-border);
  background: var(--bs-bg);
}
.bs-gen-stage svg { max-width: 14rem; width: 60%; height: auto; }
.bs-gen-empty { color: var(--bs-text-sub); font-size: 0.9rem; text-align: center; padding: 2rem; }
.bs-textarea {
  width: 100%;
  min-height: 5rem;
  padding: 0.6rem 0.75rem;
  font-family: var(--bs-font-body);
  font-size: 0.9rem;
  color: var(--bs-text);
  background: var(--bs-bg);
  border: 1px solid var(--bs-border);
  border-radius: var(--bs-radius-sm);
  outline: none;
  resize: vertical;
}
.bs-textarea:focus { border-color: var(--bs-text); }

/* ---------- J · 元数据表格 ---------- */

.bs-table-wrap { overflow-x: auto; border: 1px solid var(--bs-border); margin: 0 1.5rem 1.5rem; }
.bs-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.bs-table th, .bs-table td {
  padding: 0.6rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--bs-border);
}
.bs-table tr:last-child td { border-bottom: 0; }
.bs-table th {
  font-size: clamp(10px, 0.7vw, 12px);
  text-transform: uppercase;
  letter-spacing: 0.04rem;
  color: var(--bs-text-sub);
  font-weight: 500;
  white-space: nowrap;
}

/* ---------- E · 像素画工作台 ---------- */

.bs-pixel-grid {
  display: grid;
  margin: 1.5rem;
  border: 1px solid var(--bs-border);
  aspect-ratio: 4 / 3;
}
.bs-pixel-grid > i {
  display: flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
  font-family: var(--bs-font-condensed);
  font-weight: 300;
  font-size: 8px;
  color: rgba(0, 0, 0, 0.55);
  overflow: hidden;
}
.bs-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.bs-palette span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--bs-font-condensed);
  font-weight: 300;
  font-size: 11px;
  color: var(--bs-text-sub);
}
.bs-palette i {
  width: 1rem;
  height: 1rem;
  border: 1px solid var(--bs-border);
  font-style: normal;
}

/* ---------- L · 反白终端面板（image-to-ascii） ---------- */

.bs-panel--invert {
  background: var(--bs-invert-bg);
  color: var(--bs-invert-text);
  border-color: var(--bs-invert-bg);
}
.bs-panel--invert .bs-panel-head { border-bottom-color: #333333; }
.bs-panel--invert .bs-panel-body { background: #333333; }
.bs-panel--invert .bs-panel-body > * { background: var(--bs-invert-bg); }
.bs-panel--invert .bs-field label,
.bs-panel--invert .bs-stage-note { color: #999999; }
.bs-panel--invert .bs-choice {
  background: var(--bs-invert-bg);
  color: var(--bs-invert-text);
  border-color: #444444;
}
.bs-panel--invert .bs-choice:hover { background: #1c1c1c; }
.bs-panel--invert .bs-choice.is-selected {
  background: var(--bs-accent);
  color: var(--bs-text);
  border-color: var(--bs-accent);
}
.bs-panel--invert .bs-range { accent-color: var(--bs-accent); }
.bs-panel--invert .bs-checkbox { color: var(--bs-invert-text); }
.bs-panel--invert .bs-checkbox input { accent-color: var(--bs-accent); }
.bs-panel--invert .bs-btn {
  background: var(--bs-invert-text);
  color: var(--bs-text);
  border-color: var(--bs-invert-text);
}
.bs-panel--invert .bs-btn:hover {
  background: var(--bs-invert-bg);
  color: var(--bs-invert-text);
}
.bs-panel--invert .bs-btn--secondary {
  background: var(--bs-invert-bg);
  color: var(--bs-invert-text);
  border-color: #444444;
}
.bs-panel--invert .bs-btn--secondary:hover { background: #1c1c1c; }
.bs-panel--invert .bs-dropzone {
  border-color: #444444;
  color: #999999;
}
.bs-panel--invert .bs-dropzone strong { color: var(--bs-invert-text); }
.bs-panel--invert .bs-dropzone:hover { background: #141414; }
.bs-panel--invert .bs-linkish { color: #999999; }
.bs-panel--invert .bs-linkish:hover { color: var(--bs-invert-text); }
.bs-panel--invert .bs-processing { border-color: #333333; color: #999999; }
.bs-panel--invert .bs-progress { background: #333333; }
.bs-panel--invert .bs-progress::after { background: var(--bs-accent); }
.bs-panel--invert .bs-flow-error { border-color: var(--bs-invert-text); }
.bs-panel--invert .bs-result-bar { border-color: var(--bs-invert-text); }
.bs-panel--invert .bs-field-row output { color: #999999; }

.bs-term {
  margin: 1.5rem;
  border: 1px solid #333333;
  padding: 1rem 1.25rem;
  overflow: auto;
  max-height: 30rem;
}
.bs-term-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--bs-font-condensed);
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.08rem;
  text-transform: uppercase;
  color: #999999;
  margin-bottom: 0.75rem;
}
.bs-term pre {
  margin: 0;
  font-family: var(--mono, ui-monospace), ui-monospace, Consolas, monospace;
  font-size: 9px;
  line-height: 1.05;
  letter-spacing: 0;
  color: var(--bs-invert-text);
  white-space: pre;
}
.bs-term-cursor {
  display: inline-block;
  width: 0.6em;
  height: 1em;
  background: var(--bs-accent);
  vertical-align: text-bottom;
  animation: bs-blink 1.1s steps(1) infinite;
}
@keyframes bs-blink { 50% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .bs-term-cursor { animation: none; }
}

/* ---------- 认证页 ---------- */

.bs-auth-wrap {
  min-height: calc(100vh - 4rem);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
}
.bs-auth-card {
  width: 100%;
  max-width: 26rem;
  border: 1px solid var(--bs-border);
  background: var(--bs-surface);
  padding: 2rem;
}
.bs-auth-card h1 {
  font-family: var(--bs-font-condensed);
  font-weight: 500;
  font-size: 1.5rem;
  text-transform: uppercase;
  margin: 0 0 0.5rem;
}
.bs-auth-lead { color: var(--bs-text-sub); font-size: 0.9rem; margin: 0 0 1.5rem; }
.bs-auth-form { display: flex; flex-direction: column; gap: 1rem; }
.bs-auth-footer {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--bs-border);
  font-size: 0.9rem;
  color: var(--bs-text-sub);
  text-align: center;
}
.bs-auth-divider {
  text-align: center;
  font-size: 0.8rem;
  color: var(--bs-text-sub);
  margin: 1rem 0;
  position: relative;
}
.bs-auth-divider::before, .bs-auth-divider::after {
  content: ""; position: absolute; top: 50%; width: 40%; height: 1px; background: var(--bs-border);
}
.bs-auth-divider::before { left: 0; }
.bs-auth-divider::after { right: 0; }

/* 2FA 六位验证码输入 */
.bs-code-input {
  font-family: var(--bs-font-condensed);
  font-size: 1.5rem;
  letter-spacing: 0.6em;
  text-align: center;
}

/* ---------- 账户区（sidebar shell） ---------- */

.bs-account-layout {
  display: grid;
  grid-template-columns: 14rem 1fr;
  gap: 1px;
  background: var(--bs-border);
  border: 1px solid var(--bs-border);
  margin: 2rem 0;
}
.bs-account-layout > * { background: var(--bs-surface); }
.bs-account-sidebar { padding: 1.5rem 1rem; }
.bs-account-sidebar h2 {
  font-family: var(--bs-font-condensed);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04rem;
  color: var(--bs-text-sub);
  margin: 0 0 1rem;
}
.bs-account-nav a {
  display: block;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  color: var(--bs-text);
  text-decoration: none;
  border-left: 2px solid transparent;
}
.bs-account-nav a:hover { background: var(--bs-bg-sub); }
.bs-account-nav a.is-active {
  border-left-color: var(--bs-text);
  background: var(--bs-accent);
}
.bs-account-main { padding: 2rem; min-width: 0; }
.bs-account-main h1 {
  font-family: var(--bs-font-condensed);
  font-weight: 500;
  font-size: 1.75rem;
  text-transform: uppercase;
  margin: 0 0 0.5rem;
}
.bs-account-sub { color: var(--bs-text-sub); margin: 0 0 2rem; font-size: 0.95rem; }

.bs-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 1px;
  background: var(--bs-border);
  border: 1px solid var(--bs-border);
  margin: 0 0 2rem;
}
.bs-stats > div { background: var(--bs-surface); padding: 1.25rem; }
.bs-stats dt {
  font-size: clamp(10px, 0.7vw, 13px);
  text-transform: uppercase;
  letter-spacing: 0.04rem;
  color: var(--bs-text-sub);
  margin-bottom: 0.35rem;
}
.bs-stats dd { margin: 0; font-weight: 500; font-size: 1.1rem; }

.bs-details { border-top: 1px solid var(--bs-border); }
.bs-detail {
  display: grid;
  grid-template-columns: 10rem 1fr;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--bs-border);
  font-size: 0.9rem;
}
.bs-detail dt { color: var(--bs-text-sub); margin: 0; }
.bs-detail dd { margin: 0; }

.bs-subpanel {
  border: 1px solid var(--bs-border);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.bs-subpanel h2 {
  font-family: var(--bs-font-condensed);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.04rem;
  text-transform: uppercase;
  margin: 0 0 0.5rem;
}
.bs-subpanel > p { font-size: 0.85rem; color: var(--bs-text-sub); margin: 0 0 1rem; }

/* ---------- 定价 ---------- */

.bs-pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1px;
  background: var(--bs-border);
  border: 1px solid var(--bs-border);
  margin: 2rem 0;
}
.bs-pricing-card {
  background: var(--bs-surface);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.bs-pricing-card.is-primary { background: var(--bs-bg-sub); }
.bs-pricing-card h2 {
  font-family: var(--bs-font-condensed);
  font-weight: 500;
  font-size: 1.25rem;
  text-transform: uppercase;
  margin: 0;
}
.bs-pricing-price { margin: 0; font-size: 2rem; font-family: var(--bs-font-condensed); font-weight: 500; }
.bs-pricing-price span { font-size: 0.9rem; color: var(--bs-text-sub); font-family: var(--bs-font-body); font-weight: 400; }
.bs-pricing-card ul { margin: 0; padding: 0; list-style: none; flex: 1; }
.bs-pricing-card li {
  padding: 0.4rem 0;
  font-size: 0.9rem;
  color: var(--bs-text-sub);
  border-bottom: 1px solid var(--bs-border);
}
.bs-pricing-card li::before { content: "✓ "; color: var(--bs-text); }

/* ---------- 结账 ---------- */

.bs-checkout-plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--bs-border);
  border: 1px solid var(--bs-border);
  margin: 1.5rem 0;
}
.bs-checkout-plan {
  background: var(--bs-surface);
  padding: 1.25rem;
  cursor: pointer;
  display: block;
}
.bs-checkout-plan input { display: none; }
.bs-checkout-plan.is-selected { background: var(--bs-accent); }
.bs-checkout-plan-name { display: block; font-weight: 500; margin-bottom: 0.25rem; }
.bs-checkout-plan-price { font-family: var(--bs-font-condensed); font-size: 1.5rem; }
.bs-checkout-plan-price small { font-size: 0.85rem; color: var(--bs-text-sub); font-family: var(--bs-font-body); }

/* ---------- 法律文档 ---------- */

.bs-legal-doc { max-width: 48rem; margin: 2rem auto; padding-bottom: 3rem; }
.bs-legal-doc .bs-updated { font-size: 0.85rem; color: var(--bs-text-sub); margin-bottom: 2rem; }
.bs-legal-doc h2 {
  font-family: var(--bs-font-condensed);
  font-size: 1.1rem;
  text-transform: uppercase;
  margin: 2rem 0 0.75rem;
}
.bs-legal-doc p, .bs-legal-doc li { font-size: 0.9rem; color: var(--bs-text-sub); }
.bs-legal-doc ul { padding-left: 1.25rem; }
.bs-legal-toc {
  border: 1px solid var(--bs-border);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}
.bs-legal-toc a { display: block; padding: 0.2rem 0; font-size: 0.9rem; color: var(--bs-text); text-decoration: none; }
.bs-legal-toc a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- About ---------- */

.bs-about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--bs-border);
  border: 1px solid var(--bs-border);
  margin: 2rem 0;
}
.bs-about-stats > div { background: var(--bs-surface); padding: 1.5rem; text-align: center; }
.bs-about-stats strong {
  display: block;
  font-family: var(--bs-font-condensed);
  font-size: 2.5rem;
  font-weight: 500;
  line-height: 1;
  margin-bottom: 0.5rem;
}
.bs-about-stats span { font-size: 0.85rem; color: var(--bs-text-sub); }
.bs-pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1px;
  background: var(--bs-border);
  border: 1px solid var(--bs-border);
  margin: 2rem 0;
}
.bs-pillars > div { background: var(--bs-surface); padding: 1.5rem; }
.bs-pillars h3 {
  font-family: var(--bs-font-condensed);
  font-size: 1rem;
  text-transform: uppercase;
  margin: 0 0 0.5rem;
}
.bs-pillars p { margin: 0; font-size: 0.85rem; color: var(--bs-text-sub); }

/* ---------- 安装向导 ---------- */

.bs-install { max-width: 40rem; margin: 0 auto; padding: 3rem 2rem 4rem; }
.bs-install-brand {
  text-align: center;
  font-family: var(--bs-font-condensed);
  font-size: 1.75rem;
  text-transform: uppercase;
  margin-bottom: 2rem;
}
.bs-stepper {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 2rem;
}
.bs-stepper-dot {
  width: 2rem; height: 2rem;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--bs-font-condensed);
  font-size: 0.8rem;
  border: 1px solid var(--bs-border);
  border-radius: 50%;
  flex-shrink: 0;
}
.bs-stepper-dot.is-active { background: var(--bs-invert-bg); color: var(--bs-invert-text); border-color: var(--bs-invert-bg); }
.bs-stepper-dot.is-done { background: var(--bs-accent); border-color: var(--bs-text); }
.bs-stepper-line { flex: 1; height: 1px; background: var(--bs-border); }
.bs-install-card { border: 1px solid var(--bs-border); }
.bs-install-step { padding: 2rem; display: none; }
.bs-install-step.is-active { display: block; }
.bs-install-step h2 {
  font-family: var(--bs-font-condensed);
  font-size: 1.2rem;
  text-transform: uppercase;
  margin: 0 0 1rem;
}
.bs-install-nav {
  display: flex;
  justify-content: space-between;
  padding: 1rem 2rem;
  border-top: 1px solid var(--bs-border);
}
.bs-envcheck { list-style: none; margin: 0; padding: 0; }
.bs-envcheck li {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--bs-border);
  font-size: 0.9rem;
}
.bs-envcheck .ok::after { content: "✓ OK"; color: var(--bs-text); }
.bs-envcheck .ok.warn::after { content: "△ optional"; color: var(--bs-text-sub); }

/* ---------- 404 ---------- */

.bs-error-panel {
  text-align: center;
  padding: 4rem 0 3rem;
  border-bottom: 1px solid var(--bs-border);
}
.bs-error-kicker {
  font-family: var(--bs-font-condensed);
  font-size: clamp(3rem, 10vw, 6rem);
  font-weight: 300;
  line-height: 1;
  margin: 0 0 1rem;
}
.bs-error-panel h2 {
  font-family: var(--bs-font-condensed);
  font-size: 1.5rem;
  text-transform: uppercase;
  margin: 0 0 0.75rem;
}
.bs-error-panel p { color: var(--bs-text-sub); margin: 0 0 1.5rem; }

@media (max-width: 720px) {
  .bs-pos-grid { grid-template-columns: repeat(3, 2.5rem); }
  .bs-device-strip { flex-direction: column; }
  .bs-term pre { font-size: 6px; }
  .bs-account-layout { grid-template-columns: 1fr; }
  .bs-about-stats { grid-template-columns: 1fr; }
  .bs-checkout-plans { grid-template-columns: 1fr; }
  .bs-detail { grid-template-columns: 1fr; gap: 0.25rem; }
}
