:root {
  color-scheme: dark;
  --bg: #111310;
  --panel: #1b1e18;
  --line: #363b30;
  --text: #f1f3ea;
  --muted: #b3baaa;
  --accent: #d9f388;
  --body-font: "Segoe UI", system-ui, sans-serif;
  --display-font: "Bahnschrift SemiCondensed", "Arial Narrow", var(--body-font);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 var(--body-font); }
body:has(dialog[open]) { overflow: hidden; }
button, input, select { font: inherit; }
a { color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
.mast-inner, main { width: min(100% - clamp(28px, 8vw, 104px), 1440px); margin-inline: auto; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.skip:focus { position: fixed; background: var(--panel); top: 8px; left: 8px; z-index: 5; padding: 8px 12px; }

.masthead { position: sticky; top: 0; z-index: 2; background: var(--bg); border-bottom: 1px solid var(--line); }
.mast-inner { min-height: 65px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.brand { display: inline-flex; gap: 10px; align-items: center; text-decoration: none; text-transform: uppercase; font: 700 15px var(--display-font); letter-spacing: .12em; white-space: nowrap; }
.brand::before { content: ""; display: block; background: var(--accent); height: 15px; width: 4px; transform: skewX(-14deg); }
.brand span { color: var(--muted); font-weight: 500; }
.games { display: flex; gap: 6px; }
.games a { border-radius: 5px; padding: 8px 13px; text-decoration: none; color: var(--muted); font-size: 13px; font-weight: 650; white-space: nowrap; }
.games a:hover { background: var(--panel); color: var(--text); }
.games a[aria-current="page"] { background: #303726; color: var(--accent); }

main { padding: 27px 0 58px; }
.hero { display: grid; grid-template-columns: 1fr 1.22fr; min-height: 246px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.hero-copy { align-self: center; padding: 28px clamp(21px, 3.5vw, 55px); }
.eyebrow { margin: 0 0 11px; color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .17em; text-transform: uppercase; }
.hero h1 { margin: 0; max-width: 12ch; font: 700 clamp(34px, 5vw, 76px)/.99 var(--display-font); letter-spacing: -.038em; text-wrap: balance; }
.game-summary { color: var(--muted); margin: 17px 0 0; font-size: 13px; }
.feature { position: relative; width: 100%; display: block; border: 0; padding: 0; background: #e9e9e7; overflow: hidden; min-height: 190px; color: white; }
.feature img { position: absolute; width: 100%; height: 100%; inset: 0; object-fit: cover; object-position: center 28%; }
.feature-caption { position: absolute; display: flex; gap: 12px; align-items: center; right: 14px; bottom: 14px; padding: 8px 12px; border-radius: 5px; background: #171b13ee; font-size: 12px; font-weight: 650; }
.feature-caption span:last-child { color: var(--accent); }
.feature:hover .feature-caption { background: #272e1d; }
.feature:focus-visible { outline-offset: -5px; }

#collection { scroll-margin-top: 130px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 27px; padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.sections, .filters { display: flex; align-items: center; gap: 7px; }
.sections a { color: var(--muted); padding: 9px 16px; text-decoration: none; font-weight: 650; border-radius: 5px; }
.sections a:hover { color: var(--text); background: var(--panel); }
.sections a[aria-current="page"] { background: var(--accent); color: #172010; }
.filters input, .filters select { height: 40px; background: var(--panel); border: 1px solid var(--line); border-radius: 5px; color: var(--text); padding: 0 11px; font-size: 13px; max-width: 100%; }
.filters input { width: clamp(160px, 21vw, 280px); }
.filters input::placeholder { color: var(--muted); }
.results-line { display: flex; align-items: center; min-height: 42px; gap: 12px; color: var(--muted); font-size: 12px; }
#clear { color: var(--accent); border: 0; background: transparent; padding: 3px 6px; }
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.card { padding: 0; width: 100%; overflow: hidden; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 7px; text-align: left; }
.card:hover { border-color: var(--accent); }
.card img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; background: #292d25; }
.card-info { display: block; min-height: 61px; padding: 9px 12px 10px; }
.card-name { display: block; font-size: 15px; font-weight: 680; line-height: 1.26; }
.card-subtitle { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.empty { padding: 24px 0; margin: 0; color: var(--muted); }

dialog { width: min(96vw, 1450px); height: min(94dvh, 1030px); padding: 0; max-height: none; max-width: none; border: 1px solid var(--line); border-radius: 9px; color: var(--text); background: var(--panel); }
dialog[open] { display: flex; flex-direction: column; }
dialog::backdrop { background: #090a08e8; }
.viewer-head, .viewer-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; }
.viewer-head h2 { margin: 0; font: 650 24px/1.1 var(--display-font); }
.viewer-head p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.viewer-head p:empty { display: none; }
.close, .stage button { border: 1px solid var(--line); background: var(--bg); color: var(--text); border-radius: 5px; }
.close { padding: 7px 12px; white-space: nowrap; }
.close span { padding-left: 3px; }
.close:hover, .stage button:hover { border-color: var(--accent); }
.stage { position: relative; flex: 1; min-height: 0; background: #0d0f0c; }
.stage img { display: block; width: 100%; height: 100%; object-fit: contain; }
.stage button { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 49px; font-size: 32px; line-height: 1; opacity: .9; }
#previous { left: 12px; }
#next { right: 12px; }
.angles { display: flex; flex-wrap: wrap; gap: 6px; }
.angles button, #full-size { padding: 7px 9px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); background: transparent; text-decoration: none; font-size: 12px; }
.angles button[aria-pressed="true"] { color: var(--accent); border-color: #7c9055; background: #303726; }
.angles button:hover, #full-size:hover { color: var(--text); border-color: var(--accent); }
#full-size { white-space: nowrap; }

@media (max-width: 1000px) {
  .hero { min-height: 216px; }
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .mast-inner { display: grid; gap: 8px; padding-block: 11px 8px; }
  .games { gap: 5px; }
  .games a { padding: 6px 10px; }
  main { padding-top: 13px; }
  .hero { grid-template-columns: 1fr; }
  .hero-copy { padding: 16px 16px 15px; }
  .hero h1 { font-size: clamp(29px, 7vw, 42px); max-width: unset; text-wrap: initial; }
  .eyebrow { margin-bottom: 6px; }
  .game-summary { margin-top: 6px; }
  .feature { min-height: 0; height: clamp(128px, 38vw, 220px); }
  .feature-caption { right: 8px; bottom: 8px; padding: 5px 8px; }
  .toolbar { margin-top: 14px; gap: 8px; flex-wrap: wrap; padding-bottom: 9px; }
  .sections a { padding: 7px 12px; }
  .filters { width: 100%; }
  .filters .search { flex: 1; min-width: 0; }
  .filters input { width: 100%; }
  .filters select { max-width: 160px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .card-info { min-height: 56px; padding: 7px 8px 8px; }
  .card-name { font-size: 13px; }
  .card-subtitle { font-size: 11px; }
  dialog { height: 90dvh; }
  .viewer-head, .viewer-foot { padding: 9px; }
  .viewer-foot { flex-wrap: wrap; justify-content: flex-start; }
  .stage button { width: 33px; height: 42px; }
  #previous { left: 4px; }
  #next { right: 4px; }
}
