/* Isolated mobile layout. Native controls and desktop layout are preserved. */
#mobile-menu-toggle,#mobile-header-menu,#mobile-map-toggle{display:none}
@media(max-width:800px){
 body.professional-layout>header{height:56px!important;min-height:56px!important;box-sizing:border-box;flex-wrap:nowrap!important;padding:6px 12px!important;gap:8px!important;z-index:2000}
 body.professional-layout>header .brand{flex:1 1 auto!important;width:auto!important;min-width:0!important}
 body.professional-layout>header .brand small{display:none!important}
 body.professional-layout>header .grundblik-header-name{font-size:22px!important}
 body.professional-layout>header>.view-switch,body.professional-layout>header>.panel-resize{display:none!important}
 body.professional-layout #mobile-menu-toggle{display:block;flex:0 0 auto;min-height:44px;padding:8px 12px;border:1px solid #d7e3e4;border-radius:9px;background:#fff;color:#173c49;font:650 14px system-ui}
 body.professional-layout #mobile-header-menu:not([hidden]){display:flex;position:absolute;top:100%;right:8px;left:8px;flex-direction:column;align-items:stretch;gap:8px;padding:12px;background:#fff;border:1px solid #d7e3e4;border-radius:0 0 12px 12px;box-shadow:0 8px 22px #18384d26;max-height:calc(100svh - 80px);overflow:auto}
 body.professional-layout #mobile-header-menu>*{margin:0!important;width:100%!important;box-sizing:border-box;flex:0 0 auto!important}
 body.professional-layout #mobile-header-menu button,body.professional-layout #mobile-header-menu select{min-height:44px!important;font-size:16px!important;white-space:normal}
 body.professional-layout #mobile-header-menu .language-selector{display:flex;align-items:center;justify-content:space-between;gap:12px}
 body.professional-layout #mobile-header-menu .language-selector select{width:auto!important;max-width:65%!important}
 body.professional-layout{padding-bottom:calc(76px + env(safe-area-inset-bottom,0px))!important}
 body.professional-layout[data-page="landing"]{padding-bottom:0!important}
 body.professional-layout #mobile-map-toggle{display:block;position:fixed;bottom:calc(12px + env(safe-area-inset-bottom,0px));left:50%;transform:translateX(-50%);z-index:1950;min-width:132px;min-height:44px;padding:10px 22px;border:1px solid #ffffff80;border-radius:24px;background:#166c61;color:white;box-shadow:0 3px 16px #18384d38;font:650 15px system-ui;touch-action:manipulation}
 body.professional-layout[data-page="landing"] #mobile-map-toggle,body:has(dialog[open]) #mobile-map-toggle{display:none!important}
 body.professional-layout[data-workspace-view="split"] .map-wrap,body.professional-layout[data-workspace-view="results"] .map-wrap{display:none!important}
 body.professional-layout[data-workspace-view="map"] .map-wrap{display:block!important;position:fixed!important;inset:auto 0 0!important;height:50svh!important;min-height:0!important;padding:0!important;width:100%!important;border:0!important;z-index:1700}
 body.professional-layout[data-workspace-view="map"] .panel{display:block!important}
 body.professional-layout[data-workspace-view="map"]{padding-bottom:calc(50svh + 24px)!important}
 body.professional-layout .map-tools{bottom:calc(72px + env(safe-area-inset-bottom,0px))!important;max-height:45%!important;border-radius:10px;padding:8px!important}
 body.professional-layout .map-caption{max-width:calc(100% - 76px);font-size:12px}
 body.professional-layout .panel{padding:16px 12px 24px!important}
 body.professional-layout .intro h1{font-size:24px;line-height:1.2;margin:0 0 8px}
 body.professional-layout .intro p{font-size:15px;margin:0 0 16px}
 body.professional-layout .address-search-line{flex-wrap:nowrap!important;gap:8px}
 body.professional-layout .address-search-line .address-control{flex:1 1 auto!important;min-width:0}
 body.professional-layout .address-search-line .address-submit{width:auto!important;flex:0 0 auto;padding:0 14px;min-height:48px}
 body.professional-layout .parcel-summary{padding:16px;margin-top:16px;border-radius:12px}
 body.professional-layout .parcel-title{padding:16px 0 8px}
 body.professional-layout .parcel-address{font-size:21px!important}
 body.professional-layout .grouped-panel>h3{font-size:24px}
 body.professional-layout .group-item{padding:16px 12px;border-radius:12px}
 body.professional-layout .primary-value{font-size:19px!important;line-height:1.4}
 body.professional-layout .item-value{grid-template-columns:minmax(0,1fr)!important}
 body.professional-layout .primary-explanation{font-size:15px!important}
 body.professional-layout .result-tools{gap:8px}
 body.professional-layout .result-tools button,body.professional-layout .result-tools select{min-height:44px;font-size:14px}
 body.professional-layout .category-nav{gap:6px;padding:6px 0;margin-bottom:12px;scrollbar-width:thin}
 body.professional-layout [data-result-group]>summary>strong{font-size:18px}
 body.professional-layout .review-overview{grid-template-columns:minmax(0,1fr)}
}
@media print{#mobile-menu-toggle,#mobile-header-menu,#mobile-map-toggle{display:none!important}}

/* Phone typography: emphasise hierarchy without oversized desktop numerals. */
@media(max-width:800px){
 body.professional-layout #summary-rating{font-size:30px!important;line-height:1.2!important;letter-spacing:-.6px}
 body.professional-layout .market-summary-grid #summary-area-price{font-size:22px!important;line-height:1.3!important}
 body.professional-layout .summary-grid strong{font-size:19px}
 body.professional-layout .market-summary-grid>.quality-summary-card>small,body.professional-layout .market-summary-grid>.market-summary-card>small{font-size:17px;line-height:1.4}
 body.professional-layout .market-summary-grid .summary-score-meaning,body.professional-layout .market-summary-grid .summary-score-meaning p,body.professional-layout .market-summary-grid .summary-score-meaning a,body.professional-layout .market-summary-grid .summary-score-meaning>summary,body.professional-layout .market-summary-grid #summary-area-price-context{font-size:15px!important;line-height:1.6!important}
 body.professional-layout .market-summary-grid .overall-score-line,body.professional-layout .market-summary-grid .area-score-line,body.professional-layout .market-summary-grid .quality-summary-card>.overall-score-line{min-height:46px}
 body.professional-layout .summary-grid.market-summary-grid{grid-template-rows:none;row-gap:12px}
 body.professional-layout .market-summary-grid>.quality-summary-card,body.professional-layout .market-summary-grid>.market-summary-card{display:block!important;grid-row:auto!important;grid-column:auto!important}
 body.professional-layout .market-summary-grid>div:nth-child(3),body.professional-layout .market-summary-grid>div:nth-child(4){grid-row:auto!important;grid-column:auto!important}
 body.professional-layout .item-heading>strong,body.professional-layout .item-title-block>strong{font-size:17px!important;line-height:1.4!important}
 body.professional-layout .primary-destination{font-size:17px!important}
 body.professional-layout .grouped-panel>h3,body.professional-layout .comparison-panel h2{font-size:22px!important}
 body.professional-layout .comparison-score-line>span:not(.compact-score-bar),body.professional-layout .compare-property>span{font-size:24px!important}
 body.professional-layout #landing .hero-copy h1{font-size:28px!important;line-height:1.16!important;margin:12px 0 16px}
 body.professional-layout #landing .home-overview h2,body.professional-layout #landing .home-how>h2,body.professional-layout #landing .land-story h2{font-size:24px!important;line-height:1.25}
 body.professional-layout #landing .hero-copy>p{font-size:15px!important;line-height:1.6}
}

@media(max-width:800px){body.professional-layout .category-evidence{display:none!important}}

/* Compact map chrome leaves the small map usable. */
@media(max-width:800px){
 body.professional-layout .map-tools{top:6px!important;bottom:auto!important;left:6px!important;right:58px!important;padding:5px!important;max-height:42%!important;border-radius:8px}
 body.professional-layout .map-tool-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}
 body.professional-layout .map-tool-actions button,body.professional-layout .map-tool-actions label{display:flex;align-items:center;justify-content:center;gap:3px;min-width:0;min-height:36px!important;margin:0;padding:4px!important;font-size:11px!important;line-height:1.25;text-align:center;white-space:normal;border-radius:6px}
 body.professional-layout .map-tool-actions input{width:15px;height:15px;flex-shrink:0;margin:0;accent-color:#166c61}
 body.professional-layout .map-tools details{margin:4px 0 0!important}
 body.professional-layout .map-tools summary{font-size:11px!important;padding:2px;min-height:24px}
 body.professional-layout #active-layers{font-size:11px;line-height:1.4;max-height:75px}
 body.professional-layout .map-caption{display:none}
 body.professional-layout .buildings-map-control{top:auto!important;bottom:calc(62px + env(safe-area-inset-bottom,0px))!important;left:6px!important;right:auto!important;padding:4px 6px!important;max-width:calc(100% - 16px)!important;display:flex;align-items:center;flex-wrap:wrap;gap:6px;border-radius:8px!important}
 body.professional-layout .buildings-map-control label{display:flex;align-items:center;gap:3px;min-height:32px;margin:0;font-size:12px!important}
 body.professional-layout .buildings-map-control select{min-height:32px!important;width:auto;max-width:120px;font-size:12px!important;padding:4px!important}
 body.professional-layout .buildings-map-control input{width:16px;height:16px;margin:0}
 body.professional-layout .buildings-map-control small{flex:1 0 100%;font-size:10px!important;line-height:1.3;max-height:30px;overflow:auto}
 body.professional-layout .leaflet-control-zoom a{width:32px;height:32px;line-height:32px;font-size:20px}
}

/* Compact result rhythm on phones, with readable evidence and touch targets. */
@media(max-width:800px){
 body.professional-layout .group-items{gap:10px;padding-top:10px}
 body.professional-layout .group-item{padding:12px!important}
 body.professional-layout .item-heading{gap:6px}
 body.professional-layout .item-heading>strong,body.professional-layout .item-title-block>strong{line-height:1.3!important}
 body.professional-layout .item-type{padding:3px 7px;font-size:12px;line-height:1.3}
 body.professional-layout .primary-result{margin:10px 0 8px}
 body.professional-layout .primary-value{line-height:1.3!important}
 body.professional-layout .primary-destination{margin-top:4px;line-height:1.4}
 body.professional-layout .primary-status{margin-top:5px;padding:3px 7px;font-size:12px;line-height:1.35}
 body.professional-layout .primary-explanation{margin:6px 0 0;line-height:1.45!important}
 body.professional-layout .item-value{gap:6px!important}
 body.professional-layout .result-list-row{padding:2px 0 2px 9px!important;gap:6px}
 body.professional-layout .result-list-row span{line-height:1.4!important;font-size:14px!important}
 body.professional-layout .result-list-row strong{line-height:1.35!important;font-size:12px!important}
 body.professional-layout .result-details,body.professional-layout .supporting-results{margin-top:8px!important}
 body.professional-layout .item-details,body.professional-layout .data-details,body.professional-layout .calculation-details,body.professional-layout .supporting-results{margin-top:8px!important;padding-top:7px!important}
 body.professional-layout .item-details p,body.professional-layout .data-details p,body.professional-layout .calculation-details p{margin:6px 0;font-size:14px;line-height:1.45!important}
 body.professional-layout .item-details small,body.professional-layout .item-source{line-height:1.4}
 body.professional-layout .item-title-block .item-details>summary,body.professional-layout .result-details>summary,body.professional-layout .data-details>summary,body.professional-layout .calculation-details>summary{min-height:40px;padding:7px 0!important;line-height:1.4}
 body.professional-layout .ground-indicator{margin:5px 0}
 body.professional-layout [data-result-group]{margin-bottom:18px}
 body.professional-layout [data-result-group]>summary{padding:8px 0 10px;gap:8px}
 body.professional-layout .summary-score-meaning p{margin:6px 0!important}
 body.professional-layout .market-summary-grid .summary-score-meaning,body.professional-layout .market-summary-grid .summary-score-meaning p,body.professional-layout .market-summary-grid .summary-score-meaning a,body.professional-layout .market-summary-grid #summary-area-price-context{line-height:1.45!important}
 body.professional-layout .source-links{gap:6px 10px}
}

/* Owner refinement: mobile-only half-screen map and minimal header menu. */
@media(max-width:800px){
 body.professional-layout>header>.language-selector{display:flex!important;order:1!important;flex:0 0 54px!important;width:54px!important;margin:0!important}
 body.professional-layout>header>#mobile-menu-toggle{order:2!important}
 body.professional-layout>header>#mobile-header-menu{order:3}
 body.professional-layout>header>*:not(.brand):not(.language-selector):not(#mobile-menu-toggle):not(#mobile-header-menu){display:none!important}
 body.professional-layout>header .language-selector select{min-height:40px!important;font-size:13px!important;width:54px!important;padding:4px!important}
 body.professional-layout #mobile-header-menu:not([hidden]){left:auto!important;right:8px!important;width:110px!important;padding:6px!important;gap:5px!important;border-radius:10px}
 body.professional-layout #mobile-header-menu button{width:100%!important;min-height:40px!important;padding:6px 8px!important;font-size:12px!important}
 body.professional-layout .map-tools details,body.professional-layout .map-tool-actions label:has(#map-dimensions){display:none!important}
 body.professional-layout .map-tools{top:auto!important;bottom:calc(66px + env(safe-area-inset-bottom,0px))!important;left:6px!important;right:auto!important;max-width:240px!important}
 body.professional-layout .map-tool-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
 body.professional-layout .buildings-map-control{top:6px!important;right:6px!important;left:auto!important;bottom:auto!important;padding:4px!important;max-width:140px!important}
 body.professional-layout .buildings-map-control>label:has(#map-buildings),body.professional-layout .buildings-map-control>small{display:none!important}
 body.professional-layout .buildings-map-control>label:first-child{margin:0}
 body.professional-layout .leaflet-top.leaflet-right .leaflet-control-zoom{margin-top:50px}
}

/* Shared cleanup: the top Filters action opens the existing filter content. */
body.professional-layout #status[data-redundant-success="true"],
body.professional-layout .find-parcels>summary{display:none!important}
body.professional-layout .find-parcels:not([open]){display:none!important}

/* Account guidance is contextual, on both phone and desktop. */
.account-feature-note{display:none!important}
.account-dialog[data-account-feature-gate]{margin:16px auto auto;max-height:calc(100dvh - 32px)}
.account-dialog .account-gate-message{padding:12px;margin:0 0 14px;border-radius:8px;background:#eaf4f1;color:#173c49;font-size:15px;line-height:1.45}
.account-dialog[data-account-feature-gate] .account-links{margin:8px 0 16px}

@media(max-width:800px){
 body.professional-layout .map-tools{top:6px!important;bottom:auto!important;left:6px!important;right:146px!important;max-width:240px!important}
 body.professional-layout .map-tool-actions button{min-height:36px!important;font-size:11px!important;padding:4px 6px!important}
 body.professional-layout .leaflet-top.leaflet-left .leaflet-control-zoom{margin-top:54px}
}

.mobile-result-filter{display:none}
@media(max-width:800px){
 #result-mode[data-mobile-picker-ready="true"]{display:none!important}
 body.professional-layout .mobile-result-filter{display:inline-block;position:relative;max-width:100%;margin-left:5px}
 body.professional-layout .mobile-result-filter>button{min-height:44px;max-width:100%;white-space:normal;text-align:left;padding:8px 12px;font-size:14px;touch-action:manipulation}
 body.professional-layout .mobile-result-filter-options:not([hidden]){display:flex;position:absolute;top:calc(100% + 4px);left:0;z-index:30;flex-direction:column;gap:4px;width:min(280px,calc(100vw - 40px));padding:6px;background:white;border:1px solid #cbdad5;border-radius:10px;box-shadow:0 5px 20px #18384d25}
 body.professional-layout .mobile-result-filter-options button{min-height:44px;white-space:normal;text-align:left;line-height:1.4;font-size:14px;border:0}
 body.professional-layout .mobile-result-filter-options button[aria-pressed="true"]{background:#e6f4ec;color:#216443}
}

@media(max-width:800px){
 body.professional-layout .group-item .item-heading{position:relative;display:block!important;min-height:64px}
 body.professional-layout .group-item .item-title-block{min-width:0;width:100%}
 body.professional-layout .group-item .item-title-block>strong{display:block;padding-right:84px}
 body.professional-layout .group-item .item-title-block>.item-details>summary{max-width:calc(100% - 84px)}
 body.professional-layout .group-item .item-heading>.item-type{position:absolute;top:0;right:0;box-sizing:border-box;width:76px;margin:0!important;padding:3px 5px;font-size:11px;line-height:1.3;text-align:center}
 body.professional-layout .group-item .item-heading>.item-map-control{position:absolute;top:25px;right:0;box-sizing:border-box;display:flex;justify-content:center;gap:4px;width:76px;min-height:32px!important;margin:0!important;padding:4px 6px;font-size:11px!important;line-height:1.3}
 body.professional-layout .group-item .item-map-control input{width:14px;height:14px;margin:0}
}

/* Keep the mobile sun seasons at the side of the half-screen map. */
@media(max-width:800px){
 body.professional-layout .sun-map-controls{position:fixed!important;right:8px!important;bottom:calc(70px + env(safe-area-inset-bottom,0px))!important;left:auto!important;top:auto!important;margin:0!important;box-sizing:border-box;width:84px!important;min-width:0!important;max-width:84px!important;padding:6px!important;border-radius:8px;background:#fff;pointer-events:auto}
 body.professional-layout .sun-map-controls>strong{display:block;font-size:11px!important;line-height:1.25;margin:0 0 5px;white-space:normal}
 body.professional-layout .sun-map-controls>.season-buttons{display:flex!important;flex-direction:column!important;gap:4px!important;margin:0!important}
 body.professional-layout .sun-map-controls .season-buttons button{display:block;width:100%;min-height:32px!important;margin:0!important;padding:5px 3px!important;font-size:11px!important;line-height:1.25}
 body.professional-layout .sun-map-controls>label{display:none!important}
}

/* Permitted building percentage (catalogue display ID 27): result and details only. */
body.professional-layout .group-item[data-item-id="27"] .item-map-control,
body.professional-layout .group-item[data-item-id="27"] .map-unavailable{display:none!important}
