.mobile-map-path,.mobile-records-handle,.mobile-records-shade,.mobile-records-sheet{display:none}
@media(max-width:700px){
 .view-journal.is-active{grid-template-rows:auto auto}
 .journal-map-shell{min-height:0;height:var(--mobile-map-height,60dvh)}
 .journal-map-shell .map-toolbar{flex-wrap:nowrap;gap:8px;min-height:52px;backdrop-filter:none;-webkit-backdrop-filter:none;background:#e5e6e1}
 .journal-map-shell .map-path{width:auto;flex:1;min-width:0;overflow:visible}
 #journal-back,#journal-breadcrumbs,#panel-toggle,.map-toolbar .map-key,.map-toolbar .filter-label{display:none!important}
 .map-toolbar-actions{flex:0 0 auto;flex-wrap:nowrap}
 .mobile-map-path{display:flex;align-items:center;gap:10px;min-width:0}
 .mobile-map-path strong{font:500 14px/1.2 var(--sans);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .mobile-map-path details{position:relative;flex:none}
 .mobile-map-path summary{list-style:none;font-size:24px;min-width:44px;min-height:44px;display:grid;place-items:center;cursor:pointer}
 .mobile-map-path summary::-webkit-details-marker{display:none}
 .mobile-map-path nav{position:absolute;top:100%;left:0;min-width:190px;max-width:75vw;background:#eeeee8;box-shadow:0 10px 30px #0003;padding:8px;z-index:40}
 .mobile-map-path nav button{display:block;text-align:left;width:100%;min-height:44px;padding:10px;font-size:14px}
 .journal-map-shell #field-map,.journal-map-shell #field-map.with-drill-panel,.journal-map-shell #field-map.with-report-panel{inset:var(--toolbar-height,52px) 0 var(--mobile-records-height,76px)!important}
 .mobile-records-sheet{display:flex;flex-direction:column;position:fixed;bottom:0;left:12px;right:12px;z-index:32;max-height:100dvh;border:1px solid #bec7bb;border-bottom:0;border-radius:20px 20px 0 0;background:#f2f1ea;box-shadow:0 -6px 28px #0002;overflow:hidden;box-sizing:border-box;padding-bottom:env(safe-area-inset-bottom)}
 .mobile-records-open .mobile-records-sheet{height:68dvh}
 .mobile-records-full .mobile-records-sheet{height:100dvh;left:0;right:0;border-radius:0;padding-top:env(safe-area-inset-top);z-index:110}
 .mobile-records-sheet{transition:height .2s ease,left .2s ease,right .2s ease,border-radius .2s ease}
 .mobile-records-dragging .mobile-records-sheet{transition:none;z-index:110}
 body:has(.journal-map-shell.mobile-records-dragging) .site-header{visibility:hidden;pointer-events:none}
 @media(prefers-reduced-motion:reduce){.mobile-records-sheet{transition:none}}
 /* Preserve header space, but remove it from the full-screen sheet's view
    and hit testing even when an ancestor creates a separate stacking context. */
 body:has(.journal-map-shell.mobile-records-full) .site-header{visibility:hidden;pointer-events:none}
 .mobile-records-handle{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
 .mobile-records-handle{display:flex;flex:none;flex-direction:column;align-items:center;gap:5px;width:100%;border:0;border-radius:0;background:transparent;color:#233d2e;padding:9px 16px 14px;touch-action:none}
 .mobile-records-handle strong{font-size:16px}.mobile-records-handle>span:last-child{font-size:12px}
 .mobile-grip{height:4px;width:38px;background:#819080;border-radius:4px;margin-bottom:3px}
 .journal-map-shell .drill-panel,.journal-map-shell .report-panel{display:none!important;position:relative;inset:auto;width:100%;height:auto;min-height:0;max-height:none;flex:1;overflow-y:auto;z-index:auto;border:0;border-top:1px solid #d6d9d0;border-radius:0;padding:20px 18px;overscroll-behavior:contain;box-shadow:none;box-sizing:border-box;background:#f2f1ea;transform:none!important;opacity:1!important;pointer-events:auto!important}
 .journal-map-shell.mobile-records-open .drill-panel:not([hidden]),.journal-map-shell.mobile-records-open .report-panel:not([hidden]){display:block!important}
 .mobile-records-open .mobile-records-shade{display:block;position:fixed;inset:0;z-index:30;background:#0004}
 #map-filter-menu .category-dock{position:static;height:auto;display:block;border-top:1px solid #bcc5b8;margin-top:12px;background:transparent}
 #map-filter-menu .category-dock>button{display:none}
 #map-filter-menu .category-track{display:flex;flex-wrap:wrap;overflow:visible}
 #map-filter-menu .category-track button{min-width:0;min-height:44px;flex:1 1 45%;font-size:12px}
 .journal-map-shell .journal-story{z-index:35}
 html body .journal-map-shell .journal-story:not([hidden]){position:fixed;inset:0!important;z-index:111;max-height:100dvh;overflow-y:auto}
 body:has(.journal-story:not([hidden])) .site-header{visibility:hidden;pointer-events:none}
}
@media(max-width:700px){
 .journal-map-shell #map-filter-menu{position:fixed;inset:120px 12px 100px;width:auto;max-width:none;max-height:none;overflow-y:auto;overscroll-behavior:contain;z-index:45;box-sizing:border-box}
}
