/* Canonical map presentation. Literal paints belong here, never in trip records. */
.route-svg{min-height:0}
:root,svg{--map-route-color:#b66042;--map-stop-color:#315b4b;--map-area-fill:#f3f0e7;--map-district-alternate-fill:#e8d9b9;--map-visited-fill:#dfe7de;--map-visited-country-fill:#e8eee5;--map-area-border:#aebbb0;--map-leader-color:#71877b;--map-label-color:#9f4d32;--map-label-halo:#f4f1e8;--map-furniture-color:#65776e;--map-stop-outline:#fffdf8;--map-water-fill:#E5F0ED;--map-country-label-color:#536b60;--map-water-label-color:#4c6c70}
.map-route{fill:none;stroke:var(--map-route-color);stroke-linecap:round;stroke-linejoin:round}
.map-route--flight{stroke-dasharray:2 6}
.map-route-halo{fill:none;stroke:var(--map-stop-outline)}
.map-route-arrow{fill:var(--map-route-color);stroke:none}
.map-stop{fill:var(--map-stop-color);stroke:var(--map-stop-outline)}
.map-area{fill:var(--map-area-fill)}
.map-area--visited{fill:var(--map-visited-fill)}
/* Main-map national context is unvisited cream; selected admin1 areas use visited green.
   The lighter visited-country green is reserved for locator insets. */
.map-area--context{fill:var(--map-area-fill)}
.map-area--overlay{stroke:none;fill-rule:evenodd}
.map-area-outline{fill:none;stroke:var(--map-area-border)}
/* Identical unmasked fill/outline geometry is drawn once. */
.map-area--bordered{stroke:var(--map-area-border)}
.map-leader{fill:none;stroke:var(--map-leader-color)}
.map-place-label{font-family:var(--tyit-font-structural);font-size:var(--map-place-label-size,14px);font-weight:700;fill:var(--map-label-color);paint-order:stroke;stroke:var(--map-label-halo);stroke-width:3px;stroke-linejoin:round}

.map-furniture{fill:none;stroke:var(--map-furniture-color);stroke-width:1.5;vector-effect:non-scaling-stroke}
.map-furniture path{vector-effect:non-scaling-stroke}
.map-furniture text{fill:var(--muted);stroke:none;font:600 var(--map-furniture-font)/1 var(--tyit-font-structural)}

/* Screen labels scale without changing SVG coordinates or route geometry. */
.route-map .map-place-label{font-size:var(--map-screen-label-size,var(--map-place-label-size,14px))}

/* Q04 canonical geographic hierarchy. Countries and geopolitical entities
   are tracked uppercase; visited states/provinces use quiet Title Case.
   Route names always remain strongest, in the canonical terracotta. */
.map-geography-label{font-family:var(--tyit-font-structural);fill:var(--map-country-label-color);font-weight:600;paint-order:stroke;stroke:var(--map-label-halo);stroke-width:3px;stroke-linejoin:round;dominant-baseline:middle;pointer-events:none}
.map-country-label{font-size:17px;font-weight:650;letter-spacing:.13em;fill:var(--map-country-label-color)}
.map-province-label{font-size:13px;letter-spacing:.018em;fill:var(--map-country-label-color);font-weight:600}
/* Q12: geographic focus is legible without overpowering terracotta stops. */
.map-focal-label{font-size:18px;letter-spacing:.085em;fill:var(--map-country-label-color);font-weight:700}
.route-map svg[data-focal-geography="true"] .map-country-label{font-size:13px;font-weight:600;fill:var(--map-country-label-color)}
.map-geography-leader{fill:none;stroke:#83968a;stroke-width:1.1;stroke-dasharray:2 3;pointer-events:none}
@container journey-map (max-width:446px){
.map-place-label{font-size:calc(var(--map-place-label-size,14px)*1.35)}
.map-country-label{font-size:19px}.map-province-label{font-size:16px}.map-focal-label{font-size:18px}
}


/* The shared responsive type scale owns screen typography. The calibration
   supplies only the inverse SVG transform; each nested SVG resolves its own. */
.route-map svg[data-screen-space-ready="true"]{
 --map-screen-place:calc(var(--tyit-type-journey-selector) * var(--map-screen-unit));
 --map-screen-active:var(--map-screen-place);
 --map-screen-country:var(--map-screen-place);
 --map-screen-region:var(--map-screen-place);
 --map-screen-furniture:calc(var(--tyit-type-small) * var(--map-screen-unit));
 --map-screen-day:var(--map-screen-furniture);
}
.route-map svg.map-locator[data-screen-space-ready="true"],
[data-journey-profile="route-spine"] .route-map svg[data-screen-space-ready="true"]:not([data-generated-standout-map="true"]){
 --map-screen-country:var(--map-screen-furniture);
 --map-screen-region:var(--map-screen-furniture);
}
.route-map[data-map-presentation="viewport"] svg[data-screen-space-ready="true"]{
 --map-screen-place:calc(var(--tyit-type-subheading) * var(--map-screen-unit));
}
.route-map svg[data-screen-space-ready="true"] :is(.map-place-label,.map-graphic-label){font-size:var(--map-screen-place);stroke-width:var(--map-screen-halo)}
.route-map svg[data-screen-space-ready="true"] .map-place-label.route-spine-map-active-label{font-size:var(--map-screen-active)}
.route-map svg[data-screen-space-ready="true"] .map-country-label{font-size:var(--map-screen-country);letter-spacing:.11em;stroke-width:var(--map-screen-halo)}
.route-map svg[data-screen-space-ready="true"] .map-focal-label{font-size:var(--map-screen-country);stroke-width:var(--map-screen-halo)}
.route-map svg[data-screen-space-ready="true"][data-focal-geography="true"] .map-country-label{font-size:var(--map-screen-region)}
.route-map svg[data-screen-space-ready="true"] .map-province-label,
.route-map svg[data-screen-space-ready="true"] .map-travel-area-label{font-size:var(--map-screen-region);stroke-width:var(--map-screen-halo)}
.route-map svg[data-screen-space-ready="true"] :is(.map-furniture text,.map-graphic-furniture,.map-water-label){font-size:var(--map-screen-furniture)}
.route-map svg[data-screen-space-ready="true"] :is(.map-route,.map-graphic-route){stroke-width:var(--map-route-width,2px);vector-effect:non-scaling-stroke}
/* Viewport presentation follows the shared editorial hierarchy; bounded stays unchanged. */
.route-map[data-map-presentation="viewport"] svg[data-screen-space-ready="true"] .map-place-label{font-family:var(--tyit-font-editorial);font-weight:var(--tyit-weight-editorial,500)}
/* Route locations share the base route paint; the existing active state uses the journey theme. */
.route-map[data-map-presentation="viewport"] svg .map-place-label{fill:var(--map-stop-color)}
.route-map[data-map-presentation="viewport"] svg .map-place-label.route-spine-map-active-label{fill:var(--map-route-color)}
/* The active stop uses the same theme as its label and active route; no green centre or contrasting ring. */
.route-map[data-map-presentation="viewport"] svg .map-stop.route-spine-map-active{fill:var(--map-route-color);stroke:var(--map-route-color)}
/* The existing text halo knocks the route out beneath each glyph, not a box. */
.route-map[data-map-presentation="viewport"] svg[data-screen-space-ready="true"] .map-place-label{stroke:var(--map-label-halo);stroke-width:calc(var(--map-screen-halo) * 2.3);stroke-linejoin:round;paint-order:stroke}
.route-map svg[data-screen-space-ready="true"] .map-leader,
.route-map svg[data-screen-space-ready="true"] .map-geography-leader{stroke-width:1px;vector-effect:non-scaling-stroke}
.route-map svg[data-screen-space-ready="true"] .map-area-outline,
.route-map svg[data-screen-space-ready="true"] .map-area--bordered{stroke-width:1px;vector-effect:non-scaling-stroke}
.route-map svg[data-screen-space-ready="true"] :is(circle.map-stop,circle.map-graphic-stop){stroke-width:var(--map-stop-outline-width,2px);vector-effect:non-scaling-stroke}
.route-map svg[data-screen-space-ready="true"] .map-furniture path{vector-effect:non-scaling-stroke}
/* Regional names label *travel areas*, not administrative units. */
.map-travel-area-label{font-style:italic;fill:var(--map-country-label-color);font-weight:600}

/* Shared geographic context and bilingual province hierarchy. */
.map-water{fill:var(--map-water-fill)}
.map-water[data-inland-water="true"]{stroke:var(--map-area-border);stroke-width:1;vector-effect:non-scaling-stroke;stroke-linejoin:round}
.map-water-label{font-size:17px;font-style:italic;letter-spacing:.06em;fill:var(--map-water-label-color)}
.map-province-label tspan{font-family:var(--tyit-font-structural),"Map Chinese","Noto Sans SC","Noto Sans CJK SC","PingFang SC","Microsoft YaHei",sans-serif}

.map-geography-label tspan:nth-child(2){font-family:"Map Chinese","Noto Sans SC","PingFang SC","Microsoft YaHei",sans-serif}

.map-native-label{font-family:"Map Chinese","Noto Sans SC","PingFang SC","Microsoft YaHei",sans-serif;font-size:.9em;font-weight:600}

/* Optional shared locator, separate from the main map pan transform. */
.map-locator-background{stroke:var(--map-area-border);stroke-width:1}
.map-locator-background--land{fill:var(--map-area-fill)}
.map-locator-water{fill:var(--map-water-fill);stroke:var(--map-area-border);stroke-width:1}
.map-locator-background--water{fill:var(--map-water-fill)}
.map-locator-land{fill:var(--map-area-fill);stroke:var(--map-area-border);stroke-width:1;vector-effect:non-scaling-stroke}
.map-locator-country-context,.map-locator-country-visited{fill:var(--map-visited-country-fill);stroke:var(--map-area-border);stroke-width:1;vector-effect:non-scaling-stroke}
.map-locator-state{fill:none;stroke:none}
.map-locator-title{font-family:var(--tyit-font-structural);font-weight:650;fill:var(--map-country-label-color)}
.route-map svg.map-locator[data-screen-space-ready="true"] .map-locator-title{font-size:var(--map-screen-country)}
.map-locator-label{font-family:var(--tyit-font-structural);font-weight:600;fill:var(--map-country-label-color)}
.route-map svg.map-locator[data-screen-space-ready="true"] .map-locator-label{font-size:var(--map-screen-region)}
.map-locator-label[data-locator-priority="primary"]{font-weight:650;fill:var(--map-country-label-color)}
.route-map svg.map-locator[data-screen-space-ready="true"] .map-locator-label[data-locator-priority="primary"]{font-size:var(--map-screen-country)}
.map-locator-caption{fill:var(--map-route-color);paint-order:stroke fill;stroke:var(--map-water-fill);stroke-width:var(--map-screen-halo,2.7px);stroke-linejoin:round}
.map-locator-extent{fill:none;stroke:var(--map-route-color);stroke-width:1.8;stroke-dasharray:4 2}
.map-locator-leader{fill:none;stroke:var(--map-route-color);stroke-width:1}
/* Preserve the truthful extent rectangle; signal tiny extents with a stop-sized terracotta point. */
.map-locator-point{display:none;fill:var(--map-route-color);stroke:var(--map-stop-outline);stroke-width:1.5;vector-effect:non-scaling-stroke;pointer-events:none}
.journey-map-panel{position:relative;container:journey-map/inline-size}
.map-locator-extent,.map-locator-leader{vector-effect:non-scaling-stroke}
/* Below-map locator is unsupported; inset stays within map. */

/* Inset dimensions are set once in screen pixels by journeys.js, converted
   to main-map units. The nested 284 × 214 viewBox is canonical. */
.route-map svg.map-locator {
  max-width: none;
  max-height: none;
  overflow: hidden;
}
/* Shared locator focus uses the same muted visited-area palette as the main map. */
.map-locator-focus{fill:var(--map-visited-fill);stroke:var(--map-area-border);stroke-width:1.3;vector-effect:non-scaling-stroke}

/* M67: shared journey-map presentation across Standard, Editorial and RouteSpine.
   Renderer CSS continues to own the map's page placement and scroll-window dimensions. */
.route-map{padding:0;border:1px solid var(--line);border-radius:var(--radius-control);background:#edf0e7;overflow:hidden}
/* RouteSpine pans the map inside its window; frame the window, not its moving SVG. */
[data-journey-profile="route-spine"] .route-spine-map-window{border:1px solid var(--line);background:#edf0e7}
.route-map > svg{display:block;width:100%;height:auto;max-height:760px}
/* Journey atlas maps retain intrinsic proportions regardless of adjacent notes. */
.journey-atlas .route-map > svg{max-height:none}
.route-map[data-map-presentation="bounded"]{padding:0;border:1px solid var(--line);border-radius:var(--radius-control);background:#edf0e7;overflow:hidden}
/* Viewport presentation owns no box geometry; RouteSpine owns its stage and camera. */
.route-map[data-map-presentation="viewport"]{padding:0;border:0;border-radius:0;background:transparent;overflow:visible}
.route-map[data-map-presentation="bounded"] > svg{display:block;width:100%;height:auto}
.route-map[data-map-presentation="viewport"] > svg{display:block;max-width:none;max-height:none}
.route-map-legend{display:flex;align-items:center;gap:9px;margin:8px 4px 0;color:var(--muted);font-size:var(--tyit-type-small);letter-spacing:.05em}
.route-map-legend-mark{display:inline-block;width:26px;border-top:2px dotted var(--map-route-color)}
.route-map-pan-hint{display:none}
/* Authored map graphics reuse the ordinary map canvas and shared screen sizes.
   Preserve the authored paint and anchors; pan instead of shrinking labels. */
.route-map.q02-map-window{border:0;border-radius:0;background:transparent;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
.route-map.q02-map-window > svg{width:max(100%,820px);max-width:none;max-height:none}
.route-map svg[data-standout-map] :is(.map-graphic-label,.map-graphic-furniture,.map-graphic-day-number){font-family:var(--tyit-font-structural)}
.route-map svg[data-standout-map][data-screen-space-ready="true"] .map-graphic-day-number{font-size:var(--map-screen-day)}
.route-map svg[data-standout-map][data-screen-space-ready="true"] .map-graphic-day-disc{stroke-width:2px;vector-effect:non-scaling-stroke}
.route-map svg[data-standout-map][data-screen-space-ready="true"] .map-graphic-furniture-line{stroke-width:1.5px;vector-effect:non-scaling-stroke}
.route-map svg[data-standout-map][data-screen-space-ready="true"] .journey-transport-icon{width:var(--map-screen-transport);height:var(--map-screen-transport)}
@media(max-width:819px){
 .q02-boundary-photo[data-graphic-kind="map"]>.route-map-pan-hint{display:block;margin:7px 4px 0;text-align:center;font-size:var(--tyit-type-small);letter-spacing:.025em;color:var(--muted)}
}
/* Width-fitting alternative is narrow-only; ordinary maps keep their existing canvas. */
/* A deferred map reserves the selected composition's exact aspect ratio. */
.route-map[data-map-wide]:not(:has(>svg, noscript a, [data-map-error]))::before{content:"";display:block;width:100%;aspect-ratio:var(--map-wide-ratio)}
.route-map[data-map-wide] noscript a{display:block;padding:16px;text-align:center}
.route-map[data-map-wide] [data-map-error]{display:block;padding:16px;text-align:center}
/* Q04/Q10 narrow maps use the existing scroll canvas when no fitted alternative is provided. */
@media(max-width:760px){
 .journey-page:not([data-journey-profile="route-spine"]) .journey-atlas .route-map{overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
 .journey-page:not([data-journey-profile="route-spine"]) .journey-atlas .route-map > svg{width:max(100%,820px);max-width:none}
 .journey-page:not([data-journey-profile="route-spine"]) .journey-atlas[data-map-shape="wide"] .route-map > svg{width:max(100%,960px)}
 .route-map-pan-hint{display:block;margin:7px 4px 0;text-align:center;font-size:var(--tyit-type-small);letter-spacing:.025em;color:var(--muted)}
 .journey-page:not([data-journey-profile="route-spine"]) .journey-atlas .route-map:is(:has(>svg[data-narrow-fit]), [data-map-narrow]:not([data-map-kind="wide"]):not(:has(noscript a))) {overflow:hidden}
 .route-map[data-map-narrow]:not([data-map-kind="wide"]):not(:has(>svg, noscript a, [data-map-error]))::before{aspect-ratio:var(--map-narrow-ratio)}
 .journey-atlas .route-map[data-map-kind="wide"]:not(:has(>svg, [data-map-error]))::before{width:max(100%,820px)}
 .journey-atlas[data-map-shape="wide"] .route-map[data-map-kind="wide"]:not(:has(>svg, [data-map-error]))::before{width:max(100%,960px)}
 .journey-page:not([data-journey-profile="route-spine"]) .journey-atlas .route-map:has(>svg[data-narrow-fit]) > svg[data-narrow-fit]{display:block;width:100%;max-height:none}
 .journey-atlas .route-map:is(:has(>svg[data-narrow-fit]),[data-map-narrow]:not([data-map-kind="wide"])) + .route-map-pan-hint{display:none}
}

/* RouteSpine opening chapter anchors; no pulse or interaction. */
.route-spine-overview-disc{fill:var(--map-route-color);stroke:var(--map-stop-outline)}
.route-spine-overview-number{fill:#fffdf8;font-family:var(--tyit-font-structural);font-weight:700;text-anchor:middle;dominant-baseline:central;pointer-events:none}

/* Shared inset: edge-to-edge geography with a crisp integrated cartographic frame. */
.map-locator-frame{fill:none;stroke:var(--map-area-border);stroke-width:1.5;pointer-events:none;vector-effect:non-scaling-stroke}

/* Local geography shares map palette and remains subordinate to route landmarks. */
.map-local-district{fill:var(--map-area-fill);stroke:none;opacity:.85}
.map-local-district--alternate{fill:var(--map-district-alternate-fill)}
.map-local-park{fill:#cbdcc5;stroke:none}
.map-local-water{fill:var(--map-water-fill);stroke:#9bb8b3;stroke-width:.8}
.map-local-river{fill:none;stroke:#92b9b5;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}
.map-local-intermittent-river{fill:none;stroke:#92b9b5;stroke-width:1.5;stroke-dasharray:5 4;stroke-linecap:round;stroke-linejoin:round}
.map-local-fine-street,.map-local-secondary-road,.map-local-major-road{fill:none;stroke-linecap:round;stroke-linejoin:round}
.map-local-fine-street{stroke:#cbd0c3;stroke-width:.75}
.map-local-secondary-road{stroke:#c2c8b9;stroke-width:1.4}
.map-local-major-road{stroke:#aeb9a8;stroke-width:2.4}
.map-local-land{fill:var(--map-visited-country-fill)}
.map-local-sea{fill:var(--map-water-fill);stroke:none}
.map-local-historic-wall{fill:none;stroke:#718479;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
