/* Optional presentation layer. Desktop rules and all editor actions remain authoritative. */
#mcsCompactBar,#mcsCompactDock,#mcsCompactSheetHeader,#mcsCompactToolList,#mcsCompactOffer,#mcsCompactUtility,#mcsCompactUtilityExtra,#mcsCompactBrowseMaps,#mcsCompactType,#mcsCompactDetails,#mcsCompactSpeakLabel { display:none; }
body.mcs-small-screen { --mcs-screen-height:100dvh; --mcs-screen-top:0px; --mcs-bar-height:88px; --mcs-pane-height:0px; --mcs-rail-width:0px; --mcs-map-height:500px; }
body.colourMap.mcs-small-screen { overflow:hidden; touch-action:auto; }
body.mcs-small-screen [hidden] { display:none !important; }
body.mcs-small-screen #mcsCompactBar { position:fixed; z-index:1200; top:var(--mcs-screen-top); left:0; right:0; display:block; padding:env(safe-area-inset-top) 8px 4px; box-sizing:border-box; background:#61615d; color:white; font:14px Arial,sans-serif; }
#mcsCompactBar * { box-sizing:border-box; }
#mcsCompactBar .mcs-bar-row { display:flex; align-items:center; gap:6px; min-height:40px; }
#mcsCompactBar .mcs-brand { flex:1; min-width:0; white-space:nowrap; font-weight:bold; font-size:15px; }
#mcsCompactBar button { display:inline-flex; align-items:center; justify-content:center; gap:5px; float:none; width:auto; min-height:40px; margin:0; padding:6px 8px; border:1px solid #d3d3d3; border-radius:5px; background:transparent; box-shadow:none; color:white; font:14px Arial,sans-serif; cursor:pointer; touch-action:manipulation; }
#mcsCompactBar button img { width:19px; height:19px; }
#mcsCompactBar #mcsCompactBuy { background:#4d982e; border-color:#36741f; border-bottom-width:3px; }
#mcsCompactBar #mcsCompactMapName { flex:1; min-width:0; justify-content:flex-start; border:0; padding-left:0; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; font-size:13px; }
#mcsCompactBar #mcsCompactMapName span { overflow:hidden; text-overflow:ellipsis; }
#mcsCompactBar #mcsCompactMapName img { width:16px; height:16px; filter:brightness(0) invert(1); }
#mcsCompactBar #mcsCompactMapName .mcs-map-chevron { width:6px; height:6px; flex:none; margin:0 4px 3px; border-right:1.5px solid currentColor; border-bottom:1.5px solid currentColor; transform:rotate(45deg); }
body.mcs-small-screen #mapDetailPopover { box-sizing:border-box; background:#fffdf5; max-height:calc(var(--mcs-screen-height) - var(--mcs-bar-height) - 16px) !important; }
body.mcs-small-screen #mapDetailPopover #mapDetailClose { width:40px; height:40px; line-height:40px; top:1px; right:1px; }
body.mcs-small-screen #mapDetailPopover #tryNowButton { min-height:40px; display:flex; align-items:center; margin-top:6px; }
body.mcs-small-screen #mcsCompactBrowseMaps { display:block; min-height:40px; padding:8px 12px; width:100%; margin:4px 0 0; float:none; border:1px solid #a5ae97; border-radius:4px; background:#f6f7ef; color:#253627; font:700 14px Arial,sans-serif; cursor:pointer; }
body.mcs-small-screen #mcsCompactBar :focus-visible { outline:3px solid #e8ac25; outline-offset:1px; }
body.colourMap.mcs-small-screen #content { position:fixed !important; top:calc(var(--mcs-screen-top) + var(--mcs-bar-height)) !important; left:0 !important; width:calc(100% - var(--mcs-rail-width)) !important; height:var(--mcs-map-height) !important; min-height:0 !important; margin:0 !important; padding:0 !important; overflow:hidden; }
body.colourMap.mcs-small-screen :is(#svg_data,#svgContainer,#svgId) { width:100% !important; height:var(--mcs-map-height) !important; min-width:0 !important; min-height:0 !important; margin:0 !important; padding:0 !important; }
body.colourMap.mcs-small-screen #mySvg { max-width:none; touch-action:none; }
body.colourMap.mcs-small-screen :is(#mapFooter,#sidebarTab,#miniSidebar,#sidebarQuickAccess,.alternativeMapsHeader,.alternativeMapsContainer) { display:none !important; }
body.colourMap.mcs-small-screen #mapToolbar { display:none !important; }
body.colourMap.mcs-small-screen #sidebarContainer { position:fixed !important; top:auto !important; left:0 !important; right:0 !important; bottom:calc(100dvh - var(--mcs-screen-top) - var(--mcs-screen-height)) !important; width:100% !important; height:var(--mcs-pane-height) !important; transform:none !important; transition:none !important; z-index:1300; display:none !important; padding:0; border:0; }
body.colourMap.mcs-small-screen.mcs-tools-open #sidebarContainer { display:block !important; }
body.colourMap.mcs-small-screen #mapSidebar { display:block; width:100% !important; height:100% !important; overflow:auto; overscroll-behavior:contain; padding:0 8px 12px !important; border:1px solid #9cac90; border-radius:7px 7px 0 0; background:#fffdf5; box-sizing:border-box; scroll-padding-top:50px; }
/* Phone sheets grow with their contents, up to the space reserved for tools. */
body.colourMap.mcs-small-screen:not(.mcs-tablet) :is(#sidebarContainer,#mapSidebar) { height:auto !important; max-height:var(--mcs-pane-limit,460px) !important; }
body.mcs-small-screen #mapSidebar :is(#logoBox,#saveControls,#saveDropDown,#unlockPanelSlot,#topStatusBar) { display:none !important; }
body.colourMap.mcs-small-screen #unlockControls { display:none !important; }
body.mcs-small-screen #mapSidebar h2,body.mcs-small-screen #mapSidebar .sidebarSection { display:none !important; }
body.mcs-small-screen #mapSidebar h2.mcs-selected-heading { display:block !important; margin:0; width:100%; box-sizing:border-box; }
body.mcs-small-screen #mapSidebar .mcs-selected-panel { display:block !important; width:100% !important; min-width:0; box-sizing:border-box; margin:0; }
body.mcs-small-screen.mcs-save-open #mapSidebar #saveDropDown { display:block !important; width:100%; margin:0; }
body.mcs-small-screen.mcs-account-open #mapSidebar #topStatusBar { display:block !important; }
body.mcs-small-screen.mcs-account-open #loggedInAs { display:block !important; }
body.mcs-small-screen #mapSidebar #SideBarBox,body.mcs-small-screen #mapLegendControls { width:100% !important; margin:0; padding:0; float:none; }
body.mcs-small-screen #mcsCompactSheetHeader { position:sticky; top:0; z-index:5; display:flex; align-items:center; gap:8px; min-height:48px; margin:0 -8px 8px; padding:0 8px; border-bottom:1px solid #cbd4b8; background:#fffdf5; color:#283126; font:700 16px Arial,sans-serif; }
#mcsCompactSheetHeader strong { flex:1; }
#mcsCompactSheetHeader button { min-height:42px; min-width:42px; padding:4px 8px; float:none; border:1px solid #a5ae97; border-radius:4px; background:#f6f7ef; color:#253627; font:16px Arial,sans-serif; cursor:pointer; }
body.mcs-small-screen #mcsCompactToolList { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; margin:0 0 10px; }
#mcsCompactToolList button { display:flex; align-items:center; gap:8px; min-height:48px; padding:7px 9px; margin:0; float:none; border:1px solid #a5ae97; border-radius:4px; background:#f6f7ef; color:#253627; box-shadow:none; text-align:left; font:14px/1.25 Arial,sans-serif; cursor:pointer; touch-action:manipulation; }
#mcsCompactToolList .mcs-tool-icon { width:24px; height:27px; flex:0 0 24px; background-repeat:no-repeat; background-position:center; background-size:contain; }
#mcsCompactToolList button:hover { background:#e5edcf; border-color:#6e853e; }
#mcsCompactMoreTools { grid-column:1 / -1; }
#mcsCompactMoreTools summary { min-height:42px; padding:8px; cursor:pointer; box-sizing:border-box; border-bottom:1px solid #d9ddd5; font:14px Arial,sans-serif; }
#mcsCompactMoreTools .mcs-extra-tools { display:grid; grid-template-columns:1fr 1fr; gap:7px; padding-top:8px; }
body.mcs-small-screen.mcs-tool-selected #mcsCompactToolList { display:none; }
body.mcs-small-screen #mcsCompactOffer { display:block; margin:10px 0 4px; padding:10px; background:#fff5d9; border:1px solid #e8ac25; border-radius:4px; color:#20251c; font:13px/1.4 Arial,sans-serif; }
#mcsCompactOffer strong { display:block; font-size:16px; margin-bottom:3px; }
#mcsCompactOffer p { margin:0 0 7px; }
#mcsCompactOffer button { display:block; width:100%; min-height:44px; padding:7px 10px; margin:0; float:none; background:#4d982e; color:white; border:1px solid #36741f; border-bottom-width:3px; border-radius:4px; box-shadow:none; font:700 15px Arial,sans-serif; cursor:pointer; }
body.mcs-small-screen.mcs-tool-selected #mcsCompactOffer { display:none; }
body.mcs-small-screen #mcsCompactDock { display:flex; gap:8px; align-items:center; position:fixed; bottom:calc(100dvh - var(--mcs-screen-top) - var(--mcs-screen-height)); left:0; right:0; z-index:1250; padding:6px 8px calc(6px + env(safe-area-inset-bottom)); border-top:1px solid #b9c7a1; background:#fffdf5; box-sizing:border-box; }
body.mcs-small-screen :is(.mcs-tools-open,.mcs-assistant-open) #mcsCompactDock { display:none; }
body.mcs-small-screen.mcs-tools-open #mcsCompactDock,body.mcs-small-screen.mcs-assistant-open #mcsCompactDock { display:none; }
body.mcs-small-screen.mcs-utility-open #mcsCompactDock { display:none; }
body.mcs-small-screen #mcsCompactDock #gbAssistantLauncher { position:static !important; inset:auto !important; flex:1; min-width:0; width:auto; min-height:48px; padding:6px 8px; font-size:14px; }
#mcsCompactSpeak { display:flex; align-items:center; justify-content:center; gap:7px; min-height:48px; min-width:110px; padding:7px 10px; margin:0; float:none; border:1px solid #92a7a3; border-radius:7px; background:linear-gradient(130deg,#fff2cf,#edf4df 50%,#e8eaf8); color:#315f76; box-shadow:0 1px 3px #344c3320; font:700 15px Arial,sans-serif; cursor:pointer; }
#mcsCompactSpeak svg { width:22px; height:22px; fill:currentColor; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; }
#mcsCompactSpeak svg path { fill:none; }
#mcsCompactSpeak:disabled { cursor:not-allowed; opacity:.6; }
body.mcs-small-screen #mcsCompactDock { z-index:1450; }
body.mcs-small-screen #mcsCompactFit img { filter:brightness(0) invert(1); }
body.colourMap.mcs-small-screen #gbAssistant { position:fixed !important; inset:auto 0 calc(100dvh - var(--mcs-screen-top) - var(--mcs-screen-height)) 0 !important; width:100% !important; height:auto !important; max-height:var(--mcs-pane-height) !important; min-height:0 !important; margin:0 !important; overflow:hidden; border-radius:9px 9px 0 0; box-shadow:0 -3px 16px #16291e30; }
body.colourMap.mcs-small-screen #gbAssistantHandle { min-height:48px; padding:7px 9px; cursor:default; touch-action:auto; }
body.colourMap.mcs-small-screen #gbAssistantHandle h2 { font-size:17px; }
body.colourMap.mcs-small-screen #gbAssistantHandle p { display:none; }
body.colourMap.mcs-small-screen #gbAssistant .gba-emblem { width:30px; height:30px; flex-basis:30px; }
body.colourMap.mcs-small-screen #gbAssistant #gbAssistantClose { width:40px; height:40px; min-height:40px; }
body.colourMap.mcs-small-screen #gbAssistant .gba-toolbar { font-size:11px; padding:3px 9px; }
body.colourMap.mcs-small-screen #gbAssistantForm { padding:7px 9px; }
body.colourMap.mcs-small-screen #gbAssistantForm > label,body.colourMap.mcs-small-screen #gbAssistant .gba-question-guidance { display:none; }
body.colourMap.mcs-small-screen #gbAssistantQuestion { display:none; height:74px !important; min-height:74px !important; max-height:110px; font-size:16px; }
body.colourMap.mcs-small-screen #gbAssistant.mcs-typing #gbAssistantQuestion { display:block; }
body.colourMap.mcs-small-screen #gbAssistant .gba-voice-input { display:flex; align-items:center; }
body.colourMap.mcs-small-screen #gbAssistant button.gba-mic { position:static; width:100%; height:44px; min-height:44px; display:flex; align-items:center; justify-content:center; gap:8px; padding:7px; }
body.mcs-small-screen #mcsCompactSpeakLabel { display:inline; font-weight:bold; }
body.colourMap.mcs-small-screen #gbAssistant.mcs-typing button.gba-mic { position:absolute; width:42px; right:7px; bottom:7px; }
body.colourMap.mcs-small-screen #gbAssistant.mcs-typing #mcsCompactSpeakLabel { display:none; }
body.colourMap.mcs-small-screen #gbAssistant .gba-send-row { margin-top:4px; gap:6px; flex-wrap:wrap; }
body.colourMap.mcs-small-screen #gbAssistant .gba-context-choice { font-size:12px; }
body.colourMap.mcs-small-screen #gbAssistant #gbAssistantSend { display:none; min-height:40px; }
body.colourMap.mcs-small-screen #gbAssistant.mcs-typing #gbAssistantSend { display:block; }
body.mcs-small-screen #mcsCompactType,body.mcs-small-screen #mcsCompactDetails { display:inline-flex; min-height:32px; padding:3px 5px; border:0; background:transparent; text-decoration:underline; color:#3e628e; font-size:12px; }
body.mcs-small-screen #mcsCompactDetails { margin-left:auto; }
body.colourMap.mcs-small-screen #gbAssistant .gba-footer { padding:3px 9px; font-size:11px; }
body.colourMap.mcs-small-screen #gbAssistant .gba-footer button,body.colourMap.mcs-small-screen #gbAssistant .gba-footer a { font-size:11px; min-height:30px; }
body.colourMap.mcs-small-screen #gbAssistant #gbAssistantMessages { min-height:0; padding:8px 10px; max-height:260px; }
body.colourMap.mcs-small-screen #gbAssistant:not(.mcs-chat-details) #gbAssistantMessages { display:none; }
body.colourMap.mcs-small-screen #gbAssistant:not(.mcs-chat-details):has(.gba-plan) #gbAssistantMessages { display:block; max-height:110px; }
body.colourMap.mcs-small-screen #gbAssistant:not(.mcs-chat-details) .gba-message { display:none; margin:0; }
body.colourMap.mcs-small-screen #gbAssistant:not(.mcs-chat-details) .gba-message.mcs-latest-answer { display:block; }
body.colourMap.mcs-small-screen #gbAssistant:not(.mcs-chat-details) .mcs-latest-answer > :not(.gba-plan) { display:none; }
body.colourMap.mcs-small-screen #gbAssistant:not(.mcs-chat-details) .gba-plan { margin:0; padding:0; border:0; }
body.colourMap.mcs-small-screen #gbAssistant:not(.mcs-chat-details) .gba-plan > :is(h4,ul,details) { display:none; }
body.colourMap.mcs-small-screen #gbAssistant:not(.mcs-chat-details) .gba-plan .gba-job-status { margin:0; font-size:13px; }
body.colourMap.mcs-small-screen #gbAssistant:not(.mcs-chat-details) .gba-plan button { min-height:38px; padding:5px 8px; }
body.colourMap.mcs-small-screen #gbAssistantWorking .gba-working-orbit { width:74px; height:74px; flex-basis:74px; }
body.colourMap.mcs-small-screen #gbAssistantWorking { gap:10px; padding:12px; }
body.colourMap.mcs-small-screen #gbAssistantWorkingText { font-size:16px; }
body.colourMap.mcs-small-screen #gbAssistantQuestionHint { max-height:80px; overflow:auto; }
body.mcs-small-screen .st-palette { top:auto !important; bottom:calc(100dvh - var(--mcs-screen-top) - var(--mcs-screen-height)) !important; left:0 !important; right:0 !important; width:100% !important; max-width:none; height:var(--mcs-pane-height) !important; max-height:var(--mcs-pane-height) !important; z-index:1600; }
body.mcs-small-screen .st-palette header { cursor:default; }
body.mcs-small-screen.mcs-tablet .st-palette { top:calc(var(--mcs-screen-top) + var(--mcs-bar-height)) !important; bottom:auto !important; left:auto !important; right:0 !important; width:300px !important; }
body.mcs-small-screen #mcsCompactUtility { position:fixed; display:none; z-index:1300; bottom:calc(100dvh - var(--mcs-screen-top) - var(--mcs-screen-height)); left:0; right:0; height:var(--mcs-pane-height); box-sizing:border-box; overflow:auto; padding:8px; border:1px solid #9cac90; border-radius:7px 7px 0 0; background:#fffdf5; }
body.mcs-small-screen.mcs-utility-open #mcsCompactUtility { display:block; }
body.mcs-small-screen:not(.mcs-tablet) #mcsCompactUtility { height:auto; max-height:var(--mcs-pane-limit,460px); }
body.mcs-small-screen #mcsCompactUtility .mcs-utility-heading { display:flex; position:sticky; top:-8px; z-index:5; align-items:center; gap:8px; min-height:48px; margin:-8px -8px 8px; padding:0 8px; border-bottom:1px solid #cbd4b8; background:#fffdf5; color:#283126; font:700 16px Arial,sans-serif; }
body.mcs-small-screen #mcsCompactUtility .mcs-utility-heading strong { flex:1; }
body.mcs-small-screen #mcsCompactUtility .mcs-utility-heading button { min-height:40px; min-width:40px; padding:4px 8px; margin:0; float:none; border:1px solid #a5ae97; border-radius:4px; background:#f6f7ef; color:#253627; font:15px Arial,sans-serif; cursor:pointer; }
body.mcs-small-screen #mcsCompactUtility #mapToolbar { display:flex !important; position:static !important; padding:0 !important; flex-direction:column; flex-wrap:nowrap; gap:10px; min-height:0; border-radius:0; background:transparent; }
body.mcs-small-screen #mcsCompactUtility #mapToolbarActions { display:contents; }
body.mcs-small-screen #mcsCompactUtility #undoRedoContainer { display:none; }
body.mcs-small-screen #mapToolbar #tabs-container { order:1; flex:0 0 44px; width:100%; height:44px; }
body.mcs-small-screen #mapToolbar .tab { height:44px; min-height:44px; font-size:12px; gap:5px; border:1px solid #bbc2bd; border-radius:5px; }
body.mcs-small-screen #mapToolbar .tab .map-tab-icon { width:20px; flex-basis:20px; height:20px; }
body.mcs-small-screen #mapToolbar #findDiv { order:0; flex:0 0 auto; width:100%; }
body.mcs-small-screen #mapToolbar #findPostcode { min-height:44px; height:44px; width:0; min-width:0; padding:0 9px; font-size:16px; flex:1; }
body.mcs-small-screen #mapToolbar :is(#findNow,#deleteSearches) { height:44px; min-height:44px; width:40px; min-width:40px; flex:0 0 40px; border-radius:4px; }
body.mcs-small-screen #mcsCompactUtilityExtra { display:block; order:2; width:100%; font:14px Arial,sans-serif; }
body.mcs-small-screen #mcsCompactUtilityExtra summary { min-height:40px; padding:10px 0; box-sizing:border-box; color:#3e628e; cursor:pointer; }
body.mcs-small-screen #mcsCompactUtilityExtra .map-toolbar-help { flex-wrap:wrap; gap:8px; padding:0 0 8px; }
body.mcs-small-screen #mcsCompactUtilityExtra :is(.map-controls-toggle,#walkthroughTrigger) { color:#283126; min-height:40px; font:14px Arial,sans-serif; }
body.mcs-small-screen #mcsCompactUtility #mapControls { position:static !important; width:100%; height:auto; max-height:none !important; overflow:visible; display:flex !important; flex-direction:column; gap:10px; padding:0 0 10px; pointer-events:auto !important; }
body.mcs-small-screen #mcsCompactUtility #mapControls.map-controls-off,body.google-map-view.mcs-small-screen #mcsCompactUtility #mapControls { display:none !important; }
body.mcs-small-screen #mcsCompactUtility #mapControls :is(#mapPrimaryControls,#zoomColourMode,#mapOrientationControls,#mapNavigationControls,#panControls) { position:static !important; inset:auto !important; width:auto !important; max-width:100%; height:auto; margin:0; }
body.mcs-small-screen #mcsCompactUtility #mapPrimaryControls { display:flex; width:100% !important; }
body.mcs-small-screen #mcsCompactUtility #zoomColourMode { flex:1; min-height:44px; font-size:14px; box-shadow:none; }
body.mcs-small-screen #mcsCompactUtility #mapDetailButton { display:none; }
body.mcs-small-screen #mcsCompactUtility :is(#mapOrientationControls,#mapNavigationControls) { display:flex; flex-wrap:nowrap; width:100% !important; box-shadow:none; }
body.mcs-small-screen #mcsCompactUtility #mapOrientationControls .map-control-action { flex:1; min-width:0; padding:5px 3px; gap:4px; font-size:12px; }
body.mcs-small-screen #mcsCompactUtility .map-control-action { min-height:44px; font-size:14px; }
body.mcs-small-screen #mcsCompactUtility #magnifyingGlasses { width:auto !important; flex:none; }
body.mcs-small-screen #mcsCompactUtility #magnifyingGlasses .map-control-action { width:44px; }
body.mcs-small-screen #mcsCompactUtility #resetZoomButton { display:none; }
body.mcs-small-screen #mcsCompactUtility #toggleTab { flex:1; }
body.mcs-small-screen #mcsCompactUtility #mapFooter { position:static; display:flex !important; height:auto; min-height:40px; margin-top:10px; padding:6px; white-space:normal; }
body.mcs-small-screen #mcsCompactUtility #mapFooter .map-footer-contact { display:none; }
body.mcs-small-screen.mcs-tablet { --mcs-rail-width:300px; }
body.mcs-small-screen.mcs-tablet #mcsCompactBar { display:flex; gap:14px; align-items:center; }
body.mcs-small-screen.mcs-tablet #mcsCompactBar .mcs-bar-row { flex:1; min-width:0; }
body.colourMap.mcs-small-screen.mcs-tablet #sidebarContainer,body.mcs-small-screen.mcs-tablet #gbAssistant,body.mcs-small-screen.mcs-tablet #mcsCompactUtility { top:calc(var(--mcs-screen-top) + var(--mcs-bar-height)) !important; bottom:auto !important; left:auto !important; right:0 !important; width:300px !important; height:calc(var(--mcs-screen-height) - var(--mcs-bar-height)) !important; max-height:calc(var(--mcs-screen-height) - var(--mcs-bar-height)) !important; border-radius:0; }
body.mcs-small-screen.mcs-tablet #mcsCompactDock { left:auto; width:300px; }
body.mcs-small-screen.mcs-tablet #mapSidebar { padding-bottom:76px !important; border-radius:0; }
body.mcs-small-screen.mcs-tablet.mcs-tools-open:not(.mcs-assistant-open) #mcsCompactDock { display:flex; }
body.colourMap.mcs-small-screen.mcs-tablet.mcs-assistant-open #sidebarContainer { top:calc(var(--mcs-screen-top) + var(--mcs-bar-height) + var(--mcs-assistant-rail-height)) !important; height:calc(var(--mcs-screen-height) - var(--mcs-bar-height) - var(--mcs-assistant-rail-height)) !important; }
body.mcs-small-screen.mcs-tablet.mcs-assistant-open #mapSidebar { padding-bottom:12px !important; }
body.mcs-small-screen.mcs-tablet #mcsCompactToolList { grid-template-columns:1fr 1fr; }
body.mcs-small-screen.mcs-tablet #mcsCompactToolList button { font-size:13px; }
body.colourMap.mcs-small-screen.mcs-tablet #gbAssistantMessages { max-height:none; flex:1; }
body.mcs-small-screen.mcs-tablet #gbAssistant { overflow:auto; }
body.mcs-small-screen.mcs-tablet #gbAssistant:not(.mcs-chat-details) { height:auto !important; max-height:calc(var(--mcs-screen-height) - var(--mcs-bar-height)) !important; }
/* Shared dialogs: preserve original colours/icons and make their content reachable. */
body.mcs-small-screen dialog { max-width:calc(100vw - 16px) !important; max-height:calc(var(--mcs-screen-height) - 16px) !important; min-width:0 !important; box-sizing:border-box; }
body.mcs-small-screen dialog:not(#gbAssistant):not(#mcsCompactUtility) { position:fixed; top:var(--mcs-screen-top); bottom:calc(100dvh - var(--mcs-screen-top) - var(--mcs-screen-height)); margin:auto; overflow-y:auto; overscroll-behavior:contain; }
body.mcs-small-screen :is(dialog,.ui-dialog,.popup) :is(input[type=text],input[type=email],input[type=password],textarea,select) { min-width:0; max-width:100%; box-sizing:border-box; font-size:16px !important; }
body.mcs-small-screen .ui-dialog { max-width:calc(100vw - 16px) !important; max-height:calc(var(--mcs-screen-height) - 16px) !important; box-sizing:border-box; overflow:auto; }
body.mcs-small-screen :is(.overlay,.overlay2,.overlay3,.overlay4,.OTPoverlay,.overlayPrint) { z-index:21000; top:var(--mcs-screen-top); bottom:auto; height:var(--mcs-screen-height); overflow:auto; box-sizing:border-box; }
body.mcs-small-screen :is(.overlay4,.overlay,.OTPoverlay) .popup { width:min(520px,calc(100vw - 16px)) !important; max-height:calc(var(--mcs-screen-height) - 24px) !important; box-sizing:border-box; overflow:auto; margin:12px auto; }
body.mcs-small-screen .popup img { max-width:100%; height:auto; }
body.mcs-small-screen .overlayPrint { padding-top:0; }
body.mcs-small-screen .print-order-container { width:min(610px,calc(100vw - 16px)); box-sizing:border-box; margin:8px auto; padding:12px; }
body.mcs-small-screen .print-order-container :is(input,select) { font-size:16px; }
body.mcs-small-screen :is(.aim-dialog,#dialog.eic-dialog) { top:var(--mcs-screen-top) !important; bottom:auto !important; height:var(--mcs-screen-height) !important; }
body.mcs-small-screen :is(.aim-dialog,#dialog.eic-dialog) :is(input[type=text],textarea,select) { font-size:16px; }
body.mcs-small-screen dialog :is(h2,h3) { overflow-wrap:anywhere; }
body.mcs-small-screen dialog :is(button,.gm-button,.payment-close,.mcs-account-close) { min-height:40px; }
body.mcs-small-screen .gm-shell .gm-body { padding:14px; font-size:15px; }
body.mcs-small-screen .gm-shell .gm-header { padding:10px 12px; gap:8px; }
body.mcs-small-screen .gm-shell .gm-header h2 { font-size:19px; }
body.mcs-small-screen .gm-shell .gm-actions { padding:10px 12px; gap:7px; }
body.mcs-small-screen .gm-shell .gm-actions .gm-button { flex:1 1 auto; }
body.mcs-small-screen > :is(#modal_window,#warning_modal_window,#info_modal_window,#pdf_saved_modal_window,#switch_key_modal_window,#switch_modal_window) { position:fixed !important; top:calc(var(--mcs-screen-top) + var(--mcs-screen-height)/2) !important; left:8px !important; right:8px !important; width:auto !important; height:auto !important; max-height:calc(var(--mcs-screen-height) - 16px) !important; box-sizing:border-box; transform:translateY(-50%); overflow:auto; z-index:22000; }
body.mcs-small-screen > :is(#modal_window,#warning_modal_window,#info_modal_window,#pdf_saved_modal_window,#switch_key_modal_window,#switch_modal_window) button { position:static !important; min-height:40px; max-width:100%; margin:6px; }
body.mcs-small-screen .gm-toast-region { right:8px; bottom:calc(100dvh - var(--mcs-screen-top) - var(--mcs-screen-height) + 80px); max-width:calc(100vw - 16px); }
body.mcs-small-screen .mcs-account header { padding:10px 12px; }
body.mcs-small-screen .mcs-account h2 { font-size:21px; }
body.mcs-small-screen .mcs-account form { padding:12px; }
body.mcs-small-screen :is(.mcs-account header,.gm-header,#paymentDialog .payment-header) { position:sticky; top:0; z-index:9; }
body.mcs-small-screen .mcs-account .mcs-account-email-help { margin-top:12px; padding:10px; }
body.mcs-small-screen #paymentDialog .payment-header { padding-left:12px; }
body.mcs-small-screen #paymentDialog h2 { font-size:19px; }
body.mcs-small-screen #paymentDialog .payment-body { padding:10px 12px; }
body.mcs-small-screen #paymentDialog .payment-scroll { overflow:auto; min-height:0; }
body.mcs-small-screen .file-manager-map-access { max-width:100%; }
body.file-manager-page.mcs-small-screen { overflow-x:hidden; }
body.file-manager-page.mcs-small-screen #footerContainer img,body.file-manager-page.mcs-small-screen #header-logo img { max-width:100%; height:auto; }
body.file-manager-page.mcs-small-screen #footerContainer { box-sizing:border-box; width:100%; }
body.file-manager-page.mcs-small-screen .overlay4 .popup { width:calc(100vw - 16px) !important; }
body.file-manager-page.mcs-small-screen :is(#fileListWrapper,#savedMapsWrap,#excelSheetsWrap,#pdfMapsWrap,.fm-table-row,.fm-data-rows) { min-width:0 !important; max-width:100%; }
body.file-manager-page.mcs-small-screen .fm-table-header { display:flex !important; flex-wrap:wrap; gap:4px; padding:8px !important; }
body.file-manager-page.mcs-small-screen .fm-table-header > .padded { display:none; }
body.file-manager-page.mcs-small-screen .fm-table-header > .whiteAttributeBox { min-height:38px; padding:9px 7px; border:1px solid #cfd5dc; border-radius:3px; font-size:12px; }
body.file-manager-page.mcs-small-screen .fm-data-rows { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; padding:8px; }
body.file-manager-page.mcs-small-screen .fm-data-rows > .fm-table-row { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:5px 8px; padding:10px !important; margin:0; border:1px solid #cfd5dc; border-radius:4px; align-items:start; }
body.file-manager-page.mcs-small-screen .fm-data-rows > .fm-table-row > * { float:none; width:auto !important; max-width:100%; min-width:0; height:auto; margin:0; grid-column:auto; overflow-wrap:anywhere; }
body.file-manager-page.mcs-small-screen .fm-data-rows [data-mcs-label] { padding:3px 0 !important; font-size:14px; }
body.file-manager-page.mcs-small-screen .fm-data-rows [data-mcs-label]::before { display:block; content:attr(data-mcs-label); font-size:11px; color:#5c6570; line-height:1.5; }
body.file-manager-page.mcs-small-screen .fm-data-rows .mcs-map-name { grid-column:1 / -1 !important; font-weight:bold; font-size:16px; }
body.file-manager-page.mcs-small-screen .fm-data-rows :is(.greenEdit,.greenEditGoogle,.renewPopup,.deleteCSVFile,.deletePDFMap) { min-height:42px; display:flex; align-items:center; justify-content:center; }
body.file-manager-page.mcs-small-screen .fm-saved-map-row > .dropdown { width:100% !important; height:auto; grid-column:1 / -1; margin-top:3px; }
body.file-manager-page.mcs-small-screen .dropbtn { width:100% !important; height:40px !important; background-position:12px center; text-align:left; padding-left:42px; }
body.file-manager-page.mcs-small-screen .dropbtn::after { content:'Map options'; font:14px Arial,sans-serif; }
body.file-manager-page.mcs-small-screen .dropdown-content { position:static; width:100%; min-width:0; box-shadow:none; }
body.file-manager-page.mcs-small-screen .dropdown-content > * { min-height:40px; }
@media(max-width:700px) {
 body.mcs-small-screen :is(.print-order-left-a,.print-order-left-b,.print-order-right) { float:none; width:100%; margin:0 0 14px; }
 body.mcs-small-screen #paymentDialog .payment-choices { grid-template-columns:1fr; gap:8px; }
 body.mcs-small-screen #paymentDialog .payment-card { min-height:0; }
 body.mcs-small-screen #paymentDialog .payment-reassurance { gap:6px; font-size:12px; }
 body.mcs-small-screen #paymentDialog .payment-summary { align-items:flex-start; padding:10px 12px; gap:8px; }
 body.mcs-small-screen #paymentDialog .payment-term strong { font-size:15px; }
 body.mcs-small-screen #paymentDialog #paymentPrice { font-size:28px; }
 body.mcs-small-screen .mcs-account .mcs-account-actions { gap:6px; }
 body.mcs-small-screen :is(.ad-dialog-columns,.ld-grid,.st-editor-grid,.ai-dialog-grid,.payment-bank-fields) { grid-template-columns:minmax(0,1fr) !important; }
 body.file-manager-page.mcs-small-screen .fm-shell,body.file-manager-page.mcs-small-screen #pageContainer { width:calc(100% - 16px); }
 body.file-manager-page.mcs-small-screen .fm-data-rows { grid-template-columns:1fr; }
 body.file-manager-page.mcs-small-screen .fm-promo-panel { display:block; margin:10px 0; padding:12px; }
 body.file-manager-page.mcs-small-screen .fm-promo-visual,body.file-manager-page.mcs-small-screen .fm-promo-benefits { display:none; }
 body.file-manager-page.mcs-small-screen .fm-promo-copy h1 { font-size:20px; }
 body.file-manager-page.mcs-small-screen .fm-promo-actions { margin-top:8px; }
 body.file-manager-page.mcs-small-screen .fm-promo-button { padding:9px; font-size:17px; }
 body.file-manager-page.mcs-small-screen #footerContainer { min-width:0; }
}
@media print { #mcsCompactBar,#mcsCompactDock,#mcsCompactUtility,#mcsCompactSheetHeader,#mcsCompactToolList,#mcsCompactOffer { display:none !important; } }

body.file-manager-page.mcs-small-screen #gbAssistant { position:fixed !important; inset:8px !important; width:calc(100vw - 16px) !important; max-height:calc(var(--mcs-screen-height) - 16px) !important; height:auto !important; }
