/* 落地页：一张排好的纸。
   首屏右边是真的简历页（resume-renderer 渲染），不是配图；模板区每张缩略图也是真渲染。 */

/* 扇形卡背面纸边框（::after）在窄窗口会探出视口十几~几十像素，产生无意义的横向滚动；
   html 级裁掉横向滚动（scroll 位置 0 的可见视觉完全不变） */
html {
  overflow-x: hidden;
}

.page-landing {
  background: var(--paper);
}

/* ── 顶栏 ──────────────────────────────────────────────── */
.site-head {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 28px;
  height: 62px;
  padding: 0 clamp(18px, 4vw, 40px);
  border-bottom: 1px solid var(--line);
  background: rgba(251, 250, 247, 0.92);
  backdrop-filter: saturate(150%) blur(14px);
}

.site-nav {
  display: flex;
  gap: 22px;
}

.site-nav a {
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--ink);
}

.site-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

/* 顶栏与编辑器 .app-bar 宽屏规格对齐（styles.css @1151px 同款）：
   68px 栏高 / 38px 品牌标 / 17.5px 品牌字 / 42px 按钮 / 14.5px 字号 / 内组间距 10px */
@media (min-width: 961px) {
  .site-head {
    height: 68px;
    padding: 0 20px;
    gap: 16px;
  }

  .site-head .brand-mark {
    width: 38px;
    height: 38px;
  }

  .site-head .brand-name {
    font-size: 17.5px;
  }

  .site-nav {
    gap: 10px;
  }

  .site-nav a {
    padding: 11px 14px;
    border-radius: 7px;
    font-size: 14.5px;
  }

  .site-nav a:hover {
    background: var(--paper-2);
  }

  .site-actions {
    gap: 10px;
  }

  .site-actions .btn {
    height: 42px;
    padding: 0 18px;
    font-size: 14.5px;
  }

  .site-actions .link-quiet {
    font-size: 14.5px;
  }
}

/* ── Hero ──────────────────────────────────────────────── */
/* 栅格三块：文案 / 样张（跨两行居中）/ Agent 卡（桌面垫在文案下，移动端垫底） */
.hero {
  display: grid;
  grid-template-areas:
    'copy visual'
    'agent visual';
  grid-template-columns: minmax(0, 1fr) minmax(340px, 430px);
  align-items: center;
  gap: 0 clamp(28px, 4.5vw, 64px);
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 88px) clamp(20px, 4vw, 40px) clamp(56px, 7vw, 96px);
}

.hero-copy {
  grid-area: copy;
  /* 文案块与深卡相邻成组（还原改前观感）：copy 沉底 + agent 顶对齐，中间不留空洞 */
  align-self: end;
  padding-bottom: 26px;
}

.hero-visual {
  grid-area: visual;
}

.hero .agent-card {
  grid-area: agent;
  align-self: start;
}

/* ── Hero 左栏的 Agent 接入卡（深色，包住 Prompt 条） ──── */
.agent-card {
  max-width: 546px;
  padding: 24px 24px 26px;
  border-radius: var(--radius-lg);
  background: var(--dark);
}

.agent-card h2 {
  color: #f7f5ef;
  font-size: 19px;
  letter-spacing: -0.01em;
}

.agent-card .agent-card-sub {
  margin: 10px 0 0;
  color: rgba(242, 240, 234, 0.62);
  font-size: 13.5px;
  line-height: 1.8;
}

.agent-card .agent-promptbar {
  margin-top: 18px;
}

.hero-copy h1 {
  max-width: 15em;
  font-size: clamp(32px, 4.2vw, 50px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.hero-copy h1 em {
  font-style: normal;
  /* 荧光笔衬底：等价纯色（inset 底部实色带），视觉与旧 linear-gradient 一致但不走渐变 */
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  box-shadow: inset 0 -0.42em 0 rgba(47, 158, 131, 0.26);
  padding-bottom: 2px;
}

.hero-sub {
  max-width: 33em;
  margin: 20px 0 0;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.hero-visual {
  width: 100%;
  /* 矮屏时收窄样张宽度，保证首屏能看到模板切换 */
  max-width: min(430px, calc((100vh - 280px) * 794 / 1123));
}

/* 纸页容器：宽度由栅格决定，内部 794px 页面按比例缩放 */
.sheet-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 794 / 1123;
}

.sheet-frame::before,
.sheet-frame::after {
  content: "";
  position: absolute;
  border: 1px solid var(--line);
  background: #fff;
}

.sheet-frame::before {
  inset: 8px -8px -8px 8px;
  z-index: 0;
}

.sheet-frame::after {
  inset: 16px -16px -16px 16px;
  z-index: -1;
  opacity: 0.6;
}

.sheet-hero .sheet {
  box-shadow: var(--shadow-paper);
}

/* ── Hero 扇形卡组：一叠真渲染的简历纸 ──────────────────
   前排（data-pos="0"）是当前模板；后排向右上错开、露出纸边。
   轮换/选卡时离场卡淡出落底、其余卡错峰滑移（见 applyFanOrder 编排）。 */
.card-fan {
  --fx: 1;
  position: relative;
  width: 100%;
  aspect-ratio: 794 / 1123;
  margin-left: 25px; /* 整组右移 10px + 追加 15px */
}

.fan-card {
  --rot: 0deg;
  --tx: 0px;
  --tyb: 0px;
  --lift: 0px;
  --hov: 0px;
  --s: 1;    /* 纵深缩放：层越深越小 */
  --dim: 1;  /* 纵深亮度：层越深越暗，位移读作"向后退"而非平移 */
  position: absolute;
  inset: 0;
  display: block;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  /* button UA 默认样式会继承进渲染层：text-align:center 导致整张简历被居中错版，
     独立字体/字距也会漏进去——必须重置（tpl-preview 用 div 所以正常） */
  font: inherit;
  letter-spacing: inherit;
  text-align: start;
  color: inherit;
  transform-origin: 50% 50%;
  transform: translate(0, calc((var(--lift) + var(--hov)) * -1))
    rotate(calc(var(--rot) * var(--fx))) translate(calc(var(--tx) * var(--fx)), calc(var(--tyb) * var(--fx)))
    scale(var(--s));
  filter: brightness(var(--dim));
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1), filter 0.9s ease, opacity 0.7s ease;
  will-change: transform;
}

.fan-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.fan-card .sheet-frame {
  /* button 里是 span，必须显式块化，否则 width/height 失效、缩放算 0 */
  display: block;
  width: 100%;
  height: 100%;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-paper);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* 后排是单张纸，不叠影；前排保留 sheet-frame 的叠纸伪元素 */
.card-fan .fan-card:not([data-front]) .sheet-frame::before,
.card-fan .fan-card:not([data-front]) .sheet-frame::after {
  display: none;
}

/* 后排纸片几乎全被前排遮住、只露纸边：换紧阴影。
   若沿用前排的 0 16px 40px 大阴影，多张后排叠放时阴影相互叠加，
  会在整叠纸四周糊出一圈灰"晕" */
.card-fan .fan-card:not([data-front]) .sheet-frame {
  box-shadow: 0 1px 2px rgba(25, 28, 29, 0.08);
}

/* 后排向右上错开（原排版）；顶层卡离场动线单独向左（见 .is-leaving） */
.fan-card[data-pos="1"] { --rot: 2.5deg; --tx: 26px; --tyb: -9px;  --s: 0.975; --dim: 0.965; z-index: 4; }
.fan-card[data-pos="2"] { --rot: 5deg;   --tx: 52px; --tyb: -17px; --s: 0.95;  --dim: 0.93;  z-index: 3; }
.fan-card[data-pos="3"] { --rot: 7.5deg; --tx: 78px; --tyb: -25px; --s: 0.93;  --dim: 0.9;   z-index: 2; }
.fan-card[data-pos="4"] { --rot: 10deg;  --tx: 104px;--tyb: -33px; --s: 0.91;  --dim: 0.87;  z-index: 1; }
.fan-card[data-pos="0"] { z-index: 5; --s: 1; --dim: 1; }

/* 离场编排：顶层卡像被抽走一样向左滑出（抬起+轻旋+淡出），期间保持最上层（z=6）
   避免半路被别的卡盖住；淡出完成后它已在最底层位置，再淡入。
   transform 整体覆写层位位移——不管目标层在哪，动线都是"向左抽走"。 */
.fan-card.is-leaving {
  z-index: 6;
  opacity: 0;
  /* 先滑后淡：离场卡保持不透明滑出一小段（0.15s 延迟），再在 0.4s 内淡出，
     避免大半程都是 50% 半透明叠在新前排上、整组看着发"晕"；总时长 ≤ 0.6s（JS 届时换类） */
  transform: translate(calc(-30% * var(--fx)), -16px) rotate(-3deg) scale(0.98);
  transition: transform 0.6s cubic-bezier(0.5, 0, 0.7, 0.5),
    opacity 0.4s ease 0.15s,
    filter 0.6s ease;
  pointer-events: none;
}

/* 进场：opacity 0 起步（transition:none 让位移瞬移到目标层），类移除后按基础过渡淡入 */
.fan-card.is-entering {
  opacity: 0;
  transition: opacity 0.7s ease;
}

/* 后排卡可见纸边在右侧细长条：向纸边外侧扩一圈透明命中区（前排仍在上层，不影响其点击） */
.fan-card:not([data-front])::after {
  content: "";
  position: absolute;
  top: -40px;
  right: -36px;
  bottom: -16px;
  left: 45%;
}

.fan-card:not([data-front]):hover {
  --hov: 12px;
}

.fan-card:not([data-front]):hover .sheet-frame {
  border-color: var(--line-strong);
}

.fan-card[data-front] {
  /* 点前排卡放大细看（灯箱） */
  cursor: zoom-in;
}

@media (prefers-reduced-motion: reduce) {
  .fan-card {
    transition: none;
  }
}

/* 中窄视口收拢扇形幅度，避免横向溢出（全幅扇形在 <1440 时右侧会探出版心） */
@media (max-width: 1439px) {
  .card-fan {
    --fx: 0.55;
  }
}

@media (max-width: 1320px) {
  .card-fan {
    --fx: 0.5;
    margin-left: 10px;
  }
}

/* 窄桌面（≤1180px）：再收一档，扇形右缘不能探出视口（1080 实测超 63px） */
@media (max-width: 1180px) {
  .card-fan {
    --fx: 0.36;
    margin-left: 2px;
  }
}

/* 手机尺寸：不要扇形叠放，只留单张样张（后排全部隐藏，前排等同普通纸页）；
   离场中的卡先别藏——它要当着用户面淡出完 */
@media (max-width: 640px) {
  .card-fan .fan-card:not([data-front]):not(.is-leaving) {
    display: none;
  }

  .fan-card[data-front] {
    transform: none;
  }
}

/* ── Hero 灯箱：点前排卡放大细看，背景虚化；点任意处还原 ── */
.hero-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 32px;
  background: rgba(22, 33, 31, 0.45);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  opacity: 0;
  cursor: zoom-out;
  transition: opacity 0.24s ease;
}

.hero-lightbox.is-open {
  opacity: 1;
}

/* [hidden] 优先级压过 display:flex */
.hero-lightbox[hidden] {
  display: none;
}

.hero-lightbox-frame {
  /* 高度装得下为准：视口高减上下留白换算成 794:1123 的宽 */
  width: min(620px, calc(100vw - 64px), calc((100vh - 130px) * 794 / 1123));
  transform: scale(0.94) translateY(10px);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-lightbox.is-open .hero-lightbox-frame {
  transform: none;
}

/* 灯箱里不要叠纸伪元素，一张干净的纸 + 投影 */
.hero-lightbox .sheet-frame::before,
.hero-lightbox .sheet-frame::after {
  display: none;
}

.hero-lightbox .sheet-frame {
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 24px 72px rgba(22, 33, 31, 0.45);
}

.hero-lightbox-cap {
  margin: 0;
  color: rgba(242, 240, 234, 0.82);
  font-size: 12.5px;
  letter-spacing: 0.04em;
}

@media (prefers-reduced-motion: reduce) {
  .hero-lightbox,
  .hero-lightbox-frame {
    transition: none;
  }
}

.sheet-skeleton {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 56px 54px;
}

.sheet-skeleton span {
  display: block;
  height: 14px;
  border-radius: 3px;
  background: var(--paper-2);
}

.sheet-skeleton span:nth-child(1) {
  width: 42%;
  height: 30px;
}

.sheet-skeleton span:nth-child(2) {
  width: 68%;
}

.sheet-skeleton span:nth-child(3) {
  width: 100%;
  margin-top: 26px;
}

.sheet-skeleton span:nth-child(4) {
  width: 84%;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 3px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 500;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.chip:hover {
  border-color: var(--ink-3);
  color: var(--ink);
}

.chip[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

/* ── 通用区块 ──────────────────────────────────────────── */
.band {
  padding: clamp(56px, 7vw, 92px) clamp(20px, 4vw, 40px);
}

.band-paper {
  background: var(--paper-2);
}

.band-inner {
  max-width: 1120px;
  margin: 0 auto;
}

/* FAQ：标题栏居左、列表居右的两栏，铺满版心（原窄栏靠左右半空） */
.band-narrow {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: 24px clamp(48px, 7vw, 110px);
  align-items: start;
}

.band-narrow .band-head {
  margin-bottom: 0;
}

.band-narrow .faq-list {
  max-width: none;
}

.band-head {
  max-width: 640px;
  margin-bottom: 40px;
}

.band-head h2 {
  font-size: clamp(24px, 2.8vw, 32px);
  line-height: 1.3;
}

.band-head p {
  margin: 12px 0 0;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.8;
}

.band-foot {
  margin-top: 36px;
  text-align: center;
}

/* .btn 的显式 display 会盖过 [hidden] 默认隐藏，这里兜底 */
.band-foot .btn[hidden] {
  display: none;
}

/* ── 三条能力：单行扁平条，每条一句话，撑不起高度 ──────── */
#features {
  padding-top: clamp(40px, 5vw, 64px);
  padding-bottom: clamp(40px, 5vw, 64px);
}

#features .band-head {
  margin-bottom: 28px;
}

.feature-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  max-width: 880px;
}

.feature h3 {
  margin: 0 0 6px;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.feature p {
  margin: 0;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.75;
}

/* ── 模板缩略页 ────────────────────────────────────────── */
.tpl-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px 18px;
}

/* 折叠态只露两行：桌面 4 列×2 行，≤1000px 两列×2 行；点「查看更多」展开全部 */
#tplGrid:not(.expanded) .tpl-card:nth-child(n + 9) {
  display: none;
}

@media (max-width: 1000px) {
  #tplGrid:not(.expanded) .tpl-card:nth-child(n + 5) {
    display: none;
  }
}

.tpl-card {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-decoration: none;
  text-align: left;
}

.tpl-card .sheet-frame {
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(25, 28, 29, 0.05);
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.tpl-card:hover .sheet-frame {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: 0 12px 28px rgba(25, 28, 29, 0.12);
}

.tpl-card .sheet-frame::before,
.tpl-card .sheet-frame::after {
  display: none;
}

.tpl-card .sheet {
  box-shadow: none;
}

.tpl-card-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
}

.tpl-card-meta strong {
  font-size: 13px;
  font-weight: 600;
}

.tpl-card-meta span {
  color: var(--ink-3);
  font-size: 11.5px;
}

/* ── Agent 板块（深色） ────────────────────────────────── */
.band-dark {
  background: var(--dark);
  color: #f2f0ea;
}

.band-dark .band-head h2,
.band-dark h2 {
  color: #f7f5ef;
}

.agent-inner {
  display: block;
  max-width: 720px;
  margin: 0 auto;
}

.agent-copy h2 {
  font-size: clamp(24px, 2.8vw, 32px);
  line-height: 1.3;
}

.agent-copy > p {
  max-width: 36em;
  margin: 14px 0 0;
  color: rgba(242, 240, 234, 0.62);
  font-size: 14px;
  line-height: 1.85;
}

/* Prompt 复制条：一段 mono 文本 + 右侧复制图标 */
.agent-promptbar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 26px;
  padding: 14px 14px 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
}

.agent-promptbar code {
  flex: 1 1 auto;
  min-width: 0;
  color: rgba(242, 240, 234, 0.85);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.75;
  word-break: break-all;
}

.agent-promptbar .copy-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-sm);
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.agent-promptbar .copy-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: rgba(242, 240, 234, 0.8);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.agent-promptbar .copy-icon:hover {
  border-color: rgba(138, 203, 184, 0.7);
  background: rgba(255, 255, 255, 0.06);
}

.agent-promptbar .copy-icon:focus-visible {
  outline: 2px solid rgba(138, 203, 184, 0.8);
  outline-offset: 2px;
}

.agent-promptbar .copy-icon .ic-check {
  display: none;
}

.agent-promptbar .copy-icon.is-copied {
  border-color: rgba(138, 203, 184, 0.8);
}

.agent-promptbar .copy-icon.is-copied .ic-copy {
  display: none;
}

.agent-promptbar .copy-icon.is-copied .ic-check {
  display: block;
  stroke: #8acbb8;
}

.agent-note {
  margin: 14px 0 0;
  color: rgba(242, 240, 234, 0.45);
  font-size: 12.5px;
}

.agent-note a {
  color: rgba(138, 203, 184, 0.9);
  text-decoration: none;
}

.agent-note a:hover {
  color: #8acbb8;
  text-decoration: underline;
}

/* ── FAQ ───────────────────────────────────────────────── */
.faq-list {
  border-top: 1px solid var(--line);
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  transition: color 0.15s ease;
}

.faq-item summary:hover,
.faq-item[open] summary {
  color: var(--ink);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  flex: 0 0 auto;
  color: var(--ink-3);
  font-size: 16px;
  font-weight: 400;
  transition: color 0.15s ease;
}

.faq-item summary:hover::after,
.faq-item[open] summary::after {
  color: var(--ink);
}

.faq-item[open] summary::after {
  content: "–";
}

.faq-item p {
  max-width: 46em;
  margin: -4px 0 20px;
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.85;
}

/* ── Footer ────────────────────────────────────────────── */
.site-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 36px clamp(20px, 4vw, 40px) 60px;
  border-top: 1px solid var(--line);
}

@media (min-width: 1201px) {
  .site-foot {
    padding-left: 0;
    padding-right: 0;
  }
}

.foot-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-3);
  font-size: 12.5px;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}

.foot-links a {
  color: var(--ink-2);
  font-size: 12.5px;
  text-decoration: none;
}

.foot-links a:hover {
  color: var(--ink);
}

/* 备案行：flex-basis 100% 独占一行，页面水平居中 */
.foot-beian {
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 14px;
  margin-top: 14px;
  padding-top: 18px;
  border-top: 1px solid var(--line, #E2DED4);
  font-size: 12px;
  color: var(--ink-3);
}

.foot-beian a {
  color: var(--ink-3);
  text-decoration: none;
}

.foot-beian a:hover {
  color: var(--ink);
}

.foot-gongan {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.beian-shield {
  display: block;
}


/* ── 响应式 ────────────────────────────────────────────── */
@media (max-width: 1000px) {
  .hero {
    grid-template-areas:
      'copy'
      'visual'
      'agent';
    grid-template-columns: 1fr;
    gap: 0;
    padding-top: 40px;
  }

  .hero-copy {
    align-self: auto;
    padding-bottom: 40px;
  }

  .hero-visual {
    max-width: 420px;
    margin-inline: auto;
  }

  .hero .agent-card {
    align-self: auto;
    margin-top: 44px;
  }

  .feature-strip {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .tpl-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .site-nav {
    display: none;
  }

  .site-head {
    gap: 12px;
  }

  .band-narrow {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .band-narrow .band-head {
    position: static;
    margin-bottom: 28px;
  }

  .hero-copy h1 {
    max-width: none;
  }

  .site-foot {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .tpl-grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px 12px;
  }

  .tpl-card-meta {
    flex-direction: column;
    gap: 1px;
  }

  .hero-actions .btn {
    flex: 1;
  }
}

/* ── 模板卡 hover 引导 ─────────────────────────────────── */
.tpl-card .tpl-cta {
  position: absolute;
  left: 50%;
  bottom: 10px;
  z-index: 2;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(25, 28, 29, 0.86);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, 6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.tpl-card:hover .tpl-cta,
.tpl-card:focus-visible .tpl-cta {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ── 滚动渐显（JS 挂 js-reveal 后才生效，脚本失效不影响内容） ── */
.js-reveal .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.js-reveal .reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .js-reveal .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ── 模板大图预览弹层 ──────────────────────────────────── */
.persona-bar {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  padding: 12px 24px 0;
  overflow-x: auto;
}

.persona-bar .persona-label {
  flex: 0 0 auto;
  color: var(--ink-3);
  font-size: 11.5px;
}

.persona-bar .chip {
  flex: 0 0 auto;
  cursor: pointer;
}

.modal-card-tpl {
  width: min(660px, 100%);
}

.tpl-preview-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 20px 24px 28px;
  background: var(--paper-2);
}

.tpl-preview-body .sheet-frame {
  max-width: 520px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(25, 28, 29, 0.05);
}

.tpl-preview-body .sheet-frame::before,
.tpl-preview-body .sheet-frame::after {
  display: none;
}

@media (max-width: 760px) {
  .tpl-preview-body {
    padding: 14px 12px 20px;
  }
}
