/* Phone path for the parcel map. Every rule hangs on html.lcm, which mobile_flow.js sets only while
   the phone media query matches, so a computer renders exactly as before. Colours come from the
   page's own tokens (--terra, --ink, --line, --font) with the IT values as fallbacks. */
.lcm-tools,.lcm-cross,.lcm-crossbar,.lcm-back,.lcm-change,.lcm-delivery{display:none}

/* ---------- 1 · first screen: field, «La mia posizione» and «Apri la mappa» in one row */
html.lcm .lcm-start{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:10px 0 2px}
html.lcm .lcm-start .geo-btn,html.lcm .lcm-open{display:flex;align-items:center;justify-content:center;gap:8px;min-height:48px;margin:0;padding:0 10px;border:1.5px solid var(--line-strong,#cfc6b6);border-radius:12px;background:#fff;color:var(--ink,#13212b);font:600 15px/1.2 var(--font,system-ui);text-decoration:none;cursor:pointer;box-shadow:0 1px 2px rgba(19,33,43,.06)}
html.lcm .lcm-start .geo-btn svg,html.lcm .lcm-open svg{width:20px;height:20px;flex:0 0 20px;color:var(--terra,#c85a32)}
html.lcm .tool-mapcap{display:none!important}
/* The map in the page is a preview: one finger scrolls the page, a tap opens the map step. */
html.lcm:not(.lcm-step) #map{touch-action:pan-y!important}
html.lcm:not(.lcm-step) #map .leaflet-control-container{pointer-events:none}

/* ---------- 2 · the map step: the whole screen, the page under it does not move */
html.lcm-step,html.lcm-step body{overflow:hidden!important;overscroll-behavior:none}
html.lcm-step body{position:fixed;left:0;right:0;width:100%}
html.lcm-step .map-col{position:fixed!important;inset:0!important;z-index:800!important;margin:0!important;padding:0!important;width:100%!important;height:100%!important;max-width:none!important;border-radius:0!important;background:#0e353b;transform:none!important}
html.lcm-step #map{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;min-height:0!important;max-height:none!important;border-radius:0!important;margin:0!important;touch-action:none!important}
html.lcm-step #studio .map-col .map-toolbar{position:absolute!important;top:0!important;left:0!important;right:0!important;bottom:auto!important;height:auto!important;z-index:840!important;display:flex!important;align-items:flex-start;gap:8px;margin:0!important;padding:calc(8px + env(safe-area-inset-top)) 10px 8px!important;background:linear-gradient(#fff 70%,rgba(255,255,255,0));border:0!important;box-shadow:none!important;pointer-events:none}
html.lcm-step #studio .map-col .map-toolbar>*{pointer-events:auto}
html.lcm-step #studio .map-col .map-search{display:block!important;position:relative!important;inset:auto!important;height:auto!important;flex:1 1 auto;min-width:0;margin:0!important;padding:0!important;background:none!important;border:0!important;box-shadow:none!important}
html.lcm-step #studio .map-col .map-search>*:not(.search-box):not(#suggest):not(label){display:none!important}
html.lcm-step #studio .map-col .map-search .search-box{position:relative!important;inset:auto!important;height:48px;min-height:48px;margin:0!important;border-radius:12px;box-shadow:0 2px 10px rgba(14,26,29,.18)}
html.lcm-step #studio .map-col .map-search #suggest{position:absolute;left:0;right:0;top:54px;z-index:860;max-height:min(52vh,330px);overflow-y:auto;border-radius:12px;box-shadow:0 14px 34px rgba(14,26,29,.24)}
html.lcm-step #studio .lcm-back{display:flex;align-items:center;justify-content:center;flex:0 0 48px;width:48px;height:48px;padding:0;border:0;border-radius:12px;background:#fff;color:var(--ink,#13212b);box-shadow:0 2px 10px rgba(14,26,29,.18);cursor:pointer}
html.lcm-step .lcm-back svg{width:24px;height:24px}
html.lcm-step .map-layers-toggle,html.lcm-step .map-fs,html.lcm-step .leaflet-control-zoom,html.lcm-step .map-wake{display:none!important}
html.lcm-step .map-col .map-modes{position:absolute!important;top:auto!important;left:auto!important;right:70px!important;bottom:calc(var(--lcm-card,0px) + 128px)!important;z-index:850!important;max-width:calc(100% - 84px)!important}
html.lcm-step .map-col .map-modes button{min-height:48px}
/* Hints: one pill under the search bar, never over the controls or the card. */
html.lcm-step .map-col .pinmsg,html.lcm-step .map-col .parcel-state,html.lcm-step .map-col .map-flag{top:calc(var(--lcm-top,64px) + 6px)!important;bottom:auto!important;left:12px!important;right:12px!important;max-height:none!important;z-index:830!important}
html.lcm-step .leaflet-bottom{bottom:calc(var(--lcm-card,0px) + 6px)!important;transition:bottom .2s}
html.lcm-step .leaflet-bottom.leaflet-left{left:4px}
html.lcm-step .map-north-control{transform:scale(.86);transform-origin:right bottom}

/* Map buttons: 48 px, in a column on the right, under the thumb, above the card. */
html.lcm-step .lcm-tools{display:flex;flex-direction:column;gap:8px;position:absolute;right:12px;bottom:calc(var(--lcm-card,0px) + 54px);z-index:845;transition:bottom .2s}
html.lcm-step .lcm-tool{display:flex;align-items:center;justify-content:center;width:48px;height:48px;padding:0;border:0;border-radius:14px;background:#fff;color:var(--ink,#13212b);box-shadow:0 2px 10px rgba(14,26,29,.22);cursor:pointer}
html.lcm-step .lcm-tool svg{width:22px;height:22px}
html.lcm-step .lcm-tool:disabled{color:#a9a39a}
html.lcm-step .lcm-tool[aria-pressed=true]{background:var(--terra,#c85a32);color:#fff}
html.lcm-step .lcm-tool:active,html.lcm-step .lcm-back:active{transform:scale(.96)}

/* Crosshair mode: the mark on the centre, the parcel under it and one button. */
html.lcm-cross-on .lcm-cross{display:block;position:absolute;left:50%;top:50%;width:48px;height:48px;margin:-24px 0 0 -24px;z-index:700;pointer-events:none;transition:transform .15s}
html.lcm-cross-on .lcm-cross.moving{transform:scale(1.15)}
html.lcm-cross-on .lcm-cross svg{display:block;width:48px;height:48px}
html.lcm-cross-on .lcm-crossbar{display:grid;gap:10px;position:fixed;left:8px;right:8px;bottom:calc(8px + env(safe-area-inset-bottom));z-index:890;padding:14px 14px 12px;border-radius:18px;background:#fff;box-shadow:0 -2px 30px rgba(14,26,29,.28)}
html.lcm-cross-on .lcm-crossinfo{margin:0;min-height:24px;font:600 18px/1.3 Georgia,"Times New Roman",serif;color:var(--ink,#13212b)}
html.lcm-cross-on .lcm-crossgo{width:100%;min-height:52px;font-size:17px}
html.lcm-cross-on .pick-bar{display:none!important}
html.lcm-cross-on .map-col .parcel-state{display:none!important}

/* ---------- 3 · the card from the bottom after a choice */
html.lcm .pick-bar:not([hidden]){display:grid!important;grid-template-columns:1fr 1fr;grid-template-areas:"grab grab" "body body" "go go" "dl dl" "join change" "hand hand" "other other";gap:0 10px;align-items:center;left:0!important;right:0!important;bottom:0!important;padding:10px 16px calc(10px + env(safe-area-inset-bottom))!important;border:0!important;border-radius:20px 20px 0 0!important;background:#fff!important;color:var(--ink,#13212b)!important;box-shadow:0 -6px 34px rgba(14,26,29,.24)!important}
html.lcm .pick-bar:not([hidden])::before{content:"";grid-area:grab;justify-self:center;width:40px;height:4px;margin:0 0 10px;border-radius:2px;background:#d9d2c5}
html.lcm body.cookie-open .pick-bar:not([hidden]){bottom:var(--cookie-height,0px)!important}
html.lcm .pick-bar .pick-bar-body{display:block!important;grid-area:body;min-width:0}
html.lcm .pick-bar .pick-bar-text{display:flex;flex-wrap:wrap;align-items:baseline;gap:0 8px;margin:0;color:var(--ink,#13212b)}
html.lcm .pick-bar #pickbartown{order:-1;flex:1 0 100%;margin-bottom:2px;font:700 12.5px/1.3 var(--font,system-ui);letter-spacing:.06em;text-transform:uppercase;color:#6b665e}
html.lcm .pick-bar #pickbartownsep,html.lcm .pick-bar #pickbarsep,html.lcm .pick-bar #pickbarprice{display:none!important}
html.lcm .pick-bar #pickbarcount{font:600 21px/1.25 Georgia,"Times New Roman",serif;color:var(--ink,#13212b)}
html.lcm .pick-bar #pickbararea{font:500 16px/1.3 var(--font,system-ui);color:#45413b}
html.lcm .pick-bar .pick-bar-sub{margin:4px 0 0;font-size:14px;line-height:1.35;color:#6b665e}
html.lcm .pick-bar .pick-bar-note:not([hidden]){margin:8px 0 0;padding:8px 10px;border-radius:10px;background:#fdf1e4;color:#7a3f14;font-size:14px;line-height:1.35}
html.lcm .pick-bar .pick-bar-msg:not([hidden]){margin:4px 0 0;color:var(--ink,#13212b)!important}
html.lcm body .pick-bar #pickbargo{grid-area:go;width:100%;height:54px!important;min-height:54px!important;margin:12px 0 0;font-size:17.5px;border-radius:13px}
html.lcm .pick-bar .lcm-delivery{grid-area:dl;display:block;margin:6px 0 2px;text-align:center;font-size:13.5px;line-height:1.3;color:#6b665e}
html.lcm .pick-bar #pickbarjoin,html.lcm .pick-bar .lcm-change{display:flex;align-items:center;justify-content:center;min-height:46px;margin:6px 0 0;padding:0 8px;border:1.5px solid var(--line-strong,#cfc6b6)!important;border-radius:12px;background:#fff;color:var(--ink,#13212b)!important;font:600 15px/1.2 var(--font,system-ui);text-decoration:none!important;cursor:pointer}
html.lcm .pick-bar #pickbarjoin{grid-area:join;flex:none}
html.lcm .pick-bar .lcm-change{grid-area:change}
html.lcm .pick-bar #pickbarhandoff{grid-area:hand;justify-content:center;min-height:44px;margin:2px 0 0;border:0!important;color:#45413b!important;font-size:14px;text-decoration:underline!important}
html.lcm .pick-bar #pickbarother:not([hidden]){grid-area:other}
html.lcm .pick-bar.is-blocked .lcm-change,html.lcm .pick-bar.is-blocked .lcm-delivery{display:none}
html.lcm body.pickbar-open{padding-bottom:var(--lcm-card,220px)!important}

/* ---------- 4 · the order as one screen: field first, the pay button below the form, never over it */
html.lcm #paybg .modal{display:flex!important;flex-direction:column;height:100%;height:100dvh!important;max-height:none!important;overflow:hidden!important}
html.lcm #paybg .modal-top{flex:0 0 auto;min-height:52px}
html.lcm #paybg #orderForm{display:flex;flex-direction:column;flex:1 1 auto;min-height:0}
html.lcm #paybg .modal-body{flex:1 1 auto;min-height:0;overflow-y:auto!important;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;padding-bottom:16px!important}
html.lcm #paybg .modal-foot{position:static!important;flex:0 0 auto;padding:10px 16px calc(10px + env(safe-area-inset-bottom))!important;box-shadow:0 -6px 18px rgba(14,26,29,.07)}
html.lcm #paybg .order-fields{gap:12px!important}
html.lcm #paybg .order-cover{grid-template-columns:64px 1fr!important;gap:12px!important;padding:0!important;align-items:center}
html.lcm #paybg .cover-stack{width:64px!important;height:64px!important;margin:0!important}
html.lcm #paybg .cover-back,html.lcm #paybg .cover-brand,html.lcm #paybg .cover-band{display:none!important}
html.lcm #paybg .cover-front{border-radius:12px!important;box-shadow:0 0 0 1px rgba(19,33,29,.14)!important}
html.lcm #paybg .cover-map{height:100%!important}
html.lcm #paybg .cover-text{display:grid;grid-template-columns:1fr auto;align-items:center;gap:0 10px}
html.lcm #paybg .cover-label{grid-column:1;margin:0!important;font-size:12px!important}
html.lcm #paybg .cover-parcel{grid-column:1;font-size:16px!important;line-height:1.3!important}
html.lcm #paybg .cover-change{grid-column:2;grid-row:1/span 2;margin:0!important;min-height:44px}
html.lcm #paybg .lang-options{grid-template-columns:repeat(3,1fr)!important;gap:8px!important}
html.lcm #paybg .lang-option{grid-template-columns:minmax(0,1fr)!important;grid-template-areas:"t" "p"!important;align-content:center;min-height:66px!important;padding:10px 10px 9px!important;gap:2px!important;text-align:left}
html.lcm #paybg .lang-option .lo-price:before{content:none!important}
html.lcm #paybg .lang-option .lo-desc{display:none!important}
html.lcm #paybg .lang-option .lo-radio{display:none!important}
html.lcm #paybg .lang-option .lo-title{padding-right:0!important;font-size:14.5px!important;line-height:1.2}
html.lcm #paybg .lang-option .lo-price{font-size:17px!important}
/* Consent rows: the whole row and the box itself take a thumb (44 px and up); the wording is unchanged. */
html.lcm #paybg label.check{display:grid!important;grid-template-columns:44px 1fr;align-items:center;gap:6px;min-height:48px;margin:0!important;padding:4px 8px 4px 0!important;border-radius:12px}
html.lcm #paybg label.check>input[type=checkbox]{-webkit-appearance:none;appearance:none;position:static!important;opacity:1!important;width:44px!important;height:44px!important;margin:0!important;border:0!important;border-radius:10px;background:center/26px 26px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 26'%3E%3Crect x='1' y='1' width='24' height='24' rx='6' fill='%23fff' stroke='%23807a70' stroke-width='2'/%3E%3C/svg%3E");cursor:pointer}
html.lcm #paybg label.check>input[type=checkbox]:checked{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 26'%3E%3Crect x='0' y='0' width='26' height='26' rx='7' fill='%23c85a32'/%3E%3Cpath d='M7 13.5l4 4 8-9' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")}
html.lcm #paybg label.check>input[type=checkbox]:focus-visible{outline:3px solid rgba(200,90,50,.45);outline-offset:-2px}
html.lcm #paybg label.check>span{font-size:14.5px;line-height:1.4}
html.lcm #paybg label.check .consent-more{min-height:44px;padding:0 4px;vertical-align:middle}
/* Before the buyer has done anything, a consent row is not shown as an error. */
html.lcm #paybg label.check.consent-check,html.lcm #paybg label.check{border:1.5px solid transparent!important;box-shadow:none!important;background:transparent!important}
html.lcm #paybg label.check:has(input:checked){background:#fbf3ee!important}
html.lcm #paybg #go{min-height:54px!important;font-size:17px!important;border-radius:13px}
html.lcm #paybg #go.is-waiting{background:var(--terra,#c85a32)!important;border-color:var(--terra,#c85a32)!important;color:#fff!important;opacity:.62!important}
html.lcm #paybg .pay-hint{margin:0 0 8px!important;text-align:center;font-size:13.5px;color:#45413b}
html.lcm #paybg label.check:has(input[aria-invalid="true"]){border-color:#b3261e!important;background:#fdeceb!important}

/* In the page (not the map step) the card stays short: what is chosen and the next step. */
html.lcm:not(.lcm-step) .pick-bar #pickbarjoin,html.lcm:not(.lcm-step) .pick-bar .lcm-change,html.lcm:not(.lcm-step) .pick-bar #pickbarhandoff,html.lcm:not(.lcm-step) .pick-bar .pick-bar-sub,html.lcm:not(.lcm-step) .pick-bar:not([hidden])::before{display:none!important}
html.lcm:not(.lcm-step) .pick-bar:not([hidden]){padding-top:12px!important}
html.lcm-step #studio .lcm-back{order:-1}
/* With the card open the column keeps the three map tools; pinch zooms. */
html.lcm-step body.pickbar-open .lcm-tools button:nth-child(n+4){display:none}
html.lcm #paybg summary{min-height:44px;display:flex;align-items:center}
html.lcm-cross-on .lcm-crossgo:disabled{opacity:.5}
html.lcm .pick-bar #pickbarjoin{white-space:normal!important;text-align:center;line-height:1.2;font-size:14.5px}
html.lcm-step .map-north-control{display:none!important}
html.lcm body .pick-bar #pickbarjoin{border-radius:12px!important;min-height:46px!important;height:auto!important;padding:4px 10px!important;justify-content:center!important;align-self:stretch}
html.lcm #paybg label.check .consent-more{display:flex!important;align-items:center;width:max-content;min-height:44px!important;height:auto!important;padding:0 2px!important;margin:0!important;line-height:1.2!important}
html.lcm .lcm-start .geo-btn,html.lcm .lcm-open{white-space:nowrap}
@media (max-width:374px){html.lcm .lcm-start{grid-template-columns:1fr}}
html.lcm-step #studio .map-toolbar #q{text-overflow:ellipsis}
html.lcm-cross-on .address-pin{display:none!important}
html.lcm .pick-bar .pick-bar-sub{text-align:left!important;justify-content:flex-start!important}
html.lcm body .pick-bar #pickbarjoin{text-align:center!important}
html.lcm .pick-bar #pickbarhandoff{justify-self:center}
html.lcm #paybg .lang-option{grid-template-rows:1fr auto!important;align-content:stretch!important}
html.lcm #paybg .lang-option .lo-price{align-self:end}
/* Order header: comune, sheet and parcel, area each on its own line, no dangling separators. */
html.lcm #paybg .cover-parcel .cp-part{display:block}
html.lcm #paybg .cover-parcel .cp-sep{display:none}
