/* ============================================================
   base.css — 复位、设计变量、共享组件（由主管维护，worker 勿改）
   模块样式各自写在 assets/css/<module>.css
   ============================================================ */
:root {
  --bg: #0b0b10;
  --bg-soft: #14141c;
  --panel: #1b1b26;
  --panel-2: #22222f;
  --line: #2c2c3a;
  --ink: #f5f5f7;
  --ink-dim: #a9a9b8;
  --brand: #ff3d71;
  --brand-dark: #d92b5b;
  --accent: #ffd166;
  --ok: #3ddc97;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.38);
  --maxw: 1180px;
  --sticky-h: 72px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "Noto Sans", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden; /* 双端不得出现横向溢出 */
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }

h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }

/* 键盘可达 */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* ---------------- 布局 ---------------- */
main > section,
.footer__inner,
.beacon {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 16px;
}

main > section { padding-block: 40px; }

.section__title {
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.section__sub {
  color: var(--ink-dim);
  font-size: 14px;
  margin-bottom: 20px;
}

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, background-color 0.16s ease, opacity 0.16s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 8px 20px rgba(255, 61, 113, 0.28);
}
.btn--primary:hover { background: var(--brand-dark); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn--ghost:hover { border-color: #45455a; }

.btn--plain {
  background: transparent;
  color: var(--ink-dim);
  border-color: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
}

.btn--lg { min-height: 54px; padding: 16px 28px; font-size: 17px; }
.btn--block { width: 100%; }

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ---------------- 通用小字 ---------------- */
.fine,
[data-role="summary-fine"] {
  color: var(--ink-dim);
  font-size: 12px;
  line-height: 1.5;
}

/* ---------------- 无 JS / 提示条 ---------------- */
.toast-host {
  position: fixed;
  left: 50%;
  bottom: calc(var(--sticky-h) + 16px);
  transform: translateX(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(92vw, 420px);
  pointer-events: none;
}
.toast {
  background: #2b2b3a;
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
  text-align: center;
  box-shadow: var(--shadow);
  animation: toast-in 0.18s ease both;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------------- 响应式 ---------------- */
@media (min-width: 768px) {
  main > section { padding-block: 56px; }
  .section__title { font-size: 28px; }
  .section__sub { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
