/* Leave the Resort — design system (ported from the Modernist demo tokens) */
:root {
  --color-bg: #F7F2EA;
  --color-surface: #EFE7DA;
  --color-text: #1F2A36;
  --color-divider: rgba(31, 42, 54, 0.10);
  --color-accent: #ec3013;
  --color-accent-100: #fff2ef;
  --color-accent-200: #ffe0d9;
  --color-accent-300: #ffc4b8;
  --color-accent-700: #ae1800;
  --color-n300: #D9D1C5;
  --color-n400: #BDB4A7;
  --color-n500: #9C9387;
  --color-n600: #7C7469;
  --color-n700: #5E574E;
  --shadow-sm: 0 1px 2px rgba(45, 43, 43, 0.14);
  --shadow-md: 0 3px 10px rgba(45, 43, 43, 0.16);
  --shadow-lg: 0 12px 32px rgba(45, 43, 43, 0.22);
  --font-body: 'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Josefin Sans', 'Archivo', sans-serif;
  --radius: 18px;
  --nav-h: 64px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  background: #E7E0D5;
  font-family: var(--font-body);
  color: var(--color-text);
  font-size: 14px;
  line-height: 1.45;
}

#device {
  position: relative;
  width: 100%;
  margin: 0 auto;
  height: 100dvh;
  background: var(--color-bg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* safe-area handled per screen so photo heroes can run under the status bar */
}
@media (min-width: 470px) {
  body { display: flex; align-items: center; justify-content: center; }
  #device { width: 430px; height: min(880px, 96dvh); border-radius: 28px; box-shadow: var(--shadow-lg); }
}

#device::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: env(safe-area-inset-top, 0px);
  z-index: 35; pointer-events: none; opacity: 0; transition: opacity 0.18s ease;
  background: rgba(247, 242, 234, 0.86); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
#device.scrolled::before { opacity: 1; }

#screen { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding-bottom: 12px; }

/* ---------- type ---------- */
.kicker { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-n600); font-weight: 600; }
h1.brand { font-family: var(--font-heading); font-weight: 700; font-size: 21px; letter-spacing: 0.01em; }
h2 { font-family: var(--font-heading); font-weight: 700; font-size: 18px; margin-bottom: 2px; }
h3 { font-size: 14px; font-weight: 700; }
.muted { color: var(--color-n600); font-size: 12px; }
.small { font-size: 12px; }

/* ---------- layout blocks ---------- */
.topbar { padding: 14px 16px 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.section { padding: 0 16px; margin-top: 14px; }
.card { background: #fff; border: 1px solid var(--color-divider); border-radius: var(--radius); padding: 12px 14px; }
.card + .card { margin-top: 8px; }
.row { display: flex; align-items: center; gap: 10px; }
.spread { justify-content: space-between; }
.stack > * + * { margin-top: 8px; }

/* ---------- chips & buttons ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid var(--color-divider); border-radius: 999px;
  padding: 6px 12px; font-size: 11px; font-weight: 600; letter-spacing: 0.04em;
  background: transparent; color: var(--color-n600); cursor: pointer;
  font-family: var(--font-body); white-space: nowrap;
}
.chip.on { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }
.chiprow { display: flex; gap: 6px; overflow-x: auto; padding: 2px 16px 6px; scrollbar-width: none; }
.chiprow::-webkit-scrollbar { display: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--color-divider); background: #fff; color: var(--color-text);
  border-radius: 12px; padding: 11px 16px; font-size: 13px; font-weight: 700;
  font-family: var(--font-body); cursor: pointer; width: 100%;
}
.btn.primary { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }
.btn.ghost { background: transparent; }
.btn.sm { padding: 7px 12px; font-size: 12px; width: auto; border-radius: 10px; white-space: nowrap; flex-shrink: 0; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; pointer-events: none; }

input[type=text], input[type=search], input[type=number], input[type=email], input[type=password], input[type=tel], textarea, select {
  width: 100%; border: 1px solid var(--color-divider); border-radius: 12px;
  background: #fff; padding: 11px 12px; font-size: 14px; font-family: var(--font-body);
  color: var(--color-text); outline: none;
}
input:focus, textarea:focus { border-color: var(--color-accent); }
textarea { min-height: 84px; resize: vertical; }

/* ---------- search ---------- */
.searchwrap { position: relative; padding: 0 16px; margin-top: 4px; }
.searchwrap svg { position: absolute; left: 28px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.searchwrap input { padding-left: 38px; border-radius: 999px; }
.searchwrap .clear { position: absolute; right: 24px; top: 50%; transform: translateY(-50%); border: 0; background: var(--color-n300); color: #fff; border-radius: 50%; width: 20px; height: 20px; font-size: 12px; cursor: pointer; line-height: 1; }

/* ---------- segmented ---------- */
.seg { display: inline-flex; background: var(--color-surface); border: 1px solid var(--color-divider); border-radius: 999px; padding: 3px; }
.seg button { border: 0; background: transparent; color: var(--color-n600); border-radius: 999px; padding: 6px 14px; font-size: 11px; font-weight: 700; letter-spacing: 0.05em; cursor: pointer; font-family: var(--font-body); }
.seg button.on { background: var(--color-accent); color: #fff; }

/* ---------- map (Leaflet) ---------- */
.mapwrap { position: relative; z-index: 0; margin: 10px 16px 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--color-divider); height: 340px; background: #e7ecea; }
#leafmap { position: absolute; inset: 0; }
.ltr-pin { background: none; border: none; }
.pin-dot {
  min-width: 28px; height: 28px; padding: 0 6px; border-radius: 999px;
  background: var(--color-accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; font-family: var(--font-body);
  box-shadow: var(--shadow-md); border: 2px solid #fff;
}
.pin-dot.un { background: #fff; color: var(--color-accent-700); border-color: var(--color-accent); }
.pin-dot.on { box-shadow: 0 0 0 3px var(--color-text); }
.fab {
  position: absolute; right: 12px; bottom: 12px; z-index: 900;
  width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--color-accent); color: #fff; font-size: 26px; font-weight: 700; line-height: 1;
  box-shadow: var(--shadow-md); font-family: var(--font-body);
}
.leaflet-container { font-family: var(--font-body); }

.nearby { margin: 10px 16px 0; background: var(--color-accent-100); border: 1px solid var(--color-accent-300); border-radius: var(--radius); padding: 10px 12px; font-size: 12.5px; display: flex; gap: 8px; align-items: center; justify-content: space-between; }

/* ---------- list rows ---------- */
.listrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 2px; border-bottom: 1px solid var(--color-divider); cursor: pointer; }
.listrow:last-child { border-bottom: 0; }
.badge { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: 0.06em; padding: 3px 8px; border-radius: 999px; background: var(--color-accent-100); color: var(--color-accent-700); border: 1px solid var(--color-accent-300); white-space: nowrap; }
.badge.plain { background: var(--color-surface); color: var(--color-n700); border-color: var(--color-divider); }
.badge.dark { background: var(--color-text); color: #fff; border-color: var(--color-text); }

/* ---------- sheets & modals ---------- */
.scrim { position: absolute; inset: 0; background: rgba(32,30,29,0.4); z-index: 40; animation: fade 0.18s ease; }
@keyframes fade { from { opacity: 0; } }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 41;
  background: var(--color-bg); border-radius: 20px 20px 0 0; box-shadow: var(--shadow-lg);
  padding: 10px 16px calc(16px + env(safe-area-inset-bottom)); max-height: 86%;
  overflow-y: auto; animation: rise 0.22s ease;
}
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }
@keyframes toastin { from { transform: translate(-50%, 40px); opacity: 0; } }   /* keeps the toast centered while it rises */
/* Sheets opened from a full-screen page (report, block, review) must sit above that page. */
.modalfull ~ .scrim { z-index: 43; }
.modalfull ~ .sheet { z-index: 44; }
.sheet .grab { width: 36px; height: 4px; border-radius: 2px; background: var(--color-n300); margin: 0 auto 12px; }
.modalfull { position: absolute; inset: 0; z-index: 42; background: var(--color-bg); overflow-y: auto; animation: fade 0.15s ease; }
.modalfull > .topbar { padding-top: calc(14px + env(safe-area-inset-top)); }

/* ---------- bars / meters ---------- */
.meter { height: 6px; border-radius: 3px; background: var(--color-surface); overflow: hidden; }
.meter > div { height: 100%; background: var(--color-accent); border-radius: 3px; }

/* ---------- bottom nav ---------- */
#nav {
  display: flex; border-top: 1px solid var(--color-divider); background: #fff;
  padding-bottom: env(safe-area-inset-bottom); min-height: var(--nav-h); flex-shrink: 0;
}
#nav button {
  flex: 1; border: 0; background: none; cursor: pointer; padding: 9px 0 7px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.06em; color: var(--color-n600);
  font-family: var(--font-body); border-top: 2px solid transparent;
}
#nav button.on { color: var(--color-accent-700); border-top-color: var(--color-accent); }
#nav svg { width: 21px; height: 21px; }

/* ---------- splash / onboarding ---------- */
#splash {
  position: absolute; inset: 0; z-index: 60; background: var(--color-accent);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  color: #fff; transition: opacity 0.4s ease;
}
#splash.gone { opacity: 0; pointer-events: none; }
#splash h1 { font-family: var(--font-heading); font-size: 30px; font-weight: 700; letter-spacing: 0.02em; }

/* ---------- misc ---------- */
.review { border-top: 1px solid var(--color-divider); padding: 10px 0; }
.review:first-child { border-top: 0; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--color-text); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; flex-shrink: 0; }
.avatar.accent { background: var(--color-accent); }
.bubble { max-width: 78%; padding: 9px 12px; border-radius: 14px; font-size: 13px; border: 1px solid var(--color-divider); }
.votebtn { border: 1px solid var(--color-n300); background: var(--color-bg); color: var(--color-n600); border-radius: 10px; min-width: 44px; padding: 6px 4px; display: flex; flex-direction: column; align-items: center; font-weight: 800; font-size: 12px; cursor: pointer; font-family: var(--font-body); flex-shrink: 0; }
.votebtn.on { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }
.steps { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; }
.step { display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--color-n400); }
.step .tick { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--color-n300); flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 11px; }
.step.done { color: var(--color-text); }
.step.done .tick { background: var(--color-accent); border-color: var(--color-accent); }
.stampcard { border: 2px solid var(--color-text); border-radius: 16px; padding: 16px; background: #fff; position: relative; overflow: hidden; }
.stampcard .no { font-family: var(--font-heading); font-size: 26px; font-weight: 700; }
.radio { display: flex; gap: 10px; align-items: center; padding: 11px 4px; border-bottom: 1px solid var(--color-divider); cursor: pointer; font-size: 13px; }
.radio .rdot { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--color-n400); flex-shrink: 0; }
.radio.on .rdot { border-color: var(--color-accent); background: var(--color-accent); box-shadow: inset 0 0 0 3px #fff; }
.squares { display: flex; gap: 4px; }
.squares button { flex: 1; aspect-ratio: 1; border: 1px solid var(--color-n300); background: transparent; border-radius: 7px; font-weight: 800; font-size: 11px; color: var(--color-n600); cursor: pointer; font-family: var(--font-body); }
.squares button.on { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }
.timeline { position: relative; }
.timeline::before { content: ''; position: absolute; left: 15px; top: 8px; bottom: 8px; width: 2px; background: var(--color-divider); }
.tl-item { display: flex; gap: 14px; padding: 8px 0; position: relative; }
.tl-item .node { width: 32px; height: 32px; border-radius: 50%; background: #fff; border: 2px solid var(--color-accent); z-index: 1; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 800; color: var(--color-accent-700); flex-shrink: 0; }
.matchcard { border: 1px solid var(--color-divider); border-radius: 18px; background: #fff; overflow: hidden; box-shadow: var(--shadow-md); }
.matchhero { height: 150px; background: linear-gradient(140deg, var(--color-accent-200), var(--color-accent-100)); display: flex; align-items: center; justify-content: center; font-family: var(--font-heading); font-size: 52px; font-weight: 700; color: var(--color-accent-700); }
.qrbox { display: grid; grid-template-columns: repeat(9, 1fr); gap: 3px; width: 180px; margin: 14px auto; }
.qrbox i { aspect-ratio: 1; background: var(--color-text); border-radius: 2px; }
.qrbox i.off { background: transparent; }
.toast { position: absolute; bottom: calc(var(--nav-h) + 14px); left: 50%; transform: translateX(-50%); background: var(--color-text); color: #fff; font-size: 12.5px; font-weight: 600; padding: 10px 18px; border-radius: 999px; z-index: 70; box-shadow: var(--shadow-md); animation: toastin 0.2s ease; width: max-content; max-width: calc(100% - 32px); text-align: center; line-height: 1.35; }   /* long errors wrap instead of being cut off */


/* ================= v2 visual system (Higgsfield art set) ================= */
.card { border-color: rgba(31,42,54,0.06); box-shadow: 0 1px 2px rgba(31,42,54,.04), 0 8px 24px rgba(31,42,54,.06); }
.chip { background: #fff; border-color: rgba(31,42,54,0.08); box-shadow: 0 1px 2px rgba(31,42,54,.05); }
.chip.on { box-shadow: 0 4px 12px rgba(236,48,19,.28); }
.btn { border-radius: 14px; border-color: rgba(31,42,54,.10); text-decoration: none; }
.btn.primary { box-shadow: 0 6px 16px rgba(236,48,19,.26); }
.btn.glass { background: rgba(20,24,30,.38); color: #fff; border-color: rgba(255,255,255,.28);
  backdrop-filter: blur(12px) saturate(1.3); -webkit-backdrop-filter: blur(12px) saturate(1.3); }
.seg { background: #fff; border-color: rgba(31,42,54,.08); }

/* heroes */
.hero { position: relative; isolation: isolate; height: 200px; background-size: cover; background-position: center;
  display: flex; flex-direction: column; justify-content: space-between; padding: 14px 16px 18px; color: #fff; }
.hero::before { content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(20,24,30,.30) 0%, rgba(20,24,30,0) 34%, rgba(20,24,30,.64) 100%); }
.hero.hero-map { height: 232px; padding-bottom: 38px; }
.hero.hero-sm { height: 168px; }
.hero-top { display: flex; justify-content: flex-end; gap: 6px; min-height: 32px; }
.hero .kicker { color: rgba(255,255,255,.88); }
.hero h1.brand { font-size: 27px; color: #fff; text-shadow: 0 2px 14px rgba(0,0,0,.28); }
.hero-sm h1.brand { font-size: 23px; }
.searchwrap.lifted { margin-top: -24px; position: relative; z-index: 2; }
.searchwrap.lifted input { height: 46px; border-color: transparent; box-shadow: 0 10px 28px rgba(31,42,54,.16); }

/* map */
.mapwrap { border: 0; border-radius: 20px; box-shadow: 0 10px 28px rgba(31,42,54,.12); }
.ltr-tiles { filter: saturate(.55) sepia(.14) brightness(1.04) contrast(.94); }
.pin-dot { box-shadow: 0 4px 12px rgba(31,42,54,.30); }

/* image cards */
.sechead { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px 8px; }
.carousel { display: flex; gap: 12px; overflow-x: auto; padding: 2px 16px 14px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.carousel::-webkit-scrollbar { display: none; }
.scard { flex: 0 0 204px; scroll-snap-align: start; background: #fff; border-radius: 18px; overflow: hidden; cursor: pointer;
  box-shadow: 0 1px 2px rgba(31,42,54,.05), 0 10px 26px rgba(31,42,54,.09); transition: transform .15s ease; }
.scard:active { transform: scale(.98); }
.scard-img { height: 126px; background-size: cover; background-position: center; position: relative; }
.scard-img .pill { position: absolute; top: 8px; left: 8px; }
.scard-img .pill.hot { left: auto; right: 8px; }
.scard-body { padding: 10px 12px 12px; }
.scard-body h3 { margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scard.add { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 5px;
  padding: 16px; background: transparent; border: 2px dashed rgba(236,48,19,.35); box-shadow: none; color: var(--color-accent-700); }
.scard.add .plus { width: 46px; height: 46px; border-radius: 50%; background: var(--color-accent); color: #fff; font-size: 26px;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px rgba(236,48,19,.3); }
.art { background-color: #F4EDDC; background-size: contain !important; background-repeat: no-repeat; }
.pill { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .06em; padding: 4px 9px; border-radius: 999px; white-space: nowrap; }
.pill.glass { background: rgba(20,24,30,.48); color: #fff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.pill.hot { background: var(--color-accent); color: #fff; }
.thumb { width: 54px; height: 54px; border-radius: 14px; background-size: cover; background-position: center; flex-shrink: 0; }
.listrow h3 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nearby { background: #FFF3EE; border: 0; box-shadow: 0 6px 18px rgba(236,48,19,.10); }

/* sheet + listing */
.sheet { border-radius: 26px 26px 0 0; }
.sheet-img { height: 150px; border-radius: 16px; background-size: cover; background-position: center; margin-bottom: 12px; position: relative; }
.sheet-img .pill { position: absolute; left: 10px; bottom: 10px; }
.lhero { height: 300px; background-size: cover; background-position: center; position: relative; isolation: isolate; }
.lhero:not(.art)::before { content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(20,24,30,.35) 0%, rgba(20,24,30,0) 40%); }
.lhero-bar { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center;
  padding: calc(12px + env(safe-area-inset-top)) 14px 0; }
.lhero .art-note { position: absolute; left: 14px; bottom: 34px; }
.lhead { background: var(--color-bg); border-radius: 24px 24px 0 0; margin-top: -24px; position: relative; padding-top: 18px; }
.gallery { display: flex; gap: 6px; overflow-x: auto; margin-top: 12px; scrollbar-width: none; }
.gallery img { width: 84px; height: 84px; object-fit: cover; border-radius: 12px; flex-shrink: 0; }

/* sign-in gate */
.gate-hero { position: relative; height: 56vh; min-height: 380px; max-height: 520px; background-size: cover; background-position: center 72%;
  display: flex; align-items: flex-end; padding: 0 22px 56px; color: #fff; }
.gate-hero::before { content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,24,30,.12) 0%, rgba(20,24,30,0) 30%, rgba(20,24,30,.72) 100%); }
.gate-copy { position: relative; }
.gate-copy .kicker { color: rgba(255,255,255,.88); }
.gate-copy h1.brand { font-size: 29px; line-height: 1.12; color: #fff; margin-top: 6px; text-shadow: 0 2px 16px rgba(0,0,0,.3); }
.gate-sub { font-size: 12.5px; opacity: .92; margin-top: 8px; }
.gate-body { margin-top: -32px; position: relative; z-index: 2; padding-bottom: 24px; }

/* frosted tab bar */
#nav { background: rgba(255,255,255,.88); border-top-color: rgba(31,42,54,.06);
  backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); }
#nav button { border-top: 0; }
#nav button svg { box-sizing: content-box; padding: 3px 14px; border-radius: 999px; transition: background .15s ease; }
#nav button.on svg { background: var(--color-accent-100); }

.carousel { scroll-padding-inline: 16px; }
.scard-body .muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mapwrap { height: 300px; margin-top: 0; }
.seg.sm button { padding: 5px 12px; font-size: 10.5px; }

/* passport ink stamps */
.stampbook { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 6px 0 14px; }
.inkstamp { aspect-ratio: 1; border-radius: 50%; border: 2.5px solid var(--color-accent); outline: 1.5px dashed var(--color-accent);
  outline-offset: -8px; color: var(--color-accent); display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 12px; opacity: .88; font-family: var(--font-heading); }
.inkstamp span { font-size: 16px; font-weight: 700; }
.inkstamp small { font-family: var(--font-body); font-size: 8.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  line-height: 1.15; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.inkstamp em { font-style: normal; font-family: var(--font-body); font-size: 7.5px; font-weight: 800; letter-spacing: .12em; margin-top: 2px; }
.inkstamp.navy { border-color: #1F4E79; outline-color: #1F4E79; color: #1F4E79; }
.inkstamp.pioneer { border-width: 3.5px; }
.inkstamp.ghost { width: 96px; border-color: var(--color-n300); outline-color: var(--color-n300); color: var(--color-n400); transform: rotate(-6deg); flex-shrink: 0; }
.stamp-empty { display: flex; align-items: center; gap: 14px; }

.hero, .lhero, .gate-hero { background-color: #CDBBA0; }

/* edge-to-edge heroes under the iPhone status bar / Dynamic Island */
#screen > .topbar:first-child { padding-top: calc(14px + env(safe-area-inset-top)); }
#screen > .hero:first-child, #screen > .gate-hero:first-child {
  border-top: env(safe-area-inset-top) solid transparent; background-origin: border-box; }
#screen > .hero:first-child { height: calc(200px + env(safe-area-inset-top)); }
#screen > .hero-map:first-child { height: calc(232px + env(safe-area-inset-top)); }
#screen > .hero-sm:first-child { height: calc(168px + env(safe-area-inset-top)); }
.hero::before { background: linear-gradient(180deg, rgba(20,24,30,.10) 0%, rgba(20,24,30,0) 34%, rgba(20,24,30,.64) 100%); }
#screen > .hero:first-child::before, #screen > .gate-hero:first-child::before { top: calc(-1 * env(safe-area-inset-top)); }
#nav:empty { display: none; }

/* one thing to try */
.tcard { flex: 0 0 150px; scroll-snap-align: start; cursor: pointer; }
.tcard-img { height: 150px; border-radius: 18px; position: relative; margin-bottom: 8px;
  box-shadow: 0 1px 2px rgba(31,42,54,.05), 0 8px 20px rgba(31,42,54,.08); }
.tcard-img .pill { position: absolute; top: 8px; left: 8px; }
.tcard b { font-size: 13px; display: block; line-height: 1.25; }
.tcard .muted { font-size: 11.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* trip wallet */
.bignum { font-size: 19px; font-weight: 800; margin-top: 2px; }
.wrapchips { display: flex; flex-wrap: wrap; gap: 6px; }
.settle { display: flex; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--color-divider); font-size: 14px; }
.settle .arrow { color: var(--color-n600); font-size: 12px; }
.settle .amt { margin-left: auto; font-weight: 800; color: var(--color-accent-700); }
.balrow { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.balchip { font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: var(--color-surface); color: var(--color-n700); }
.balchip.up { background: #E6F2EE; color: #1E6B55; }
.balchip.down { background: var(--color-accent-100); color: var(--color-accent-700); }

/* text-style buttons (delete / report / links inside cards) */
.linkbtn { border: 0; background: none; padding: 0; margin-top: 5px; font: inherit; font-size: 11.5px; font-weight: 600;
  color: var(--color-n500); cursor: pointer; text-decoration: none; display: inline-block; }
.linkbtn:hover { color: var(--color-accent-700); }
.searchwrap .clear.hidden { display: none; }
.btn[disabled], .btn[aria-busy="true"] { opacity: .55; cursor: default; }
input[type="time"] { border: 1px solid var(--color-divider); border-radius: 12px; background: #fff; padding: 9px 10px; font-family: var(--font-body); font-size: 14px; }
input[type="time"]:disabled { opacity: .45; }

/* ================= full-screen map (Google/Waze-style) ================= */
#screen.mapmode { overflow: hidden; padding-bottom: 0; position: relative; }
.mapfull { position: absolute; inset: 0; background: #e9efe9; }
.mapfull #leafmap { position: absolute; inset: 0; }
.map-top { position: absolute; left: 0; right: 0; top: 0; z-index: 5; padding: calc(env(safe-area-inset-top) + 10px) 0 0;
  background: linear-gradient(to bottom, rgba(247,242,234,.55), rgba(247,242,234,0)); pointer-events: none; }
.map-top > * { pointer-events: auto; }
.searchbar { position: relative; display: flex; align-items: center; gap: 6px; margin: 0 12px; height: 50px; padding: 0 6px 0 40px;
  background: #fff; border-radius: 999px; box-shadow: 0 6px 22px rgba(31,42,54,.18), 0 1px 3px rgba(31,42,54,.08); }
.searchbar > svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.searchbar input { flex: 1; min-width: 0; border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 0 !important; height: 100%; font-size: 15.5px; outline: none; }
.searchbar .clear { position: static; transform: none; flex-shrink: 0; border: 0; background: var(--color-n300); color: #fff; border-radius: 50%; width: 22px; height: 22px; font-size: 13px; cursor: pointer; line-height: 1; }
.searchbar .clear.hidden { display: none; }
.citybtn { flex-shrink: 0; border: 0; background: var(--color-accent-100); color: var(--color-accent-700); font: 700 12.5px var(--font-body);
  padding: 9px 12px; border-radius: 999px; cursor: pointer; max-width: 140px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lifted-wrap { margin-top: -26px; position: relative; z-index: 2; }
.chiprow.floating { padding: 10px 12px 8px; }
.chiprow.floating .chip { background: #fff; border-color: transparent; box-shadow: 0 2px 8px rgba(31,42,54,.14); text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 600; }
.chiprow.floating .chip.on { background: var(--color-text); color: #fff; }
.chipsep { flex: 0 0 1px; background: rgba(31,42,54,.15); margin: 6px 2px; }
.map-fabs { position: absolute; right: 12px; bottom: 186px; z-index: 5; display: flex; flex-direction: column; gap: 10px; }
.fab-round { width: 46px; height: 46px; border-radius: 50%; border: 0; background: #fff; color: var(--color-text); cursor: pointer;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 16px rgba(31,42,54,.2); }
.fab-round:active { transform: scale(.95); }
.map-bottom { position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; padding-bottom: 10px; pointer-events: none; }
.map-bottom > * { pointer-events: auto; }
.map-count { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 8px 14px; background: rgba(31,42,54,.86); color: #fff;
  font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: 999px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.map-count button { border: 0; background: rgba(255,255,255,.2); color: #fff; font: 700 11.5px var(--font-body); padding: 3px 9px; border-radius: 999px; cursor: pointer; }
.mcarousel { display: flex; gap: 10px; overflow-x: auto; padding: 2px 14px 4px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.mcarousel::-webkit-scrollbar { display: none; }
.mcard { flex: 0 0 290px; scroll-snap-align: start; display: flex; gap: 10px; align-items: center; background: #fff; border-radius: 18px; padding: 8px;
  box-shadow: 0 8px 26px rgba(31,42,54,.18); cursor: pointer; border: 2px solid transparent; }
.mcard.on { border-color: var(--color-accent); }
.mcard.empty { margin: 0 14px; flex-basis: auto; justify-content: space-between; padding: 14px; cursor: default; }
.mcard.add { flex-basis: 190px; }
.mcard.add .plus { width: 40px; height: 40px; border-radius: 50%; background: var(--color-accent); color: #fff; font-size: 24px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.mcard-img { width: 78px; height: 78px; flex-shrink: 0; border-radius: 13px; background-size: cover; background-position: center; background-color: #eee; }
.mcard-body { min-width: 0; }
.mcard-body h3 { margin: 1px 0 2px; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* pins */
.mpin { position: relative; width: 36px; height: 44px; cursor: pointer; filter: drop-shadow(0 3px 5px rgba(31,42,54,.35)); transition: transform .15s ease; transform-origin: 50% 100%; }
.mpin-body { position: absolute; left: 2px; top: 0; width: 32px; height: 32px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  background: var(--pc); border: 2.5px solid #fff; display: flex; align-items: center; justify-content: center; }
.mpin-body svg { width: 17px; height: 17px; transform: rotate(45deg); }
.mpin-n { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: var(--color-text); color: #fff;
  font: 800 10.5px/18px var(--font-body); text-align: center; border: 2px solid #fff; }
.mpin.on { transform: scale(1.25); z-index: 3; }
.me-dot { width: 18px; height: 18px; border-radius: 50%; background: #2b7bff; border: 3px solid #fff; box-shadow: 0 1px 6px rgba(0,0,0,.3); position: relative; }
.me-dot span { position: absolute; inset: -12px; border-radius: 50%; background: rgba(43,123,255,.25); animation: mepulse 2s ease-out infinite; }
@keyframes mepulse { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
.maplibregl-ctrl-attrib { font-size: 10px; }
.mapfull .maplibregl-ctrl-bottom-right { bottom: 168px; right: 70px; }
.mapfull .maplibregl-ctrl-bottom-left { bottom: 168px; }
/* old raster fallback inside the full-screen frame */
.mapfull .leaflet-container { background: #e9efe9; }

.emoji-art { display: flex; align-items: center; justify-content: center; font-size: 46px; position: relative;
  background: linear-gradient(135deg, #fde7df, #f7efe2); }
.sheet-img.emoji-art { font-size: 64px; }

.guide-tabs .chip { font-weight: 700; }
.monthnav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fab-round.sm { width: 38px; height: 38px; font-size: 22px; line-height: 1; box-shadow: 0 2px 10px rgba(31,42,54,.14); }
.guide-item h3 { font-size: 15.5px; }

/* Before You Leave — tier badges */
.tier{font-size:10.5px;font-weight:800;letter-spacing:.06em;padding:3px 8px;border-radius:999px;white-space:nowrap}
.tier-law{background:#fde7e2;color:#ae1800}
.tier-enforced{background:#fff1d6;color:#8a5a00}
.tier-norm{background:#e8eef6;color:#2d4f7c}
.brief-entry h3{font-size:15px}
.penalty{margin-top:8px;font-size:13px;background:#faf7f2;border-left:3px solid #e0442a;padding:6px 9px;border-radius:6px}

/* Live prices */
.livepill { margin: 0 12px; display: inline-flex; align-items: center; gap: 7px; background: #fff; border: 0; border-radius: 999px; padding: 8px 13px; font: inherit; font-size: 13px; font-weight: 700; color: var(--color-text); box-shadow: 0 2px 8px rgba(31,42,54,.16); cursor: pointer; }
.livedot { width: 8px; height: 8px; border-radius: 50%; background: #e0442a; display: inline-block; box-shadow: 0 0 0 0 rgba(224,68,42,.5); animation: livepulse 1.8s infinite; }
@keyframes livepulse { 0% { box-shadow: 0 0 0 0 rgba(224,68,42,.5); } 70% { box-shadow: 0 0 0 7px rgba(224,68,42,0); } 100% { box-shadow: 0 0 0 0 rgba(224,68,42,0); } }
.pstat, .prow { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.pstat + .pstat, .prow + .prow { border-top: 1px solid rgba(31,42,54,.08); }
.pstat > div:nth-child(2) { flex: 1; }
.pstat-e { font-size: 22px; width: 30px; text-align: center; }
.pstat-fair { font-size: 20px; font-weight: 800; }
.pv { font-size: 10px; font-weight: 800; letter-spacing: .06em; padding: 2px 7px; border-radius: 999px; vertical-align: 2px; }
.pv-fair { background: #e3f3ea; color: #1d7a4c; }
.pv-pricey { background: #fde7e2; color: #ae1800; }

/* Rip-off check */
.liverow { display: flex; gap: 8px; padding: 0 12px; flex-wrap: wrap; }
.liverow .livepill { margin: 0; }
.scanpill { background: var(--color-text); color: #fff; }
.scanshot { height: 190px; border-radius: 16px; background: #222 center/cover no-repeat; margin-top: 10px; position: relative; overflow: hidden; }
.scanshot.small { height: 110px; opacity: .8; }
.scanline { position: absolute; left: 0; right: 0; height: 3px; background: #e0442a; box-shadow: 0 0 14px 4px rgba(224,68,42,.55); animation: scanmove 1.6s ease-in-out infinite alternate; }
@keyframes scanmove { from { top: 6%; } to { top: 92%; } }
.verdict { display: flex; gap: 12px; align-items: center; border-radius: 16px; padding: 14px; margin-top: 10px; }
.verdict .vicon { font-size: 26px; font-weight: 900; width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.6); flex: none; }
.verdict .vlabel { font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.verdict .vhead { font-size: 17px; font-weight: 700; line-height: 1.25; margin-top: 2px; }
.v-fair { background: #e3f3ea; color: #145c38; }
.v-pricey { background: #fff1d6; color: #7a4d00; }
.v-trap { background: #fde7e2; color: #8f1400; }
.v-unclear { background: #eef0f3; color: #3c4652; }
.tipcard { background: #fffaf0; }

/* Map tip cards (arrival, two-block rule) */
.tipcard-map { margin: 8px 12px 0; background: #fff; border-radius: 16px; padding: 12px 14px; box-shadow: 0 4px 16px rgba(31,42,54,.16); font-size: 14px; line-height: 1.4; }
.tipcard-map ul { margin: 6px 0 0; padding-left: 18px; }
.tipcard-map li { margin: 3px 0; }
/* Passport: markups flagged */
.markups { margin-top: 10px; padding: 8px 10px; border-radius: 10px; background: #fde7e2; color: #8f1400; font-size: 13.5px; }
/* Phrase cards */
.phrase { padding: 9px 0; cursor: pointer; }
.phrase + .phrase { border-top: 1px solid rgba(31,42,54,.08); }
.phrase-local { font-size: 19px; font-weight: 700; margin: 2px 0; }
.phrasebig { position: fixed; inset: 0; z-index: 100; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; }
.phrase-huge { font-size: 42px; font-weight: 800; line-height: 1.2; color: var(--color-text); }
.pv-ok { background: #fff1d6; color: #8a5a00; }

/* Lounges */
.lchip { display: inline-block; font-size: 12.5px; font-weight: 600; padding: 4px 9px; border-radius: 999px; background: #f3efe8; }

/* First-run "start here" card on an empty map */
.startcard { margin: 0 12px 10px; background: #fff; border-radius: 20px; padding: 14px 14px 12px; box-shadow: 0 6px 20px rgba(31,42,54,.16); }
.startrow { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: none; border: 0; padding: 10px 2px; font: inherit; color: inherit; cursor: pointer; }
.startrow + .startrow { border-top: 1px solid rgba(31,42,54,.08); }
.startrow > span:first-child { font-size: 24px; width: 32px; text-align: center; }
.startrow > div { flex: 1; min-width: 0; }
.mapfull:has(.startcard) .map-fabs { bottom: 350px; }

/* Live price tags on the map (street level only) */
.ptag { display: none; border: 0; font: 700 12px var(--font-body); padding: 4px 8px; border-radius: 999px; background: #fff; color: var(--color-text); box-shadow: 0 2px 6px rgba(31,42,54,.25); white-space: nowrap; cursor: pointer; }
.tags-on .ptag { display: block; }
.ptag-fair { background: #e3f3ea; color: #145c38; }
.ptag-pricey { background: #fde7e2; color: #8f1400; }
.pricechip { display: flex; flex-direction: column; align-items: center; min-width: 64px; padding: 8px 10px; border-radius: 14px; background: #f3efe8; }
.pricechip > span:first-child { font-size: 20px; }
.pricechip b { font-size: 17px; }

/* Scam radar */
.scamfab { font-size: 18px; }
.scampin { border: 0; width: 30px; height: 30px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px #e0442a, 0 2px 8px rgba(31,42,54,.3); font-size: 15px; cursor: pointer; padding: 0; }
.scamcard { border-left: 4px solid #e0442a; cursor: pointer; }
/* Receipt check */
.rflag { padding: 8px 0; font-size: 14px; }
.rflag + .rflag { border-top: 1px solid rgba(31,42,54,.08); }
.rflag-high { color: #8f1400; }
/* Tourist-tax meter */
.taxchip { margin-top: 8px; padding: 7px 10px; border-radius: 10px; font-size: 13px; }
.tax-up { background: #fde7e2; color: #8f1400; }
.tax-down { background: #e3f3ea; color: #145c38; }

/* Accessibility: 44-pt touch targets without changing the look.
   An invisible ::after extends the hit area of small controls. */
.chip, .linkbtn, .seg button, .scampin, .ptag, .pv { position: relative; }
.chip::after, .seg button::after, .ptag::after { content: ''; position: absolute; left: -2px; right: -2px; top: 50%; height: 44px; transform: translateY(-50%); }
.linkbtn::after { content: ''; position: absolute; left: -8px; right: -8px; top: 50%; height: 44px; transform: translateY(-50%); }
.scampin::after { content: ''; position: absolute; inset: -7px; border-radius: 50%; }
/* keep chip rows from overlapping hit areas too much */
.wrapchips, .chiprow { row-gap: 8px; }

/* Respect the system's Reduce Motion setting (pulsing dots, scan line, sheet slides). */
@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; }
}

/* Cruise port day: the all-aboard countdown pill and sheet */
.aboardpill.aboard-ok { background: #fff; }
.aboardpill.aboard-soon { background: #fff4e0; color: #8a5200; }
.aboardpill.aboard-go, .aboardpill.aboard-late { background: #c62a12; color: #fff; }
.aboardbig { margin-top: 8px; border-radius: 16px; padding: 14px 16px; background: var(--color-accent-100); text-align: center; }
.aboardbig.aboard-soon { background: #fff4e0; color: #6b4000; }
.aboardbig.aboard-go, .aboardbig.aboard-late { background: #c62a12; color: #fff; }
.aboardleft { font-size: 34px; font-weight: 800; line-height: 1.15; margin: 4px 0; letter-spacing: -0.5px; }
