/* ==========================================================================
   components.css — 按钮 / 眉标 / 圆角标 / 卡片 / 图标块 / 列表 / 表格 / 问答
   ========================================================================== */

/* ---- 眉标 ---- */
.eyebrow {
  display: block;
  color: var(--brand-ink);
  font-family: var(--font-sans);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ---- 按钮 ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 15px 34px;
  border-radius: var(--r-pill);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease),
    background-color 0.18s var(--ease);
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--brand);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.btn--primary:hover {
  background: #f0b449;
  color: var(--ink);
  box-shadow: 0 6px 18px rgba(232, 168, 56, 0.34);
}

/* 描边款：不用 border，避免撑高 2px 与实心按钮对不齐 */
.btn--ghost {
  background: transparent;
  color: var(--brand-deep);
  box-shadow: inset 0 0 0 1.5px var(--line);
}

.btn--ghost:hover {
  background: var(--brand-surface);
  color: var(--brand-deep);
  box-shadow: inset 0 0 0 1.5px var(--brand-mark);
}

/* 深底上的描边款 */
.btn--outline-light {
  background: var(--ink);
  color: var(--text-invert-link);
  box-shadow: inset 0 0 0 1.5px rgba(247, 207, 107, 0.75);
}

.btn--outline-light:hover {
  background: rgba(46, 31, 14, 0.85);
  color: var(--text-invert-link);
  box-shadow: inset 0 0 0 1.5px var(--text-invert-link);
}

.btn--dark {
  background: var(--ink);
  color: var(--brand-surface);
}

.btn--dark:hover {
  background: #412c14;
  color: var(--brand-surface);
}

.btn--block {
  display: flex;
  width: 100%;
}

.btn--sm {
  padding: 10px 20px;
  font-size: var(--fs-meta);
}

/* ---- 圆角标 ---- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 15px;
  border-radius: var(--r-pill);
  background: var(--brand-surface);
  color: var(--brand-deep);
  font-size: var(--fs-small);
  font-weight: 600;
  line-height: 1.5;
}

.chip--solid {
  background: var(--accent);
  color: #fff;
}

.chip--ok {
  background: var(--ok-surface);
  color: var(--ok-ink);
}

.chip--outline {
  background: transparent;
  color: var(--text-body);
  box-shadow: inset 0 0 0 1px var(--line);
}

.chip--sm {
  padding: 4px 11px;
  font-size: 12px;
}

/* ---- 卡片 ---- */
.card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  padding: var(--sp-7);
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: inset 0 0 0 1px var(--line);
}

.card--flush {
  padding: 0;
  overflow: hidden;
  gap: 0;
}

.card__title {
  color: var(--text);
  font-family: var(--font-serif);
  font-size: var(--fs-card-title);
  font-weight: 700;
  line-height: 1.4;
}

.card__text {
  color: var(--text-body);
  font-size: 15px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.card__meta {
  color: var(--text-muted);
  font-size: var(--fs-small);
  line-height: 1.7;
  overflow-wrap: anywhere;
}

/* ---- 图标块 ---- */
.icon-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: var(--r-md);
  background: var(--brand-surface);
  color: var(--brand-ink);
}

.icon-tile--lg {
  width: 52px;
  height: 52px;
}

.icon-tile svg { width: 24px; height: 24px; }

/* ---- 头像圆 ---- */
.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--brand-surface);
  color: var(--brand-deep);
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 700;
  line-height: 1;
}

.avatar--accent {
  background: #fcd5d5;
  color: var(--accent-ink);
}

.avatar--amber {
  background: #fae29e;
  color: var(--brand-deep);
}

.avatar--gold {
  background: #f7cf6b;
  color: var(--brand-deep);
}

/* ---- 键值表 ---- */
.spec-table {
  width: 100%;
  background: var(--card);
  border-radius: var(--r-md);
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
  border-collapse: collapse;
  table-layout: fixed;
}

.spec-table th,
.spec-table td {
  padding: 15px 26px;
  text-align: left;
  font-size: var(--fs-meta);
  line-height: 1.7;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.spec-table th {
  width: 220px;
  color: var(--text-body);
  font-weight: 400;
}

.spec-table td {
  color: var(--text);
  font-weight: 600;
}

.spec-table tr:nth-child(odd) { background: var(--card); }
.spec-table tr:nth-child(even) { background: var(--section); }

/* ---- 清单 ---- */
.bullet-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bullet-list li {
  position: relative;
  padding-left: 20px;
  color: var(--text-body);
  font-size: 15px;
  line-height: 1.8;
}

.bullet-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-mark);
}

/* ---- 问答 ---- */
.qa {
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
}

.qa__summary {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: 22px 28px;
  cursor: pointer;
  list-style: none;
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.5;
}

.qa__summary::-webkit-details-marker { display: none; }

.qa__summary::after {
  content: "";
  margin-left: auto;
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--brand-mark);
  border-bottom: 2px solid var(--brand-mark);
  transform: rotate(45deg) translateY(-3px);
  transition: transform 0.22s var(--ease);
}

.qa[open] .qa__summary::after {
  transform: rotate(-135deg) translateY(-3px);
}

.qa__mark {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: var(--fs-meta);
  font-weight: 800;
}

.qa__body {
  padding: 0 28px 24px 82px;
  color: var(--text-body);
  font-size: 15px;
  line-height: 1.85;
}

@media (max-width: 768px) {
  .card { padding: var(--sp-5); }
  .qa__summary { padding: 18px 20px; font-size: 17px; }
  .qa__body { padding: 0 20px 20px 62px; }
  .spec-table th { width: 130px; }
  .spec-table th,
  .spec-table td { padding: 12px 18px; }
  .btn { padding: 14px 26px; font-size: 15px; }
}

/* ---- 通用小工具 ---- */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.qa-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

/* ---- 图片媒体位 ---- */
.media {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.media img {
  width: 100%;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
}

.media__cap {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: var(--fs-meta);
}

.media__dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---- 角色小卡（首页 / 角色页）---- */
.mini-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-5);
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: inset 0 0 0 1px var(--line);
}

.mini-card--tall {
  padding: 0;
  overflow: hidden;
  gap: 0;
}

.mini-card__head {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-5);
  background: var(--brand-surface);
}

.mini-card__head--accent { background: var(--accent-surface); }
.mini-card__head--amber { background: #fae29e; }

.mini-card__names {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.mini-card__name {
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
}

.mini-card__role {
  color: var(--brand-deep);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}

.mini-card__head--accent .mini-card__role { color: var(--accent-ink); }

.mini-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5) var(--sp-5);
}

.mini-card__text {
  color: var(--text-body);
  font-size: var(--fs-small);
  line-height: 1.8;
}

/* ---- 平台下载卡 ---- */
.platform-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  padding: var(--sp-7);
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: inset 0 0 0 1px var(--line);
}

.platform-card__head {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}

.platform-card__names {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.platform-card__name {
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
}

.platform-card__ver {
  color: var(--text-muted);
  font-size: var(--fs-small);
  overflow-wrap: anywhere;
}

.icon-tile--cool {
  background: #e3edf5;
  color: #2c5f8a;
}

/* ---- 步骤卡 ---- */
.step-card__num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 800;
  line-height: 1;
}

/* ---- 支线卡 ---- */
.quest-card__head {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.count-badge {
  flex: 0 0 auto;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--brand);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.count-badge--accent {
  background: var(--accent);
  color: #fef0f0;
}

/* ---- 事件卡 ---- */
.event-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-6);
  background: var(--card);
  border-radius: var(--r-md);
  box-shadow: inset 0 0 0 1px var(--line);
}

.event-card__date {
  color: var(--brand-ink);
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.2;
}

.event-card__name {
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
}

.event-card__cond {
  color: var(--text-body);
  font-size: var(--fs-small);
  line-height: 1.8;
}

/* ---- 数字卡 ---- */
.stat-card__num {
  color: var(--brand-ink);
  font-family: var(--font-serif);
  font-size: 38px;
  font-weight: 800;
  line-height: 1.1;
}

/* ---- 素材库：图标位 / 色板 ---- */
.logo-plate {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 96px;
  border-radius: var(--r-md);
  background: var(--section);
}

.logo-plate img {
  width: 64px;
  height: 64px;
  border-radius: var(--r-sm);
  image-rendering: pixelated;
}

.logo-plate--dark {
  background: var(--ink);
}

.wordmark {
  color: #fef9e7;
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.palette {
  display: flex;
  height: 96px;
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--line);
}

.palette span { flex: 1 1 0; }

/* ---- 法律条款 ---- */
.legal-stack {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}

.legal-block {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-7) var(--sp-8);
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: inset 0 0 0 1px var(--line);
}

.legal-block__title {
  font-size: 22px;
}

.legal-block__text {
  color: var(--text-body);
  font-size: 15px;
  line-height: 1.9;
}

@media (max-width: 768px) {
  .platform-card { padding: var(--sp-5); }
  .legal-block { padding: var(--sp-5); }
  .legal-block__title { font-size: 19px; }
  .mini-card__name { font-size: 18px; }
  .stat-card__num { font-size: 30px; }
  .event-card { padding: var(--sp-5); }
}

/* 极窄屏：键值表改为上下堆叠，避免值列被压到放不下 */
@media (max-width: 560px) {
  .spec-table,
  .spec-table tbody,
  .spec-table thead,
  .spec-table tr,
  .spec-table th,
  .spec-table td {
    display: block;
    width: auto;
  }

  .spec-table tr {
    padding: 14px 18px;
  }

  .spec-table th,
  .spec-table td {
    padding: 0;
  }

  .spec-table th {
    color: var(--text-muted);
    font-size: 12px;
    padding-bottom: 3px;
  }

  .spec-table td {
    font-size: 15px;
  }
}
