/* Demo demo31 "Beacon" — locals day and night: demo27's glowing speciality lights on a light or a night map, demo25's side panel, Unbounded + IBM Plex Mono, one signal green; tokens per theme on html[data-theme]. */

/* ---------- theme tokens ---------- */
html[data-theme="dark"] .demo31-page, .demo31-page {
  --bg: #0a0b0d; --map-bg: #111216; --glass: rgba(14,15,18,.84); --glass-solid: #0f1013; --edge: rgba(255,255,255,.09); --edge-strong: rgba(255,255,255,.16);
  --ink: #eef0f4; --ink-2: #c9ccd4; --dim: #8d93a0; --chip: rgba(255,255,255,.05); --chip-hover: rgba(255,255,255,.09);
  --sig: #9dff6a; --sig-ink: #0a0b0d; --sig-glow: rgba(157,255,106,.35); --shadow: 0 24px 60px -24px #000;
  --core: #fff; --halo: 55%; --heat-blend: screen; --heat-opacity: .9;
  --tile-night: invert(1) hue-rotate(180deg) brightness(.8) contrast(1.15) saturate(.3);
}
html[data-theme="light"] .demo31-page {
  --bg: #eef0ec; --map-bg: #e4e6e2; --glass: rgba(250,251,249,.88); --glass-solid: #fbfcfa; --edge: rgba(16,20,24,.1); --edge-strong: rgba(16,20,24,.2);
  --ink: #14161a; --ink-2: #3a3f48; --dim: #5d6470; --chip: rgba(16,20,24,.045); --chip-hover: rgba(16,20,24,.08);
  --sig: #2c8a2a; --sig-ink: #fff; --sig-glow: rgba(44,138,42,.25); --shadow: 0 24px 50px -26px rgba(20,30,20,.45);
  --core: #fff; --halo: 45%; --heat-blend: multiply; --heat-opacity: .7;
  --tile-light: grayscale(1) brightness(1.07) contrast(.84);
}
.demo31-page { --map-top: 70px; background: var(--bg); transition: background-color .35s; }
.bc { padding: 0; color: var(--ink); font-family: "IBM Plex Mono", ui-monospace, monospace; }
html[data-theme="dark"] .bc { color-scheme: dark; }
html[data-theme="light"] .bc { color-scheme: light; }
.bc .icon { width: 16px; height: 16px; flex: none; }
.bc-panel, .bc-tool, .bc-seg, .bc-card, .bc-banner__inner, .bc-stage .leaflet-control-zoom a { transition: background-color .35s, color .35s, border-color .35s; }

/* ---------- banner (demo27): duotone portraits, a huge two-line title ---------- */
.bc-banner__inner { position: relative; height: clamp(300px, 32vw, 420px); overflow: hidden; background: var(--bg); }
.bc-slide { position: absolute; inset: 0; }
.bc-slide__photos { position: absolute; inset: 0 0 0 40%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; background: #120f2a; }
.bc-slide__photos img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; filter: grayscale(1) contrast(1.2) brightness(.7); mix-blend-mode: screen; }
.bc-slide__photos::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #0a0b0d 0%, rgba(10,11,13,.4) 30%, rgba(10,11,13,.1) 100%), linear-gradient(140deg, rgba(91,76,240,.55), rgba(214,69,122,.45) 60%, rgba(157,255,106,.25)); mix-blend-mode: multiply; }
html[data-theme="light"] .bc-slide__photos { background: #dfe6dc; }
html[data-theme="light"] .bc-slide__photos img { filter: grayscale(1) contrast(1.1) brightness(1.08); mix-blend-mode: multiply; }
html[data-theme="light"] .bc-slide__photos::after { background: linear-gradient(90deg, #eef0ec 0%, rgba(238,240,236,.55) 28%, rgba(238,240,236,0) 70%), linear-gradient(140deg, rgba(157,140,255,.35), rgba(255,150,190,.3) 60%, rgba(157,255,106,.35)); mix-blend-mode: normal; }
.bc-slide__text { position: absolute; left: max(24px, calc((100vw - 1280px) / 2 + 24px)); top: 50%; transform: translateY(-50%); max-width: 640px; }
.bc-slide__kicker { margin: 0 0 18px; font: 500 12px/1 "IBM Plex Mono", monospace; letter-spacing: .2em; text-transform: uppercase; color: var(--sig); }
.bc-slide__kicker::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--sig); box-shadow: 0 0 12px var(--sig); margin-right: 10px; animation: bc-pulse 1.8s infinite; vertical-align: 1px; }
@keyframes bc-pulse { 50% { opacity: .3; } }
.bc-slide__title { margin: 0; font: 800 clamp(38px, 5.6vw, 88px)/.92 "Unbounded", sans-serif; letter-spacing: -.04em; text-transform: uppercase; color: var(--ink); }
.bc-slide__lead { margin: 20px 0 0; font: 400 14.5px/1.6 "IBM Plex Mono", monospace; color: var(--ink-2); max-width: 50ch; }
.bc-banner__hide { position: absolute; right: 22px; bottom: 22px; display: inline-flex; align-items: center; gap: 10px; padding: 9px 14px 9px 10px; border-radius: 999px; border: 1px solid var(--edge); background: var(--glass); color: var(--ink); font: 500 12px/1 "IBM Plex Mono", monospace; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; backdrop-filter: blur(8px); }
.bc-banner__hide i { width: 30px; height: 16px; border-radius: 8px; background: var(--sig); position: relative; }
.bc-banner__hide i::after { content: ""; position: absolute; right: 2px; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--sig-ink); }
.bc-banner__hide:hover { border-color: var(--sig); }

/* ---------- stage ---------- */
.bc-stage .lp-map.leaflet-container, .bc-stage .leaflet-container { background: var(--map-bg); }

/* the side panel (demo25): count, city, speciality chips, people in view; the card covers the list */
.bc-panel { position: absolute; z-index: 500; left: 16px; top: 16px; bottom: 16px; width: 372px; display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 18px;
  background: var(--glass); color: var(--ink); backdrop-filter: blur(14px); box-shadow: var(--shadow); border: 1px solid var(--edge); overflow: hidden; }
.bc-panel__head { display: flex; align-items: center; gap: 14px; }
.bc-panel__big { margin: 0; min-width: 2ch; font: 800 46px/1 "Unbounded", sans-serif; letter-spacing: -.05em; text-shadow: 0 0 30px var(--sig-glow); font-variant-numeric: tabular-nums; }
.bc-panel__title { margin: 0; font: 600 17px/1 "Unbounded", sans-serif; letter-spacing: .02em; text-transform: uppercase; }
.bc-panel__count { margin: 6px 0 0; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.bc-panel__count::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--sig); box-shadow: 0 0 10px var(--sig); margin-right: 8px; animation: bc-pulse 1.8s infinite; vertical-align: 1px; }
.bc-city { display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 10px; background: var(--chip); border: 1px solid var(--edge); color: var(--dim); }
.bc-city select { flex: 1; min-width: 0; height: 40px; border: 0; background: transparent; color: var(--ink); font: 500 13px/1 "IBM Plex Mono", monospace; outline: none; }
.bc-city select option { background: var(--glass-solid); color: var(--ink); }
.bc-city:focus-within { border-color: var(--sig); }
.bc-panel__label { margin: 4px 0 -4px; font: 500 11px/1 "IBM Plex Mono", monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.bc-panel__label span { letter-spacing: 0; text-transform: none; opacity: .8; }
.bc-specs { display: flex; flex-wrap: wrap; gap: 6px; max-height: 132px; overflow-y: auto; padding: 2px 2px 4px; scrollbar-width: thin; }
.bc .lm-spec { padding: 5px 10px 5px 5px; border-radius: 999px; background: var(--chip); border: 1px solid transparent; font: 500 12px/1 "IBM Plex Mono", monospace; color: var(--ink-2); transition: background .15s, border-color .15s; }
.bc .lm-spec--all { padding-left: 12px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
.bc .lm-spec__code { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font: 500 9px/1 "IBM Plex Mono", monospace; color: var(--c); box-shadow: inset 0 0 0 1.5px var(--c); }
.bc .lm-spec__count { color: var(--dim); font-size: 11px; font-variant-numeric: tabular-nums; }
.bc .lm-spec:hover { border-color: var(--c, var(--sig)); background: var(--chip-hover); }
.bc .lm-spec.is-on { background: color-mix(in srgb, var(--c) 18%, transparent); border-color: color-mix(in srgb, var(--c) 55%, transparent); color: var(--ink); }
.bc .lm-spec.is-on .lm-spec__code { background: var(--c); color: #0a0b0d; box-shadow: 0 0 14px -2px var(--c); }
.bc .lm-spec.is-on .lm-spec__count { color: var(--ink); }
.bc .lm-spec--all.is-on { background: var(--sig); border-color: var(--sig); color: var(--sig-ink); box-shadow: 0 0 16px -4px var(--sig); }
.bc .lm-spec--all.is-on .lm-spec__count { color: var(--sig-ink); opacity: .75; }
.bc-list { flex: 1; min-height: 0; overflow-y: auto; margin: 0 -8px; padding: 0 8px; display: flex; flex-direction: column; gap: 2px; scrollbar-width: thin; scrollbar-color: var(--edge-strong) transparent; }
.bc .lm-person { padding: 8px; border-radius: 12px; transition: background .15s; }
.bc .lm-person:hover, .bc .lm-person.is-selected { background: var(--chip-hover); }
.bc .lm-person__img { width: 42px; height: 42px; box-shadow: 0 0 0 2px var(--c), 0 0 14px -2px var(--c); }
.bc .lm-person__name { font: 500 13.5px/1.3 "IBM Plex Mono", monospace; color: var(--ink); }
.bc .lm-person__spec { font: 500 11px/1.4 "IBM Plex Mono", monospace; letter-spacing: .08em; text-transform: uppercase; color: color-mix(in srgb, var(--c) 75%, var(--ink)); }
.bc .lm-person__meta { font: 400 12px/1.35 "IBM Plex Mono", monospace; color: var(--dim); }
.bc .lm-empty { margin: 8px 0; color: var(--dim); font-size: 13px; line-height: 1.5; }

/* the card (demo27's look) inside the panel */
.bc-card { position: absolute; inset: 0; z-index: 2; background: var(--glass-solid); overflow-y: auto; }
.bc .lm-card { padding: 0 0 20px; }
.bc .lm-card__img { width: 100%; height: 260px; object-position: center 22%; filter: saturate(.9) contrast(1.04); }
.bc .lm-card__close { position: absolute; right: 12px; top: 12px; width: 36px; height: 36px; border-radius: 50%; background: rgba(10,11,13,.6); color: #fff; font-size: 22px; line-height: 1; text-align: center; backdrop-filter: blur(6px); }
.bc .lm-card__close:hover { background: #000; }
.bc .lm-card__spec { display: flex; align-items: center; gap: 10px; margin: 16px 20px 0; font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: color-mix(in srgb, var(--c) 75%, var(--ink)); }
.bc .lm-card__spec i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); font-size: 0; }
.bc .lm-card__name { margin: 10px 20px 0; font: 800 25px/1.05 "Unbounded", sans-serif; letter-spacing: -.03em; color: var(--ink); }
.bc .lm-card__place { margin: 6px 20px 0; color: var(--dim); font-size: 12.5px; }
.bc .lm-card__bio { margin: 12px 20px 0; font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }
.bc .lm-card__facts { margin: 14px 20px 0; }
.bc .lm-card__facts div { padding: 8px; border-radius: 10px; background: var(--chip); }
.bc .lm-card__facts dt { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); margin-bottom: 4px; }
.bc .lm-card__facts dd { font-size: 12.5px; color: var(--ink); }
.bc .lm-card__open { margin: 12px 20px 0; font-size: 12px; color: var(--sig); }
.bc .lm-card__open::before { content: "● "; text-shadow: 0 0 8px var(--sig); }
.bc .lm-card__actions { margin: 14px 20px 0; }
.bc .lm-card__btn { flex: 1; height: 42px; border-radius: 12px; border: 1px solid var(--edge-strong); color: var(--ink); font: 600 12px/1 "Unbounded", sans-serif; letter-spacing: .04em; text-transform: uppercase; }
.bc .lm-card__btn--primary { background: var(--sig); border-color: var(--sig); color: var(--sig-ink); }
.bc .lm-card__btn:hover { border-color: var(--ink); }

/* tools on the map: theme, base map, glow, near me, banner */
.bc-tools { position: absolute; z-index: 500; right: 16px; top: 16px; left: 404px; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; pointer-events: none; }
.bc-tools > * { pointer-events: auto; }
.bc-seg { display: flex; padding: 4px; gap: 2px; border-radius: 12px; background: var(--glass); border: 1px solid var(--edge); backdrop-filter: blur(12px); box-shadow: var(--shadow); }
.bc-seg button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px; border: 0; border-radius: 9px; background: none; color: var(--dim); font: 500 12px/1 "IBM Plex Mono", monospace; cursor: pointer; }
.bc-seg button svg { width: 15px; height: 15px; }
.bc-seg button:hover { color: var(--ink); }
.bc-seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.bc-theme button[aria-pressed="true"] { background: var(--sig); color: var(--sig-ink); box-shadow: 0 0 16px -4px var(--sig); }
.bc-tool { display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--edge); background: var(--glass); color: var(--ink); font: 500 12px/1 "IBM Plex Mono", monospace; cursor: pointer; backdrop-filter: blur(12px); box-shadow: var(--shadow); }
.bc-tool:hover { border-color: var(--edge-strong); }
.bc-glow i { width: 9px; height: 9px; border-radius: 50%; background: var(--dim); }
.bc-glow[aria-pressed="true"] i { background: var(--sig); box-shadow: 0 0 10px 1px var(--sig); }
.bc-tool--accent { background: var(--sig); border-color: var(--sig); color: var(--sig-ink); }
.bc-tool.lp-banner-show { display: none; }
html.banner-off .bc-tool.lp-banner-show { display: inline-flex; }
.bc-maps .is-short { display: none; }
.bc .lm-spec:focus-visible, .bc-seg button:focus-visible, .bc-tool:focus-visible, .bc .lm-person:focus-visible, .bc .lm-card__btn:focus-visible, .bc .lm-card__close:focus-visible, .bc-banner__hide:focus-visible { outline: 2px solid var(--sig); outline-offset: 2px; }
.bc-status { position: absolute; z-index: 500; right: 16px; top: 116px; margin: 0; font-size: 12px; color: var(--ink); background: var(--glass); border-radius: 8px; }
.bc-status:not(:empty) { padding: 8px 10px; border: 1px solid var(--edge); }

/* ---------- lights (demo27), tuned per theme ---------- */
.bc-dot { position: relative; display: block; width: 100%; height: 100%; }
.bc-dot i { position: absolute; left: 50%; top: 50%; width: calc(12px * var(--r)); height: calc(12px * var(--r)); transform: translate(-50%, -50%); border-radius: 50%; background: var(--core);
  box-shadow: 0 0 0 2px var(--c), 0 0 10px 2px var(--c), 0 0 26px 6px color-mix(in srgb, var(--c) var(--halo), transparent); transition: transform .2s; }
html[data-theme="light"] .bc-dot i { box-shadow: 0 0 0 2px var(--c), 0 0 0 3.5px rgba(255,255,255,.9), 0 0 12px 3px var(--c), 0 0 26px 8px color-mix(in srgb, var(--c) var(--halo), transparent); }
.lm-marker:hover .bc-dot i, .lm-marker.is-hot .bc-dot i { transform: translate(-50%, -50%) scale(1.6); }
.lm-marker.is-selected .bc-dot i { transform: translate(-50%, -50%) scale(1.9); box-shadow: 0 0 0 2px var(--c), 0 0 0 6px color-mix(in srgb, var(--ink) 20%, transparent), 0 0 30px 8px var(--c); }
.lm-marker.is-selected .bc-dot::before { content: ""; position: absolute; left: 50%; top: 50%; width: 60px; height: 60px; margin: -30px 0 0 -30px; border-radius: 50%; border: 1.5px solid var(--c); animation: bc-ring 1.6s ease-out infinite; }
@keyframes bc-ring { from { transform: scale(.3); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }
.bc-stage .lm-cluster { --lm-cluster-bg: var(--glass-solid); --lm-cluster-ink: var(--ink); box-shadow: 0 0 24px -4px color-mix(in srgb, var(--ink) 35%, transparent); }
html[data-theme="light"] .bc-stage .lm-cluster { box-shadow: 0 6px 18px -6px rgba(0,0,0,.35), 0 0 22px -6px rgba(120,80,255,.35); }
.bc-stage .lm-cluster b { font-family: "IBM Plex Mono", monospace; font-weight: 500; width: calc(100% - 6px); height: calc(100% - 6px); }
.bc-stage .leaflet-heat-pane { filter: blur(16px) saturate(1.2); mix-blend-mode: var(--heat-blend); opacity: var(--heat-opacity); }

/* ---------- map controls ---------- */
.bc-stage .leaflet-control-zoom { border: 1px solid var(--edge); border-radius: 12px; overflow: hidden; margin: 0 16px 28px 0; box-shadow: var(--shadow); }
.bc-stage .leaflet-control-zoom a { width: 40px; height: 40px; line-height: 40px; background: var(--glass); color: var(--ink); border-color: var(--edge); }
.bc-stage .leaflet-control-zoom a:hover { background: var(--glass-solid); }
.bc-stage .leaflet-control-attribution { font: 10.5px/1.4 "IBM Plex Mono", monospace; background: var(--glass); color: var(--dim); }
.bc-stage .leaflet-control-attribution a { color: var(--ink-2); }

@media (max-width: 1100px) {
  .bc-theme button { padding: 0 9px; }
  .bc-theme button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (max-width: 860px) {
  .bc-slide__photos { inset: 0; opacity: .5; }
  .bc-slide__text { left: 20px; right: 20px; }
  .bc-slide__lead { font-size: 13px; }
  .bc-banner__hide { right: 12px; bottom: 12px; }
  .lp-stage.bc-stage { height: auto; min-height: 0; display: flex; flex-direction: column; }
  .bc-stage .lp-map { position: relative; height: 64vh; min-height: 420px; }
  .bc-panel { position: relative; inset: auto; width: auto; border-radius: 0; border: 0; box-shadow: none; background: var(--bg); backdrop-filter: none; }
  .bc-list { max-height: 420px; }
  .bc-card { position: fixed; inset: auto 0 0 0; max-height: 82vh; border-radius: 18px 18px 0 0; z-index: 1000; box-shadow: 0 -20px 50px rgba(0,0,0,.45); }
  .bc-tools { left: 12px; right: 12px; top: 12px; justify-content: flex-start; gap: 6px; }
  .bc-seg button { height: 30px; padding: 0 9px; font-size: 11.5px; }
  .bc-maps .is-long { display: none; }
  .bc-maps .is-short { display: inline; }
  .bc-tool { height: 40px; padding: 0 12px; }
  .bc-status { top: auto; bottom: 12px; left: 12px; right: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .bc-slide__kicker::before, .bc-panel__count::before, .lm-marker.is-selected .bc-dot::before { animation: none; }
  .demo31-page, .bc-panel, .bc-tool, .bc-seg, .bc-card { transition: none; }
}
