/* A separate touch app. Every map/editor override is scoped to app layout. */
[hidden]#mapApplication,[hidden]#appInstall,[hidden]#appBootStatus { display:none!important; }
.app-no-script { padding:24px; }
.app-display-check { box-sizing:border-box;width:min(440px,calc(100% - 32px));max-height:calc(var(--app-viewport-height,100dvh) - 48px);padding:20px;margin:auto;border:1px solid var(--app-line);border-radius:20px;background:var(--app-surface);color:var(--app-ink);box-shadow:var(--app-shadow);overflow:auto;font:400 15px/1.45 var(--font-body); }
.app-display-check::backdrop { background:#0b203b66;backdrop-filter:blur(3px); }
.app-display-check header { display:flex;align-items:center;gap:12px; }
.app-display-check h2 { flex:1;margin:0;font:600 22px/1.2 var(--font-body); }
.app-display-check button { width:44px;height:44px;border:0;border-radius:12px;background:var(--app-selected);color:var(--app-ink);font:28px var(--font-body); }
.app-display-check p { margin:12px 0 18px;color:var(--app-muted); }
.app-display-check dl { display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:0 12px;margin:0;font-size:14px; }
.app-display-check :is(dt,dd) { margin:0;padding:8px 0;border-bottom:1px solid var(--app-line);overflow-wrap:anywhere; }
.app-display-check dt { font-weight:600; }
body.app-install-required { background:#f4f7fb;overflow:auto; }
#appInstall { min-height:100dvh;display:grid;place-items:center;padding:max(32px,env(safe-area-inset-top)) max(24px,env(safe-area-inset-right)) max(32px,env(safe-area-inset-bottom)) max(24px,env(safe-area-inset-left));box-sizing:border-box;background:radial-gradient(ellipse at 80% 10%,#d6e5ee,transparent 55%),#f4f7fb;color:#193c5b;font:16px/1.6 var(--font-body,system-ui,sans-serif); }
.app-install-card { width:min(420px,100%); }
.app-install-icon { border-radius:23px;box-shadow:0 12px 24px #123f6920; }
.app-install-brand { margin-top:22px;font-size:13px;font-weight:700;letter-spacing:.12em; }
#appInstall h1 { margin:8px 0 12px;font:700 clamp(28px,7vw,38px)/1.15 var(--font-body,system-ui);letter-spacing:-.8px; }
#appInstall p { margin:0 0 24px;color:#546e85; }
#appInstall ol { list-style:none;margin:28px 0;padding:0;display:grid;gap:20px; }
#appInstall li { display:flex;align-items:start;gap:16px; }
#appInstall li>span { width:30px;height:30px;border-radius:50%;display:grid;place-items:center;flex:none;background:#e1ebf2;color:#174469;font-size:14px;font-weight:700; }
#appInstall li>div { padding-top:2px; }
#appInstall #appInstallButton { width:100%;padding:14px;border:0;border-radius:12px;background:#153f6b;color:white;font:600 17px var(--font-body,system-ui); }
#appInstall details { border-top:1px solid #d1dee7;padding-top:18px;font-size:14px; }
#appInstall summary { cursor:pointer;font-weight:600;min-height:44px; }
#appInstall details p { margin:6px 0 14px;font-size:14px; }
.app-install-language { margin-top:20px;min-height:44px;padding:8px 0;background:none;border:0;color:#174d76;font:600 14px var(--font-body,system-ui); }

html:is([data-app-layout=phone],[data-app-layout=tablet]) {
 --app-safe-top:env(safe-area-inset-top,0px);--app-safe-bottom:env(safe-area-inset-bottom,0px);
 --app-nav-height:calc(70px + var(--app-safe-bottom));--app-header-height:calc(60px + var(--app-safe-top));
 --app-surface:#f8fafc;--app-raised:#fff;--app-ink:#183c5b;--app-muted:#607b90;--app-line:#d3e0ea;--app-selected:#e1edf5;
 --app-shadow:0 8px 28px #0e345524;--mobile-control-top:var(--app-header-height);--workspace-width:100%;
}
html[data-theme=dark]:is([data-app-layout=phone],[data-app-layout=tablet]) { --app-surface:#15212e;--app-raised:#1e2f41;--app-ink:#edf4fc;--app-muted:#afc5d6;--app-line:#3c566b;--app-selected:#2d4d65; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) body {
 background:var(--app-surface);
 position:fixed;top:var(--app-viewport-top,0px);left:var(--app-viewport-left,0px);
 width:var(--app-viewport-width,100%);height:var(--app-viewport-height,100dvh);
 contain:layout;
}
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-settings-desktop-appearance { display:none; }
/* Keep native pinch zoom available; prevent input-focus and double-tap control zoom. */
html:is([data-app-layout=phone],[data-app-layout=tablet]) :is(input,textarea,select,[contenteditable=true]) { font-size:16px!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) :is(button,a,summary,label) { touch-action:manipulation; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #mapSearch :is(h3,h4,.form-label) { font-family:var(--font-body,system-ui)!important;font-size:14px!important;letter-spacing:0; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #mapApplication { width:100%!important;height:var(--app-viewport-height,100dvh)!important;transform:none!important;container-type:normal!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) :is(#mainMapToolbar,#viewModeToolbar,.navbar,#mobileLayersButton,#btnWorkspace,#btnAccount,#userLayersButton,#hudExitButton,#featureCategoryLauncher) { display:none!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #optionPanel :is(#featureTabUserLayers,#featureHeadingTabUserLayers) {display:none!important;}
html:is([data-app-layout=phone],[data-app-layout=tablet]) #toolbarContainer { display:contents!important;transform:none!important;contain:none!important; }
#mobileAppShell { font:500 15px/1.4 var(--font-body,system-ui,sans-serif);color:var(--app-ink); }
#mobileAppShell [hidden] { display:none!important; }
#mobileAppShell button { display:flex;align-items:center;justify-content:center;gap:8px;min-width:44px;min-height:44px;border:0;cursor:pointer;font:inherit;color:inherit;touch-action:manipulation;-webkit-tap-highlight-color:transparent; }
#mobileAppShell button:disabled { opacity:.45; }
#mobileAppShell button:focus-visible { outline:3px solid #559ac5;outline-offset:2px; }
#mobileAppShell svg { width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round;flex:none; }
.app-header { position:fixed;z-index:2100;inset:0 0 auto;height:var(--app-header-height);box-sizing:border-box;display:flex;align-items:center;justify-content:center;padding:var(--app-safe-top) max(16px,env(safe-area-inset-right)) 0 max(16px,env(safe-area-inset-left));background:transparent;border:0;pointer-events:none; }
.app-header button { pointer-events:auto; }
.app-brand { padding:0;background:none; }
.app-brand img { object-fit:contain;width:min(108px,calc(100vw - 112px));height:23px; }
.app-brand img[hidden] { display:none!important; }
.app-header-actions { display:flex;gap:6px;position:absolute;right:max(16px,env(safe-area-inset-right)); }
.app-header-actions button { background:transparent;border-radius:50%;box-shadow:none; }
.app-header-actions svg { filter:drop-shadow(0 0 2px var(--app-raised)) drop-shadow(0 0 3px var(--app-raised)); }
.app-brand img { filter:drop-shadow(0 1px 3px #fff); }
.app-navigation { position:fixed;z-index:6100;inset:auto 0 0;height:var(--app-nav-height);box-sizing:border-box;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-items:start;gap:4px;padding:6px 10px var(--app-safe-bottom);background:var(--app-raised);border-top:1px solid var(--app-line);box-shadow:0 -4px 24px #183c5b12; }
#mobileAppShell .app-navigation button { min-height:57px;flex-direction:column;gap:4px;background:transparent;border-radius:14px;font-size:11px;font-weight:600; }
#mobileAppShell .app-navigation button { pointer-events:auto;color:var(--app-ink);text-shadow:0 1px 3px var(--app-raised),0 0 8px var(--app-raised); }
#mobileAppShell .app-navigation svg { filter:drop-shadow(0 0 2px var(--app-raised)) drop-shadow(0 0 3px var(--app-raised)); }
#mobileAppShell .app-navigation button[aria-pressed=true] { background:color-mix(in srgb,var(--app-selected) 78%,transparent);backdrop-filter:blur(12px);color:var(--app-ink); }
.app-map-controls { position:fixed;right:max(12px,env(safe-area-inset-right));top:calc(var(--app-header-height) + 12px);z-index:1800;display:grid;gap:8px;justify-items:end; }
#mobileAppShell :is(.app-map-controls,.app-field-actions) button { background:var(--app-raised);box-shadow:0 2px 10px #12344d1a;border:1px solid var(--app-line);border-radius:16px;min-width:46px;height:46px;font-size:24px;text-shadow:none; }
#mobileAppShell :is(.app-map-controls,.app-field-actions) svg { filter:drop-shadow(0 0 2px var(--app-raised)) drop-shadow(0 0 3px var(--app-raised)); }
#mobileAppShell .app-view-toggle { font-size:15px;font-weight:700;text-shadow:0 1px 3px var(--app-raised),0 0 6px var(--app-raised); }
.app-sheet { position:fixed;z-index:5900;inset:auto 0 var(--app-nav-height);max-height:calc(var(--app-viewport-height,100dvh) - var(--app-header-height) - var(--app-nav-height) - 12px);background:var(--app-surface);border:1px solid var(--app-line);border-radius:24px 24px 0 0;box-shadow:0 -8px 32px #183c5b20;display:flex;flex-direction:column;overflow:hidden; }
.app-sheet>header { display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 20px;border-bottom:1px solid var(--app-line);flex:none; }
.app-sheet h2 { margin:0;font:700 20px var(--font-body,system-ui); }
.app-sheet>header button { border-radius:50%;background:var(--app-selected); }
.app-tools-content { overflow:auto;overscroll-behavior:contain;padding:8px 16px 20px; }
.app-tools-content section { margin:8px 0 20px; }
.app-tools-content h3 { font-size:12px;font-weight:700;letter-spacing:.04em;color:var(--app-muted);margin:14px 4px 10px; }
.app-tool-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px; }
#mobileAppShell .app-tool-grid button { justify-content:flex-start;min-height:66px;gap:12px;padding:12px;background:var(--app-raised);border:1px solid var(--app-line);border-radius:14px;text-align:left;font-size:14px; }
#mobileAppShell .app-tool-grid button>span:not(.app-tool-state) { flex:1; }
.app-tool-state { width:5px;height:5px;border-radius:50%;background:transparent; }
[aria-pressed=true]>.app-tool-state { background:#2b82b5; }
.app-operation { position:fixed;bottom:calc(var(--app-nav-height) + 14px);left:16px;right:16px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 12px 8px 18px;background:var(--app-raised);border:1px solid var(--app-line);border-radius:18px;box-shadow:var(--app-shadow);z-index:1900; }
.app-operation button { border-radius:12px;background:var(--app-selected);padding:8px 16px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .esri-ui-bottom-right:has([class*="measurement"]) { bottom:72px!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) [class*="measurement"].esri-widget { max-width:calc(100vw - 30px);border-radius:16px;overflow:hidden; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) [class*="measurement"] :is(button,select) { min-height:44px; }
#mobileAppShell .app-layer-resume { position:fixed;top:calc(var(--app-safe-top) + 12px);left:max(12px,env(safe-area-inset-left));z-index:4500;border-radius:12px;background:var(--app-raised);box-shadow:var(--app-shadow); }

/* Map search is a full-width, dedicated search surface when expanded. */
html:is([data-app-layout=phone],[data-app-layout=tablet]) #mapApplication #mapSearch { position:fixed!important;top:calc(var(--app-header-height) + 10px)!important;left:12px!important;right:12px!important;width:auto!important;max-width:none!important;z-index:2300; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #mapSearch .map-search__bar { width:100%!important;min-height:50px!important;border-radius:16px!important;background:var(--app-raised)!important;border:1px solid var(--app-line)!important;box-shadow:var(--app-shadow)!important;padding:0 8px!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #mapSearch .map-search__bar::before { display:none!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #mapSearch .map-search__input { display:block!important;visibility:visible!important;font-size:16px!important;min-width:0!important;flex:1!important;color:var(--app-ink)!important;background:transparent!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #mapSearch .map-search__mode { min-width:76px!important;height:44px!important;margin-right:6px;padding:0 10px!important;border:1px solid var(--app-line)!important;border-radius:10px;background:var(--app-selected)!important;font:600 13px/1 var(--font-body)!important;letter-spacing:0;text-transform:none;max-width:none!important;color:var(--app-ink)!important;box-shadow:none!important;text-shadow:none!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #mapSearch .map-search__mode:focus-visible { outline:2px solid var(--app-ink);outline-offset:2px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #mapSearch .map-search__icon-button { display:flex!important;flex:0 0 44px!important;width:44px!important;min-width:44px!important;height:44px!important;margin:0!important;background:transparent!important;color:var(--app-ink)!important;text-shadow:none!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #mapSearch #mapSearchOptions { display:none!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #mapSearchClear[hidden] { display:none!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #mapSearch.is-open { bottom:var(--app-nav-height);background:var(--app-surface);border-radius:18px 18px 0 0;display:flex;flex-direction:column; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .map-search__panel { max-height:none!important;flex:1;overflow:auto;background:var(--app-surface);padding:16px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #mapSearch #results { max-height:none; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #mapSearch.is-open #mapSearchPanel { flex:1 1 0;min-height:0;max-height:none!important;overflow-x:hidden!important;overflow-y:auto!important;touch-action:pan-y;overscroll-behavior:contain;-webkit-overflow-scrolling:touch; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #mapSearch #results { overflow:visible!important;touch-action:pan-y; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .autocomplete-dropdown {z-index:6500;box-sizing:border-box;border:1px solid var(--app-line);border-radius:14px;background:var(--app-raised);box-shadow:var(--app-shadow);overscroll-behavior:contain;touch-action:pan-y;-webkit-overflow-scrolling:touch;}
html:is([data-app-layout=phone],[data-app-layout=tablet]) .autocomplete-item {min-height:44px;box-sizing:border-box;padding:12px 16px;color:var(--app-ink);border-bottom:1px solid var(--app-line);font:500 15px/1.4 var(--font-body);}
html:is([data-app-layout=phone],[data-app-layout=tablet]) .autocomplete-item:hover {background:var(--app-selected);color:var(--app-ink);}
html:is([data-app-layout=phone],[data-app-layout=tablet]) .autocomplete-dropdown.is-inline {position:relative;z-index:auto;width:auto;flex:none;margin:8px 0 12px;box-shadow:none;}
html:is([data-app-layout=phone],[data-app-layout=tablet]) #mapSearch :is(button,select,input:not([type=checkbox])) { min-height:44px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #mobileSearchHeader { display:flex!important; }

/* Catalog uses one scroll area and horizontal category tabs. */
html:is([data-app-layout=phone],[data-app-layout=tablet]) #optionPanel { display:none!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #optionPanel.feature-panel-expanded { position:fixed!important;display:flex!important;inset:auto 0 var(--app-nav-height)!important;width:100%!important;max-width:none!important;height:min(64dvh,calc(var(--app-viewport-height,100dvh) - var(--app-header-height) - var(--app-nav-height)))!important;max-height:none!important;border:1px solid var(--app-line);border-radius:24px 24px 0 0!important;background:var(--app-surface)!important;box-shadow:0 -8px 32px #183c5b22;z-index:5800;transform:none!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #optionPanel.app-sheet-tall { height:calc(var(--app-viewport-height,100dvh) - var(--app-header-height) - var(--app-nav-height) - 8px)!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #featurePanelBody { display:flex!important;flex-direction:column;min-height:0;width:100%;padding:0; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #featurePanelBody[hidden] { display:none!important; }
.app-sheet-handle { display:block;width:100%;height:23px;min-height:23px!important;border:0;background:transparent;flex:none;touch-action:manipulation;order:-1; }
.app-sheet-handle::after { content:'';display:block;width:36px;height:4px;border-radius:4px;background:var(--app-line);margin:auto; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .mobile-layers-heading { display:flex!important;padding:0 16px 12px;align-items:center;justify-content:space-between;background:transparent;color:var(--app-ink); }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .mobile-layers-heading strong { font:700 20px var(--font-body); }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .mobile-layers-heading button { min-height:44px;border:0;border-radius:12px;background:var(--app-selected);color:var(--app-ink);font:600 13px var(--font-body);padding:8px 12px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .feature-panel-heading { padding:0!important;display:block;flex:none; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .feature-panel-tabs { display:flex!important;overflow-x:auto;flex-wrap:nowrap!important;gap:4px;padding:0 14px 10px;scrollbar-width:none; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .feature-panel-tab { flex:none;min-height:44px;min-width:70px;padding:10px 14px;border-radius:12px!important;font:600 14px var(--font-body)!important;letter-spacing:0;text-transform:none;background:var(--app-raised);color:var(--app-ink); }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #featurePanelCloseBtn { display:none; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #panelScrollContent { flex:1;min-height:0;overflow:auto;padding:8px 14px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .layer-item { min-height:52px!important;padding:12px!important;border-radius:12px;margin-bottom:6px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .layer-item :is(input[type=checkbox],input[type=radio]) { width:22px!important;height:22px!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #optionPanel :is(.layer-title-zoom,.active-layer-name,.active-layers-header,.map-opacity-title,#toggleSelectedBtn,#panelBottom h3) { color:var(--app-ink)!important;text-shadow:none!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #optionPanel #list-basemaps .layer-item label { color:var(--app-ink)!important;font:600 15px/1.35 var(--font-body)!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #optionPanel #list-basemaps .layer-item.is-disabled label { color:var(--app-muted)!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .layer-title-zoom { min-height:44px;font:600 15px/1.3 var(--font-body)!important;text-align:left; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #activeLayersZone { flex:none;max-height:28vh;overflow:auto;color:var(--app-ink); }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #mobileActiveLayersToggle { color:var(--app-ink)!important;text-shadow:none;padding:10px 14px;margin:0 14px 8px;border:0;border-radius:10px;background:var(--app-selected);min-height:44px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #panelBottom :is(h2,span) { color:var(--app-ink)!important;font-size:13px;text-shadow:none; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #panelBottom { padding:12px 18px!important;flex:none;color:var(--app-ink); }

/* Workspaces are screens on phones and a companion pane on tablets. */
html:is([data-app-layout=phone],[data-app-layout=tablet]) .workspace-panel { height:calc(var(--app-viewport-height,100dvh) - var(--app-nav-height))!important;max-height:none!important;inset:0 0 auto!important;width:100%!important;border:0;box-shadow:none;animation:none; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-header { min-height:calc(60px + var(--app-safe-top));padding:calc(8px + var(--app-safe-top)) 16px 8px;box-sizing:border-box;background:var(--app-raised);color:var(--app-ink);border-bottom:1px solid var(--app-line); }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .workspace-panel { background:var(--app-surface)!important;backdrop-filter:none; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .workspace-panel .ws-header-title { font-size:20px;color:var(--app-ink)!important;text-shadow:none; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-header::before { display:none; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .workspace-panel .ws-header-round { background:var(--app-selected);border:0;box-shadow:none;color:var(--app-ink); }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-header-mark::after { width:12px;height:12px;background:none;border:solid var(--app-ink);border-width:0 0 2px 2px;transform:translate(-35%,-50%) rotate(45deg); }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-header-mark::before { display:none; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-header :is(.ws-header-round,.ws-profile) { min-width:44px;min-height:44px;color:var(--app-ink); }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-main { padding:16px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) :is(.workspace-panel,.ws-content-dialog) :is(button,select,input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=range])) { min-height:44px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) :is(.workspace-panel,.ws-content-dialog) :is(input,select,textarea) { font-size:16px!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-layer-toolbar { overflow-x:auto;flex-wrap:nowrap;flex:none;gap:4px;padding:8px;height:auto;min-height:80px;box-sizing:border-box; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-layer-tool { flex:none;min-width:70px!important;min-height:64px!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-inspector { width:100%;max-width:100%; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-inspector-content { min-width:0; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) :is(.ws-feature-layout,.ws-feature-fields,.ws-settings-layout,.ws-settings-columns,.ws-create-details,.ws-label-layout,.ws-gallery-editor-layout,.ws-scene-editor-layout) { grid-template-columns:minmax(0,1fr); }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-feature-list { max-height:180px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-data-record-layout { grid-template-columns:64px minmax(0,1fr); }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-inspector-scroll[data-tool=fields_tool] { overflow:auto; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-data-record-layout { min-height:300px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-inspector-header { min-height:44px;padding:4px 8px; }
.app-layer-fit { margin-left:auto; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-data-summary { flex-wrap:nowrap; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-data-summary strong { margin-right:auto; }
.app-record-options { flex:none;border:1px solid var(--app-line);border-radius:12px;background:var(--app-raised); }
.app-record-options>summary { min-height:44px;box-sizing:border-box;padding:12px;font-size:13px;font-weight:600;cursor:pointer; }
.app-record-options[open] { padding:0 10px 10px; }
.app-record-options :is(.ws-data-summary-actions,.ws-data-record-filter,.ws-data-filter-rules) { margin:8px 0 0; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .workspace-panel .ws-data-record-number { min-height:32px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-data-record-attributes { grid-template-columns:minmax(0,1fr); }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-data-record-filter { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-data-record-filter input { grid-column:1/-1; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-map-legends { bottom:calc(var(--app-nav-height) + 72px);max-height:18dvh; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) body.workspace-open .ws-map-legends { display:none; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) :is(.ws-wizard-footer,.ws-feature-footer) { position:sticky;bottom:0;padding:12px;background:var(--app-raised);border-top:1px solid var(--app-line);z-index:4;flex-wrap:wrap; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-explorer-columns { display:none; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-explorer-row { display:grid;grid-template-columns:44px minmax(0,1fr) 44px;grid-template-rows:auto auto;min-height:78px;padding:12px;gap:4px 10px;border-radius:12px;margin:4px 0;background:var(--app-raised);border:1px solid var(--app-line); }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-explorer-row>svg { grid-row:1/3; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-explorer-name { grid-column:2;font-size:15px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-explorer-type { grid-column:2;font-size:12px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-explorer-date { display:none; }
.ws-explorer-touch-actions { display:none; }
.ws-explorer-touch-select { display:none!important; }
.ws-explorer-touch-sort { display:none!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-explorer-touch-sort { display:block!important;max-width:120px;padding:6px;background:var(--app-raised);border:1px solid var(--app-line);border-radius:10px;color:var(--app-ink); }
html:is([data-app-layout=phone],[data-app-layout=tablet]) button.ws-explorer-name { background:transparent;border:0;padding:0;min-height:32px!important;text-align:left;color:var(--app-ink);font-weight:600; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-explorer-touch-select { display:block!important;grid-column:1;grid-row:1/3;width:44px;min-width:44px;min-height:44px!important;align-self:center;padding:0;border:1px solid var(--app-line);border-radius:12px;background:transparent;color:transparent; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-explorer-touch-select[aria-pressed=true] { background:#153f6b;color:white; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-explorer-row>svg { display:none; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-explorer-touch-actions { display:flex;grid-column:3;grid-row:1/3;align-items:center;pointer-events:auto; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) :is(.ws-explorer-touch-select,.ws-explorer-more,button.ws-explorer-name) { pointer-events:auto!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-explorer-touch-actions button { min-width:44px;border:0;border-radius:12px;background:var(--app-selected);color:var(--app-ink);font-size:22px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-explorer-context-menu { inset:auto 12px calc(var(--app-nav-height) + 12px)!important;width:auto;max-height:65dvh;overflow:auto;border-radius:18px;padding:8px;z-index:7000; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-explorer-context-item { width:100%;min-height:48px!important;font-size:15px;text-align:left;border-radius:10px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-explorer-selected,html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-explorer-help { font-size:12px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-sheet { position:fixed;inset:var(--app-safe-top) 0 var(--app-nav-height)!important;width:100%!important;max-width:none!important;max-height:none!important;height:auto!important;z-index:5500; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-sheet-top { flex-wrap:wrap;padding:12px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-sheet-tools { flex-wrap:wrap;gap:8px;padding:10px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-sheet-filter-group { flex-wrap:wrap; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-sheet-scroll { touch-action:pan-x pan-y; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-user-cart { position:fixed!important;inset:auto 12px calc(var(--app-nav-height) + 12px)!important;width:auto!important;max-width:none!important;max-height:65dvh!important;border-radius:18px;z-index:5800; }

/* Dialogs, media and information share full-screen phone navigation. */
html:is([data-app-layout=phone],[data-app-layout=tablet]) :is(.modal,.layer-info-panel,.locate-panel,.share-panel,.elevation-profile-panel) { max-width:100vw; }
html[data-app-layout=phone] :is(dialog.ws-content-dialog,dialog.ws-home-editor,#mapExportDialog):not(.ws-collection-properties):not(.guru-folder-dialog):not(.app-pin-details) { position:fixed;inset:0!important;margin:0!important;width:100%!important;max-width:100%!important;height:var(--app-viewport-height,100dvh)!important;max-height:var(--app-viewport-height,100dvh)!important;border:0;border-radius:0!important; }
html[data-app-layout=phone] :is(dialog.ws-content-dialog,dialog.ws-home-editor,#mapExportDialog)>header { padding-top:calc(12px + var(--app-safe-top)); }
html[data-app-layout=phone] :is(dialog.ws-content-dialog,dialog.ws-home-editor,#mapExportDialog)>footer { padding-bottom:calc(12px + var(--app-safe-bottom)); }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .modal .modal-content { width:calc(100% - 24px)!important;max-height:calc(var(--app-viewport-height,100dvh) - 32px);margin:auto;padding:20px;border-radius:20px;overflow:auto; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .modal .modal-content>button { position:sticky;top:0;float:right;min-width:44px;min-height:44px;z-index:2; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #layerInfoPanel { display:flex!important;flex-direction:column;position:fixed!important;inset:auto 12px calc(var(--app-nav-height) + 12px)!important;width:auto!important;height:auto;max-height:60dvh!important;z-index:6200;transform:none!important;border-radius:20px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #layerInfoPanel .layer-info-panel__header { flex:none;grid-template-columns:minmax(0,1fr) 44px;background:var(--app-raised); }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #layerInfoPanel .layer-info-panel__close { width:44px;height:44px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #layerInfoContent { flex:1;min-height:0;font-size:14px;background:var(--app-surface); }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #layerInfoContent .layer-info-record__value { font-size:14px;line-height:1.6;overflow-wrap:anywhere; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #layerInfoPanel[hidden] { display:none!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #timePeriodPanel { position:fixed;inset:auto 16px calc(var(--app-nav-height) + 16px);width:auto;height:auto;z-index:2200;padding:12px;background:var(--app-raised);border:1px solid var(--app-line);border-radius:18px;box-shadow:var(--app-shadow); }
.app-tool-heading { display:flex;align-items:center;justify-content:space-between;gap:12px; }
.app-tool-heading button { min-width:44px;min-height:44px;background:none;color:inherit;border:0;font-size:22px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .time-period-slider__tick { min-height:44px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) :is(#locatePanel,#sharePanel) { position:fixed;inset:auto 12px calc(var(--app-nav-height) + 14px)!important;width:auto!important;max-height:60dvh;z-index:6200;border-radius:20px;overflow:auto; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #elevationProfilePanel { position:fixed;top:auto!important;bottom:var(--app-nav-height)!important;left:0!important;right:0!important;width:100%!important;max-width:none;height:auto;max-height:55dvh;overflow:auto;z-index:5700;padding:8px 12px;background:var(--app-raised);color:var(--app-ink); }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #elevationProfilePanel .elevation-panel-header { position:sticky;top:-8px;z-index:3;background:var(--app-raised);align-items:center;cursor:default;touch-action:pan-y; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #elevationProfilePanel .elevation-toolbar { position:static;display:flex;flex-direction:column;gap:8px;pointer-events:auto; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #elevationProfilePanel .elevation-chart { height:180px;touch-action:pan-y; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #elevationProfilePanel.is-compact .elevation-chart { height:120px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #elevationProfilePanel :is(.elevation-left,.elevation-summary) { width:100%;padding:0;background:none; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #elevationProfilePanel .elevation-summary { display:flex;flex-direction:column;gap:8px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #elevationProfilePanel .elevation-stats { display:grid;grid-template-columns:repeat(6,minmax(0,1fr));width:100%;gap:6px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #elevationProfilePanel .elevation-stat { align-items:start; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #elevationProfilePanel .elevation-stat dd { font-size:15px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #elevationProfilePanel :is(.elevation-fly-actions,.elevation-controls) { display:grid;grid-template-columns:1fr 1fr;gap:8px;width:100%; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #elevationProfilePanel :is(button,select) { min-height:44px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #elevationProfilePanel .elevation-status { text-align:left;width:100%; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #elevationProfilePanel :is(.elevation-hover-readout,.elevation-ends,.elevation-close,.elevation-compact,.elevation-stat dt,.elevation-controls label) { color:var(--app-ink); }
.app-profile-settings { width:100%;border:1px solid var(--app-line);border-radius:12px;background:var(--app-surface); }
.app-profile-settings>summary { padding:12px;min-height:44px;box-sizing:border-box;font-weight:600;cursor:pointer; }
.app-profile-settings[open] { padding:0 10px 10px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) body.is-elevation-profile .app-operation { display:none!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) :is(.esri-attribution,.google-map-attribution) { bottom:calc(var(--app-nav-height) + 4px)!important;max-width:calc(100% - 18px); }

/* Export: one stage at a time on phones; controls and preview together on tablets. */
.app-export-views { display:none; }
.app-pdf-zoom { display:none; }
.app-export-status,.app-jpg-actions { display:none; }
html[data-app-layout=phone] #mapExportDialog[data-app-export-view=preview] .app-export-status { display:block;position:absolute;top:8px;left:16px;right:16px;z-index:4;padding:10px 12px;background:var(--app-raised);color:var(--app-ink);border:1px solid var(--app-line);border-radius:12px;font-size:13px; }
html[data-app-layout=phone] #mapExportDialog .app-export-status[hidden] { display:none; }
html[data-app-layout=phone] .app-jpg-actions { display:flex;position:absolute;bottom:12px;left:12px;z-index:4;gap:6px; }
html[data-app-layout=phone] .app-jpg-actions button { background:#153f6b;color:white;border-radius:12px;padding:10px 14px;box-shadow:var(--app-shadow); }
html[data-app-layout=phone] #mapExportDialog #jpgZoom { top:12px;bottom:auto; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #pdfWorkspace { position:relative; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .app-pdf-zoom { position:absolute;bottom:calc(12px + var(--app-safe-bottom));right:12px;display:flex;gap:6px;z-index:3; }
html[data-app-layout=phone] #mapExportDialog[data-app-export-view=settings] .app-pdf-zoom { display:none; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .app-pdf-zoom button { min-width:44px;box-shadow:var(--app-shadow); }
html[data-app-layout=phone] #mapExportDialog .app-export-views { display:flex;gap:6px;padding:8px 16px;background:var(--app-surface);border-bottom:1px solid var(--app-line); }
html[data-app-layout=phone] #mapExportDialog .app-export-views button { min-height:44px;flex:1;background:var(--app-raised); }
html[data-app-layout=phone] #mapExportDialog .app-export-views [aria-pressed=true] { background:#153f6b;color:white; }
html[data-app-layout=phone] #mapExportDialog :is(#pdfWorkspace,.jpg-workspace) { display:flex;flex-direction:column;overflow:hidden; }
html[data-app-layout=phone] #mapExportDialog :is(#exportSettings,.jpg-settings) { flex:1;overflow:auto;padding:16px;border:0; }
html[data-app-layout=phone] #mapExportDialog :is(.export-preview,.jpg-preview) { flex:1;min-height:0; }
html[data-app-layout=phone] #mapExportDialog[data-app-export-view=settings] :is(.export-preview,.jpg-preview),html[data-app-layout=phone] #mapExportDialog[data-app-export-view=preview] :is(#exportSettings,.jpg-settings) { display:none; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #mapExportDialog :is(button,select,input:not([type=range]):not([type=color])) { min-height:44px;font-size:16px; }

/* Street View uses the panorama above a small map, with reachable history chips. */
html[data-app-layout=phone] body.is-street-view-open #mapWrapper { top:var(--app-header-height)!important;bottom:var(--app-nav-height)!important;height:auto!important;display:flex!important;flex-direction:column!important; }
html[data-app-layout=phone] body.is-street-view-open #viewDiv { flex:0 0 30%!important;width:100%!important;height:30%!important;order:2; }
html[data-app-layout=phone] body.is-street-view-open #viewDivRight { flex:0 0 70%!important;width:100%!important;height:70%!important;order:1; }
html[data-app-layout=phone] body.is-street-view-open .street-view-panel { inset:0; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .street-view-picker { position:fixed!important;top:calc(var(--app-header-height) + 8px)!important;right:12px!important;left:12px!important;width:auto!important;max-width:none;z-index:4200; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .street-view-controls { display:flex;gap:4px;flex-wrap:nowrap;width:100%;box-sizing:border-box; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .street-view-controls button { min-width:44px!important;min-height:44px!important;flex:0 0 44px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .street-view-controls select { min-width:0;min-height:44px!important;width:auto;flex:1; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .street-view-history-panel { width:100%;max-height:42dvh; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .street-view-history-panel button { min-height:44px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) body.is-street-view-open :is(.app-map-controls,#mapSearch,.app-operation) { display:none!important; }
.app-compare-actions { position:fixed;z-index:2000;bottom:calc(var(--app-nav-height) + 12px);left:12px;display:flex;gap:8px; }
#mobileAppShell .app-compare-actions button { background:var(--app-raised);border:1px solid var(--app-line);border-radius:12px;box-shadow:var(--app-shadow);padding:8px 12px;font-size:13px; }
html[data-app-layout=phone] body.dual-mode-active:not(.is-street-view-open) #mapWrapper { top:var(--app-header-height)!important;bottom:var(--app-nav-height)!important;height:auto!important;flex-direction:column; }
html[data-app-layout=phone] body.dual-mode-active:not(.is-street-view-open) :is(#viewDiv,#viewDivRight) { display:block!important;width:100%!important;height:50%!important;flex:1 1 0%!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #rightLayerPanel.right-layer-panel-compact { display:none!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #rightLayerPanel.right-layer-panel-expanded { display:flex!important;flex-direction:column;position:fixed!important;inset:auto 12px calc(var(--app-nav-height) + 12px)!important;width:auto!important;height:60dvh!important;max-height:none;border-radius:20px;background:var(--app-surface);color:var(--app-ink);z-index:5900; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #rightLayerHeadingTabs { display:flex;overflow:auto;gap:4px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .right-layer-heading-tab { flex:none;min-height:44px;font-size:14px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #rightLayerCloseBtn { min-width:44px;min-height:44px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #rightLayerPanelScroll { flex:1;min-height:0;height:auto;max-height:none;overflow:auto; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #rightLayerPanel .right-layer-item { min-height:44px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #rightLayerPanel .right-layer-label { display:flex;align-items:center;min-height:44px; }

/* Flight is a landscape touch surface; selection still has full app navigation. */
html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-setup { display:flex;flex-direction:column;top:calc(var(--app-header-height) + 8px)!important;bottom:calc(var(--app-nav-height) + 8px)!important;left:12px!important;right:12px!important;width:auto!important;max-width:none!important;max-height:none!important;border-radius:20px;padding:0; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-setup header { flex:none; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-setup__body { min-height:0;max-height:none;flex:1; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-setup__choices { grid-template-columns:repeat(2,minmax(0,1fr)); }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-setup :is(button,.flight-setup__aircraft button) { min-height:48px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) body.flight-sim-running :is(.app-navigation,.app-map-controls,#mapSearch,.app-operation) { display:none!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) body.flight-sim-running { --app-nav-height:0px;--app-header-height:var(--app-safe-top); }
html:is([data-app-layout=phone],[data-app-layout=tablet]) body.flight-sim-active:not(.flight-sim-running) :is(.app-map-controls,#mapSearch) { display:none!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-setup__preview { touch-action:none; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) body.flight-sim-running .app-brand { display:flex!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) body.flight-sim-running #mobileAppShell { display:block!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) body.flight-sim-running .app-header { display:flex!important;background:none;border:0;pointer-events:none;justify-content:center;height:calc(40px + var(--app-safe-top)); }
html:is([data-app-layout=phone],[data-app-layout=tablet]) body.flight-sim-running .app-header-actions { display:none; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) body.flight-sim-running .app-header .app-brand { pointer-events:none; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-panel .flight-hardware kbd { display:none; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-weather-control { top:calc(var(--app-safe-top) + 10px);right:max(12px,env(safe-area-inset-right)); }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-weather-control .flight-weather:not([open]),
html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-weather-control .flight-weather:not([open])>summary { width:44px;height:44px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) body.flight-drone-running .flight-weather-control { right:calc(max(12px,env(safe-area-inset-right)) + 54px); }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-drone-exit { top:calc(var(--app-safe-top) + 10px);right:max(12px,env(safe-area-inset-right));width:44px;height:44px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-digital-camera:not([hidden]) { top:calc(var(--app-safe-top) + 64px);right:max(12px,env(safe-area-inset-right)); }
.app-flight-actions,.flight-touch-minimap { display:none; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) body.flight-landscape-required :is(.flight-touch-joystick,.flight-touch-mode-picker,.flight-touch-minimap) { display:none!important; }
/* Avoid a transformed containing block so the flight menu is viewport-bound. */
html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-sim-hud.flight-panel { left:0!important;right:0!important;transform:none!important;margin-inline:auto; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-panel .app-flight-actions { display:block;position:absolute;bottom:calc(100% + 10px);right:0;pointer-events:auto; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .app-flight-actions>summary { display:grid;place-items:center;list-style:none;width:44px;height:44px;border:1px solid #91aeb9;border-radius:12px;background:#18303eee;color:#f1f7fb;cursor:pointer; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .app-flight-actions>summary svg { width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.6; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .app-flight-action-banks { position:fixed;right:max(12px,env(safe-area-inset-right));top:calc(var(--app-safe-top) + 54px);bottom:auto;width:min(360px,60vw);max-height:calc(100dvh - var(--app-safe-top) - var(--app-safe-bottom) - 110px);overflow:auto;padding:10px;border:1px solid #829dab;border-radius:16px;background:#172d3bef;box-shadow:0 8px 24px #0005; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .app-flight-action-banks :is(.flight-panel__left,.flight-panel__right) { display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:auto;gap:6px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .app-flight-action-banks .flight-panel__right { margin-top:6px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .app-flight-action-banks button.flight-hardware { min-height:44px;padding:8px;font-size:12px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .app-flight-action-banks .flight-panel__power { display:none; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .app-flight-action-banks .flight-panel__utility { display:flex;position:static;margin-top:10px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .app-flight-action-banks button.flight-dashboard-tool { min-width:44px;min-height:44px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-panel[data-drone=true] .app-flight-actions { display:none; }
html[data-app-preview=true] .local-preview-banner { display:none!important; }
.app-centre-cross { position:absolute;z-index:1600;left:50%;top:50%;translate:-50% -50%;width:23px;height:23px;pointer-events:none;filter:drop-shadow(0 0 2px white); }
.app-centre-cross::before,.app-centre-cross::after { content:'';position:absolute;background:#163d60;border-radius:1px; }
.app-centre-cross::before { width:23px;height:1.5px;top:10.5px; }
.app-centre-cross::after { height:23px;width:1.5px;left:10.5px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .cursor-status-bar { display:flex!important;position:fixed!important;left:10px!important;right:auto!important;bottom:calc(var(--app-nav-height) + 8px)!important;z-index:1750;gap:3px;max-width:calc(100vw - 20px);flex-wrap:wrap;font-size:10px;pointer-events:auto; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .cursor-status-bar :is(button,.cursor-status-readout) { background:color-mix(in srgb,var(--app-raised) 72%,transparent);backdrop-filter:blur(8px);border:0;box-shadow:none;font-size:10px;color:var(--app-ink);padding:5px 7px;border-radius:8px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #cursorCrsButton { min-height:32px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #cursorCrsMenu { bottom:36px;top:auto;left:0;right:auto;min-width:190px;max-width:calc(100vw - 20px);border:1px solid var(--app-line);border-radius:14px;background:var(--app-raised);box-shadow:var(--app-shadow);overflow:hidden; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #cursorCrsMenu .cursor-crs-option { min-height:44px;padding:10px 14px;border-radius:0;background:var(--app-raised);color:var(--app-ink);font:600 14px/1.3 var(--font-body); }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #cursorCrsMenu .cursor-crs-option:is(:hover,.is-selected) { background:var(--app-selected); }
html:is([data-app-layout=phone],[data-app-layout=tablet]) body:is(.workspace-open,.mobile-search-open,.flight-sim-active,.is-street-view-open) :is(.app-centre-cross,.cursor-status-bar) { display:none!important; }
html[data-app-layout=tablet] body.workspace-open .app-centre-cross { display:block!important; }
.app-field-actions { position:fixed;z-index:1800;left:max(12px,env(safe-area-inset-left));top:calc(var(--app-header-height) + 20px);display:grid;gap:10px;justify-items:start; }
.app-field-actions button>span {display:none;}
html[data-app-layout=tablet] .app-field-actions {top:calc(var(--app-header-height) + 260px);}
.app-capture-feedback { position:fixed;z-index:6300;left:12px;right:12px;bottom:calc(var(--app-nav-height) + 76px);display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:14px;background:var(--app-raised);box-shadow:var(--app-shadow);font-size:13px; }
.app-capture-feedback>span {flex:1;min-width:0;}
#mobileAppShell .app-capture-feedback button {min-width:40px;min-height:40px;border-radius:10px;background:var(--app-selected);font-size:12px;padding:6px 10px;}
html[data-app-layout=tablet] .app-capture-feedback {width:400px;right:auto;left:108px;}
body:is(.workspace-open,.mobile-search-open,.flight-sim-active,.is-street-view-open,.dual-mode-active,.jpg-framing,.app-route-recording-active,.walking-route-picking) .app-field-actions {display:none!important;}
body:has(.app-feature-draw:not([hidden])) .app-field-actions {display:none!important;}
.app-route-recording,.app-feature-draw { position:fixed;z-index:6200;left:12px;right:12px;bottom:calc(var(--app-nav-height) + 46px);padding:12px;border:1px solid var(--app-line);border-radius:16px;background:color-mix(in srgb,var(--app-raised) 94%,transparent);backdrop-filter:blur(12px);color:var(--app-ink);font:14px var(--font-body);box-shadow:var(--app-shadow); }
.app-route-recording[hidden],.app-feature-draw[hidden] { display:none!important; }
.app-route-recording { display:grid;grid-template-columns:12px 1fr;gap:8px; }
.app-route-recording strong,.app-route-recording small { display:block; }
.app-route-recording small { color:var(--app-muted);font-size:11px;margin-top:4px; }
.app-route-state { width:8px;height:8px;border-radius:50%;background:#dc4f59;margin-top:5px;box-shadow:0 0 0 3px #dc4f5920; }
.app-route-state[data-paused=true] { background:#b28436;box-shadow:none; }
.app-route-actions,.app-feature-draw>div { display:flex;gap:8px;grid-column:1/-1; }
.app-route-actions button,.app-feature-draw button { min-height:44px;min-width:44px;border:0;border-radius:10px;background:var(--app-selected);color:var(--app-ink);font:600 13px var(--font-body);padding:8px 14px; }
.app-route-actions .app-route-save,.app-feature-draw button.ws-primary { background:#16476b;color:white;flex:1; }
.app-feature-draw>strong { display:block;margin-bottom:8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
html[data-app-layout=tablet] :is(.app-route-recording,.app-feature-draw) { width:420px;left:108px;right:auto; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) body.workspace-open .app-route-recording { display:none; }
/* One search entry: a floating icon opens the dedicated search screen. */
html:is([data-app-layout=phone],[data-app-layout=tablet]) #mapApplication #mapSearch:not(.is-open) { display:none!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #mapApplication #mapSearch.is-open { display:flex!important;inset:0 0 var(--app-nav-height)!important;width:100%!important;transform:none!important;border-radius:0!important;padding-top:var(--app-safe-top);z-index:6400; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) body.mobile-search-open :is(.app-header,.app-map-controls) { visibility:hidden; }
.app-search-advanced { width:100%;padding:10px 12px;margin:8px 0;background:var(--app-selected);border:0;border-radius:12px;color:var(--app-ink);font:600 14px var(--font-body); }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #mobileSearchResults { position:fixed;top:auto!important;bottom:calc(var(--app-nav-height) + 42px)!important;left:12px!important;right:auto!important;height:auto!important;min-height:44px;max-width:calc(100vw - 84px);padding:12px 16px;border-radius:14px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #mobileSearchResults:not([hidden]) { display:block; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) body.mobile-search-open #mobileSearchResults { display:none; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #mobileSearchHeader { padding:8px 16px;gap:12px;background:var(--app-surface);color:var(--app-ink);border-color:var(--app-line); }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #mobileSearchHeader h2 { color:var(--app-ink);font:600 20px/1.3 var(--font-body); }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #mobileSearchHeader button { background:var(--app-selected);color:var(--app-ink);border:1px solid var(--app-line);border-radius:10px;box-shadow:none;font:600 14px/1.3 var(--font-body); }
.app-result-sort { display:block;width:100%;margin:8px 0 12px; }
.app-search-nearby { margin:8px 16px 12px;padding:12px;min-height:44px;border:1px solid var(--app-line);border-radius:12px;background:var(--app-selected);color:var(--app-ink);font:600 14px var(--font-body,system-ui); }
.app-search-nearby[hidden] { display:none; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #mapSearch .app-search-results { width:100%;display:block;font-size:14px; }
.app-search-results tbody { display:block; }
.app-search-results tr:has(th) { display:none; }
.app-search-results tr:has(td) { display:block;padding:14px 12px;margin:8px 0;border:1px solid var(--app-line);border-radius:14px;background:var(--app-raised);text-decoration:none!important; }
.app-search-results td { display:block;width:auto;border:0!important;padding:4px 0!important;line-height:1.5;overflow-wrap:anywhere; }
.app-search-results td:empty { display:none; }
.app-search-results td:first-child { font-weight:700;font-size:15px; }
.app-search-results td:not(:first-child)::before { content:attr(data-label);display:block;font-size:11px;color:var(--app-muted); }
.app-search-results tr:focus-visible { outline:3px solid #2b82b5;outline-offset:2px; }
html[data-app-layout=tablet] #mapApplication #mapSearch.is-open { inset:calc(var(--app-header-height) + 14px) auto 16px 108px!important;width:420px!important;border-radius:20px!important; }

/* Tablet layout has a left rail and generous companion panes. */
html[data-app-layout=tablet] { --app-nav-height:var(--app-safe-bottom);--workspace-width:min(58vw,660px); }
html[data-app-layout=tablet] .app-navigation { inset:calc(var(--app-header-height) + 14px) auto auto max(14px,env(safe-area-inset-left));width:76px;height:auto;display:flex;flex-direction:column;padding:8px;gap:6px;border:1px solid var(--app-line);border-radius:20px;background:var(--app-raised);box-shadow:var(--app-shadow); }
html[data-app-layout=tablet] #mobileAppShell .app-navigation button { width:58px;min-height:62px; }
html[data-app-layout=tablet] #mapApplication #mapSearch { top:calc(var(--app-safe-top) + 7px)!important;left:50%!important;right:auto!important;width:min(400px,45vw)!important;transform:translateX(-50%); }
html[data-app-layout=tablet] #mapSearch.is-open { top:var(--app-header-height)!important;left:112px!important;transform:none;width:420px!important;bottom:16px;box-shadow:var(--app-shadow); }
html[data-app-layout=tablet] #optionPanel.feature-panel-expanded { inset:calc(var(--app-header-height) + 14px) auto 16px 108px!important;width:min(420px,calc(100vw - 220px))!important;height:auto!important;border-radius:20px!important; }
html[data-app-layout=tablet] .app-sheet { inset:calc(var(--app-header-height) + 14px) auto 16px 108px;width:420px;max-height:none;border-radius:20px; }
html[data-app-layout=tablet] .workspace-panel { inset:0 0 0 auto!important;width:var(--workspace-width)!important;height:var(--app-viewport-height,100dvh)!important;border-left:1px solid var(--app-line);box-shadow:-8px 0 32px #153f6b15; }
html[data-app-layout=tablet] body.workspace-open #mapApplication { width:calc(100% - var(--workspace-width))!important; }
html[data-app-layout=tablet] body.workspace-open :is(.app-header-actions,.app-map-controls,#mapSearch) { display:none!important; }
html[data-app-layout=tablet] .app-operation { left:108px;right:auto;width:360px;bottom:20px; }
html[data-app-layout=tablet] .flight-setup { left:50%!important;right:auto!important;transform:translateX(-50%);width:min(700px,calc(100vw - 130px))!important; }
html[data-app-layout=tablet] #mobileAppShell .app-tool-grid button { min-height:70px; }
@media(prefers-reduced-motion:no-preference) { .app-sheet:not([hidden]) { animation:app-sheet-enter .22s ease-out; } @keyframes app-sheet-enter { from{opacity:0;translate:0 12px}to{opacity:1;translate:0 0} } }
@media(prefers-reduced-motion:reduce) { #mobileAppShell *, .app-sheet { animation:none!important;transition:none!important; } }
.app-catalog-info { display:none; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .mobile-layers-heading { flex-wrap:wrap;gap:4px 12px;padding-bottom:8px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .mobile-layers-heading strong { flex:1; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .mobile-layers-heading .app-layer-information { order:3;flex:1 0 100%;display:flex;align-items:center;justify-content:center;gap:8px;background:transparent;border:1px solid var(--app-line);font-size:14px; }
.app-layer-information svg,.app-catalog-info svg { width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .feature-panel-tabs { display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr));padding:4px 14px 10px;gap:3px;width:100%;box-sizing:border-box; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) :is(.feature-panel-tab,.right-layer-heading-tab) :is(span,strong) { font:600 clamp(11px,3.2vw,13px)/1.2 'Source Sans 3','Chiron Hei HK',system-ui,sans-serif!important;letter-spacing:0!important;text-transform:none!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .feature-panel-tab { border:0;background:transparent!important;color:var(--app-muted)!important;min-width:0;width:100%;padding:10px 4px;font:600 13px/1.2 'Source Sans 3','Chiron Hei HK',system-ui,sans-serif!important;justify-content:center; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .feature-panel-tab.active { background:var(--app-selected)!important;color:var(--app-ink)!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #optionPanel .layer-item { display:flex;align-items:center;gap:10px;background:var(--app-raised);border:1px solid var(--app-line);padding:4px 8px!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .layer-title-zoom { flex:1;min-width:0; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .app-catalog-info { display:grid;place-items:center;flex:none;width:44px;height:44px;padding:0;border:0;border-radius:10px;background:transparent;color:var(--app-muted); }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #optionPanel #activeLayersZone {padding:6px 0;max-height:min(32dvh,280px);overflow:hidden;background:transparent;}
html:is([data-app-layout=phone],[data-app-layout=tablet]) #activeLayersZone>div:first-child {padding:0 14px;gap:8px;flex:none;}
html:is([data-app-layout=phone],[data-app-layout=tablet]) #activeLayersZone h2 {display:none;}
html:is([data-app-layout=phone],[data-app-layout=tablet]) #mobileActiveLayersToggle {display:flex;align-items:center;min-height:44px;padding:0;background:transparent!important;border:0;color:var(--app-ink)!important;font:600 14px var(--font-body);white-space:nowrap;}
html:is([data-app-layout=phone],[data-app-layout=tablet]) #optionPanel #clearAllCartLayersBtn {min-height:36px;padding:6px 9px;background:transparent;color:var(--app-muted);border-color:var(--app-line);border-radius:9px;font:600 12px var(--font-body)!important;white-space:nowrap;}
html:is([data-app-layout=phone],[data-app-layout=tablet]) #optionPanel #active-layers-list {padding:0 14px;gap:6px;max-height:none;min-height:0;}
html:is([data-app-layout=phone],[data-app-layout=tablet]) :is(#optionPanel, .cart-reorder-preview) .cart-layer-card {box-sizing:border-box;width:100%;margin:0;padding:4px 10px;border:1px solid var(--app-line);border-radius:12px;background:var(--app-raised);box-shadow:none;}
html:is([data-app-layout=phone],[data-app-layout=tablet]) .cart-layer-card.cart-reorder-preview {display:block;padding:4px 10px;border:1px solid var(--app-line);border-radius:12px;background:var(--app-raised);color:var(--app-ink);}
html:is([data-app-layout=phone],[data-app-layout=tablet]) :is(#optionPanel, .cart-reorder-preview) .cart-layer-header {grid-template-columns:16px 24px minmax(0,1fr) 44px;gap:0 8px;padding:0;min-height:76px;}
html:is([data-app-layout=phone],[data-app-layout=tablet]) :is(#optionPanel, .cart-reorder-preview) .cart-layer-middle {display:contents;}
html:is([data-app-layout=phone],[data-app-layout=tablet]) :is(#optionPanel, .cart-reorder-preview) .cart-layer-title {grid-column:3;grid-row:1;align-self:center;max-height:38px;color:var(--app-ink)!important;text-shadow:none;font:600 14px/1.35 var(--font-body)!important;text-transform:none;}
html:is([data-app-layout=phone],[data-app-layout=tablet]) :is(#optionPanel, .cart-reorder-preview) .cart-layer-enable {width:20px;height:20px;}
html:is([data-app-layout=phone],[data-app-layout=tablet]) :is(#optionPanel, .cart-reorder-preview) .cart-drag-handle {color:var(--app-muted);font-size:16px;}
html:is([data-app-layout=phone],[data-app-layout=tablet]) :is(#optionPanel, .cart-reorder-preview) .cart-opacity-control {grid-column:2/-1;grid-row:2;grid-template-columns:minmax(0,1fr) 34px;gap:10px;padding:0;}
html:is([data-app-layout=phone],[data-app-layout=tablet]) :is(#optionPanel, .cart-reorder-preview) .cart-opacity-value {color:var(--app-muted)!important;transform:none;font:600 11px var(--font-body);}
html:is([data-app-layout=phone],[data-app-layout=tablet]) :is(#optionPanel,.cart-reorder-preview) :is(.compact-slider,#opacitySlider) {height:30px;background:transparent;}
html:is([data-app-layout=phone],[data-app-layout=tablet]) :is(#optionPanel,.cart-reorder-preview) :is(.compact-slider,#opacitySlider)::-webkit-slider-runnable-track {height:3px;border-radius:2px;background:var(--app-line);}
html:is([data-app-layout=phone],[data-app-layout=tablet]) :is(#optionPanel,.cart-reorder-preview) :is(.compact-slider,#opacitySlider)::-moz-range-track {height:3px;border-radius:2px;background:var(--app-line);}
html:is([data-app-layout=phone],[data-app-layout=tablet]) :is(#optionPanel,.cart-reorder-preview) :is(.compact-slider,#opacitySlider)::-webkit-slider-thumb {width:16px;height:16px;margin-top:-6.5px;background:#4b98be;border:1px solid var(--app-raised);}
html:is([data-app-layout=phone],[data-app-layout=tablet]) :is(#optionPanel,.cart-reorder-preview) :is(.compact-slider,#opacitySlider)::-moz-range-thumb {width:16px;height:16px;background:#4b98be;border:1px solid var(--app-raised);}
html:is([data-app-layout=phone],[data-app-layout=tablet]) :is(#optionPanel, .cart-reorder-preview) .cart-remove-btn {width:44px;min-height:44px;padding:0;background:transparent;border:0;border-radius:10px;color:var(--app-muted);font-size:0;}
html:is([data-app-layout=phone],[data-app-layout=tablet]) :is(#optionPanel, .cart-reorder-preview) .cart-remove-btn::before {content:'×';font:24px var(--font-body);}
html:is([data-app-layout=phone],[data-app-layout=tablet]) :is(#optionPanel, .cart-reorder-preview) .cart-remove-btn:hover {background:var(--app-selected);transform:none;}
html:is([data-app-layout=phone],[data-app-layout=tablet]) #optionPanel.app-layer-info :is(.feature-panel-heading,#panelScrollContent,#activeLayersZone,#panelBottom) { display:none!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #featurePanelBody #layerInfoPanel { position:static!important;inset:auto!important;flex:1;min-height:0;max-height:none!important;width:100%!important;border:0;border-radius:0;box-shadow:none;overflow:hidden; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #layerInfoContent { overflow:auto;color:var(--app-ink);padding:12px 18px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #layerInfoContent .layer-info-record__value { color:var(--app-ink)!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #layerInfoContent .layer-info-record__row:first-child .layer-info-record__value { font-size:18px;font-weight:700; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #layerInfoPanel .layer-info-panel__close { color:var(--app-ink); }
.app-capture-dialog .ws-content-dialog-body { display:grid;gap:8px; }
.app-capture-dialog .ws-content-dialog-body>label,.app-capture-dataset>label,.app-capture-media>label { font:600 13px var(--font-body);color:var(--app-muted);margin-top:8px;display:block; }
.app-capture-dialog :is(input:not([type=file]),textarea,select) { width:100%;box-sizing:border-box;min-height:46px;padding:10px 12px;border:1px solid var(--app-line);border-radius:10px;background:var(--app-raised);color:var(--app-ink);font:16px var(--font-body); }
.app-capture-dataset { display:grid;gap:8px;border-top:1px solid var(--app-line);padding-top:8px; }
.app-capture-media>div:first-of-type { display:flex;gap:6px;margin-top:8px; }
.app-capture-media button { min-height:44px;flex:1;font:600 13px var(--font-body); }
.app-capture-files>div { display:flex;align-items:center;gap:8px; }
.app-capture-files small {flex:1;overflow-wrap:anywhere;}
.app-route-recording { grid-template-columns:10px minmax(0,1fr)!important;gap:8px 10px!important; }
.app-route-recording .app-route-actions {grid-column:1/-1;display:flex;gap:6px;}
.app-route-actions button {flex:1;min-height:44px;font-size:13px;}
.app-route-actions .app-route-discard {flex:0 0 44px;}
.app-route-options { grid-column:1/-1;display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px;font-size:12px;color:var(--app-muted); }
.app-route-options label {display:flex;align-items:center;gap:4px;min-height:36px;}
.app-route-options input {width:18px;height:18px;accent-color:#277aaa;}
.app-route-options button {min-height:36px;border:0;background:transparent;color:var(--app-ink);font:600 12px var(--font-body);margin-left:auto;}
.app-route-profile { grid-column:1/-1;padding:8px 0;border-top:1px solid var(--app-line); }
.app-route-profile svg {width:100%;height:90px;overflow:visible;}
.app-route-profile path {fill:none;stroke:#56adc9;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
.app-route-profile small {font:12px var(--font-body);color:var(--app-muted);}
html:is([data-app-layout=phone],[data-app-layout=tablet]) body:is([data-app-route=layers],.app-comparison-layers-open) :is(.app-map-controls,.cursor-status-bar,.app-centre-cross,.app-operation,.app-compare-actions) { visibility:hidden!important; }
html[data-app-layout=phone] body.dual-mode-active .app-compare-actions { bottom:auto;top:calc(var(--app-header-height) + (var(--app-viewport-height,100dvh) - var(--app-header-height) - var(--app-nav-height))/2 + 8px); }
html[data-app-layout=tablet] #rightLayerPanel.right-layer-panel-expanded { inset:calc(var(--app-header-height) + 14px) auto 16px 108px!important;width:min(420px,calc(100vw - 220px))!important;height:auto!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #rightLayerPanelBody:not([hidden]) { display:flex;flex-direction:column;flex:1;min-height:0;background:var(--app-surface);border-radius:20px;overflow:hidden; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #rightLayerPanel .right-layer-panel-heading { display:grid;grid-template-columns:minmax(0,1fr) 44px;gap:8px;padding:12px 14px;background:var(--app-surface);flex:none; }
.app-comparison-title { font:700 16px/32px var(--font-body);color:var(--ui-text,#183c5b); }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .app-comparison-title {font-size:20px;line-height:44px;color:var(--app-ink);}
html:is([data-app-layout=phone],[data-app-layout=tablet]) #rightLayerCloseBtn { grid-column:2;grid-row:1;width:44px;height:44px;position:static;color:var(--app-muted);background:transparent;border:0;border-radius:10px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .mobile-layers-heading .app-layer-close {display:grid;place-items:center;width:44px;height:44px;padding:0;background:transparent;color:var(--app-muted);border-radius:10px;}
html:is([data-app-layout=phone],[data-app-layout=tablet]) :is(.app-layer-close,#rightLayerCloseBtn) svg {width:18px;height:18px;}
html:is([data-app-layout=phone],[data-app-layout=tablet]) :is(.app-layer-close,#rightLayerCloseBtn):hover {background:var(--app-selected);}
html:is([data-app-layout=phone],[data-app-layout=tablet]) #rightLayerHeadingTabs {grid-column:1/-1;grid-row:2;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));width:100%;overflow:visible;}
html:is([data-app-layout=phone],[data-app-layout=tablet]) .right-layer-heading-tab {width:100%;min-width:0;padding:8px 4px;border:0;border-radius:10px;font-family:var(--font-body);background:transparent;color:var(--app-muted);}
html:is([data-app-layout=phone],[data-app-layout=tablet]) .right-layer-heading-tab[aria-selected=true] {background:var(--app-selected)!important;color:var(--app-ink)!important;}
html:is([data-app-layout=phone],[data-app-layout=tablet]) #rightLayerPanelScroll {background:var(--app-surface);padding:8px 14px;}
html:is([data-app-layout=phone],[data-app-layout=tablet]) #rightLayerPanel .right-layer-item {padding:6px 10px;gap:10px;margin-bottom:6px;border:1px solid var(--app-line);border-radius:12px;background:var(--app-raised);}
html:is([data-app-layout=phone],[data-app-layout=tablet]) #rightLayerPanel .right-layer-label {font:500 14px/1.35 var(--font-body);color:var(--app-ink);}
@media(max-height:500px) {
 html[data-app-layout=phone] .app-header { height:calc(44px + var(--app-safe-top)); }
 html[data-app-layout=phone] { --app-header-height:calc(44px + var(--app-safe-top));--app-nav-height:calc(56px + var(--app-safe-bottom)); }
 html[data-app-layout=phone] #mobileAppShell .app-navigation button { min-height:44px;gap:1px; }
 html[data-app-layout=phone] .app-tools-content { padding:4px 16px 12px; }
 html[data-app-layout=phone] .app-tool-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
}

/* Touch flight controls use the app viewport and reserve distinct hand areas. */
html:is([data-app-layout=phone],[data-app-layout=tablet]) { height:var(--app-viewport-height,100%);overscroll-behavior:none; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) body.flight-sim-running { --flight-stick-size:124px;--flight-plane-control-width:160px;--flight-left-control-width:var(--flight-stick-size); }
html:is([data-app-layout=phone],[data-app-layout=tablet]) body.flight-sim-running:has(.flight-touch-controls[data-control-scheme=airplane]) {--flight-left-control-width:var(--flight-plane-control-width);}
html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-sim-hud.flight-panel {
 left:calc(max(14px,env(safe-area-inset-left)) + var(--flight-left-control-width) + 18px)!important;right:calc(max(14px,env(safe-area-inset-right)) + var(--flight-stick-size) + 18px)!important;
 bottom:max(14px,env(safe-area-inset-bottom));width:auto!important;max-width:680px!important;height:auto!important;min-height:0;margin-inline:auto;padding:6px 10px!important;
 display:block;gap:0;background:#122b39aa!important;border:1px solid #d5e8f044;border-radius:10px!important;box-shadow:0 3px 14px #0002!important;pointer-events:none;z-index:2400;
}
html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-sim-hud.flight-panel[hidden] { display:none!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-panel::before,
html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-panel::after { display:none!important; }
/* The six readings stay compact when the optional 3D cockpit is visible too. */
html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-panel :is(.flight-panel__name,.flight-panel__body,.flight-panel__readouts) { display:none!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-panel:not([data-drone=true]) .flight-panel__telemetry {
 display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1.5fr) minmax(0,1fr) minmax(0,.85fr) minmax(0,1.4fr) minmax(0,1fr);align-items:center;gap:5px;min-width:0;margin:0;
}
html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-panel__telemetry>div { gap:3px;min-height:0;min-width:0; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-panel__telemetry dt { font:500 9px/1.1 var(--font-body);color:#c5dce8;letter-spacing:0; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-panel__telemetry dd { font-size:13px;line-height:1.2;flex-wrap:nowrap;gap:3px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-panel__telemetry small { font-size:9px;color:#c5dce8; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-sim-hud.flight-panel[data-drone=true] {
 width:max-content!important;max-width:calc(100% - max(14px,env(safe-area-inset-left)) - max(14px,env(safe-area-inset-right)) - 2 * var(--flight-stick-size) - 36px)!important;padding:6px 10px!important;
}
html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-panel[data-drone=true] .flight-drone { gap:12px;flex-wrap:nowrap;font-size:10px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-panel[data-drone=true] .flight-drone>span { white-space:nowrap; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-panel[data-drone=true] .flight-drone output { font-size:20px;line-height:1.1; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-panel[data-drone=true] .flight-drone small { font-size:8px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-panel .flight-digital-emblem { width:28px;height:20px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-touch-minimap { --flight-mini-size:104px;position:absolute;left:max(14px,env(safe-area-inset-left));top:calc(var(--app-safe-top) + 70px);width:var(--flight-mini-size);height:var(--flight-mini-size);z-index:2100;pointer-events:none; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) body.flight-sim-running .flight-touch-minimap { display:block; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-touch-minimap[hidden],
html:is([data-app-layout=phone],[data-app-layout=tablet]) body:not(.flight-sim-running) .flight-touch-minimap { display:none!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-touch-minimap .flight-chart { width:100%;height:100%;max-width:none;margin:0;border:1px solid #d5e8f088;box-shadow:0 2px 14px #0003; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-touch-minimap .flight-chart__map { filter:saturate(.65) brightness(.8); }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-touch-minimap .flight-chart__north { top:4px;font-size:10px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-touch-minimap .flight-chart__credit { bottom:7px;font-size:8px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-touch-minimap .flight-chart__position { width:7px;height:7px;border-width:1px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-panel .app-flight-actions { position:fixed;top:calc(var(--app-safe-top) + 10px);right:calc(max(12px,env(safe-area-inset-right)) + 54px);bottom:auto;z-index:2400; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .app-flight-actions>summary { position:relative;z-index:2; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .app-flight-actions>summary::-webkit-details-marker { display:none; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .app-flight-actions[open]>summary { background:#365e73; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .app-flight-action-banks { top:calc(var(--app-safe-top) + 64px);max-height:calc(var(--app-viewport-height,100dvh) - var(--app-safe-top) - var(--app-safe-bottom) - 84px);box-sizing:border-box;width:min(380px,60vw);padding:12px;z-index:1; }
.app-flight-menu-heading { display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px; }
.app-flight-menu-heading strong { font:600 15px var(--font-body); }
.app-flight-menu-heading button { min-height:36px;min-width:36px;border-radius:10px;font-size:24px; }
/* A landscape layer picker needs space for its catalog as well as its controls. */
html:is([data-app-layout=phone],[data-app-layout=tablet]) body.flight-sim-running #optionPanel.feature-panel-compact { display:none!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) body.flight-sim-running #optionPanel.feature-panel-expanded {
 inset:calc(var(--app-safe-top) + 8px) auto calc(var(--app-safe-bottom) + 8px) max(12px,env(safe-area-inset-left))!important;
 width:min(420px,calc(var(--app-viewport-width,100vw) - max(12px,env(safe-area-inset-left)) - max(12px,env(safe-area-inset-right))))!important;height:auto!important;max-height:none!important;border-radius:18px!important;
}
html:is([data-app-layout=phone],[data-app-layout=tablet]) body.flight-sim-running:is(.flight-landscape-required,.flight-layers-hidden) #optionPanel { display:none!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) body.flight-sim-running #optionPanel #featurePanelBody { overflow:auto;overscroll-behavior:contain;touch-action:pan-y; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) body.flight-sim-running #optionPanel :is(.app-sheet-handle,.flight-layer-hide) { display:none!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) body.flight-sim-running #mapWrapper>.flight-layer-show { display:none!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) body.flight-sim-running #optionPanel .mobile-layers-heading { display:grid!important;grid-template-columns:minmax(0,1fr) 44px 44px;gap:4px;padding:4px 12px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) body.flight-sim-running #optionPanel .mobile-layers-heading strong { font-size:16px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) body.flight-sim-running #optionPanel .app-layer-information { grid-column:2;grid-row:1;order:0;padding:0;min-width:44px;width:44px;border:0; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) body.flight-sim-running #optionPanel .app-layer-information span { display:none; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) body.flight-sim-running #optionPanel .app-layer-close { grid-column:3;grid-row:1; }
/* One scroll surface: swipes over either the selected layers or catalog move
   the same panel, including short landscape screens. */
html:is([data-app-layout=phone],[data-app-layout=tablet]) body.flight-sim-running #optionPanel #featurePanelBody { flex:1;min-height:0;overflow-x:hidden!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch;scrollbar-width:auto; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) body.flight-sim-running #optionPanel :is(#panelScrollContent,#activeLayersZone,#active-layers-list) { flex:none;min-height:0;max-height:none!important;overflow:visible!important;touch-action:pan-y;overscroll-behavior:auto; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) body.flight-sim-running #optionPanel .mobile-layers-heading { position:sticky;top:0;z-index:3;background:var(--app-raised);flex-shrink:0; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) body.flight-sim-running #optionPanel #panelBottom { padding:6px 14px!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .app-flight-action-banks .flight-panel__utility { margin-right:0;gap:8px;flex-wrap:wrap; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .app-flight-action-banks .flight-dashboard-tool--exit { display:flex!important;gap:6px;background:#743d37;color:#fff; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-setup__start { flex:none;display:flex;padding:12px 18px;border-top:1px solid var(--picker-line); }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-setup__start button { width:100%;background:#17648c;color:#fff;border:0;border-radius:12px;font:600 16px var(--font-body);min-height:48px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-setup__drag-help { display:none; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-setup__preview { min-height:110px;height:130px;touch-action:pan-y;cursor:default; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) body.flight-sim-placing :is(.app-navigation,.app-field-actions,.app-operation,.cursor-status-bar) { display:none!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) body.flight-sim-active.flight-sim-placing:not(.flight-sim-running) #mobileAppShell .app-map-controls { display:flex!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) body.flight-sim-placing .app-map-controls button:not([data-app-target=btnZoomIn]):not([data-app-target=btnZoomOut]) { display:none!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) body.flight-sim-placing .app-centre-cross { display:block!important; }
.flight-placement-sheet { position:absolute;left:12px;right:12px;bottom:calc(12px + env(safe-area-inset-bottom));z-index:2300;max-width:560px;margin:auto;padding:14px 16px;border:1px solid var(--app-line);border-radius:18px;background:var(--app-raised);color:var(--app-ink);box-shadow:var(--app-shadow);font:14px/1.4 var(--font-body); }
.flight-placement-sheet p { margin:6px 0 12px;color:var(--app-muted); }
.flight-placement-sheet label { display:grid;grid-template-columns:auto minmax(0,1fr) 42px;gap:12px;align-items:center; }
.flight-placement-sheet input { width:100%;min-height:36px;accent-color:#17648c; }
.flight-placement-sheet>div { display:flex;gap:10px;margin-top:12px; }
.flight-placement-sheet button { flex:1;min-height:44px;border:1px solid var(--app-line);border-radius:12px;background:var(--app-selected);color:var(--app-ink);font:600 14px var(--font-body); }
.flight-placement-sheet [data-placement=start] { background:#17648c;color:#fff;border:0; }
.flight-placement-sheet small { display:block;margin-top:6px; }
body.flight-landscape-required .app-flight-actions { display:none!important; }
@media(orientation:landscape) and (max-height:500px) {
 html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-setup__choices { grid-template-columns:repeat(5,minmax(0,1fr)); }
 html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-setup__media { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
 html:is([data-app-layout=phone],[data-app-layout=tablet]) body.flight-sim-running { --flight-stick-size:108px; }
 html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-touch-minimap { --flight-mini-size:86px; }
 .flight-placement-sheet { max-width:440px;padding:10px 14px; }
 .flight-placement-sheet p { font-size:12px;margin:4px 0; }
}
@media(max-width:760px) and (orientation:landscape) {
 /* Six values fit between the active controls, leaving the scene clear. */
 html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-sim-hud.flight-panel:not([data-drone=true]) { padding:6px 8px!important; }
 html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-panel:not([data-drone=true]) .flight-panel__telemetry { gap:3px; }
 html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-panel__telemetry dt { font-size:8px; }
 html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-panel__telemetry dd { font-size:10px;gap:1px; }
 html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-panel__telemetry small { font-size:7px; }
}
@media(max-width:650px) and (orientation:landscape) {
 html:is([data-app-layout=phone],[data-app-layout=tablet]) body.flight-sim-running { --flight-stick-size:96px; }
 html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-sim-hud.flight-panel {
  left:calc(max(14px,env(safe-area-inset-left)) + var(--flight-left-control-width) + 10px)!important;right:calc(max(14px,env(safe-area-inset-right)) + var(--flight-stick-size) + 10px)!important;padding-inline:6px!important;
 }
 html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-panel:not([data-drone=true]) .flight-panel__telemetry { grid-template-columns:minmax(0,1fr) minmax(0,1.7fr) minmax(0,1fr) minmax(0,.85fr) minmax(0,1.5fr) minmax(0,1fr); }
 html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-panel__telemetry dt { font-size:7px; }
 html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-panel__telemetry dd { font-size:8.5px; }
 html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-touch-minimap { --flight-mini-size:min(60px,max(40px,calc(var(--app-viewport-height,100dvh) - var(--app-safe-top) - max(14px,env(safe-area-inset-bottom)) - 236px)));top:calc(var(--app-safe-top) + 52px); }
 html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-touch-minimap .flight-chart__north { top:3px;font-size:8px; }
 html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-touch-minimap .flight-chart__credit { bottom:5px;font-size:6px; }
}

/* Keep None final so responsive and drone rules cannot restore its readouts. */
html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-sim-hud.flight-panel[data-dashboard=none] { padding:0!important;border:0;background:none!important;box-shadow:none!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-sim-hud.flight-panel[data-dashboard=none] :is(.flight-panel__telemetry,.flight-drone) { display:none!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-sim-hud.flight-panel[data-readings-hidden=true] { padding:0!important;border:0;background:none!important;box-shadow:none!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .flight-sim-hud.flight-panel[data-readings-hidden=true] :is(.flight-panel__telemetry,.flight-drone) { display:none!important; }

/* Touch workspace: files, map visibility and editing are separate clear actions. */
.ws-touch-navigation,.ws-explorer-select-mode,.ws-layer-quick-actions { display:none; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-touch-navigation { display:grid;grid-template-columns:1fr 1fr;gap:6px;padding:12px 16px 0;flex:none; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-touch-navigation[hidden] { display:none; }
.ws-touch-navigation button { min-height:44px;border:1px solid var(--app-line);border-radius:12px;background:var(--app-raised);color:var(--app-ink);font:600 15px var(--font-body); }
.ws-touch-navigation button[aria-pressed=true] { background:var(--app-selected);border-color:var(--app-accent,#17648c); }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-explorer-top { display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:8px;position:relative;align-items:center;padding:10px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-explorer-top input { grid-column:2;grid-row:1;min-width:0;width:100%;min-height:44px!important;box-sizing:border-box;border-radius:10px;padding:8px 10px;font-size:13px!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-explorer-select-mode { display:block;grid-column:3;grid-row:1;min-height:44px;padding:8px;border:1px solid var(--app-line);border-radius:10px;background:var(--app-raised);color:var(--app-ink);font:600 12px var(--font-body); }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-explorer-new { grid-column:1;grid-row:1;justify-self:start;border-radius:10px;min-height:44px;padding:8px 10px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-explorer-navigation { flex-wrap:wrap;gap:8px;padding:10px 0; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-explorer-breadcrumb { flex:1;min-width:140px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-explorer-row { grid-template-columns:32px minmax(0,1fr) 44px;grid-template-rows:auto auto auto;gap:4px 10px;padding:14px 12px;margin:0 0 10px;min-height:114px;align-items:start; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-explorer-row>svg { display:block;width:28px;height:28px;grid-column:1;grid-row:1/3;align-self:center; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-explorer-touch-select { display:none!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-explorer[data-selecting=true] .ws-explorer-touch-select { display:block!important;width:32px;min-width:32px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-explorer[data-selecting=true] .ws-explorer-row>svg { display:none; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-explorer-touch-actions { grid-row:1/3; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-explorer-name { line-height:1.35;overflow-wrap:anywhere; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-explorer-type { color:var(--app-muted); }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-explorer-map-actions { display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;grid-column:1/-1;margin-top:10px; }
.ws-explorer-map-actions button { border-radius:10px;min-height:44px;font-size:13px; }
.ws-explorer-map-actions .is-on-map { background:var(--app-selected);color:var(--app-ink);border-color:var(--app-line); }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-explorer-actions { flex-wrap:wrap;gap:8px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-explorer-footer { flex-direction:column;align-items:start;gap:4px; }
.ws-on-map-list { display:grid;gap:12px;margin:18px 0; }
.ws-on-map-card { padding:16px;border:1px solid var(--app-line);border-radius:16px;background:var(--app-raised); }
.ws-on-map-card strong { display:block;font-size:16px;overflow-wrap:anywhere; }
.ws-on-map-card small { display:block;color:var(--app-muted);margin-top:6px; }
.ws-on-map-actions { display:flex;flex-wrap:wrap;gap:8px;margin-top:14px; }
.ws-on-map-actions button { min-height:44px;border-radius:10px; }
.ws-on-map-actions .ws-remove-map { flex-basis:100%;background:transparent; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-layer-quick-actions { display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:10px 8px;flex:none; }
.ws-layer-quick-actions button { min-height:48px;font-size:13px;line-height:1.4;padding:8px;border-radius:12px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-layer-toolbar { min-height:66px;padding:6px 8px;gap:6px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-layer-tool { min-height:54px!important;min-width:76px!important;border-radius:10px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-layer-tool small { font-size:12px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-data-record-layout { display:flex;flex-direction:column;gap:10px;min-height:0;flex:none; }
.ws-record-list-toggle { min-height:44px;border:1px solid var(--app-line);border-radius:10px;background:var(--app-raised);color:var(--app-ink);font:600 14px var(--font-body); }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-data-record-rail { display:none;min-height:160px;max-height:160px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-data-record-layout[data-record-list=true] .ws-data-record-rail { display:block; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-data-record-card-host { overflow:visible; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-data-record-fields { padding:14px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-data-record-field>span { font-size:13px;line-height:1.4; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-data-record-coordinate-row { grid-template-columns:1fr;gap:10px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-data-record-head { padding:12px;gap:10px; }
.ws-record-stepper { display:flex;gap:6px;margin-left:auto; }
.ws-record-stepper button { min-height:44px;min-width:44px;border:1px solid var(--app-line);border-radius:10px;background:var(--app-raised);color:var(--app-ink);font-size:25px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-data-record-actions { display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:12px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-data-record-actions>.ws-primary { grid-column:1/-1; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-user-cart-row { grid-template-columns:28px 28px minmax(0,1fr);gap:8px;padding:14px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-user-cart-row>button { grid-column:2/-1;justify-self:end;min-width:88px;border-radius:10px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .app-feature-draw { max-height:40%;overflow:auto;padding:12px 14px; }
.app-feature-draw p { margin:5px 0 10px;font:13px/1.4 var(--font-body);color:var(--app-muted); }
.app-feature-draw>div { flex-wrap:wrap; }
.app-feature-draw button { min-height:44px;padding:8px 12px;border-radius:10px; }

/* Task sheets leave map context visible; every creation action has a label. */
.app-create-options { display:grid;gap:8px; }
.app-unsaved-notice { flex:none;padding:12px;margin:8px;border-radius:12px;background:var(--app-selected);color:var(--app-ink);font:600 14px/1.4 var(--font-body); }
.app-draw-measure { display:block;font:700 20px/1.4 var(--font-body);margin:6px 0 10px;color:var(--app-ink); }
.app-feature-draw button[aria-pressed=true] { background:#17648c;color:#fff; }

/* Guru-style map surface: map sources above, map actions down the right edge,
   collections and a single location/north control within thumb reach. */
html:is([data-app-layout=phone],[data-app-layout=tablet]) { --app-nav-height:var(--app-safe-bottom); }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .app-header { justify-content:flex-start; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .app-header-actions { right:74px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .app-navigation { display:contents; }
#mobileAppShell .app-navigation button { position:fixed;z-index:2100;width:48px;min-height:48px;height:48px;padding:0;background:var(--app-raised);border:1px solid var(--app-line);border-radius:16px;box-shadow:0 2px 10px #12344d1a; }
#mobileAppShell .app-navigation button>span { display:none; }
#mobileAppShell .app-navigation [data-app-route=layers] { top:calc(var(--app-safe-top) + 12px);right:12px; }
#mobileAppShell .app-navigation [data-app-route=workspace] { bottom:calc(var(--app-safe-bottom) + 72px);right:12px; }
#mobileAppShell .app-navigation [data-app-route=tools] { bottom:calc(var(--app-safe-bottom) + 12px);left:12px; }
#mobileAppShell .app-navigation [data-app-route=create] { display:none; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #mobileAppShell .app-capture-feedback { left:12px;right:76px;width:auto;max-width:420px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .app-map-controls { top:auto;bottom:calc(var(--app-safe-bottom) + 132px);right:12px;display:flex;flex-direction:column;gap:12px; }
#mobileAppShell .app-location-control { position:fixed;right:12px;bottom:calc(var(--app-safe-bottom) + 12px); }
#mobileAppShell .app-location-control[aria-pressed=true] { background:#17648c;color:white; }
.app-location-status { position:fixed;left:12px;right:76px;bottom:calc(var(--app-safe-bottom) + 72px);z-index:1750;padding:8px 12px;border-radius:12px;background:var(--app-raised);font-size:12px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .cursor-status-bar { bottom:calc(var(--app-safe-bottom) + 12px)!important;left:72px!important;max-width:calc(100vw - 148px); }
html:is([data-app-layout=phone],[data-app-layout=tablet]) body[data-app-route]:not([data-app-route=map]) #mobileAppShell .app-navigation button { display:none; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) body[data-app-route]:not([data-app-route=map]) :is(.app-location-status,.ws-user-cart) { visibility:hidden; }
html[data-app-layout=tablet] #mobileAppShell .app-navigation button { width:48px;min-height:48px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #optionPanel #list-basemaps .layer-item { min-height:44px!important;flex-shrink:0; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #optionPanel[data-source=basemaps] #activeLayersZone { display:none; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .app-source-tabs { display:flex;gap:6px;padding:8px 12px;flex:none; }
.app-source-tabs button { flex:1;min-height:44px;border:1px solid var(--app-line);border-radius:12px;background:var(--app-raised);color:var(--app-ink);font:600 13px var(--font-body); }
.app-source-tabs [aria-pressed=true] { background:var(--app-selected);border-color:#17648c; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #optionPanel[data-source=basemaps] .feature-panel-heading .feature-panel-tabs { display:none!important; }
.app-place-sheet { position:fixed;z-index:5800;left:12px;right:76px;bottom:calc(var(--app-safe-bottom) + 76px);padding:16px;border:1px solid var(--app-line);border-radius:20px;background:var(--app-raised);color:var(--app-ink);box-shadow:var(--app-shadow);font:15px/1.4 var(--font-body); }
.app-place-sheet[hidden] { display:none; }
.app-place-sheet header,.app-place-sheet>div { display:flex;gap:10px;align-items:center; }
.app-place-sheet strong { flex:1; }.app-place-sheet p { margin:6px 0 14px;color:var(--app-muted);font-size:13px; }
.app-place-sheet button { min-height:44px;min-width:44px;border:0;border-radius:12px;background:var(--app-selected);color:var(--app-ink);font:600 14px var(--font-body); }
.app-place-sheet>div button { flex:1;padding:10px; }.app-place-sheet>div button:last-child { background:#17648c;color:white; }
html[data-app-layout=tablet] .app-place-sheet { right:auto;left:20px;width:360px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-explorer-row { grid-template-columns:32px minmax(0,1fr) 44px 44px;grid-template-rows:auto auto;min-height:76px;margin:0;padding:10px 12px;border:0;border-bottom:1px solid var(--app-line);border-radius:0;gap:2px 10px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-explorer-map-actions { grid-column:3;grid-row:1/3;display:block;margin:0;align-self:center; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-explorer-map-actions button { width:44px;min-width:44px;padding:0;border:0;background:transparent;color:#17648c;font-size:24px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-explorer-touch-actions { grid-column:4;grid-row:1/3;align-self:center; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-explorer-name { grid-column:2;grid-row:1;align-self:end; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-explorer-type { grid-column:2;grid-row:2; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-explorer-date { display:none; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-explorer-top { display:block;padding:12px; }
.ws-collections-actions { display:flex;justify-content:space-around;gap:12px;flex:none;padding:10px 16px calc(10px + env(safe-area-inset-bottom));border-top:1px solid var(--app-line);background:var(--app-raised); }
.ws-collections-actions button { flex:1;min-height:44px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-collections-actions .ws-explorer-select-mode { display:block; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-explorer-new-menu { position:fixed;inset:auto 12px calc(76px + env(safe-area-inset-bottom));width:auto;z-index:6400;border:1px solid var(--app-line);border-radius:18px;background:var(--app-raised);padding:8px;box-shadow:var(--app-shadow); }
html[data-app-layout=tablet] .ws-explorer-new-menu { left:auto;width:350px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-explorer-new-menu button { min-height:48px; }
#mobileAppShell .app-create-options button { justify-content:flex-start;padding:16px;min-height:64px;background:var(--app-raised);border:1px solid var(--app-line);border-radius:14px;text-align:left; }
.app-create-options button>span:first-of-type { flex:1; }
.app-create p { color:var(--app-muted);line-height:1.5; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) body[data-app-route]:not([data-app-route=map]) :is(.app-map-controls,.app-centre-cross,.cursor-status-bar) { visibility:hidden; }
.app-create-fields { margin-top:16px;border-top:1px solid var(--app-line); }
.app-create-fields>summary { min-height:48px;display:flex;align-items:center;font-weight:600;color:var(--app-ink);cursor:pointer; }
.app-create-fields>summary::after { content:'＋';margin-left:auto; }
.app-create-fields[open]>summary::after { content:'−'; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) body:has(.app-feature-draw:not([hidden])) :is(.app-navigation,.app-map-controls,.cursor-status-bar) { visibility:hidden; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .app-feature-draw { bottom:calc(12px + var(--app-safe-bottom)); }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .app-draw-add { background:var(--app-selected);flex:1; }
@media (max-height:600px) and (orientation:landscape) {
 html:is([data-app-layout=phone],[data-app-layout=tablet]) .app-map-controls { grid-template-columns:repeat(2,46px);gap:6px; }
 html[data-app-layout=phone] .app-sheet { left:12px;right:auto;width:min(420px,calc(100vw - 140px)); }
 html[data-app-layout=tablet] .app-navigation { gap:0;padding:4px; }
 html[data-app-layout=tablet] #mobileAppShell .app-navigation button { min-height:48px; }
}

/* Guru-inspired inner screens: flat lists, restrained tabs and separate details. */
html:is([data-app-layout=phone],[data-app-layout=tablet]) #workspacePanel { background:var(--app-raised); }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-main:has(.ws-explorer) { padding:0; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-explorer { border:0;border-radius:0;box-shadow:none;background:var(--app-raised); }
html:is([data-app-layout=phone],[data-app-layout=tablet]) :is(.ws-touch-navigation,.app-source-tabs,.ws-collection-sort) { display:flex;gap:0;padding:0 12px;border-bottom:1px solid var(--app-line);background:var(--app-raised); }
html:is([data-app-layout=phone],[data-app-layout=tablet]) :is(.ws-touch-navigation,.app-source-tabs,.ws-collection-sort)>button { flex:1;min-height:48px;border:0;border-bottom:3px solid transparent;border-radius:0;background:transparent;color:var(--app-muted);font:600 14px var(--font-body); }
html:is([data-app-layout=phone],[data-app-layout=tablet]) :is(.ws-touch-navigation,.app-source-tabs,.ws-collection-sort)>button[aria-pressed=true] { color:#17648c;border-bottom-color:#17648c;background:transparent; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-touch-navigation[hidden] { display:none; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-explorer-touch-sort { display:none!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-explorer-navigation { padding:4px 12px;min-height:44px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-explorer-row { background:var(--app-raised); }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-explorer-row[aria-selected=true] { background:var(--app-selected); }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-explorer-more { background:transparent;border:0;color:#17648c; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-explorer-name::after { content:'›';margin-left:10px;color:var(--app-muted); }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-collections-actions { border-top:1px solid var(--app-line);border-radius:0;background:var(--app-raised); }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-explorer-context-menu { position:fixed!important;left:12px!important;right:12px!important;top:auto!important;bottom:calc(12px + env(safe-area-inset-bottom))!important;width:auto;max-height:75dvh;overflow:auto;border-radius:20px;padding:12px;z-index:10000; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-explorer-context-item { width:100%;min-height:48px;text-align:left;border-bottom:1px solid var(--app-line); }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-collection-properties { width:100%;max-width:100%;height:100dvh;max-height:100dvh;margin:0;border:0;border-radius:0;background:var(--app-raised);color:var(--app-ink); }
.ws-collection-properties header { display:flex;align-items:center;gap:12px; }
.ws-collection-properties .ws-content-dialog-body>svg { width:48px;height:48px;margin:16px 0; }
.ws-collection-properties dl { margin:0;display:grid;grid-template-columns:1fr 2fr; }
.ws-collection-properties :is(dt,dd) { margin:0;padding:16px 8px;border-bottom:1px solid var(--app-line);overflow-wrap:anywhere; }
.ws-collection-properties dt { color:var(--app-muted); }
.ws-collection-properties footer { margin-top:auto; }
html[data-app-layout=tablet] .ws-collection-properties { width:440px;max-height:85dvh;height:700px;margin:auto;border-radius:18px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-layer-toolbar { border-bottom:1px solid var(--app-line);padding:0;gap:0;background:var(--app-raised); }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-layer-tool { border:0;border-bottom:3px solid transparent;border-radius:0;background:transparent;min-width:76px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-layer-tool[aria-pressed=true] { color:#17648c;background:transparent;border-bottom-color:#17648c; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #optionPanel #list-basemaps .layer-item { border:0;border-radius:0;border-bottom:1px solid var(--app-line);margin:0;background:var(--app-raised);min-height:52px!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-on-map-list { gap:0; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-on-map-card { display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;border:0;border-bottom:1px solid var(--app-line);border-radius:0;box-shadow:none;background:var(--app-raised);padding:14px 0; }
.ws-on-map-name { background:transparent;border:0;color:var(--app-ink);text-align:left;font:600 16px var(--font-body);min-height:44px;overflow-wrap:anywhere; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-on-map-actions { flex-wrap:nowrap;margin:0;gap:0; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-on-map-actions button { flex:none;width:44px;padding:0;border:0;background:transparent;font-size:23px;color:#17648c; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #workspacePanel .ws-main:has(.ws-explorer) { padding:0!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #workspacePanel :is(.ws-explorer,.ws-explorer-top,.ws-explorer-body,.ws-explorer-main,.ws-explorer-list) { border-radius:0!important;box-shadow:none!important;background:var(--app-raised)!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #workspacePanel .ws-explorer { border:0!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #workspacePanel .ws-explorer-row { background:var(--app-raised)!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #workspacePanel .ws-explorer-row[aria-selected=true] { background:var(--app-selected)!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #workspacePanel .ws-explorer-more { background:transparent!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-explorer-context-menu { max-width:none; }
html[data-app-layout=tablet] .ws-explorer-context-menu { left:auto!important;width:400px; }
.ws-collection-properties[open] { display:flex;flex-direction:column; }
.ws-collection-properties .ws-content-dialog-body { display:block;flex:1;min-height:0; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #optionPanel #list-basemaps .layer-item>input { order:2;appearance:none!important;border:0!important;background:transparent!important;margin-left:auto!important;flex:none;color:#17648c; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #optionPanel #list-basemaps .layer-item>input:checked::after { content:'✓';font-size:22px;line-height:22px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #optionPanel #list-basemaps .layer-item>label { order:1;flex:1;min-height:44px;display:flex;align-items:center; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-layer-tool { box-shadow:none!important; }
/* One compact, consistently sized touch coordinate/scale row. */
html:is([data-app-layout=phone],[data-app-layout=tablet]) .cursor-status-bar { left:12px!important;right:76px!important;bottom:calc(var(--app-safe-bottom) + 66px)!important;max-width:calc(100vw - 88px);flex-wrap:nowrap!important;align-items:center;justify-content:flex-start;gap:2px;font-size:10px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .cursor-status-bar :is(.cursor-crs-button,.cursor-status-readout,#mapScaleInput) { box-sizing:border-box;font:500 10px/20px var(--font-body)!important;letter-spacing:0!important;height:22px!important;min-height:22px!important;min-width:0!important;padding:0 3px!important;margin:0!important;white-space:nowrap; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .cursor-status-bar .cursor-status-readout { flex-shrink:0; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .cursor-status-bar #mapScaleInput { padding:0!important;border:0; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .cursor-status-bar #mainScaleBar { display:inline-flex;align-items:center;gap:0; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .cursor-status-bar #mainScaleBar[hidden] { display:none; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .app-place-sheet { right:auto;bottom:auto;width:260px;max-width:calc(100vw - 24px);padding:10px 12px;border-radius:14px;box-sizing:border-box; }
.app-place-sheet::after { content:'';position:absolute;top:100%;left:var(--place-pointer-x,50%);transform:translateX(-50%);border:9px solid transparent;border-top-color:var(--app-raised); }
.app-place-sheet p { font-size:11px;margin:2px 0 8px; }
.app-place-sheet strong { font-size:13px; }
.app-place-sheet[data-side=below]::after { top:auto;bottom:100%;border-top-color:transparent;border-bottom-color:var(--app-raised); }
/* Rechecked against Guru on Android: compact rows and map-backed information. */
html:is([data-app-layout=phone],[data-app-layout=tablet]) #workspacePanel .ws-explorer-row { grid-template-columns:28px minmax(0,1fr) 40px 40px 12px;min-height:62px;padding:4px 12px;gap:0 8px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #workspacePanel .ws-explorer-row[data-entry-kind=folder] { min-height:48px;grid-template-rows:1fr; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #workspacePanel .ws-explorer-row[data-entry-kind=folder] .ws-explorer-type { display:none; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #workspacePanel .ws-explorer-row[data-entry-kind=folder] .ws-explorer-name { grid-column:2/4;align-self:center; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #workspacePanel .ws-explorer-name::after { content:none; }
.ws-collection-chevron { grid-column:5;grid-row:1/3;align-self:center;color:var(--app-muted);font-size:22px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-collection-properties { position:fixed;inset:auto 0 0;width:100%;max-width:100%;height:60dvh;max-height:75dvh;margin:0;border-radius:18px 18px 0 0; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-collection-properties::backdrop { background:transparent;backdrop-filter:none; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) body:has(.ws-collection-properties[open]) #workspacePanel { visibility:hidden; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-collection-properties .ws-content-dialog-body>svg { display:none; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-collection-properties :is(dt,dd) { padding:10px 8px; }
html[data-app-layout=tablet] .ws-collection-properties { inset:auto auto 16px 16px;width:420px;height:55dvh;border-radius:18px; }

/* Guru baseline: primary map rail and full-screen grouped Settings. */
html:is([data-app-layout=phone],[data-app-layout=tablet]) #mobileAppShell .app-header { display:none; }
.app-trip-info { position:fixed;top:calc(12px + var(--app-safe-top));left:12px;z-index:1800;display:flex;gap:10px;padding:10px 12px;background:var(--app-raised);border-radius:10px;color:var(--app-ink);box-shadow:0 2px 10px #12344d1a;font:500 20px var(--font-body); }
.app-trip-info>span+span { border-left:1px solid var(--app-line);padding-left:10px; }.app-trip-info small { font-size:11px;color:var(--app-muted); }
body:not([data-app-route=map]) .app-trip-info,body:is(.mobile-search-open,.workspace-open,.flight-sim-active) .app-trip-info { display:none; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #mobileAppShell .app-map-controls { display:contents; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #mobileAppShell :is(.app-map-controls,.app-navigation) button { position:fixed;right:12px;left:auto;width:48px;height:48px;min-height:48px;border-radius:10px;bottom:auto; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #mobileAppShell .app-location-control { top:calc(50% - 94px); }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #mobileAppShell [data-app-command=search] { top:calc(50% - 38px); }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #mobileAppShell .app-map-controls [data-app-command=route] { top:calc(50% + 18px); }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #mobileAppShell .app-map-controls [data-app-command=record] { top:calc(50% + 74px); }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #mobileAppShell .app-navigation [data-app-route=workspace] { top:calc(50% + 130px); }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #mobileAppShell .app-navigation [data-app-route=tools] { top:calc(50% + 186px); }
.app-record-control>span { display:flex;flex-direction:column;font-size:15px;line-height:17px; }.app-record-control small { font-size:10px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #appTools { inset:0!important;width:100%!important;max-width:none!important;height:var(--app-viewport-height,100dvh)!important;max-height:none!important;border:0;border-radius:0!important;padding:0;background:var(--app-surface); }
#appTools .app-tools-content { padding:0; }.app-settings-list { background:var(--app-raised);margin:16px 0!important; }
#mobileAppShell .app-settings-list>button { display:flex;width:100%;min-height:52px;padding:10px 20px;gap:16px;text-align:left;border:0;border-bottom:1px solid var(--app-line);border-radius:0;background:transparent;box-shadow:none;font:500 16px var(--font-body); }
.app-settings-list span { flex:1; }.app-settings-list b { color:var(--app-muted);font-weight:400; }
.app-gis-tools>summary { padding:18px 20px;font:600 16px var(--font-body);cursor:pointer;background:var(--app-raised); }
.app-gis-tools .app-tool-grid { display:flex;flex-direction:column;gap:0; }
#mobileAppShell .app-gis-tools .app-tool-grid>button { display:flex;min-height:50px;flex-direction:row;justify-content:flex-start;gap:14px;border:0;border-bottom:1px solid var(--app-line);border-radius:0;text-align:left;padding:10px 20px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .cursor-status-bar { bottom:calc(var(--app-safe-bottom) + 10px)!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .guru-folder-dialog { position:fixed;inset:0;margin:auto;width:calc(100% - 48px);max-width:390px;height:auto;max-height:80dvh;border:0;border-radius:14px;padding:0; }
.guru-folder-dialog header,.guru-folder-dialog footer { padding:16px; }
.guru-folder-dialog .ws-content-dialog-body { display:grid;gap:16px;padding:16px; }
.guru-folder-dialog input[type=text],.guru-folder-dialog textarea { width:100%;box-sizing:border-box;border:0;border-bottom:1px solid var(--app-line);border-radius:0;padding:10px 0; }
.guru-folder-dialog label { display:flex;align-items:center;gap:12px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-collection-search { display:block;margin-left:auto;border:0;background:transparent;color:var(--app-accent);min-height:40px;padding:8px 12px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-explorer-top input[hidden] { display:none!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-collections-actions .ws-explorer-new { font-size:26px;background:transparent;color:var(--app-accent);border:0; }
.ws-folder-picker-list { display:grid; }
.ws-folder-picker-row { display:flex;align-items:center;gap:14px;min-height:56px;padding:12px;border:0;border-bottom:1px solid var(--app-line);background:transparent;text-align:left;color:inherit; }
.ws-folder-picker-row svg { width:24px;height:24px;flex:none; }
.ws-folder-picker-row span:first-of-type { flex:1; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) dialog.app-pin-details { position:fixed;inset:auto 0 0!important;margin:0!important;width:100%;max-width:100%;height:auto;max-height:65dvh;border:0;border-radius:16px 16px 0 0; }
html[data-app-layout=tablet] dialog.app-pin-details { max-width:460px; }
dialog.app-pin-details::backdrop { background:transparent; }
.app-pin-details .ws-content-dialog-body { display:grid;gap:8px;padding:16px; }
.app-pin-details input,.app-pin-details textarea { width:100%;box-sizing:border-box; }
.app-pin-details footer { padding:12px 16px; }
.app-source-extra { padding:8px 12px; }
.app-source-extra:empty { display:none; }
.app-source-overlay-row { width:100%;min-height:48px;display:flex;align-items:center;justify-content:space-between;gap:12px;background:transparent;color:var(--app-ink);border:0;border-bottom:1px solid var(--app-line);text-align:left;padding:10px 4px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #optionPanel[data-source=offline] #featurePanelBody>:not(.app-source-tabs):not(.app-source-extra):not(.app-sheet-handle):not(.mobile-layers-heading) { display:none!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #mobileAppShell .app-map-controls>button { z-index:1800;pointer-events:auto; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #workspacePanel:has(.ws-explorer) .ws-header .ws-profile { display:none; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-explorer-top:not(:has(input:not([hidden]))) { display:none!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-explorer[data-folder-root=true] .ws-explorer-navigation { display:none!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-content-status-tip { display:none; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #workspacePanel .ws-collections-actions .ws-explorer-new { min-width:64px;background:transparent!important;color:var(--app-accent,#17648c)!important;box-shadow:none!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-content-status:has(>.ws-content-status-tip):not(:has(.ws-map-editor>*)) { display:none; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .app-place-sheet { width:196px;padding:6px; }
.app-place-sheet header { position:absolute;right:-10px;top:-22px; }
.app-place-sheet header button { min-width:28px;min-height:28px;border-radius:50%;font-size:18px; }
.app-place-sheet strong,.app-place-sheet p { position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%); }
.app-place-sheet>div { gap:0; }
.app-place-sheet>div button,.app-place-sheet>div button:last-child { background:transparent;color:#17648c;border-radius:0; }
.app-place-sheet>div button+button { border-left:1px solid var(--app-line); }
.app-place-sheet svg { width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #mapApplication #mapSearch.is-open { inset:var(--app-safe-top) 0 auto!important;height:auto!important;max-height:75dvh!important;background:var(--app-raised);padding-top:0; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #mapSearch.is-open #mapSearchPanel { flex:0 1 auto;max-height:55dvh!important; }
html[data-app-layout=tablet] #mapApplication #mapSearch.is-open { width:460px!important;max-width:calc(100vw - 80px)!important;left:12px!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .app-search-results tr:has(td) { margin:0;border:0;border-bottom:1px solid var(--app-line);border-radius:0; }
/* Guru's observed large-screen layout also uses full-width lists and bottom sheets. */
html[data-app-layout=tablet] #workspacePanel { inset:0!important;width:100%!important;max-width:none!important;height:var(--app-viewport-height,100dvh)!important;border-radius:0!important; }
html[data-app-layout=tablet] .ws-collection-properties { inset:auto 0 0;width:100%;max-width:none;height:55dvh;border-radius:18px 18px 0 0; }
html[data-app-layout=tablet] dialog.app-pin-details { max-width:100%; }
html[data-app-layout=tablet] #optionPanel.feature-panel-expanded { inset:auto 0 0!important;width:100%!important;max-width:none!important;height:55dvh!important;border-radius:18px 18px 0 0!important; }
html[data-app-layout=tablet] #mapApplication #mapSearch.is-open { inset:var(--app-safe-top) 0 auto!important;width:100%!important;max-width:none!important; }
dialog.app-pin-details::backdrop { backdrop-filter:none; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) #optionPanel:not([data-source=history]) .feature-panel-tabs { display:none!important; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .mobile-layers-heading .app-layer-information { order:0;flex:0 0 44px;width:44px;border:0;padding:8px; }
.mobile-layers-heading .app-layer-information span { display:none; }
body:not([data-app-route=map]) .app-capture-feedback,body:has(dialog[open]) .app-capture-feedback { display:none!important; }
@media (max-height:560px) {
 html:is([data-app-layout=phone],[data-app-layout=tablet]) #mobileAppShell :is(.app-map-controls,.app-navigation) button { width:40px;height:40px;min-width:40px;min-height:40px; }
 html:is([data-app-layout=phone],[data-app-layout=tablet]) #mobileAppShell .app-location-control { top:60px; }
 html:is([data-app-layout=phone],[data-app-layout=tablet]) #mobileAppShell [data-app-command=search] { top:104px; }
 html:is([data-app-layout=phone],[data-app-layout=tablet]) #mobileAppShell .app-map-controls [data-app-command=route] { top:148px; }
 html:is([data-app-layout=phone],[data-app-layout=tablet]) #mobileAppShell .app-map-controls [data-app-command=record] { top:192px; }
 html:is([data-app-layout=phone],[data-app-layout=tablet]) #mobileAppShell .app-navigation [data-app-route=workspace] { top:236px; }
 html:is([data-app-layout=phone],[data-app-layout=tablet]) #mobileAppShell .app-navigation [data-app-route=tools] { top:280px; }
}
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-explorer-footer:has(.ws-explorer-status:not(:empty)) { flex-wrap:wrap;height:auto; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-explorer-status:not(:empty) { white-space:normal;max-width:100%;font-size:11px; }
html:is([data-app-layout=phone],[data-app-layout=tablet]) dialog.ws-folder-picker { position:fixed;inset:0!important;margin:0!important;width:100%!important;max-width:none!important;height:var(--app-viewport-height,100dvh)!important;max-height:none!important;border:0;border-radius:0!important; }
.ws-folder-picker footer { display:flex;justify-content:flex-end;border:0;background:transparent;padding:16px; }
.ws-folder-picker .ws-folder-picker-add { width:56px;height:56px;min-width:56px;border:0;border-radius:50%;background:#17648c;color:#fff;font-size:28px;box-shadow:0 3px 10px #12344d33; }
.guru-folder-dialog input:not([type=checkbox]) { width:100%;box-sizing:border-box;border:0;border-bottom:1px solid var(--app-line);border-radius:0;padding:10px 0; }
/* Keep map operations on the map, separate from app preferences. */
#mobileAppShell .app-map-logo {position:fixed;top:calc(12px + var(--app-safe-top));left:50%;transform:translateX(-50%);width:108px;height:48px;min-width:0;padding:0;border:0;background:transparent;box-shadow:none;z-index:1800;}
#mobileAppShell .app-map-logo img {display:block;width:108px;height:23px;filter:drop-shadow(0 0 3px white);}
@media(max-width:400px){.app-trip-info {font-size:16px;gap:6px;padding:10px 8px;}.app-trip-info>span+span {padding-left:6px;}}
body:not([data-app-route=map]) .app-map-logo,body:is(.guru-routing,.mobile-search-open,.workspace-open,.flight-sim-active,.is-street-view-open) .app-map-logo {display:none!important;}
html:is([data-app-layout=phone],[data-app-layout=tablet]) #mobileAppShell .app-map-controls [data-app-command=gis] {top:calc(50% - 150px);}
html:is([data-app-layout=phone],[data-app-layout=tablet]) #mobileAppShell .app-map-controls .app-view-toggle {top:calc(50% - 262px);}
html:is([data-app-layout=phone],[data-app-layout=tablet]) #mobileAppShell .app-map-controls .app-dual-control {top:calc(50% - 206px);}
@media (max-height:660px) {
 html:is([data-app-layout=phone],[data-app-layout=tablet]) #mobileAppShell .app-map-controls {display:flex;position:fixed;top:calc(64px + var(--app-safe-top));bottom:calc(150px + var(--app-safe-bottom));right:8px;gap:6px;padding:4px;overflow-y:auto;scrollbar-width:none;pointer-events:auto;}
 html:is([data-app-layout=phone],[data-app-layout=tablet]) #mobileAppShell .app-map-controls>button {position:static;flex:0 0 44px;width:44px;height:44px;min-height:44px;}
 #mobileAppShell .app-map-controls .app-view-toggle {order:0;}
 #mobileAppShell .app-map-controls .app-dual-control {order:1;}
 #mobileAppShell .app-map-controls [data-app-command=gis] {order:2;}
 #mobileAppShell .app-map-controls [data-app-command=recenter] {order:3;}
 #mobileAppShell .app-map-controls [data-app-command=search] {order:4;}
 #mobileAppShell .app-map-controls [data-app-command=route] {order:5;}
 #mobileAppShell .app-map-controls [data-app-command=record] {order:6;}
 html:is([data-app-layout=phone],[data-app-layout=tablet]) #mobileAppShell .app-navigation [data-app-route=workspace] {top:auto;bottom:calc(94px + var(--app-safe-bottom));}
 html:is([data-app-layout=phone],[data-app-layout=tablet]) #mobileAppShell .app-navigation [data-app-route=tools] {top:auto;bottom:calc(44px + var(--app-safe-bottom));}
}
html:is([data-app-layout=phone],[data-app-layout=tablet]) #appGisTools {inset:auto 0 0!important;width:100%!important;max-width:none!important;max-height:80dvh!important;border-radius:16px 16px 0 0!important;background:var(--app-raised);}
html:is([data-app-layout=phone],[data-app-layout=tablet]) #optionPanel[data-source=history] :is(#featureHeadingTabBasemaps,#featureHeadingTabOverlays) {display:none!important;}
#appTools .app-tool-grid {display:flex;flex-direction:column;gap:0;}
#mobileAppShell #appTools .app-tool-grid>button {display:flex;flex-direction:row;justify-content:flex-start;gap:14px;min-height:52px;padding:12px 20px;border:0;border-bottom:1px solid var(--app-line);border-radius:0;background:var(--app-raised);}
#mobileAppShell .app-setting-switch {display:flex;align-items:center;justify-content:space-between;gap:20px;width:100%;min-height:60px;border:0;border-bottom:1px solid var(--app-line);border-radius:0;padding:12px 20px;background:var(--app-raised);font:500 16px var(--font-body);text-align:left;}
.app-setting-switch i {position:relative;width:44px;height:26px;border-radius:20px;background:#bbc5cc;flex:none;}
.app-setting-switch i::after {content:'';position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:50%;background:white;box-shadow:0 1px 3px #1234;}
.app-setting-switch[aria-checked=true] i {background:#1686bd;}
.app-setting-switch[aria-checked=true] i::after {left:21px;}
html:is([data-app-layout=phone],[data-app-layout=tablet]) .cursor-status-bar {left:12px!important;right:auto!important;transform:none;width:max-content;max-width:calc(100vw - 24px);justify-content:flex-start;}
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-map-legends {left:12px;bottom:calc(116px + var(--app-safe-bottom));max-width:min(180px,calc(100vw - 100px));max-height:18dvh;}
body.guru-routing .ws-map-legends {display:none;}
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-map-legends {max-width:min(132px,calc(100vw - 100px));max-height:14dvh;font-size:10px;line-height:1.25;}
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-map-legend {padding:6px 8px;}
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-map-legend strong {font-size:11px;margin-bottom:3px;}
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-map-legend .esri-legend {font-size:10px;background:transparent;}
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-map-legend :is(.esri-legend__service,.esri-legend__layer) {padding:0;margin:0;}
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-map-legend .esri-legend__layer-caption {font-size:10px;margin:2px 0;}
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-map-legend .esri-legend__layer-cell {padding:2px 0;font-size:10px;}
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-map-legend .ws-symbol-preview {width:24px;height:20px;}
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-map-legend .esri-legend__layer-cell--symbols :is(svg,canvas) {max-width:24px;max-height:24px;}
#mobileAppShell #appTools .app-tool-grid>.app-setting-switch {justify-content:flex-start;}
#mobileAppShell #appTools .app-setting-switch>span {flex:1;text-align:left;}
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-explorer-navigation {display:none!important;}
html:is([data-app-layout=phone],[data-app-layout=tablet]) .ws-header-title {white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;}
html:is([data-app-layout=phone],[data-app-layout=tablet])[data-map-buttons=split] #mobileAppShell .app-map-controls {display:contents;}
html:is([data-app-layout=phone],[data-app-layout=tablet])[data-map-buttons=split] #mobileAppShell .app-map-controls>button {position:fixed;right:12px;left:auto;bottom:auto;}
html:is([data-app-layout=phone],[data-app-layout=tablet])[data-map-buttons=split] #mobileAppShell .app-map-controls .app-view-toggle {top:calc(76px + var(--app-safe-top));}
html:is([data-app-layout=phone],[data-app-layout=tablet])[data-map-buttons=split] #mobileAppShell .app-map-controls .app-dual-control {top:calc(132px + var(--app-safe-top));}
html:is([data-app-layout=phone],[data-app-layout=tablet])[data-map-buttons=split] #mobileAppShell .app-map-controls [data-app-command=gis] {top:calc(188px + var(--app-safe-top));}
html:is([data-app-layout=phone],[data-app-layout=tablet])[data-map-buttons=split] #mobileAppShell .app-map-controls [data-app-command=route] {top:calc(244px + var(--app-safe-top));}
html:is([data-app-layout=phone],[data-app-layout=tablet])[data-map-buttons=split] #mobileAppShell .app-map-controls [data-app-command=record] {top:calc(300px + var(--app-safe-top));}
html:is([data-app-layout=phone],[data-app-layout=tablet])[data-map-buttons=split] #mobileAppShell .app-map-controls [data-app-command=search] {left:12px;right:auto;top:calc(76px + var(--app-safe-top));}
html:is([data-app-layout=phone],[data-app-layout=tablet])[data-map-buttons=split] #mobileAppShell .app-navigation [data-app-route=workspace] {left:12px;right:auto;top:calc(132px + var(--app-safe-top));bottom:auto;}
html:is([data-app-layout=phone],[data-app-layout=tablet])[data-map-buttons=split] #mobileAppShell .app-map-controls .app-location-control {left:12px;right:auto;top:auto;bottom:calc(54px + var(--app-safe-bottom));}
html:is([data-app-layout=phone],[data-app-layout=tablet])[data-map-buttons=split] #mobileAppShell .app-navigation [data-app-route=tools] {top:auto;bottom:calc(54px + var(--app-safe-bottom));}
/* Map-first geometry editing, with the same top bar / bottom sheet as routing. */
html:is([data-app-layout=phone],[data-app-layout=tablet]) .app-feature-draw {left:0;right:0;bottom:0;width:auto;max-height:30dvh;padding:8px 12px calc(10px + var(--app-safe-bottom));border:0;border-radius:14px 14px 0 0;background:var(--app-raised);box-shadow:0 -2px 12px #17394c25;overflow:visible;backdrop-filter:none;}
.app-feature-draw .app-edit-header {position:fixed;top:0;left:0;right:0;display:flex;align-items:center;gap:8px;height:calc(56px + var(--app-safe-top));padding:var(--app-safe-top) 10px 0;box-sizing:border-box;background:var(--app-raised);border-bottom:1px solid var(--app-line);}
.app-edit-header strong {flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center;font-size:15px;}
.app-feature-draw .app-edit-header button {flex:none;min-width:52px;max-width:100px;padding:8px;color:var(--app-accent,#17648c);background:transparent;border-radius:0;font-size:14px;}
.app-feature-draw .app-edit-header .ws-primary {color:var(--app-accent,#17648c);font-weight:700;background:transparent;}
.app-feature-draw .app-edit-modes {display:flex;flex-wrap:nowrap;align-items:stretch;gap:2px;}
.app-edit-modes button {display:flex;flex:1;min-width:0;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:8px 4px;border-radius:8px;background:transparent;font-size:11px;font-weight:500;white-space:nowrap;}
.app-edit-modes button svg {width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linejoin:round;stroke-linecap:round;}
.app-edit-modes button.app-draw-icon {flex:0 0 44px;font-size:23px;border-left:1px solid var(--app-line);border-radius:0;}
.app-feature-draw .app-edit-modes button[aria-pressed=true] {color:var(--app-accent,#17648c);background:var(--app-selected);}
.app-feature-draw .app-edit-modes .app-draw-add {background:var(--app-selected);font-size:14px;}
.app-feature-draw p {margin:2px 4px 6px;font-size:12px;line-height:1.35;}
.app-feature-draw .app-draw-measure {margin:4px;font-size:18px;}
body:has(.app-feature-draw:not([hidden])) :is(.app-map-logo,.app-trip-info,.ws-map-legends) {display:none!important;}


/* Touch layer detail: a single header, compact actions and one scrolling form. */
html:is([data-app-layout=phone],[data-app-layout=tablet]) .workspace-panel:has(.ws-layer-inspector) {
 .ws-main {padding:0;}
 .ws-layer-inspector {background:var(--app-raised);}
 .ws-layer-inspector:not(.ws-wms-inspector)>.ws-inspector-header {display:none;}
 .ws-header {min-height:56px;padding:4px 10px;}
 .ws-header-title {font-size:17px;}
 .ws-profile {display:none;}
 .ws-layer-quick-actions {display:flex;gap:8px;padding:8px 12px;border-bottom:1px solid var(--app-line);}
 .ws-layer-quick-actions button {flex:1;min-width:0;min-height:44px;font-size:13px;padding:8px;border-radius:8px;}
 .ws-layer-toolbar {flex:none;justify-content:flex-start;gap:0;padding:0 8px;border-bottom:1px solid var(--app-line);background:var(--app-raised);overflow-x:auto;scrollbar-width:none;}
 .ws-layer-tool {flex:1 0 58px;min-width:58px;min-height:56px;padding:7px 4px;gap:4px;border-radius:0;}
 .ws-layer-tool small {font-size:11px;}
 .ws-layer-tool svg {width:20px;height:20px;}
 .ws-inspector-scroll[data-tool] {display:block;padding:12px;background:var(--app-raised);scroll-padding-block:12px;}
 .ws-inspector-scroll[data-tool] :is(.ws-tool-section,.ws-property-card) {padding:14px 0;margin:0;border:0;border-bottom:1px solid var(--app-line);border-radius:0;box-shadow:none;background:transparent;}
 .ws-inspector-scroll[data-tool] :is(h4,.ws-tool-section>h4) {font-size:14px;margin:0 0 12px!important;}
 .ws-inspector-scroll[data-tool] :is(.ws-note,.ws-tool-notice) {font-size:12px;line-height:1.5;}
 .ws-inspector-scroll[data-tool] :is(.ws-tool-input>span,.ws-setting-label) {font-size:13px;}
 .ws-inspector-scroll[data-tool] label.ws-tool-input {margin:8px 0;}
 .ws-inspector-scroll[data-tool] :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),select,textarea) {min-height:44px;font-size:16px;padding:10px;max-width:100%;box-sizing:border-box;}
 .ws-inspector-scroll[data-tool] input[type=range] {min-height:44px;}
 .ws-inspector-scroll[data-tool] .ws-tool-toggle {min-height:48px;font-size:14px!important;padding:6px 0;}
 .ws-inspector-scroll[data-tool] button {min-height:44px;}
 .ws-feature-footer {flex:none;padding:8px 12px calc(8px + var(--app-safe-bottom));background:var(--app-raised);border-top:1px solid var(--app-line);gap:8px;}
 .ws-feature-footer button {min-height:44px;font-size:14px;border-radius:8px;}
 .ws-data-tabs {gap:0;padding:3px;margin:0 0 12px;border-radius:9px;background:var(--app-selected);}
 .ws-data-tabs .ws-data-tab {flex:1;min-width:0;min-height:40px;padding:6px 4px;font-size:12px;border:0;border-radius:7px;box-shadow:none;background:transparent;}
 .ws-data-tabs .ws-data-tab[aria-pressed=true] {background:var(--app-raised);box-shadow:0 1px 4px #1232;}
 .ws-data-summary {margin:0 0 8px;font-size:13px;}
 .ws-data-summary-actions button {background:var(--app-selected);color:var(--app-ink);border:0;box-shadow:none;}
 .app-record-options {padding:0;border:0;border-bottom:1px solid var(--app-line);border-radius:0;margin:0;}
 .app-record-options>summary {padding:14px 0;font-size:13px;}
 .ws-record-list-toggle {text-align:left;padding:10px 0;border:0;border-bottom:1px solid var(--app-line);border-radius:0;font-size:14px;}
 .ws-data-record-card {border:0;border-radius:0;box-shadow:none;background:transparent;}
 .ws-data-record-head {padding:8px 0;background:transparent;border-bottom:1px solid var(--app-line);font-size:13px;}
 .ws-record-stepper button {width:44px;border:0;background:var(--app-selected);}
 .ws-data-record-fields {padding:0;overflow:visible;}
 .ws-data-record-attributes {gap:0;}
 .ws-data-record-field {padding:12px 0;border-bottom:1px solid var(--app-line);gap:6px;font-size:13px;}
 .ws-data-record-field textarea {resize:vertical;}
 .ws-data-record-actions {padding:12px 0;}
 .ws-property-summary {display:flex;flex-direction:column;align-items:stretch;}
 .ws-property-facts {font-size:12px;white-space:normal;}
 .ws-property-style-row {min-height:48px;}
 .ws-style-layout,.ws-style-layout .ws-style-settings,.ws-inspector-scroll[data-tool=style]>.ws-scene-settings {display:flex;flex-direction:column;gap:8px;}
 .ws-style-layout>* {width:100%;box-sizing:border-box;}
 .ws-style-layout .ws-symbol-controls,.ws-style-layout .ws-symbol-colors {grid-template-columns:minmax(0,1fr);}
 .ws-style-layout .ws-symbol-controls>* {grid-column:auto;grid-row:auto;}
 .ws-style-mode {font-size:13px;}
 .ws-label-style {display:flex;flex-direction:column;gap:8px;}
 .ws-label-placement button {min-width:44px;}
 .ws-popup-field {min-height:48px;gap:8px;font-size:14px;}
 .ws-gallery-fields {display:flex;flex-direction:column;gap:10px;}
 .ws-gallery-grid {grid-template-columns:repeat(2,minmax(0,1fr));}
}
html:is([data-app-layout=phone],[data-app-layout=tablet]) .workspace-panel:has(.ws-layer-inspector) {
 .ws-layer-quick-actions .app-layer-fit {flex:0 0 44px;font-size:22px;}
 .ws-inspector-scroll .ws-popup-page,.ws-inspector-scroll .ws-label-card {display:block;}
 .ws-popup-page .ws-tool-section:last-of-type {display:block;}
 .ws-inspector-scroll[data-tool=label] .ws-label-offsets {grid-template-columns:1fr 1fr;}
 .ws-inspector-scroll[data-tool=label] .ws-label-offsets .ws-label-placement {grid-column:1/-1;width:144px;grid-row:auto;}
 .ws-gallery-config {padding:0;border:0;box-shadow:none;}
 .ws-data-record-coordinate-row,.ws-data-record-time-row {display:flex;flex-wrap:wrap;gap:8px;}
 .ws-data-record-coordinate-row>* {min-width:0;flex:1 1 100px;}
}
html:is([data-app-layout=phone],[data-app-layout=tablet]) .workspace-panel:has(.ws-layer-inspector) .ws-data-summary>button {background:var(--app-selected);color:var(--app-ink);border:0;box-shadow:none;font-size:13px;}
html:is([data-app-layout=phone],[data-app-layout=tablet]) .workspace-panel:has(.ws-layer-inspector) .ws-layer-tool {min-width:54px!important;flex:1 0 54px;}
html[data-app-layout=tablet] .workspace-panel:has(.ws-layer-inspector) .ws-inspector-scroll[data-tool] {padding-inline:max(20px,calc((100% - 680px)/2));}
/* iPhone safe-area controls, simplified feature details and native-size inputs. */
html:is([data-app-layout=phone],[data-app-layout=tablet]) #workspacePanel {
 box-sizing:border-box;padding-top:var(--app-safe-top);height:var(--app-viewport-height,100dvh)!important;
}
html:is([data-app-layout=phone],[data-app-layout=tablet]) #workspacePanel .ws-header {flex-shrink:0;position:relative;z-index:2;}
html:is([data-app-layout=phone],[data-app-layout=tablet]) #workspacePanel .ws-close {flex:none;touch-action:manipulation;}
html[data-app-layout=phone] #mobileAppShell .app-map-logo {top:calc(62px + var(--app-safe-top));width:96px;height:28px;}
html[data-app-layout=phone] #mobileAppShell .app-map-logo img {width:96px;height:auto;}
html:is([data-app-layout=phone],[data-app-layout=tablet]) #mapApplication :is(input,select,textarea),
html:is([data-app-layout=phone],[data-app-layout=tablet]) #workspacePanel :is(input,select,textarea),
html:is([data-app-layout=phone],[data-app-layout=tablet]) dialog :is(input,select,textarea) {font-size:16px!important;}
html:is([data-app-layout=phone],[data-app-layout=tablet]) .cursor-status-bar #mapScaleInput:focus {font-size:16px!important;min-width:76px!important;height:32px!important;}
html:is([data-app-layout=phone],[data-app-layout=tablet]) .workspace-panel:has(.ws-layer-inspector) {
 .ws-layer-quick-actions .app-layer-eye {flex:0 0 44px;background:transparent;border:0;display:grid;place-items:center;}
 .ws-layer-toolbar {overflow:visible;position:relative;z-index:1;}
 .app-layer-settings {flex:1;position:relative;min-width:120px;}
 .app-layer-settings>summary {min-height:56px;display:flex;align-items:center;justify-content:center;font-size:14px;cursor:pointer;list-style:none;}
 .app-layer-settings>summary::after {content:'⌄';margin-left:8px;}
 .app-layer-settings-list {position:absolute;right:0;top:100%;width:220px;background:var(--app-raised);border:1px solid var(--app-line);border-radius:12px;box-shadow:var(--app-shadow);padding:4px;}
 .app-layer-settings-list .ws-layer-tool {width:100%;flex-direction:row;justify-content:flex-start;gap:14px;padding:10px 14px;min-height:48px!important;}
 .app-layer-settings-list .ws-layer-tool small {font-size:14px;width:auto;}
 .app-data-tools {margin-bottom:12px;}
 .app-data-tools>summary,.app-gallery-options>summary {padding:12px 0;min-height:44px;box-sizing:border-box;font-size:14px;cursor:pointer;}
 .ws-gallery-fields {flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:flex-start;gap:8px;padding:8px 0;}
 .ws-gallery-fields>span {flex-basis:100%;}
 .ws-gallery-field {border-radius:8px;}
 .ws-gallery-grid {gap:8px;}
 .ws-data-record-field {padding:8px 0;}
}
html:is([data-app-layout=phone],[data-app-layout=tablet]) #optionPanel #list-basemaps .layer-item>input {
 width:28px!important;height:28px!important;min-height:28px!important;position:relative;align-self:center;transform:none!important;margin:0 8px!important;
}
html:is([data-app-layout=phone],[data-app-layout=tablet]) #optionPanel #list-basemaps .layer-item>input:checked::after {
 content:'';position:absolute;inset:6px 8px 9px 6px;width:12px;height:7px;border:solid #17648c;border-width:0 0 2px 2px;transform:rotate(-45deg);background:none;
}
html:is([data-app-layout=phone],[data-app-layout=tablet]) #workspacePanel:has(.ws-explorer) {
 .ws-header-title {text-align:center;}
 .ws-explorer-top {display:flex!important;padding:12px;}
 .ws-explorer-top input {display:block!important;font-size:16px!important;width:100%;border-radius:24px;}
 .ws-explorer-select-mode {display:block;min-width:60px;min-height:44px;border:0;border-radius:24px;background:var(--app-raised);font-size:15px;}
 .ws-explorer-row[data-entry-kind=layer] .ws-explorer-touch-actions {display:none;}
 .ws-explorer-map-actions button {width:44px;height:44px;display:grid;place-items:center;border:0;background:transparent!important;color:#188bc2!important;}
 .ws-explorer-map-actions svg {width:26px;height:26px;}
 .ws-collections-actions {justify-content:space-between;padding:12px 20px calc(12px + var(--app-safe-bottom));}
 .ws-collections-actions>button {border-radius:50%;min-width:48px;min-height:48px;}
}
html:is([data-app-layout=phone],[data-app-layout=tablet]) #workspacePanel:has(.ws-explorer) {
 .ws-collection-sort {margin:0 12px 10px;padding:3px;border:0;border-radius:24px;background:var(--app-selected);}
 .ws-collection-sort>button {min-height:38px;border:0;border-radius:22px;font-weight:500;}
 .ws-collection-sort>button[aria-pressed=true] {background:var(--app-raised);border:0;box-shadow:0 1px 4px #1232;}
 .ws-explorer-row {grid-template-columns:30px minmax(0,1fr) 44px 14px;min-height:68px;padding:8px 14px;}
 .ws-explorer-row .ws-explorer-name {grid-column:2;grid-row:1;font-size:16px;font-weight:500;}
 .ws-explorer-row .ws-explorer-name::after {display:none;}
 .ws-explorer-row .ws-explorer-type {grid-column:2;grid-row:2;font-size:12px;color:var(--app-muted);}
 .ws-explorer-map-actions,.ws-explorer-touch-actions {grid-column:3;grid-row:1/3;}
 .ws-collection-chevron {grid-column:4;grid-row:1/3;align-self:center;color:#a7b1ba;}
 .ws-explorer-row[data-entry-kind=folder] .ws-explorer-name {grid-column:2;}
 .ws-explorer-footer {display:none;}
}
.app-unsaved-actions {display:flex;gap:8px;margin-top:10px;}
.app-unsaved-actions button {flex:1;min-height:44px;}
html:is([data-app-layout=phone],[data-app-layout=tablet]) #mapApplication #mapSearch :is(input,select,textarea) {font-size:16px!important;}
html:is([data-app-layout=phone],[data-app-layout=tablet]) #workspacePanel .ws-header {min-height:56px;padding:4px 12px;}
html:is([data-app-layout=phone],[data-app-layout=tablet]) #workspacePanel .ws-explorer-map-actions svg {color:#188bc2!important;stroke:currentColor!important;}
html:is([data-app-layout=phone],[data-app-layout=tablet]) #workspacePanel .ws-layer-quick-actions .app-layer-fit {flex-basis:56px;font-size:14px;}
html:is([data-app-layout=phone],[data-app-layout=tablet]) #workspacePanel .ws-feature-footer:not(:has(button:not(:disabled):not([hidden]))) {display:none;}
html:is([data-app-layout=phone],[data-app-layout=tablet]) #workspacePanel .ws-collections-actions>button {flex:none;width:48px;min-width:48px!important;border-radius:50%;}
html:is([data-app-layout=phone],[data-app-layout=tablet]) #workspacePanel .ws-header-brand {flex:1;}
html:is([data-app-layout=phone],[data-app-layout=tablet]) #workspacePanel:has(.ws-explorer) .ws-header-title {flex:1;text-align:center;}
/* Keep branding in the top row with explicit space for both neighbouring controls. */
html[data-app-layout=phone] #mobileAppShell .app-map-logo {top:calc(12px + var(--app-safe-top));left:50%;width:clamp(72px,24vw,96px);height:44px;}
html[data-app-layout=phone] #mobileAppShell .app-map-logo img {width:100%;height:auto;}
html[data-app-layout=phone] .app-trip-info {box-sizing:border-box;left:8px;width:calc(38vw - 16px);min-height:44px;align-items:center;gap:4px;padding:6px 4px;font-size:18px;white-space:nowrap;}
html[data-app-layout=phone] .app-trip-info>span+span {padding-left:4px;}
html[data-app-layout=phone] .app-trip-info>span {min-width:0;flex:1;text-align:center;overflow:hidden;text-overflow:ellipsis;line-height:1.15;}
html[data-app-layout=phone] .app-trip-info small {display:block;font-size:11px;line-height:1.15;}

/* Uncluttered idle map; recording statistics appear only during a track. */
body:not(.app-route-recording-active) .app-trip-info {display:none!important;}
html:is([data-app-layout=phone],[data-app-layout=tablet])[data-map-buttons=split] #mobileAppShell .app-map-controls [data-app-command=search] {top:calc(12px + var(--app-safe-top));}
html:is([data-app-layout=phone],[data-app-layout=tablet])[data-map-buttons=split] #mobileAppShell .app-navigation [data-app-route=workspace] {top:calc(76px + var(--app-safe-top));}
html:is([data-app-layout=phone],[data-app-layout=tablet]) #appTools {box-sizing:border-box;padding-top:var(--app-safe-top);padding-bottom:var(--app-safe-bottom);}
#appTools>header {min-height:56px;box-sizing:border-box;flex-shrink:0;}
#appTools .app-tools-content {min-height:0;overflow-y:auto;overscroll-behavior:contain;}
html:is([data-app-layout=phone],[data-app-layout=tablet]) .cursor-status-bar #mainScaleBar {height:22px;box-sizing:border-box;align-items:center;font:500 10px/22px var(--font-body)!important;}
html:is([data-app-layout=phone],[data-app-layout=tablet]) .cursor-status-bar #mapScaleInput {appearance:none;-webkit-appearance:none;line-height:normal!important;height:20px!important;min-height:20px!important;align-self:center;vertical-align:middle;}
.app-recording-hud {position:fixed;z-index:1800;top:calc(12px + var(--app-safe-top));right:12px;padding:10px 12px;border-radius:10px;background:var(--app-raised);color:var(--app-ink);font:600 16px var(--font-body);font-variant-numeric:tabular-nums;box-shadow:0 2px 10px #12344d1a;}
.app-recording-hud[hidden] {display:none;}
body:is(.workspace-open,.mobile-search-open) .app-recording-hud,body:not([data-app-route=map]) .app-recording-hud {display:none;}
html:is([data-app-layout=phone],[data-app-layout=tablet]) body.app-route-recording-active #mobileAppShell .app-map-logo {display:none;}
html:is([data-app-layout=phone],[data-app-layout=tablet]) body.app-route-recording-active #mobileAppShell .app-navigation [data-app-route=layers] {top:calc(76px + var(--app-safe-top));}
html:is([data-app-layout=phone],[data-app-layout=tablet])[data-map-buttons=split] body.app-route-recording-active #mobileAppShell .app-map-controls [data-app-command=search] {top:calc(76px + var(--app-safe-top));}
html:is([data-app-layout=phone],[data-app-layout=tablet])[data-map-buttons=split] body.app-route-recording-active #mobileAppShell .app-navigation [data-app-route=workspace] {top:calc(132px + var(--app-safe-top));}
html:is([data-app-layout=phone],[data-app-layout=tablet]) .app-route-recording {bottom:0;left:0;right:0;width:auto;padding:16px 16px calc(16px + var(--app-safe-bottom));max-height:50dvh;overflow-y:auto;border-radius:22px 22px 0 0;background:var(--app-surface);}
.app-recording-stats {grid-column:1/-1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:14px;background:var(--app-raised);border-radius:16px;}
.app-recording-stats strong {font-size:18px;font-variant-numeric:tabular-nums;}
.app-route-profile {background:var(--app-raised);border-radius:16px;padding:12px;}
html:is([data-app-layout=phone],[data-app-layout=tablet]) .app-capture-dialog {max-height:calc(var(--app-viewport-height,100dvh) - var(--app-safe-top) - 12px)!important;}
.app-capture-media>div:first-of-type {display:flex;flex-wrap:wrap;gap:8px;}
html:is([data-app-layout=phone],[data-app-layout=tablet])[data-map-buttons=split] body.app-route-recording-active #mobileAppShell .app-map-controls .app-view-toggle {top:calc(132px + var(--app-safe-top));}
html:is([data-app-layout=phone],[data-app-layout=tablet])[data-map-buttons=split] body.app-route-recording-active #mobileAppShell .app-map-controls .app-dual-control {top:calc(188px + var(--app-safe-top));}
html:is([data-app-layout=phone],[data-app-layout=tablet])[data-map-buttons=split] body.app-route-recording-active #mobileAppShell .app-map-controls [data-app-command=gis] {top:calc(244px + var(--app-safe-top));}
html:is([data-app-layout=phone],[data-app-layout=tablet])[data-map-buttons=split] body.app-route-recording-active #mobileAppShell .app-map-controls [data-app-command=route] {top:calc(300px + var(--app-safe-top));}
html:is([data-app-layout=phone],[data-app-layout=tablet])[data-map-buttons=split] body.app-route-recording-active #mobileAppShell .app-map-controls [data-app-command=record] {top:calc(356px + var(--app-safe-top));}
html:is([data-app-layout=phone],[data-app-layout=tablet])[data-map-buttons=right] body.app-route-recording-active #mobileAppShell .app-map-controls {top:calc(132px + var(--app-safe-top));}
html[data-app-layout=phone] dialog.app-pin-details>header {padding-top:12px!important;}
html:is([data-app-layout=phone],[data-app-layout=tablet]) dialog.app-pin-details {height:auto;max-height:calc(var(--app-viewport-height,100dvh) - var(--app-safe-top) - 12px)!important;}
.app-pin-details .ws-content-dialog-body {min-height:0;overflow-y:auto;}
.app-pin-details :is(header,footer) {flex-shrink:0;}

