/* Map markers · "Liquid Light" (Phase 7a; was Gilded Light). Flat glass only: no backdrop-filter and no live filter:blur on any marker (see the budget in css/tokens.css).
   1. The Mirai hero: the Century Mirai wordmark on a quiet white glass plate, centred on the site.
   2. The label system js/ux/labels.js drives: fade-in, hide, leader line.
   3. Special markers: chips, leader labels, hub orbs, bezels, metro stations, text on lines.
   The map labels read the --lg-* tokens, so they follow the Day/Dusk/Night material with the rest of the UI; map text keeps its dark halo on every map (the Day imagery is softened for it, _build/day_soft.py). */

/* ---------- 1 · hero ----------
   The Century Mirai wordmark, centred on the site. The logo file is dark on transparent, so it sits on the same quiet white glass the old pill used. */
.hero.hg { transform: none; margin: -3.08rem 0 0 -5.5rem; display: block; box-sizing: border-box; width: 11rem; height: 6.16rem; padding: 0; pointer-events: auto; background: none; }
.hero.hg > * { position: absolute; }
.hg-ground { pointer-events: none; left: 50%; top: 78%; width: 10.2rem; height: 2rem; transform: translate(-50%, -40%); border-radius: 50%; background: radial-gradient(ellipse, rgba(255, 255, 255, .42), transparent 70%); }
.hg-med { inset: 0; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border-radius: 1.1rem; padding: .5rem .7rem .46rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, .94), rgba(238, 239, 245, .88)); box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(255, 255, 255, .7), 0 4px 12px -4px rgba(0, 0, 0, .5);   /* (17 October) a lighter shadow */
  transition: transform var(--dur-press) var(--ease-out); }
.hg-med img { display: block; width: 100%; height: 100%; object-fit: contain; }
.hero.hg:active .hg-med { transform: scale(.94); }
/* Then & now: the plate glows as the years pass (--g is set on the pin by js/plus/timeline.js) */
.tl-hero .hg-med { box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(255, 255, 255, .7), 0 .6rem 1.3rem -.5rem rgba(0, 0, 0, .65), 0 0 calc(.6rem + var(--g, 0) * 2.6rem) calc(var(--g, 0) * .5rem) rgba(255, 255, 255, calc(.15 + var(--g, 0) * .7)); }
/* Day map */
#lv-map:not(.dark) .hg-ground { background: radial-gradient(ellipse, rgba(20, 24, 44, .28), transparent 70%); }
#lv-map:not(.dark) .hg-med { box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(255, 255, 255, .95), 0 4px 12px -4px rgba(20, 24, 44, .35); }

/* the "Mirai's corridor" payoff label: solid, never faint, and beside the hero (not under it) */
.sx-lab.mir { transform: translate(3.4rem, -50%); background: rgba(255, 255, 255, .92); border-color: transparent; }
.sx-lab.mir b { color: #16161b; }

/* ---------- 2 · label system ---------- */
#lv-map .lbl[data-lbl-hide] { display: none; }
.lbl-in-a { animation: lbl-in-a .16s var(--ease-out) backwards; }
.lbl-in-b { animation: lbl-in-b .16s var(--ease-out) backwards; }
@keyframes lbl-in-a { from { opacity: 0; } }
@keyframes lbl-in-b { from { opacity: 0; } }
/* a moved hub callout drops its fixed leader (the engine draws one to the new spot); a hidden one drops it too */
.sx-hub:has(.card[data-lbl-moved]) .ld, .sx-hub:has(.card[data-lbl-hide]) .ld { display: none; }
.lbl-lead { left: 0; top: 0; height: 1px; width: var(--len, 0); transform-origin: 0 50%; transform: rotate(var(--ang, 0rad)); pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, .85), rgba(255, 255, 255, .3)); transition: opacity .16s; }
.lbl-lead.on { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .lbl-in-a, .lbl-in-b { animation: none; }
}

/* ---------- 3 · special markers ----------
   Anchor pattern: a pin is a 0x0 box on the map point. .mm-at centres its child on that point with flex, never with a transform (a half-pixel transform blurs text).
   The visible label is the child that carries data-lbl, so js/ux/labels.js can measure it, move it and give it a leader. */
.mm-at { position: absolute; left: 0; top: 0; width: 0; height: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; transition: opacity var(--dur-base) var(--ease-out); }
.mm-at > * { flex: none; pointer-events: auto; white-space: nowrap; }
.mm-at.e { justify-content: flex-start; padding-left: 2.7rem; }   /* the label starts east of the point */
.mm-at.dim, .mm-hub.dim { opacity: .3; }
/* time / distance / year chip on a route: flat thin glass with a specular rim */
.mm-chip, .mm-lead { background-color: rgba(30, 28, 44, .74); background-image: var(--lg-sheen); color: #f5f5f7; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), inset 0 0 0 1px rgba(255, 255, 255, .18), 0 .4rem 1rem -.4rem rgba(0, 0, 0, .6); border: 0; }
.mm-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: var(--r-pill); font: 600 12px/1 var(--sans); font-variant-numeric: tabular-nums; }   /* (17 October) the compact time chip */
.mm-chip svg { width: 12px; height: 12px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mm-at.sel .mm-chip { background-color: rgba(255, 255, 255, .92); background-image: none; color: #16161b; }
.mm-chip.warn { color: #f5f5f7; }
/* (23 October, after the client's reference) a metro line's name: one straight white tag on the line, edged in the line's colour, a dot of it in front (js/levels.js connect) */
.mm-ln { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px 3px 6px; border-radius: 6px; background: rgba(255, 255, 255, .94); color: #16161b; font: 600 12px/1.1 var(--sans); letter-spacing: .01em; box-shadow: inset 0 0 0 1.5px var(--c), 0 4px 10px -3px rgba(0, 0, 0, .5); }
.mm-ln i { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--c); }
.mm-ln.rd { padding-left: 8px; font-weight: 600; color: #3a3530; box-shadow: inset 0 0 0 1px rgba(22, 22, 27, .22), 0 4px 10px -3px rgba(0, 0, 0, .5); }   /* a road: no line colour to carry */
/* leader label (Mirai: "On the next ring", its sample price) */
.mm-lead { position: relative; display: inline-flex; align-items: center; gap: .45rem; padding: .4rem .9rem .4rem .75rem; border-radius: var(--r-pill); font: 600 max(.82rem, 13px)/1 var(--sans); letter-spacing: -.01em; }
.mm-lead i { width: .5rem; height: .5rem; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, .25); flex: none; }
.mm-lead::before { content: ""; position: absolute; right: 100%; top: 50%; width: 1.05rem; height: 1px; background: linear-gradient(90deg, rgba(255, 255, 255, .1), #fff); }
.mm-lead[data-lbl-moved]::before { display: none; }
.mm-lead small { font: 500 max(.72rem, 12px)/1 var(--sans); color: rgba(245, 245, 247, .74); letter-spacing: .01em; }
.mm-lead b { font-weight: 600; color: #fff; }
/* job hub orb: one colour, name only */
.mm-hub { position: absolute; left: 0; top: 0; width: 0; height: 0; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: opacity var(--dur-base) var(--ease-out); }
/* (17 October, Phase 4) an 18px solid disc in its hue with a 1.5px ring, no highlight or glow; chosen: scale 1.12 and a 2px white ring */
.mm-orb { flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--hc, var(--c-work)); box-shadow: 0 0 0 1.5px rgba(14, 11, 20, .6), var(--pin-shadow); transition: scale var(--dur-quick) var(--ease-out); }   /* no CSS transform transition: GSAP scales it in (story.js) */
.mm-hub.sel .mm-orb { scale: var(--pin-sel); box-shadow: 0 0 0 2px #fff, var(--pin-shadow); }
.mm-hub.mine .mm-orb { box-shadow: 0 0 0 2px #fff, var(--pin-shadow); }
.mm-hub-l { position: absolute; left: 15px; top: 0; height: 0; display: flex; align-items: center; white-space: nowrap; pointer-events: none; }
.mm-hub-l b { display: inline-flex; align-items: center; gap: .45rem; font: 600 max(.92rem, 14px)/1 var(--sans); letter-spacing: -.01em; color: #f5f5f7; text-shadow: 0 0 2px #0e0b14, 0 0 6px rgba(14, 11, 20, .95), 0 1px 12px rgba(14, 11, 20, .8); }
.mm-hub-l em, .mm-stn-l em { font: 600 max(.62rem, 11px)/1 var(--sans); font-style: normal; letter-spacing: .06em; text-transform: uppercase; color: #16161b; background: rgba(255, 255, 255, .92); padding: .22rem .5rem; border-radius: var(--r-pill); text-shadow: none; }
/* compare project: a muted glass bezel, so Mirai stays the only bright white medallion */
.mm-bz-m { flex: none; display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: linear-gradient(150deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, .06)), color-mix(in srgb, var(--pc, #22202f) 55%, rgba(34, 32, 48, .86)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 0 0 2px var(--pc, rgba(255, 255, 255, .3)), 0 6px 14px rgba(0, 0, 0, .5); }
.mm-bz-m i { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; background: none; font: 600 .95rem/1 var(--sans); font-style: normal; color: #f5f5f7; }
/* metro station: white dot, line-colour ring; dashed while the line is being built */
.mm-stn { position: absolute; left: 0; top: 0; width: 0; height: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; transition: opacity var(--dur-base) var(--ease-out); }
/* (17 October, Phase 4) an 18px disc with the train pictogram (js/levels.js connect), a 1.5px ring in the line colour */
.mm-stn i { flex: none; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; box-sizing: border-box; background: var(--pin-fill); border: 1.5px solid var(--c); color: #fff; box-shadow: var(--pin-shadow); }
.mm-stn i svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.mm-stn.uc i { border-style: dashed; }
.mm-stn.dim { opacity: .2; }
.mm-stn-l { position: absolute; left: 14px; top: 0; height: 0; display: flex; align-items: center; white-space: nowrap; }
.mm-stn-l b { display: inline-flex; align-items: center; gap: 6px; font: 600 12px/1 var(--sans); letter-spacing: -.005em; color: #f5f5f7; text-shadow: var(--halo); }
/* text that rides a line (SVG, constant size on screen) */
.mm-pt { font-family: var(--sans); font-weight: 600; letter-spacing: .03em; fill: var(--tc, #f5f5f7); stroke: rgba(14, 11, 20, .88); stroke-linejoin: round; paint-order: stroke; pointer-events: none; transition: opacity var(--dur-base); }
.mm-pt.mm-hide { visibility: hidden; }
.mm-pt.mm-hero { fill: #fff; }
/* Mirai's hero ring pulses once when the last ring arrives */
.hg-pulse::after { content: ""; position: absolute; left: 50%; top: 50%; width: 3.2rem; height: 3.2rem; margin: -1.6rem 0 0 -1.6rem; border-radius: 50%; border: 2px solid #fff; pointer-events: none; animation: hg-pulse .96s var(--ease-out) 1 both; }
@keyframes hg-pulse { from { transform: scale(.9); opacity: .95; } to { transform: scale(3.6); opacity: 0; } }
/* Day map: bright glass chips with dark text */
#lv-map:not(.dark) .mm-chip, #lv-map:not(.dark) .mm-lead { background-color: rgba(255, 255, 255, .86); background-image: none; color: #16161b; box-shadow: inset 0 1px 0 #fff, 0 0 0 .5px rgba(22, 22, 27, .14), 0 .4rem 1rem -.4rem rgba(20, 24, 44, .4); }
#lv-map:not(.dark) .mm-lead small { color: rgba(22, 22, 27, .66); } #lv-map:not(.dark) .mm-lead b { color: #16161b; } #lv-map:not(.dark) .mm-lead i { background: #16161b; box-shadow: 0 0 0 3px rgba(22, 22, 27, .15); }
#lv-map:not(.dark) .mm-at.sel .mm-chip { background-color: #16161b; color: #fff; }
#lv-map:not(.dark) .mm-pt { fill: var(--tcd, #16161b); stroke: rgba(255, 255, 255, .9); }
#lv-map:not(.dark) .mm-pt.mm-hero { fill: #16161b; }
#lv-map:not(.dark) .mm-orb { box-shadow: 0 0 0 1.5px #fff, var(--pin-shadow-day); }
#lv-map:not(.dark) .mm-stn i { background: var(--pin-fill-day); color: #16161b; box-shadow: var(--pin-shadow-day); }
#lv-map:not(.dark) .mm-bz-m { background: linear-gradient(150deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, .6)); box-shadow: inset 0 1px 0 #fff, 0 0 0 2px var(--pcd, rgba(22, 22, 27, .14)), 0 4px 10px rgba(20, 24, 44, .35); } #lv-map:not(.dark) .mm-bz-m i { color: #16161b; }
@media (prefers-reduced-motion: reduce) { .hg-pulse::after { animation: none; opacity: 0; } }

/* the Mirai marker is a small badge now: it marks the spot without covering the places around it */
.hero.hg { margin: -1.85rem 0 0 -3.3rem; width: 6.6rem; height: 3.7rem; }
.hg-ground { width: 6.1rem; height: 1.3rem; }
.hg-med { border-radius: .8rem; padding: .32rem .45rem .3rem; }
