/* CAMT — tour route maps (tours page only): SVG posters, route explorer dialog, Golden Loop map, MapLibre pins and popups. */

/* ---------- route explorer (shared dialog) ---------- */
html.rx-open { overflow: hidden; }
.route-explorer { width: min(1180px, calc(100vw - 2rem)); height: min(780px, calc(100dvh - 2rem)); max-width: none; max-height: none; margin: auto; padding: 0; border: 0; border-radius: calc(var(--radius) * 2); background: var(--card); color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45); }
.route-explorer::backdrop { background: rgba(12, 16, 13, 0.74); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.route-explorer :focus-visible { outline-color: var(--green); }
.route-explorer .label { color: var(--green); }
.rx-shell { display: grid; grid-template-columns: 1fr 340px; grid-template-rows: auto minmax(0, 1fr); height: 100%; }
.rx-head { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.4rem; border-bottom: 1px solid var(--line); }
.rx-head h2 { font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.3rem); margin-top: 0.2rem; }
.rx-close { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--line); transition: border-color var(--dur); }
.rx-close:hover { border-color: var(--ink); }
.rx-close svg { width: 20px; height: 20px; }
.rx-map { position: relative; min-height: 0; background: var(--paper-2); }
.rx-status { position: absolute; inset: 0; display: grid; place-items: center; padding: 1.5rem; text-align: center; font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.06em; color: var(--muted); }
.rx-side { display: flex; flex-direction: column; gap: 1rem; min-height: 0; overflow: auto; padding: 1.2rem 1.4rem 1.4rem; border-left: 1px solid var(--line); }
.rx-stops { display: grid; gap: 0.15rem; }
.rx-dayhead { margin-top: 0.8rem; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--green); }
.rx-dayhead:first-child { margin-top: 0; }
.rx-stop { display: flex; align-items: center; gap: 0.75rem; width: 100%; padding: 0.55rem 0.6rem; border-radius: var(--radius); text-align: left; font-weight: 600; transition: background var(--dur); }
.rx-stop:hover, .rx-stop[aria-current="true"] { background: var(--paper-2); }
.rx-num { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; font: 700 0.76rem/1 var(--font-mono); }
.rx-landmark .rx-num { background: var(--green); }
.rx-base .rx-num { background: var(--green-bright); color: var(--ink); }
.rx-note { font-size: 0.85rem; color: var(--muted); }
.rx-note:empty { display: none; }
.rx-book { margin-top: auto; justify-content: center; white-space: normal; text-align: center; }

/* ---------- MapLibre pins and popups (explorer + Golden Loop) ---------- */
.rm-pin { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; background: var(--ink); color: #fff; font: 700 0.74rem/1 var(--font-mono); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4); cursor: pointer; }
.rm-pin:empty { width: 14px; height: 14px; }
.rm-landmark { background: var(--green); }
.rm-base { background: var(--green-bright); color: var(--ink); }
.loop-map .rm-town { background: var(--paper); border-color: var(--ink); }
.loop-map .rm-landmark { background: var(--green-bright); border-color: var(--ink); }
.maplibregl-popup-content { padding: 0; overflow: hidden; border-radius: var(--radius); font-family: var(--font-body); color: var(--ink); }
.rm-card img { display: block; width: 100%; height: 130px; object-fit: cover; }
.rm-card-body { display: grid; gap: 0.3rem; padding: 0.8rem 0.9rem 0.9rem; }
.rm-card-body strong { font-size: 1rem; }
.rm-card-body p { margin: 0; font-size: 0.85rem; line-height: 1.45; color: var(--muted); }
.rm-card-body a { font-size: 0.85rem; font-weight: 600; color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.rm-card-day { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--green); }

/* ---------- Golden Loop featured map ---------- */
.loop-map-block { margin-top: clamp(3rem, 2rem + 3vw, 5rem); padding-top: 2.4rem; border-top: 1px solid var(--line-dark); }
.loop-map-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.6rem 1.6rem; }
.loop-map-head h3 { font-size: clamp(1.8rem, 1.3rem + 1.6vw, 2.8rem); }
.loop-map-head p { flex: 1 1 18rem; color: var(--muted-dark); }
.loop-map-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 1.6rem; margin-top: 1.6rem; align-items: start; }
.loop-map { position: sticky; top: 90px; height: min(78vh, 720px); overflow: hidden; border-radius: var(--radius); background: var(--ink-2); }
.loop-map .rx-status { color: var(--muted-dark); }
.loop-phases { display: grid; gap: 1.4rem; max-height: min(78vh, 720px); overflow: auto; padding-right: 0.4rem; }
.lp-name { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--green-bright); }
.loop-days { display: grid; gap: 0.25rem; margin-top: 0.5rem; }
.loop-day { display: grid; grid-template-columns: auto 1fr; gap: 0.1rem 0.8rem; width: 100%; padding: 0.6rem 0.7rem; border: 1px solid transparent; border-radius: var(--radius); text-align: left; color: var(--text-dark); transition: background var(--dur), border-color var(--dur); }
.loop-day:hover { background: var(--ink-3); }
.loop-day[aria-pressed="true"] { border-color: var(--green-bright); background: var(--ink-3); }
.ld-n { grid-row: span 2; min-width: 3.6rem; padding-top: 0.2rem; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-dark); }
.ld-t { font-weight: 600; }
.ld-p { font-size: 0.85rem; color: var(--muted-dark); }
.loop-all { display: inline-flex; width: auto; padding: 0.6rem 1rem; border-color: var(--line-dark); font-weight: 600; }
.loop-all[hidden] { display: none; }

@media (max-width: 1020px) {
 .loop-map-grid { grid-template-columns: 1fr; }
 .loop-map { position: relative; top: 0; height: 62vh; }
 .loop-phases { max-height: none; overflow: visible; }
}
@media (max-width: 760px) {
 .route-explorer { width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; }
 .rx-shell { grid-template-columns: 1fr; grid-template-rows: auto 52dvh minmax(0, 1fr); }
 .rx-head { padding: 0.8rem 1rem; }
 .rx-side { border-left: 0; border-top: 1px solid var(--line); padding: 1rem; }
}
