/* ============================================================
   女儿的世界 · main.css
   Hallmark · genre: playful · macrostructure: Journal Front Page / Workbench / Long Document
   design-system: design.md · designed-as-app
   基础 + 组件样式。颜色/字体/圆角全部来自主题 Token（css/themes/*.css）。
   设计规范：doc/女儿的世界/03-视觉设计规范.md + design.md
   ============================================================ */

/* Hallmark · pre-emit critique: P5 H4 E5 S5 R4 V3（app 场景：一致性优先于多样性） */

/* ---------- 跨主题 token（主题文件可覆写） ---------- */
:root {
  --shadow-card: 0 2px 0 color-mix(in srgb, var(--line) 70%, transparent);
  --shadow-lift: 0 12px 26px color-mix(in srgb, var(--text) 12%, transparent);
  --seal: var(--primary);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 220ms;
}

/* ---------- Reset & 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
[hidden] { display: none !important; }

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

body {
  background-color: var(--bg);
  /* 纸面纹理由各主题文件提供（波点/星空/方格/牛皮纸） */
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.8;
  min-height: 100svh;
  overflow-x: clip;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

h1, h2, h3, h4 {
  font-family: var(--font-title);
  font-weight: 700;
  line-height: 1.4;
  font-style: normal;
  overflow-wrap: anywhere;
}

p { margin: 0 0 12px; }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration-color: color-mix(in srgb, var(--primary) 70%, transparent); text-underline-offset: 3px; }
a:hover { color: var(--text); }

img, svg { max-width: 100%; display: block; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 6px;
}

::selection { background: var(--primary-soft); }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* 波浪分隔线（手绘感，accent 色） */
.divider {
  border: none;
  height: 10px;
  margin: 40px auto 36px;
  width: 100%;
  max-width: 320px;
  background: var(--accent);
  opacity: 0.55;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='10' viewBox='0 0 40 10'%3E%3Cpath d='M0 5 Q 5 0 10 5 T 20 5 T 30 5 T 40 5' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x center / 40px 10px;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='10' viewBox='0 0 40 10'%3E%3Cpath d='M0 5 Q 5 0 10 5 T 20 5 T 30 5 T 40 5' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x center / 40px 10px;
}

/* ---------- 顶部导航 ---------- */
.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1.5px dashed var(--line);
}

.topnav .wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
}

.nav-brand {
  font-family: var(--font-title);
  font-size: 19px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
}
.nav-brand .logo { width: 26px; height: 26px; flex-shrink: 0; }

.nav-links { display: flex; gap: 4px; margin-left: auto; align-items: center; }

.nav-link {
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--text-soft);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: background var(--dur) var(--ease-out), color var(--dur) var(--ease-out);
}

.nav-link:hover { background: var(--bg-soft); color: var(--text); }
.nav-link:active { background: var(--primary-soft); color: var(--text); }
.nav-link.active { background: var(--primary-soft); color: var(--text); font-weight: 600; }

/* 移动端导航（<640px）：品牌 + 主题按钮一行，链接第二行横向轻扫 */
@media (max-width: 639px) {
  .topnav .wrap { flex-wrap: wrap; row-gap: 2px; }
  .nav-brand { margin-right: auto; }
  .nav-links {
    order: 3;
    flex-basis: 100%;
    margin-left: -20px;
    margin-right: -20px;
    padding: 0 20px 2px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-link { white-space: nowrap; }
}

/* ---------- 主题切换器 ---------- */
.theme-zone { position: relative; }

.theme-btn {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--card);
  border: 1.5px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  transition: border-color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.theme-btn:hover { border-color: var(--primary); transform: rotate(10deg); }
.theme-btn .palette-ico { width: 20px; height: 20px; }

.theme-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 10px 30px color-mix(in srgb, var(--text) 14%, transparent);
  padding: 10px;
  width: 220px;
  display: none;
  z-index: 60;
  transform-origin: top right;
}
.theme-pop.open { display: block; }

@media (prefers-reduced-motion: no-preference) {
  .theme-pop.open { animation: pop-in 0.16s cubic-bezier(0.22, 1, 0.36, 1); }
  @keyframes pop-in {
    from { opacity: 0; transform: translateY(-4px) scale(0.96); }
  }
}

.theme-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border-radius: 12px;
  border: 2px solid transparent;
  text-align: left;
  transition: background 0.2s ease;
}
.theme-opt:hover { background: var(--bg-soft); }
.theme-opt:active { background: var(--primary-soft); }
.theme-opt.current { border-color: var(--primary); }

.theme-opt .swatches { display: flex; gap: 3px; flex-shrink: 0; }
.theme-opt .swatches i {
  width: 16px;
  height: 16px;
  border-radius: 5px;
  border: 1px solid color-mix(in srgb, var(--text) 12%, transparent);
}

/* ---------- Hero / 首页 ---------- */
.hero { padding: 48px 0 14px; text-align: center; }

.hero-visual { display: flex; justify-content: center; margin-bottom: 12px; }
.hero-visual svg { width: min(340px, 78vw); height: auto; }

.hero h1 {
  font-size: clamp(30px, 5vw, 44px);
  margin-bottom: 14px;
  position: relative;
  display: inline-block;
}
/* 手绘波浪下划线 */
.hero h1::after {
  content: "";
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: -9px;
  height: 8px;
  background: var(--primary);
  opacity: 0.5;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='8' viewBox='0 0 40 8'%3E%3Cpath d='M0 4 Q 5 0 10 4 T 20 4 T 30 4 T 40 4' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x center / 40px 8px;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='8' viewBox='0 0 40 8'%3E%3Cpath d='M0 4 Q 5 0 10 4 T 20 4 T 30 4 T 40 4' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x center / 40px 8px;
}
.hero .hero-sub { color: var(--text-soft); max-width: 560px; margin: 0 auto; }

/* 今日小贴士：便利贴（微倾 + 纸胶带） */
.tip-card {
  margin: 26px auto 0;
  max-width: 640px;
  background: var(--card);
  border: 1.5px dashed var(--accent);
  border-radius: var(--radius-card);
  padding: 16px 22px;
  text-align: left;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  position: relative;
  box-shadow: var(--shadow-card);
  transform: rotate(-0.6deg);
}

/* 和纸胶带（doc/03 §1：贴纸与胶带元素），跨主题取 token 调色 */
.tip-card::before,
.letter::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  width: 96px;
  height: 22px;
  transform: translateX(-50%) rotate(-3deg);
  background:
    repeating-linear-gradient(45deg, transparent 0 6px, color-mix(in srgb, var(--card) 55%, transparent) 6px 12px),
    color-mix(in srgb, var(--accent-2) 72%, transparent);
  border-radius: 2px;
  box-shadow: 0 1px 3px color-mix(in srgb, var(--text) 10%, transparent);
  pointer-events: none;
}
.letter::before {
  transform: translateX(-50%) rotate(2deg);
  background:
    repeating-linear-gradient(45deg, transparent 0 6px, color-mix(in srgb, var(--card) 55%, transparent) 6px 12px),
    color-mix(in srgb, var(--primary) 45%, transparent);
}
.tip-card .tip-icon { font-size: 20px; line-height: 1.6; flex-shrink: 0; }
.tip-card .tip-label {
  font-size: 13px;
  color: var(--text-soft);
  font-family: var(--font-title);
  letter-spacing: 0.04em;
}

/* ---------- 区块与卡片 ---------- */
.section { padding: 30px 0; }

.section-title {
  font-size: 22px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
/* 手绘波浪短线（装饰，替代 emoji 前缀） */
.section-title::after {
  content: "";
  width: 52px;
  height: 7px;
  background: var(--accent);
  opacity: 0.6;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='7' viewBox='0 0 26 7'%3E%3Cpath d='M0 3.5 Q 3.25 0 6.5 3.5 T 13 3.5 T 19.5 3.5 T 26 3.5' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x center / 26px 7px;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='7' viewBox='0 0 26 7'%3E%3Cpath d='M0 3.5 Q 3.25 0 6.5 3.5 T 13 3.5 T 19.5 3.5 T 26 3.5' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x center / 26px 7px;
}

.section-desc { color: var(--text-soft); font-size: 14px; margin-bottom: 18px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
}

/* ---------- 模块网格（doc/03 §4.1） ---------- */
.grid-modules {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
@media (min-width: 480px) { .grid-modules { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .grid-modules { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.module-card {
  position: relative;
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 22px 18px 16px;
  text-decoration: none;
  overflow: visible;
  box-shadow: var(--shadow-card);
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}

/* 纸胶带（模块品牌色，贴在卡片上沿） */
.module-card::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 18px;
  width: 64px;
  height: 20px;
  background: color-mix(in srgb, var(--mcolor, var(--primary)) 58%, transparent);
  border-left: 1px dashed color-mix(in srgb, var(--text) 12%, transparent);
  border-right: 1px dashed color-mix(in srgb, var(--text) 12%, transparent);
  transform: rotate(-3deg);
  border-radius: 2px;
  pointer-events: none;
}
.module-card:nth-child(even)::before { left: auto; right: 18px; transform: rotate(3deg); }

.module-card:hover {
  transform: translateY(-4px) rotate(-0.4deg);
  box-shadow: var(--shadow-lift);
}

.module-card:active { transform: translateY(-1px); transition-duration: 0.08s; }
.module-card:focus-visible { outline-color: var(--mcolor, var(--primary)); }

/* 入场渐次浮现：backwards fill，结束后不锁死 :hover transform */
@media (prefers-reduced-motion: no-preference) {
  .module-card { animation: rise-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) backwards; }
  .module-card:nth-child(2) { animation-delay: 0.06s; }
  .module-card:nth-child(3) { animation-delay: 0.12s; }
  .module-card:nth-child(4) { animation-delay: 0.18s; }
  .module-card:nth-child(5) { animation-delay: 0.24s; }
  .module-card:nth-child(6) { animation-delay: 0.30s; }
  .module-card:nth-child(7) { animation-delay: 0.36s; }
  .module-card:nth-child(8) { animation-delay: 0.42s; }
  @keyframes rise-in {
    from { opacity: 0; transform: translateY(10px); }
  }
}

.module-card .m-emoji { font-size: 30px; line-height: 1; margin-bottom: 10px; }
.module-card .m-title { font-family: var(--font-title); font-size: 18px; font-weight: 700; }
.module-card .m-tagline { font-size: 13.5px; color: var(--text-soft); margin-top: 4px; }

.module-card .m-stage {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  gap: 4px;
}
.module-card .m-stage i {
  font-style: normal;
  font-size: 12px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--text-soft);
}

/* ---------- 档案卡（首页横向，doc/03 §4.7） ---------- */
.archive-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 18px 20px;
  text-decoration: none;
  flex-wrap: wrap;
  box-shadow: var(--shadow-card);
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.archive-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}

.avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--primary-soft);
  border: 2px solid var(--primary);
  display: grid;
  place-items: center;
  font-family: var(--font-title);
  font-size: 24px;
  color: var(--text);
}

.archive-card .a-name { font-family: var(--font-title); font-size: 18px; font-weight: 700; }
.archive-card .a-meta { font-size: 13.5px; color: var(--text-soft); }
.archive-card .a-edit {
  margin-left: auto;
  font-size: 14px;
  color: var(--text-soft);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  transition: border-color 0.2s ease;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}
.archive-card:hover .a-edit { border-color: var(--primary); }

.badge-example {
  font-size: 12px;
  background: var(--accent-2);
  color: var(--text);
  border-radius: 999px;
  padding: 1px 8px;
  vertical-align: 2px;
}

/* ---------- 贴纸标签（doc/03 §4.2，颜色不随主题） ---------- */
.sticker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 16px 5px 12px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 600;
  transform: rotate(-2deg);
  transform-origin: left center;
  box-shadow: 0 1px 0 color-mix(in srgb, var(--text) 8%, transparent);
}
/* 贴纸左端撕孔 */
.sticker::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid color-mix(in srgb, currentColor 30%, transparent);
  flex-shrink: 0;
}
.sticker-what { background: #E4F0FA; color: #3D6B94; }
.sticker-why  { background: #FCE4EA; color: #B04A6E; }
.sticker-how  { background: #E4F4EC; color: #3E7D5C; }

/* ---------- 三层内容卡片 ---------- */
.layer { margin-top: 26px; }
.layer .sticker { margin-bottom: 14px; }

.layer-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 14px; }

.info-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 16px 18px;
  box-shadow: var(--shadow-card);
}
.info-card h4 { font-size: 16.5px; margin-bottom: 6px; }
.info-card p { font-size: 14.5px; color: var(--text); }

/* ---------- 话术气泡（doc/03 §4.3） ---------- */
.bubbles-label {
  font-size: 13px;
  color: var(--text-soft);
  margin-bottom: 8px;
  font-family: var(--font-title);
  letter-spacing: 0.03em;
}

.bubble {
  position: relative;
  display: block;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 18px 18px 18px 6px;
  padding: 12px 18px;
  margin: 0 0 12px;
  max-width: 640px;
  box-shadow: var(--shadow-card);
}
/* 手绘小尾巴 */
.bubble::before {
  content: "";
  position: absolute;
  left: -7px;
  bottom: 8px;
  width: 12px;
  height: 12px;
  background: var(--card);
  border-left: 1.5px solid var(--line);
  border-bottom: 1.5px solid var(--line);
  border-radius: 0 0 0 8px;
  transform: rotate(8deg);
}

/* ---------- 红线提示卡（doc/03 §4.4） ---------- */
.redline {
  margin-top: 16px;
  background: color-mix(in srgb, var(--danger) 10%, var(--card));
  border: 1.5px dashed var(--danger);
  border-radius: var(--radius-card);
  padding: 14px 18px;
}
.redline .redline-title { font-weight: 700; color: var(--danger); margin-bottom: 4px; }
.redline .redline-title::before { content: "🕊️ "; }
.redline p { font-size: 14.5px; }

.advice-block {
  margin-top: 14px;
  background: var(--bg-soft);
  border-radius: var(--radius-card);
  padding: 12px 18px;
}
.advice-block .advice-title { font-weight: 700; margin-bottom: 4px; }
.advice-block .advice-title::before { content: "🌱 "; }

/* ---------- 学段分段控件（doc/03 §4.5） ---------- */
.seg {
  display: inline-flex;
  flex-wrap: wrap;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
  gap: 2px;
}

.seg-btn {
  position: relative;
  min-height: 40px;
  padding: 8px 20px;
  border-radius: 999px;
  color: var(--text-soft);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background var(--dur) var(--ease-out), color var(--dur) var(--ease-out), transform 0.15s var(--ease-out);
}
.seg-btn[aria-pressed="true"] {
  background: var(--primary);
  color: var(--text);
  font-weight: 700;
  box-shadow: 0 2px 0 color-mix(in srgb, var(--text) 10%, transparent);
}
.seg-btn:active { transform: scale(0.97); }
.seg-btn .rec-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  display: none;
}
.seg-btn.recommended .rec-dot { display: inline-block; }
.seg-btn[aria-pressed="true"] .rec-dot { background: var(--text); }

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 9px 22px;
  border-radius: 999px;
  font-size: 15px;
  border: 1.5px solid var(--line);
  background: var(--card);
  transition: border-color var(--dur) var(--ease-out), background var(--dur) var(--ease-out), transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.btn:hover { border-color: var(--primary); transform: translateY(-1px); }
.btn:active { transform: translateY(1px); box-shadow: none; transition-duration: 0.08s; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--text);
  font-weight: 700;
  box-shadow: 0 3px 0 color-mix(in srgb, var(--text) 12%, transparent);
}
.btn-ghost { background: transparent; }

/* ---------- 提示条 ---------- */
.banner-tip {
  background: var(--accent-2);
  border-radius: var(--radius-card);
  padding: 10px 18px;
  font-size: 14px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.banner-tip a { font-weight: 600; }

/* 「她的世界」匹配卡 */
.match-card {
  background: var(--primary-soft);
  border: 1.5px dashed var(--primary);
  border-radius: var(--radius-card);
  padding: 14px 18px;
  margin-bottom: 18px;
  font-size: 14.5px;
}
.match-card .match-title { font-weight: 700; margin-bottom: 4px; }
.match-card .match-title::before { content: "💗 "; }

/* ---------- 档案页 ---------- */
.profile-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 20px; }
.profile-head .p-name { font-family: var(--font-title); font-size: 24px; font-weight: 700; }
.profile-head .p-intro { color: var(--text-soft); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  font-size: 13.5px;
  text-decoration: none;
}
a.chip { transition: border-color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out); }
a.chip:hover { border-color: var(--primary); transform: rotate(-1.5deg); }
.chip-btn { min-height: 34px; transition: background var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out), transform 0.15s var(--ease-out); }
.chip-btn:active { transform: scale(0.96); }
.chip-btn[aria-pressed="true"] { background: var(--primary-soft); border-color: var(--primary); font-weight: 600; }
.chip-faction { background: var(--primary-soft); border-color: var(--primary); font-weight: 600; }

.kv-list { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) { .kv-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kv-list .kv {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 12px 16px;
  box-shadow: var(--shadow-card);
}
.kv-list .kv-label { font-size: 13px; color: var(--text-soft); }
.kv-list .kv-value { font-size: 15px; overflow-wrap: anywhere; }

.empty-hint {
  color: var(--text-soft);
  font-size: 13.5px;
}

/* 时间线（最近在追） */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li {
  position: relative;
  padding: 0 0 16px 22px;
  border-left: 2px dashed var(--line);
  margin-left: 6px;
}
.timeline li:last-child { padding-bottom: 4px; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 7px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--card);
}
.timeline .t-date { font-size: 12.5px; color: var(--text-soft); }

/* 表单 */
.form-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .form-grid .span-2 { grid-column: span 2; } }
@media (min-width: 640px) { .form-grid { grid-template-columns: repeat(2, 1fr); } }

.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; font-family: var(--font-title); }
.field .field-hint { font-size: 12.5px; color: var(--text-soft); font-weight: 400; margin-left: 6px; font-family: var(--font-body); }

input[type="text"], input[type="search"], select, textarea {
  width: 100%;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  font: inherit;
  color: var(--text);
  transition: border-color var(--dur) var(--ease-out), background var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-soft) 60%, transparent);
}
textarea { resize: vertical; min-height: 88px; }
select { appearance: none; }

.form-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }

/* ---------- 词典页（doc/03 §4.8） ---------- */
.search-box {
  width: 100%;
  border-radius: 999px;
  padding: 12px 20px;
  font-size: 15.5px;
  min-height: 48px;
}

.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tab-btn {
  flex-shrink: 0;
  min-height: 38px;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--text-soft);
  font-size: 14px;
  transition: all var(--dur) var(--ease-out);
}
.tab-btn:hover { border-color: var(--primary); color: var(--text); }
.tab-btn:active { transform: scale(0.97); }
.tab-btn.on { background: var(--primary); border-color: var(--primary); color: var(--text); font-weight: 700; }

.gloss-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 700px) { .gloss-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.gloss-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 14px 18px;
  box-shadow: var(--shadow-card);
}
.gloss-card .g-term {
  font-weight: 700;
  font-size: 16.5px;
  font-family: var(--font-title);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.gloss-card .g-module { font-size: 12px; color: var(--text-soft); border: 1px solid var(--line); border-radius: 999px; padding: 0 8px; font-family: var(--font-body); }
.gloss-card .g-hot { font-size: 12px; background: var(--accent-2); border-radius: 999px; padding: 0 8px; font-family: var(--font-body); }
.gloss-card .g-meaning { font-size: 14.5px; margin-top: 6px; }

.reply-block {
  margin-top: 10px;
  background: var(--bg-soft);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 14px;
  display: none;
}
.reply-block.open { display: block; }

@media (prefers-reduced-motion: no-preference) {
  .reply-block.open { animation: fade-slide-in 0.2s ease; }
  @keyframes fade-slide-in {
    from { opacity: 0; transform: translateY(-2px); }
  }
}
.reply-block .r-label { font-size: 12.5px; color: var(--text-soft); font-family: var(--font-title); letter-spacing: 0.03em; }

.gloss-toggle {
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--text-soft);
  min-height: 32px;
  padding: 4px 0;
}
.gloss-toggle:hover { color: var(--text); }

.gloss-empty { text-align: center; color: var(--text-soft); padding: 40px 0; }

/* ---------- 写给家长的话（信纸 + 蜡封印） ---------- */
.letter {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 26px 26px 24px;
  max-width: 720px;
  box-shadow: var(--shadow-card);
}
.letter p { font-size: 15px; }
/* 蜡封印 */
.letter::after {
  content: "见";
  position: absolute;
  right: 22px;
  bottom: 18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--seal);
  color: var(--card);
  font-family: var(--font-title);
  font-size: 19px;
  font-weight: 700;
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--card) 35%, transparent), 0 2px 6px color-mix(in srgb, var(--text) 18%, transparent);
  transform: rotate(-8deg);
}

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: none;
  padding: 26px 0 34px;
  color: var(--text-soft);
  font-size: 13px;
  text-align: center;
}
/* 页脚星行分隔 */
.site-footer::before {
  content: "";
  display: block;
  margin: 0 auto 18px;
  width: 120px;
  height: 12px;
  background: var(--accent);
  opacity: 0.5;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='12' viewBox='0 0 24 12'%3E%3Cpath d='M12 1l1.7 5 5.3.1-4.3 3.1 1.6 5-4.3-3.1-4.3 3.1 1.6-5L1.3 6.1l5.3-.1z' fill='%23000'/%3E%3C/svg%3E") repeat-x center / 24px 12px;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='12' viewBox='0 0 24 12'%3E%3Cpath d='M12 1l1.7 5 5.3.1-4.3 3.1 1.6 5-4.3-3.1-4.3 3.1 1.6-5L1.3 6.1l5.3-.1z' fill='%23000'/%3E%3C/svg%3E") repeat-x center / 24px 12px;
}

/* ---------- 父女对话指南 ---------- */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 14px;
}

.method-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 16px 18px;
  box-shadow: var(--shadow-card);
}

.method-card h4 {
  font-size: 16.5px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 编号圆标：手写数字贴纸 */
.method-no {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  font-size: 12.5px;
  font-weight: 700;
  font-family: var(--font-title);
  background: var(--primary-soft);
  border: 1.5px solid var(--primary);
  transform: rotate(-4deg);
}
.method-card:nth-child(even) .method-no { transform: rotate(4deg); }

.method-when {
  display: inline-block;
  font-size: 12.5px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--text-soft);
  margin-bottom: 10px;
}

.method-card p { font-size: 14.5px; margin-bottom: 0; }

.age-points {
  margin: 8px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.age-points li { font-size: 14.5px; }

.dont-card { border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); }
.dont-card h4 { color: var(--danger); }

/* ---------- 工具类 ---------- */
.text-soft { color: var(--text-soft); }
.mt-0 { margin-top: 0; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-soft);
  text-decoration: none;
  min-height: 44px;
}
.back-link:hover { color: var(--text); }

/* ---------- 动效降级（doc/03 §5/§6） ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .module-card:hover, .archive-card:hover, .btn:hover { transform: none; }
  .tip-card, .letter::after, .method-no { transform: none; }
}
