:root {
  --bg-body: #090d16;
  --bg-surface: #111827;
  --bg-card: #131b2e;
  --bg-card-hover: #19243d;
  --bg-input: #0e1424;
  --bg-elevated: #1b2540;
  --border: #232f4b;
  --border-hover: #3b4d78;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --accent-soft: rgba(99, 102, 241, 0.16);
  --blue: #2563eb;
  --blue-hover: #1d4ed8;
  --emerald: #10b981;
  --emerald-soft: rgba(16, 185, 129, 0.14);
  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.12);
  --red: #ef4444;
  --red-soft: rgba(239, 68, 68, 0.14);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --max-width: 1320px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

html {
  color-scheme: dark;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-body);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

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

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

[hidden] {
  display: none !important;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

main {
  flex: 1 0 auto;
  padding: 24px 0 48px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(9, 13, 22, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #6366f1 0%, #3b82f6 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.brand-badge {
  font-size: 11px;
  font-weight: 600;
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.14);
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 2px 8px;
  border-radius: 999px;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-link {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-main);
  background: var(--bg-elevated);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
}

.lang-active {
  color: #93c5fd;
}

.lang-sep {
  color: var(--border-hover);
}

.lang-disabled {
  color: var(--text-dim);
  cursor: not-allowed;
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--text-muted);
}

.breadcrumbs a:hover {
  color: var(--text-main);
  text-decoration: underline;
}

.breadcrumbs .sep {
  color: var(--text-dim);
}

.breadcrumbs .current {
  color: var(--text-main);
  font-weight: 500;
}

/* Toolbar & Compact 2-Row Filter Bar (Variant A) */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.search-wrap {
  position: relative;
  flex: 1 1 320px;
}

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

.search-input {
  width: 100%;
  height: 44px;
  padding: 0 16px 0 42px;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-main);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

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

.select-input {
  height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-main);
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s;
}

.select-input:hover {
  border-color: var(--border-hover);
}

.select-input:focus {
  border-color: var(--accent);
}

.select-compact {
  height: 38px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  font-size: 13.5px;
}

.counter-pill {
  height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}

.counter-pill strong {
  color: var(--text-main);
  font-weight: 700;
}

.btn-reset {
  height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-md);
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.15s;
}

.btn-reset:hover {
  border-color: var(--red);
  color: #fff;
  background: rgba(239, 68, 68, 0.22);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  margin-bottom: 22px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.filter-selects {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.filter-platforms {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.pill:hover {
  border-color: var(--border-hover);
  color: var(--text-main);
}

.pill .pill-count {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-dim);
}

.pill.active-indigo {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}

.pill.active-indigo .pill-count {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.pill-upcoming {
  height: 38px;
  border-radius: var(--radius-sm);
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.35);
  color: #fcd34d;
  font-weight: 600;
}

.pill-upcoming:hover {
  background: rgba(245, 158, 11, 0.16);
  border-color: var(--amber);
  color: #fef3c7;
}

.pill-upcoming .pill-count {
  background: rgba(245, 158, 11, 0.2);
  color: #fde68a;
}

.pill-upcoming.active-amber {
  background: var(--amber);
  border-color: var(--amber);
  color: #1c1302;
  font-weight: 700;
}

.pill-upcoming.active-amber .pill-count {
  background: rgba(0, 0, 0, 0.18);
  color: #1c1302;
}

.mode-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 16px;
  margin-bottom: 16px;
  border-radius: var(--radius-md);
  background: rgba(245, 158, 11, 0.09);
  border: 1px solid rgba(245, 158, 11, 0.32);
  color: #fde68a;
  font-size: 13.5px;
}

.mode-banner-btn {
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fef3c7;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.mode-banner-btn:hover {
  background: rgba(245, 158, 11, 0.28);
}

/* Catalog Grid & Cards */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.amiibo-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.amiibo-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: var(--bg-card-hover);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px 8px;
  font-size: 11px;
}

.card-series {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #93c5fd;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-date {
  color: var(--text-dim);
  font-family: var(--font-mono);
  flex-shrink: 0;
}

.card-media {
  height: 196px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(99, 102, 241, 0.07) 0%, transparent 70%);
}

.card-media img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.amiibo-card:hover .card-media img {
  transform: scale(1.04);
}

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

.card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-main);
}

.card-subseries {
  font-size: 12px;
  color: var(--emerald);
  font-weight: 500;
  margin-top: -4px;
}

.card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 4px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.badge-games {
  background: rgba(99, 102, 241, 0.14);
  border-color: rgba(99, 102, 241, 0.32);
  color: #a5b4fc;
}

.badge-platform {
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.28);
  color: #cbd5e1;
}

.badge-switch {
  background: rgba(59, 130, 246, 0.16);
  border-color: rgba(59, 130, 246, 0.45);
  color: #60a5fa;
}

.badge-switch2 {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.45);
  color: #f87171;
}

.badge-write {
  background: var(--emerald-soft);
  border-color: rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
}

.badge-readonly {
  background: rgba(148, 163, 184, 0.08);
  border-color: var(--border);
  color: var(--text-dim);
}

.badge-upcoming {
  background: var(--amber-soft);
  border-color: rgba(245, 158, 11, 0.45);
  color: #fbbf24;
}

.amiibo-card-upcoming {
  border-color: rgba(245, 158, 11, 0.35);
}

.amiibo-card-upcoming:hover {
  border-color: var(--amber);
}

.upcoming-notice {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: var(--amber-soft);
  border: 1px solid rgba(245, 158, 11, 0.38);
  color: #fde68a;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.upcoming-notice strong {
  font-size: 15px;
  color: #fbbf24;
}

.upcoming-notice p {
  margin: 0;
  font-size: 13.5px;
  color: #fef3c7;
  opacity: 0.9;
}

/* Pagination */
.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
}

.page-btn {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.page-btn:hover:not(:disabled) {
  border-color: var(--border-hover);
  color: var(--text-main);
  background: var(--bg-elevated);
}

.page-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Detail Page Layout */
.detail-grid {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.art-box {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.art-box .art-type-badge {
  position: absolute;
  top: 14px;
  left: 14px;
}

.art-box img {
  max-height: 310px;
  object-fit: contain;
}

.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
}

.panel-title {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}

.release-panel {
  padding: 14px 16px;
}

.release-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 8px;
  font-size: 12px;
}

.release-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  white-space: nowrap;
  min-width: 0;
}

.release-item strong {
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: -0.02em;
}

.flag-svg {
  width: 18px;
  height: 12px;
  border-radius: 2px;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.detail-series-kicker {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #818cf8;
  margin-bottom: 4px;
}

.detail-series-kicker a:hover {
  text-decoration: underline;
}

.detail-title {
  margin: 0 0 6px;
  font-size: 32px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.detail-subseries {
  margin: 0 0 16px;
  color: var(--emerald);
  font-size: 14px;
  font-weight: 600;
}

.meta-table {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13.5px;
}

.meta-row:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.meta-label {
  color: var(--text-muted);
}

.meta-value {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-main);
  word-break: break-all;
  text-align: right;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.meta-value-id {
  color: #93c5fd;
  font-weight: 700;
}

.meta-value-pixl {
  color: #34d399;
  font-weight: 600;
}

.btn-icon-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.btn-icon-copy:hover {
  color: var(--text-main);
  border-color: var(--accent);
}

.btn-icon-copy.copied {
  color: var(--emerald);
  border-color: var(--emerald);
}

/* Action Buttons */
.actions-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}

.btn-secondary {
  background: var(--bg-elevated);
  border-color: var(--border);
  color: var(--text-main);
}

.btn-secondary:hover {
  border-color: var(--border-hover);
  background: #222e4f;
}

.btn-pixl {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
}

.btn-pixl:hover {
  background: rgba(16, 185, 129, 0.2);
  border-color: var(--emerald);
}

.btn-ble {
  width: 100%;
  min-height: 48px;
  background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
  color: #fff;
  font-size: 15px;
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.3);
}

.btn-ble:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-ble:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.ble-warning {
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: var(--amber-soft);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fcd34d;
  font-size: 13.5px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ble-warning a {
  font-weight: 600;
  text-decoration: underline;
  color: #fde68a;
}

/* Ad Slots */
.ad-slot {
  margin: 16px 0;
  min-height: 0;
}

.ad-slot-preview {
  min-height: 96px;
  border-radius: var(--radius-md);
  border: 1px dashed rgba(99, 102, 241, 0.45);
  background: rgba(99, 102, 241, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px;
  text-align: center;
}

.ad-slot-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.16);
  padding: 3px 10px;
  border-radius: 999px;
}

.ad-slot-desc {
  font-size: 12.5px;
  color: var(--text-dim);
}

/* Compatible Games & Game Detail Rows */
.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 26px 0 14px;
}

.section-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

.tab-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tab-btn {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.tab-btn:hover {
  color: var(--text-main);
  border-color: var(--border-hover);
}

.tab-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.games-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.game-card-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.game-card-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  flex-shrink: 0;
}

.game-card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.game-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
}

.game-title a:hover {
  color: #93c5fd;
  text-decoration: underline;
}

.game-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.game-card-side .game-badges {
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.game-card-side .game-badges .badge {
  min-width: 70px;
  justify-content: center;
}

.game-usage {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

.game-usage-list {
  margin: 0;
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.45;
}

.game-usage-list li::marker {
  color: var(--accent);
}

/* Compact Amiibo row on /games/<slug>.html */
.game-amiibo-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  transition: border-color 0.15s, background 0.15s;
}

.game-amiibo-card:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
}

.game-amiibo-thumb {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border);
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.game-amiibo-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.game-amiibo-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.game-amiibo-series {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 500;
  margin-left: 8px;
}

/* Game Overview, Guide & Reward Filter Chips on /games/<slug>.html */
.game-overview-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.game-stats-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.game-stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--text-muted);
}

.game-stat-chip strong {
  color: var(--text-main);
  font-weight: 700;
}

.game-stat-chip.stat-write {
  background: var(--emerald-soft);
  border-color: rgba(16, 185, 129, 0.32);
  color: #6ee7b7;
}

.game-stat-chip.stat-write strong {
  color: #a7f3d0;
}

.game-guide-box {
  padding: 13px 16px;
  border-radius: var(--radius-md);
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.28);
}

.game-guide-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #a5b4fc;
  margin: 0 0 6px;
}

.game-guide-text {
  margin: 0;
  font-size: 14px;
  color: #e2e8f0;
  line-height: 1.55;
}

.game-rewards-summary {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.game-rewards-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}

.reward-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.reward-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12.5px;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s;
}

.reward-chip:hover {
  border-color: var(--border-hover);
  color: var(--text-main);
  background: var(--bg-elevated);
}

.reward-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}

.reward-chip-count {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-dim);
}

.reward-chip.active .reward-chip-count {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.reward-single-note {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-muted);
}

/* Related Blocks */
.related-section {
  margin-top: 38px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

/* Directory & Lists */
.directory-block {
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

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

.directory-head h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}

.directory-head a {
  font-size: 13px;
  color: #818cf8;
  font-weight: 500;
}

.directory-head a:hover {
  text-decoration: underline;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-link {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
  transition: all 0.15s;
}

.tag-link:hover {
  border-color: var(--accent);
  color: var(--text-main);
}

.tag-link span {
  color: var(--text-dim);
  margin-left: 4px;
}

.directory-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.dir-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all 0.15s;
}

.dir-card:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
}

.dir-card-title {
  font-weight: 600;
  font-size: 14.5px;
}

.dir-card-sub {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 2px;
}

/* Modal BLE */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(5, 8, 15, 0.78);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-box {
  width: 100%;
  max-width: 520px;
  background: var(--bg-surface);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text-main);
  background: var(--bg-elevated);
}

.modal-body {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ble-target-row {
  font-size: 13px;
  color: var(--text-muted);
  background: var(--bg-input);
  border: 1px solid var(--border);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  word-break: break-all;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

.checkbox-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.ble-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
}

.progress-track {
  width: 100%;
  height: 10px;
  background: var(--bg-input);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #6366f1 0%, #10b981 100%);
  transition: width 0.2s ease;
}

.ble-log {
  margin: 0;
  height: 160px;
  overflow-y: auto;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: #060911;
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  color: #cbd5e1;
  white-space: pre-wrap;
  word-break: break-word;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.15);
}

/* Empty & Prose */
.empty-state {
  padding: 48px 20px;
  text-align: center;
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
}

.prose-article {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
}

/* Load More on heavy /games/<slug>.html pages */
.load-more-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 0 8px;
}

.btn-load-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 24px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-hover);
  color: var(--text-main);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-load-more:hover {
  background: var(--bg-elevated);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.btn-load-more .load-more-count {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.18);
  color: #a5b4fc;
}

/* 404 Not Found Page */
.not-found-card {
  text-align: center;
  padding: 56px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 640px;
  margin: 40px auto;
}

.not-found-code {
  font-size: 84px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #6366f1 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
}

.not-found-title {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 10px;
}

.not-found-text {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 24px;
}

.not-found-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.prose-article h1 {
  margin-top: 0;
  font-size: 28px;
}

.prose-article h2 {
  margin-top: 28px;
  font-size: 19px;
  color: #c7d2fe;
}

.prose-article ul, .prose-article ol {
  padding-left: 22px;
  color: var(--text-muted);
}

.prose-article li {
  margin-bottom: 8px;
}

.prose-article strong {
  color: var(--text-main);
}

.prose-article code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 5px;
  color: #93c5fd;
}

.info-callout {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #bfdbfe;
  font-size: 14px;
  margin: 16px 0;
}

.compat-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14px;
}

.compat-table th, .compat-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.compat-table th {
  color: var(--text-dim);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(9, 13, 22, 0.9);
  padding: 24px 0;
  font-size: 13px;
  color: var(--text-dim);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links a:hover {
  color: var(--text-main);
}

/* Responsive */
@media (max-width: 1100px) {
  .catalog-grid, .related-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .detail-grid {
    grid-template-columns: 344px minmax(0, 1fr);
  }
  .directory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .catalog-grid, .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .art-box {
    min-height: 260px;
  }
  .detail-title {
    font-size: 26px;
  }
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .filter-selects {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .filter-selects .select-compact {
    width: 100%;
  }
  .filter-selects .pill-upcoming {
    grid-column: 1 / -1;
    justify-content: center;
  }
}

@media (max-width: 540px) {
  .catalog-grid, .related-grid, .directory-grid {
    grid-template-columns: 1fr;
  }
  .actions-row {
    grid-template-columns: 1fr;
  }
  .filter-selects {
    grid-template-columns: 1fr;
  }
  .game-card {
    flex-direction: column;
    gap: 10px;
  }
  .game-card-side {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
  }
  .game-card-side .game-badges {
    flex-direction: row;
    align-items: center;
  }
  .game-amiibo-card {
    align-items: flex-start;
  }
  .header-nav {
    gap: 8px;
  }
  .brand-badge {
    display: none;
  }
  .prose-article {
    padding: 20px;
  }
}


/* Nav Pack Pill */
.nav-pack-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.15s;
}

.nav-pack-link:hover, .nav-pack-link.active {
  color: var(--text-main);
  border-color: var(--accent);
  background: var(--bg-elevated);
}

.nav-pack-link.has-items {
  border-color: rgba(16, 185, 129, 0.45);
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.1);
}

.nav-pack-count {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.nav-pack-link.has-items .nav-pack-count {
  background: var(--emerald);
  color: #052e1c;
}

/* Card Corner Pack Toggle */
.amiibo-card {
  position: relative;
}

.card-pack-btn {
  position: absolute;
  top: 40px;
  right: 10px;
  z-index: 3;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(14, 20, 36, 0.88);
  color: var(--text-muted);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}

.card-pack-btn:hover {
  border-color: var(--emerald);
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.16);
}

.card-pack-btn.in-pack {
  background: var(--emerald);
  border-color: var(--emerald);
  color: #052e1c;
  font-size: 13px;
}

/* Small Buttons & Pack Actions */
.btn-sm {
  min-height: 34px;
  padding: 6px 12px;
  font-size: 12.5px;
  border-radius: var(--radius-sm);
}

.btn-pack-detail.in-pack,
.btn.in-pack {
  background: rgba(16, 185, 129, 0.18);
  border-color: var(--emerald);
  color: #6ee7b7;
}

.btn-zip-pack {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.38);
  color: #6ee7b7;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.15s;
}

.btn-zip-pack:hover {
  background: rgba(16, 185, 129, 0.22);
  border-color: var(--emerald);
  color: #d1fae5;
}

.btn-zip-pack .zip-size {
  font-size: 11px;
  font-family: var(--font-mono);
  opacity: 0.85;
}

.detail-actions-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 10px;
}

/* Compact inline pack button on /games/<slug>.html rows */
.game-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-row-pack {
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.btn-row-pack:hover {
  border-color: var(--emerald);
  color: #6ee7b7;
}

.btn-row-pack.in-pack {
  background: var(--emerald);
  border-color: var(--emerald);
  color: #052e1c;
}

/* /pack.html Page */
.pack-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 18px;
}

.pack-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.pack-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.pack-item-link {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1 1 auto;
  min-width: 0;
}

.pack-item-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pack-item-path {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #34d399;
  word-break: break-all;
}

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

.btn-icon-remove {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-icon-remove:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #fff;
}

/* /check.html Dropzone & Results */
.check-dropzone {
  border: 2px dashed var(--border-hover);
  border-radius: var(--radius-lg);
  background: rgba(99, 102, 241, 0.05);
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.18s ease;
  margin-bottom: 20px;
}

.check-dropzone:hover, .check-dropzone.drag-over {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.12);
}

.check-drop-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 6px;
}

.check-drop-sub {
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 0;
}

.check-summary-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  font-size: 13.5px;
}

.check-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.check-card-unknown {
  border-color: rgba(245, 158, 11, 0.35);
}

.check-thumb {
  width: 68px;
  height: 68px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border);
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.check-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.check-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.check-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.check-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.check-title:hover {
  color: #93c5fd;
  text-decoration: underline;
}

.check-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.check-meta code {
  font-family: var(--font-mono);
  background: var(--bg-input);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.check-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

@media (max-width: 640px) {
  .detail-actions-bar {
    grid-template-columns: 1fr;
  }
  .pack-item-row, .check-card {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Фикс скачков ширины кнопок при клике */
.pill,
.pill.active-indigo,
.pill-upcoming,
.pill-upcoming.active-amber {
  font-weight: 600;
}

.reward-chip,
.reward-chip.active {
  font-weight: 500;
}

/* Компактный справочный мини-блок на главной под сериями */
.home-about-block {
  margin-top: 28px;
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.home-about-summary {
  margin: 0 0 10px;
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
}

.home-about-summary strong {
  color: var(--text-main);
}

.home-faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.home-faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  padding: 10px 14px;
}

.home-faq-item summary {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  list-style: none;
}

.home-faq-item summary::-webkit-details-marker {
  display: none;
}

.home-faq-item p {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
}

.home-faq-item code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #93c5fd;
  background: rgba(255, 255, 255, 0.04);
  padding: 1px 5px;
  border-radius: 4px;
}

/* Таблица совместимости BLE на мобильных -> карточки */
@media (max-width: 680px) {
  .compat-table,
  .compat-table tbody {
    display: block;
    width: 100%;
  }

  .compat-table thead {
    display: none;
  }

  .compat-table tr {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
    margin-bottom: 10px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
  }

  .compat-table td {
    display: block;
    padding: 0;
    border: none;
  }

  .compat-table td:first-child {
    font-size: 15px;
    color: var(--text-main);
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .compat-table td:nth-child(2)::before {
    content: "Браузер: ";
    color: var(--text-dim);
    font-size: 12.5px;
    font-weight: 600;
  }

  .compat-table td:nth-child(3) {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
  }
}

/* Мобильная шапка и панели управления */
.prose-article code {
  overflow-wrap: anywhere;
  word-break: break-word;
}

@media (max-width: 760px) {
  .header-inner {
    position: relative;
    height: auto;
    flex-wrap: wrap;
    padding-top: 10px;
    padding-bottom: 10px;
    gap: 10px;
  }

  .brand {
    white-space: nowrap;
  }

  .lang-switch {
    position: absolute;
    top: 14px;
    right: 20px;
    margin-left: 0;
  }

  .header-nav,
  .filter-platforms {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 6px;
    padding-bottom: 2px;
  }

  .header-nav::-webkit-scrollbar,
  .filter-platforms::-webkit-scrollbar {
    display: none;
  }

  .nav-link,
  .nav-pack-link,
  .filter-platforms .pill {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 13px;
    padding: 5px 10px;
  }

  .nav-pack-link {
    margin-left: auto;
  }

  .toolbar-controls {
    width: 100%;
  }

  .toolbar-controls .btn-reset {
    margin: 0 auto;
  }

  .compat-table {
    font-size: 13px;
  }

  .compat-table th,
  .compat-table td {
    padding: 8px 6px;
    vertical-align: top;
  }
}

/* Живой переключатель языков RU | EN */
.lang-link {
  color: var(--text-dim);
  transition: color 0.15s;
}

.lang-link:hover {
  color: var(--text-main);
}

/* Плашки статистики на странице игры в одну строку на мобильных */
@media (max-width: 760px) {
  .game-stats-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 6px;
  }

  .game-stats-row::-webkit-scrollbar {
    display: none;
  }

  .game-stat-chip {
    flex-shrink: 0;
    font-size: 11.5px;
    padding: 4px 8px;
  }
}
