@font-face {
  font-family: "Creepster"; src: url("fonts/creepster-latin.woff2") format("woff2");
  font-display: swap;
}
:root {
  --bg: #0d0a14;
  --surface: #17121f;
  --surface-2: #211a2c;
  --glass: rgba(23, 18, 31, .86);
  --line: #2f2640;
  --text: #f3eefa;
  --muted: #a99bbd;
  --orange: #ff8a1f;
  --purple: #b57bff;
  --pink: #ff6fae;
  --blue: #4da3ff;
  --radius: 20px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); overflow: hidden; }
body {
  font: 15px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; overscroll-behavior: none;
}
button { font: inherit; color: inherit; touch-action: manipulation; }
h2:focus { outline: none; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- map fills the whole screen ---------- */
#map { position: fixed; inset: 0; background: #0b0910; }
.maplibregl-map { font: inherit; }
.maplibregl-ctrl-bottom-left, .maplibregl-ctrl-bottom-right { bottom: var(--safe-b); }
.maplibregl-ctrl-attrib.maplibregl-compact {
  background: rgba(23, 18, 31, .85) !important; color: var(--muted);
  border: 1px solid rgba(255, 255, 255, .09); box-shadow: 0 4px 12px rgba(0, 0, 0, .4);
}
.maplibregl-ctrl-attrib-button { background-color: transparent !important; opacity: .7; }
.maplibregl-ctrl-attrib a { color: var(--muted); }
.maplibregl-ctrl-attrib-button { filter: invert(1); }

.glass {
  background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .45);
}

/* ---------- floating filter chips ---------- */
.chips {
  position: fixed; z-index: 500; top: calc(var(--safe-t) + 10px);
  left: 0; right: 0; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  padding: 2px calc(var(--safe-r) + 12px) 8px calc(var(--safe-l) + 12px); pointer-events: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  pointer-events: auto; flex: none; display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 13px; border-radius: 999px; font-size: 14px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
}
.chip .n { color: var(--muted); font-weight: 500; font-size: 12px; font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] { background: #fff1e3; color: #1b1222; border-color: #fff1e3; }
.chip[aria-pressed="true"] .n { color: #6b5a7a; }

.offline-badge {
  position: fixed; z-index: 500; top: calc(var(--safe-t) + 56px); left: calc(var(--safe-l) + 12px);
  padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: #3a2a10; color: #ffc27a; border: 1px solid #5c4318;
}

/* ---------- floating buttons ---------- */
.fabs {
  position: fixed; z-index: 500; right: calc(var(--safe-r) + 12px); bottom: calc(var(--safe-b) + 28px);
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: 14px; background: rgba(23, 18, 31, .9); border: 1px solid rgba(255, 255, 255, .09);
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .05);
  transition: transform .25s cubic-bezier(.2, .8, .2, 1);
}
.fabs.tucked { visibility: hidden; }
.fab {
  width: 46px; height: 46px; display: grid; place-items: center; padding: 0; margin: 0;
  border: 0; border-radius: 0; background: transparent; color: #ddd3ec; cursor: pointer;
  transition: background-color .15s, color .15s;
}
.fab + .fab { border-top: 1px solid rgba(255, 255, 255, .08); }
.fab:hover { background: rgba(255, 255, 255, .05); }
.fab:active { background: rgba(255, 255, 255, .1); }
.fab:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--orange); border-radius: 12px; }
.fab svg { transition: transform .15s; }
.fab:active svg { transform: scale(.9); }
.fab.active { color: var(--blue); }
.fab.active .arrow { fill: currentColor; }
.fab.busy svg { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

.toast:not(.show) { opacity: 0; visibility: hidden; pointer-events: none; }
.toast {
  transition: opacity .2s, visibility .2s;
  position: fixed; z-index: 900; left: 50%; top: calc(var(--safe-t) + 60px); transform: translateX(-50%);
  max-width: min(90vw, 420px); padding: 9px 14px; border-radius: 12px; font-size: 14px; text-align: center;
  background: #241c30; border: 1px solid var(--line); box-shadow: 0 6px 18px rgba(0, 0, 0, .45);
}

/* ---------- details card (on pin tap) ---------- */
.card {
  position: fixed; z-index: 600; left: calc(var(--safe-l) + 10px); right: calc(var(--safe-r) + 10px);
  bottom: calc(var(--safe-b) + 10px); padding: 10px 18px 18px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); box-shadow: 0 -4px 30px rgba(0, 0, 0, .5);
  max-height: calc(100dvh - var(--safe-t) - var(--safe-b) - 70px); overflow-y: auto; overscroll-behavior: contain;
  animation: card-in .26s cubic-bezier(.2, .8, .2, 1);
}
@keyframes card-in { from { transform: translateY(24px); opacity: 0; } }
.card-grip { width: 38px; height: 5px; border-radius: 3px; background: #4a3e5c; margin: 0 auto 10px; }
.card-close, .icon-btn {
  position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%;
  border: 0; background: var(--surface-2); color: var(--muted); font-size: 14px; cursor: pointer;
}
.card h2 { margin: 0 44px 2px 0; font-size: 21px; letter-spacing: -.015em; }
.card .meta { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag { font-size: 13px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); overflow-wrap: anywhere; }
.tag.candy { color: #ffc189; border-color: #4f3317; }
.tag.adult { color: #d7b6ff; border-color: #3f2a5e; }
.tag.baked { color: #ffb3d4; border-color: #5a2740; }
.note {
  margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: #1d1727;
  border-left: 3px solid var(--orange); color: #e4dbef; font-size: 15px; overflow-wrap: anywhere;
}
.card .actions { display: flex; gap: 8px; margin-top: 14px; }
.btn {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px;
  padding: 0 14px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--orange); color: #1b1222; font-weight: 700; font-size: 15px; text-decoration: none;
}
.near { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; font-size: 13px; color: var(--muted); }
.near > span { margin-right: 2px; }
.near-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font-size: 14px; cursor: pointer;
}
.btn.ghost { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); }

/* ---------- list panel (on demand) ---------- */
#feedback { z-index: 850; } /* always above the list it can be opened from */
.panel {
  position: fixed; z-index: 800; inset: 0; display: flex; flex-direction: column; background: var(--surface);
  animation: panel-in .24s cubic-bezier(.2, .8, .2, 1);
}
@keyframes panel-in { from { transform: translateY(16px); opacity: 0; } }
.panel-head {
  flex: none; padding: calc(var(--safe-t) + 12px) calc(var(--safe-r) + 14px) 12px calc(var(--safe-l) + 14px);
  border-bottom: 1px solid var(--line);
}
.panel-title { position: relative; display: flex; align-items: center; min-height: 34px; }
.panel-title h2 { margin: 0; font-size: 19px; letter-spacing: -.01em; }
.panel-title h2 em { font-style: normal; color: var(--orange); }
.panel-title .icon-btn { top: 0; right: 0; }
.panel-tools { display: flex; gap: 8px; margin-top: 12px; }
.search {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 40px;
  border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted);
}
.search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; color: var(--text); font-size: 16px; }
.search:focus-within { outline: 2px solid var(--orange); outline-offset: 1px; border-color: transparent; }
.sort { flex: none; display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.sort button { border: 0; background: none; padding: 0 10px; border-radius: 9px; font-size: 13px; color: var(--muted); cursor: pointer; }
.sort button[aria-pressed="true"] { background: #3a2f4d; color: var(--text); }

.list {
  flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  padding: 0 calc(var(--safe-r) + 14px) calc(var(--safe-b) + 20px) calc(var(--safe-l) + 14px);
}
.group-label {
  position: sticky; top: 0; z-index: 1; margin: 0 -14px; padding: 12px 14px 6px; background: var(--surface);
  font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
}
.row {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; width: 100%;
  padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; cursor: pointer;
}
.row .addr { font-weight: 600; font-size: 16px; }
.row .emo { font-size: 15px; letter-spacing: 2px; }
.row .dist { grid-column: 1 / -1; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.list-info {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 12px 0 2px; padding: 9px 12px;
  border-radius: 12px; background: #2a2035; color: var(--text); font-size: 14px;
}
.link { margin-left: auto; padding: 4px 0; border: 0; background: none; color: var(--orange); font-weight: 700; cursor: pointer; }
.unplaced { margin: 16px 0 0; padding: 10px 12px; border-radius: 12px; background: #1d1727; border: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.unplaced strong { color: var(--text); }
.unplaced ul { margin: 6px 0 0; padding-left: 18px; }
/* ---------- feedback ---------- */
.seg { display: flex; gap: 4px; margin-top: 12px; padding: 3px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.seg button { flex: 1; height: 36px; border: 0; border-radius: 9px; background: none; color: var(--muted); font-weight: 600; cursor: pointer; }
.seg button[aria-pressed="true"] { background: #3a2f4d; color: var(--text); }
.fb-form {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 14px calc(var(--safe-r) + 16px) calc(var(--safe-b) + 24px) calc(var(--safe-l) + 16px);
}
.fld { display: block; margin: 0 0 16px; padding: 0; border: 0; }
.fld > span, .fld legend { display: block; margin-bottom: 6px; padding: 0; font-weight: 600; font-size: 14px; }
.fld small { color: var(--muted); font-weight: 500; }
.fld input[type="text"], .fld textarea {
  width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2);
  color: var(--text); font: inherit; font-size: 16px; resize: vertical;
}
.fld input[type="text"]:focus, .fld textarea:focus { outline: 2px solid var(--orange); outline-offset: 1px; border-color: transparent; }
.check { display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: 15px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--orange); }
#fbOtherText { margin-top: 6px; }
.emo-i { margin-right: 6px; }
.fb-err { margin: -4px 0 12px; color: #ff9a9a; font-size: 14px; }
.fb-form > .btn { width: 100%; }
.fb-note { color: var(--muted); font-size: 13px; margin: 10px 0 0; }
.fb-done { margin-top: 16px; padding: 14px; border-radius: 14px; background: #1d2a1f; border: 1px solid #2f5a37; }
.fb-done p { margin: 0 0 8px; }
.fb-done .btn { width: 100%; margin-top: 6px; }
.fb-done a { color: var(--orange); }
.foot .link { margin: 8px 0 0; }
.empty { padding: 32px 4px; text-align: center; color: var(--muted); }
.foot { padding: 20px 4px 0; color: var(--muted); font-size: 12px; text-align: center; }
.foot .btn { margin-top: 12px; flex: none; }

/* ---------- map pins ---------- */
.pin-wrap {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 0 0 8px; margin: 0; border: 0; background: none; cursor: pointer;
}
.pin-label {
  padding: 2px 7px; border-radius: 6px; background: rgba(23, 18, 31, .92); border: 1px solid rgba(255, 255, 255, .08);
  color: #efe8f8; font: 700 11px/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  white-space: nowrap; box-shadow: 0 2px 6px rgba(0, 0, 0, .5); pointer-events: none;
}
.pin-wrap.selected .pin-label { background: var(--orange); color: #1b1222; border-color: var(--orange); }
.pin {
  position: relative; display: flex; align-items: center; gap: 1px; padding: 6px 8px; border-radius: 999px;
  background: #1a1422; border: 2px solid var(--orange); box-shadow: 0 3px 10px rgba(0, 0, 0, .6);
  font-size: 15px; line-height: 1; white-space: nowrap; transform-origin: 50% 100%; transition: transform .15s;
}
.pin::after {
  content: ""; position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%);
  border: 5px solid transparent; border-top: 6px solid var(--orange); border-bottom: 0;
}
.pin.adult { border-color: var(--purple); }
.pin.adult::after { border-top-color: var(--purple); }
.pin-wrap.selected .pin { transform: scale(1.3); background: #2c1f3a; box-shadow: 0 0 0 5px rgba(255, 138, 31, .3), 0 4px 14px rgba(0, 0, 0, .6); }
.pin-wrap:focus-visible { outline: none; }
.pin-wrap:focus-visible .pin { outline: 2px solid #fff; outline-offset: 2px; }
.pin-wrap .leg {
  display: none; position: absolute; left: 50%; bottom: 0; width: 2px; z-index: -1;
  background: linear-gradient(rgba(255, 138, 31, .75), rgba(255, 138, 31, .25)); transform-origin: 50% 100%;
  border-radius: 1px; pointer-events: none;
}
.pin-wrap.spidered .leg { display: block; }
.spider-hub { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px rgba(255, 138, 31, .25); }

/* group marker: count label over a stacked bubble (pattern from the snowfield resort map) */
.group-wrap {
  display: flex; flex-direction: column; align-items: center; padding: 0; margin: 0; border: 0; background: none;
  cursor: pointer;
}
/* MapLibre positions the marker element itself with transform every frame, so it must never
   carry a transition or transform of its own; the press effect lives on the inner stack. */
.group-stack { transition: transform .15s; }
.group-wrap:active .group-stack { transform: scale(.95); }
.group-wrap:focus-visible { outline: none; }
.group-wrap:focus-visible .group-bubble { outline: 2px solid #fff; outline-offset: 2px; }
.group-count {
  display: inline-flex; align-items: center; gap: 4px; margin-bottom: 3px; padding: 2px 8px; border-radius: 6px;
  background: #241c30; color: var(--text); font-size: 11px; font-weight: 700; white-space: nowrap;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .5);
}
.group-count span { font-size: 8px; color: var(--muted); }
.group-stack { position: relative; display: inline-flex; --c: var(--orange); --s: 1; }
.group-stack.adult { --c: var(--purple); }
.group-stack .ghost {
  position: absolute; inset: 0; border-radius: 999px; border: 2px solid var(--c); background: rgba(26, 20, 34, .6);
}
.group-stack .g1 { transform: translate(calc(3px * var(--s)), calc(3px * var(--s))); opacity: .7; }
.group-stack .g2 { transform: translate(calc(6px * var(--s)), calc(6px * var(--s))); opacity: .45; }
.group-bubble {
  position: relative; display: inline-flex; align-items: center; gap: 1px; border-radius: 999px;
  padding: calc(6px * var(--s)) calc(11px * var(--s));
  background: #1a1422; border: calc(2.5px * var(--s)) solid var(--c); font-size: calc(15px * var(--s)); line-height: 1; white-space: nowrap;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .6);
}
/* "you are here": MapLibre positions .me-marker with transform, so animate only its children */
.me-marker {
  display: flex; flex-direction: column; align-items: center; padding: 0; margin: 0; border: 0; background: none;
  cursor: pointer; -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; touch-action: manipulation;
}
.me-marker:focus-visible { outline: none; }
.me-marker:focus-visible .me-art { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 10px; }
.me-bob { display: block; animation: me-bob 2.6s ease-in-out infinite; }
.me-art {
  display: grid; place-items: center; width: 40px; height: 40px; line-height: 1;
  filter: drop-shadow(0 0 7px rgba(255, 255, 255, .45)) drop-shadow(0 4px 5px rgba(0, 0, 0, .6));
}
/* emoji costumes sit on a cream badge so dark ones (black cat, bat) still read on the night map */
.me-art.emoji {
  font-size: 25px; border-radius: 50%; background: #fff1e3; border: 2px solid var(--orange);
  filter: drop-shadow(0 0 8px rgba(255, 138, 31, .55)) drop-shadow(0 4px 5px rgba(0, 0, 0, .6));
}
.me-shadow {
  display: block; width: 26px; height: 8px; margin-top: 1px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(181, 123, 255, .75), rgba(181, 123, 255, 0));
  animation: me-shadow 2.6s ease-in-out infinite;
}
@keyframes me-bob { 50% { transform: translateY(-5px); } }
@keyframes me-shadow { 50% { transform: scale(.75); opacity: .6; } }
.me-marker.wiggle .me-art { animation: me-wiggle .55s ease-in-out; }
@keyframes me-wiggle { 20% { transform: rotate(-14deg) scale(1.12); } 45% { transform: rotate(11deg) scale(1.12); } 70% { transform: rotate(-6deg); } }
.me-bubble {
  position: absolute; bottom: 100%; left: 50%; margin-bottom: 4px; padding: 4px 10px; border-radius: 12px;
  background: #fff7ec; color: #1b1222; font: 700 13px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  white-space: nowrap; box-shadow: 0 4px 12px rgba(0, 0, 0, .45); pointer-events: none;
  animation: me-bubble 1.9s ease forwards;
}
.me-bubble::after { content: ""; position: absolute; top: 100%; left: 50%; margin-left: -5px; border: 5px solid transparent; border-top-color: #fff7ec; }
@keyframes me-bubble {
  0% { opacity: 0; transform: translate(-50%, 6px) scale(.8); }
  12%, 80% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -6px); }
}

/* easter egg: bats across the screen */
.bat-flock { position: fixed; inset: 0; z-index: 1500; pointer-events: none; overflow: hidden; }
.flying-bat {
  position: absolute; left: -60px; top: var(--y); width: var(--w); fill: #0b0810;
  filter: drop-shadow(0 0 3px rgba(255, 138, 31, .5));
  animation: bat-fly 2.6s ease-in var(--d) both, flap .18s ease-in-out infinite alternate;
}
@keyframes bat-fly { to { translate: calc(100vw + 120px) var(--dy); } }

/* ---------- watermark ---------- */
.watermark {
  position: fixed; z-index: 400; cursor: pointer; left: calc(var(--safe-l) + 14px); bottom: calc(var(--safe-b) + 34px);
  font: clamp(13px, 4.6vw, 19px)/1 "Creepster", fantasy; letter-spacing: .03em; color: rgba(255, 138, 31, .32);
  text-shadow: 0 0 12px rgba(255, 138, 31, .18); transform: rotate(-3deg); transform-origin: left bottom;
  pointer-events: auto; user-select: none; -webkit-user-select: none; white-space: nowrap;
}
.watermark span { font-size: 15px; opacity: .7; filter: grayscale(.4); }

/* ---------- splash ---------- */
.splash {
  position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(120% 80% at 72% 12%, #3d2558 0%, #1b1129 40%, #0d0a14 78%);
  transition: opacity .55s ease, visibility .55s; cursor: pointer;
}
.splash.out { opacity: 0; visibility: hidden; }
.splash-stars {
  position: absolute; inset: 0; opacity: .7;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, #fff, transparent), radial-gradient(1px 1px at 28% 8%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 44% 22%, #fff, transparent), radial-gradient(1px 1px at 61% 6%, #fff, transparent),
    radial-gradient(1px 1px at 88% 30%, #fff, transparent), radial-gradient(1.5px 1.5px at 8% 42%, #fff, transparent),
    radial-gradient(1px 1px at 33% 36%, #fff, transparent), radial-gradient(1px 1px at 92% 52%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 18% 62%, #fff, transparent), radial-gradient(1px 1px at 52% 48%, #fff, transparent);
  animation: twinkle 3.5s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .45; } to { opacity: .85; } }
.splash-moon {
  position: absolute; top: calc(var(--safe-t) + 7%); right: 12%; width: clamp(70px, 22vw, 120px); aspect-ratio: 1;
  border-radius: 50%; background: radial-gradient(circle at 38% 36%, #fff6dc, #f1dcae 60%, #d9bf86);
  box-shadow: 0 0 40px 12px rgba(255, 236, 190, .22), 0 0 120px 40px rgba(181, 123, 255, .12);
}
.bat { position: absolute; fill: #07050b; width: 38px; animation: flap .35s ease-in-out infinite alternate, drift 9s ease-in-out infinite alternate; }
.bat-1 { top: 16%; left: 14%; }
.bat-2 { top: 24%; right: 30%; width: 26px; animation-delay: .12s, -3s; }
.bat-3 { top: 11%; left: 48%; width: 20px; animation-delay: .2s, -6s; }
@keyframes flap { from { transform: scaleY(1); } to { transform: scaleY(.55); } }
@keyframes drift { from { translate: 0 0; } to { translate: 30px -14px; } }

.splash-inner { position: relative; z-index: 1; text-align: center; padding: 0 24px 60px; max-width: 520px; }
.splash-pumpkin {
  width: clamp(92px, 28vw, 128px); filter: drop-shadow(0 0 26px rgba(255, 138, 31, .45));
  animation: bob 2.6s ease-in-out infinite;
}
.splash-pumpkin .glow { animation: flicker 2.2s infinite; }
@keyframes bob { 50% { transform: translateY(-6px); } }
@keyframes flicker { 0%, 100% { opacity: 1; } 42% { opacity: .78; } 46% { opacity: .95; } 70% { opacity: .85; } }
.splash-title {
  margin: 14px 0 6px; font: clamp(44px, 13vw, 72px)/.95 "Creepster", fantasy; letter-spacing: .02em;
  color: var(--orange); text-shadow: 0 3px 0 #5a2a00, 0 0 28px rgba(255, 138, 31, .35);
}
.splash-title span { display: block; color: #f3eefa; font-size: .62em; text-shadow: 0 0 20px rgba(181, 123, 255, .5); }
.splash-sub { margin: 10px 0 14px; color: var(--muted); font-size: 16px; }
.splash-sub span { color: var(--text); font-weight: 700; }
.splash-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.splash-legend > span {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px;
  background: rgba(23, 18, 31, .7); border: 1px solid var(--line); font-size: 13px; color: var(--text);
}
.splash-legend .dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--orange); background: #1a1422; }
.splash-legend .dot.adult { border-color: var(--purple); }
.splash-hint { margin: 16px 0 0; color: #cdbfe0; font-size: 14px; opacity: .8; }
.splash-town { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: clamp(70px, 16vh, 140px); }

@media (prefers-reduced-motion: reduce) {
  .splash-stars, .bat, .splash-pumpkin, .splash-pumpkin .glow { animation: none; }
  .me-bob, .me-shadow { animation: none; }
}

/* ---------- wide screens ---------- */
@media (min-width: 760px) {
  .chips { justify-content: center; }
  .panel-open .chips { justify-content: flex-start; padding-left: 428px; }
  .panel-open .watermark { left: 428px; }
  .panel-open .card { width: min(380px, calc(100vw - 436px - 76px)); }
  .watermark { font-size: 22px; }
  .card { left: auto; right: calc(var(--safe-r) + 76px); width: 380px; }
  .panel { inset: 12px auto 12px 12px; width: 400px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
  .panel-head { padding-top: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .card, .panel { animation: none; }
  .pin, .fabs { transition: none; }
}

/* Windows High Contrast / forced colors: CSS-triangle pin tips turn into squares, and filled
   buttons lose their shape; hide the tips and outline the buttons instead. */
@media (forced-colors: active) {
  .pin::after { display: none; }
  .btn, .chip, .near-chip, .fab, .group-bubble, .pin { border: 1px solid ButtonText; }
  .pin-wrap.selected .pin, .chip[aria-pressed="true"] { outline: 2px solid Highlight; }
}
