/* Shop the City (/pages/shop-the-city): templates/places.php + templates/places/place.php,
   behaviour in places.js. Class prefix pl-. The map sits on the navy stage like the homepage
   bands; the place list below is on white. Pins/labels are HTML over the SVG, counter-scaled with
   --inv (set by places.js) so they keep their size while the map zooms. */

.pl { --pl-land: #072650; --pl-lake: #0d3d78; --pl-river: #4b92db; --pl-ink: rgba(159, 200, 241, .78); --pl-panel-w: min(420px, 40%); }

/* Band: heading, filters, map */
.pl-band { background: var(--band); color: var(--white); padding: clamp(2rem, 4vw, 3.2rem) 0 clamp(2rem, 4vw, 3rem); }
.pl-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem 3rem; flex-wrap: wrap; }
.pl-head__copy { max-width: 720px; }
.pl-eyebrow { color: var(--gold); }
.pl-head h1 { font-size: clamp(2.3rem, 5.4vw, 4.2rem); line-height: .98; color: var(--white); }
.pl-head p { margin: .9rem 0 0; max-width: 600px; font-size: 1.08rem; color: rgba(255, 255, 255, .82); }
.pl-stats { display: flex; gap: 2.4rem; margin: 0; }
.pl-stats div { display: flex; flex-direction: column-reverse; }
.pl-stats dt { font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--blue-soft); }
.pl-stats dd { margin: 0; font-family: var(--display); font-weight: 800; font-size: 2.6rem; line-height: 1; color: var(--gold); }

.pl-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem 1.2rem; margin-top: 1.8rem; margin-bottom: 1rem; }
.pl-chips { display: flex; flex-wrap: wrap; gap: .45rem; min-width: 0; margin: 0; padding: 0; border: 0; }
.pl-chip { position: relative; }
.pl-chip input, .pl-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.pl-chip span { display: inline-flex; align-items: center; gap: .45rem; height: 38px; padding: 0 15px; border: 1px solid rgba(255, 255, 255, .34); border-radius: 999px; font-size: 14px; font-weight: 600; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.pl-chip small { font-size: 12px; font-weight: 600; color: var(--blue-soft); }
.pl-chip span:hover { border-color: var(--white); }
.pl-chip input:checked + span { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.pl-chip input:checked + span small { color: var(--navy); }
.pl-chip input:focus-visible + span, .pl-switch input:focus-visible + span { outline: 2px solid var(--white); outline-offset: 3px; }
.pl-switch span { display: inline-flex; align-items: center; gap: .6rem; font-size: 14px; font-weight: 600; cursor: pointer; }
.pl-switch span::before { content: ""; width: 38px; height: 22px; border-radius: 999px; background: rgba(255, 255, 255, .22); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35); transition: background .15s; }
.pl-switch span::after { content: ""; position: absolute; left: 3px; top: 50%; width: 16px; height: 16px; margin-top: -8px; border-radius: 50%; background: var(--white); transition: transform .15s; }
.pl-switch { position: relative; }
.pl-switch input:checked + span::before { background: var(--gold); box-shadow: none; }
.pl-switch input:checked + span::after { transform: translateX(16px); background: var(--navy); }
.pl-hood { display: inline-flex; align-items: center; gap: .6rem; height: 38px; padding: 0 6px 0 14px; border-radius: 999px; background: var(--white); color: var(--navy); font-size: 14px; }
.pl-hood a { padding: 4px 10px; border-radius: 999px; background: var(--mist); font-weight: 600; font-size: 13px; }
.pl-hood[hidden] { display: none; }
.pl-apply { height: 38px; padding: 0 16px; border: 0; border-radius: var(--radius); background: var(--gold); color: var(--navy); font: 600 14px var(--body); cursor: pointer; }
.pl-views { display: inline-flex; margin-left: auto; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, .12); }
.pl-views[hidden] { display: none; }
.pl-views button { display: inline-flex; align-items: center; gap: .4rem; height: 32px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; color: var(--white); font: 600 14px var(--body); cursor: pointer; }
.pl-views svg { width: 17px; height: 17px; }
.pl-views button[aria-pressed="true"] { background: var(--white); color: var(--navy); }
.pl-views button:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }

/* Map */
.pl-stage { position: relative; }
.pl-viewport { position: relative; overflow: hidden; border-radius: 6px; background: var(--pl-land); box-shadow: 0 0 0 1px rgba(159, 200, 241, .18), 0 30px 60px -30px rgba(0, 0, 0, .6); }
.pl-world { position: relative; width: 100%; --inv: 1; --rw: 4.3px; --ow: 1.6px; }
.pl-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.pl.is-js .pl-viewport { height: clamp(440px, 70vh, 760px); touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.pl.is-js .pl-viewport.is-dragging { cursor: grabbing; }
.pl.is-js .pl-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.pl-viewport:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.pl-svg-bg { fill: var(--pl-land); }
.pl-svg-county { fill: none; stroke: rgba(159, 200, 241, .3); stroke-width: var(--cw, 1.3px); stroke-dasharray: 1.5 6; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.pl-svg-lake { fill: var(--pl-lake); stroke: #235f9f; stroke-width: var(--cw, 1px); vector-effect: non-scaling-stroke; }
.pl-svg-river-halo { fill: none; stroke: #0b3468; stroke-width: calc(var(--rw) * 2.3); stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.pl-svg-river { fill: none; stroke: var(--pl-river); stroke-width: var(--rw); stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.pl-svg-road-case { fill: none; stroke: #021430; stroke-width: calc(var(--ow) * 2.6); stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.pl-svg-road { fill: none; stroke: rgba(255, 255, 255, .5); stroke-width: var(--ow); stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }

/* Labels (decorative; the list carries the content) */
.pl-labels, .pl-pins { position: absolute; inset: 0; }
.pl-labels { pointer-events: none; }
.pl-lbl { position: absolute; transform-origin: 0 0; transform: scale(var(--inv)) rotate(var(--r, 0deg)) translate(-50%, -50%); white-space: nowrap; line-height: 1; }
.pl-lbl--hood { font: 700 12.5px var(--display); letter-spacing: .2em; text-transform: uppercase; color: var(--pl-ink); text-shadow: 0 1px 2px var(--pl-land); }
.pl-lbl--small { font-size: 10px; letter-spacing: .16em; color: rgba(159, 200, 241, .62); }
.pl-lbl--water { font: italic 500 12px var(--body); letter-spacing: .12em; color: #8fbfee; }
.pl-lbl--mark { display: inline-flex; align-items: center; gap: 5px; transform: scale(var(--inv)) translate(-5px, -50%); font: 500 11.5px var(--body); color: rgba(255, 255, 255, .78); text-shadow: 0 1px 3px var(--pl-land); }
.pl-lbl--mark i { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--white); box-shadow: 0 0 0 2px rgba(4, 30, 66, .7); }
.pl-lbl[data-minzoom] { opacity: 0; transition: opacity .2s; }
.pl-lbl[data-minzoom].is-on { opacity: 1; }
.pl-shield { position: absolute; transform-origin: 0 0; transform: scale(var(--inv)) translate(-50%, -50%); min-width: 26px; padding: 3px 5px 4px; border: 1.5px solid var(--white); border-radius: 3px 3px 10px 10px; background: var(--navy-hi); color: var(--white); font: 700 10px/1 var(--display); text-align: center; pointer-events: none; }

/* Pins: numbered gold teardrops; the tip sits on the place. */
.pl-pin { position: absolute; z-index: 2; display: block; width: 34px; height: 44px; transform-origin: 0 0; transform: scale(var(--inv)) translate(-50%, -100%); color: var(--navy); outline: none; -webkit-tap-highlight-color: transparent; }
.pl-pin::before { content: ""; position: absolute; left: 2px; top: 0; width: 30px; height: 30px; border-radius: 50% 50% 50% 0; background: var(--gold); box-shadow: 0 0 0 2px var(--navy), 0 6px 14px -4px rgba(0, 0, 0, .6); transform: translateY(2px) rotate(-45deg); transform-origin: 50% 50%; transition: background .15s, box-shadow .15s; }
.pl-pin__n { position: absolute; left: 0; right: 0; top: 7px; font: 800 14px/1 var(--display); text-align: center; }
.pl-pin__name { position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%); padding: 6px 10px; border-radius: 3px; background: var(--white); color: var(--navy); font: 600 13px/1.2 var(--body); white-space: nowrap; box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .55); opacity: 0; pointer-events: none; transition: opacity .15s; }
.pl-pin__name small { display: block; margin-top: 2px; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.pl-pin:hover, .pl-pin:focus-visible, .pl-pin.is-active { z-index: 4; }
.pl-pin:hover .pl-pin__name, .pl-pin:focus-visible .pl-pin__name, .pl-pin.is-active .pl-pin__name { opacity: 1; }
.pl-pin:hover::before, .pl-pin:focus-visible::before { box-shadow: 0 0 0 2px var(--navy), 0 0 0 5px var(--white), 0 6px 14px -4px rgba(0, 0, 0, .6); }
.pl-pin.is-active::before { background: var(--white); box-shadow: 0 0 0 3px var(--gold), 0 0 0 7px rgba(255, 184, 28, .3), 0 6px 14px -4px rgba(0, 0, 0, .6); }
.pl-pin.is-clustered { visibility: hidden; }
.pl-pin[hidden] { display: none; }
/* Off-map place: a round marker on the edge with an arrow pointing the way; name always shown. */
.pl-pin--edge { width: 34px; height: 34px; transform: scale(var(--inv)) translate(-50%, -50%); }
.pl-pin--edge::before { border-radius: 50%; transform: none; }
.pl-pin--edge .pl-pin__n { top: 10px; }
.pl-pin__arrow { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform: rotate(var(--a)); }
.pl-pin__arrow::after { content: ""; position: absolute; left: 20px; top: -7px; border: 7px solid transparent; border-left: 10px solid var(--gold); }
.pl-pin--edge .pl-pin__name { opacity: 1; bottom: auto; top: calc(100% + 8px); }
.pl-pin--east .pl-pin__name { left: auto; right: -6px; transform: none; }

.pl-cluster { position: absolute; z-index: 3; width: 42px; height: 42px; padding: 0; transform-origin: 0 0; transform: scale(var(--inv)) translate(-50%, -50%); border: 3px solid var(--gold); border-radius: 50%; background: var(--navy); color: var(--gold); font: 800 16px/1 var(--display); cursor: pointer; box-shadow: 0 0 0 5px rgba(255, 184, 28, .25), 0 8px 18px -6px rgba(0, 0, 0, .6); }
.pl-cluster:hover { background: var(--navy-hi); }
.pl-cluster:focus-visible { outline: 3px solid var(--white); outline-offset: 3px; }

/* Map chrome */
.pl-ctrl { position: absolute; left: 14px; top: 14px; z-index: 5; display: flex; flex-direction: column; gap: 6px; }
.pl-ctrl[hidden] { display: none; }
.pl-ctrl button { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: var(--radius); background: var(--white); color: var(--navy); cursor: pointer; box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .6); }
.pl-ctrl button:hover { background: var(--gold); }
.pl-ctrl button:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.pl-ctrl svg { width: 20px; height: 20px; fill: none; }
.pl-scale { position: absolute; left: 14px; bottom: 12px; z-index: 5; display: none; align-items: center; gap: 8px; font: 600 11px var(--body); letter-spacing: .06em; color: rgba(255, 255, 255, .8); pointer-events: none; }
.pl.is-js .pl-scale { display: flex; }
.pl-scale i { display: block; height: 6px; border: 2px solid rgba(255, 255, 255, .8); border-top: 0; }
.pl-north { position: absolute; right: 16px; top: 14px; z-index: 5; display: grid; place-items: center; width: 30px; height: 30px; border: 1.5px solid rgba(255, 255, 255, .45); border-radius: 50%; font: 700 12px var(--display); color: rgba(255, 255, 255, .8); pointer-events: none; }
.pl-credit { position: absolute; right: 10px; bottom: 8px; z-index: 5; margin: 0; padding: 2px 7px; border-radius: 2px; background: rgba(2, 13, 28, .6); font-size: 11px; color: rgba(255, 255, 255, .8); }
.pl-credit a { text-decoration: underline; }
.has-panel .pl-north { opacity: 0; }

/* Panel: right side of the map on desktop, bottom sheet on phones. */
.pl-panel { position: absolute; z-index: 10; top: 12px; right: 12px; bottom: 12px; width: var(--pl-panel-w); overflow: auto; overscroll-behavior: contain; border-radius: 6px; background: var(--white); color: var(--ink); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .65); animation: pl-in .22s ease-out; }
.pl-panel[hidden] { display: none; }
@keyframes pl-in { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.pl-panel__bar { position: sticky; top: 0; z-index: 4; display: flex; justify-content: flex-end; height: 0; }
.pl-panel__grip { display: none; }
.pl-panel__close { display: grid; place-items: center; width: 38px; height: 38px; margin: 10px 10px 0 0; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .94); color: var(--navy); cursor: pointer; box-shadow: 0 4px 14px -6px rgba(4, 30, 66, .5); }
.pl-panel__close svg { width: 20px; height: 20px; fill: none; }
.pl-panel__close:hover { background: var(--gold); }
.pl-panel__body { padding: 20px 20px 24px; }
.pl-panel .pl-place { display: block; }
.pl-panel .pl-place__photo { margin: -20px -20px 18px; border-radius: 6px 6px 0 0; }
.pl-panel .pl-place__photo img { aspect-ratio: 16 / 10; }
.pl-panel .pl-place__head { padding-right: 44px; }
.pl-panel .pl-place__name { font-size: 1.65rem; }
.pl-panel .pl-place__shirts { margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.pl-panel .pl-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }

@media (max-width: 899px) {
  .pl.is-js .pl-viewport { height: clamp(380px, 62vh, 620px); }
  .pl-panel { position: fixed; top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: min(66vh, 66dvh); border-radius: 14px 14px 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); z-index: 60; animation-name: pl-up; box-shadow: 0 -18px 50px -10px rgba(0, 0, 0, .55); }
  @keyframes pl-up { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
  .pl-panel__bar { height: 22px; justify-content: center; background: var(--white); }
  .pl-panel__grip { display: block; width: 44px; height: 5px; margin-top: 9px; border-radius: 3px; background: #cdd5df; }
  .pl-panel__close { position: absolute; right: 0; top: 0; margin: 8px 10px 0 0; }
  .pl-panel__body { padding-top: 8px; }
  .pl-panel .pl-place__photo { margin-top: 0; border-radius: 0; }
  .pl-views { margin-left: 0; }
  .pl-stats { gap: 1.6rem; }
  .pl-stats dd { font-size: 2.1rem; }
  .pl-pin--edge .pl-pin__name { opacity: 0; }
  .pl-pin--edge:hover .pl-pin__name, .pl-pin--edge:focus-visible .pl-pin__name, .pl-pin--edge.is-active .pl-pin__name { opacity: 1; }
  .pl-scale { bottom: 34px; }
  .pl-credit { left: 10px; right: auto; font-size: 10.5px; }
}
@media (max-width: 600px) {
  .pl-band { padding-top: 1.6rem; }
  .pl-head { flex-wrap: nowrap; align-items: flex-start; gap: 1rem; }
  .pl-head h1 { font-size: 2.15rem; }
  .pl-head p { font-size: .98rem; margin-top: .6rem; }
  .pl-stats { flex-direction: column; gap: .7rem; padding-top: .3rem; }
  .pl-stats dd { font-size: 1.7rem; }
  .pl-stats dt { font-size: 10.5px; }
  .pl-bar { margin-top: 1.2rem; gap: .6rem .9rem; }
  .pl-chips { flex-wrap: nowrap; overflow-x: auto; width: calc(100% + 48px); margin: 0 -24px; padding: 2px 24px; scrollbar-width: none; }
  .pl-chips::-webkit-scrollbar { display: none; }
  .pl-chip span { height: 36px; padding: 0 13px; white-space: nowrap; }
  .pl-ctrl button { width: 36px; height: 36px; }
}

/* List view hides the map; map view keeps the list below it. */
.pl[data-view="list"] .pl-stage { display: none; }

/* The place list */
.pl-list { padding-block: clamp(3rem, 6vw, 4.8rem); }
.pl-places { margin: 0; padding: 0; list-style: none; }
.pl-item + .pl-item { margin-top: clamp(2.6rem, 5vw, 3.6rem); padding-top: clamp(2.6rem, 5vw, 3.6rem); border-top: 1px solid var(--line); }
.pl-item[hidden] { display: none; }
.pl-empty { padding: 1.4rem 1.6rem; border-radius: var(--radius); background: var(--mist); font-weight: 500; }
.pl-empty a { color: var(--blue-ink); font-weight: 600; text-decoration: underline; }
.pl-place { display: grid; grid-template-columns: minmax(260px, 360px) 1fr; gap: 1.5rem clamp(1.5rem, 4vw, 3.5rem); align-items: start; scroll-margin-top: 90px; }
.pl-place__photo { margin: 0 0 1.2rem; overflow: hidden; border-radius: var(--radius); background: var(--plate); }
.pl-place__photo img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.pl-place__head { display: flex; gap: 14px; align-items: flex-start; }
.pl-num { flex: none; display: grid; place-items: center; width: 38px; height: 38px; margin-top: 2px; border-radius: 50%; background: var(--gold); color: var(--navy); font: 800 16px/1 var(--display); box-shadow: inset 0 0 0 2px var(--navy); }
.pl-place__meta { margin: 0 0 .3rem; font: 700 12px var(--display); letter-spacing: .18em; text-transform: uppercase; color: var(--blue-ink); }
.pl-place__name { font-size: clamp(1.6rem, 3vw, 2.1rem); line-height: 1.05; color: var(--navy); }
.pl-place__name:focus { outline: none; }
.pl-place__name:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
.pl-place__blurb { margin: 1rem 0 0; font-size: 1.02rem; line-height: 1.65; }
.pl-place__far { margin: .8rem 0 0; font-size: .93rem; color: var(--muted); }
.pl-place__more { margin: 1.1rem 0 0; }
.pl-place__sub { margin: 0 0 1rem; display: flex; align-items: center; gap: .5rem; font: 700 12px var(--display); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.pl-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--mist); color: var(--navy); letter-spacing: 0; }
.pl-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 26px 18px; margin: 0; padding: 0; list-style: none; }
.pl-card[hidden] { display: none; }
.pl-note { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.pl-note::before { content: ""; display: inline-block; width: 12px; height: 2px; margin: 0 6px 4px 0; background: var(--gold); vertical-align: middle; }
.pl-none { margin: 0; color: var(--muted); }
.pl-none a { color: var(--blue-ink); font-weight: 600; text-decoration: underline; }
.pl-memories { margin-top: 1.6rem; }
.pl-memories__cta { margin: .8rem 0 0; }
.pl-memories__cta a { font-weight: 600; color: var(--navy); border-bottom: 2px solid var(--gold); }
.pl-attrib { margin: clamp(3rem, 6vw, 4rem) 0 0; font-size: 13px; color: var(--muted); }
.pl-attrib a { text-decoration: underline; }

/* Cards here always show their sizes under the photo (also on phones), so the panel can add to bag. */
.pl-cards .pc-ph { aspect-ratio: auto; overflow: visible; background: none; }
.pl-cards .pc-ph > img:not(.pc-alt) { position: relative; inset: auto; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--cl-r, 3px); background: var(--plate); }
.pl-cards .pc-ph .pc-alt { display: none; }
.pl-cards .pc-quick { display: block; position: relative; z-index: 3; left: auto; right: auto; bottom: auto; margin: 8px 0 0; padding: 0; opacity: 1; transform: none; box-shadow: none; background: none; }
.pl-cards .pc-quick-label { margin-bottom: 5px; }
.pl-cards .pc-quick--one button, .pl-cards .pc-quick--link { height: 34px; border: 1px solid var(--line); border-radius: 2px; }
.pl-cards .pc-quick--link { display: flex; align-items: center; justify-content: center; }

@media (max-width: 720px) {
  .pl-place { grid-template-columns: 1fr; }
  .pl-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .pl-panel { animation: none; }
  .pl-lbl[data-minzoom], .pl-pin::before, .pl-pin__name, .pl-chip span, .pl-switch span::after { transition: none; }
}
