:root {
  color-scheme: dark;
  --background: #151514;
  --surface: #242320;
  --text: #f8f5ec;
  --muted: #c8c0b1;
  --accent: #f7ba6c;
  --border: #484239;
  font-family: system-ui, "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 84px; }
body { margin: 0; background: var(--background); color: var(--text); }
a { color: var(--accent); }
a:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.topbar {
  position: sticky; top: 0; z-index: 2;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap;
  gap: 12px 24px; padding: 14px max(4vw, 16px);
  background: var(--background); border-bottom: 1px solid var(--border);
}
.brand { font-weight: 800; color: var(--text); text-decoration: none; white-space: nowrap; }
.brand span { color: var(--accent); }
nav { display: flex; gap: 16px; flex-wrap: wrap; }
.topbar nav a { color: var(--muted); text-decoration: none; padding: 6px 0; }
.topbar nav a[aria-current] { color: var(--text); border-bottom: 2px solid var(--accent); }
.shell { width: min(100% - 32px, 1320px); margin-inline: auto; }
main.shell { padding-block: 32px 56px; }
h1 { margin: 0; font-size: 34px; }
h2 { font-size: 23px; }
.title-row, .chart-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.title-row p, .intro, footer, figcaption, small { color: var(--muted); }
.title-row p { margin: 0; }
.controls { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; margin-block: 20px; }
.controls label { display: flex; align-items: center; gap: 8px; }
input { font: inherit; }
input[type="search"] { min-height: 40px; width: min(54vw, 270px); padding: 6px 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 155px), 1fr)); gap: 14px; margin-top: 20px; }
.card { overflow: hidden; text-decoration: none; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 5px; }
.card:hover { border-color: var(--accent); }
.poster { aspect-ratio: 2 / 3; overflow: hidden; background: #302d28; }
.poster img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 26%; }
.missing { display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.card-title { display: block; padding: 10px 8px; font-weight: 650; overflow-wrap: anywhere; }
.years { margin-block: 22px; }
.years a { padding: 6px 10px; border: 1px solid var(--border); text-decoration: none; }
.chart { max-width: 820px; border-top: 1px solid var(--border); margin: 24px 0 40px; }
.chart ol { margin: 0; padding: 0; list-style: none; }
.chart li { border-bottom: 1px solid var(--border); }
.chart li a { display: grid; grid-template-columns: 3ch 1fr auto; align-items: center; gap: 12px; padding: 11px 4px; color: var(--text); text-decoration: none; }
.chart li a:hover { background: var(--surface); }
.rank, .arrow { color: var(--accent); font-variant-numeric: tabular-nums; }
.profile { display: grid; grid-template-columns: minmax(140px, 260px) minmax(0, 1fr); gap: 28px; }
.profile figure { margin: 0; }
.profile .poster { aspect-ratio: auto; min-height: 220px; }
.profile .poster img { height: auto; max-height: 500px; object-fit: contain; }
.profile p, .profile li { line-height: 1.7; }
figcaption { margin-top: 8px; font-size: 13px; overflow-wrap: anywhere; }
.back { margin-top: 0; }
footer.shell { padding-block: 18px 26px; border-top: 1px solid var(--border); font-size: 13px; }
@media (max-width: 540px) {
  h1 { font-size: 27px; }
  .wall { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .profile { grid-template-columns: 1fr; gap: 20px; }
  .profile figure { width: min(100%, 230px); }
}
