/* ==========================================================================
   MapGuesser — site design system
   Brand palette taken from the Android app icon.
   ========================================================================== */

@font-face {
  font-family: "Fredoka";
  src: url("/assets/fonts/Fredoka.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("/assets/fonts/Nunito.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
}
@font-face {
  font-family: "Cairo";
  src: url("/assets/fonts/Cairo-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Cairo";
  src: url("/assets/fonts/Cairo-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Hind";
  src: url("/assets/fonts/Hind-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  --bg: #061033;
  --bg-2: #081741;
  --surface: #0a1a45;
  --surface-2: #0e2052;
  --surface-3: #142a66;
  --line: #223a78;
  --line-soft: rgba(108, 136, 196, 0.24);
  --text: #eaf1ff;
  --muted: #a8bee8;
  --muted-2: #7f95c7;
  --blue: #4c8dff;
  --blue-deep: #2a63d6;
  --sky: #4fd6f5;
  --lime: #4ed264;
  --sun: #ffc633;
  --coral: #ff4e63;
  --peach: #ffb25e;
  --purple: #8b7bff;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 24px 70px rgba(2, 8, 32, 0.55);
  --shadow-soft: 0 10px 30px rgba(2, 8, 32, 0.35);
  --header-h: 68px;
  --font-display: "Fredoka", "Nunito", system-ui, sans-serif;
  --font-body: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
  --wrap: 1180px;
}

[dir="rtl"] {
  --font-body: "Cairo", "Nunito", system-ui, sans-serif;
  --font-display: "Cairo", "Fredoka", system-ui, sans-serif;
}
:lang(hi) {
  --font-body: "Hind", "Nunito", system-ui, sans-serif;
}
:lang(zh), :lang(ja), :lang(ko) {
  --font-body: system-ui, "Noto Sans", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--text);
  background:
    radial-gradient(1100px 600px at 12% -8%, rgba(63, 123, 240, 0.28), transparent 60%),
    radial-gradient(900px 520px at 92% 4%, rgba(79, 214, 245, 0.12), transparent 55%),
    radial-gradient(900px 700px at 50% 110%, rgba(78, 210, 100, 0.07), transparent 60%),
    var(--bg);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image: radial-gradient(rgba(168, 190, 232, 0.16) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.55), transparent 70%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.55), transparent 70%);
}

img, svg { max-width: 100%; }
img { height: auto; }
a { color: var(--sky); text-decoration: none; }
a:hover { color: #9ce9ff; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  font-weight: 600;
}
h1 { font-size: clamp(2.1rem, 5.4vw, 4rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.3rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
ul { padding-inline-start: 1.2em; }
strong { color: #fff; }
::selection { background: var(--sun); color: #241a00; }

.wrap {
  width: min(100% - 40px, var(--wrap));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  z-index: 200;
  background: var(--sun);
  color: #1b1300;
  border-radius: 0 0 12px 0;
  font-weight: 800;
}
.skip-link:focus {
  width: auto;
  height: auto;
  padding: 12px 18px;
  margin: 0;
  overflow: visible;
  clip-path: none;
  top: 0;
  inset-inline-start: 0;
}

:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 3px;
  border-radius: 8px;
}

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 13px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.1;
  cursor: pointer;
  text-decoration: none;
  transition: filter 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn:hover { filter: brightness(1.05); text-decoration: none; }
.btn:active { filter: brightness(0.97); }
.btn-primary {
  color: #04143d;
  background: linear-gradient(180deg, #7fb0ff 0%, var(--blue) 55%, #2f6fe0 100%);
  box-shadow: 0 12px 30px rgba(76, 141, 255, 0.34), inset 0 1px 0 rgba(255,255,255,.45);
}
.btn-primary:hover { color: #04143d; }
.btn-sun {
  color: #2a1c00;
  background: linear-gradient(180deg, #ffe08a, var(--sun) 55%, #f0a900);
  box-shadow: 0 12px 30px rgba(255, 198, 51, 0.3), inset 0 1px 0 rgba(255,255,255,.5);
}
.btn-sun:hover { color: #2a1c00; }
.btn-ghost {
  color: var(--text);
  border-color: var(--line);
  background: rgba(20, 42, 102, 0.45);
}
.btn-ghost:hover { background: var(--surface-3); color: #fff; }
.btn-lg { min-height: 56px; padding: 17px 30px; font-size: 1.08rem; }
.btn-sm { min-height: 40px; padding: 9px 16px; font-size: 0.9rem; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sun);
  margin-bottom: 14px;
}
.lede { font-size: clamp(1.02rem, 1.5vw, 1.18rem); color: var(--muted); max-width: 62ch; }
.muted { color: var(--muted); }

/* ----------------------------------------------------------------- header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(6, 16, 51, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(34, 58, 120, 0.55);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: var(--header-h);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #fff;
  text-decoration: none;
  flex: none;
}
.brand:hover { color: #fff; }
.brand img { width: 36px; height: 36px; filter: drop-shadow(0 4px 10px rgba(0,0,0,.35)); }
.brand-word {
  font-family: var(--font-display);
  font-size: 1.42rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.01em;
  -webkit-text-stroke: 0.6px rgba(4, 20, 61, 0.25);
}
.brand-word span { color: var(--sun); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-inline-start: auto;
}
.site-nav a {
  color: var(--muted);
  padding: 9px 12px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
}
.site-nav a:not(.nav-cta):hover { color: #fff; background: rgba(20, 42, 102, 0.7); }
.site-nav a.active { color: #fff; background: rgba(76, 141, 255, 0.16); }
.site-nav .nav-cta {
  margin-inline-start: 8px;
  color: #04143d;
  background: linear-gradient(180deg, #7fb0ff, var(--blue));
  padding: 10px 16px;
  border-radius: 999px;
  transition: filter 0.2s ease;
}
.site-nav .nav-cta:hover {
  color: #04143d;
  background: linear-gradient(180deg, #93c1ff, #5f9dff);
}

.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-burger { display: none; cursor: pointer; padding: 10px; margin-inline-start: auto; }
.nav-burger span {
  display: block;
  width: 24px; height: 2.5px;
  background: var(--text);
  border-radius: 2px;
  margin: 5px 0;
  transition: transform .2s ease, opacity .2s ease;
}

.lang-switch { position: relative; flex: none; }
.lang-switch summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 700;
}
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch[open] summary { background: var(--surface-3); color: #fff; }
.lang-menu {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 8px);
  min-width: 190px;
  max-height: 340px;
  overflow: auto;
  background: #0b1c4c;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 6px;
  z-index: 60;
}
.lang-menu a {
  display: block;
  padding: 9px 12px;
  border-radius: 9px;
  color: var(--muted);
  font-weight: 600;
}
.lang-menu a:hover { background: var(--surface-3); color: #fff; }
.lang-menu a.current { color: var(--sun); background: rgba(255, 198, 51, 0.08); }

/* ------------------------------------------------------------------- hero */
.hero {
  position: relative;
  padding: clamp(44px, 7vw, 92px) 0 clamp(36px, 6vw, 72px);
  overflow: clip;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.hero h1 { margin-bottom: 18px; }
.hero h1 .hl {
  background: linear-gradient(100deg, var(--sun), #ffe9a8 45%, var(--peach));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .lede { margin-bottom: 26px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: var(--muted-2);
  font-size: 0.88rem;
  font-weight: 700;
}
.hero-trust span { display: inline-flex; align-items: center; gap: 6px; }
.hero-trust i { font-style: normal; color: var(--lime); }

.hero-art { position: relative; min-height: 460px; display: grid; place-items: center; }
.hero-glow {
  position: absolute;
  width: 78%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(76, 141, 255, 0.5), rgba(6, 16, 51, 0) 68%);
  filter: blur(10px);
}
.phone {
  position: relative;
  width: min(300px, 68%);
  aspect-ratio: 9 / 19;
  border-radius: 42px;
  background: linear-gradient(160deg, #16295e, #050d28);
  border: 1px solid rgba(168, 190, 232, 0.28);
  box-shadow: 0 40px 90px rgba(2, 6, 26, 0.7), inset 0 0 0 7px #030a22;
  padding: 9px;
  transform: rotate(-3deg);
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 34px; display: block; }
.float-card {
  position: absolute;
  background: rgba(10, 26, 69, 0.94);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 15px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(8px);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 3;
}
.float-card .big { display: block; font-family: var(--font-display); font-size: 1.1rem; color: #fff; }
.float-daily { top: 7%; inset-inline-start: 0; }
.float-streak { bottom: 9%; inset-inline-end: 0; }
.float-streak .flame { font-size: 1.5rem; }
.float-flag { top: 48%; inset-inline-end: 2%; }
.float-flag img { width: 38px; border-radius: 5px; box-shadow: 0 2px 8px rgba(0,0,0,.4); }

/* ------------------------------------------------------------------ cards */
section { padding: clamp(36px, 5.5vw, 72px) 0; }
.section-head { max-width: 720px; margin-bottom: clamp(22px, 3.5vw, 40px); }
.section-head p { color: var(--muted); margin-bottom: 0; }
.section-head.center { margin-inline: auto; text-align: center; }

.card {
  background: linear-gradient(170deg, rgba(20, 42, 102, 0.55), rgba(10, 26, 69, 0.85));
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: clamp(20px, 3vw, 30px);
  box-shadow: var(--shadow-soft);
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.mode-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 260px;
  padding: clamp(22px, 3vw, 34px);
  border-radius: 26px;
  overflow: hidden;
  color: #fff;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.mode-card:hover { transform: translateY(-4px); color: #fff; box-shadow: 0 30px 80px rgba(2,8,32,.7); }
.mode-card.guess {
  background:
    radial-gradient(420px 260px at 92% 10%, rgba(79, 214, 245, 0.5), transparent 62%),
    linear-gradient(150deg, #2b63cf 0%, #1a3a92 48%, #0d2260 100%);
}
.mode-card.draw {
  background:
    radial-gradient(420px 260px at 92% 10%, rgba(255, 198, 51, 0.4), transparent 62%),
    linear-gradient(150deg, #1d8f5d 0%, #146b52 48%, #0a3b3a 100%);
}
.mode-card .mode-icon {
  font-size: 2.2rem;
  width: 62px; height: 62px;
  display: grid; place-items: center;
  border-radius: 18px;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.22);
  margin-bottom: 18px;
  backdrop-filter: blur(4px);
}
.mode-card h3 { font-size: clamp(1.4rem, 2.6vw, 2rem); margin-bottom: 8px; }
.mode-card p { color: rgba(255,255,255,.86); margin-bottom: 18px; max-width: 40ch; }
.mode-card .mode-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: #fff;
}
.mode-card .mode-art {
  position: absolute;
  inset-inline-end: 8px;
  bottom: -10px;
  width: 150px;
  opacity: .95;
  filter: drop-shadow(0 16px 30px rgba(0,0,0,.35));
  pointer-events: none;
}

.daily-band {
  display: grid;
  grid-template-columns: 1.4fr auto;
  gap: 24px;
  align-items: center;
  padding: clamp(22px, 4vw, 38px);
  border-radius: 26px;
  background:
    radial-gradient(600px 240px at 8% 10%, rgba(255, 198, 51, 0.22), transparent 60%),
    linear-gradient(120deg, #10265f, #0a1a45 55%, #0a1540);
  border: 1px solid rgba(255, 198, 51, 0.28);
  box-shadow: var(--shadow);
}
.daily-band h2 { margin-bottom: 6px; }
.daily-band p { color: var(--muted); margin: 0; }
.daily-band .date-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 198, 51, 0.12);
  border: 1px solid rgba(255, 198, 51, 0.35);
  color: var(--sun);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.play-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.play-tile {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 132px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(14, 32, 82, 0.72);
  border: 1px solid var(--line-soft);
  color: var(--text);
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.play-tile:hover { transform: translateY(-3px); border-color: rgba(79, 214, 245, .5); background: rgba(20, 42, 102, .92); color: #fff; }
.play-tile .tile-icon { font-size: 1.7rem; }
.play-tile strong { font-family: var(--font-display); font-size: 1.05rem; }
.play-tile span { color: var(--muted); font-size: .86rem; }

.region-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.region-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(10, 26, 69, 0.7);
  border: 1px solid var(--line-soft);
  color: var(--text);
}
.region-card:hover { background: var(--surface-2); color: #fff; border-color: var(--line); }
.region-card .emoji { font-size: 1.5rem; }
.region-card span { color: var(--muted); font-size: .85rem; display: block; }

/* --------------------------------------------------------------- country */
.country-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 22px;
}
.searchbox {
  flex: 1 1 260px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 18px;
}
.searchbox input {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  padding: 13px 0;
  outline: none;
}
.searchbox input::placeholder { color: var(--muted-2); }

.country-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}
.country-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(10, 26, 69, 0.72);
  border: 1px solid var(--line-soft);
  color: var(--text);
  min-height: 64px;
}
.country-card:hover { background: var(--surface-2); border-color: var(--blue); color: #fff; transform: translateY(-2px); }
.country-card img {
  width: 40px;
  height: 27px;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,.4);
  flex: none;
  background: #12234f;
}
.country-card .cc-name { font-weight: 800; font-size: .93rem; line-height: 1.2; }
.country-card .cc-cap { color: var(--muted); font-size: .78rem; display: block; }

.country-hero {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: clamp(24px, 4vw, 52px);
  align-items: center;
  padding-top: clamp(26px, 4vw, 52px);
}
.country-hero .flag {
  width: min(260px, 70%);
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(0,0,0,.45);
  border: 1px solid rgba(255,255,255,.18);
  margin-bottom: 18px;
}
.country-hero h1 { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.country-hero h1 .iso {
  font-size: .9rem;
  letter-spacing: .12em;
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 8px;
  color: var(--muted);
}
.shape-card {
  display: grid;
  place-items: center;
  padding: 22px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 45%, rgba(76,141,255,.22), transparent 62%),
    rgba(10, 26, 69, 0.75);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}
.shape-card svg { width: 100%; height: auto; }
.shape-card path { fill: rgba(79, 214, 245, .22); stroke: var(--sky); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.shape-card .shape-label { margin-top: 10px; color: var(--muted); font-size: .82rem; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin: 18px 0 26px;
}
.stat {
  background: rgba(14, 32, 82, 0.7);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 14px 16px;
}
.stat .k { display: block; color: var(--muted); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 2px; }
.stat .v { font-family: var(--font-display); font-size: 1.22rem; color: #fff; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(20, 42, 102, 0.6);
  border: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: .83rem;
  font-weight: 700;
}
.chip img { width: 20px; height: 14px; object-fit: cover; border-radius: 2px; }

/* ------------------------------------------------------------------- FAQ */
.faq { max-width: 820px; }
.faq details {
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: rgba(10, 26, 69, 0.55);
  padding: 0 18px;
  margin-bottom: 10px;
}
.faq summary {
  cursor: pointer;
  font-weight: 800;
  padding: 16px 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--sun); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); margin: 0 0 16px; }

/* ------------------------------------------------------------------- app */
.app-cta {
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: 28px;
  align-items: center;
  border-radius: 28px;
  padding: clamp(24px, 4vw, 46px);
  background:
    radial-gradient(600px 300px at 90% 10%, rgba(79, 214, 245, 0.25), transparent 60%),
    linear-gradient(120deg, #0f2a6e, #0a1a45 60%, #081439);
  border: 1px solid rgba(79, 214, 245, 0.25);
  overflow: hidden;
}
.app-cta h2 { margin-bottom: 10px; }
.app-cta p { color: var(--muted); }
.app-cta .app-art { display: grid; place-items: center; }
.app-cta .app-art > img { width: min(210px, 60%); transform: rotate(4deg); filter: drop-shadow(0 24px 40px rgba(0,0,0,.5)); }
.app-cta .phone-cta {
  aspect-ratio: auto;
  width: min(230px, 72%);
  padding: 7px;
  border-radius: 30px;
  background: #0a1a45;
  border: 1px solid rgba(168, 190, 232, 0.3);
  box-shadow: 0 30px 70px rgba(2, 6, 26, 0.6);
  transform: rotate(1.5deg);
}
.app-cta .phone-cta img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 23px;
  display: block;
  background: #061033;
}
.play-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 12px;
  background: #061033;
  border: 1px solid var(--line);
  color: #fff;
  font-weight: 800;
  font-size: .9rem;
}
.play-badge:hover { color: #fff; border-color: var(--sky); background: #0b1c4c; }
.play-badge span[aria-hidden] { color: var(--lime); }

/* ---------------------------------------------------------------- footer */
.site-footer {
  margin-top: clamp(40px, 6vw, 90px);
  border-top: 1px solid rgba(34, 58, 120, .55);
  background: rgba(4, 11, 36, 0.7);
  padding: clamp(36px, 5vw, 62px) 0 24px;
  color: var(--muted);
  font-size: .92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 30px;
}
.site-footer h2 {
  font-family: var(--font-body);
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 12px;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: #fff; }
.footer-brand p { margin: 12px 0 16px; max-width: 34ch; }
.footer-brand .brand { margin-bottom: 4px; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(34, 58, 120, .4);
  margin-top: 34px;
  padding-top: 18px;
  color: var(--muted-2);
  font-size: .82rem;
}

/* ------------------------------------------------------------- utilities */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.4em; }
.prose ul { color: var(--muted); }
.prose p { color: var(--muted); }
.hr { height: 1px; background: var(--line-soft); border: 0; margin: 34px 0; }
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 18px; } .mt-3 { margin-top: 28px; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 6px; color: var(--muted-2); font-size: .84rem; padding-top: 20px; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs span { opacity: .6; }

.toc { display: grid; gap: 8px; margin: 18px 0 0; }
.toc a {
  display: block;
  padding: 10px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(10, 26, 69, .5);
  color: var(--muted);
  font-weight: 700;
}
.toc a:hover { color: #fff; border-color: var(--blue); }

/* ------------------------------------------------------------- responsive */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { min-height: 420px; order: -1; margin-bottom: 8px; }
  .phone { width: min(250px, 60%); }
  .play-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .region-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .country-hero { grid-template-columns: 1fr; }
  .country-hero .shape-card { order: -1; }
  .app-cta { grid-template-columns: 1fr; }
  .app-cta .app-art { order: -1; }
}

@media (max-width: 760px) {
  :root { --header-h: 60px; }
  body { font-size: 16px; }
  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px 20px 18px;
    background: rgba(6, 16, 51, 0.98);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .nav-toggle:checked ~ .site-nav { display: flex; }
  .nav-toggle:checked ~ .nav-burger span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .nav-toggle:checked ~ .nav-burger span:nth-child(2) { opacity: 0; }
  .nav-toggle:checked ~ .nav-burger span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
  .nav-burger { display: block; }
  .site-nav .nav-cta { margin: 8px 0 0; text-align: center; }
  .lang-switch { margin-inline-start: 0; }
  .lang-current { display: none; }
  .lang-switch summary { padding: 9px 10px; }
  .mode-grid { grid-template-columns: 1fr; }
  .mode-card { min-height: 220px; }
  .mode-card .mode-art { width: 110px; opacity: .55; }
  .daily-band { grid-template-columns: 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .country-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .hero-trust { font-size: .8rem; }
}

@media (max-width: 460px) {
  .wrap { width: min(100% - 28px, var(--wrap)); }
  .play-grid { grid-template-columns: 1fr; }
  .region-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .brand-word { font-size: 1.22rem; }
  .btn { width: 100%; }
  .hero-actions .btn { width: 100%; }
  .daily-band .btn { width: 100%; }
  .country-grid { grid-template-columns: 1fr 1fr; }
}

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

/* RTL: logical properties already handle most layout; flip decorative art. */
[dir="rtl"] .mode-card .mode-art { inset-inline-end: auto; inset-inline-start: 8px; }
[dir="rtl"] .phone { transform: rotate(3deg); }

/* Icon fallbacks (text glyphs render everywhere; emoji do not on every Linux). */
.mode-icon-img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  margin-bottom: 18px;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,.35));
}
.region-badge {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex: none;
  background: rgba(76,141,255,.18);
  border: 1px solid var(--line);
  color: var(--sky);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .82rem;
  letter-spacing: .04em;
}
.play-tile .tile-icon { font-family: var(--font-display); color: var(--sun); }

/* Visually hidden but available to screen readers. */
.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;
}
.nav-toggle:focus-visible + .nav-burger {
  outline: 3px solid var(--sky);
  outline-offset: 4px;
  border-radius: 8px;
}

/* Consent banner (only rendered when GA4_ID is configured). */
.consent {
  position: fixed;
  inset-inline: 16px;
  bottom: 16px;
  z-index: 120;
  max-width: 560px;
  margin-inline: auto;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(10, 26, 69, 0.97);
  box-shadow: var(--shadow);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.consent[hidden] { display: none; }
.consent p { margin: 0; font-size: .86rem; color: var(--muted); flex: 1 1 280px; }
.consent-actions { display: flex; gap: 8px; flex: none; }

/* ------------------------------------------------------------ explore atlas */
.explore-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 18px;
  align-items: start;
}
.explore-map-card {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #061033;
  box-shadow: var(--shadow-soft);
}
#explore-map {
  width: 100%;
  height: 560px;
  background: #061033;
}
.explore-search {
  position: absolute;
  top: 14px;
  inset-inline-start: 14px;
  z-index: 900;
  width: min(360px, calc(100% - 28px));
}
.explore-search .searchbox {
  background: rgba(10, 26, 69, 0.95);
  border-color: var(--line);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(8px);
}
.explore-results {
  margin-top: 6px;
  max-height: 280px;
  overflow: auto;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #0b1c4c;
  box-shadow: var(--shadow);
}
.explore-results[hidden] { display: none; }
.explore-results button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  text-align: start;
  cursor: pointer;
}
.explore-results button:hover, .explore-results button:focus-visible { background: var(--surface-3); }
.explore-results img { border-radius: 3px; flex: none; }
.explore-results small { margin-inline-start: auto; color: var(--muted); font-weight: 500; }
.explore-empty { margin: 0; padding: 10px; color: var(--muted); font-size: .88rem; }
.explore-panel {
  min-height: 220px;
  padding: 22px;
  border-radius: 22px;
  border: 1px solid var(--line-soft);
  background: linear-gradient(170deg, rgba(20, 42, 102, 0.6), rgba(10, 26, 69, 0.9));
  box-shadow: var(--shadow-soft);
}
.explore-panel .btn { margin-top: 6px; }
.explore-flag {
  display: block;
  width: 100%;
  max-height: 150px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  margin-bottom: 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}
.explore-panel h2 { font-size: 1.65rem; margin: 0 0 4px; }
.explore-panel .stat-grid { grid-template-columns: 1fr 1fr; }
.explore-noscript {
  position: absolute;
  inset-inline: 14px;
  bottom: 14px;
  z-index: 900;
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(10, 26, 69, 0.96);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: .86rem;
}
.explore-list {
  margin-top: 26px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--line-soft);
  background: rgba(10, 26, 69, 0.55);
}
.explore-list summary { cursor: pointer; font-weight: 800; }
.explore-map-card .leaflet-container {
  background: #061033;
  font-family: var(--font-body);
  outline: none;
}
.explore-map-card .leaflet-control-zoom {
  border: 1px solid var(--line) !important;
  border-radius: 12px !important;
  overflow: hidden;
  box-shadow: var(--shadow-soft) !important;
  margin: 12px !important;
}
.explore-map-card .leaflet-control-zoom a {
  background: rgba(10, 26, 69, 0.92) !important;
  color: var(--text) !important;
  border-bottom: 1px solid var(--line) !important;
  width: 34px !important;
  height: 34px !important;
  line-height: 32px !important;
  font-size: 18px !important;
}
.explore-map-card .leaflet-control-zoom a:hover { background: var(--surface-3) !important; }
.explore-map-card .leaflet-control-attribution {
  background: rgba(6, 16, 51, 0.75) !important;
  color: var(--muted-2) !important;
  font-size: 10px !important;
}
.explore-map-card .leaflet-control-attribution a { color: var(--muted) !important; }

@media (max-width: 980px) {
  .explore-layout { grid-template-columns: 1fr; }
  #explore-map { height: 460px; }
}
@media (max-width: 560px) {
  #explore-map { height: 380px; }
  .explore-panel .stat-grid { grid-template-columns: 1fr; }
}

.region-flag {
  width: 42px;
  height: 28px;
  object-fit: cover;
  border-radius: 5px;
  flex: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  background: #12234f;
}
.gp-icon {
  width: 22px !important;
  height: 22px !important;
  flex: none;
  object-fit: contain;
  display: inline-block;
}

/* Real mode artwork and Material mode icons */
.mode-sticker {
  width: 132px;
  height: 132px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  filter: drop-shadow(0 16px 26px rgba(0, 0, 0, 0.38));
}
.mode-sticker img {
  width: 124px;
  height: 124px;
  object-fit: contain;
  display: block;
}
.play-tile .tile-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #fff;
  color: #061033;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.2);
  font-family: var(--font-display);
}
.play-tile .tile-icon svg { width: 26px; height: 26px; }
.pill-icon { display: inline-flex; align-items: center; justify-content: center; }
.pill-icon svg { width: 15px; height: 15px; }
.toc a svg, .hero-actions .btn svg { width: 18px; height: 18px; vertical-align: -3px; margin-inline-end: 4px; }
@media (max-width: 760px) {
  .mode-sticker { width: 104px; height: 104px; }
  .mode-sticker img { width: 98px; height: 98px; }
}

/* Mode-card blurbs inherit lowercase subtitles; start the sentence cleanly. */
.mode-card p::first-letter { text-transform: uppercase; }

/* Shown on English-only pages when the UI is in another locale. */
.lang-notice {
  margin: 14px 0 0;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 198, 51, 0.08);
  color: var(--muted);
  font-size: 0.86rem;
}
.lang-notice a { color: var(--sun); font-weight: 700; }

/* Never cover the game toolbar or submit button with the consent banner. */
.page-game .consent { display: none; }
