:root {
  --gutter: 40px;
  --green-400: #1ac07e;
  --green-500: #12a96c;
  --green-600: #0f9d6b;
  --green-700: #0c7a52;
  --hero-1: #0b5c41;
  --hero-2: #084a34;
  --ink: #0f1b2d;
  --muted: var(--site-muted);
  --line: var(--site-border);
  --orange: #f0a13b;
  --yellow: #f2c04d;
  --radius: 16px;
  --site-bg: #fff;
  --site-fg: #0f1b2d;
  --site-accent: #0e7490;
  --site-on-accent: #fff;
  --site-surface: #fff;
  --site-muted: #6b7787;
  --site-border: #e8edf0;
  --site-font: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --site-radius: 24px;
  --site-space: 1;
  --site-type: 1;
  --site-motion: 1;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--site-font);
  color: var(--site-fg);
  background: var(--site-bg);
  -webkit-font-smoothing: antialiased;
}

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

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

svg { display: block; }

/* ---------- Top bar ---------- */

.topbar {
  background:
    radial-gradient(620px 260px at 8% -60%, rgba(94, 234, 212, 0.22), transparent 60%),
    linear-gradient(110deg, #0b5f7a 0%, #0e7490 48%, #0891b2 100%);
  box-shadow: 0 10px 28px rgba(6, 42, 58, 0.22);
  position: sticky;
  top: 0;
  z-index: 30;
}

.topbar-inner {
  max-width: 1640px;
  margin: 0 auto;
  padding: calc(24px * var(--site-space, 1)) 40px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: none;
}

.brand-mark {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #22d3ee, #0891b2);
  box-shadow: 0 8px 18px rgba(8, 145, 178, 0.35);
}

.brand-mark svg {
  width: 32px;
  height: 32px;
}

.brand-name {
  display: block;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.15;
  white-space: nowrap;
}

.brand-name em {
  font-style: normal;
  color: var(--green-500);
}

.brand-tag {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  color: #7a8695;
  white-space: nowrap;
}

.topbar .brand-name {
  color: #fff;
}

.topbar .brand-name em {
  color: #5eead4;
}

.topbar .brand-tag {
  color: rgba(224, 247, 250, 0.62);
}

.tabs {
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 999px;
  font-size: 15.5px;
  font-weight: 600;
  color: rgba(235, 250, 253, 0.86);
  white-space: nowrap;
  transition: background calc(180ms * var(--site-motion, 1)), color calc(180ms * var(--site-motion, 1));
}

.tab svg {
  width: 18px;
  height: 18px;
}

.tab:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.tab.is-active {
  background: #fff;
  color: #0e7490;
  box-shadow: 0 6px 16px rgba(3, 42, 57, 0.28);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: none;
}

.gps-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #ecfeff;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.gps-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #12b76a;
  box-shadow: 0 0 0 4px rgba(18, 183, 106, 0.16);
}

.icon-btn {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.1);
  color: #ecfeff;
  display: grid;
  place-items: center;
  transition: color 0.18s, border-color 0.18s, background 0.18s;
}

.icon-btn svg {
  width: 21px;
  height: 21px;
}

.icon-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.18);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  /* Photo: Unsplash (images.unsplash.com/photo-1515238152791) */
  background:
    linear-gradient(100deg, rgba(3, 23, 34, 0.94) 0%, rgba(5, 42, 58, 0.84) 36%, rgba(6, 60, 80, 0.66) 65%, rgba(8, 96, 122, 0.46) 100%),
    linear-gradient(180deg, rgba(6, 42, 58, 0) 45%, rgba(4, 26, 38, 0.42) 100%),
    url("assets/hero-beach.jpg") center 62% / cover no-repeat,
    linear-gradient(120deg, #093548 0%, #0891b2 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1.2px);
  background-size: 22px 22px;
  opacity: 0.22;
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  right: -8%;
  top: -45%;
  width: 720px;
  height: 720px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(94, 234, 212, 0.2), transparent 65%);
  pointer-events: none;
}

.hero-wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  line-height: 0;
  pointer-events: none;
}

.hero-wave svg {
  display: block;
  width: 100%;
  height: 66px;
}

.wave-back {
  fill: rgba(255, 255, 255, 0.14);
}

.wave-front {
  fill: #edf8fa;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1640px;
  margin: 0 auto;
  padding: 66px 40px 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
}

.hero-copy {
  max-width: 990px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 17px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1px;
  color: #e8fbff;
}

.eyebrow svg {
  width: 17px;
  height: 17px;
  opacity: 0.9;
}

.hero h1 {
  margin: 26px 0 22px;
  font-size: clamp(calc(38px * var(--site-type, 1)), calc(3.6vw * var(--site-type, 1)), calc(60px * var(--site-type, 1)));
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -1.5px;
  max-width: 1000px;
}

.hero h1 .grad {
  display: block;
  background: linear-gradient(92deg, #f8d24b 0%, #f5b731 45%, #ef9b0f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero-lead {
  margin: 0 0 34px;
  max-width: 700px;
  font-size: 17.5px;
  line-height: 1.72;
  font-weight: 400;
  color: rgba(224, 247, 252, 0.85);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 24px;
  border: 0;
  border-radius: 13px;
  font: inherit;
  font-size: 15.5px;
  font-weight: 700;
  cursor: pointer;
  transition: transform calc(180ms * var(--site-motion, 1)), box-shadow calc(180ms * var(--site-motion, 1)), background calc(180ms * var(--site-motion, 1)), opacity calc(180ms * var(--site-motion, 1));
}

.btn:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.9);
  outline-offset: 3px;
}

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

.btn.is-loading {
  cursor: wait;
  opacity: 0.85;
}

.btn:disabled {
  cursor: wait;
}

.btn-spinner {
  width: 17px;
  height: 17px;
  border: 2px solid rgba(28, 42, 51, 0.25);
  border-top-color: #1c2a33;
  border-radius: 50%;
  animation: btn-spin 0.75s linear infinite;
}

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

.btn-primary {
  background: linear-gradient(135deg, #ffd45e 0%, #f7b32b 55%, #ef930f 100%);
  color: #1c2a33;
  box-shadow: 0 14px 30px rgba(240, 160, 35, 0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 38px rgba(240, 160, 35, 0.48);
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-ghost .trophy {
  color: var(--yellow);
}

/* Stats panel */

.hero-stats {
  flex: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
  min-width: 470px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03));
  backdrop-filter: blur(6px);
  box-shadow: 0 24px 60px rgba(2, 24, 36, 0.38);
}

.stat {
  padding: 22px 24px 20px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.6px;
  line-height: 1.1;
}

.stat-label {
  display: block;
  margin-top: 7px;
  font-size: 13.5px;
  font-weight: 600;
  color: rgba(224, 247, 252, 0.74);
  white-space: nowrap;
}

.stat-orange { color: #ffb45e; }
.stat-green { color: #5eead4; }
.stat-teal { color: #67e8f9; }
.stat-yellow { color: #ffe27a; }

/* ---------- Places ---------- */

.places-scene {
  background: linear-gradient(180deg, #edf8fa 0%, #f3f9f7 40%, #fcf7ec 100%);
}

/* ---------- Place filter ---------- */

.place-filter-inner {
  max-width: 1640px;
  margin: 0 auto;
  padding: 54px 40px 30px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.filter-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(13, 42, 56, 0.55);
  white-space: nowrap;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border-radius: 999px;
  border: 1px solid rgba(8, 145, 178, 0.22);
  background: rgba(255, 255, 255, 0.8);
  color: #0d4a5c;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.filter-chip:hover {
  border-color: rgba(8, 145, 178, 0.5);
  background: #fff;
}

.filter-chip:focus-visible {
  outline: 2px solid #0891b2;
  outline-offset: 2px;
}

.filter-chip.is-active {
  border-color: transparent;
  background: linear-gradient(150deg, #22b8d4, #0891b2);
  color: #fff;
  box-shadow: 0 6px 16px rgba(4, 44, 59, 0.22);
}

.places.is-filter-empty {
  display: none;
}

.place-card.is-filtered-out {
  display: none;
}

.place-filter ~ #popular-places .places-inner {
  padding-top: 0;
}

/* ---------- Spot unlock modal ---------- */

body.modal-open {
  overflow: hidden;
}

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

.spot-modal[hidden] {
  display: none;
}

.spot-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 30, 42, 0.62);
  backdrop-filter: blur(6px);
}

.spot-modal-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, 0.92fr);
  width: min(1440px, calc(100% - 64px));
  height: calc(100vh - 48px);
  height: calc(100dvh - 48px);
  overflow: hidden;
  border-radius: var(--site-radius);
  background: var(--site-surface);
  box-shadow: 0 28px 80px rgba(4, 24, 34, 0.3);
  outline: none;
}

.spot-modal-hero {
  position: relative;
  min-width: 0;
  height: 100%;
  background: linear-gradient(150deg, #093548 0%, #0b6b85 45%, #0891b2 100%);
  overflow: hidden;
}

.spot-modal-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 65%, rgba(4, 24, 34, 0.2) 100%);
  pointer-events: none;
}

.spot-modal-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.spot-modal-photo[hidden] {
  display: none;
}

.spot-modal-card.is-puzzle .spot-modal-hero {
  min-height: 0;
}

.spot-photo-expand {
  position: absolute;
  right: 26px;
  bottom: 26px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  background: rgba(6, 26, 38, 0.55);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.spot-photo-expand:hover {
  background: rgba(6, 26, 38, 0.78);
}

.spot-photo-expand[hidden] {
  display: none;
}

.spot-photo-expand svg {
  width: 15px;
  height: 15px;
}

body.ar-open {
  overflow: hidden;
}

.ar-scan {
  position: fixed;
  inset: 0;
  z-index: 250;
  background: #061a24;
  overflow: hidden;
}

.ar-scan[hidden] {
  display: none;
}

.ar-video,
.ar-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ar-video[hidden],
.ar-fallback[hidden] {
  display: none;
}

.ar-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 75% at 50% 0%, rgba(4, 26, 38, 0.1), rgba(4, 26, 38, 0.55) 72%),
    linear-gradient(180deg, rgba(4, 26, 38, 0.6) 0%, rgba(4, 26, 38, 0.18) 32%, rgba(4, 26, 38, 0.68) 100%);
}

.ar-top {
  position: absolute;
  top: 18px;
  left: 20px;
  right: 80px;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ar-live,
.ar-gps {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(4, 24, 34, 0.55);
  backdrop-filter: blur(8px);
  color: #eaf8fb;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.ar-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff5a5f;
  box-shadow: 0 0 0 4px rgba(255, 90, 95, 0.22);
  animation: arPulse 1.6s ease-in-out infinite;
}

@keyframes arPulse {
  50% { box-shadow: 0 0 0 7px rgba(255, 90, 95, 0.06); }
}

.ar-close {
  position: absolute;
  top: 18px;
  right: 20px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.92);
  color: #0d2a38;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(4, 24, 34, 0.3);
}

.ar-close:hover {
  background: #fff;
}

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

.ar-reticle {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding-bottom: 170px;
  pointer-events: none;
}

.ar-frame {
  position: relative;
  width: min(500px, 70vw);
  aspect-ratio: 4 / 3;
}

.ar-corner {
  position: absolute;
  width: 36px;
  height: 36px;
  border: 0 solid #7fe7ff;
  filter: drop-shadow(0 0 8px rgba(89, 217, 247, 0.55));
}

.ar-corner.tl { top: 0; left: 0; border-top-width: 3px; border-left-width: 3px; border-top-left-radius: 12px; }
.ar-corner.tr { top: 0; right: 0; border-top-width: 3px; border-right-width: 3px; border-top-right-radius: 12px; }
.ar-corner.bl { bottom: 0; left: 0; border-bottom-width: 3px; border-left-width: 3px; border-bottom-left-radius: 12px; }
.ar-corner.br { bottom: 0; right: 0; border-bottom-width: 3px; border-right-width: 3px; border-bottom-right-radius: 12px; }

.ar-frame::after {
  content: "";
  position: absolute;
  left: 6%;
  right: 6%;
  top: 8%;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, #7fe7ff, transparent);
  box-shadow: 0 0 18px rgba(89, 217, 247, 0.9);
  opacity: 0;
}

.ar-scan.is-scanning .ar-frame::after {
  opacity: 1;
  animation: arScanLine 2.4s ease-in-out infinite;
}

@keyframes arScanLine {
  0% { top: 8%; }
  50% { top: 90%; }
  100% { top: 8%; }
}

.ar-status {
  position: absolute;
  left: 50%;
  bottom: 44px;
  transform: translateX(-50%);
  z-index: 3;
  margin: 0;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(4, 24, 34, 0.62);
  backdrop-filter: blur(8px);
  color: #eaf8fb;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: opacity 0.25s ease;
}

.ar-scan.is-detected .ar-status {
  opacity: 0;
}

.ar-detect {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 3;
  width: min(520px, calc(100% - 32px));
  padding: 22px 24px;
  border-radius: 20px;
  background: rgba(6, 26, 38, 0.84);
  border: 1px solid rgba(127, 231, 255, 0.25);
  backdrop-filter: blur(14px);
  color: #eaf8fb;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.ar-detect[hidden] {
  display: none;
}

.ar-detect-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7fe7ff;
}

.ar-detect-kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.18);
}

.ar-detect h3 {
  margin: 0 0 4px;
  font-size: 26px;
  letter-spacing: -0.4px;
  color: #fff;
}

.ar-detect-meta {
  margin: 0 0 10px;
  color: #a9c6d0;
  font-size: 13px;
}

.ar-detect-desc {
  margin: 0 0 12px;
  color: #d7ecf2;
  font-size: 14px;
  line-height: 1.55;
}

.ar-detect-badge {
  display: inline-block;
  margin: 0 0 16px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(127, 231, 255, 0.12);
  color: #bfeef9;
  font-size: 12px;
  font-weight: 700;
}

.ar-detect-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ar-story-btn {
  flex: 1 1 180px;
  padding: 12px 18px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(140deg, #22b8d4, #0891b2);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(4, 70, 90, 0.35);
}

.ar-rescan-btn {
  padding: 12px 18px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #eaf8fb;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.ar-rescan-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 58px 40px 30px;
  background: rgba(3, 16, 24, 0.94);
  backdrop-filter: blur(10px);
}

.photo-lightbox[hidden] {
  display: none;
}

.photo-lightbox-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
}

.photo-lightbox-img {
  max-width: min(1400px, 84vw);
  max-height: 72vh;
  border-radius: 14px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
}

.photo-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(6px);
  color: #0d2a38;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(4, 24, 34, 0.3);
  transition: background 0.15s ease, transform 0.15s ease;
}

.photo-lightbox-nav:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.05);
}

.photo-lightbox-nav[hidden] {
  display: none;
}

.photo-lightbox-nav svg {
  width: 20px;
  height: 20px;
}

.photo-lightbox-nav.prev {
  left: 14px;
}

.photo-lightbox-nav.next {
  right: 14px;
}

.photo-lightbox-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.photo-lightbox-count {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.photo-lightbox-count[hidden],
.photo-lightbox-thumbs[hidden] {
  display: none;
}

.photo-lightbox-thumbs {
  display: flex;
  gap: 8px;
}

.photo-thumb {
  padding: 0;
  border: 2px solid transparent;
  border-radius: 9px;
  overflow: hidden;
  background: none;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}

.photo-thumb img {
  display: block;
  width: 82px;
  height: 52px;
  object-fit: cover;
}

.photo-thumb:hover {
  opacity: 0.9;
}

.photo-thumb.is-active {
  border-color: #57d7ea;
  opacity: 1;
}

.photo-lightbox-close {
  position: fixed;
  top: 20px;
  right: 22px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  color: #0d2a38;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(4, 24, 34, 0.28);
}

.photo-lightbox-close:hover {
  background: #fff;
}

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

.spot-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 10;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  color: #0d2a38;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(4, 24, 34, 0.28);
}

.spot-modal-close:hover {
  background: #fff;
}

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

.spot-modal-head {
  padding: 34px 38px 22px;
  border-bottom: 1px solid #e5eef0;
}

.spot-modal-kicker {
  margin: 0 0 8px;
  padding-right: 34px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #0b7f98;
}

.spot-modal-head h2 {
  margin: 0;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.7px;
  color: #0d2a38;
}

.spot-modal-body {
  min-width: 0;
  height: 100%;
  overflow-y: auto;
  padding: 28px 38px 48px;
  scrollbar-color: #b9d5db transparent;
  scrollbar-width: thin;
}

.puzzle-stage {
  max-width: 660px;
  margin: 0 auto;
}

.puzzle-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff4dc;
  color: #8a5a06;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.puzzle-tag::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f2a61f;
}

.puzzle-intro {
  margin: 0 0 18px;
  color: #3f5560;
  font-size: 15px;
  line-height: 1.6;
}

.puzzle-intro strong {
  color: #0d2a38;
}

.puzzle-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  aspect-ratio: 3 / 2;
  border-radius: 16px;
  overflow: hidden;
  background: #0d2a38;
}

.puzzle-tile {
  padding: 0;
  border: 0;
  background-size: 300% 300%;
  background-repeat: no-repeat;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.puzzle-tile:hover {
  transform: scale(0.97);
}

.puzzle-tile:focus-visible {
  outline: 3px solid #0891b2;
  outline-offset: -3px;
}

.puzzle-tile.is-selected {
  box-shadow: inset 0 0 0 4px #f2a61f;
  transform: scale(0.95);
}

.puzzle-grid.is-complete .puzzle-tile {
  pointer-events: none;
  cursor: default;
}

.puzzle-grid.is-complete {
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.55);
}

.puzzle-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.puzzle-meta {
  font-size: 13px;
  font-weight: 700;
  color: #5b7280;
}

.puzzle-shuffle {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(8, 145, 178, 0.25);
  background: #f4fafb;
  color: #0b6b85;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.puzzle-shuffle:hover {
  background: #e6f5f8;
}

.puzzle-hint {
  margin: 10px 0 0;
  font-size: 13px;
  color: #647986;
}

.unlock-banner {
  margin: 0 0 16px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #e7f8ef;
  color: #0f6b45;
  font-size: 13px;
  font-weight: 800;
}

.spot-desc {
  margin: 0 0 18px;
  color: #3f5560;
  font-size: 15px;
  line-height: 1.65;
}

.spot-subhead {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #0b7c99;
}

.spot-trivia-wrap {
  margin: 0 0 18px;
  padding: 14px 16px;
  border-left: 4px solid #f2a61f;
  border-radius: 0 12px 12px 0;
  background: #fff9ee;
}

.spot-trivia {
  margin: 0;
  color: #5c4a24;
  font-size: 14.5px;
  line-height: 1.6;
}

.spot-highlights {
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.spot-highlights li {
  position: relative;
  padding-left: 22px;
  color: #3f5560;
  font-size: 14.5px;
  line-height: 1.5;
}

.spot-highlights li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(150deg, #22b8d4, #0891b2);
}

.spot-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.spot-facts span {
  padding: 8px 12px;
  border-radius: 10px;
  background: #f3f9fa;
  color: #36505c;
  font-size: 13px;
}

.spot-facts strong {
  color: #0d2a38;
  font-weight: 800;
}

.spot-tip {
  margin: 0 0 20px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f3f9fa;
  color: #36505c;
  font-size: 14px;
  line-height: 1.55;
}

.spot-nearby {
  margin-bottom: 20px;
}

.spot-nearby .spot-subhead {
  margin: 0 0 8px;
}

.spot-nearby-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.spot-nearby-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #f3f9fa;
  border: 1px solid rgba(8, 145, 178, 0.18);
  color: #0d2a38;
  font-size: 13.5px;
  text-decoration: none;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.spot-nearby-link:hover {
  background: #e6f6f9;
  border-color: rgba(8, 145, 178, 0.38);
}

.spot-nearby-name {
  font-weight: 800;
}

.spot-nearby-type {
  color: #5b7482;
}

.spot-nearby-link svg {
  width: 14px;
  height: 14px;
  color: #0891b2;
  flex: none;
}

.spot-ar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 20px;
  padding: 16px 18px;
  border-radius: 16px;
  background: linear-gradient(140deg, #eaf9fc, #f1fbf5);
  border: 1px solid rgba(8, 145, 178, 0.18);
}

.spot-ar[hidden] {
  display: none;
}

.spot-ar-copy {
  flex: 1 1 280px;
}

.spot-ar .spot-subhead {
  margin-bottom: 4px;
}

.spot-ar-text {
  margin: 0;
  color: #36505c;
  font-size: 13.5px;
  line-height: 1.5;
}

.spot-ar-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(140deg, #22b8d4, #0891b2);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(4, 70, 90, 0.25);
}

.spot-ar-btn:disabled {
  opacity: 0.6;
  cursor: progress;
}

.spot-ar-btn.is-out-of-range {
  background: linear-gradient(140deg, #f87171, #dc2626);
  color: #fff;
  box-shadow: 0 10px 22px rgba(185, 28, 28, 0.24);
}

.spot-ar-btn.is-out-of-range:hover {
  background: linear-gradient(140deg, #ef4444, #b91c1c);
}

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

.spot-ar-demo {
  flex: 1 1 100%;
  border: 0;
  background: none;
  padding: 0;
  color: #0b7c99;
  font-size: 12.5px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  text-decoration: underline;
}

.spot-ar-demo[hidden] {
  display: none;
}

.spot-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.spot-maps {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 20px;
  border-radius: 999px;
  background: linear-gradient(140deg, #22b8d4, #0891b2);
  color: #fff;
  font-size: 14.5px;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(4, 70, 90, 0.28);
}

.spot-maps:hover {
  filter: brightness(1.05);
}

.spot-maps svg {
  width: 17px;
  height: 17px;
}

.spot-done {
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid rgba(8, 145, 178, 0.3);
  background: #fff;
  color: #0b6b85;
  font-size: 14.5px;
  font-weight: 800;
  cursor: pointer;
}

.spot-done:hover {
  background: #f0fafc;
}

.places-inner {
  max-width: 1640px;
  margin: 0 auto;
  padding: 62px 40px 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 26px;
  margin-bottom: 40px;
  border-bottom: 1px solid rgba(15, 27, 45, 0.08);
}

.section-titles {
  display: flex;
  align-items: center;
  gap: 17px;
}

.section-bar {
  width: 7px;
  height: 56px;
  border-radius: 6px;
  flex: none;
  background: linear-gradient(180deg, #22d3ee, #0891b2);
}

.section-titles h2 {
  margin: 0;
  font-size: 31px;
  font-weight: 800;
  letter-spacing: -0.9px;
  line-height: 1.15;
}

.section-titles p {
  margin: 8px 0 0;
  font-size: 15px;
  color: var(--muted);
}

.carousel-nav {
  display: flex;
  gap: 12px;
  flex: none;
}

.arrow {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid #e4e8eb;
  background: #fff;
  color: #3b4757;
  display: grid;
  place-items: center;
  transition: background 0.18s, border-color 0.18s, color 0.18s, box-shadow 0.18s;
}

.arrow svg {
  width: 21px;
  height: 21px;
}

.arrow:hover {
  background: #0891b2;
  border-color: #0891b2;
  color: #fff;
  box-shadow: 0 8px 18px rgba(8, 145, 178, 0.32);
}

.places-carousel {
  overflow: hidden;
}

.cards {
  display: flex;
  gap: 26px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-left: max(var(--gutter), calc((100vw - 1640px) / 2 + var(--gutter)));
  padding: 4px max(var(--gutter), calc((100vw - 1640px) / 2 + var(--gutter))) 84px;
  scrollbar-width: none;
}

.cards::-webkit-scrollbar {
  display: none;
}

.place-card {
  flex: 0 0 min(432px, 84vw);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #eef1f3;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 14px 36px rgba(15, 27, 45, 0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}

.place-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 46px rgba(15, 27, 45, 0.14);
}

.photo {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  flex: none;
  background: #dfe7e4;
}

.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.place-card:hover .photo img {
  transform: scale(1.05);
}

.tag-ar {
  position: absolute;
  top: 14px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 999px;
  background: linear-gradient(150deg, #14b8a6, #0d9488);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.1px;
  box-shadow: 0 5px 14px rgba(4, 59, 51, 0.35);
}

.tag-ar svg {
  width: 15px;
  height: 15px;
  color: #ffd45e;
}

.tag-dist {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(8, 26, 22, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
}

.tag-dist svg {
  width: 14px;
  height: 14px;
  color: #8ef0c3;
}

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 19px 22px 18px;
}

.card-kicker {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: #0b7c99;
}

.card-title {
  margin: 9px 0 7px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.45px;
  line-height: 1.28;
  color: var(--ink);
}

.card-desc {
  margin: 0 0 18px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-lamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid #eef1f3;
}

.badge-earned {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 600;
  color: #5b6675;
}

.badge-earned svg {
  width: 17px;
  height: 17px;
  flex: none;
  color: #e8b34c;
}

.view-ar {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 17px;
  border-radius: 999px;
  background: #e0f7fb;
  color: #0e7490;
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
  transition: background 0.18s, color 0.18s;
}

.view-ar svg {
  width: 16px;
  height: 16px;
}

.view-label,
.view-login-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.view-login-label {
  display: none;
}

body.is-guest .view-label {
  display: none;
}

body.is-guest .view-login-label {
  display: inline-flex;
}

body.is-guest .view-ar {
  padding-inline: 13px;
  font-size: 12.5px;
}

.view-ar:hover {
  background: #0891b2;
  color: #fff;
}

.load-error {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}

.load-error code {
  padding: 2px 6px;
  border-radius: 5px;
  background: #f3f6f5;
  color: #0e7490;
}

.load-error a {
  color: #0891b2;
  font-weight: 600;
}

/* ---------- Destinations ---------- */

.places--destinations .places-inner {
  padding-top: 0;
}

.cards--destinations {
  padding-bottom: 82px;
}

.cards--destinations .place-card {
  flex: 1 1 340px;
  min-width: 340px;
  max-width: 500px;
}

.tag-cat {
  position: absolute;
  top: 14px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 15px;
  border-radius: 999px;
  background: linear-gradient(150deg, #22b8d4, #0891b2);
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  box-shadow: 0 5px 14px rgba(4, 44, 59, 0.3);
}

.tag-cat svg {
  width: 15px;
  height: 15px;
}

.photo--cover {
  display: grid;
  place-items: center;
  background: linear-gradient(155deg, #1a80b3 0%, #11688f 55%, #0d557e 100%);
}

.cover-title {
  color: #fff;
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 600;
  letter-spacing: -0.2px;
}

.card-title--ocean {
  color: #0b7c99;
}

/* ---------- Hidden Places ---------- */

.places--hidden .places-inner {
  padding-top: 0;
}

.places--hidden .section-bar {
  background: linear-gradient(180deg, #f4b23a, #dd8a12);
}

.cards--hidden {
  padding-bottom: 82px;
}

.cards--hidden .place-card {
  flex: 1 1 0;
  min-width: 0;
  max-width: 500px;
}

.places--hidden .card-kicker {
  color: #b5761a;
}

.places--hidden .view-ar {
  background: #fdf4dd;
  color: #8a5a10;
}

.places--hidden .view-ar:hover {
  background: #d8860f;
  color: #fff;
}

.places--hidden .arrow:hover {
  background: #d8860f;
  border-color: #d8860f;
  box-shadow: 0 8px 18px rgba(216, 134, 15, 0.3);
}

.tag-cat--olive {
  background: linear-gradient(150deg, #7f6c34, #59451c);
  box-shadow: 0 5px 14px rgba(52, 38, 8, 0.35);
}

.tag-cat--amber {
  background: linear-gradient(150deg, #f5ba45, #e29a1c);
  color: #3d2a05;
  box-shadow: 0 5px 14px rgba(122, 78, 6, 0.28);
}

.photo--cover--brown {
  background: linear-gradient(155deg, #a55d17 0%, #8b4a10 55%, #743d0b 100%);
}

/* ---------- Explorer Map ---------- */

.places--map {
  scroll-margin-top: 92px;
}

.places--map .places-inner {
  padding-top: 54px;
}

body.is-map-view #popular-places,
body.is-map-view #destinations,
body.is-map-view #hidden-places {
  display: none;
}

body.is-map-view .place-filter {
  display: none;
}

body.is-map-view .hero {
  display: none;
}

body:not(.is-map-view) .places--map {
  display: none;
}

body.is-map-view .places--map {
  display: block;
}

body.is-map-view .places--map .places-inner {
  padding-bottom: 84px;
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  flex: none;
}

.map-legend li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(14, 116, 144, 0.14);
  font-size: 12.5px;
  font-weight: 600;
  color: #4d6070;
}

.leg-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex: none;
}

.leg-dot--visited {
  background: linear-gradient(145deg, #ffd75e, #f2a61f);
  box-shadow: 0 0 0 2px #fff, 0 2px 6px rgba(242, 166, 31, 0.5);
}

.leg-dot--todo {
  background: #fff;
  border: 2px solid #0891b2;
  box-shadow: 0 0 0 2px #fff;
}

.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.15fr) minmax(300px, 0.85fr);
  gap: 26px;
  align-items: start;
}

.map-stage {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.map-card {
  position: relative;
  padding: 16px;
  border-radius: 28px;
  background: #fff;
  border: 1px solid #e2eff3;
  box-shadow: 0 22px 48px rgba(8, 47, 73, 0.12);
  overflow: hidden;
}

.map-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 1000 / 820;
  overflow: hidden;
  border-radius: 20px;
  background: #e9f9fd;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.map-viewport.is-dragging,
.map-viewport.is-dragging .map-pin { cursor: grabbing; }

.map-viewport:focus-visible {
  outline: 3px solid rgba(8, 145, 178, 0.55);
  outline-offset: 4px;
}

.map-svg {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: #e9f9fd;
  transform-origin: 0 0;
  will-change: transform;
}

.map-zoom-controls {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 6px;
  border: 1px solid rgba(14, 116, 144, 0.18);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 24px rgba(8, 47, 73, 0.18);
  cursor: default;
}

.map-zoom-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: #eef9fb;
  color: var(--site-accent);
  cursor: pointer;
  transition: background calc(150ms * var(--site-motion, 1)), color calc(150ms * var(--site-motion, 1));
}

.map-zoom-btn:hover:not(:disabled) {
  background: var(--site-accent);
  color: var(--site-on-accent);
}

.map-zoom-btn:focus-visible {
  outline: 3px solid rgba(8, 145, 178, 0.35);
  outline-offset: 1px;
}

.map-zoom-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

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

.map-zoom-level {
  min-width: 38px;
  color: #4d6472;
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}

.map-pan-hint {
  display: block;
  margin: 10px 2px 0;
  font-size: 11.5px;
  font-weight: 600;
  color: #4f8a9c;
  text-align: center;
}

.map-title {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 3.6px;
  fill: #0b6a86;
}

.map-sub {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.6px;
  fill: #5c93a6;
}

.municipality {
  fill: url(#landGrad);
  stroke: #ffffff;
  stroke-width: 5;
  stroke-linejoin: round;
}

.highlands {
  fill: url(#ridgeGrad);
  opacity: 0.82;
}

.map-hills path {
  fill: none;
  stroke: #1f8a74;
  stroke-width: 1.8;
  stroke-linecap: round;
  opacity: 0.45;
}

.map-rivers .river {
  fill: none;
  stroke: #8fd4ea;
  stroke-width: 4.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.map-rivers .river--branch {
  stroke-width: 2.8;
  opacity: 0.85;
}

.river-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.8px;
  fill: #3d8fb0;
  opacity: 0.85;
}

.map-roads .road-casing {
  fill: none;
  stroke: #dccdaa;
  stroke-width: 10;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.map-roads .road-main {
  fill: none;
  stroke: #fffaf0;
  stroke-width: 6.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.map-roads .road-dash {
  fill: none;
  stroke: #d9a84f;
  stroke-width: 2;
  stroke-dasharray: 8 10;
  stroke-linecap: round;
  opacity: 0.75;
}

.map-roads .road-side {
  fill: none;
  stroke: #fffdf6;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.95;
}

.map-barangays .bgy circle {
  fill: #0f8f86;
  stroke: #fff;
  stroke-width: 1.8;
}

.map-barangays .bgy text {
  font-size: 12.5px;
  font-weight: 700;
  fill: #124c50;
  letter-spacing: 0.2px;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.94);
  stroke-width: 3.6px;
  stroke-linejoin: round;
  pointer-events: none;
}

.map-barangays .bgy-leader {
  stroke: #0f8f86;
  stroke-width: 1.1;
  opacity: 0.55;
}

.map-barangays .bgy--town circle {
  fill: #0e7490;
  stroke-width: 2.2;
}

.map-barangays .bgy--town text {
  font-size: 13.5px;
  font-weight: 800;
  fill: #073b4c;
}

.sea-name {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 4px;
  fill: #79b9cd;
}

.map-note {
  font-size: 10.5px;
  font-weight: 600;
  fill: #5c93a6;
  opacity: 0.85;
}

.map-neighbors text {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
  fill: #6f9d93;
  opacity: 0.85;
}

.leg-dot--barangay {
  background: #0f8f86;
  box-shadow: 0 0 0 2px #fff;
}

.visited-route {
  fill: none;
  stroke: #f2a61f;
  stroke-width: 3;
  stroke-dasharray: 1 7;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.9;
}

.map-hub .hub-line {
  stroke: #0e7490;
  stroke-width: 1.6;
  stroke-dasharray: 3 4;
  opacity: 0.7;
}

.map-hub rect { fill: #0e7490; }

.map-hub text {
  font-size: 12px;
  font-weight: 700;
  fill: #fff;
  letter-spacing: 0.2px;
}

.map-hub .hub-dot {
  fill: #0e7490;
  stroke: #fff;
  stroke-width: 2.5;
}

.map-hub .hub-pulse {
  fill: none;
  stroke: #0891b2;
  stroke-width: 2;
  transform-box: fill-box;
  transform-origin: center;
  animation: hub-pulse 2.6s ease-out infinite;
}

@keyframes hub-pulse {
  0% { transform: scale(0.5); opacity: 0.9; }
  80% { transform: scale(2); opacity: 0; }
  100% { transform: scale(2); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .map-hub .hub-pulse { animation: none; opacity: 0.6; transform: scale(1.2); }
}

.map-pin {
  cursor: pointer;
  outline: none;
}

.map-pin .pin-hit {
  fill: transparent;
  pointer-events: all;
}

.map-pin .pin-halo {
  fill: rgba(34, 211, 238, 0.24);
  opacity: 0;
  transition: opacity 0.15s;
}

.map-pin:hover .pin-halo,
.map-pin:focus-visible .pin-halo,
.map-pin.is-active .pin-halo { opacity: 1; }

.map-pin .pin-dot {
  stroke: #fff;
  stroke-width: 3;
  filter: drop-shadow(0 2px 3px rgba(8, 47, 73, 0.28));
}

.map-pin.is-visited .pin-dot {
  fill: url(#pinGold);
}

.map-pin.is-todo .pin-dot {
  fill: #ffffff;
  stroke: #0891b2;
}

.map-pin .pin-check {
  fill: none;
  stroke: #fff;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.map-pin .pin-core { fill: #0891b2; }

.map-pin .pin-label {
  font-size: 14px;
  font-weight: 800;
  fill: #0d2a38;
  text-anchor: middle;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.96);
  stroke-width: 4.5px;
  stroke-linejoin: round;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}

.map-pin:hover .pin-label,
.map-pin:focus-visible .pin-label,
.map-pin.is-active .pin-label { opacity: 1; }

.map-pin.is-active .pin-dot {
  stroke: #0e7490;
  stroke-width: 4;
}

.map-pin.is-active .pin-label { fill: #06485c; }

.map-tip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 6px 2px;
  font-size: 12.5px;
  color: var(--muted);
}

.map-tip::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #0891b2;
  flex: none;
}

.spot-detail {
  position: relative;
  padding: 22px 22px 20px;
  border-radius: 20px;
  background:
    radial-gradient(320px 180px at 100% -10%, rgba(34, 211, 238, 0.16), transparent 70%),
    #fff;
  border: 1px solid #b9e6ef;
  box-shadow: 0 18px 38px rgba(8, 47, 73, 0.12);
  animation: detail-in 0.22s ease-out;
}

.spot-detail[hidden] { display: none; }

@keyframes detail-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .spot-detail { animation: none; }
}

.detail-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid #d9ecf1;
  background: #fff;
  color: #4d7a88;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.detail-close:hover { background: #eef9fb; color: #0b6a86; }

.detail-close svg { width: 16px; height: 16px; }

.detail-kicker {
  margin: 0 28px 4px 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: #0b7c99;
}

.spot-detail h3 {
  margin: 0 28px 10px 0;
  font-size: 21px;
  line-height: 1.22;
  font-weight: 800;
  color: var(--ink);
}

.detail-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.detail-chip {
  padding: 4px 10px;
  border-radius: 999px;
  background: #f0fafc;
  border: 1px solid #d6edf3;
  font-size: 11.5px;
  font-weight: 700;
  color: #35707f;
}

.detail-chip--visited {
  background: #fff5da;
  border-color: #f6d992;
  color: #8d5a05;
}

.detail-chip--todo {
  background: #eaf8fb;
  border-color: #bde7ef;
  color: #0b6a86;
}

.detail-desc {
  margin: 0 0 14px;
  font-size: 13.5px;
  line-height: 1.65;
  color: #465d6b;
}

.detail-subhead {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: #0b7c99;
}

.detail-highlights {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: grid;
  gap: 5px;
}

.detail-highlights li {
  position: relative;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.5;
  color: #465d6b;
}

.detail-highlights li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22b8d4;
}

.detail-facts {
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: #f4fbfc;
  border: 1px solid #e2f2f5;
}

.detail-facts span {
  font-size: 12.5px;
  line-height: 1.45;
  color: #4d6472;
}

.detail-facts strong {
  font-weight: 800;
  color: #0b6274;
}

.detail-tip {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-left: 3px solid #f2a61f;
  border-radius: 0 10px 10px 0;
  background: #fff9ec;
  font-size: 12.5px;
  line-height: 1.55;
  color: #6d520f;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.detail-ar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0891b2, #0e7490);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(8, 145, 178, 0.28);
}

.detail-ar svg { width: 16px; height: 16px; }

.detail-back {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid #d6e8ee;
  background: #fff;
  font-size: 12.5px;
  font-weight: 700;
  color: #4d7a88;
  cursor: pointer;
}

.detail-back:hover { background: #f2fafb; color: #0b6a86; }

.map-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.progress-card,
.map-group {
  background: #fff;
  border: 1px solid #e7eff2;
  border-radius: 20px;
  box-shadow: 0 14px 30px rgba(8, 47, 73, 0.08);
}

.progress-card { padding: 20px 22px; }

.progress-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.progress-head span {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #0b7c99;
}

.progress-head strong {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
}

.progress-track {
  margin: 12px 0 10px;
  height: 10px;
  border-radius: 999px;
  background: #e9f5f7;
  overflow: hidden;
}

.progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22d3ee, #0891b2);
  transition: width 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.progress-note {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
}

.map-group { padding: 16px 18px 18px; }

.map-group h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #0b7c99;
}

.group-count {
  min-width: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fff3d4;
  color: #9a6206;
  font-size: 11.5px;
  font-weight: 800;
  text-align: center;
}

.group-count--todo {
  background: #e9f5f7;
  color: #0b6a86;
}

.spot-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.spot-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 9px;
  border-radius: 12px;
  border: 1px solid transparent;
  text-align: left;
  transition: background 0.15s, border-color 0.15s;
}

.spot-row:hover { background: #f3fbfc; }

.spot-row.is-active {
  background: #eaf8fb;
  border-color: #b9e6ef;
}

.spot-pin {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
}

.spot-pin svg {
  width: 16px;
  height: 16px;
}

.spot-pin.is-visited {
  background: linear-gradient(145deg, #ffd75e, #f2a61f);
  color: #fff;
  box-shadow: 0 4px 10px rgba(242, 166, 31, 0.35);
}

.spot-pin.is-todo {
  background: #fff;
  border: 1.5px solid #8fc9d8;
  color: #0891b2;
}

.spot-pin.is-todo svg {
  width: 14px;
  height: 14px;
}

.spot-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.spot-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}

.spot-sub {
  font-size: 11.8px;
  color: var(--muted);
}

/* ---------- Footer ---------- */

.site-footer {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(760px 400px at 90% -10%, rgba(34, 211, 238, 0.16), transparent 62%),
    linear-gradient(118deg, #083344 0%, #062a3a 55%, #04202c 100%);
  color: #dff5f7;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1.2px);
  background-size: 22px 22px;
  opacity: 0.45;
  pointer-events: none;
}

.footer-inner {
  position: relative;
  z-index: 1;
  max-width: 1640px;
  margin: 0 auto;
  padding: 64px 40px 48px;
  display: grid;
  grid-template-columns: 1.6fr 0.9fr 0.9fr 1.1fr;
  gap: 48px;
}

.brand--footer .brand-name {
  color: #fff;
  font-size: 22px;
}

.brand--footer .brand-name em {
  color: #5eead4;
}

.brand--footer .brand-tag {
  color: rgba(207, 250, 254, 0.6);
  white-space: normal;
}

.footer-blurb {
  margin: 20px 0 0;
  max-width: 360px;
  font-size: 14.5px;
  line-height: 1.72;
  color: rgba(207, 250, 254, 0.72);
}

.footer-col h3 {
  margin: 4px 0 17px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: #67e8f9;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 11px;
}

.footer-col a {
  font-size: 14.5px;
  color: rgba(207, 250, 254, 0.78);
  transition: color 0.18s;
}

.footer-col a:hover {
  color: #67e8f9;
}

.footer-visit p {
  margin: 0 0 16px;
  font-size: 14.5px;
  line-height: 1.65;
  color: rgba(207, 250, 254, 0.78);
}

.footer-gps {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 13px;
  font-weight: 600;
  color: #ecfeff;
  white-space: nowrap;
}

.footer-bottom {
  position: relative;
  z-index: 1;
  max-width: 1640px;
  margin: 0 auto;
  padding: 22px 40px 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 13px;
  color: rgba(207, 250, 254, 0.55);
}

.footer-bottom p {
  margin: 0;
}

/* ---------- Responsive ---------- */

@media (max-width: 1440px) {
  .brand-tag { display: none; }
  .brand-name { font-size: 22px; }
  .brand-mark { width: 52px; height: 52px; border-radius: 14px; }
  .hero-stats { min-width: 420px; }
}

@media (max-width: 1240px) {
  :root { --gutter: 28px; }
  .topbar-inner { gap: 18px; padding: 16px 28px; }
  .hero-inner { padding: 56px 28px 84px; gap: 40px; }
  .places-inner { padding: 52px 28px 0; }
  .place-filter-inner { padding: 50px 28px 26px; }
  .tab { padding: 10px 14px; font-size: 14px; }
  .hero-stats { min-width: 380px; }
  .stat { padding: 18px 18px 16px; }
  .stat-value { font-size: 26px; }
  .stat-label { font-size: 12.5px; }
  .footer-inner { padding: 56px 28px 42px; gap: 40px; }
  .footer-bottom { padding: 20px 28px 26px; }
}

@media (max-width: 1080px) {
  .tabs { display: none; }
  .topbar-actions { margin-left: auto; }
  .hero-inner { flex-direction: column; align-items: stretch; }
  .hero-stats { min-width: 0; }
  .hero {
    background:
      linear-gradient(100deg, rgba(3, 23, 34, 0.88) 0%, rgba(5, 42, 58, 0.8) 55%, rgba(6, 60, 80, 0.62) 100%),
      linear-gradient(180deg, rgba(6, 42, 58, 0) 45%, rgba(4, 26, 38, 0.42) 100%),
      url("assets/hero-beach.jpg") center 64% / cover no-repeat,
      linear-gradient(120deg, #093548 0%, #0891b2 100%);
  }
}

@media (max-width: 900px) {
  .spot-modal-card {
    display: block;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    border-radius: 0;
    box-shadow: none;
  }
  .spot-modal-hero { height: clamp(230px, 36vh, 320px); }
  .spot-modal-hero::after {
    background: linear-gradient(180deg, transparent 45%, rgba(4, 24, 34, 0.58) 100%);
  }
  .spot-modal-body { height: auto; overflow: visible; padding-top: 0; }
}

@media (max-width: 1000px) {
  .cards--destinations .place-card,
  .cards--hidden .place-card {
    flex: 0 0 min(420px, 84vw);
    max-width: none;
  }
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }
  .footer-brand { grid-column: 1 / -1; }
  .map-layout { grid-template-columns: 1fr; }
  .map-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
  .progress-card,
  .spot-detail { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .map-card { padding: 10px; }
  .map-zoom-controls { right: 8px; bottom: 8px; padding: 5px; }
  .map-zoom-btn { width: 34px; height: 34px; }
}

@media (max-width: 680px) {
  :root { --gutter: 20px; }
  .topbar-inner { padding: 14px 20px; }
  .brand-name { font-size: 18px; }
  .brand-mark { width: 46px; height: 46px; border-radius: 13px; }
  .gps-pill { display: none; }
  .hero-inner { padding: 44px 20px 64px; }
  .hero-wave svg { height: 44px; }
  .hero {
    background:
      linear-gradient(180deg, rgba(4, 28, 40, 0.9) 0%, rgba(5, 42, 58, 0.82) 55%, rgba(6, 52, 70, 0.66) 100%),
      url("assets/hero-beach.jpg") center 70% / cover no-repeat,
      linear-gradient(120deg, #093548 0%, #0891b2 100%);
  }
  .hero h1 { letter-spacing: -1px; }
  .hero-lead { font-size: 15.5px; }
  .btn { width: 100%; justify-content: center; }
  .hero-stats { padding: 12px; gap: 10px; }
  .stat { padding: 16px 10px 14px; }
  .stat-value { font-size: 24px; }
  .stat-label { font-size: 12px; white-space: normal; }
  .places-inner { padding: 40px 20px 0; }
  .place-filter-inner { padding: 36px 20px 22px; gap: 12px; }
  .filter-chip { padding: 8px 13px; font-size: 13.5px; }
  .spot-modal { padding: 0; }
  .spot-modal-hero { height: 230px; min-height: 230px; }
  .spot-modal-head { padding: 22px 20px; }
  .spot-modal-body { padding: 24px 20px 48px; }
  .spot-modal-close { top: 12px; right: 12px; width: 40px; height: 40px; }
  .spot-photo-expand { top: 62px; right: 12px; bottom: auto; padding: 8px 12px; font-size: 12px; }
  .photo-lightbox { padding: 52px 10px 18px; gap: 14px; }
  .photo-lightbox-img { max-width: 92vw; max-height: 64vh; border-radius: 10px; }
  .photo-lightbox-nav { width: 36px; height: 36px; }
  .photo-lightbox-nav svg { width: 17px; height: 17px; }
  .photo-lightbox-nav.prev { left: 6px; }
  .photo-lightbox-nav.next { right: 6px; }
  .photo-thumb img { width: 60px; height: 40px; }
  .photo-lightbox-close { top: 12px; right: 12px; width: 40px; height: 40px; }
  .ar-top { left: 12px; right: 68px; }
  .ar-close { top: 12px; right: 12px; width: 40px; height: 40px; }
  .ar-frame { width: 84vw; }
  .ar-reticle { padding-bottom: 210px; }
  .ar-status { bottom: 32px; font-size: 12.5px; white-space: normal; text-align: center; width: calc(100% - 40px); }
  .ar-detect { padding: 18px 18px 20px; border-radius: 18px; bottom: 14px; }
  .ar-detect h3 { font-size: 22px; }
  .spot-actions > * { flex: 1 1 100%; justify-content: center; text-align: center; }
  .spot-ar-btn { width: 100%; justify-content: center; }
  .places--map .places-inner { padding-top: 40px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 18px; }
  .section-titles h2 { font-size: 26px; }
  .section-bar { height: 46px; }
  .map-card { padding: 8px; border-radius: 20px; }
  .map-svg { border-radius: 14px; }
  .map-title { font-size: 15px; letter-spacing: 2.4px; }
  .map-sub { display: none; }
  .map-legend { gap: 8px; }
  .map-legend li { font-size: 11.5px; padding: 6px 10px; }
  .map-panel { grid-template-columns: 1fr; }
  .map-tip { font-size: 11.5px; }
  .cards { gap: 18px; }
  .card-title { font-size: 19px; }
  .card-body { padding: 17px 18px 16px; }
  .footer-inner { grid-template-columns: 1fr; padding: 48px 20px 36px; gap: 32px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; padding: 20px 20px 26px; }
}

/* ---------- Explorer Quests ---------- */

body.is-quests-view #popular-places,
body.is-quests-view #destinations,
body.is-quests-view #hidden-places,
body.is-quests-view .place-filter,
body.is-quests-view .hero {
  display: none;
}

body:not(.is-quests-view) .places--quests {
  display: none;
}

body.is-quests-view .places--quests {
  display: block;
}

.places--quests {
  scroll-margin-top: 92px;
}

.places--quests .places-inner {
  padding-bottom: 84px;
}

.quest-level {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 28px 30px;
  margin-bottom: 34px;
  border-radius: 22px;
  color: #eaf7fb;
  background:
    radial-gradient(620px 220px at 0% 0%, rgba(94, 234, 212, 0.24), transparent 62%),
    linear-gradient(115deg, #0b5f7a 0%, #0e7490 52%, #0891b2 100%);
  box-shadow: 0 18px 40px rgba(6, 42, 58, 0.24);
}

.quest-level-badge {
  width: 88px;
  height: 88px;
  flex: none;
  border-radius: 24px;
  display: grid;
  place-items: center;
  gap: 2px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.26);
  color: #ffe27a;
}

.quest-level-badge svg {
  width: 30px;
  height: 30px;
}

.quest-level-badge span {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #fff;
}

.quest-level-info {
  flex: 1;
  min-width: 0;
}

.quest-level-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.quest-level-row strong {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: #fff;
}

.quest-level-row span {
  font-size: 14px;
  font-weight: 800;
  color: #ffe27a;
  white-space: nowrap;
}

.quest-xp-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
}

.quest-xp-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #f5ba45, #ffe27a);
  transition: width 0.45s ease;
}

.quest-level-note {
  margin: 10px 0 0;
  font-size: 13.5px;
  color: rgba(224, 247, 250, 0.75);
}

.quest-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.quest-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(15, 27, 45, 0.06);
}

.quest-card.is-done {
  border-color: rgba(18, 169, 108, 0.35);
  background: linear-gradient(180deg, #f2fbf7, #fff 60%);
}

.quest-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.quest-icon {
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #e6f7fb;
  color: #0e7490;
}

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

.quest-card.is-done .quest-icon {
  background: #dcf6e9;
  color: #0b7a52;
}

.quest-title h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.quest-reward {
  margin: 4px 0 0;
  font-size: 13px;
  font-weight: 800;
  color: #0e7490;
}

.quest-status {
  margin-left: auto;
  flex: none;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  background: #eef7fa;
  color: #0b6b85;
}

.quest-card.is-done .quest-status {
  background: #dff6ea;
  color: #0b7a52;
}

.quest-blurb {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--muted);
}

.quest-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
}

.quest-track {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: #eef1f4;
  overflow: hidden;
}

.quest-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22d3ee, #0891b2);
  transition: width 0.4s ease;
}

.quest-card.is-done .quest-track span {
  background: linear-gradient(90deg, #34d399, #12a96c);
}

.quest-count {
  flex: none;
  font-size: 13px;
  font-weight: 800;
  color: #3b4757;
}

.quest-note {
  margin: 22px 0 0;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- Explorer Progress ---------- */

body.is-progress-view #popular-places,
body.is-progress-view #destinations,
body.is-progress-view #hidden-places,
body.is-progress-view .place-filter,
body.is-progress-view .hero {
  display: none;
}

body:not(.is-progress-view) .places--progress {
  display: none;
}

body.is-progress-view .places--progress {
  display: block;
}

.places--progress {
  scroll-margin-top: 92px;
}

.places--progress .places-inner {
  padding-bottom: 84px;
}

.progress-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}

.progress-main {
  display: grid;
  gap: 24px;
  min-width: 0;
}

.progress-current-card {
  position: sticky;
  top: 112px;
  padding: 28px;
}

.progress-current-kicker {
  margin: 0 0 16px;
  color: #0e7490;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.progress-current-badge {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 22px;
  border-radius: 18px;
  background: linear-gradient(135deg, #0b5f7a, #0891b2);
  color: #fff;
  box-shadow: 0 12px 28px rgba(8, 145, 178, 0.2);
}

.progress-current-badge strong {
  font-size: 30px;
  line-height: 1;
}

.progress-current-badge span {
  font-size: 15px;
  font-weight: 700;
}

.progress-current-xp {
  margin: 18px 0 10px;
  color: var(--muted);
  font-size: 13.5px;
}

.progress-current-xp strong {
  color: #0d2a38;
}

.progress-next-track {
  height: 9px;
  border-radius: 999px;
  background: #e7eef1;
  overflow: hidden;
}

.progress-next-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f2a61f, #f7c955);
  transition: width 0.4s ease;
}

.progress-next-note {
  margin: 10px 0 22px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.level-history {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.level-history-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfdfe;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
}

.level-history-item:hover {
  border-color: #a9dce7;
  background: #f2fbfd;
}

.level-history-item:focus-visible {
  outline: 3px solid rgba(8, 145, 178, 0.28);
  outline-offset: 2px;
}

.level-history-item.is-current {
  border-color: #a9dce7;
  background: #eefafc;
}

.level-history-item.is-selected {
  border-color: #0891b2;
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.12);
}

.level-history-marker {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #dcf5eb;
  color: #0b7a52;
}

.level-history-marker svg {
  width: 19px;
  height: 19px;
}

.level-history-item.is-current .level-history-marker {
  background: #fff1c9;
  color: #9a6505;
}

.level-history-copy {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.level-history-copy span {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.level-history-copy strong {
  color: #0d2a38;
  font-size: 15px;
}

.level-history-status {
  flex: none;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e6f7fb;
  color: #0e7490;
  font-size: 11px;
  font-weight: 800;
}

.level-history-item.is-current .level-history-status {
  background: #fff1c9;
  color: #8a5a06;
}

.level-detail {
  margin-top: 22px;
  padding: 18px;
  border: 1px solid #cfe9ef;
  border-radius: 16px;
  background: #f6fbfc;
}

.level-detail[hidden] {
  display: none;
}

.level-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.level-detail-head h3 {
  margin: 0;
  color: #0d2a38;
  font-size: 15px;
  line-height: 1.4;
}

.level-detail-head > strong {
  flex: none;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff1c9;
  color: #8a5a06;
  font-size: 12px;
}

.level-detail-summary {
  margin: 8px 0 14px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.level-detail-quests {
  display: grid;
  gap: 8px;
}

.completed-quest {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border: 1px solid #e1edef;
  border-radius: 12px;
  background: #fff;
}

.completed-quest-check {
  width: 28px;
  height: 28px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #dcf5eb;
  color: #0b7a52;
}

.completed-quest-check svg {
  width: 15px;
  height: 15px;
}

.completed-quest-copy {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.completed-quest-copy strong {
  color: #0d2a38;
  font-size: 13px;
}

.completed-quest-copy span {
  color: var(--muted);
  font-size: 11px;
}

.completed-quest-xp {
  flex: none;
  color: #0e7490;
  font-size: 12px;
}

.level-detail-empty {
  margin: 0;
  padding: 12px;
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

@media (max-width: 880px) {
  .progress-layout {
    grid-template-columns: 1fr;
  }

  .progress-current-card {
    position: static;
  }

  .quest-grid {
    grid-template-columns: 1fr;
  }

  .quest-level {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    padding: 24px 22px;
  }

  .quest-level-badge {
    width: 72px;
    height: 72px;
    border-radius: 20px;
  }

  .quest-level-row strong {
    font-size: 19px;
  }
}

/* ---------- Sign-in ---------- */

.login-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 20px;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 14.5px;
  font-weight: 700;
  white-space: nowrap;
  transition: background 0.18s, border-color 0.18s;
}

.login-btn svg {
  width: 19px;
  height: 19px;
}

.login-btn:hover {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.62);
}

.login-btn[hidden],
.account-chip[hidden] {
  display: none;
}

.account-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 48px;
  padding: 0 16px 0 7px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  transition: background 0.18s, border-color 0.18s;
}

.account-chip:hover {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.62);
}

.account-chip.is-active {
  border-color: #fff;
  background: #fff;
  color: #0e7490;
  box-shadow: 0 6px 16px rgba(3, 42, 57, 0.28);
}

.account-avatar {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #f7c455, #f0a13b);
  color: #0b3b4d;
  font-size: 15px;
  font-weight: 800;
}

.account-name {
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14.5px;
  font-weight: 700;
}

body.auth-open {
  overflow: hidden;
}

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

.auth-modal[hidden] {
  display: none;
}

.auth-modal [hidden] {
  display: none !important;
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 30, 42, 0.66);
  backdrop-filter: blur(8px);
}

.auth-card {
  position: relative;
  width: min(440px, 100%);
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  padding: 30px 30px 24px;
  border-radius: var(--site-radius);
  background: var(--site-surface);
  box-shadow: 0 34px 90px rgba(4, 30, 42, 0.42);
  outline: none;
  animation: auth-in calc(240ms * var(--site-motion, 1)) ease-out;
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  border-radius: 24px 24px 0 0;
  background: linear-gradient(90deg, #0891b2, #22d3ee 55%, #f2a61f);
}

@keyframes auth-in {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

.auth-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #5b6878;
  background: #f2f6f8;
  transition: background 0.18s, color 0.18s;
}

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

.auth-close:hover {
  background: #e5edf1;
  color: var(--ink);
}

.auth-head {
  margin-bottom: 18px;
}

.auth-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  border-radius: 14px;
  background: linear-gradient(145deg, #22d3ee, #0891b2);
  box-shadow: 0 8px 18px rgba(8, 145, 178, 0.3);
}

.auth-mark svg {
  width: 26px;
  height: 26px;
}

.auth-google-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 4px 14px rgba(15, 27, 45, 0.08);
}

.auth-google-mark svg {
  width: 24px;
  height: 24px;
}

.auth-head h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.4px;
  line-height: 1.2;
}

.auth-sub {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

.auth-saved {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px dashed #b9dbe4;
  border-radius: 14px;
  background: #f0fafc;
}

.auth-saved-avatar {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #22d3ee, #0891b2);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
}

.auth-saved-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.auth-saved-copy strong {
  font-size: 14.5px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-saved-copy span {
  font-size: 12.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-saved-btn {
  flex: none;
  padding: 9px 14px;
  border-radius: 10px;
  background: #0e7490;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  transition: background 0.18s;
}

.auth-saved-btn:hover {
  background: #0b5f7a;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.auth-field {
  display: block;
}

.auth-label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 700;
  color: #3b4757;
}

.auth-field input {
  width: 100%;
  height: 47px;
  padding: 0 15px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fbfdfe;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  transition: border-color 0.16s, box-shadow 0.16s, background 0.16s;
}

.auth-field input::placeholder {
  color: #9aa6b3;
}

.auth-field input:focus {
  outline: none;
  border-color: #0891b2;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.14);
}

.auth-field.is-invalid input {
  border-color: #e5484d;
  background: #fffafb;
}

.auth-field.is-invalid input:focus {
  box-shadow: 0 0 0 4px rgba(229, 72, 77, 0.13);
}

.auth-error {
  display: block;
  margin-top: 6px;
  font-size: 12.5px;
  font-style: normal;
  font-weight: 600;
  line-height: 1.4;
  color: #cf2e2e;
}

.auth-error:empty {
  display: none;
}

.auth-submit {
  height: 48px;
  margin-top: 2px;
  border-radius: 12px;
  background: linear-gradient(115deg, #0e7490 0%, #0891b2 60%, #06b6d4 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.1px;
  box-shadow: 0 12px 24px rgba(8, 145, 178, 0.28);
  transition: transform 0.16s, box-shadow 0.16s, filter 0.16s;
}

.auth-submit:hover {
  filter: brightness(1.04);
  box-shadow: 0 14px 28px rgba(8, 145, 178, 0.34);
}

.auth-submit:active {
  transform: translateY(1px);
}

.auth-google-wrap {
  margin-top: 16px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #93a0ae;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.auth-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 48px;
  border: 1.5px solid #dbe3e9;
  border-radius: 12px;
  background: #fff;
  color: #2b3846;
  font-size: 14.5px;
  font-weight: 700;
  transition: background 0.18s, border-color 0.18s, box-shadow 0.18s;
}

.auth-google svg {
  width: 20px;
  height: 20px;
}

.auth-google:hover {
  background: #f8fbfd;
  border-color: #c3d2db;
  box-shadow: 0 6px 16px rgba(15, 27, 45, 0.07);
}

.auth-switch {
  margin: 18px 0 0;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

.auth-switch button {
  color: #0e7490;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 2px;
}

.auth-switch button:hover {
  color: #0b5f7a;
}

.auth-note {
  margin: 18px 0 0;
  font-size: 12px;
  line-height: 1.55;
  color: #8c99a7;
  text-align: center;
}

/* Google chooser */

.auth-google-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.auth-google-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: 13px;
  background: #fff;
  text-align: left;
  transition: background 0.16s, border-color 0.16s;
}

.auth-google-row:hover {
  background: #f4fafc;
  border-color: #b9dbe4;
}

.auth-google-row-avatar {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #f7c455, #f0a13b);
  color: #0b3b4d;
  font-size: 15px;
  font-weight: 800;
}

.auth-google-row-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.auth-google-row-copy strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.auth-google-row-copy span {
  font-size: 12.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-google-empty {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f6fafb;
  font-size: 13px;
  color: var(--muted);
}

.auth-form--google {
  margin-bottom: 4px;
}

.auth-submit--google {
  background: #fff;
  border: 1.5px solid #dbe3e9;
  color: #2b3846;
  box-shadow: none;
}

.auth-submit--google:hover {
  background: #f8fbfd;
  box-shadow: 0 6px 16px rgba(15, 27, 45, 0.07);
  filter: none;
}

.auth-back {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 10px;
  border-radius: 10px;
  color: #0e7490;
  font-size: 13.5px;
  font-weight: 700;
}

.auth-back:hover {
  background: #f0fafc;
}

.auth-toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  z-index: 420;
  max-width: min(420px, calc(100vw - 40px));
  padding: 13px 20px;
  border-radius: 12px;
  background: #0b2b38;
  color: #f0fbfd;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  box-shadow: 0 16px 40px rgba(4, 30, 42, 0.35);
  opacity: 0;
  transform: translate(-50%, 12px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  pointer-events: none;
}

.auth-toast[hidden] {
  display: none;
}

.auth-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 680px) {
  .auth-modal {
    padding: 14px;
  }

  .auth-card {
    padding: 28px 22px 22px;
    border-radius: 20px;
  }

  .account-chip {
    padding: 0 7px;
    width: 48px;
    justify-content: center;
  }

  .account-chip .account-name {
    display: none;
  }

  .login-btn {
    padding: 0 15px;
  }
}

/* ---------- Badge collection ---------- */

body.badges-open {
  overflow: hidden;
}

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

.badge-modal[hidden] {
  display: none;
}

.badge-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 30, 42, 0.72);
  backdrop-filter: blur(8px);
}

.badge-card {
  position: relative;
  width: min(940px, 100%);
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  padding: 32px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 34px 90px rgba(4, 30, 42, 0.42);
  outline: none;
  animation: auth-in 0.24s ease-out;
}

.badge-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  border-radius: 24px 24px 0 0;
  background: linear-gradient(90deg, #0891b2, #22d3ee 55%, #f2a61f);
}

.badge-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #5b6878;
  background: #f2f6f8;
  transition: background 0.18s, color 0.18s;
}

.badge-close:hover {
  background: #e5edf1;
  color: var(--ink);
}

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

.badge-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-right: 48px;
}

.badge-kicker {
  display: block;
  margin-bottom: 7px;
  color: #0e7490;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.badge-head h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.7px;
}

.badge-head p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.badge-total {
  flex: none;
  min-width: 116px;
  padding: 13px 16px;
  border: 1px solid #d9eef2;
  border-radius: 15px;
  background: #f3fafb;
  text-align: center;
}

.badge-total strong {
  display: block;
  color: #0e7490;
  font-size: 25px;
  font-weight: 800;
  line-height: 1;
}

.badge-total span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.badge-progress {
  height: 8px;
  margin: 22px 0 24px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6f0f3;
}

.badge-progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0891b2, #22d3ee 65%, #f2a61f);
  transition: width 0.24s ease;
}

.badge-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.badge-item {
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1.5px solid #e2eaee;
  border-radius: 16px;
  background: #fff;
  font: inherit;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 5px 16px rgba(15, 27, 45, 0.04);
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
}

.badge-item:hover {
  transform: translateY(-3px);
  border-color: #9bd6df;
  box-shadow: 0 14px 28px rgba(8, 145, 178, 0.13);
}

.badge-item:focus-visible {
  outline: 3px solid rgba(8, 145, 178, 0.3);
  outline-offset: 3px;
}

.badge-item.is-earned {
  border-color: #b7dfe5;
}

.badge-item-photo {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #dce9ed;
}

.badge-item-photo::after {
  content: "";
  position: absolute;
  inset: 45% 0 0;
  background: linear-gradient(transparent, rgba(3, 27, 36, 0.45));
  pointer-events: none;
}

.badge-item-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.24s, filter 0.24s;
}

.badge-item:hover .badge-item-photo img {
  transform: scale(1.04);
}

.badge-item.is-locked .badge-item-photo img {
  filter: grayscale(0.75) brightness(0.85);
}

.badge-item-status {
  position: absolute;
  bottom: 11px;
  left: 11px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #52616f;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.badge-item-status svg {
  width: 13px;
  height: 13px;
}

.badge-item.is-earned .badge-item-status {
  color: #076b7c;
}

.badge-item-medal {
  position: absolute;
  top: 11px;
  right: 11px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 2px solid rgba(255, 255, 255, 0.88);
  border-radius: 50%;
  color: #76510b;
  background: linear-gradient(145deg, #ffe58c, #f2b52e);
  box-shadow: 0 5px 14px rgba(117, 81, 11, 0.23);
}

.badge-item-medal svg {
  width: 22px;
  height: 22px;
}

.badge-item.is-locked .badge-item-medal {
  color: #77838d;
  background: linear-gradient(145deg, #f2f5f6, #cdd7dc);
  box-shadow: 0 5px 14px rgba(15, 27, 45, 0.16);
}

.badge-item-body {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 14px 15px 15px;
}

.badge-item-body strong {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
}

.badge-item-body > span {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.45;
}

.badge-note {
  margin: 22px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
  text-align: center;
}

.badge-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 32px;
  border-radius: 14px;
  background: #f5fafb;
  color: var(--muted);
  text-align: center;
}

/* ---------- Sign-in loading ---------- */

.auth-loading {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  border-radius: inherit;
  background: #fff;
  text-align: center;
}

.auth-loading::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  border-radius: 24px 24px 0 0;
  background: linear-gradient(90deg, #0891b2, #22d3ee 55%, #f2a61f);
}

.auth-loading[hidden] {
  display: none;
}

.auth-spinner {
  width: 48px;
  height: 48px;
  margin-bottom: 18px;
  border: 4px solid #d9eef2;
  border-top-color: #0891b2;
  border-radius: 50%;
  animation: auth-spin 0.8s linear infinite;
}

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

.auth-loading strong {
  font-size: 18px;
  font-weight: 800;
}

.auth-loading p {
  max-width: 280px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

@media (max-width: 880px) {
  .badge-card {
    padding: 28px 24px 24px;
  }

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

@media (max-width: 560px) {
  .badge-modal {
    padding: 10px;
  }

  .badge-card {
    max-height: calc(100dvh - 20px);
    padding: 26px 18px 22px;
    border-radius: 20px;
  }

  .badge-head {
    align-items: flex-start;
    gap: 12px;
    padding-right: 38px;
  }

  .badge-head h2 {
    font-size: 23px;
  }

  .badge-total {
    min-width: 84px;
    padding: 11px 10px;
  }

  .badge-total strong {
    font-size: 21px;
  }

  .badge-total span {
    font-size: 9.5px;
  }

  .badge-grid {
    grid-template-columns: 1fr;
  }

  .badge-close {
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
  }
}

/* ---------- Settings ---------- */

body.is-settings-view #popular-places,
body.is-settings-view #destinations,
body.is-settings-view #hidden-places,
body.is-settings-view .place-filter,
body.is-settings-view .hero {
  display: none;
}

body:not(.is-settings-view) .places--settings {
  display: none;
}

body.is-settings-view .places--settings {
  display: block;
}

.places--settings {
  scroll-margin-top: 92px;
}

.places--settings .places-inner {
  padding-bottom: 84px;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: start;
}

.settings-card {
  min-width: 0;
  padding: 24px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 27, 45, 0.06);
}

.settings-card-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
}

.settings-icon {
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 12px;
  display: grid;
  place-items: center;
  border: 1px solid #cfe9ef;
  background: linear-gradient(145deg, #e6f9fc, #d3f2f8);
  color: #0e7490;
}

.settings-icon svg {
  width: 21px;
  height: 21px;
}

.settings-card-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.2px;
}

.settings-card-head p {
  margin: 5px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.settings-guest {
  padding: 12px 6px 4px;
  text-align: center;
}

.settings-guest-text {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

.settings-guest-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.settings-form[hidden] {
  display: none;
}

.settings-id-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px dashed #b9dbe4;
  background: #f0fafc;
}

.settings-avatar {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #22d3ee, #0891b2);
  color: #fff;
  font-size: 17px;
  font-weight: 800;
}

.settings-id-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.settings-id-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 700;
}

.settings-id-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
  color: var(--muted);
}

.settings-provider {
  flex: none;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #cfe9ef;
  background: #fff;
  color: #0e7490;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.settings-provider[hidden] {
  display: none;
}

.setting-field {
  display: block;
  margin-bottom: 14px;
}

.setting-label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 700;
  color: #3b4757;
}

.setting-field input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1.5px solid var(--line);
  border-radius: 11px;
  background: #fbfdfe;
  font: inherit;
  font-size: 14.5px;
  color: var(--ink);
  transition: border-color 0.16s, box-shadow 0.16s, background 0.16s;
}

.setting-field input:focus {
  outline: none;
  border-color: #0891b2;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.13);
}

.setting-field input[readonly] {
  background: #f4f8fa;
  color: #6b7787;
}

.setting-field.is-invalid input {
  border-color: #e5484d;
  background: #fffafb;
}

.setting-field.is-invalid input:focus {
  box-shadow: 0 0 0 4px rgba(229, 72, 77, 0.13);
}

.setting-error,
.setting-hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
}

.setting-error {
  font-weight: 600;
  color: #cf2e2e;
}

.setting-hint {
  color: #8c99a7;
}

.setting-error:empty {
  display: none;
}

.settings-form-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.settings-btn {
  height: 44px;
  padding: 0 18px;
  border-radius: 11px;
  border: 1.5px solid var(--line);
  background: #fff;
  color: #3b4757;
  font-size: 14px;
  font-weight: 700;
  transition: background 0.16s, border-color 0.16s, box-shadow 0.16s, filter 0.16s;
}

.settings-btn:hover {
  background: #f6fafb;
  border-color: #cbd7de;
}

.settings-btn--primary {
  border-color: transparent;
  background: linear-gradient(115deg, #0e7490 0%, #0891b2 60%, #06b6d4 100%);
  color: #fff;
  box-shadow: 0 10px 20px rgba(8, 145, 178, 0.24);
}

.settings-btn--primary:hover {
  filter: brightness(1.04);
  border-color: transparent;
}

.settings-btn--danger {
  border-color: #f3c3c1;
  color: #b42318;
}

.settings-btn--danger:hover {
  border-color: #e9a29f;
  background: #fef4f3;
}

.settings-btn--danger-ghost {
  border-color: transparent;
  background: transparent;
  color: #b42318;
}

.settings-btn--danger-ghost:hover {
  border-color: transparent;
  background: #fef4f3;
}

.settings-empty {
  margin: 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: #f6fafb;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
}

.settings-empty[hidden] {
  display: none;
}

.settings-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.settings-stat {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #e3f1f4;
  background: #f4fafb;
}

.settings-stat strong {
  display: block;
  color: #0e7490;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
}

.settings-stat span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.settings-reset {
  padding-top: 16px;
  margin-top: 4px;
  border-top: 1px solid var(--line);
}

.settings-reset > p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.settings-confirm {
  margin-top: 14px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #f3c3c1;
  background: #fff7f6;
}

.settings-confirm[hidden] {
  display: none;
}

.settings-confirm p {
  margin: 0 0 12px;
  color: #8a2c25;
  font-size: 13px;
  font-weight: 700;
}

.settings-confirm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 880px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .settings-card {
    padding: 20px;
  }
}

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