:root {
  --space-dark: #0a0e27;
  --panel: rgba(15, 23, 42, .72);
  --panel-strong: rgba(15, 23, 42, .9);
  --line: rgba(148, 163, 184, .18);
  --txt: #eef2ff;
  --muted: #94a3b8;
  --cyan: #00f5ff;
  --purple: #7c3aed;
  --gold: #facc15;
  --green: #22c55e;
  --red: #fb7185;
  --grad: linear-gradient(135deg, #7c3aed, #4f46e5, #00f5ff);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  min-height: 100vh;
  overflow: hidden;
  overscroll-behavior: none;
  background:
    radial-gradient(circle at 20% 8%, rgba(124, 58, 237, .22), transparent 30%),
    radial-gradient(circle at 80% 24%, rgba(0, 245, 255, .12), transparent 28%),
    var(--space-dark);
  color: var(--txt);
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.stars,
.nebula {
  position: fixed;
  pointer-events: none;
  z-index: 0;
}

.stars { inset: 0; background-image:
  radial-gradient(circle, rgba(255,255,255,.8) 0 1px, transparent 1.6px),
  radial-gradient(circle, rgba(103,232,249,.65) 0 1px, transparent 1.8px);
  background-size: 86px 86px, 137px 137px;
  background-position: 0 0, 23px 41px;
  opacity: .34;
  animation: starDrift 28s linear infinite;
}

@keyframes starDrift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-86px, 86px, 0); }
}

.nebula {
  border-radius: 999px;
  filter: blur(62px);
  opacity: .18;
}

.nb1 { width: 300px; height: 300px; background: #7c3aed; top: -90px; left: -80px; }
.nb2 { width: 260px; height: 260px; background: #06b6d4; right: -90px; top: 20%; }
.nb3 { width: 240px; height: 240px; background: #db2777; left: 22%; bottom: 8%; opacity: .12; }

.globe-app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: 14px 14px 92px;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 12px;
}

.top-bar {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 10px;
}

.back-btn,
.random-btn,
.close-sheet {
  border: 1px solid rgba(255,255,255,.14);
  color: #fff;
  background: rgba(15,23,42,.62);
  backdrop-filter: blur(14px);
  box-shadow: 0 0 22px rgba(124, 58, 237, .2);
}

.back-btn {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  text-decoration: none;
  font-size: 2rem;
  line-height: 1;
}

.title-block .eyebrow {
  color: var(--cyan);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.title-block h1 {
  font-size: clamp(1.18rem, 4vw, 1.85rem);
  letter-spacing: 0;
  line-height: 1.05;
}

.random-btn {
  min-height: 40px;
  border-radius: 18px;
  padding: 0 12px;
  font-size: .78rem;
  font-weight: 850;
  cursor: pointer;
}

.random-btn:active,
.back-btn:active,
.close-sheet:active { transform: scale(.98); }

.control-card {
  position: relative;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, .6);
  backdrop-filter: blur(18px);
  border-radius: 22px;
  padding: 10px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  box-shadow: 0 16px 45px rgba(0,0,0,.24);
}

.search-wrap {
  min-width: 0;
  height: 44px;
  border-radius: 18px;
  border: 1px solid rgba(103, 232, 249, .2);
  background: rgba(2, 6, 23, .42);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
}

.search-wrap input {
  width: 100%;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
  color: #fff;
  font: inherit;
  font-size: .92rem;
}

.search-wrap input::placeholder { color: rgba(203,213,225,.55); }

.hint-pill {
  align-self: center;
  white-space: nowrap;
  color: #c4b5fd;
  font-size: .72rem;
  font-weight: 800;
  border-radius: 999px;
  border: 1px solid rgba(196, 181, 253, .22);
  background: rgba(124, 58, 237, .16);
  padding: 10px 12px;
}

.search-results {
  position: absolute;
  left: 10px;
  right: 10px;
  top: calc(100% + 6px);
  z-index: 8;
  border: 1px solid rgba(103, 232, 249, .22);
  background: rgba(2, 6, 23, .92);
  backdrop-filter: blur(18px);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(0,0,0,.35);
}

.search-result {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(148,163,184,.12);
  background: transparent;
  color: #fff;
  text-align: left;
  padding: 12px 14px;
  font-weight: 750;
  cursor: pointer;
}

.search-result:hover,
.search-result:focus { background: rgba(0,245,255,.1); outline: none; }

.game-card {
  position: relative;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(124, 58, 237, .18), rgba(0, 245, 255, .08)),
    rgba(15, 23, 42, .66);
  backdrop-filter: blur(18px);
  border-radius: 22px;
  padding: 12px;
  display: grid;
  gap: 12px;
  box-shadow: 0 16px 45px rgba(0,0,0,.24);
}

.game-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.round-pill,
.score-pill {
  border-radius: 999px;
  padding: 8px 11px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(2, 6, 23, .38);
  font-size: .72rem;
  font-weight: 900;
  color: #e0f2fe;
  white-space: nowrap;
}

.score-pill {
  color: #fde68a;
  border-color: rgba(250, 204, 21, .24);
  background: rgba(250, 204, 21, .1);
}

.city-prompt {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.prompt-label {
  color: var(--cyan);
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.city-prompt h2 {
  font-size: clamp(1.08rem, 4.5vw, 1.55rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.city-prompt p {
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.35;
}

.globe-stage {
  position: relative;
  min-height: 0;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .14);
  background:
    radial-gradient(circle at 50% 42%, rgba(0,245,255,.16), transparent 34%),
    radial-gradient(circle at 50% 50%, rgba(124,58,237,.16), transparent 54%),
    rgba(2, 6, 23, .38);
  box-shadow: inset 0 0 40px rgba(255,255,255,.03), 0 26px 80px rgba(0,0,0,.36);
  touch-action: none;
  overscroll-behavior: contain;
  -webkit-user-select: none;
  user-select: none;
}

#worldGlobe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

#worldGlobe:active { cursor: grabbing; }

.sphere {
  fill: rgba(5, 10, 34, .94);
  stroke: rgba(103, 232, 249, .42);
  stroke-width: 1.4;
}

.graticule {
  fill: none;
  stroke: rgba(148, 163, 184, .12);
  stroke-width: .6;
}

.country {
  fill: rgba(30, 64, 175, .62);
  stroke: rgba(226, 232, 240, .38);
  stroke-width: .55;
  vector-effect: non-scaling-stroke;
  transition: fill .12s, stroke .12s;
  outline: none;
}

.country:focus,
.country:focus-visible {
  outline: none;
}

.country:hover,
.country.hovered {
  fill: rgba(250, 204, 21, .72);
  stroke: rgba(255,247,173,.95);
}

.country.selected {
  fill: rgba(250, 204, 21, .9);
  stroke: #fff7ad;
  stroke-width: 1.1;
}

.game-pins {
  pointer-events: none;
}

.pin-line {
  stroke: rgba(250, 204, 21, .72);
  stroke-width: 2;
  stroke-dasharray: 6 6;
  vector-effect: non-scaling-stroke;
}

.game-pin circle {
  stroke: rgba(255,255,255,.94);
  stroke-width: 2;
  filter: drop-shadow(0 0 10px rgba(0,245,255,.45));
}

.game-pin.guess circle {
  fill: rgba(0,245,255,.86);
}

.game-pin.actual circle {
  fill: rgba(250,204,21,.94);
}

.game-pin .pin-core {
  fill: rgba(2,6,23,.88);
  stroke: none;
  filter: none;
}

.game-pin text {
  fill: #fff;
  font-size: 11px;
  font-weight: 900;
  paint-order: stroke;
  stroke: rgba(2,6,23,.82);
  stroke-width: 4px;
  stroke-linejoin: round;
}

.map-tooltip {
  position: fixed;
  z-index: 20;
  max-width: 220px;
  pointer-events: none;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(2, 6, 23, .9);
  color: #fff;
  font-size: .8rem;
  font-weight: 800;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}

.country-sheet {
  position: fixed;
  z-index: 60;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 41vh;
  overflow: auto;
  padding: 8px 14px 14px;
  border: 1px solid rgba(255,255,255,.18);
  background: linear-gradient(180deg, rgba(15,23,42,.88), rgba(2,6,23,.96));
  backdrop-filter: blur(22px);
  box-shadow: 0 -24px 70px rgba(0,0,0,.45);
  border-radius: 26px 26px 0 0;
}

.sheet-handle {
  width: 48px;
  height: 5px;
  margin: 0 auto 12px;
  border-radius: 99px;
  background: rgba(148,163,184,.38);
}

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

.sheet-kicker {
  color: var(--cyan);
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.sheet-head h2 {
  font-size: 1.35rem;
  line-height: 1.1;
}

.close-sheet {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.info-table {
  display: grid;
  gap: 8px;
}

.info-row {
  display: grid;
  grid-template-columns: minmax(112px, 38%) 1fr;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(148,163,184,.12);
  background: rgba(15,23,42,.48);
  border-radius: 16px;
  padding: 10px 12px;
}

.info-label {
  color: #a5b4fc;
  font-size: .72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.info-value {
  color: #fff;
  font-size: .92rem;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.flag-value { font-size: 1.55rem; }

.sheet-action-btn {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(103, 232, 249, .26);
  border-radius: 18px;
  background: var(--grad);
  color: #fff;
  font-weight: 950;
  cursor: pointer;
  box-shadow: 0 14px 36px rgba(124,58,237,.28);
}

.sheet-action-btn:active {
  transform: scale(.99);
}

.final-score {
  border-radius: 22px;
  border: 1px solid rgba(250,204,21,.24);
  background:
    radial-gradient(circle at 18% 20%, rgba(250,204,21,.18), transparent 38%),
    rgba(15,23,42,.58);
  color: #fef3c7;
  font-size: clamp(2rem, 12vw, 3.5rem);
  font-weight: 950;
  line-height: 1;
  padding: 18px;
  text-align: center;
}

.final-score span {
  display: block;
  margin-top: 6px;
  color: #94a3b8;
  font-size: .82rem;
  font-weight: 850;
}

.round-row {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(148,163,184,.12);
  background: rgba(15,23,42,.48);
  border-radius: 16px;
  padding: 11px 12px;
}

.round-row span {
  color: #fff;
  font-size: .86rem;
  font-weight: 850;
}

.round-row strong {
  color: #fde68a;
  font-size: .78rem;
  font-weight: 900;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  z-index: 35;
  width: min(420px, calc(100% - 24px));
  height: 66px;
  border-radius: 26px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(10, 14, 39, .82);
  backdrop-filter: blur(18px);
  display: grid;
  grid-template-columns: 1fr 1fr 68px 1fr 1fr;
  align-items: center;
  padding: 0 8px;
  box-shadow: 0 14px 40px rgba(0,0,0,.34);
}

.nav-item,
.nav-orb {
  color: #cbd5e1;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: .68rem;
  font-weight: 800;
}

.nav-item span { font-size: 1.1rem; }
.nav-item.active { color: #fff; }

.nav-orb {
  width: 54px;
  height: 54px;
  margin: -18px auto 0;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-size: 1.45rem;
  box-shadow: 0 0 26px rgba(124,58,237,.56);
  border: 3px solid rgba(10,14,39,.92);
}

@media (min-width: 760px) {
  .globe-app {
    padding: 20px 24px 92px;
    grid-template-columns: minmax(300px, 420px) 1fr;
    grid-template-rows: auto 1fr;
  }

  .top-bar {
    grid-column: 1 / -1;
  }

  .control-card {
    align-self: start;
    grid-template-columns: 1fr;
  }

  .globe-stage {
    grid-row: 2;
    grid-column: 2;
  }

  .country-sheet {
    left: 24px;
    right: auto;
    bottom: 24px;
    width: min(420px, calc(100% - 48px));
    max-height: min(58vh, calc(100vh - 170px));
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 26px;
    padding-bottom: 14px;
  }
}

@media (max-width: 430px) {
  .random-btn { font-size: .74rem; width: auto; padding: 0 11px; }
  .random-btn::before { content: none; }
  .hint-pill { display: none; }
  .control-card { grid-template-columns: 1fr; }
  .info-row { grid-template-columns: 1fr; gap: 4px; }
}

/* World Pin Challenge full-screen gameplay overrides. */
html,
body {
  width: 100%;
  min-height: 100%;
  overflow: hidden;
}

body {
  min-height: 100svh;
}

.globe-app {
  position: fixed;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100svh;
  min-height: 100svh;
  padding: 0;
  display: block;
  overflow: hidden;
}

.globe-stage {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100svh;
  min-height: 100svh;
  border-radius: 0;
  border: 0;
  background:
    radial-gradient(circle at 50% 46%, rgba(0,245,255,.16), transparent 38%),
    radial-gradient(circle at 50% 50%, rgba(124,58,237,.13), transparent 58%),
    transparent;
  box-shadow: none;
  overflow: hidden;
}

#worldGlobe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

body.world-pin-globe-gl-mode #worldGlobe {
  display: none;
  pointer-events: none;
}

.world-pin-globe-root {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  min-width: 1px;
  min-height: 1px;
  touch-action: none;
}

.world-pin-globe-root canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.top-bar {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  left: 12px;
  right: 12px;
  z-index: 30;
  display: grid;
  grid-template-columns: 44px 1fr;
  pointer-events: none;
}

.top-bar > * {
  pointer-events: auto;
}

.game-card {
  display: contents;
  background: none;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.game-overlay {
  position: fixed;
  top: calc(max(12px, env(safe-area-inset-top)) + 76px);
  left: 16px;
  right: 16px;
  z-index: 25;
  pointer-events: none;
  color: white;
  text-shadow: 0 2px 14px rgba(0,0,0,.75);
}

.game-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.round-pill,
.score-pill {
  border: none;
  background: rgba(0,0,0,.28);
  backdrop-filter: blur(8px);
  box-shadow: none;
}

.city-overlay {
  max-width: 92%;
}

.city-overlay .prompt-label {
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: .78;
}

.city-overlay h2 {
  margin: 2px 0 2px;
  font-size: clamp(1.55rem, 7vw, 2.45rem);
  line-height: .96;
  font-weight: 900;
}

.city-overlay p {
  margin: 0;
  max-width: 280px;
  font-size: .9rem;
  opacity: .86;
  color: #fff;
}

.game-action-bar {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(84px + env(safe-area-inset-bottom));
  z-index: 35;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.main-game-btn {
  pointer-events: auto;
  width: min(100%, 420px);
  min-height: 56px;
  border: 0;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 950;
  color: white;
  background: linear-gradient(135deg, #38bdf8, #8b5cf6);
  box-shadow:
    0 16px 40px rgba(56, 189, 248, .28),
    inset 0 1px 0 rgba(255,255,255,.25);
}

.main-game-btn:disabled {
  opacity: .45;
  filter: grayscale(.35);
}

.main-game-btn:not(:disabled):active {
  transform: scale(.98);
}

.bottom-nav {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: max(10px, env(safe-area-inset-bottom));
  transform: none;
  z-index: 40;
  width: auto;
  max-width: none;
}

.round-feedback {
  position: fixed;
  left: 50%;
  bottom: calc(150px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 34;
  min-width: min(86vw, 360px);
  padding: 12px 16px;
  color: white;
  text-align: center;
  text-shadow: 0 2px 14px rgba(0,0,0,.7);
  pointer-events: none;
  animation: feedbackIn .28s ease both;
}

.round-feedback strong {
  display: block;
  font-size: 1.25rem;
  font-weight: 950;
}

.round-feedback span {
  display: block;
  margin-top: 2px;
  font-size: .92rem;
  opacity: .9;
}

@keyframes feedbackIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(12px) scale(.96);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

.result-sheet {
  z-index: 60;
  max-height: min(76svh, 680px);
}

/* ── World Pin Challenge overlays ─────────────────────────────────── */

.wp-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 8, 28, .84);
  backdrop-filter: blur(12px);
  padding: 20px;
}

.wp-overlay[hidden] { display: none; }

/* Mode select */

.wp-mode-inner {
  width: 100%;
  max-width: 420px;
  text-align: center;
}

.wp-mode-eyebrow {
  color: var(--cyan);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.wp-mode-title {
  font-size: clamp(1.45rem, 6vw, 2rem);
  font-weight: 900;
  margin-bottom: 22px;
  line-height: 1.08;
}

.wp-mode-cards {
  display: grid;
  gap: 12px;
}

.wp-mode-card {
  width: 100%;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 22px;
  background: rgba(15, 23, 42, .72);
  backdrop-filter: blur(14px);
  padding: 18px 16px;
  color: #fff;
  cursor: pointer;
  text-align: left;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 4px 12px;
  align-items: center;
  transition: border-color .15s, background .15s;
}

.wp-mode-card:hover,
.wp-mode-card:focus-visible {
  border-color: var(--cyan);
  background: rgba(0, 245, 255, .08);
  outline: none;
}

.wp-mode-card--daily {
  border-color: rgba(124, 58, 237, .38);
  background:
    linear-gradient(135deg, rgba(124,58,237,.16), rgba(0,245,255,.06)),
    rgba(15, 23, 42, .72);
}

.wp-mode-card--daily:hover,
.wp-mode-card--daily:focus-visible {
  border-color: var(--purple);
  background:
    linear-gradient(135deg, rgba(124,58,237,.26), rgba(0,245,255,.1)),
    rgba(15, 23, 42, .72);
}

.wp-mode-icon {
  font-size: 1.8rem;
  grid-row: span 2;
  display: grid;
  place-items: center;
}

.wp-mode-card strong {
  font-size: 1.02rem;
  font-weight: 900;
  display: block;
}

.wp-mode-card span {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  line-height: 1.35;
}

/* Loading */

.wp-loading-inner {
  text-align: center;
  display: grid;
  gap: 16px;
  place-items: center;
}

.wp-loading-inner p {
  color: var(--muted);
  font-size: .92rem;
  font-weight: 800;
}

.wp-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(0, 245, 255, .22);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: wpSpin .9s linear infinite;
}

@keyframes wpSpin {
  to { transform: rotate(360deg); }
}

/* Shared panel */

.wp-panel {
  width: 100%;
  max-width: 400px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 26px;
  background: rgba(15, 23, 42, .92);
  backdrop-filter: blur(18px);
  padding: 26px 22px 22px;
  text-align: center;
  display: grid;
  gap: 12px;
}

.wp-panel-icon { font-size: 2.4rem; }

.wp-panel h3 {
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1.1;
}

.wp-panel p {
  color: var(--muted);
  font-size: .86rem;
  line-height: 1.45;
}

/* Buttons */

.wp-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  border-radius: 999px;
  font-size: .94rem;
  font-weight: 900;
  cursor: pointer;
  text-decoration: none;
  border: 0;
}

.wp-btn--primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 12px 32px rgba(124,58,237,.28);
}

.wp-btn--primary:hover { opacity: .92; }

.wp-btn--ghost {
  background: transparent;
  border: 1px solid rgba(255,255,255,.18);
  color: var(--muted);
}

.wp-btn--ghost:hover {
  border-color: rgba(255,255,255,.32);
  color: #fff;
}

/* Intermission */

.wp-intermission {
  align-items: flex-end;
  background: transparent;
  backdrop-filter: none;
  padding: 0 12px calc(84px + env(safe-area-inset-bottom));
}

.wp-intermission .wp-panel {
  max-width: 100%;
  border-radius: 26px 26px 20px 20px;
  box-shadow: 0 -20px 60px rgba(0,0,0,.45);
  animation: panelSlideUp .3s cubic-bezier(.32,.72,0,1) both;
}

@keyframes panelSlideUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.wp-inter-kicker {
  color: var(--cyan);
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.wp-inter-city {
  font-size: clamp(1.25rem, 5.5vw, 1.65rem);
  font-weight: 900;
  line-height: 1.05;
  margin: 0;
}

.wp-inter-country {
  color: var(--muted);
  font-size: .84rem;
  margin-top: -4px;
}

.wp-inter-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 4px 0;
}

.wp-stat {
  border: 1px solid rgba(148,163,184,.16);
  border-radius: 16px;
  background: rgba(2,6,23,.42);
  padding: 12px 10px;
  text-align: center;
  display: grid;
  gap: 4px;
}

.wp-stat strong {
  font-size: 1.35rem;
  font-weight: 950;
  color: #fff;
}

.wp-stat--points strong { color: var(--gold); }

.wp-stat small {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
}

/* ── Daily Completed overlay ─────────────────────────────────────────────── */
.wp-daily-completed {
  background: rgba(2,6,23,.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  align-items: center;
  justify-content: center;
}

.wp-completed-panel {
  max-width: 420px;
  width: calc(100% - 40px);
  text-align: center;
  gap: 8px;
  animation: panelSlideUp .35s cubic-bezier(.32,.72,0,1) both;
}

.wp-completed-check {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan, #38bdf8), var(--gold, #fbbf24));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.55rem;
  font-weight: 900;
  color: #0f172a;
  margin: 0 auto 6px;
  flex-shrink: 0;
}

.wp-completed-eyebrow {
  color: var(--cyan, #38bdf8);
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin: 0;
}

.wp-completed-title {
  font-size: clamp(1.3rem, 5.5vw, 1.7rem);
  font-weight: 950;
  margin: 2px 0 0;
  line-height: 1.1;
}

.wp-completed-sub {
  color: var(--muted, #94a3b8);
  font-size: .85rem;
  margin: 4px 0 6px;
}

.wp-completed-score {
  font-size: 1.9rem;
  font-weight: 950;
  color: var(--gold, #fbbf24);
  letter-spacing: -.02em;
  line-height: 1.1;
}

.wp-completed-reward {
  font-size: .88rem;
  font-weight: 800;
  color: var(--cyan, #38bdf8);
  margin-top: -2px;
}

.wp-completed-next {
  font-size: .78rem;
  color: var(--muted, #94a3b8);
  font-weight: 700;
  margin-top: 2px;
}

.wp-completed-note {
  font-size: .72rem;
  color: rgba(148,163,184,.55);
  margin: 4px 0 0;
}

.wp-completed-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
  width: 100%;
}

.bottom-nav{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:100%;max-width:430px;background:rgba(7,11,21,.97);backdrop-filter:blur(28px);-webkit-backdrop-filter:blur(28px);border-top:1px solid rgba(255,255,255,.06);display:flex;align-items:flex-end;justify-content:space-around;padding:10px 4px 24px;z-index:200;}
.nav-btn{display:flex;flex-direction:column;align-items:center;gap:3px;background:none;border:none;color:#6B7280;font-family:inherit;font-size:10px;font-weight:500;cursor:pointer;padding:0 6px;min-width:52px;transition:color .15s;text-decoration:none;}
.nav-btn .nav-ico{width:22px;height:22px;display:block;margin-bottom:1px;}
.nav-btn .nav-ico img{width:100%;height:100%;object-fit:contain;display:block;opacity:.45;transition:opacity .15s;}
.nav-btn.active{color:#8B5CF6;}
.nav-btn.active .nav-ico img{opacity:1;filter:brightness(0) saturate(100%) invert(49%) sepia(97%) saturate(1283%) hue-rotate(235deg) brightness(101%) contrast(94%);}
.nav-center{display:flex;flex-direction:column;align-items:center;gap:4px;margin-top:-26px;cursor:pointer;}
.nav-disc{width:58px;height:58px;border-radius:50%;background:linear-gradient(135deg,#6d28d9 0%,#8b5cf6 60%,#a78bfa 100%);box-shadow:0 4px 28px rgba(109,40,217,.7),0 0 0 3px #0B0F1A;display:flex;align-items:center;justify-content:center;font-size:27px;}
.nav-center-lbl{font-size:10px;font-weight:700;color:#6B7280;}
