/* =========================================================
 * 爱与成长笔记 — 样式表
 * 风格：奶油白 · 深棕 · 暖灰 | 人文、温暖、精致、留白
 * ========================================================= */

:root {
  --bg: #f7f1e7;
  --bg-deep: #f0e7d8;
  --paper: #fffdf8;
  --ink: #3a2b1e;
  --ink-soft: #6d5a48;
  --muted: #9a897a;
  --accent: #a9713f;
  --accent-deep: #8c5a30;
  --accent-soft: #efe0cd;
  --line: #e6d9c6;
  --line-soft: #efe6d7;
  --gold: #c09456;
  --shadow-sm: 0 2px 10px rgba(90, 64, 38, 0.06);
  --shadow-md: 0 12px 34px rgba(90, 64, 38, 0.10);
  --shadow-lg: 0 24px 60px rgba(90, 64, 38, 0.14);
  --radius: 18px;
  --radius-lg: 26px;
  --font-serif: Georgia, "Times New Roman", "Noto Serif SC", "Source Han Serif SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-sans: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;
  --maxw: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }
a { color: var(--accent-deep); text-decoration: none; }
a:hover { color: var(--accent); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 241, 231, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
}
.brand:hover { color: var(--ink); }

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(140deg, var(--accent) 0%, var(--gold) 100%);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-size: 19px;
  box-shadow: var(--shadow-sm);
}

.brand-name {
  font-family: var(--font-serif);
  font-size: 19px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-links a {
  color: var(--ink-soft);
  font-size: 15px;
  position: relative;
  padding: 6px 0;
}

.nav-links a:hover,
.nav-links a.is-active { color: var(--accent-deep); }

.nav-links a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.nav-links .fav-pill {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 8px;
  padding: 8px 14px;
  min-height: 40px;
  line-height: 1;
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13.5px;
  background: var(--paper);
  color: var(--ink-soft) !important;
}
.fav-pill:hover { border-color: var(--accent); color: var(--accent-deep) !important; }
.fav-count {
  flex-shrink: 0;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 12px;
  display: inline-grid;
  place-items: center;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 10px;
  width: 42px;
  height: 40px;
  cursor: pointer;
  font-size: 17px;
  color: var(--ink-soft);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  font-family: var(--font-sans);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 24px rgba(140, 90, 48, 0.22);
}
.btn-primary:hover { background: var(--accent-deep); color: #fff; transform: translateY(-2px); }

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink-soft);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-deep); transform: translateY(-2px); }

.btn-small { padding: 9px 18px; font-size: 13.5px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 92px 0 72px;
  background:
    radial-gradient(1100px 460px at 82% -10%, rgba(192, 148, 86, 0.20), transparent 62%),
    radial-gradient(760px 380px at 8% 110%, rgba(169, 113, 63, 0.12), transparent 60%);
}

.hero-quote-mark {
  position: absolute;
  right: 4%;
  top: 26px;
  font-family: var(--font-serif);
  font-size: 300px;
  line-height: 1;
  color: rgba(169, 113, 63, 0.10);
  pointer-events: none;
  user-select: none;
}

.hero-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.8fr); align-items: center; gap: 40px; }
.hero-inner { position: relative; min-width: 0; max-width: 660px; }
.hero-portrait { margin: 0; width: 100%; max-width: 400px; justify-self: end; }
.hero-portrait img { display: block; width: 100%; height: auto; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  letter-spacing: 0.22em;
  color: var(--accent-deep);
  text-transform: uppercase;
  margin-bottom: 22px;
}
.eyebrow::before {
  content: "";
  width: 30px;
  height: 1px;
  background: var(--accent);
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(38px, 6.2vw, 62px);
  line-height: 1.28;
  margin: 0 0 22px;
  letter-spacing: 0.04em;
  font-weight: 300;
}

.hero-sub {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 620px;
  margin: 0 0 14px;
}

.hero-note {
  font-size: 15px;
  color: var(--muted);
  max-width: 600px;
  margin: 0 0 34px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- 通用区块 ---------- */
.section { padding: 78px 0; }
.section-tight { padding: 52px 0; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 38px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(24px, 3.2vw, 32px);
  margin: 0 0 8px;
  letter-spacing: 0.03em;
  font-weight: 400;
}

.section-desc { color: var(--muted); margin: 0; font-size: 15px; }

.link-more {
  font-size: 14px;
  color: var(--accent-deep);
  white-space: nowrap;
}
.link-more::after { content: " →"; }

/* ---------- 重点语录卡片 ---------- */
.feature-quote {
  position: relative;
  background: linear-gradient(150deg, var(--paper) 0%, #fbf3e7 100%);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: clamp(30px, 5vw, 54px);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.feature-quote .fq-mark {
  position: absolute;
  right: 34px;
  top: 6px;
  font-family: var(--font-serif);
  font-size: 150px;
  color: rgba(169, 113, 63, 0.13);
  line-height: 1;
}

.fq-tag {
  display: inline-block;
  font-size: 12.5px;
  letter-spacing: 0.14em;
  color: var(--accent-deep);
  background: var(--accent-soft);
  padding: 5px 13px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.fq-text {
  font-family: var(--font-serif);
  font-size: clamp(19px, 2.6vw, 26px);
  line-height: 1.85;
  margin: 0 0 20px;
  max-width: 830px;
  position: relative;
}

.fq-meta {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 22px;
}

/* ---------- 主题卡片 ---------- */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.theme-card {
  display: block;
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 28px 26px 26px;
  color: var(--ink);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.theme-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-soft);
  color: var(--ink);
}

.theme-emoji {
  font-size: 26px;
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--bg-deep);
  margin-bottom: 16px;
}

.theme-card h3 {
  font-family: var(--font-serif);
  font-size: 19px;
  margin: 0 0 8px;
  letter-spacing: 0.02em;
}

.theme-card p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.8;
}


/* ---------- 语录卡片 ---------- */
.quote-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.quote-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 0;
  color: var(--ink);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.quote-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  color: var(--ink);
}

.qc-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }

.tag {
  font-size: 12px;
  color: var(--accent-deep);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 3px 11px;
}

.tag-muted {
  color: var(--muted);
  background: var(--bg-deep);
}

.qc-text {
  font-family: var(--font-serif);
  font-size: 16.5px;
  line-height: 1.95;
  margin: 0 0 14px;
  flex: 1;
}

.qc-bg {
  font-size: 13.5px;
  color: var(--ink-soft);
  margin: 0 0 18px;
  line-height: 1.8;
}

.qc-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px dashed var(--line);
  padding-top: 14px;
}

.qc-more { font-size: 13.5px; color: var(--accent-deep); }

.fav-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 17px;
  line-height: 1;
  padding: 6px;
  border-radius: 10px;
  color: var(--muted);
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.fav-btn:hover { background: var(--accent-soft); color: var(--accent-deep); transform: scale(1.12); }
.fav-btn.is-on { color: var(--accent-deep); }

/* ---------- 关于 / 来源条 ---------- */
.about-band {
  background: linear-gradient(150deg, #f2e8d8 0%, #efe2cd 100%);
  border-radius: var(--radius-lg);
  padding: clamp(30px, 5vw, 52px);
  border: 1px solid var(--line-soft);
}

.about-band h2 { font-family: var(--font-serif); margin: 0 0 14px; font-size: 26px; }
.about-band p { color: var(--ink-soft); max-width: 760px; margin: 0 0 12px; }

.source-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

.source-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13.5px;
  color: var(--ink-soft);
}
.source-chip:hover { border-color: var(--accent); color: var(--accent-deep); }

.grade-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold);
  display: inline-block;
}

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--line-soft);
  padding: 40px 0 52px;
  color: var(--muted);
  font-size: 13.5px;
  background: var(--bg-deep);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
}

.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--accent-deep); }

/* ---------- 探索页 ---------- */
.page-head { padding: 58px 0 26px; }
.page-head h1 {
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 40px);
  margin: 0 0 12px;
}
.page-head p { color: var(--ink-soft); margin: 0; max-width: 640px; }

.search-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 26px 0 20px;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 260px;
}

.search-input {
  width: 100%;
  padding: 15px 20px 15px 46px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 15px;
  color: var(--ink);
  font-family: var(--font-sans);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(169, 113, 63, 0.12);
}

.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 15px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.chip {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 8px 17px;
  font-size: 13.5px;
  cursor: pointer;
  transition: all 0.16s ease;
  font-family: var(--font-sans);
}
.chip:hover { border-color: var(--accent); color: var(--accent-deep); }
.chip.is-on {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.toggle-fav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--ink-soft);
  cursor: pointer;
  user-select: none;
  margin-left: auto;
}
.toggle-fav input { accent-color: var(--accent); width: 16px; height: 16px; }

.result-line {
  color: var(--muted);
  font-size: 13.5px;
  margin: 6px 0 22px;
}

.empty-state {
  text-align: center;
  padding: 70px 20px;
  color: var(--muted);
  background: var(--paper);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}
.empty-state strong { display: block; color: var(--ink-soft); font-size: 17px; margin-bottom: 8px; }

/* ---------- 详情页 ---------- */
.detail-wrap { padding: 46px 0 80px; }

.breadcrumb { font-size: 13.5px; color: var(--muted); margin-bottom: 26px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent-deep); }

.detail-head { max-width: 820px; margin-bottom: 30px; }
.detail-head h1 {
  font-family: var(--font-serif);
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.5;
  margin: 12px 0 16px;
  font-weight: 400;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 13.5px;
}

.detail-quote {
  background: linear-gradient(150deg, var(--paper) 0%, #fbf3e7 100%);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: clamp(26px, 4.5vw, 44px);
  box-shadow: var(--shadow-sm);
  margin-bottom: 40px;
}

.dq-label {
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-bottom: 12px;
}

.dq-en {
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 2;
  color: var(--ink-soft);
  margin: 0 0 22px;
  padding-left: 18px;
  border-left: 3px solid var(--accent-soft);
}

.dq-cn {
  font-family: var(--font-serif);
  font-size: clamp(18px, 2.4vw, 22px);
  line-height: 2;
  margin: 0;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 26px 0 0;
}

.detail-body { max-width: 780px; }

.d-section { margin-bottom: 36px; }

.d-section h2 {
  font-family: var(--font-serif);
  font-size: 20px;
  margin: 0 0 14px;
  padding-left: 14px;
  border-left: 4px solid var(--accent);
  line-height: 1.5;
}

.d-section p { margin: 0 0 12px; color: var(--ink-soft); }

.callout {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 22px 24px;
}
.callout.warn { background: #fbf4ea; border-color: var(--accent-soft); }

.meta-table {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  overflow: hidden;
}

.meta-row {
  display: flex;
  gap: 16px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14.5px;
}
.meta-row:last-child { border-bottom: none; }
.meta-key { color: var(--muted); min-width: 96px; }
.meta-val { color: var(--ink-soft); flex: 1; word-break: break-word; }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
}
.status-badge.partial { background: #f3ead9; color: #8a6a33; }

.related-wrap { margin-top: 56px; }

/* ---------- 来源页 ---------- */
.source-card {
  overflow-wrap: anywhere;
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 28px 30px;
  margin-bottom: 18px;
}

.source-card h3 {
  font-family: var(--font-serif);
  font-size: 19px;
  margin: 0 0 6px;
}

.source-card .sc-meta { color: var(--muted); font-size: 13.5px; margin-bottom: 12px; }
.source-card p { color: var(--ink-soft); font-size: 14.5px; margin: 0 0 14px; }
.source-card .sc-links { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13.5px; }

.notice {
  background: var(--paper);
  border-left: 4px solid var(--gold);
  border-radius: 0 14px 14px 0;
  padding: 20px 24px;
  color: var(--ink-soft);
  font-size: 14.5px;
  margin: 18px 0;
}

.pending-list { margin: 0; padding-left: 20px; color: var(--ink-soft); }
.pending-list li { margin-bottom: 10px; }

/* ---------- 行动清单 / 自省问题 ---------- */
.action-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.action-item {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 16px 20px 16px 56px;
  color: var(--ink-soft);
  font-size: 15px;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.action-item:hover {
  border-color: var(--accent-soft);
  transform: translateX(3px);
}

.action-item::before {
  content: "✓";
  position: absolute;
  left: 18px;
  top: 17px;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  display: grid;
  place-items: center;
  font-size: 12.5px;
}

.action-scene {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--accent-deep);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 2px 10px;
  margin-right: 8px;
  vertical-align: 1px;
}

.q-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.question-item {
  background: var(--paper);
  border-left: 4px solid var(--gold);
  border-radius: 0 14px 14px 0;
  padding: 16px 20px;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 1.9;
}
.question-item::before {
  content: "Q";
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gold);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 11.5px;
  margin-right: 10px;
  vertical-align: 2px;
}

.callout.deep {
  background: #f2ead9;
  border-color: var(--accent-soft);
}

/* ---------- 动效 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: #fdf7ee;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 99;
  box-shadow: var(--shadow-md);
}
.toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .theme-grid, .quote-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-quote-mark { display: none; }
}

@media (max-width: 680px) {
  body { font-size: 15.5px; }
  .wrap { padding: 0 18px; }
  .nav { height: 60px; }
  .brand-name { font-size: 16px; letter-spacing: 0.02em; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    background: var(--paper);
    border-bottom: 1px solid var(--line-soft);
    padding: 12px 18px 18px;
    box-shadow: var(--shadow-md);
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 10px 4px; width: 100%; }
  .nav-links .fav-pill { width: auto; margin-top: 6px; }
  .hero { padding: 58px 0 46px; }
  .theme-grid, .quote-grid { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .toggle-fav { margin-left: 0; }
}


/* ---------- 阅读与连读 ---------- */
.quote-card-link {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 26px 24px 22px;
  border-radius: inherit;
  color: var(--ink);
}
.quote-card-link:hover { color: var(--ink); }
.quote-card > .fav-btn {
  position: absolute;
  right: 14px;
  bottom: 12px;
  z-index: 1;
  min-width: 44px;
  min-height: 44px;
}
.qc-foot { min-height: 44px; padding-right: 44px; }
.quote-card-link:focus-visible,
.series-link:focus-visible,
.reading-series a:focus-visible,
summary:focus-visible,
.fav-btn:focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 4px;
}
.detail-byline { margin: 0; color: var(--ink-soft); font-size: 14px; }
.callout p:last-child { margin-bottom: 0; }
.reading-note, .reading-source {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 18px;
}
.reading-note > h2, .reading-source > h2 {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 500;
  margin: 0 0 16px;
}
.series-list summary {
  cursor: pointer;
  color: var(--ink-soft);
  font-size: 14px;
  padding: 8px 0;
}
.series-list summary::marker { color: var(--accent); }
.reading-note p { color: var(--ink-soft); font-size: 14px; }
.reading-source h3 { font-size: 16px; font-weight: 500; margin: 22px 0 12px; }
.reading-source p { color: var(--ink-soft); font-size: 14px; }
.reading-source .source-footnote { font-size: 12.5px; margin-top: 16px; }
.reading-series { max-width: 780px; border-top: 1px solid var(--line); padding-top: 28px; }
.series-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.series-heading h2 { font-family: var(--font-serif); font-size: 22px; font-weight: 400; margin: 0 0 18px; }
.series-heading > span { color: var(--ink-soft); font-size: 13px; }
.series-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.series-link { display: grid; gap: 6px; padding: 16px 0; border-top: 1px solid var(--line-soft); }
.series-link > span { font-size: 12.5px; color: var(--ink-soft); }
.series-link strong { font-size: 16px; font-weight: 500; }
.series-link[data-direction="next"] { text-align: right; }
.series-end { font-size: 14px; color: var(--ink-soft); padding: 16px 0; }
.series-list { margin: 12px 0; }
.series-list ol { padding-left: 24px; font-size: 14px; }
.series-list li { margin-bottom: 12px; }
.series-list [aria-current="page"] { color: var(--ink-soft); }
.series-return { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 22px; font-size: 14px; }
@media (max-width: 680px) {
  .hero-layout { grid-template-columns: 1fr; gap: 18px; }
  .hero-portrait { width: 210px; justify-self: center; }
  .series-links { gap: 18px; }
  .series-link strong { font-size: 15px; }
  .meta-row { flex-direction: column; gap: 4px; padding: 12px 16px; }
}

.detail-head h1 { text-wrap: balance; }

/* ---------- Language and business contact ---------- */
.language-switch { flex-shrink: 0; margin-left: auto; margin-right: 24px; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 13px; line-height: 1.5; }
.brand { margin-right: 24px; }
.project-back { padding-top: 9px; padding-bottom: 9px; font-size: 12px; }
.project-back a { color: var(--ink-soft); }
.contact-open { border: 0; padding: 0; background: transparent; color: var(--accent-deep); font: inherit; cursor: pointer; }
.contact-open:hover { text-decoration: underline; text-underline-offset: 4px; }
.contact-dialog { width: min(430px, calc(100% - 32px)); max-height: calc(100dvh - 32px); overflow: auto; padding: 28px; border: 1px solid var(--line); border-radius: 22px; background: var(--paper); color: var(--ink); text-align: center; box-shadow: var(--shadow-lg); }
.contact-dialog::backdrop { background: rgba(40, 29, 20, .42); }
.contact-dialog h2 { font: 400 26px var(--font-serif); margin: 8px 24px 12px; }
.contact-dialog p { font-size: 14px; color: var(--ink-soft); margin: 12px 0; }
.contact-dialog img { display: block; width: 100%; height: auto; margin: 16px auto; }
.contact-close { position: absolute; top: 6px; right: 6px; width: 44px; height: 44px; border: 0; background: transparent; color: var(--ink-soft); cursor: pointer; font-size: 28px; }
.contact-account strong { color: var(--ink); user-select: all; }
.language-switch:focus-visible, .contact-open:focus-visible, .contact-close:focus-visible { outline: 2px solid var(--accent-deep); outline-offset: 4px; }
html[lang="en"] .brand-name { letter-spacing: 0; }
html[lang="en"] .hero h1 { letter-spacing: -.02em; }
html[lang="en"] .dq-en { border: 0; padding-bottom: 0; font-size: 20px; line-height: 1.8; }
@media (min-width: 681px) and (max-width: 960px) {
  .brand-name { font-size: 16px; letter-spacing: 0; }
  .brand { gap: 8px; margin-right: 14px; }
  .nav-links { gap: 14px; }
  .nav-links a { font-size: 13px; }
  .language-switch { margin-right: 14px; padding: 5px 8px; }
}
@media (max-width: 680px) {
  .brand { gap: 8px; margin-right: 8px; }
  .brand-mark { width: 32px; height: 32px; border-radius: 10px; }
  .brand-name { font-size: 15px; letter-spacing: 0; }
  .language-switch { margin-right: 8px; padding: 5px 9px; }
  .nav-toggle { width: 36px; flex-shrink: 0; }
  .contact-dialog { padding: 24px 20px; }
}
@media (max-width: 370px) {
  .wrap { padding-left: 12px; padding-right: 12px; }
  .brand-name { font-size: 13px; }
  .language-switch { font-size: 12px; padding: 5px 7px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* The host footer follows the project footer; scripts may follow it. */
body > .site-footer ~ .site-footer { padding: 22px max(24px, calc((100% - 1072px) / 2)) 28px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
body > .site-footer ~ .site-footer p { margin: 4px 0 0; }
body > .site-footer ~ .site-footer nav, .policy-links { display: flex; flex-wrap: wrap; gap: 14px 22px; font-size: 12px; }
.policy-links { margin-top: 20px; }

@media (max-width: 680px) { body > .site-footer ~ .site-footer { padding-inline: 18px; } }
@media (max-width: 370px) { body > .site-footer ~ .site-footer { padding-inline: 12px; } }
