:root {
  color-scheme: light;
  --bg: #f6f2ec;
  --surface: #fffdf9;
  --surface-2: #efe9e0;
  --border: #e5ddd1;
  --border-strong: #d0c4b3;
  --ink: #241d17;
  --muted: #6e6156;
  --subtle: #716459;
  --accent: #9a4d24;
  --accent-soft: #f7ebe1;
  --accent-border: #e6c7b0;
  --bd-ink: #175c6e;
  --bd-bg: #dceff4;
  --bd-border: #b3dce6;
  --done-ink: #2f6430;
  --done-bg: #e3f0de;
  --done-border: #c1dfb8;
  --update-ink: #66512b;
  --update-bg: #f2ebd6;
  --update-border: #e0d4ae;
  --sync-ink: #2c528c;
  --sync-bg: #e3ecfa;
  --sync-border: #c1d4f2;
  --ongoing-ink: #92540c;
  --ongoing-bg: #fbf0d5;
  --ongoing-border: #ebd198;
  --plan-ink: #63517b;
  --plan-bg: #eee8f3;
  --plan-border: #dacce6;
  --dead-ink: #635751;
  --dead-bg: #eee9e4;
  --dead-border: #dcd1c8;
  --hit-bg: #fae6a3;
  --float-shadow: 0 .55rem 1.65rem #583a292e;
  --toolbar-shadow: 0 .35rem .65rem -.38rem #583a2966;
  --radius-sm: .35rem;
  --radius-md: .5rem;
  --radius-pill: 999px;
  --sidebar: 17.5rem;
  --page-max: 86rem;
  --outer-gutter: clamp(1rem, 2.2vw, 2rem);
  --shell-gap: clamp(1rem, 1.6vw, 1.35rem);
  --gutter: clamp(1.25rem, 2.8vw, 3rem);
  --sticky-offset: .4rem;
  --entry-columns: minmax(0, 1fr) 4.25rem 10.5rem 9.25rem 4.25rem;
  font: 100%/1.45 system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  accent-color: var(--accent);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #14110f;
  --surface: #1c1815;
  --surface-2: #26201c;
  --border: #312923;
  --border-strong: #463a31;
  --ink: #f4ede6;
  --muted: #ada094;
  --subtle: #9f9286;
  --accent: #e39c68;
  --accent-soft: #2f2218;
  --accent-border: #5c3e27;
  --bd-ink: #8cd8ea;
  --bd-bg: #1b363f;
  --bd-border: #2c5766;
  --done-ink: #a6da99;
  --done-bg: #233822;
  --done-border: #385936;
  --update-ink: #dfc48f;
  --update-bg: #3b3323;
  --update-border: #594a2d;
  --sync-ink: #9fc4f6;
  --sync-bg: #203149;
  --sync-border: #344f75;
  --ongoing-ink: #f3c677;
  --ongoing-bg: #3f311b;
  --ongoing-border: #634c28;
  --plan-ink: #cdb6e5;
  --plan-bg: #352c3c;
  --plan-border: #554360;
  --dead-ink: #c7b8b0;
  --dead-bg: #37302d;
  --dead-border: #534743;
  --hit-bg: #624a1f;
  --float-shadow: 0 .6rem 1.8rem #07040399;
  --toolbar-shadow: 0 .35rem .65rem -.38rem #070403c9;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #14110f;
    --surface: #1c1815;
    --surface-2: #26201c;
    --border: #312923;
    --border-strong: #463a31;
    --ink: #f4ede6;
    --muted: #ada094;
    --subtle: #9f9286;
    --accent: #e39c68;
    --accent-soft: #2f2218;
    --accent-border: #5c3e27;
    --bd-ink: #8cd8ea;
    --bd-bg: #1b363f;
    --bd-border: #2c5766;
    --done-ink: #a6da99;
    --done-bg: #233822;
    --done-border: #385936;
    --update-ink: #dfc48f;
    --update-bg: #3b3323;
    --update-border: #594a2d;
    --sync-ink: #9fc4f6;
    --sync-bg: #203149;
    --sync-border: #344f75;
    --ongoing-ink: #f3c677;
    --ongoing-bg: #3f311b;
    --ongoing-border: #634c28;
    --plan-ink: #cdb6e5;
    --plan-bg: #352c3c;
    --plan-border: #554360;
    --dead-ink: #c7b8b0;
    --dead-bg: #37302d;
    --dead-border: #534743;
    --hit-bg: #624a1f;
    --float-shadow: 0 .6rem 1.8rem #07040399;
    --toolbar-shadow: 0 .35rem .65rem -.38rem #070403c9;
  }
}
html:lang(zh-Hans) { font-family: system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif; }
html:lang(zh-Hant) { font-family: system-ui, -apple-system, "PingFang TC", "Microsoft JhengHei UI", "Microsoft JhengHei", "Noto Sans CJK TC", sans-serif; }
[lang="ja"] { font-family: "Hiragino Kaku Gothic ProN", "BIZ UDPGothic", "Meiryo", "Yu Gothic Medium", "Yu Gothic", "Noto Sans CJK JP", sans-serif; }
*, *::before, *::after { box-sizing: border-box; }
html { scrollbar-gutter: stable; }
body { margin: 0; }
a { color: var(--accent); text-underline-offset: .2em; }
button, input { font: inherit; border-radius: var(--radius-sm); }
button { color: inherit; cursor: pointer; background: transparent; border: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden], dialog:not([open]), html:not(.enhanced) .js-only, html[lang="zh-Hant"] .sc, html:not([lang="zh-Hant"]) .tc { display: none !important; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; inset: .5rem auto auto .5rem; z-index: 10; padding: .5rem; background: var(--surface); }
h1, h2, h3, p { margin: 0; }
.mobile-head, .close-drawer { display: none; }

.shell {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  align-items: start;
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--outer-gutter);
}
.sidebar {
  position: sticky;
  top: 0;
  width: var(--sidebar);
  height: 100vh;
  height: 100dvh;
  padding: .95rem var(--shell-gap) 1rem .3rem;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  border-right: 1px solid var(--border);
  background: transparent;
}
.brand { display: flex; align-items: center; gap: .65rem; }
.sidebar-brand { margin-bottom: .75rem; line-height: 1.35; }
.brand-mark { display: grid; place-items: center; flex: none; width: 2.4rem; height: 2.4rem; border-radius: .7rem .7rem .7rem .25rem; color: var(--surface); background: var(--ink); }
.brand-mark svg { width: 1.55rem; height: 1.55rem; }
.brand-name { font-size: 1.13rem; font-weight: 700; letter-spacing: .025em; }
.brand-name small { display: block; color: var(--muted); font-size: .68rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.search-box { display: flex; position: relative; align-items: center; min-width: 0; }
.search-box svg, .search-box kbd { position: absolute; pointer-events: none; color: var(--muted); }
.search-box svg { left: .7rem; width: 1rem; height: 1rem; }
.search-box kbd { right: .55rem; padding: 0 .26rem; border: 1px solid var(--border); border-radius: var(--radius-sm); font: .72rem/1.1rem monospace; }
.search-box:focus-within kbd { display: none; }
.search-box input:not(:placeholder-shown) + kbd { display: none; }
.search-box input { width: 100%; height: 2.25rem; padding: .35rem 1.65rem .35rem 2.05rem; border: 1px solid var(--border-strong); color: var(--ink); background: var(--bg); font-size: .85rem; }
.sidebar-search .search-box input { background: var(--surface); }
.search-box input::placeholder { color: var(--muted); opacity: 1; }
.filter-panel, .group-nav { margin-top: .65rem; padding-top: .7rem; border-top: 1px solid var(--border); }
.drawer-summary { display: none; }
.sidebar h2 { margin-bottom: .5rem; color: var(--muted); font-size: .75rem; letter-spacing: .06em; }
.segment { display: inline-flex; align-items: stretch; padding: 2px; gap: 1px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-2); }
.segment button { flex: 1 0 auto; min-height: 1.5rem; padding: .12rem .45rem; color: var(--muted); font-size: .76rem; line-height: 1.25; white-space: nowrap; }
.segment button:hover { color: var(--ink); }
.segment button[aria-pressed="true"] { color: var(--accent); background: var(--surface); box-shadow: 0 0 0 1px var(--border-strong); font-weight: 600; }
.filter-panel .segment { display: flex; width: 100%; }
.filter-panel [data-control="group"] button { padding-inline: .15rem; font-size: .73rem; }
.status-toggle { display: inline-flex; align-items: center; gap: .28rem; margin-top: .26rem; padding: .12rem .28rem; color: var(--muted); font-size: .73rem; }
.status-toggle:hover { color: var(--accent); background: var(--accent-soft); }
.status-toggle[aria-expanded="true"] > span:last-child { transform: rotate(180deg); }
.fine-options { display: flex; flex-wrap: wrap; gap: .26rem; margin-top: .4rem; }
.fine-options button, .chip { padding: .16rem .4rem; border: 1px solid var(--border); color: var(--muted); font-size: .73rem; line-height: 1.35; }
.facet-options { display: grid; gap: .3rem; margin-top: .5rem; }
.nav-family + .nav-family { margin-top: .56rem; }
.nav-family h3 { margin-bottom: .19rem; font-size: .84rem; }
.nav-link { display: flex; align-items: center; justify-content: space-between; gap: .2rem; min-height: 1.58rem; padding: .1rem .42rem; border: 1px solid transparent; border-radius: var(--radius-sm); color: var(--muted); font-size: .81rem; text-decoration: none; }
.nav-link small { font-size: .65rem; font-variant-numeric: tabular-nums; }
.nav-link:not(:where([aria-disabled="true"])):hover { background: var(--surface-2); }
.nav-link[aria-disabled="true"] { opacity: .52; cursor: default; }
.year-links { display: grid; grid-template-columns: 2.2rem 1.15fr repeat(3, 1fr); align-items: center; gap: .15rem; padding-block: .1rem; }
.year-links strong { color: var(--muted); font-size: .74rem; font-variant-numeric: tabular-nums; }
.year-links .nav-link { justify-content: center; gap: .16rem; padding-inline: .1rem; border-color: var(--border); font-size: .73rem; white-space: nowrap; }
.year-links small { display: inline-grid; place-items: center; min-width: 1.12rem; height: 1.12rem; padding-inline: .14rem; border: 1px solid transparent; border-radius: var(--radius-pill); color: var(--muted); background: var(--surface-2); font-size: .65rem; line-height: 1; }
:where(.year-links) .nav-link:not(:where([aria-disabled="true"])):hover, .fine-options button:hover { border-color: var(--border-strong); background: var(--surface); }
.nav-link[aria-current="location"], .fine-options button[aria-pressed="true"], .chip { border-color: var(--accent-border); color: var(--accent); background: var(--accent-soft); }
.nav-link[aria-current="location"] { font-weight: 600; }
.year-links .nav-link[aria-current="location"] small { border-color: var(--accent-border); color: var(--accent); background: var(--surface); }

main { min-width: 0; min-height: 100vh; padding: .95rem 0 0 var(--shell-gap); }
.masthead { display: flex; align-items: center; justify-content: space-between; min-height: 2.4rem; gap: .55rem; margin-bottom: .5rem; }
h1 { font-size: clamp(1.32rem, 2vw, 1.8rem); font-weight: 700; line-height: 1.15; }
.quick-links { display: flex; align-items: center; gap: .35rem; }
.quick-links a, .guide-launch a { display: inline-flex; align-items: center; padding: .24rem .44rem; border: 1px solid transparent; border-radius: var(--radius-sm); color: var(--muted); font-size: .78rem; text-decoration: none; white-space: nowrap; }
.quick-links .storage-link { border-color: var(--accent-border); color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.quick-links a:not(.storage-link) { border-color: var(--border); }
.quick-links a:hover, .guide-launch a:hover { border-color: var(--accent-border); color: var(--accent); background: var(--surface); }
.toolbar { display: flex; align-items: center; min-height: 2.75rem; gap: .65rem; border-block: 1px solid var(--border); border-block-end-color: var(--border-strong); background: var(--bg); }
.enhanced .toolbar { position: sticky; z-index: 2; top: 0; }
.toolbar.stuck { box-shadow: var(--toolbar-shadow); }
.results { flex: none; color: var(--muted); font-size: .8rem; }
.results b { color: var(--ink); font-size: 1rem; font-variant-numeric: tabular-nums; }
.preferences { display: flex; flex: none; align-items: center; gap: .4rem; margin-left: auto; }
.active-filters { display: flex; min-width: 0; gap: .3rem; overflow-x: auto; scrollbar-width: thin; }
/* Reserve room for focus outlines without shifting the chips. */
.active-filters:not(:empty) { padding: .25rem; margin: -.25rem; }
.chip { flex: none; max-width: 15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reset { flex: none; padding: .2rem; color: var(--accent); font-size: .76rem; text-decoration: underline; text-underline-offset: .2em; }
.family { padding-top: 1.05rem; }
.family > h2 { display: flex; align-items: center; gap: .7rem; font-size: 1.08rem; letter-spacing: .025em; }
.family > h2::after { content: ""; flex: 1; border-top: 1px solid var(--border-strong); }
.catalog-group { scroll-margin-top: var(--sticky-offset); }
.group-heading, .entry { display: grid; grid-template-columns: var(--entry-columns); align-items: center; gap: .6rem; }
.group-heading { min-height: 2.05rem; padding-inline: calc(.8rem + 1px); }
.group-title { display: flex; align-items: center; gap: .55rem; }
.group-heading h3 { border-radius: var(--radius-sm); color: var(--muted); font-size: .88rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.group-count { display: inline-grid; place-items: center; min-width: 1.2rem; padding: .02rem .32rem; border: 1px solid var(--border); border-radius: var(--radius-pill); color: var(--muted); background: var(--surface); font-size: .68rem; font-variant-numeric: tabular-nums; }
.col-label { color: var(--subtle); font-size: .69rem; }
.col-label, .episodes, .tags, .state, .subtitle, .no-subtitle { justify-self: center; }
.entries { margin: 0; padding: 0; list-style: none; border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--surface); }
.entry { min-height: 2.65rem; padding: .32rem .8rem; }
.entry:first-child { border-radius: var(--radius-md) var(--radius-md) 0 0; }
.entry:last-child { border-radius: 0 0 var(--radius-md) var(--radius-md); }
.entry:only-child { border-radius: var(--radius-md); }
.entry + .entry { border-top: 1px solid var(--border); }
.entry:hover { background: var(--surface-2); }
.names, .title-text { min-width: 0; }
.title { position: relative; display: flex; justify-self: start; max-width: 100%; font-size: .94rem; font-weight: 600; line-height: 1.38; }
.title-text { cursor: text; user-select: text; }
.title-text, .alias { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.expand-toggle { position: absolute; inset-inline-start: -.78rem; top: 0; display: grid; place-items: center; width: .75rem; height: 1.38em; padding: 0; color: var(--accent); }
.expand-toggle::after { content: ""; position: absolute; inset-block-start: 50%; inset-inline-end: 0; width: 1.5rem; height: 1.75rem; transform: translateY(-50%); }
.expand-toggle:hover { background: var(--accent-soft); }
.chevron { font-size: .72rem; }
.expand-toggle[aria-expanded="true"] .chevron { transform: rotate(90deg); }
.aliases { margin-top: .02rem; }
.alias { display: block; line-height: 1.34; }
.alias-ja { color: var(--muted); font-size: .8rem; }
.alias-en { color: var(--subtle); font-size: .76rem; }
mark.hit { color: var(--ink); background: var(--hit-bg); }
.meta { display: contents; }
.episodes, .tags { color: var(--muted); font-size: .75rem; line-height: 1.25; }
.episodes { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tags { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; min-width: 0; gap: .15rem .24rem; }
.tags > :not(.empty-cell) { max-width: 100%; padding: .1rem .38rem; border: 1px solid transparent; border-radius: var(--radius-pill); overflow-wrap: anywhere; }
.tags .fact-extra { border-color: var(--border); color: var(--muted); background: var(--surface-2); }
.tags .fact-collab { border-color: var(--border-strong); }
.empty-cell { color: var(--subtle); }
.state { display: inline-flex; align-items: center; gap: .34rem; padding: .13rem .5rem; border: 1px solid var(--state-border); border-radius: var(--radius-pill); background: var(--state-bg); color: var(--state-ink); font-size: .75rem; font-weight: 600; line-height: 1.45; white-space: nowrap; }
.state::before { content: ""; width: .32rem; height: .32rem; border-radius: var(--radius-pill); background: currentColor; }
[data-tone="bd"] { --state-ink: var(--bd-ink); --state-bg: var(--bd-bg); --state-border: var(--bd-border); }
[data-tone="done"] { --state-ink: var(--done-ink); --state-bg: var(--done-bg); --state-border: var(--done-border); }
[data-tone="update"] { --state-ink: var(--update-ink); --state-bg: var(--update-bg); --state-border: var(--update-border); }
[data-tone="sync"] { --state-ink: var(--sync-ink); --state-bg: var(--sync-bg); --state-border: var(--sync-border); }
[data-tone="ongoing"] { --state-ink: var(--ongoing-ink); --state-bg: var(--ongoing-bg); --state-border: var(--ongoing-border); }
[data-tone="plan"] { --state-ink: var(--plan-ink); --state-bg: var(--plan-bg); --state-border: var(--plan-border); }
[data-tone="dead"] { --state-ink: var(--dead-ink); --state-bg: var(--dead-bg); --state-border: var(--dead-border); }
.subtitle { padding: .16rem .43rem; border: 1px solid var(--accent-border); border-radius: var(--radius-sm); font-size: .76rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.subtitle:hover { background: var(--accent-soft); }
.no-subtitle { padding-inline: .46rem; color: var(--subtle); font-size: .76rem; }
.enhanced[data-density="single"] .entry { min-height: 1.95rem; padding-block: .16rem; }
.enhanced[data-density="single"] .group-heading { min-height: 1.6rem; }
.enhanced[data-density="single"] .entry:not(.expanded, .alias-hit) .aliases { display: none; }
.expanded .title-text, .expanded .alias, .alias-hit .title-text, .alias-hit .alias,
html:not(.enhanced) .title-text, html:not(.enhanced) .alias { overflow-wrap: anywhere; white-space: normal; }
.empty { margin-block: 1.3rem; padding: 2.5rem 1rem; border: 1px dashed var(--border-strong); border-radius: var(--radius-md); color: var(--muted); background: var(--surface); text-align: center; }
footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .3rem .8rem; margin-top: 1.5rem; padding: .8rem 0 1.25rem; border-top: 1px solid var(--border); font-size: .78rem; }
.enhanced footer { padding-bottom: max(4rem, calc(env(safe-area-inset-bottom) + 3rem)); }
.back-top { position: fixed; z-index: 2; inset-inline-end: max(1rem, env(safe-area-inset-right)); inset-block-end: max(1rem, env(safe-area-inset-bottom)); display: inline-flex; align-items: center; gap: .32rem; min-height: 2.5rem; padding: .36rem .75rem; border: 1px solid var(--accent-border); border-radius: var(--radius-pill); color: var(--accent); background: var(--surface); box-shadow: var(--float-shadow); font-size: .8rem; font-weight: 600; }
.back-top:hover { background: var(--accent-soft); }
.copyright { color: var(--muted); text-decoration: none; }
.copyright:hover { color: var(--accent); text-decoration: underline; }

#catalog-guide { position: fixed; inset: 0; width: min(38rem, calc(100% - 1.35rem)); max-height: calc(100% - 1.5rem); margin: auto; padding: 0; overflow: auto; overscroll-behavior: contain; border: 1px solid var(--border-strong); border-radius: var(--radius-md); color: var(--ink); background: var(--surface); box-shadow: var(--float-shadow); }
#catalog-guide::backdrop { background: #17100b99; }
.guide-header { position: sticky; z-index: 1; top: 0; display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .6rem 1rem; border-bottom: 1px solid var(--border); background: var(--surface); }
.guide-header h2 { font-size: 1.1rem; }
.guide-close { min-width: 2.3rem; min-height: 2.3rem; border: 1px solid var(--border); color: var(--muted); background: var(--surface-2); font-size: 1.22rem; }
.guide-close:hover { color: var(--accent); background: var(--accent-soft); }
.guide-body { padding: .8rem 1rem 1rem; font-size: .86rem; overflow-wrap: anywhere; }
.guide-body section { margin-block: 1rem; padding-top: .7rem; border-top: 1px solid var(--border); }
.guide-body h3 { margin-bottom: .45rem; font-size: .96rem; }
.guide-body ul, .guide-body ol { margin: .6rem 0; padding-inline-start: 1.45rem; }
.guide-body li + li, .guide-body p + p { margin-top: .25rem; }
.guide-body table { width: 100%; border-collapse: collapse; text-align: left; font-size: .79rem; }
.guide-body td, .guide-body th { padding: .28rem .38rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.guide-body thead { background: var(--surface-2); }
.guide-body tbody th { font-weight: 400; }

@media (min-width: 60rem) and (max-width: 74.999rem) {
  :root {
    --outer-gutter: .85rem;
    --shell-gap: .85rem;
    --entry-columns: minmax(0, 1fr) 3.75rem 8.5rem 8.75rem 3.75rem;
  }
  .group-heading, .entry { gap: .45rem; }
}
@media (max-width: 59.999rem) {
  html { scrollbar-gutter: auto; }
  html:not(.enhanced) { --sticky-offset: 3.3rem; }
  .mobile-head { position: sticky; z-index: 3; top: 0; display: grid; gap: .35rem; padding: .35rem var(--gutter); border-bottom: 1px solid var(--border-strong); background: var(--surface); }
  .head-line { display: flex; align-items: center; gap: .45rem; }
  .head-line .search-box { flex: 1; }
  .mobile-head .brand-mark { width: 1.9rem; height: 1.9rem; }
  .mobile-head .brand-mark svg { width: 1.25rem; height: 1.25rem; }
  .mobile-head .brand-name { font-size: .92rem; }
  .mobile-head .brand-name small { font-size: .58rem; }
  .mobile-head .segment button { min-width: 1.75rem; min-height: 1.75rem; }
  .open-drawer, .close-drawer { min-height: 2.2rem; padding: .26rem .52rem; border: 1px solid var(--accent-border); color: var(--accent); background: var(--accent-soft); font-size: .81rem; }
  .open-drawer [data-active-count] { font-weight: 700; }
  .shell { display: block; max-width: none; padding-inline: 0; }
  .sidebar { position: static; width: auto; height: auto; padding: 1.05rem .95rem; border-right: 0; background: var(--surface); }
  .sidebar-search, .sidebar-brand { display: none; }
  .enhanced .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 6; width: min(19rem, 88vw); border-right: 1px solid var(--border-strong); transform: translateX(-100%); visibility: hidden; }
  .drawer-animated .sidebar { transition: transform .18s ease, visibility 0s linear .18s; }
  .drawer-animated.drawer-open .sidebar { transition-delay: 0s; }
  .enhanced .sidebar-brand { display: flex; margin: 0; line-height: inherit; }
  .close-drawer { display: inline-block; margin-left: auto; min-width: 2.2rem; font-size: 1.15rem; }
  .drawer-open { overflow: hidden; }
  .drawer-open .sidebar { visibility: visible; transform: translateX(0); box-shadow: var(--float-shadow); }
  .backdrop { position: fixed; inset: 0; z-index: 5; background: #17100bbb; }
  main { padding: 0 var(--gutter); }
  .masthead { min-height: 3rem; margin-bottom: 0; }
  .masthead h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .enhanced .toolbar { position: static; }
  .toolbar [data-control="lang"], .toolbar [data-control="theme"] { display: none; }
  .filter-panel, .group-nav { margin-top: .85rem; }
  .drawer-summary { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .65rem; }
  .drawer-summary .reset { min-height: 1.95rem; }
  :where(.year-links) .nav-link:not(:where([aria-disabled="true"])):hover, .fine-options button:hover { background: var(--surface-2); }
  .enhanced .sidebar .segment button, .sidebar .fine-options button, .sidebar .status-toggle { min-height: 1.95rem; }
  .sidebar .nav-link { min-height: 1.85rem; }
  .enhanced[data-density="single"] .entry { min-height: 2rem; }
  html:not(.enhanced) .group-nav { margin-top: 0; border: 0; }
  .group-heading { grid-template-columns: minmax(0, 1fr); padding-inline: calc(.62rem + 1px); }
  .col-label { display: none; }
  .entry, .enhanced[data-density="single"] .entry { grid-template-columns: minmax(0, 1fr) auto; gap: .15rem .4rem; padding: .39rem .62rem; }
  .names { display: contents; }
  .title { grid-area: 1 / 1; }
  .expand-toggle { inset-inline-start: -.6rem; width: .6rem; }
  .state { grid-area: 1 / 2; justify-self: end; }
  .aliases { grid-area: 2 / 1 / auto / -1; }
  .meta { grid-area: 3 / 1; display: flex; flex-wrap: wrap; align-items: center; min-width: 0; gap: .24rem; }
  .meta .empty-cell { display: none; }
  .meta > :has(> .empty-cell), .meta:not(:has(.ep-value, .fact-extra, .fact-collab)) { display: none; }
  .tags { justify-content: flex-start; }
  .ep-value { display: block; padding: .1rem .38rem; border: 1px solid transparent; border-radius: var(--radius-pill); background: var(--surface-2); }
  .subtitle, .no-subtitle { grid-area: 3 / 2; justify-self: end; }
  .subtitle { display: inline-flex; align-items: center; min-height: 1.95rem; padding-inline: .55rem; }
}
@media (max-width: 47.999rem) {
  :root { --gutter: .75rem; }
  .quick-links { width: 100%; justify-content: space-between; gap: .15rem; }
  .quick-links a { padding-inline: .28rem; font-size: .74rem; }
  .toolbar { flex-wrap: wrap; gap: .28rem .46rem; padding-block: .25rem; }
  .toolbar .active-filters:not(:empty) { order: 1; flex-basis: 100%; }
  .preferences { gap: .25rem; }
  .preferences button { padding-inline: .32rem; }
  .guide-body { padding-inline: .75rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .catalog-group.jump-target .group-heading h3 { animation: catalog-arrival .9s ease-out; }
  @keyframes catalog-arrival {
    0%, 18% { background: var(--accent-soft); box-shadow: 0 0 0 .26rem var(--accent-soft), 0 0 .8rem var(--accent-border); }
    100% { background: transparent; box-shadow: 0 0 0 .26rem transparent, 0 0 .8rem transparent; }
  }
}
@media (prefers-reduced-motion: reduce) { .drawer-animated .sidebar { transition: none; } }
