/* ============================================================
   components.css — 按钮 / 眉标 / 卡片 / 图位 / 标签 / 问答 / 筛选片
   ============================================================ */

/* ---------- 眉标（区块小字） ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  color: var(--brand-ink);
  font-family: var(--font-num);
  font-size: var(--fs-2xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-mark);
}
.eyebrow--plain::before { display: none; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 13px 28px;
  border-radius: var(--r-pill);
  background: var(--brand);
  box-shadow: inset 0 0 0 1px var(--brand);
  color: var(--on-brand);
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
  transition: transform 0.16s ease, filter 0.16s ease;
}
.btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

/* 次级动作用描边，不用浅灰实心（会像禁用态）；用 inset 阴影而非 border，避免撑高 2px */
.btn--ghost {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  color: var(--text-1);
}
.btn--ghost:hover {
  box-shadow: inset 0 0 0 1px var(--brand-mark);
  color: var(--brand-soft);
  filter: none;
}

.btn--sm { padding: 9px 20px; font-size: var(--fs-xs); }

/* ---------- 卡片 ---------- */
.card {
  padding: var(--sp-6);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

/* ---------- 图位：固定比例，防抖 ---------- */
.media {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-md);
  background: var(--surface-3);
}
.media > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.media--poster { aspect-ratio: 3 / 4; }
.media--wide { aspect-ratio: 3 / 2; }

/* ---------- 小标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  background: var(--brand-surface);
  color: var(--brand-soft);
  font-size: var(--fs-2xs);
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* ---------- 次要文字 ---------- */
.meta {
  color: var(--text-3);
  font-family: var(--font-num);
  font-size: var(--fs-xs);
  letter-spacing: 0.02em;
}

/* ---------- 问答：原生 details，无 JS ---------- */
.qa {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--line);
}
.qa__q {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-5);
  padding: var(--sp-5) 0;
  color: var(--text-1);
  font-size: var(--fs-lg);
  font-weight: 500;
  line-height: 1.5;
  cursor: pointer;
  list-style: none;
}
.qa__q::-webkit-details-marker { display: none; }
.qa__q:hover { color: var(--brand-soft); }

/* 加号转叉：用伪元素，纯 CSS */
.qa__sign {
  position: relative;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 6px;
}
.qa__sign::before,
.qa__sign::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 18px;
  height: 1.5px;
  background: var(--brand-mark);
  transition: transform 0.2s ease;
}
.qa__sign::after { transform: rotate(90deg); }
.qa[open] .qa__sign::after { transform: rotate(0deg); }

.qa__a {
  padding-bottom: var(--sp-5);
  color: var(--text-2);
  font-size: var(--fs-sm);
  line-height: 1.8;
}
.qa__a p + p { margin-top: var(--sp-3); }

/* ---------- 筛选片（榜单 / 心情） ---------- */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
}
.chip {
  padding: 9px 20px;
  border-radius: var(--r-pill);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  color: var(--text-2);
  font-size: var(--fs-sm);
  transition: color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.chip:hover { color: var(--text-1); box-shadow: inset 0 0 0 1px var(--brand-mark); }
.chip[aria-pressed="true"] {
  background: var(--brand);
  box-shadow: inset 0 0 0 1px var(--brand);
  color: var(--on-brand);
  font-weight: 600;
}

/* ---------- 编号（榜单 / 步骤） ---------- */
.num {
  color: var(--text-3);
  font-family: var(--font-num);
  font-size: var(--fs-h3);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  line-height: 1;
}
.num--top { color: var(--brand-soft); }

/* ---------- 空状态 ---------- */
.empty {
  padding: var(--sp-8) 0;
  color: var(--text-3);
  font-size: var(--fs-sm);
  text-align: center;
}

@media (max-width: 720px) {
  .card { padding: var(--sp-5); }
  .qa__q { font-size: var(--fs-base); }
  .btn { padding: 12px 22px; }
}
