/* RadioDusk interactive map.
   Brand (locked): black, paper, pink; Manrope. Polished with the design-taste-frontend rules: calm panel, one accent,
   one radius system (panels 16px, rows and inputs 12px, controls and chips full round), motion only for state changes. */
@font-face { font-family: "Manrope"; src: url("/assets/fonts/Manrope.ttf") format("truetype"); font-weight: 200 800; font-display: swap; }
:root {
  --black: #000; --paper: #F4EFE8; --pink: #F2448F; --sea: #2f90b0;
  --grey: rgba(244,239,232,.66); --faint: rgba(244,239,232,.44); --line: rgba(244,239,232,.09); --line-2: rgba(244,239,232,.18);
  --s1: #0d0b10; --s2: #16131a; --s3: #201c25;
  --sans: "Manrope", system-ui, -apple-system, sans-serif; --ease: cubic-bezier(.16,1,.3,1);
  /* frosted glass for everything that floats over the map */
  --glass: rgba(16,13,20,.58); --glass-edge: rgba(244,239,232,.16); --glass-blur: blur(18px) saturate(170%);
  --glass-hi: inset 0 1px 0 rgba(255,255,255,.08);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--black); color: var(--paper); font: 500 14.5px/1.45 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--paper); text-decoration-color: var(--pink); text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.i { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; color: var(--paper); }


/* ---------- stage, controls, credit ---------- */
.stage { position: relative; min-width: 0; }
#map { position: absolute; inset: 0; background: var(--sea); }
.leaflet-container { font-family: var(--sans); background: var(--sea); outline: none; }
.leaflet-container:focus-visible { outline: 2px solid var(--pink); outline-offset: -2px; }
.ctrls { position: absolute; top: 14px; right: 14px; z-index: 600; display: grid; gap: 1px; background: var(--glass); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-edge); border-radius: 999px; padding: 4px; box-shadow: var(--glass-hi), 0 8px 24px rgba(8,20,32,.22); }
.ctrls button { appearance: none; width: 38px; height: 38px; border-radius: 50%; border: 0; background: transparent; display: grid; place-items: center; cursor: pointer; transition: background .15s, transform .15s var(--ease); }
.ctrls button:hover { background: rgba(244,239,232,.12); }
.ctrls button:active { transform: scale(.92); }
.ctrls button .i { width: 18px; height: 18px; }
.credit-pill { position: absolute; right: 14px; bottom: 14px; z-index: 600; display: inline-flex; align-items: center; gap: 2px; font-size: 11.5px; font-weight: 600; background: var(--glass); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-edge); border-radius: 999px; padding: 3px 11px 3px 3px; box-shadow: var(--glass-hi); }
.credit-pill a { color: var(--paper); text-decoration: none; }
.credit-pill .sep { color: var(--faint); margin: 0 5px 0 -2px; }
.credit-pill a:hover { text-decoration: underline; text-decoration-color: var(--pink); }
.credit-pill .info-btn { appearance: none; width: 22px; height: 22px; border: 0; border-radius: 50%; background: transparent; display: grid; place-items: center; cursor: pointer; }
.credit-pill .info-btn:hover, .credit-pill .info-btn[aria-expanded="true"] { background: rgba(244,239,232,.14); }
.credit-pill .info-btn .i { width: 14px; height: 14px; }
.about { position: absolute; right: 14px; bottom: 48px; z-index: 650; width: min(340px, calc(100% - 28px)); background: rgba(16,13,20,.72); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-edge); border-radius: 16px; padding: 16px 16px 12px; box-shadow: var(--glass-hi), 0 20px 50px rgba(8,20,32,.3); font-size: 13px; animation: rise .25s var(--ease); }
.about h2 { margin: 0 0 8px; font-size: 15px; letter-spacing: -0.01em; }
.about p { margin: 0 0 8px; color: rgba(244,239,232,.86); }
.about .small { color: var(--faint); font-size: 12px; }
.full-link { position: absolute; top: 14px; left: 14px; z-index: 600; display: inline-flex; gap: 7px; align-items: center; font-weight: 700; font-size: 14px; color: var(--paper); background: var(--glass); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-edge); border-radius: 999px; padding: 9px 15px; text-decoration: none; box-shadow: var(--glass-hi), 0 8px 24px rgba(8,20,32,.22); }
.full-link[hidden] { display: none; }

/* ---------- card ---------- */
.card { position: absolute; left: 14px; bottom: 14px; z-index: 600; width: min(360px, calc(100% - 28px)); max-height: calc(100% - 24px); overflow-y: auto; scrollbar-width: none; background: rgba(16,13,20,.68); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-edge); border-radius: 16px; padding: 16px 16px 14px; box-shadow: var(--glass-hi), 0 20px 50px rgba(8,20,32,.3); animation: rise .3s var(--ease); }
.card .kind { display: flex; gap: 7px; align-items: center; font-size: 12px; font-weight: 700; color: var(--grey); margin: 0 0 4px; }
.card .kind .i { width: 15px; height: 15px; color: var(--grey); }
.card h2 { margin: 0 0 6px; font-size: 19px; letter-spacing: -0.02em; line-height: 1.25; padding-right: 30px; }
.card p { margin: 0 0 8px; font-size: 14px; color: rgba(244,239,232,.86); }
.card .area { color: var(--grey); font-size: 13px; display: flex; gap: 5px; align-items: center; }
.card .x { position: absolute; z-index: 3; top: 10px; right: 10px; appearance: none; background: rgba(244,239,232,.1); border: 0; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; }
.card .x .i { width: 14px; height: 14px; }
.card .actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.card .act { appearance: none; display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--line-2); background: transparent; border-radius: 999px; padding: 7px 12px; font-size: 13px; font-weight: 700; cursor: pointer; text-decoration: none; color: var(--paper); transition: background .15s, transform .15s var(--ease); }
.card .act:hover { background: rgba(244,239,232,.1); }
.card .act:active { transform: scale(.97); }
.card .act.primary { background: var(--pink); border-color: var(--pink); color: #000; }
.card .act.primary .i { color: #000; }
.card .act.done { background: var(--paper); border-color: var(--paper); color: #000; }
.card .act .i.c { width: 13px; height: 13px; color: currentColor; }
.card .report { display: inline-block; margin-top: 10px; font-size: 12.5px; font-weight: 600; color: var(--faint); text-decoration: none; }
.card .report:hover { color: var(--paper); text-decoration: underline; text-decoration-color: var(--pink); }
/* card opened next to its place, with a pointer */
.card.anchored { bottom: auto; transform-origin: var(--ax) 100%; }
.card.anchored.below { transform-origin: var(--ax) 0; }
.card .fav-btn { position: absolute; z-index: 3; top: 10px; right: 46px; appearance: none; background: rgba(244,239,232,.1); border: 0; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; transition: background .15s, transform .15s var(--ease); }
.card .fav-btn:hover { background: rgba(244,239,232,.18); }
.card .fav-btn:active { transform: scale(.9); }
.card .fav-btn .i { width: 15px; height: 15px; }
.card .fav-btn[aria-pressed="true"] .i { color: var(--pink); }
.card h2 { padding-right: 70px; }
/* images: full-bleed at the top of the card, one at a time */
.card .media { position: relative; margin: -16px -16px 0; aspect-ratio: 16 / 9; border-radius: 15px 15px 0 0; overflow: hidden; background: rgba(0,0,0,.35); touch-action: pan-y; outline: none; }
.card .media .slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity .25s var(--ease); }
.card .media .slide.on { opacity: 1; }
.card .media img { width: 100%; height: 100%; object-fit: cover; display: block; user-select: none; -webkit-user-drag: none; }
.card .media .tag { position: absolute; left: 10px; top: 10px; font-size: 11.5px; font-weight: 700; color: var(--paper); background: var(--glass); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-edge); border-radius: 999px; padding: 3px 9px; }
.card .mnav { position: absolute; right: 8px; bottom: 8px; display: flex; align-items: center; gap: 2px; background: var(--glass); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-edge); border-radius: 999px; padding: 2px; }
.card .mnav button { appearance: none; width: 26px; height: 26px; border: 0; border-radius: 50%; background: transparent; display: grid; place-items: center; cursor: pointer; }
.card .mnav button:hover { background: rgba(244,239,232,.16); }
.card .mnav .i { width: 14px; height: 14px; }
.card .mcount { font-size: 11.5px; font-weight: 700; color: var(--paper); padding: 0 4px 0 8px; font-variant-numeric: tabular-nums; }
/* image credit: a quiet watermark at the bottom left, level with the arrows; no box, takes no card space */
.card .mcredit { position: absolute; left: 12px; bottom: 8px; right: 110px; height: 32px; display: flex; align-items: center; font-size: 10.5px; font-weight: 600; color: rgba(255,255,255,.62); text-shadow: 0 1px 2px rgba(0,0,0,.7), 0 0 8px rgba(0,0,0,.35); pointer-events: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .media:not(:has(.mnav)) .mcredit { right: 12px; }
.card .media + .fav-btn + .kind, .card .media ~ .kind { margin-top: 14px; }
.card:has(.media) .x, .card:has(.media) .fav-btn { background: var(--glass); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-edge); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* category markers: one colour, the in-game blip idea (a badge with the symbol) */
.mk { position: relative; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); border: 2px solid #0b0f1a; box-shadow: 0 3px 8px rgba(8,20,32,.3); transition: transform .15s var(--ease), opacity .2s; }
.mk .i { width: 16px; height: 16px; color: #0b0f1a; }
.leaflet-marker-icon:hover .mk { transform: scale(1.12); }
/* favourite: pink star on the top right; found: faded with a check at the bottom right; selected: pink ring */
.mk .fs, .mk .fd { position: absolute; display: none; }
.mk .fs { top: -7px; right: -7px; width: 15px; height: 15px; color: var(--pink); filter: drop-shadow(0 0 1px #0b0f1a) drop-shadow(0 0 1px #0b0f1a); }
.mk .fd { bottom: -5px; right: -5px; width: 13px; height: 13px; color: #1fae5b; background: #F4EFE8; border-radius: 50%; }
.mk.fav .fs, .mk.found .fd { display: block; }
.mk.found { opacity: .5; }
.mk.found.fav, .mk.found.sel { opacity: 1; }
.mk.sel { transform: scale(1.18); border-color: #0b0f1a; box-shadow: 0 0 0 3px var(--pink), 0 0 0 9px rgba(242,68,143,.28), 0 4px 12px rgba(8,20,32,.3); z-index: 2; }
.leaflet-marker-icon:has(.mk.sel) { z-index: 9999 !important; }

/* clusters: frosted circles with a count */
.cl { width: var(--s); height: var(--s); border-radius: 50%; display: grid; place-items: center; font: 700 13px var(--sans); color: var(--paper); background: rgba(20,17,26,.82); border: 1.5px solid rgba(244,239,232,.55); box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 3px 10px rgba(8,20,32,.3); font-variant-numeric: tabular-nums; transition: transform .15s var(--ease); }
.leaflet-marker-icon:hover .cl { transform: scale(1.08); }

/* place names: fixed screen size, game-map style (dark text with a light halo) */
.plabel { position: absolute; transform: translate(-50%, -50%); white-space: nowrap; font: 700 13px var(--sans); letter-spacing: -0.01em; color: #2c3442; text-shadow: 0 0 2px #eef0f4, 0 0 2px #eef0f4, 0 0 4px #eef0f4, 0 0 6px rgba(238,240,244,.9); pointer-events: none; user-select: none; }
.plabel.t2 { font-size: 11.5px; font-weight: 600; color: #3b4555; display: none; }
#map[data-zoom="near"] .plabel.t2 { display: block; }
#map[data-zoom="near"] .plabel.t1 { font-size: 12px; opacity: .75; }
#map[data-zoom="far"] .plabel.t1 { font-size: 11.5px; }

/* guide pins */
.gpin { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 700 12px var(--sans); color: #000; background: var(--paper); border: 2.5px solid #0b0f1a; box-shadow: 0 3px 10px rgba(8,20,32,.35); transition: transform .2s var(--ease); }
.gpin.star { background: var(--pink); }
.gpin.approx { border-style: dashed; }
.gpin.sel { transform: scale(1.18); box-shadow: 0 0 0 3px var(--pink), 0 0 0 9px rgba(242,68,143,.28); }
.leaflet-tooltip.lbl { background: rgba(16,13,20,.88); color: var(--paper); border: 1px solid var(--glass-edge); border-radius: 999px; font: 600 12px var(--sans); padding: 4px 10px; box-shadow: 0 6px 16px rgba(8,20,32,.3); }
.leaflet-tooltip.lbl::before { display: none; }

/* embedded in an article */
.embed .app { grid-template-columns: 1fr; height: 100vh; }
.embed .panel { display: none; }
.embed .card { bottom: 50px; }

/* ---------- phones: the panel becomes a bottom sheet ---------- */
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .panel { position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; height: 82dvh; border-right: 0; border-top: 1px solid var(--glass-edge); background: rgba(13,11,16,.8); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); border-radius: 18px 18px 0 0; transform: translateY(calc(100% - 128px)); transition: transform .35s var(--ease); box-shadow: 0 -12px 40px rgba(8,20,32,.4); }
  .panel.open { transform: none; }
  .grab { display: block; appearance: none; background: none; border: 0; padding: 10px 0 2px; cursor: pointer; }
  .grab::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 999px; background: var(--line-2); margin: 0 auto; }
  .panel-head { padding: 6px 18px 10px; }
  .search kbd { display: none; }
  .ctrls { top: 12px; right: 12px; }
  .credit-pill { right: auto; left: 12px; top: 12px; bottom: auto; font-size: 11px; }
  .card { left: 10px; right: 10px; width: auto; bottom: 140px; }
  .about { left: 10px; right: 10px; width: auto; top: 50px; bottom: auto; }
  .embed .card { bottom: 50px; }
  .embed .credit-pill { top: auto; bottom: 10px; left: 10px; }
}
@media (prefers-reduced-transparency: reduce) { .ctrls, .credit-pill, .about, .card, .cl, .full-link, .results, .leaflet-tooltip.lbl, .panel { background: #120f15 !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
/* hide hairline seams between map tiles at fractional zoom */
.leaflet-container img.leaflet-tile { mix-blend-mode: normal; }
.tiles-256 img.leaflet-tile { width: 256.6px !important; height: 256.6px !important; }
.tiles-128 img.leaflet-tile { width: 128.6px !important; height: 128.6px !important; }
.embed .panel-open { display: none !important; }

/* zoom performance: promote panes, no transitions on marker wrappers while the map moves */
.leaflet-map-pane, .leaflet-tile-pane, .leaflet-marker-pane { will-change: transform; }
.leaflet-zoom-anim .mk, .leaflet-zoom-anim .cl { transition: none; }
.leaflet-tooltip.pin-name { font-weight: 700; padding: 3px 9px; }
