/* GameShelf: a game launcher look. Near-black chrome, a sidebar, grey pill
   controls, white for the main action and acid lime only for highlights. */

@font-face {
  font-family: "Manrope";
  src: url("/fonts/manrope.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
/* Arabic letters. Thmanyah Sans is used when it is installed on the computer
   (or its files are put in public/fonts/thmanyah/; its license doesn't allow
   shipping them with GameShelf). Otherwise Alexandria, which comes with it. */
@font-face {
  font-family: "Thmanyah Local";
  src: local("Thmanyah Sans Regular"), local("ThmanyahSans-Regular"), url("/fonts/thmanyah/regular.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: "Thmanyah Local";
  src: local("Thmanyah Sans Medium"), local("ThmanyahSans-Medium"), url("/fonts/thmanyah/medium.otf") format("opentype");
  font-weight: 500;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: "Thmanyah Local";
  src: local("Thmanyah Sans Bold"), local("ThmanyahSans-Bold"), url("/fonts/thmanyah/bold.otf") format("opentype");
  font-weight: 700;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: "Thmanyah Local";
  src: local("Thmanyah Sans Black"), local("ThmanyahSans-Black"), url("/fonts/thmanyah/black.otf") format("opentype");
  font-weight: 900;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: "Alexandria";
  src: url("/fonts/alexandria-arabic.woff2") format("woff2");
  font-weight: 300 800;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF;
}

:root {
  --bg: #0b0c0e;
  --chrome: #111215;
  --sidebar-bg: #111215;
  --bg-2: #15161a;
  --panel: #15161a;
  --panel-raised: #1c1d22;
  --pill: #25272c;
  --pill-hover: #2f3137;
  --pill-active: #3a3c43;
  --hover: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f2f3f5;
  --dim: #a3a6ad;
  --faint: #8b8e96;
  --accent: #e7ff0c;
  --on-accent: #000;
  --new: #f24dd8;
  --star: #fbbf24;
  --danger: #f87171;
  --radius: 14px;
  --radius-sm: 10px;
  /* Spacing scale: every gap, margin and padding uses one of 4, 8, 12, 16, 24, 32, 48, 64. */
  --top-h: 64px;
  --nav-h: var(--top-h);
  --sidebar-w: 248px;
  --gutter: 32px;
  --tile-w: clamp(240px, 19vw, 320px);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --font: "Manrope", "Thmanyah Local", "Alexandria", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 600 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.025em; font-weight: 800; }
p { margin: 0; }
button { font: inherit; color: inherit; }
kbd { font: 700 11px var(--font); padding: 2px 6px; border-radius: 5px; background: var(--pill-active); color: var(--dim); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.icon { width: 1.1em; height: 1.1em; flex: none; }
.muted { color: var(--dim); }
.small { font-size: 13px; }
.center { text-align: center; margin: 32px 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.muted a, .center a, .text-link { color: var(--text); text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 3px; }
.text-link { display: inline-flex; align-items: center; gap: 8px; }
.text-link:hover { text-decoration-color: currentColor; }

/* ---- Buttons: grey pills, white for the main action, lime for buying ---- */
.pill-btn, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 0;
  background: var(--pill-active);
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, transform 0.1s;
}
.pill-btn:hover, .btn:hover { background: #474a52; }
.pill-btn:active:not(:disabled), .btn:active:not(:disabled) { transform: translateY(1px); }
.pill-btn:disabled, .btn:disabled { background: var(--pill); color: var(--faint); cursor: default; }
.pill-light, .btn-light { background: #fff; color: #000; }
.pill-light:hover, .btn-light:hover { background: #dcdde0; }
.pill-accent, .btn-accent { background: var(--accent); color: var(--on-accent); }
.pill-accent:hover, .btn-accent:hover { background: color-mix(in srgb, var(--accent) 82%, #000); }
.btn-quiet { background: var(--pill-active); }
.pill-lg, .btn-lg { padding: 12px 24px; font-size: 16px; }
.btn-sm { padding: 8px 12px; font-size: 13px; }
.pill-block, .btn-block { width: 100%; }
.pill-btn small { font-size: 12px; font-weight: 700; opacity: 0.55; }
.link-btn { background: none; border: 0; padding: 4px 8px; color: var(--dim); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; border-radius: 6px; font-weight: 700; }
.link-btn:hover { color: var(--text); background: var(--hover); }

.round-btn {
  width: 40px;
  height: 40px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 0;
  background: var(--pill);
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s;
}
.round-btn:hover { background: var(--pill-hover); }
.round-btn .icon { width: 19px; height: 19px; }
.round-btn.small { width: 32px; height: 32px; }
.round-btn.small .icon { width: 16px; height: 16px; }
.ghost-btn { width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: var(--dim); cursor: pointer; }
.ghost-btn:hover { color: var(--text); background: var(--hover); }
.ghost-btn .icon { width: 19px; height: 19px; }

/* Small all-caps labels: genres, NEW, statuses on cards */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 4px;
  background: #2e3035;
  color: #e6e7ea;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1;
}
a.tag:hover { background: #3a3c43; }
.tag-new { background: var(--new); color: #000; }

/* ---- App shell: top bar, sidebar, content ---- */
.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--top-h);
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr auto;
  align-items: center;
  gap: 16px;
  padding-inline-end: 24px;
  background: var(--chrome);
  border-bottom: 1px solid var(--border);
}
.topbar-left { display: flex; align-items: center; justify-content: space-between; padding-inline: 24px 16px; }
.logo { font-size: 20px; font-weight: 800; letter-spacing: -0.05em; }
.logo span { color: var(--accent); }
.history { display: flex; gap: 4px; }
.topbar-center { display: flex; align-items: center; justify-content: center; gap: 8px; }
.search-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(360px, 100%);
  height: 40px;
  padding-inline: 16px 12px;
  border: 0;
  border-radius: 999px;
  background: var(--pill);
  color: var(--dim);
  font-weight: 700;
  cursor: text;
  transition: background 0.15s;
}
.search-pill:hover { background: var(--pill-hover); }
.search-pill span { flex: 1; text-align: start; }
.search-pill .icon { width: 18px; height: 18px; }
.topbar-right { display: flex; align-items: center; justify-content: flex-end; gap: 16px; }
.nav-login { font-weight: 700; font-size: 14px; color: var(--dim); }
.nav-login:hover { color: var(--text); }

.menu { position: relative; }
.menu-button { background: none; border: 0; padding: 0; cursor: pointer; border-radius: 50%; display: flex; }
.menu-button .avatar { --size: 34px; }
.menu-list {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 12px);
  min-width: 232px;
  padding: 8px;
  display: grid;
  border-radius: var(--radius);
  background: #1c1d22;
  border: 1px solid var(--border-strong);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.55);
}
.menu-list[hidden], .dropdown-menu[hidden] { display: none; }
.menu-user { display: flex; gap: 12px; align-items: center; padding: 8px 8px 12px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.menu-list a, .menu-list button, .dropdown-menu button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  background: none;
  font-weight: 700;
  font-size: 14px;
  text-align: start;
  cursor: pointer;
}
.menu-list a:hover, .menu-list button:hover, .dropdown-menu button:hover { background: var(--hover); }
.menu-sep { height: 1px; background: var(--border); margin: 8px 4px; }

.sidebar {
  position: fixed;
  top: var(--top-h);
  bottom: 0;
  inset-inline-start: 0;
  z-index: 40;
  width: var(--sidebar-w);
  padding: 16px 12px 24px;
  overflow-y: auto;
  background: var(--sidebar-bg);
  border-inline-end: 1px solid var(--border);
  scrollbar-width: thin;
}
.side-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
.side-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 15px;
  transition: background 0.15s;
}
.side-link .icon { width: 20px; height: 20px; color: #d6d8dc; }
.side-link:hover { background: var(--hover); }
.side-link.active { background: var(--pill-active); }
.side-link .tag { margin-inline-start: auto; }
.side-games { margin-top: 24px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; }
.side-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 8px;
  color: var(--dim);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.side-label:hover { color: var(--text); }
.side-label span { color: var(--faint); }
.side-game {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #e3e4e7;
  min-height: 32px;
}
.side-game:hover { background: var(--hover); }
.side-game.active { background: var(--pill-active); color: #fff; }
.side-game img, .side-game-blank { width: 24px; height: 24px; flex: none; border-radius: 5px; object-fit: cover; background: var(--pill); }
.side-game span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-note { padding: 4px 12px; color: var(--faint); font-size: 13px; }
.side-more { padding: 8px 12px; color: var(--dim); font-size: 13px; font-weight: 700; }
.side-more:hover { color: var(--text); }
.side-cta { margin-top: 24px; padding: 16px; border-radius: var(--radius); background: var(--panel-raised); display: grid; gap: 8px; justify-items: start; }
.side-cta p { color: var(--dim); font-size: 13px; font-weight: 600; }

.content { margin-inline-start: var(--sidebar-w); padding-top: var(--top-h); min-height: 100vh; display: flex; flex-direction: column; }
#app { flex: 1; outline: none; min-width: 0; }
.tabbar { display: none; }

/* ---- Pages ---- */
.page { padding: 32px var(--gutter) 48px; width: 100%; max-width: 1680px; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; }
.page-head h1, .browse-head h1 { font-size: clamp(28px, 2.6vw, 36px); }
.browse-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }

.search-bar { display: flex; gap: 8px; align-items: center; margin-bottom: 16px; }
.search-field, .big-search {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(460px, 100%);
  height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--pill);
  color: var(--dim);
  transition: background 0.15s;
}
.big-search { width: min(560px, 100%); margin-bottom: 24px; }
.search-field:focus-within, .big-search:focus-within { background: var(--pill-hover); }
.search-field .icon, .big-search .icon { width: 18px; height: 18px; }
.search-field input, .big-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: none;
  background: none;
  color: var(--text);
  font: 700 15px var(--font);
}
.search-field input::placeholder, .big-search input::placeholder { color: var(--dim); }

.filter-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.pill-group {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  max-width: 100%;
  padding: 4px;
  overflow-x: auto;
  border-radius: 999px;
  background: var(--panel);
  scrollbar-width: none;
}
.pill-group::-webkit-scrollbar { display: none; }
/* Older pages' button pairs ("Select all / Select none") share the pill group look. */
.segmented { display: inline-flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--panel); }
.segmented button, .segmented a { padding: 8px 16px; border: 0; border-radius: 999px; background: none; color: var(--dim); font-weight: 700; font-size: 14px; cursor: pointer; }
.segmented button:hover, .segmented a:hover { color: var(--text); background: var(--pill); }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.pill-group a, .pill-group button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--dim);
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.pill-group a:hover, .pill-group button:hover { color: var(--text); }
.pill-group .active, .pill-group .active:hover { background: var(--pill-active); color: var(--text); }
.pill-group-label { padding: 0 8px 0 12px; color: var(--dim); font-size: 14px; font-weight: 700; white-space: nowrap; }
.pill-count { color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; }
.view-toggle { display: inline-flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--panel); }
.view-toggle button { width: 40px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 999px; background: none; color: var(--dim); cursor: pointer; }
.view-toggle button.active { background: var(--pill-active); color: var(--text); }
.view-toggle .icon { width: 17px; height: 17px; }

.empty { text-align: center; padding: 64px 16px; display: grid; justify-items: center; gap: 8px; color: var(--dim); }
.empty h3 { color: var(--text); font-size: 19px; }
.empty .btn, .empty .pill-btn { margin-top: 8px; }
.empty-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.catalog-note { margin-top: 8px; color: var(--faint); font-size: 13px; }

/* ---- Game cards ---- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.tile { display: block; min-width: 0; }
.tile-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: inset 0 0 0 1px var(--border);
}
.tile-art { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s var(--ease); }
.tile:hover .tile-art { transform: scale(1.04); }
.tile-frame::before { content: ""; position: absolute; inset: 0; z-index: 3; border-radius: inherit; box-shadow: inset 0 0 0 2px transparent; transition: box-shadow 0.2s; pointer-events: none; }
.tile:hover .tile-frame::before, .tile:focus-visible .tile-frame::before { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.85); }
.tile:focus-visible { outline: none; }
.art-fallback { display: grid; place-items: center; padding: 12px; text-align: center; font-weight: 800; font-size: 17px; letter-spacing: -0.02em; line-height: 1.15; }
/* Title bottom-left for art that doesn't include the game's name. */
.needs-title::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.1) 55%, transparent); pointer-events: none; }
.tile-overlay-title {
  position: absolute;
  inset-inline-start: 16px;
  inset-inline-end: 48px;
  bottom: 12px;
  z-index: 1;
  display: -webkit-box;
  font-weight: 800;
  font-size: clamp(15px, 1.25vw, 19px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-tag {
  position: absolute;
  top: 8px;
  inset-inline-start: 8px;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1;
}
.card-corner { position: absolute; inset-inline-end: 8px; bottom: 8px; z-index: 2; display: flex; gap: 4px; }
.corner-chip, .rating-pill, .status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.rating-pill { color: var(--star); }
.rating-pill .icon { width: 11px; height: 11px; }
.status-playing { background: #2563eb; }
.status-completed { background: #15803d; }
.status-played { background: #6d28d9; }
.status-want { background: #b45309; }
.status-dropped { background: #b91c1c; }

/* List view */
.list { display: grid; gap: 2px; }
.list-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 2fr);
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  align-items: center;
  gap: 16px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}
.list-row:hover { background: var(--panel); }
.list-thumb { width: 64px; height: 36px; border-radius: 5px; object-fit: cover; background: var(--pill); }
.list-name { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-col { color: var(--dim); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-section { margin-bottom: 32px; }
.lib-section h2 { font-size: 18px; margin-bottom: 12px; }
.lib-section h2 span { color: var(--faint); font-size: 14px; margin-inline-start: 4px; }

/* ---- Rows that scroll sideways ---- */
.row { margin-bottom: 32px; margin-inline: calc(var(--gutter) * -1); }
.row-head { display: flex; align-items: baseline; gap: 12px; padding: 0 var(--gutter); margin-bottom: 12px; }
.row-head h2 { font-size: 18px; letter-spacing: -0.02em; }
.row-more { display: inline-flex; align-items: center; gap: 4px; color: var(--dim); font-size: 13.5px; font-weight: 700; }
.row-more:hover { color: var(--text); }
.row-viewport { position: relative; }
.row-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: var(--tile-w);
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--gutter);
  padding: 4px var(--gutter) 8px;
  scrollbar-width: none;
}
.row-track::-webkit-scrollbar { display: none; }
.row-track > * { scroll-snap-align: start; }
.row-small { --tile-w: clamp(180px, 13vw, 220px); }
.row-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 32px;
  height: 32px;
  margin-top: -16px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--pill-active);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  transition: opacity 0.2s;
}
.row-arrow .icon { width: 16px; height: 16px; }
.row-arrow.prev { inset-inline-start: 8px; }
.row-arrow.next { inset-inline-end: 8px; }
.row-viewport:hover .row-arrow { opacity: 1; }
.row-viewport.at-start .prev, .row-viewport.at-end .next { opacity: 0 !important; pointer-events: none; }

/* Top 10: tall posters with big outlined numbers */
.row-top10 .row-track { grid-auto-columns: clamp(200px, 16vw, 260px); gap: 8px; }
.rank-tile { display: flex; align-items: flex-end; }
.rank { flex: none; font-size: clamp(120px, 10vw, 180px); font-weight: 800; line-height: 0.74; letter-spacing: -0.09em; color: var(--bg); -webkit-text-stroke: 3px #44464e; margin-inline-end: -0.14em; user-select: none; }
.poster { position: relative; flex: 0 0 60%; aspect-ratio: 2 / 3; border-radius: var(--radius-sm); overflow: hidden; background: var(--panel); transition: transform 0.3s var(--ease); }
.rank-tile:hover .poster { transform: translateY(-4px); }
.rank-tile:hover .rank { -webkit-text-stroke-color: #8a8c96; }
.poster-art { width: 100%; height: 100%; object-fit: cover; }
.poster-composed { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 4px; padding: 12px; overflow: hidden; }
.poster-blur { position: absolute; inset: -24px; background-size: cover; background-position: center; filter: blur(20px) brightness(0.45) saturate(1.2); }
.poster-shot { position: relative; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 4px; margin-block: auto; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5); }
.poster-title { position: relative; font-weight: 800; font-size: 15px; line-height: 1.15; letter-spacing: -0.02em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.poster-year { position: relative; color: var(--dim); font-size: 12px; font-weight: 700; }

/* ---- Seasons ---- */
/* The home page dresses up for the time of year (public/js/seasons.js). Each
   season sets an accent, a lighter second color, the text color on the accent,
   a dark tint for the spotlight and a haze color, as RGB triples where they
   go into gradients. Without a season these fall back to GameShelf's own. */
:root {
  --s-accent: var(--accent);
  --s-accent-2: #f2f3f5;
  --s-ink: var(--on-accent);
  --s-tint: 11, 12, 14;
  --s-haze: 0, 0, 0;
}
:root[data-season="fright-night"] { --s-accent: #ff7a1a; --s-accent-2: #ffc078; --s-ink: #1a0800; --s-tint: 22, 9, 4; --s-haze: 112, 44, 150; }
:root[data-season="winter"] { --s-accent: #8fdcff; --s-accent-2: #e2f6ff; --s-ink: #00131c; --s-tint: 6, 15, 24; --s-haze: 110, 175, 230; }
:root[data-season="ramadan"] { --s-accent: #f2c66d; --s-accent-2: #ffe7b0; --s-ink: #1a1200; --s-tint: 7, 11, 32; --s-haze: 46, 66, 160; }
:root[data-season="eid"] { --s-accent: #ffd36b; --s-accent-2: #8ff0c9; --s-ink: #1a1200; --s-tint: 4, 20, 16; --s-haze: 30, 150, 105; }
:root[data-season="lunar-new-year"] { --s-accent: #ff4d3d; --s-accent-2: #ffc94a; --s-ink: #1a0300; --s-tint: 28, 6, 6; --s-haze: 210, 40, 30; }
:root[data-season="summer"] { --s-accent: #ffb020; --s-accent-2: #ffd08a; --s-ink: #1a0f00; --s-tint: 24, 15, 4; --s-haze: 255, 150, 50; }

/* The season's ornament beside the logo. */
.logo-ornament { display: inline-grid; margin-inline-start: 6px; vertical-align: -1px; color: var(--s-accent); --season-carve: var(--chrome); }
.logo-ornament .icon { width: 16px; height: 16px; }

/* ---- Home: spotlight ---- */
/* Full width, cinematic: the game's art (and Steam's silent preview loop once
   it loads) behind the season's tint, with the text bottom left and the other
   spotlight games as thumbnails bottom right. */
.spotlight {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px 40px;
  min-height: clamp(540px, 76vh, 800px);
  margin: -32px calc(var(--gutter) * -1) 40px;
  padding: 120px var(--gutter) 40px;
  background: rgb(var(--s-tint));
}
.sp-media { position: absolute; inset: 0; z-index: -1; }
.sp-art, .sp-video { position: absolute; inset: 0; width: 100%; height: 100%; }
.sp-art { background-size: cover; background-position: center 25%; opacity: 0; transform: scale(1.06); transition: opacity 1s var(--ease), transform 10s linear; }
.sp-art.active { opacity: 1; transform: scale(1); }
.sp-video { object-fit: cover; opacity: 0; transition: opacity 0.9s var(--ease); }
.spotlight.has-video .sp-video { opacity: 1; }
.sp-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; mix-blend-mode: screen; }
.sp-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(var(--s-tint), 0.94) 0%, rgba(var(--s-tint), 0.6) 34%, rgba(var(--s-tint), 0) 64%),
    linear-gradient(0deg, var(--page-tint, var(--bg)) 0%, rgba(var(--s-tint), 0.4) 24%, transparent 52%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.5), transparent 20%);
}
/* A low glow in the season's color, drifting slowly. */
.sp-fog {
  display: none;
  position: absolute;
  inset: auto -15% -20%;
  height: 60%;
  background:
    radial-gradient(ellipse 40% 60% at 25% 70%, rgba(var(--s-haze), 0.38), transparent 70%),
    radial-gradient(ellipse 35% 50% at 75% 80%, rgba(var(--s-haze), 0.3), transparent 70%);
  filter: blur(24px);
  animation: haze-drift 22s ease-in-out infinite alternate;
}
:root[data-season] .sp-fog { display: block; }
@keyframes haze-drift { to { transform: translateX(6%) translateY(-4%); } }
/* Ramadan's moon. */
.sp-emblem { display: none; }
:root[data-season="ramadan"] .sp-emblem {
  display: block;
  position: absolute;
  top: clamp(72px, 12vh, 120px);
  inset-inline-end: 9%;
  width: clamp(72px, 7vw, 120px);
  color: #f7e1a6;
  filter: drop-shadow(0 0 24px rgba(247, 225, 166, 0.55)) drop-shadow(0 0 64px rgba(247, 225, 166, 0.3));
}
.sp-emblem .icon { width: 100%; height: auto; }

.sp-body { display: grid; gap: 16px; justify-items: start; max-width: 660px; }
.sp-body.enter > * { animation: sp-in 0.7s var(--ease) both; }
.sp-body.enter > :nth-child(2) { animation-delay: 0.05s; }
.sp-body.enter > :nth-child(3) { animation-delay: 0.1s; }
.sp-body.enter > :nth-child(n + 4) { animation-delay: 0.15s; }
@keyframes sp-in { from { opacity: 0; transform: translateY(12px); } }
.sp-eyebrow { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.sp-season { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 10px; border-radius: 999px; background: var(--s-accent); color: var(--s-ink); font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; --season-carve: var(--s-accent); }
.sp-season .icon { width: 16px; height: 16px; }
.sp-season.plain { padding-inline-start: 14px; background: rgba(255, 255, 255, 0.14); color: var(--text); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.sp-note { color: var(--s-accent-2); font-size: 14px; font-weight: 700; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6); }
.sp-body .title-art { font-size: clamp(38px, 4.8vw, 76px); font-weight: 800; line-height: 1; letter-spacing: -0.045em; text-wrap: balance; text-shadow: 0 6px 32px rgba(0, 0, 0, 0.5); }
/* The soft light halo keeps dark logos readable on the dark shade. */
.sp-body .logo-art { max-height: clamp(84px, 11vw, 170px); max-width: min(520px, 100%); object-fit: contain; object-position: left bottom; filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.5)) drop-shadow(0 0 22px rgba(255, 255, 255, 0.22)) drop-shadow(0 8px 32px rgba(0, 0, 0, 0.5)); }
.sp-pitch { max-width: 560px; color: #eceef2; font-size: 16px; font-weight: 600; line-height: 1.55; text-shadow: 0 2px 16px rgba(0, 0, 0, 0.7); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sp-meta { color: #cdd0d6; font-size: 14px; font-weight: 700; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6); }
.sp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 8px; }
.sp-secondary { background: rgba(255, 255, 255, 0.14); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.sp-secondary:hover { background: rgba(255, 255, 255, 0.24); }

.sp-rail { display: grid; grid-auto-flow: column; justify-content: start; gap: 10px; }
.sp-thumb { position: relative; width: clamp(112px, 8.6vw, 156px); aspect-ratio: 16 / 10; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: var(--panel); cursor: pointer; opacity: 0.6; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45); transition: opacity 0.2s, transform 0.2s var(--ease); }
.sp-thumb:hover { opacity: 0.9; transform: translateY(-2px); }
.sp-thumb.active { opacity: 1; outline: 2px solid var(--s-accent); outline-offset: 3px; }
.sp-thumb-art { position: absolute; inset: 0; background-size: cover; background-position: center; }
.sp-thumb-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* The progress bar is the timer (see home.js). */
.sp-progress { position: absolute; inset-inline: 0; bottom: 0; height: 3px; background: var(--s-accent); transform: scaleX(0); transform-origin: left; }
.sp-thumb.active .sp-progress { animation: sp-fill 9s linear forwards; }
.spotlight:hover .sp-progress, .spotlight.paused .sp-progress { animation-play-state: paused; }
@keyframes sp-fill { to { transform: scaleX(1); } }
/* Narrower windows: the thumbnails go under the text instead of beside it. */
@media (max-width: 1440px) {
  .spotlight { grid-template-columns: 1fr; }
}
.sp-pause { position: absolute; top: 24px; inset-inline-end: var(--gutter); background: rgba(0, 0, 0, 0.35); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.sp-pause:hover { background: rgba(0, 0, 0, 0.55); }

/* ---- Home: seasonal sections ---- */
.season-head { align-items: flex-end; }
.season-head .kicker { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; color: var(--s-accent); font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; --season-carve: var(--bg); }
.season-head .kicker .icon { width: 14px; height: 14px; }
.season-head h2 { font-size: clamp(22px, 2vw, 28px); letter-spacing: -0.03em; }
.season-section { margin-bottom: 48px; }

/* One big game and four smaller ones. */
.bento { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 12px; height: clamp(400px, 34vw, 540px); padding: 0 var(--gutter); }
.bento-card { position: relative; isolation: isolate; display: flex; align-items: flex-end; padding: 16px; border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.bento-card.big { grid-row: span 2; padding: 28px; }
.bento-art { position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: center; transition: transform 0.6s var(--ease); }
.bento-card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.05) 60%); }
.bento-card:hover .bento-art { transform: scale(1.04); }
.bento-card:hover, .bento-card:focus-visible { outline: 2px solid var(--s-accent); outline-offset: -2px; }
.bento-info { display: grid; gap: 6px; min-width: 0; }
.bento-info strong { font-size: 16px; font-weight: 800; line-height: 1.2; letter-spacing: -0.01em; }
.bento-card.big .bento-info strong { font-size: clamp(26px, 2.6vw, 38px); line-height: 1.05; letter-spacing: -0.035em; }
.bento-pitch { max-width: 520px; color: #dfe1e5; font-size: 15px; font-weight: 600; line-height: 1.5; }
.bento-meta { color: #b9bcc3; font-size: 13px; font-weight: 700; }

/* Release dates with a countdown. */
.row-countdown .row-track { grid-auto-columns: clamp(260px, 21vw, 340px); }
.cd-card { position: relative; isolation: isolate; display: flex; align-items: flex-end; gap: 12px; aspect-ratio: 16 / 9; padding: 14px; border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.cd-art { position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: center; transition: transform 0.5s var(--ease); }
.cd-card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(0, 0, 0, 0.85), transparent 65%); }
.cd-card:hover .cd-art { transform: scale(1.04); }
.cd-date { flex: none; display: grid; justify-items: center; width: 54px; padding: 6px 0 7px; border-radius: 10px; background: var(--s-accent); color: var(--s-ink); font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; line-height: 1.1; }
.cd-date strong { font-size: 22px; letter-spacing: -0.02em; }
.cd-info { display: grid; gap: 2px; min-width: 0; }
.cd-info strong { font-size: 15px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cd-info span { color: var(--s-accent-2); font-size: 13px; font-weight: 700; }

/* Tall posters with names. */
.row-posters .row-track { grid-auto-columns: clamp(150px, 11vw, 190px); }
.poster-tile { display: grid; gap: 8px; min-width: 0; }
.poster-tile .poster { flex: none; }
.poster-tile:hover .poster { transform: translateY(-4px); }
.poster-caption { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Winter: the year in review. */
.recap { position: relative; isolation: isolate; margin: 0 var(--gutter); padding: clamp(24px, 3vw, 40px); border-radius: var(--radius); overflow: hidden; background: linear-gradient(110deg, rgb(var(--s-tint)), var(--panel)); border: 1px solid var(--border); }
.recap-art { position: absolute; inset: 0; z-index: -1; background-size: cover; background-position: center; opacity: 0.3; -webkit-mask-image: linear-gradient(90deg, transparent 20%, #000); mask-image: linear-gradient(90deg, transparent 20%, #000); }
.recap-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px; }
.recap-stat { display: grid; gap: 4px; min-width: 0; }
.recap-stat strong { font-size: clamp(28px, 3vw, 44px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.05; color: var(--s-accent-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recap-stat span { color: var(--dim); font-size: 14px; font-weight: 700; }

/* ---- Home: living color ---- */
/* The page behind the home screen takes on the color of the spotlight game
   (set as --art by home.js) and eases into the next one. */
@property --art { syntax: '<color>'; inherits: true; initial-value: #0b0c0e; }
.content.tinted {
  --page-tint: color-mix(in srgb, var(--art) 13%, var(--bg));
  background: linear-gradient(180deg, var(--page-tint) 0, var(--page-tint) 760px, color-mix(in srgb, var(--art) 5%, var(--bg)) 1600px, var(--bg) 2600px);
  transition: --art 1.4s var(--ease);
}

/* ---- Home: discovery queue card ---- */
.dq-card { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 32px; margin-bottom: 48px; padding: 32px 40px; border-radius: var(--radius); overflow: hidden; background: linear-gradient(110deg, color-mix(in srgb, var(--s-accent) 14%, var(--panel)), var(--panel) 60%); border: 1px solid var(--border); }
.dq-card-text { display: grid; justify-items: start; gap: 10px; max-width: 560px; }
.dq-card .kicker, .mood-section .kicker { color: var(--s-accent); font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.dq-card h2 { font-size: clamp(24px, 2.4vw, 34px); letter-spacing: -0.03em; }
.dq-card p { color: #cfd2d8; font-weight: 600; line-height: 1.55; }
.dq-card p strong { color: var(--text); }
.dq-card .pill-btn { margin-top: 6px; }
.dq-card .pill-btn .icon { width: 18px; height: 18px; }
.dq-card-stack { position: relative; width: 330px; height: 210px; }
.dq-card-poster { position: absolute; top: 0; width: 120px; aspect-ratio: 2 / 3; border-radius: 10px; background-color: var(--pill); background-size: cover; background-position: center; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6); transition: transform 0.5s var(--ease); }
.dq-card-poster.p0 { inset-inline-start: 0; transform: rotate(-10deg) translateY(18px); }
.dq-card-poster.p1 { inset-inline-start: 68px; transform: rotate(-3deg) translateY(4px); z-index: 1; }
.dq-card-poster.p2 { inset-inline-start: 136px; transform: rotate(4deg); z-index: 2; }
.dq-card-poster.p3 { inset-inline-start: 204px; transform: rotate(11deg) translateY(16px); z-index: 3; }
.dq-card:hover .dq-card-poster.p0 { transform: rotate(-15deg) translate(-12px, 22px); }
.dq-card:hover .dq-card-poster.p1 { transform: rotate(-5deg) translate(-4px, 2px); }
.dq-card:hover .dq-card-poster.p2 { transform: rotate(6deg) translate(4px, -2px); }
.dq-card:hover .dq-card-poster.p3 { transform: rotate(16deg) translate(14px, 18px); }

/* ---- Home: moods ---- */
.mood-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 var(--gutter); margin-bottom: 16px; }
.mood-chip { padding: 10px 18px; border: 1px solid var(--border-strong); border-radius: 999px; background: transparent; color: var(--text); font: 700 14px var(--font); cursor: pointer; transition: background 0.15s, border-color 0.15s, color 0.15s; }
.mood-chip:hover { background: var(--hover); }
.mood-chip.active { background: var(--text); border-color: var(--text); color: #000; }
.mood-row { min-height: 180px; transition: opacity 0.2s; }
.mood-row.loading { opacity: 0.45; }
.mood-row .row { margin-inline: 0; margin-bottom: 0; }
.mood-empty { padding: 0 var(--gutter); }
.mood-section { margin-bottom: 48px; }

/* ---- Hover previews (preview.js) ---- */
.hover-card { position: fixed; z-index: 90; border-radius: 14px; overflow: hidden; background: #17181c; border: 1px solid var(--border-strong); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7); opacity: 0; transform: scale(0.82); transition: opacity 0.16s, transform 0.22s var(--ease); }
.hover-card.open { opacity: 1; transform: none; }
.hc-media { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--panel); }
.hc-art, .hc-media video { position: absolute; inset: 0; width: 100%; height: 100%; }
.hc-art { background-size: cover; background-position: center; }
.hc-media video { object-fit: cover; opacity: 0; transition: opacity 0.5s; }
.hover-card.has-video .hc-media video { opacity: 1; }
.hc-body { display: grid; gap: 4px; padding: 14px 16px 16px; }
.hc-name { font-size: 17px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.25; }
.hc-meta { color: var(--dim); font-size: 13px; font-weight: 700; }
.hc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.hc-actions .icon { width: 16px; height: 16px; }
.hc-status { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-size: 13px; font-weight: 800; }
.hover-card .play-main { padding: 8px 10px 8px 14px; font-size: 13px; }
.hover-card .play-main small { display: none; }
.hover-card .play-more { padding: 0 10px 0 8px; }

/* ---- Discovery queue (discover.js) ---- */
html.dq-open { overflow: hidden; }
.dq { position: fixed; inset: 0; z-index: 110; isolation: isolate; display: grid; place-items: center; padding: 32px; background: rgba(5, 6, 8, 0.8); animation: dq-fade 0.25s ease both; }
.dq-bg { position: absolute; inset: -60px; z-index: -1; background-size: cover; background-position: center; filter: blur(48px) brightness(0.4) saturate(1.3); }
.dq-close { position: absolute; top: 20px; inset-inline-end: 20px; z-index: 2; }
.dq-panel { width: min(1100px, 100%); max-height: calc(100vh - 64px); overflow: auto; border-radius: 20px; background: #121317; border: 1px solid var(--border-strong); box-shadow: 0 40px 120px rgba(0, 0, 0, 0.7); animation: dq-rise 0.35s var(--ease) both; }
.dq-media { position: relative; aspect-ratio: 16 / 8; background: var(--panel); }
.dq-art, .dq-media video { position: absolute; inset: 0; width: 100%; height: 100%; }
.dq-art { background-size: cover; background-position: center 25%; }
.dq-media video { object-fit: cover; opacity: 0; transition: opacity 0.6s; }
.dq-media.has-video video { opacity: 1; }
.dq-shade { position: absolute; inset: 0; background: linear-gradient(0deg, #121317 0%, rgba(18, 19, 23, 0.35) 35%, transparent 65%); }
.dq-title { position: absolute; inset-inline: 32px; bottom: 16px; display: grid; justify-items: start; gap: 8px; }
.dq-title .title-art { font-size: clamp(30px, 3.6vw, 52px); font-weight: 800; letter-spacing: -0.04em; line-height: 1; text-shadow: 0 4px 24px rgba(0, 0, 0, 0.6); }
.dq-title .logo-art { max-height: clamp(70px, 9vw, 120px); max-width: min(420px, 100%); object-fit: contain; object-position: left bottom; filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.5)) drop-shadow(0 0 22px rgba(255, 255, 255, 0.22)) drop-shadow(0 8px 32px rgba(0, 0, 0, 0.5)); }
.dq-meta { color: #d0d2d8; font-size: 14px; font-weight: 700; }
.dq-info { display: grid; gap: 16px; padding: 12px 32px 28px; }
.dq-progress { display: flex; gap: 6px; }
.dq-progress span { flex: 1; height: 4px; border-radius: 2px; background: var(--pill); }
.dq-progress span.done { background: color-mix(in srgb, var(--accent) 45%, var(--pill)); }
.dq-progress span.now { background: var(--accent); }
.dq-pitch { max-width: 760px; color: #dcdee3; font-size: 16px; font-weight: 600; line-height: 1.55; }
.dq-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.dq-actions .icon { width: 18px; height: 18px; }
.dq-actions kbd { margin-inline-start: 2px; padding: 1px 7px; border-radius: 6px; background: rgba(0, 0, 0, 0.16); font: 800 11px var(--font); }
.pill-btn:not(.pill-accent) kbd { background: rgba(255, 255, 255, 0.1); }
.dq-link { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 4px; color: var(--dim); font-weight: 700; }
.dq-link:hover { color: var(--text); }
.dq-loading { padding: 96px 32px; text-align: center; color: var(--dim); font-weight: 700; }
.dq-done { display: grid; justify-items: center; gap: 12px; padding: 64px 32px; text-align: center; }
.dq-done h2 { font-size: 28px; letter-spacing: -0.03em; }
.dq-done-mark { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: var(--on-accent); }
.dq-done-mark .icon { width: 28px; height: 28px; }
.dq-done .dq-actions { margin-top: 8px; }
@keyframes dq-fade { from { opacity: 0; } }
@keyframes dq-rise { from { opacity: 0; transform: translateY(16px) scale(0.98); } }

.season-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border); }
.season-picker label { font-size: 14px; font-weight: 800; }
.season-picker select { width: auto; min-width: 260px; }

.title-art.has-logo { line-height: 0; }

.tip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; padding: 0 var(--gutter); }
.tip-card { position: relative; min-height: 200px; padding: 24px; border-radius: var(--radius); overflow: hidden; background: var(--panel); display: flex; align-items: flex-start; transition: background 0.2s; }
.tip-card:hover { background: var(--panel-raised); }
.tip-art { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0.22; -webkit-mask-image: linear-gradient(0deg, #000, transparent 85%); mask-image: linear-gradient(0deg, #000, transparent 85%); }
.tip-text { position: relative; display: grid; gap: 8px; }
.tip-text strong { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.tip-text span { color: #cfd1d5; font-size: 14px; font-weight: 600; }
.tip-text em { font-style: normal; color: var(--accent); font-weight: 800; white-space: nowrap; }

.genre-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; padding: 0 var(--gutter); }
.genre-card { position: relative; aspect-ratio: 16 / 7; border-radius: var(--radius-sm); overflow: hidden; display: flex; align-items: flex-end; padding: 12px 16px; background: var(--panel-raised); font-weight: 800; font-size: 16px; }
.genre-art { position: absolute; inset: 0; background-size: cover; background-position: center; transition: transform 0.4s var(--ease); }
.genre-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.15) 70%); }
.genre-name { position: relative; z-index: 1; }
.genre-card:hover .genre-art { transform: scale(1.05); }

/* ---- Game page ---- */
.game-page { position: relative; }
.gp-backdrop { position: absolute; inset: 0 0 auto; height: 560px; background-size: cover; background-position: center 25%; opacity: 0.45; -webkit-mask-image: linear-gradient(180deg, #000 20%, transparent); mask-image: linear-gradient(180deg, #000 20%, transparent); pointer-events: none; }
.gp { position: relative; }
.gp-head { display: flex; align-items: flex-end; gap: 32px; padding-top: 32px; margin-bottom: 32px; }
.gp-cover { width: 360px; aspect-ratio: 16 / 9; flex: none; align-self: center; border-radius: var(--radius-sm); object-fit: cover; background: var(--panel); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5); }
.gp-cover.tall { width: 200px; aspect-ratio: 2 / 3; }
.gp-main-head { flex: 1; min-width: 0; display: grid; gap: 16px; }
.gp-main-head h1 { font-size: clamp(30px, 3.4vw, 56px); line-height: 1.05; letter-spacing: -0.035em; }
.gp-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 4px; }
.gp-facts { color: #d6d7db; font-size: 15px; font-weight: 700; min-width: 0; }
.gp-actions { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px 16px; margin-top: 8px; }
.gp-buy { display: flex; align-items: center; gap: 8px; }
.gp-tabs { margin-bottom: 16px; }
.gp-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; margin-bottom: 32px; }
.gp-main { display: grid; gap: 16px; min-width: 0; }
.panel h2 { font-size: 17px; margin-bottom: 16px; }
.prose { color: #d4d5d9; white-space: pre-line; font-size: 15.5px; font-weight: 500; line-height: 1.7; }
.detail-rows { margin: 0; display: grid; }
.detail-rows div { display: flex; justify-content: space-between; gap: 24px; padding: 12px 0; border-top: 1px solid var(--border); }
.detail-rows div:first-child { border-top: 0; padding-top: 0; }
.detail-rows dt { color: var(--dim); }
.detail-rows dd { margin: 0; font-weight: 700; text-align: end; }
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.user-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; background: var(--pill); transition: background 0.15s; }
.user-chip:hover { background: var(--pill-hover); }
.user-chip-name { font-weight: 700; font-size: 14px; }

.list-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 24px; }
.dropdown { position: relative; }
.chevron { width: 16px; height: 16px; opacity: 0.7; }
.dropdown-menu { position: absolute; top: calc(100% + 8px); inset-inline-start: 0; z-index: 20; min-width: 232px; padding: 8px; border-radius: var(--radius); background: #1c1d22; border: 1px solid var(--border-strong); box-shadow: 0 20px 48px rgba(0, 0, 0, 0.6); }
.dropdown-menu .check { width: 18px; display: inline-grid; color: var(--accent); }
.dropdown-menu .danger { color: var(--danger); }
.rate { display: flex; align-items: center; gap: 12px; }
.rate-label { color: var(--dim); font-weight: 700; font-size: 14px; min-width: 52px; font-variant-numeric: tabular-nums; }
.playtime { color: var(--dim); font-weight: 700; font-size: 14px; }

.gp-side { display: grid; gap: 16px; align-content: start; min-width: 0; }
.buy-card { display: grid; gap: 12px; }

/* Media gallery: a big viewer and a strip of thumbnails */
.media { padding: 12px; display: grid; gap: 12px; }
.media-stage { aspect-ratio: 16 / 9; border-radius: var(--radius-sm); overflow: hidden; background: #000; }
.media-stage img, .media-stage iframe { width: 100%; height: 100%; object-fit: cover; border: 0; display: block; }
.media-stage a { display: block; height: 100%; }
.stage-video { position: relative; width: 100%; height: 100%; padding: 0; border: 0; background: #000; cursor: pointer; }
.stage-play { position: absolute; left: 50%; top: 50%; width: 72px; height: 72px; margin: -36px 0 0 -36px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5); transition: transform 0.15s; }
.stage-play .icon { width: 30px; height: 30px; margin-left: 4px; }
.stage-video:hover .stage-play { transform: scale(1.08); }
.stage-caption { position: absolute; inset-inline-start: 16px; bottom: 16px; padding: 4px 12px; border-radius: 999px; background: rgba(0, 0, 0, 0.7); font-weight: 700; font-size: 13px; }
.media-strip-wrap { position: relative; min-width: 0; }
.media-strip { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 40px) / 6); gap: 8px; overflow-x: auto; padding: 2px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.media-strip::-webkit-scrollbar { display: none; }
.media-thumb { scroll-snap-align: start; }
/* Faded edges show there is more to scroll to. */
.media-strip-wrap::before, .media-strip-wrap::after { content: ""; position: absolute; top: 0; bottom: 0; width: 56px; z-index: 1; pointer-events: none; transition: opacity 0.2s; }
.media-strip-wrap::before { inset-inline-start: 0; background: linear-gradient(to var(--to-end), var(--panel), transparent); }
.media-strip-wrap::after { inset-inline-end: 0; background: linear-gradient(to var(--to-start), var(--panel), transparent); }
.media-strip-wrap.at-start::before, .media-strip-wrap.at-end::after { opacity: 0; }
.strip-arrow { position: absolute; top: 50%; z-index: 2; width: 32px; height: 32px; margin-top: -16px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--pill-active); color: #fff; cursor: pointer; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5); transition: opacity 0.2s; }
.strip-arrow:hover { background: #474a52; }
.strip-arrow .icon { width: 16px; height: 16px; }
.strip-arrow.prev { inset-inline-start: 4px; }
.strip-arrow.next { inset-inline-end: 4px; }
.media-strip-wrap.at-start .prev, .media-strip-wrap.at-end .next { opacity: 0; pointer-events: none; }
.media-thumb { position: relative; aspect-ratio: 16 / 9; padding: 0; border: 0; border-radius: 6px; overflow: hidden; background: var(--pill); cursor: pointer; opacity: 0.55; box-shadow: inset 0 0 0 2px transparent; transition: opacity 0.15s; }
.media-thumb img { width: 100%; height: 100%; object-fit: cover; }
.media-thumb:hover { opacity: 0.85; }
.media-thumb.active { opacity: 1; box-shadow: 0 0 0 2px var(--accent); }
.media-play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: rgba(0, 0, 0, 0.35); }
.media-play .icon { width: 22px; height: 22px; }

/* Scores */
.score-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.score-card { display: grid; align-content: start; justify-items: start; gap: 8px; padding: 16px; min-width: 0; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--border); }
a.score-card:hover { border-color: var(--border-strong); }
.score-card strong { display: block; font-size: 14px; }
.score-card small { color: var(--dim); font-size: 12px; font-weight: 600; }
.score-card strong, .score-card small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.score-card > span:last-child { min-width: 0; max-width: 100%; }
.score-box { flex: none; width: 48px; height: 48px; border-radius: 8px; display: grid; place-items: center; font-size: 21px; font-weight: 800; color: #000; }
.score-box.good { background: var(--accent); }
.score-box.mixed { background: #fbbf24; }
.score-box.bad { background: var(--danger); }
.score-num { line-height: 48px; font-size: 30px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }

/* Steam's "About this game", rebuilt from safe blocks */
.rich { display: grid; gap: 16px; }
.fold { position: relative; max-height: 640px; overflow: hidden; }
.fold::after { content: ""; position: absolute; inset: auto 0 0; height: 120px; background: linear-gradient(0deg, var(--panel), transparent); pointer-events: none; }
.fold.open { max-height: none; }
.fold.open::after { display: none; }
.fold-btn { margin-top: 16px; }
.rich h3 { font-size: 17px; margin-top: 8px; }
.rich p { color: #d4d5d9; font-weight: 500; line-height: 1.7; white-space: pre-line; }
.rich ul { margin: 0; padding-inline-start: 20px; color: #d4d5d9; font-weight: 500; line-height: 1.7; }
.rich img, .rich video { width: 100%; border-radius: var(--radius-sm); }

/* Editions & add-ons */
.addon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.addon { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: var(--radius-sm); background: var(--panel-raised); transition: background 0.15s; }
.addon:hover { background: var(--pill); }
.addon img, .addon-blank { width: 44px; aspect-ratio: 3 / 4; flex: none; border-radius: 4px; object-fit: cover; background: var(--pill); }
.addon-text { display: grid; gap: 4px; justify-items: start; min-width: 0; }
.addon-name { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* System requirements */
.req-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.req-list { margin: 8px 0 0; display: grid; gap: 8px; }
.req-list div { display: grid; grid-template-columns: 96px 1fr; gap: 12px; font-size: 14px; }
.req-list dt { color: var(--dim); }
.req-list dd { margin: 0; font-weight: 600; }
.req-note { grid-template-columns: 1fr !important; }
.req-note dd { color: var(--dim); font-weight: 500; }

/* Features & languages */
.feature-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-flat { padding: 4px 12px; border-radius: 999px; background: var(--pill); font-size: 13px; font-weight: 700; }
.lang-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.lang-table th, .lang-table td { padding: 8px 4px; border-top: 1px solid var(--border); text-align: center; }
.lang-table thead th { border-top: 0; color: var(--dim); font-size: 11px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.lang-table tbody th { text-align: start; font-weight: 700; }
.lang-yes { color: var(--accent); }
.lang-no { color: var(--faint); }
.lang-extra, .deal-extra { display: none !important; }
.show-all-langs .lang-extra { display: table-row !important; }
.show-all .deal-extra { display: flex !important; }
.source-note { margin-top: 16px; color: var(--faint); font-size: 12px; font-weight: 600; }
.source-note a { color: var(--dim); text-decoration: underline; text-underline-offset: 2px; }
.buy-card h2 { margin-bottom: 0; }
.buy-subhead { font-size: 11px; font-weight: 800; color: var(--dim); letter-spacing: 0.06em; text-transform: uppercase; margin-top: 8px; }
.best-price { display: grid; gap: 12px; padding: 16px; border-radius: var(--radius-sm); background: var(--panel-raised); }
.best-label { color: var(--dim); font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.best-row { display: flex; align-items: center; gap: 12px; }
.best-amount { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.discount { background: var(--accent); color: var(--on-accent); font-weight: 800; font-size: 13px; padding: 4px 8px; border-radius: 6px; }
.deal-list, .store-list { display: grid; }
.deal, .store { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--border); font-weight: 700; }
.deal:last-child, .store:last-child { border-bottom: 0; }
.deal:hover .deal-store, .store:hover > span:first-child { text-decoration: underline; text-underline-offset: 3px; }
.deal-price { display: flex; align-items: baseline; gap: 8px; font-variant-numeric: tabular-nums; }
.deal-price s { color: var(--faint); font-size: 13px; }
.store-kind { display: inline-flex; align-items: center; gap: 8px; color: var(--dim); font-size: 13px; }
.fine-print { color: var(--faint); font-size: 12px; }

/* ---- Search palette ---- */
.pal-backdrop { position: fixed; inset: 0; z-index: 100; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; background: rgba(0, 0, 0, 0.6); }
.palette { width: min(640px, 100%); border-radius: 20px; background: #141519; border: 1px solid var(--border-strong); box-shadow: 0 32px 96px rgba(0, 0, 0, 0.7); overflow: hidden; }
.pal-input-row { display: flex; align-items: center; gap: 12px; padding: 16px 24px; border-bottom: 1px solid var(--border); }
.pal-input-row .icon { width: 22px; height: 22px; color: var(--dim); }
.pal-input-row input { flex: 1; min-width: 0; border: 0; outline: none; background: none; color: var(--text); font: 800 21px var(--font); }
.pal-input-row input::placeholder { color: var(--dim); }
.pal-input-row input::-webkit-search-cancel-button { display: none; }
.pal-hint { color: var(--dim); font-size: 12px; font-weight: 700; white-space: nowrap; }
.pal-results { max-height: 60vh; overflow-y: auto; padding: 8px; }
.pal-section + .pal-section { border-top: 1px solid var(--border); margin-top: 8px; padding-top: 8px; }
.pal-label { padding: 8px 16px 4px; color: var(--dim); font-size: 13px; font-weight: 700; }
.pal-item { display: flex; align-items: center; gap: 16px; padding: 8px 16px; border-radius: var(--radius-sm); }
.pal-item:hover, .pal-item.active { background: var(--pill); }
.pal-thumb { width: 56px; height: 32px; flex: none; border-radius: 4px; object-fit: cover; background: var(--pill-hover); }
.pal-name { font-size: 17px; font-weight: 800; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pal-meta { margin-inline-start: auto; color: var(--dim); font-size: 13px; }
.pal-all { display: block; padding: 12px 16px; color: var(--dim); font-weight: 700; font-size: 14px; border-top: 1px solid var(--border); margin-top: 8px; }
.pal-all:hover { color: var(--text); }
.pal-empty { padding: 24px 16px; color: var(--dim); }

/* ---- Loading skeletons ---- */
.sk { border-radius: var(--radius-sm); background: linear-gradient(90deg, #15161a 0%, #1f2025 50%, #15161a 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.sk-page { padding: 32px var(--gutter) 48px; }
.sk-title { width: 260px; height: 32px; margin-bottom: 24px; }
.sk-heading { width: 180px; height: 20px; margin-bottom: 12px; }
.sk-spotlight { height: clamp(540px, 76vh, 800px); border-radius: 0; margin-bottom: 40px; }
.sk-row { margin-bottom: 32px; }
.sk-track { display: flex; gap: 16px; overflow: hidden; }
.sk-tile { flex: 0 0 var(--tile-w); }
.sk-frame { aspect-ratio: 16 / 9; border-radius: 12px; }
.sk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.sk-hero { height: 360px; border-radius: 0; }
.sk-hero.short { height: 280px; }
.sk-line { height: 11px; margin-top: 12px; width: 70%; }
.sk-line.short { width: 40%; }
.sk-line.wide { width: 100%; }

/* ---- Stars ---- */
.stars { position: relative; display: inline-block; line-height: 0; vertical-align: middle; --progress: 0; }
.stars-bg, .stars-fg { display: flex; white-space: nowrap; }
.stars .icon { width: 17px; height: 17px; padding: 0 1px; box-sizing: content-box; stroke-width: 0; }
.stars-bg { color: rgba(255, 255, 255, 0.18); }
.stars-fg { position: absolute; inset: 0 auto 0 0; width: calc(var(--progress) * 100%); overflow: hidden; color: var(--star); }
.stars.lg .icon { width: 28px; height: 28px; padding: 0 2px; }
.star-input { position: relative; display: inline-block; }
.star-hit { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(10, 1fr); }
.star-hit button { border: 0; background: none; padding: 0; cursor: pointer; }
.star-hit button:focus-visible { outline: none; }
.star-input:focus-within { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }

/* ---- Inputs ---- */
.input {
  width: 100%;
  padding: 12px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: #0f0f13;
  color: var(--text);
  font: inherit;
  transition: border-color 0.2s;
}
.input:focus { outline: none; border-color: var(--accent); }
textarea.input { resize: vertical; min-height: 90px; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--dim) 50%), linear-gradient(135deg, var(--dim) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-inline-end: 48px; }
[dir="rtl"] select.input { background-position: 20px 50%, 25px 50%; }
label { display: grid; gap: 8px; font-size: 13px; font-weight: 700; color: var(--dim); }
.form-error { color: var(--danger); font-weight: 700; font-size: 14px; min-height: 1.4em; }

/* ---- Avatars & frames ---- */
.avatar {
  --size: 32px;
  --ring: 0px;
  position: relative;
  isolation: isolate;
  width: var(--size);
  height: var(--size);
  flex: none;
  border-radius: 50%;
  display: inline-grid;
}
.avatar-md { --size: 56px; }
.avatar-lg { --size: 84px; }
.avatar-xl { --size: clamp(120px, 14vw, 164px); }
.avatar > img, .avatar-letter { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: var(--bg-2); }
.avatar-letter { display: grid; place-items: center; font-weight: 800; text-transform: uppercase; font-size: calc(var(--size) * 0.42); }
.avatar::before { content: ""; position: absolute; inset: calc(var(--ring) * -1); border-radius: 50%; z-index: -1; }
.avatar:not(.frame-none) { --ring: max(2px, calc(var(--size) * 0.045)); margin: var(--ring); }
.frame-glow::before { background: var(--accent); box-shadow: 0 0 calc(var(--size) * 0.25) var(--accent); }
.frame-gold::before { background: conic-gradient(#fde68a, #b45309, #fef3c7, #d97706, #fde68a); }
.frame-neon::before { background: conic-gradient(#22d3ee, #a855f7, #ec4899, #22d3ee); animation: spin 3s linear infinite; filter: drop-shadow(0 0 6px #a855f7); }
.frame-fire::before { background: conic-gradient(#fef08a, #f97316, #dc2626, #f97316, #fef08a); animation: spin 2s linear infinite; filter: drop-shadow(0 0 8px #f97316); }
.frame-ice::before { background: conic-gradient(#e0f2fe, #38bdf8, #ffffff, #0ea5e9, #e0f2fe); animation: spin 6s linear infinite; filter: drop-shadow(0 0 6px #7dd3fc); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Profile ---- */
.profile { position: relative; min-height: 100vh; }
.profile-bg { position: fixed; inset: 0; z-index: -1; background-color: var(--bg); }
.profile-bg-img { position: absolute; inset: 0; background-size: cover; background-position: center top; }
.profile-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 11, 14, 0.15) 0%, rgba(11, 11, 14, 0.65) 45%, rgba(11, 11, 14, 0.92) 100%);
}
.profile-inner { max-width: 1240px; margin: 0 auto; padding: 32px var(--gutter) 48px; }
.profile-header, .showcase, .side-card { background: rgba(14, 14, 18, 0.84); border: 1px solid var(--border); }
.profile-header {
  border-radius: 16px;
  padding: clamp(16px, 3vw, 32px);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: clamp(16px, 3vw, 32px);
  align-items: center;
  margin-bottom: 24px;
}
.profile-id h1 { font-size: clamp(28px, 3.4vw, 42px); }
.headline { color: var(--accent); font-weight: 700; font-size: 16px; margin-top: 4px; filter: brightness(1.3); }
.profile-sub { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--dim); margin-top: 12px; font-size: 14px; }
.profile-sub span { display: inline-flex; align-items: center; gap: 4px; }
.bio { margin-top: 16px; color: #d4d4d8; white-space: pre-line; max-width: 62ch; }
.profile-level { display: grid; gap: 12px; justify-items: end; align-self: start; min-width: 210px; }
.level-row { display: flex; align-items: center; gap: 12px; font-size: 18px; font-weight: 700; }
.level {
  --tier: #9ca3af;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2.5px solid var(--tier);
  display: inline-grid;
  place-items: center;
  font-weight: 800;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.level.lg { width: 46px; height: 46px; font-size: 18px; border-width: 3px; }
.level-tier-1 { --tier: #ef4444; } .level-tier-2 { --tier: #f97316; } .level-tier-3 { --tier: #eab308; }
.level-tier-4 { --tier: #22c55e; } .level-tier-5 { --tier: #3b82f6; } .level-tier-6 { --tier: #a855f7; }
.level-tier-7 { --tier: #ec4899; } .level-tier-8 { --tier: #14b8a6; } .level-tier-9 { --tier: #fde047; }
.xp-bar { --progress: 0; width: 210px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.xp-bar span { display: block; height: 100%; width: calc(var(--progress) * 100%); background: var(--accent); transition: width 0.6s var(--ease); }
.profile-actions { display: flex; gap: 8px; margin-top: 8px; }

.profile-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.profile-main { display: grid; gap: 24px; min-width: 0; }
.showcase { border-radius: 16px; padding: clamp(16px, 2.4vw, 24px); min-width: 0; }
.showcase-title { font-size: 18px; margin-bottom: 16px; letter-spacing: -0.02em; }
.showcase-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.showcase-head .text-link { margin-top: 0; }
.favorite-card { position: relative; display: block; aspect-ratio: 21 / 9; border-radius: var(--radius); overflow: hidden; background: var(--bg-2); }
.favorite-bg { position: absolute; inset: 0; background-size: cover; background-position: center; transition: transform 0.6s var(--ease); }
.favorite-card:hover .favorite-bg { transform: scale(1.03); }
.favorite-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0, 0, 0, 0.85), transparent 60%); }
.favorite-info { position: absolute; inset-inline: 22px; bottom: 18px; z-index: 1; display: grid; gap: 12px; justify-items: start; }
.favorite-info .title-art { font-size: clamp(22px, 3vw, 34px); }
.favorite-info .logo-art { max-height: clamp(50px, 8vw, 96px); max-width: min(360px, 70%); }
.favorite-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 14px; }
.stat-blocks { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 1px; background: var(--border); border-radius: 10px; overflow: hidden; }
.stat-blocks div { background: #121216; padding: 16px; display: grid; gap: 2px; }
.stat-blocks strong { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat-blocks span { color: var(--dim); font-size: 13px; font-weight: 600; }
.showcase-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 12px; }
.library-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 24px 12px; }
.showcase-cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; border-style: dashed; border-color: var(--border-strong); }
.showcase-cta h3 { font-size: 17px; margin-bottom: 4px; }
.showcase-cta p { max-width: 52ch; }

.tabs { display: flex; gap: 4px; overflow-x: auto; margin-bottom: 16px; border-bottom: 1px solid var(--border); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 12px;
  color: var(--dim);
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.2s, border-color 0.2s;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--accent); }
.tab-count { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }

.comment-form { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: start; margin-bottom: 16px; }
.comment-form textarea {
  min-height: 44px;
  padding: 12px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: #0f0f13;
  color: var(--text);
  font: inherit;
  resize: vertical;
}
.comment-form textarea:focus { outline: none; border-color: var(--accent); }
.comments { list-style: none; margin: 0; padding: 0; display: grid; }
.comment { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.comment-head { display: flex; align-items: center; gap: 12px; margin-bottom: 2px; }
.comment-head .link-btn { margin-inline-start: auto; opacity: 0; }
.comment:hover .link-btn, .comment-head .link-btn:focus-visible { opacity: 1; }
.comment-body p { color: #d4d4d8; white-space: pre-line; overflow-wrap: anywhere; }

.profile-side { display: grid; gap: 16px; position: sticky; top: calc(var(--nav-h) + 16px); }
.side-card { border-radius: 16px; padding: 24px; }
.side-card h3 { font-size: 15px; margin-bottom: 16px; display: flex; justify-content: space-between; align-items: baseline; letter-spacing: -0.01em; }
.side-card h3 .muted { font-size: 13px; font-weight: 600; }

/* Badges: hexagonal medals in bronze, silver and gold */
.badges { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 8px; }
.badge { display: grid; justify-items: center; gap: 8px; text-align: center; cursor: default; }
.medal {
  width: 46px;
  height: 52px;
  display: grid;
  place-items: center;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: #26262d;
  color: #4d4d57;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.medal span { display: grid; place-items: center; width: 38px; height: 43px; clip-path: inherit; background: rgba(0, 0, 0, 0.18); }
.tier-1 .medal { background: linear-gradient(160deg, #f3c08d, #b8692e 50%, #6e3a12); color: #2b1606; }
.tier-2 .medal { background: linear-gradient(160deg, #ffffff, #b4b4bd 50%, #5b5b66); color: #1e1e24; }
.tier-3 .medal { background: linear-gradient(160deg, #fff1a8, #e2a817 50%, #8a6106); color: #2a1d00; }
.tier-0 .medal span { background: none; box-shadow: inset 0 0 0 1.5px #3a3a44; }
.badge-name { font-size: 11px; font-weight: 700; line-height: 1.2; color: #d4d4d8; }
.tier-0 .badge-name { color: var(--faint); }

.side-stats, .activity { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.side-stats li { display: flex; justify-content: space-between; color: var(--dim); font-size: 14px; }
.side-stats strong { color: var(--text); font-variant-numeric: tabular-nums; }
.activity a { font-weight: 700; }
.activity a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Preset profile backgrounds */
.bg-midnight { background: radial-gradient(ellipse at 50% -10%, #1e293b, #0b0b0e 65%); }
.bg-aurora { background: radial-gradient(at 15% 5%, rgba(16, 185, 129, 0.45), transparent 45%), radial-gradient(at 85% 0%, rgba(99, 102, 241, 0.5), transparent 50%), radial-gradient(at 50% 55%, rgba(6, 182, 212, 0.22), transparent 55%), #05070d; }
.bg-sunset { background: linear-gradient(165deg, #9a3412 0%, #be185d 40%, #3b0764 75%, #0b0b0e 100%); }
.bg-ocean { background: radial-gradient(at 70% 0%, rgba(14, 165, 233, 0.45), transparent 55%), linear-gradient(180deg, #0c4a6e, #082f49 45%, #020617); }
.bg-ember { background: radial-gradient(at 50% 110%, rgba(220, 38, 38, 0.65), transparent 55%), radial-gradient(at 0% 0%, rgba(249, 115, 22, 0.35), transparent 45%), #0c0a09; }
.bg-forest { background: radial-gradient(at 30% 0%, rgba(74, 222, 128, 0.25), transparent 50%), linear-gradient(170deg, #14532d, #052e16 50%, #020617); }
.bg-nebula { background: radial-gradient(at 25% 15%, rgba(168, 85, 247, 0.55), transparent 42%), radial-gradient(at 80% 55%, rgba(236, 72, 153, 0.4), transparent 42%), radial-gradient(at 45% 100%, rgba(59, 130, 246, 0.35), transparent 50%), #070312; }
.bg-synthwave { background: repeating-linear-gradient(0deg, transparent 0 38px, rgba(236, 72, 153, 0.18) 38px 40px) bottom / 100% 45% no-repeat, linear-gradient(180deg, #1e0b3b 0%, #6b21a8 45%, #db2777 70%, #f97316 100%); }

/* ---- Edit profile ---- */
.customize { max-width: 1180px; padding-bottom: 96px; }
.customize-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 24px; }
.customize-head h1 { font-size: clamp(28px, 3vw, 36px); margin-bottom: 8px; }
.preview { position: relative; overflow: hidden; border-radius: 16px; height: 190px; margin-bottom: 32px; border: 1px solid var(--border); }
.preview-bg { position: absolute; inset: 0; background-size: cover; background-position: center 30%; }
.preview-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11, 11, 14, 0.85), rgba(11, 11, 14, 0.2)); }
.preview-content { position: relative; height: 100%; display: flex; align-items: center; gap: 24px; padding: 0 32px; }
.preview-name { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; }
.preview-headline { color: var(--accent); font-weight: 700; filter: brightness(1.3); margin-bottom: 12px; }
.preview-accent { display: inline-block; padding: 4px 12px; border-radius: 5px; background: var(--accent); color: var(--on-accent); font-size: 12px; font-weight: 800; }
.customize-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 32px; align-items: start; }
.side-nav { position: sticky; top: calc(var(--nav-h) + 24px); display: grid; gap: 2px; }
.side-nav a { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: var(--radius-sm); color: var(--dim); font-weight: 700; font-size: 14px; }
.side-nav a:hover { background: var(--hover); color: var(--text); }
.customize-sections { display: grid; gap: 16px; min-width: 0; }
.panel { border-radius: 14px; padding: clamp(16px, 2.5vw, 24px); scroll-margin-top: calc(var(--nav-h) + 24px); background: var(--panel); border: 1px solid var(--border); }
.panel h2 { font-size: 19px; margin-bottom: 16px; }
.subhead { font-size: 13px; color: var(--dim); margin: 24px 0 12px; letter-spacing: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.avatar-edit { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; }
.avatar-actions { display: grid; gap: 12px; justify-items: start; }
.avatar-actions label { color: #fff; font-size: 14px; display: inline-flex; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); gap: 12px; }
.swatch {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 12px 8px;
  border-radius: 10px;
  border: 1.5px solid transparent;
  background: var(--panel-raised);
  cursor: pointer;
  transition: border-color 0.15s;
  min-width: 0;
}
.swatch:hover { border-color: var(--border-strong); }
.swatch.selected { border-color: var(--accent); }
.swatch-label { font-size: 12px; font-weight: 700; color: #d4d4d8; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bg-swatch { width: 100%; aspect-ratio: 16 / 9; border-radius: 6px; background-size: cover; background-position: center; }
.colors { display: flex; flex-wrap: wrap; gap: 12px; }
.color {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid var(--panel);
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 0 0 2px transparent;
  transition: box-shadow 0.15s;
}
.color:hover { box-shadow: 0 0 0 2px var(--border-strong); }
.color.selected { box-shadow: 0 0 0 2px #fff; }
.showcase-editor { background: var(--panel-raised); border-radius: var(--radius); padding: 16px; display: grid; gap: 12px; margin-bottom: 12px; }
.showcase-editor-head { display: flex; justify-content: space-between; align-items: center; }
.icon-buttons { display: flex; gap: 4px; }
.icon-buttons button { width: 32px; height: 32px; border-radius: 6px; border: 0; background: none; cursor: pointer; display: grid; place-items: center; color: var(--dim); }
.icon-buttons button:hover:not(:disabled) { background: var(--hover); color: var(--text); }
.icon-buttons button:disabled { opacity: 0.3; cursor: default; }
.picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; max-height: 340px; overflow-y: auto; padding: 4px; }
.pick {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: var(--bg-2);
  box-shadow: 0 0 0 2px transparent;
  opacity: 0.55;
  transition: opacity 0.2s, box-shadow 0.2s;
}
.pick:hover { opacity: 1; }
.pick.selected { opacity: 1; box-shadow: 0 0 0 2px var(--accent); }
.pick img, .pick-fallback { width: 100%; height: 100%; object-fit: cover; }
.pick-fallback { display: grid; place-items: center; font-size: 12px; font-weight: 800; padding: 8px; }
.pick-num {
  position: absolute;
  top: 6px;
  inset-inline-end: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 12px;
  font-weight: 800;
  display: grid;
  place-items: center;
}
.add-showcase { display: grid; gap: 12px; margin-top: 8px; }
.add-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.save-bar {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 60;
  transform: translate(-50%, 160%);
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px 12px 12px 24px;
  border-radius: 12px;
  background: #1d1d23;
  border: 1px solid var(--border-strong);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  transition: transform 0.4s var(--ease);
  font-weight: 700;
  white-space: nowrap;
}
.save-bar.show { transform: translate(-50%, 0); }
.save-bar div { display: flex; gap: 8px; }

/* ---- Steam import ---- */
.import { max-width: 1100px; }
.import-intro { max-width: 640px; display: grid; gap: 12px; margin-bottom: 24px; }
.import-intro h1 { font-size: clamp(28px, 3vw, 36px); }
.import-form { display: flex; gap: 12px; flex-wrap: wrap; max-width: 640px; margin-bottom: 8px; }
.import-form .input { flex: 1; min-width: 220px; height: 48px; }
.import-form .btn { height: 48px; }
.import-summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin: 32px 0 16px; }
.import-summary h2 { font-size: 20px; }
.import-list { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.import-row {
  display: grid;
  grid-template-columns: auto 120px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}
.import-row:last-child { border-bottom: 0; }
.import-row.unmatched { opacity: 0.45; }
.import-row img, .import-thumb { width: 120px; aspect-ratio: 16 / 9; border-radius: 5px; object-fit: cover; background: var(--bg-2); }
.import-name { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.import-name small { display: block; color: var(--dim); font-weight: 600; }
.import-hours { color: var(--dim); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; text-align: end; min-width: 64px; }
.import-row select { width: 150px; padding: 8px 32px 8px 12px; font-size: 13px; }
.import-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); }
.import-bar { position: sticky; bottom: 16px; margin-top: 16px; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 12px 12px 24px; border-radius: 12px; background: #1d1d23; border: 1px solid var(--border-strong); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5); }
.steps { margin: 0; padding-inline-start: 24px; color: var(--dim); display: grid; gap: 8px; }
.steps code { background: var(--panel-raised); padding: 1px 8px; border-radius: 4px; color: var(--text); font-size: 13px; }

/* ---- Auth ---- */
.auth { position: relative; min-height: calc(100vh - var(--top-h)); display: grid; place-items: center; padding: 48px 16px; overflow: hidden; }
.auth-wall { position: absolute; inset: -20%; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; transform: rotate(-8deg); opacity: 0.45; }
.auth-tile { aspect-ratio: 16 / 9; border-radius: 10px; background-size: cover; background-position: center; }
.auth-shade { position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(11, 11, 14, 0.55), rgba(11, 11, 14, 0.96) 70%); }
.auth-card { background: var(--panel); border: 1px solid var(--border); position: relative; width: min(420px, 100%); border-radius: 16px; padding: 32px; display: grid; gap: 16px; }
.auth-card h1 { font-size: 28px; }
.auth-card .center { margin: 0; }

/* ---- Community ---- */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.person {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 0 16px 24px;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  overflow: hidden;
  text-align: center;
  transition: border-color 0.2s;
}
.person:hover { border-color: var(--border-strong); }
.person-banner { width: calc(100% + 32px); height: 96px; margin-bottom: -46px; background-size: cover; background-position: center; }
.person .avatar { margin-bottom: 8px; }
.person-count { margin-top: 8px; color: var(--dim); font-size: 13px; font-weight: 700; }

/* ---- Toast & footer ---- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 100;
  transform: translate(-50%, 20px);
  opacity: 0;
  padding: 12px 16px;
  border-radius: 10px;
  background: #fff;
  color: #000;
  font-weight: 700;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  transition: transform 0.25s var(--ease), opacity 0.25s;
  max-width: calc(100vw - 32px);
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast.error { background: var(--danger); color: #fff; }
.footer { padding: 32px var(--gutter); color: var(--faint); font-size: 13px; text-align: center; display: grid; gap: 4px; }
.footer a { text-decoration: underline; }
.pill-danger { background: transparent; color: var(--danger); box-shadow: inset 0 0 0 1.5px var(--danger); }
.pill-danger:hover { background: rgba(248, 113, 113, 0.12); }
.token-list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.token-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.token-made { margin: 0 0 16px; }
.token-made code { display: block; margin-top: 6px; padding: 8px 10px; border-radius: 8px; background: var(--pill); word-break: break-all; user-select: all; }
#tokens > p.muted { margin-bottom: 16px; }
.danger-zone { border-color: rgba(248, 113, 113, 0.3); }
.danger-zone p { margin-bottom: 16px; }
.delete-form { display: flex; gap: 8px; flex-wrap: wrap; }
.delete-form .input { max-width: 260px; }
.legal { max-width: 900px; display: grid; gap: 16px; }
.legal .page-head { margin-bottom: 0; }
.legal .lead { font-size: 17px; }
.legal p { color: #d4d5d9; font-weight: 500; line-height: 1.65; }
.legal a { text-decoration: underline; text-underline-offset: 2px; }
.plain-list { margin: 0 0 16px; padding-inline-start: 20px; display: grid; gap: 8px; color: #d4d5d9; font-weight: 500; line-height: 1.6; }
.plain-list:last-child { margin-bottom: 0; }

/* ---- App settings (desktop app) ---- */
.app-settings { max-width: 900px; display: grid; gap: 16px; }
.app-settings .page-head { margin-bottom: 0; }
.app-settings .lead { font-size: 17px; }
.app-settings .panel > p { margin: 12px 0 0; line-height: 1.6; }
.app-settings .panel h2:not(:first-child) { margin-top: 32px; }
.app-settings .panel p a { text-decoration: underline; text-underline-offset: 2px; }
.app-settings .panel > .btn { margin-top: 16px; }
.app-settings .overlay-style { margin-top: 28px; }
.app-settings .overlay-style h3 { font-size: 16px; margin-bottom: 12px; letter-spacing: -0.01em; }
.app-settings .overlay-style p { margin: 10px 0 0; }
.app-settings code { font-size: 13px; word-break: break-all; }
.settings-status { display: flex; align-items: center; gap: 8px; margin: 0 0 16px !important; font-weight: 700; }
.settings-status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.settings-status.igdb::before, .settings-status.rawg::before { background: var(--accent); }
.settings-actions { display: flex; gap: 8px; margin-top: 8px; }
.check-row { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; font-weight: 700; cursor: pointer; }
.check-row input { width: 18px; height: 18px; accent-color: var(--accent); }
.app-settings .form-error:empty { min-height: 0; }

/* ---- Installed games (desktop app) ---- */
/* Play glows in the accent color; while the game starts or runs it turns into a white Stop button. */
:root { --play-glow: 0 10px 32px -8px color-mix(in srgb, var(--accent) 80%, transparent), 0 0 28px -6px color-mix(in srgb, var(--accent) 45%, transparent); }
.play-slot { display: contents; }
.installed-page { max-width: 900px; }
.installed-page .page-head { display: block; }
.installed-page .page-head p { margin: 8px 0 0; }
.installed-page .nowrap { white-space: nowrap; }
.installed-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin: 24px 0 16px; }
/* A capsule split in two: Play (or Stop), then a faded arrow for the game's options. */
.play-btn { position: relative; display: inline-flex; align-items: stretch; border-radius: 999px; background: var(--accent); color: var(--on-accent); box-shadow: var(--play-glow); transition: background 0.2s, color 0.2s, box-shadow 0.3s; }
.play-btn:hover { box-shadow: 0 12px 40px -6px color-mix(in srgb, var(--accent) 95%, transparent), 0 0 36px -4px color-mix(in srgb, var(--accent) 55%, transparent); }
.play-main, .play-more { display: inline-flex; align-items: center; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; transition: background 0.15s; }
.play-main { gap: 8px; padding-block: 12px; padding-inline: 24px 18px; border-start-start-radius: 999px; border-end-start-radius: 999px; font-size: 16px; font-weight: 700; white-space: nowrap; }
.play-main small { font-size: 12px; font-weight: 700; opacity: 0.55; }
.play-main .icon { width: 18px; height: 18px; }
.play-more { padding-inline: 12px 16px; border-start-end-radius: 999px; border-end-end-radius: 999px; border-inline-start: 1px solid rgba(0, 0, 0, 0.16); opacity: 0.5; }
.play-more .icon { width: 18px; height: 18px; }
.play-main:hover, .play-more:hover, .play-more[aria-expanded="true"] { background: rgba(0, 0, 0, 0.07); }
.play-more:hover, .play-more[aria-expanded="true"] { opacity: 1; }
.play-main:active { transform: translateY(1px); }
.play-btn.is-active, .tile-play.is-active { background: #fff; color: #000; box-shadow: 0 10px 32px -8px rgba(255, 255, 255, 0.6), 0 0 28px -6px rgba(255, 255, 255, 0.3); }
.play-menu { inset-inline-start: auto; inset-inline-end: 0; min-width: 280px; color: var(--text); }
.menu-label { padding: 8px 12px 4px; color: var(--dim); font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.menu-note { max-width: 264px; padding: 4px 12px 8px; color: var(--dim); font-size: 13px; line-height: 1.45; }
.menu-ext { width: 14px; height: 14px; margin-inline-start: auto; opacity: 0.5; }
.play-btn.is-starting, .tile-play.is-starting { animation: play-pulse 1.6s ease-in-out infinite; }
@keyframes play-pulse { 50% { box-shadow: 0 12px 44px -6px rgba(255, 255, 255, 0.85), 0 0 40px -2px rgba(255, 255, 255, 0.45); } }
.tile-wrap { position: relative; min-width: 0; }
.tile-play { position: absolute; inset-inline-end: 8px; bottom: 8px; z-index: 4; width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--accent); color: var(--on-accent); cursor: pointer; box-shadow: var(--play-glow); transition: transform 0.15s var(--ease), background 0.2s, color 0.2s; }
.tile-play:hover { transform: scale(1.1); }
.tile-play .icon { width: 16px; height: 16px; }
.tile-play:not(.is-active) .icon { margin-left: 2px; }
.add-tile { aspect-ratio: 16 / 9; display: grid; place-content: center; justify-items: center; gap: 4px; padding: 16px; border: 2px dashed var(--border-strong); border-radius: 12px; background: transparent; color: var(--dim); font: inherit; cursor: pointer; transition: border-color 0.2s, color 0.2s, background 0.2s; }
.add-tile:hover { border-color: var(--accent); color: var(--text); background: var(--panel); }
.add-tile .icon { width: 26px; height: 26px; margin-bottom: 4px; }
.add-tile strong { color: var(--text); font-size: 15px; }
.add-tile span { font-size: 13px; }
/* The "Add a game" pop-up reuses the search pop-up's frame. */
.add-game { display: grid; gap: 16px; padding: 24px; }
.add-head h2 { font-size: 21px; margin-bottom: 4px; }
.add-head p { word-break: break-all; }
.add-search { display: grid; gap: 8px; font-weight: 700; font-size: 14px; }
.add-results { display: grid; gap: 4px; max-height: 44vh; overflow-y: auto; }
.add-option { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: var(--radius-sm); cursor: pointer; }
.add-option:hover { background: var(--pill); }
.add-option:has(input:checked) { background: var(--pill); box-shadow: inset 0 0 0 1px var(--accent); }
.add-option input { accent-color: var(--accent); }
.add-option-name { flex: 1; min-width: 0; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.add-none { display: grid; place-items: center; color: var(--dim); }
.add-none .icon { width: 16px; height: 16px; }
.add-actions { display: flex; justify-content: flex-end; gap: 8px; }
.add-game .form-error:empty { display: none; }
.added-list { display: grid; margin-bottom: 16px; }
.added-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.added-row > div { display: grid; gap: 2px; min-width: 0; }
.added-row .small { word-break: break-all; }

/* ---- The "Arabic subtitles" switch beside Play ---- */
.arabic-toggle { display: inline-flex; align-items: center; gap: 10px; padding-block: 6px; padding-inline: 6px 14px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--pill); color: var(--text); font: inherit; text-align: start; cursor: pointer; transition: background 0.15s, opacity 0.15s; }
.arabic-toggle:hover:not(:disabled) { background: var(--pill-hover); }
.arabic-toggle:disabled { cursor: default; opacity: 0.6; }
.arabic-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--pill-active); font: 800 18px/1 "Thmanyah Local", "Alexandria", sans-serif; transition: background 0.2s, color 0.2s; }
.arabic-toggle.is-on .arabic-mark { background: var(--accent); color: var(--on-accent); }
.arabic-label { display: grid; line-height: 1.25; }
.arabic-label strong { font-size: 14px; font-weight: 700; white-space: nowrap; }
.arabic-label small { color: var(--dim); font-size: 12px; font-weight: 600; white-space: nowrap; }
.arabic-toggle.mode-native small { color: var(--accent); }
.arabic-toggle.mode-overlay small { color: #9ec5ff; }
.arabic-toggle.is-checking small { animation: play-pulse 1.6s ease-in-out infinite; }
.switch { position: relative; flex: none; width: 36px; height: 20px; border-radius: 999px; background: var(--pill-active); transition: background 0.2s; }
.switch span { position: absolute; top: 2px; inset-inline-start: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform 0.2s var(--ease); }
.arabic-toggle.is-on .switch { background: var(--accent); }
.arabic-toggle.is-on .switch span { background: #000; transform: translateX(16px); }
[dir="rtl"] .arabic-toggle.is-on .switch span { transform: translateX(-16px); }
/* No Arabic on this PC yet: "Ready on GameShelf", or "Request Arabic subtitles" with its progress underneath. */
.arabic-toggle { position: relative; overflow: hidden; }
.arabic-toggle.mode-available small { color: var(--accent); }
.arabic-toggle.is-request { padding-inline-end: 18px; }
.arabic-toggle.is-request .switch { display: none; }
.arabic-toggle.is-request .arabic-mark { background: var(--accent); color: var(--on-accent); }
.arabic-toggle.is-busy:disabled { opacity: 1; cursor: progress; }
.arabic-toggle.is-busy small { color: var(--text); }
.arabic-toggle.is-busy::after { content: ""; position: absolute; inset-block-end: 0; inset-inline-start: 0; height: 3px; width: var(--progress, 0%); background: var(--accent); transition: width 0.4s var(--ease); }
.arabic-toggle.is-busy .arabic-mark { animation: play-pulse 1.6s ease-in-out infinite; }
.arabic-toggle.is-busy .switch { display: none; }

/* ---- Library: the games on this PC ---- */
.pc-shelf { margin-bottom: 28px; }
.pc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.pc-head h2 { margin: 0; }
.pc-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pc-actions .pill-btn, .pc-prompt .pill-btn { display: inline-flex; align-items: center; gap: 6px; }
.pc-actions .pill-btn svg { width: 16px; height: 16px; }
.pc-prompt { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; padding: 14px 16px; border: 1px solid var(--border-strong); border-radius: 14px; background: var(--pill); }
.pc-prompt p { margin: 0; max-width: 62ch; }
.pc-prompt-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.arabic-badge { position: absolute; top: 8px; inset-inline-start: 8px; z-index: 4; display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 4px; border-radius: 999px; background: rgba(10, 11, 14, 0.82); color: #fff; font-size: 11px; font-weight: 700; backdrop-filter: blur(6px); }
[dir="rtl"] .arabic-badge { padding: 3px 4px 3px 9px; }
.arabic-badge span { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--pill-active); font: 800 11px/1 "Thmanyah Local", "Alexandria", sans-serif; }
.arabic-badge.badge-on span, .arabic-badge.badge-ready span { background: var(--accent); color: var(--on-accent); }
.arabic-badge.badge-request { color: #d9dde6; }

/* ---- Admin Panel ---- */
/* Elements these pages hide stay hidden whatever their display. */
.admin [hidden], .pc-shelf [hidden], .arabic-badge[hidden] { display: none !important; }
.studio-source .path-field { flex: 1 1 420px; margin: 0; }
.admin .page-head h1 { display: flex; align-items: center; gap: 10px; }
.admin .page-head h1 svg { width: 26px; height: 26px; color: var(--accent); }
.admin-body { display: grid; gap: 18px; margin-top: 18px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.stat-tile { display: grid; gap: 4px; padding: 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--panel); }
.stat-tile strong { font-size: 28px; font-weight: 800; }
.stat-tile span { color: var(--dim); font-size: 13px; }
.admin-table { display: grid; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.admin-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; gap: 16px; padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--panel); }
.admin-row:last-child { border-bottom: 0; }
.admin-row > div { display: grid; gap: 2px; min-width: 0; }
.admin-row > div .small { overflow-wrap: anywhere; }
.admin-row.is-off { opacity: 0.55; }
.role-tag { padding: 3px 10px; border-radius: 999px; background: var(--pill-active); font-size: 12px; font-weight: 700; }
.role-tag.admin { background: var(--accent); color: var(--on-accent); }
.drop-zone { position: relative; display: grid; justify-items: center; gap: 6px; padding: 28px 18px; border: 2px dashed var(--border-strong); border-radius: 14px; text-align: center; cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.drop-zone:hover, .drop-zone:focus-visible, .drop-zone.is-over { border-color: var(--accent); background: var(--pill); outline: none; }
.drop-zone svg { width: 28px; height: 28px; color: var(--accent); }
.upload-bar, .studio-progress { width: 100%; height: 4px; border-radius: 4px; background: var(--pill-active); overflow: hidden; }
.upload-bar span, .studio-progress span { display: block; width: 0; height: 100%; background: var(--accent); transition: width 0.3s var(--ease); }
.studio h2 { margin-top: 22px; }
.studio h2:first-child { margin-top: 0; }
.studio-source { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.path-field { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 8px 0; }
.path-value { flex: 1 1 260px; min-width: 0; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--dim); font: 13px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
.studio-key { margin: 6px 0 14px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); }
.studio-key.ok { border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.studio-key.warn { border-color: #b8860b; }
.studio-key p { margin: 4px 0 10px; }
.studio-progress { margin-top: 14px; }
.studio-log { max-height: 320px; margin-top: 12px; padding: 12px; border-radius: 10px; background: #08090b; color: #c9d1d9; font: 12px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; overflow: auto; }
.studio-log:empty { display: none; }
.studio-log .is-error { color: #ff9b9b; }
.studio-result { margin-top: 14px; padding: 14px; border-radius: 12px; background: var(--pill); }
@media (max-width: 720px) { .admin-row { grid-template-columns: 1fr; gap: 6px; } }

/* ---- Website: GameShelf for Windows ---- */
.get-app { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: clamp(18px, 3vw, 40px); align-items: center; margin: 8px 0 32px; padding: clamp(20px, 3vw, 34px); border: 1px solid var(--border-strong); border-radius: 22px; background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%), var(--panel); }
[dir="rtl"] .get-app { background: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%), var(--panel); }
.get-app-text h2 { margin: 10px 0 6px; font-size: clamp(22px, 3vw, 30px); }
.get-app-text > p { margin: 0 0 16px; color: var(--dim); }
.get-app-mark { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font: 800 22px/1 "Thmanyah Local", "Alexandria", sans-serif; }
.get-app-btn { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.get-app-btn svg { width: 18px; height: 18px; }
.get-app-btn.is-soon { opacity: 0.6; cursor: default; pointer-events: none; }
.get-app-text #get-app-note { margin: 10px 0 0; }
.get-app-steps { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.get-app-steps li { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: var(--pill); }
.get-app-steps strong { display: block; margin-bottom: 2px; }
.get-app-steps p { margin: 0; color: var(--dim); font-size: 14px; }
.step-n { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--pill-active); font-weight: 800; }
@media (max-width: 820px) { .get-app { grid-template-columns: 1fr; } }

/* ---- Arabic (right to left) ---- */
/* Gradient directions that follow the reading direction. */
:root { --to-end: right; --to-start: left; }
[dir="rtl"] { --to-end: left; --to-start: right; }
/* Arrows and chevrons that mean "back" or "next" point the other way. */
[dir="rtl"] .icon.flip { transform: scaleX(-1); }
/* Arabic letters join up, so no letter spacing, a lighter body weight and a
   little more line height for the dots and marks above and below. */
[dir="rtl"] body { font-weight: 500; line-height: 1.65; }
[dir="rtl"] *, [dir="rtl"] *::before, [dir="rtl"] *::after { letter-spacing: 0 !important; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 { line-height: 1.35; }
[dir="rtl"] .kicker, [dir="rtl"] .sp-season, [dir="rtl"] .menu-label, [dir="rtl"] .best-label { text-transform: none; }
/* Text that leans on the left in English leans on the right in Arabic. */
[dir="rtl"] .sp-shade {
  background:
    linear-gradient(270deg, rgba(var(--s-tint), 0.94) 0%, rgba(var(--s-tint), 0.6) 34%, rgba(var(--s-tint), 0) 64%),
    linear-gradient(0deg, var(--page-tint, var(--bg)) 0%, rgba(var(--s-tint), 0.4) 24%, transparent 52%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.5), transparent 20%);
}
[dir="rtl"] .sp-body .logo-art, [dir="rtl"] .dq-title .logo-art, [dir="rtl"] .feature-info .logo-art { object-position: right bottom; }
[dir="rtl"] .sp-progress { transform-origin: right; }
[dir="rtl"] .recap-art { -webkit-mask-image: linear-gradient(270deg, transparent 20%, #000); mask-image: linear-gradient(270deg, transparent 20%, #000); }
[dir="rtl"] .preview-bg::after { background: linear-gradient(270deg, rgba(11, 11, 14, 0.85), rgba(11, 11, 14, 0.2)); }
[dir="rtl"] .dq-card { background: linear-gradient(250deg, color-mix(in srgb, var(--s-accent) 14%, var(--panel)), var(--panel) 60%); }
[dir="rtl"] .dq-card-poster.p0 { transform: rotate(10deg) translateY(18px); }
[dir="rtl"] .dq-card-poster.p1 { transform: rotate(3deg) translateY(4px); }
[dir="rtl"] .dq-card-poster.p2 { transform: rotate(-4deg); }
[dir="rtl"] .dq-card-poster.p3 { transform: rotate(-11deg) translateY(16px); }
[dir="rtl"] .dq-card:hover .dq-card-poster.p0 { transform: rotate(15deg) translate(12px, 22px); }
[dir="rtl"] .dq-card:hover .dq-card-poster.p1 { transform: rotate(5deg) translate(4px, 2px); }
[dir="rtl"] .dq-card:hover .dq-card-poster.p2 { transform: rotate(-6deg) translate(-4px, -2px); }
[dir="rtl"] .dq-card:hover .dq-card-poster.p3 { transform: rotate(-16deg) translate(-14px, 18px); }
/* Keys, links and code stay left to right inside Arabic sentences. */
[dir="rtl"] kbd, [dir="rtl"] code { direction: ltr; unicode-bidi: isolate; }

/* The language switch in the top bar. */
.lang-btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 999px; background: none; color: var(--dim); font: 700 13px var(--font); cursor: pointer; transition: color 0.15s, border-color 0.15s, background 0.15s; }
.lang-btn:hover { color: var(--text); background: var(--hover); }
.lang-btn .icon { width: 16px; height: 16px; }
.lang-choices { display: flex; gap: 8px; margin-bottom: 8px; }

/* ---- Desktop app window ---- */
/* The top bar is the window's title bar: drag it to move the window. */
.desktop-app .topbar { -webkit-app-region: drag; user-select: none; }
.desktop-app .topbar a, .desktop-app .topbar button, .desktop-app .menu-list { -webkit-app-region: no-drag; }
/* A slim launcher-style scrollbar. */
.desktop-app { scrollbar-width: thin; scrollbar-color: #3a3d44 transparent; }
/* GameShelf's own minimize, maximize and close buttons (Windows and Linux),
   at the end of the top bar: the right in English, the left in Arabic. */
.topbar.has-window-controls { grid-template-columns: var(--sidebar-w) 1fr auto auto; padding-inline-end: 16px; }
.window-controls { display: flex; align-items: center; gap: 8px; padding-inline-start: 8px; -webkit-app-region: no-drag; }
.window-btn { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: var(--pill); color: var(--dim); cursor: pointer; transition: background 0.15s, color 0.15s; }
.window-btn:hover { background: var(--pill-hover); color: var(--text); }
.window-btn.close:hover { background: #e5484d; color: #fff; }
.window-btn .icon { width: 15px; height: 15px; }
/* On a Mac the window buttons sit at the top left, in either language. */
.desktop-darwin:not([dir="rtl"]) .topbar-left { padding-left: 84px; }
.desktop-darwin[dir="rtl"] .topbar { padding-left: 96px; }
.desktop-darwin .history { display: none; }


/* ---- Footer ---- */
.footer { padding: 32px var(--gutter); color: var(--faint); font-size: 13px; display: grid; gap: 4px; border-top: 1px solid var(--border); }
.footer a { text-decoration: underline; }
/* ---- Small laptops and tablets ---- */
@media (max-width: 1180px) {
  :root { --sidebar-w: 216px; --gutter: 24px; }
  .gp-layout { grid-template-columns: 1fr; }
  .gp-cover { width: 280px; }
  .gp-cover.tall { width: 160px; }
  .profile-layout { grid-template-columns: 1fr; }
  .profile-side { position: static; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .bento { grid-template-columns: 1.4fr 1fr; grid-template-rows: repeat(3, minmax(0, 1fr)); height: clamp(520px, 60vw, 640px); }
  .bento-card.big { grid-row: span 3; }
  .bento-card:nth-child(n + 5) { display: none; }
}

/* ---- Phones: no sidebar, app-style bottom tab bar ---- */
@media (max-width: 820px) {
  :root { --top-h: 56px; --gutter: 16px; --tile-w: 64vw; }
  .sidebar, .history, #home-btn, .search-pill kbd, .nav-login { display: none; }
  /* Just the globe for the language switch, so Join free still fits. */
  .lang-btn { width: 34px; padding: 0; justify-content: center; }
  .lang-btn span { display: none; }
  .content { margin-inline-start: 0; }
  .topbar { grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; padding-inline-end: 16px; }
  .topbar-right { gap: 8px; }
  .topbar-left { padding-inline: 16px 0; }
  .search-pill { width: 100%; }
  .tabbar {
    position: fixed;
    inset: auto 0 0;
    z-index: 50;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 4px 8px calc(4px + env(safe-area-inset-bottom));
    background: rgba(17, 18, 21, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
  }
  .tabbar a { display: grid; justify-items: center; gap: 2px; padding: 8px 0 4px; color: var(--faint); font-size: 11px; font-weight: 700; }
  .tabbar a.active { color: var(--text); }
  .tabbar .icon { width: 22px; height: 22px; }
  .footer { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(88px + env(safe-area-inset-bottom)); }
  .save-bar, .import-bar { bottom: calc(88px + env(safe-area-inset-bottom)); gap: 12px; padding-inline-start: 16px; }
  .save-bar > span { display: none; }

  .page { padding-top: 24px; }
  .spotlight { min-height: 600px; padding: 140px var(--gutter) 24px; margin-top: -32px; }
  .sp-shade { background: linear-gradient(0deg, var(--bg) 0%, rgba(var(--s-tint), 0.75) 45%, rgba(var(--s-tint), 0.1) 100%); }
  .sp-pitch { -webkit-line-clamp: 2; font-size: 15px; }
  .sp-secondary { display: none; }
  .sp-rail { overflow-x: auto; scrollbar-width: none; }
  .sp-thumb { width: 96px; }
  .bento { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto; height: auto; }
  .bento-card { aspect-ratio: 16 / 10; }
  .bento-card.big { grid-column: span 2; grid-row: auto; aspect-ratio: 4 / 3; }
  .bento-card:nth-child(n + 5) { display: flex; }
  .bento-pitch { display: none; }
  .dq-card { grid-template-columns: 1fr; padding: 24px; }
  .dq-card-stack { display: none; }
  .mood-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .mood-chip { flex: none; }
  .dq { padding: 0; }
  .dq-panel { max-height: 100vh; border-radius: 0; }
  .dq-media { aspect-ratio: 16 / 11; }
  .dq-info { padding: 8px 16px 24px; }
  .dq-title { inset-inline: 16px; }
  .dq-actions kbd { display: none; }
  .dq-link { margin-inline-start: 0; }
  .row-arrow { display: none; }
  .row-top10 .row-track { grid-auto-columns: 46vw; }
  .rank { font-size: 104px; -webkit-text-stroke-width: 2px; }
  .poster { flex-basis: 68%; }
  .card-grid, .sk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .tile-overlay-title { inset-inline: 8px; bottom: 8px; font-size: 14px; }
  .list-row { grid-template-columns: 56px minmax(0, 1fr); grid-auto-flow: row; }
  .list-col { display: none; }
  .list-thumb { width: 56px; height: 32px; }
  .gp-head { align-items: flex-start; gap: 16px; padding-top: 0; }
  .gp-cover { width: 120px; align-self: flex-start; }
  .gp-cover.tall { width: 84px; }
  .gp-actions { flex-direction: column; align-items: stretch; }
  .gp-buy { justify-content: stretch; }
  .gp-buy .pill-btn, .gp-buy .play-btn { flex: 1; }
  .play-main { flex: 1; justify-content: center; }
  .pal-hint { display: none; }
  .req-columns { grid-template-columns: 1fr; }
  .score-row { grid-template-columns: 1fr 1fr; }
  .media-strip { grid-auto-columns: calc((100% - 24px) / 4); }
  .strip-arrow { display: none; }
  .palette { border-radius: 16px; }

  .profile-header { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .profile-sub { justify-content: center; }
  .bio { margin-inline: auto; }
  .profile-level { justify-items: center; min-width: 0; }
  .showcase-grid, .library-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .comment-form { grid-template-columns: minmax(0, 1fr) auto; }
  .comment-form > .avatar { display: none; }
  .customize-layout { grid-template-columns: 1fr; }
  .side-nav { position: static; display: flex; overflow-x: auto; scrollbar-width: none; }
  .side-nav a { white-space: nowrap; }
  .form-grid { grid-template-columns: 1fr; }
  .customize-head .btn { display: none; }
  .preview { height: 150px; }
  .preview-content { padding: 0 16px; gap: 16px; }
  .preview-name { font-size: 22px; }
  .import-row { grid-template-columns: auto 72px minmax(0, 1fr); }
  .import-row img, .import-thumb { width: 72px; }
  .import-row .import-hours { display: none; }
  .import-row select { grid-column: 2 / -1; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
