/* =========================================================
   Mahjong Pairs — Felt-table landing
   Deep forest green + cream parchment + 3D tile depth
   ========================================================= */

:root {
  --felt-deep: #0a241c;
  --felt: #123528;
  --felt-mid: #1a4731;
  --felt-light: #245c42;
  --lime: #4ade80;
  --lime-deep: #22c55e;
  --gold: #e8c547;
  --gold-soft: #f0d87a;
  --gold-edge: #c9a227;
  --cream: #f8f5e4;
  --cream-deep: #ebe4c9;
  --ink: #0f2a22;
  --ink-soft: #2a4a3c;
  --tile-face: #fffcf5;
  --tile-side: #1e4a38;
  --white: #ffffff;
  --glass: rgba(8, 28, 22, 0.72);
  --border-gold: rgba(232, 197, 71, 0.55);
  --shadow-tile: 0 12px 28px rgba(0, 0, 0, 0.35);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-pill: 999px;
  --font-sans: "Sofia Sans", system-ui, sans-serif;
  --font-serif: "Cormorant Garamond", Georgia, serif;
  --dock-h: 88px;
  --hud-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

/* Light mode: cream table, green ink */
body.theme-light {
  --felt-deep: #e8f0ea;
  --felt: #f3f7f4;
  --felt-mid: #dce8e1;
  --felt-light: #c5d9cd;
  --cream: #ffffff;
  --cream-deep: #f0ebe0;
  --ink: #0f2a22;
  --ink-soft: #3d5c4e;
  --glass: rgba(255, 255, 255, 0.88);
  --border-gold: rgba(180, 140, 40, 0.45);
  --shadow-tile: 0 12px 28px rgba(18, 53, 40, 0.12);
  color-scheme: light;
}

body.theme-light .hero-title .title-cream,
body.theme-light .section-head h2,
body.theme-light .eyebrow:not(.dark) {
  color: var(--ink);
}

body.theme-light .hero-tagline,
body.theme-light .section-head h2 + *,
body.theme-light .footer-copy,
body.theme-light .footer-links a,
body.theme-light .hud-links a {
  color: var(--ink-soft);
}

body.theme-light .brand-text strong {
  color: var(--ink);
}

body.theme-light .brand-text small {
  color: var(--ink-soft);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--hud-h) + 16px);
  scroll-padding-bottom: calc(var(--dock-h) + 16px);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 500;
  color: var(--cream);
  background: var(--felt-deep);
  line-height: 1.55;
  overflow-x: hidden;
  padding-bottom: calc(var(--dock-h) + 24px);
  -webkit-font-smoothing: antialiased;
}

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

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
  padding: 12px 18px;
  background: var(--lime);
  color: var(--ink);
  font-weight: 700;
  border-radius: 0 0 8px 0;
}

.skip-link:focus {
  left: 0;
}

/* ---------- Felt background ---------- */
.felt-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 50% 35%, var(--felt-mid) 0%, transparent 60%),
    radial-gradient(ellipse 100% 100% at 50% 100%, #061a14 0%, transparent 50%),
    linear-gradient(165deg, var(--felt) 0%, var(--felt-deep) 55%, #061510 100%);
}

.felt-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.leaf {
  position: absolute;
  width: 28px;
  height: 14px;
  background: linear-gradient(135deg, #3d9b5f, #1a5c38);
  border-radius: 0 80% 0 80%;
  opacity: 0.45;
  animation: drift 18s var(--ease) infinite;
}

.leaf-1 { top: 18%; left: 8%; animation-delay: 0s; }
.leaf-2 { top: 55%; right: 12%; width: 36px; height: 18px; animation-delay: -6s; }
.leaf-3 { bottom: 22%; left: 22%; animation-delay: -11s; }

.bokeh {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.25;
}

.b1 {
  width: 220px;
  height: 220px;
  background: var(--gold);
  top: 10%;
  right: 15%;
}

.b2 {
  width: 180px;
  height: 180px;
  background: var(--lime);
  bottom: 20%;
  left: 10%;
  opacity: 0.15;
}

@keyframes drift {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(24px, -30px) rotate(18deg); }
}

/* ---------- HUD header ---------- */
.hud {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 12px 16px 0;
  transition: padding 0.25s var(--ease);
}

.hud.is-stuck {
  padding-top: 8px;
}

.hud-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 14px 10px 12px;
  background: var(--glass);
  border: 1.5px solid var(--border-gold);
  border-radius: var(--radius-pill);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
  transition: box-shadow 0.25s var(--ease);
}

.hud.is-stuck .hud-inner {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

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

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 2px solid var(--gold-edge);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gold-soft);
  letter-spacing: 0.02em;
}

.brand-text small {
  font-size: 0.7rem;
  color: rgba(248, 245, 228, 0.55);
  font-weight: 500;
}

.hud-links {
  display: none;
  list-style: none;
  margin: 0 auto;
  padding: 0;
  gap: 4px;
}

.hud-links a {
  display: block;
  padding: 8px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(248, 245, 228, 0.75);
  border-radius: var(--radius-pill);
  transition: color 0.2s, background 0.2s;
}

.hud-links a:hover,
.hud-links a:focus-visible {
  color: var(--cream);
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

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

.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--border-gold);
  color: var(--gold);
  display: grid;
  place-items: center;
  transition: background 0.2s, transform 0.2s;
}

.theme-toggle:hover {
  background: rgba(232, 197, 71, 0.12);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 2px;
}

.theme-toggle .icon-moon { display: none; }
body.theme-light .theme-toggle .icon-sun { display: none; }
body.theme-light .theme-toggle .icon-moon { display: block; }

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

.btn-withdraw {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: linear-gradient(180deg, #6ee7a0 0%, var(--lime-deep) 100%);
  color: #06351f;
  font-weight: 800;
  font-size: 0.9rem;
  border-radius: var(--radius-pill);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  box-shadow:
    0 4px 0 #15803d,
    0 8px 20px rgba(34, 197, 94, 0.35);
  transition: transform 0.15s var(--ease), box-shadow 0.15s;
}

.btn-withdraw:hover {
  transform: translateY(-1px);
  box-shadow:
    0 5px 0 #15803d,
    0 10px 24px rgba(34, 197, 94, 0.4);
}

.btn-withdraw:active {
  transform: translateY(2px);
  box-shadow:
    0 1px 0 #15803d,
    0 4px 12px rgba(34, 197, 94, 0.3);
}

.btn-withdraw svg {
  width: 16px;
  height: 16px;
}

.nav-burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 10px;
  border-radius: 12px;
  border: 1.5px solid var(--border-gold);
}

.nav-burger span {
  display: block;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

.nav-burger.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-burger.is-open span:nth-child(2) {
  opacity: 0;
}

.nav-burger.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 899px) {
  .hud-links {
    display: flex;
    position: absolute;
    top: calc(100% + 8px);
    left: 16px;
    right: 16px;
    flex-direction: column;
    padding: 12px;
    background: var(--glass);
    border: 1.5px solid var(--border-gold);
    border-radius: var(--radius-md);
    backdrop-filter: blur(16px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  }

  .hud-links.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .hud {
    position: sticky;
  }

  .hud-inner {
    position: relative;
  }
}

@media (min-width: 900px) {
  .hud-links {
    display: flex;
  }

  .nav-burger {
    display: none;
  }

  .btn-withdraw span {
    display: inline;
  }
}

@media (max-width: 480px) {
  .brand-text small {
    display: none;
  }

  .btn-withdraw span {
    display: none;
  }

  .btn-withdraw {
    padding: 10px 12px;
  }
}

/* ---------- Hero ---------- */
.hero {
  min-height: calc(100svh - var(--hud-h) - var(--dock-h));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px 48px;
}

.hero-stage {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 28px;
}

.tile-orbit {
  position: relative;
  width: min(320px, 78vw);
  height: 180px;
  margin-bottom: 8px;
}

.mj-tile {
  position: absolute;
  width: 72px;
  height: 92px;
  background: var(--tile-face);
  border-radius: 10px;
  border: 2px solid #e8e4d8;
  box-shadow:
    0 6px 0 var(--tile-side),
    var(--shadow-tile);
  display: grid;
  place-items: center;
  transition: transform 0.35s var(--ease);
}

.mj-tile:hover {
  transform: translateY(-6px) !important;
}

.mj-face {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
}

.mj-face.bamboo { color: #1a7a3c; }
.mj-face.east { color: #1e40af; }
.mj-face.circle { color: #b91c1c; font-size: 2rem; }
.mj-face.plum { color: #be185d; }

.t1 { left: 8%; top: 28%; transform: rotate(-12deg); z-index: 1; }
.t2 { left: 32%; top: 8%; transform: rotate(6deg); z-index: 2; }
.t3 { right: 28%; top: 22%; transform: rotate(-4deg); z-index: 1; }
.t4 { right: 6%; top: 4%; transform: rotate(10deg); z-index: 3; }

.mj-tile.glow {
  box-shadow:
    0 6px 0 var(--tile-side),
    0 0 0 3px rgba(56, 189, 248, 0.7),
    0 0 28px rgba(56, 189, 248, 0.45),
    var(--shadow-tile);
  animation: tile-pulse 2.4s ease-in-out infinite;
}

.match-trail {
  position: absolute;
  inset: 20% 15%;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--gold);
  border-right-color: rgba(232, 197, 71, 0.3);
  animation: spin-trail 8s linear infinite;
  opacity: 0.7;
  pointer-events: none;
}

@keyframes tile-pulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.08); }
}

@keyframes spin-trail {
  to { transform: rotate(360deg); }
}

.hero-brand-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.hero-app-icon {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 22px;
  border: 3px solid var(--gold-edge);
  box-shadow:
    0 0 0 4px rgba(232, 197, 71, 0.2),
    0 16px 40px rgba(0, 0, 0, 0.4);
}

/* Banner showcase (below gallery) */
.banner-frame {
  margin: 0 auto;
  max-width: 720px;
  padding: 0;
}

.showcase-banner {
  width: 100%;
  height: auto;
  aspect-ratio: 1024 / 500;
  object-fit: contain;
  display: block;
  border-radius: 20px;
  border: 3px solid var(--gold-edge);
  box-shadow:
    0 0 0 4px rgba(232, 197, 71, 0.15),
    0 20px 48px rgba(0, 0, 0, 0.4);
  background: #0a1a28;
}

.hero-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(2.6rem, 8vw, 3.75rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.01em;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.28em;
}

.title-gold {
  background: linear-gradient(180deg, #fff4b0 0%, var(--gold) 45%, #b8860b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 0 #0a241c) drop-shadow(0 0 20px rgba(232, 197, 71, 0.35));
}

.title-cream {
  color: var(--cream);
  text-shadow: 0 2px 0 #0a241c, 0 0 24px rgba(0, 0, 0, 0.4);
}

.hero-tagline {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: rgba(248, 245, 228, 0.78);
  max-width: 28ch;
}

/* Parchment cards */
.parchment {
  position: relative;
  background: linear-gradient(165deg, var(--cream) 0%, var(--cream-deep) 100%);
  color: var(--ink);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow:
    0 4px 0 #c4b896,
    0 16px 40px rgba(0, 0, 0, 0.3);
}

.hero-card {
  width: 100%;
  max-width: 480px;
}

.hero-card p {
  margin: 0 0 20px;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink-soft);
}

.cloud-corner {
  position: absolute;
  width: 48px;
  height: 48px;
  opacity: 0.2;
  background:
    radial-gradient(circle at 30% 50%, var(--felt-mid) 0 8px, transparent 9px),
    radial-gradient(circle at 55% 40%, var(--felt-mid) 0 10px, transparent 11px),
    radial-gradient(circle at 70% 60%, var(--felt-mid) 0 7px, transparent 8px);
}

.cloud-corner.tl { top: 8px; left: 8px; }
.cloud-corner.br { bottom: 8px; right: 8px; transform: rotate(180deg); }

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.btn-store {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--ink);
  color: var(--cream);
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  box-shadow: 0 4px 0 #062018;
  transition: transform 0.15s, background 0.2s;
}

.btn-store:hover {
  transform: translateY(-2px);
  background: #163d2e;
}

.btn-store:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #062018;
}

.btn-store:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}

.btn-store--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
  box-shadow: none;
}

.btn-store--ghost:hover {
  background: rgba(15, 42, 34, 0.08);
  transform: translateY(-2px);
}

.btn-store svg {
  width: 18px;
  height: 18px;
}

/* ---------- Sections ---------- */
.section {
  padding: 64px 20px;
  max-width: 1100px;
  margin: 0 auto;
}

.section-head {
  text-align: center;
  margin-bottom: 40px;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.eyebrow.dark {
  color: var(--gold-edge);
}

.section-head h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.85rem, 4vw, 2.6rem);
  font-weight: 700;
  color: var(--cream);
  line-height: 1.15;
}

/* ---------- Progress track (how to play) ---------- */
.progress-track {
  display: grid;
  gap: 16px;
  position: relative;
}

@media (min-width: 768px) {
  .progress-track {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
  }

  .progress-track::before {
    content: "";
    position: absolute;
    top: 28px;
    left: 8%;
    right: 8%;
    height: 4px;
    background: linear-gradient(90deg, var(--lime-deep), var(--felt-light) 40%, var(--felt-light));
    border-radius: 4px;
    z-index: 0;
  }
}

.progress-node {
  position: relative;
  z-index: 1;
  background: var(--glass);
  border: 1.5px solid rgba(76, 222, 128, 0.25);
  border-radius: var(--radius-md);
  padding: 20px 16px 18px;
  text-align: center;
  backdrop-filter: blur(8px);
  transition: border-color 0.25s, transform 0.25s var(--ease);
}

.progress-node:hover {
  transform: translateY(-4px);
  border-color: var(--lime);
}

.progress-node.is-done {
  border-color: rgba(76, 222, 128, 0.5);
}

.progress-node.is-active {
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.35), 0 0 24px rgba(56, 189, 248, 0.2);
}

.node-badge {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: 0 auto 12px;
  border-radius: 12px;
  background: var(--cream);
  color: var(--ink);
  font-weight: 800;
  font-size: 1rem;
  box-shadow: 0 3px 0 var(--tile-side);
}

.progress-node.is-done .node-badge {
  background: linear-gradient(180deg, #6ee7a0, var(--lime-deep));
  color: #06351f;
}

.progress-node.is-active .node-badge {
  background: #38bdf8;
  color: #0c4a6e;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.6);
}

.node-badge svg {
  width: 18px;
  height: 18px;
}

.progress-node h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--cream);
}

.progress-node p {
  margin: 0;
  font-size: 0.88rem;
  color: rgba(248, 245, 228, 0.65);
  line-height: 1.45;
}

body.theme-light .progress-node h3 {
  color: var(--ink);
}

body.theme-light .progress-node p {
  color: var(--ink-soft);
}

/* ---------- Feature stack (overlapping tiles) ---------- */
.feature-stack {
  position: relative;
  display: grid;
  gap: 20px;
  max-width: 720px;
  margin: 0 auto;
  padding: 12px 0 40px;
}

@media (min-width: 700px) {
  .feature-stack {
    min-height: 420px;
    display: block;
  }

  .feature-tile {
    position: absolute;
    width: min(300px, 42%);
  }

  .ft-1 { top: 0; left: 4%; transform: rotate(-4deg); z-index: 1; }
  .ft-2 { top: 20px; right: 6%; transform: rotate(5deg); z-index: 2; }
  .ft-3 { top: 210px; left: 10%; transform: rotate(3deg); z-index: 3; }
  .ft-4 { top: 230px; right: 2%; transform: rotate(-6deg); z-index: 4; }

  .feature-tile:hover {
    z-index: 10;
    transform: rotate(0deg) translateY(-8px) scale(1.03);
  }
}

.feature-tile {
  background: var(--tile-face);
  color: var(--ink);
  border-radius: 16px;
  padding: 22px 20px;
  border: 2px solid #ebe6d6;
  box-shadow:
    0 8px 0 var(--tile-side),
    var(--shadow-tile);
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
  cursor: default;
}

.feature-tile:hover {
  box-shadow:
    0 10px 0 var(--tile-side),
    0 20px 40px rgba(0, 0, 0, 0.35);
}

.ft-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--felt-mid), var(--felt));
  color: var(--gold);
  display: grid;
  place-items: center;
  margin-bottom: 12px;
}

.ft-icon svg {
  width: 22px;
  height: 22px;
}

.feature-tile h3 {
  margin: 0 0 6px;
  font-size: 1.15rem;
  font-weight: 800;
}

.feature-tile p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.45;
}

/* ---------- Gallery tray ---------- */
.gallery .section-head {
  margin-bottom: 28px;
}

.tile-tray {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 20px 16px;
  margin: 0 -4px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  background: rgba(6, 26, 20, 0.55);
  border: 2px solid var(--lime);
  border-radius: 24px;
  box-shadow:
    inset 0 2px 12px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(76, 222, 128, 0.2),
    0 12px 40px rgba(0, 0, 0, 0.25);
  scrollbar-width: thin;
  scrollbar-color: var(--lime) transparent;
}

body.theme-light .tile-tray {
  background: rgba(18, 53, 40, 0.08);
}

.phone-tile {
  flex: 0 0 auto;
  width: min(200px, 42vw);
  margin: 0;
  scroll-snap-align: center;
  border-radius: 18px;
  overflow: hidden;
  background: #0a1f18;
  border: 3px solid #0d2e22;
  box-shadow:
    0 6px 0 #0a241c,
    0 14px 28px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s var(--ease);
}

.phone-tile:hover {
  transform: translateY(-8px);
}

.phone-tile img {
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: top center;
}

/* ---------- Download ---------- */
.download {
  padding-bottom: 40px;
}

.download-panel {
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
  padding: 40px 28px;
}

.download-panel h2 {
  margin: 0 0 10px;
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  color: var(--ink);
}

.download-lead {
  margin: 0 0 24px;
  color: var(--ink-soft);
  font-weight: 600;
}

.download-panel .btn-store {
  background: var(--ink);
  color: var(--cream);
}

.download-panel .btn-store:last-child {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
  box-shadow: none;
}

.download-panel .btn-store:last-child:hover {
  background: rgba(15, 42, 34, 0.08);
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 40px 20px 24px;
  border-top: 1px solid rgba(232, 197, 71, 0.2);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gold-soft);
}

.footer-brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1.5px solid var(--gold-edge);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
}

.footer-links a {
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(248, 245, 228, 0.7);
  transition: color 0.2s;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--gold);
  outline: none;
}

.footer-copy {
  margin: 0;
  font-size: 0.8rem;
  color: rgba(248, 245, 228, 0.45);
}

/* ---------- Bottom dock ---------- */
.dock {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  display: flex;
  gap: 10px;
  padding: 10px 14px;
  background: var(--glass);
  border: 1.5px solid var(--border-gold);
  border-radius: var(--radius-pill);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.dock-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 2px solid var(--gold-edge);
  background: radial-gradient(circle at 40% 30%, #2a5c44, #0f2a22);
  color: var(--gold-soft);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: transform 0.2s var(--ease), box-shadow 0.2s;
  cursor: pointer;
}

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

.dock-btn:hover,
.dock-btn:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 0 16px rgba(232, 197, 71, 0.35);
  outline: none;
}

.dock-btn:active {
  transform: translateY(1px) scale(0.96);
}

.dock-cta {
  background: radial-gradient(circle at 40% 30%, #3d8b5c, #14532d);
  border-color: var(--lime);
}

.dock-btn.is-active {
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.7), 0 0 18px rgba(56, 189, 248, 0.35);
  border-color: #38bdf8;
}

.dock-plus {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--lime);
  color: #06351f;
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 900;
  display: grid;
  place-items: center;
  border: 2px solid var(--felt-deep);
}

@media (max-width: 400px) {
  .dock-btn span {
    display: none;
  }

  .dock-btn {
    width: 48px;
    height: 48px;
  }
}

/* ---------- Modal ---------- */
.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 16, 12, 0.72);
  backdrop-filter: blur(4px);
  cursor: pointer;
}

.modal-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  text-align: center;
  padding: 36px 28px 28px;
  animation: modal-in 0.3s var(--ease);
}

@keyframes modal-in {
  from { opacity: 0; transform: scale(0.92) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  transition: background 0.2s;
}

.modal-close:hover {
  background: rgba(15, 42, 34, 0.08);
}

.modal-close svg {
  width: 18px;
  height: 18px;
}

.modal-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--felt-mid), var(--felt));
  color: var(--gold);
  display: grid;
  place-items: center;
}

.modal-icon svg {
  width: 26px;
  height: 26px;
}

.modal-card h2 {
  margin: 0 0 8px;
  font-family: var(--font-serif);
  font-size: 1.75rem;
  color: var(--ink);
}

.modal-card p {
  margin: 0 0 22px;
  color: var(--ink-soft);
  font-weight: 600;
}

body.modal-open {
  overflow: hidden;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .leaf,
  .match-trail,
  .mj-tile.glow {
    animation: none !important;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
