/* ==========================================================================
   Playtested Design System
   Dark Mode: "After Hours" (obsidian-violet atmospheric editorial)
   Light Mode: "Side Quest" (warm archival paper & royal violet editorial)
   ========================================================================== */

:root,
[data-theme="dark"] {
  --bg: #121116;
  --bg-elev: #191720;
  --panel: #1d1a26;
  --panel-hover: #252132;
  --surface: #231f2e;
  --header-bg: rgba(18, 17, 22, 0.86);
  --text: #f3eff7;
  --text-soft: #d5cedf;
  --muted: #9e97ab;
  --accent: #b7a0f5;
  --accent-strong: #c8b5fa;
  --accent-ink: #16111e;
  --accent-soft: rgba(183, 160, 245, 0.13);
  --accent-border: rgba(183, 160, 245, 0.34);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --score-hi: #4ade80;
  --score-hi-bg: rgba(74, 222, 128, 0.1);
  --score-mid: #f5b942;
  --score-mid-bg: rgba(245, 185, 66, 0.12);
  --score-lo: #f87171;
  --score-lo-bg: rgba(248, 113, 113, 0.12);
  --score-na-bg: rgba(255, 255, 255, 0.045);
  --shadow-lg: 0 24px 70px rgba(0, 0, 0, 0.55);
  --shadow-card: 0 10px 28px rgba(0, 0, 0, 0.3);
  --display: "Space Grotesk", system-ui, sans-serif;
  --serif: "DM Serif Display", Georgia, serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f3f0e6;
  --bg-elev: #fbf9f3;
  --panel: #f8f5ec;
  --panel-hover: #efeade;
  --surface: #ebe6d8;
  --header-bg: rgba(243, 240, 230, 0.9);
  --text: #231e29;
  --text-soft: #433b4d;
  --muted: #685f74;
  --accent: #6139ac;
  --accent-strong: #4e2b91;
  --accent-ink: #ffffff;
  --accent-soft: rgba(97, 57, 172, 0.1);
  --accent-border: rgba(97, 57, 172, 0.32);
  --line: rgba(39, 34, 30, 0.12);
  --line-strong: rgba(39, 34, 30, 0.22);
  --score-hi: #15803d;
  --score-hi-bg: rgba(21, 128, 61, 0.1);
  --score-mid: #b45309;
  --score-mid-bg: rgba(180, 83, 9, 0.11);
  --score-lo: #b91c1c;
  --score-lo-bg: rgba(185, 28, 28, 0.1);
  --score-na-bg: rgba(39, 34, 30, 0.055);
  --shadow-lg: 0 24px 64px rgba(34, 24, 48, 0.2);
  --shadow-card: 0 8px 24px rgba(34, 24, 48, 0.08);
  --display: "DM Serif Display", Georgia, serif;
  color-scheme: light;
}

/* ---- Base Reset ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

img {
  max-width: 100%;
  display: block;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform 0.15s ease;
}
.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
}

.container {
  max-width: 1640px;
  margin: 0 auto;
  padding: 0 4%;
}

.accent-dot {
  color: var(--accent);
}

.tabular {
  font-variant-numeric: tabular-nums;
}

/* ---- Buttons ---- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 13.5px;
  padding: 11px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary:hover:not(:disabled) {
  background: var(--accent-strong);
  transform: translateY(-1px);
}
.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line-strong);
  font-weight: 500;
  font-size: 13.5px;
  padding: 9px 15px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.btn-outline:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}
.btn-outline:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-soft);
  padding: 10px 6px;
}
.btn-ghost:hover {
  color: var(--accent);
}

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-soft);
}
.btn-link:hover {
  color: var(--accent);
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--score-lo);
  border: 1px solid rgba(248, 113, 113, 0.3);
  background: var(--score-lo-bg);
}
.btn-danger:hover {
  border-color: var(--score-lo);
}

.btn-full {
  width: 100%;
}

/* ---- Sticky Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: 1640px;
  margin: 0 auto;
  padding: 0 4%;
  min-height: 74px;
  display: flex;
  align-items: center;
  gap: 36px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
}

.brand-symbol {
  width: 28px;
  height: 30px;
  color: var(--accent);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
[data-theme="light"] .brand-symbol {
  background: #d2e77a;
  color: #231e29;
  border-radius: 50%;
  padding: 4px;
  width: 32px;
  height: 32px;
}
.brand-symbol svg {
  width: 100%;
  height: 100%;
}
.brand-symbol-sm {
  width: 22px;
  height: 24px;
}
[data-theme="light"] .brand-symbol-sm {
  width: 24px;
  height: 24px;
  padding: 3px;
}

.brand-wordmark {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -1.3px;
  color: var(--text);
  line-height: 1;
}
.brand-wordmark-sm {
  font-size: 19px;
  letter-spacing: -0.9px;
}
.brand-dot {
  color: var(--accent);
}

.primary-nav {
  display: flex;
  align-items: stretch;
  align-self: stretch;
  gap: 24px;
}

.nav-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  padding: 4px 2px;
  white-space: nowrap;
}
.nav-tab:hover,
.nav-tab.is-active {
  color: var(--text);
}
.nav-tab.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0 10px;
  height: 38px;
  width: 260px;
  transition: border-color 0.18s ease, width 0.2s ease, background-color 0.18s ease;
}
.search-box:focus-within {
  border-color: var(--accent);
  width: 310px;
}
.search-icon {
  width: 16px;
  height: 16px;
  color: var(--muted);
  flex-shrink: 0;
}
.search-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font-size: 13.5px;
  outline: none;
}
.search-box input::placeholder {
  color: var(--muted);
}
.search-box input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}
.search-clear {
  font-size: 12px;
  color: var(--muted);
  padding: 2px 5px;
  border-radius: 4px;
}
.search-clear:hover {
  color: var(--text);
  background: var(--surface);
}
.search-kbd {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 1px 6px;
  line-height: 1.4;
}

.header-divider {
  width: 1px;
  height: 24px;
  background: var(--line);
}

.user-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: 99px;
  background: var(--panel);
  border: 1px solid var(--line);
  font-size: 13.5px;
  font-weight: 500;
}
.user-chip img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}
.user-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Light/Dark Toggle Switch */
.theme-toggle {
  position: relative;
  width: 54px;
  height: 28px;
  border-radius: 99px;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  flex-shrink: 0;
}
.theme-toggle:hover {
  border-color: var(--accent);
}
.theme-toggle-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.theme-toggle svg {
  width: 13px;
  height: 13px;
  grid-area: 1 / 1;
}
.theme-toggle .icon-sun,
[data-theme="light"] .theme-toggle .icon-moon {
  display: none;
}
[data-theme="light"] .theme-toggle .icon-sun {
  display: block;
}
[data-theme="light"] .theme-toggle-knob {
  transform: translateX(26px);
}

/* ---- Atmospheric Hero ---- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 520px;
  border-bottom: 1px solid var(--line);
}

.hero-art {
  position: absolute;
  inset: 0 0 0 22%;
  z-index: -3;
}
.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 56% 52%;
}

.hero-wash {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(
      90deg,
      var(--bg) 0%,
      var(--bg) 26%,
      rgba(18, 17, 22, 0.84) 40%,
      rgba(18, 17, 22, 0.25) 70%,
      rgba(18, 17, 22, 0.08) 100%
    ),
    linear-gradient(0deg, var(--bg) 0%, rgba(18, 17, 22, 0) 28%, rgba(18, 17, 22, 0) 82%, rgba(18, 17, 22, 0.35) 100%);
}

[data-theme="light"] .hero-art {
  inset: 24px 4% 40px 51%;
  border-radius: 44% 44% 8px 8px;
  overflow: hidden;
}
[data-theme="light"] .hero-art img {
  object-position: 62% 48%;
  filter: sepia(0.14) saturate(0.95);
}
[data-theme="light"] .hero-wash {
  background: linear-gradient(
    90deg,
    var(--bg) 0%,
    var(--bg) 46%,
    rgba(243, 240, 230, 0.72) 55%,
    transparent 68%
  );
}

.hero-inner {
  max-width: 1640px;
  margin: 0 auto;
  padding: 58px 4% 48px;
  position: relative;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-content {
  max-width: 650px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero .eyebrow {
  color: var(--text-soft);
}
.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}
[data-theme="light"] .eyebrow-dot {
  background: #657d2c;
  box-shadow: none;
}

.hero h1 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(42px, 5vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  margin: 18px 0 20px;
  animation: heroReveal 0.45s ease both;
}
[data-theme="light"] .hero h1 {
  font-weight: 400;
  letter-spacing: -0.03em;
}
.hero h1 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: -0.03em;
}

.hero-sub {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--text-soft);
  max-width: 470px;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-top: 26px;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.stat-item strong {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.stat-item span {
  font-size: 12px;
  color: var(--muted);
}

.hero-caption {
  position: absolute;
  right: 4%;
  bottom: 72px;
  display: flex;
  align-items: center;
  gap: 14px;
}
[data-theme="light"] .hero-caption {
  background: rgba(35, 24, 48, 0.72);
  backdrop-filter: blur(8px);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  right: 6%;
  bottom: 52px;
}
.caption-cross {
  font-size: 24px;
  font-weight: 300;
  color: var(--accent);
  line-height: 1;
}
[data-theme="light"] .caption-cross {
  color: #d2e77a;
}
.hero-caption > div > span {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: #e4d9f5;
}
.hero-caption p {
  margin: 3px 0 0;
  font-size: 12.5px;
  color: #f3eff7;
}
.caption-line {
  width: 48px;
  height: 1px;
  background: rgba(211, 193, 225, 0.35);
}
[data-theme="light"] .caption-line {
  display: none;
}

.hero-index {
  position: absolute;
  right: 4%;
  bottom: 24px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
}
[data-theme="light"] .hero-index {
  bottom: 12px;
  color: var(--text-soft);
}
.hero-index span {
  color: var(--accent);
  font-weight: 600;
  margin-right: 6px;
}

/* ---- Trust Strip ---- */
.trust-strip {
  max-width: 1640px;
  margin: 0 auto;
  padding: 14px 4%;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 36px;
}
.trust-lead {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--muted);
}
.trust-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--text-soft);
}
.trust-item svg {
  color: var(--accent);
  flex-shrink: 0;
}
.strip-spark {
  margin-left: auto;
  font-size: 20px;
  color: var(--accent);
  line-height: 1;
}

/* ---- Spotlight Strip ---- */
.spotlight-section {
  padding-top: 42px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.section-eyebrow {
  margin-bottom: 6px;
}
h2 {
  font-family: var(--display);
  font-size: clamp(26px, 2.5vw, 34px);
  font-weight: 500;
  letter-spacing: -0.03em;
  margin: 0;
  line-height: 1.15;
}
.section-description {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.spotlight-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.spotlight-card {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  text-align: left;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.spotlight-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-border);
  box-shadow: var(--shadow-card);
}
.spotlight-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface);
}
.spotlight-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.spotlight-card:hover .spotlight-media img {
  transform: scale(1.04);
}
.spotlight-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(14, 12, 18, 0.85) 0%, transparent 65%);
}
.spotlight-score-float {
  position: absolute;
  bottom: 10px;
  right: 10px;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  background: rgba(18, 17, 22, 0.86);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}
.spotlight-score-float.hi { color: #4ade80; }
.spotlight-score-float.mid { color: #f5b942; }
.spotlight-score-float.lo { color: #f87171; }
.spotlight-score-float small {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  color: #c5bdd2;
  letter-spacing: 0.04em;
}
.spotlight-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.spotlight-title {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.25;
  color: var(--text);
}
.spotlight-quote {
  margin: 0;
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.spotlight-author {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}
.spotlight-author img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
}
.spotlight-author strong {
  color: var(--text-soft);
  font-weight: 500;
}
.spotlight-hours {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  font-weight: 600;
}

/* ---- Catalog Section & Sidebar Layout ---- */
.catalog-section {
  padding-top: 48px;
  padding-bottom: 24px;
  scroll-margin-top: 84px;
}

.catalog-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.catalog-subtitle {
  margin: 6px 0 0;
  font-size: 13.5px;
  color: var(--muted);
}

.mobile-filter-btn {
  display: none;
}

.badge-count {
  display: inline-grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 99px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 11px;
  font-weight: 700;
}

.catalog-layout {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  gap: 30px;
  align-items: start;
}

.filters-sidebar {
  position: sticky;
  top: 94px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.sidebar-mobile-head {
  display: none;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.sidebar-mobile-head h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 17px;
}

.filter-group {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}
.filter-group label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
}
.filter-group input,
.filter-group select {
  width: 100%;
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 8px 11px;
  font-size: 13.5px;
  color: var(--text);
}
.filter-group input::placeholder {
  color: var(--muted);
  opacity: 0.8;
}
.filter-group input:focus,
.filter-group select:focus {
  border-color: var(--accent);
  outline: none;
}

.year-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.year-row input {
  flex: 1;
  min-width: 0;
}
.year-sep {
  color: var(--muted);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  color: var(--text-soft);
  margin: 4px 0 18px;
  cursor: pointer;
}
.checkbox-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

.sidebar-info {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.sidebar-info-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.sidebar-info p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted);
}
.sidebar-info strong {
  color: var(--text-soft);
}

/* ---- Catalog Toolbar ---- */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.platform-chips {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  background: var(--panel);
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
}
.chip-icon {
  width: 42px;
  padding: 0;
}
.chip svg {
  width: 18px;
  height: 18px;
  display: block;
}
.chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.chip[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.quick-sorts {
  display: inline-flex;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 2px;
}
.quick-sort {
  padding: 6px 11px;
  border-radius: 4px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
}
.quick-sort:hover {
  color: var(--text);
}
.quick-sort.is-active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.size-select {
  height: 38px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  background: var(--panel);
  border: 1px solid var(--line-strong);
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}
.size-select:focus {
  border-color: var(--accent);
  outline: none;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 99px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-size: 12px;
  font-weight: 500;
}
.filter-pill button {
  color: inherit;
  font-size: 12px;
  padding: 0 2px;
}

/* ---- Game Cards Grid ---- */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(202px, 1fr));
  gap: 18px;
}

.game-card {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  text-align: left;
  padding: 0;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.game-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-border);
  box-shadow: var(--shadow-card);
}

.card-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  background: var(--surface);
  overflow: hidden;
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.38s ease;
}
.game-card:hover .card-cover img {
  transform: scale(1.04);
}
.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(12, 10, 18, 0.55) 0%, transparent 38%);
  pointer-events: none;
}

.card-badge-peak {
  position: absolute;
  top: 9px;
  left: 9px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(18, 15, 24, 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #f3eff7;
  font-size: 10.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.peak-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
}

.card-hover-cta {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  background: rgba(18, 17, 22, 0.86);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(183, 160, 245, 0.35);
  color: #f3eff7;
  font-size: 12px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.game-card:hover .card-hover-cta,
.game-card:focus-visible .card-hover-cta {
  opacity: 1;
  transform: translateY(0);
}

.card-body {
  padding: 12px 13px 13px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -0.015em;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.56em;
}
.game-card:hover .card-title {
  color: var(--accent);
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* Signature Tri-Platform Score Bar */
.score-trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 10px;
}

.score-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 2px 5px;
  border-radius: 7px;
  background: var(--score-na-bg);
  border: 1px solid transparent;
  line-height: 1;
}
.score-pill strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 16.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.score-pill i {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  opacity: 0.85;
}
.score-pill svg {
  width: 14px;
  height: 14px;
}

.score-pill.hi {
  background: var(--score-hi-bg);
  border-color: rgba(74, 222, 128, 0.2);
}
.score-pill.hi strong {
  color: var(--score-hi);
}
.score-pill.mid {
  background: var(--score-mid-bg);
  border-color: rgba(245, 185, 66, 0.22);
}
.score-pill.mid strong {
  color: var(--score-mid);
}
.score-pill.lo {
  background: var(--score-lo-bg);
  border-color: rgba(248, 113, 113, 0.22);
}
.score-pill.lo strong {
  color: var(--score-lo);
}
.score-pill.na strong {
  color: var(--muted);
  font-weight: 500;
}
.score-pill.na i {
  opacity: 0.45;
}

/* Loading Skeletons */
.skeleton-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.skeleton-img {
  aspect-ratio: 2 / 3;
  background: linear-gradient(110deg, var(--surface) 25%, var(--panel-hover) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
}
.skeleton-lines {
  padding: 12px 13px 14px;
  display: grid;
  gap: 8px;
}
.skeleton-bar {
  height: 12px;
  border-radius: 4px;
  background: var(--surface);
}
.skeleton-bar.short {
  width: 55%;
}

/* ---- Pagination ---- */
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}
.pager-jump {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--muted);
}
.pager-jump input {
  width: 72px;
  text-align: center;
  padding: 7px 8px;
  border-radius: var(--radius-sm);
  background: var(--panel);
  border: 1px solid var(--line-strong);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.pager-jump input:focus {
  border-color: var(--accent);
  outline: none;
}

/* ---- Editorial Banner ---- */
.editorial-banner {
  margin: 44px 0 56px;
  padding: 30px 34px;
  border-radius: var(--radius-lg);
  background: linear-gradient(110deg, var(--accent-soft), rgba(183, 160, 245, 0.04));
  border: 1px solid var(--accent-border);
  display: flex;
  align-items: center;
  gap: 28px;
}
[data-theme="light"] .editorial-banner {
  background: rgba(210, 231, 122, 0.36);
  border-color: rgba(110, 129, 44, 0.28);
}
.banner-symbol {
  font-family: "Space Grotesk", sans-serif;
  font-size: 58px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -9px;
  color: var(--accent);
  width: 74px;
  flex-shrink: 0;
  transform: rotate(-7deg);
}
.banner-symbol span {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--accent);
}
.banner-copy h3 {
  font-family: var(--display);
  font-size: clamp(22px, 2vw, 27px);
  font-weight: 500;
  letter-spacing: -0.025em;
  margin: 6px 0 5px;
}
.banner-copy h3 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
.banner-copy p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}
.banner-cta {
  margin-left: auto;
  border-color: var(--accent-border);
  color: var(--accent);
}

/* ---- Reviews Feed View ---- */
.page-section {
  padding-top: 40px;
  padding-bottom: 64px;
  min-height: 60vh;
}
.reviews-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.reviews-feed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 18px;
}
.feed-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.feed-card:hover {
  border-color: var(--accent-border);
  transform: translateY(-2px);
}
.feed-game-row {
  display: flex;
  align-items: center;
  gap: 13px;
  text-align: left;
}
.feed-game-row img {
  width: 50px;
  height: 75px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--surface);
  flex-shrink: 0;
}
.feed-game-info {
  flex: 1;
  min-width: 0;
}
.feed-game-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.feed-game-row:hover .feed-game-title {
  color: var(--accent);
}
.feed-game-meta {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 3px;
}
.feed-score-badge {
  min-width: 48px;
  height: 44px;
  padding: 0 10px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-family: "Space Grotesk", sans-serif;
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.feed-score-badge.hi { background: var(--score-hi-bg); color: var(--score-hi); }
.feed-score-badge.mid { background: var(--score-mid-bg); color: var(--score-mid); }
.feed-score-badge.lo { background: var(--score-lo-bg); color: var(--score-lo); }

.feed-review-text {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-soft);
}
.feed-review-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--muted);
}
.feed-review-footer img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}
.feed-review-footer strong {
  color: var(--text);
  font-weight: 600;
}
.verified-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 99px;
  background: var(--accent-soft);
  color: var(--accent);
}
.feed-hours {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  color: var(--text-soft);
}
.feed-hours svg {
  width: 14px;
  height: 14px;
}

/* ---- My Library View ---- */
.library-auth-card {
  max-width: 560px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
}
.library-auth-card h3 {
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: 24px;
}
.library-auth-card p {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 14.5px;
}
.library-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
.lib-stat-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}
.lib-stat-card strong {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 26px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.lib-stat-card span {
  font-size: 12.5px;
  color: var(--muted);
}
.library-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.library-search {
  flex: 1;
  min-width: 220px;
  max-width: 380px;
  padding: 9px 13px;
  border-radius: var(--radius-sm);
  background: var(--panel);
  border: 1px solid var(--line-strong);
}
.library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 12px;
}
.library-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: var(--panel);
  border: 1px solid var(--line);
  text-align: left;
}
.library-row:hover {
  border-color: var(--accent-border);
  background: var(--panel-hover);
}
.library-row img {
  width: 42px;
  height: 62px;
  border-radius: 5px;
  object-fit: cover;
  background: var(--surface);
  flex-shrink: 0;
}
.library-row-info {
  flex: 1;
  min-width: 0;
}
.library-row-name {
  font-weight: 600;
  font-size: 14.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.library-row-sub {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
}
.lib-tag {
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 99px;
  white-space: nowrap;
}
.lib-tag.reviewed {
  background: var(--score-hi-bg);
  color: var(--score-hi);
}
.lib-tag.eligible {
  background: var(--accent-soft);
  color: var(--accent);
}
.lib-tag.locked {
  background: var(--surface);
  color: var(--muted);
}

/* ---- Empty & Error States ---- */
.empty-state {
  grid-column: 1 / -1;
  background: var(--panel);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 52px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.empty-state h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 20px;
}
.empty-state p {
  margin: 0;
  color: var(--muted);
  max-width: 440px;
  font-size: 14px;
}

/* ---- Modals ---- */
dialog.modal {
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  color: var(--text);
  box-shadow: var(--shadow-lg);
  max-height: 90vh;
  overflow: hidden;
  margin: auto;
}
dialog.modal::backdrop {
  background: rgba(8, 6, 14, 0.72);
  backdrop-filter: blur(8px);
}
dialog.game-modal {
  width: min(760px, 94vw);
}
dialog.auth-modal {
  width: min(460px, 94vw);
}

.modal-scroll {
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 4;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(18, 17, 22, 0.8);
  color: #f3eff7;
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 15px;
}
.modal-close-btn:hover {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.icon-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface);
  color: var(--text);
}

.game-modal-hero {
  position: relative;
  padding: 26px 28px 24px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.game-modal-backdrop-img {
  position: absolute;
  inset: -12px;
  z-index: 0;
  background-size: cover;
  background-position: center;
  filter: blur(18px) saturate(1.1);
  opacity: 0.24;
  transform: scale(1.06);
}
.game-modal-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(180deg, rgba(18, 17, 22, 0.35), var(--bg-elev));
}
[data-theme="light"] .game-modal-hero::after {
  background: linear-gradient(180deg, rgba(251, 249, 243, 0.45), var(--bg-elev));
}

.game-modal-head {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding-right: 34px;
}
.game-modal-poster {
  width: 118px;
  aspect-ratio: 2 / 3;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
}
.game-modal-meta {
  flex: 1;
  min-width: 0;
}
.game-modal-meta h2 {
  font-size: clamp(22px, 3vw, 29px);
  line-height: 1.15;
  margin-bottom: 8px;
}
.meta-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 13.5px;
  color: var(--muted);
}
.meta-list strong {
  color: var(--text-soft);
  font-weight: 500;
}

.game-modal-body {
  padding: 24px 28px 30px;
}

/* Modal 3-Platform Score Breakdown */
.modal-scores-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.modal-score-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.modal-score-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.modal-score-top svg {
  width: 16px;
  height: 16px;
  color: var(--text);
}
.modal-score-val {
  font-family: "Space Grotesk", sans-serif;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  margin-top: 4px;
}
.modal-score-card.hi .modal-score-val { color: var(--score-hi); }
.modal-score-card.mid .modal-score-val { color: var(--score-mid); }
.modal-score-card.lo .modal-score-val { color: var(--score-lo); }
.modal-score-card.na .modal-score-val { color: var(--muted); font-weight: 500; }
.modal-score-sub {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.spike-notice {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--score-mid-bg);
  border: 1px solid rgba(245, 185, 66, 0.3);
  color: var(--text-soft);
  font-size: 13px;
}

/* Generous breathing room between scores and Rate This Game */
.rate-section {
  margin-top: 28px;
  margin-bottom: 30px;
  padding: 20px 22px;
  border-radius: var(--radius-md);
  background: var(--panel);
  border: 1px solid var(--line-strong);
}
.rate-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.rate-section h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 16px;
  font-weight: 600;
}
.eligibility-pill {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 99px;
}
.eligibility-pill.ok {
  background: var(--score-hi-bg);
  color: var(--score-hi);
}
.eligibility-pill.warn {
  background: var(--score-mid-bg);
  color: var(--score-mid);
}
.eligibility-pill.err {
  background: var(--score-lo-bg);
  color: var(--score-lo);
}
.eligibility-pill.muted {
  background: var(--surface);
  color: var(--muted);
}

.rate-signin-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.rate-signin-box p {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
  max-width: 380px;
}

.review-form {
  display: grid;
  gap: 14px;
}
.score-slider-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.score-slider-row input[type="range"] {
  flex: 1;
  accent-color: var(--accent);
  cursor: pointer;
}
.score-number-input {
  width: 74px;
  padding: 8px 10px;
  text-align: center;
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  font-family: "Space Grotesk", sans-serif;
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.verdict-chip {
  min-width: 96px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 99px;
}
.verdict-chip.hi { background: var(--score-hi-bg); color: var(--score-hi); }
.verdict-chip.mid { background: var(--score-mid-bg); color: var(--score-mid); }
.verdict-chip.lo { background: var(--score-lo-bg); color: var(--score-lo); }

.review-textarea {
  width: 100%;
  resize: vertical;
  min-height: 86px;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  font-size: 14px;
  line-height: 1.5;
}
.review-textarea:focus {
  border-color: var(--accent);
  outline: none;
}

.review-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.char-count {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.form-status {
  font-size: 13px;
  min-height: 1.3em;
  color: var(--text-soft);
}
.form-status.ok { color: var(--score-hi); }
.form-status.err { color: var(--score-lo); }

/* Modal Reviews List */
.modal-reviews-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 12px;
  margin-bottom: 14px;
}
.modal-reviews-head .size-select {
  white-space: nowrap;
  flex-shrink: 0;
  min-height: 36px;
}
.modal-reviews-head h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 17px;
}

.review-item {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.review-item-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.review-item-head img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface);
}
.review-author-name {
  font-weight: 600;
  font-size: 14.5px;
}
.review-playtime {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.review-playtime svg {
  width: 14px;
  height: 14px;
  color: var(--text-soft);
}
.review-score-pill {
  margin-left: auto;
  font-family: "Space Grotesk", sans-serif;
  font-size: 17px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 4px 10px;
  border-radius: 7px;
}
.review-score-pill.hi { background: var(--score-hi-bg); color: var(--score-hi); }
.review-score-pill.mid { background: var(--score-mid-bg); color: var(--score-mid); }
.review-score-pill.lo { background: var(--score-lo-bg); color: var(--score-lo); }

.review-item-body {
  margin: 10px 0 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-soft);
  white-space: pre-wrap;
}
.review-item-date {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

/* Auth Modal */
.auth-modal-body {
  padding: 28px;
  position: relative;
}
.auth-modal-body h2 {
  font-size: 26px;
  margin-bottom: 10px;
  padding-right: 28px;
}
.auth-modal-desc {
  margin: 0 0 22px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}
.provider-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.provider-card {
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.provider-card.is-connected {
  border-color: var(--accent-border);
}
.provider-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.provider-connect-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 108px;
  padding: 8px 15px;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  border: 1px solid var(--accent-border);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
}
.provider-connect-btn:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}
.provider-connected-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 108px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-ink);
  border: 1px solid var(--accent);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.provider-unlink-btn {
  font-size: 12px;
  color: var(--muted);
  padding: 6px 8px;
  border-radius: var(--radius-sm);
}
.provider-unlink-btn:hover {
  color: var(--score-lo);
  background: var(--score-lo-bg);
}
.provider-btn-outline {
  width: 100%;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--accent-border);
}
.provider-btn-outline:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}
.provider-btn-outline svg {
  width: 18px;
  height: 18px;
}
.provider-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.provider-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--surface);
  display: grid;
  place-items: center;
  color: var(--text);
  flex-shrink: 0;
}
.provider-logo svg {
  width: 20px;
  height: 20px;
}
.provider-meta {
  flex: 1;
  min-width: 0;
}
.provider-meta strong {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
}
.provider-meta span {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
}
.provider-btn {
  width: 100%;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
}
.provider-btn svg {
  width: 18px;
  height: 18px;
}
.psn-panel {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  display: grid;
  gap: 10px;
}
.psn-panel input {
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  font-size: 13.5px;
}
.psn-panel input:focus {
  border-color: var(--accent);
  outline: none;
}
.psn-code-box {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  font-size: 13px;
  color: var(--text);
}
.psn-code-box code {
  font-family: "Space Grotesk", monospace;
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.06em;
}
.psn-tabs {
  display: flex;
  gap: 6px;
}
.psn-tab {
  flex: 1;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: var(--bg-elev);
  border: 1px solid var(--line);
}
.psn-tab.is-active {
  color: var(--accent);
  border-color: var(--accent-border);
  background: var(--accent-soft);
}
.provider-note {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--panel);
  border: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.55;
}
.provider-note strong {
  color: var(--text-soft);
}
.provider-note a {
  color: var(--accent);
  text-decoration: underline;
}

/* Official brand logo optical balancing */
.plat-svg {
  display: inline-block;
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  vertical-align: middle;
}
.plat-svg-ps {
  transform: scale(1.14);
}
.game-modal-meta .eyebrow svg {
  width: 13px;
  height: 13px;
}

/* Rate platform selector inside Game Modal */
.rate-platform-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.rate-plat-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.rate-plat-btn svg {
  width: 15px;
  height: 15px;
}
.rate-plat-btn:hover {
  border-color: var(--accent);
  color: var(--text);
}
.rate-plat-btn.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.rate-isolation-note {
  font-size: 12px;
  color: var(--muted);
  margin: -4px 0 4px;
}
.user-plat-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent);
}
.user-plat-dots svg {
  width: 12px;
  height: 12px;
}
.spotlight-score-float svg {
  width: 14px;
  height: 14px;
  color: #f3eff7;
}
.library-plat-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.library-plat-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border-radius: var(--radius-sm);
  background: var(--panel);
  border: 1px solid var(--line-strong);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-soft);
}
.library-plat-tab svg {
  width: 16px;
  height: 16px;
}
.library-plat-tab.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.user-avatar-fallback {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.modal-score-card.is-unreleased {
  opacity: 0.52;
}
.eligibility-pill.classic {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-border);
}
.legacy-banner {
  padding: 10px 13px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  font-size: 12.5px;
  color: var(--text-soft);
  margin-bottom: 12px;
  line-height: 1.5;
}
.legacy-banner strong {
  color: var(--accent);
}
.classic-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 99px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-border);
}
dialog.auth-modal {
  width: min(520px, 94vw);
}
dialog.confirm-modal {
  width: min(410px, 92vw);
}
.confirm-modal-body {
  padding: 26px 26px 24px;
  position: relative;
}
.confirm-modal-body h2 {
  font-size: 22px;
  margin: 0 0 10px;
  padding-right: 28px;
}
.confirm-modal-desc {
  margin: 0 0 22px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
}
.confirm-modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.confirm-modal-actions .btn-outline,
.confirm-modal-actions .btn-danger {
  min-width: 104px;
  min-height: 40px;
  justify-content: center;
}

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 24px;
}
.footer-inner {
  max-width: 1640px;
  margin: 0 auto;
  padding: 26px 4% 36px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 24px;
  font-size: 13px;
  color: var(--muted);
}
.footer-promise {
  color: var(--text-soft);
}
.footer-right {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.footer-copy {
  margin-left: 0;
}
.coffee-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 15px;
  border-radius: 99px;
  background: #ffdd00;
  color: #16111e;
  font-family: "Space Grotesk", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 4px 14px rgba(255, 221, 0, 0.18);
  transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
  white-space: nowrap;
}
.coffee-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
  box-shadow: 0 8px 20px rgba(255, 221, 0, 0.28);
}
.coffee-svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

/* ---- Toast ---- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  background: var(--text);
  color: var(--bg);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  animation: heroReveal 0.2s ease both;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 25;
  background: rgba(8, 6, 14, 0.65);
  backdrop-filter: blur(4px);
}

/* ---- Keyframes ---- */
@keyframes heroReveal {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}

/* ---- Responsive ---- */
@media (max-width: 1180px) {
  .spotlight-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero-caption {
    display: none;
  }
}

@media (max-width: 1024px) {
  .header-inner {
    gap: 18px;
  }
  .search-box {
    width: 200px;
  }
  .search-box:focus-within {
    width: 230px;
  }
  .catalog-layout {
    grid-template-columns: 1fr;
  }
  .mobile-filter-btn {
    display: inline-flex;
  }
  .filters-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(320px, 86vw);
    z-index: 30;
    border-radius: 0;
    overflow-y: auto;
    transform: translateX(-105%);
    transition: transform 0.24s ease;
    box-shadow: var(--shadow-lg);
  }
  .filters-sidebar.is-open {
    transform: translateX(0);
  }
  .sidebar-mobile-head {
    display: flex;
  }
  .library-summary {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .header-inner {
    flex-wrap: wrap;
    padding-top: 10px;
    padding-bottom: 10px;
    gap: 10px 12px;
  }
  .brand-link {
    order: 1;
  }
  .brand-wordmark {
    font-size: 21px;
  }
  .header-actions {
    display: contents;
  }
  .user-controls {
    order: 2;
    margin-left: auto;
  }
  .header-divider,
  .search-kbd {
    display: none;
  }
  .search-box {
    order: 3;
    width: 100%;
  }
  .search-box:focus-within {
    width: 100%;
  }
  .primary-nav {
    order: 4;
    width: 100%;
    gap: 20px;
    border-top: 1px solid var(--line);
    padding-top: 8px;
  }
  .hero {
    min-height: 460px;
  }
  .hero-art {
    inset: 0;
    opacity: 0.45;
  }
  [data-theme="light"] .hero-art {
    inset: 0;
    border-radius: 0;
    opacity: 0.24;
  }
  .hero-wash {
    background: linear-gradient(180deg, rgba(18, 17, 22, 0.72), var(--bg));
  }
  [data-theme="light"] .hero-wash {
    background: linear-gradient(180deg, rgba(243, 240, 230, 0.72), var(--bg));
  }
  .hero-inner {
    padding: 36px 4% 40px;
    min-height: 440px;
  }
  .hero-stats {
    gap: 18px 24px;
  }
  .hero-index {
    display: none;
  }
  .trust-lead,
  .strip-spark {
    display: none;
  }
  .spotlight-grid {
    grid-template-columns: 1fr;
  }
  .quick-sorts {
    display: none;
  }
  .game-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .card-body {
    padding: 10px;
  }
  .card-title {
    font-size: 13.5px;
  }
  .score-pill strong {
    font-size: 14.5px;
  }
  .editorial-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 22px;
    gap: 16px;
  }
  .banner-cta {
    margin-left: 0;
    width: 100%;
  }
  .reviews-feed-grid {
    grid-template-columns: 1fr;
  }
  .game-modal-hero {
    padding: 20px;
  }
  .game-modal-head {
    flex-direction: column;
    padding-right: 0;
  }
  .game-modal-poster {
    width: 96px;
  }
  .game-modal-body {
    padding: 18px 20px 24px;
  }
  .modal-scores-grid {
    grid-template-columns: 1fr;
  }
  .score-slider-row {
    flex-wrap: wrap;
  }
  .footer-copy {
    margin-left: 0;
  }
}

@media (max-width: 520px) {
  .auth-modal-body {
    padding: 22px 18px;
  }
  .provider-row {
    flex-wrap: wrap;
    row-gap: 10px;
  }
  .provider-meta {
    min-width: calc(100% - 52px);
  }
  .provider-connect-btn,
  .provider-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .provider-connect-btn {
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
