/* ==========================================================================
   PGBET888 â€” Modern landing styles
   Palette: OBSIDIAN + EMERALD + CHAMPAGNE GOLD
   Single authored stylesheet: tokens â†’ base â†’ layout â†’ components â†’ responsive.
   Legacy bundles (css1â€“css4, space-theme) are no longer loaded by contact-us.html.
   ========================================================================== */

/* ---------- 1. Fonts (self-hosted Noto Sans Thai variable, OFL) ---------- */
@font-face {
  font-family: "Noto Sans Thai";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/noto-sans-thai-thai-var.woff2") format("woff2");
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
  font-family: "Noto Sans Thai";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/noto-sans-thai-latin-var.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}

/* ---------- 2. Design tokens ---------- */
:root {
  /* colour — semantic: Midnight Sapphire + Radiant Amber Gold + Sky Cyan */
  --c-bg: #080b14;
  --c-surface: #101626;
  --c-surface-raised: #172036;
  --c-surface-hover: #1e2a45;
  --c-accent: #f5a623;
  --c-accent-hover: #ffc14d;
  --c-accent-soft: rgba(245, 166, 35, 0.14);
  --c-accent-line: rgba(245, 166, 35, 0.42);
  --c-gold: #38bdf8;
  --c-gold-soft: rgba(56, 189, 248, 0.14);
  --c-text: #f5f7fc;
  --c-text-muted: #a3b1cc;
  --c-on-accent: #140b00;
  --c-line: #24324f;               /* decorative dividers */
  --c-control: #556b94;            /* control borders */
  --c-focus: #ffc14d;
  --c-overlay: rgba(4, 6, 12, 0.75);

  /* typography */
  --font-sans: "Noto Sans Thai", Tahoma, "Leelawadee UI", "Thonburi", sans-serif;
  --fs-xs: 0.8125rem;   /* 13 */
  --fs-sm: 0.875rem;    /* 14 */
  --fs-base: 1rem;      /* 16 */
  --fs-read: 1.0625rem; /* 17 â€” article body */
  --fs-md: 1.125rem;    /* 18 */
  --fs-lg: 1.25rem;     /* 20 */
  --fs-xl: clamp(1.375rem, 1.1rem + 1vw, 1.75rem);   /* 22â€“28 */
  --fs-2xl: clamp(1.5rem, 1.15rem + 1.4vw, 2.125rem); /* 24â€“34 */
  --lh-tight: 1.35;
  --lh-snug: 1.5;
  --lh-read: 1.85;

  /* spacing scale 4/8/12/16/24/32/48/64/80 */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-9: 80px;
  --section-gap: clamp(32px, 2rem + 4vw, 80px);

  /* radius */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-pill: 999px;

  /* elevation */
  --sh-1: 0 1px 2px rgba(0, 0, 0, 0.45);
  --sh-2: 0 10px 28px -12px rgba(0, 0, 0, 0.7);
  --sh-3: 0 24px 60px -24px rgba(0, 0, 0, 0.85);
  --glow-accent: 0 8px 24px -10px rgba(245, 166, 35, 0.55);

  /* motion */
  --d-fast: 160ms;
  --d-base: 200ms;
  --d-slow: 280ms;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  /* layout */
  --container: 1280px;
  --gutter: clamp(16px, 3.2vw, 32px);
  --header-h: 72px;
  --bottombar-h: 0px;
  --read-width: 800px;
}

@media (max-width: 767.98px) {
  :root {
    --header-h: 64px;
    --bottombar-h: 68px;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + var(--sp-4));
  background: var(--c-bg);
  color-scheme: dark;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-snug);
  color: var(--c-text);
  background:
    radial-gradient(1200px 520px at 85% -120px, rgba(245, 166, 35, 0.09), transparent 70%),
    radial-gradient(900px 420px at -10% 10%, rgba(56, 189, 248, 0.07), transparent 70%),
    var(--c-bg);
  background-repeat: no-repeat;
  overflow-x: hidden;
  padding-bottom: calc(var(--bottombar-h) + env(safe-area-inset-bottom, 0px));
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -webkit-user-select: none;
  user-select: none;
}

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

img {
  height: auto;
  -webkit-user-drag: none;
}

input,
select,
textarea {
  -webkit-user-select: text;
  user-select: text;
}

a {
  color: var(--c-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--c-accent-hover);
}

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

button {
  cursor: pointer;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: var(--lh-tight);
  font-weight: 700;
  letter-spacing: 0;
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

:focus-visible {
  outline: 2px solid var(--c-focus);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection {
  background: rgba(245, 166, 35, 0.35);
  color: var(--c-text);
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--sp-4);
  top: -100px;
  z-index: 200;
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-sm);
  background: var(--c-accent);
  color: var(--c-on-accent);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: var(--sp-3);
}

[hidden] {
  display: none !important;
}

/* keep short Thai compounds together where ICU would split them */
.nw {
  white-space: nowrap;
}

/* ---------- 4. Layout primitives ---------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  margin-top: var(--section-gap);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-4) var(--sp-6);
  margin-bottom: var(--sp-5);
}

.section-head > div {
  max-width: 760px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-2);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--c-gold);
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--c-gold);
}

.section-title {
  font-size: var(--fs-2xl);
}

.section-desc {
  margin-top: var(--sp-2);
  color: var(--c-text-muted);
  line-height: 1.7;
}

.panel {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-2);
}

/* ---------- 5. Buttons ---------- */
.btn {
  --btn-h: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: var(--btn-h);
  padding: 0 var(--sp-5);
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-size: var(--fs-base);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color var(--d-base) var(--ease),
    border-color var(--d-base) var(--ease),
    color var(--d-base) var(--ease),
    transform var(--d-fast) var(--ease),
    box-shadow var(--d-base) var(--ease);
}

.btn:active {
  transform: translateY(1px);
}

.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.btn-primary {
  background: var(--c-accent);
  color: var(--c-on-accent);
  box-shadow: var(--glow-accent);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--c-accent-hover);
  color: var(--c-on-accent);
}

.btn-secondary {
  background: transparent;
  border-color: var(--c-control);
  color: var(--c-text);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  border-color: var(--c-accent);
  color: var(--c-text);
  background: var(--c-accent-soft);
}

.btn-quiet {
  background: var(--c-surface-raised);
  border-color: var(--c-line);
  color: var(--c-text);
}

.btn-quiet:hover,
.btn-quiet:focus-visible {
  background: var(--c-surface-hover);
  border-color: var(--c-control);
  color: var(--c-text);
}

.btn-sm {
  --btn-h: 36px;
  padding: 0 var(--sp-4);
  font-size: var(--fs-sm);
}

.btn-lg {
  --btn-h: 52px;
  padding: 0 var(--sp-6);
  font-size: var(--fs-md);
}

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

/* ---------- 6. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(8, 11, 20, 0.9);
  border-bottom: 1px solid var(--c-line);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
}

.header-bar {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: none;
  min-height: 44px;
  border-radius: var(--r-sm);
}

.brand img {
  width: auto;
  height: 26px;
  aspect-ratio: 705 / 64;
}

.primary-nav {
  margin-inline: auto;
}

.primary-nav ul {
  display: flex;
  gap: var(--sp-1);
  list-style: none;
}

.primary-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--sp-3);
  border-radius: var(--r-sm);
  color: var(--c-text-muted);
  font-weight: 500;
  text-decoration: none;
  transition: color var(--d-base) var(--ease), background-color var(--d-base) var(--ease);
}

.primary-nav a::after {
  content: "";
  position: absolute;
  left: var(--sp-3);
  right: var(--sp-3);
  bottom: 6px;
  height: 2px;
  border-radius: 2px;
  background: var(--c-accent);
  transform: scaleX(0);
  transition: transform var(--d-base) var(--ease);
}

.primary-nav a:hover {
  color: var(--c-text);
  background: var(--c-surface);
}

.primary-nav a[aria-current="true"] {
  color: var(--c-text);
}

.primary-nav a[aria-current="true"]::after {
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-left: auto;
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--c-control);
  border-radius: var(--r-md);
  background: var(--c-surface);
  color: var(--c-text);
}

.menu-toggle:hover {
  border-color: var(--c-accent);
}

.menu-toggle svg {
  width: 22px;
  height: 22px;
}

/* category bar */
.category-bar {
  border-bottom: 1px solid var(--c-line);
  background: rgba(16, 22, 38, 0.65);
}

.category-list {
  display: flex;
  gap: var(--sp-2);
  padding-block: var(--sp-2);
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent);
}

.category-list::-webkit-scrollbar {
  display: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  flex: none;
  min-height: 40px;
  padding: 0 var(--sp-4) 0 var(--sp-3);
  border: 1px solid var(--c-line);
  border-radius: var(--r-pill);
  background: var(--c-surface);
  color: var(--c-text);
  font-size: var(--fs-sm);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color var(--d-base) var(--ease), background-color var(--d-base) var(--ease);
}

.chip img {
  width: 20px;
  height: 20px;
}

.chip:hover,
.chip:focus-visible {
  color: var(--c-text);
  border-color: var(--c-accent-line);
  background: var(--c-surface-raised);
}

/* ---------- 7. Mobile drawer (native <dialog>) ---------- */
.drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(360px, 100%);
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--c-line);
  background: var(--c-surface-raised);
  color: var(--c-text);
  box-shadow: var(--sh-3);
}

.drawer::backdrop {
  background: var(--c-overlay);
}

.drawer[open] {
  display: flex;
  flex-direction: column;
}

@media (prefers-reduced-motion: no-preference) {
  .drawer[open] {
    animation: drawer-in var(--d-slow) var(--ease);
  }

  @keyframes drawer-in {
    from {
      transform: translateX(24px);
      opacity: 0;
    }
  }
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  min-height: var(--header-h);
  padding: 0 var(--sp-4) 0 var(--sp-5);
  border-bottom: 1px solid var(--c-line);
}

.drawer-head img {
  height: 22px;
  width: auto;
  aspect-ratio: 705 / 64;
}

.drawer-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--c-control);
  border-radius: var(--r-md);
  background: transparent;
}

.drawer-close svg {
  width: 20px;
  height: 20px;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--sp-5);
  padding-bottom: calc(var(--sp-5) + env(safe-area-inset-bottom, 0px));
}

.drawer-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
}

.drawer-label {
  margin: var(--sp-6) 0 var(--sp-2);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--c-gold);
}

.drawer-links {
  list-style: none;
}

.drawer-links a {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: 48px;
  padding: 0 var(--sp-3);
  border-radius: var(--r-md);
  color: var(--c-text);
  text-decoration: none;
}

.drawer-links a:hover {
  background: var(--c-surface-hover);
}

.drawer-links img {
  width: 22px;
  height: 22px;
}

html.drawer-open {
  overflow: hidden;
}

/* ---------- 8. Hero ---------- */
.hero {
  padding-top: var(--sp-5);
}

.hero-frame {
  overflow: hidden;
  border-radius: var(--r-xl);
  border: 1px solid var(--c-line);
  background: var(--c-surface);
  box-shadow: var(--sh-3);
}

.hero-media {
  display: block;
  position: relative;
  aspect-ratio: 2172 / 724;
  background: #0b101e;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* never crop the text inside the artwork */
}

.hero-media:focus-visible {
  outline-offset: -4px;
}

.hero-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4) var(--sp-6);
  padding: var(--sp-5) var(--sp-6);
  border-top: 1px solid var(--c-line);
  background: linear-gradient(180deg, var(--c-surface) 0%, rgba(16, 22, 38, 0.65) 100%);
}

.hero-copy {
  min-width: 0;
}

.hero-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2) var(--sp-3);
  margin-bottom: var(--sp-2);
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
}

.hero-kicker strong {
  color: var(--c-gold);
  font-weight: 600;
}

.hero-title {
  font-size: var(--fs-xl);
  line-height: 1.4;
  text-wrap: balance;
}

.hero-actions {
  display: flex;
  gap: var(--sp-3);
  flex: none;
}

/* ---------- 9. Notice + facts ---------- */
.notice {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: var(--sp-3) var(--sp-4);
  margin-top: var(--sp-5);
  padding: var(--sp-4) var(--sp-5);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  background: var(--c-surface);
}

.notice-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: 28px;
  padding: 0 var(--sp-3);
  border-radius: var(--r-pill);
  background: var(--c-gold-soft);
  color: var(--c-gold);
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
}

.notice-tag svg {
  width: 16px;
  height: 16px;
}

.notice-text {
  color: var(--c-text-muted);
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.notice-text time {
  color: var(--c-text);
  font-weight: 600;
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-3);
  margin-top: var(--sp-3);
  list-style: none;
}

.fact {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  min-height: 76px;
  padding: var(--sp-4) var(--sp-5);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  background: var(--c-surface);
  color: var(--c-text);
  text-decoration: none;
  transition: border-color var(--d-base) var(--ease), background-color var(--d-base) var(--ease);
}

.fact:hover,
.fact:focus-visible {
  color: var(--c-text);
  border-color: var(--c-accent-line);
  background: var(--c-surface-raised);
}

.fact-num {
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--c-accent);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.fact-label {
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
  line-height: 1.45;
}

.fact-label strong {
  display: block;
  color: var(--c-text);
  font-size: var(--fs-base);
  font-weight: 600;
}

.fact-arrow {
  width: 18px;
  height: 18px;
  margin-left: auto;
  color: var(--c-text-muted);
  transition: transform var(--d-base) var(--ease), color var(--d-base) var(--ease);
}

.fact:hover .fact-arrow {
  transform: translateX(3px);
  color: var(--c-accent);
}

.facts-note {
  margin-top: var(--sp-2);
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
}

/* ---------- 10. Game catalog ---------- */
.catalog {
  padding: var(--sp-6);
}

.catalog-controls {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) auto;
  align-items: end;
  gap: var(--sp-3) var(--sp-4);
}

.field {
  display: grid;
  gap: var(--sp-2);
  min-width: 0;
}

.field-label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--c-text-muted);
}

.input-wrap {
  position: relative;
}

.input-wrap svg {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  color: var(--c-text-muted);
  pointer-events: none;
}

.input,
.select {
  width: 100%;
  min-height: 48px;
  padding: 0 var(--sp-4);
  border: 1px solid var(--c-control);
  border-radius: var(--r-md);
  background: var(--c-bg);
  color: var(--c-text);
  font-size: var(--fs-base); /* â‰¥16px prevents iOS zoom */
  transition: border-color var(--d-base) var(--ease), box-shadow var(--d-base) var(--ease);
}

.input {
  padding-left: 44px;
}

.input::placeholder {
  color: #7b8ba8;
}

.input::-webkit-search-cancel-button {
  filter: invert(0.8);
}

.select {
  appearance: none;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A3B1CC' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
}

.select option {
  background: var(--c-surface-raised);
  color: var(--c-text);
}

.input:hover,
.select:hover {
  border-color: #6e85b2;
}

.input:focus,
.select:focus {
  outline: none;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.28);
}

.catalog-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin: var(--sp-5) 0 var(--sp-4);
}

.catalog-status {
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
}

.catalog-status strong {
  color: var(--c-text);
  font-variant-numeric: tabular-nums;
}

.catalog-hint {
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--sp-4);
  list-style: none;
}

/* with JS, show the first page right away (no flash of 232 cards before the script runs) */
.js .game-grid:not([data-ready]) .game-card:nth-child(n + 25) {
  display: none;
}

.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  background: var(--c-surface-raised);
  transition:
    transform var(--d-base) var(--ease),
    border-color var(--d-base) var(--ease),
    box-shadow var(--d-base) var(--ease);
}

.game-card:hover,
.game-card:focus-within {
  border-color: var(--c-accent-line);
  box-shadow: var(--sh-2);
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .game-card:hover {
    transform: translateY(-3px);
  }
}

.game-card:focus-within {
  outline: 2px solid var(--c-focus);
  outline-offset: 2px;
}

.game-thumb {
  position: relative;
  aspect-ratio: 1;
  background: var(--c-surface);
}

.game-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* square thumbnails rendered 1:1, no distortion */
}

.game-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-1) var(--sp-2);
  margin-bottom: var(--sp-2);
}

.tag {
  padding: 0 var(--sp-2);
  border-radius: var(--r-pill);
  background: var(--c-gold-soft);
  color: var(--c-gold);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.6;
  white-space: nowrap;
}

.game-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--sp-1);
  padding: var(--sp-3);
}

.game-title {
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.4;
  color: var(--c-text);
  overflow-wrap: anywhere;
  min-height: calc(1.4em * 2);
}

.game-title.is-unnamed {
  color: var(--c-text-muted);
  font-weight: 500;
}

.game-provider {
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
}

.game-link {
  width: 100%;
  margin-top: auto;
}

/* whole card is a single, unambiguous hit area (no nested links) */
.game-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.game-link:focus-visible {
  outline: none;
}

.catalog-empty {
  display: grid;
  justify-items: center;
  gap: var(--sp-3);
  padding: var(--sp-7) var(--sp-5);
  border: 1px dashed var(--c-control);
  border-radius: var(--r-lg);
  text-align: center;
  color: var(--c-text-muted);
}

.catalog-empty svg {
  width: 40px;
  height: 40px;
  color: var(--c-gold);
}

.catalog-empty strong {
  color: var(--c-text);
  font-size: var(--fs-md);
}

.catalog-more {
  display: flex;
  justify-content: center;
  margin-top: var(--sp-5);
}

/* ---------- 11. Tabs (providers + categories) ---------- */
.rail {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.rail-track {
  display: flex;
  gap: var(--sp-2);
  flex: 1;
  min-width: 0;
  padding: var(--sp-1);
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

.rail-track::-webkit-scrollbar {
  display: none;
}

.rail-btn {
  display: none;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--c-control);
  border-radius: var(--r-pill);
  background: var(--c-surface);
  color: var(--c-text);
  transition: border-color var(--d-base) var(--ease), opacity var(--d-base) var(--ease);
}

.js .rail-btn {
  display: inline-flex;
}

.rail-btn:hover {
  border-color: var(--c-accent);
}

.rail-btn[disabled] {
  opacity: 0.35;
  cursor: default;
}

.rail-btn svg {
  width: 20px;
  height: 20px;
}

.logo-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 132px;
  height: 64px;
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  background: var(--c-surface-raised);
  scroll-snap-align: start;
  text-decoration: none;
  transition: border-color var(--d-base) var(--ease), background-color var(--d-base) var(--ease), box-shadow var(--d-base) var(--ease);
}

.logo-tab img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.logo-tab:hover {
  border-color: var(--c-control);
  background: var(--c-surface-hover);
}

.logo-tab[aria-selected="true"] {
  border-color: var(--c-accent);
  background: linear-gradient(180deg, rgba(245, 166, 35, 0.18), rgba(245, 166, 35, 0.04));
  box-shadow: inset 0 -3px 0 var(--c-accent);
}

.text-tab {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  flex: none;
  min-height: 44px;
  padding: 0 var(--sp-4);
  border: 1px solid var(--c-line);
  border-radius: var(--r-pill);
  background: var(--c-surface-raised);
  color: var(--c-text-muted);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  scroll-snap-align: start;
  transition: border-color var(--d-base) var(--ease), color var(--d-base) var(--ease), background-color var(--d-base) var(--ease);
}

.text-tab img {
  width: 20px;
  height: 20px;
}

.text-tab .count {
  min-width: 24px;
  padding: 0 6px;
  border-radius: var(--r-pill);
  background: var(--c-bg);
  color: var(--c-text-muted);
  font-size: var(--fs-xs);
  text-align: center;
}

.text-tab:hover {
  color: var(--c-text);
  border-color: var(--c-control);
}

.text-tab[aria-selected="true"] {
  color: var(--c-on-accent);
  background: var(--c-accent);
  border-color: var(--c-accent);
  font-weight: 600;
}

.text-tab[aria-selected="true"] .count {
  background: rgba(20, 11, 0, 0.18);
  color: var(--c-on-accent);
}

/* no-JS fallback: every panel stays visible and anchors work */
.js .tab-panel:not(.is-active) {
  display: none;
}

/* ---------- 12. Provider showcase ---------- */
.providers-wrap {
  padding: var(--sp-6);
}

.provider-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: var(--sp-6);
  align-items: center;
  margin-top: var(--sp-5);
  padding: var(--sp-6);
  border: 1px solid var(--c-line);
  border-radius: var(--r-xl);
  background:
    radial-gradient(420px 260px at 85% 50%, rgba(245, 166, 35, 0.12), transparent 70%),
    var(--c-bg);
}

.no-js .provider-panel + .provider-panel {
  margin-top: var(--sp-4);
}

.provider-head {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  margin-bottom: var(--sp-5);
}

.provider-head img {
  width: 104px;
  height: 40px;
  object-fit: contain;
  object-position: left center;
}

.provider-head h3 {
  font-size: var(--fs-lg);
}

.provider-head p {
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-3);
  list-style: none;
}

.mini-game {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  background: var(--c-surface);
  aspect-ratio: 1;
  transition: border-color var(--d-base) var(--ease), transform var(--d-base) var(--ease);
}

.mini-game img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mini-game span {
  position: absolute;
  inset: auto 0 0 0;
  padding: var(--sp-4) var(--sp-2) var(--sp-2);
  background: linear-gradient(180deg, transparent, rgba(8, 11, 20, 0.92) 60%);
  color: var(--c-text);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-align: center;
  opacity: 0;
  transition: opacity var(--d-base) var(--ease);
}

.mini-game:hover,
.mini-game:focus-visible {
  border-color: var(--c-accent);
}

.mini-game:hover span,
.mini-game:focus-visible span {
  opacity: 1;
}

.provider-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-top: var(--sp-5);
}

.provider-art {
  display: flex;
  align-items: center;
  justify-content: center;
}

.provider-art img {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 466 / 381;
  object-fit: contain;
  filter: drop-shadow(0 24px 32px rgba(0, 0, 0, 0.55));
}

/* ---------- 13. Category directory ---------- */
.categories-wrap {
  padding: var(--sp-6);
}

.category-panel {
  margin-top: var(--sp-5);
}

.no-js .category-panel h3 {
  margin-bottom: var(--sp-3);
}

.category-panel h3 {
  font-size: var(--fs-lg);
}

.category-panel .panel-sub {
  margin: var(--sp-1) 0 var(--sp-4);
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
}

.logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--sp-3);
  list-style: none;
}

.logo-tile {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 72px;
  padding: var(--sp-3);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  background: var(--c-surface-raised);
  text-decoration: none;
  transition: border-color var(--d-base) var(--ease), background-color var(--d-base) var(--ease);
}

.logo-tile img {
  grid-area: 1 / 1;
  width: 100%;
  max-width: 130px;
  height: 100%;
  max-height: 50px;
  object-fit: contain;
  transition: opacity var(--d-base) var(--ease);
}

.logo-tile .logo-color {
  opacity: 0;
}

.logo-tile:hover,
.logo-tile:focus-visible {
  border-color: var(--c-accent-line);
  background: var(--c-surface-hover);
}

.logo-tile:hover .logo-color {
  opacity: 1;
}

.logo-tile:hover .logo-mono {
  opacity: 0;
}

.logo-tile .status {
  position: absolute;
  top: -8px;
  right: 8px;
  padding: 0 var(--sp-2);
  border-radius: var(--r-pill);
  background: var(--c-surface);
  border: 1px solid var(--c-gold);
  color: var(--c-gold);
  font-size: 0.6875rem;
  line-height: 1.6;
}

/* ---------- 14. App section ---------- */
.app {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  gap: var(--sp-6);
  padding: var(--sp-6) var(--sp-7);
  overflow: hidden;
  background:
    radial-gradient(520px 320px at 20% 60%, rgba(245, 166, 35, 0.12), transparent 70%),
    var(--c-surface);
}

.app-art img {
  width: 100%;
  max-width: 560px;
  margin-inline: auto;
}

.app-copy .section-title {
  margin-bottom: var(--sp-3);
}

.steps {
  display: grid;
  gap: var(--sp-3);
  margin: var(--sp-5) 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: var(--sp-3);
  align-items: start;
  line-height: 1.6;
  color: var(--c-text-muted);
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--c-accent-line);
  background: var(--c-accent-soft);
  color: var(--c-accent);
  font-weight: 700;
  font-size: var(--fs-sm);
}

.steps strong {
  color: var(--c-text);
  font-weight: 600;
}

.callout {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border: 1px solid var(--c-line);
  border-left: 3px solid var(--c-gold);
  border-radius: var(--r-md);
  background: var(--c-bg);
  font-size: var(--fs-sm);
  line-height: 1.7;
  color: var(--c-text-muted);
}

.callout svg {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  color: var(--c-gold);
}

.app-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-top: var(--sp-5);
}

/* ---------- 15. Article ---------- */
.article-wrap {
  display: grid;
  grid-template-columns: 280px minmax(0, var(--read-width));
  justify-content: center;
  gap: var(--sp-7);
  align-items: start;
}

.article-head {
  grid-column: 1 / -1;
  max-width: calc(280px + var(--sp-7) + var(--read-width));
  width: 100%;
  margin-inline: auto;
  padding-bottom: var(--sp-5);
  border-bottom: 1px solid var(--c-line);
}

.article-head .updated {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-4);
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
}

.article-head .updated time {
  color: var(--c-text);
}

.toc {
  position: sticky;
  top: calc(var(--header-h) + var(--sp-5));
  max-height: calc(100vh - var(--header-h) - var(--sp-7));
  overflow: auto;
  padding: var(--sp-5);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  background: var(--c-surface);
}

.toc summary {
  list-style: none;
}

.toc summary::-webkit-details-marker {
  display: none;
}

.toc-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--fs-md);
}

.toc-title svg {
  display: none;
  width: 20px;
  height: 20px;
  color: var(--c-text-muted);
  transition: transform var(--d-base) var(--ease);
}

.toc ol {
  display: grid;
  gap: 2px;
  margin-top: var(--sp-3);
  list-style: none;
  counter-reset: toc;
}

.toc a {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: var(--sp-2);
  align-items: baseline;
  min-height: 44px;
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-sm);
  color: var(--c-text-muted);
  font-size: var(--fs-sm);
  line-height: 1.5;
  text-decoration: none;
  transition: color var(--d-base) var(--ease), background-color var(--d-base) var(--ease);
}

.toc a::before {
  counter-increment: toc;
  content: counter(toc, decimal-leading-zero);
  font-size: var(--fs-xs);
  font-variant-numeric: tabular-nums;
  color: var(--c-gold);
}

.toc a:hover {
  color: var(--c-text);
  background: var(--c-surface-raised);
}

.toc a[aria-current="true"] {
  color: var(--c-text);
  background: var(--c-accent-soft);
  box-shadow: inset 2px 0 0 var(--c-accent);
}

.prose {
  font-size: var(--fs-read);
  line-height: var(--lh-read);
  color: #dce3f2;
  overflow-wrap: break-word;
}

.prose > * + * {
  margin-top: 1.1em;
}

.prose h1 {
  font-size: var(--fs-xl);
  color: var(--c-accent);
  margin-bottom: 0.6em;
}

.prose h2 {
  margin-top: 2.2em;
  padding-top: 1.1em;
  border-top: 1px solid var(--c-line);
  font-size: var(--fs-xl);
  color: var(--c-text);
}

.prose h3 {
  margin-top: 1.8em;
  font-size: var(--fs-lg);
  color: var(--c-text);
}

.prose h2 + *,
.prose h3 + * {
  margin-top: 0.7em;
}

.prose h2 + h3 {
  margin-top: 1.1em;
}

.prose strong {
  color: var(--c-text);
  font-weight: 600;
}

.prose ul {
  display: grid;
  gap: 0.6em;
  padding-left: 1.4em;
}

.prose li::marker {
  color: var(--c-accent);
}

.prose .lead {
  font-size: var(--fs-md);
  color: var(--c-text);
}

/* FAQ */
.faq-list {
  display: grid;
  gap: var(--sp-3);
}

.prose .faq-list {
  margin-top: var(--sp-5);
}

.faq-item {
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  background: var(--c-surface);
  transition: border-color var(--d-base) var(--ease);
}

.faq-item[open] {
  border-color: var(--c-accent-line);
}

.faq-item summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-4);
  min-height: 56px;
  padding: var(--sp-4) var(--sp-5);
  cursor: pointer;
  list-style: none;
  font-size: var(--fs-base);
  font-weight: 600;
  line-height: 1.6;
  color: var(--c-text);
  border-radius: var(--r-lg);
}

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

.faq-item summary:hover {
  background: var(--c-surface-raised);
}

.faq-icon {
  position: relative;
  flex: none;
  width: 28px;
  height: 28px;
  margin-top: 1px;
  border-radius: 50%;
  border: 1px solid var(--c-control);
}

.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 2px;
  border-radius: 2px;
  background: var(--c-text);
  transform: translate(-50%, -50%);
  transition: transform var(--d-base) var(--ease);
}

.faq-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.faq-item[open] .faq-icon {
  border-color: var(--c-accent);
}

.faq-item[open] .faq-icon::after {
  transform: translate(-50%, -50%) rotate(0deg);
}

.faq-answer {
  padding: 0 var(--sp-5) var(--sp-5);
  color: #c7d2e8;
  font-size: var(--fs-base);
  line-height: 1.8;
}

/* ---------- 16. Footer ---------- */
.site-footer {
  margin-top: var(--section-gap);
  border-top: 1px solid var(--c-line);
  background: linear-gradient(180deg, var(--c-surface) 0%, var(--c-bg) 100%);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: var(--sp-6);
  padding-block: var(--sp-7) var(--sp-6);
}

.footer-logo {
  height: 26px;
  width: auto;
  aspect-ratio: 705 / 64;
}

.footer-brand p {
  margin-top: var(--sp-4);
  max-width: 380px;
  color: var(--c-text-muted);
  font-size: var(--fs-sm);
  line-height: 1.75;
}

.age-badges {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
}

.age-badges img {
  height: 32px;
  width: auto;
}

.footer-title {
  margin-bottom: var(--sp-3);
  font-size: var(--fs-base);
  color: var(--c-gold);
  font-weight: 600;
}

.footer-links {
  display: grid;
  gap: 2px;
  list-style: none;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: 44px;
  color: var(--c-text-muted);
  font-size: var(--fs-sm);
  text-decoration: none;
}

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

.footer-links img {
  width: 18px;
  height: 18px;
}

.footer-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4) var(--sp-6);
  padding-block: var(--sp-5);
  border-top: 1px solid var(--c-line);
}

.service-times {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  list-style: none;
}

.service-times li {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: 52px;
  padding: var(--sp-2) var(--sp-4);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  background: var(--c-surface);
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
}

.service-times img {
  width: 24px;
  height: 24px;
}

.service-times strong {
  color: var(--c-text);
  font-weight: 600;
}

.band-note {
  flex: 1 1 320px;
  font-size: var(--fs-xs);
  line-height: 1.7;
  color: var(--c-text-muted);
}

.browsers {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
}

.browsers ul {
  display: flex;
  gap: var(--sp-2);
  list-style: none;
}

.browsers img {
  width: 28px;
  height: 28px;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--sp-3);
  padding-block: var(--sp-5);
  border-top: 1px solid var(--c-line);
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
}

/* ---------- 17. Mobile bottom bar ---------- */
.bottom-bar {
  display: none;
}

@media (max-width: 767.98px) {
  .bottom-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: grid;
    grid-template-columns: 0.8fr 1fr 1.25fr;
    gap: var(--sp-2);
    padding: var(--sp-2) var(--sp-3) calc(var(--sp-2) + env(safe-area-inset-bottom, 0px));
    padding-left: calc(var(--sp-3) + env(safe-area-inset-left, 0px));
    padding-right: calc(var(--sp-3) + env(safe-area-inset-right, 0px));
    border-top: 1px solid var(--c-line);
    background: rgba(16, 22, 38, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform var(--d-base) var(--ease);
  }

  .bottom-bar .btn {
    --btn-h: 50px;
    padding: 0 var(--sp-2);
    font-size: var(--fs-sm);
  }

  .bottom-bar .btn-line {
    flex-direction: column;
    gap: 0;
    border-radius: var(--r-md);
    font-size: 0.75rem;
    line-height: 1.2;
  }

  /* keyboard open (search focused) â†’ hide the bar so it never covers inputs */
  html.kb-open .bottom-bar {
    transform: translateY(110%);
  }
}

/* ---------- 18. Responsive ---------- */
@media (max-width: 1279.98px) {
  .primary-nav {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .no-js .menu-toggle {
    display: none;
  }
}

@media (max-width: 1199.98px) {
  .game-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .article-wrap {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: var(--sp-6);
  }
}

@media (max-width: 1023.98px) {
  .fact {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-2);
  }

  .fact-arrow {
    display: none;
  }

  .catalog,
  .providers-wrap,
  .categories-wrap {
    padding: var(--sp-5);
  }

  .provider-panel {
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: var(--sp-5);
    padding: var(--sp-5);
  }

  .app {
    padding: var(--sp-6);
  }

  .footer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .article-wrap {
    grid-template-columns: minmax(0, 1fr);
    max-width: var(--read-width);
    margin-inline: auto;
  }

  .toc {
    position: static;
    max-height: none;
    padding: 0;
  }

  .toc summary {
    padding: var(--sp-4) var(--sp-5);
    cursor: pointer;
    min-height: 56px;
    display: flex;
    align-items: center;
  }

  .toc-title {
    width: 100%;
  }

  .toc-title svg {
    display: block;
  }

  .toc[open] .toc-title svg {
    transform: rotate(180deg);
  }

  .toc ol {
    margin: 0;
    padding: 0 var(--sp-3) var(--sp-4);
  }
}

@media (max-width: 899.98px) {
  .game-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .catalog-controls {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .catalog-controls .field-search {
    grid-column: 1 / -1;
  }

  .hero-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    flex: 1;
  }

  .app {
    grid-template-columns: minmax(0, 1fr);
  }

  .app-art {
    order: 2;
  }

  .app-art img {
    max-width: 420px;
  }
}

@media (max-width: 767.98px) {
  .header-actions .btn {
    display: none;
  }

  .brand img {
    height: 22px;
  }

  .hero {
    padding-top: var(--sp-4);
  }

  .hero-bar {
    padding: var(--sp-4);
  }

  .hero-title {
    font-size: var(--fs-md);
  }

  .facts {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--sp-2);
  }

  .fact {
    min-height: 64px;
    padding: var(--sp-3) var(--sp-4);
  }

  .notice {
    grid-template-columns: minmax(0, 1fr);
    padding: var(--sp-4);
  }

  .notice-tag {
    justify-self: start;
  }

  .provider-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .provider-art {
    display: none; /* decorative â€” keep the game choices first on small screens */
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--sp-5);
  }

  .footer-band {
    flex-direction: column;
    align-items: flex-start;
  }

  .band-note {
    flex: none;
  }

  .js .rail-btn {
    display: none; /* swipe on touch screens; arrows return at tablet width */
  }

  .app-art img {
    max-width: 320px;
  }
}

@media (max-width: 640px) {
  .hero-frame {
    border-radius: var(--r-lg);
  }

  .hero-media {
    aspect-ratio: 1 / 1; /* square artwork (v2) is served at this width */
  }
}

@media (max-width: 559.98px) {
  .game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--sp-3);
  }

  .catalog,
  .providers-wrap,
  .categories-wrap,
  .app {
    padding: var(--sp-4);
    border-radius: var(--r-lg);
  }

  .catalog-controls {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .catalog-controls .field-provider {
    grid-column: 1;
  }

  .provider-panel {
    padding: var(--sp-4);
    border-radius: var(--r-lg);
  }

  .provider-actions .btn {
    width: 100%;
  }

  .logo-tab {
    width: 112px;
    height: 56px;
  }

  .logo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--sp-2);
  }

  .logo-tile {
    height: 56px;
    padding: var(--sp-2);
  }

  .app-actions .btn {
    width: 100%;
  }

  .game-body {
    padding: var(--sp-2) var(--sp-3) var(--sp-3);
  }
}

@media (max-width: 379.98px) {
  .catalog-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .catalog-controls .btn {
    width: 100%;
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- 19. Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- 20. Print ---------- */
@media print {
  .site-header,
  .category-bar,
  .bottom-bar,
  .drawer,
  #games,
  #providers,
  #categories,
  #app {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .prose {
    color: #000;
  }
}
