:root {
  color-scheme: dark;
  --base: #101619;
  --surface: #192225;
  --text: #f5eee1;
  --muted: #b5bcba;
  --line: #435054;
  --amber: #f3b963;
  --serif: "Songti SC", "Noto Serif CJK SC", "STSong", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--base); color: var(--text); font: 16px/1.6 var(--sans); }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button, a, select { touch-action: manipulation; }
a { color: inherit; }
button:focus-visible, a:focus-visible, select:focus-visible { outline: 2px solid var(--amber); outline-offset: 4px; }
[hidden] { display: none !important; }
.masthead { background: #141b1e; border-bottom: 1px solid #293337; }
.masthead-inner { min-height: 72px; margin: 0 auto; max-width: 1680px; padding: 12px clamp(22px, 3.4vw, 56px); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; gap: 17px; align-items: center; text-decoration: none; white-space: nowrap; }
.brand-name { font: 500 30px/1.1 Georgia, "Times New Roman", serif; letter-spacing: -.04em; }
.brand-label { border-left: 1px solid #5d696a; color: #bbc0bc; padding-left: 18px; font-size: 15px; line-height: 20px; letter-spacing: .07em; }
.search { display: flex; align-items: center; gap: 10px; padding: 0 10px 0 13px; width: clamp(190px, 21vw, 310px); min-height: 39px; border: 1px solid var(--line); border-radius: 7px; }
.search:focus-within { border-color: var(--amber); }
.search svg, .launch svg { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.search input { width: 100%; min-width: 0; background: transparent; color: var(--text); border: 0; outline: 0; font-size: 14px; }
.search input::placeholder { color: #bdc2be; opacity: 1; }
.search kbd { display: grid; place-items: center; width: 22px; height: 23px; background: #293336; border-radius: 4px; color: #d1d4cc; font: 13px monospace; }
main { width: min(86.5%, 1200px); margin: 0 auto; padding: clamp(40px, 5vw, 72px) 0 72px; }
h1, h2, p { margin: 0; }
h1 { font: 600 clamp(36px, 3.1vw, 48px)/1.2 var(--serif); letter-spacing: .02em; }
.toolbar { margin: 21px 0 clamp(24px, 2.8vw, 40px); display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.views { display: flex; gap: clamp(9px, 2.25vw, 34px); }
.views button { margin: 0 0 -1px; border: 0; background: transparent; color: #bec5c2; padding: 10px 8px 13px; border-bottom: 3px solid transparent; font-size: 15px; }
.views button[aria-pressed="true"] { border-color: var(--amber); color: var(--amber); font-weight: 650; }
.views button:hover { color: var(--text); }
#total { padding-left: 5px; font-size: 13px; font-variant-numeric: tabular-nums; }
#category { border: 1px solid var(--line); background: var(--surface); border-radius: 5px; padding: 4px 7px; font-size: 14px; color: var(--text); }
#library { display: grid; gap: 22px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 9px; display: grid; grid-template-columns: .96fr 1.04fr; overflow: hidden; }
.card.no-cover { grid-template-columns: 1fr; }
.cover { position: relative; min-height: 310px; }
.cover img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; }
.details { padding: clamp(23px, 2.7vw, 40px); display: flex; flex-direction: column; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 28px; }
.category { color: var(--muted); font-size: 14px; }
.star { width: 40px; height: 40px; margin: -6px; border: 0; border-radius: 5px; background: none; color: var(--amber); display: grid; place-items: center; }
.star:hover { background: #2c3433; }
.star svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linejoin: round; }
.star[aria-pressed="true"] svg { fill: currentColor; }
h2 { font: 650 clamp(26px, 2.4vw, 37px)/1.3 var(--serif); margin: 11px 0; text-wrap: balance; }
.description { color: #d0d3c9; font-size: clamp(15px, 1.15vw, 17px); }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 24px 0; }
.launch { display: inline-flex; justify-content: center; align-items: center; gap: 10px; min-height: 44px; padding: 9px 18px; border-radius: 6px; text-decoration: none; font-size: 15px; font-weight: 600; border: 1px solid #a6ada9; }
.primary { color: #241b0f; border-color: var(--amber); background: var(--amber); }
.launch:hover { background: #2d393d; }
.primary:hover { background: #ffcb83; }
.meta { margin-top: auto; border-top: 1px solid #354145; padding-top: 15px; color: #aeb8b6; font-size: 13px; line-height: 1.65; }
.empty { padding: 50px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 740px) {
  .masthead-inner { min-height: 62px; gap: 16px; }
  .brand { gap: 10px; }
  .brand-name { font-size: 23px; }
  .brand-label, .search kbd { display: none; }
  .search { width: min(38vw, 190px); min-height: 35px; padding: 0 8px; gap: 6px; }
  main { width: auto; padding: 32px 21px 48px; }
  .toolbar { margin: 17px 0 21px; flex-wrap: wrap; }
  .views button { font-size: 14px; padding-inline: 4px; }
  .card { grid-template-columns: 1fr; }
  .cover { min-height: 0; aspect-ratio: 1.95; }
  .details { padding: 21px; }
  .actions { margin: 20px 0; gap: 9px; }
  .launch { padding: 8px 12px; font-size: 14px; }
}
@media (max-width: 360px) {
  .masthead-inner { padding-inline: 14px; }
  main { padding-inline: 14px; }
  .details { padding: 17px; }
}
