@import url("./tokens.css");

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

/* ═══════════════════════════════════════════════════════════
   ROOM: epic but ordered — wood base → lattice → light → vignette
   Hierarchy keeps chrome readable without flattening the mood.
   ═══════════════════════════════════════════════════════════ */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background: #080503;
  min-height: 100%;
}

/* Layer 1: deep wood + large diamonds */
html::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-color: #100b07;
  background-image:
    var(--diamonds-lg),
    var(--wood),
    linear-gradient(165deg, #22160f 0%, #14100b 42%, #0c0805 78%, #070504 100%);
  background-size:
    180px 180px,
    360px 360px,
    auto;
  background-position: 50% 0, 0 0, 0 0;
}

/* Layer 2: grit + sparse embers (overlay, not screen-wash) */
html::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    var(--embers),
    var(--grain-coarse),
    var(--dust);
  background-size:
    280px 280px,
    220px 220px,
    200px 200px;
  opacity: 0.42;
  mix-blend-mode: soft-light;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--bone);
  font: 500 16px/1.65 var(--font-body);
  background: transparent;
  /* Layer 3: lamp + hearths only (no competing plank noise) */
  background-image:
    radial-gradient(ellipse 95% 55% at 50% -10%, rgba(255, 150, 40, 0.24), transparent 56%),
    radial-gradient(ellipse 50% 60% at -8% 90%, rgba(180, 70, 18, 0.2), transparent 52%),
    radial-gradient(ellipse 50% 60% at 108% 85%, rgba(160, 60, 14, 0.16), transparent 52%),
    radial-gradient(ellipse 75% 40% at 50% 108%, rgba(100, 48, 14, 0.28), transparent 55%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  position: relative;
}

/* Layer 4: tight table lattice + fine grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    var(--diamonds),
    var(--grain);
  background-size:
    72px 72px,
    150px 150px;
  opacity: 0.55;
  mix-blend-mode: soft-light;
}

/* Layer 5: stage beam + deep vignette (content sits in the lit middle) */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 48% 50% at 50% 26%, rgba(255, 175, 55, 0.12), transparent 58%),
    radial-gradient(ellipse 100% 85% at 50% 50%, transparent 32%, rgba(0, 0, 0, 0.42) 70%, rgba(0, 0, 0, 0.72) 100%);
  box-shadow:
    inset 0 0 120px 40px rgba(0, 0, 0, 0.48),
    inset 0 50px 90px -28px rgba(160, 80, 20, 0.12);
}

body > * {
  position: relative;
  z-index: 1;
}

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

a {
  color: var(--gold);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}

a:hover {
  color: var(--gold-soft);
}

.container {
  width: min(100% - (var(--gutter) * 2), var(--max));
  margin-inline: auto;
}

.container-wide {
  width: min(100% - (var(--gutter) * 2), var(--max-wide));
  margin-inline: auto;
}

:focus-visible {
  outline: 2px solid rgba(232, 184, 74, 0.75);
  outline-offset: 3px;
}

button,
.btn,
.filter-btn,
a {
  -webkit-tap-highlight-color: transparent;
}

/* ═══════════════════════════════════════════════════════════
   NAV: thick wooden menu bar (game client chrome, not sticky SaaS)
   ═══════════════════════════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(180deg, #322014 0%, #1e140e 55%, #160f0a 100%);
  border-bottom: 3px solid var(--wood-outer);
  box-shadow:
    0 2px 0 var(--brass-lo),
    0 1px 0 rgba(232, 197, 106, 0.12) inset,
    0 12px 28px rgba(0, 0, 0, 0.5);
  padding-top: env(safe-area-inset-top);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.3;
  background-image: var(--wood), var(--grain);
  background-size: 300px 300px, 130px 130px;
  mix-blend-mode: overlay;
}

.site-header::after {
  /* Brass rail line under header */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -5px;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--brass-lo) 15%,
    var(--brass-hi) 50%,
    var(--brass-lo) 85%,
    transparent 100%
  );
  opacity: 0.55;
  pointer-events: none;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 1.75rem;
  min-height: var(--nav-h);
  padding-block: 0.55rem;
  position: relative;
  z-index: 1;
}

.nav-brand {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  min-width: 0;
  margin-right: 0.25rem;
  line-height: 0;
}

.nav-brand:hover .nav-logo {
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.55));
  transform: translateY(-1px);
}

.nav-logo {
  display: block;
  height: var(--logo-h);
  width: auto;
  max-width: min(280px, 48vw);
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
  transition: filter var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  padding: 0;
  margin: 0;
  margin-left: auto;
}

/* Menu tabs: carved wood blocks, not ghost pills */
.nav-links a {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.95rem;
  border-radius: 8px 8px 6px 6px;
  color: #e8d8b8; /* light parchment on dark wood tabs */
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  border: 2px solid rgba(55, 34, 16, 0.9);
  background: linear-gradient(180deg, #2e1e14 0%, #1a120c 100%);
  min-height: 42px;
  box-shadow:
    inset 0 1px 0 rgba(255, 210, 140, 0.08),
    0 2px 0 rgba(0, 0, 0, 0.45);
  transition:
    color var(--dur) var(--ease),
    background var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    transform var(--dur) var(--ease);
}

.nav-links a:hover {
  color: #f7edd8;
  border-color: rgba(120, 80, 36, 0.75);
  background: linear-gradient(180deg, #3a2818 0%, #22160e 100%);
  transform: translateY(-1px);
}

.nav-links a[aria-current="page"] {
  color: #2a1808;
  background: linear-gradient(180deg, #e8c56a 0%, #c48a28 55%, #a06c18 100%);
  border-color: #5a3a12;
  box-shadow:
    inset 0 1px 0 rgba(255, 245, 200, 0.45),
    0 2px 0 #3a240c;
  text-shadow: 0 1px 0 rgba(255, 230, 160, 0.3);
}

/* Purchase = raised brass stone (Shopify CTA) */
.nav-links a.nav-purchase,
.nav-links a[href*="shop.doginaldogs.com"] {
  color: #2a1808;
  background: linear-gradient(180deg, #f0d080 0%, #d4a02c 45%, #a66e18 100%);
  border-color: #5c3a10;
  box-shadow:
    inset 0 2px 0 rgba(255, 245, 200, 0.45),
    inset 0 -2px 0 rgba(80, 45, 8, 0.3),
    0 3px 0 #3a2208;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.82rem;
}

.nav-links a.nav-purchase:hover,
.nav-links a[href*="shop.doginaldogs.com"]:hover {
  color: #2a1808;
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow:
    inset 0 2px 0 rgba(255, 245, 200, 0.5),
    0 4px 0 #3a2208;
}

.nav-toggle {
  display: none;
  width: var(--tap);
  height: var(--tap);
  border-radius: 8px;
  border: 2px solid rgba(90, 55, 24, 0.8);
  background: linear-gradient(180deg, #2e1e14, #1a120c);
  color: var(--bone);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 200, 120, 0.08);
}

.nav-toggle:hover {
  border-color: rgba(180, 130, 50, 0.5);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Footer — flat black (no wood / diamond texture band) ── */
.site-footer {
  margin-top: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: #050403;
  padding: 2.5rem 0 max(2rem, env(safe-area-inset-bottom));
  box-shadow: none;
  position: relative;
}

.site-footer::before {
  display: none;
  content: none;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  position: relative;
  z-index: 1;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: #e0cba8;
  font-size: 0.9rem;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.footer-brand img {
  height: 52px;
  width: auto;
  opacity: 0.95;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.45));
}

.footer-socials {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.05rem;
  min-height: var(--tap);
  border-radius: 8px;
  border: 2px solid rgba(90, 55, 24, 0.7);
  background: linear-gradient(180deg, #2a1c12, #1a120c);
  color: var(--bone);
  font-weight: 700;
  font-size: 0.88rem;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 210, 140, 0.06);
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.social-link:hover {
  border-color: rgba(180, 130, 50, 0.5);
  color: var(--gold-soft);
}

/* X / Twitter brand follow control (sitewide footers + community) */
.btn-x-follow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 40px;
  padding: 0.5rem 1.05rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #000;
  color: #fff;
  font-family: var(--font-ui, system-ui, sans-serif);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.4);
  transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.btn-x-follow:hover {
  background: #141414;
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
  transform: translateY(-1px);
}

.btn-x-follow:active {
  transform: translateY(0);
}

.btn-x-follow .x-logo {
  flex: none;
  display: block;
}

.btn-x-follow-sm {
  min-height: 36px;
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  gap: 0.4rem;
  border-radius: 8px;
}

.footer-copy {
  width: 100%;
  margin-top: 1.35rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(80, 50, 24, 0.5);
  color: #c9b090;
  font-size: 0.8rem;
  text-align: center;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

/* ── Page ── */
.page-main {
  padding-block: clamp(1.5rem, 3.5vw, 2.5rem) 1.25rem;
}

/* Shared marketing page titles over textured room */
.page-main > .library-hero h1,
.page-main > .decks-hero h1,
.page-main > .howto-hero h1,
.library-hero h1,
.decks-hero h1,
.howto-hero h1 {
  text-shadow:
    0 3px 0 #120804,
    0 4px 16px rgba(0, 0, 0, 0.55);
}

.library-hero .lead,
.decks-hero .lead,
.howto-hero .lead {
  color: var(--dim);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -100px;
  z-index: 300;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  background: var(--gold);
  color: #1a0a00;
  font-weight: 700;
  font-size: 0.9rem;
}
.skip-link:focus {
  top: max(0.75rem, env(safe-area-inset-top));
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #f0c85a;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7), 0 0 8px rgba(0, 0, 0, 0.35);
}

.eyebrow::before {
  content: "";
  width: 12px;
  height: 3px;
  background: linear-gradient(90deg, var(--ember), var(--brass-hi));
  border-radius: 1px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
}

h1,
.h1 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.06;
  color: #f8e6a8;
  text-shadow:
    0 3px 0 #120804,
    0 1px 0 rgba(255, 230, 160, 0.15),
    0 4px 14px rgba(0, 0, 0, 0.55);
}

h2,
.h2 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #f8e6a8;
  line-height: 1.15;
  text-shadow: 0 2px 0 #120804, 0 3px 12px rgba(0, 0, 0, 0.5);
}

h3,
.h3 {
  font-family: var(--font-ui);
  font-weight: 500;
  color: var(--bone);
  letter-spacing: 0.01em;
}

.lead {
  color: var(--dim);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--text-prose);
  line-height: var(--text-prose-lh);
  max-width: 52ch;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* ═══════════════════════════════════════════════════════════
   BUTTONS: dimensional game stones (not flat SaaS pills)
   ═══════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem 0.85rem;
  border-radius: var(--radius-btn);
  border: 2px solid transparent;
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  text-decoration: none;
  min-height: 48px;
  user-select: none;
  text-transform: uppercase;
  transition:
    transform var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease),
    filter var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.35;
  pointer-events: none;
  background-image: var(--grain);
  background-size: 100px 100px;
  mix-blend-mode: multiply;
}

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

.btn:focus-visible {
  outline: 2px solid rgba(232, 184, 74, 0.8);
  outline-offset: 3px;
}

.btn-primary {
  color: #2a1608;
  background: linear-gradient(
    180deg,
    #ffe9a8 0%,
    #e8c050 28%,
    #c48a28 58%,
    #9a6414 100%
  );
  border-color: #5c3a10;
  box-shadow:
    inset 0 2px 0 rgba(255, 250, 220, 0.55),
    inset 0 -3px 0 rgba(90, 50, 10, 0.35),
    0 4px 0 #3a2208,
    0 6px 14px rgba(0, 0, 0, 0.4);
  text-shadow: 0 1px 0 rgba(255, 240, 180, 0.35);
}

.btn-primary:hover {
  color: #2a1608;
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow:
    inset 0 2px 0 rgba(255, 250, 220, 0.6),
    inset 0 -3px 0 rgba(90, 50, 10, 0.3),
    0 5px 0 #3a2208,
    0 8px 16px rgba(0, 0, 0, 0.4);
}

.btn-primary:active {
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.25),
    0 1px 0 #3a2208;
}

.btn-ghost {
  color: var(--gold-soft);
  background: linear-gradient(180deg, #3a2818 0%, #24170f 55%, #1a120c 100%);
  border-color: #5a3a18;
  box-shadow:
    inset 0 1px 0 rgba(255, 210, 140, 0.12),
    inset 0 -2px 0 rgba(0, 0, 0, 0.35),
    0 3px 0 #0e0a06,
    0 4px 10px rgba(0, 0, 0, 0.35);
}

.btn-ghost:hover {
  color: var(--gold-soft);
  border-color: var(--brass-edge);
  background: linear-gradient(180deg, #4a321c 0%, #2e1e14 100%);
  transform: translateY(-1px);
}

.btn-coming,
.btn[disabled],
.btn:disabled {
  color: var(--muted);
  background: linear-gradient(180deg, #2a1c12, #1a120c);
  border: 2px solid rgba(90, 55, 24, 0.45);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.8;
  text-transform: none;
  letter-spacing: 0.02em;
}

.btn-coming:hover,
.btn[disabled]:hover {
  color: var(--muted);
  transform: none;
  filter: none;
}

.btn-coming .soon-tag {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--flame);
  margin-left: 0.3rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

@media (max-width: 600px) {
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

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

/* ═══════════════════════════════════════════════════════════
   PANEL / PLAQUE: multi-layer wood frame (game UI container)
   Outer dark wood → brass hairline → inner content well
   ═══════════════════════════════════════════════════════════ */
.panel {
  --plaque-r: 14px;
  position: relative;
  padding: clamp(1.2rem, 2.5vw, 1.7rem);
  border-radius: var(--plaque-r);
  border: 3px solid var(--wood-outer);
  /* Slightly darker fill so body text wins over room texture */
  background:
    linear-gradient(165deg, #2a1c12 0%, #1a120c 48%, #120c08 100%);
  box-shadow:
    0 0 0 1px #0a0705,
    0 8px 0 rgba(0, 0, 0, 0.28),
    0 16px 36px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(232, 197, 106, 0.12),
    inset 0 -2px 0 rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

/* Inner brass frame ring */
.panel::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: calc(var(--plaque-r) - 4px);
  border: 1px solid rgba(166, 124, 40, 0.4);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.35),
    inset 0 0 30px rgba(0, 0, 0, 0.2);
  pointer-events: none;
  z-index: 1;
}

/* Wood grain + wear */
.panel::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0.32;
  background-image: var(--wood), var(--grain);
  background-size: 280px 280px, 130px 130px;
  mix-blend-mode: overlay;
  z-index: 0;
}

.panel > * {
  position: relative;
  z-index: 2;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.65rem;
}

.section-head h2,
.section-head .h2 {
  font-size: clamp(1.65rem, 3vw, 2.15rem);
  margin-top: 0.35rem;
}

.section-head p {
  color: var(--dim);
  max-width: 46ch;
  line-height: 1.55;
}

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

/* Shared page-title banner (game style) */
.page-banner {
  display: inline-block;
  padding: 0.55rem 1.35rem 0.65rem;
  margin-bottom: 0.75rem;
  border-radius: 8px;
  border: 2px solid #5a3a14;
  background: linear-gradient(180deg, #3a2818 0%, #24170f 100%);
  box-shadow:
    0 3px 0 #120c08,
    inset 0 1px 0 rgba(232, 197, 106, 0.15);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: 0.05em;
  color: var(--gold-soft);
  text-shadow: 0 2px 0 #1a0c04;
  position: relative;
}

.page-banner::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(166, 124, 40, 0.25);
  border-radius: 5px;
  pointer-events: none;
}

/* ── Responsive ── */
@media (max-width: 1100px) {
  :root {
    --nav-h: 88px;
    --logo-h: 70px;
  }
}

@media (max-width: 900px) {
  :root {
    --nav-h: 82px;
    --logo-h: 64px;
  }

  .nav {
    gap: 1rem;
    padding-block: 0.5rem;
  }

  .nav-logo {
    max-width: min(240px, 46vw);
  }

  .nav-links a {
    padding: 0.48rem 0.75rem;
    font-size: 0.84rem;
  }
}

@media (max-width: 720px) {
  :root {
    --nav-h: 76px;
    --logo-h: 56px;
  }

  .nav {
    padding-block: 0.45rem;
    gap: 0.75rem;
  }

  .nav-brand {
    margin-right: 0;
    max-width: calc(100% - 3.75rem);
  }

  .nav-logo {
    max-width: min(220px, 58vw);
  }

  .nav-toggle {
    display: inline-flex;
    flex: none;
  }

  /* Compact centered menu sheet — equal-width gold/wood tabs */
  .nav-links {
    position: absolute;
    top: 100%;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: 100vw;
    max-width: 100vw;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
    margin-left: 0;
    padding:
      0.85rem
      max(1.1rem, env(safe-area-inset-right))
      1rem
      max(1.1rem, env(safe-area-inset-left));
    background: linear-gradient(180deg, #1e140e 0%, #14100b 55%, #0e0a07 100%);
    border-bottom: 2px solid rgba(90, 60, 28, 0.85);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55);
    display: none;
    z-index: 120;
  }

  .nav-links.open {
    display: flex;
  }

  body.nav-open {
    overflow: hidden;
  }

  .nav-links li {
    width: min(100%, 17.5rem);
    list-style: none;
    display: flex;
    justify-content: center;
  }

  .nav-links a {
    width: 100%;
    justify-content: center;
    padding: 0.72rem 1.1rem;
    min-height: 46px;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: none;
    border-radius: 10px;
  }

  /* Match other tabs on mobile — no oversized uppercase PLAY BETA slab */
  .nav-links a[href="/play"],
  .nav-links a[href="/play/"] {
    margin-top: 0;
    font-size: 0.92rem;
    letter-spacing: 0.04em;
    text-transform: none;
    min-height: 46px;
    padding: 0.72rem 1.1rem;
  }

  .page-main {
    padding-block: 1.3rem 1rem;
  }

  .site-footer {
    margin-top: 3rem;
    padding: 1.75rem 0 max(1.5rem, env(safe-area-inset-bottom));
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-brand {
    flex-direction: column;
    gap: 0.55rem;
  }

  .footer-socials {
    justify-content: center;
  }

  .btn {
    min-height: var(--tap);
  }
}

@media (max-width: 420px) {
  :root {
    --nav-h: 70px;
    --logo-h: 50px;
  }

  body {
    font-size: 15px;
  }

  .nav-logo {
    max-width: min(200px, 62vw);
  }
}

@media (min-width: 1400px) {
  :root {
    --max: 1200px;
    --nav-h: 98px;
    --logo-h: 80px;
  }
}
