/* ==========================================================================
   JAX TRAVEL SCAVENGER HUNT — STYLES
   Mobile-first. Theme colors/fonts are set as CSS custom properties at
   runtime from HUNT_CONFIG.theme (see js/app.js applyTheme()). Fallback
   values below match this sample's palette — deliberately coordinated
   with the companion "Jania's 46th Birthday Escape" Master Digital
   Itinerary (deep aubergine/plum, champagne gold, warm ivory, Fraunces +
   Inter) so the two feel like one trip experience.
   ========================================================================== */

:root {
  --gradient-1: #32261C;
  --gradient-2: #433326;
  --gradient-3: #513e2e;
  --gradient-4: #624A36;
  --plum-mid: #795c44;
  --accent-gold: #C5A46D;
  --gold-deep: #9C7D48;
  --gold-pale: #E2CDA2;
  --gold-tint: #F4EAD7;
  --lavender: #D5CCC0;
  --surface: #FFFDFB;
  --surface-muted: #F7F2EA;
  --ink: #211c18;
  --ink-muted: #928174;
  --danger: #A8453F;
  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --shadow-soft: 0 20px 50px -28px rgba(50, 38, 28, 0.4);
  --shadow-lift: 0 16px 36px -14px rgba(50, 38, 28, 0.32);

  /* Glass system — translucent smoked-plum surfaces floating over the
     fixed Bali background (see .site-background below), reusing the exact
     tokens/approach approved for the companion Master Itinerary's "Bali
     Luxe" visual system. Opacity on the fills stays high enough (≥0.56)
     that every card is fully readable even where backdrop-filter isn't
     supported — blur/saturate (applied via @supports further down) is a
     progressive enhancement, never a readability dependency. */
  --glass-fill: linear-gradient(160deg, rgba(66, 49, 36, 0.62) 0%, rgba(25, 19, 14, 0.74) 100%);
  --glass-fill-soft: linear-gradient(160deg, rgba(66, 49, 36, 0.5) 0%, rgba(25, 19, 14, 0.6) 100%);
  --glass-fill-strong: linear-gradient(160deg, rgba(66, 49, 36, 0.8) 0%, rgba(25, 19, 14, 0.88) 100%);
  /* Reserved for "complete"/"unlocked" states — a warm champagne-to-plum
     wash, visibly brighter than the standard plum glass, so completed
     challenges and unlocked achievements read as clearly distinct at a
     glance rather than through opacity/grayscale alone. */
  --glass-complete-fill: linear-gradient(150deg, rgba(197, 164, 109, 0.4) 0%, rgba(66, 49, 36, 0.7) 100%);
  --glass-inner-glow: radial-gradient(120% 140% at 50% -10%, rgba(226, 205, 162, 0.14) 0%, rgba(226, 205, 162, 0) 46%);
  --glass-border: rgba(226, 205, 162, 0.28);
  --glass-border-strong: rgba(226, 205, 162, 0.55);
  --glass-shadow: 0 24px 56px -24px rgba(12, 9, 6, 0.72), 0 2px 10px -2px rgba(12, 9, 6, 0.42);
  --glass-shadow-soft: 0 16px 36px -20px rgba(12, 9, 6, 0.6);
  --glass-blur: blur(20px) saturate(150%);
  --glass-deep: #19130E;

  /* Blush-pink glass — reserved for bonus/2X challenge cards only, so
     "bonus" reads as its own distinct family at a glance, never used for
     regular cards. Deepens toward its base the same way the standard plum
     glass does, so title/description text at the bottom of the card keeps
     full contrast; the complete variant is brighter/more saturated so a
     checked bonus card still reads as clearly "done." */
  --glass-rose-fill: linear-gradient(165deg, rgba(207, 188, 163, 0.38) 0%, rgba(155, 125, 100, 0.56) 55%, rgba(83, 66, 52, 0.7) 100%);
  --glass-rose-complete-fill: linear-gradient(150deg, rgba(230, 217, 200, 0.5) 0%, rgba(180, 145, 117, 0.62) 50%, rgba(102, 81, 63, 0.72) 100%);
  --glass-rose-border: rgba(224, 207, 184, 0.55);
  --glass-rose-border-strong: rgba(224, 207, 184, 0.78);
  --accent-rose: #AB7F5B;
  --rose-pale: #E5D6C3;

  /* Text palette for anything sitting on glass/the Bali background —
     warm ivory for primary text, softer ivory for secondary/body copy,
     champagne (the existing gold tokens) for accents and labels. */
  --ivory: #F7F0E6;
  --ivory-soft: rgba(247, 240, 230, 0.8);
  --ivory-faint: rgba(247, 240, 230, 0.56);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: transparent;
  color: var(--ivory);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- FULL-PAGE BALI BACKGROUND ----------
   position:fixed (an actual element, not background-attachment:fixed,
   which is unreliable in mobile Safari/saved-to-home-screen mode) at
   z-index:-1 so it sits behind every section through the footer. body
   must stay transparent (set above) for this to ever be visible — body's
   own in-flow background would otherwise paint in front of it. --site-bg-*
   are set at runtime from HUNT_CONFIG.siteBackground by
   applySiteBackground() in js/app.js. The fallback color below lives on
   .site-background itself (fully behind the image layer), so it's safe
   as an opaque fill for the brief window before the image loads. */
.site-background {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background-color: var(--gradient-1);
}

.site-background-image {
  position: absolute;
  inset: 0;
  background-image: var(--site-bg-image, none);
  background-position: var(--site-bg-position, center);
  background-size: cover;
  background-repeat: no-repeat;
}

.site-background-overlay {
  position: absolute;
  inset: 0;
  background: var(--site-bg-overlay, transparent);
}

.app {
  max-width: 640px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

button {
  font-family: inherit;
  cursor: pointer;
}

/* ---------- TOP NAV ----------
   Translucent dark-plum glass + champagne-gold text, matching the rest of
   this page's Bali glass system. Sits above the hero, inside the same
   centered .app shell as everything else. Structure/behavior modeled on
   the JazzeeXscapes 40s/50s Island Hunt's own page nav — this hunt is its
   own standalone site, so the back link opens the companion itinerary in
   a new tab rather than navigating away. */
.page-nav {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: max(14px, env(safe-area-inset-top)) 16px 14px;
  background-image: var(--glass-inner-glow), var(--glass-fill-strong);
  background-color: transparent;
  border-bottom: 1px solid var(--glass-border);
}

@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .page-nav {
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
  }
}

.page-nav-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gold-pale);
  text-decoration: none;
  white-space: nowrap;
}

.page-nav-back:active {
  color: var(--accent-gold);
}

.page-nav-back--disabled {
  opacity: 0.6;
}

.page-nav-brand {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gold-pale);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ---------- HERO ---------- */

.hero {
  position: relative;
  overflow: hidden;
}

/* Plain brand gradient — visible briefly before the hero image loads, and
   as the full hero background whenever HUNT_CONFIG.heroImage is unset.
   The real artwork (full, uncropped) is the <img class="hero-image">
   element below, not a CSS background — see index.html + heroImage in
   js/config.js. */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(160deg, var(--gradient-1) 0%, var(--gradient-2) 38%, var(--gradient-3) 68%, var(--gradient-4) 100%);
}

/* Full-width, full aspect ratio — width:100%/height:auto guarantees the
   entire image (including its own baked-in title and gold frame) is
   always shown with zero cropping, on every screen size. No object-fit
   tricks or overlay text are used on top of it. The hero has no content
   or padding below the image — it ends exactly at the image's bottom
   edge, flowing straight into the game-intro card below. */
.hero-image {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- MAIN / GAME INTRO / DASHBOARD ---------- */

.main {
  flex: 1;
  padding: 0 16px 24px;
}

.game-intro {
  margin-top: 16px;
}

.game-intro-card {
  background-image: var(--glass-inner-glow), var(--glass-fill);
  background-color: transparent;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  padding: 22px 20px 20px;
  text-align: center;
}

@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .game-intro-card {
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
  }
}

.game-intro-headline {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(17px, 4.6vw, 20px);
  line-height: 1.35;
  color: var(--ivory);
}

.game-intro-stats {
  margin: 0 0 12px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gold-pale);
}

.game-intro-dot {
  color: var(--ivory-faint);
  margin: 0 1px;
}

.game-intro-copy {
  margin: 0 auto;
  max-width: 46ch;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ivory-soft);
}

.dashboard {
  margin-top: 16px;
}

/* Scorecard — rounded ivory card, thin gold border, rank badge. Structure
   modeled on the JazzeeXscapes 40s/50s Island Hunt's personal score card;
   colors are this page's own gold/aubergine/plum palette. */
.dashboard-card {
  background-image: var(--glass-inner-glow), var(--glass-fill);
  background-color: transparent;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  padding: 22px 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .dashboard-card {
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
  }
}

.score-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.score-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-pale);
}

.score-value {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(38px, 9vw, 52px);
  line-height: 1;
  color: var(--ivory);
  font-variant-numeric: tabular-nums;
}

.score-pts {
  font-size: 0.36em;
  font-weight: 700;
  letter-spacing: 0.08em;
  vertical-align: middle;
  color: var(--accent-gold);
}

.score-max {
  font-size: 12.5px;
  color: var(--ivory-faint);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--accent-gold);
  color: var(--glass-deep);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
}

.progress-track {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(25, 19, 14, 0.4);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gradient-1) 0%, var(--gradient-3) 55%, var(--accent-gold) 100%);
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.progress-caption {
  margin: 0;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--ivory-soft);
}

.progress-encouragement {
  margin: 2px 0 0;
  text-align: center;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--gold-pale);
}

/* ---------- CATEGORIES ---------- */

.categories {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.category-card {
  background-image: var(--glass-inner-glow), var(--glass-fill);
  background-color: transparent;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: var(--glass-shadow-soft);
  overflow: hidden;
}

@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .category-card {
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
  }
}

.category-header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px;
  background: transparent;
  border: none;
  text-align: left;
}

.category-header:active {
  background: rgba(226, 205, 162, 0.08);
}

.category-icon {
  font-size: 26px;
  line-height: 1;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(25, 19, 14, 0.3);
}

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

.category-name {
  display: block;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  color: var(--ivory);
}

.category-desc {
  display: block;
  font-size: 12.5px;
  color: var(--ivory-faint);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-progress-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.mini-progress-track {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: rgba(25, 19, 14, 0.4);
  overflow: hidden;
}

.mini-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gradient-2), var(--accent-gold));
  transition: width 0.4s ease;
}

.category-count {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ivory-faint);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.category-count.is-complete {
  color: var(--gold-pale);
}

.category-chevron {
  flex-shrink: 0;
  font-size: 14px;
  color: var(--gold-pale);
  transition: transform 0.25s ease;
}

.category-card.is-open .category-chevron {
  transform: rotate(180deg);
}

.category-card.is-complete .category-icon {
  background: rgba(226, 205, 162, 0.22);
}

.category-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease;
}

.category-card.is-open .category-body {
  grid-template-rows: 1fr;
}

.category-body-inner {
  overflow: hidden;
}

/* ---------- CHALLENGE CARDS ----------
   Structural inspiration: the JazzeeXscapes Nolarette Hunt's challenge-card
   grid. Lives INSIDE each category accordion's expanded body — the
   accordion still controls overall page length; this only changes how an
   OPEN category's challenges are presented (individual tappable cards
   instead of one-line rows). 1 column on mobile, 2 on tablet, 3 on desktop. */

.challenge-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 4px 10px 12px;
}

@media (min-width: 640px) {
  .challenge-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

@media (min-width: 1020px) {
  .challenge-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }
}

.challenge-card {
  position: relative;
}

.challenge-card-btn {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 16px 14px;
  text-align: left;
  background-image: var(--glass-inner-glow), var(--glass-fill-soft);
  background-color: transparent;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  font-family: inherit;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, transform 0.15s ease;
}

@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .challenge-card-btn {
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
  }
}

.challenge-card-btn:active {
  transform: scale(0.98);
}

.challenge-card-check {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid var(--glass-border-strong);
  background: rgba(255, 255, 255, 0.14);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.challenge-card-check svg {
  width: 13px;
  height: 13px;
}

.challenge-card-icon {
  font-size: 24px;
  line-height: 1;
}

.challenge-card-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 15.5px;
  line-height: 1.3;
  color: var(--ivory);
  padding-right: 24px;
}

.challenge-card-desc {
  margin-top: -4px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ivory-soft);
}

.challenge-card-points {
  margin-top: auto;
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  color: var(--gold-pale);
}

.challenge-card.is-complete .challenge-card-btn {
  background-image: var(--glass-inner-glow), var(--glass-complete-fill);
  border-color: var(--glass-border-strong);
  box-shadow: var(--glass-shadow), 0 0 32px -14px rgba(226, 205, 162, 0.45);
}

.challenge-card.is-complete .challenge-card-check {
  background: var(--accent-gold);
  border-color: var(--gold-pale);
  color: var(--glass-deep);
  transform: scale(1.06);
}

.challenge-card.is-complete .challenge-card-title,
.challenge-card.is-complete .challenge-card-desc {
  opacity: 0.88;
}

.challenge-card.is-complete .challenge-card-points {
  color: var(--accent-gold);
}

/* Bonus / 2X — a distinct blush-pink glass treatment (dusty rose, soft
   pink border) so bonus missions read as clearly special at a glance,
   while staying true translucent glass — the Bali artwork still shows
   through, same as every other card, just tinted rose instead of plum.
   Regular challenge cards are untouched by any of this. */
.challenge-card--bonus .challenge-card-btn {
  background-image: var(--glass-inner-glow), var(--glass-rose-fill);
  background-color: transparent;
  border-color: var(--glass-rose-border);
  box-shadow: 0 0 0 1px rgba(213, 195, 171, 0.2), var(--glass-shadow);
}

.challenge-card--bonus .challenge-card-title {
  color: var(--ivory);
}

.challenge-card--bonus .challenge-card-desc {
  color: var(--ivory-soft);
}

.challenge-card--bonus .challenge-card-points {
  color: var(--rose-pale);
}

.challenge-card--bonus .challenge-card-check {
  background: rgba(255, 255, 255, 0.16);
  border-color: var(--glass-rose-border-strong);
}

.challenge-card--bonus.is-complete .challenge-card-btn {
  background-image: var(--glass-inner-glow), var(--glass-rose-complete-fill);
  border-color: var(--glass-rose-border-strong);
  box-shadow: var(--glass-shadow), 0 0 32px -14px rgba(213, 195, 171, 0.5);
}

.challenge-card--bonus.is-complete .challenge-card-check {
  background: var(--accent-rose);
  border-color: var(--rose-pale);
  color: #ffffff;
}

.challenge-card-badge {
  position: absolute;
  top: 12px;
  left: 14px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffffff;
  background: var(--accent-rose);
  padding: 3px 8px;
  border-radius: 999px;
}

.challenge-card--bonus .challenge-card-icon {
  margin-top: 16px;
}

/* ---------- TRIP MEMORIES (photo-proof tie-in) ----------
   One dedicated section after Achievements, as the closing social/photo
   call to action — not attached to
   individual challenges. Structural/copy inspiration: the JazzeeXscapes
   Nolarette Hunt's "Trip Memories" tie-in. Visual treatment matches the
   companion Master Itinerary's own Shared Trip Album card (gold-tinted
   gradient, gold border, centered, pill CTA) so it reads as the same
   product family. */

.trip-memories {
  margin-top: 24px;
}

.trip-memories-card {
  max-width: 480px;
  margin: 0 auto;
  background-image: var(--glass-inner-glow), var(--glass-fill);
  background-color: transparent;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  padding: 28px 22px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .trip-memories-card {
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
  }
}

.trip-memories-headline {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(19px, 5vw, 23px);
  color: var(--ivory);
}

.trip-memories-copy {
  margin: 0;
  max-width: 38ch;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--lavender);
}

/* Rose/plum glass pill, distinct from this page's other (opaque) CTA
   buttons — translucent so the Bali artwork still reads through it, with
   a champagne-gold border as the accent. */
.trip-memories-cta {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1px solid var(--glass-rose-border-strong);
  background-image: linear-gradient(120deg, rgba(155, 125, 100, 0.55) 0%, rgba(66, 49, 36, 0.68) 100%);
  background-color: transparent;
  color: var(--ivory);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: var(--glass-shadow-soft), 0 0 0 1px rgba(226, 205, 162, 0.2);
  transition: transform 0.2s ease;
}

@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .trip-memories-cta {
    backdrop-filter: blur(14px) saturate(150%);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
  }
}

.trip-memories-cta:active {
  transform: scale(0.97);
}

/* ---------- ACHIEVEMENTS ---------- */

.achievements-section {
  margin-top: 28px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  margin: 0 0 12px 4px;
  color: var(--ivory);
}

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.achievement-card {
  background-image: var(--glass-inner-glow), var(--glass-fill-soft);
  background-color: transparent;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: var(--glass-shadow-soft);
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  transition: transform 0.2s ease;
}

@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .achievement-card {
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
  }
}

.achievement-card.is-locked {
  opacity: 0.45;
  filter: grayscale(0.6);
}

.achievement-card.is-unlocked {
  background-image: var(--glass-inner-glow), var(--glass-complete-fill);
  border-color: var(--glass-border-strong);
  box-shadow: var(--glass-shadow-soft), 0 0 32px -14px rgba(226, 205, 162, 0.45);
}

.achievement-icon {
  font-size: 26px;
}

.achievement-name {
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ivory);
}

.achievement-desc {
  font-size: 10.5px;
  color: var(--ivory-faint);
  line-height: 1.3;
}

.achievement-card.is-unlocked .achievement-name {
  color: var(--gold-pale);
}

/* ---------- RESET ---------- */

.reset-section {
  margin-top: 28px;
  display: flex;
  justify-content: center;
}

.btn-reset {
  background: transparent;
  border: 1.5px solid var(--glass-border-strong);
  color: var(--ivory-soft);
  font-size: 13px;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: 999px;
}

.btn-reset:active {
  background: rgba(226, 205, 162, 0.1);
}

/* ---------- PROMO CARD ----------
   Closing "get your own JaX Hunt" pitch — blush-pink glass (reusing the
   same rose tokens as bonus challenge cards) with champagne-gold accents
   and ivory text, consistent with the rest of this page's Bali Luxe
   system. Rendered after Trip Memories/Reset, right before the footer. */

.promo {
  margin-top: 28px;
}

.promo-card {
  max-width: 480px;
  margin: 0 auto;
  background-image: var(--glass-inner-glow), var(--glass-rose-fill);
  background-color: transparent;
  border: 1px solid var(--glass-rose-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  padding: 28px 24px 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}

@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .promo-card {
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
  }
}

.promo-heading {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(19px, 5vw, 23px);
  color: var(--ivory);
}

.promo-body {
  margin: 0;
  max-width: 40ch;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ivory-soft);
}

/* The price is the one thing on this card that must read instantly —
   larger, bolder, and in champagne gold rather than body-copy ivory. */
.promo-price {
  margin: 4px 0 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  color: var(--gold-pale);
}

.promo-cta {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  border: none;
  background: var(--accent-gold);
  color: var(--glass-deep);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: var(--glass-shadow-soft);
  transition: transform 0.2s ease;
}

.promo-cta:active {
  transform: scale(0.97);
}

/* ---------- BRAND FOOTER ----------
   Standard JazzeeXscapes footer — same design/structure as the companion
   Master Itinerary and every other JazzeeXscapes digital product. Unlike
   the rest of this stylesheet's colors (which key off the swappable
   HUNT_CONFIG.theme), these values are intentionally fixed so the brand
   mark reads identically no matter what destination theme is loaded. */

.site-footer {
  padding: 22px 16px 26px;
  background: var(--gradient-1);
  color: rgba(233, 228, 221, 0.65);
}

.footer-line {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.02em;
}

.footer-line .dot {
  color: rgba(233, 228, 221, 0.3);
}

.footer-line .brand-link {
  color: var(--gold-pale);
  font-weight: 600;
  text-decoration: none;
}

.footer-line .brand-link[href] { cursor: pointer; }
.footer-line .brand-link:not([href]) { cursor: default; }

.footer-social {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-left: 2px;
}

.footer-social a,
.footer-social span {
  display: inline-flex;
  color: rgba(233, 228, 221, 0.55);
  transition: color 0.3s ease;
}

.footer-social a:hover { color: var(--gold-pale); }
.footer-social svg { width: 15px; height: 15px; }

@media (max-width: 380px) {
  .footer-line { font-size: 11.5px; }
}

/* ---------- MODAL ---------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(33, 28, 24, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 50;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.modal-overlay.is-visible {
  opacity: 1;
}

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

.modal {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 24px 22px 20px;
  max-width: 340px;
  width: 100%;
  box-shadow: var(--shadow-lift);
  transform: scale(0.94) translateY(6px);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.is-visible .modal {
  transform: scale(1) translateY(0);
}

.modal h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 18px;
  color: var(--ink);
}

.modal p {
  margin: 0 0 20px;
  font-size: 13.5px;
  color: var(--ink-muted);
  line-height: 1.4;
}

.modal-actions {
  display: flex;
  gap: 10px;
}

.btn-secondary, .btn-danger {
  flex: 1;
  border: none;
  border-radius: 12px;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
}

.btn-secondary {
  background: var(--surface-muted);
  color: var(--ink);
}

.btn-danger {
  background: var(--danger);
  color: #ffffff;
}

/* Trip Memories sample/demo explainer modal — a centered variant of the
   same .modal used for Reset, with an icon badge and an italic footnote. */
.modal--centered {
  text-align: center;
}

.modal-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--gradient-1);
  color: var(--gold-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
}

.modal-note {
  margin: -8px 0 20px;
  font-size: 12px;
  font-style: italic;
  color: var(--ink-muted);
}

.modal-dismiss-btn {
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 14px;
  background: linear-gradient(120deg, var(--gradient-1) 0%, var(--gradient-3) 100%);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- TOAST / ACHIEVEMENT UNLOCK ---------- */

.toast-container {
  position: fixed;
  top: 18px;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 60;
  pointer-events: none;
  padding: 0 16px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(120deg, var(--gradient-1) 0%, var(--gradient-3) 100%);
  color: #ffffff;
  padding: 11px 18px;
  border-radius: 999px;
  box-shadow: var(--shadow-lift);
  font-size: 13px;
  font-weight: 500;
  max-width: 420px;
  opacity: 0;
  transform: translateY(-14px) scale(0.96);
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toast-icon {
  font-size: 19px;
}

.toast-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.toast-eyebrow {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-pale);
}

.toast-name {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 500;
}

/* ---------- CHALLENGE COMPLETE MICRO-CELEBRATION ---------- */

@keyframes pop-check {
  0% { transform: scale(0.6); }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.challenge-card.is-complete .challenge-card-check {
  animation: pop-check 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---------- RESPONSIVE (tablet / desktop) ---------- */

@media (min-width: 720px) {
  .app {
    max-width: 720px;
  }

  .achievements-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (min-width: 480px) {
  .achievements-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Wider shell at true desktop widths only — gives the 3-column challenge
   card grid (see CHALLENGE CARDS above) genuine room to stay comfortable
   to read, rather than cramming 3 columns into the 720px tablet shell. */
@media (min-width: 1020px) {
  .app {
    max-width: 960px;
  }
}

/* ---------- REDUCED MOTION ---------- */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ==========================================================================
   NEGRIL ADDITIONS — optional prize row, pending note
   (this page's cards are dark glass, so everything here uses the light
   --ivory / --gold-pale tokens)
   ========================================================================== */
.game-intro-facts {
  margin: 14px 0 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 26px;
  font-size: 13.5px;
}
.game-intro-facts div { display: flex; gap: 8px; align-items: baseline; }
.game-intro-facts dt {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-pale);
}
.game-intro-facts dd { margin: 0; color: var(--ivory); }
.is-pending-note { font-style: italic; color: var(--ivory-soft); }

/* ---------- HERO TITLE LOCKUP (interim art) ----------
   Same three-tier lockup as the itinerary hero: small tracked caps /
   oversized champagne display word / overlapping script. Sizes scale with
   the hero's own width (container units) so it holds from phone to desktop. */
.hero { container-type: inline-size; }
.hero-title-overlay[hidden] { display: none; }
.hero-title-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 4%;
  pointer-events: none;
}
.hero-title-eyebrow {
  font-size: clamp(8px, 1.9cqw, 15px);
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold-pale);
  margin-bottom: clamp(4px, 1.6cqw, 14px);
  margin-left: 0.34em;
  text-shadow: 0 1px 8px rgba(12, 9, 6, 0.7);
}
.hero-title-lockup { margin: 0; display: flex; flex-direction: column; align-items: center; font-weight: 400; }
.hero-title-name {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: clamp(9px, 2.1cqw, 17px);
  letter-spacing: 0.55em;
  margin-left: 0.55em;
  text-transform: uppercase;
  color: #fffdfb;
  filter: drop-shadow(0 2px 6px rgba(12, 9, 6, 0.6));
}
.hero-title-destination {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(46px, 17.5cqw, 150px);
  line-height: 0.84;
  text-transform: uppercase;
  background: linear-gradient(180deg, #fbf3e2 0%, #ecdcb9 24%, #d3b988 48%, #a98b58 72%, #836a3f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 22px rgba(12, 9, 6, 0.6));
}
.hero-title-script {
  font-family: "Alex Brush", cursive;
  font-size: clamp(26px, 8.6cqw, 74px);
  line-height: 1;
  color: var(--gold-pale);
  margin-top: clamp(-26px, -4.2cqw, -9px);
  filter: drop-shadow(0 3px 12px rgba(12, 9, 6, 0.6));
}
.hero-title-tagline {
  margin-top: clamp(6px, 2.2cqw, 20px);
  margin-left: 0.5em;
  font-size: clamp(9px, 2.1cqw, 17px);
  font-weight: 500;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: #fffdfb;
  text-shadow: 0 1px 8px rgba(12, 9, 6, 0.7);
}
