:root {
  color-scheme: light;
  --paper: #f7f2e8;
  --white: #fffdf8;
  --panel: #f1e7d2;
  --ink: #2b2623;
  --body: #4b4038;
  --muted: #665b50;
  --red: #a33b28;
  --accent: #c94b32;
  --gold: #d4b06a;
  --line: #ddd2bf;
  --title: "Noto Serif CJK SC", "Songti SC", SimSun, serif;
  --sans: "Noto Sans CJK SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font: 16px/1.75 var(--sans);
  background: var(--paper);
  color: var(--body);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
body:has(dialog[open]) { overflow: hidden; }
h1, h2, h3, p, dl { margin: 0; }
h1, h2, h3 { color: var(--ink); line-height: 1.35; }
h1, h2 { font-family: var(--title); }
h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); letter-spacing: .025em; }
h2 { font-size: clamp(1.22rem, 2.3vw, 1.7rem); }
h3 { font-size: 1.08rem; }
a { color: var(--red); text-underline-offset: .23em; }
a, button, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
a:hover { color: #742519; }
:focus-visible { outline: 3px solid #9b5125; outline-offset: 3px; }
button, input, select, textarea { font: inherit; }
button, .button { border: 1px solid var(--red); background: var(--red); color: white; border-radius: 6px; min-height: 44px; padding: .48rem .9rem; cursor: pointer; }
button:hover, .button:hover { background: #742519; color: white; }
button:disabled { opacity: .55; cursor: default; }
button[aria-pressed="true"] { background: var(--panel); color: var(--ink); border-color: var(--line); }
.button { display: inline-flex; align-items: center; text-decoration: none; }
input:not([type=checkbox]), select, textarea { padding: .56rem .7rem; min-width: 0; min-height: 44px; border: 1px solid #aa9d89; border-radius: 6px; background: var(--white); color: var(--ink); }
textarea { resize: vertical; }
summary { min-height: 44px; padding: .5rem 0; cursor: pointer; }
p, dd, li { overflow-wrap: anywhere; }
.shell { width: min(100% - 56px, 1200px); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; z-index: 8; inset: .25rem auto auto .25rem; background: var(--white); padding: .55rem; transform: translateY(-200%); }
.skip:focus { transform: none; }
.emoji { display: inline-block; font: inherit; font-size: .88em; margin-inline-end: .36em; }
.site-head { background: var(--white); border-bottom: 1px solid var(--line); }
.head-row { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: clamp(.4rem,1.2vw,1.5rem); }
.brand { display: inline-flex; align-items: center; min-height: 44px; gap: .55rem; white-space: nowrap; color: var(--ink); font: 700 clamp(.86rem,1.65vw,1.22rem)/1.3 var(--title); text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 38px; color: white; background: var(--red); border: 2px solid #bd6b4e; border-radius: 5px; font-size: 1.18rem; }
.primary, .tools, .secondary { display: flex; align-items: center; gap: .28rem; }
.primary a, .secondary a, .tool { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; color: var(--ink); text-decoration: none; padding: .4rem .55rem; border-radius: 5px; white-space: nowrap; font-size: .9rem; }
.primary a:hover, .secondary a:hover, .tools a:hover, .menu-list a:hover { background: var(--panel); color: var(--red); }
a[aria-current=page] { font-weight: 700; }
.primary a[aria-current], .bottom a[aria-current], .menu-list a[aria-current] { background: #f4e4d9; color: var(--red); }
.secondary { border-top: 1px solid var(--line); flex-wrap: wrap; padding-block: .15rem; }
.secondary a { color: var(--muted); }
.tool { background: transparent; border: 1px solid var(--line); }
.tool:hover { background: var(--panel); color: var(--red); }
.mobile-menu, .bottom { display: none; }
.main { padding-block: 2.25rem 4rem; min-height: 65vh; }
.crumb { display: flex; flex-wrap: wrap; gap: .42rem; align-items: center; color: var(--muted); margin-bottom: 1rem; font-size: .88rem; }
.crumb a { line-height: 44px; }
.hero { border: 1px solid var(--line); background: var(--panel); border-radius: 12px; padding: clamp(1.1rem, 4vw, 3rem); margin-block-end: 2rem; min-width: 0; }
.hero p { max-width: 48rem; margin: .7rem 0 1rem; font-size: 1.03rem; }
.home-hero { background: linear-gradient(112deg, #f4e6ce 0%, #f1e6cf 60%, #e7d0a0 100%); border-top: 4px solid var(--accent); }
.home-hero h1 { font-size: clamp(2rem, 5.5vw, 3.6rem); }
.home-hero .hero-copy { min-width: 0; }
.search-form { display: flex; gap: .55rem; max-width: 44rem; margin-block: .8rem 1rem; }
.search-form input { flex: 1; }
.with-image, .picture-panel.with-image { display: grid; gap: 24px; align-items: center; }
.channel.with-image { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.home-hero.with-image { grid-template-columns: minmax(0, 56fr) minmax(0, 44fr); }
.picture-panel.with-image { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.picture-panel.with-image.image-left { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
.image-left .picture { grid-column: 1; grid-row: 1; }
.image-left .panel-text { grid-column: 2; grid-row: 1; }
.picture { display: block; width: 100%; height: auto; object-fit: cover; aspect-ratio: 16/9; border-radius: 8px; min-width: 0; }
.picture-category, .picture-authors { aspect-ratio: 4/3; }
.picture-index { max-width: 560px; }
.picture-panel .picture-category { max-width: 340px; }
.picture-logo { width: 155px; height: 46px; object-fit: contain; border-radius: 0; }
.band { padding-block: 1.4rem; margin-block: .35rem 1.4rem; scroll-margin-top: 1rem; }
.band h2 { margin-bottom: .86rem; }
.band h3 { margin-bottom: .38rem; }
.band p + p { margin-top: .65rem; }
.ruled { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.accent { background: var(--panel); padding: 1.45rem clamp(1rem,3vw,2rem); border-radius: 8px; }
.dark { background: var(--ink); color: #f2e6d4; padding: clamp(1rem,3vw,2.2rem); border-radius: 8px; }
.dark :is(h1,h2,h3,a,.card-meta) { color: #ffebc6; }
.dark .chip { border-color: #8d755c; background: #43362d; }
.dark .chip:hover { background: #554131; }
.prose { max-width: 74ch; }
.chips, .actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .7rem; margin-block: .8rem .2rem; }
.chip { display: inline-flex; align-items: center; min-height: 44px; border: 1px solid var(--line); background: var(--white); border-radius: 6px; padding: .3rem .75rem; color: var(--ink); text-decoration: none; }
.chip:hover { background: #eedebc; color: var(--red); }
.actions a:not(.chip) { display: inline-flex; align-items: center; min-height: 44px; }
.quick-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: .6rem; }
.quick-grid a { border-top: 2px solid var(--gold); padding: .7rem .65rem; text-decoration: none; color: var(--ink); background: var(--white); }
.quick-grid a:hover { background: var(--panel); }
.quick-grid small { display: block; color: var(--muted); line-height: 1.45; }
.feature-layout { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(0,1fr); gap: 24px; }
.lead-card { background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--red); padding: clamp(1rem,3vw,1.8rem); border-radius: 8px; }
.lead-card h3 { font: 700 1.5rem/1.35 var(--title); }
.lead-card .button { margin-top: .8rem; }
.feature-side article { border-bottom: 1px solid var(--line); padding: .8rem .1rem; }
.genre-sample, .matrix { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .9rem 1.35rem; }
.genre-sample dd { margin: .25rem 0; }
.genre-sample dt { font-weight: 700; }
.matrix { grid-template-columns: repeat(4,minmax(0,1fr)); margin-block: 1rem; }
.matrix article { padding: .7rem 0; border-top: 1px solid var(--line); }
.book-grid, .list-grid, .topic-grid, .author-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; }
.topic-grid, .author-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.book-card, .topic-card, .author-grid article { background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 1rem; }
.book-card { border-top: 3px solid var(--gold); }
.topic-card { border-left: 3px solid var(--accent); }
.reading-list { background: #fffbf4; border: 1px solid var(--line); border-radius: 8px; padding: 1rem; scroll-margin-top: 1rem; }
.reading-list ol { padding-inline-start: 1.5rem; }
.card-meta, .byline { font-size: .82rem; color: var(--muted); }
.card-meta { margin-bottom: .45rem; }
.byline { margin-bottom: .6rem; }
.editor-columns, .comparison { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem 1.5rem; }
.comparison article + article { border-inline-start: 1px solid #cabba0; padding-inline-start: 1.25rem; }
.timeline { margin: .9rem 0 0; padding-inline-start: 2rem; }
.timeline li { border-left: 2px solid var(--gold); padding: 0 0 1rem 1rem; }
.timeline li:last-child { padding-bottom: .3rem; }
.timeline li::marker { font-weight: 700; color: var(--red); }
.state-table { border-block: 1px solid var(--line); }
.state-table div, .facts div { display: grid; grid-template-columns: minmax(6rem,.2fr) minmax(0,1fr); gap: 1rem; padding: .55rem .25rem; }
.state-table div + div, .facts div + div { border-top: 1px solid var(--line); }
.state-table dt, .facts dt { font-weight: 700; color: var(--ink); }
.state-table dd, .facts dd { margin: 0; }
.facts { max-width: 42rem; }
.article-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(190px,25%); gap: 28px; align-items: start; }
.article { background: var(--white); padding: .1rem clamp(.7rem,2.5vw,1.7rem); border: 1px solid var(--line); border-radius: 8px; }
.article .band { border-bottom: 1px solid var(--line); }
.article .band:last-child { border-bottom: 0; }
.article .book-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.toc { position: sticky; top: 1.25rem; background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 1rem; }
.toc .chips { display: grid; }
.filter-panel { border: 1px solid var(--line); background: var(--white); border-radius: 8px; padding: 1rem; }
.filter-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 1rem; align-items: start; }
.filter-grid details { border-bottom: 1px solid var(--line); }
.filter-grid fieldset { border: 0; margin: 0; min-width: 0; padding: 0 0 .6rem; }
.checks { display: flex; flex-wrap: wrap; gap: .25rem .6rem; }
.checks label { display: inline-flex; align-items: center; gap: .25rem; min-height: 44px; cursor: pointer; }
.checks input { accent-color: var(--red); width: 1.05rem; height: 1.05rem; }
.result-count { margin-bottom: 1rem; }
.record-list article { background: var(--white); border-bottom: 1px solid var(--line); padding: 1rem; }
.record-list dl { display: flex; flex-wrap: wrap; gap: .5rem 1.1rem; margin-block: .25rem .45rem; }
.record-list dl div { display: flex; gap: .4rem; }
.record-list dt { color: var(--muted); }
.record-list dd { margin: 0; }
.faq { background: var(--white); padding: .3rem 1rem; border: 1px solid var(--line); border-radius: 7px; margin-block: .55rem; }
.faq p { padding-bottom: .65rem; max-width: 74ch; }
.correction { display: grid; gap: .8rem; max-width: 48rem; }
.correction label:not([hidden]) { display: grid; }
.site-foot { background: var(--ink); color: #f4ebdd; padding: 2.3rem 0; }
.foot-grid { display: grid; grid-template-columns: repeat(3,1fr) minmax(0,1.4fr); gap: 1.4rem; }
.foot-grid h2 { font-size: 1.05rem; color: #ffebc6; margin: 0 0 .5rem; }
.foot-grid a { display: flex; align-items: center; min-height: 44px; color: #f4ebdd; }
dialog { border: 1px solid var(--line); background: var(--paper); color: var(--body); padding: 0; border-radius: 11px; width: min(100% - 24px, 520px); max-height: min(90dvh, 50rem); overflow: auto; }
dialog::backdrop { background: rgb(20 15 12 / .55); }
.dialog-inner { padding: 1rem 1.2rem 1.4rem; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: .7rem; margin-bottom: .7rem; }
.menu-list { display: grid; gap: .2rem; }
.menu-row { border-block-end: 1px solid var(--line); }
.menu-list > a, .menu-row > a { display: flex; align-items: center; min-height: 44px; padding-inline: .45rem; color: var(--ink); text-decoration: none; }
.menu-row details { padding-inline: .5rem; }
.menu-row details .chips { margin-top: 0; }
#saved-items article, #personal-items article { border-bottom: 1px solid #cabba0; padding: .8rem 0; }
#personal-items label { display: grid; max-width: 40rem; margin-top: .5rem; }
.storage-message { margin-block: .6rem; }
@media (max-width: 1050px) {
  .primary .emoji { display: none; }
  .primary a { padding-inline: .38rem; }
  .matrix { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .quick-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 850px) {
  .shell { width: min(100% - 32px,1200px); }
  .primary, .secondary, .desktop-save { display: none; }
  .mobile-menu { display: inline-flex; }
  .head-row { min-height: 62px; }
  .bottom { position: fixed; z-index: 3; inset: auto 0 0; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); background: var(--white); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .bottom :is(a,button) { min-height: 58px; display: grid; place-content: center; gap: .15rem; text-align: center; text-decoration: none; background: transparent; color: var(--ink); border: 0; border-radius: 0; padding: 0 .16rem; font-size: .79rem; }
  .bottom .emoji { margin: 0; font-size: 1em; }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .main { padding-block: 1.25rem 2.4rem; }
  .picture-logo { width: 125px; height: 36px; }
  #add-to-list select { max-width: min(100%, 25rem); }
}
@media (max-width: 640px) {
  .shell { width: calc(100% - 24px); }
  .head-row { gap: .35rem; }
  .brand { gap: .32rem; }
  .brand-mark { width: 27px; height: 31px; }
  .tool { padding-inline: .4rem; font-size: .84rem; }
  .with-image, .picture-panel.with-image, .picture-panel.with-image.image-left, .channel.with-image, .home-hero.with-image { grid-template-columns: minmax(0,1fr); gap: 14px; }
  .image-left .picture, .image-left .panel-text { grid-column: auto; grid-row: auto; }
  .feature-layout, .article-layout, .filter-grid, .topic-grid, .list-grid, .author-grid, .book-grid, .article .book-grid { grid-template-columns: minmax(0,1fr); gap: .7rem; }
  .matrix, .quick-grid, .foot-grid, .genre-sample { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .65rem; }
  .editor-columns, .comparison { grid-template-columns: minmax(0,1fr); gap: .75rem; }
  .comparison article + article { border-inline-start: 0; padding-inline-start: 0; border-top: 1px solid var(--line); padding-top: .65rem; }
  .toc { position: static; grid-row: 1; }
  .toc .chips { display: flex; }
  .hero { margin-block-end: 1.15rem; }
  .band { margin-block-end: .65rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
.desktop-dropdown { position: relative; }
.desktop-dropdown summary { list-style: none; }
.desktop-dropdown summary::-webkit-details-marker { display: none; }
.dropdown-panel { position: absolute; z-index: 5; top: calc(100% + .35rem); inset-inline-end: 0; width: 13rem; background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: .6rem; box-shadow: 0 8px 24px rgb(43 38 35 / .15); }
.dropdown-panel button { display: block; margin-inline-start: auto; }
.dropdown-panel a { display: flex; align-items: center; padding: .35rem .55rem; min-height: 44px; }
@media (max-width: 850px) { .desktop-dropdown { display: none; } }
