/* ==========================================================================
   components.css — 可复用组件：按钮 / 标签 / 卡片 / 手风琴 / 步骤 / 媒体位 / 提示块
   组件级的 @media 覆盖都写在本文件内，紧跟组件定义之后
   （写到别的文件里会被后加载的同优先级规则静默盖掉）
   ========================================================================== */

/* ── 小标签（区块眉标）───────────────────────────────────────────────── */
.eyebrow {
  display: block;
  color: var(--ink);
  font-size: var(--fs-1);
  font-weight: 600;
  letter-spacing: .08em;
  line-height: 1.5;
}

/* ── 线性图标：统一 34×34 画框，颜色只取 --mark ─────────────────────── */
.icon {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  color: var(--mark);
}
.icon--sm { width: 26px; height: 26px; }
.icon--lg { width: 28px; height: 28px; }

/* ── 按钮 ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 52px;
  padding: 0 30px;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  font-size: var(--fs-8);
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, box-shadow .18s ease;
}
.btn:hover { text-decoration: none; }

.btn--primary { background: var(--fill); color: var(--on-fill); }
.btn--primary:hover { background: var(--fill-hover); }

/* 次级动作：描边款，不用浅灰实心（浅灰实心看着像禁用态） */
.btn--ghost {
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line);
}
.btn--ghost:hover { background: rgba(255, 255, 255, .06); }
body.theme-light .btn--ghost:hover { background: rgba(20, 20, 31, .04); }

.btn--sm { min-height: 44px; padding: 0 24px; border-radius: var(--r-2xl); font-size: var(--fs-5); }
.btn--xs { min-height: 40px; padding: 0 20px; border-radius: var(--r-xl); font-size: var(--fs-5); }
.btn--block { display: flex; width: 100%; }

/* ── 胶囊筛选片 ─────────────────────────────────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 var(--sp-5);
  border-radius: var(--r-pill);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--brand-line);
  color: var(--text);
  font-size: var(--fs-5);
  line-height: 1.4;
  white-space: nowrap;
}
.chip:hover { text-decoration: none; background: var(--fill); color: var(--on-fill); }

/* ── 小圆点状态徽标（首屏用）────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: 32px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--ink);
  font-size: var(--fs-2);
  font-weight: 500;
  line-height: 1.4;
}
.badge__dot {
  flex: 0 0 7px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

/* ── 卡片 ───────────────────────────────────────────────────────────── */
.card {
  display: flex;
  flex-direction: column;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  background: var(--surface);
  box-shadow: var(--card-shadow);
}
.card--accent { background: var(--surface-2); }
.card--tight { padding: 26px; border-radius: var(--r-lg); box-shadow: none; }
.card__title { font-size: var(--fs-9); font-weight: 700; color: var(--text); }
.card__text { margin-top: var(--sp-3); font-size: var(--fs-4); color: var(--text-body); line-height: 1.78; }
.card__kicker { font-size: var(--fs-2); font-weight: 600; color: var(--accent); }

/* 教程卡：图标 + 标题 + 元信息 + 说明 + 入口 */
.entry-card { gap: var(--sp-5); }
.entry-card__icon { color: var(--mark); }
.entry-card__meta { font-size: var(--fs-3); font-weight: 500; color: var(--ink); }

/* ── 手风琴问答（原生 details，无 JS 也能开合）───────────────────────── */
.qa {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}
.qa__q {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: 18px 22px;
  color: var(--text);
  font-size: var(--fs-7);
  font-weight: 600;
  line-height: 1.55;
  list-style: none;
  cursor: pointer;
}
.qa__q::-webkit-details-marker { display: none; }
.qa__q:hover { color: var(--ink); }
.qa__arrow { flex: 0 0 16px; margin-left: auto; color: var(--ink); transition: transform .2s ease; }
.qa[open] .qa__arrow { transform: rotate(180deg); }
.qa__a { padding: 0 22px 20px; font-size: var(--fs-4); color: var(--text-body); line-height: 1.78; }
.qa__a > * + * { margin-top: var(--sp-3); }

/* ── 步骤卡 ─────────────────────────────────────────────────────────── */
.step {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}
.step__no {
  flex: 0 0 30px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.45;
}
.step__body { flex: 1 1 auto; min-width: 0; }
.step__title { font-size: var(--fs-8); font-weight: 600; color: var(--text); line-height: 1.55; }
.step__desc { margin-top: var(--sp-2); font-size: var(--fs-4); color: var(--text-body); line-height: 1.78; }

/* ── 清单胶囊（iOS 准备事项那种）────────────────────────────────────── */
.pill-list { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--sp-3); }
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  max-width: 100%;
  padding: 0 var(--sp-4);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--text);
  font-size: var(--fs-4);
  line-height: 1.5;
}

/* ── 提示块（安全提示 / 帮助卡 / 渐变说明条）────────────────────────── */
.note {
  padding: 28px 32px;
  border: 1px solid var(--brand-line);
  border-radius: var(--r-lg);
  background: var(--surface-2);
}
.note__head { display: flex; align-items: center; gap: var(--sp-3); }
.note__head svg { color: var(--mark); }
.note__title { font-size: var(--fs-7); font-weight: 600; color: var(--text); }
.note__body { margin-top: var(--sp-2); font-size: var(--fs-4); color: var(--text-body); line-height: 1.78; }

/* 渐变说明条（功能页那块「为什么能做到」）—— 必须留不透明的兜底底色，
   否则护栏在合成背景时会退化到整页底色，等于没测 */
.note--grad {
  padding: 46px 50px;
  border: 0;
  border-radius: var(--r-3xl);
  background-color: #0D0E1C;
  background-image: linear-gradient(90deg, #211947 0%, #0F2445 100%);
}
.note--grad .note__body { color: #B0B0C8; }
.note--grad .eyebrow { color: var(--accent); }
.note--grad .note__h3 { color: var(--text); font-size: var(--fs-13); line-height: 1.42; }

/* ── 底部「下一教程」入口 ─────────────────────────────────────────────
   画布上是竖排（label 在上、标题在下）、白底 + 普通描边、无箭头。
   用 --line 而不是 --brand-line：这一块是「顺带指路」，不是强调区。 */
.next-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  transition: border-color .18s ease;
}
.next-card:hover { border-color: var(--mark); text-decoration: none; }
.next-card__label { font-size: var(--fs-2); color: var(--text-soft); }
.next-card__title { font-size: var(--fs-8); font-weight: 600; color: var(--text); line-height: 1.55; }

/* ── 媒体位 ─────────────────────────────────────────────────────────── */
.media {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-xl);
  background: var(--surface-2);
}
.media > img { width: 100%; height: 100%; object-fit: cover; }

/* 手机截图画框：源图 360×600 正好是 3:5，cover 不会裁到内容。
   这里的 max-width 是「图位尺寸」，不是内容宽度档 —— 护栏里按媒体节点排除。 */
.media--phone { width: 100%; max-width: 285px; aspect-ratio: 3 / 5; }

.shot-wall {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--sp-5);
  justify-items: center;
}
@media (max-width: 1024px) {
  .shot-wall { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .shot-wall { gap: var(--sp-3); }
}
