.v43-search-tools{display:grid;gap:12px;margin:14px 0 8px}.v43-pref-label{font-size:12px;font-weight:700;display:flex;align-items:center;gap:12px}.v43-pref-label select{flex:1;min-width:0;border:1px solid #d2ded5;border-radius:7px;padding:9px;background:#fff;color:#254d3b}.v43-major-tags{display:flex;gap:6px;flex-wrap:wrap}.v43-major-tags button{border:1px solid #ccd9d0;border-radius:18px;background:#fff;padding:6px 10px;font-size:12px;color:#315947}.v43-major-tags button[aria-pressed=true]{background:#245b46;color:#fff;border-color:#245b46}.v43-search-tools button:focus-visible,.v43-pref-label select:focus-visible{outline:3px solid #e59b48;outline-offset:2px}#filters-button{display:none}#v43-search-toggle{display:none}.explorer{max-height:calc(100% - 125px);overflow:auto}.travel-bar{flex-wrap:wrap;max-width:calc(100% - 30px)}.travel-bar button[aria-pressed=true]{background:#245b46;color:white}#travel-bar{z-index:760}.v43-ic-marker{background:#fff;border:2px solid #3d6381;border-radius:6px;color:#1f405c;white-space:nowrap;font-size:11px;font-weight:700;padding:3px 6px;box-shadow:0 2px 5px #163e4925;width:max-content}.v43-ic-marker.major{background:#edf4f8;font-size:12px}.v43-port-marker{background:#fff;color:#126a87;border:2px solid #21839e;border-radius:20px;padding:5px 9px;font-weight:700;font-size:12px;white-space:nowrap;width:max-content}.v43-transport-popup{font:14px/1.65 sans-serif}.v43-transport-popup strong{display:block;font-size:16px}.v43-transport-popup a{color:#1f6954}.v43-transport-popup .v43-links{display:flex;gap:12px;flex-wrap:wrap;margin-top:8px}.v43-toll-selectors{display:grid;grid-template-columns:1fr 1fr;gap:12px}.v43-toll-selectors label{display:grid;gap:6px;font-size:13px}.v43-toll-selectors select,.v43-toll-selectors input{padding:10px;border:1px solid #c7d5cb;border-radius:7px;min-width:0;background:#fff;max-width:100%;font:inherit}.v43-fare-result{background:#f1f6f1;border:1px solid #d4e3d5;border-radius:12px;padding:24px;margin:18px 0}.v43-fare-result strong{font-size:28px;color:#215741;display:block;margin-top:8px}.v43-toll-source{font-size:12px;color:#526a5c}.v43-toll-source a{color:inherit}.v43-toll-rules{display:grid;gap:4px}.v43-toll-rules div{display:flex;justify-content:space-between;gap:16px;padding:4px 0}.v43-summary-small{font-size:13px;color:#5b6e61}.v43-transport-on .leaflet-overlay-pane{filter:none}
@media(max-width:760px){#v43-search-toggle{display:flex;justify-content:space-between;width:100%;font:700 14px sans-serif;border:0;background:transparent;color:#254d3c;padding:0 0 10px}#v43-search-toggle span{font-size:11px;font-weight:400}.explorer-heading{display:none}.v43-search-tools{gap:9px;margin:10px 0 6px}.v43-major-tags button{font-size:11px;padding:5px 8px}.explorer{max-height:48vh}.explorer.v43-collapsed>:not(#v43-search-toggle){display:none!important}.explorer.v43-collapsed #v43-search-toggle{padding:0}.v43-toll-selectors{grid-template-columns:1fr 1fr;gap:8px}.v43-fare-result{padding:18px}.v43-fare-result strong{font-size:23px}.travel-bar{gap:4px}.travel-bar button{font-size:11px;padding:8px}.v26-map-home{top:8px!important}.site-header .mission{display:none}}

@media(max-width:760px){.workspace .travel-bar{top:var(--v43-search-bottom,340px);left:12px;right:12px;z-index:1000;max-width:none;display:flex;justify-content:flex-start}.workspace .travel-bar button{min-height:36px;flex:0 1 auto}.workspace .leaflet-top.leaflet-right{top:calc(var(--v43-search-bottom,340px) + 48px)}}

/* V44: the existing search panel now offers prefecture OR checkboxes. */
.v44-pref-field{border:0;padding:0;margin:0;min-width:0}.v44-pref-field legend{font-size:12px;font-weight:700;color:#254d3b;margin-bottom:7px}.v44-pref-field legend small{font-weight:400;margin-left:6px;color:#617367}.v44-prefs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.v44-prefs label{display:flex;align-items:center;gap:3px;font-size:11px;white-space:nowrap;border:1px solid #d4dfd6;border-radius:6px;background:#fff;padding:7px 3px;cursor:pointer}.v44-prefs label:has(input:checked){border-color:#2e6950;background:#edf5ef;color:#245b46}.v44-prefs input{accent-color:#2e6950;margin:0;width:14px;height:14px;flex:none}.v44-prefs label:focus-within{outline:2px solid #e59b48;outline-offset:2px}#v44-pref-clear{background:transparent;border:0;color:#526f5c;text-decoration:underline;font-size:11px;padding:7px 0 0;cursor:pointer}.search-actions #list-button{white-space:nowrap}.search-actions{flex-wrap:wrap}#result-note{font-size:11px;line-height:1.5}.v44-prefs label:hover{border-color:#68957c}
@media(max-width:760px){.v44-prefs{gap:5px}.v44-prefs label{font-size:11px;padding:8px 3px}.explorer{max-height:53vh}.v43-search-tools{gap:8px}}
.site-header .brand{position:relative;display:inline-block;width:clamp(98px,17vw,167px);height:42px;background:url("/lab/v43-brand-logo.png") no-repeat left center;background-size:contain}
.site-header .brand>span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
#about-content::before{content:"";display:block;width:80px;height:80px;margin:0 auto 1rem;background:url("/lab/lab-character.png") no-repeat center/contain}

/* Keep the card header and navigation reachable while its details scroll on mobile. */
@media (max-width:760px) {
  .workspace .selection:not([hidden]) {
    display:flex;
    flex-direction:column;
    overflow:hidden;
    z-index:1100;
  }
  .workspace.access-opened .selection:not([hidden]) { display:none; }
  .selection .card-cover,
  .selection .card-cover:not(.placeholder),
  .selection .card-cover.placeholder {
    display:block;
    flex:none;
    min-height:48px;
  }
  .selection .card-cover .close-card {
    top:2px;
    right:5px;
    width:44px;
    height:44px;
    line-height:1;
    touch-action:manipulation;
  }
  .selection .card-body {
    min-height:0;
    overflow-y:auto;
    overscroll-behavior-y:contain;
  }
  .selection .card-nav { flex:none; }
  /* The map tools share the space below the card with the existing map-mode buttons. */
  .workspace.has-selection .leaflet-top.leaflet-right {
    top:auto;
    right:auto;
    bottom:22px;
    left:12px;
  }
  .workspace.has-selection .leaflet-control-zoom { display:flex; margin:0; }
  .workspace.has-selection .leaflet-control-zoom a { border-radius:0; border-bottom:0; }
}
@media (max-width:760px) and (max-height:700px) {
  .selection .card-cover:not(.placeholder) { height:48px; }
}

/* Post-publication map controls. Saved favorites/compare state remains unchanged. */
.v26-map-home{position:static!important;display:inline-flex;align-items:center;min-height:44px;padding:6px 10px!important;font-weight:700;white-space:nowrap;text-decoration:none;border:1px solid #cbd8cd;border-radius:8px;background:#fff}
body>a.v26-map-home{position:fixed!important;left:190px;right:auto!important;top:6px!important;z-index:1200}
.site-header .mission{margin-left:130px}
.v48-map-help{position:relative;font-size:12px;color:#254d3b}
.v48-map-help>summary{cursor:pointer;list-style:none;background:#fff;border:1px solid #bdcfc0;border-radius:7px;padding:10px 12px;min-height:40px;font-weight:700}
.v48-map-help>summary::after{content:' ▾'}
.v48-map-help[open]>summary::after{content:' ▴'}
.v48-map-help>div{position:absolute;right:0;top:calc(100% + 6px);background:#fff;border:1px solid #bdcfc0;box-shadow:0 5px 20px #193e3426;border-radius:10px;padding:12px 16px;width:min(300px,calc(100vw - 40px));max-height:min(58vh,420px);overflow:auto;line-height:1.65;z-index:1500}
.v48-map-help p{margin:0 0 10px}.v48-map-help p:last-child{margin-bottom:0}.map-top-right:has(.v48-map-help[open]){z-index:1250}
.v48-toll-hint{flex-basis:100%;margin:0;padding:4px 8px;color:#315947;font-size:11px;line-height:1.5;background:#fffffff2;border-radius:5px;max-width:355px}.v48-compare-help{display:block;font-size:10px;font-weight:400;margin-top:3px}
#share-copy-status:not(:empty){font-weight:700;color:#216044;padding:10px;background:#edf6ee;border-radius:6px}
#map-mode[hidden]{display:none!important}
@media(max-width:760px){body>a.v26-map-home{left:110px;top:5px!important;font-size:12px!important;min-height:40px;padding:4px 7px!important}.site-header .mission{margin-left:0}.site-header .brand{width:98px}.site-header nav{margin-left:auto}.site-header .about-button{display:none}.v48-map-help>summary{padding:9px;font-size:11px;min-height:36px}.map-top-right{gap:5px}.v48-toll-hint{max-width:none;padding:2px 6px;font-size:10px}.workspace .leaflet-top.leaflet-right{top:calc(var(--v43-search-bottom,340px) + var(--v48-toolbar-height,85px) + 8px)}.workspace.has-selection .leaflet-top.leaflet-right{top:auto}}
@media(max-width:760px){.v48-map-help>div{top:auto;bottom:calc(100% + 6px)}}

html.v48-map-embedded .v48-map-help>div{left:0;right:auto;top:calc(100% + 6px);bottom:auto;max-height:calc(100dvh - 85px)}

/* Keep only the contents scrollable so the native open/close control stays reachable. */
.explorer .search-when-closed { display:none; }
@media (max-width:760px), (orientation:landscape) and (max-height:520px) and (pointer:coarse) {
 details.explorer {
  top:max(12px,env(safe-area-inset-top));
  left:max(12px,env(safe-area-inset-left));
  right:max(12px,env(safe-area-inset-right));
  width:auto;
  max-height:none;
  overflow:visible;
 }
 details.explorer #v43-search-toggle {
  display:flex; justify-content:space-between; align-items:center;
  min-height:44px; padding:0; cursor:pointer;
  list-style:none; touch-action:manipulation;
 }
 #v43-search-toggle::-webkit-details-marker { display:none; }
 details.explorer:not([open]) .search-when-open { display:none; }
 details.explorer:not([open]) .search-when-closed { display:inline; }
 .explorer-content {
  max-height:max(44px,calc(var(--search-visible-height,100vh) * .53 - 66px - env(safe-area-inset-top)));
  overflow-y:auto; overscroll-behavior-y:contain;
 }
 .explorer-content .course-list { max-height:none; overflow:visible; }
 .explorer #query { font-size:16px; }
 #filters-dialog .dialog-head { position:sticky; top:0; z-index:1; background:var(--paper); }
 #filters-dialog .dialog-head [data-close] { min-width:44px; min-height:44px; }
}
@media (min-width:761px) and (orientation:landscape) and (max-height:520px) and (pointer:coarse) {
 details.explorer { width:334px; right:auto; padding:10px; }
 details.explorer #v43-search-toggle { font:700 14px sans-serif; color:#254d3c; }
 .workspace .selection:not([hidden]) {
  display:flex; flex-direction:column;
  max-height:calc(100% - 24px - env(safe-area-inset-bottom));
  bottom:max(12px,env(safe-area-inset-bottom));
 }
 .workspace.access-opened .selection:not([hidden]) { display:none; }
 .selection .card-cover { height:48px; flex:none; }
 .selection .card-cover .close-card { min-width:44px; min-height:44px; top:2px; }
 .selection .card-body { min-height:0; overflow-y:auto; }
 .selection .card-nav { flex:none; }
}
/* Recover an already folded panel if the window widens before script startup. */
@media (min-width:761px) {
 details.explorer:not([open]) #v43-search-toggle { display:block; cursor:pointer; }
 details.explorer:not([open]) .search-when-open { display:none; }
 details.explorer:not([open]) .search-when-closed { display:inline; }
 html:not(.v48-map-embedded) .workspace.has-selection:not(.access-opened) .leaflet-top.leaflet-right {
  right:calc(24px + 368px + 4px);
 }
}
@media (min-width:1400px) {
 html:not(.v48-map-embedded) .workspace.has-selection:not(.access-opened) .leaflet-top.leaflet-right {
  right:calc(32px + 395px + 4px);
 }
}
/* Reuse the current LAB palette and result rows; only their mobile placement changes. */
.mobile-results[hidden] { display:none; }
.mobile-results { display:none; }
@media (max-width:760px), (orientation:landscape) and (max-height:520px) and (pointer:coarse) {
 html:not(.v48-map-embedded) details.explorer #v43-search-toggle { display:flex; justify-content:space-between; gap:12px; }
 html:not(.v48-map-embedded) .mobile-results:not([hidden]) {
  position:absolute; z-index:1050;
  top:var(--results-top,88px);
  left:max(12px,env(safe-area-inset-left)); right:max(12px,env(safe-area-inset-right));
  display:flex; flex-direction:column;
  max-height:max(130px,min(62dvh,calc(var(--results-visible-height,100dvh) - var(--results-top,88px) - 14px - env(safe-area-inset-bottom))));
  background:var(--paper); color:var(--ink); border:1px solid var(--line);
  border-radius:13px; box-shadow:var(--shadow); overflow:hidden;
 }
 .mobile-results-head { flex:none; padding:12px 14px 10px; border-bottom:1px solid var(--line); }
 .mobile-results-head h2 { margin:0 0 8px; font-family:inherit; font-size:16px; line-height:1.5; font-weight:700; }
 .mobile-results-head h2:focus { outline:none; }
 .mobile-results-actions { display:flex; gap:8px; }
 .mobile-results-actions button { flex:1; min-height:44px; font-size:13px; }
 .mobile-results-body { min-height:0; overflow-y:auto; overscroll-behavior-y:contain; padding:0 14px; }
 .mobile-results .course-list { margin:0; padding:0; max-height:none; overflow:visible; }
 .mobile-results .list-row { min-height:75px; }
 .mobile-results .empty-state { margin:0; padding:20px 4px; font-size:14px; line-height:1.7; }
 .workspace.mobile-results-open .travel-bar,
 .workspace.mobile-results-open .map-message { visibility:hidden; }
 html:not(.v48-map-embedded) .workspace .map-message {
  top:calc(var(--v43-search-bottom,88px) + var(--v48-toolbar-height,85px) + 12px);
  left:12px; right:max(64px,env(safe-area-inset-right)); max-width:none; transform:none;
  max-height:calc(var(--results-visible-height,100dvh) - var(--v43-search-bottom,88px) - var(--v48-toolbar-height,85px) - 24px);
  overflow-y:auto;
 }
 .map-message [data-results-edit] { display:block; min-height:44px; margin-bottom:8px; font-weight:700; }
 html:not(.v48-map-embedded) .search-actions button { min-height:44px; }
}
@media (min-width:761px) and (orientation:landscape) and (max-height:520px) and (pointer:coarse) {
 html:not(.v48-map-embedded) .mobile-results:not([hidden]) { width:334px; right:auto; }
 .mobile-results-head { padding:6px 10px; }
 .mobile-results-head h2 { margin-bottom:2px; font-size:14px; }
 .mobile-results-actions button { padding:4px; }
 html:not(.v48-map-embedded) .workspace .map-message { left:358px; top:76px; max-height:calc(var(--results-visible-height,100dvh) - 90px); }
}
