/* map.css - Lake Pleasant map page + home tile preview (v4: merged level panel, place names) */
body[data-route="map"] #example-mark { display: none; }   /* map + level are real data */

/* ---------- home tile preview ---------- */
.tile.has-lake { position: relative; overflow: hidden; }
.tile-lake { position: absolute; right: 1.2rem; top: 1.2rem; height: calc(100% - 2.4rem); width: auto; max-width: 55%; pointer-events: none;
  fill: rgba(95, 224, 212, .16); stroke: rgba(95, 224, 212, .55); stroke-width: 70; stroke-linejoin: round; filter: drop-shadow(0 0 .5rem rgba(95, 224, 212, .25)); }
.tile.has-lake > :not(.tile-lake) { position: relative; }

/* ---------- page layout ---------- */
@media (min-width: 1000px) {
  .page.page-map { height: 100%; min-height: 0; }       /* kiosk: map fills the screen, side panel scrolls */
  .page-map .lm-side { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
  .page-map .lm-side::-webkit-scrollbar { display: none; }
}
.page-map .page-body { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr); min-height: 0; }
.lm-host { min-height: 0; display: flex; }
.lm { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 31rem; gap: 2rem; }
.lm-side { display: flex; flex-direction: column; gap: 2rem; min-height: 0; }
.lm-side .card { padding: 1.7rem 2rem; }
.lm-side .card h2 { margin-bottom: 1rem; }

/* ---------- map card ---------- */
.lm-mapcard { position: relative; padding: 0; overflow: hidden; min-height: 30rem; display: flex; background: #14231f; }
.lm-stage { position: relative; flex: 1; min-width: 0; touch-action: none; cursor: grab; outline: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.lm-stage.grabbing { cursor: grabbing; }
.lm-stage:focus-visible { box-shadow: inset 0 0 0 2px var(--teal); }
.lm-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.lm-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--ink-lo); font-size: 1.4rem; }
.lm-grid { fill: none; stroke: rgba(207, 232, 239, .055); stroke-width: 1; vector-effect: non-scaling-stroke; }
.lm-glow2 { fill: none; stroke: rgba(95, 224, 212, .07); stroke-width: 18; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.lm-glow { fill: none; stroke: rgba(95, 224, 212, .16); stroke-width: 7; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.lm-water { stroke: none; }
.lm-shore { stroke: #8ff3e9; stroke-width: 1.3; stroke-linejoin: round; vector-effect: non-scaling-stroke; opacity: .9; }
.lm-mapped { stroke: rgba(232, 176, 74, .7); stroke-width: 1; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.lm-svg.is-mapped .lm-mapped { display: none; }

/* ---------- place names (OSM + USGS GNIS), laid out by LakeMap.layoutLabels ---------- */
.lm-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.pl { position: absolute; left: 0; top: 0; width: 0; height: 0; padding: 0; border: 0; background: none; pointer-events: none; font: inherit; }
.pl[hidden] { display: none; }
.pl .pl-dot { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); pointer-events: auto; }
.pl .pl-dot::after { content: ""; position: absolute; inset: -1.2rem; }            /* bigger tap target */
.pl span { position: absolute; top: 0; white-space: nowrap; pointer-events: auto; cursor: pointer; line-height: 1.15;
  font-size: 1.2rem; font-weight: 600; color: #eaf6f8; letter-spacing: .01em;
  text-shadow: 0 0 .25rem #04131d, 0 0 .25rem #04131d, 0 0 .5rem rgba(4, 19, 29, .9), 0 .1rem .1rem #04131d; }
.pl.r1 span { font-size: 1.45rem; font-weight: 700; color: #ffe2a3; }
.pl.r5 span { font-size: 1.05rem; color: #d9cfb2; }
.pl.pt-island span { font-style: italic; color: #cfeec9; }
.pl.pt-creek span, .pl.pt-canyon span, .pl.pt-cove span { font-style: italic; color: #a6e3f5; font-weight: 500; }
.pl.pt-peak span, .pl.pt-cliff span { color: #e6c9a6; font-weight: 500; }
.pl span { left: 0; transform: translate(calc(var(--g) + 0px), -50%); }
.pl.lt span { transform: translate(calc(-100% - var(--g)), -50%); }
.pl.ab span { transform: translate(-50%, calc(-100% - var(--g) + .3rem)); }
.pl.bl span { transform: translate(-50%, calc(var(--g) - .3rem)); }
.pl.dot span { display: none; }
.pl.on span { color: #fff; text-decoration: underline; text-decoration-color: var(--teal); text-underline-offset: .25rem; }
.pl.on .pl-dot { box-shadow: 0 0 0 .25rem rgba(4, 19, 29, .9), 0 0 0 .45rem var(--teal); }
.lm-labels.measure .pl { display: block !important; visibility: hidden; }
.lm-labels.measure .pl span { display: block; transform: none; }

.pl-dot { display: inline-block; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: #9fb6bd; box-shadow: 0 0 0 .2rem rgba(4, 19, 29, .85); flex-shrink: 0; }
.pl-dot.pt-marina { width: 1.4rem; height: 1.4rem; background: #e8b04a; box-shadow: 0 0 0 .22rem rgba(4, 19, 29, .9), 0 0 0 .38rem #e8b04a; }
.pl-dot.pt-dam { width: 1.5rem; height: .8rem; border-radius: .2rem; background: #ff9b73; }
.pl-dot.pt-ramp { width: 1rem; height: 1rem; border-radius: .15rem; background: #5fe0d4; transform: rotate(45deg); }
.pl .pl-dot.pt-ramp { transform: translate(-50%, -50%) rotate(45deg); }
.pl-dot.pt-island { background: #8fd18a; }
.pl-dot.pt-creek, .pl-dot.pt-canyon, .pl-dot.pt-cove { width: .8rem; height: .8rem; background: #6cc7e8; }
.pl-dot.pt-camp, .pl-dot.pt-dayuse, .pl-dot.pt-park { width: .85rem; height: .85rem; background: #d9c08a; }
.pl-dot.pt-peak, .pl-dot.pt-cliff { width: 0; height: 0; border-radius: 0; background: none; box-shadow: none;
  border-left: .6rem solid transparent; border-right: .6rem solid transparent; border-bottom: 1rem solid #c9a27a; filter: drop-shadow(0 0 .15rem #04131d); }

/* tap popup */
.lm-pop { position: absolute; left: 0; top: 0; z-index: 3; width: max-content; max-width: min(30rem, calc(100% - 1.6rem)); display: flex; flex-direction: column; gap: .3rem;
  padding: 1.1rem 3.6rem 1.1rem 1.3rem; border-radius: 1.2rem; background: rgba(4, 19, 29, .94); border: 1px solid rgba(95, 224, 212, .45); box-shadow: 0 .8rem 2rem rgba(0, 0, 0, .5); }
.lm-pop[hidden], .lm-pop.off { display: none; }
.lm-pop b { font-size: 1.6rem; color: var(--ink-hi); line-height: 1.2; }
.lm-pop-type { display: flex; align-items: center; gap: .6rem; font-size: 1rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--teal); }
.lm-pop-note, .lm-pop-ll { font-size: 1.1rem; color: var(--ink-mid); }
.lm-pop-src { font-size: 1rem; color: var(--ink-lo); }
.lm-pop-src a { color: var(--ink-mid); }
.lm-pop-x { position: absolute; right: .5rem; top: .5rem; width: 3rem; height: 3rem; display: flex; align-items: center; justify-content: center; border: 0; background: none; color: var(--ink-mid); border-radius: 50%; }
.lm-pop-x .ic { width: 1.5rem; height: 1.5rem; }
.lm-pop-x svg { width: 100%; height: 100%; }

/* overlays */
.lm-north { position: absolute; left: 1.6rem; top: 1.6rem; width: 3.4rem; pointer-events: none; filter: drop-shadow(0 .2rem .4rem rgba(0, 0, 0, .5)); }
.lm-north svg { width: 100%; height: auto; display: block; }
.lm-north .n-a { fill: rgba(9, 36, 50, .9); stroke: var(--ink-hi); stroke-width: 1.4; stroke-linejoin: round; }
.lm-north .n-b { fill: var(--teal); }
.lm-north text { fill: var(--ink-hi); font: 700 11px system-ui, sans-serif; text-anchor: middle; }
.lm-badge { position: absolute; left: 50%; top: 1.4rem; transform: translateX(-50%); display: flex; align-items: center; gap: .6rem; padding: .5rem 1.1rem; border-radius: 999px;
  background: rgba(4, 19, 29, .78); border: 1px solid rgba(232, 176, 74, .5); color: #f0c674; font-size: 1.05rem; font-weight: 600; letter-spacing: .04em; pointer-events: none; white-space: nowrap; }
.lm-badge[hidden] { display: none; }
.lm-badge .ic { width: 1.3rem; height: 1.3rem; }
.lm-zoom { position: absolute; right: 1.4rem; top: 1.4rem; display: flex; flex-direction: column; border-radius: 1.2rem; overflow: hidden; border: 1px solid var(--line); background: rgba(4, 19, 29, .8); box-shadow: 0 .6rem 1.4rem rgba(0, 0, 0, .35); }
.lm-zoom button { width: 4.6rem; height: 4.6rem; display: flex; align-items: center; justify-content: center; color: var(--ink-hi); background: none; border: 0; }
.lm-zoom button + button { border-top: 1px solid var(--line); }
.lm-zoom button:active { background: rgba(95, 224, 212, .2); }
.lm-zoom .ic { width: 2.2rem; height: 2.2rem; display: block; }
.lm-zoom .ic svg { width: 100%; height: 100%; }
.lm-scale { position: absolute; left: 1.6rem; bottom: 1.4rem; padding: .6rem .9rem .5rem; border-radius: .8rem; background: rgba(4, 19, 29, .72); pointer-events: none; }
.lm-scale .sb { display: flex; align-items: center; gap: .7rem; font-size: 1rem; color: var(--ink); font-weight: 600; line-height: 1.5; }
.lm-scale .sb i { display: block; height: .55rem; border: 2px solid var(--ink-hi); border-top: 0; flex-shrink: 0; }
.lm-scale .sb.mi i { border-top: 2px solid var(--ink-hi); border-bottom: 0; border-color: var(--ink-mid); }
.lm-attr { position: absolute; right: 0; bottom: 0; padding: .35rem .8rem; border-top-left-radius: .7rem; background: rgba(4, 19, 29, .78); color: var(--ink-mid); font-size: .95rem; text-decoration: none; }

/* ---------- side panel ---------- */
.lm-big { font-size: 4.2rem; font-weight: 700; color: var(--ink-hi); line-height: 1; letter-spacing: -.01em; }
.lm-big small { font-size: 1.8rem; font-weight: 600; color: var(--ink-mid); }
.lm-dim { color: var(--ink-lo); }
.lm-bar { height: .7rem; border-radius: 999px; background: rgba(207, 232, 239, .12); margin: 1.1rem 0 .9rem; overflow: hidden; }
.lm-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--teal-2), var(--teal)); }
.lm-stats { font-size: 1.25rem; color: var(--ink); margin-top: .3rem; }
.lm-stats b { color: var(--ink-hi); }
.lm-muted { font-size: 1.1rem; color: var(--ink-lo); margin-top: .7rem; line-height: 1.4; }
.lm-stale { color: #f0c674; }
.lm-src { font-size: 1rem; color: var(--ink-lo); margin-top: .4rem; }
.lm-src a { color: var(--ink-mid); }

.lm-lc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.lm-side .lm-lc-head h2 { margin-bottom: .6rem; }
.lm-lc-sub { font-size: 1rem; color: var(--ink-lo); }
.lm-whatif { margin-top: 1.5rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.lm-wi-lab { font-size: 1rem !important; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-mid) !important; }
.lm-show { display: flex; flex-direction: column; gap: .2rem; }
.lm-show b { font-size: 2.4rem; color: var(--ink-hi); line-height: 1.05; }
.lm-show span { font-size: 1.15rem; color: var(--ink-lo); }
.lm-range { position: relative; margin: 1.6rem 0 .4rem; }
.lm-slider { --p: 50%; -webkit-appearance: none; appearance: none; width: 100%; height: 3.2rem; background: transparent; margin: 0; touch-action: pan-y; }
.lm-slider::-webkit-slider-runnable-track { height: .8rem; border-radius: 999px; background: linear-gradient(90deg, var(--teal-2) 0, var(--teal) var(--p), rgba(207, 232, 239, .14) var(--p)); }
.lm-slider::-moz-range-track { height: .8rem; border-radius: 999px; background: linear-gradient(90deg, var(--teal-2) 0, var(--teal) var(--p), rgba(207, 232, 239, .14) var(--p)); }
.lm-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 3rem; height: 3rem; margin-top: -1.1rem; border-radius: 50%; background: var(--ink-hi); border: .35rem solid var(--teal); box-shadow: 0 .3rem .9rem rgba(0, 0, 0, .45); }
.lm-slider::-moz-range-thumb { width: 2.3rem; height: 2.3rem; border-radius: 50%; background: var(--ink-hi); border: .35rem solid var(--teal); }
.lm-marks { position: absolute; left: 1.5rem; right: 1.5rem; top: 0; height: 100%; pointer-events: none; }
.lm-marks span { position: absolute; top: .1rem; width: 0; height: 0; border-left: .55rem solid transparent; border-right: .55rem solid transparent; border-top: .7rem solid #e8b04a; transform: translateX(-50%); }
.lm-marks span[hidden] { display: none; }
.lm-ends { display: flex; justify-content: space-between; font-size: 1rem; color: var(--ink-lo); }
.lm-btns { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.3rem; }
.lm-chip { padding: .7rem 1.2rem; border-radius: 999px; border: 1px solid var(--line); background: rgba(207, 232, 239, .06); color: var(--ink); font-size: 1.1rem; font-weight: 600; }
.lm-chip.on { background: rgba(95, 224, 212, .2); border-color: var(--teal); color: var(--ink-hi); }
.lm-approx { display: flex; gap: .8rem; margin-top: 1.4rem; padding: 1rem 1.1rem; border-radius: 1rem; background: rgba(232, 176, 74, .1); border: 1px solid rgba(232, 176, 74, .35); font-size: 1.05rem; line-height: 1.45; color: var(--ink-mid); }
.lm-approx[hidden] { display: none; }
.lm-approx b { color: #f0c674; }
.lm-approx > .ic { width: 1.6rem; height: 1.6rem; flex-shrink: 0; color: #f0c674; }
.lg { display: flex; align-items: center; gap: .9rem; font-size: 1.15rem; color: var(--ink); margin-top: .55rem; }
.lg i { width: 2.4rem; height: 1.2rem; border-radius: .3rem; flex-shrink: 0; }
.lg-water { background: linear-gradient(90deg, #136f86, #1c8ea3); box-shadow: 0 0 0 1px #8ff3e9, 0 0 .5rem rgba(95, 224, 212, .5); }
.lg-land { background: #1f302a; box-shadow: 0 0 0 1px var(--line); }
.lg-mapped { height: 0 !important; border-top: 2px dashed rgba(232, 176, 74, .8); border-radius: 0 !important; }
.lg-places { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem 1rem; margin-top: .9rem; font-size: 1.1rem; color: var(--ink); }
.lg-places span { display: flex; align-items: center; gap: .8rem; }
.lg-places .pl-dot { margin-left: .3rem; }

/* ---------- phones / narrow ---------- */
@media (max-width: 999px) {
  .lm { grid-template-columns: 1fr; gap: 1rem; }
  .lm-side { gap: 1rem; }
  .lm-mapcard { min-height: 0; height: min(62vh, 34rem); border-radius: 1.25rem; }
  .lm-side .card { padding: 1.1rem 1.25rem; }
  .lm-north { width: 2.4rem; left: .9rem; top: .9rem; }
  .lm-badge { top: 1rem; left: 3.9rem; transform: none; font-size: .74rem; padding: .3rem .65rem; }
  .lm-badge .ic { width: 1rem; height: 1rem; }
  .lm-zoom { right: .7rem; top: .7rem; border-radius: .9rem; }
  .lm-zoom button { width: 3rem; height: 3rem; }
  .lm-zoom .ic { width: 1.5rem; height: 1.5rem; }
  .lm-scale { left: .7rem; bottom: .7rem; padding: .35rem .55rem .3rem; }
  .lm-scale .sb { font-size: .75rem; gap: .45rem; }
  .lm-attr { font-size: .68rem; padding: .25rem .55rem; }
  .lm-big { font-size: 2.6rem; }
  .lm-big small { font-size: 1.2rem; }
  .lm-stats { font-size: .95rem; }
  .lm-muted, .lm-src { font-size: .85rem; }
  .lm-show b { font-size: 1.7rem; }
  .lm-whatif { margin-top: 1rem; padding-top: 1rem; }
  .lm-lc-sub, .lm-wi-lab { font-size: .8rem !important; }
  .lg-places { font-size: .9rem; }
  .pl span { font-size: .82rem; }
  .pl.r1 span { font-size: .95rem; }
  .pl.r5 span { font-size: .75rem; }
  .pl-dot { width: .8rem; height: .8rem; }
  .pl-dot.pt-marina { width: 1rem; height: 1rem; }
  .pl-dot.pt-dam { width: 1.1rem; height: .6rem; }
  .pl-dot.pt-ramp { width: .75rem; height: .75rem; }
  .pl-dot.pt-creek, .pl-dot.pt-canyon, .pl-dot.pt-cove, .pl-dot.pt-camp, .pl-dot.pt-dayuse, .pl-dot.pt-park { width: .6rem; height: .6rem; }
  .pl-dot.pt-peak, .pl-dot.pt-cliff { width: 0; height: 0; border-left-width: .45rem; border-right-width: .45rem; border-bottom-width: .75rem; }
  .lm-pop { padding: .8rem 3rem .8rem 1rem; border-radius: 1rem; }
  .lm-pop b { font-size: 1.15rem; }
  .lm-pop-type { font-size: .72rem; }
  .lm-pop-note, .lm-pop-ll { font-size: .85rem; }
  .lm-pop-src { font-size: .78rem; }
  .lm-show span { font-size: .9rem; }
  .lm-slider { height: 2.6rem; }
  .lm-slider::-webkit-slider-thumb { width: 2.2rem; height: 2.2rem; margin-top: -.7rem; }
  .lm-marks { left: 1.1rem; right: 1.1rem; }
  .lm-ends { font-size: .8rem; }
  .lm-chip { font-size: .9rem; padding: .55rem .9rem; }
  .lm-approx { font-size: .85rem; padding: .75rem .85rem; }
  .lg { font-size: .9rem; }
  .tile-lake { height: 3.6rem; top: 50%; transform: translateY(-50%); right: 1rem; }
}
