#atlas-flow .mobile-only{display:none}
@media(max-width:650px){
 html,body{height:100%;overflow:hidden}body{padding:0!important;max-width:none}
 #atlas-flow{height:100svh;height:100dvh}
 #atlas-flow .app{height:100%;display:flex;flex-direction:column;border:0;border-radius:0;position:relative;overflow:hidden}
 #atlas-flow .atlas-masthead{flex:none;display:grid;grid-template-columns:1fr auto;align-items:center;padding:env(safe-area-inset-top) 12px 0;background:#fcf9f1;z-index:5;border-bottom:1px solid #ded5c4}
 #atlas-flow .brand-panel>.brand{padding:8px 0;gap:8px;flex-basis:auto}
 #atlas-flow .brand .brand-symbol{width:32px;height:32px}
 #atlas-flow .brand-wordmark{font-size:20px;letter-spacing:.09em}
 #atlas-flow .brand-slogan,#atlas-flow .brand-landscape{display:none!important}
 #atlas-flow .mobile-only{display:block}
 #atlas-flow .mobile-top-actions{grid-column:2;grid-row:1}
 #atlas-flow .navigation-panel{grid-column:1/-1;min-width:0}
 #atlas-flow .navigation-panel header{display:none;position:absolute;top:54px;left:12px;right:12px;padding:16px!important;box-shadow:0 12px 32px #243b3026;border:1px solid #ded5c4;border-radius:12px;background:#fcf9f1;z-index:12;gap:12px;max-height:65dvh;overflow:auto;overscroll-behavior:contain}
 #atlas-flow[data-mobile-settings=open] .navigation-panel header{display:flex}
 #atlas-flow .navigation-panel header label{width:100%;justify-content:space-between;flex:none}
 #atlas-flow .navigation-panel header label select{flex:none;min-width:150px;font-size:16px}
 #atlas-flow .mobile-map-sources{width:100%;font-size:13px}
 #atlas-flow .mobile-map-sources p{font-size:12px}
 #atlas-flow .navigation-panel header #atlas-home{display:none}
 #atlas-flow .navigation-panel .control-bar .toolbar{display:grid;grid-template-columns:110px minmax(0,1fr);padding:0 0 8px;gap:8px}
 #atlas-flow .navigation-panel .control-bar .toolbar .country-choice{width:auto;display:block}
 #atlas-flow #atlas-country-label{display:none}
 #atlas-flow #atlas-country,#atlas-flow #atlas-search{width:100%;min-height:44px;font-size:16px;box-sizing:border-box}
 #atlas-flow .crumbs,#atlas-flow footer{display:none}
 #atlas-flow .results{position:absolute;top:104px;left:8px;right:8px;margin:0;padding:12px;max-height:55dvh;overflow:auto;overscroll-behavior:contain;background:#fcf9f1;border:1px solid #ded5c4;border-radius:12px;box-shadow:0 12px 32px #243b3026;z-index:15}
 #atlas-flow .results button{width:100%;text-align:left}
 #atlas-flow .layout{flex:1;min-height:0;display:block;position:relative;border:0}
 #atlas-flow .map-area{height:100%;padding:0!important;display:flex;flex-direction:column;box-sizing:border-box}
 #atlas-flow .map-area .explore-paths{margin:0;padding:0 12px;border:0;flex:none;background:#fcf9f1}
 #atlas-flow .map-area .explore-paths button{font-size:14px;min-height:44px;padding:8px}
 #atlas-flow .map-title{font-size:18px!important;text-align:left!important;margin:0!important;padding:8px 12px;background:#f4eedf}
 #atlas-flow .map-help,#atlas-flow .legend,#atlas-flow .map-area .cartography{display:none}
 #atlas-flow .map-wrap{flex:1;min-height:0!important;border:0!important;border-radius:0!important;height:100%;}
 #atlas-flow .geo-map{width:100%;height:100%}
 #atlas-flow .map-controls{top:12px;right:10px;bottom:auto;flex-direction:column;z-index:2}
 #atlas-flow .region-pin{min-height:44px!important;padding:6px 8px!important;font-size:14px!important}
 #atlas-flow .sheet{position:absolute;bottom:0;left:0;right:0;margin:0;padding:0!important;border-radius:20px 20px 0 0;border:1px solid #d9cdb9;border-bottom:0;box-shadow:0 -6px 28px #283c3024;z-index:4;display:flex;flex-direction:column;box-sizing:border-box;overflow:hidden;height:50%;min-height:180px;max-height:100%;background:#fcf9f1}
 #atlas-flow .sheet[data-mobile-mode=peek]{height:calc(106px + env(safe-area-inset-bottom));min-height:0}
 #atlas-flow .sheet[data-mobile-mode=full]{height:100%;border-radius:12px 12px 0 0}
 #atlas-flow .mobile-sheet-head{display:block;flex:none;padding:0 12px 8px;border-bottom:1px solid #e6dfcf;background:#fcf9f1}
 #atlas-flow #mobile-sheet-grip{height:20px;display:grid;place-items:center;touch-action:none;cursor:ns-resize}
 #atlas-flow #mobile-sheet-grip::before{content:'';width:36px;height:4px;background:#bcbdad;border-radius:6px}
 #atlas-flow .mobile-sheet-row{display:flex;gap:10px;align-items:center;min-width:0}
 #atlas-flow .mobile-sheet-title{min-width:0;flex:1}
 #atlas-flow #mobile-sheet-name{display:block;font-size:16px;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--grapath-forest)}
 #atlas-flow #mobile-sheet-context{display:block;font-size:11px;line-height:1.3;color:#847052}
 #atlas-flow .mobile-sheet-row button{min-height:44px;padding:8px;font-size:13px;flex:none}
 #atlas-flow #atlas-sheet-toggle{display:none}
 #atlas-flow .sheet #atlas-panel{flex:1;min-height:0;max-height:none;overflow:auto;overscroll-behavior:contain;padding:16px 18px calc(24px + env(safe-area-inset-bottom));touch-action:pan-y}
 #atlas-flow .sheet[data-mobile-mode=peek] #atlas-panel{display:none}
 #atlas-flow .sheet #atlas-panel h2{font-size:27px}
 #atlas-flow .sheet #atlas-panel p{font-size:15px;line-height:1.6}
 #atlas-flow .appellation-inline{display:none}
 #atlas-flow .mobile-appellations{display:block;width:100%;margin-top:20px;text-align:left}
 #atlas-flow .region-directory{max-height:none;overflow:visible}
 #atlas-flow .saved-view{flex:1;min-height:0;overflow:auto;padding:20px}
 #atlas-flow .mobile-directory{position:absolute;inset:0;z-index:20;background:#fcf9f1;display:flex;flex-direction:column;padding:calc(12px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom));box-sizing:border-box}
 #atlas-flow .mobile-directory-header{display:flex;gap:12px;align-items:center;margin-bottom:16px}
 #atlas-flow .mobile-directory-header h2{font-size:23px;margin:0;flex:1}
 #atlas-flow #mobile-directory-search{font-size:16px;flex:none}
 #atlas-flow #mobile-directory-list{overflow:auto;overscroll-behavior:contain;flex:1;min-height:0;margin-top:16px;display:flex;flex-direction:column;gap:8px}
 #atlas-flow #mobile-directory-list button{flex:none;text-align:left;min-height:48px}
 /* Compact map tools and a dedicated full-reading surface. */
 #atlas-flow[data-map-style="6"] .map-controls{gap:5px}
 #atlas-flow[data-map-style="6"] .map-controls button{min-width:34px;min-height:34px;height:34px;padding:4px 7px;font-size:14px;border-radius:8px}
 #atlas-flow[data-map-style="6"] .mobile-sheet-row button{min-height:34px;padding:5px 8px;font-size:12px}
 #atlas-flow[data-mobile-reading=true] .map-area{display:none!important}
 #atlas-flow[data-mobile-reading=true] .navigation-panel .control-bar{display:none!important}
 #atlas-flow[data-mobile-reading=true] .results{display:none}
 #atlas-flow[data-mobile-reading=true] #atlas-sheet{inset:0;height:100%;min-height:0;max-height:100%;overflow:hidden;border-radius:0;box-shadow:none;border:0}
 #atlas-flow[data-mobile-reading=true] .mobile-sheet-head{padding-top:8px}
 #atlas-flow[data-mobile-reading=true] #mobile-sheet-grip{display:none}

}

@media(max-width:650px){#atlas-flow .mobile-directory{position:fixed;inset:0;z-index:2000}#atlas-flow #mobile-directory-count{flex:none;margin:6px 0}#atlas-flow #mobile-directory-alphabet{flex:none}#atlas-flow #mobile-directory-list{position:relative;max-height:none;margin-top:6px;gap:3px;padding:3px 0}#atlas-flow #mobile-directory-list .area-choice>button{min-height:44px;font-size:14px;padding:7px 10px}#atlas-flow #mobile-directory-alphabet button{min-width:32px;min-height:32px;font-size:11px;padding:2px 4px}}
