/* audit: readability + map tone (loaded after the plus-* files).
   Unified token set. Contrast figures are measured against the surface each token sits on.
   --rd-ink on --rd-glass-light  : 17.2:1     --rd-ink-soft on glass-light : 11.6:1
   --rd-bronze-ink on glass-light: 7.5:1 (neutral grey; the old warm accent is gone)
   --rd-gold-on-dark (white) on night: 19:1     white on --rd-glass-dark     : 19.2:1 */
:root {
  --rd-ink: #16161b;
  --rd-ink-soft: #3b3b44;
  --rd-muted-ink: #585861;          /* 7.0:1 on cream (was #6a6a74 5.3:1) */
  --rd-bronze-ink: #52525b;
  --rd-gold-on-dark: #ffffff;
  --rd-glass-light: rgba(250, 250, 252, .96);
  --rd-glass-dark: rgba(16, 13, 22, .88);
  --rd-halo-dark: rgba(10, 8, 14, .78);
  /* scrim strength follows the map tone: strongest on bright day imagery, lighter at dusk/night (--dusk is 0..1) */
  --rd-scrim: calc(.62 - var(--dusk, .5) * .3);
}

/* ---------- 1. tone scrims on the map (the old .edge vignette becomes a title + bottom-bar + edge scrim) ---------- */
.mapview .map-canvas { z-index: 0; }
.mapview .edge {
  z-index: 1;
  background:
    radial-gradient(ellipse 62% 56% at 14% 18%, rgba(8, 10, 9, var(--rd-scrim)) 0%, rgba(8, 10, 9, calc(var(--rd-scrim) * .55)) 45%, transparent 100%),
    linear-gradient(0deg, rgba(8, 10, 9, calc(var(--rd-scrim) * .95)) 0%, rgba(8, 10, 9, calc(var(--rd-scrim) * .35)) 16%, transparent 32%),
    linear-gradient(180deg, rgba(8, 10, 9, calc(var(--rd-scrim) * .55)) 0%, transparent 16%),
    radial-gradient(ellipse at 50% 50%, transparent 52%, rgba(14, 11, 20, .55) 100%);
}
.mapview .map-veil, .map-veil { z-index: 1; }
.mapview .world { z-index: 2; }

/* ---------- 2. place title block: bigger eyebrow, layered shadow = halo, never thin ---------- */
#place { text-shadow: 0 1px 2px rgba(0, 0, 0, .85), 0 2px 10px rgba(0, 0, 0, .6); }   /* (16 October, OnePlus Pad Go) tight shadows only: the wide glows (24 to 60px) were re-blurred by the tablet's GPU each time a title word was drawn, ~50ms a time, holding page changes near 8fps, and each word's reveal mask clipped them into a visible dark box */
#place .pl-k { font-size: max(.8rem, 12px); letter-spacing: .08em; color: rgba(255, 255, 255, .72); font-weight: 600; }
#place .pl-t { color: #fff; }
#place .pl-f { opacity: 1; font-size: max(1.05rem, 15px); color: #fff; font-weight: 600; }

/* ---------- 4. pins: dark halo + ring so they separate from green tiles in all three tones ---------- */
.pin i { width: 1rem; height: 1rem; box-shadow: 0 0 0 2px #fff, 0 0 0 5px var(--rd-halo-dark), 0 0 14px rgba(0, 0, 0, .55); }
#lv-map:not(.dark) .pin i { background: var(--bronze); box-shadow: 0 0 0 2.5px #fff, 0 0 0 5.5px var(--rd-halo-dark), 0 2px 8px rgba(0, 0, 0, .5); }
/* status colours must win over the day-mode dot, so the legend (Delivered / Building / Coming) reads on the map */
#lv-map .pin.st-completed i { background: #dcdde3; } #lv-map .pin.st-ongoing i { background: #2fc4b2; } #lv-map .pin.st-planning i { background: #b49cf0; }
.pin.poi i { box-shadow: 0 0 0 2px #fff, 0 0 0 5px var(--rd-halo-dark), 0 2px 8px rgba(0, 0, 0, .5); }
/* pin labels: larger and always on a solid glass chip with a border that survives green */
.pin span, .stn span, .lm .nm { font-size: max(.84rem, 12px); padding: .34rem .7rem; }
#lv-map:not(.dark) .pin span, #lv-map:not(.dark) .stn span, #lv-map:not(.dark) .lm .nm {
  background: var(--rd-glass-light); color: var(--rd-ink); box-shadow: 0 0 0 1.5px rgba(10, 8, 14, .55), 0 3px 10px rgba(0, 0, 0, .35); }
.pin span, .stn span, .lm .nm { background: var(--rd-glass-dark); color: #fff; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .55), 0 3px 10px rgba(0, 0, 0, .45); }
#lv-map .pin.on span, .pin.on span { background: var(--gold-2) !important; color: var(--rd-ink) !important; }
.stn i { box-shadow: 0 0 0 2.5px #fff, 0 0 0 5px var(--rd-halo-dark); }
.lm .ph { border-color: #fff; box-shadow: 0 0 0 2px var(--rd-halo-dark), 0 .5rem 1.2rem rgba(0, 0, 0, .5); }
.pl-pj-b { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--rd-halo-dark), 0 .4rem 1rem rgba(0, 0, 0, .4); }
.pl-pj-n { box-shadow: 0 0 0 1.5px rgba(10, 8, 14, .55), 0 3px 10px rgba(0, 0, 0, .35); }
.pl-pj-n b { font-size: max(.9rem, 12px); } .pl-pj-n small { font-size: max(.76rem, 12px); color: var(--rd-muted-ink); }
.hero .card { box-shadow: 0 0 0 2px rgba(10, 8, 14, .55), 0 .8rem 2rem -.4rem rgba(0, 0, 0, .6); }
.hero .halo { border-color: #fff; box-shadow: 0 0 0 2px rgba(10, 8, 14, .45); }

/* growth-story tags (dark pills), road tags, ring tags, heat tags */
.gtag { background: var(--rd-glass-dark); color: #fff; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .5), 0 4px 14px rgba(0, 0, 0, .4); font-size: max(.9rem, 12px); }
.gtag.on { background: var(--gold-2); color: var(--rd-ink); }
.road-tag { font-size: max(.8rem, 12px); box-shadow: 0 0 0 2px var(--rd-halo-dark), 0 3px 8px rgba(0, 0, 0, .4); }
.ring-tag { font-size: max(.9rem, 12px); }
.heat-tag { background: var(--rd-glass-dark); border-color: rgba(255, 255, 255, .6); box-shadow: 0 3px 12px rgba(0, 0, 0, .4); }
.heat-tag span { font-size: max(.76rem, 12px); }

/* ---------- 5. bottom bar / strips / chips ---------- */
.strip { background: var(--rd-glass-light); box-shadow: 0 0 0 1.5px rgba(10, 8, 14, .35), var(--shadow); }
.strip-note, .legacy-strip .strip-note { color: var(--rd-muted-ink); font-size: max(.86rem, 12px); }
.pill small { opacity: 1; color: var(--rd-muted-ink); font-size: max(.8rem, 12px); }
.pill.on small, .pill.dark small { color: var(--rd-gold-on-dark); }
.legacy-strip .pill b { background: rgba(26, 22, 30, .12); }
.poi-strip .pchip { background: rgba(26, 22, 30, .08); }
.poi-strip .pchip small { color: var(--rd-muted-ink); font-size: max(.8rem, 12px); }
.poi-strip .pchip span { font-size: max(.9rem, 12px); }

/* ---------- 6. chapter / info cards: darker secondary text, muted eyebrows ---------- */
.info, .pl-card { background: var(--rd-glass-light); }
.info .k, .pl-card .k, #chap .k, .tchip small, .info .meta span { color: var(--rd-bronze-ink); }
.info .meta span { color: var(--rd-muted-ink); font-size: max(.74rem, 12px); }
.info p:not(.k), .info .pts li { color: var(--rd-ink-soft); }
.tchip small { font-size: max(.8rem, 12px); }
.tchip em { font-size: max(.72rem, 12px); }
.tchip.muted { background: var(--rd-glass-light); }

/* ---------- 7. attract / welcome prompt ---------- */
.at-touch { font-size: max(.9rem, 13px); color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .9), 0 0 18px rgba(0, 0, 0, .7); }
.at-shade { background: radial-gradient(ellipse at 50% 45%, transparent 30%, rgba(12, 10, 18, .7) 100%), linear-gradient(180deg, rgba(12, 10, 18, .55), transparent 30%, transparent 45%, rgba(12, 10, 18, .9)); }
.at-line { text-shadow: 0 2px 16px rgba(0, 0, 0, .7); }

/* ---------- 8. TV viewing distance: nothing below 12px, stronger minimum for labels at >=1600px ---------- */
@media (min-width: 1600px) {
  .pin span, .stn span, .lm .nm, .gtag, .road-tag, .ring-tag { font-size: max(.9rem, 16px); }
  #place .pl-k { font-size: max(.9rem, 15px); }
  .pill small, .poi-strip .pchip small, .strip-note { font-size: max(.86rem, 15px); }
}

/* ---------- 9. dense POI maps ("Everything nearby", >14 pins): dots only, label appears on the selected pin ---------- */
#lv-map.poi-all .pin.poi:not(.on) span { display: none; }
#lv-map.poi-all .pin.poi i { width: 1.1rem; height: 1.1rem; }
#lv-map.poi-all .pin.poi.on { z-index: 5; }

/* site / tower photographs: bright sky behind the title, so a heavier halo instead of a box scrim (a pseudo-element scrim showed a hard edge) */
body:is([data-level=site], [data-level=tower]) #place { text-shadow: 0 1px 2px rgba(0, 0, 0, .9), 0 2px 10px rgba(0, 0, 0, .75); }   /* tight shadows only (see #place above) */
