:root {
  color-scheme: dark;
  --bg: #0b1111;
  --panel: #141c1c;
  --raised: #1b2523;
  --text: #f2f6f2;
  --muted: #b1c0b9;
  --line: #304039;
  --accent: #d4f47b;
  --warning: #ffd69c;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.55; }
a { color: var(--accent); text-underline-offset: 4px; }
a:hover { color: #f0ffb6; }
input, select, button, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
[id] { scroll-margin-top: 26px; }
.skip { position: absolute; left: 16px; top: 12px; z-index: 3; transform: translateY(-160%); background: var(--bg); padding: 10px; }
.skip:focus { transform: none; }
.wrap, .site-header, .site-footer { width: min(1240px, calc(100% - 56px)); margin-inline: auto; }
.site-header { min-height: 76px; display: flex; justify-content: space-between; align-items: center; gap: 12px 28px; padding-block: 12px; border-bottom: 1px solid var(--line); }
.site-header nav, .site-footer nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; }
.site-header nav a, .site-footer nav a { text-decoration: none; font-size: .9rem; }
.site-header nav a { display: inline-flex; align-items: center; min-height: 40px; color: var(--muted); }
.site-header nav a:hover { color: var(--text); }
.site-header .logo { display: flex; align-items: center; gap: 9px; color: var(--text); font-size: 1.03rem; font-weight: 800; text-decoration: none; white-space: nowrap; }
.wrap { padding-block: clamp(32px, 6vw, 74px); }
.wrap > section + section { margin-top: 50px; }
.site-footer { border-top: 1px solid var(--line); padding-block: 20px 35px; color: var(--muted); font-size: .9rem; }
.site-footer p { max-width: 65ch; }
h1, h2, h3 { line-height: 1.1; letter-spacing: -.035em; }
h1 { font-size: clamp(2.25rem, 5.5vw, 4.6rem); max-width: 22ch; margin: 0 0 18px; }
h2 { font-size: clamp(1.45rem, 3vw, 2.15rem); margin: 0 0 18px; }
h3 { font-size: 1.17rem; margin: 9px 0 4px; }
p { max-width: 76ch; }
.lede { color: var(--muted); font-size: clamp(1rem, 2vw, 1.2rem); max-width: 58ch; }
.hero, .detail-hero { display: grid; grid-template-columns: 1fr .9fr; gap: clamp(22px, 5vw, 62px); align-items: center; }
.feature { min-height: 310px; position: relative; display: grid; align-items: end; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); isolation: isolate; }
.feature::before { content: ''; position: absolute; z-index: -1; inset: 0; background: linear-gradient(180deg, #0a0f0e16 0%, #0a0f0ee8 82%); }
.feature > img { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feature > div { padding: 22px; }
.feature h2 { margin: 10px 0 0; }
.feature p { margin: 7px 0 14px; }
.feature.test-feature { min-height: 0; background: linear-gradient(140deg, var(--raised), var(--panel) 65%); }
.test-feature > div { padding: clamp(22px, 4vw, 40px); }
.hero-search { margin-top: 25px; }
.hero-search > div { display: flex; gap: 8px; }
.hero-search label { display: block; margin-bottom: 5px; }
.hero-search input { flex: 1; min-width: 0; }
.hero-count, .popular { color: var(--muted); font-size: .9rem; }
.popular { display: flex; gap: 10px 16px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding: 16px 0 20px; margin: 0 0 32px; }
.popular a { color: var(--text); }
.button, .chips button { min-height: 42px; display: inline-flex; justify-content: center; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 7px 12px; background: var(--raised); color: var(--text); text-decoration: none; font-size: .88rem; font-weight: 700; }
.button:hover, .chips button:hover, .save:hover { border-color: var(--accent); color: var(--accent); }
.button.primary, .chips button[aria-pressed=true] { background: var(--accent); border-color: var(--accent); color: #152211; }
.button:disabled { cursor: wait; opacity: .65; }
input:not([type=checkbox]), select, textarea { min-height: 44px; padding: 8px 10px; color: var(--text); border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
textarea { width: 100%; resize: vertical; }
.chips, .actions, .card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.toolbar { margin: 12px 0 18px; }
.filter-row { display: grid; grid-template-columns: minmax(140px, 2fr) repeat(3, minmax(105px, 1fr)) auto; gap: 12px; align-items: end; margin-top: 14px; }
.filter-row label, .suggest-form label { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: .88rem; }
.filter-row .check-option { flex-direction: row; align-items: center; white-space: nowrap; min-height: 44px; }
input[type=checkbox] { accent-color: var(--accent); }
[data-count] { min-height: 1.4em; margin: 9px 0 0; color: var(--muted); font-size: .85rem; }
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 17px; }
.game-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; min-width: 0; overflow: hidden; display: flex; flex-direction: column; }
.game-card:focus-within, .game-card:hover { border-color: #708c63; }
.cover, .detail-cover { display: block; background: var(--raised); overflow: hidden; }
.cover > img, .detail-cover > img, .cover-placeholder { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.cover-placeholder { display: grid; place-items: center; background: radial-gradient(ellipse at 75% 10%, #365f51, #152321 72%); color: #e1f5e6; font-size: .9rem; letter-spacing: .1em; text-transform: uppercase; }
.cover-sports { background: radial-gradient(ellipse at 75% 10%, #655935, #242014 72%); }
.cover-shooters { background: radial-gradient(ellipse at 75% 10%, #675142, #261b17 72%); }
.cover-rpg, .cover-puzzles { background: radial-gradient(ellipse at 75% 10%, #565375, #201e32 72%); }
.card-body { display: flex; flex: 1; flex-direction: column; padding: 12px; }
.card-meta { display: flex; justify-content: space-between; align-items: flex-start; gap: 4px 8px; flex-wrap: wrap; color: var(--muted); font-size: .76rem; }
.card-meta a { color: inherit; }
.badge { display: inline-block; border: 1px solid #61764f; border-radius: 20px; padding: 3px 8px; color: #d9f0b5; font-size: .72rem; line-height: 1.25; }
.badge.files { color: #b7d9ff; border-color: #587290; }
.badge.archive, .badge.check { color: var(--warning); border-color: #7e6744; }
.game-card h3 a { color: var(--text); text-decoration: none; }
.game-card h3 a:hover { text-decoration: underline; }
.game-card p { margin: 5px 0 12px; color: var(--muted); font-size: .82rem; }
.game-card .game-intro { font-size: .94rem; color: var(--text); }
.card-actions { margin-top: auto; }
.card-actions .details { font-size: .86rem; }
.save { min-width: 42px; min-height: 42px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--text); font-size: 1.25rem; }
.card-actions .save { margin-left: auto; }
.save[aria-pressed=true] { color: var(--accent); border-color: #71884d; }
.collection-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(155px, 100%), 1fr)); gap: 12px; }
.collection-grid > a, .collection-grid > div, .notice, .facts { display: block; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: 16px; }
.collection-grid > a { text-decoration: none; }
.collection-grid span { display: block; color: var(--muted); font-size: .85rem; margin-top: 6px; }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; color: var(--muted); margin-bottom: 16px; font-size: .9rem; }
.detail-hero { grid-template-columns: .9fr 1fr; margin-bottom: 36px; }
.detail-hero h1 { font-size: clamp(2rem, 5vw, 3.9rem); margin-top: 12px; }
.detail-cover { margin: 0; border: 1px solid var(--line); border-radius: 15px; }
.detail-cover figcaption { padding: .45rem .75rem; color: var(--muted); font-size: .8rem; }
.detail-grid { display: grid; grid-template-columns: 1fr minmax(220px, .44fr); gap: 35px; align-items: start; margin-bottom: 44px; }
.detail-grid section + section { margin-top: 30px; }
.facts h2 { font-size: 1.25rem; }
.facts dt { color: var(--muted); font-size: .82rem; }
.facts dd { margin: 3px 0 13px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
thead { background: var(--panel); }
td button { white-space: nowrap; }
.article-copy { max-width: 76ch; }
.article-copy section { margin-top: 34px; }
.article-copy h3 { margin-top: 22px; }
.article-copy li + li { margin-top: 6px; }
.article-copy caption { text-align: left; padding-bottom: 8px; color: var(--muted); }
.article-copy th, .article-copy td { vertical-align: top; }
tr:target { background: var(--raised); }
.suggest-form { display: grid; gap: 12px; max-width: 620px; }
.wrap details { border-top: 1px solid var(--line); padding: 12px 0; }
summary { cursor: pointer; }
.legacy main.wrap { width: min(1000px, calc(100% - 56px)); }
@media (max-width: 1000px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .wrap, .site-header, .site-footer, .legacy main.wrap { width: calc(100% - 32px); }
  .site-header { flex-direction: column; align-items: flex-start; gap: 4px; }
  .site-header nav { gap: 2px 16px; }
  .hero, .detail-hero, .detail-grid { grid-template-columns: 1fr; gap: 22px; }
  .detail-hero > div:nth-child(2) { grid-row: 1; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .filter-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-row label:first-child { grid-column: span 2; }
}
@media (max-width: 410px) {
  .card-actions .details { display: none; }
  .feature { min-height: 240px; }
}
.guide-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.checks .available { color: var(--accent); }


.language-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  width: min(1240px, calc(100% - 56px));
  margin: 10px auto 0;
  font-size: .9rem;
}
.language-switch a { display: inline-block; padding-block: 6px; }
.language-switch a[aria-current="true"] { color: var(--text); font-weight: 700; text-decoration: underline; }
