:root {
  color-scheme: light;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
  color: #202b24;
  background: #f8f4eb;
  --muted: #59685f;
  --line: #e6d9c3;
  --rust: #934713;
  --sage: #e3ece4;
  --sand: #f1e9d9;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
button, input, select { font: inherit; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: default; opacity: .45; }
button:focus-visible, summary:focus-visible, select:focus-visible { outline: 2px solid #4d745a; outline-offset: 3px; }
[hidden] { display: none !important; }
p, h1, h2, dl, dd { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.shell {
  max-width: 1160px;
  margin-inline: auto;
  padding: clamp(26px, 5vw, 62px) max(20px, env(safe-area-inset-right)) 36px max(20px, env(safe-area-inset-left));
}
.eyebrow {
  color: var(--rust); font-size: .73rem; font-weight: 750; letter-spacing: .17em;
  display: flex; align-items: center; gap: 9px;
}
.eyebrow::before { content: ""; width: 18px; height: 1px; background: #c48353; }
h1 { margin-top: 15px; font-size: clamp(1.73rem, 4.35vw, 3.25rem); line-height: 1.21; letter-spacing: -.045em; }
.title-topic { color: #000; white-space: nowrap; }
.title-topic b { color: var(--rust); font-weight: inherit; }
.intro { color: var(--muted); margin: 10px 0 21px; line-height: 1.65; font-size: .94rem; }
.search-box {
  display: flex; align-items: center; gap: 13px; max-width: 720px; min-height: 54px;
  background: #fffefa; border: 1px solid var(--line); border-radius: 16px;
  padding: 5px 10px 5px 17px; box-shadow: 0 5px 12px #49311012;
}
.search-box:focus-within { border-color: #678773; box-shadow: 0 0 0 2px #6c907326; }
.search-icon { position: relative; border: 2px solid #89978b; border-radius: 50%; width: 13px; height: 13px; flex: none; }
.search-icon::after { content: ""; position: absolute; width: 6px; height: 2px; left: 8px; top: 9px; background: #89978b; transform: rotate(45deg); }
#query { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: inherit; padding: 8px 0; font-size: 1rem; }
#query::placeholder { color: #65746b; }
#query::-webkit-search-cancel-button { appearance: none; }
.clear { border: 0; width: 40px; height: 40px; border-radius: 50%; background: var(--sand); font-size: 1.35rem; }
.examples { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; margin-top: 8px; font-size: .82rem; color: var(--muted); }
.examples button { border: 0; padding: 8px 0; color: #365849; background: none; text-decoration: underline dotted; text-underline-offset: 4px; }
.results { margin-top: 16px; }
.categories { display: flex; gap: 7px; overflow-x: auto; padding: 4px 4px 7px; margin-inline: -4px; scrollbar-width: thin; }
.categories button { flex: none; border: 1px solid var(--line); border-radius: 100px; background: #fefcf7; padding: 6px 12px; min-height: 38px; font-size: .84rem; }
.categories button[aria-pressed="true"] { color: #fffaf0; background: #202b24; border-color: #202b24; }
.categories button span { opacity: .8; margin-left: 5px; }
.result-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; margin: 13px 0 12px; }
.result-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; min-width: 0; max-width: 100%; }
.kind-filter { position: relative; font-size: .78rem; max-width: 100%; }
.kind-filter::after {
  content: ""; position: absolute; inset-inline-end: 12px; top: calc(50% - 4px);
  width: 6px; height: 6px; border: solid var(--muted); border-width: 0 1px 1px 0;
  transform: rotate(45deg); pointer-events: none;
}
.kind-filter select {
  appearance: none; cursor: pointer; min-height: 39px; max-width: 100%;
  padding: 7px 25px 7px 11px; border: 1px solid var(--line); border-radius: 12px;
  background: #fefcf7; color: #202b24;
}
.kind-filter select:has(option:checked:not([value=""])) { background: var(--sage); }
#count { color: var(--muted); min-width: 0; overflow-wrap: anywhere; font-size: .86rem; }
#count strong { color: #202b24; }
.sort { display: flex; background: var(--sand); border-radius: 12px; padding: 3px; }
.sort button { border: 0; border-radius: 9px; background: transparent; padding: 6px 10px; white-space: nowrap; color: var(--muted); font-size: .78rem; min-height: 33px; }
.sort button[aria-pressed="true"] { background: #fffefa; color: #202b24; box-shadow: 0 1px 5px #4931101c; }
.cards { display: grid; gap: 11px; grid-template-columns: minmax(0, 1fr); }
.card { min-width: 0; background: #fffefa; border: 1px solid var(--line); border-radius: 19px; padding: clamp(15px, 2vw, 22px); }
.card-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 14px; }
.name { min-width: 0; overflow-wrap: anywhere; font-size: clamp(1.08rem, 2vw, 1.3rem); line-height: 1.4; }
.threshold { flex: none; max-width: 42%; color: var(--rust); text-align: right; overflow-wrap: anywhere; font-weight: 750; font-variant-numeric: tabular-nums; }
.threshold small { display: block; color: var(--muted); font-size: .68rem; font-weight: 500; }
.threshold.missing { color: var(--muted); font-size: .83rem; font-weight: 500; }
.english { margin-top: 3px; color: var(--muted); font-size: .89rem; line-height: 1.45; overflow-wrap: anywhere; }
.alternate-name::before { content: " · 又名 "; }
.tags { display: flex; flex-wrap: wrap; gap: 5px 2px; margin: 11px 0; }
.aroma-item { display: inline-flex; align-items: baseline; min-width: 0; max-width: 100%; }
.aroma-separator { color: var(--muted); font-size: .78rem; flex: none; }
.tag { background: var(--sage); color: #315447; padding: 3px 7px; border-radius: 7px; font-size: .78rem; line-height: 1.45; overflow-wrap: anywhere; }
mark { background: #ffe2a1; color: inherit; border-radius: 2px; }
.card-meta { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; padding-top: 9px; border-top: 1px dashed var(--line); color: var(--muted); font-size: .78rem; }
.identifiers { display: flex; flex-wrap: wrap; gap: 4px 14px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.identifier-label { color: #365849; font-weight: 650; }
.formula sub { font-size: .75em; line-height: 0; vertical-align: sub; }
.kind { color: #365849; }
.off-notes {
  margin-top: 10px; padding: 8px 10px; border-left: 2px solid #bc825d;
  border-radius: 4px 9px 9px 4px; background: #faf0e5; color: #783e24;
  font-size: .78rem; line-height: 1.6; overflow-wrap: anywhere;
}
.off-heading { font-weight: 750; }
.off-notes ul { margin: 2px 0 0; padding-inline-start: 14px; }
.off-notes li + li { margin-top: 3px; }
.off-notes a { color: inherit; text-underline-offset: 2px; white-space: nowrap; }
details { margin-top: 5px; font-size: .82rem; }
summary { width: fit-content; color: #365849; padding: 5px 0; cursor: pointer; }
.facts { display: grid; grid-template-columns: minmax(0, 44%) minmax(0, 1fr); gap: 6px 10px; padding-top: 5px; line-height: 1.55; }
.facts dt, .facts dd { overflow-wrap: anywhere; }
.facts dt { color: var(--muted); }
.empty { grid-column: 1/-1; text-align: center; padding: 28px 15px; }
.empty button { margin-top: 9px; border: 1px solid var(--line); background: var(--sand); border-radius: 9px; padding: 6px 12px; }
.pages { display: flex; align-items: center; justify-content: center; gap: 13px; padding-top: 18px; font-size: .84rem; }
.pages button { background: #fffefa; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
@media (max-width: 360px) {
  .kind-filter select { width: 130px; padding-inline: 8px 21px; }
  .sort button { padding-inline: 7px; }
}
@media (min-width: 650px), (min-width: 560px) and (orientation: landscape) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; align-items: start; }
}
@media (min-width: 760px) {
  .narrow-break { display: none; }
  .categories { flex-wrap: wrap; }
  .results { margin-top: 21px; }
}
@media (orientation: landscape) and (max-height: 500px) {
  .shell { padding-top: 17px; }
  h1 { font-size: clamp(1.5rem, 3.65vw, 2.35rem); margin-top: 7px; }
  .narrow-break { display: none; }
  .intro { margin: 5px 0 10px; }
  .search-box { min-height: 43px; padding-block: 2px; }
  .results { margin-top: 4px; }
}
@media (min-width: 560px) and (orientation: landscape) and (max-height: 500px) {
  .hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 20px; }
  .hero > :is(.eyebrow, h1, .intro) { grid-column: 1; }
  .hero .search-box { grid-area: 2 / 2; align-self: center; }
  .examples { grid-area: 3 / 2; align-self: start; margin-top: 0; }
  .result-bar { margin-top: 7px; }
}
