/* ================================================
   THIENSVILLE 40TH ANNIVERSARY SCAVENGER HUNT
   Main Stylesheet — Mobile-First
   ================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;700&display=swap');

/* ========================
   CSS VARIABLES
   ======================== */
:root {
  /* ── Brand palette — Downtown Thiensville 40th Anniversary ──
     Re-skin the whole app by editing these five colors + two fonts. */
  --color-navy:  #0A1548;
  --color-teal:  #679B9D;
  --color-mint:  #C7EBD9;
  --color-cream: #F5F0C4;
  --color-gold:  #E3C759;

  /* ── Fonts ──
     Temporary Poppins substitutes for the licensed Azo Sans Bold/Light.
     Swap these two lines to change every font reference app-wide. */
  --font-bold:  'Poppins', sans-serif;   /* headers, nav, buttons — font-weight 700 */
  --font-light: 'Poppins', sans-serif;   /* body text — font-weight 300 */

  /* ── Semantic aliases mapped onto the brand palette ──
     Existing rules reference these names; repointing them here rebrands
     the app without touching every selector. */
  --green-dark:   var(--color-navy);   /* primary dark: headers, buttons, headings, links */
  --green-mid:    #182A66;             /* lighter navy — hover states */
  --green-light:  var(--color-teal);   /* gradient light end / secondary accent */
  --green-pale:   var(--color-mint);   /* soft light backgrounds */
  --gold:         var(--color-gold);
  --gold-light:   #EFDD8C;
  --gold-pale:    #FBF4D4;
  --gold-dark:    #B08A2B;             /* deeper gold for text contrast on light */
  --cream:        var(--color-cream);  /* page & panel backgrounds */
  --white:        #FFFFFF;
  --text-dark:    #14181F;
  --text-mid:     #444444;
  --text-light:   #6B7280;
  --border:       #E4DEC0;
  --shadow-sm:    rgba(10, 21, 72, 0.10);
  --shadow-md:    rgba(10, 21, 72, 0.18);
  --radius-sm:    8px;
  --radius:       12px;
  --radius-lg:    20px;
  --radius-xl:    28px;
  --font-heading: var(--font-bold);
  --font-body:    var(--font-light);
  --transition:   0.22s ease;
  --header-h:     62px;
  --nav-h:        68px;
}

/* ========================
   RESET & BASE
   ======================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-body);
  font-weight: 300;
  background: var(--cream);
  color: var(--text-dark);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--green-dark); text-decoration: none; }
button { font-family: var(--font-body); }

/* ========================
   TYPOGRAPHY
   ======================== */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--green-dark);
}
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1rem; }
p  { line-height: 1.65; color: var(--text-mid); }

/* ========================
   40TH ANNIVERSARY BADGE
   ======================== */
.badge-40 {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 76px; height: 76px;
  background: linear-gradient(145deg, var(--gold), var(--gold-light));
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.4);
  box-shadow: 0 0 0 6px rgba(227,199,89,0.18), 0 6px 20px rgba(0,0,0,0.2);
  text-align: center;
  flex-shrink: 0;
}
.badge-40 .b-num {
  font-family: var(--font-heading);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--green-dark);
  line-height: 1;
}
.badge-40 .b-txt {
  font-size: 0.48rem;
  font-weight: 700;
  color: var(--green-dark);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  line-height: 1.3;
}

.ribbon {
  display: inline-block;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-dark));
  color: var(--green-dark);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 14px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  box-shadow: 0 2px 6px rgba(227,199,89,0.35);
}

/* ========================
   BUTTONS
   ======================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
  width: 100%;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.2px;
}
.btn-primary {
  background: var(--green-dark);
  color: var(--white);
  border-color: var(--green-dark);
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--green-mid);
  border-color: var(--green-mid);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px var(--shadow-md);
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--green-dark);
  border-color: var(--gold);
}
.btn-gold:hover, .btn-gold:focus {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(227,199,89,0.45);
}
.btn-outline {
  background: transparent;
  color: var(--green-dark);
  border-color: var(--green-dark);
}
.btn-outline:hover { background: var(--green-pale); }

.btn-outline-white {
  background: rgba(255,255,255,0.08);
  color: var(--white);
  border-color: rgba(255,255,255,0.5);
}
.btn-outline-white:hover {
  background: rgba(255,255,255,0.18);
  border-color: var(--white);
}
.btn-ghost {
  background: transparent;
  color: var(--green-dark);
  border-color: transparent;
}
.btn:disabled, .btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}
.btn-sm { padding: 9px 18px; font-size: 0.875rem; }
.btn-lg { padding: 17px 32px; font-size: 1.05rem; border-radius: var(--radius-lg); }

/* ========================
   FORMS
   ======================== */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
  font-size: 0.875rem;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-dark);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
  appearance: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--green-dark);
  box-shadow: 0 0 0 3px rgba(10,21,72,0.12);
}
.form-group textarea { resize: vertical; min-height: 90px; }

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 22px;
}
.checkbox-row input[type="checkbox"] {
  width: 20px; height: 20px;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: var(--green-dark);
  margin-top: 2px;
}
.checkbox-row label {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-mid);
  cursor: pointer;
}

.form-error {
  display: none;
  font-size: 0.8rem;
  color: #DC2626;
  margin-top: 5px;
}

/* ========================
   APP HEADER
   ======================== */
.app-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: var(--green-dark);
  display: grid;
  grid-template-columns: 1fr auto 1fr;   /* left tagline | center title | right badge */
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  z-index: 500;
  box-shadow: 0 2px 10px rgba(0,0,0,0.25);
}
.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
/* Left: tagline + location */
.header-tagline { justify-self: start; min-width: 0; }
.header-tagline-main {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.15;
}
.header-tagline-sub {
  font-size: 0.6rem;
  color: rgba(255,255,255,0.6);
  font-weight: 500;
  line-height: 1.1;
}
/* Right: the 40 badge */
.header-logo {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--green-dark);
  flex-shrink: 0;
  justify-self: end;
}
/* Center: main title */
.header-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1.15;
  justify-self: center;
  text-align: center;
  white-space: nowrap;
}
.header-sub {
  font-size: 0.62rem;
  color: rgba(255,255,255,0.6);
  font-weight: 500;
  line-height: 1;
}
.header-points {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  padding: 6px 12px;
  border-radius: 100px;
}
.points-num { font-weight: 700; color: var(--gold); font-size: 1rem; }
.points-lbl { color: rgba(255,255,255,0.75); font-size: 0.7rem; font-weight: 500; }

/* ========================
   BRAND LOGO
   ======================== */
/* Header mark — the full-colour crest sits on a light tile so it stays
   legible against the navy header. Replaces the old "40" circle. */
.header-logo {
  background: var(--white);
  width: auto; height: auto;
  border-radius: 10px;
  padding: 3px 7px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.22);
}
.header-logo img { height: 42px; width: auto; display: block; }

/* Splash / coming-soon hero mark — sits directly on the navy backdrop
   (the gold ring + cream field carry enough contrast); shadow lifts it. */
.splash-logo {
  width: min(72vw, 240px);
  height: auto;
  filter: drop-shadow(0 10px 26px rgba(0,0,0,0.38));
}

/* Auth-screen mark — light tile, same treatment as the header. */
.auth-logo-mark {
  background: var(--white);
  width: auto; height: auto;
  border-radius: 10px;
  padding: 4px 8px;
}
.auth-logo-mark img { height: 42px; width: auto; display: block; }

/* ========================
   BOTTOM NAV
   ======================== */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--white);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 500;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-shadow: 0 -2px 14px rgba(0,0,0,0.07);
}
.nav-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex: 1;
  padding: 8px 4px;
  cursor: pointer;
  color: var(--text-light);
  text-decoration: none;
  transition: color var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.nav-tab.active { color: var(--green-dark); }
.nav-tab svg { width: 22px; height: 22px; }
.nav-tab span {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.nav-tab.active .nav-icon-wrap {
  background: var(--green-pale);
  padding: 4px 14px;
  border-radius: 12px;
  transition: background var(--transition);
}

/* ========================
   PAGE LAYOUT
   ======================== */
.page-wrap {
  padding-top: var(--header-h);
  padding-bottom: var(--nav-h);
  min-height: 100vh;
}
.page-wrap--no-nav { padding-bottom: 0; }

.container {
  max-width: 520px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ========================
   CARDS
   ======================== */
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 2px 12px var(--shadow-sm);
  border: 1px solid var(--border);
}
.card + .card { margin-top: 12px; }

/* ========================
   SPLASH / HERO
   ======================== */
.splash {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #050B24 0%, var(--color-navy) 45%, var(--color-teal) 100%);
  padding: 48px 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Subtle texture overlay */
.splash::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20% 20%, rgba(227,199,89,0.06) 0%, transparent 50%),
                    radial-gradient(circle at 80% 80%, rgba(227,199,89,0.06) 0%, transparent 50%);
  pointer-events: none;
}

/* Decorative rings */
.splash-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(227,199,89,0.08);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.splash-ring-1 { width: 350px; height: 350px; }
.splash-ring-2 { width: 550px; height: 550px; border-color: rgba(227,199,89,0.05); }
.splash-ring-3 { width: 750px; height: 750px; border-color: rgba(227,199,89,0.03); }

.splash-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  max-width: 400px;
  width: 100%;
}

.splash-badge {
  width: 104px; height: 104px;
  background: linear-gradient(145deg, var(--gold), var(--gold-light));
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 4px solid rgba(255,255,255,0.25);
  box-shadow: 0 0 0 10px rgba(227,199,89,0.12), 0 12px 36px rgba(0,0,0,0.35);
  animation: splashPulse 3.5s ease-in-out infinite;
}
@keyframes splashPulse {
  0%, 100% { box-shadow: 0 0 0 10px rgba(227,199,89,0.12), 0 12px 36px rgba(0,0,0,0.35); }
  50%       { box-shadow: 0 0 0 18px rgba(227,199,89,0.06), 0 12px 36px rgba(0,0,0,0.35); }
}
.splash-badge .b-num {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--green-dark);
  line-height: 1;
}
.splash-badge .b-txt {
  font-size: 0.5rem;
  font-weight: 700;
  color: var(--green-dark);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  line-height: 1.4;
  text-align: center;
}

.splash-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gold);
}

.splash-title {
  font-family: var(--font-heading);
  font-size: 2.1rem;
  color: var(--white);
  line-height: 1.2;
}
.splash-title span { color: var(--gold); }

.splash-tagline {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-style: italic;
  color: rgba(255,255,255,0.72);
}

.splash-divider {
  width: 56px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.splash-sub {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.6;
}

.splash-ctas {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin-top: 4px;
}

/* ========================
   AUTH SCREENS
   ======================== */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--cream);
}

.auth-top {
  background: linear-gradient(160deg, #050B24 0%, var(--color-navy) 100%);
  padding: 48px 28px 56px;
  text-align: center;
  position: relative;
}

.auth-top .ribbon {
  position: absolute;
  top: 14px; right: 14px;
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 18px;
}
.auth-logo-mark {
  width: 46px; height: 46px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--green-dark);
}
.auth-logo-text {
  font-family: var(--font-heading);
  color: var(--white);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
}
.auth-logo-sub {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.6);
  font-weight: 500;
}

.auth-top h1 { color: var(--white); font-size: 1.5rem; margin-bottom: 4px; }
.auth-top p { color: rgba(255,255,255,0.65); font-size: 0.875rem; }

.auth-body {
  flex: 1;
  background: var(--cream);
  border-radius: 26px 26px 0 0;
  margin-top: -26px;
  padding: 32px 24px 40px;
  position: relative;
}

.auth-footer {
  text-align: center;
  margin-top: 22px;
  font-size: 0.875rem;
  color: var(--text-light);
}
.auth-footer a { color: var(--green-dark); font-weight: 700; }

.consent-box {
  background: var(--green-pale);
  border: 1px solid rgba(10,21,72,0.22);
  border-radius: var(--radius-sm);
  padding: 15px 16px;
  margin-bottom: 18px;
}
.consent-box p {
  font-size: 0.835rem;
  line-height: 1.6;
  color: var(--text-mid);
}

/* ========================
   ALERT / NOTICE
   ======================== */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-bottom: 16px;
  display: none;
}
.alert.show { display: block; }
.alert-error  { background: #FEF2F2; color: #B91C1C; border: 1px solid #FECACA; }
.alert-success { background: var(--green-pale); color: var(--green-dark); border: 1px solid rgba(10,21,72,0.25); }
.alert-info   { background: #EFF6FF; color: #1D4ED8; border: 1px solid #BFDBFE; }
.alert-warn   { background: #FFFBEB; color: #92400E; border: 1px solid #FDE68A; }

/* ========================
   MAP SCREEN
   ======================== */
#map-container {
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0;
  bottom: var(--nav-h);
  z-index: 1;
}

/* Leaflet customizations */
.leaflet-popup-content-wrapper {
  border-radius: var(--radius) !important;
  box-shadow: 0 6px 24px rgba(0,0,0,0.18) !important;
  padding: 0 !important;
  overflow: hidden;
}
.leaflet-popup-content {
  margin: 0 !important;
  width: auto !important;
}
.leaflet-popup-tip-container { display: none; }

.map-popup {
  font-family: var(--font-body);
  min-width: 200px;
}
.map-popup-top {
  padding: 14px 16px 10px;
}
.map-popup-type {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-light);
  margin-bottom: 4px;
}
.map-popup-name {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 6px;
}
.map-popup-points {
  font-size: 0.78rem;
  font-weight: 600;
}
.map-popup-done {
  color: var(--green-mid);
  display: flex;
  align-items: center;
  gap: 4px;
}
.map-popup-todo { color: var(--gold-dark); }

.map-popup-footer {
  border-top: 1px solid var(--border);
  padding: 10px 16px;
}
.map-popup-footer .btn {
  padding: 9px 16px;
  font-size: 0.85rem;
}

/* Custom map pins */
.map-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  border: 2px solid rgba(255,255,255,0.6);
  box-shadow: 0 3px 10px rgba(0,0,0,0.3);
  cursor: pointer;
  transition: transform 0.15s;
}
.map-pin:hover { transform: rotate(-45deg) scale(1.15); }
.map-pin .pin-inner {
  transform: rotate(45deg);
  font-size: 1.1rem;
  line-height: 1;
}
.map-pin.landmark { background: var(--green-dark); width: 36px; height: 36px; }
.map-pin.business { background: var(--gold-dark); width: 36px; height: 36px; }
.map-pin.checked  { opacity: 0.65; }
.map-pin.checked::after {
  content: '✓';
  position: absolute;
  top: -6px; right: -6px;
  background: #22C55E;
  color: white;
  font-size: 0.55rem;
  width: 14px; height: 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  transform: rotate(45deg);
  border: 1px solid white;
}

/* Map legend */
.map-legend {
  position: absolute;
  bottom: 14px; left: 14px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(4px);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  z-index: 400;
  font-size: 0.75rem;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
  color: var(--text-mid);
  font-weight: 500;
}
.legend-item:last-child { margin-bottom: 0; }
.legend-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.legend-dot.landmark { background: var(--green-dark); }
.legend-dot.business { background: var(--gold-dark); }

/* ========================
   LOCATION DETAIL
   ======================== */
.loc-hero {
  padding-top: var(--header-h);
  position: relative;
}
.loc-photo {
  width: 100%;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 72px;
  position: relative;
  overflow: hidden;
}
.loc-photo.landmark {
  background: linear-gradient(135deg, var(--green-dark), var(--green-light));
}
.loc-photo.business {
  background: linear-gradient(135deg, #8B6914, var(--gold-dark));
}
.loc-type-badge {
  position: absolute;
  top: 14px; right: 14px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
}
.loc-type-badge.landmark { background: var(--green-pale); color: var(--green-dark); }
.loc-type-badge.business { background: var(--gold-pale); color: #8B6914; }

.loc-body {
  background: var(--cream);
  border-radius: 26px 26px 0 0;
  margin-top: -26px;
  padding: 26px 20px 100px;
  position: relative;
}
.loc-name {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  color: var(--green-dark);
  margin-bottom: 5px;
}
.loc-address {
  font-size: 0.84rem;
  color: var(--text-light);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.loc-address svg { width: 14px; height: 14px; flex-shrink: 0; }
.loc-desc {
  color: var(--text-mid);
  line-height: 1.72;
  margin-bottom: 20px;
}
.loc-history-card {
  background: var(--green-pale);
  border: 1px solid rgba(10,21,72,0.2);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
}
.loc-history-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--green-dark);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.loc-history-text { font-size: 0.875rem; color: var(--text-mid); line-height: 1.65; }

.loc-deal-card {
  background: linear-gradient(135deg, var(--gold-pale), #FFF9ED);
  border: 1px solid rgba(227,199,89,0.35);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
}
.loc-deal-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gold-dark);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.loc-deal-text { font-size: 0.9rem; color: var(--text-dark); font-weight: 500; line-height: 1.55; }

.loc-points-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.loc-points-icon {
  width: 38px; height: 38px;
  background: var(--gold-pale);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.loc-points-value {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--gold-dark);
  font-weight: 700;
}
.loc-points-lbl { font-size: 0.8rem; color: var(--text-light); }

.checkin-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 14px 20px;
  padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
  z-index: 200;
}
.checkin-status-txt {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-light);
  margin-bottom: 10px;
}
.checkin-status-txt strong { color: var(--text-dark); }
.checkin-status-txt.near { color: var(--green-mid); }
.checkin-status-txt.done { color: var(--green-mid); font-weight: 600; }
.checkin-status-txt.far  { color: #DC2626; }

/* ========================
   CHECK-IN SUCCESS
   ======================== */
.success-screen {
  min-height: 100vh;
  background: linear-gradient(160deg, #050B24 0%, var(--color-navy) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 28px;
  text-align: center;
  gap: 0;
}
.success-anim {
  font-size: 80px;
  animation: popIn 0.6s cubic-bezier(0.34,1.56,0.64,1);
  margin-bottom: 16px;
}
@keyframes popIn {
  from { transform: scale(0) rotate(-180deg); opacity: 0; }
  to   { transform: scale(1) rotate(0deg);    opacity: 1; }
}
.success-pts-pill {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--green-dark);
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  padding: 14px 32px;
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  box-shadow: 0 6px 24px rgba(227,199,89,0.45);
}
.success-title {
  font-family: var(--font-heading);
  color: var(--white);
  font-size: 1.9rem;
  margin-bottom: 6px;
}
.success-sub {
  color: rgba(255,255,255,0.75);
  font-size: 0.9rem;
  margin-bottom: 28px;
}
.progress-track {
  width: 100%;
  background: rgba(255,255,255,0.18);
  border-radius: 100px;
  height: 10px;
  overflow: hidden;
  margin-bottom: 8px;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 100px;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.progress-lbl { color: rgba(255,255,255,0.65); font-size: 0.82rem; margin-bottom: 28px; }

.deal-card-reveal {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
  text-align: left;
  width: 100%;
  border-left: 4px solid var(--gold);
}
.deal-card-reveal-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gold-dark);
  margin-bottom: 4px;
}
.deal-card-reveal-name {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: var(--green-dark);
  margin-bottom: 8px;
}
.deal-card-reveal-text {
  font-size: 0.875rem;
  color: var(--text-mid);
  line-height: 1.6;
}
.deal-show-note {
  font-size: 0.78rem;
  color: var(--text-light);
  font-style: italic;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

/* ========================
   PROGRESS SCREEN
   ======================== */
.progress-hero {
  padding-top: var(--header-h);
  background: linear-gradient(160deg, #050B24, var(--green-dark));
  padding-left: 20px; padding-right: 20px;
  padding-bottom: 32px;
  text-align: center;
  color: var(--white);
}
.progress-big-num {
  font-family: var(--font-heading);
  font-size: 3.2rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  margin-top: 16px;
}
.progress-big-lbl {
  color: rgba(255,255,255,0.65);
  font-size: 0.82rem;
  margin-top: 4px;
  margin-bottom: 18px;
}
.progress-bar-wrap {
  background: rgba(255,255,255,0.18);
  border-radius: 100px;
  height: 8px;
  overflow: hidden;
  margin-bottom: 10px;
}
.progress-motivation {
  font-style: italic;
  color: rgba(255,255,255,0.75);
  font-size: 0.875rem;
}

.passport-section {
  padding: 20px 16px;
  background: var(--white);
  margin-bottom: 1px;
}
.section-hdr {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: var(--green-dark);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.section-hdr-count {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--text-light);
  font-weight: 600;
}

.stamp-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.stamp-cell {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  border: 2px dashed var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  position: relative;
  background: #F8F6F0;
  transition: all var(--transition);
  cursor: pointer;
}
.stamp-cell.visited {
  border-style: solid;
  border-color: var(--green-dark);
  background: var(--green-pale);
}
.stamp-cell.visited.business {
  border-color: var(--gold-dark);
  background: var(--gold-pale);
}
.stamp-emoji { font-size: 1.4rem; }
.stamp-num {
  font-size: 0.52rem;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
}
.stamp-check {
  position: absolute;
  top: -5px; right: -5px;
  background: var(--green-dark);
  color: white;
  font-size: 0.55rem;
  width: 14px; height: 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  border: 1.5px solid white;
}
.stamp-cell.visited.business .stamp-check { background: var(--gold-dark); }

.visited-list { padding: 0 16px 20px; background: var(--white); }
.visited-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.visited-item:last-child { border-bottom: none; }
.visited-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.visited-icon.landmark { background: var(--green-pale); }
.visited-icon.business { background: var(--gold-pale); }
.visited-info { flex: 1; }
.visited-name { font-weight: 600; font-size: 0.9rem; }
.visited-time { font-size: 0.75rem; color: var(--text-light); margin-top: 2px; }
.visited-pts {
  font-weight: 700;
  color: var(--green-dark);
  font-size: 0.875rem;
}

.empty-progress {
  text-align: center;
  padding: 40px 20px;
}
.empty-progress-icon { font-size: 48px; margin-bottom: 10px; }
.empty-progress h3 { font-size: 1.1rem; margin-bottom: 6px; }
.empty-progress p { font-size: 0.875rem; color: var(--text-light); }

/* ========================
   PROFILE SCREEN
   ======================== */
.profile-hero {
  padding-top: var(--header-h);
  background: linear-gradient(160deg, #050B24, var(--green-dark));
  padding: calc(var(--header-h) + 24px) 20px 40px;
  text-align: center;
}
.profile-avatar {
  width: 74px; height: 74px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--green-dark);
  margin: 0 auto 14px;
  border: 3px solid rgba(255,255,255,0.3);
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}
.profile-email { color: rgba(255,255,255,0.8); font-size: 0.875rem; }
.profile-since { color: rgba(255,255,255,0.55); font-size: 0.75rem; margin-top: 3px; }

.profile-body {
  background: var(--cream);
  border-radius: 26px 26px 0 0;
  margin-top: -26px;
  padding: 26px 20px 100px;
}
.profile-stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}
.profile-stat {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  box-shadow: 0 2px 8px var(--shadow-sm);
  border: 1px solid var(--border);
}
.profile-stat-val {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  color: var(--green-dark);
  font-weight: 700;
}
.profile-stat-lbl { font-size: 0.75rem; color: var(--text-light); font-weight: 600; margin-top: 2px; }

.profile-section-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--green-dark);
  margin: 20px 0 12px;
}
.profile-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  color: var(--text-dark);
  font-weight: 500;
}
.profile-menu-item:last-child { border-bottom: none; }
.profile-menu-item svg { color: var(--text-light); width: 18px; height: 18px; }
.profile-menu-item.danger { color: #DC2626; }

/* ========================
   COMPLETION SCREEN
   ======================== */
.completion-screen {
  min-height: 100vh;
  background: linear-gradient(160deg, #050B24, var(--color-navy), var(--color-teal));
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 24px;
  text-align: center;
}
.completion-fireworks {
  font-size: 56px;
  animation: popIn 0.8s cubic-bezier(0.34,1.56,0.64,1);
  margin-bottom: 12px;
}
.completion-title {
  font-family: var(--font-heading);
  color: var(--white);
  font-size: 1.9rem;
  margin-bottom: 8px;
}
.completion-sub {
  color: rgba(255,255,255,0.75);
  font-size: 0.9rem;
  margin-bottom: 32px;
  line-height: 1.6;
}

.certificate {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px 24px;
  width: 100%;
  max-width: 400px;
  border: 3px solid var(--gold);
  position: relative;
  margin-bottom: 24px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.cert-corner {
  position: absolute;
  font-size: 1.2rem;
  color: var(--gold);
}
.cert-corner.tl { top: 10px; left: 12px; }
.cert-corner.br { bottom: 10px; right: 12px; }
.cert-eyebrow {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-light);
  margin-bottom: 6px;
}
.cert-headline {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--green-dark);
  margin-bottom: 4px;
}
.cert-name {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--gold-dark);
  margin: 14px 0;
  padding: 6px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.cert-event {
  font-size: 0.875rem;
  color: var(--text-mid);
  line-height: 1.55;
  margin-bottom: 14px;
}
.cert-date {
  font-size: 0.78rem;
  color: var(--text-light);
}
.cert-seal {
  width: 58px; height: 58px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 16px auto 0;
  border: 3px solid var(--green-dark);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.cert-seal .s-num {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--green-dark);
  line-height: 1;
}
.cert-seal .s-txt {
  font-size: 0.36rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--green-dark);
  text-align: center;
}

/* ========================
   ADMIN PANEL
   ======================== */
.admin-wrap {
  background: #F0F0F0;
  min-height: 100vh;
}
.admin-header {
  background: var(--green-dark);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0; z-index: 50;
}
.admin-header-title {
  color: var(--white);
  font-family: var(--font-heading);
  font-size: 1.05rem;
}
.admin-header-badge {
  background: var(--gold);
  color: var(--green-dark);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.admin-tabs {
  background: var(--white);
  border-bottom: 1px solid #DDD;
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  position: sticky;
  top: 50px; z-index: 40;
}
.admin-tabs::-webkit-scrollbar { display: none; }
.admin-tab {
  padding: 12px 20px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-light);
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: all var(--transition);
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}
.admin-tab.active {
  color: var(--green-dark);
  border-bottom-color: var(--green-dark);
}
.admin-section { display: none; padding: 20px; }
.admin-section.active { display: block; }

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}
.stat-box {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 16px 12px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.stat-box-val {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--green-dark);
  line-height: 1;
}
.stat-box-lbl {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-light);
  font-weight: 600;
  margin-top: 4px;
}

.admin-table-card {
  background: var(--white);
  border-radius: var(--radius-sm);
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  overflow: hidden;
  margin-bottom: 16px;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  min-width: 500px;
}
.admin-table-scroll { overflow-x: auto; }
.admin-table th {
  background: #F5F5F5;
  padding: 10px 12px;
  text-align: left;
  font-weight: 700;
  color: var(--text-mid);
  border-bottom: 1px solid #E5E5E5;
  white-space: nowrap;
}
.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #F0F0F0;
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }

.type-pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
}
.type-pill.landmark { background: var(--green-pale); color: var(--green-dark); }
.type-pill.business { background: var(--gold-pale); color: #8B6914; }

.toggle { position: relative; display: inline-block; width: 38px; height: 20px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; cursor: pointer;
  inset: 0; background: #CCC;
  transition: .3s; border-radius: 20px;
}
.toggle-slider::before {
  position: absolute; content: '';
  height: 14px; width: 14px;
  left: 3px; bottom: 3px;
  background: white; transition: .3s; border-radius: 50%;
}
.toggle input:checked + .toggle-slider { background: var(--green-dark); }
.toggle input:checked + .toggle-slider::before { transform: translateX(18px); }

.tbl-btn {
  padding: 4px 9px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid;
  background: transparent;
  transition: background 0.2s;
  font-family: var(--font-body);
}
.tbl-btn.edit   { color: #2563EB; border-color: #2563EB; }
.tbl-btn.edit:hover   { background: #EFF6FF; }
.tbl-btn.delete { color: #DC2626; border-color: #DC2626; }
.tbl-btn.delete:hover { background: #FEF2F2; }
.tbl-btn.view   { color: #7C3AED; border-color: #7C3AED; }
.tbl-btn.view:hover   { background: #F5F3FF; }

.admin-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--green-dark);
  color: var(--white);
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 12px;
  font-family: var(--font-body);
}
.admin-add-btn:hover { background: var(--green-mid); }

.hunt-settings-form {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.settings-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ========================
   MODAL
   ======================== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.modal {
  background: var(--white);
  border-radius: 24px 24px 0 0;
  padding: 24px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.modal-title { font-family: var(--font-heading); font-size: 1.2rem; color: var(--green-dark); }
.modal-close {
  background: #F0F0F0;
  border: none;
  width: 30px; height: 30px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-mid);
}

/* ========================
   TOAST
   ======================== */
.toast-wrap {
  position: fixed;
  bottom: calc(var(--nav-h) + 14px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 700;
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  width: calc(100% - 32px);
  max-width: 400px;
}
.toast {
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
  animation: toastUp 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--white);
}
@keyframes toastUp {
  from { transform: translateY(16px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.toast.success { background: var(--green-dark); }
.toast.error   { background: #B91C1C; }
.toast.warning { background: #B45309; }
.toast.info    { background: #1D4ED8; }

/* ========================
   LOADING / SPINNER
   ======================== */
.loading-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  gap: 14px;
  color: var(--text-light);
  font-size: 0.875rem;
}
.spinner {
  width: 38px; height: 38px;
  border: 3px solid var(--border);
  border-top-color: var(--green-dark);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ========================
   ADMIN LOGIN
   ======================== */
.admin-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--green-dark);
  padding: 24px;
}
.admin-login-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.35);
}

/* ========================
   UTILITIES
   ======================== */
.d-none { display: none !important; }
.text-center { text-align: center; }
.text-gold { color: var(--gold); }
.text-green { color: var(--green-dark); }
.text-muted { color: var(--text-light); }
.fw-bold { font-weight: 700; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.gap-2 { gap: 16px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.divider { height: 1px; background: var(--border); margin: 20px 0; }
.w-full { width: 100%; }

/* ========================
   RESPONSIVE
   ======================== */
@media (min-width: 480px) {
  .splash { padding: 48px 40px; }
  .splash-title { font-size: 2.4rem; }
  h1 { font-size: 2.2rem; }
  .stamp-grid { grid-template-columns: repeat(5, 1fr); }
}

@media (min-width: 640px) {
  .settings-row { grid-template-columns: 1fr 1fr 1fr; }
}

/* Print — certificate only */
@media print {
  body * { visibility: hidden; }
  .certificate, .certificate * { visibility: visible; }
  .certificate {
    position: fixed; top: 0; left: 0;
    width: 100%; border: 8px solid var(--gold);
    padding: 48px;
  }
}
