/* =========================================================
   AYHAK · 安远话 — shared stylesheet
   Visual language follows juan-zhong.github.io/me (fieldwork page):
   Helvetica Neue light, wide letter-spacing, uppercase h2,
   hairlines and square buttons. AYHAK adds its own palette (paper, mugwort olive, yam purple); one sans-serif family throughout.
   ========================================================= */

:root {
  /* 骨架沿用 juan-zhong.github.io/me；配色取自植物图集样页：纸、艾、薯 */
  --bg: #f7f5ef;          /* 暖纸色 */
  --paper: #fffefa;
  --ink: #22211d;
  --text: #33312b;
  --muted: #64605a;
  --faint: #8a857c;
  --faintest: #aaa49a;
  --line: #e6e1d6;
  --line-strong: #cfc8ba;
  --hover: #f4f1e8;
  --tint: #f1eee5;
  --accent: #55603a;      /* 艾：橄榄绿 */
  --accent-soft: #e7e9db;
  --plum: #7b4f80;        /* 薯：紫，表示“还在做”（进行中 / 即将推出 / 待补）和 IPA */
  --plum-soft: #f5eef5;
  --ipa: var(--plum);
  /* 圆角：控件 8px，卡片和照片 12px，标签胶囊形 */
  --r-sm: 8px;
  --r-lg: 12px;
  --r-pill: 999px;
  --danger: #a33;
  --font: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Noto Sans SC', 'Source Han Sans SC', 'Microsoft YaHei', Arial, sans-serif;
  /* 全站一套无衬线：拉丁字母 Helvetica Neue，汉字苹方（与 juan-zhong.github.io/me 一致） */
  --head-font: var(--font);
  /* IPA：用覆盖国际音标的无衬线系统字体，避免和正文混出两种字形；不加载外部字体（国内可能打不开） */
  --ipa-font: 'Lucida Grande', 'Segoe UI', 'Noto Sans', 'DejaVu Sans', 'Helvetica Neue', Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  letter-spacing: 0.05em;
}

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--accent); }

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

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: #fff; padding: 8px 12px; z-index: 10; }

/* ---------- top nav ---------- */
.page-nav {
  text-align: center;
  padding: 18px 16px 0;
  line-height: 2.2;
  background: var(--paper);
}
.page-nav a {
  margin: 0 12px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.page-nav a[aria-current="page"] { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }

/* ---------- hero ---------- */
.hero {
  text-align: center;
  padding: 56px 20px 48px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.hero .kicker { font-size: 13px; letter-spacing: 0.2em; color: var(--faint); margin-bottom: 14px; }
.hero h1 { margin-top: 0; }
.hero .subtitle { font-size: 20px; font-weight: 300; color: var(--muted); margin: 12px auto 24px; max-width: 620px; }
.hero .intro { max-width: 600px; margin: 0 auto 28px; }
.status { font-size: 13px; color: var(--faint); letter-spacing: 0.06em; margin-bottom: 0; }

/* ---------- type ---------- */
h1 {
  font-family: var(--head-font);
  font-size: 48px;
  font-weight: 300;
  letter-spacing: 0.1em;
  color: var(--ink);
}
h2 {
  font-size: 32px;
  font-weight: 300;
  letter-spacing: 0.1em;
  color: var(--ink);
  margin-bottom: 40px;
  text-transform: uppercase;
}
h2::after {
  content: '';
  display: block;
  width: 28px;
  height: 2px;
  margin-top: 14px;
  background: var(--accent);
}
h3 {
  font-size: 18px;
  font-weight: 300;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 20px;
}
p {
  font-size: 18px;
  line-height: 1.8;
  color: var(--muted);
  font-weight: 300;
  letter-spacing: 0.03em;
  margin-bottom: 24px;
}
.muted { color: var(--faint); font-size: 15px; }
.small { font-size: 13px; color: var(--faint); margin: 0; letter-spacing: 0.04em; }
.ipa { font-family: var(--ipa-font); color: var(--ipa); letter-spacing: 0.02em; }

/* ---------- sections ---------- */
.content-section {
  padding: 80px 20px;
  max-width: 800px;
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.content-section.wide { max-width: 1100px; }
.content-section ul, .content-section ol { margin: 12px 0 24px 22px; color: var(--muted); font-weight: 300; font-size: 17px; }
.content-section li { margin-bottom: 6px; }

/* ---------- buttons ---------- */
.buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-bottom: 24px; }
.btn {
  display: inline-block;
  padding: 9px 18px;
  border: 1px solid var(--accent);
  border-radius: var(--r-sm);
  background: var(--paper);
  color: var(--accent);
  font: inherit;
  font-size: 14px;
  letter-spacing: 0.08em;
  cursor: pointer;
  text-decoration: none;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn:hover { opacity: 0.8; color: inherit; }
.btn.primary:hover { color: #fff; }
.btn-ghost { border-color: var(--line-strong); color: var(--muted); }
.btn-danger { border-color: var(--danger); color: var(--danger); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn.sm { padding: 5px 12px; font-size: 13px; }

.icon-btn {
  width: 34px; height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--paper);
  color: var(--text);
  font-size: 16px;
  cursor: pointer;
}
.icon-btn:hover:not(:disabled) { border-color: var(--accent); }
.icon-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.icon-btn.is-on { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---------- cards / tags ---------- */
.card { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; background: var(--paper); }
.card h3 { margin-bottom: 8px; color: var(--text); }
.card p:last-child { margin-bottom: 0; }
.tag {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  padding: 1px 8px;
  margin: 0 6px 6px 0;
  font-weight: 400;
}
.tag.pending { border-style: dashed; color: var(--faintest); }

/* =========================================================
   DICTIONARY
   ========================================================= */
.searchbar { display: flex; gap: 10px; margin-bottom: 20px; }
.searchbar input {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  font: inherit;
  font-size: 17px;
  font-weight: 300;
  background: var(--paper);
  color: var(--text);
}
.searchbar input:focus { outline: none; border-color: var(--accent); }

.filters { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; margin-bottom: 14px; }
.chip-group { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-label { font-size: 12px; color: var(--faintest); letter-spacing: 0.15em; align-self: center; margin-right: 4px; }
.chip {
  padding: 4px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: var(--paper);
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  letter-spacing: 0.06em;
  cursor: pointer;
}
.chip:hover { border-color: var(--accent); color: var(--text); }
.chip.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }

.toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); cursor: pointer; letter-spacing: 0.06em; }
.toggle input { accent-color: var(--accent); }

.split {
  display: grid;
  grid-template-columns: minmax(240px, 340px) 1fr;
  gap: 20px;
  margin-top: 10px;
}
.panel { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--paper); min-width: 0; }
.panel-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.panel-head h3 { margin: 0; font-size: 14px; text-transform: uppercase; letter-spacing: 0.15em; }
.head-actions { display: flex; gap: 6px; }

.results { max-height: 620px; overflow-y: auto; }
.result {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.result:hover { background: var(--hover); }
.result.is-active { background: var(--accent-soft); box-shadow: inset 2px 0 0 var(--accent); }
.result .hw { font-family: var(--head-font); font-size: 21px; font-weight: 300; color: var(--ink); letter-spacing: 0.08em; }
.result .ipa { font-size: 14px; margin-left: 6px; }
.result .gl { font-size: 13px; color: var(--faint); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result .star { float: right; color: var(--faint); font-size: 13px; }
.results .none { padding: 24px 18px; color: var(--faint); font-size: 14px; }

.entry { padding: 26px 26px 30px; }
.entry.empty p { color: var(--faint); font-size: 15px; }
.entry .headword { font-family: var(--head-font); font-size: 42px; font-weight: 300; color: var(--ink); letter-spacing: 0.12em; line-height: 1.3; }
.entry .pron { margin: 6px 0 14px; font-size: 18px; }
.entry .pron .roman { color: var(--muted); margin-right: 12px; letter-spacing: 0.06em; }
.entry .meta { margin-bottom: 18px; }
.entry h4 {
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--faintest); margin: 22px 0 8px;
}
.entry ol.senses { margin: 0 0 0 20px; font-size: 17px; font-weight: 300; color: var(--text); }
.entry ol.senses li { margin-bottom: 4px; }
.entry .ex { border-left: 2px solid var(--line); padding: 2px 0 2px 14px; margin-bottom: 12px; }
.entry .ex .src { font-size: 17px; color: var(--text); }
.entry .ex .ipa { font-size: 14px; display: block; }
.entry .ex .tr { font-size: 14px; color: var(--faint); }
.entry .notes { font-size: 15px; margin: 0; }
.entry .credit { font-size: 12px; color: var(--faintest); margin-top: 24px; letter-spacing: 0.06em; }

.audio-box { border: 1px dashed var(--line-strong); border-radius: var(--r-lg); padding: 14px 16px; }
.audio-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.audio-row:last-child { margin-bottom: 0; }
.audio-row audio { height: 34px; max-width: 100%; }
.rec-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #fff; margin-right: 6px; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: 0.2; } }

.manage-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 20px; }
.controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; }
.controls input[type=file] { font-size: 13px; max-width: 100%; }
.codeblock {
  background: var(--tint);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 14px;
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.6;
  color: #444;
  overflow-x: auto;
  white-space: pre;
  letter-spacing: 0;
}
code { font-family: 'SF Mono', Menlo, Consolas, monospace; font-size: 0.9em; background: var(--tint); padding: 1px 5px; border-radius: var(--r-sm); letter-spacing: 0; }

/* =========================================================
   PLANTS (ethnobotany photo book)
   ========================================================= */
.plant-tools { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; margin-bottom: 26px; }
.plant-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 26px; }
.plant {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--paper);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  scroll-margin-top: 20px;
}
.plant:target { box-shadow: 0 0 0 2px var(--accent); }
.plant .photo { aspect-ratio: 4 / 3; background: var(--tint); overflow: hidden; }
.plant .photo img { width: 100%; height: 100%; object-fit: cover; }
.plant .photo .nophoto { height: 100%; display: flex; align-items: center; justify-content: center; color: var(--faintest); font-size: 13px; letter-spacing: 0.15em; }
.plant .body { padding: 18px 20px 20px; flex: 1; display: flex; flex-direction: column; }
.plant .name { font-family: var(--head-font); font-size: 30px; font-weight: 300; color: var(--ink); letter-spacing: 0.12em; line-height: 1.3; }
.plant .name .ipa { font-size: 16px; margin-left: 8px; letter-spacing: 0.02em; }
.plant dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 14px; margin: 12px 0; font-size: 14px; }
.plant dt { color: var(--faintest); letter-spacing: 0.1em; font-size: 12px; padding-top: 2px; }
.plant dd { color: var(--text); font-weight: 300; }
.plant dd i { font-style: italic; }
.plant .desc { font-size: 15px; margin-bottom: 12px; }
.plant .foot { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.plant .qr { display: none; margin-top: 14px; align-items: center; gap: 12px; }
.plant .qr .qrbox { width: 84px; height: 84px; }
.plant .qr .qrbox svg { width: 84px; height: 84px; display: block; }
.plant .qr .small { word-break: break-all; }
body.show-qr .plant .qr { display: flex; }

/* photo strip, derived foods, play buttons */
.plant .photo { background: var(--tint); }
.plant .photo img { object-fit: contain; }
.thumbs { display: flex; gap: 6px; padding: 8px 12px 0; }
.thumb { width: 52px; height: 52px; padding: 0; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--tint); cursor: pointer; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.is-active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.photo-cap { padding: 6px 14px 0; min-height: 1.4em; }
.plant .name .ipa { font-size: 17px; }
.plant .gloss { font-size: 15px; color: var(--text); margin: 4px 0 8px; }
.plant .tags { margin-top: 4px; }
.plant h4, .flow h4 { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.18em; color: var(--faintest); margin: 14px 0 8px; }
.derived { list-style: none; margin: 0 0 12px !important; padding: 0; display: grid; gap: 8px; }
.derived li { display: flex; align-items: center; gap: 12px; margin: 0 !important; }
.derived img, .derived .dph { width: 56px; height: 56px; object-fit: cover; border-radius: var(--r-sm); background: var(--tint); flex: none; border: 1px solid var(--line); }
.derived .dname { font-size: 15px; color: var(--text); font-weight: 300; line-height: 1.5; }
.derived .ipa { font-size: 14px; }
.play { border: 1px solid var(--line-strong); background: var(--paper); border-radius: 50%; width: 26px; height: 26px; font-size: 10px; cursor: pointer; vertical-align: middle; color: var(--text); }
.play:hover { border-color: var(--accent); }

.flow { display: flex; align-items: center; gap: 18px; margin: 10px 0 30px; flex-wrap: wrap; }
.flow figure { margin: 0; text-align: center; }
.flow img { width: 100%; aspect-ratio: 1; object-fit: contain; background: var(--tint); border-radius: var(--r-lg); border: 1px solid var(--line); }
.flow figcaption { font-size: 15px; color: var(--text); margin-top: 6px; line-height: 1.5; }
.flow figcaption .ipa { font-size: 14px; }
.flow-root { flex: 0 0 180px; }
.flow-arrow { font-size: 28px; color: var(--faintest); }
.flow-items { flex: 1 1 360px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.pillars.three { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.pub { color: var(--text); font-size: 17px; }
@media (max-width: 640px) {
  .flow-root { flex-basis: 100%; max-width: 220px; margin: 0 auto; }
  .flow-arrow { flex-basis: 100%; text-align: center; transform: rotate(90deg); }
}

.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 128px), 1fr)); gap: 20px; margin-top: 10px; }
.pillars .num { font-size: 13px; letter-spacing: 0.2em; color: var(--faintest); display: block; margin-bottom: 6px; }

/* ---------- footer ---------- */
footer {
  text-align: center;
  padding: 24px 16px;
  background: var(--paper);
  border-top: 1px solid var(--line);
}
footer p {
  font-size: 13px;
  color: var(--faint);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 4px 0;
}

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .split { grid-template-columns: 1fr; }
  .results { max-height: 300px; }
}
@media (max-width: 640px) {
  .page-nav a { margin: 0 8px; font-size: 12px; }
  .hero { padding: 36px 16px 32px; }
  h1, .hero h1 { font-size: 30px; letter-spacing: 0.04em; }
  .hero .subtitle { font-size: 17px; }
  .content-section { padding: 56px 16px; }
  h2 { font-size: 24px; margin-bottom: 28px; }
  p { font-size: 16px; }
  .entry { padding: 20px 16px; }
  .entry .headword { font-size: 32px; }
}

/* ---------- print (photo book proofs: one plant per half page, QR visible) ---------- */
@media print {
  .page-nav, .hero .buttons, .plant-tools, .plant .foot, footer, .no-print { display: none !important; }
  body, .content-section, .hero { background: #fff; }
  .content-section { padding: 24px 0; border: 0; max-width: none; }
  .plant-grid { display: block; }
  .plant { break-inside: avoid; page-break-inside: avoid; margin-bottom: 18px; border-color: #bbb; }
  .plant .qr { display: flex !important; }
  a { color: #000; }
}

/* =========================================================
   AYHAK 识别：要点用上方色线，不用四边框
   ========================================================= */
.pillars .card {
  border: 0;
  border-top: 2px solid var(--accent);
  border-radius: 0;
  background: transparent;
  padding: 14px 2px 4px;
}
.pillars .num { color: var(--accent); font-weight: 600; }
.flow figcaption b, .derived .dname b { font-family: var(--head-font); font-weight: 500; }
.status { color: var(--faint); }
::selection { background: var(--accent-soft); }

/* =========================================================
   AYHAK 首页（原 juan-zhong.github.io/me/fieldwork*.html）
   ========================================================= */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 20px; margin-top: 24px; }
.cards .card { display: flex; flex-direction: column; transition: border-color .15s; }
.cards .card:hover { border-color: var(--line-strong); }
.cards .card .tag { align-self: flex-start; margin-bottom: 10px; }
.cards .card .tag.live { border-color: var(--accent); color: var(--accent); }
.cards .card p { font-size: 15px; margin-bottom: 12px; }
.cards .card .more { margin-top: auto; font-size: 13px; letter-spacing: 0.08em; color: var(--accent); font-weight: 600; }
.cards .card .more:hover { color: var(--ink); }

.faq dt { font-weight: 500; margin-top: 22px; color: var(--text); font-size: 17px; }
.faq dt::before { content: ''; display: inline-block; width: 6px; height: 6px; background: var(--accent); margin-right: 10px; vertical-align: middle; }
.faq dd { margin: 6px 0 0 16px; color: var(--muted); font-weight: 300; font-size: 17px; line-height: 1.8; }

.gallery-group { margin-bottom: 48px; }
.gallery-group h3 { color: var(--text); font-family: var(--head-font); font-size: 22px; font-weight: 300; margin-bottom: 18px; }
.gallery-group h3 .en { font-family: var(--font); font-size: 14px; color: var(--faint); letter-spacing: 0.12em; text-transform: uppercase; margin-right: 8px; }
.gallery-group h3 .ipa { font-size: 15px; margin-left: 6px; }
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.gallery-grid figure { margin: 0; }
.gallery-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-lg); background: var(--tint); }
.gallery-grid img.portrait { aspect-ratio: 3 / 4; }
.gallery-grid figcaption { font-size: 13px; color: var(--faint); margin-top: 4px; letter-spacing: 0.06em; }
.gallery-grid .solo { grid-column: 1 / -1; }
@media (max-width: 640px) { .gallery-grid { grid-template-columns: 1fr; } }
.gallery-grid .solo img { aspect-ratio: auto; max-height: 640px; width: auto; max-width: 100%; margin: 0 auto; }
.gallery-grid .solo { text-align: center; }

/* 项目：照片为主的卡片，和植物页“从田里到厨房”同一种排法 */
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 26px 20px; margin-top: 10px; }
.proj { margin: 0; display: flex; flex-direction: column; color: inherit; text-decoration: none; }
.proj img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--tint); border-radius: var(--r-lg); border: 1px solid var(--line); transition: opacity .15s; }
a.proj:hover img { opacity: 0.85; }
a.proj:hover { color: inherit; }
.proj .tag { align-self: flex-start; margin: 12px 0 6px; }
.proj .tag.live { border-color: var(--accent); color: var(--accent); }
.proj b { font-family: var(--head-font); font-weight: 500; font-size: 19px; color: var(--ink); letter-spacing: 0.06em; }
.proj span.desc { font-size: 15px; color: var(--muted); font-weight: 300; line-height: 1.7; margin-top: 4px; }
.proj .more { font-size: 13px; letter-spacing: 0.08em; color: var(--accent); font-weight: 600; margin-top: 8px; }
.proj img.cutout { object-fit: contain; padding: 10px; }

/* 小标题统一：中等字重、正文色 */
.card h3, .pillars .card h3 { font-weight: 500; color: var(--text); letter-spacing: 0.06em; }
strong, b { font-weight: 500; }


/* =========================================================
   状态颜色：绿色 = 已完成 / 可以用；紫色 = 还在做
   ========================================================= */
.tag { background: var(--paper); }
.tag.live, .tag.done, .cards .card .tag.live, .proj .tag.live {
  color: var(--accent); border-color: var(--accent); background: var(--accent-soft);
}
.tag.todo { color: var(--plum); border-color: var(--plum); background: var(--plum-soft); }
.tag.pending { color: var(--plum); border-color: #cdb5cf; background: transparent; }
h2::after { border-radius: 2px; }
.searchbar input { border-radius: var(--r-sm); }

/* =========================================================
   手机端
   ========================================================= */
.page-nav a { white-space: nowrap; display: inline-block; }
@media (max-width: 640px) {
  /* 导航：词不拆行，间距收紧 */
  .page-nav { padding: 12px 10px 0; line-height: 2.4; }
  .page-nav a { margin: 0 7px; font-size: 12px; letter-spacing: 0.06em; }

  /* 项目：左图右文，缩短页面 */
  .projects { grid-template-columns: 1fr; gap: 18px; }
  .proj { display: grid; grid-template-columns: 116px 1fr; column-gap: 14px; align-items: start; }
  .proj img { grid-row: 1 / span 5; aspect-ratio: 1; }
  .proj .tag { margin: 0 0 4px; justify-self: start; }
  .proj b { font-size: 17px; }
  .proj span.desc { font-size: 14px; line-height: 1.6; }
  .proj .more { margin-top: 4px; }

  /* 安远影像：两列 */
  .gallery-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .gallery-grid figcaption { font-size: 12px; }
  .gallery-grid .solo img { max-height: 460px; }

  /* 好点的按钮 */
  .chip { padding: 6px 13px; font-size: 13px; }
  .play { width: 32px; height: 32px; font-size: 11px; }
  .btn.sm { padding: 7px 13px; }
  .toggle { padding: 4px 0; }
  .icon-btn { width: 38px; height: 38px; }
}

/* =========================================================
   首页修订（2026-10-20）：查词、状态说明、参与、影像精选、看大图
   ========================================================= */
.hero .intro + .intro { margin-top: -12px; }
.try { margin: -6px 0 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chip-link {
  display: inline-block; padding: 4px 14px; border: 1px solid var(--line-strong); border-radius: var(--r-pill);
  background: var(--paper); color: var(--text); font-size: 14px; letter-spacing: 0.06em;
}
.chip-link:hover { border-color: var(--accent); color: var(--accent); }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 4px; margin: -18px 0 22px; }
.legend .tag { margin: 0 2px 0 10px; }
.legend .tag:first-child { margin-left: 0; }

h3.sub { color: var(--ink); font-size: 20px; font-weight: 500; letter-spacing: 0.06em; margin: 40px 0 14px; }
h3.sub:first-of-type { margin-top: 0; }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 22px; margin: 0 0 18px; font-size: 16px; }
.facts dt { color: var(--faint); letter-spacing: 0.1em; font-size: 14px; padding-top: 2px; }
.facts dd { color: var(--text); font-weight: 300; line-height: 1.7; }

.next-meetup { display: block; margin: 0 0 18px; padding: 12px 16px; border-radius: var(--r-sm); background: var(--accent-soft); color: var(--text); font-size: 16px; }
.next-meetup:empty { display: none; }
.next-meetup .next-label { font-size: 12px; letter-spacing: 0.15em; color: var(--accent); font-weight: 600; margin-right: 10px; }
.next-meetup b { font-weight: 500; }
.buttons.left { justify-content: flex-start; margin-bottom: 10px; }

.note-box { margin-top: 30px; padding: 18px 20px 8px; border-radius: var(--r-lg); background: var(--tint); }
.note-box h3 { color: var(--ink); font-weight: 500; font-size: 16px; margin-bottom: 8px; }
.note-box ul { margin: 0 0 12px 20px !important; font-size: 15px !important; }

.gallery-grid.teaser { grid-template-columns: repeat(3, 1fr); }
.more-link { margin: 16px 0 0; font-size: 15px; }
.more-link a { color: var(--accent); font-weight: 600; letter-spacing: 0.06em; }
.gallery-grid img { cursor: zoom-in; }

.lightbox { position: fixed; inset: 0; z-index: 50; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(28, 27, 23, 0.88); }
.lightbox.open { display: flex; }
.lightbox figure { margin: 0; max-width: min(1100px, 100%); text-align: center; }
.lightbox img { max-width: 100%; max-height: 82vh; border-radius: var(--r-lg); cursor: default; }
.lightbox figcaption { color: #eee9dc; margin-top: 10px; font-size: 15px; letter-spacing: 0.08em; }
.lb-close { position: absolute; top: 14px; right: 18px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255,255,255,0.12); color: #fff; font-size: 24px; cursor: pointer; }

.variants { list-style: none; margin: 0 0 8px !important; padding: 0; }
.variants li { margin: 0 0 6px !important; font-size: 16px; color: var(--text); }
.variants .tag { margin: 0 0 0 6px; }

@media (max-width: 640px) {
  .gallery-grid.teaser { grid-template-columns: 1fr 1fr; }
  .facts { grid-template-columns: 1fr; gap: 0; }
  .facts dt { margin-top: 10px; }
  .legend .tag { margin-left: 6px; }
}
footer p.license { text-transform: none; letter-spacing: 0.04em; font-size: 12px; color: var(--faintest); max-width: 760px; margin: 8px auto 0; line-height: 1.7; }
footer p.license a { color: var(--faint); text-decoration: underline; text-decoration-color: var(--line-strong); }

/* 各地读音表（借鉴 SeeDict“各地方音”） */
.readings-wrap { overflow-x: auto; margin: 0 0 6px; border: 1px solid var(--line); border-radius: var(--r-sm); }
.readings { width: 100%; border-collapse: collapse; font-size: 14px; }
.readings th { text-align: left; font-weight: 500; color: var(--faint); font-size: 12px; letter-spacing: 0.1em; padding: 8px 10px; background: var(--tint); white-space: nowrap; }
.readings td { padding: 8px 10px; border-top: 1px solid var(--line); vertical-align: middle; color: var(--text); white-space: nowrap; }
.readings td:first-child { white-space: normal; }
.readings tr.main td { background: var(--accent-soft); }
.readings .tag { margin: 0; }
.readings b { font-weight: 500; font-size: 16px; }

/* 征集中的词 */
.wanted-group { margin-bottom: 20px; }
.wg-title { color: var(--ink); font-size: 16px; font-weight: 500; margin: 0 0 8px; letter-spacing: 0.06em; }
.wg-title .small { color: var(--plum); margin-left: 4px; }
#wanted .chip-link { border-style: dashed; border-color: #cdb5cf; }
#wanted .chip-link:hover { border-style: solid; border-color: var(--plum); color: var(--plum); }

/* 每日一词 */
.wotd { display: block; margin: 0 0 22px; padding: 16px 20px; border-radius: var(--r-lg); background: var(--paper); border: 1px solid var(--line); color: inherit; }
.wotd:hover { border-color: var(--accent); color: inherit; }
.wotd .wotd-label { font-size: 12px; letter-spacing: 0.15em; color: var(--accent); font-weight: 600; }
.wotd .wotd-hw { font-size: 30px; font-weight: 300; color: var(--ink); letter-spacing: 0.12em; margin: 2px 0 0; }
.wotd .wotd-hw .ipa { font-size: 16px; letter-spacing: 0.02em; margin-left: 10px; }
.wotd .wotd-gl { font-size: 15px; color: var(--muted); }
.wotd:empty { display: none; }

/* =========================================================
   精简（2026-10-20）：管理工具只在 ?admin=1 时显示；标题区和留白收紧
   ========================================================= */
.admin-only { display: none !important; }
html.admin .admin-only { display: revert !important; }
html.admin section.admin-only { display: block !important; }
.hero.compact { padding: 40px 20px 32px; }
.hero.compact .subtitle { margin-bottom: 12px; }
.hero.compact .intro { margin-bottom: 14px; }
.content-section { padding: 64px 20px; }
h2 { margin-bottom: 30px; }
@media (max-width: 640px) {
  .content-section { padding: 44px 16px; }
  .hero.compact { padding: 28px 16px 22px; }
}

/* 首页：先听一句、还在弄的、影像标题连词典 */
.sample { margin: 22px 0 0; padding: 14px 16px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 15px; }
.sample .play { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--plum); background: var(--plum-soft); color: var(--plum); font-size: 13px; cursor: pointer; flex: none; }
.sample .play:hover { background: var(--plum); color: #fff; }
.sample b { font-weight: 500; color: var(--ink); }
.sample a { color: var(--accent); font-weight: 600; margin-left: auto; }
.also { margin: 18px 0 0; font-size: 15px; color: var(--muted); line-height: 1.8; }
.also b { color: var(--ink); font-weight: 500; }
a.to-dict { color: inherit; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; }
a.to-dict:hover { color: var(--accent); text-decoration-color: var(--accent); }

/* 首页项目：分组小标题、不用卡片的条目、复健会引言 */
#projects h3.sub { margin-top: 36px; }
#projects h3.sub:first-of-type { margin-top: 0; }
dl.plain { margin: 0; }
dl.plain dt { font-weight: 500; color: var(--ink); font-size: 17px; margin-top: 14px; }
dl.plain dt a { color: var(--accent); }
dl.plain dd { margin: 4px 0 0; color: var(--muted); font-size: 15px; line-height: 1.8; }
.projects + dl.plain { margin-top: 10px; }
p.lead { font-size: 18px; color: var(--ink); margin-bottom: 10px; }

/* =========================================================
   播放图标：用 SVG 画，不用 ▶ 字符（苹果设备会把 ▶ 显示成彩色 emoji）
   ========================================================= */
.ico { display: inline-block; width: 1em; height: 1em; vertical-align: -0.12em; fill: currentColor; }
.ico-play {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid var(--plum); background: var(--plum-soft); color: var(--plum);
  font-size: 10px; vertical-align: middle; position: relative; top: -2px; margin: 0 3px; line-height: 1;
}
.ico-play .ico { margin-left: 1px; }
.play { display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.play .ico { margin-left: 1px; }

/* =========================================================
   五百句：列表
   ========================================================= */
.cat-chips { margin-bottom: 14px; }
.sentence-list { margin-top: 6px; }
.cat-title { font-size: 15px; font-weight: 500; color: var(--accent); letter-spacing: 0.12em; margin: 26px 0 4px; }
.sentence { border-bottom: 1px solid var(--line); padding: 14px 0; scroll-margin-top: 20px; }
.sentence:last-child { border-bottom: 0; }
.s-head { display: flex; align-items: flex-start; gap: 14px; }
.s-no { flex: none; width: 34px; padding-top: 3px; font-size: 13px; color: var(--faintest); font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }
.s-text { flex: 1; min-width: 0; }
.s-zh { font-size: 18px; color: var(--ink); letter-spacing: 0.06em; line-height: 1.6; }
.s-ay { font-size: 15px; color: var(--muted); margin-top: 2px; }
.s-head .btn { flex: none; }
.s-wait { flex: none; padding-top: 4px; color: var(--faintest); }
.s-recs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 10px 0 0 48px; }
.rec-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 14px 4px 4px; border-radius: var(--r-pill);
  border: 1px solid var(--line-strong); background: var(--paper); color: var(--text);
  font: inherit; font-size: 14px; letter-spacing: 0.06em; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.rec-chip .play-ico {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--plum-soft); color: var(--plum); font-size: 11px;
  transition: background .15s, color .15s;
}
.rec-chip .play-ico .ico { margin-left: 1px; }
.rec-chip:hover { border-color: var(--plum); }
.rec-chip:hover .play-ico, .rec-chip.playing .play-ico { background: var(--plum); color: #fff; }
.rec-chip.playing { border-color: var(--plum); background: var(--plum-soft); }
.rec-chip.loading { opacity: 0.6; cursor: progress; }
.rec-chip:focus-visible { outline: 2px solid var(--plum); outline-offset: 2px; }
.rec-hz { color: var(--muted); }
.sentence .mine { margin: 8px 0 0 48px; color: var(--plum); }
@media (max-width: 600px) {
  .s-head { gap: 10px; }
  .s-no { width: 26px; }
  .s-zh { font-size: 17px; }
  .s-recs, .sentence .mine { margin-left: 36px; }
}

/* =========================================================
   五百句：录音面板（管理模式）
   ========================================================= */
.sheet { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; padding: 16px; background: rgba(28, 27, 23, 0.5); }
.sheet[hidden] { display: none; }
body.sheet-open { overflow: hidden; }
@media (min-width: 640px) { .sheet { align-items: center; } }
.sheet-card { position: relative; width: min(520px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: var(--paper); border-radius: var(--r-lg); padding: 24px 22px 20px; box-shadow: 0 20px 50px -20px rgba(28, 27, 23, 0.45); }
.sheet-close { position: absolute; top: 10px; right: 12px; width: 32px; height: 32px; border: 0; background: none; font-size: 22px; line-height: 1; color: var(--faint); cursor: pointer; border-radius: 50%; }
.sheet-close:hover { background: var(--hover); color: var(--ink); }
.sheet-zh { font-size: 21px; font-weight: 400; color: var(--ink); letter-spacing: 0.08em; margin: 2px 36px 16px 0; }
.rec-area { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rec-btn { display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); background: var(--paper); font: inherit; font-size: 15px; letter-spacing: 0.06em; color: var(--ink); cursor: pointer; }
.rec-btn .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--danger); flex: none; }
.rec-btn:hover { border-color: var(--danger); }
.rec-btn.on { border-color: var(--danger); background: #fbeeee; }
.rec-btn.on .dot { animation: rec-pulse 1s ease-in-out infinite; }
@keyframes rec-pulse { 50% { opacity: 0.3; } }
#recPreview { width: 100%; margin: 4px 0 10px; }
.file-pick { color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.file-pick input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.rec-form { display: grid; gap: 12px; margin-top: 16px; }
.rec-form label { display: block; font-size: 14px; color: var(--muted); }
.rec-form input[type="text"], .rec-form input:not([type]) { display: block; width: 100%; margin-top: 4px; font: inherit; font-size: 15px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: #fff; color: var(--ink); }
.rec-form input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.rec-form label.check { display: flex; align-items: flex-start; gap: 8px; color: var(--text); }
.rec-form label.check input { margin-top: 5px; accent-color: var(--accent); }
.rec-form .req { color: var(--danger); }
.rec-form .btn { justify-self: start; }
/* 防机器人的隐藏栏位：人看不到，就不会误填（误填的录音会被后台丢掉） */
.rec-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
