/* Venue map player — top bar, map and bottom sheet on phones; map + side panel on desktop. */

body.park-player {
  height: 100%;
  overflow: hidden;
  background: var(--bg, #fff);
  color: var(--ink, #16181d);
}
html:has(body.park-player) { height: 100%; overscroll-behavior: none; }

body.park-player .city-wrap { display: none; }
body.park-player .nav-sheet.open {
  display: block;
  position: fixed;
  top: var(--head);
  left: 0;
  right: 0;
  z-index: 801;
  max-height: calc(100dvh - var(--head));
  overflow: auto;
  box-shadow: 0 16px 40px rgba(23, 11, 46, .16);
}
body.park-player .tabbar,
body.park-player .site-foot { display: none !important; }

.venue-app [hidden] { display: none !important; }

.venue-app {
  --v-seen: var(--green, #2f7a3d);
  --v-seen-soft: #e6f2e8;
  --v-chip: #f2f4f8;

  position: fixed;
  top: calc(var(--head) + 8px);
  left: 0;
  right: 0;
  margin: 0 auto;
  width: var(--content-w, min(1180px, calc(100% - 40px)));
  height: calc(100dvh - var(--head) - 16px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border-radius: 18px;
  border: 1px solid var(--line, #e8e8e8);
  box-shadow: var(--shadow, 0 10px 30px rgba(30, 35, 60, .10));
}

/* ---------- top bar ---------- */
.v-top {
  position: relative;
  z-index: 700;
  flex: 0 0 auto;
  padding: 12px 14px 12px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.v-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.v-icon-btn {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--v-chip);
  color: var(--ink);
}
.v-icon-btn:hover { background: var(--blue-soft); color: var(--blue); }
.v-titles { flex: 1; min-width: 0; }
.v-titles h1 {
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -.01em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.v-titles p {
  margin-top: 2px;
  font-size: .76rem;
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.v-pct {
  flex: 0 0 auto;
  font-size: .8rem;
  font-weight: 800;
  color: var(--blue);
  font-variant-numeric: tabular-nums;
}
.v-bar {
  height: 5px;
  margin-top: 10px;
  border-radius: 3px;
  background: #e9ecf3;
  overflow: hidden;
}
.v-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 3px;
  background: var(--blue);
  transition: width .4s ease;
}
.v-signin {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 0;
  font-size: .78rem;
  font-weight: 700;
  color: var(--blue);
}
.v-top .map-fb-dock { margin-left: 0; }

/* ---------- map ---------- */
#map {
  position: relative;
  flex: 1 1 auto;
  min-height: 30dvh;
  z-index: 1;
  background: #e8eee6;
}
#map .leaflet-control-attribution { font-size: 9px; }

.v-pin {
  width: 30px;
  height: 30px;
  border-width: 2.5px;
  background: var(--blue);
  box-shadow: 0 3px 8px rgba(20, 30, 70, .35);
  transition: transform .15s ease;
}
.v-pin.seen {
  width: 24px;
  height: 24px;
  border-width: 2px;
  background: var(--v-seen);
  opacity: .75;
}
.v-pin.sel {
  width: 44px;
  height: 44px;
  border-width: 3px;
  box-shadow: 0 0 0 8px rgba(29, 63, 191, .22), 0 6px 16px rgba(20, 30, 70, .45);
}
.v-pin.seen.sel { opacity: 1; box-shadow: 0 0 0 8px rgba(47, 122, 61, .22), 0 6px 16px rgba(20, 30, 70, .45); }
.v-pin.near {
  background: var(--star, #e8a11c);
  animation: v-pulse 1.3s ease-in-out infinite;
}
@keyframes v-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232, 161, 28, .55), 0 3px 8px rgba(20, 30, 70, .35); }
  50% { box-shadow: 0 0 0 11px rgba(232, 161, 28, 0), 0 3px 8px rgba(20, 30, 70, .35); }
}
/* Estimated: we think it is here, visitors confirm. */
.v-pin.est:not(.seen) {
  background: #fff;
  color: var(--blue);
  border-style: dashed;
  border-color: var(--blue);
}
.v-pin.est:not(.seen) span { color: var(--blue); font-weight: 900; font-size: 15px; line-height: 1; }
.v-pin.est.sel:not(.seen) { box-shadow: 0 0 0 6px rgba(29, 63, 191, .18), 0 6px 16px rgba(20, 30, 70, .4); }
.v-pin.est.sel:not(.seen) span { font-size: 20px; }

/* Facilities: small round marks, only for the kind picked below the map. */
.v-fac {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #fff;
  box-shadow: 0 2px 7px rgba(20, 30, 70, .35);
  font-size: 16px;
  line-height: 1;
}
.v-fac.sel { width: 42px; height: 42px; font-size: 22px; box-shadow: 0 0 0 7px rgba(29, 63, 191, .22), 0 5px 14px rgba(20, 30, 70, .4); }
#map .leaflet-bottom.leaflet-left { right: 0; }
.v-facs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 2px 4px;
  scrollbar-width: none;
}
.v-facs::-webkit-scrollbar { display: none; }
/* Above the attribution line, across the whole map. */
#map .leaflet-bottom.leaflet-left .v-facs { float: none; margin: 0 8px 18px; }
.v-facs button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  padding: 6px 12px 6px 9px;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: .8rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(20, 30, 70, .22);
  cursor: pointer;
}
.v-facs button .e { font-size: 15px; line-height: 1; }
.v-facs button.on { background: var(--ink); color: #fff; }

/* ---------- panel ---------- */
.v-panel {
  position: relative;
  z-index: 600;
  flex: 0 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: 54dvh;
  margin-top: -20px;
  background: #fff;
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -10px 34px rgba(20, 30, 70, .16);
  overflow: hidden;
}
.v-handle {
  flex: 0 0 auto;
  display: block;
  width: 100%;
  padding: 9px 0 6px;
}
.v-handle::before {
  content: "";
  display: block;
  width: 42px;
  height: 4px;
  margin: 0 auto;
  border-radius: 3px;
  background: #d5d9e2;
}
.v-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 2px 14px calc(16px + env(safe-area-inset-bottom));
}
.v-panel.is-min .v-areas,
.v-panel.is-min .v-search,
.v-panel.is-min .v-list { display: none; }

/* to see / seen / all */
.v-seg {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--v-chip);
}
.v-seg button {
  padding: 9px 6px;
  border-radius: 999px;
  font-size: .84rem;
  font-weight: 700;
  color: var(--ink-soft);
  white-space: nowrap;
}
.v-seg button span { font-weight: 600; opacity: .8; margin-left: 3px; }
.v-seg button.on {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 4px 12px -4px rgba(29, 63, 191, .6);
}

/* area chips */
.v-areas {
  display: flex;
  gap: 6px;
  margin: 10px -14px 0;
  padding: 0 14px 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.v-areas::-webkit-scrollbar { display: none; }
.v-areas button {
  flex: 0 0 auto;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: .8rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}
.v-areas button span { color: var(--ink-soft); font-weight: 600; margin-left: 4px; }
.v-areas button.on { background: var(--blue-soft); border-color: var(--blue); color: var(--blue); }
.v-areas button.on span { color: var(--blue); }

/* selected / next item */
.v-card {
  position: relative;
  margin-top: 12px;
  padding: 13px 14px 14px;
  border-radius: 16px;
  border: 1.5px solid var(--blue);
  background: linear-gradient(180deg, var(--blue-soft), #fff 80%);
}
.v-card.seen { border-color: var(--v-seen); background: linear-gradient(180deg, var(--v-seen-soft), #fff 80%); }
.v-card.here { border-color: var(--star, #e8a11c); background: linear-gradient(180deg, #fff3d6, #fff 80%); }
.v-card-kicker {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-right: 30px;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--blue);
}
.v-card.seen .v-card-kicker { color: var(--v-seen); }
.v-card.here .v-card-kicker { color: #9a6200; }
.v-card h2 {
  margin-top: 4px;
  padding-right: 24px;
  font-size: 1.22rem;
  font-weight: 800;
  letter-spacing: -.01em;
  line-height: 1.2;
}
.v-card-dist {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: .84rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.v-card-dist b { color: var(--ink); }
.v-arrow {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: .8rem;
  font-weight: 900;
  transition: transform .25s ease;
}
.v-card-x {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  font-size: 1rem;
}
.v-card-x:hover { background: rgba(0, 0, 0, .05); }
.v-card-acts {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.v-card-acts button {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 999px;
  font-size: .88rem;
  font-weight: 700;
  line-height: 1.15;
}
.v-go { background: var(--blue); color: #fff; }
.v-go:hover { background: var(--blue-dark); }
.v-go.on { background: var(--v-chip); color: var(--ink); }
.v-tick { background: #fff; color: var(--blue); border: 1.5px solid var(--blue); }
.v-tick.done { background: var(--v-seen); border-color: var(--v-seen); color: #fff; }
.v-card.here .v-tick:not(.done) { background: var(--blue); color: #fff; }
.v-card.fac { border-color: var(--line); background: #fff; }
.v-card.fac .v-card-kicker { color: var(--ink-soft); }
.v-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: 6px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.v-card-meta a { color: inherit; text-decoration: none; }
.v-card-meta a:hover { color: var(--blue); }
.v-card-meta .v-score { color: var(--ink); }
.v-card-meta .v-score i { font-style: normal; color: var(--star, #e8a11c); }

/* Not on the map yet, or only estimated: ask the visitor. */
.v-ask {
  margin-top: 12px;
  padding: 11px 12px;
  border-radius: 12px;
  background: #fff7e3;
  border: 1px dashed #e8a11c;
  font-size: .84rem;
  font-weight: 600;
  line-height: 1.35;
}
.v-ask p { margin: 0; }
.v-ask-acts { display: flex; gap: 8px; margin-top: 9px; }
.v-ask-acts button {
  flex: 1;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 700;
  background: #fff;
  color: var(--ink);
  border: 1.5px solid #e2c27a;
}
.v-ask-acts button.main { background: var(--ink); border-color: var(--ink); color: #fff; }
.v-ask.done { background: var(--v-seen-soft); border-color: var(--v-seen); }
.v-hint {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--v-chip);
  font-size: .84rem;
  line-height: 1.45;
  color: var(--ink-soft);
}
.v-hint b { color: var(--ink); }

/* search */
.v-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-soft);
}
.v-search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(29, 63, 191, .14); }
.v-search input {
  flex: 1;
  min-width: 0;
  padding: 11px 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: .92rem;
  color: var(--ink);
}

/* list */
.v-list { margin-top: 6px; }
.v-group {
  position: sticky;
  top: -2px;
  z-index: 1;
  padding: 12px 0 6px;
  background: #fff;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.v-group span { font-weight: 600; letter-spacing: 0; text-transform: none; margin-left: 4px; }
.v-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 9px 6px 9px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  cursor: pointer;
}
.v-item:last-child { border-bottom: 0; }
.v-item.sel { background: var(--blue-soft); border-radius: 12px; border-bottom-color: transparent; padding-left: 6px; margin-left: -6px; width: calc(100% + 6px); }
.v-check {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 2px solid #c9cfdb;
  background: #fff;
  display: grid;
  place-items: center;
  color: transparent;
}
.v-check:hover { border-color: var(--blue); }
.v-item.seen .v-check { background: var(--v-seen); border-color: var(--v-seen); color: #fff; }
.v-item-txt { flex: 1; min-width: 0; }
.v-item-txt b {
  display: block;
  font-size: .92rem;
  font-weight: 700;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.v-item-txt small {
  display: block;
  margin-top: 1px;
  font-size: .74rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.v-item.seen .v-item-txt b { color: var(--ink-soft); }
.v-item-m {
  flex: 0 0 auto;
  font-size: .8rem;
  font-weight: 700;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.v-empty {
  padding: 22px 8px;
  text-align: center;
  font-size: .86rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

/* ---------- sign in ---------- */
.auth {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 16px 12px max(16px, env(safe-area-inset-bottom));
  background: rgba(15, 20, 30, .55);
}
.auth.on { display: flex; }
.auth-card {
  position: relative;
  width: min(420px, 100%);
  max-height: min(92vh, 720px);
  overflow: auto;
  padding: 22px 20px 18px;
  border-radius: 18px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 30px 60px rgba(0, 0, 0, .3);
}
@media (min-width: 640px) {
  .auth { align-items: center; }
}
.auth-card h2 { font-size: 1.28rem; font-weight: 800; line-height: 1.2; margin: 0 28px 6px 0; }
.auth-card .lede { color: var(--ink-soft); font-size: .88rem; line-height: 1.45; margin: 0 0 14px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 12px; border-radius: 999px; background: #f2f4f8; }
.auth-tabs button { border-radius: 999px; padding: 9px 8px; font-weight: 700; font-size: .84rem; color: var(--ink-soft); }
.auth-tabs button.on { background: var(--blue); color: #fff; }
.auth-card label { display: block; font-size: .8rem; font-weight: 700; margin: 10px 0 4px; }
.auth-card input[type="text"],
.auth-card input[type="email"],
.auth-card input[type="password"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
  font: inherit;
  font-size: .95rem;
  background: #f7f8fb;
}
.auth-card input:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(29, 63, 191, .14); }
.auth-card .check { display: flex; gap: 8px; align-items: flex-start; font-size: .8rem; font-weight: 600; margin: 12px 0 4px; }
.auth-card .check input { margin-top: 3px; }
.auth-card .hint { color: var(--ink-soft); font-size: .74rem; margin: 4px 0 0; }
.auth-card .err { display: none; background: #fee2e2; color: #991b1b; border-radius: 12px; padding: 10px 12px; font-size: .84rem; font-weight: 700; margin-bottom: 10px; }
.auth-card .err.on { display: block; }
.auth-card .go {
  width: 100%;
  margin-top: 14px;
  padding: 13px 12px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
}
.auth-card .go[disabled] { opacity: .55; }
.auth-card .alt { text-align: center; font-size: .78rem; margin: 12px 0 0; color: var(--ink-soft); }
.auth-card .alt a { color: var(--blue); font-weight: 700; }
.auth-card .x {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--ink-soft);
  font-size: 1.1rem;
}

.confetti { position: absolute; inset: 0; pointer-events: none; z-index: 650; overflow: hidden; }
.confetti i { position: absolute; width: 9px; height: 14px; border-radius: 2px; animation: v-fall 1500ms cubic-bezier(.25, .6, .4, 1) forwards; }
@keyframes v-fall { 0% { transform: translateY(0) rotate(0); opacity: 1; } 100% { transform: translateY(88vh) rotate(620deg); opacity: 0; } }

.sr-only { width: 1px; height: 1px; position: absolute; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

/* ---------- desktop: map left, panel right ---------- */
@media (min-width: 900px) {
  .venue-app {
    display: grid;
    grid-template-columns: minmax(0, 1fr) min(420px, 40vw);
    grid-template-rows: auto minmax(0, 1fr);
  }
  .v-top { grid-column: 2; grid-row: 1; border-left: 1px solid var(--line); padding: 16px 18px 14px; }
  #map { grid-column: 1; grid-row: 1 / span 2; min-height: 0; }
  .v-panel {
    grid-column: 2;
    grid-row: 2;
    max-height: none;
    margin-top: 0;
    border-radius: 0;
    border-left: 1px solid var(--line);
    box-shadow: none;
  }
  .v-handle { display: none; }
  .v-body { padding: 14px 18px 22px; }
  .v-areas { margin: 10px -18px 0; padding: 0 18px 2px; flex-wrap: wrap; overflow: visible; }
  .v-panel.is-min .v-areas { display: flex; }
  .v-panel.is-min .v-search { display: flex; }
  .v-panel.is-min .v-list { display: block; }
}

@media (max-width: 759px) {
  .venue-app {
    top: var(--head);
    width: 100%;
    height: calc(100dvh - var(--head));
    border-radius: 0;
    border: 0;
    box-shadow: none;
  }
  .v-top { padding: 8px 12px 10px; }
  .v-titles h1 { font-size: 1rem; }
  .v-bar { margin-top: 8px; }
  .v-signin { display: none; }
  .v-panel { max-height: 42dvh; }
}
#map.v-placing, #map.v-placing .leaflet-interactive { cursor: crosshair; }
