/* =========================================================
   GameHunch – dark glass theme
   ========================================================= */
/* Fonts are self-hosted (no requests to Google). Both are variable fonts under the SIL Open Font License. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/fonts/inter-latin.woff2) format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 500 700; font-display: swap; src: url(/fonts/space-grotesk-latin.woff2) format("woff2"); }

:root {
  --bg: #06070c;
  --surface: rgba(20, 23, 35, 0.66);
  --surface-solid: #12151f;
  --surface-hi: rgba(255, 255, 255, 0.045);
  --surface-hover: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.08);
  --border-hi: rgba(255, 255, 255, 0.16);
  --text: #eef0f7;
  --muted: #8f98ad;
  --faint: #5d6579;
  --violet: #8b5cf6;
  --violet-hi: #a78bfa;
  --indigo: #6366f1;
  --cyan: #22d3ee;
  --pink: #f472b6;
  --sale: #34d399;
  --gold: #fbbf24;
  --danger: #f87171;
  --grad: linear-gradient(135deg, #8b5cf6 0%, #6366f1 45%, #22d3ee 100%);
  --grad-soft: linear-gradient(135deg, rgba(139, 92, 246, 0.22), rgba(34, 211, 238, 0.14));
  --radius: 18px;
  --radius-sm: 11px;
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  --font-head: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; color: inherit; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }
::selection { background: rgba(139, 92, 246, 0.45); }

/* ---------- animated background ---------- */
.backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.5; animation: drift 26s ease-in-out infinite alternate; }
.b1 { width: 620px; height: 620px; background: #6d28d9; top: -220px; left: -160px; }
.b2 { width: 520px; height: 520px; background: #0e7490; top: 25%; right: -200px; animation-delay: -8s; opacity: 0.38; }
.b3 { width: 480px; height: 480px; background: #be185d; bottom: -260px; left: 30%; animation-delay: -16s; opacity: 0.22; }
.grid-lines {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}
@keyframes drift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(80px, 60px) scale(1.12); }
  100% { transform: translate(-40px, 120px) scale(0.95); }
}

/* ---------- glass surfaces ---------- */
.glass {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 14px max(24px, calc((100vw - 1400px) / 2 + 24px));
  background: rgba(6, 7, 12, 0.6);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-head); font-size: 22px; font-weight: 700; letter-spacing: -0.02em;
  color: var(--text); text-decoration: none;
}
.logo-accent { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo-mark {
  width: 22px; height: 22px; background: var(--grad);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.8);
  animation: spin-slow 12s linear infinite;
}
@keyframes spin-slow { to { transform: rotate(360deg); } }

.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface-hi); border: 1px solid var(--border); }
.tabs a {
  padding: 7px 16px; border-radius: 999px;
  color: var(--muted); text-decoration: none; font-weight: 500; font-size: 14px;
  transition: color .2s, background .2s;
}
.tabs a:hover { color: var(--text); }
.tabs a.active { color: white; background: var(--grad-soft); box-shadow: inset 0 0 0 1px rgba(167, 139, 250, 0.4); }

.account { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.user-pill {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 6px 4px 4px; border-radius: 999px;
  background: var(--surface-hi); border: 1px solid var(--border);
}
.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--grad); font-weight: 700; font-size: 13px; color: white;
}
.user-pill .name { font-weight: 600; font-size: 14px; }

/* ---------- buttons ---------- */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 12px;
  font-weight: 600; font-size: 14px; cursor: pointer;
  border: 1px solid transparent; transition: transform .15s, filter .2s, background .2s, border-color .2s;
  text-decoration: none; white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; transition: transform .2s; }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--grad); color: white; box-shadow: 0 8px 30px -8px rgba(124, 92, 255, 0.7); }
.btn-primary::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .6s;
}
.btn-primary:hover::after { transform: translateX(120%); }
.btn-primary:hover svg { transform: translateX(3px); }
.btn-primary:disabled { filter: saturate(.4) brightness(.8); cursor: wait; }
.btn-ghost { background: var(--surface-hi); border-color: var(--border-hi); color: var(--text); }
.btn-ghost:hover { background: var(--surface-hover); }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; padding: 14px; font-size: 16px; border-radius: 14px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.btn-row.end { justify-content: flex-end; }
.icon-btn {
  width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: 9px; border: 1px solid var(--border); background: rgba(6,7,12,.6);
  cursor: pointer; color: var(--muted); transition: color .2s, border-color .2s, background .2s;
}
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn:hover { color: var(--text); border-color: var(--border-hi); }
.icon-btn.danger:hover { color: var(--danger); border-color: var(--danger); }
:focus-visible { outline: 2px solid var(--violet-hi); outline-offset: 2px; }

/* ---------- page layout ---------- */
main { max-width: 1400px; margin: 0 auto; padding: 0 24px 40px; }
.view { animation: fade-up .45s ease both; }
@keyframes fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.hero { text-align: center; padding: 56px 0 36px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 14px; padding: 5px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--violet-hi); background: rgba(139, 92, 246, 0.1); border: 1px solid rgba(139, 92, 246, 0.25);
}
.pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--sale); box-shadow: 0 0 0 0 rgba(52, 211, 153, .7); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }
h1 {
  font-family: var(--font-head); font-weight: 700; letter-spacing: -0.035em;
  font-size: clamp(34px, 5.5vw, 60px); line-height: 1.05; margin: 0;
}
.grad-text { background: linear-gradient(120deg, #c4b5fd, #818cf8 40%, #22d3ee); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { color: var(--muted); font-size: 17px; max-width: 580px; margin: 14px auto 0; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 48px 0 28px; }
.page-head .lead { margin-left: 0; }
.page-head.center { justify-content: center; text-align: center; }
.page-head.center .lead { margin-left: auto; }

/* ---------- only on GameHunch ---------- */
.unique { margin: 0 0 28px; }
.unique-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.unique-grid li { padding: 18px; border-radius: var(--radius); }
.unique-grid h3 { font-family: var(--font-head); font-size: 16px; margin: 12px 0 6px; }
.unique-grid p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.unique-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: var(--grad-soft); border: 1px solid rgba(167, 139, 250, .35); color: var(--violet-hi); }
.unique-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 1100px) { .unique-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .unique-grid { grid-template-columns: 1fr; } }

.layout { display: grid; grid-template-columns: 370px 1fr; gap: 28px; align-items: start; }

/* ---------- preferences panel ---------- */
.panel { padding: 22px; position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow-y: auto; scrollbar-width: thin; }
.field + .field { margin-top: 24px; }
.field h2 {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-head); font-size: 15px; font-weight: 600; margin: 0 0 12px;
}
.step {
  width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center;
  font-size: 12px; background: var(--grad-soft); border: 1px solid rgba(167, 139, 250, .35); color: var(--violet-hi);
}
.hint { font-size: 12.5px; color: var(--muted); margin: 8px 0 0; }

input[type=search], input[type=number], input[type=date], input[type=email], input:not([type]), input[type=password], select, textarea {
  width: 100%;
  background: rgba(6, 7, 12, 0.55);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
input:hover, select:hover, textarea:hover { border-color: var(--border-hi); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px rgba(139, 92, 246, .18); background: rgba(6,7,12,.8); }
textarea { resize: vertical; min-height: 60px; }
select { cursor: pointer; }
input[type=date]::-webkit-calendar-picker-indicator { filter: invert(.7); cursor: pointer; }

.input-label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 500; flex: 1; min-width: 0; }
.input-label input, .input-label select, .input-label textarea { color: var(--text); font-weight: 400; }
.row { display: flex; gap: 10px; }

.search { position: relative; }
.search-icon { position: absolute; left: 12px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input { padding-left: 38px; }
.suggestions {
  position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px);
  list-style: none; margin: 0; padding: 6px;
  background: rgba(16, 19, 29, 0.97); border: 1px solid var(--border-hi); border-radius: 14px;
  max-height: 340px; overflow-y: auto;
  box-shadow: 0 24px 50px -10px rgba(0, 0, 0, .8);
  backdrop-filter: blur(20px);
}
.suggestions li { display: flex; align-items: center; gap: 12px; padding: 7px 9px; border-radius: 9px; cursor: pointer; font-size: 14px; }
.suggestions li img { width: 72px; height: 27px; object-fit: cover; border-radius: 5px; flex-shrink: 0; }
.suggestions li:hover, .suggestions li.active { background: var(--surface-hover); }
.suggestions li.none { color: var(--muted); cursor: default; }
.suggestions .owned-tag { margin-left: auto; font-size: 11px; color: var(--sale); }

.chips { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips:empty { margin: 0; }
.chips li {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--grad-soft); border: 1px solid rgba(167, 139, 250, .4); border-radius: 999px;
  padding: 4px 5px 4px 12px; font-size: 13px; font-weight: 500;
  animation: pop .25s ease;
}
@keyframes pop { from { transform: scale(.85); opacity: 0; } }
.chips button { border: 0; background: transparent; cursor: pointer; color: var(--muted); width: 20px; height: 20px; border-radius: 50%; line-height: 1; }
.chips button:hover { background: var(--violet); color: white; }

/* Liked-game chips: click the name to pick what you loved about it */
.chips li { padding: 0 5px 0 0; max-width: 100%; }
.chips li.focused { border-color: rgba(34, 211, 238, .55); }
.chips li.open { box-shadow: 0 0 0 2px rgba(167, 139, 250, .45); }
.chips .chip-main {
  width: auto; height: auto; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; min-width: 0;
  padding: 4px 4px 4px 12px; color: var(--text); font: inherit; line-height: 1.35; text-align: left;
}
.chips .chip-main:hover { background: transparent; color: white; }
.chips .chip-main svg { width: 14px; height: 14px; flex-shrink: 0; fill: none; stroke: var(--violet-hi); stroke-width: 2; stroke-linecap: round; }
.chip-ask {
  display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; color: #ddd6fe;
  padding: 2px 8px 2px 6px; border-radius: 999px; background: rgba(139, 92, 246, .28); border: 1px solid rgba(167, 139, 250, .5);
  white-space: nowrap; transition: background .15s;
}
.chips .chip-main:hover .chip-ask { background: rgba(139, 92, 246, .5); color: white; }
.aspects.flash { animation: pop .2s ease, aspects-glow 1.6s ease; }
@keyframes aspects-glow { 0%, 40% { box-shadow: 0 0 0 3px rgba(167, 139, 250, .55), 0 0 28px rgba(139, 92, 246, .35); } 100% { box-shadow: none; } }
.refine {
  display: flex; align-items: flex-start; gap: 6px; margin: -2px 0 0; padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: 12.5px; color: var(--muted); text-align: left;
}
.refine svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 2px; fill: none; stroke: var(--cyan); stroke-width: 2; stroke-linecap: round; }
.refine u { color: #a5f3fc; text-decoration-color: rgba(34, 211, 238, .5); text-underline-offset: 2px; }
.refine:hover, .refine:hover u { color: white; }
.chip-focus { font-size: 11.5px; color: #a5f3fc; font-weight: 500; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-focus::before { content: "· "; color: var(--muted); }
.aspects { margin-top: 10px; padding: 12px; border-radius: 12px; background: var(--surface-hi); border: 1px solid rgba(167, 139, 250, .35); animation: pop .2s ease; }
.aspects-q { margin: 0 0 10px; font-size: 13.5px; }
.aspects .tag-picker { margin: 0; }
.aspects-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.steam-game { border: 0; padding: 0; background: none; font: inherit; color: #bfe6fb; cursor: pointer; text-decoration: underline dotted rgba(102, 192, 244, .6); text-underline-offset: 3px; }
.steam-game:hover { color: white; }

.steam-import { margin-top: 14px; }
.steam-open {
  width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer;
  padding: 11px 13px; border-radius: 12px; color: var(--text); font: inherit;
  background: linear-gradient(135deg, rgba(23, 26, 33, .9), rgba(42, 71, 94, .55));
  border: 1px solid rgba(102, 192, 244, .3); transition: border-color .15s, transform .15s;
}
.steam-open:hover { border-color: rgba(102, 192, 244, .65); transform: translateY(-1px); }
.steam-open svg { width: 28px; height: 28px; flex-shrink: 0; fill: none; stroke: #66c0f4; stroke-width: 1.6; }
.steam-open span { display: grid; gap: 1px; }
.steam-open strong { font-size: 14px; }
.steam-open small { font-size: 12px; color: var(--muted); }
.steam-form { padding: 12px; border-radius: 12px; background: var(--surface-hi); border: 1px solid var(--border); }
.steam-form .input-label { margin-bottom: 6px; }
.steam-row { display: flex; gap: 8px; }
.steam-row input { flex: 1; min-width: 0; }
.steam-error { font-size: 13px; margin: 8px 0 0; }
.steam-connected {
  display: grid; grid-template-columns: auto 1fr auto; gap: 4px 11px; align-items: center;
  padding: 11px 12px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(42, 71, 94, .45), rgba(23, 26, 33, .6)); border: 1px solid rgba(102, 192, 244, .35);
}
.steam-connected img, .steam-connected .avatar { width: 38px; height: 38px; border-radius: 9px; grid-row: span 2; background: #1b2838; }
.steam-connected .who { font-size: 14px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.steam-connected .top { grid-column: 2 / 4; font-size: 12px; color: var(--muted); margin: 0; }
.steam-connected .remove { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 12.5px; padding: 2px 4px; border-radius: 6px; }
.steam-connected .remove:hover { color: var(--text); background: var(--surface-hover); }
.steam-connected .preview { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--gold); margin-right: 6px; }

.library-taste { margin-top: 14px; padding: 12px; border-radius: 12px; background: var(--surface-hi); border: 1px solid var(--border); display: grid; gap: 10px; }
.library-taste .switch { margin: 0; font-size: 13px; }

.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mode {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer;
  background: var(--surface-hi); border: 1px solid var(--border); border-radius: 14px; color: var(--muted);
  transition: all .2s;
}
.mode svg { width: 26px; height: 26px; }
.mode:hover { color: var(--text); border-color: var(--border-hi); transform: translateY(-1px); }
.mode[aria-pressed=true] { color: white; background: var(--grad-soft); border-color: rgba(167, 139, 250, .6); box-shadow: 0 0 24px -6px rgba(139, 92, 246, .6); }
.mode[aria-pressed=true] svg { color: var(--cyan); }

.tag-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-btn {
  padding: 5px 11px; font-size: 13px; cursor: pointer; color: var(--muted);
  background: var(--surface-hi); border: 1px solid var(--border); border-radius: 999px;
  transition: all .15s;
}
.tag-btn:hover { color: var(--text); border-color: var(--border-hi); }
.tag-btn[aria-pressed=true] { background: var(--grad); border-color: transparent; color: white; box-shadow: 0 4px 16px -4px rgba(139, 92, 246, .7); }

.tag-btn.excluded { background: rgba(244, 63, 94, .12); border-color: rgba(244, 63, 94, .45); color: #fda4af; text-decoration: line-through; }
.tag-btn.excluded::before { content: "−"; margin-right: 4px; text-decoration: none; display: inline-block; }
.tag-btn.demo { cursor: default; padding: 1px 8px; font-size: 11.5px; margin-left: 4px; }

/* more filters, release mode */
.more-filters { margin-top: 24px; }
.more-filters > summary { list-style: none; color: var(--text); }
.more-filters > summary::-webkit-details-marker { display: none; }
.more-filters > summary h2 { margin: 0; }
.more-filters > summary h2::after { content: "+"; margin-left: auto; color: var(--violet-hi); font-size: 18px; font-weight: 400; }
.more-filters[open] > summary h2::after { content: "–"; }
.more-filters[open] > summary h2 { margin-bottom: 12px; }
.more-filters small { font-family: var(--font-body, inherit); font-size: 12px; font-weight: 500; color: var(--violet-hi); }
.more-filters .row + .row { margin-top: 10px; }
.more-filters input { margin: 0; }
.release-mode { display: flex; margin: 24px 0 0; }
.release-mode label { flex: 1; }
.upcoming-hint { margin-top: 8px; }
#go { margin-top: 14px; }
.votes-note { font-size: 12.5px; color: var(--muted); margin: 10px 0 0; }
.votes-note button { background: none; border: 0; padding: 0; color: var(--violet-hi); cursor: pointer; font: inherit; text-decoration: underline; }

details { margin-top: 12px; }
summary { cursor: pointer; color: var(--violet-hi); font-size: 13px; font-weight: 500; }
details input { margin: 10px 0 8px; }
#genres-more { max-height: 200px; overflow-y: auto; }

/* segmented radio control */
.segmented { display: inline-flex; padding: 3px; gap: 2px; border-radius: 12px; background: rgba(6,7,12,.55); border: 1px solid var(--border); margin-top: 12px; }
.segmented.wide { display: flex; margin-top: 0; }
.segmented.wide label { flex: 1; }
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: block; text-align: center; padding: 6px 12px; border-radius: 9px; font-size: 13px; font-weight: 500; color: var(--muted); transition: all .2s; white-space: nowrap; }
.segmented label:hover span { color: var(--text); }
.segmented input:checked + span { background: var(--grad-soft); color: white; box-shadow: inset 0 0 0 1px rgba(167, 139, 250, .45); }
.segmented input:focus-visible + span { outline: 2px solid var(--violet-hi); }
.segmented.small span { padding: 4px 10px; font-size: 12.5px; }

/* toggle switch */
.switch { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 14px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { position: relative; width: 38px; height: 22px; flex-shrink: 0; border-radius: 999px; background: rgba(255,255,255,.12); transition: background .2s; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: white; transition: transform .2s; box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.switch input:checked + .track { background: linear-gradient(135deg, #10b981, var(--sale)); }
.switch input:focus-visible + .track { outline: 2px solid var(--violet-hi); outline-offset: 2px; }
.switch input:checked + .track::after { transform: translateX(16px); }
#prefs .btn-block { margin-top: 26px; }

/* stars */
.stars { display: flex; gap: 4px; }
.stars button { background: none; border: 0; padding: 2px; cursor: pointer; color: rgba(255,255,255,.18); transition: transform .15s, color .15s; }
.stars button svg { width: 26px; height: 26px; fill: currentColor; stroke: none; }
.stars.big button svg { width: 34px; height: 34px; }
.stars button:hover { transform: scale(1.15); }
.stars button.on { color: var(--gold); filter: drop-shadow(0 0 8px rgba(251, 191, 36, .55)); }
.stars.hovering button.on:not(.hover) { color: rgba(255,255,255,.18); filter: none; }
.stars button.hover { color: var(--gold); }
.stars-static { color: var(--gold); letter-spacing: 1px; font-size: 13px; }
.stars-static .off { color: rgba(255,255,255,.18); }

/* ---------- results ---------- */
.status-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 0 0 16px; font-size: 14px; color: var(--muted); }
.status-bar strong { color: var(--text); }
.status-bar .pill { padding: 3px 10px; border-radius: 999px; background: rgba(52,211,153,.12); color: var(--sale); border: 1px solid rgba(52,211,153,.3); font-weight: 600; font-size: 12.5px; }
.status-note { flex-basis: 100%; font-size: 13px; }
.empty { text-align: center; padding: 64px 24px; }
.empty h3 { font-family: var(--font-head); font-size: 21px; margin: 18px 0 6px; }
.empty p { color: var(--muted); margin: 0 auto; max-width: 420px; }
.empty-art { display: flex; justify-content: center; gap: 10px; }
.empty-art span { width: 46px; height: 62px; border-radius: 10px; background: var(--grad-soft); border: 1px solid rgba(167,139,250,.35); animation: float 3s ease-in-out infinite; }
.empty-art span:nth-child(2) { animation-delay: -1s; transform: translateY(-8px); background: linear-gradient(135deg, rgba(34,211,238,.25), rgba(99,102,241,.2)); }
.empty-art span:nth-child(3) { animation-delay: -2s; }
@keyframes float { 50% { transform: translateY(-10px); } }
.error { color: var(--danger); }

.liked-sales { display: grid; gap: 8px; margin-bottom: 18px; }
.liked-sales:empty { display: none; }
.liked-sale {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; padding: 11px 14px; border-radius: 13px;
  background: linear-gradient(90deg, rgba(52,211,153,.16), rgba(52,211,153,.04));
  border: 1px solid rgba(52,211,153,.35); color: #d1fae5;
}
.liked-sale a { color: white; font-weight: 700; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }

.card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: transform .25s, border-color .25s, box-shadow .25s;
  animation: fade-up .5s ease both; animation-delay: calc(var(--i, 0) * 40ms);
}
.card:hover { transform: translateY(-4px); border-color: rgba(167,139,250,.5); box-shadow: 0 30px 60px -25px rgba(124,92,255,.55), var(--shadow); }
.cover { position: relative; aspect-ratio: 460 / 215; overflow: hidden; background: var(--surface-solid); }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.card:hover .cover img { transform: scale(1.06); }
.cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(12,14,22,.85)); }
.badge-sale {
  position: absolute; z-index: 2; top: 12px; left: 12px;
  padding: 4px 10px; border-radius: 8px;
  background: linear-gradient(135deg, #10b981, #6ee7b7); color: #022c22; font-weight: 800; font-size: 14px;
  box-shadow: 0 0 22px rgba(52, 211, 153, .65);
}
.badge-owned {
  position: absolute; z-index: 2; bottom: 10px; left: 12px; font-size: 12px; font-weight: 600;
  padding: 3px 9px; border-radius: 7px; background: rgba(6,7,12,.75); border: 1px solid var(--border-hi);
}
.ring {
  position: absolute; z-index: 2; top: 10px; right: 10px;
  width: 50px; height: 50px; border-radius: 50%;
  background: conic-gradient(var(--cyan) calc(var(--p) * 1%), var(--violet) calc(var(--p) * 1%), rgba(255,255,255,.12) 0);
  display: grid; place-items: center;
  box-shadow: 0 6px 20px rgba(0,0,0,.5);
}
.ring::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: rgba(10,12,20,.92); }
.ring b { position: relative; font-size: 13px; font-family: var(--font-head); line-height: 1; text-align: center; }
.ring small { display: block; font-size: 8px; font-weight: 600; color: var(--muted); letter-spacing: .05em; text-transform: uppercase; margin-top: 1px; }

.card .body { padding: 16px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.card h3 { margin: 0; font-family: var(--font-head); font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.card .title-row { display: flex; align-items: flex-start; gap: 8px; }
.card .title-row h3 { flex: 1; min-width: 0; }
.vote { display: flex; gap: 4px; flex-shrink: 0; }
.vote button {
  width: 30px; height: 30px; display: grid; place-items: center; cursor: pointer; color: var(--muted);
  background: var(--surface-hi); border: 1px solid var(--border); border-radius: 9px; transition: all .15s;
}
.vote button:hover { color: var(--text); border-color: var(--border-hi); }
.vote svg { width: 15px; height: 15px; }
.vote [data-vote=up][aria-pressed=true] { color: white; background: var(--grad); border-color: transparent; }
.card.voted-out { opacity: 0; transform: scale(.96); transition: opacity .25s, transform .25s; }
.price .soon { font-size: 13px; font-weight: 600; color: var(--cyan); }
.facts .deck { color: var(--cyan); }
.because { font-size: 13px; margin: 0; color: var(--violet-hi); display: flex; gap: 6px; align-items: flex-start; }
.because svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 2px; color: var(--pink); }
.desc { font-size: 13px; color: var(--muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tags span { font-size: 11.5px; padding: 2px 8px; border-radius: 6px; background: var(--surface-hi); border: 1px solid var(--border); color: #c3cad8; }
.tags span.shared { background: rgba(139,92,246,.16); border-color: rgba(167,139,250,.4); color: #ddd6fe; }
.facts { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.facts .good { color: var(--sale); }

.buy { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.price { display: flex; flex-direction: column; line-height: 1.15; }
.price .now { font-family: var(--font-head); font-size: 20px; font-weight: 700; }
.price .was { text-decoration: line-through; color: var(--faint); font-size: 12.5px; }
.price.on-sale .now { color: var(--sale); text-shadow: 0 0 18px rgba(52,211,153,.4); }
.price .na { color: var(--muted); font-size: 12.5px; }
.buy-actions { display: flex; gap: 6px; }
.btn-steam { background: linear-gradient(135deg, #1b2838, #2a475e); border-color: rgba(102,192,244,.35); color: #c7e7fb; }
.btn-steam:hover { filter: brightness(1.2); }
.btn-owned { color: var(--sale); border-color: rgba(52,211,153,.35); background: rgba(52,211,153,.08); }

.skeleton { height: 420px; border-radius: var(--radius); background: linear-gradient(100deg, rgba(255,255,255,.03) 20%, rgba(255,255,255,.08) 40%, rgba(255,255,255,.03) 60%); background-size: 200% 100%; animation: shimmer 1.3s infinite linear; border: 1px solid var(--border); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- library ---------- */
.locked { max-width: 560px; margin: 20px auto; text-align: center; padding: 44px 28px; }
.locked-icon { width: 64px; height: 64px; margin: 0 auto; border-radius: 18px; display: grid; place-items: center; background: var(--grad-soft); border: 1px solid rgba(167,139,250,.4); }
.locked-icon svg { width: 30px; height: 30px; color: var(--violet-hi); }
.locked h3 { font-family: var(--font-head); font-size: 22px; margin: 18px 0 6px; }
.locked p { color: var(--muted); margin: 0 0 22px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat { padding: 18px 20px; position: relative; overflow: hidden; }
.stat::before { content: ""; position: absolute; width: 120px; height: 120px; right: -40px; top: -40px; border-radius: 50%; background: var(--c, var(--violet)); opacity: .18; filter: blur(30px); }
.stat .label { font-size: 12.5px; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: .06em; }
.stat .value { font-family: var(--font-head); font-size: 30px; font-weight: 700; margin-top: 4px; letter-spacing: -.02em; }
.stat .sub { font-size: 12.5px; color: var(--muted); }

.lib-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 12px; margin-bottom: 20px; position: relative; z-index: 5; }
.lib-add { flex: 1 1 280px; }
.lib-toolbar .segmented { margin: 0; }
.lib-toolbar select { width: auto; }

.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.lib-card { animation: fade-up .45s ease both; animation-delay: calc(var(--i, 0) * 30ms); }
.lib-card .body { gap: 8px; }
.lib-card h3 { font-size: 16.5px; }
.lib-card .cover-actions { position: absolute; z-index: 2; top: 10px; right: 10px; display: flex; gap: 6px; opacity: 0; transition: opacity .2s; }
.lib-card:hover .cover-actions, .lib-card:focus-within .cover-actions { opacity: 1; }
.status-pill { position: absolute; z-index: 2; top: 12px; left: 12px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 4px 9px; border-radius: 7px; background: rgba(6,7,12,.75); border: 1px solid; backdrop-filter: blur(6px); }
.status-backlog { color: #c4b5fd; border-color: rgba(167,139,250,.5); }
.status-playing { color: #67e8f9; border-color: rgba(34,211,238,.5); }
.status-finished { color: #6ee7b7; border-color: rgba(52,211,153,.5); }
.status-dropped { color: #fca5a5; border-color: rgba(248,113,113,.5); }
.lib-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.lib-notes { font-size: 12.5px; color: var(--muted); font-style: italic; margin: 0; overflow-wrap: anywhere; }
.lib-empty { grid-column: 1 / -1; }

/* ---------- feedback ---------- */
.feedback-wrap { max-width: 640px; margin: 0 auto; }
.feedback-card { padding: 28px; }
.thanks { text-align: center; padding: 48px 28px; }
.thanks h3 { font-family: var(--font-head); font-size: 24px; margin: 18px 0 4px; }
.thanks p { color: var(--muted); margin: 0 0 22px; }
.check { width: 72px; height: 72px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #10b981, var(--sale)); box-shadow: 0 0 40px rgba(52,211,153,.5); animation: pop .4s ease; }
.check svg { width: 36px; height: 36px; color: #022c22; stroke-width: 3; }
#feedback-form .btn-block { margin-top: 24px; }
.inbox { margin-top: 24px; }
.inbox-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.inbox-head h2 { font-family: var(--font-head); margin: 0; font-size: 20px; }
.inbox-item { padding: 14px 0; border-top: 1px solid var(--border); }
.inbox-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.inbox-row .hint { margin: 0; margin-left: auto; }
.inbox-cat { font-size: 12.5px; font-weight: 600; padding: 2px 9px; border-radius: 7px; background: var(--surface-hi); border: 1px solid var(--border); }
.inbox-item p { margin: 8px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; color: #d4d8e3; }

/* ---------- stats (admin) ---------- */
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.stat-tile { padding: 18px 20px; border-radius: var(--radius); display: grid; gap: 2px; }
.stat-tile span { font-size: 13px; color: var(--muted); font-weight: 500; }
.stat-tile strong { font-family: var(--font-head); font-size: 34px; line-height: 1.15; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-tile small { font-size: 12px; color: var(--faint); }
.stat-chart { margin-top: 14px; padding: 18px 20px; border-radius: var(--radius); }
.stat-chart .hint .key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin: 0 5px 0 12px; vertical-align: -1px; }
.key.views, .chart .v { background: rgba(139, 92, 246, .35); }
.key.visitors, .chart .u { background: var(--grad); }
.chart { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 3px; height: 190px; align-items: end; margin: 14px 0 26px; }
.chart .col { position: relative; height: 100%; display: flex; align-items: flex-end; justify-content: center; }
.chart .col:hover { background: var(--surface-hi); border-radius: 5px; }
.chart .v, .chart .u { position: absolute; bottom: 0; width: 70%; max-width: 34px; height: var(--h); min-height: 2px; border-radius: 4px 4px 1px 1px; }
.chart .u { width: 46%; max-width: 22px; }
.key.returning, .chart .r { background: #fbbf24; }
.stat-chart .legend > span { white-space: nowrap; }
.chart .r { position: absolute; bottom: 0; width: 22%; max-width: 10px; height: var(--h); min-height: 2px; border-radius: 3px 3px 1px 1px; }
.chart em { position: absolute; top: 100%; margin-top: 6px; font-style: normal; font-size: 11px; color: var(--faint); white-space: nowrap; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.stat-list { padding: 18px 20px; border-radius: var(--radius); min-width: 0; }
.stat-list h2 { font-family: var(--font-head); font-size: 17px; margin: 0 0 10px; }
.stat-list ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.stat-list li { position: relative; display: flex; justify-content: space-between; gap: 12px; padding: 6px 10px; font-size: 13.5px; border-radius: 8px; overflow: hidden; }
.stat-list li .bar { position: absolute; inset: 0 auto 0 0; width: var(--w); background: rgba(139, 92, 246, .14); border-radius: 8px; }
.stat-list li a, .stat-list li span:not(.bar) { position: relative; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); text-decoration: none; }
.stat-list li a:hover { color: var(--violet-hi); }
.stat-list li b { position: relative; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat-foot { margin: 16px 0 0; }
@media (max-width: 880px) {
  #view-stats .page-head { flex-direction: column; align-items: flex-start; }
  .stat-tiles { grid-template-columns: 1fr 1fr; }
  .stat-tile:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .stat-grid { grid-template-columns: 1fr; }
  .stat-tile strong { font-size: 28px; }
  .chart { height: 150px; }
}

/* ---------- modals ---------- */
.modal {
  padding: 0; border: 1px solid var(--border-hi); border-radius: 22px;
  background: rgba(16, 19, 29, 0.94); color: var(--text);
  width: min(420px, calc(100vw - 32px)); max-height: calc(100vh - 32px);
  box-shadow: 0 40px 100px -20px rgba(0,0,0,.9), 0 0 0 1px rgba(139,92,246,.15), 0 0 80px -30px rgba(139,92,246,.6);
  backdrop-filter: blur(24px);
}
.modal:has(.wide) { width: min(560px, calc(100vw - 32px)); }
.modal[open] { animation: modal-in .3s cubic-bezier(.2,.9,.3,1.2); }
.modal::backdrop { background: rgba(3, 4, 8, 0.7); backdrop-filter: blur(6px); }
@keyframes modal-in { from { opacity: 0; transform: translateY(16px) scale(.96); } }
.modal-body { position: relative; padding: 28px; display: grid; gap: 16px; }
.modal-body .field + .field { margin-top: 0; }
.modal-close { position: absolute; z-index: 3; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 10px; border: 1px solid var(--border); background: rgba(6,7,12,.6); cursor: pointer; font-size: 20px; line-height: 1; color: var(--muted); }
.modal-close:hover { color: var(--text); border-color: var(--border-hi); }
.modal-logo { display: grid; place-items: center; padding: 6px 0 2px; }
.modal-logo .logo-mark { width: 40px; height: 40px; }
.modal-sub { margin: 0; text-align: center; color: var(--muted); font-size: 14px; }
.form-error { margin: 0; padding: 9px 12px; border-radius: 10px; background: rgba(248,113,113,.1); border: 1px solid rgba(248,113,113,.35); color: #fecaca; font-size: 13.5px; }
.gd-cover { position: relative; margin: -28px -28px 0; aspect-ratio: 460 / 190; overflow: hidden; border-radius: 22px 22px 0 0; background: var(--surface-solid); }
.gd-cover img { width: 100%; height: 100%; object-fit: cover; }
.gd-shade { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(16,19,29,.97)); }
.gd-cover h2 { position: absolute; left: 28px; right: 28px; bottom: 12px; margin: 0; font-family: var(--font-head); font-size: 24px; letter-spacing: -.02em; }

/* ---------- toasts ---------- */
.toasts { position: fixed; z-index: 100; bottom: 20px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; width: min(440px, calc(100vw - 32px)); }
.toast {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 16px; border-radius: 14px;
  background: rgba(22, 26, 38, 0.95); border: 1px solid var(--border-hi);
  box-shadow: 0 20px 40px -10px rgba(0,0,0,.7); backdrop-filter: blur(16px);
  font-size: 14px; animation: toast-in .35s cubic-bezier(.2,.9,.3,1.2);
}
.toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--sale); box-shadow: 0 0 10px var(--sale); flex-shrink: 0; }
.toast.error::before { background: var(--danger); box-shadow: 0 0 10px var(--danger); }
.toast .grow { flex: 1; }
.toast button { background: none; border: 0; color: var(--violet-hi); font-weight: 700; cursor: pointer; padding: 4px 6px; }
.toast.leaving { opacity: 0; transform: translateY(8px); transition: all .25s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(.96); } }

.site-footer { text-align: center; color: var(--faint); font-size: 12.5px; padding: 10px 16px 32px; }
.support-link {
  display: inline-block; margin-bottom: 12px; padding: 7px 14px; border-radius: 999px; text-decoration: none;
  font-weight: 600; font-size: 13.5px; color: #fbcfe8; background: rgba(244,114,182,.1); border: 1px solid rgba(244,114,182,.35);
}
.support-link:hover { background: rgba(244,114,182,.18); color: white; }
.disclosure { max-width: 620px; margin: 0 auto 10px; font-size: 12px; color: var(--faint); }
.support-note { color: var(--muted); font-size: 14px; }
.support-note a { color: #f9a8d4; }
.also-on { margin: 8px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.also-on span { margin-right: 2px; }
.also-on a {
  padding: 3px 10px; border-radius: 7px; text-decoration: none; color: #d4d8e3; font-weight: 500;
  background: var(--surface-hi); border: 1px solid var(--border); transition: border-color .15s, color .15s;
}
.also-on a:hover { color: white; border-color: rgba(167,139,250,.6); }
.footer-links { display: flex; justify-content: center; gap: 18px; margin-bottom: 8px; }
.footer-links a { color: var(--muted); text-decoration: none; font-weight: 500; }
.footer-links a:hover { color: var(--text); }
.noscript { text-align: center; color: var(--muted); }
.noscript a { color: var(--violet-hi); }

/* ---------- account dialog ---------- */
button.user-pill { cursor: pointer; color: inherit; font: inherit; padding-right: 10px; transition: border-color .2s, background .2s; }
button.user-pill:hover { border-color: var(--border-hi); background: var(--surface-hover); }
.user-pill .chev { width: 16px; height: 16px; color: var(--muted); }
.avatar.big { width: 52px; height: 52px; font-size: 22px; flex-shrink: 0; }
.account-head { display: flex; align-items: center; gap: 14px; }
.account-head h2 { margin: 0; font-family: var(--font-head); font-size: 22px; }
.account-head .hint { margin: 2px 0 0; }
.danger-zone { margin: 0; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(248,113,113,.25); background: rgba(248,113,113,.05); }
.danger-zone summary { color: #fca5a5; }
.danger-zone form { display: grid; gap: 12px; margin-top: 10px; }
.danger-zone p { margin: 0; font-size: 13.5px; color: var(--muted); }
.btn-danger { background: linear-gradient(135deg, #dc2626, #f87171); color: white; }
.btn-danger:hover { filter: brightness(1.1); }

/* ---------- category & static pages ---------- */
.browse { margin-top: 40px; padding: 26px 28px; }
.browse h2 { font-family: var(--font-head); font-size: 20px; margin: 0 0 6px; }
.browse h2:not(:first-child) { margin-top: 22px; }
.browse p { color: var(--muted); margin: 0 0 14px; max-width: 760px; }
.link-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.link-chips a {
  padding: 6px 13px; font-size: 13.5px; border-radius: 999px; text-decoration: none; color: #d4d8e3;
  background: var(--surface-hi); border: 1px solid var(--border); transition: all .15s;
}
.link-chips a:hover { color: white; border-color: rgba(167,139,250,.6); background: rgba(139,92,246,.14); }

.static-page { padding-bottom: 20px; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 28px; font-size: 13px; color: var(--faint); }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--text); }
.hero.left { text-align: left; padding: 26px 0 26px; }
.hero.left .lead { margin-left: 0; max-width: 680px; }
.btn-row.start { justify-content: flex-start; margin-top: 22px; }
.ranked { list-style: none; padding: 0; margin: 0; }
.card h2 { margin: 0; font-family: var(--font-head); font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.rank {
  position: absolute; z-index: 2; bottom: 10px; right: 12px;
  font-family: var(--font-head); font-size: 26px; font-weight: 700; line-height: 1;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.8));
}

.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.cat-tile {
  position: relative; display: block; aspect-ratio: 460 / 215; overflow: hidden;
  border-radius: var(--radius); border: 1px solid var(--border); text-decoration: none; color: var(--text);
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.cat-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.cat-tile:hover { transform: translateY(-3px); border-color: rgba(167,139,250,.55); box-shadow: 0 24px 50px -20px rgba(124,92,255,.6); }
.cat-tile:hover img { transform: scale(1.06); }
.cat-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6,7,12,.1), rgba(6,7,12,.92)); }
.cat-text { position: absolute; left: 16px; right: 16px; bottom: 14px; display: grid; gap: 2px; }
.cat-text strong { font-family: var(--font-head); font-size: 21px; }
.cat-text small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- wishlist ---------- */
.nav-badge {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px;
  border-radius: 999px; font-size: 11px; font-weight: 700; color: #022c22;
  background: linear-gradient(135deg, #10b981, #6ee7b7); box-shadow: 0 0 10px rgba(52,211,153,.6); vertical-align: 1px;
}
.own-slot { display: inline-flex; gap: 6px; align-items: center; }
.icon-btn.heart { width: 32px; height: 32px; }
.icon-btn.heart svg { width: 17px; height: 17px; transition: transform .2s; }
.icon-btn.heart:hover { color: var(--pink); border-color: rgba(244,114,182,.5); }
.icon-btn.heart.on { color: var(--pink); border-color: rgba(244,114,182,.55); background: rgba(244,114,182,.12); }
.icon-btn.heart.on svg { fill: currentColor; animation: pop .3s ease; }

.alerts-card { display: flex; gap: 16px; align-items: flex-start; padding: 20px 22px; margin-bottom: 18px; }
.alerts-icon {
  flex-shrink: 0; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 22px;
  background: var(--grad-soft); border: 1px solid rgba(167,139,250,.4);
}
.alerts-icon.on { background: rgba(52,211,153,.15); border-color: rgba(52,211,153,.5); color: var(--sale); font-weight: 800; }
.alerts-body { flex: 1; min-width: 0; }
.alerts-body h3 { font-family: var(--font-head); font-size: 18px; margin: 2px 0 4px; }
.alerts-body p { margin: 0 0 10px; color: #c9cedb; font-size: 14.5px; }
.alerts-body .hint { margin: 8px 0 0; }
.alerts-form { display: flex; gap: 10px; flex-wrap: wrap; }
.alerts-form input { flex: 1 1 240px; }

.wish-card.hit { border-color: rgba(52,211,153,.55); box-shadow: 0 0 0 1px rgba(52,211,153,.25), 0 24px 50px -24px rgba(52,211,153,.45); }
.wish-hit { margin: 0; font-size: 13.5px; font-weight: 600; color: var(--sale); }
.wish-card .buy { padding-top: 10px; }
.target { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; font-size: 13px; color: var(--muted); }
.target-input { display: inline-flex; align-items: center; gap: 6px; }
.target-input span { font-size: 12px; color: var(--faint); }
.target-input input { width: 104px; padding: 6px 9px; font-size: 13.5px; }

/* ---------- homepage: how it works + FAQ ---------- */
.section-label {
  font-family: var(--font-head); font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--violet-hi); margin: 0 0 14px;
}
.how { margin: 0 0 32px; }
.how .section-label, .unique .section-label { text-align: center; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.steps li { padding: 18px 18px 16px; position: relative; }
.step-num {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; margin-bottom: 10px;
  font-family: var(--font-head); font-weight: 700; background: var(--grad); color: white;
  box-shadow: 0 6px 18px -6px rgba(124,92,255,.8);
}
.steps h3 { font-family: var(--font-head); font-size: 16.5px; margin: 0 0 4px; }
.steps p { margin: 0; font-size: 14px; color: var(--muted); }

.faq { margin-top: 48px; scroll-margin-top: 90px; }
.faq > h2 { font-family: var(--font-head); font-size: clamp(24px, 3vw, 30px); letter-spacing: -.02em; margin: 0 0 16px; }
.faq-list { display: grid; gap: 10px; max-width: 900px; }
.faq-list details { padding: 0; border-radius: 14px; }
.faq-list summary {
  list-style: none; cursor: pointer; padding: 16px 52px 16px 20px; position: relative;
  font-family: var(--font-head); font-weight: 600; font-size: 16px; color: var(--text);
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center;
  background: var(--surface-hi); border: 1px solid var(--border); color: var(--violet-hi); font-size: 18px; line-height: 1;
}
.faq-list details[open] summary::after { content: "–"; }
.faq-list details[open] { border-color: rgba(167,139,250,.35); }
.faq-list details p { margin: 0; padding: 0 20px 18px; color: #c9cedb; max-width: 760px; }
.faq-list a { color: var(--violet-hi); }

/* ---------- category pages ---------- */
.cat-section { margin-top: 34px; scroll-margin-top: 90px; }
@media (max-width: 880px) { .cat-section, .faq, .how, .ranked .card { scroll-margin-top: 140px; } }
.picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.pick {
  display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; text-decoration: none; color: var(--text);
  transition: transform .2s, border-color .2s;
}
.pick:hover { transform: translateY(-2px); border-color: rgba(167,139,250,.55); }
.pick-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--cyan); }
.pick strong { font-family: var(--font-head); font-size: 17px; line-height: 1.25; }
.pick-why { font-size: 13.5px; color: var(--muted); }
.about { padding: 22px 26px; }
.about h2 { font-family: var(--font-head); font-size: 20px; margin: 0 0 8px; }
.about p { margin: 0; color: #c9cedb; font-size: 15.5px; line-height: 1.65; max-width: 820px; }
.ranked .card { scroll-margin-top: 90px; }
.ranked .card:target { border-color: var(--cyan); box-shadow: 0 0 0 2px rgba(34,211,238,.35), var(--shadow); }
.why { margin: 0; font-size: 14px; color: #d4d8e3; }
.known { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); }
.known span { margin-right: 2px; }
.known em { font-style: normal; padding: 2px 8px; border-radius: 6px; background: rgba(139,92,246,.14); border: 1px solid rgba(167,139,250,.3); color: #ddd6fe; }
.qa-list { padding: 6px 24px; max-width: 900px; }
.qa { padding: 16px 0; }
.qa + .qa { border-top: 1px solid var(--border); }
.qa h3 { font-family: var(--font-head); font-size: 16.5px; margin: 0 0 6px; }
.qa p { margin: 0; color: #c9cedb; }
.cat-section.faq { margin-top: 40px; }
.cat-section.faq > h2 { font-size: 24px; }

/* ---------- "games like" pages ---------- */
.like-link { color: var(--violet-hi); text-decoration: none; font-weight: 500; }
.like-link:hover { color: white; text-decoration: underline; }
.facts .like-link { margin-left: auto; }
.like-hero { display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: center; }
.source { overflow: hidden; padding: 0; }
.source img { width: 100%; display: block; aspect-ratio: 460 / 215; object-fit: cover; }
.source-body { padding: 14px 18px 16px; }
.source-label { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--cyan); }
.source strong { display: block; font-family: var(--font-head); font-size: 18px; margin: 2px 0 6px; }
.source p { margin: 0 0 6px; font-size: 13.5px; color: #c9cedb; }
.source .source-meta { color: var(--muted); margin: 0; }
.browse-sub { margin-top: 26px !important; }
.browse p a { color: var(--violet-hi); }
.az { padding: 22px 26px; }
.az h2 { font-family: var(--font-head); font-size: 22px; margin: 0 0 6px; }
.az-group { margin-top: 16px; }
.az-group h3 { font-family: var(--font-head); font-size: 15px; color: var(--violet-hi); margin: 0 0 8px; }
@media (max-width: 880px) {
  .like-hero { grid-template-columns: 1fr; gap: 6px; }
  .like-hero .source { max-width: 460px; margin-bottom: 8px; }
}

.prose { max-width: 760px; margin: 40px auto 0; padding: 32px 36px; }
.prose h1 { font-size: 40px; margin-bottom: 10px; }
.prose h2 { font-family: var(--font-head); font-size: 20px; margin: 26px 0 8px; }
.prose p, .prose li { color: #c9cedb; }
.prose li + li { margin-top: 8px; }
.prose p + p { margin-top: 10px; }
.prose a { color: var(--violet-hi); }
.prose.about .lead { font-size: 17px; color: #e3e6ef; max-width: none; margin: 0 0 4px; }
.prose .contact-list { list-style: none; padding-left: 0; }
.prose .contact-list a { overflow-wrap: anywhere; }
@media (max-width: 600px) { .prose { padding: 24px 20px; } .prose h1 { font-size: 32px; } }
.not-found { max-width: 560px; margin: 60px auto 0; }
.not-found h1 { font-size: 34px; margin-top: 18px; }
.not-found p { margin-bottom: 22px; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
  .steps li { display: grid; grid-template-columns: 30px 1fr; column-gap: 12px; }
  .steps .step-num { grid-row: span 2; margin: 0; }
}
@media (max-width: 880px) {
  .layout { grid-template-columns: 1fr; }
  .panel { position: static; max-height: none; }
  .topbar { flex-wrap: wrap; gap: 10px 16px; padding: 12px 16px; }
  .tabs { order: 3; width: 100%; justify-content: space-between; }
  .tabs a { flex: 1; text-align: center; padding: 7px 4px; font-size: 13px; white-space: nowrap; }
  .tabs .nav-badge { margin-left: 3px; min-width: 16px; height: 16px; font-size: 10px; }
  main { padding: 0 16px 32px; }
  .hero { padding: 36px 0 24px; }
  .page-head { padding: 32px 0 20px; }
  .lib-toolbar .segmented { overflow-x: auto; max-width: 100%; }
}
@media (max-width: 520px) {
  .row { flex-wrap: wrap; }
  .row .input-label { flex-basis: calc(50% - 5px); }
  .stats { gap: 10px; }
  .stat .value { font-size: 24px; }
  .user-pill .name { display: none; }
  .modal-body { padding: 22px; }
  .gd-cover { margin: -22px -22px 0; }
}
/* ---------- share your picks ---------- */
.status-bar .share-btn { margin-left: auto; }
.share-btn svg { width: 16px; height: 16px; }
.share-panel { position: relative; display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 20px; align-items: center; padding: 16px; margin: 0 0 18px; scroll-margin-top: 90px; animation: share-in .25s ease-out; }
.share-panel[hidden] { display: none; }
.share-panel img { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--border-hi); }
.share-side h3 { font-family: var(--font-head); font-size: 19px; margin: 0 28px 2px 0; }
.share-side .hint { margin: 0 0 12px; }
.share-link { display: flex; gap: 8px; margin-bottom: 10px; }
.share-link input { flex: 1; min-width: 0; font-size: 13.5px; }
.share-to { display: flex; flex-wrap: wrap; gap: 8px; }
.share-close { position: absolute; top: 8px; right: 10px; width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.share-close:hover { background: var(--surface-hover); color: var(--text); }
@keyframes share-in { from { opacity: 0; transform: translateY(-6px); } }
/* The shared page (/picks/...) */
.share-hero .for { color: var(--muted); }
.share-note { margin-top: 14px; }
.share-save { margin-left: auto; color: var(--violet-hi); }
@media (max-width: 880px) { .share-panel { scroll-margin-top: 150px; } }
@media (max-width: 640px) {
  .share-panel { grid-template-columns: 1fr; }
  .status-bar .share-btn { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.updated { margin: 8px 0 14px; font-size: 13.5px; color: var(--muted); }
.updated a { color: var(--violet-hi); text-decoration: none; }
.updated a:hover { text-decoration: underline; }
.ranked .card .pick-label { margin: 0; }
.differs { margin: 0; font-size: 13.5px; color: #c9cedb; }
.differs strong { color: var(--text); font-weight: 600; }
.reviews { margin: 0; font-size: 12.5px; color: var(--muted); }
.toc { margin-top: 26px; padding: 16px 22px; }
.toc h2 { font-family: var(--font-head); font-size: 16px; margin: 0 0 8px; }
.toc ol { margin: 0; padding-left: 20px; columns: 3 220px; column-gap: 28px; font-size: 14px; }
.toc li { break-inside: avoid; padding: 2px 0; }
.toc a { color: #c9cedb; text-decoration: none; }
.toc a:hover { color: white; text-decoration: underline; }
