/* Mobile first: pictures to choose, the real garden to place, one clear action. */
body.planting #scena{inset:0}
body.planting #dock,body.planting #garden-toolbar,body.planting #garden-helper,body.planting #save-indicator,body.planting #comandi,body.planting #basso,body.planting #posa-barra,body.planting #avatar,body.planting #costruisci{display:none!important}
body.planting #alto{top:10px;left:16px;right:16px}body.planting #targa{background:transparent;border:0;box-shadow:none;padding:0;height:44px;min-height:44px;max-width:none}
body.planting .cella:hover .su{transform:none}
#planting-panel{position:fixed;z-index:20;left:8px;right:8px;bottom:max(8px,env(safe-area-inset-bottom));max-height:65dvh;overflow-y:auto;padding:16px;background:var(--crema);color:var(--ink);border:1px solid var(--linea);border-radius:12px;box-shadow:0 5px 28px #203b2520;touch-action:pan-y}
#planting-panel.choosing{height:58dvh;display:flex;flex-direction:column;overflow:hidden}#planting-panel[hidden]{display:none}
.planting-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-shrink:0;margin-bottom:12px}.planting-head p{font-size:12px;font-weight:700;color:var(--tenue);margin:0 0 4px}.planting-head h2{font-size:23px;line-height:1.15;margin:0;letter-spacing:-.5px}
#planting-panel button{font-family:inherit;cursor:pointer;border-radius:8px;min-height:44px}#planting-panel button:disabled{cursor:default;opacity:.45}
#planting-panel .planting-close{flex-shrink:0;width:44px;height:44px;border:0;background:#eaf0e2;color:var(--ink);font-size:28px;line-height:1}
.planting-search{display:block;flex-shrink:0;margin-bottom:12px}.planting-search>span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
#planting-panel input,#planting-panel textarea{box-sizing:border-box;display:block;width:100%;min-height:44px;border:1px solid #c6d3bc;background:white;color:var(--ink);border-radius:8px;padding:10px 12px;font-family:inherit;font-size:16px}
#planting-catalog{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;overflow-y:auto;min-height:0;align-content:start;padding-bottom:4px;overscroll-behavior:contain}
#planting-panel .plant-choice{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:8px 3px;border:1px solid #d1ddc5;background:#edf3e4;color:var(--ink);min-width:0;min-height:117px;font-size:13px;font-weight:700;line-height:1.2}
.plant-choice svg{width:100%;height:78px;object-fit:contain}.plant-choice span{overflow-wrap:anywhere}.plant-choice:hover{background:#dfecca!important}.plant-choice:focus-visible{outline:3px solid #416442;outline-offset:-3px}
.planting-empty{grid-column:1/-1;font-size:15px}.planting-selection{display:flex;gap:12px;align-items:center;background:#eef3e6;padding:8px 10px;border-radius:8px}.planting-selection svg{width:56px;height:65px;object-fit:contain;flex-shrink:0}.planting-selection>div{flex:1;min-width:0}.planting-selection strong{display:block;font-size:18px}.planting-selection span{display:block;font-size:13px;margin-top:3px}.planting-selection button{background:transparent;border:0;text-decoration:underline;color:var(--ink);font-size:13px;padding:4px}
.planting-details{margin-top:8px}.planting-details summary{min-height:44px;align-content:center;font-size:14px;font-weight:600;cursor:pointer}.planting-details summary span{font-size:12px;color:var(--tenue);font-weight:400;margin-left:4px}.planting-details label{display:block;font-size:14px;font-weight:600;margin:12px 0}.planting-details label>input,.planting-details textarea{margin-top:5px}.planting-details form>p{font-size:12px;color:var(--tenue)}
.planting-quantity{display:flex;gap:8px;margin-top:5px}.planting-quantity button{width:48px;flex-shrink:0;border:1px solid var(--linea);background:#eaf0e2;color:var(--ink);font-size:23px}.planting-quantity input{text-align:center}
#planting-message{font-size:13px;line-height:1.35;color:var(--tenue);margin:4px 0 12px;min-height:18px}.planting-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-top:12px;border-top:1px solid var(--linea)}.planting-footer>span{font-size:13px;color:var(--tenue)}#planting-panel .btn{font-size:15px;padding:12px 18px;min-height:48px}
.planting-success{display:flex;align-items:center;gap:16px;padding-bottom:16px}.planting-success svg{width:85px;height:90px;object-fit:contain}.planting-success strong{font-size:21px}.planting-success p{font-size:14px;line-height:1.4;margin:6px 0 0}
#planting-zoom{position:fixed;right:12px;top:70px;z-index:12;display:flex;flex-direction:column;gap:6px}#planting-zoom[hidden]{display:none}#planting-zoom button{width:44px;height:44px;border:1px solid var(--linea);border-radius:8px;background:var(--crema);color:var(--ink);font:700 24px system-ui;cursor:pointer;box-shadow:var(--ombra)}
#planting-panel .sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
@media(min-width:700px){#planting-panel{width:600px;left:50%;right:auto;transform:translateX(-50%);padding:20px;bottom:16px;max-height:60dvh}#planting-panel.choosing{height:52dvh}#planting-catalog{grid-template-columns:repeat(5,minmax(0,1fr))}.planting-head h2{font-size:26px}.planting-selection svg{width:68px;height:68px}.planting-selection strong{font-size:21px}}
@media(max-height:550px){#planting-panel{max-height:65dvh}#planting-panel.choosing{height:65dvh}.planting-head{margin-bottom:8px}.planting-head h2{font-size:20px}.planting-selection svg{height:44px;width:44px}}
/* Keep the exit action reachable while scrolling optional planting details. */
#planting-panel:not(.choosing) .planting-head{position:sticky;top:-16px;z-index:3;background:var(--crema);padding:12px 0;border-bottom:1px solid var(--linea)}
@media(min-width:700px){#planting-panel:not(.choosing) .planting-head{top:-20px}}
