/* ============ \u8bbe\u8ba1\u53d8\u91cf ============ */
:root {
  --bg: #f4f8f6;
  --bg-soft: #eaf4ef;
  --surface: #ffffff;
  --ink: #152320;
  --ink-2: #43524e;
  --muted: #77857f;
  --line: #e2eae7;
  --line-strong: #cfdcd7;
  --primary: #0f7a67;
  --primary-ink: #0b5a4d;
  --primary-soft: #e3f3ee;
  --accent: #c1632c;
  --mark: #fff0a8;
  --shadow-sm: 0 1px 2px rgba(18, 40, 34, .05);
  --shadow-md: 0 10px 26px -14px rgba(16, 51, 42, .28);
  --radius: 16px;
  --radius-sm: 10px;
  --wrap: 1180px;
  --header-h: 68px;
}

html { font-size: 16px; }

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

mark {
  background: var(--mark);
  color: inherit;
  padding: 0 .12em;
  border-radius: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary);
  color: #fff;
  padding: .6rem 1rem;
  z-index: 50;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 3px solid rgba(15, 122, 103, .45);
  outline-offset: 2px;
}

.wrap {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
}

.muted { color: var(--muted); }

/* ============ \u5934\u90e8 ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  flex: none;
}

.brand-mark {
  color: var(--primary);
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 12px;
  background: var(--primary-soft);
}

.brand-text { display: flex; align-items: baseline; gap: .3rem; }
.brand-text strong { font-size: 1.15rem; letter-spacing: .02em; }
.brand-text em {
  font-style: normal;
  font-size: .82rem;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 0 .3rem;
}

.main-nav {
  display: flex;
  gap: .35rem;
  flex: none;
}

.main-nav a {
  padding: .45rem .8rem;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: .95rem;
  transition: background .15s ease, color .15s ease;
}
.main-nav a:hover { background: var(--bg-soft); color: var(--primary-ink); }
.main-nav a.active { background: var(--primary); color: #fff; }

.header-search {
  position: relative;
  margin-left: auto;
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: .2rem .3rem .2rem 1rem;
  min-width: 15rem;
  max-width: 22rem;
  flex: 1 1 12rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.header-search:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 122, 103, .12);
}
.header-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: .95rem;
  color: var(--ink);
  padding: .4rem 0;
}
.header-search input::placeholder { color: #9aa7a1; }
.header-search input:focus { outline: none; }
.header-search button {
  flex: none;
  width: 2.2rem;
  height: 2.2rem;
  border: 0;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-ink);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.header-search button:hover { background: var(--primary); color: #fff; }

.header-tools {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex: none;
  margin-left: auto;
}
.header-search + .header-tools { margin-left: 0; }

.font-ctl {
  display: flex;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface);
}
.font-ctl button {
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: .8rem;
  padding: .35rem .5rem;
  cursor: pointer;
  line-height: 1.2;
}
.font-ctl button small { font-size: .7em; }
.font-ctl button:hover { background: var(--bg-soft); }
.font-ctl button[aria-pressed="true"] { background: var(--primary); color: #fff; }

.contrast-btn, .fav-link, .lang-link {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-2);
  border-radius: 999px;
  padding: .38rem .7rem;
  font: inherit;
  font-size: .82rem;
  cursor: pointer;
  white-space: nowrap;
}
.contrast-btn:hover, .fav-link:hover, .lang-link:hover { border-color: var(--primary); color: var(--primary-ink); }
.contrast-btn[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.lang-link { text-decoration: none; font-weight: 600; letter-spacing: .02em; }
.lang-link:hover { background: var(--primary-soft); }

.fav-count {
  display: inline-grid;
  place-items: center;
  min-width: 1.35em;
  height: 1.35em;
  padding: 0 .25em;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-ink);
  font-size: .78rem;
  font-weight: 700;
}

/* ============ \u9996\u9875 Hero ============ */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1200px 420px at 12% -10%, #d9efe6 0%, transparent 62%),
    linear-gradient(180deg, #eef8f3 0%, #f7fbf9 70%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}

.hero::after {
  content: "";
  position: absolute;
  right: -6rem;
  top: -4rem;
  width: 26rem;
  height: 26rem;
  border-radius: 50%;
  border: 1.6rem solid rgba(15, 122, 103, .06);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  padding: 3.4rem 0 2.8rem;
  max-width: 760px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .82rem;
  color: var(--primary-ink);
  background: rgba(255, 255, 255, .75);
  border: 1px solid #cfe6dc;
  border-radius: 999px;
  padding: .25rem .7rem;
  margin-bottom: 1rem;
}
.hero-kicker i {
  width: .45rem; height: .45rem; border-radius: 50%; background: var(--primary);
  display: inline-block;
}

.hero h1 {
  margin: 0 0 .6rem;
  font-size: clamp(1.6rem, 3.4vw, 2.35rem);
  line-height: 1.28;
  letter-spacing: -.01em;
}
.hero h1 em {
  font-style: normal;
  color: var(--primary);
  box-shadow: inset 0 -.42em 0 rgba(15, 122, 103, .13);
}

.hero-sub {
  margin: 0 0 1.6rem;
  color: var(--ink-2);
  font-size: 1rem;
}
.hero-sub b { color: var(--primary-ink); font-weight: 700; }

.hero-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: .5rem;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  padding: .5rem .5rem .5rem 1.1rem;
  box-shadow: var(--shadow-md);
}
.hero-search:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(15, 122, 103, .13), var(--shadow-md);
}
.hero-search .search-icon { color: var(--primary); display: grid; place-items: center; flex: none; }
.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 1.08rem;
  padding: .55rem 0;
  color: var(--ink);
}
.hero-search input:focus { outline: none; }
.hero-search input::placeholder { color: #9aa7a1; }
.hero-search button {
  flex: none;
  border: 0;
  background: var(--primary);
  color: #fff;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
  padding: .7rem 1.4rem;
  cursor: pointer;
  transition: background .15s ease;
}
.hero-search button:hover { background: var(--primary-ink); }

.suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + .45rem);
  z-index: 20;
  margin: 0;
  padding: .4rem;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 24px 48px -24px rgba(16, 51, 42, .4);
  max-height: 20rem;
  overflow: auto;
}
.suggest[hidden] { display: none; }
.suggest li a,
.suggest li button {
  display: flex;
  align-items: center;
  gap: .55rem;
  width: 100%;
  padding: .55rem .65rem;
  border: 0;
  border-radius: 9px;
  background: transparent;
  font: inherit;
  font-size: .92rem;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.suggest li a:hover, .suggest li button:hover, .suggest li a.is-cursor, .suggest li button.is-cursor {
  background: var(--bg-soft);
}
.suggest .s-kind {
  flex: none;
  font-size: .72rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 .3rem;
}
.suggest .s-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest .s-empty { padding: .8rem .65rem; color: var(--muted); font-size: .9rem; }

.hot-words {
  margin-top: 1.1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem;
  font-size: .88rem;
  color: var(--muted);
}
.hot-words a {
  color: var(--ink-2);
  background: rgba(255, 255, 255, .8);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .18rem .65rem;
  transition: all .15s ease;
}
.hot-words a:hover { color: var(--primary-ink); border-color: var(--primary); background: #fff; }

.hero-random {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-top: 1.1rem;
  font-size: .9rem;
  color: var(--primary-ink);
  border-bottom: 1px dashed rgba(15, 122, 103, .45);
  padding-bottom: .1rem;
}
.hero-random:hover { color: var(--primary); border-bottom-style: solid; }

/* ============ \u5206\u7c7b\u7b5b\u9009 ============ */
.browse-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: .8rem 0;
  position: sticky;
  top: var(--header-h);
  z-index: 20;
}
.browse-bar .wrap { display: flex; align-items: center; gap: .75rem; }
.browse-label {
  flex: none;
  font-size: .85rem;
  color: var(--muted);
  padding-right: .6rem;
  border-right: 1px solid var(--line);
}
.cat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .38rem;
  padding: .1rem 0 .2rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.cat-chips::-webkit-scrollbar { display: none; }
.cat-chips .chip { padding: .2rem .56rem; font-size: .82rem; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  border-radius: 999px;
  padding: .26rem .7rem;
  font-size: .88rem;
  white-space: nowrap;
  transition: all .15s ease;
}
.chip span { font-size: .72rem; color: var(--muted); }
.chip:hover { border-color: var(--primary); color: var(--primary-ink); }
.chip.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip.on span { color: rgba(255, 255, 255, .8); }

/* ============ \u901a\u7528\u533a\u5757 ============ */
.section { padding: 2.4rem 0 1rem; }
.section-head {
  display: flex;
  align-items: baseline;
  gap: .8rem;
  margin-bottom: 1.1rem;
  flex-wrap: wrap;
}
.section-head h2 {
  margin: 0;
  font-size: 1.3rem;
  letter-spacing: -.01em;
}
.section-head h2 span { color: var(--primary); }
.section-head .sub { color: var(--muted); font-size: .88rem; }
.section-head .more { margin-left: auto; font-size: .85rem; color: var(--primary-ink); }
.section-head .more:hover { text-decoration: underline; }

/* ============ \u836f\u65b9\u5361\u7247 ============ */
.rx-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr));
  gap: 1rem;
}

.rx-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.rx-card:hover {
  transform: translateY(-2px);
  border-color: #c9e0d8;
  box-shadow: var(--shadow-md);
}
.rx-card-link {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  padding: 1.15rem 1.15rem 1rem;
  height: 100%;
  border-radius: var(--radius);
}

.rx-top { display: flex; align-items: flex-start; gap: .5rem; }
.rx-no {
  flex: none;
  font-size: .68rem;
  color: var(--muted);
  letter-spacing: .04em;
  padding-top: .28rem;
  font-variant-numeric: tabular-nums;
}
.rx-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: -.005em;
  padding-right: 1.6rem;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.rx-tags { display: flex; flex-wrap: wrap; gap: .35rem; }
.tag {
  font-size: .74rem;
  border-radius: 6px;
  padding: .1rem .45rem;
  line-height: 1.6;
}
.tag-1 { background: var(--primary-soft); color: var(--primary-ink); }
.tag-2 { background: #fdf3e6; color: #8a5320; }

.rx-snippet {
  margin: 0;
  color: var(--ink-2);
  font-size: .88rem;
  line-height: 1.72;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rx-more {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  color: var(--primary-ink);
  font-size: .84rem;
  font-weight: 600;
}

.card-fav {
  position: absolute;
  top: .85rem;
  right: .85rem;
  width: 2rem;
  height: 2rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #a9b6b0;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all .15s ease;
}
.card-fav:hover { color: var(--primary-ink); background: var(--bg-soft); border-color: var(--line); }
.card-fav.on { color: var(--primary); }
.card-fav.on svg path { fill: var(--primary); stroke: var(--primary); }

/* ============ \u4eca\u65e5\u63a8\u8350 ============ */
.picks { padding: 2.2rem 0 .4rem; }
.picks .rx-grid { grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }

/* ============ \u7ed3\u679c\u63d0\u793a / \u7a7a\u72b6\u6001 ============ */
.result-head {
  padding: 1.9rem 0 .4rem;
}
.result-head h1 {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.35;
}
.result-head h1 strong { color: var(--primary); }
.result-head .crumb { font-size: .84rem; color: var(--muted); margin-bottom: .5rem; }
.result-head .crumb a:hover { color: var(--primary-ink); text-decoration: underline; }
.result-head .count { color: var(--muted); font-size: .9rem; margin-top: .3rem; }

.empty {
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 2.6rem 1.5rem;
  text-align: center;
}
.empty h3 { margin: 0 0 .4rem; font-size: 1.1rem; }
.empty p { margin: 0 0 1rem; color: var(--muted); font-size: .92rem; }
.empty .hot-words { justify-content: center; }

/* ============ \u5206\u9875 ============ */
.pager {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: 1.6rem;
}
.pg {
  min-width: 2.4rem;
  height: 2.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 .7rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: .9rem;
  font-variant-numeric: tabular-nums;
}
.pg:hover { border-color: var(--primary); color: var(--primary-ink); }
.pg.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.pager-hint { text-align: center; color: var(--muted); font-size: .82rem; margin-top: .6rem; }

/* ============ \u8be6\u60c5\u9875 ============ */
.detail-head { padding: 2rem 0 .4rem; }
.crumb { font-size: .84rem; color: var(--muted); margin-bottom: .7rem; display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.crumb a:hover { color: var(--primary-ink); text-decoration: underline; }
.detail-title {
  margin: 0 0 .7rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.35;
  letter-spacing: -.01em;
}
.detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; }
.detail-meta .tag { font-size: .8rem; padding: .15rem .55rem; }
.detail-meta .no { color: var(--muted); font-size: .8rem; margin-left: .2rem; }

.detail-body {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.9rem 2rem 1.4rem;
  margin-top: 1.2rem;
}

.article { font-size: 1.04rem; line-height: 1.98; color: var(--ink); }
.article p { margin: 0 0 .85rem; }
.article p:first-child::first-letter { font-weight: 600; }
.article .lbl { color: var(--primary-ink); font-weight: 700; }

.article-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: 1.2rem;
  padding-top: 1.2rem;
  border-top: 1px dashed var(--line-strong);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  border-radius: 10px;
  padding: .55rem 1rem;
  font: inherit;
  font-size: .92rem;
  cursor: pointer;
  transition: all .15s ease;
}
.btn:hover { border-color: var(--primary); color: var(--primary-ink); background: #fbfefc; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-ink); border-color: var(--primary-ink); color: #fff; }
.btn.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.on svg path { fill: rgba(255, 255, 255, .25); stroke: #fff; }

.tipbox {
  margin-top: 1.3rem;
  background: #fdf8ef;
  border: 1px solid #f0e2c6;
  border-radius: 12px;
  padding: .9rem 1.1rem;
  font-size: .88rem;
  color: #6b5330;
  line-height: 1.75;
}
.tipbox b { color: #8a5320; }

.detail-nav {
  display: flex;
  justify-content: space-between;
  gap: .8rem;
  margin-top: 1.2rem;
  font-size: .9rem;
}
.detail-nav a {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .5rem .9rem;
  max-width: 48%;
}
.detail-nav a:hover { border-color: var(--primary); color: var(--primary-ink); }
.detail-nav .n-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.related { padding: 2.2rem 0 .4rem; }

/* ============ \u6536\u85cf\u9875 ============ */
.fav-head { padding: 2rem 0 1rem; }
.fav-head h1 { margin: 0 0 .3rem; font-size: 1.5rem; }
.fav-head p { margin: 0; color: var(--muted); font-size: .9rem; }

/* ============ \u9875\u811a ============ */
.site-footer {
  margin-top: 3rem;
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 2rem 0 2.4rem;
}
.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: start;
}
.foot-note { max-width: 46rem; }
.foot-title { font-weight: 700; margin: 0 0 .3rem; font-size: .9rem; color: var(--ink); }
.foot-note p { margin: 0; color: var(--ink-2); font-size: .85rem; line-height: 1.85; }
.foot-note strong { color: var(--accent); }
.foot-meta { text-align: right; font-size: .85rem; color: var(--ink-2); }
.foot-meta p { margin: 0 0 .2rem; }
.foot-meta b { color: var(--primary-ink); }

/* ============ Toast ============ */
.toast {
  position: fixed;
  left: 50%;
  bottom: 2rem;
  transform: translate(-50%, 1rem);
  background: rgba(21, 35, 32, .94);
  color: #fff;
  font-size: .9rem;
  padding: .65rem 1.1rem;
  border-radius: 10px;
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .4);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 60;
  max-width: min(24rem, calc(100vw - 2rem));
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ============ 404 ============ */
.notfound { padding: 4rem 0; text-align: center; }
.notfound h1 { font-size: 2rem; margin: 0 0 .6rem; }
.notfound p { color: var(--muted); margin: 0 0 1.2rem; }

/* ============ \u9ad8\u5bf9\u6bd4\u6a21\u5f0f ============ */
html.contrast {
  --bg: #ffffff;
  --bg-soft: #eef2f0;
  --surface: #ffffff;
  --ink: #000000;
  --ink-2: #1a1a1a;
  --muted: #333333;
  --line: #8c9893;
  --line-strong: #000000;
  --primary: #00513f;
  --primary-ink: #003a2d;
  --primary-soft: #d9ece5;
  --accent: #7a2f00;
}
html.contrast .rx-card,
html.contrast .detail-body,
html.contrast .rx-card-link { border-width: 2px; }
html.contrast .rx-snippet { color: #1a1a1a; }
html.contrast .chip.on,
html.contrast .btn-primary,
html.contrast .pg.on { background: #003a2d; border-color: #000; }
html.contrast .hero { background: #fff; }
html.contrast a:hover { text-decoration: underline; }
html.contrast .tag-1 { background: #d9ece5; color: #002a21; }

/* ============ \u6392\u5e8f\u5207\u6362 ============ */
.sort-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
  margin-top: 1rem;
}
.sort-label {
  font-size: .82rem;
  color: var(--muted);
  padding-right: .55rem;
  border-right: 1px solid var(--line);
  margin-right: .1rem;
}
.sort-chip {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  border-radius: 8px;
  padding: .22rem .62rem;
  font-size: .85rem;
  line-height: 1.7;
  transition: all .15s ease;
}
.sort-chip:hover { border-color: var(--primary); color: var(--primary-ink); }
.sort-chip.on {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary-ink);
  font-weight: 600;
}

/* ============ \u70ed\u95e8\u699c\u5355 ============ */
.rank-strip { padding: 2.2rem 0 .4rem; }

.rank-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .72rem 1.1rem;
  border-bottom: 1px dashed var(--line);
  transition: background .15s ease;
}
.rank-item:last-child { border-bottom: 0; }
.rank-item:hover { background: #fbfefc; }

.rank-no {
  flex: none;
  width: 1.75rem;
  height: 1.75rem;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-size: .82rem;
  font-weight: 700;
  color: var(--muted);
  background: var(--bg-soft);
  font-variant-numeric: tabular-nums;
}
.rank-no.top { color: #fff; background: var(--primary); }
.rank-no.top-1 { background: #c1632c; }
.rank-no.top-2 { background: #7b8f88; }
.rank-no.top-3 { background: #a9805a; }

.rank-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .15rem;
}
.rank-title {
  font-weight: 600;
  font-size: .98rem;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rank-main:hover .rank-title { color: var(--primary-ink); }
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem;
  font-size: .76rem;
  color: var(--muted);
}
.rank-meta .tag { font-size: .7rem; padding: 0 .38rem; }
.rank-stat { color: var(--muted); }
.rank-stat::before { content: "·"; margin-right: .35rem; color: var(--line-strong); }
.rank-meta .tag + .rank-stat::before { content: ""; margin: 0; }

.rank-go {
  flex: none;
  font-size: .84rem;
  color: var(--primary-ink);
  white-space: nowrap;
}
.rank-go:hover { text-decoration: underline; }

.rank-empty {
  margin: 0;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 1.6rem 1.2rem;
  color: var(--muted);
  font-size: .92rem;
  text-align: center;
}

.rank-list-lg .rank-item { padding: .95rem 1.2rem; }
.rank-list-lg .rank-title { font-size: 1.02rem; }

.detail-stat { font-size: .8rem; color: var(--muted); margin-left: .2rem; }

html.contrast .sort-chip.on { background: #d9ece5; border-color: #000; }

/* ============ \u54cd\u5e94\u5f0f ============ */
@media (max-width: 1080px) {
  .main-nav { display: none; }
  .header-search { max-width: none; }
}

@media (max-width: 860px) {
  .header-tools { gap: .35rem; }
  .contrast-btn span, .fav-link span { display: none; }
  .font-ctl button { padding: .35rem .42rem; }
  .browse-bar { position: static; }
  .browse-label { display: none; }
}

@media (max-width: 720px) {
  .wrap { width: calc(100% - 1.6rem); }
  .header-inner { gap: .6rem; min-height: 60px; flex-wrap: wrap; padding: .4rem 0; }
  .header-search { order: 3; flex: 1 1 100%; max-width: none; }
  .header-tools { margin-left: auto; }
  .hero-inner { padding: 2.2rem 0 2rem; }
  .hero-search { flex-wrap: wrap; padding: .4rem; gap: .3rem; }
  .hero-search input { padding: .5rem .6rem; font-size: 1rem; }
  .hero-search button { width: 100%; padding: .65rem 1rem; }
  .rx-grid { grid-template-columns: 1fr; }
  .detail-body { padding: 1.4rem 1.2rem 1rem; }
  .article { font-size: 1rem; line-height: 1.9; }
  .detail-nav { flex-direction: column; }
  .detail-nav a { max-width: 100%; }
  .footer-inner { grid-template-columns: 1fr; gap: 1.2rem; }
  .foot-meta { text-align: left; }
  .picks .rx-grid { grid-template-columns: 1fr; }
  .rank-item { padding: .6rem .75rem; gap: .55rem; }
  .rank-go { font-size: .78rem; }
  .rank-title { font-size: .94rem; }
  .rank-list-lg .rank-item { padding: .75rem .8rem; }
  .sort-bar { gap: .3rem; }
  .sort-chip { padding: .2rem .5rem; font-size: .8rem; }
  .cat-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .3rem; scrollbar-width: none; }
  .cat-chips::-webkit-scrollbar { display: none; }
  .cat-chips .chip { flex: none; }
  .toast { bottom: 1rem; }
}

@media (max-width: 420px) {
  .brand-text em { display: none; }
  .font-ctl button[data-scale="0"] { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .rx-card:hover { transform: none; }
}

/* ============================================================
   \u4e2d\u533b\u65b9\u5242\u5e93（\u7b2c\u4e8c\u5e93）— \u7528\u68d5\u91d1\u5f3a\u8c03\u8272\u4e0e\u504f\u65b9\u5e93\u7684\u7eff\u8272\u533a\u5206
   ============================================================ */
:root {
  --rc: #8a5a2b;
  --rc-ink: #6f4620;
  --rc-soft: #f8f0e4;
  --rc-line: #ecdcc6;
}

/* ---- \u9876\u90e8\u79fb\u52a8\u7aef\u5e93\u5207\u6362\u6761 ---- */
.lib-bar { display: none; }

/* ---- \u9996\u9875\u53cc\u5e93\u5165\u53e3 ---- */
.lib-entry {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.6rem auto .4rem;
}
.lib-entry-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas:
    "tag name num"
    "tag desc desc"
    "go go go";
  align-items: center;
  gap: .3rem .7rem;
  padding: 1.1rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.lib-entry-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.lib-entry-card.on { border-color: var(--line-strong); }
.lec-tag {
  grid-area: tag;
  align-self: start;
  font-size: .68rem;
  padding: .1rem .4rem;
  border-radius: 6px;
  background: var(--primary-soft);
  color: var(--primary-ink);
  letter-spacing: .04em;
}
.lib-entry-card b { grid-area: name; font-size: 1.12rem; }
.lec-num { grid-area: num; font-size: .86rem; color: var(--muted); }
.lib-entry-card em {
  grid-area: desc;
  font-style: normal;
  font-size: .84rem;
  color: var(--muted);
  line-height: 1.55;
}
.lec-go { grid-area: go; font-size: .82rem; color: var(--primary-ink); padding-top: .3rem; }

.lib-entry-card.rc .lec-tag { background: var(--rc-soft); color: var(--rc-ink); }
.lib-entry-card.rc:hover { border-color: var(--rc); }
.lib-entry-card.rc .lec-go { color: var(--rc-ink); }

/* ---- \u8de8\u5e93\u63d0\u793a ---- */
.cross-lib {
  display: flex;
  align-items: center;
  gap: .8rem;
  flex-wrap: wrap;
  margin: 0 0 1rem;
  padding: .7rem 1rem;
  background: var(--rc-soft);
  border: 1px solid var(--rc-line);
  border-radius: var(--radius-sm);
  font-size: .88rem;
  color: var(--rc-ink);
}
.cross-lib a { margin-left: auto; font-weight: 600; color: var(--rc-ink); white-space: nowrap; }
.cross-lib a:hover { text-decoration: underline; }

/* ---- \u65b9\u5242\u5217\u8868\u9875 ---- */
.fj-head { padding: 1.8rem 0 0; }
.page-title { font-size: 1.8rem; line-height: 1.3; margin: 0 0 .4rem; letter-spacing: -.01em; }
.page-sub { margin: 0 0 1.1rem; color: var(--muted); font-size: .9rem; }
.page-sub b { color: var(--rc-ink); }

.fj-hero { display: grid; grid-template-columns: 1fr auto; gap: 1.2rem; align-items: end; }
.fj-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: .4rem;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: .3rem .3rem .3rem 1rem;
  min-width: 22rem;
  box-shadow: var(--shadow-sm);
}
.fj-search:focus-within { border-color: var(--rc); box-shadow: 0 0 0 3px rgba(138, 90, 43, .12); }
.fj-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: .95rem;
  padding: .5rem 0;
  color: var(--ink);
}
.fj-search button {
  flex: none;
  border: 0;
  cursor: pointer;
  background: var(--rc);
  color: #fff;
  font-size: .9rem;
  padding: .55rem 1.3rem;
  border-radius: 999px;
  font-weight: 600;
}
.fj-search button:hover { background: var(--rc-ink); }
.fj-search .suggest {
  position: absolute;
  top: calc(100% + .4rem);
  left: 0;
  right: 0;
  z-index: 30;
}

.fj-syn {
  margin: .8rem 0 0;
  font-size: .84rem;
  color: var(--rc-ink);
  background: var(--rc-soft);
  border-radius: var(--radius-sm);
  padding: .5rem .8rem;
}
.fj-syn b { font-weight: 600; }

.fj-filters { margin: 1.2rem 0 .4rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: .55rem; }
.filter-row { display: flex; align-items: baseline; gap: .7rem; min-width: 0; }
.filter-label { flex: none; font-size: .8rem; color: var(--muted); width: 2.4rem; }
.filter-chips { display: flex; flex-wrap: wrap; gap: .4rem; min-width: 0; max-width: 100%; }
.filter-chips .chip { font-size: .82rem; padding: .22rem .6rem; border-radius: 999px; }
.chip-x { border-color: var(--rc-line); background: var(--rc-soft); color: var(--rc-ink); }
.chip-reset { border-style: dashed; color: var(--muted); }

.fj-result-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1.2rem 0 .9rem;
}
.result-count { margin: 0; font-size: .9rem; color: var(--muted); }
.result-count b { color: var(--ink); font-size: 1.05rem; }
.fj-result-head .sort-bar { margin-left: auto; }

.fj-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.fj-grid-sm { grid-template-columns: repeat(3, 1fr); }

.fj-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.fj-card:hover { border-color: var(--rc-line); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.fj-card-link { display: flex; flex-direction: column; gap: .5rem; padding: 1.05rem 1.1rem 1rem; height: 100%; }
.fj-card-top { display: flex; align-items: baseline; gap: .5rem; }
.fj-no {
  flex: none;
  font-size: .7rem;
  color: var(--rc-ink);
  background: var(--rc-soft);
  border-radius: 5px;
  padding: .05rem .35rem;
  font-variant-numeric: tabular-nums;
}
.fj-title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.45;
  font-weight: 700;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.fj-tags { display: flex; flex-wrap: wrap; gap: .3rem; }
.tag-book { background: var(--rc-soft); color: var(--rc-ink); }
.fj-effect {
  margin: 0;
  font-size: .86rem;
  line-height: 1.65;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.fj-more { margin-top: auto; font-size: .82rem; color: var(--rc-ink); display: inline-flex; align-items: center; gap: .25rem; }

.fj-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}
.fj-empty p { margin: 0 0 .6rem; }
.fj-empty .muted { font-size: .86rem; }

.fj-books { margin: 2.4rem 0 1rem; }
.fj-books .sec-head, .fj-related .sec-head {
  display: flex;
  align-items: baseline;
  gap: .8rem;
  margin-bottom: .9rem;
}
.sec-head h2 { margin: 0; font-size: 1.15rem; }
.sec-more { margin-left: auto; font-size: .84rem; color: var(--rc-ink); }
.sec-more:hover { text-decoration: underline; }
.book-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; }
.book-chip {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem;
  padding: .6rem .8rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: .86rem;
}
.book-chip:hover { border-color: var(--rc); background: #fffdf9; }
.book-chip b { font-weight: 600; }
.book-chip span { color: var(--muted); font-size: .78rem; white-space: nowrap; }

.fj-warn { margin: 2rem auto 1rem; }
.fj-warn p {
  margin: 0;
  font-size: .84rem;
  line-height: 1.7;
  color: var(--ink-2);
  background: #fff9ef;
  border: 1px solid #f0e0c8;
  border-radius: var(--radius-sm);
  padding: .8rem 1rem;
}

/* ---- \u65b9\u5242\u8be6\u60c5\u9875 ---- */
.fj-detail { padding: 1.6rem 0 0; }
.fj-detail-head { margin-bottom: 1.2rem; }
.fj-detail-no { font-size: .78rem; color: var(--muted); }
.fj-detail-title h1 {
  margin: .2rem 0 .6rem;
  font-size: 1.7rem;
  line-height: 1.35;
  letter-spacing: -.01em;
}
.fj-detail-title small { font-size: .9rem; color: var(--muted); font-weight: 400; margin-left: .5rem; }
.fj-detail-head .fj-tags { margin-bottom: .9rem; }
.fj-detail-head .tag { font-size: .8rem; padding: .18rem .55rem; }
.fj-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.btn-fav {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .5rem .9rem;
  border-radius: 10px;
  border: 1px solid var(--rc-line);
  background: #fff;
  color: var(--rc-ink);
  font-size: .86rem;
  cursor: pointer;
}
.btn-fav:hover { background: var(--rc-soft); }
.btn-fav.on { background: var(--rc); border-color: var(--rc); color: #fff; }
.btn-fav.on svg path { fill: currentColor; }
.fj-actions .btn-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .5rem .9rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  font: inherit;
  font-size: .86rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: .15s;
}
.fj-actions .btn-line:hover { background: var(--soft); border-color: var(--rc-line); color: var(--rc-ink); }
.fj-actions .btn-line:active { transform: translateY(1px); }

.fj-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  margin-bottom: .9rem;
  box-shadow: var(--shadow-sm);
}
.fj-block h2 {
  margin: 0 0 .6rem;
  font-size: .95rem;
  color: var(--rc-ink);
  letter-spacing: .02em;
}
.fj-block h2 small { font-weight: 400; color: var(--muted); font-size: .78rem; margin-left: .4rem; }
.fj-block p { margin: 0; font-size: .98rem; line-height: 1.85; color: var(--ink); }
.fj-block-effect { border-left: 3px solid var(--rc); }
.fj-block-effect p { font-size: 1.02rem; }
.fj-block-note { background: #fffaf3; border-color: #f0e0c8; }
.fj-unit-note { margin-top: .5rem !important; font-size: .8rem !important; color: var(--muted) !important; }

.herb-list { display: flex; flex-wrap: wrap; gap: .45rem; }
.herb {
  display: inline-flex;
  align-items: baseline;
  gap: .3rem;
  padding: .3rem .65rem;
  border-radius: 999px;
  background: var(--rc-soft);
  border: 1px solid var(--rc-line);
  font-size: .88rem;
}
.herb:hover { background: #f3e3cd; }
.herb b { font-weight: 600; color: var(--rc-ink); }
.herb span { font-size: .78rem; color: var(--muted); }

.fj-detail-warn { margin: 1.2rem 0 .8rem; }
.fj-detail-warn p {
  margin: 0;
  font-size: .84rem;
  line-height: 1.75;
  color: #7a4a1c;
  background: #fff6e8;
  border: 1px solid #f2dfc2;
  border-radius: var(--radius-sm);
  padding: .85rem 1rem;
}

.fj-nav { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin: 1.2rem 0 2.4rem; }
.fj-nav .btn-line { flex: 1 1 auto; text-align: center; }
.fj-nav .disabled { color: var(--muted); border-color: var(--line); pointer-events: none; opacity: .7; }

.fj-related { padding-bottom: 2rem; }

/* ---- \u5178\u7c4d\u9875 ---- */
.books-page { padding: 1.6rem 0 2rem; }
.books-search { display: flex; gap: .5rem; align-items: center; margin: 0 0 1.2rem; flex-wrap: wrap; }
.books-search input {
  flex: 1 1 18rem;
  min-width: 0;
  padding: .6rem .9rem;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  font-size: .95rem;
  background: #fff;
}
.books-search input:focus { outline: 0; border-color: var(--rc); box-shadow: 0 0 0 3px rgba(138, 90, 43, .12); }
.books-search button {
  border: 0;
  background: var(--rc);
  color: #fff;
  padding: .62rem 1.2rem;
  border-radius: 10px;
  cursor: pointer;
  font-size: .9rem;
}
.book-list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.book-row {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .62rem 1rem;
  border-bottom: 1px dashed var(--line);
}
.book-row:last-child { border-bottom: 0; }
.book-row:hover { background: #fffdf9; }
.book-rank { flex: none; width: 2.2rem; font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.book-name { flex: 1; min-width: 0; font-size: .95rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.book-count { flex: none; font-size: .8rem; color: var(--muted); }
.book-go { flex: none; font-size: .8rem; color: var(--rc-ink); }
.book-foot { text-align: center; font-size: .8rem; margin-top: 1rem; }

/* ---- \u6536\u85cf\u9875\u5206\u7ec4 ---- */
.fav-group-title {
  margin: 1.6rem 0 .8rem;
  font-size: 1.05rem;
  display: flex;
  align-items: baseline;
  gap: .5rem;
}
.fav-group-title span { font-size: .8rem; color: var(--muted); font-weight: 400; }

/* ---- \u65b9\u5242\u5e93\u54cd\u5e94\u5f0f ---- */
@media (max-width: 1080px) {
  .fj-grid, .fj-grid-sm { grid-template-columns: repeat(2, 1fr); }
  .book-grid { grid-template-columns: repeat(2, 1fr); }
  .fj-hero { grid-template-columns: 1fr; align-items: start; }
  .fj-search { min-width: 0; width: 100%; }
  .main-nav { display: none; }
  .lib-bar {
    display: flex;
    gap: .4rem;
    overflow-x: auto;
    padding: .45rem 1.25rem .55rem;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    scrollbar-width: none;
  }
  .lib-bar::-webkit-scrollbar { display: none; }
  .lib-item {
    flex: none;
    display: inline-flex;
    align-items: baseline;
    gap: .3rem;
    font-size: .84rem;
    padding: .32rem .75rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: var(--ink-2);
    background: #fbfdfc;
  }
  .lib-item b { font-size: .74rem; color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
  .lib-item.on { background: var(--primary); border-color: var(--primary); color: #fff; }
  .lib-item.on b { color: rgba(255, 255, 255, .8); }
  .lib-item:nth-child(2).on { background: var(--rc); border-color: var(--rc); }
}

@media (max-width: 720px) {
  .lib-entry { grid-template-columns: 1fr; }
  .fj-grid, .fj-grid-sm { grid-template-columns: 1fr; }
  .book-grid { grid-template-columns: 1fr; }
  .page-title { font-size: 1.45rem; }
  .fj-detail-title h1 { font-size: 1.35rem; }
  .fj-filters { gap: .45rem; }
  .filter-row { flex-direction: column; gap: .3rem; }
  .filter-label { width: auto; }
  .filter-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .25rem; scrollbar-width: none; }
  .filter-chips::-webkit-scrollbar { display: none; }
  .filter-chips .chip { flex: none; }
  .cat-chips, .filter-chips {
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 26px), transparent);
            mask-image: linear-gradient(90deg, #000 calc(100% - 26px), transparent);
  }
  .fj-result-head { gap: .5rem; }
  .fj-result-head .sort-bar { margin-left: 0; width: 100%; }
  .fj-block { padding: .95rem 1rem; }
  .fj-block p { font-size: .95rem; line-height: 1.8; }
  .fj-nav { flex-wrap: wrap; gap: .4rem; font-size: .85rem; }
  .fj-nav a { flex: 1 1 auto; text-align: center; }
  .fj-detail-head .fj-tags { gap: .35rem; }
  .book-name { font-size: .9rem; }
  .book-go { display: none; }
  .fav-group-title { margin-top: 1.2rem; }
}

@media (max-width: 420px) {
  .fj-actions .btn-fav, .fj-actions .btn-line { flex: 1 1 45%; justify-content: center; }
  .book-chip { padding: .5rem .6rem; font-size: .82rem; }
}

/* ---- \u5242\u578b“\u66f4\u591a”\u4e0b\u62c9 ---- */
.chip-more { position: relative; display: inline-block; }
.chip-more > summary {
  list-style: none;
  cursor: pointer;
  font-size: .82rem;
  padding: .22rem .6rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--ink-2);
  background: #fff;
  white-space: nowrap;
}
.chip-more > summary::-webkit-details-marker { display: none; }
.chip-more > summary em { font-style: normal; color: var(--muted); font-size: .74rem; margin-left: .1rem; }
.chip-more[open] > summary { border-color: var(--rc); color: var(--rc-ink); background: var(--rc-soft); }
.chip-pop {
  position: absolute;
  top: calc(100% + .35rem);
  left: 0;
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  padding: .6rem;
  width: max-content;
  max-width: min(26rem, 82vw);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
}
.chip-pop .chip { font-size: .8rem; padding: .2rem .55rem; }

/* ---- \u53e4\u7c4d\u62c6\u5b57\u6ce8\u97f3（\u5982（\u6b64\u9e1f））---- */
.hz {
  font-style: normal;
  font-size: .78em;
  color: var(--muted);
  letter-spacing: -.02em;
}

/* ---------- \u6b63\u6587\u7ffb\u8bd1\u5c42（\u97e9\u6587） ---------- */
.ko-name { display: inline; }
.zh-name { font-weight: 500; color: var(--muted); font-size: .72em; margin-left: .45em; letter-spacing: 0; }
.zh-subtitle { margin: -.2rem 0 1rem; color: var(--muted); font-size: .95rem; }

.ko-orig {
  margin: .7rem 0 0;
  border-top: 1px dashed var(--line);
  padding-top: .55rem;
}
.ko-orig > summary {
  cursor: pointer;
  color: var(--primary);
  font-size: .86rem;
  font-weight: 500;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .18rem 0;
}
.ko-orig > summary::-webkit-details-marker { display: none; }
.ko-orig > summary::before {
  content: "";
  width: 0; height: 0;
  border-left: 5px solid currentColor;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  transition: transform .18s ease;
}
.ko-orig[open] > summary::before { transform: rotate(90deg); }
.ko-orig-body {
  margin-top: .5rem;
  padding: .7rem .85rem;
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  font-size: .92rem;
  line-height: 1.85;
}
.ko-orig-body .herb-list { margin: 0; }

.ko-formula { line-height: 1.95; }

.ko-pending {
  margin: .6rem 0 0;
  color: var(--accent);
  font-size: .88rem;
  line-height: 1.7;
}
.ko-pending-bar {
  margin: 1.1rem 0 0;
  padding: .7rem .95rem;
  background: #fff6ef;
  border: 1px solid #f2ddcc;
  border-radius: var(--radius-sm);
}
.ko-pending-bar .ko-pending { margin: 0; }

@media (max-width: 720px) {
  .zh-name { display: block; margin: .18rem 0 0; font-size: .62em; }
  .ko-orig-body { padding: .6rem .7rem; font-size: .88rem; }
}

/* ---------- \u65b9\u5242\u699c ---------- */
.rank-list-rc .rank-no.top-1 { color: var(--rc); }
.rank-list-rc .rank-item:hover { background: #fdfaf4; }
.rank-list-rc .rank-title { font-family: var(--font-serif, inherit); }
.rank-list-rc .tag-2 { border: 1px solid var(--rc-line); }
@media (max-width:720px) {
  .rank-list-rc .rank-stat:nth-of-type(n+2) { display: none; }
}

/* ===== \u6253\u5370\u6837\u5f0f：\u65b9\u5242/\u504f\u65b9\u8be6\u60c5\u9875 ===== */
.print-only { display: none; }

@media print {
  @page { margin: 14mm 12mm; }

  .site-header, .crumb, .article-actions, .fj-actions, .toast,
  .related, .fj-related, .side, .sidebar, .pager, .search, .search-box,
  .ko-pending-bar, .btn, .btn-line, .card-fav, .book-grid, .rank-list,
  .detail-stat, .fj-tags, .mood, .tag { display: none !important; }

  html, body { background: #fff !important; color: #000 !important; }
  body { font-size: 11.5pt; line-height: 1.75; }
  .wrap { max-width: none !important; padding: 0 !important; margin: 0 !important; }

  a { color: #000 !important; text-decoration: none !important; }
  a[href^="http"]::after { content: ""; }

  .print-only { display: block !important; }
  .print-head { font-size: 8.5pt; color: #555; border-bottom: 0.5pt solid #999; padding-bottom: 4pt; margin-bottom: 10pt; }
  .print-head b { font-size: 10pt; color: #000; font-weight: 600; }

  h1 { font-size: 19pt !important; line-height: 1.35; margin: 0 0 10pt !important; }
  h2 { font-size: 12pt !important; margin: 12pt 0 4pt !important; border-left: 3pt solid #333; padding-left: 6pt; }
  p { margin: 0 0 6pt; orphans: 3; widows: 3; }

  .ko-formula { border-left: 2pt solid #999; padding-left: 8pt; margin: 6pt 0; }
  .herb-list { display: flex !important; flex-wrap: wrap; gap: 3pt 8pt; }
  .herb { border: 0.5pt solid #bbb !important; padding: 2pt 6pt !important; border-radius: 2pt; }

  .fj-block, article, .detail-body { page-break-inside: auto; }
  .herb-list, .fj-block-effect, .fj-block-src, .print-head { page-break-inside: avoid; }
  h1, h2, h3 { page-break-after: avoid; break-after: avoid; }
  .fj-links, .link-cols { display: none !important; }
  .site-footer { background: #fff !important; color: #333 !important; border-top: 0.5pt solid #999; margin-top: 14pt; padding-top: 8pt; }
  .foot-meta { display: none !important; }
  .foot-note { font-size: 8.5pt; line-height: 1.5; }
  .foot-note .foot-title { font-size: 9pt; margin: 0 0 3pt; }
}

/* ---------- \u7ad9\u5185\u94fe\u63a5\u5e93（\u540c\u836f\u6750 / \u540c\u5178\u7c4d / \u540c\u5206\u7c7b） ---------- */
.fj-links { padding: 2.2rem 0 1rem; }
.links-title { margin: 0 0 1rem; font-size: 1.15rem; letter-spacing: -.01em; }
.link-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.1rem;
}
.link-col {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem 1.05rem;
  box-shadow: var(--shadow-sm);
}
.link-col h3 {
  margin: 0 0 .7rem;
  font-size: .92rem;
  color: var(--rc-ink);
  letter-spacing: .02em;
}
.link-list { list-style: none; margin: 0; padding: 0; }
.link-list li { border-bottom: 1px dashed var(--line); }
.link-list li:last-child { border-bottom: 0; }
.link-list a {
  display: block;
  padding: .42rem 0;
  font-size: .92rem;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.link-list a:hover { color: var(--rc-ink); text-decoration: underline; }
.link-more {
  display: inline-block;
  margin-top: .7rem;
  font-size: .82rem;
  color: var(--rc-ink);
}
.link-more:hover { text-decoration: underline; }

.herb-group { margin: 0 0 1.4rem; }
.herb-group-title {
  margin: 0 0 .6rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--muted);
  border-left: 3px solid var(--rc);
  padding-left: .55rem;
}

@media (max-width: 720px) {
  .link-cols { grid-template-columns: 1fr; }
}

@media print {
  .fj-links { display: none !important; }
}

/* ---------- 검색 결과 패널 ---------- */
html.sr-open { overflow: hidden; }
.sr-panel {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 5vh 1rem 1rem;
  background: rgba(12, 28, 24, .5);
}
.sr-panel[hidden] { display: none; }
.sr-box {
  width: min(46rem, 100%);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 24px 64px -12px rgba(16, 51, 42, .45);
  overflow: hidden;
}
.sr-head {
  display: flex;
  gap: .6rem;
  align-items: center;
  padding: .85rem .9rem;
  border-bottom: 1px solid var(--line);
}
.sr-form { flex: 1; margin: 0; }
.sr-input {
  width: 100%;
  padding: .65rem .85rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--ink);
  background: var(--bg-soft);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
}
.sr-input:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
  background: var(--surface);
}
.sr-close {
  flex: none;
  width: 2.2rem;
  height: 2.2rem;
  border: 0;
  border-radius: 50%;
  background: var(--bg-soft);
  color: var(--ink-2);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}
.sr-close:hover { background: var(--line); }
.sr-meta {
  padding: .5rem 1rem;
  font-size: .82rem;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.sr-list {
  overflow-y: auto;
  padding: .4rem .45rem .9rem;
  -webkit-overflow-scrolling: touch;
}
.sr-sec {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  padding: .75rem .7rem .3rem;
  font-size: .82rem;
  font-weight: 600;
  color: var(--primary-ink);
}
.sr-sec span { font-weight: 400; color: var(--muted); }
.sr-item {
  display: block;
  padding: .6rem .7rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--line);
}
.sr-item:last-child { border-bottom: 0; }
.sr-item:hover { background: var(--primary-soft); }
.sr-kind {
  display: inline-block;
  margin-bottom: .18rem;
  padding: .06rem .38rem;
  font-size: .7rem;
  border-radius: 4px;
  background: var(--primary-soft);
  color: var(--primary-ink);
}
.sr-item b {
  display: block;
  font-size: .98rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.45;
}
.sr-sub {
  display: block;
  margin-top: .15rem;
  font-size: .82rem;
  color: var(--ink-2);
  line-height: 1.5;
}
.sr-herb {
  display: block;
  margin-top: .2rem;
  font-size: .78rem;
  color: var(--muted);
}
.sr-empty {
  padding: 2rem .6rem;
  text-align: center;
  color: var(--muted);
  font-size: .9rem;
}

@media (max-width: 720px) {
  .sr-panel { padding: 0; }
  .sr-box {
    width: 100%;
    height: 100%;
    max-height: 100vh;
    border-radius: 0;
  }
}

@media print {
  .sr-panel { display: none !important; }
}
/* 결과 목록 제목 (h1 대체, 두 번째 제목) */
.result-title{font-size:19pt;font-weight:700;margin:0 0 10pt;line-height:1.35}

/* 즐겨찾기 페이지: 카드 그리드를 감싸는 컨테이너 */
.fav-list{display:block}
.fav-list > .rx-grid,.fav-list > .fj-grid{margin-top:.2rem}
.fav-list .fav-group-title:first-child{margin-top:.8rem}