:root {
  color-scheme:light dark;
  --bg:#f8fafc;
  --surface:#fff;
  --surface-alt:#eff3f9;
  --text:#172033;
  --muted:#617088;
  --line:#dce3ee;
  --primary:#1e6bff;
  --on-primary:#fff;
  --active:#e1ebff;
  --shadow:0 5px 22px #152d5608;
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-size:15px;
  line-height:1.5
}

* {
  box-sizing:border-box
}
body {
  margin:0;
  background:var(--bg);
  color:var(--text)
}
a {
  color:inherit;
  text-decoration:none
}
button,input,select {
  font:inherit
}
button,.button {
  cursor:pointer;
  display:inline-flex;
  justify-content:center;
  align-items:center;
  gap:8px;
  border:1px solid var(--line);
  border-radius:12px;
  padding:10px 16px;
  background:var(--surface);
  color:var(--text);
  font-weight:600;
  text-align:center
}
button:disabled {
  opacity:.4;
  cursor:default
}
button:hover:not(:disabled),.button:hover {
  border-color:var(--primary);
  background:var(--surface-alt)
}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible {
  outline:3px solid var(--primary);
  outline-offset:4px
}
.primary {
  background:var(--primary);
  color:var(--on-primary);
  border-color:var(--primary)
}
.primary:hover:not(:disabled) {
  background:var(--primary);
  filter:brightness(1.12)
}
.secondary {
  background:var(--surface-alt)
}
input,select {
  color:var(--text);
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:12px;
  padding:12px 14px
}
select {
  max-width:100%
}
h1,h2,h3,p {
  margin:0
}
h1 {
  font-size:clamp(28px,3vw,42px);
  font-weight:780;
  line-height:1.18;
  letter-spacing:-1.2px
}
h2 {
  font-size:21px;
  line-height:1.3;
  letter-spacing:-.35px
}
h3 {
  font-size:16px;
  line-height:1.35
}
h3 a:hover,th a:hover {
  color:var(--primary)
}
.muted {
  color:var(--muted)
}
.eyebrow {
  font-size:11px;
  letter-spacing:2px;
  font-weight:750;
  color:var(--primary);
  margin-bottom:12px
}
.sr-only {
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0
}
.skip-link {
  position:fixed;
  top:12px;
  left:16px;
  z-index:100;
  transform:translateY(-150%);
  background:var(--primary);
  color:var(--on-primary);
  padding:10px 16px;
  border-radius:10px
}
.skip-link:focus {
  transform:none
}

.sidebar {
  position:fixed;
  inset:0 auto 0 0;
  width:236px;
  display:flex;
  flex-direction:column;
  padding:32px 18px 24px;
  border-right:1px solid var(--line);
  background:var(--surface);
  z-index:10
}
.brand {
  display:flex;
  align-items:center;
  gap:12px;
  padding:0 12px 30px;
  font-size:23px;
  font-weight:800;
  letter-spacing:-.8px
}
.sidebar nav {
  display:grid;
  gap:7px
}
.sidebar nav a {
  display:flex;
  align-items:center;
  gap:14px;
  padding:13px 15px;
  color:var(--muted);
  border-radius:13px;
  font-weight:600
}
.sidebar nav a>span:first-child {
  font-size:25px;
  line-height:1;
  width:26px;
  text-align:center
}
.sidebar nav a:hover {
  background:var(--surface-alt)
}
.sidebar nav a[aria-current] {
  background:var(--active);
  color:var(--primary)
}
.sidebar small {
  margin-left:auto;
  min-width:20px;
  text-align:center;
  font-size:11px
}
.sidebar small:empty {
  display:none
}
.sidebar-note {
  margin-top:auto;
  padding:24px 14px 0;
  color:var(--muted);
  font-size:12px;
  line-height:1.8
}
main {
  margin-left:236px;
  min-height:100vh;
  padding:42px 38px 72px;
  outline:none
}
.page-header {
  margin-bottom:28px
}
.page-header .muted {
  margin-top:12px;
  font-size:16px
}
.search-form {
  display:flex;
  align-items:center;
  gap:12px;
  background:var(--surface);
  padding:7px 8px 7px 18px;
  border:1px solid var(--line);
  border-radius:16px;
  box-shadow:var(--shadow);
  margin-bottom:32px;
  max-width:760px
}
.search-form>span {
  font-size:28px;
  color:var(--muted)
}
.search-form input {
  padding:10px 0;
  flex:1;
  width:80px;
  border:0;
  background:transparent;
  outline-offset:0
}
.section-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  margin:24px 0 18px
}
.section-heading .button {
  padding:7px 13px;
  font-size:13px
}
.sort-control {
  display:flex;
  align-items:center;
  gap:14px;
  margin-bottom:24px
}
.sort-control label {
  color:var(--muted);
  font-size:13px
}
.sort-control select {
  min-width:240px;
  padding:10px 13px
}
.game-grid {
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(155px,1fr));
  gap:18px
}
.game-card {
  border:1px solid var(--line);
  border-radius:14px;
  background:var(--surface);
  overflow:hidden;
  content-visibility:auto;
  contain-intrinsic-size:auto 330px;
  box-shadow:var(--shadow)
}
.cover {
  aspect-ratio:2/2.8;
  position:relative;
  overflow:hidden;
  background:var(--surface-alt)
}
.cover-link {
  display:block;
  width:100%;
  height:100%
}
.cover-image {
  width:100%;
  height:100%;
  object-fit:cover;
  display:block
}
.cover-placeholder {
  height:100%;
  display:grid;
  place-items:center;
  font-size:60px;
  color:var(--muted);
  background:linear-gradient(145deg,var(--surface-alt),var(--active))
}
.image-failed {
  font-size:12px;
  object-fit:contain;
  color:var(--muted);
  background:var(--surface-alt)
}
.score-pill {
  position:absolute;
  top:10px;
  left:10px;
  border-radius:8px;
  background:var(--primary);
  color:var(--on-primary);
  font-size:13px;
  padding:5px 8px;
  font-weight:750
}
.card-actions {
  position:absolute;
  right:8px;
  top:8px;
  display:grid;
  gap:6px
}
.icon-button {
  width:35px;
  height:35px;
  padding:0;
  border-radius:10px;
  background:var(--surface);
  color:var(--text);
  font-size:22px;
  line-height:1;
  border:1px solid var(--line)
}
.icon-button[aria-pressed=true],.button[aria-pressed=true] {
  background:var(--primary);
  color:var(--on-primary);
  border-color:var(--primary)
}
.card-info {
  padding:13px
}
.card-info h3 {
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
  min-height:42px
}
.card-info p {
  font-size:11px;
  color:var(--muted);
  margin-top:7px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap
}
.search-list {
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:14px;
  padding:0 16px;
  margin-bottom:30px
}
.search-row {
  display:grid;
  grid-template-columns:44px 1fr 36px;
  gap:16px;
  align-items:center;
  padding:13px 0;
  content-visibility:auto;
  contain-intrinsic-size:auto 90px
}
.search-row+.search-row {
  border-top:1px solid var(--line)
}
.search-art {
  width:44px;
  height:62px;
  overflow:hidden;
  border-radius:6px
}
.search-row p {
  font-size:12px;
  margin-top:5px
}
.loading-state,.empty-inline {
  padding:30px 0;
  color:var(--muted)
}
.empty-state {
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:18px;
  text-align:center;
  padding:64px 24px
}
.empty-state p {
  color:var(--muted);
  margin:14px auto 24px;
  max-width:460px
}
.notice {
  padding:12px 16px;
  background:var(--active);
  border-radius:10px;
  margin-bottom:24px
}
.back-link {
  display:inline-block;
  margin-bottom:28px;
  color:var(--muted);
  font-weight:600;
  font-size:13px
}
.back-link:hover {
  color:var(--primary)
}
.game-detail {
  display:grid;
  grid-template-columns:minmax(170px,280px) minmax(0,1fr);
  align-items:start;
  gap:34px
}
.detail-cover {
  border-radius:16px;
  overflow:hidden;
  background:var(--surface-alt);
  border:1px solid var(--line);
  padding:8px
}
.detail-cover img {
  height:auto;
  object-fit:contain;
  border-radius:9px
}
.detail-info>h1 {
  margin-bottom:10px
}
.metrics {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(115px,1fr));
  gap:10px;
  margin-top:20px
}
.metric {
  padding:15px;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:13px;
  display:flex;
  flex-direction:column;
  min-height:105px
}
.metric>span {
  font-size:11px;
  color:var(--muted);
  font-weight:600
}
.metric strong {
  font-size:24px;
  line-height:1.2;
  margin-top:12px;
  overflow-wrap:anywhere;
  letter-spacing:-.5px
}
.metric small {
  font-size:10px;
  color:var(--muted);
  margin-top:6px
}
.detail-actions {
  display:flex;
  flex-wrap:wrap;
  gap:9px;
  margin-top:20px
}
.detail-actions .button {
  font-size:12px;
  padding:9px 12px
}
.facts-section {
  margin-top:27px
}
.facts-section h2 {
  font-size:17px;
  margin-bottom:10px
}
.facts-section .section-heading {
  margin:0 0 10px
}
.description {
  white-space:pre-line;
  line-height:1.8;
  font-size:14px
}
.chips {
  display:flex;
  flex-wrap:wrap;
  gap:7px
}
.chips span {
  border:1px solid var(--line);
  border-radius:8px;
  padding:5px 10px;
  font-size:12px;
  background:var(--surface)
}
.text-link {
  font-size:12px;
  color:var(--primary)
}
.screenshots {
  margin-top:35px
}
.screenshot-grid {
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(200px,1fr));
  gap:13px
}
.screenshot-grid button {
  display:block;
  padding:0;
  overflow:hidden;
  border-radius:11px;
  aspect-ratio:16/9;
  content-visibility:auto;
  contain-intrinsic-size:auto 150px
}
.screenshot-grid img {
  width:100%;
  height:100%;
  object-fit:cover;
  display:block
}
.comparison-toolbar {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:12px;
  margin-bottom:24px
}
.comparison-toolbar label {
  font-size:13px;
  color:var(--muted)
}
.comparison-scroll {
  overflow:auto;
  border:1px solid var(--line);
  border-radius:15px;
  background:var(--surface)
}
table {
  width:100%;
  border-collapse:collapse;
  min-width:670px
}
th,td {
  text-align:left;
  padding:18px 16px;
  border-bottom:1px solid var(--line)
}
thead {
  background:var(--surface-alt);
  font-size:12px
}
thead button {
  border:0;
  padding:0;
  background:transparent;
  font-size:12px;
  text-align:left;
  border-radius:0
}
tbody th {
  max-width:260px;
  font-size:14px
}
tbody td {
  font-variant-numeric:tabular-nums
}
tbody tr:last-child>* {
  border-bottom:0
}
td .icon-button {
  margin:3px
}
.download-grid {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:18px;
  margin-top:26px
}
.download-card,.profile-card {
  padding:28px;
  border:1px solid var(--line);
  border-radius:18px;
  background:var(--surface);
  box-shadow:var(--shadow)
}
.download-icon {
  display:grid;
  place-items:center;
  background:var(--active);
  color:var(--primary);
  font-size:32px;
  width:60px;
  height:60px;
  border-radius:16px;
  margin-bottom:25px
}
.download-card p {
  margin:10px 0 26px
}
.profile-card {
  max-width:650px;
  margin-bottom:20px
}
.profile-card p {
  margin:9px 0 18px
}
.profile-avatar {
  width:64px;
  height:64px;
  border-radius:50%;
  background:var(--active);
  display:grid;
  place-items:center;
  margin-bottom:18px;
  overflow:hidden;
  font-size:38px;
  color:var(--primary)
}
.profile-avatar img {
  width:100%;
  height:100%;
  object-fit:cover
}
.toast {
  position:fixed;
  bottom:28px;
  left:50%;
  transform:translateX(-50%);
  z-index:100;
  padding:14px 22px;
  background:var(--text);
  color:var(--bg);
  border-radius:12px;
  box-shadow:0 5px 30px #0002;
  max-width:min(90vw,550px);
  font-size:13px
}
.toast[hidden] {
  display:none
}
.gallery-dialog {
  position:fixed;
  inset:0;
  width:100vw;
  max-width:none;
  height:100dvh;
  max-height:none;
  margin:0;
  border:0;
  padding:20px;
  background:#090b0b;
  color:#fff
}
.gallery-dialog::backdrop {
  background:#090b0b
}
.gallery-toolbar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px;
  height:48px;
  font-size:14px
}
.gallery-toolbar .button {
  background:#272d2b;
  color:white;
  border-color:#424c47
}
.gallery-stage {
  height:calc(100% - 90px);
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
  overflow:auto
}
.gallery-stage>img {
  max-width:100%;
  max-height:100%;
  object-fit:contain;
  cursor:zoom-in;
  touch-action:pan-y pinch-zoom
}
.gallery-stage>img.zoomed {
  max-width:none;
  max-height:none;
  width:180%;
  cursor:zoom-out
}
.gallery-stage>button {
  position:fixed;
  top:50%;
  transform:translateY(-50%);
  z-index:1;
  display:grid;
  place-items:center;
  width:46px;
  height:46px;
  border-radius:50%;
  padding:0;
  background:#26322de6;
  color:white;
  border-color:#58645e
}
.gallery-stage>button svg {
  display:block;
  width:24px;
  height:24px;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round
}
.gallery-previous {
  left:25px
}
.gallery-next {
  right:25px
}
.gallery-hint {
  text-align:center;
  font-size:11px;
  color:#a3b3ab;
  margin-top:10px
}
.noscript {
  position:fixed;
  top:0;
  left:0;
  right:0;
  padding:12px;
  text-align:center;
  background:var(--active)
}

@media(min-width:1600px) {
  .game-grid {
  grid-template-columns:repeat(auto-fill,minmax(175px,1fr))
}

}

@media(max-width:1100px) {
  .sidebar {
  width:90px;
  padding:28px 12px
}
.brand {
  padding:0 15px 30px
}
.brand>span,.sidebar nav a>span:nth-child(2),.sidebar-note {
  display:none
}
.sidebar nav a {
  padding:14px 10px;
  justify-content:center;
  position:relative
}
.sidebar small {
  position:absolute;
  right:1px;
  top:2px;
  background:var(--active);
  border-radius:8px
}
.sidebar nav a>span:first-child {
  font-size:28px
}
main {
  margin-left:90px;
  padding:32px 26px 60px
}
.game-detail {
  grid-template-columns:minmax(160px,230px) minmax(0,1fr);
  gap:25px
}

}

@media(max-width:650px) {
  .sidebar {
  inset:auto 0 0;
  width:auto;
  height:70px;
  padding:5px 8px;
  border-right:0;
  border-top:1px solid var(--line)
}
.brand {
  display:none
}
.sidebar nav {
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:3px;
  height:100%
}
.sidebar nav a {
  padding:5px 0;
  flex-direction:column;
  gap:0;
  border-radius:10px;
  font-size:9px
}
.sidebar nav a>span:nth-child(2) {
  display:block;
  white-space:nowrap
}
.sidebar nav a[data-nav=downloads]>span:nth-child(2) {
  font-size:0
}
.sidebar nav a[data-nav=downloads]>span:nth-child(2):after {
  content:'Download';
  font-size:9px
}
.sidebar nav a>span:first-child {
  font-size:25px;
  height:31px
}
.sidebar small {
  right:5px;
  font-size:9px
}
main {
  margin-left:0;
  padding:28px 17px 110px
}
.page-header {
  margin-bottom:22px
}
.page-header .muted {
  font-size:14px
}
.search-form {
  gap:9px;
  padding-left:12px;
  margin-bottom:27px
}
.search-form button {
  font-size:12px;
  padding:10px 12px
}
.search-form input {
  font-size:14px
}
.sort-control select {
  min-width:0;
  flex:1
}
.game-grid {
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:13px
}
.game-card {
  contain-intrinsic-size:auto 310px
}
.card-info {
  padding:11px
}
.card-info h3 {
  font-size:14px;
  min-height:38px
}
.section-heading h2 {
  font-size:19px
}
.game-detail {
  grid-template-columns:1fr;
  gap:25px
}
.detail-cover {
  width:min(65%,260px);
  margin:auto
}
.metrics {
  grid-template-columns:repeat(2,minmax(0,1fr))
}
.detail-info>h1 {
  font-size:30px
}
.screenshot-grid {
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px
}
.toast {
  bottom:85px
}
.gallery-dialog {
  padding:12px
}
.gallery-toolbar {
  font-size:12px
}
.gallery-hint {
  font-size:10px
}
.gallery-previous {
  left:12px
}
.gallery-next {
  right:12px
}
.comparison-toolbar {
  gap:8px
}
.comparison-toolbar button {
  font-size:12px
}
.empty-state {
  padding:45px 18px
}

}

@media(prefers-color-scheme:dark) {
  :root {
  --bg:#0e1117;
  --surface:#171b22;
  --surface-alt:#202938;
  --text:#e5eaf4;
  --muted:#a3b0c6;
  --line:#344058;
  --primary:#a8c7ff;
  --on-primary:#00295a;
  --active:#233855;
  --shadow:none
}

}

@media(prefers-reduced-motion:no-preference) {
  button,.button,.sidebar nav a {
  transition:background-color .12s,border-color .12s
}

}

