#nationRegion{position:absolute;top:12px;left:12px;z-index:805;display:flex;align-items:center;gap:8px;padding:4px 8px;border:1px solid #789083;border-radius:8px;background:#fff;color:#203b34;font-size:14px}
#nationRegion label{white-space:nowrap}
#nationRegion select{min-height:44px;max-width:60vw;color:inherit;background:inherit}
.nation-island-label{width:max-content;padding:2px 5px;border-radius:4px;background:#fff;color:#203b34;font-weight:700;pointer-events:none}
html[data-theme=dark] :is(#nationRegion,.nation-island-label){background:#22282e;color:#edf1f4;border-color:#697984}
.national-data .original-source-controls,#nationFilters[hidden]{display:none!important}
#nationFilters label{display:block;padding:5px 0}
@media(max-width:600px), (max-width:720px) and (orientation:portrait){
 #nationRegion{top:calc(var(--b045-top,8px) + 64px);left:max(8px,env(safe-area-inset-left))}
 #mapWorkspace.clean-map-only #nationRegion{top:var(--b045-top,8px)}
}

.nation-route-popup textarea{box-sizing:border-box;width:100%;font:inherit;color:inherit;background:transparent}

.nation-mobility-icon {
  --marker-ink:#175e46;
  display:grid;
  place-items:center;
  border:2px solid var(--marker-ink);
  border-radius:7px;
  color:var(--marker-ink);
  background:#fff;
  box-shadow:0 1px 4px #0006;
}
.nation-mobility-rail{--marker-ink:#96420e}
.nation-mobility-metro{--marker-ink:#205ca1}
.nation-mobility-signal{--marker-ink:#75378a}
.nation-mobility-signal.pending{--marker-ink:#52606c}
.nation-mobility-icon .ticket-icon{width:19px;height:19px}
.nation-mobility-bike .ticket-icon{width:27px;height:18px}

#nationRegion #routeMenuButton{display:inline-flex;align-items:center;gap:4px;min-height:44px;padding:4px 8px;white-space:nowrap;font-size:inherit}
#nationRegion #routeMenuButton .ticket-icon{width:16px;height:16px}
#nationRegion #routeChoice{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
#nationRegion select{max-width:36vw}
#routeMenu select{max-width:100%}
.nation-mobility-hsr{--marker-ink:#9b3b12}
.nation-mobility-bus{--marker-ink:#544594}
.nation-mobility-icon b{position:absolute;right:-3px;bottom:-4px;min-width:11px;padding:0 2px;text-align:center;border-radius:3px;background:var(--marker-ink);color:#fff;font:700 10px/13px system-ui}

.nation-mobility-icon:not(.nation-mobility-signal) .ticket-icon{width:16px;height:16px}
.nation-mobility-bike:not(.nation-mobility-signal) .ticket-icon{width:22px;height:16px}

.nation-mobility-icon.nation-mobility-bike,
.nation-bike-legend i {
  box-sizing:border-box;
  border:1px solid #fff;
  border-radius:5px;
  background:#175e46;
  color:#fff;
}
.nation-mobility-icon.nation-mobility-bike .ticket-icon,
.nation-bike-legend .ticket-icon {width:13px;height:13px}
.nation-mobility-icon.nation-mobility-bike.service-only,
.nation-bike-legend i.service-only {
  border:1px dashed #175e46;
  background:#e7f2ea;
  color:#175e46;
}
.nation-bike-legend {
  position:absolute;
  top:calc(100% + 4px);
  left:0;
  white-space:nowrap;
  padding:3px 6px;
  border-radius:5px;
  background:#fff;
  color:#23463b;
  font:12px/1.25 system-ui,sans-serif;
}
.nation-bike-legend i {display:inline-grid;place-items:center;width:16px;height:16px;vertical-align:middle}
html[data-theme=dark] .nation-bike-legend {background:#22282e;color:#edf1f4}

.nation-mobility-overview-transit {
  border: 1px solid #fff;
  border-radius: 50%;
  background: var(--marker-ink);
  color: #fff;
  box-shadow: none;
  font: 9px/1 system-ui, sans-serif;
}

.nation-mobility-icon.nation-bike-county,
.nation-bike-legend i {border-radius:50%}

.nation-mobility-icon.nation-mobility-bike.nation-bike-nearby {
  background:#55616c;
  color:#fff;
}

.ticket-station-heading {min-width:0}
.ticket-station-heading p {margin:2px 0 0;font-size:14px}
.ticket-station-heading h2 {overflow-wrap:anywhere}

/* Keep map controls in one row above the map and one below. */
#journeyMapTools{
 position:absolute;z-index:820;top:var(--b045-top,8px);
 left:max(6px,env(safe-area-inset-left));right:max(6px,env(safe-area-inset-right));
 margin-inline:auto;width:max-content;max-width:calc(100% - max(6px,env(safe-area-inset-left)) - max(6px,env(safe-area-inset-right)));
 box-sizing:border-box;display:flex;align-items:center;gap:4px;padding:2px 4px;
 overflow-x:auto;scrollbar-width:none;white-space:nowrap;border:1px solid #789083;border-radius:8px;
 background:#fff;color:#203b34;font:13px system-ui,sans-serif;
}
html[data-theme=dark] #journeyMapTools{background:#22282e;color:#edf1f4;border-color:#697984}
#journeyMapTools #mobileReadoutB045,#journeyMapTools #nationRegion{
 position:static;display:flex;align-items:center;min-height:0;max-height:none;
 margin:0;padding:0;border:0;background:transparent;color:inherit;box-shadow:none;
}
#journeyMapTools #mobileReadoutB045{flex:1 0 auto;font-size:12px}
#journeyMapTools #mobilePositionB045,#journeyMapTools #nationRegion label{
 position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);
}
#journeyMapTools #nationRegion{gap:4px;flex:none}
#journeyMapTools :is(button,select),#journeyMapTools #routeMenuButton{
 flex:none;min-height:44px;padding:3px 6px;font-size:13px;white-space:nowrap;
}
#journeyMapTools #nationScope{width:4.8em;max-width:none}
#journeyMapTools button{min-width:44px;max-width:none}
#journeyMapTools #routeMenuButton .ticket-icon{display:none}
.map-stage:has(#journeyMapTools) #crosshairCoordinateBar{display:none!important}
#mapWorkspace.clean-map-only #journeyMapTools #mobileReadoutB045{display:none!important}

html body #mapWorkspace .map-stage:has(#journeyMapTools) nav.primary-actions[aria-label]{
 display:grid!important;grid-template-columns:none!important;grid-auto-flow:column;
 grid-auto-columns:minmax(44px,1fr);gap:4px!important;
 top:auto!important;bottom:var(--b045-bottom,26px)!important;
 left:max(6px,env(safe-area-inset-left))!important;right:max(6px,env(safe-area-inset-right))!important;
 width:auto!important;max-width:none!important;overflow-x:auto;
}
html body #mapWorkspace .map-stage:has(#journeyMapTools) nav.primary-actions[aria-label]>button{
 position:static!important;width:100%!important;min-width:0!important;max-width:none!important;margin:0!important;
 transform:none!important;white-space:nowrap;
}
.map-stage:has(#journeyMapTools) #mobileSecondaryB045:empty,.map-stage:has(#journeyMapTools) .map-top-actions:empty{display:none!important}
.map-stage:has(#journeyMapTools) #fullscreenToggle{font-size:0!important}
.map-stage:has(#journeyMapTools) #fullscreenToggle .ticket-icon{width:22px;height:22px}

#baseMenu #baseMapChoices{
 grid-template-columns:repeat(3,minmax(0,1fr));
 gap:5px;
}
#baseMenu #baseMapChoices label{
 justify-content:center;
 gap:5px;
 padding-inline:4px;
 white-space:nowrap;
}
#baseMenu #baseMapChoices input{flex-basis:16px;width:16px;height:16px}

#crosshairPosition .crosshair-plan-label{display:none}
#crosshairPosition[data-plan-ready="true"]{width:100px;min-height:44px}
#crosshairPosition[data-plan-ready="true"]>.ticket-icon,
#crosshairPosition[data-plan-ready="true"]>span{display:none}
#crosshairPosition[data-plan-ready="true"] .crosshair-plan-label{display:block;width:100px;height:40px}

/* Point selection and planning cards share one translucent backdrop. */
#mapWorkspace #selectionSheet:has(.ticket-point-translucent){
 background:rgb(12 20 28 / 50%)!important;
}
#mapWorkspace #selectionSheet .ticket-point-translucent,
#mapWorkspace #selectionSheet .ticket-point-translucent :is(.ticket-popup-heading,.ticket-popup-body,.ticket-scroll-frame){
 background:transparent!important;
}
#mapWorkspace #selectionSheet .ticket-point-translucent :is(h2,h3,p){
 color:#fff!important;
 font-weight:600;
 text-shadow:0 1px 2px #000,0 0 3px #000;
}
#mapWorkspace #selectionSheet .ticket-point-translucent button{
 background:#26343e!important;
 color:#fff!important;
}
#mapWorkspace #selectionSheet .ticket-point-translucent button[aria-pressed="true"]{
 background:var(--ticket-selected-blue,#176072)!important;
}

#crosshairPosition[data-navigating="true"]{width:44px;height:44px;min-height:44px}
#crosshairPosition[data-navigating="true"]>.ticket-icon,
#crosshairPosition[data-navigating="true"]>span{display:none}
#crosshairPosition[data-recenter="true"]>.ticket-icon{display:block}
.journey-position-icon .crosshair-navigation path{
 visibility:hidden;transform-origin:center;transform:rotate(var(--point-heading,0deg));
}
.journey-position-icon[data-has-heading="true"] .crosshair-navigation path{visibility:visible}
.map-stage:has(#crosshairPosition[data-navigating="true"]) :is(.real-location-icon,.sim-location-icon){visibility:hidden}

/* Keep the two modes prominent and group map orientation with the scale. */
#mapWorkspace .point-mode-controls :is(#myLocation,#journeyPlanningMode)[aria-pressed="true"]{
 background:var(--ticket-selected-blue,#176072)!important;color:#fff!important;
}
#mapWorkspace .point-mode-controls #journeyPlanningMode{font-weight:700}
#mapWorkspace .point-mode-controls :is(#crosshairLocate,.map-top-actions){display:none!important}
.point-mode-controls .journey-map-indicators{
 display:flex;align-items:center;gap:4px;flex:none;
}
.point-mode-controls .journey-map-indicators .leaflet-control-scale{float:none;margin:0}
#mapWorkspace .point-mode-controls .journey-map-indicators #compassButton{
 display:grid;place-items:center;position:static;width:44px;height:44px;min-width:44px;
 margin:0;padding:6px;
}
.point-mode-controls .journey-map-indicators #compassButton span{display:none}

.point-mode-controls #journeyMapTools #mobileReadoutB045{flex:none;font-size:11px}
#mapWorkspace .point-mode-controls #journeyMapTools :is(#nationScope,#routeMenuButton,#compassButton){
 box-sizing:border-box;height:44px;min-height:44px;margin:0;
}

#routeMenu .nation-county-field{display:grid;gap:4px;margin-bottom:12px}
#routeMenu .nation-county-field select{min-height:44px}
#routeMenu :is(#nationRoutePick,#nationRouteCount,#routePickLabel,#nationRouteListMode)[hidden]{display:none!important}

html body #mapWorkspace #selectionSheet:has(.ticket-point-translucent){
 max-height:var(--point-sheet-max-height,80dvh)!important;
 bottom:var(--point-sheet-bottom,88px)!important;
}
#mapWorkspace #selectionSheet .ticket-point-translucent #popupClose[hidden]{display:none!important}
#mapWorkspace #selectionSheet .ticket-point-translucent .ticket-popup-heading{padding-right:10px!important}
#mapWorkspace .point-sheet-closing{pointer-events:none!important}

#mapWorkspace #selectionSheet .ticket-point-translucent{height:auto}

/* Match the translucent point cards in the map menus. */
#mapWorkspace :is(#baseMenu,#routeMenu,#displayMenu),
#mapWorkspace button#sheetBackdrop{
 background:rgb(12 20 28 / 50%)!important;
}
#mapWorkspace :is(#baseMenu,#routeMenu,#displayMenu) :is(.panel-heading,.panel-content){
 background:transparent!important;
}
#mapWorkspace :is(#baseMenu,#routeMenu,#displayMenu) :is(.panel-heading,.panel-content){
 color:#fff!important;
}
#mapWorkspace :is(#baseMenu,#routeMenu,#displayMenu) :is(h2,h3,p,legend){
 color:#fff!important;
 text-shadow:0 1px 2px #000,0 0 3px #000;
}
#mapWorkspace :is(#baseMenu,#routeMenu,#displayMenu) button:not(.map-menu-grip){
 background:#26343e!important;
 color:#fff!important;
}

html body #mapWorkspace .map-stage:has(#journeyMapTools) nav.primary-actions[aria-label]>button{
 background:rgb(12 20 28 / 50%)!important;
 color:#fff!important;
 text-shadow:0 1px 2px #000;
}
html body #mapWorkspace .map-stage:has(#journeyMapTools) nav.primary-actions[aria-label]>button:is([aria-pressed="true"],[aria-expanded="true"]){
 background:var(--ticket-selected-blue,#176072)!important;
}

#mapWorkspace #reportOpen[hidden]{display:none!important}

#mapWorkspace #fullscreenToggle{display:none!important}
html body #developerToolsDialog,
html body #developerToolsDialog::backdrop{background:rgb(12 20 28 / 50%)!important}
html body #developerToolsDialog :is(.developer-tools-heading,#developerToolsBody){
 background:transparent!important;
 color:#fff!important;
}
html body #developerToolsDialog :is(h2,h3,p,summary){
 color:#fff!important;
 text-shadow:0 1px 2px #000,0 0 3px #000;
}

/* Keep the map legible behind compact controls. */
html body #mapWorkspace #journeyMapTools {
 gap:6px;
 padding:4px 6px;
 border:1px solid rgb(169 199 206 / 38%);
 border-radius:16px;
 background:rgb(12 20 28 / 84%);
 color:#f1f8fa;
 box-shadow:0 5px 20px rgb(0 0 0 / 24%);
}
#journeyMapTools #mobileReadoutB045 {
 padding-inline:5px;
 font-variant-numeric:tabular-nums;
 letter-spacing:.02em;
}
#mapWorkspace #journeyMapTools :is(#routeMenuButton,#compassButton) {
 border-radius:11px;
}
html body #mapWorkspace .map-stage:has(#journeyMapTools) nav.primary-actions[aria-label]>button {
 border:1px solid rgb(169 199 206 / 38%);
 border-radius:14px;
 box-shadow:0 3px 12px rgb(0 0 0 / 20%);
}
html body #mapWorkspace .map-stage:has(#journeyMapTools) nav.primary-actions[aria-label]>button:is([aria-pressed="true"],[aria-expanded="true"]) {
 border-color:#71c9cf;
}
#mapWorkspace :is(#baseMenu,#routeMenu,#displayMenu,#selectionSheet) {
 border-color:rgb(169 199 206 / 45%);
 border-radius:18px 18px 14px 14px;
}
#mapWorkspace .journey-route-line {
 filter:drop-shadow(0 0 2px #061218) drop-shadow(0 1px 2px #061218);
 stroke-linecap:round;
 stroke-linejoin:round;
}

/* Keep touch controls nearest the left hand in landscape. */
@media (orientation:landscape) {
 html body #mapWorkspace #journeyMapTools {
  right:auto;
  margin-inline:0;
 }
 #journeyMapTools .journey-map-indicators {display:contents}
 #journeyMapTools #mobileReadoutB045 {order:1}
 #journeyMapTools .leaflet-control-scale {order:2;float:none;margin:0}
}

/* The unfolded landscape preview has room for a compact side toolbar. */
html body.duo-preview #mapWorkspace .map-stage:has(#journeyMapTools) nav.primary-actions[aria-label] {
 grid-auto-flow:row!important;
 grid-template-columns:minmax(0,1fr)!important;
 grid-auto-rows:minmax(48px,auto);
 left:auto!important;
 right:12px!important;
 top:50%!important;
 bottom:auto!important;
 transform:translateY(-50%)!important;
 width:136px!important;
 padding:5px;
 overflow:visible;
}
html body.duo-preview #mapWorkspace .map-stage:has(#journeyMapTools) nav.primary-actions[aria-label]>button {
 width:100%!important;
 min-height:48px;
 justify-content:center;
 white-space:nowrap;
}
html body.duo-preview #mapWorkspace .primary-actions .mobile-action-caption {
 display:none!important;
}
html body.duo-preview #mapWorkspace .primary-actions .map-action-label {
 display:inline!important;
}

/* Drawer study. Only the two marked development previews opt in. */
body[data-drawer-preview] #mapWorkspace :is(#baseMenu,#routeMenu,#displayMenu),
html body[data-drawer-preview] :is(#developerToolsDialog,#settingsPreviewDialog) {
 box-sizing:border-box;
 background:rgb(12 20 28 / 50%)!important;
 backdrop-filter:blur(10px);
 color:#fff;
 border:1px solid rgb(169 199 206 / 45%);
 border-radius:18px;
 box-shadow:0 12px 32px rgb(0 0 0 / 28%);
}
html body[data-drawer-preview] #mapWorkspace #sheetBackdrop {
 background:transparent!important;
}
body[data-drawer-preview] :is(#developerToolsDialog,#settingsPreviewDialog) {
 position:fixed;
 margin:0;
 z-index:1100;
}
body[data-drawer-preview] :is(.panel-heading,.developer-tools-heading) h2 {
 font-size:16px;
 min-height:30px;
}
html body[data-drawer-preview="bottom"] #mapWorkspace :is(#baseMenu,#routeMenu,#displayMenu),
body[data-drawer-preview="bottom"] :is(#developerToolsDialog,#settingsPreviewDialog) {
 inset:auto 8px calc(var(--b045-bottom,26px) + 70px)!important;
 width:auto!important;
 max-width:none!important;
 max-height:min(70dvh,calc(100dvh - 160px))!important;
 transform:none!important;
}
html body[data-drawer-preview="side"] #mapWorkspace :is(#baseMenu,#routeMenu,#displayMenu),
body[data-drawer-preview="side"] :is(#developerToolsDialog,#settingsPreviewDialog) {
 inset:76px auto 22px 12px!important;
 width:min(400px,calc(100% - 24px))!important;
 max-height:calc(100% - 98px)!important;
 transform:none!important;
}
body[data-drawer-preview="side"] :is(.panel-content,#developerToolsBody) {
 direction:rtl;
}
body[data-drawer-preview="side"] :is(.panel-content,#developerToolsBody)>* {
 direction:ltr;
}
@media (prefers-reduced-motion:no-preference) {
 body[data-drawer-preview="bottom"] :is(#baseMenu,#routeMenu,#displayMenu):not([hidden]),
 body[data-drawer-preview="bottom"] :is(#developerToolsDialog,#settingsPreviewDialog)[open] {animation:drawer-up-in 160ms ease-out}
 body[data-drawer-preview="side"] :is(#baseMenu,#routeMenu,#displayMenu,#developerToolsDialog,#settingsPreviewDialog) {
  transition:opacity 160ms ease,translate 160ms ease,display 160ms allow-discrete;
 }
 body[data-drawer-preview="side"] :is(#baseMenu,#routeMenu,#displayMenu)[hidden],
 body[data-drawer-preview="side"] :is(#developerToolsDialog,#settingsPreviewDialog):not([open]) {
  opacity:0;
  translate:-24px 0;
 }
 @starting-style {
  body[data-drawer-preview="side"] :is(#baseMenu,#routeMenu,#displayMenu):not([hidden]),
  body[data-drawer-preview="side"] :is(#developerToolsDialog,#settingsPreviewDialog)[open] {
   opacity:0;
   translate:-24px 0;
  }
 }
}
@keyframes drawer-up-in {from{translate:0 24px;opacity:0}to{translate:0 0;opacity:1}}

/* The selected state persists. Press feedback lasts only while held. */
body {
 --ticket-selected-blue:#225777;
 --ticket-control-accent:#65aee1;
}
#mapWorkspace :is(input[type="checkbox"],input[type="radio"]),
#developerToolsDialog :is(input[type="checkbox"],input[type="radio"]) {
 accent-color:var(--ticket-control-accent);
}
html body #mapWorkspace #baseMapChoices label:has(>input:checked) {
 background:var(--ticket-selected-blue)!important;
 border-color:var(--ticket-control-accent)!important;
 color:#fff!important;
}
:is(#mapWorkspace,#developerToolsDialog) :is(button,[role="button"],summary,label:has(>input:is([type="checkbox"],[type="radio"]))):not(#sheetBackdrop):not(:disabled):not([aria-disabled="true"]):active {
 filter:brightness(1.28);
}

/* Matching scroll rails for drawers and cards. */
.ticket-rail-area {
 display:grid;
 grid-template-columns:0 minmax(0,1fr) 0;
 flex:1;
 min-height:0;
 min-width:0;
}
.ticket-rail-area:has(>.right:not([hidden])) {grid-template-columns:24px minmax(0,1fr) 24px}
.ticket-rail-area>:not(.ticket-rail-track) {
 grid-column:2;
 grid-row:1;
 min-width:0;
 direction:ltr!important;
 scrollbar-width:none!important;
 scrollbar-gutter:auto;
}
.ticket-rail-area>:not(.ticket-rail-track)::-webkit-scrollbar {display:none}
.ticket-rail-track {
 grid-row:1;
 position:relative;
 min-height:0;
 touch-action:none;
 cursor:ns-resize;
}
.ticket-rail-track[hidden] {display:none!important}
.ticket-rail-track.left {grid-column:1}
.ticket-rail-track.right {grid-column:3}
.ticket-rail-thumb {
 position:absolute;
 inset-inline:0;
}
.ticket-rail-thumb::after {
 content:"";
 position:absolute;
 inset-block:0;
 width:5px;
 border-radius:5px;
 background:rgb(119 150 165 / 75%);
}
.ticket-rail-track.left .ticket-rail-thumb::after {left:3px}
.ticket-rail-track.right .ticket-rail-thumb::after {right:3px}
.ticket-rail-track.is-dragging .ticket-rail-thumb::after,
.ticket-rail-area.is-scrolling:not(:has(.is-dragging)) .ticket-rail-thumb::after {
 background:var(--ticket-control-accent);
}
body[data-drawer-preview="side"] .choice-panel>.ticket-rail-area {margin-inline:-10px}

#locationConsent {
 box-sizing:border-box;
 width:min(380px,calc(100% - 24px));
 padding:18px;
 border:1px solid #637c8e;
 border-radius:18px;
 background:#182633;
 color:#fff;
}
#locationConsent::backdrop {background:rgb(12 20 28 / 50%)}
#locationConsent h2 {margin:0;font-size:18px}
#locationConsent p {line-height:1.55}
#locationConsent form {display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap}
#locationConsent button {min-height:44px;padding:6px 14px;border:1px solid #637c8e;border-radius:10px;background:#26343e;color:#fff}
#locationConsent button[value="confirm"] {background:var(--ticket-selected-blue)}
#locationConsent button:active {filter:brightness(1.28)}

#landscapeCountyChoices:not([hidden]) {display:grid;gap:4px}
#landscapeCountyChoices button {text-align:left;min-height:44px}
#landscapeCountyChoices button[aria-pressed="true"] {background:var(--ticket-selected-blue)!important}
.landscape-county-trigger {text-align:left;min-height:44px}

#routeMenu .county-post-label {font-size:80%}

/* Compare nearby lanes without moving the map or fading station markers. */
.map-stage:not(:has(#selectionSheet .journey-lane-chooser)) :is(.journey-lane-focus,.journey-lane-focus-point) {display:none}
.map-stage:has(#selectionSheet .journey-lane-chooser):has(.journey-lane-focus) .journey-network-line {opacity:.45}
.journey-lane-focus {stroke-linecap:round;filter:drop-shadow(0 0 2px #111)}

/* Coordinate and planning card visual study for the cloud previews. */
html body[data-drawer-preview] #mapWorkspace #selectionSheet:has(.ticket-point-translucent) {
 background:rgb(12 20 28 / 50%)!important;
 backdrop-filter:blur(10px);
 border:1px solid rgb(169 199 206 / 40%);
 border-radius:18px;
 box-shadow:0 12px 32px rgb(0 0 0 / 28%);
}
html body[data-drawer-preview="side"] #mapWorkspace #selectionSheet:has(.ticket-point-translucent) {
 inset:76px auto auto 12px!important;
 width:min(400px,calc(100% - 24px))!important;
}
body[data-drawer-preview] #selectionSheet .ticket-point-translucent .ticket-popup-heading {
 border-bottom:1px solid rgb(169 199 206 / 24%);
}
html body[data-drawer-preview] #mapWorkspace #selectionSheet .ticket-point-translucent #selectionSheetGrip {
 background:transparent!important;
 border-color:transparent!important;
 box-shadow:none!important;
}
body[data-drawer-preview] #selectionSheet .ticket-point-translucent h2 {
 font-size:18px;
 letter-spacing:.02em;
}
body[data-drawer-preview] #selectionSheet .ticket-point-translucent .ticket-popup-body {
 padding-block:8px 12px;
}

/* Shared menu hierarchy in the three development previews. */
body[data-drawer-preview] .menu-sections {display:grid;gap:8px}
body[data-drawer-preview] .menu-sections>details {
 border:1px solid rgb(169 199 206 / 38%);
 border-radius:12px;
 padding:0 10px;
}
body[data-drawer-preview] .menu-sections>details>summary {
 min-height:44px;
 display:flex;
 align-items:center;
 justify-content:space-between;
 gap:8px;
 cursor:pointer;
 color:#fff;
}
body[data-drawer-preview] .menu-sections>details>summary::after {content:"›";font-size:20px;color:#a9c7ce}
body[data-drawer-preview] .menu-sections>details[open]>summary::after {transform:rotate(90deg)}
body[data-drawer-preview] #routeMenu .panel-content:has(#landscapeCountyChoices:not([hidden])) > :not(.nation-county-field),
body[data-drawer-preview] .nation-county-field:has(#landscapeCountyChoices:not([hidden])) > :not(#landscapeCountyChoices) {
 display:none!important;
}

body[data-drawer-preview] .menu-sections>details[open] {
 border-color:rgb(113 201 207 / 70%);
 background:rgb(39 103 112 / 20%);
}

.layer-compare-controls {flex:none;padding:4px 12px 8px;border-bottom:1px solid rgb(169 199 206 / 38%)}
.layer-compare-controls p {margin:6px 0;font-size:.85rem}
.layer-compare-controls [role="group"] {display:flex;gap:8px}
.layer-compare-controls button {flex:1;min-height:44px}
#mapWorkspace #baseMenu .layer-compare-controls button[aria-pressed="true"] {background:#245a60!important;border-color:#76d9cf!important}
body[data-layer-effects] #nationFilters label {transition:background-color .18s,border-color .18s}
body[data-layer-effects] #nationFilters label:has(input:checked) {border-color:#76d9cf!important}
@media(prefers-reduced-motion:reduce) {
 body[data-layer-effects] #nationFilters label {transition:none}
}

body[data-drawer-preview] #baseMenu :is(#nationFilters,.appearance-buttons) {
 display:grid;
 grid-template-columns:repeat(3,minmax(0,1fr));
 gap:6px;
 margin:8px 0 12px;
 padding:0;
 border:0;
}
body[data-drawer-preview] #baseMenu :is(#nationFilters,.appearance-buttons) legend {padding:0 0 4px}
body[data-drawer-preview] #baseMenu :is(#nationFilters,.appearance-buttons) label {
 display:flex;
 align-items:center;
 justify-content:center;
 gap:4px;
 min-height:44px;
 padding:4px;
 cursor:pointer;
}

#nationMobilityControls[hidden] {display:none!important}

/* The preview exposes its primary map controls above the legacy settings. */
body[data-drawer-preview] #baseMenu :is(#mapSettings,#planningSettings,#feedbackB049,.panel-content>p.small:not([id])) {display:none!important}

#mapWorkspace #baseMenu .appearance-buttons label:has(input:checked) {background:#225777;border-color:#65aee1;color:#fff}

/* Map cockpit study, enabled in the three development previews. */
html body[data-drawer-preview] #mapWorkspace #baseMenu.cockpit-map-panel {
 background:linear-gradient(155deg,rgb(27 44 56 / 80%),rgb(10 20 30 / 78%))!important;
 border-color:rgb(145 204 216 / 55%);
 box-shadow:0 16px 42px rgb(1 7 12 / 55%),inset 0 1px rgb(219 250 250 / 12%);
}
#baseMenu.cockpit-map-panel .panel-heading h2 {
 padding-left:10px;
 border-left:3px solid #8cebe0;
 letter-spacing:.07em;
}
#baseMenu.cockpit-map-panel .panel-content {padding-top:12px}
#mapWorkspace #baseMenu.cockpit-map-panel :is(#baseMapChoices,#nationFilters,.appearance-buttons) {
 --cockpit-accent:#90ebdc;
 --cockpit-selected:#1f535c;
 margin:0 0 12px;
 padding:7px;
 border:1px solid rgb(155 208 222 / 22%);
 border-radius:14px;
 background:rgb(4 14 24 / 27%);
}
#mapWorkspace #baseMenu.cockpit-map-panel #nationFilters {
 --cockpit-accent:#a5ebbd;
 --cockpit-selected:#244f40;
}
#mapWorkspace #baseMenu.cockpit-map-panel .appearance-buttons {
 --cockpit-accent:#c7c6ff;
 --cockpit-selected:#3f4166;
}
#baseMenu.cockpit-map-panel :is(#baseMapChoices,#nationFilters,.appearance-buttons) legend {
 padding:0 5px;
 color:#d2e8ee;
 font-size:.77rem;
 font-weight:700;
 letter-spacing:.08em;
}
#mapWorkspace #baseMenu.cockpit-map-panel :is(#baseMapChoices,#nationFilters,.appearance-buttons) label {
 position:relative;
 flex-direction:column;
 gap:4px;
 min-height:60px;
 padding:6px 2px;
 border:1px solid rgb(153 191 206 / 25%);
 border-radius:10px;
 background:#192a38!important;
 color:#edf8fa;
 white-space:nowrap;
 font-size:clamp(.72rem,2.6vw,.88rem);
 transition:background-color .18s,transform .14s,border-color .18s;
}
#baseMenu.cockpit-map-panel label>.cockpit-icon {
 width:20px;
 height:20px;
 flex:none;
 fill:none;
 stroke:#bdd9e2;
 stroke-width:1.6;
 stroke-linecap:round;
 stroke-linejoin:round;
}
#mapWorkspace #baseMenu.cockpit-map-panel label:has(>.cockpit-icon)>input {
 position:absolute;
 width:1px;
 height:1px;
 min-width:0;
 opacity:0;
}
html body #mapWorkspace #baseMenu.cockpit-map-panel :is(#baseMapChoices,#nationFilters,.appearance-buttons) label:has(>input:checked) {
 background:var(--cockpit-selected)!important;
 border-color:var(--cockpit-accent)!important;
 box-shadow:inset 0 -2px var(--cockpit-accent);
}
#baseMenu.cockpit-map-panel label:has(>input:checked)>.cockpit-icon {stroke:var(--cockpit-accent)}
#baseMenu.cockpit-map-panel label:has(>input:focus-visible) {outline:2px solid #fff;outline-offset:2px}
#baseMenu.cockpit-map-panel label:active {transform:scale(.97)}
@media(prefers-reduced-motion:reduce) {
 #mapWorkspace #baseMenu.cockpit-map-panel label {transition:none}
 #baseMenu.cockpit-map-panel label:active {transform:none}
}

/* The idle hint is purely visual and never changes either mode. */
@media (prefers-reduced-motion:no-preference) {
 #mapWorkspace .startup-entry-hint {animation:ticket-entry-hint 750ms ease-in-out 2}
 body[data-drawer-preview="side"] :is(#baseMenu,#routeMenu,#displayMenu):not([hidden]),
 body[data-drawer-preview="side"] :is(#developerToolsDialog,#settingsPreviewDialog)[open] {animation:drawer-side-in 180ms ease-out}
}
@keyframes ticket-entry-hint {50%{box-shadow:0 0 0 2px #83d8ee,0 0 14px #83d8ee;filter:brightness(1.25)}}
@keyframes drawer-side-in {from{translate:-28px 0;opacity:0}to{translate:0 0;opacity:1}}
:is(#baseMenu,#routeMenu,#displayMenu) .panel-heading {touch-action:none;user-select:none;-webkit-user-select:none}
body[data-drawer-preview="side"] :is(#baseMenu,#routeMenu,#displayMenu,#developerToolsDialog) {transition-property:opacity,display}

#nationRingStatus{grid-column:1 / -1;margin:4px 0 0;font-size:.875rem}
#nationRingStatus[hidden]{display:none!important}
#nationFilters label:has(>input:disabled){opacity:.5;cursor:default}

/* Major hubs share the transport artwork at twice the ordinary marker size. */
.nation-mobility-icon.nation-mobility-hub{box-sizing:border-box;border:2px solid #fff;border-radius:11px;background:var(--marker-ink);color:#fff;box-shadow:0 2px 7px #0008,0 0 0 2px var(--marker-ink)}
.nation-mobility-icon.nation-mobility-hub .ticket-icon{width:32px;height:32px}
.nation-mobility-icon.nation-mobility-hub b{right:-4px;bottom:-5px;border:1px solid #fff;font-size:11px}
