.hero {
  position: relative;
  /* 上 72 是首屏与 header 的距离（页面顶部留白，不属于区块节奏）；
     下 40 与 .site-footer 的 padding-top 同值——首屏与页脚是两个边界，
     边界留白一律 40 + 区块 80 = 120，区块之间 80 + 80 = 160。 */
  padding: 72px 0 40px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--hero-wash);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  gap: 64px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: var(--shadow-focus);
}

.eyebrow-inverse {
  color: rgba(255, 255, 255, 0.72);
}

.hero-title {
  margin-top: var(--space-4);
  font-size: clamp(2.4rem, 4.72vw, 4.2rem);
  line-height: 1.03;
  letter-spacing: -0.05em;
  font-weight: 700;
  /* 中文标点悬挂：行末逗号/句号挂在版心外，右缘与上一行对齐。
     Chromium 暂不支持时无副作用；Safari 生效。 */
  hanging-punctuation: first allow-end;
  text-spacing-trim: trim-start;
}

.hero-title em {
  font-style: normal;
  color: var(--brand);
}

.hero-lead {
  margin-top: var(--space-5);
  max-width: 30em;
  font-size: 1.12rem;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: var(--space-6);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: var(--space-7);
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.metric dt {
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* 2.2rem：右栏回到原版构图后，指标退到辅助层——与 67px 的标题形成约 1:2 的层级，
   比原版的 1.9rem 略重（适配当前更宽的左列与更重的右栏），但不再与标题第三行争重量。 */
.metric dd {
  margin-top: 4px;
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.metric dd span {
  margin-left: 4px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
}

/* 右栏是一块「门户界面」：窗口头（三点 + 标题）+ 三行「胶囊 + 长条 + 值」
   + 六格（带描边），浮卡咬住右下角探出去。

   这是最早的构图（提交 8bbe323），甲方在五版之后点名要回这一版。搬回来时
   只搬结构：这 30 多条规则里没有一个硬编码色值，全部走当前主题的 token，
   所以搬过来就是配色改版之后的冷色，不会把暖白带回来。
   与原版有三处不同，都是后来修掉的硬问题：
   1. 整块不再 aria-hidden，只有三点、长条、六格各自 aria-hidden；
      原版把整块 hidden，「广西南宁」「研发中」跟着一起被读屏器跳过。
   2. 三点用 --muted 而不是 --line-strong：后者在深色下（#313747 贴 #12151c）
      8px 的点会整个消失。
   3. 窗口投影用更沉的一档（0 36px 68px -40px + 0 4px 14px -4px），
      不用 --shadow-lg：窗口是首屏唯一的实体面，靠投影把右栏「压」在页面上。

    甲方看过上线那版后又提两条：窗口头右上角那根进度条删掉，「研发中」（第三行
    运营状态）的长条改 70%。所以 `@keyframes meter-fill` 与 `.stage-meter` 已整条
    删除，不满格的进度表达只留在第三行那一条（`.stage-line-progress`，停在 70%、
    不带文字）。
    再之后甲方又要两条：填充改跟「基地」行同一套中性灰；每次打开页面走一次到 70%
    （只播一次，不是一直在加载）。
    最后一轮甲方要「三条统一」：三条长条都从 0 长到自己的宽度，各自填完再弹出后面
    那个值。前两行（品牌、基地）没有进度可言，给满格 100%——不替它们编百分比；
    静止态与之前一致（端头只剩 ≤9/255 的抗锯齿残差，肉眼无差）。第三行仍是 70%，
    全页唯一不满格的一条。 */

.hero-stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  /* 浮卡的高 = 外伸量，顶边才与窗口底边严格齐平；这 78px 也是它的落脚地，
     不给会被 .hero 的 overflow 裁掉。min-height 只能撑高、不能压矮，所以
     窄屏浮卡变矮时 --card-lift 必须跟着收（1180 档 72、≤1000 档 64）。
     390 档浮卡回流到窗口下方，单独覆盖成 0。 */
  --card-lift: 78px;
  min-height: 464px;
  padding-bottom: var(--card-lift);
}

/* 窗口背后一团淡光：把白面从背景上「托」起来，深浅两套都成立。 */
.stage-glow {
  position: absolute;
  z-index: 0;
  inset: 4% 2% auto 2%;
  height: 340px;
  background: radial-gradient(closest-side, var(--brand-glow), transparent 70%);
  filter: blur(24px);
}

.stage-panel {
  grid-area: 1 / 1;
  position: relative;
  z-index: 1;
  margin: 0 40px 0 0;
  padding: 18px 18px 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  /* 比 --shadow-lg 更沉的一档：窗口是首屏唯一的实体面，靠投影把右栏「压」在页面上 */
  box-shadow: 0 36px 68px -40px rgba(20, 23, 31, 0.5), 0 4px 14px -4px rgba(20, 23, 31, 0.06);
}

/* 深色主题的 --line（#262c38）贴在 --bg（#0a0c11）上几乎看不见，两块面都会糊进背景。 */
[data-theme="dark"] .stage-panel,
[data-theme="dark"] .stage-card {
  border-color: var(--line-strong);
}

.stage-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

/* 三个点只是「这是一扇窗口」的记号，不表示任何状态：三颗同色，不挂红黄绿。 */
.stage-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
}

.stage-title {
  margin-left: 10px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--muted);
}

.stage-body {
  display: grid;
  gap: 14px;
  padding-top: 18px;
}

/* 三列定宽：标签等宽、长条等长、右侧值左端对齐——三条边各自成列，才读得成「参考线」。 */
.stage-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 96px;
  align-items: center;
  gap: 12px;
}

/* 标签两种态靠底色分：品牌 = --brand-soft（蓝，选中），
   其余 = --bg-elevated（比窗口高一档的灰）。 */
.stage-chip {
  width: 100%;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  font-size: var(--text-xs);
  color: var(--muted);
  text-align: center;
  white-space: nowrap;
}

.stage-chip-strong {
  color: var(--brand-strong);
  border-color: var(--brand-soft);
  background: var(--brand-soft);
}

/* 三条长条共用一套：轨道取卡片底色（看不出是轨道），填充是里面的 <i>。
   三条都从 0 长到自己的宽度，只播一次；前两行（品牌、基地）满格，
   第三行（运营状态 =「研发中」）停在 70%——见下面的 `.stage-line-progress`。
   轨道**不裁切**（不写 overflow: hidden）：填充自己带 `border-radius: inherit`，
   宽度永远不超过轨道，裁切只会给端头多叠一次抗锯齿——实测端头会比改前浅一档
   （6px 的长条上 1px 宽，Δ≈51/255）。 */
.stage-line {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: var(--surface);
}

/* 填充色只在这里给一次：三条同色。甲方口径「跟基地那个颜色一样」现在不是两次
   对齐出来的巧合，而是同一个来源——第三行不许自己再写颜色。 */
.stage-line i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: var(--line);
  transform-origin: left center;
  animation: stage-line-fill 0.8s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

/* 只有第一行（品牌）用品牌色，层级才不乱。 */
.stage-line-strong i {
  background: linear-gradient(90deg, var(--brand), var(--brand-soft));
}

/* 第三行停在 70%，是全页唯一不满格的一条。宽度是设计上的固定值（**不是数据**）：
   站点只有 company.operating_status 一个字符串，没有任何百分比数字，所以不写
   百分比文字；这一条是 aria-hidden。70% 之外那 30% 轨道与卡片底色同色，读起来
   就是「一条短一点的线」，值就站在轨道末端。 */
.stage-line-progress i {
  width: 70%;
}

/* 一次性填充：只动 transform，keyframes 里不写 width/height——宽度从第一帧就是
   各自的宽度，动画因此不产生重排。没有 iteration-count 的声明即默认 1 次，不循环。
   fill-mode 用 backwards 而不是 both——终帧是 transform: none，视觉上就停在各自的
   宽度，用 width 会多一帧落回原宽度的抖动。 */
@keyframes stage-line-fill {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

/* 三行的值等各自那条填完再出现：填充 0.8s，字的延迟也是 0.8s，淡入 0.28s。
   静态 CSS 就是「看得见」，`backwards` 只在延迟这一段把它挡住——所以关掉动画、
   不支持动画、减动效，字都照样读得到，不存在读不到「研发中」的窗口。 */
.stage-value {
  justify-self: start;
  max-width: 100%;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--muted);
  white-space: nowrap;
  text-overflow: ellipsis;
  animation: stage-value-reveal 0.28s ease-out 0.8s backwards;
}

@keyframes stage-value-reveal {
  from {
    opacity: 0;
    transform: translateY(2px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* 六格两层：上三格 --brand-soft + 顶部 2px --brand 内描边 = 主层级，
   下三格 --bg 空槽 = 下一层；四边 1px --line 把 6 个格子钉成一张网格。 */
.stage-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 6px;
}

.stage-grid span {
  height: 46px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--line);
}

.stage-grid span:nth-child(-n + 3) {
  background: var(--brand-soft);
  border-color: var(--brand-soft);
  box-shadow: inset 0 2px 0 0 var(--brand);
}

/* 权益卡骑在窗口右下角：顶边与窗口底边齐平，底缘外伸 `--card-lift`（与窗口留出的
   落脚地同一个数）；右缘贴这一栏的右边界，比窗口右缘多出窗口自己的 `margin-right`
   （基类 40px，≤1000 断点 36px）——它压在窗口右侧那条边框上，不越出栏目。
   给它 --surface-strong（比窗口亮一档）+ --shadow-float + 描边，才浮得起来。 */
.stage-card {
  display: grid;
  gap: 4px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  box-shadow: var(--shadow-float);
}

.stage-card strong {
  font-size: var(--text-base);
  letter-spacing: -0.01em;
  line-height: 1.4;
  max-width: 190px;
}

.stage-card-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-2xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.stage-card-icon {
  width: 14px;
  height: 14px;
  flex: none;
  color: var(--brand);
}

.stage-card-note {
  font-size: var(--text-xs);
  color: var(--muted);
}

.stage-card-entitlement {
  z-index: 3;
  grid-area: 1 / 1;
  align-self: end;
  justify-self: end;
  width: 264px;
  min-height: var(--card-lift);
  margin: 0 0 calc(-1 * var(--card-lift));
}

/* 区块节奏只有两档：边界（首屏顶/页脚顶）40，区块之间 80——都取自 --space-*。
   改之前这里是 84，与 .hero 的 76/48、.section-tight 的 40/88、页脚的 40/24
   四套值并存，相邻区块的实际留白在 124~168 之间飘。 */
.section {
  padding: var(--space-9) 0;
}

.section-tight {
  padding: 40px 0 var(--space-9);
}

.section-muted {
  background: var(--bg-elevated);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 32px;
}

.section-head-stacked {
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 12px;
  margin-bottom: 0;
}

.nowrap {
  white-space: nowrap;
}

.section-title {
  margin-top: 10px;
  font-size: clamp(1.55rem, 2.6vw, 2.15rem);
  line-height: 1.22;
  letter-spacing: -0.025em;
  font-weight: 620;
  hanging-punctuation: first allow-end;
  text-spacing-trim: trim-start;
}

.section-link {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  margin: -10px -14px;
  border-radius: 999px;
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--brand);
}

.section-link:hover {
  color: var(--brand-strong);
}

/* 项目入口页底部的「服务范围」三栏：名片上公示的三块业务。
   与 .project-card 分开写：服务卡不可点、没有悬停位移，混用会让两种东西看起来一样，
   而这一页里「能点」和「不能点」必须一眼分得出来。 */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.service-card {
  --accent-color: var(--brand);
  --accent-soft: var(--brand-soft);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px 24px;
  border: 1px solid var(--line);
  border-top: 2px solid var(--accent-color);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.service-index {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  color: var(--accent-color);
}

.service-card h3 {
  margin: 0;
  font-size: var(--text-lg);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.service-card > p {
  margin: 0;
  color: var(--text-soft);
  font-size: var(--text-md);
  line-height: 1.75;
}

/* 场景引言（2026-11-21 甲方确认的三句）：学大厂「我们是：一个场景」的叙事，
   在标题与经营范围之间给客户一个能对上号的画面。用卡片自己的 accent 色，
   位置固定在 h3 之后——模板里两处（首页 / 项目入口页）写法一致。 */
.service-card .service-scene {
  margin: -4px 0 0;
  color: var(--accent-color);
  font-size: var(--text-md);
  font-weight: 500;
  line-height: 1.6;
}

.service-points {
  display: grid;
  gap: 8px;
  margin: 4px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.service-points li {
  position: relative;
  padding-left: 16px;
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.6;
}

/* 短横线做项目符号：比圆点克制，也和强调色呼应；用背景色画，不额外占位 */
.service-points li::before {
  content: "";
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 6px;
  height: 1px;
  background: var(--accent-color);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.entrance-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.entrance-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.entrance-name {
  font-size: 1.02rem;
  font-weight: 600;
}

.entrance-note {
  flex: 1 1 16em;
  color: var(--muted);
  font-size: var(--text-md);
}

.entrance-status {
  flex: none;
  padding: 3px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* 已开放的行把状态标签做成真链接，避免「不可点却和 Hero 主按钮指同一目标」 */
.entrance-status-link {
  color: var(--brand);
}

.entrance-status-link:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
}

/* 窄屏下名称与状态标签同行、说明整宽换行，避免三者在 340px 内互相挤位 */
@media (max-width: 560px) {
  .entrance-item {
    gap: 8px 12px;
  }

  .entrance-name {
    order: 1;
  }

  .entrance-status {
    order: 2;
    margin-left: auto;
  }

  .entrance-note {
    order: 3;
    flex: 1 0 100%;
  }
}

.project-grid-wide {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-card {
  --accent-color: var(--brand);
  --accent-soft: var(--brand-soft);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 218px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
  transition: translate 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 100% 0%, var(--accent-soft), transparent 62%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

/* 上浮用 `translate` 而不是 `transform`：卡片在列表页上带 `.reveal.is-revealed`，
   那条规则挂的是 `animation: rise ... both`，`both` 会把最后一帧的 `transform`
   一直保留着。CSS 动画的优先级高于普通声明，所以 `:hover { transform: ... }`
   在带动画的卡片上会被整个盖掉——实测 `/projects` 的卡片悬停时 `transform` 是
   `matrix(1,0,0,1,0,0)`，只有边框和投影变了，卡片不动。`translate` 是与
   `transform` 互补的独立属性，动画碰不到它，两者叠加后照常上浮 4px。 */
.project-card:hover,
.project-card:focus-visible {
  translate: 0 -4px;
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.project-card:hover::after,
.project-card:focus-visible::after {
  opacity: 1;
}

.project-card-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.project-mark {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-color);
  font-size: var(--text-md);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.project-mark-lg {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  font-size: 1.15rem;
}

/* 商品主图。固定 4:3 画框 + `cover`：几十件商品排下来卡片高度必须一致，而素材
   （控制台截图、套装俯拍、报告封面）的长宽比各不相同，让图片按自身比例撑高度会让
   栅格参差。4:3 是三类商品的交集：16:9 截图只损失左右两侧，4:3 素材零裁切，
   偏方的素材损失上下少量。取舍理由见 `portal/product_images.py`。

   画框自带 1px 边与浅底：深色主题下深色图不会糊在卡片底色上，浅色主题下
   白底图也不会与卡片底色连成一片。图在 24px 内边距之内，不做负 margin 全出血。 */
.product-image {
  position: relative;
  z-index: 1;
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
}

.product-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
}

/* 悬停时图片微放大。放大被画框裁掉（`overflow: hidden`），所以卡片本身的宽度与
   高度一个字都不动，与卡片上移 4px 叠加。 */
.project-card:hover .product-image img,
.project-card:focus-visible .product-image img {
  transform: scale(1.03);
}

/* 有主图时 `project-card-top` 只剩价格：`space-between` 会把价格甩到最左、与图片
   左缘对齐，看着像标题的一部分。 */
.product-card-top-solo {
  justify-content: flex-end;
}

/* 详情页主图：同一套画框，圆角跟详情面板对齐。
   详情页用 contain 而不是卡片的 cover：买家要看的是完整商品（竖版截图、
   长条资质照不该被裁掉边），留白由底色消化；卡片小图用 cover 保版面整齐。
   主图本体是 button（点击放大），reset 掉按钮默认样式。 */
.product-image-detail {
  margin-bottom: 24px;
  border-radius: var(--radius-md);
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  cursor: zoom-in;
}

.product-image-detail img {
  object-fit: contain;
}

/* 详情页图库的缩略图条。一行放得下 8 张（390 宽视口两行），再多就要横向滚动，
   所以张数上限定在 8（`MAX_IMAGES_PER_PRODUCT`）。缩略图用的是服务端另存一份的
   `thumb/` 小图（几十 KB），不是把 1600 长边的原图缩着显示——八张原图就是六倍
   于必要的流量，而这条缩略图条是一进详情页就要的东西。 */
.product-gallery-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -8px 0 24px;
  padding: 0;
  list-style: none;
}

.product-gallery-strip-item {
  display: block;
  width: 88px;
  padding: 0;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  cursor: pointer;
}

.product-gallery-strip-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* 当前正在看的那张：描一圈强调色。只改边框与描边，不改尺寸——改尺寸会让整条
   缩略图在切换时抖一下。 */
.product-gallery-strip-item.is-active {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.project-card h3 {
  position: relative;
  z-index: 1;
  margin-top: 8px;
  font-size: 1.12rem;
  letter-spacing: -0.01em;
}

.project-card p {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: var(--text-md);
}

.project-card-foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: var(--text-xs);
  color: var(--muted);
}

.arrow {
  color: var(--accent-color);
  font-size: var(--text-base);
  transition: transform 0.2s ease;
}

.project-card:hover .arrow,
.project-card:focus-visible .arrow {
  transform: translate(2px, -2px);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-elevated);
  font-size: var(--text-xs);
  color: var(--muted);
  white-space: nowrap;
}

.status-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-live {
  color: var(--success);
}

.status-beta {
  color: var(--warning);
}

.status-maintenance {
  color: var(--muted);
}

.accent-indigo {
  --accent-color: #3b5bdb;
  --accent-soft: rgba(59, 91, 219, 0.12);
}

/* 类名仍叫 teal：`ACCENT_CHOICES` 与 `projects`/`outcomes` 的 CHECK 约束都用这个名字，
   改名字要重建表，收益不抵成本。色值已从青绿 #0f766e（色相 175°）改为天蓝 #0369a1：
   青绿与 --success #157f4b（151°）在红绿色盲模拟下 ΔE76 只有 24.9，卡片上的青绿标签
   紧挨「在线」绿点会读混；天蓝在同样模拟下与三个语义色的最小 ΔE 是 62.4，且蓝通道
   在红绿色盲下不受影响。核算脚本是 _repair_tmp 下的 cvd_accent。 */
.accent-teal {
  --accent-color: #0369a1;
  --accent-soft: rgba(3, 105, 161, 0.12);
}

.accent-amber {
  --accent-color: #b45309;
  --accent-soft: rgba(180, 83, 9, 0.12);
}

.accent-rose {
  --accent-color: #be123c;
  --accent-soft: rgba(190, 18, 60, 0.12);
}

.accent-violet {
  --accent-color: #6d28d9;
  --accent-soft: rgba(109, 40, 217, 0.12);
}

.accent-slate {
  --accent-color: #334155;
  --accent-soft: rgba(51, 65, 85, 0.12);
}

[data-theme="dark"] .accent-indigo {
  --accent-color: #92a6ff;
  --accent-soft: rgba(146, 166, 255, 0.14);
}

[data-theme="dark"] .accent-teal {
  --accent-color: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.12);
}

[data-theme="dark"] .accent-amber {
  --accent-color: #fbbf24;
  --accent-soft: rgba(251, 191, 36, 0.12);
}

[data-theme="dark"] .accent-rose {
  --accent-color: #fb7185;
  --accent-soft: rgba(251, 113, 133, 0.12);
}

[data-theme="dark"] .accent-violet {
  --accent-color: #c4b5fd;
  --accent-soft: rgba(196, 181, 253, 0.12);
}

[data-theme="dark"] .accent-slate {
  --accent-color: #cbd5e1;
  --accent-soft: rgba(203, 213, 225, 0.12);
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 72px;
}

.about-body {
  display: grid;
  gap: 28px;
}

.about-aside {
  display: grid;
  align-content: start;
  align-self: center;
  gap: 32px;
}

/* 合作页：左栏与右侧表单顶部对齐。首页 About 区仍保留垂直居中构图。 */
.about-aside.is-top {
  align-self: start;
}

/* 合作流程条：四步全部来自站内已有事实（回复时限 / 同一支团队 / 分阶段推进 /
   上线后长期支持），不新增承诺。桌面四列，1000 以下两列，560 以下一列。 */
.cooperation-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cooperation-step {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.cooperation-step-index {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--muted);
}

.cooperation-step strong {
  font-size: 0.98rem;
}

.cooperation-step p {
  color: var(--muted);
  font-size: var(--text-md);
  line-height: 1.7;
}

@media (max-width: 1000px) {
  .cooperation-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .cooperation-steps {
    grid-template-columns: minmax(0, 1fr);
  }
}

.about-body > p {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--text-soft);
}

.about-points {
  display: grid;
  border-top: 1px solid var(--line);
}

.about-points li {
  display: flex;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.about-index {
  padding-top: 3px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--muted);
}

.about-points strong {
  font-size: 0.98rem;
}

.about-points p {
  margin-top: 2px;
  color: var(--muted);
  font-size: var(--text-md);
}

/* 事实条是「企业愿景 + 商务合作」：成立时间与所在地在首屏左列的指标行，品牌 / 基地 /
   运营状态在右侧窗口里，这两项在首屏不再复述；邮箱则必须留在页面上，右栏改回三行后
   首屏没有它了，就回到它原本待的地方。 */
.about-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 24px;
}

.about-facts div {
  display: grid;
  gap: 2px;
}

.about-facts dt {
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  color: var(--muted);
}

.about-facts dd {
  font-size: var(--text-base);
}

.about-fact-wide {
  grid-column: 1 / -1;
}

.about-fact-link {
  color: var(--brand);
  overflow-wrap: anywhere;
}

.about-fact-link:hover {
  color: var(--brand-strong);
}

/* 窄屏下事实项改单列：将来若把邮箱这类长串放回事实条，整宽才不至于被硬断成两截 */
@media (max-width: 560px) {
  .about-facts {
    grid-template-columns: 1fr;
  }
}

.timeline {
  display: grid;
}

.timeline-item {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 24px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.timeline-item:first-child {
  border-top: none;
  padding-top: 0;
}

.timeline-date {
  padding-top: 4px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--muted);
}

.timeline-content h3 {
  font-size: 1.02rem;
  letter-spacing: -0.01em;
}

.timeline-content p {
  margin-top: 6px;
  color: var(--muted);
  font-size: var(--text-md);
}

.page-hero {
  padding: 64px 0 28px;
}

.page-title {
  margin-top: 12px;
  font-size: clamp(2rem, 3.6vw, 2.9rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 650;
  overflow-wrap: anywhere;
  hanging-punctuation: first allow-end;
  text-spacing-trim: trim-start;
}

.page-lead {
  margin-top: 12px;
  max-width: 36em;
  color: var(--muted);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

/* 项目筛选态的说明行：当前筛的是哪个项目，以及退出筛选的入口。
   与 filter-bar 同组出现，字号取正文档、颜色用辅助文本，不抢卡片区的注意力。 */
.filter-context {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
  margin: -8px 0 16px;
  font-size: var(--text-md);
  color: var(--muted);
}

.chip {
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: var(--text-md);
  color: var(--muted);
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.chip:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.chip.is-active {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 72px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  text-align: center;
}

.empty-state h2,
.empty-state h3 {
  font-size: 1.1rem;
}

.empty-state p {
  color: var(--muted);
  font-size: var(--text-md);
}

.empty-state .button {
  margin-top: 8px;
}

.empty-state-inline {
  padding: 40px 20px;
  border-style: solid;
  background: var(--bg-elevated);
}

.detail-hero {
  padding: 40px 0 36px;
  background: radial-gradient(120% 140% at 0% 0%, var(--accent-soft), transparent 62%);
  border-bottom: 1px solid var(--line);
}

.back-link {
  display: inline-block;
  font-size: var(--text-md);
  color: var(--muted);
  margin-bottom: 28px;
}

.back-link:hover {
  color: var(--text);
}

.detail-head {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

.detail-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: var(--text-sm);
  color: var(--muted);
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.5fr);
  gap: 24px;
  align-items: start;
}

.detail-panel {
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.detail-panel h2 {
  font-size: 1.15rem;
}

/* 跟在正文之后的次级标题（如商品详情页的「规格参数」）要与上文拉开距离；
   作为首个子元素的标题（下单页的「收货信息」）不需要。 */
.detail-panel > h2:not(:first-child) {
  margin-top: 32px;
}

.detail-panel p {
  margin-top: 12px;
  color: var(--muted);
  font-size: var(--text-base);
}

.detail-panel .button {
  margin-top: 24px;
}

.detail-note {
  font-size: var(--text-sm);
}

/* 自动退款成功（「秒退」）的结果块：标题 + 橙色徽标 + 一句「已退回<渠道> ¥金额」。
   三段都是事实，没有一句说明性小字。左边一道 success 竖线而不是整块上色：
   退款成功是既成事实，不需要用底色把整块页面喊一遍。 */
.refund-result {
  display: grid;
  gap: var(--space-1);
  margin-top: var(--space-5);
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--line);
  border-left: 3px solid var(--success);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
}

.detail-panel .refund-result-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-top: 0;
}

.detail-panel .refund-result-title {
  margin-top: 0;
  color: var(--text);
  font-size: var(--text-lg);
  font-weight: 650;
}

.detail-panel .refund-badge {
  padding: 1px 10px;
  border-radius: 999px;
  background: var(--warning-soft);
  color: var(--warning);
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 1.7;
}

.detail-panel .refund-result-line {
  margin-top: 0;
  color: var(--text-soft);
  font-size: var(--text-md);
}

.refund-result-line strong {
  color: var(--text);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

/* R117：这里原本是退款手续费告知的两段样式——常驻的 `.fee-notice*`（结算页表单里）
   与点「去支付」时弹的 `.fee-dialog*` 确认卡。业主 2026-11-24 拍板把这条告知**连代码
   一起删掉**，所以宏、弹卡、`data-fee-dialog` 钩子、这几段样式全都不在了。

   为什么样式要跟着删而不是留着「以后可能用得上」：`.fee-dialog` 是通用名字，留着就会
   被下一个弹窗顺手复用，而这个文件里所有规则的来历都靠注释说明；一条没有使用者的规则
   与一段注释掉的代码一样，只会让下一个人以为页面上还有这个组件。

   费率本身没有删：`portal/refund_fee.py` 照旧算实退金额（直连支付宝 6‰、聚合收单通道 0‰），
   订单页「已退回 …」用的就是它。 */


.detail-side {
  display: grid;
  align-self: start;
  /* 桌面双列下侧栏跟随视口固定（京东式购买栏）：左栏内容滚走了，价格与购买
     入口仍在一屏内。top 预留吸顶页头（约 64px）加呼吸间距。单列断点内取消
     （见下方 max-width:1000px 覆盖），移动端走底部购买条。 */
  position: sticky;
  top: 80px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
}

/* 移动端底部购买条：默认隐藏（桌面双列走上方侧栏），窄断点内启用为
   fixed 底部条。默认规则必须在媒体查询之前——同特异性下后出现的
   display:flex 才能在窄屏赢过这里的 display:none。 */
.mobile-buy-bar {
  display: none;
}

.info-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-top: 1px solid var(--line);
  font-size: var(--text-md);
}

.info-row:first-child {
  border-top: none;
}

.info-row span {
  color: var(--muted);
}

/* 规格参数表：键在左、值在右。值右对齐是因为值的长度差异大（「5 分钟」与
   「含 1 个管理账号 + 3 个子账号」同列），左对齐会让右边缘参差。
   限宽是因为详情面板在 1440 下有 860px：不限宽的话「账号」与它的值会隔出
   1000px，读一行要横跨整个屏幕，键值对失去「同一行」的意义。 */
.spec-list {
  display: grid;
  gap: 12px;
  max-width: 640px;
  margin-top: 16px;
}

.spec-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.spec-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.spec-key {
  color: var(--muted);
  font-size: var(--text-md);
}

.spec-value {
  min-width: 0;
  margin: 0;
  color: var(--text);
  font-size: var(--text-md);
  font-weight: 600;
  text-align: right;
  /* 值可能是不可断词的长串（URL、授权码）。不折行就会把 `.spec-row` 顶出容器，
     再往上把整页撑出横向滚动——详情页 390 下实测溢出 6px 就是这个原因。 */
  overflow-wrap: anywhere;
}

/* 详情页右栏底部的动作区：购买按钮贴在只读信息行下方，上边一条分隔线分开
   「看」与「做」。右栏本身是 grid，动作区独占一行。 */
.detail-side-action {
  padding: 16px 20px;
  border-top: 1px solid var(--line);
}

.detail-side-action .button {
  width: 100%;
}

@media (max-width: 560px) {
  .spec-row {
    flex-direction: column;
    gap: 4px;
  }

  .spec-value {
    text-align: left;
  }
}

.mono {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}

.login-section {
  padding: 56px 0 96px;
}

.login-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 56px;
  align-items: stretch;
}

.login-aside {
  position: relative;
  display: grid;
  align-content: center;
  gap: 20px;
  padding: 48px;
  border-radius: var(--radius-lg);
  background: var(--brand-gradient);
  color: var(--brand-gradient-text);
  overflow: hidden;
}

.login-aside::before {
  content: "";
  position: absolute;
  inset: -30% -30% auto auto;
  width: 70%;
  height: 70%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.18), transparent 70%);
}

.login-aside h1 {
  position: relative;
  font-size: clamp(1.75rem, 2.4vw, 2.35rem);
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.login-aside > p {
  position: relative;
  max-width: 26em;
  color: rgba(246, 248, 255, 0.8);
  font-size: 1rem;
}

.login-points {
  position: relative;
  display: grid;
  gap: 14px;
  margin-top: 12px;
}

.login-points li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  font-size: var(--text-base);
  color: rgba(246, 248, 255, 0.9);
}

.login-points span {
  font-family: var(--font-mono);
  font-size: var(--text-md);
  color: rgba(246, 248, 255, 0.9);
}

.login-card {
  padding: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

/* 暗色下左栏渐变与卡片底色亮度接近（约 1.01:1），
   靠加深投影并提亮边框维持「卡片浮起」的层次。 */
[data-theme="dark"] .login-card {
  border-color: var(--line-strong);
  box-shadow: 0 28px 64px -32px rgba(0, 0, 0, 0.95);
}

.login-card-head h2 {
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

.login-card-head p {
  margin-top: 6px;
  color: var(--muted);
  font-size: var(--text-md);
}

.auth-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin: 22px 0 20px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-elevated);
}

.auth-switch-tab {
  padding: 9px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: var(--text-md);
  font-weight: 600;
  cursor: pointer;
}

.auth-switch-tab.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.auth-mode {
  display: grid;
  gap: 0;
}

.auth-mode[hidden] {
  display: none;
}

/* 找回密码 / 重置密码这类单栏表单页 */
.auth-panel {
  max-width: 480px;
  margin: 0 auto;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.auth-panel .form-note {
  margin-top: 14px;
}

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: var(--text-sm);
  line-height: 1.5;
  color: var(--muted);
}

.consent-row input {
  margin-top: 3px;
  accent-color: var(--brand);
}

.consent-row a {
  color: var(--brand);
  text-decoration: underline;
}

.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 24px 0 18px;
  color: var(--muted);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.provider-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.provider-button {
  display: flex;
  flex: 1 1 160px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-elevated);
  font-size: 0.88rem;
  font-weight: 600;
  text-align: center;
}

.provider-icon {
  flex: none;
  width: 22px;
  height: 22px;
}

.provider-button.is-disabled {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.72;
}

.provider-note {
  flex: 1 1 100%;
  margin: 2px 0 0;
  padding: 0;
  border: 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.5;
  text-align: left;
  opacity: 0.7;
}

.provider-button small {
  font-size: var(--text-2xs);
  font-weight: 400;
  color: var(--muted);
}

.form-note {
  margin-top: 18px;
  font-size: var(--text-sm);
  color: var(--muted);
}

/* 登录表单「记住我 + 忘记密码」同行：左复选框、右链接。 */
.form-check-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.form-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-soft);
  font-size: var(--text-md);
  cursor: pointer;
}

.form-check input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--brand);
  cursor: pointer;
}

.form-link {
  color: var(--brand);
  font-size: var(--text-md);
  font-weight: 600;
}

.form-link:hover {
  text-decoration: underline;
}

/* 句内内联链接（如「还没有账号？注册新账号」）：跟随句内字号，避免字重字号突变。 */
.form-note .form-link {
  font-size: inherit;
}

.member-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.member-identity {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
}

.member-identity > div {
  min-width: 0;
}

.member-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  flex-wrap: wrap;
  min-width: 0;
}

/* 徽标/按钮顺序不随换行重排：状态类在前（冷静期、会员、未读），
   待办与动作在后（设置登录密码、退出登录）。390 下用户扫读的顺序与 1440 一致。 */
.member-actions > * {
  flex: 0 0 auto;
}

/* 从页头徽标跳进来时，表单已经在视口里展开，别让页头盖住它的标题 */
#setting-password {
  scroll-margin-top: calc(var(--header-height) + var(--space-4));
}

@media (max-width: 560px) {
  /* 窄屏徽标：命中高度 24px → 30px（WCAG 2.2 AA 的触控下限）。
     只加内边距，不加字号——字号一变，同一行里几个徽标的高度就不齐了。 */
  .membership-badge {
    padding: 4px 12px;
    line-height: 1.5;
  }

  /* 退出登录永远最后一个、独占一行、右对齐。不占满整行宽度：
     那是主操作的样子，而它在这里只是一个出口。 */
  .member-actions > form {
    order: 99;
    flex: 1 0 100%;
    margin: 4px 0 0;
    text-align: right;
  }
}

.member-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: 24px;
  align-items: start;
}

.member-grid-even {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-card {
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.profile-card h2,
.profile-card h3 {
  font-size: var(--text-lg);
}

.profile-list {
  display: grid;
  margin-top: 18px;
}

.profile-list > div {
  display: grid;
  gap: 2px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.profile-list > div:first-child {
  border-top: none;
}

.profile-list dt {
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  color: var(--muted);
}

.profile-list dd {
  font-size: var(--text-base);
  overflow-wrap: anywhere;
}

.profile-form {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.profile-form .button {
  justify-self: start;
}

.member-section .profile-form {
  max-width: 600px;
}

.profile-hint {
  margin-top: 8px;
  font-size: var(--text-sm);
  color: var(--muted);
}

.profile-list dd.is-muted {
  color: var(--muted);
}

/* ===== 收货地址簿（下单页预填 + 会员中心管理）=====
   两张页面共用同一套类：下单页只读列表（`.address-book` 包住），会员中心是操作列表。
   刻意不用 `<select>`：四条地址挤进下拉框只剩一行截断文字，"张三 · 138… · 广东省深圳…"
   选错了还要退回重选；这里是竖排列表，收货人、电话、地址一行看全。 */
.address-book {
  display: grid;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.address-list {
  display: grid;
  gap: 0;
  margin: var(--space-2) 0 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
}

.address-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--line);
}

.address-item:first-child {
  border-top: none;
}

/* 当前这一条（下单页 = 已填进表单的那条；会员中心 = 默认地址）。 */
.address-item-current {
  background: var(--brand-soft);
  box-shadow: inset 3px 0 0 var(--brand);
}

.address-text {
  font-size: var(--text-md);
  color: var(--text-soft);
  overflow-wrap: anywhere;
}

.address-item .form-check-row {
  flex-wrap: nowrap;
  gap: var(--space-2);
}

.identity-list {
  display: grid;
  gap: 0;
  margin-top: var(--space-3);
  padding: 0;
  list-style: none;
}

.identity-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-top: 1px solid var(--line);
}

.identity-row:first-child {
  border-top: none;
}

.identity-name {
  font-weight: 600;
}

.identity-state {
  font-size: var(--text-sm);
  color: var(--muted);
}

.identity-row form {
  margin-left: auto;
}

.identity-bind {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: var(--space-2);
}

.identity-bind .profile-hint {
  margin-top: 0;
}

.profile-note {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--line);
  font-size: var(--text-sm);
  color: var(--muted);
}

.entitlement-list {
  display: grid;
  margin-top: var(--space-3);
}

.entitlement {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: var(--space-2) 0;
  border-top: 1px solid var(--line);
}

.entitlement:first-child {
  border-top: none;
}

.entitlement-mark {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-weight: 700;
  font-size: var(--text-sm);
}

.entitlement-main {
  display: grid;
  gap: 1px;
  margin-right: auto;
}

.entitlement-main strong {
  font-size: var(--text-base);
}

.entitlement-main span {
  color: var(--muted);
}

.entitlement-status {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: var(--text-xs);
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}

.entitlement-status.is-active {
  color: var(--success);
}

.entitlement-status.is-refunded,
.entitlement-status.is-revoked {
  color: var(--danger);
}

.entitlement-status.is-pending {
  color: var(--warning);
}

.page-hero-split {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.store-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* 首页只有一件在售商品时，别让它一个人占三列格位、右边空出两列。
   空轨道塌掉之后单卡会铺满一行，所以同时把它翻成横条——一件商品占满
   1180×250 的大卡片，比右边空两列更难看。
   `:has()` 不支持时整段不生效，退回现在的三列纵向卡片（theme.css 的浮动标签
   已经用过同样的 @supports 收窄写法）。 */
@supports selector(:has(*)) {
  .store-grid-home:has(> :only-child) {
    grid-template-columns: minmax(0, 1fr);
  }

  .store-grid-home:has(> :only-child) .product-card {
    flex-direction: row;
    align-items: center;
    gap: 20px;
    min-height: 0;
    padding: 18px 24px;
  }

  .store-grid-home:has(> :only-child) .project-card-top {
    flex: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  /* 横条里主图切成左侧缩略图：横条预算只有 250px 高（见下面 `.product-specs`
     那段注释），顶部通栏的 4:3 图会把整条撑到近 500px。
     宽度写死 285px、高度由 `aspect-ratio` 算出来（约 214px），加上下 18px 内边距
     正好是 250px 预算。**不能**只写 `flex: none; align-self: stretch` 让高度去跟随：
     在行向 flex 里 `flex-basis: auto` 会把「图片的固有宽度 1600px」当成基准宽度，
     高度再按 4:3 反推成 1200px——实测卡片被撑到 1240px，横条退化成一张大图。
     680px 断点把卡片退回纵向之后这条规则不生效，纵向里走的是普通卡片的通栏图。 */
  .store-grid-home:has(> :only-child) .product-image {
    flex: none;
    align-self: center;
    width: 285px;
    aspect-ratio: 4 / 3;
  }

  .store-grid-home:has(> :only-child) .product-card h3 {
    margin-top: 0;
    white-space: nowrap;
  }

  .store-grid-home:has(> :only-child) .product-card p {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .store-grid-home:has(> :only-child) .project-card-foot {
    flex: none;
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
    gap: 12px;
  }

  /* 横条形态下规格摘要跟着摘要一起走单行：卡片预算只有 250px 高，
     让它换行会把整条撑高，也破坏「一行看完一件商品」的横条语义。
     这里是全站唯一强制 nowrap 的地方——横条没有第二行的余地。 */
  .store-grid-home:has(> :only-child) .product-specs {
    flex: 0 1 auto;
    flex-wrap: nowrap;
    min-width: 0;
    margin-top: 0;
    overflow: hidden;
  }

  /* 横条里已经有图时，规格摘要让位。`.product-specs` 的职责是「没有照片时承担识别」
     （见下面 `.product-specs` 那段注释）：图上已经写着商品名与形态，再挤一行只会被
     截成「有效期 1」这种碎片——实测加图之后就是这样。只在这个横条形态里让位，
     商店列表与详情页照常显示。 */
  .store-grid-home:has(> :only-child) .product-card:has(.product-image) .product-specs {
    display: none;
  }
}

.product-card {
  min-height: 250px;
}

.product-card form {
  position: relative;
  z-index: 1;
  margin-top: 4px;
}

.product-price {
  font-family: var(--font-mono);
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.product-owned {
  color: var(--success);
  font-weight: 600;
}

/* 交付方式徽标（数字权益 / 实物发货 / 服务）。是状态标签，不是说明文字：
   买家需要在下单前一眼分辨「付款后拿到的是账号权益、还是要等快递」。 */
.product-kind {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: var(--text-xs);
  color: var(--muted);
  white-space: nowrap;
}

/* 卡片脚注左侧的一组状态标签（交付方式 / 已拥有），与右侧的详情入口分开 */
.product-card-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

/* 卡片上的「查看详情」：通往商品详情页的入口。
   颜色走卡片自己的 --accent-color，与右上角箭头同一口径。 */
.product-detail-link {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 6px;
  color: var(--accent-color);
  font-weight: 600;
  white-space: nowrap;
}

/* 卡片上的规格摘要：取前两条「键 值」，横排一行。
   这是「没有照片时」承担识别的一层——买家不用点进详情就知道这件商品包含什么。
   不出现「共 N 条」这类说明性小字：条数由条目本身表达。 */
.product-specs {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 10px;
  font-size: var(--text-sm);
  line-height: 1.5;
}

/* 放不下就换行，不按比例压缩：两条长规格挤在一行里会双双截成碎片
   （「服务范围 公众号、知乎、小红书三个… 交付频次 每…」），等于什么都没说。
   换行的代价是卡片高约 20–40px，网格等高、底部动作行对齐，版式不受影响。 */
.product-spec {
  display: inline-flex;
  align-items: baseline;
  flex: 0 1 auto;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
}

/* 键是短词（「账号」「有效期」），截断它没有意义，也读不出是什么 */
.product-spec-key {
  flex: 0 0 auto;
  color: var(--muted);
}

/* 值可能很长（「服务范围：公众号、知乎、小红书三个平台的日常内容排期与撰写发布」）。
   单条规格不换行，超宽就省略——一条规格不该把整行卡片撑破。 */
.product-spec-value {
  min-width: 0;
  overflow: hidden;
  color: var(--text-soft);
  font-weight: 600;
  text-overflow: ellipsis;
}

/* 390 一档：两条「键 值」横排在单列卡片里必然溢出，改成纵向两行。
   不隐藏——隐藏规格等于把「付钱拿到什么」这层信息整块删掉。
   纵向时每条独占整行宽度，不再需要省略。 */
@media (max-width: 560px) {
  .product-specs {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 2px;
  }
}

.order-list {
  display: grid;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
}

.order-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 22px;
  border-top: 1px solid var(--line);
  transition: background 0.2s ease;
}

.order-row:first-child {
  border-top: none;
}

.order-row:hover {
  background: var(--bg-elevated);
}

.order-row-main {
  display: grid;
  gap: 4px;
}

.order-row-main .mono {
  color: var(--muted);
  font-size: var(--text-xs);
}

.order-row-meta {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 0.84rem;
  color: var(--muted);
}

.order-status {
  color: var(--muted);
  font-weight: 600;
}

.order-status.is-paid {
  color: var(--success);
}

.order-status.is-pending {
  color: var(--warning);
}

.order-status.is-refund_requested {
  color: var(--warning);
}

.order-status.is-refund_in_progress {
  color: var(--warning);
}

.order-status.is-refunded,
.order-status.is-cancelled {
  color: var(--danger);
}

.order-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.order-actions .button {
  margin-top: 0;
}

/* ===== 支付方式选择器（R92，R95 收敛成参考稿那种紧凑卡）=====
   一家网关一张卡、一组 radio、一个「去支付」。R95 按业主给的参考稿
   （`收款样式设计参考/支付平台选择.png`）改了三处：

   1. **卡里只留「图标 + 名字」。** 单选圆点在视觉上撤掉（input 仍在、仍可聚焦、仍带
      `required`），选中态只靠描边表达——参考稿的卡就是这样，圆点和名字在抢同一行视线。
      顺带撤掉的是卡内那行费率小字（业主 2026-11-23「这段小字也能删除了」），告知仍在
      「点去支付时弹的那张卡」里。
   2. **两张卡必然等高。** 卡高 = 上下各 12px 内边距 + 20px 图标 + 2px 边框 = 46px。
      之前一张 89px、一张 60px，看着像没对齐——不是审美问题，是「第二行」造成的。
   3. **卡缝 12px、主按钮通栏。** 参考稿卡缝约 12.5px、主按钮占满整列；原来卡片只有
      26rem 宽、按钮是一颗小胶囊，两者量级不搭。

   选中态只用 `:has(:checked)`，不挂脚本：脚本没跑起来时，那圈近黑的边仍是买家判断
   「我选了哪家」的唯一依据。边框宽度保持 1px，靠一圈 inset 阴影补到视觉 2px——改
   `border-width` 会让切换选中项时整块跳一格。

   不给选中的卡片染渠道品牌色：白字压微信绿只有 2.4:1，过不了 WCAG AA；`--text`
   （浅色主题下近黑、深色主题下近白）在两套主题里都成立。 */
.pay-choice-form {
  display: grid;
  gap: var(--space-2);
  justify-items: stretch;
  margin-top: var(--space-5);
  max-width: 34rem;
}

.pay-choices {
  display: grid;
  gap: var(--space-3);
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
}

.pay-choices-legend {
  padding: 0;
  margin-bottom: var(--space-1);
  color: var(--muted);
  font-size: var(--text-sm);
}

.pay-choice {
  /* `position: relative` 是给那个绝对定位的 radio 用的：它被移出视觉流，
     但仍然留在卡内、仍然是最先被 Tab 聚焦的那个元素。 */
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  cursor: pointer;
}

.pay-choice:has(.pay-choice-input:checked) {
  border-color: var(--text);
  box-shadow: inset 0 0 0 1px var(--text);
}

/* 键盘聚焦要看得见：原生 radio 的焦点圈在网格里几乎贴着卡片边缘。 */
.pay-choice:has(.pay-choice-input:focus-visible) {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* 视觉隐藏、但仍可聚焦：读屏念得出「单选钮，已选中」，键盘 Tab 落得进去（焦点圈由
   卡片上的 `:has(:focus-visible)` 画）。`display:none` / `visibility:hidden` 会把它
   从可聚焦序列里摘掉——一个看不见也摸不到的 radio 等于没有 radio。 */
.pay-choice-input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.pay-choice-body {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.pay-choice-name {
  font-weight: 600;
}

/* 金额行留在按钮上方（付款前最后一眼要能确认「付多少」），与卡片的距离靠这里收：
   卡片 → 金额 16px、金额 → 按钮 8px，正好是参考稿那个节奏。 */
.pay-total {
  margin: var(--space-2) 0 0;
  color: var(--muted);
  font-size: var(--text-sm);
}

.pay-total strong {
  margin-left: var(--space-1);
  color: var(--text);
  font-size: var(--text-lg);
  font-variant-numeric: tabular-nums;
}

/* 支付方式卡片上的渠道标识（B2-2 / R92）。两枚都是官方素材原色：微信是绿色气泡（官方
   矢量素材，只按包围盒裁了画布），支付宝是蓝色「支」字（官方标识字形，透明底）。
   垫一圈白底不是为了好看：支付宝那枚字形本身是品牌蓝，落在深色卡片上会糊成一片；白底
   在明暗两套主题下都不用换，也不用再维护第二套深色素材。尺寸与卡片里标识到文字的间距配套。 */
.pay-icon {
  flex: none;
  width: 20px;
  height: 20px;
  padding: 2px;
  border-radius: 6px;
  background: #ffffff;
  object-fit: contain;
}

/* ===== 收银台卡（R95）=====
   业主参考稿（`收款样式设计参考/微信支付.png`）：一张居中的白卡，自上而下只有渠道、
   「扫一扫付款」、大金额、二维码、两行灰字，一句说明文都没有。这一屏以前套的是
   `.page-head` 加四段 `.detail-note`——同一件事说了四遍，买家真要核对的金额反而是一行小字。

   三条功能约束仍然绑在这一屏上，换布局时不许丢：
   - `data-countdown` 的 `data-deadline` / `data-server-now` 必须是绝对 ISO 时刻
     （裸秒数过不了 `Date.parse`，页面会永远停在静态文案上）；
   - `data-countdown-expired` 是**片段**（「已失效」），它被塞回「二维码有效期 …」这句里读；
   - `data-pay-watch` + `[data-pay-watch-note]`：付完钱靠轮询自己跳走，所以卡里不必
     常驻一句「支付成功后本页会自动跳转」。 */
.cashier-card {
  display: grid;
  justify-items: center;
  gap: var(--space-3);
  max-width: 420px;
  margin: 0 auto;
  padding: var(--space-6) var(--space-5) var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  text-align: center;
}

.cashier-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.cashier-logo {
  width: 24px;
  height: 24px;
}

.cashier-title {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: 650;
}

/* 「扫一扫付款」是动作，金额才是买家要核对的数：压一档、贴紧标题。 */
.cashier-lead {
  margin-top: calc(var(--space-2) * -1);
  color: var(--muted);
}

/* 金额是全卡第一眼。等宽数字，避免 199.00 → 99.00 时整行左右抖。 */
.cashier-amount {
  margin: 0;
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

/* 二维码必须白底：码的模块是黑的、底透明，放到深色面上直接扫不出来。
   这圈 16px 留白同时是码的静区，别为了紧凑压到 8px 以下。 */
.cashier-qr {
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #ffffff;
  line-height: 0;
}

.cashier-hint {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-sm);
}

/* 倒计时归零后这里只剩「已失效」三个字，颜色交给 `.pay-countdown.is-expired`。 */
.cashier-hint .pay-countdown {
  margin-left: var(--space-1);
  color: var(--text);
}

/* 卡底两颗按钮（R117 起是两颗：主「我已完成支付」+ 次「换个支付方式」）。通栏是为了
   让它们在卡片里站得住，不至于缩成小胶囊漂在二维码下面。层级差别靠 `button-ghost`
   与 `--space-2` 的行距：两个都通栏时，颜色是唯一的层次。 */
.cashier-exit {
  width: 100%;
  margin-top: var(--space-2);
}

/* 次级出口：回订单页重选渠道。与主按钮同宽，靠 `button-ghost` 的描边/无底色拉出层次——
   买家扫错码（想用支付宝却进了微信码）时这是唯一的路，但它的位置在主按钮之下，
   视觉重量必须低于主按钮，否则「我已完成支付」会被当成次要动作。 */
.cashier-switch {
  width: 100%;
}

/* 二维码下面那行「正在确认支付结果」：role="status" 的空节点，轮询开始时才填字。
   先占位不高（空 p 的高度为 0），文案出现时页面会轻微下移——所以给它一个最小高度，
   让「确认中 → 已跳转」这一步不推着二维码跳。 */
[data-pay-watch-note] {
  min-height: 1.4em;
}

/* ===== 支付时限倒计时（待支付订单）=====
   秒数每秒都在变，`9 → 10` 少/多一位会把后面的东西顶开，一秒抖一次。等宽数字加上按
   最长写法（`59:59`）留出的宽度，抖动就只发生在数字内部。
   归零后这个位置换成一句「已超时，请勿再支付」，所以宽度只是下限、允许自动换行。 */
.pay-countdown {
  display: inline-block;
  min-width: 5ch;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  color: var(--text);
}

/* 归零用 warning 而不是 danger：钱没丢、订单也没坏，只是这一单过了付款时限。 */
.pay-countdown.is-expired {
  color: var(--warning);
}

.error-section {
  padding: 96px 0 120px;
}

.error-inner {
  display: grid;
  justify-items: start;
  gap: 14px;
  max-width: 44em;
}

.error-code {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--brand);
  letter-spacing: 0.16em;
}

.error-inner h1 {
  font-size: clamp(1.9rem, 3.4vw, 2.7rem);
  letter-spacing: -0.03em;
}

.error-inner p {
  color: var(--muted);
}

.error-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

/* 入场动画的基础态：这里故意不放 animation。
   内容默认可见，只有 JS 真的执行过（html.js-enabled，由 head 里的 theme.js 添加）
   才隐藏并等待进入视口。这样脚本 404 或抛错时页面不会整段空白。 */
html.js-enabled .reveal {
  opacity: 0;
  transform: translateY(14px);
}

.reveal.is-revealed {
  animation: rise 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ===== 首页窄条与项目页内嵌（R42 · S6） =====

   两块都只是「最近有什么」的一瞥：首页给三条纯文字，项目页给三张卡片。
   条数上限在路由（`EMBEDDED_OUTCOMES`），这里只管排版。 */

/* 项目页内嵌与上方「项目说明」之间拉一道通栏细线：不加的话两块读起来像同一段内容。 */
.outcome-embed {
  border-top: 1px solid var(--line);
}

/* 首页窄条整块就是一张表：行间只有细线，没有卡片、没有阴影、没有图片。
   首屏已经很重，这一条是给「最近交付了什么」留的一行注脚，不是第二个展示区。 */
.outcome-strip {
  display: grid;
  border-top: 1px solid var(--line);
}

.outcome-strip-item {
  border-bottom: 1px solid var(--line);
}

.outcome-strip-link {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 20px;
  padding: 14px 0;
}

.outcome-strip-number {
  color: var(--muted);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}

/* 标题吃掉剩余宽度并允许断词：长标题在 390 档也不会把箭头挤出屏幕。 */
.outcome-strip-title {
  flex: 1 1 14em;
  font-size: var(--text-md);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.outcome-strip-meta {
  color: var(--muted);
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
}

.outcome-strip-arrow {
  margin-left: auto;
  color: var(--muted);
  transition: transform 0.2s ease;
}

.outcome-strip-link:hover .outcome-strip-title,
.outcome-strip-link:focus-visible .outcome-strip-title {
  color: var(--brand);
}

.outcome-strip-link:hover .outcome-strip-arrow,
.outcome-strip-link:focus-visible .outcome-strip-arrow {
  transform: translate(2px, -2px);
}

/* 窄屏：编号一行、标题整行、日期第三行。三样挤在一行里，390 档必然横向溢出。 */
@media (max-width: 560px) {
  .outcome-strip-link {
    gap: 2px 12px;
  }

  .outcome-strip-title {
    flex: 1 0 100%;
    order: 2;
  }

  .outcome-strip-meta {
    order: 3;
  }

  .outcome-strip-arrow {
    order: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  /* 减动效下内容必须直接可见：既不能播动画，也不能停在 opacity: 0 */
  html.js-enabled .reveal {
    opacity: 1;
    transform: none;
  }

  .reveal.is-revealed {
    animation: none;
  }

  /* 减动效下三条长条直接停在各自的宽度、字也直接可见：既不播动画，也不会停在
     scaleX(0) 那半截，更不会让值被延迟挡住 */
  .stage-line i,
  .stage-value {
    animation: none;
  }

  .project-card,
  .outcome-card,
  .button,
  .icon-button,
  .outcome-strip-arrow {
    transition: none;
  }

  /* 侧边浮层同理：不做那段横向位移与淡入，10 秒后直接出现。
     「等 10 秒再出现」这条对减动效访客一样保留——它管的是别在首屏抢视线，
     不是动效本身。 */
  .side-rail {
    translate: 0 0;
    transition: none;
  }

  .login-guide-scrim,
  .login-guide-panel {
    transition: none;
  }
}

@media (max-width: 1180px) and (min-width: 1001px) {
  /* 这一档浮卡变矮，外伸量跟着收到 72：min-height 只能撑高不能压矮，
     落脚地必须同步，否则卡底会被 .hero 的 overflow 裁掉。 */
  .hero-stage {
    --card-lift: 72px;
  }

  .stage-card-entitlement {
    width: 232px;
  }
}

@media (max-width: 1000px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  /* 单列后右栏不再与左列等高：限宽让窗口保持原版比例，不摊成一条横带 */
  .hero-stage {
    --card-lift: 64px;
    min-height: 380px;
    max-width: 560px;
  }

  .stage-panel {
    margin-right: 36px;
  }

  .stage-card-entitlement {
    width: 240px;
  }

  .project-grid,
  .project-grid-wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* 服务卡整段是正文，两栏会把长句挤成窄条，直接单栏堆叠更好读 */
  .service-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .split-layout {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .login-layout,
  .member-grid {
    grid-template-columns: 1fr;
  }

  /* 商品详情单列时必须用 `minmax(0, 1fr)` 而不是 `1fr`：`1fr` 的最小值是 auto，
     列宽会被内容的 min-content 顶开。规格值或正文里出现不可断词的长串
     （URL、授权码）时，390 下整页多出 6px 横向滚动——实测就是这么来的。 */
  .detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  /* 单列后侧栏排在内容尾部，sticky 固定会盖住下滚的正文——取消，
     购买入口改由底部固定条承担（.mobile-buy-bar，京东移动端形态）。 */
  .detail-side {
    position: static;
  }

  .mobile-buy-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
    background: var(--surface);
    border-top: 1px solid var(--line);
    box-shadow: 0 -8px 24px rgba(20, 23, 31, 0.08);
  }

  .mobile-buy-bar .mobile-buy-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
  }

  .mobile-buy-bar .button {
    min-width: 128px;
  }

  /* 给固定条留出文档流空间：详情页底部不再贴着页脚。 */
  .page-main:has(.mobile-buy-bar) {
    padding-bottom: 76px;
  }

  .login-aside {
    padding: 40px;
  }
}

/* ---- 设置行列表：会员中心所有设置类区块共用的唯一版式语法 ----
   一行 = 标签 + 内容（标签在左固定列，值在右）。标签字号字重与 .form-field 一致，
   可编辑行的输入框复用 text_field 自带标签，只读行用 .setting-block-label。
   单行 54px 高：旧版「标签一行 + 值一行」的两行式，会让手机号那一行 142px 里只装 11 位数字。 */
.setting-block {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  align-items: start;
  column-gap: var(--space-4);
  row-gap: var(--space-1);
  padding: var(--space-2) 0;
  border-top: 1px solid var(--line);
}


@media (max-width: 680px) {
  .hero {
    padding-top: 32px;
    padding-bottom: 24px;
  }

  .hero-title {
    font-size: clamp(2.1rem, 8.4vw, 2.7rem);
  }

  .hero-metrics {
    gap: 16px;
  }

  .metric dd {
    font-size: 1.5rem;
  }

  /* 甲方拍板（2026-11-17）：窄屏整个装饰窗口（含权益浮卡）不渲染——
     「窗口 + 浮卡骑边」的构图依赖横向空间，竖排堆叠后怎么摆都突兀。
     --card-lift 收到 0px 保留「外伸量随窗口收窄」的契约（test_home_polish）。
     桌面不受影响。 */
  .hero-stage {
    --card-lift: 0px;
    display: none;
  }

  /* 手机上横条会挤成一条缝，退回正常的竖排商品卡。 */
  .store-grid-home:has(> :only-child) .product-card {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 24px;
  }

  .store-grid-home:has(> :only-child) .project-card-top {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  /* 横条退回竖排之后，主图也回到普通卡片的通栏宽度（285px 的缩略图宽度只在
     行向横条里成立，留在这里会让手机上的图缩在左边）。 */
  .store-grid-home:has(> :only-child) .product-image {
    align-self: auto;
    width: auto;
  }

  .store-grid-home:has(> :only-child) .product-card p {
    overflow: visible;
    white-space: normal;
  }

  .store-grid-home:has(> :only-child) .project-card-foot {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--line);
  }

  .section {
    padding: 64px 0;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .project-grid,
  .project-grid-wide {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .detail-head {
    flex-direction: column;
    gap: 16px;
  }

  .login-card,
  .login-aside,
  .profile-card,
  .detail-panel {
    padding: 24px;
  }

  .provider-grid {
    grid-template-columns: 1fr;
  }

  .entitlement {
    flex-wrap: wrap;
  }

  .member-actions {
    width: 100%;
  }
}

.form-error {
  padding: 12px 16px;
  border: 1px solid var(--danger);
  border-left-width: 4px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--danger);
  font-size: var(--text-md);
  scroll-margin-top: calc(var(--header-height) + 24px);
}

.flash-stack {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.flash-item {
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: var(--text-md);
}

/* 成功类提示沿用 `.form-error` 的结构：4px 左边框承担语义，正文保持 --text 可读。
   原来所有 flash 都是同一条灰边白底，提交完商务表单跳回来，那条「已收到，编号 #N」
   和普通站内提示长得一模一样，访客分不出刚才那一下到底成没成。 */
.flash-item-success {
  border-color: var(--success);
  border-left-width: 4px;
}

/* 站内消息：会员中心的消息通知面板 */
.message-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.message-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.message-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
}

.message-item.is-unread {
  border-color: var(--brand);
}

.message-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.message-main p {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-md);
  overflow-wrap: anywhere;
}

.message-time {
  display: inline-flex;
  align-items: baseline;
  flex-shrink: 0;
  color: var(--muted);
  font-size: var(--text-xs);
  white-space: nowrap;
}

/* 未读行整行可点 = 已读（R93）。外层表单 `display: contents`：它自己不生成盒子，
   里面的按钮和时间仍然是 `.message-item` 的直接 flex 子项，和已读行长得一模一样。
   否则多出一层 form，一行会被拆成「按钮 / 时间」两段并对不齐。 */
.message-read-form {
  display: contents;
}

/* 把按钮还原成文字块：它是「一行消息」，不是一颗按钮。内边距从行挪到这里——
   未读行整行都归这颗按钮管（`.message-item.is-unread { padding: 0 }`），
   所以点到边框内侧任何一处都算「我读过了」。不用铺一层 `::after` 盖住整行：
   那会连拖选文字的指针事件一起吃掉。 */
.message-main-button {
  flex: 1 1 auto;
  min-width: 0;
  padding: 14px 16px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: start;
  cursor: pointer;
}

/* 未读行的时间戳也跟着行内边距走（行的 padding 已经交给按钮）。 */
.message-item.is-unread {
  padding: 0;
}

.message-item.is-unread .message-time {
  padding: 14px 16px 14px 0;
}

.message-main-button:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.message-main-button:hover .message-title,
.message-main-button:focus-visible .message-title {
  color: var(--brand-strong);
}

.message-title {
  font-weight: 600;
}

/* 与 `.message-main p` 同一条观感：按钮里的正文用 `<span>`，规则得再写一遍。 */
.message-body {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-md);
  overflow-wrap: anywhere;
}
/* 受限 Markdown 渲染结果：公告正文与项目详细说明 */
.rich-text {
  display: grid;
  gap: 10px;
  color: var(--muted);
  font-size: var(--text-md);
  line-height: 1.72;
}

.rich-text p,
.rich-text ul,
.rich-text ol,
.rich-text blockquote,
.rich-text pre,
.rich-text h2,
.rich-text h3,
.rich-text h4,
.rich-text h5 {
  margin: 0;
}

.rich-text h2,
.rich-text h3,
.rich-text h4,
.rich-text h5 {
  color: var(--text);
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.rich-text ul,
.rich-text ol {
  padding-left: 24px;
}

/* 全局重置去掉了列表标记，正文里要还原 */
.rich-text ul {
  list-style: disc;
}

.rich-text ol {
  list-style: decimal;
}

.rich-text li + li {
  margin-top: 4px;
}

/* 运营正文里会贴 URL、授权码这类不可断词的长串。只给 li 折行不够：段落、
   标题、链接里的长串同样会把所在的网格列撑宽。用 `anywhere` 而不是
   `break-word`——只有前者会把 min-content 也算成可折行，网格列才收得回来。 */
.rich-text p,
.rich-text a,
.rich-text h2,
.rich-text h3,
.rich-text h4,
.rich-text h5,
.rich-text li {
  overflow-wrap: anywhere;
}

.rich-text blockquote {
  padding: 6px 14px;
  border-left: 2px solid var(--line-strong);
}

.rich-text code {
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-family: var(--font-mono);
  font-size: 0.85em;
}

.rich-text pre {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  overflow-x: auto;
}

.rich-text pre code {
  padding: 0;
  background: none;
  color: inherit;
}

.rich-text a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* 详情面板已有 `.detail-panel p` 规则，这里收回外边距与字号，交给 .rich-text 统一控制 */
.detail-panel .rich-text {
  margin-top: 16px;
}

.detail-panel .rich-text p {
  margin-top: 0;
  color: inherit;
  font-size: inherit;
}

.timeline-content .rich-text {
  margin-top: 6px;
}
.legal-body {
  margin-top: 28px;
}

.legal-body h2 {
  font-size: 1.08rem;
  margin: 24px 0 8px;
}

.legal-body p,
.legal-body li {
  color: var(--muted);
  line-height: 1.8;
}

.legal-nav {
  display: flex;
  gap: 8px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.text-link {
  color: var(--brand);
}


/* 状态徽标。全站规则：**有箭头 = 能点**，箭头只由 `.is-link` 画。
   `inline-flex` 是为了让箭头与文字垂直居中；`white-space: nowrap` 保证胶囊内永不
   换行（换行交给 `.member-actions` 的 flex-wrap），`max-width: 100%` 防止 390px 下
   长徽标把页头撑出横向滚动。 */
.membership-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 2px 10px;
  border: 1px solid var(--brand);
  border-radius: 999px;
  color: var(--brand);
  font-size: var(--text-xs);
  line-height: 1.6;
  white-space: nowrap;
}

/* 箭头走 CSS 而不是模板里的字面量 `→`：读屏不会念「右箭头」，而且字重与间距
   能和旁边不带动画的徽标对齐。 */
.membership-badge.is-link::after {
  content: "\2192";
  font-weight: 400;
}

.membership-badge.is-link:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.membership-badge.is-link:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* 冷静期徽标：状态，红描边、**无底色**。用户改不了它，只能等它自己走完。 */
.membership-badge.is-danger {
  border-color: var(--danger);
  color: var(--danger);
  font-weight: 600;
}

/* 待办徽标：红描边 + 淡红底。与冷静期的唯一区别是**填充**——一行里只允许有一个
   填充的红胶囊，它就是需要用户动手的那一个。不另立第三种红：两个红徽标同时出现
   （冷静期 + 设置登录密码）时也不会互相打架。

   内边距与圆角不动，是因为用大小差表达「更重要」会被读成优先级，还会让同一行的
   右侧基线不齐；表达「能点」的手段只有箭头、hover 与 focus ring。 */
.membership-badge.is-action {
  background: var(--danger-soft);
}

.member-section {
  padding: var(--space-4) 0;
}

.member-section:last-of-type {
  padding-bottom: var(--space-6);
}

/* ---- 会员中心外壳：左栏导航 + 右侧单页内容 ----
   GitLab / Gitea / django-allauth 都是这个形状：导航在左，一区一页。
   当前项由服务端渲染 aria-current，不用 JS，也不靠 :target。 */
.member-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: var(--space-6);
  align-items: start;
}

.member-nav {
  display: grid;
  gap: 2px;
  position: sticky;
  top: calc(var(--header-height) + var(--space-4));
}

.member-nav-item {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: var(--text-md);
}

.member-nav-item:hover {
  background: var(--bg-elevated);
  color: var(--text);
}

.member-nav-item.is-active {
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-weight: 600;
}

.member-page {
  min-width: 0;
}

/* 子页页头：只留身份 + 徽标。eyebrow「会员中心」删掉——左栏和浏览器标题已经说了；
   标题降一档、留白减半，把约 70px 让给内容。 */
.member-head.is-compact .eyebrow {
  display: none;
}

.member-head.is-compact .page-title {
  margin-top: 0;
  font-size: var(--text-xl);
}

.member-head.is-compact .page-lead {
  margin-top: var(--space-1);
}

.member-head.is-compact {
  padding-bottom: 0;
}

.page-hero.is-compact {
  padding: var(--space-4) 0 var(--space-3);
}

/* 子页卡片内边距比 onboarding 的 .profile-card 小一档 */
.member-page .profile-card {
  padding: var(--space-4) var(--space-5);
}

.member-group-heading {
  margin-bottom: var(--space-2);
  font-size: var(--text-xl);
  letter-spacing: -0.02em;
}

.member-group-heading + .profile-hint {
  margin-top: 0;
  margin-bottom: var(--space-4);
}

.member-section[id],
.setting-block[id] {
  scroll-margin-top: calc(var(--header-height) + var(--anchor-offset));
}

.profile-card-danger {
  border-left: 4px solid var(--danger);
}

#danger {
  margin-top: var(--space-7);
}

.profile-card > .setting-block:first-child {
  padding-top: 0;
  border-top: none;
}

.setting-block-label {
  grid-column: 1;
  padding-top: 9px;
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--text-soft);
}

.setting-block-body {
  display: grid;
  gap: var(--space-2);
  min-width: 0;
  margin: 0;
}

/* 值列与内容列固定在第 2 列；行尾说明句也放第 2 列，不跨列 */
.setting-value,
.setting-block-body,
.setting-block > .profile-hint {
  grid-column: 2;
}

.setting-block > .profile-hint {
  margin-top: 0;
}

.setting-block .profile-form {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.setting-block-body .entitlement-list {
  margin-top: 0;
}

/* 未读标记：颜色之外的第二种编码，读屏可读，不依赖圆点或字重 */
.message-unread {
  margin-right: var(--space-1);
  color: var(--brand);
  font-size: var(--text-2xs);
}

/* ---------------------------------------------------------------------------
   站内公告（R39）
   列表复用 .message-list / .message-item / .message-time：公告与站内消息在视觉上
   是同一族信息，另造一套只会让人以为是两种东西。这里只补公告独有的三件事：
   整条标题可点、详情正文排版、翻页。
   --------------------------------------------------------------------------- */

/* 标题即点击区。min-height 44px 是触屏最小点击面积；不给 line-clamp——
   一条公告的标题被截掉一半，用户只能点进去才知道它是不是自己要找的那条。 */
.notice-link {
  display: block;
  min-height: 44px;
  padding: 11px 0;
  color: var(--text);
  font-size: var(--text-md);
  font-weight: 600;
  line-height: 1.5;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.notice-link:hover {
  color: var(--brand-strong);
  text-decoration: underline;
}

.notice-body {
  margin-top: var(--space-3);
  color: var(--text-soft);
}

/* 翻页与返回：单独一行、靠左，不跟正文抢视线 */
.notice-pager {
  margin: var(--space-4) 0 0;
}

/* 左栏「公告」后面的未读圆点。不显示数字：左栏宽度只有 200px，数字会把
   「账号注销」挤成两行；具体条数在页面顶部写着。 */
.member-nav-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 6px;
  border-radius: 50%;
  background: var(--brand);
  vertical-align: middle;
}


.login-history {
  display: grid;
  gap: 0;
  margin-top: var(--space-3);
  padding: 0;
  list-style: none;
}

.login-history-head,
.login-history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) minmax(0, 1.2fr);
  align-items: center;
  gap: 12px;
}

.login-history-head {
  padding: 0 0 var(--space-2);
  border-bottom: 1px solid var(--line);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  color: var(--muted);
}

.login-history-row {
  padding: var(--space-3) 0;
  font-size: var(--text-md);
}

.login-history-row + .login-history-row {
  border-top: 1px solid var(--line);
}

.setting-block summary {
  margin-top: var(--space-2);
  font-size: var(--text-md);
  color: var(--muted);
  cursor: pointer;
}

.setting-block summary::marker {
  color: var(--text-soft);
}

/* 「本次登录」标记：用文字而不是颜色做区分，读屏可读 */
.login-current {
  display: inline-block;
  margin-left: var(--space-2);
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: var(--text-2xs);
  font-weight: 600;
  white-space: nowrap;
}

/* IP 折叠块已删除：页面只显示可读的地点，不显示明文 IP（安全审计要用的 IP
   留在服务端日志与 `login_events` 里，与页面上给用户看什么是两件事）。
   原来这里还有 `.ip-fold` 的三条规则，一并删掉——没有元素会再命中它们，留着只会
   让人以为还有一处仍在渲染 IP。 */

/* 展示态行：左侧是值，右侧是「修改」开关。展开后编辑器占满整行宽度，
   开关留在原来的 x 位置，避免展开时按钮跳位。 */
.setting-value {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}

.setting-value > :first-child {
  overflow-wrap: anywhere;
}

.setting-edit {
  min-width: 0;
}

.setting-edit[open] {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: var(--space-2) var(--space-3);
}

.setting-edit[open] > summary {
  grid-column: 2;
  grid-row: 1;
}

.setting-edit[open] > :not(summary) {
  grid-column: 1 / -1;
}

/* 「修改」开关：外观对齐 .button-ghost.button-small，但不参与表单按钮层级 */
.setting-edit > summary {
  display: inline-block;
  margin-top: 0;
  padding: 8px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  cursor: pointer;
  justify-self: end;
  transition: border-color 0.2s ease;
}

.setting-edit > summary::-webkit-details-marker {
  display: none;
}

.setting-edit > summary:hover {
  border-color: var(--text);
}

/* 编辑器里的按钮排：保存在前、放弃修改在后，x 位置固定不随文案漂移 */
.setting-edit-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding-top: 6px;
}

/* 登录地点：「广西 · 移动」或「无法识别地点」。长地名换行，不参与列宽竞争。
   IP 明文不在这里出现——要查具体地址请到服务端日志。 */
.login-location {
  display: block;
  overflow-wrap: anywhere;
}

@media (max-width: 680px) {
  .login-history-head {
    display: none;
  }

  .login-history-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .order-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .order-row-meta {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
    white-space: nowrap;
  }

  .login-layout {
    display: flex;
    flex-direction: column;
  }

  .login-card {
    order: 1;
  }

  .login-aside {
    order: 2;
  }

  .login-section {
    padding: 24px 0 48px;
  }

  .login-points {
    display: none;
  }

  .section-tight {
    padding: 32px 0 56px;
  }

  .consent-row {
    padding: 8px 0;
  }

  .consent-row input {
    width: 20px;
    height: 20px;
  }

  .footer-column a {
    padding: 6px 0;
  }
}

/* 企业资质 */

.qualification-layout {
  display: grid;
  gap: 22px;
  max-width: 1000px;
}

.license-figure {
  margin: 0;
  display: grid;
  gap: 12px;
}

.license-figure img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.license-figure figcaption {
  color: var(--muted);
  font-size: var(--text-sm);
}

.license-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 4px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--line);
}

.license-facts div {
  display: grid;
  gap: 6px;
}

.license-facts dt {
  color: var(--muted);
  font-size: var(--text-xs);
}

.license-facts dd {
  margin: 0;
  color: var(--text);
  font-size: var(--text-base);
  font-weight: 600;
}

/* 备案号链接只是展示用：与正文同色同字体，不加下划线、不做 hover 提示，
   链接仍可点（点击跳转由 a 的默认行为提供）。 */

/* 侧边快捷栏 */

.side-rail {
  position: fixed;
  right: 24px;
  top: 50%;
  z-index: 50;
  display: grid;
  gap: 10px;
  justify-items: center;
  transform: translateY(-50%);
  /* 首屏不出现：访客刚落地那一屏是读内容的地方，右下角一列浮层只会抢视线。
     portal.js 在停留满 10 秒后挂 is-shown，这里只负责「藏好」与「缓进缓出」。 */
  opacity: 0;
  visibility: hidden;
  translate: 14px 0;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    translate 0.5s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.5s;
}

.side-rail.is-shown {
  opacity: 1;
  visibility: visible;
  translate: 0 0;
}

.side-rail-group {
  display: grid;
  gap: 2px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.side-rail-item {
  position: relative;
}

.side-rail-link {
  display: grid;
  justify-items: center;
  gap: 3px;
  width: 52px;
  padding: 11px 0 9px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: var(--text-2xs);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.side-rail-link:hover,
.side-rail-link:focus-visible {
  color: var(--brand-strong);
  background: var(--brand-soft);
}

.side-rail-link svg {
  width: 20px;
  height: 20px;
}

.side-rail-top {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease,
    transform 0.2s ease, visibility 0.2s;
}

/* 回到顶部只在离开首屏后才有意义：停在页顶时点它什么也不会发生。 */
.side-rail-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.side-rail-top:hover,
.side-rail-top:focus-visible {
  color: var(--brand-strong);
  border-color: var(--brand);
}

.side-rail-top svg {
  width: 18px;
  height: 18px;
}

.side-rail-card {
  position: absolute;
  right: calc(100% + 14px);
  top: 50%;
  display: grid;
  gap: 10px;
  width: 272px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-float);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-50%) translateX(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.side-rail-item:hover .side-rail-card,
.side-rail-item:focus-within .side-rail-card {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

.side-rail-card h3 {
  margin: 0;
  color: var(--text);
  font-size: var(--text-md);
}

.side-rail-card p {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.65;
}

.side-rail-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.side-rail-card li {
  color: var(--text-soft);
  font-size: var(--text-sm);
}

/* 客服二维码：给没装微信的电脑用户一条扫码通路。图源已自带白色静区
   （441px 源图里 QR 主体 377px，四边各留 31px）。
   112px 是码本体的物理宽度：112 × (377/441) ÷ 45 模块 ≈ 2.13px/模块，
   在屏幕扫码的下限之上。所以这里必须 content-box——全局是 border-box，
   若被改回 border-box，padding 与边框会把码压到 98px（1.86px/模块），扫不出来。
   1px 轮廓线把它从「无边界白砖」变成一张有边界的凭证，深浅主题共用一套。 */
.side-rail-qr {
  box-sizing: content-box;
  display: block;
  justify-self: center;
  width: 112px;
  height: 112px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

/* 960px 以下不再整条关掉：手机访客占大多数，之前唯一能碰到的咨询入口在页脚最底部。
   改成右下角竖排，卡片向左展开，宽度按视口收窄。回到顶部在移动端隐藏——滚一下就能
   滑回页顶，这个按钮只会占位置。 */
@media (max-width: 960px) {
  .side-rail {
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    top: auto;
    transform: none;
  }

  .side-rail-card {
    width: min(240px, calc(100vw - 96px));
  }

  /* 详情页底部有固定购买条时，浮层要抬到它上面：那一屏唯一的主按钮就是条里的
     「立即购买」，浮层压上去等于让买家点错。实测 390 档浮层底 884 与购买条顶 830
     重叠 54px；抬高 70px 后浮层底 814，不再相交。 */
  body:has(.mobile-buy-bar) .side-rail {
    bottom: calc(86px + env(safe-area-inset-bottom, 0px));
  }

  .side-rail-top {
    display: none;
  }
}

@media (max-width: 680px) {
  .license-facts {
    grid-template-columns: 1fr;
  }
}

/* ===== 登录引导面板 ===== */

/* 阴影必须用 --shadow-md：--shadow-lg 扩散 -50px，在遮罩之上托不出边界，等于没阴影。 */
.login-guide {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  pointer-events: none;
}

/* display: grid 会盖掉浏览器默认的 [hidden] { display: none }（同为 0,1,0，作者样式胜出），
   不补这条 hidden 属性彻底失效，面板会永远挂在页面上。 */
.login-guide[hidden] {
  display: none;
}

/* 关闭中间态（已摘 is-modal-open）必须不可点，否则连点两次会让第二次落在正在消失的遮罩上。 */
.login-guide.is-modal-open {
  pointer-events: auto;
}

/* 深色下提高遮罩 alpha 实测无效（面板与遮罩底 1.08 到 1.09），分离由面板边框承担。 */
.login-guide-scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.login-guide-panel {
  position: relative;
  display: grid;
  gap: 12px;
  width: min(360px, calc(100vw - 32px));
  max-height: min(560px, calc(100vh - 64px));
  overflow-y: auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* 关闭钮绝对定位在面板内：面板是滚动容器，内容超长时它会跟着滚走。
   当前内容远小于 max-height 不触发；将来文案变长需改 sticky 或移出滚动容器。 */
.login-guide-panel .icon-button {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: var(--text-lg);
  line-height: 1;
}

/* 38px 圆钮占住右上角，标题右侧留出等宽空间，否则长标题会钻到按钮下面。 */
.login-guide-panel h2 {
  font-size: var(--text-lg);
  padding-right: 40px;
}

.login-guide-note {
  margin: 18px 0 12px;
  color: var(--muted);
  font-size: var(--text-sm);
}

/* 面板用 gap 控制节奏，note 自带的 margin 会叠成双倍间距，这里归零。 */
.login-guide-panel .login-guide-note {
  margin: 0;
}

.login-guide.is-modal-open .login-guide-scrim {
  opacity: 1;
}

.login-guide.is-modal-open .login-guide-panel {
  opacity: 1;
  transform: none;
}

/* 深色面板与遮罩底只有 1.08:1，边框是唯一有效的分离手段（--line-strong 为 1.71:1）。 */
[data-theme="dark"] .login-guide-panel {
  border-color: var(--line-strong);
}

/* 深色面板上 --surface 底只差 1.03:1，关闭钮会退化成裸 × 点不中。 */
[data-theme="dark"] .login-guide-panel .icon-button {
  border-color: var(--line-strong);
}

/* body 的 overflow 会传播到视口。padding-right 由 JS 在加类前测量后内联，
   与摘类同帧清除；写进 CSS 会造成关闭瞬间 150ms 内容横移。 */
body.is-modal-open {
  overflow: hidden;
}

/* .side-rail-item:hover .side-rail-card 特异性 0,3,0，
   body.is-modal-open .side-rail-card 只有 0,2,1 会输，必须补一层 .side-rail。 */
body.is-modal-open .side-rail .side-rail-card {
  opacity: 0;
  visibility: hidden;
}

/* ===== 项目成果（R42 · S5） =====

   配色只走 token：卡片是 --surface + --line，正文是 --text/--muted。证书图的
   白底用 --surface 而不是 #fff——深色主题下 #fff 会变成一块刺眼的白砖，而
   --surface 在深色下是深灰，恰好是「留白」该有的意思。
   全部尺寸走 --space-* 与 --text-*，不写魔法数，四档宽度才不会各长一套。 */

.outcome-preview-flag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border: 1px solid var(--warning);
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--warning);
  font-size: var(--text-xs);
}

.outcome-pinned {
  margin-bottom: var(--space-6);
}

.outcome-pinned-title {
  margin-bottom: var(--space-3);
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
}

.outcome-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

/* 置顶区与正文同一套栅格：换一套列宽会让「置顶的两条」看起来是另一个模块，
   而它们只是排在前面的两条。 */
.outcome-grid-pinned {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.outcome-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
  transition: translate 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

/* 同 `.project-card`：上浮用 `translate`，`transform` 会被 `.reveal` 的动画占着。 */
.outcome-card:hover,
.outcome-card:focus-visible {
  translate: 0 -4px;
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

/* 卡片图统一 16/10 的框：图各有各的比例，卡片不能跟着它们高高低低。
   object-fit 与 object-position 由 .outcome-media-* 决定（见下）。 */
.outcome-card-media {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.outcome-cover {
  display: block;
  width: 100%;
  height: 100%;
}

.outcome-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--space-2);
  padding: 18px 20px 20px;
}

.outcome-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: var(--text-xs);
}

.outcome-number,
.outcome-date {
  font-variant-numeric: tabular-nums;
}

.outcome-number {
  letter-spacing: 0.06em;
}

.outcome-status {
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-elevated);
  font-size: var(--text-xs);
  white-space: nowrap;
}

.outcome-status-draft {
  color: var(--muted);
}

.outcome-status-published {
  color: var(--success);
}

.outcome-status-archived {
  color: var(--warning);
}

.outcome-card-title {
  font-size: 1.08rem;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.outcome-card-summary {
  color: var(--muted);
  font-size: var(--text-md);
  overflow-wrap: anywhere;
}

.outcome-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: var(--space-3);
  color: var(--muted);
  font-size: var(--text-sm);
}

.outcome-pager {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--line);
}

.outcome-pager-status {
  color: var(--muted);
  font-size: var(--text-md);
  font-variant-numeric: tabular-nums;
}

/* ---- 四档卡片装饰 ----
   后台「卡片样式」是四档枚举（`OutcomeDecor`），表单里能选，前台就必须跟着变。
   只调「边界 / 底色 / 图幅」三样，不加阴影、不加动效：这一页是给客户看交付成果
   的，装饰一旦抢过内容，就等于在正式材料上贴贴纸。
   四档都不改盒子尺寸，所以 1440 / 1280 / 820 / 390 四档的栅格不用各写一套。 */

.outcome-decor-plain {
  /* 默认档：什么都不加。显式写出来，是为了让「四档都在这儿」一眼可查。 */
}

/* 描边框用 inset 阴影，不用内层再套一个 div：卡片本来就有一圈 --line 的边，
   内缩一圈 --line-strong 才是「描边框」该有的样子，且不动任何排版。 */
.outcome-decor-frame {
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

/* 浅色底走 --brand-soft：浅色主题下是淡蓝，深色主题下是深蓝，两边都不是白砖。 */
.outcome-decor-wash {
  background: var(--brand-soft);
}

/* 纵向长卡只把图幅从 16/10 改成 4/5。同一行的其它卡片由 grid 拉伸等高，
   卡片底部的 foot 由 margin-top: auto 顶住，不会出现半截空白。 */
.outcome-decor-tall .outcome-card-media {
  aspect-ratio: 4 / 5;
}

/* ---- 四类图的呈现策略 ----
   cover：裁切是好事（现场照）；cover-top：信息在顶部（截图）；
   contain：留白不裁（证书）；tall-cover：顶部锚定 + 详情页给独立滚动窗口。
   只有 tall-cover 需要额外行为（详情页的滚动窗，见 `.outcome-frame-tall-cover`）；
   其余三档在详情页就是原图全宽，`outcome-frame-*` 只是给同一条命名留的钩子。 */

.outcome-media-cover {
  object-fit: cover;
  object-position: center;
}

.outcome-media-cover-top {
  object-fit: cover;
  object-position: top center;
}

.outcome-media-contain {
  object-fit: contain;
  object-position: center;
  background: var(--surface);
}

.outcome-media-tall-cover {
  object-fit: cover;
  object-position: top center;
}

/* ---- 详情页 ---- */

.outcome-client {
  margin-top: var(--space-3);
  color: var(--muted);
  font-size: var(--text-md);
}

/* 「标题下方显示一条分隔线」是后台的开关（show_title_rule），不是全局样式。 */
.outcome-title-ruled {
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--line);
}

.outcome-detail {
  display: grid;
  gap: var(--space-5);
  max-width: 900px;
  margin-inline: auto;
}

.outcome-figure {
  display: grid;
  gap: var(--space-2);
  margin: 0;
}

/* 图框承担裁切/留白/滚动，图本身只管铺满宽度。边框让白色证书在白底页面上
   仍然有边界——「一张纸浮在空气里」不像正式材料。 */
.outcome-figure-frame {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.outcome-image,
.outcome-hero-image {
  display: block;
  width: 100%;
  height: auto;
}

.outcome-figure-caption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: var(--text-sm);
}

.outcome-figure-role {
  padding: 1px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: var(--text-xs);
}

.outcome-figures {
  display: grid;
  gap: var(--space-5);
}

.outcome-body {
  max-width: 40em;
}

.outcome-note {
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: var(--text-sm);
}

/* 长图（手机截图、竖版长图）在详情页给一个独立的滚动窗口：整页跟着一张图滚
   两米，读者会以为页面卡住了。 */
.outcome-frame-tall-cover {
  max-height: 640px;
  overflow-y: auto;
}

@media (max-width: 1000px) {
  .outcome-grid,
  .outcome-grid-pinned {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .outcome-grid,
  .outcome-grid-pinned {
    grid-template-columns: minmax(0, 1fr);
  }

  /* 手机上不要嵌套滚动：手指在窗口里划，页面不动，看起来就是「这页坏了」。
     直接放开全高，让整页滚。 */
  .outcome-frame-tall-cover {
    max-height: none;
    overflow-y: visible;
  }
}

/* ---- 会员中心窄屏堆叠：必须位于全部顶层规则之后（同特异性按源码顺序胜出，
   放 media 靠前会被后写的规则覆盖）；132px 固定标签列会把 390px 视口的内容
   压成 61px 宽的窄条（实测）。见 11 号设计文档。 ---- */
@media (max-width: 680px) {
  /* 会员中心两栏（200px 侧栏 + 内容）在窄屏改单列：侧栏横排成胶囊导航。
     原样保留会把内容压进 111px（实测 390px 视口），整页错版。 */
  .member-layout {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .member-nav {
    position: static;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    justify-content: start;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
  }

  .member-nav::-webkit-scrollbar {
    display: none;
  }

  .profile-card > .setting-block,
  .setting-block {
    grid-template-columns: minmax(0, 1fr);
    row-gap: var(--space-2);
  }

  .profile-card > .setting-block .setting-block-label,
  .setting-block-label {
    grid-column: auto;
    padding-top: 0;
  }

  /* 值列/说明句原本钉在第 2 列；单列后必须全部回 auto，否则内容被压进
     一条 14px 的幻影列（实测 390px 视口）。 */
  .setting-value,
  .setting-block-body,
  .setting-block > .profile-hint,
  .setting-block .profile-form {
    grid-column: auto;
  }

  /* 展开态编辑器「值左 + 开关右」的两列在窄屏也收成单列，开关落到编辑器下方。 */
  .setting-edit[open] {
    grid-template-columns: 1fr;
  }

  .setting-edit[open] > summary {
    grid-column: auto;
    grid-row: auto;
  }
  /* ---- H5 排版密度（方案 D）：小屏「行内紧凑、行间呼吸」，正文 16px 不动 ---- */

  /* 展示型大字降档：说明文字不应比正文大，数字小一档少占宽 */
  .hero-lead {
    font-size: 1rem;
    margin-top: var(--space-4);
  }

  .metric dd {
    font-size: 1.3rem;
  }

  /* 会员中心：行内行高收紧、行间拉开——拥挤感来自「行内太松、行间太紧」 */
  .setting-block {
    row-gap: var(--space-3);
  }

  .setting-block-label,
  .setting-value,
  .setting-block-body {
    line-height: 1.5;
  }

  .setting-block-label {
    font-size: var(--text-md);
  }

  /* 卡片左右内边距与上下一致，消除「贴边感」 */
  .member-page .profile-card {
    padding: var(--space-4) var(--space-4);
  }

  /* 页面头收紧：标题降一档，退出按钮随行 */
  .member-head.is-compact .page-title {
    font-size: var(--text-lg);
  }

  /* ---- H5 首屏紧凑重构（方案 D）：桌面 hero 是横排两栏，手机竖排堆叠后
     体量失控——hero 高 964px 超过一屏 844px，用户滑一整屏才见到正文。 ---- */

  /* 标题降档并放宽行高限制：允许两行但不追高 */
  .hero-title {
    font-size: clamp(1.9rem, 7.2vw, 2.3rem);
    line-height: 1.15;
  }

  .hero-lead {
    font-size: 0.95rem;
    margin-top: var(--space-3);
  }

  .hero-actions {
    margin-top: var(--space-5);
  }

  .hero-actions .button {
    padding: 10px 16px;
    font-size: 0.9rem;
  }

  /* 成立/所在地两列收紧 */
  .hero-metrics {
    margin-top: var(--space-5);
    gap: var(--space-4);
  }

  .metric dd {
    font-size: 1.15rem;
  }

}


/* ===== 订单收据打印（设计稿 15 号 · 功能 2） =====
   屏幕上收据块完全不渲染；点「打印收据」后 body 挂 is-printing-receipt，
   打印介质上只显示收据块。
   打印时用 display:none 把 `main` 的其余子元素整块摘掉，而不是 visibility:hidden：
   visibility 只让元素不可见，布局占位仍在，订单页一长就会打出多页空白。
   收据因此必须是 `main` 的直接子元素（模板里放在 `</section>` 之后）。
   配色写死（纸是白的，不跟暗色主题走），文字一律纯黑保证打印对比度。 */
.receipt-sheet {
  display: none;
}

.receipt-sheet .receipt-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 2px solid #101418;
  padding-bottom: 8px;
  margin-bottom: 16px;
}

.receipt-sheet .receipt-head strong {
  font-size: 1.1rem;
  color: #101418;
}

.receipt-sheet .receipt-head span {
  font-size: 0.9rem;
  color: #39414b;
}

.receipt-sheet .receipt-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 24px;
  margin-bottom: 16px;
}

.receipt-sheet .receipt-facts dt {
  font-size: 0.75rem;
  color: #5b6472;
}

.receipt-sheet .receipt-facts dd {
  font-size: 0.95rem;
  color: #101418;
  word-break: break-all;
}

.receipt-sheet .receipt-note {
  border-top: 1px solid #dae0e8;
  padding-top: 8px;
  font-size: 0.75rem;
  color: #5b6472;
}

@media print {
  body.is-printing-receipt .site-header,
  body.is-printing-receipt .site-footer,
  body.is-printing-receipt .page-main > :not(.receipt-sheet) {
    display: none !important;
  }

  body.is-printing-receipt .page-main {
    padding: 0 !important;
    margin: 0 !important;
  }

  body.is-printing-receipt .receipt-sheet {
    display: block !important;
    background: #ffffff;
    color: #101418;
    padding: 0;
  }
}


/* ===== 商品详情页大图预览（设计稿：商品详情页升级）=====
   原生 `<dialog>`：Esc 自带关闭、模态语义自带；点背景关闭由 portal.js 判断
   点击落在 dialog 自身实现。不引任何灯箱库。 */
.product-lightbox {
  border: none;
  padding: 0;
  background: transparent;
  max-width: min(92vw, 1100px);
}

.product-lightbox[open] {
  display: grid;
  place-items: center;
}

.product-lightbox::backdrop {
  background: rgba(10, 12, 17, 0.82);
}

.product-lightbox img {
  display: block;
  max-width: 100%;
  max-height: 88vh;
  border-radius: var(--radius-sm);
  /* 图底的留白走 --surface 而不是 #fff：浅色两值相同，深色下 #fff 是一块刺眼的
     白砖——成果卡对证书图早有同一条纪律（见 .outcome-card 一节），大图预览是
     同一件事的放大版，没有理由两套口径。 */
  background: var(--surface);
}

.product-lightbox-close {
  position: fixed;
  top: 16px;
  right: 20px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.product-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ===== 双 CTA 行（项目详情页）=====
   主按钮外链 + 次按钮合作页。间距与按钮组一致，移动端自动换行。 */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}


/* ===== 商店卡整卡可点 =====
   图、价格、名称、摘要与规格包进一个 <a>（点卡片任何区域进详情页）；
   购买按钮留在链接外（HTML 不允许 <a> 嵌套交互控件）。
   链接自身是透明容器：颜色、去下划线交给内部元素。 */
.product-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.product-card-link:hover {
  text-decoration: none;
}


/* ===== 商品/订单详情页内的侧边悬浮卡收敛 =====
   详情页左栏是长图文，弹卡向左展开 272px 会盖住正文。收窄到 232px 并
   加深阴影强化分层：功能保留（犹豫时的咨询入口），打扰面减小。 */
.detail-grid ~ * .side-rail-card,
body:has(.product-lightbox) .side-rail .side-rail-card {
  width: 232px;
  padding: 12px 14px;
  gap: 8px;
}
