/* Mobile first: base rules are the phone layout; wider screens add to it at the bottom.
   Nothing scrolls sideways on a phone. */

:root {
  --bg: #0F1116; --surface: #181B22; --surface2: #20242D; --line: #2A2F3A;
  --text: #F1F2F4; --muted: #9AA1AE;
  --accent: #8492FF; --accent-ink: #0B0E1A;
  --sale-bg: #3A2415; --sale-text: #FFAE7A;
  --good: #5FD4B3; --good-ink: #0B0E1A;
  --shadow: 0 16px 32px -18px rgb(0 0 0 / .7);
  --gutter: 16px;
  --body: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Space Grotesk", "Manrope", var(--body);
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #F5F6F8; --surface: #FFFFFF; --surface2: #ECEEF2; --line: #DFE2E8;
    --text: #14161B; --muted: #5B6270;
    --accent: #3D4EDB; --accent-ink: #FFFFFF;
    --sale-bg: #FFE9DC; --sale-text: #A9430A;
    --good: #0B7A5F; --good-ink: #FFFFFF; --good-ink: #FFFFFF;
    --shadow: 0 16px 32px -20px rgb(20 22 27 / .3);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #F5F6F8; --surface: #FFFFFF; --surface2: #ECEEF2; --line: #DFE2E8;
  --text: #14161B; --muted: #5B6270;
  --accent: #3D4EDB; --accent-ink: #FFFFFF;
  --sale-bg: #FFE9DC; --sale-text: #A9430A;
  --good: #0B7A5F;
  --shadow: 0 16px 32px -20px rgb(20 22 27 / .3);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 15px/1.4 var(--body); -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums;
  min-height: 100dvh; display: flex; flex-direction: column; overflow-x: clip;
}
h1, h2, h3, p, ul, dl, dd { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }
s { color: var(--muted); }
b { font-weight: 600; }
button, input, select { font: inherit; color: inherit; }
svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.muted { color: var(--muted); }

.top, main, .foot { width: 100%; max-width: 1360px; margin-inline: auto; padding-inline: var(--gutter); }
main { flex: 1; }

@view-transition { navigation: auto; }
::view-transition-group(cover) { animation-duration: .35s; animation-timing-function: var(--ease); }

/* ---------- shared pieces ---------- */
.btn {
  height: 44px; padding: 0 12px; display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; font-weight: 600; font-size: 14px;
  transition: border-color .2s;
}
.btn.icon { width: 44px; padding: 0; justify-content: center; color: var(--muted); }
.btn.icon svg { width: 18px; height: 18px; stroke-width: 2; }
/* Country and language menus: a button with a flag that opens a list of links. */
.flag { width: 20px; height: 15px; flex: none; border-radius: 3px; object-fit: cover; box-shadow: 0 0 0 1px rgb(128 128 128 / .28); }
.menu { position: relative; }
.menu summary { list-style: none; user-select: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary .caret { width: 12px; height: 12px; stroke-width: 1.6; color: var(--muted); transition: rotate .2s var(--ease); }
.menu[open] summary { border-color: var(--muted); }
.menu[open] summary .caret { rotate: 180deg; }
/* on phones the list spans the screen under the header, so it can never run off an edge */
.menu-list { position: fixed; left: var(--gutter); right: var(--gutter); top: 62px; z-index: 40; display: grid; gap: 2px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); animation: pop .16s var(--ease); }
.menu-list.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.menu-list a { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 10px; border-radius: 10px; font-weight: 500; font-size: 14px; }
.menu-list a[aria-current] { background: var(--surface2); font-weight: 600; }
@keyframes pop { from { opacity: 0; translate: 0 -6px; } }
/* a menu that opens right under its own button (sorting) */
.menu.local .menu-list { position: absolute; left: auto; right: 0; top: calc(100% + 8px); min-width: 220px; }
.menu-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* on the narrowest phones the country button is just its flag too, so the header fits */
@media (max-width: 399px) { .top .menu:not(.compact) summary span { display: none; } .logo { font-size: 20px; gap: 8px; } .tabs a { font-size: 13px; padding: 0 4px; } }
@media (max-width: 359px) { .tabs { gap: 2px; padding: 3px; } .tabs a { font-size: 12px; padding: 0 2px; letter-spacing: -.01em; } }
/* the language button is just its flag on phones */
.menu.compact summary { width: 44px; padding: 0; justify-content: center; }
.menu.compact summary span, .menu.compact summary .caret { display: none; }
.chip { padding: 2px 6px; border-radius: 6px; background: var(--sale-bg); color: var(--sale-text); font-weight: 600; font-size: 12px; white-space: nowrap; }
.chip.big { padding: 4px 8px; border-radius: 8px; font-size: 15px; }
.clock { width: 13px; height: 13px; stroke-width: 2.2; flex: none; }
.panel { padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; }
.panel > header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.panel h2 { font: 700 18px/1.2 var(--display); letter-spacing: -.02em; }
.panel > header a { font-size: 14px; font-weight: 500; color: var(--muted); padding: 6px 0; }
.note { font-size: 13px; color: var(--muted); }
.empty { padding: 48px 0; color: var(--muted); max-width: 50ch; }
.empty a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- header ---------- */
.top { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "logo actions" "search search"; align-items: center; gap: 4px 12px; padding-top: 10px; }
.logo { grid-area: logo; justify-self: start; display: flex; align-items: center; gap: 10px; height: 44px; font: 700 22px/1 var(--display); letter-spacing: -.03em; }
.logo svg { width: 34px; height: 34px; stroke: none; fill: var(--accent-ink); transition: rotate .3s var(--ease); }
.logo .logo-bg { fill: var(--accent); }
.top-actions { grid-area: actions; display: flex; gap: 8px; min-width: 0; }
.theme-toggle { display: none; } /* on phones the theme switch lives in the footer */
.search { grid-area: search; position: relative; margin-top: 6px; }
.search svg { position: absolute; left: 16px; top: 14px; width: 20px; height: 20px; stroke: var(--muted); stroke-width: 2; pointer-events: none; }
.search input {
  width: 100%; height: 48px; padding: 0 16px 0 46px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 14px; font-weight: 500; font-size: 16px; /* 16px stops iOS zooming on focus */
  -webkit-appearance: none; appearance: none; transition: border-color .2s, box-shadow .2s;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.search kbd { display: none; }

/* ---------- sections switch ---------- */
.tabs { margin-top: 14px; display: flex; gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
/* each tab takes the room its label needs: words differ a lot in length between languages */
.tabs a { flex: 1 1 auto; padding: 0 6px; white-space: nowrap; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 10px; font-weight: 500; font-size: 14px; color: var(--muted); transition: color .2s, background .2s; }
.tabs a[aria-current] { background: var(--text); color: var(--bg); font-weight: 600; }
.tabs .long { display: none; }

/* ---------- featured deal + ending soon ---------- */
.feature { margin-top: 20px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.feature > * { min-width: 0; }
.top-deal { display: flex; gap: 14px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; min-width: 0; }
.top-deal img { width: 132px; height: 132px; object-fit: cover; border-radius: 12px; flex: none; background: var(--surface2); }
.top-deal > div { display: flex; flex-direction: column; min-width: 0; padding: 2px 0; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.top-deal h2 { margin-top: 4px; font: 700 20px/1.15 var(--display); letter-spacing: -.02em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.top-price { margin-top: auto; padding-top: 8px; display: flex; align-items: center; gap: 4px 8px; flex-wrap: wrap; }
.top-price b { font-size: 20px; letter-spacing: -.01em; }
.top-price s { font-size: 13px; }
.top-deal .muted { margin-top: 4px; font-size: 13px; }

.ending { padding-bottom: 4px; }
.ending ul { margin-top: 8px; }
.ending li a { display: flex; align-items: center; gap: 12px; min-height: 72px; border-top: 1px solid var(--line); }
.ending img { width: 52px; height: 52px; object-fit: cover; border-radius: 10px; flex: none; background: var(--surface2); }
.row-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.row-title { font-weight: 500; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-left, .card-left { white-space: nowrap; display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; color: var(--sale-text); }
.row-price { display: flex; flex-direction: column; align-items: flex-end; flex: none; }
.row-price s { font-size: 12px; }

/* ---------- results ---------- */
.browse { margin-top: 28px; }
/* Filters: one form in a card. On wide screens every change applies at once; on phones the form
   opens as a full-screen panel with a single "show results" button. Without JavaScript it is a
   plain form above the results with that same button. */
.side { display: grid; gap: 20px; margin-bottom: 24px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; }
.js .side { display: none; }
.js.filters-open { overflow: hidden; }
.js.filters-open .side { display: flex; flex-direction: column; gap: 0; position: fixed; inset: 0; z-index: 50; margin: 0; padding: 0; border: 0; border-radius: 0; background: var(--bg); }
.side .group { min-width: 0; }
.side h3 { margin-bottom: 10px; font: 600 14px var(--body); }
.side-head { display: flex; align-items: center; gap: 12px; }
.side-head h2 { margin-right: auto; font: 700 18px var(--display); letter-spacing: -.02em; }
.side-reset { font-size: 14px; font-weight: 500; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.side-close { display: none; }
.js.filters-open .side-head { flex: none; height: 64px; padding: 0 var(--gutter); border-bottom: 1px solid var(--line); }
.js.filters-open .side-close { display: inline-flex; }
.js.filters-open .side .group { padding: 20px var(--gutter) 0; }
.js.filters-open .side .group:last-of-type { flex: 1; min-height: 0; display: flex; flex-direction: column; padding-bottom: 12px; }

/* price: two amounts and shortcuts that fill them */
.amounts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.amount { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; cursor: text; transition: border-color .2s; }
.amount:focus-within { border-color: var(--accent); }
.amount span { font-size: 14px; color: var(--muted); }
.amount input { width: 100%; min-width: 0; height: 100%; padding: 0; background: none; border: 0; outline: 0; font-size: 16px; font-weight: 600; -moz-appearance: textfield; appearance: textfield; }
.amount input::placeholder { color: var(--muted); font-weight: 400; }
.amount input::-webkit-outer-spin-button, .amount input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.presets { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.presets button { height: 36px; padding: 0 12px; cursor: pointer; background: none; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--muted); transition: border-color .2s, color .2s, background .2s; }
.presets button[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }

/* genres: search and a scrolling list of checkboxes */
.side-search { position: relative; margin-bottom: 6px; }
.side-search svg { position: absolute; left: 12px; top: 14px; width: 16px; height: 16px; stroke: var(--muted); stroke-width: 2; pointer-events: none; }
.side-search input { width: 100%; height: 44px; padding: 0 12px 0 36px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; font-size: 16px; -webkit-appearance: none; appearance: none; transition: border-color .2s; }
.side-search input::placeholder { color: var(--muted); }
.side-search input:focus { outline: 0; border-color: var(--accent); }
.checks { max-height: 320px; overflow-y: auto; margin: 0 -8px; padding: 0 8px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.js.filters-open .checks { max-height: none; flex: 1; min-height: 0; }
.check { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 8px; margin: 0 -8px; border-radius: 10px; cursor: pointer; }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check i { flex: none; width: 20px; height: 20px; border: 1.5px solid var(--muted); border-radius: 6px; display: grid; place-items: center; transition: background .15s, border-color .15s; }
.check i::after { content: ""; width: 10px; height: 6px; margin-top: -2px; border: solid var(--accent-ink); border-width: 0 0 2px 2px; rotate: -45deg; scale: 0; transition: scale .15s var(--ease); }
.check input:checked + i { background: var(--accent); border-color: var(--accent); }
.check input:checked + i::after { scale: 1; }
.check input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }
.check span { flex: 1; min-width: 0; font-weight: 500; }
.check input:checked ~ span { font-weight: 600; }
.check em { font-style: normal; font-size: 13px; color: var(--muted); }
.checks .note { padding: 12px 0; }

/* one button for the whole form */
.side-foot { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; }
.side-foot .btn { height: 48px; justify-content: center; padding: 0 18px; }
.btn.primary { background: var(--accent); border-color: transparent; color: var(--accent-ink); }
.js.filters-open .side-foot { flex: none; padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: var(--bg); }
main .results, main .feature { transition: opacity .15s; }
main.busy .results, main.busy .feature { opacity: .5; }

.results-head h1 { font: 700 20px/1.2 var(--display); letter-spacing: -.02em; overflow-wrap: anywhere; }
.results-head h1 span { display: block; margin-top: 2px; font: 500 14px var(--body); letter-spacing: 0; color: var(--muted); }
.toolbar { margin-top: 12px; display: flex; gap: 8px; }
.toolbar .menu { flex: 1; min-width: 0; }
.toolbar .menu summary { width: 100%; }
.toolbar .menu summary .caret { margin-left: auto; flex: none; }
.toolbar .btn svg:not(.caret) { width: 18px; height: 18px; stroke-width: 1.8; }
.badge { min-width: 20px; height: 20px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 600; }
.applied { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.applied a { height: 36px; padding: 0 10px 0 12px; display: inline-flex; align-items: center; gap: 6px; background: var(--surface2); border-radius: 999px; font-size: 14px; font-weight: 500; }
.applied a svg { width: 14px; height: 14px; stroke-width: 2; color: var(--muted); }
.applied a.clear { background: none; padding: 0 4px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }

.grid { margin-top: 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; }
.card { display: flex; flex-direction: column; min-width: 0; }
.card img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 14px; background: var(--surface); }
.card img { transition: translate .3s var(--ease), box-shadow .3s var(--ease); }
.card h3 { margin-top: 10px; font-weight: 500; font-size: 14px; line-height: 1.3; height: 2.6em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.card-price { margin-top: 6px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.card-price b { font-size: 15px; }
.card-old, .card-left { margin-top: 2px; font-size: 12px; }

/* ---------- genre links under the list ---------- */
.about-list { margin-top: 48px; max-width: 70ch; font-size: 14px; line-height: 1.6; color: var(--muted); }
.about-list + .genre-links { margin-top: 24px; }
.genre-links { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
.genre-links h2 { font: 600 14px var(--body); color: var(--muted); }
.genre-links ul { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.genre-links a { display: flex; align-items: center; height: 36px; padding: 0 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; font-size: 14px; font-weight: 500; }
.genre-links a[aria-current] { background: var(--surface2); font-weight: 600; }

/* ---------- pagination ---------- */
.pages { margin-top: 36px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.pages > div { display: flex; align-items: center; gap: 4px; }
.pages a, .pages .step { min-width: 40px; height: 44px; padding: 0 6px; display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; font-weight: 500; transition: border-color .2s; }
.pages a[aria-current] { background: var(--accent); border-color: transparent; color: var(--accent-ink); font-weight: 600; }
.pages .step svg { width: 14px; height: 14px; stroke-width: 1.6; }
.pages .step span { display: none; }
.pages .off { background: none; color: var(--muted); opacity: .5; }
.pages .gap { width: 20px; text-align: center; color: var(--muted); }
.pages .near { display: none; }
.pages p { font-size: 13px; color: var(--muted); }

/* ---------- game page ---------- */
.back { margin-top: 8px; height: 44px; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; color: var(--muted); }
.back svg { width: 14px; height: 14px; stroke-width: 1.6; }
.game { display: grid; gap: 20px; }
.art { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 20px; background: var(--surface); view-transition-name: cover; }
.game-body { min-width: 0; display: flex; flex-direction: column; }
.game h1 { font: 700 28px/1.1 var(--display); letter-spacing: -.03em; text-wrap: balance; overflow-wrap: anywhere; }
.game-body > .muted { margin-top: 6px; }
.tags { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.tags a { height: 34px; padding: 0 12px; display: flex; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; font-size: 13px; font-weight: 500; }
/* everything below the cover and price runs full width, one panel under another with space between */
.game-more { margin-top: 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
/* The price card. On sale it opens with a coloured band: the discount and when it ends. */
.game-body .buy { margin-top: 20px; display: flex; flex-direction: column; gap: 16px; overflow: hidden; }
.sale-band { display: flex; align-items: center; gap: 14px; margin: -16px -16px 0; padding: 14px 16px; background: var(--sale-bg); color: var(--sale-text); }
.sale-pct { font: 700 34px/1 var(--display); letter-spacing: -.03em; }
.sale-text { display: grid; gap: 2px; min-width: 0; font-size: 14px; }
.sale-text > b { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.countdown { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; font-weight: 500; }
.countdown .clock { width: 15px; height: 15px; }
.countdown b { font-weight: 700; }
.price-block { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 14px 28px; }
.price-now { display: grid; gap: 4px; }
.price-now span, .price-facts dt { font-size: 13px; color: var(--muted); }
.price-now b { font: 700 40px/1 var(--display); letter-spacing: -.03em; }
.on-sale .price-now b { color: var(--sale-text); }
.price-facts { display: flex; gap: 24px; padding-bottom: 3px; }
.price-facts div { display: grid; gap: 4px; }
.price-facts dd { font-weight: 600; font-size: 17px; }
.price-facts s { font-weight: 500; }
.price-facts .save { color: var(--sale-text); }
.no-sale { padding-bottom: 6px; color: var(--muted); }
.lowest { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.lowest.good { color: var(--good); font-weight: 500; }
.lowest svg { width: 16px; height: 16px; stroke-width: 2.4; flex: none; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tiles div { padding: 10px 12px; background: var(--surface2); border-radius: 12px; min-width: 0; }
.tiles .wide { grid-column: 1 / -1; }
.tiles dt { font-size: 12px; color: var(--muted); }
.tiles dd { margin-top: 2px; font-weight: 600; }
.cta { height: 52px; display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--accent); color: var(--accent-ink); border-radius: 14px; font-weight: 600; font-size: 16px; transition: filter .2s, translate .2s var(--ease); }
.cta svg { width: 15px; height: 15px; stroke-width: 2.4; }
.cta:active { translate: 0 1px; }

.chart-box { position: relative; height: 200px; margin-top: 14px; }
.panel h3 { margin-top: 24px; font: 600 14px var(--body); }
.panel > .note { margin-top: 6px; }
.panel > .note b { color: var(--text); }
.js-only { display: none; } .js .js-only { display: block; }
.js button.js-only { display: inline-flex; }
.code { width: 30px; height: 22px; display: flex; align-items: center; justify-content: center; border-radius: 6px; background: var(--surface2); font-size: 11px; font-weight: 600; color: var(--muted); flex: none; }
/* prices per country as a plain list: shown without JavaScript, or when prices cannot be converted to one currency */
.price-list { margin-top: 10px; }
.price-list a { display: flex; align-items: center; gap: 10px; min-height: 48px; border-top: 1px solid var(--line); }
.price-list li:first-child a { border-top: 0; }
.price-list a span:nth-of-type(1) { flex: 1; min-width: 0; font-weight: 500; }
.price-list s { font-size: 13px; }
.js .no-js-only { display: none; }
@keyframes grow { from { width: 0; } }
.price-list + .note, .chart-box + .price-list + .note { margin-top: 12px; }
.desc { margin: 10px 0 14px; color: var(--muted); line-height: 1.55; }
.panel > header + .tiles { margin-top: 12px; }
.cap { text-transform: capitalize; }

/* ---------- price alerts ---------- */
.track summary { list-style: none; width: 100%; height: 52px; justify-content: center; border-radius: 14px; font-size: 16px; user-select: none; }
.track summary::-webkit-details-marker { display: none; }
.track summary svg { width: 18px; height: 18px; stroke-width: 2; }
.track[open] summary { border-color: var(--muted); }
.track form { margin-top: 16px; display: grid; gap: 18px; }
.track fieldset { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; gap: 2px; }
.track legend { float: left; width: 100%; padding: 0; margin-bottom: 6px; font-weight: 600; font-size: 14px; }
.track legend + * { clear: both; }
.opt { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; min-height: 44px; cursor: pointer; }
.opt input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.opt i { flex: none; width: 20px; height: 20px; border: 1.5px solid var(--muted); border-radius: 50%; display: grid; place-items: center; transition: border-color .15s; }
.opt i::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); scale: 0; transition: scale .15s var(--ease); }
.opt input:checked + i { border-color: var(--accent); }
.opt input:checked + i::after { scale: 1; }
.opt input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }
.amount.small { width: 130px; height: 40px; background: var(--surface2); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pills label { cursor: pointer; position: relative; }
.pills input { position: absolute; opacity: 0; pointer-events: none; }
.pills span { display: flex; align-items: center; height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--muted); transition: background .2s, color .2s, border-color .2s; }
.pills input:checked + span { background: var(--text); border-color: var(--text); color: var(--bg); }
.pills input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.channels { gap: 12px !important; }
.js-only-inline { display: none; } .js .js-only-inline { display: block; }
.channels .track-notice { margin-top: 0; }
.field-email { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.field-email span { font-weight: 500; color: var(--muted); }
.field-email input { height: 48px; padding: 0 14px; background: var(--surface2); border: 1px solid var(--line); border-radius: 12px; font-size: 16px; font-weight: 500; transition: border-color .2s; }
.field-email input:focus { outline: 0; border-color: var(--accent); }
.track form .btn.primary { height: 52px; justify-content: center; border-radius: 14px; font-size: 16px; }
.track-notice { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--good) 14%, transparent); font-weight: 500; }
.track-notice.failed { background: var(--sale-bg); color: var(--sale-text); }

.alerts { max-width: 760px; padding-top: 24px; display: grid; gap: 12px; }
.alerts h1 { font: 700 28px/1.15 var(--display); letter-spacing: -.03em; }
.alert-list { margin-top: 8px; }
.alert-list li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.alert-game { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.alert-game img { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; flex: none; background: var(--surface); }
.alert-game > span { display: grid; gap: 2px; min-width: 0; }
.alert-game .muted { font-size: 13px; }
.alert-all { margin-top: 12px; }
.link-btn { padding: 8px 0; background: none; border: 0; cursor: pointer; color: var(--muted); font: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- footer ---------- */
.foot { margin-top: 48px; padding-top: 20px; padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); font-size: 13px; line-height: 1.5; color: var(--muted); display: grid; gap: 12px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.foot nav a { padding: 4px 0; }
.foot p { max-width: 72ch; }
.foot-alerts { color: var(--text); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.foot-theme { justify-self: start; padding: 4px 0; background: none; border: 0; cursor: pointer; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- from large phones up ---------- */
@media (min-width: 420px) { .pages a, .pages .step { min-width: 44px; } .pages > div { gap: 6px; } }
@media (min-width: 560px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pages .near { display: flex; }
  .menu-list { position: absolute; left: auto; right: 0; top: calc(100% + 8px); min-width: 200px; }
  .menu-list.two { width: 360px; }
  .menu.compact summary { width: auto; padding: 0 12px; }
  .menu.compact summary span { display: inline; }
  .menu.compact summary .caret { display: block; }
  .theme-toggle { display: inline-flex; }
  .foot-theme { display: none; }
}
@media (min-width: 760px) {
  :root { --gutter: 28px; }
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 20px; }
  .feature { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; }
  .top-deal { padding: 20px; gap: 28px; border-radius: 24px; }
  .top-deal img { width: 200px; height: 200px; border-radius: 16px; }
  .top-deal > div { padding: 6px 0; }
  .eyebrow { font-size: 13px; }
  .top-deal h2 { margin-top: 8px; font-size: 34px; line-height: 1.05; letter-spacing: -.03em; -webkit-line-clamp: 3; }
  .top-price b { font: 700 32px/1.1 var(--display); letter-spacing: -.03em; }
  .top-price .chip { padding: 5px 9px; border-radius: 9px; font-size: 16px; }
  .top-price s { font-size: 16px; }
  .ending { padding: 20px 20px 8px; border-radius: 24px; }
  .panel h2 { font-size: 20px; }
  .pages { flex-direction: row-reverse; justify-content: space-between; margin-top: 48px; }
  .pages .step { padding: 0 14px; }
  .pages .step span { display: inline; }
  .pages p { font-size: 14px; }
  .game { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 36px; align-items: start; }
  .art { border-radius: 24px; }
  .game-more { margin-top: 24px; gap: 20px; }
  .tiles { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
  .buy .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .desc { max-width: 72ch; }
  .game h1 { font-size: 36px; }
  .panel { padding: 20px; }
  .sale-band { margin: -20px -20px 0; padding: 16px 20px; }
  .chart-box { height: 260px; }
  .foot { margin-top: 72px; }
}

/* ---------- desktop: one-row header, filter sidebar ---------- */
@media (min-width: 1000px) {
  :root { --gutter: 40px; }
  .top { display: flex; gap: 24px; padding-block: 18px; }
  .logo { font-size: 26px; gap: 12px; margin-right: 8px; }
  .logo svg { width: 40px; height: 40px; }
  .search { flex: 1 1 auto; margin: 0; }
  .search input { height: 46px; padding-right: 52px; font-size: 15px; }
  .search svg { top: 13px; }
  .search kbd { display: flex; position: absolute; right: 12px; top: 11px; width: 24px; height: 24px; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 7px; font: 600 12px var(--body); color: var(--muted); }
  .search input:focus + kbd { display: none; }

  .tabs { display: inline-grid; grid-template-columns: repeat(4, auto); margin-top: 4px; }
  .tabs a { padding: 0 18px; }
  .tabs .short { display: none; } .tabs .long { display: inline; }

  .browse { margin-top: 40px; display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 40px; align-items: start; }
  .side, .js .side, .js.filters-open .side { display: grid; gap: 22px; position: static; margin: 0; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; } /* scrolls with the page */
  .js.filters-open { overflow: visible; }
  .js.filters-open .side-head { height: auto; padding: 0; border: 0; }
  .side-close, .js.filters-open .side-close { display: none; }
  .js.filters-open .side .group, .js.filters-open .side .group:last-of-type { display: block; padding: 0; }
  .js.filters-open .checks { max-height: 320px; }
  .js .side-foot { display: none; } /* every change applies at once here */
  .amount { height: 42px; }
  .amount input, .side-search input { font-size: 15px; }
  .side-search input { height: 42px; }
  .side-search svg { top: 13px; }
  .check { min-height: 38px; }
  .only-narrow { display: none; }
  .js .only-narrow.js-only { display: none; }

  .results-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
  .results-head h1 { font-size: 28px; letter-spacing: -.03em; }
  .results-head h1 span { display: inline; margin-left: 6px; font-size: 16px; }
  .toolbar { margin: 0; }
  .toolbar .menu { flex: none; }
  .applied { margin-top: 16px; }
  .grid { margin-top: 24px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .card img { border-radius: 16px; }
  .card h3 { margin-top: 12px; font-size: 15px; }
  .card-price { margin-top: 8px; gap: 8px; }
  .card-price b { font-size: 16px; }
  .card-price .chip { font-size: 13px; }
  .card-old, .card-left { font-size: 13px; }

  .game { grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 48px; }
  .game-body { padding-top: 8px; }
  .game-more { margin-top: 32px; }
  .panel { padding: 24px; }
  .sale-band { margin: -24px -24px 0; padding: 18px 24px; gap: 18px; }
  .sale-pct { font-size: 44px; }
  .price-now b { font-size: 52px; }
  .price-facts dd { font-size: 19px; }
  .cta { align-self: flex-start; padding: 0 28px; }
  .chart-box { height: 300px; }
  .game h1 { font-size: 40px; }
}
@media (min-width: 1240px) { .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } .top-deal img { width: 240px; height: 240px; } .top-deal h2 { font-size: 40px; } }

/* ---------- pointer devices ---------- */
@media (hover: hover) {
  .btn:hover, .pages a:hover, .tags a:hover, .genre-links a:hover, .presets button:hover { border-color: var(--muted); }
  .btn.primary:hover { border-color: transparent; filter: brightness(1.08); }
  .presets button:hover { color: var(--text); }
  .presets button[aria-pressed="true"]:hover { color: var(--bg); }
  .check:hover { background: var(--surface2); }
  .side-reset:hover { color: var(--text); }
  .tabs a:hover { color: var(--text); }
  .tabs a[aria-current]:hover { color: var(--bg); }
  .logo:hover svg { rotate: -6deg; }
  .card:hover img { translate: 0 -4px; box-shadow: var(--shadow); }
  .card:hover h3, .ending li a:hover .row-title, .top-deal:hover h2 { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--muted); }
  .top-deal { transition: border-color .2s; }
  .top-deal:hover { border-color: var(--muted); }
  .applied a:not(.clear):hover svg { color: var(--text); }
  .panel > header a:hover, .back:hover, .foot a:hover { color: var(--text); }
  .cta:hover { filter: brightness(1.08); translate: 0 -1px; }
  .menu-list a:hover { background: var(--surface2); }
  .price-list a:hover span:nth-of-type(1) { text-decoration: underline; text-underline-offset: 3px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  @view-transition { navigation: none; }
}
