:root {
  color-scheme: light;
  --paper: #f7f8fb;
  --ink: #172037;
  --quiet: #4f5a70;
  --line: #d6dce8;
  --accent: #353cb0;
  font-family: "Geist", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); }
a { color: var(--accent); }
button, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #535bf3; outline-offset: 4px; }
.shell { padding-inline: clamp(14px, 1.5vw, 28px); }
.top { border-bottom: 1px solid var(--line); }
.masthead { min-height: 72px; display: flex; align-items: center; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 23px; font-weight: 800; letter-spacing: -.04em; }
.mark { color: var(--accent); font-size: 31px; line-height: 1; }
.search { width: min(250px, 100%); margin-inline-start: auto; }
.search input { width: 100%; height: 40px; border: 1px solid var(--line); border-radius: 5px; background: transparent; padding: 0 12px; color: var(--ink); }
.language:not([hidden]) { display: flex; align-items: center; gap: 4px; }
.language button { min-height: 40px; padding: 7px 6px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--quiet); white-space: nowrap; }
.language [aria-pressed="true"] { border-color: var(--accent); color: var(--accent); font-weight: 700; }
.sr { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.play { display: inline-flex; gap: 10px; align-items: center; justify-content: center; min-height: 40px; padding: 7px 12px; border: 1px solid currentColor; border-radius: 5px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.play:hover { text-decoration: underline; }
.catalog { margin-top: 12px; }
.catalog-bar { display: flex; align-items: center; gap: 0 20px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.catalog-bar h1 { margin: 0; white-space: nowrap; font-size: 24px; letter-spacing: -.05em; }
.filters { display: flex; gap: 12px; flex-wrap: wrap; }
.filters button { border: 0; border-bottom: 2px solid transparent; padding: 10px 5px; background: transparent; color: var(--quiet); }
.filters [aria-pressed="true"] { border-color: var(--accent); color: var(--accent); font-weight: 700; }
#count { margin-left: auto; white-space: nowrap; color: var(--quiet); font-size: 14px; }
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); column-gap: clamp(14px, 1.25vw, 24px); }
.game { border-bottom: 1px solid var(--line); padding: 18px 0 16px; min-width: 0; }
.cover { position: relative; display: block; aspect-ratio: 16/8.3; overflow: hidden; border-radius: 6px; background: var(--cover-color); }
.cover img { width: 100%; height: 100%; display: block; object-fit: cover; }
.cover:hover img { opacity: .87; }
.game h2 { font-size: 23px; letter-spacing: -.035em; margin: 11px 0 4px; line-height: 1.12; }
.game h2 a { color: var(--ink); text-decoration: none; }
.game h2 a:hover { text-decoration: underline; }
.game p { line-height: 1.5; margin: 0; color: var(--quiet); font-size: 14px; }
.game .description { min-height: 3em; }
.game .meta { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.game .rating { display: block; }
.empty { padding-block: 24px; color: var(--quiet); }
.empty button { border: 0; background: transparent; color: var(--accent); text-decoration: underline; }
@media (max-width: 560px) {
  .masthead { min-height: 60px; gap: 6px 10px; flex-wrap: wrap; padding-block: 10px; }
  .brand { font-size: 18px; gap: 6px; }
  .search { order: 2; width: 100%; }
  .language { margin-inline-start: auto; }
  .catalog-bar { gap: 8px; }
  .catalog-bar h1 { flex: 1; }
  #count { order: 1; margin-block: 4px; }
  .filters { order: 2; flex-basis: 100%; }
  .game .description { min-height: 0; }
}

.cover:has(.text-cover) { text-decoration: none; }
.text-cover { display: grid; place-items: center; height: 100%; padding: 12px; overflow-wrap: anywhere; text-align: center; color: #f4efdf; font: 700 clamp(1.5rem, 2.4vw, 2.4rem) Georgia, "Noto Serif SC", serif; letter-spacing: .08em; background: radial-gradient(ellipse at 70% 20%, #76857c, transparent 65%); }
