:root {
  --bg: #060913;
  --surface: #0d1324;
  --surface-2: #131c33;
  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(56, 189, 248, 0.38);
  --text: #f1f5f9;
  --muted: #94a3b8;
  --ps-blue: #0070d1;
  --ps-cyan: #38bdf8;
  --green: #22c55e;
  --yellow: #eab308;
  --red: #ef4444;
  --radius: 14px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea {
  touch-action: manipulation;
  font-family: inherit;
}

.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(520px 360px at 15% -5%, rgba(0, 112, 209, 0.24), transparent 65%),
    radial-gradient(460px 320px at 88% 8%, rgba(56, 189, 248, 0.12), transparent 65%);
}

/* Header */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(6, 9, 19, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top, 0px);
}

.topbar-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #fff;
  flex-shrink: 0;
  background: linear-gradient(135deg, #0070d1 0%, #0284c7 100%);
  box-shadow: 0 6px 20px rgba(0, 112, 209, 0.35);
}

.brand-text { min-width: 0; }

.brand h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.12rem;
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.brand p {
  margin: 2px 0 0;
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.label-mobile { display: none; }

.source-switch {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
}

.seg-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.8rem;
  padding: 7px 12px;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.16s ease;
}

.seg-btn.active {
  background: var(--ps-blue);
  color: #fff;
}

.seg-btn-fav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.seg-btn-fav.active {
  background: linear-gradient(135deg, #e11d48 0%, #f43f5e 100%);
  color: #fff;
}

.fav-count-pill {
  background: rgba(244, 63, 94, 0.22);
  color: #fda4af;
  font-size: 0.68rem;
  font-weight: 700;
  min-width: 18px;
  height: 17px;
  padding: 0 5px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
}

.seg-btn-fav.active .fav-count-pill {
  background: rgba(255, 255, 255, 0.24);
  color: #fff;
}

.btn-primary {
  border: 0;
  background: linear-gradient(135deg, #0070d1 0%, #0ea5e9 100%);
  color: #fff;
  font-weight: 600;
  font-size: 0.84rem;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(14, 165, 233, 0.32); }

.btn-ghost {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 500;
  font-size: 0.82rem;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.btn-ghost:hover { border-color: var(--border-strong); background: var(--surface-2); }
.btn-sm { min-height: 36px; padding: 7px 11px; font-size: 0.8rem; }

.container {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px 18px calc(28px + env(safe-area-inset-bottom, 0px));
}

/* KPI Strip */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-label {
  font-size: 0.68rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-card strong {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.38rem;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.stat-card small {
  font-size: 0.72rem;
  color: var(--muted);
}

.mini-progress {
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  overflow: hidden;
  margin-top: 5px;
}

.mini-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #0070d1, #38bdf8);
  transition: width 0.25s ease;
}

/* Search + Sort + Filter Controls */
.controls-sticky {
  margin-bottom: 14px;
}

.search-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.search-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.search-wrap input[type="search"] {
  width: 100%;
  min-height: 42px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 11px;
  font-size: 0.92rem;
  padding: 9px 12px 9px 36px;
  outline: none;
}

.search-wrap input[type="search"]:focus {
  border-color: var(--ps-cyan);
}

.btn-filter-toggle {
  display: none;
  min-height: 42px;
}

.filter-count {
  background: var(--ps-blue);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
}

/* Sort Pills */
.sort-section {
  margin-bottom: 10px;
}

.sort-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill {
  border: 1px solid var(--border);
  background: var(--surface);
  color: #cbd5e1;
  font-size: 0.82rem;
  font-weight: 600;
  min-height: 38px;
  padding: 8px 13px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.pill:hover {
  border-color: var(--border-strong);
  color: #fff;
}

.pill.active {
  background: linear-gradient(135deg, #0070d1 0%, #0284c7 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 112, 209, 0.35);
}

/* Filters */
.filters-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filters-bar select {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  font-size: 0.84rem;
  min-height: 38px;
  padding: 8px 11px;
  outline: none;
}

.filters-bar select:focus {
  border-color: var(--ps-cyan);
}

.toggle-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  min-height: 38px;
  padding: 7px 12px;
  font-size: 0.82rem;
  color: #cbd5e1;
  cursor: pointer;
  user-select: none;
}

.status-banner {
  background: rgba(0, 112, 209, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.32);
  color: #e0f2fe;
  padding: 9px 13px;
  border-radius: 10px;
  font-size: 0.82rem;
  margin-bottom: 14px;
}

/* Grid */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 15px;
}

.game-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.game-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

.game-card:active {
  transform: scale(0.985);
}

.poster-box {
  position: relative;
  aspect-ratio: 3 / 4;
  background: linear-gradient(155deg, #101933 0%, #090e1d 100%);
  overflow: hidden;
}

.poster-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.poster-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 14px;
  text-align: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.92rem;
  color: #93c5fd;
  background: radial-gradient(circle at 30% 25%, rgba(0, 112, 209, 0.35), transparent 70%);
}

.rank-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(6, 9, 19, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.72rem;
  padding: 3px 7px;
  border-radius: 7px;
  backdrop-filter: blur(6px);
}

.mc-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  min-width: 34px;
  height: 34px;
  padding: 0 6px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: #041008;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.45);
}
.mc-high { background: #22c55e; }
.mc-mid { background: #eab308; }
.mc-low { background: #ef4444; color: #fff; }
.mc-none { background: rgba(15, 23, 42, 0.86); color: #94a3b8; border: 1px solid var(--border); font-size: 0.72rem; }

.live-pill {
  position: absolute;
  bottom: 8px;
  left: 8px;
  max-width: calc(100% - 54px);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(6, 9, 19, 0.86);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #e0f2fe;
  font-size: 0.69rem;
  font-weight: 600;
  padding: 3px 7px;
  border-radius: 999px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  backdrop-filter: blur(6px);
}

.fav-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(6, 9, 19, 0.82);
  color: #e2e8f0;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 3;
  padding: 0;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.fav-btn:hover {
  border-color: rgba(244, 63, 94, 0.65);
  color: #fda4af;
}

.fav-btn:active {
  transform: scale(0.86);
}

.fav-btn.active {
  background: linear-gradient(135deg, #e11d48 0%, #f43f5e 100%);
  border-color: rgba(255, 255, 255, 0.32);
  color: #fff;
  box-shadow: 0 4px 14px rgba(244, 63, 94, 0.45);
}

.fav-detail-btn {
  border: 1px solid rgba(244, 63, 94, 0.42);
  background: rgba(244, 63, 94, 0.12);
  color: #fda4af;
  font-weight: 600;
  font-size: 0.84rem;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.16s ease;
}

.fav-detail-btn.active {
  background: linear-gradient(135deg, #e11d48 0%, #f43f5e 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 18px rgba(244, 63, 94, 0.35);
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
}

.card-body {
  padding: 10px 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.game-title {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.93rem;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--muted);
}

.meta-row span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: auto;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.69rem;
  font-weight: 600;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge-steam {
  background: rgba(56, 189, 248, 0.14);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.badge-pegasus {
  background: rgba(168, 85, 247, 0.16);
  color: #d8b4fe;
  border: 1px solid rgba(168, 85, 247, 0.28);
}

.badge-dl {
  background: rgba(34, 197, 94, 0.13);
  color: #86efac;
}

/* Modals / Bottom Sheet on Mobile */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(2, 6, 16, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 18px;
}

.modal-card {
  position: relative;
  width: min(640px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #0d1426;
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65);
}

.sheet-handle {
  display: none;
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.35);
  margin: 0 auto 12px;
}

.modal-detail { width: min(760px, 100%); }

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.modal-head h2 {
  font-family: 'Space Grotesk', sans-serif;
  margin: 0;
  font-size: 1.15rem;
}

.modal-sub {
  margin: 5px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.45;
}

.icon-close {
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  cursor: pointer;
  flex-shrink: 0;
}

.detail-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
}

.modal-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.modal-tab {
  flex: 1;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.82rem;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
}
.modal-tab.active { background: var(--ps-blue); border-color: transparent; color: #fff; }

.field-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: #cbd5e1;
}

.text-input, .json-textarea, .file-input {
  width: 100%;
  background: #060913;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 11px 12px;
  font-size: 16px; /* mencegah auto-zoom iOS Safari */
}

.json-textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px;
}

.field-hint {
  font-size: 0.76rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 8px 0 14px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.error-box {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fecaca;
  font-size: 0.82rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 18px;
}

.detail-poster {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
  background: var(--surface-2);
}

.detail-scores {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 4px 0;
}

.score-tile {
  background: #070c1a;
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 9px 10px;
}
.score-tile span { display: block; font-size: 0.66rem; color: var(--muted); text-transform: uppercase; }
.score-tile strong { display: block; font-family: 'Space Grotesk', sans-serif; font-size: 1.18rem; margin-top: 2px; }
.score-tile small { font-size: 0.7rem; color: var(--muted); }

.detail-desc {
  grid-column: 1 / -1;
  font-size: 0.84rem;
  line-height: 1.58;
  color: #cbd5e1;
  margin: 2px 0 4px;
}

.detail-links {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
}
.link-btn:hover { border-color: var(--ps-cyan); }

.empty-state {
  text-align: center;
  padding: 48px 18px;
  color: var(--muted);
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

.load-more-wrap .btn-ghost {
  min-width: 220px;
  min-height: 44px;
}

.section-eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ps-cyan);
}

.hidden { display: none !important; }

code {
  background: rgba(148, 163, 184, 0.14);
  padding: 1px 5px;
  border-radius: 5px;
  font-size: 0.84em;
}

/* ==================== MOBILE OPTIMIZATION ==================== */
@media (max-width: 720px) {
  .label-desktop { display: none; }
  .label-mobile { display: inline; }

  .topbar-inner {
    padding: 9px 12px;
    gap: 8px;
    flex-wrap: wrap;
  }

  .brand {
    flex: 1 1 auto;
    order: 1;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
    border-radius: 9px;
  }

  .brand h1 { font-size: 1.02rem; white-space: nowrap; }
  .brand p { display: none; }

  .header-actions {
    display: contents;
  }

  .source-switch {
    order: 3;
    width: 100%;
  }

  .seg-btn {
    flex: 1;
    font-size: 0.75rem;
    padding: 7px 6px;
  }

  .btn-connect {
    order: 2;
    font-size: 0.76rem;
    padding: 6px 11px;
    min-height: 32px;
  }

  .container {
    padding: 10px 12px calc(24px + env(safe-area-inset-bottom, 0px));
  }

  /* Compact 4-column horizontal KPI bar so posters appear immediately above the fold */
  .stats-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 10px;
  }

  .stat-card {
    padding: 8px 8px;
    border-radius: 11px;
  }

  .stat-label { font-size: 0.58rem; }
  .stat-card strong { font-size: 1.05rem; }
  .stat-card small { display: none; }

  /* Sticky Search + Swipeable Sort Strip */
  .controls-sticky {
    position: sticky;
    top: calc(52px + env(safe-area-inset-top, 0px));
    z-index: 25;
    background: rgba(6, 9, 19, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    margin: 0 -12px 12px;
    padding: 8px 12px 8px;
    border-bottom: 1px solid var(--border);
  }

  .search-row {
    gap: 6px;
    margin-bottom: 8px;
  }

  .search-wrap input[type="search"] {
    font-size: 16px; /* anti auto-zoom iOS */
    min-height: 40px;
    padding: 7px 10px 7px 34px;
  }

  .btn-filter-toggle {
    display: inline-flex;
    min-height: 40px;
    padding: 0 11px;
    font-size: 0.78rem;
  }

  .btn-enrich-compact {
    min-height: 40px;
    padding: 0 10px;
    font-size: 0.78rem;
  }

  /* Horizontal single-row swipeable pills */
  .sort-section { margin-bottom: 0; }

  .sort-pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
    gap: 6px;
    padding-bottom: 2px;
  }
  .sort-pills::-webkit-scrollbar { display: none; }

  .pill {
    scroll-snap-align: start;
    font-size: 0.78rem;
    min-height: 36px;
    padding: 6px 12px;
  }

  /* Collapsible Filter Panel on Mobile */
  .filters-bar {
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
  }
  .filters-bar.open {
    display: grid;
  }

  .filters-bar select,
  .filters-bar .toggle-chip,
  .filters-bar .btn-sm {
    width: 100%;
    font-size: 15px;
    min-height: 40px;
  }

  /* Tight 2-column poster grid */
  .games-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .game-card { border-radius: 12px; }
  .card-body { padding: 8px 9px 10px; gap: 5px; }
  .game-title { font-size: 0.84rem; }
  .meta-row { font-size: 0.68rem; }
  .badge { font-size: 0.64rem; padding: 3px 6px; }
  .mc-badge { min-width: 30px; height: 30px; font-size: 0.82rem; top: 6px; right: 6px; }
  .rank-tag { top: 6px; left: 6px; font-size: 0.68rem; padding: 2px 6px; }
  .live-pill { bottom: 6px; left: 6px; font-size: 0.64rem; padding: 2px 6px; max-width: calc(100% - 48px); }
  .fav-btn { bottom: 6px; right: 6px; width: 32px; height: 32px; }

  /* Bottom Sheet Modals on Mobile */
  .modal-backdrop {
    align-items: end;
    padding: 0;
  }

  .modal-card {
    width: 100%;
    max-height: 88vh;
    border-radius: 20px 20px 0 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    padding: 12px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  }

  .sheet-handle { display: block; }

  .detail-grid {
    grid-template-columns: 105px 1fr;
    gap: 12px;
    align-items: start;
  }

  .detail-scores {
    grid-column: 1 / -1;
    gap: 6px;
  }

  .detail-desc, .detail-links {
    grid-column: 1 / -1;
  }

  .modal-actions > button {
    flex: 1 1 140px;
    min-height: 44px;
  }

  .detail-links > a,
  .detail-links > button {
    flex: 1 1 130px;
  }
}
