/* Tomodachi Living the Dream — 静态站样式（参考小程序：柔和渐变 + 描边卡片 + 强调色数字） */

:root {
  --bg-top: oklch(0.96 0.04 50);
  --bg-bottom: oklch(0.99 0.01 50);
  --ink: oklch(0.2 0.02 280);
  --ink-muted: oklch(0.45 0.02 280);
  --ink-faint: oklch(0.62 0.02 280);
  --accent-num: oklch(0.7 0.18 55);
  --accent-teal: oklch(0.72 0.08 195);
  --card-border: oklch(0.2 0.02 280);
  --cta-bg: oklch(0.18 0.02 280);
  --cta-shadow: oklch(0.85 0.06 350);
  --radius-pill: 999px;
  --radius-card: 1.25rem;
  --font-sans: "DM Sans", system-ui, sans-serif;
  --font-serif: "Cormorant Garamond", "Times New Roman", serif;
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--ink);
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 42%, #fff 100%);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* 背景装饰点 */
.bg-dots {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.bg-dots span {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  opacity: 0.55;
}
.bg-dots .d1 {
  top: 18%;
  left: 12%;
  background: var(--accent-num);
}
.bg-dots .d2 {
  top: 42%;
  right: 10%;
  background: var(--accent-teal);
}
.bg-dots .d3 {
  bottom: 28%;
  left: 18%;
  background: oklch(0.78 0.12 330);
  width: 6px;
  height: 6px;
}

.wrap {
  position: relative;
  z-index: 1;
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 1.75rem) clamp(1rem, 4vw, 1.75rem) 3rem;
}

/* 首页与内页宽度（弃用全站 28rem 窄栏） */
.wrap.hub-wrap {
  max-width: 56rem;
}

.wrap.article-wrap {
  max-width: 56rem;
}

/* 顶部胶囊标签 */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-bottom: 1.25rem;
}
.badge span {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.35rem 0.9rem;
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.65);
  color: var(--ink-muted);
}

.hero-title {
  text-align: center;
  margin: 0 0 0.35rem;
  font-size: clamp(2.75rem, 12vw, 3.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.hero-sub {
  text-align: center;
  margin: 0 0 0.5rem;
  font-size: clamp(1.15rem, 4vw, 1.35rem);
  font-weight: 700;
}

.hero-meta {
  text-align: center;
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--ink-muted);
  font-weight: 500;
}

.tagline {
  text-align: center;
  margin: 0 0 1.75rem;
  font-family: var(--font-serif);
  font-size: clamp(1.05rem, 3.5vw, 1.2rem);
  font-style: italic;
  font-weight: 500;
  color: oklch(0.5 0.06 75);
  letter-spacing: 0.02em;
}

/* 三栏数据卡 */
.stat-card {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  padding: 1.1rem 0.6rem;
  margin-bottom: 1.75rem;
  background: rgba(255, 255, 255, 0.85);
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius-card);
  box-shadow: 0 4px 24px oklch(0.9 0.02 50 / 0.5);
}

.stat-card .cell {
  text-align: center;
  padding: 0.25rem;
}
.stat-card .num {
  display: block;
  font-size: clamp(1.5rem, 5vw, 1.85rem);
  font-weight: 800;
  color: var(--accent-num);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.stat-card .label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--ink);
  margin-top: 0.2rem;
  line-height: 1.25;
}

.cta-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  padding: 0.95rem 1.25rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary {
  background: var(--cta-bg);
  color: #fff;
  box-shadow: 0 6px 0 var(--cta-shadow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 var(--cta-shadow);
}

.btn-primary:active {
  transform: translateY(2px);
  box-shadow: 0 3px 0 var(--cta-shadow);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  border: 1.5px solid var(--card-border);
  box-shadow: none;
}

.btn-ghost:hover {
  background: #fff;
}

/* 指南列表（SEO 内链） */
.section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  margin: 0 0 0.75rem;
  text-align: center;
}

.link-list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  border: 1.5px solid oklch(0.88 0.02 280);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.6);
  overflow: hidden;
}

.link-list li {
  border-bottom: 1px solid oklch(0.92 0.015 280);
}
.link-list li:last-child {
  border-bottom: none;
}

.link-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.12s ease;
}

.link-list a:hover {
  background: oklch(0.98 0.02 50);
}

.link-list a span.arrow {
  color: var(--ink-faint);
  font-weight: 400;
}

.foot {
  text-align: center;
  font-size: 0.72rem;
  color: var(--ink-faint);
  line-height: 1.6;
  max-width: 22rem;
  margin: 0 auto;
}

.foot p {
  margin: 0 0 0.65rem;
}

/* 内页文章 */
.article-wrap .back {
  display: inline-block;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-muted);
  text-decoration: none;
}

.article-wrap .back:hover {
  color: var(--ink);
}

/* 全站顶栏（与首页 hub 气质一致） */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1.25rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid oklch(0.9 0.015 280);
}

.site-header .lang-switch {
  margin-bottom: 0;
}

.site-header-brand {
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.2;
}

.site-header-brand:hover {
  color: var(--accent-num);
}

.site-crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 1.15rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-faint);
}

.site-crumb a {
  color: var(--ink-muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.12s ease, border-color 0.12s ease;
}

.site-crumb a:hover {
  color: var(--ink);
  border-bottom-color: var(--accent-num);
}

.site-crumb [aria-current="page"] {
  color: var(--ink);
}

.site-crumb-sep {
  user-select: none;
  color: var(--ink-faint);
}

.article-wrap .foot {
  max-width: none;
  text-align: left;
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid oklch(0.9 0.015 280);
}

.article-wrap h1 {
  font-size: clamp(1.5rem, 5vw, 1.85rem);
  margin: 0 0 0.5rem;
  line-height: 1.2;
}

.article-meta {
  font-size: 0.8rem;
  color: var(--ink-faint);
  margin-bottom: 1.5rem;
}

.prose {
  font-size: 0.95rem;
  color: var(--ink-muted);
}

.prose p {
  margin: 0 0 1rem;
}

.prose h2 {
  font-size: 1.05rem;
  color: var(--ink);
  margin: 1.5rem 0 0.5rem;
}

.prose ul {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
}

/* 长文攻略：模板区块 */
.prose.longform h3 {
  font-size: 0.95rem;
  color: var(--ink);
  margin: 1.15rem 0 0.4rem;
  font-weight: 700;
}

.prose.longform ol {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
}

.prose.longform ol li {
  margin-bottom: 0.35rem;
}

/* 语言切换（默认英文站 + 中文镜像） */
.lang-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.lang-switch a {
  color: var(--ink-muted);
  text-decoration: none;
  padding: 0.2rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.12s ease, border-color 0.12s ease;
}

.lang-switch a:hover {
  color: var(--ink);
}

.lang-switch a.is-active {
  color: var(--ink);
  border-bottom-color: var(--accent-num);
}

.lang-switch .lang-sep {
  color: var(--ink-faint);
  user-select: none;
}

/* 中文页：补充汉字字形 */
body.locale-zh {
  font-family: "Noto Sans SC", var(--font-sans);
}

/* ---------- 首页：Wiki + Guide 百科站布局（仅风格延续小程序配色，结构独立） ---------- */
.hub-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  margin-bottom: 0.75rem;
}

.hub-brand {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.hub-brand-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.hub-brand-sub {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hub-top .lang-switch {
  margin-bottom: 0;
}

.hub-wrap .badge {
  margin-bottom: 1rem;
}

.hub-wrap .badge span {
  width: auto;
}

.hub-intro {
  margin-bottom: 1.25rem;
}

.hub-intro h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.65rem, 4.2vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  text-align: left;
}

.hub-subtitle {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.hub-lead {
  margin: 0 0 0.85rem;
  font-size: 0.92rem;
  color: var(--ink-muted);
  line-height: 1.55;
  max-width: 48rem;
}

.hub-wrap .tagline {
  text-align: left;
  margin: 0 0 1.25rem;
  max-width: 40rem;
}

.hub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1.75rem;
}

.hub-actions .btn {
  width: auto;
  flex: 1 1 10rem;
  min-width: 11rem;
}

.hub-pillars {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

@media (min-width: 768px) {
  .hub-pillars {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }
}

.pillar {
  padding: 1.15rem 1.2rem;
  background: rgba(255, 255, 255, 0.82);
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius-card);
  box-shadow: 0 4px 20px oklch(0.92 0.02 50 / 0.45);
}

.pillar h2 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.pillar-desc {
  margin: 0 0 0.85rem;
  font-size: 0.82rem;
  color: var(--ink-muted);
  line-height: 1.45;
}

.pillar-links {
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
  columns: 1;
}

@media (min-width: 520px) {
  .pillar-links {
    columns: 2;
    column-gap: 1.25rem;
  }
}

.pillar-links li {
  break-inside: avoid;
  margin-bottom: 0.4rem;
}

.pillar-links a {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid oklch(0.88 0.03 50);
  transition: border-color 0.12s ease, color 0.12s ease;
}

.pillar-links a:hover {
  color: var(--accent-num);
  border-bottom-color: var(--accent-num);
}

.pillar-footer {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
}

.pillar-footer a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--accent-num);
}

.pillar-footer a:hover {
  color: var(--accent-num);
}

.hub-section-label {
  text-align: left;
  margin-bottom: 0.65rem;
}

.hub-mini-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}

@media (min-width: 600px) {
  .hub-mini-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .hub-mini-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.hub-tile {
  display: block;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.65);
  border: 1.5px solid oklch(0.88 0.02 280);
  border-radius: var(--radius-card);
  text-decoration: none;
  color: inherit;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.hub-tile:hover {
  background: #fff;
  border-color: var(--card-border);
}

.hub-tile strong {
  display: block;
  font-size: 0.88rem;
  margin-bottom: 0.2rem;
}

.hub-tile span {
  font-size: 0.78rem;
  color: var(--ink-muted);
  line-height: 1.35;
}

.hub-wrap .foot {
  max-width: none;
  text-align: left;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid oklch(0.9 0.015 280);
}
