/* Deliberately scoped to the requested app components. No landing/footer rules. */
body.app-shell .modal{border:1px solid #dae4d5;border-radius:20px;box-shadow:0 20px 70px #112b2229;max-height:94dvh;padding:0}
body.app-shell .modal>.modal-card{max-height:92dvh;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-gutter:stable;padding:24px}
body.app-shell .modal-head{gap:18px;align-items:flex-start;margin:0 0 22px;padding-bottom:18px;border-bottom:1px solid #e4eade}
body.app-shell .modal-head h3{margin:6px 0 0;line-height:1.5}body.app-shell .modal-head .icon-btn{flex:none}
body.app-shell #admin-user-detail{display:block!important;width:100%!important;margin:18px 0!important;min-width:0}
body.app-shell #admin-user-detail .admin-user-kpis{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(140px,1fr))!important;gap:10px!important;width:100%!important}
body.app-shell #admin-user-detail .admin-user-kpis>span{width:auto!important;min-width:0!important;padding:14px!important;white-space:normal!important;word-break:normal!important}
body.app-shell #admin-user-detail .admin-user-farms{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(180px,1fr))!important;gap:10px!important;margin:12px 0!important}
body.app-shell #admin-user-detail .admin-user-farms>span{padding:12px!important;width:auto!important;min-width:0!important;white-space:normal!important}
body.app-shell .analysis-goal-picker>button,body.app-shell .geo-analysis-goals>button{min-width:0;min-height:76px;padding:12px;gap:9px}
body.app-shell .analysis-goal-picker>button small,body.app-shell .geo-analysis-goals>button small{display:block;font-size:11px;line-height:1.65;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
body.app-shell .analysis-goal-picker>button strong,body.app-shell .geo-analysis-goals>button strong{font-size:12px;line-height:1.7}
body.app-shell .row-actions button,body.app-shell [data-market-section],body.app-shell [data-market-section]>span{white-space:nowrap!important}
body.app-shell [data-market-section]{min-width:max-content;flex-shrink:0}
@media(max-width:720px){body.app-shell #farm-ai-launcher{left:14px;right:auto;bottom:calc(86px + env(safe-area-inset-bottom));padding:10px 13px;min-height:44px;max-width:145px;z-index:45}body.app-shell #farm-ai-launcher .ai-launcher-copy small{display:none}body.app-shell #farm-ai-launcher .ai-orb{width:30px;height:30px}}
body.app-shell #ai-workspace .ai-main-panel{position:relative;min-width:0}
body.app-shell #ai-workspace .ai-context-sidebar{position:absolute!important;left:12px!important;right:12px!important;min-width:0!important;max-width:none!important;bottom:calc(100% + 8px)!important;top:auto!important;width:auto!important;height:auto!important;max-height:none!important;min-height:0!important;overflow:visible!important;padding:0!important;transform:none!important;visibility:visible!important;border:0!important;background:transparent!important;box-shadow:none!important;z-index:90!important;pointer-events:none}
body.app-shell #ai-workspace .ai-context-sidebar:has(details[open]){pointer-events:auto}
body.app-shell #ai-workspace #ai-context-drawer{position:static!important;width:100%!important;max-width:none!important;margin:0!important;border-radius:18px!important;background:#fff!important;border:1px solid #d9e4d5!important;box-shadow:0 12px 44px #193e2b22!important;overflow:hidden!important;height:auto!important;min-height:0!important;pointer-events:auto!important}
body.app-shell #ai-workspace #ai-context-drawer>summary,body.app-shell #ai-workspace #ai-context-drawer:not([open]){display:none!important}
body.app-shell #ai-workspace .ai-context-drawer-body{padding:14px!important;max-height:calc(var(--ai-context-room,440px) - 140px)!important;overflow:auto!important;display:block!important}
body.app-shell #ai-workspace .ai-composer-context{display:grid!important;grid-template-columns:1fr!important;gap:14px!important;position:static!important;max-height:none!important}
body.app-shell #ai-workspace .ai-context-picker-grid[hidden]{display:none!important}
.context-panel-head,.context-confirm{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 14px;background:#fff}
.context-confirm{border-top:1px solid #e3eadf}.context-confirm>span{font-size:12px;color:#59765a}
.ai-land-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(125px,1fr));gap:8px}
.ai-mode-card,.ai-land-card{border:1px solid #dce6d5;border-radius:12px;background:#f8faf5;padding:10px;text-align:start;color:#214332;min-width:0}
.ai-mode-card{display:flex;align-items:center;gap:7px;font-size:12px}.ai-land-card{display:grid;gap:4px}.ai-land-card span{font-size:10px;color:#71856c}.ai-land-card b{font-size:12px}
.ai-mode-card.active,.ai-land-card.active{border-color:#458461;background:#e7f2e7;box-shadow:inset 0 0 0 1px #458461}
.context-land-head{display:flex;gap:10px;align-items:center;justify-content:space-between}.context-land-head input{min-width:0;border:1px solid #dce5d7;border-radius:10px;padding:8px;max-width:240px}
.ai-land-cards{max-height:170px;overflow:auto}
body.app-shell #ai-workspace #ai-analysis-context-list{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:8px;max-height:190px;overflow:auto;margin-top:10px}
body.app-shell #ai-workspace .ai-analysis-chip{display:flex!important;align-items:flex-start!important;gap:8px!important;max-width:none!important;padding:10px!important;border:1px solid #dce6d4!important;background:#fff!important;border-radius:10px!important}
body.app-shell #ai-workspace .ai-analysis-chip span{min-width:0;display:grid;gap:3px}body.app-shell #ai-workspace .ai-analysis-chip small{white-space:normal!important;font-size:10px!important;line-height:1.6!important}
body.app-shell #ai-workspace #advanced-ai-form textarea{min-height:46px!important;max-height:none!important;line-height:1.9!important;resize:none!important}
body.app-shell #ai-workspace #ai-panel-backdrop{z-index:25!important;background:transparent!important}
.stable-step-nav{display:flex;gap:8px;margin:0 0 18px}.stable-step-nav span{flex:1;text-align:center;border-radius:10px;padding:9px;background:#f1f4ec;font-size:12px}.stable-step-nav span.active{background:#e0eedc;color:#22593d;font-weight:700}
.stable-step-actions,.stable-tools{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-top:14px}.stable-step-actions{justify-content:space-between}
.stable-step-help{font-size:12px;color:#62755e;line-height:1.9}.stable-step-hidden{display:none!important}
.stable-review,.stable-facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(135px,1fr));gap:10px;margin:14px 0}.stable-review>div,.stable-facts>div{padding:13px;border:1px solid #e0e8d9;border-radius:12px;background:#f8faf5}.stable-review small,.stable-facts small{display:block;font-size:11px;color:#6c7f67}.stable-review b,.stable-facts b{display:block;margin-top:5px;overflow-wrap:anywhere}
.stable-tabs{display:flex;gap:7px;overflow:auto;margin:16px 0;padding-bottom:6px}.stable-tabs button{flex:none;border:1px solid #dae5d5;border-radius:9px;padding:8px 12px;background:#fff;white-space:nowrap}.stable-tabs button.active{background:#234d37;color:white}
.stable-entry{padding:15px 0;border-bottom:1px solid #e2e9db}.stable-entry p{white-space:pre-wrap;line-height:1.9;overflow-wrap:anywhere}.stable-entry small{color:#6a8066;font-size:11px}
#stable-dossier .modal-card{display:flex;flex-direction:column;max-height:92dvh;overflow:hidden}#stable-dossier [data-dossier-body]{min-height:0;overflow:auto;overscroll-behavior:contain}
.stable-inline-task{border:1px solid #d7e3cf;background:#f9fbf6;border-radius:16px;margin:12px 0;padding:16px;color:#1e3c2c}.stable-inline-task h4{margin:0 0 12px}.stable-inline-task .field{min-width:0}.stable-inline-task input,.stable-inline-task select,.stable-inline-task textarea{width:100%;max-width:100%}.stable-inline-task .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.stable-inline-task .form-error{font-size:12px}
.stable-proposals{display:flex;gap:7px;flex-wrap:wrap;padding-top:12px}.stable-proposals button{border:1px solid #bad3b1;background:#f1f8ed;border-radius:10px;padding:8px 12px;font-size:12px;color:#24563a}
.stable-research{padding:20px;border:1px solid #dce5d5;border-radius:16px;margin-top:18px}.stable-research p{font-size:12px;line-height:1.9;color:#65785e}.stable-toggle{display:flex;align-items:center;gap:12px}.stable-toggle input{appearance:auto;width:20px;height:20px;accent-color:#285d40}.stable-toggle span{font-size:13px}
.dk-location-field{min-width:0}.dk-location-trigger{display:flex;align-items:center;gap:9px;min-height:48px;width:100%;padding:10px 13px;background:#fff;border:1px solid #d9e3d5;border-radius:12px;text-align:start;color:#284833}.dk-location-trigger svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;flex:none}.dk-location-trigger span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dk-location-original{display:none!important}.dk-location-panel{position:fixed!important;inset:auto;box-sizing:border-box;z-index:10001;display:flex;flex-direction:column;border:1px solid #cfdcc9;border-radius:15px;box-shadow:0 12px 44px #183f2a30;background:#fff;padding:12px;direction:rtl;margin:0;overflow:hidden;touch-action:pan-y}.dk-location-panel header{display:flex;gap:8px;align-items:center;justify-content:space-between}.dk-location-panel button{font:inherit;cursor:pointer}.dk-location-panel header button{border:0;border-radius:8px;padding:6px 10px;background:#f0f5ec}.dk-location-search input,.dk-location-custom input{width:100%;border:1px solid #d8e3d1;border-radius:10px;padding:10px;margin:10px 0}.dk-location-options{overflow:auto;min-height:50px;max-height:300px;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;display:flex;flex-direction:column;gap:4px}.dk-location-options button{display:flex;justify-content:space-between;gap:8px;border:0;background:#f8faf5;padding:10px 12px;border-radius:9px;text-align:start;min-height:44px;flex-shrink:0}.dk-location-options button:hover{background:#e8f2e2}.dk-location-options small{font-size:11px;color:#6e8269}.dk-location-panel footer{display:flex;gap:8px;flex-wrap:wrap;padding-top:8px}.dk-location-panel footer button{border:0;background:#edf4e8;border-radius:8px;padding:8px;font-size:12px}.dk-location-custom[hidden]{display:none}
@media(max-width:600px){body.app-shell .modal>.modal-card{padding:18px}.stable-inline-task .form-grid{grid-template-columns:1fr}.context-land-head{flex-direction:column;align-items:stretch}.context-land-head input{max-width:none}.context-confirm{flex-wrap:wrap}body.app-shell #ai-workspace .ai-context-drawer-body{padding:12px!important}}
@media(prefers-reduced-motion:reduce){.stable-inline-task,.dk-location-panel{animation:none;scroll-behavior:auto}}

body.app-shell #satellite-ai-output .geo-ai-inline-summary{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:10px!important;padding:14px!important}body.app-shell #satellite-ai-output .geo-ai-inline-summary>span{align-self:flex-start}body.app-shell #satellite-ai-output .geo-ai-inline-summary>div{width:100%;min-width:0}body.app-shell #satellite-ai-output .geo-ai-inline-summary strong,body.app-shell #satellite-ai-output .geo-ai-inline-summary small{display:block;max-width:none!important;white-space:normal!important;line-height:1.95!important}body.app-shell #satellite-ai-output .geo-ai-inline-summary>button{align-self:flex-start;margin-top:6px}

body.app-shell [data-analysis-goal="soil"]>span svg{width:23px;height:23px;display:block}

body.app-shell #ai-workspace #advanced-ai-form .ai-context-sidebar{left:12px!important;right:12px!important;width:auto!important;min-width:0!important;max-width:none!important;margin:0!important}
body.app-shell #ai-workspace #advanced-ai-form #ai-context-drawer .ai-context-picker-grid[hidden]{display:none!important}
body.app-shell #ai-workspace #ai-mode-cards{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto;gap:8px;padding-bottom:5px;max-height:88px}
body.app-shell #ai-workspace #ai-mode-cards>button{flex:0 0 145px;min-height:52px;font-size:12px}

.stable-tools-menu{margin:0 12px 6px;flex:none}.stable-tools-menu>summary{font-size:12px;color:#285d40;cursor:pointer;padding:8px 10px;list-style-position:inside}.stable-tools-menu .stable-proposals{padding:6px 0;gap:6px}.stable-tools-menu .stable-proposals button{font-size:11px;padding:7px 10px}

body.app-shell #spatial-farm-modal #spatial-farm-form .stable-step-hidden,body.app-shell #spatial-farm-modal #spatial-farm-form button[hidden],body.app-shell #spatial-farm-modal #spatial-farm-form .stable-review[hidden]{display:none!important}

body.app-shell .analysis-goal-picker>button>span,body.app-shell .geo-analysis-goals>button>span{width:36px!important;height:36px!important;min-width:36px!important}body.app-shell .analysis-goal-picker>button>b,body.app-shell .geo-analysis-goals>button>strong{font-size:12px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}

.dk-location-panel>header,.dk-location-panel>.dk-location-search,.dk-location-panel>footer,.dk-location-panel>.dk-location-custom{flex:none}.dk-location-panel>.dk-location-options{flex:1;min-height:44px;scrollbar-width:thin}

/* 6.12.8: the custom-city editor must remain reachable above a short keyboard. */
.dk-location-panel:has(.dk-location-custom:not([hidden])){overflow-y:auto;scrollbar-width:thin}
.dk-location-panel:has(.dk-location-custom:not([hidden]))>.dk-location-options{display:none}

/* Viewport-bounded location picker: native focus containment on touch devices,
   one definite scroll region, and no fixed minimum that can clip short screens. */
html:has(dialog.dk-location-panel[open]){overflow:hidden!important;overscroll-behavior:none}
.dk-location-panel{display:grid!important;grid-template-rows:auto auto minmax(0,1fr) auto auto;min-height:0!important;min-width:0;max-width:none;max-height:none;margin:0!important;gap:0;overflow:hidden!important;touch-action:pan-y pinch-zoom}
.dk-location-panel::backdrop{background:#17352466;backdrop-filter:blur(3px)}
.dk-location-panel>header,.dk-location-panel>.dk-location-search,.dk-location-panel>footer,.dk-location-panel>.dk-location-custom{min-width:0}
.dk-location-panel>header button{display:grid;place-items:center;min-width:44px;min-height:44px;padding:6px;border-radius:10px;font-size:20px;line-height:1}
.dk-location-panel>header strong{font-size:16px;line-height:1.6;min-width:0}
.dk-location-panel :is(input,button){font-family:inherit}
.dk-location-panel :is(.dk-location-search,.dk-location-custom) input{font-size:16px!important;min-height:46px;line-height:1.5}
.dk-location-panel>.dk-location-options{display:flex;min-height:0!important;max-height:none!important;overflow-x:hidden;overflow-y:auto;overscroll-behavior-y:contain;touch-action:pan-y pinch-zoom;scrollbar-gutter:stable;scrollbar-width:thin}
.dk-location-options button,.dk-location-options button *{touch-action:pan-y pinch-zoom}
.dk-location-options button{min-height:48px;font-size:14px;line-height:1.7;overflow:visible}
.dk-location-panel>footer{gap:8px;padding-top:8px}
.dk-location-panel>footer:empty{display:none}
.dk-location-panel>footer button{min-height:44px;font-size:13px}
.dk-location-panel[data-custom="1"]{grid-template-rows:auto auto minmax(0,1fr) auto}
.dk-location-panel[data-custom="1"]>.dk-location-options{display:none}
.dk-location-panel[data-custom="1"]>.dk-location-custom{min-height:0;overflow:auto;overscroll-behavior:contain}
.dk-location-panel[data-compact="1"]{display:block!important;overflow-y:auto!important;overscroll-behavior-y:contain;scrollbar-width:thin}
.dk-location-panel[data-compact="1"]>.dk-location-options{overflow:visible;max-height:none!important;min-height:0!important}
.dk-location-panel[data-compact="1"]>header{position:sticky;top:-12px;z-index:1;background:#fff;padding-block:4px}
.dk-location-panel[data-compact="1"]>.dk-location-custom{overflow:visible}
.dk-location-panel :is(input,button):focus-visible{outline:2px solid #27724f;outline-offset:2px}

/* Shared palette and touch sizing for specialized search/choice popovers. */
.dk-location-trigger,.dk-multi-trigger{min-height:44px;border-radius:12px}
.dk-location-panel,.dk-multi-panel.dk-choice-popover{border:1px solid #dce4d8;background:#fffefa;border-radius:14px;box-shadow:0 12px 30px -8px #182c1d2e,0 2px 7px #182c1d0f}
.dk-location-panel .dk-location-options button,.dk-choice-option{min-height:44px}
.dk-location-trigger:focus-visible,.dk-multi-trigger:focus-visible,.dk-choice-option:focus-within{outline:2px solid #357552;outline-offset:2px}
@media(pointer:coarse){.dk-location-trigger,.dk-multi-trigger,.dk-choice-option,.dk-location-options button{font-size:16px;min-height:44px}}
@media(forced-colors:active){.dk-location-panel,.dk-multi-panel.dk-choice-popover{border:1px solid CanvasText;background:Canvas}.dk-choice-option:focus-within{outline-color:Highlight}}
