/* Original city-map geometry sits inside the established ROB RUN controls. */
.map-page{overflow:hidden}
.map-page>.container{width:100%;height:100dvh;display:flex;flex-direction:column}
.map-page .site-header{flex-shrink:0}
.map-page .site-footer{display:none}
.map-screen{position:relative;display:grid;grid-template-columns:320px minmax(0,1fr);min-height:0;flex:1}
.map-sidebar{min-height:0;overflow:auto;padding:23px 22px 30px;background:var(--ground);border-right:1px solid var(--subtle-line);scrollbar-gutter:stable}
.map-rail-title{display:flex;align-items:center;justify-content:space-between;gap:10px}
.map-rail-title h1{font-size:28px;line-height:1.12;margin:0;letter-spacing:-.025em}
.map-intro{margin:8px 0 24px;color:var(--muted);font-size:14px}
.map-close-rail,.map-open-rail{display:none!important}
.map-filters{display:grid;gap:14px}
.map-area-field{margin:0 0 18px;font-size:13px;display:grid;gap:5px}
.map-area-field select{width:100%;min-height:44px;font-size:14px}
.map-area-photo{width:100%;height:auto;display:block;margin:0 0 18px;border-radius:3px}
.map-layout-note{font-size:12px;line-height:1.5;color:var(--muted);margin:-5px 0 20px}
.map-region-list{list-style:none;margin:0;padding:0}
.map-region-list button{display:flex;justify-content:space-between;align-items:center;gap:15px;width:100%;text-align:left;background:none;border:0;border-bottom:1px solid var(--subtle-line);padding:16px 7px;color:var(--ink);font:850 15px/1.4 Nunito,Arial,sans-serif;cursor:pointer;min-height:52px}
.map-region-list button:hover{background:var(--surface-hover);color:var(--yellow)}
.map-region-list svg{width:18px;height:18px;color:var(--yellow);flex-shrink:0}
.map-filters .field{font-size:13px}
.map-filters .field-input{width:100%;min-width:0;font-size:14px;min-height:44px}
.map-filters .check-field{margin-top:3px;font-size:14px}
.map-filters .check-field span{margin-left:auto;font-weight:850;color:var(--yellow)}
.map-reset-filters{justify-self:start;margin-top:-4px;font-size:13px;min-height:28px}
.map-result-count{margin:23px 0 8px;color:var(--yellow);font-size:13px;font-weight:850}
.map-place-list{list-style:none;padding:0;margin:0}
.map-place-list li{border-bottom:1px solid var(--subtle-line)}
.map-place-link{display:flex;align-items:center;gap:12px;padding:14px 6px;text-decoration:none;min-height:70px;border-radius:3px}
.map-place-link>img{width:27px;height:27px;object-fit:contain}
.map-place-link>span{flex:1;min-width:0}
.map-place-link strong{font-size:15px;line-height:1.25;display:block;color:var(--ink)}
.map-place-link small{display:block;font-size:12px;margin-top:4px;color:var(--muted)}
.map-place-link>svg{width:18px;height:18px;color:var(--yellow);flex-shrink:0}
.map-place-link:hover,.map-place-list .is-selected .map-place-link{background:var(--surface-hover)}
.map-place-link:hover strong{color:var(--yellow)}.map-place-list .is-selected strong{color:var(--pink-soft)}
.map-place-list .is-saved .map-place-link>span:after{content:'Saved';font-size:11px;color:var(--yellow);font-weight:850}
.map-source-note{font-size:12px;color:var(--muted);margin:28px 0}
.map-sidebar .page-faq{margin-top:30px}
.map-sidebar .page-faq h2{font-size:21px}
.map-sidebar .page-faq summary{padding:13px 12px;font-size:14px}
.map-sidebar .faq-answer{padding:0 12px 13px;font-size:14px}
.map-empty{padding:14px 0 22px}
.map-empty h2{font-size:20px;margin:0 0 8px}
.map-empty p{font-size:14px;color:var(--muted)}
.map-stage{position:relative;min-width:0;min-height:0;overflow:hidden;background:#61adb5}
.map-viewport{position:absolute;inset:0;overflow:hidden;touch-action:none;cursor:grab;outline-offset:-4px}
.map-viewport.is-dragging{cursor:grabbing;user-select:none}
.map-world{position:absolute;top:0;left:0;width:100%;height:100%;transform-origin:0 0;pointer-events:none}
.map-viewport.is-panning .map-world,.map-viewport.is-moving .map-world{will-change:transform}
.map-basemap{width:100%;height:100%;max-width:none;display:block;user-select:none}
.map-detail-tile{position:absolute;display:block;max-width:none;user-select:none;pointer-events:none;opacity:0;transition:opacity 160ms ease-out}
.map-detail-tile.is-loaded{opacity:1}
@media(prefers-reduced-motion:reduce){.map-detail-tile{transition:none}}
.map-viewport.is-moving .map-world,.map-viewport.is-moving .map-marker,.map-viewport.is-moving .map-cluster,.map-viewport.is-moving .map-districts>span{transition:transform 220ms cubic-bezier(.16,1,.3,1)}
.map-points,.map-districts{position:absolute;inset:0;pointer-events:none}
.map-marker,.map-cluster{position:absolute;left:0;top:0;display:grid;place-items:center;pointer-events:auto;width:44px;height:44px;background:var(--ground);border:2px solid var(--ink);border-radius:50%;padding:8px;text-decoration:none;cursor:pointer;color:var(--ink);box-shadow:0 3px 8px #152a2b40}
.map-marker img{width:25px;height:25px;object-fit:contain;pointer-events:none}
.map-marker:hover,.map-marker:focus-visible{border-color:var(--yellow);background:var(--ground);z-index:6}
.map-marker.is-selected{border:3px solid var(--pink);z-index:5;background:#2a1420}
.map-marker.is-saved:after{content:'';position:absolute;right:-2px;top:-2px;width:10px;height:10px;border:2px solid var(--ground);background:var(--yellow);border-radius:50%}
.map-cluster{background:var(--yellow);color:var(--ground);border-color:var(--ground);font:850 18px/1 Nunito,Arial,sans-serif;z-index:2}
.map-cluster:hover{background:var(--ground);color:var(--yellow);border-color:var(--yellow)}
.map-point-label{position:absolute;top:calc(100% + 4px);left:50%;transform:translateX(-50%);width:max-content;max-width:156px;padding:3px 6px;background:var(--ground);color:var(--ink);border-radius:3px;font-size:12px;font-weight:850;line-height:1.25;text-align:center;visibility:hidden;pointer-events:none}
.map-marker.has-label .map-point-label,.map-marker:hover .map-point-label,.map-marker:focus-visible .map-point-label,.map-marker.is-selected .map-point-label{visibility:visible}
.map-districts>span{position:absolute;left:0;top:0;white-space:nowrap;color:#243230;font-size:16px;font-weight:950;line-height:1.15;letter-spacing:.015em;background:#fff5e7e8;padding:4px 8px;border-radius:3px}
.map-toolbar{position:absolute;top:17px;right:20px;left:20px;display:flex;align-items:center;gap:20px;pointer-events:none;z-index:10}
.map-toolbar>*{pointer-events:auto}
.map-toolbar .button{font-size:20px;min-height:44px}
.map-toolbar .button{min-width:128px;height:44px;justify-content:center}
.map-toolbar .button.secondary:before{background:var(--ground)}
.map-toolbar .button.secondary:hover:before,.map-toolbar .button.secondary[aria-pressed=true]:before{background:var(--yellow);border-color:var(--yellow)}
.map-toolbar .button.secondary[aria-pressed=true]{color:var(--ground)}
.map-toolbar .button.secondary[aria-pressed=true]:hover{color:var(--yellow)}
.map-toolbar .button.secondary[aria-pressed=true]:hover:before{background:var(--ground);border-color:var(--yellow)}
.map-toolbar #map-fit{margin-left:auto}
.map-bottom{position:absolute;left:18px;right:18px;bottom:15px;display:flex;align-items:flex-end;justify-content:space-between;gap:14px;pointer-events:none;z-index:8}
.map-bottom p{margin:0;padding:7px 10px;background:var(--ground);color:var(--ink);font-size:12px;max-width:390px;border-radius:3px}
.map-zoom{display:flex;align-items:center;background:var(--ground);border-radius:5px;padding:3px;pointer-events:auto;flex-shrink:0}
.map-zoom button{display:grid;place-items:center;min-width:44px;height:44px;color:var(--yellow);background:none;border:0;cursor:pointer;font-size:27px}
.map-zoom button:hover{background:var(--yellow);color:var(--ground);border-radius:3px}
.map-zoom button:disabled{opacity:.4;cursor:default}
.map-zoom output{min-width:56px;text-align:center;font-size:13px;font-variant-numeric:tabular-nums}
.map-detail{position:absolute;z-index:11;left:18px;bottom:80px;width:350px;max-width:calc(100% - 36px);max-height:min(calc(100% - 160px),var(--map-card-visible-height,9999px));overflow:auto;padding:18px 19px;background:var(--ground);color:var(--ink);border:1px solid var(--yellow);border-radius:5px}
.map-detail-heading{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}
.map-detail-heading{cursor:grab;touch-action:none;user-select:none;border-radius:3px}
.map-detail-heading:focus-visible{outline:2px solid var(--yellow);outline-offset:5px}
.map-detail.is-dragging-card .map-detail-heading{cursor:grabbing}
.map-detail.is-right{left:auto;right:18px}
.map-detail-heading h2{font-size:23px;line-height:1.2;margin:0 0 5px}
.map-detail-heading p{font-size:12px;color:var(--muted);margin:0 0 12px}
.map-icon-button,.map-close-rail{width:44px;min-width:44px;height:44px;padding:10px;background:none;border:1px solid var(--yellow);border-radius:4px;color:var(--yellow);cursor:pointer}
.map-icon-button:hover,.map-close-rail:hover{background:var(--yellow);color:var(--ground)}
.map-icon-button svg,.map-close-rail svg{width:20px;height:20px}
.map-detail>p{font-size:14px;line-height:1.5;color:var(--muted);margin:0 0 14px}
.map-detail h3{font-size:16px;margin:17px 0 8px}
.map-detail ul{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:1fr 1fr;gap:5px 12px}
.map-detail li a{display:flex;align-items:center;gap:7px;font-size:12px;line-height:1.25;color:var(--ink);min-height:42px;text-decoration:none}
.map-detail li a:hover{color:var(--yellow);text-decoration:underline}
.map-detail li img{width:31px;height:31px;object-fit:contain;filter:brightness(1.2)}
.map-detail .map-loot-note{font-size:11px;line-height:1.4;color:var(--muted);margin:12px 0 0}
.map-detail-actions{display:flex;flex-wrap:wrap;gap:13px 15px;align-items:center;margin-top:19px}
.map-detail-actions .button{font-size:18px;padding:9px 15px;min-height:40px}
.map-detail-actions .planner-text-button{font-size:13px;min-height:40px}
.map-detail .map-detail-status{color:var(--yellow);font-size:12px;margin:12px 0 0}
.map-detail-status:empty{display:none}
.map-rail-footer{position:absolute;left:0;bottom:0;width:320px;height:70px;padding:12px 22px;background:var(--ground);z-index:24;border-top:1px solid var(--subtle-line)}
.map-screen.has-rail-top .map-sidebar{height:calc(100% - 70px)}
.map-rail-footer .back-to-top.is-planner-rail{position:static;margin:0;min-height:44px}
.map-load-error{position:absolute;z-index:12;top:85px;left:20px;max-width:42ch;padding:15px 18px;border:1px solid var(--danger);background:var(--ground);color:var(--danger);font-size:14px}
@media(max-width:1100px){.map-screen{grid-template-columns:290px minmax(0,1fr)}.map-sidebar{padding-inline:18px}.map-rail-footer{width:290px}.map-rail-title h1{font-size:26px}.map-detail{width:320px}.map-bottom p{max-width:250px}}
@media(max-width:850px){.map-screen{display:block}.map-stage{height:100%}.map-sidebar{position:absolute;left:0;top:0;bottom:0;width:min(340px,calc(100% - 30px));z-index:23;transform:translateX(-101%);visibility:hidden;transition:transform 180ms ease-out,visibility 180ms}.map-sidebar.is-open{transform:none;visibility:visible}.map-close-rail{display:grid!important;place-items:center}.map-open-rail{display:inline-flex!important}.map-toolbar{left:13px;right:13px;gap:14px;top:14px}.map-toolbar .button{font-size:18px;padding:9px 19px;min-width:110px}.map-toolbar #map-fit{margin-left:0}.map-bottom p{max-width:200px;font-size:11px}.map-districts>span{font-size:14px}.map-detail{left:12px;bottom:74px;max-width:calc(100% - 24px);max-height:46%;width:340px}.map-detail.is-right{left:12px;right:auto}.map-sidebar:not(.is-open)~.map-rail-footer{display:none}.map-rail-footer{width:min(340px,calc(100% - 30px));z-index:25}}
@media(max-width:450px){.map-toolbar{flex-wrap:wrap;gap:10px}.map-toolbar .button{font-size:18px;padding:8px 15px;min-width:100px}.map-bottom{left:12px;right:12px;bottom:12px}.map-bottom p{max-width:175px;font-size:10px}.map-zoom output{min-width:47px}.map-zoom button{min-width:40px}.map-detail,.map-detail.is-right{width:auto;right:12px;left:12px}.map-detail-heading h2{font-size:22px}.map-districts>span{font-size:12px;padding:3px 5px}}
@media(prefers-reduced-motion:reduce){.map-sidebar,.map-viewport.is-moving .map-world,.map-viewport.is-moving .map-marker,.map-viewport.is-moving .map-cluster,.map-viewport.is-moving .map-districts>span{transition:none}}
.map-toolbar{gap:10px}
@media(max-width:850px){.map-toolbar{gap:8px}}
.map-region-overlay{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
/* World map cells follow the game's Sector, Location and selection materials:
   cream cell lines (#ffeece, 0.05 world units), gold HQ and selection outlines
   (#ffb931, 0.1 world units) and translucent white roads (alpha 0.545). */
.world-road{stroke:#faf9f2;stroke-opacity:.55;stroke-width:2;stroke-linecap:round;fill:none;pointer-events:none;vector-effect:non-scaling-stroke}
.world-region-fill{fill:#000;fill-opacity:0;cursor:pointer;stroke:none;pointer-events:auto}
.world-region-outline{fill:none;stroke:none;stroke-width:2;pointer-events:none;vector-effect:non-scaling-stroke}
[data-world-region]:hover .world-region-outline{stroke:#ffeece;stroke-opacity:.9}
[data-world-region].is-selected .world-region-outline{stroke:#ffeece;stroke-opacity:1;stroke-width:2.5}
.world-hex{pointer-events:none}
.world-hex path{fill:#dcb46e;fill-opacity:.62;stroke:#ffeece;stroke-opacity:.85;stroke-width:.6;stroke-linejoin:round;outline:none;transition:fill-opacity 140ms ease-out}
.world-hex.is-active path[data-map-place]{pointer-events:auto;cursor:pointer}
.world-hex.is-outside{opacity:.72}
.world-hex.is-muted{opacity:.3}
.world-hex text{visibility:hidden;font:800 4.8px/1 Nunito,Arial,sans-serif;fill:#fff1d6;fill-opacity:.95;paint-order:stroke;stroke:#5a3f17;stroke-opacity:.45;stroke-width:.55px;text-anchor:middle;dominant-baseline:central;pointer-events:none;font-variant-numeric:tabular-nums}
.show-hex-labels .world-hex text{visibility:visible}
.world-hex image{pointer-events:none}
.world-hex-headquarters .world-hex-outline{fill:none;stroke:#f7efbd;stroke-width:2.05;stroke-linejoin:round;pointer-events:none}
.world-hex:hover path[data-map-place],.world-hex path[data-map-place]:focus-visible{fill:#efcd8f;fill-opacity:.92;stroke:#fff6e6;stroke-opacity:1;stroke-width:1.2}
.world-hex.is-selected path[data-map-place]{fill:#efcd8f;fill-opacity:.92}
.world-hex-marks{pointer-events:none}
.world-hex-mark{fill:none;stroke-linejoin:round;stroke-linecap:round;pointer-events:none}
.world-hex-mark.is-saved{stroke:var(--yellow);stroke-width:1.2}
.world-hex-mark.is-selected{stroke:var(--pink);stroke-width:1.5}
.world-hex-mark.is-outside{opacity:.72}
.world-hex-mark.is-muted{opacity:.3}
@media(prefers-reduced-motion:reduce){.world-hex path{transition:none}}
/* Zoomed-out overview, after the game's whole-map view: each district is one sand area with a soft cream edge,
   special sites become darker badges with larger icons, and plot cells stay hidden until a district opens. */
.map-region-overlay:not(.show-cells) .world-region-fill{fill:#dcb46e;fill-opacity:.62}
.map-region-overlay:not(.show-cells) .world-region-outline{stroke:#ffeece;stroke-opacity:.55}
.map-region-overlay:not(.show-cells) [data-world-region]:hover .world-region-fill{fill:#efcd8f;fill-opacity:.78}
.map-region-overlay:not(.show-cells) [data-world-region]:hover .world-region-outline{stroke:#fffaf0;stroke-opacity:1;stroke-width:2.5}
.map-region-overlay:not(.show-cells) .world-hex-plot,.map-region-overlay:not(.show-cells) .world-hex-headquarters path{display:none}
.map-region-overlay:not(.show-cells) .world-hex-site path{fill:#7d5f33;fill-opacity:.5;stroke:#ffeece;stroke-opacity:.35}
.map-region-overlay:not(.show-cells) .world-hex image{transform-box:fill-box;transform-origin:center;transform:scale(1.35)}
.world-place-label{position:absolute;left:0;top:0;display:block;padding:5px 9px;max-width:140px;text-align:center;white-space:nowrap;font:800 17px/1.1 BarlowAction,Nunito,sans-serif;text-transform:uppercase;text-decoration:none;color:var(--ink);background:var(--ground);border:1px solid transparent;border-radius:3px;pointer-events:auto}
.world-place-label:hover,.world-place-label:focus-visible{background:var(--yellow);color:var(--ground);outline:0;border-color:var(--ground)}
.world-place-label.is-selected{border-color:var(--pink);color:var(--pink-soft)}
.world-place-label.is-saved{box-shadow:inset 0 -3px 0 var(--yellow)}
.world-place-label.is-destination{color:var(--yellow)}
/* Outranks the site-wide a:not(.button):hover lime text, which would vanish on the lime hover fill. */
.map-points .world-place-label:hover,.map-points .world-place-label:focus-visible{color:var(--ground)}
/* Destinations carry the game's own diamond art (RealmLocationIcon) with the name tag beneath it. */
.world-place-label.is-destination{display:flex;flex-direction:column;align-items:center;gap:1px;max-width:none;padding:0;background:none;border:0;box-shadow:none}
.world-place-art{display:block;width:58px;height:58px;filter:drop-shadow(0 2px 3px rgb(0 0 0/.35));pointer-events:none}
.world-place-label.is-destination span{padding:4px 8px;background:var(--ground);border:1px solid transparent;border-radius:3px;color:var(--yellow)}
.world-place-label.is-destination:hover,.world-place-label.is-destination:focus-visible{background:none;border:0}
.world-place-label.is-destination:hover span,.world-place-label.is-destination:focus-visible span{background:var(--yellow);color:var(--ground);border-color:var(--ground)}
.world-place-label.is-destination.is-selected span{border-color:var(--pink)}
.world-place-label.is-destination.is-saved span{box-shadow:inset 0 -3px 0 var(--yellow)}
@media(max-width:850px){.world-place-art{width:44px;height:44px}.world-place-label.is-destination span{padding:3px 6px}}
.world-map-screen .map-basemap{pointer-events:none}
.map-viewport.is-moving .world-place-label{transition:transform 220ms cubic-bezier(.16,1,.3,1)}
@media(max-width:850px){.world-place-label{font-size:14px;padding:4px 6px}}
@media(prefers-reduced-motion:reduce){.map-viewport.is-moving .world-place-label{transition:none}}
@media(max-width:850px){.map-detail{max-height:min(46%,var(--map-card-visible-height,9999px))}}
