/* Sylva Mappe — feature isolata. Usa solo i token del tema dell'app. */
#mapsView{position:relative;min-width:0;min-height:0;overflow:hidden}
.sylva-map-view{--map-text:var(--text);--map-muted:var(--muted);--map-panel:color-mix(in srgb,var(--surface-strong) 94%,transparent);--map-panel-soft:color-mix(in srgb,var(--surface-2) 88%,transparent);--map-stage:color-mix(in srgb,var(--bg2) 84%,var(--surface-strong));--map-line:var(--line);--map-pin-border:var(--surface-strong);width:100%;height:100%;display:grid;grid-template-columns:286px minmax(0,1fr);color:var(--map-text);background:var(--bg);overflow:hidden}
html[data-scheme="light"] .sylva-map-view{--map-text:var(--sylva-ink,#302b26);--map-muted:var(--sylva-paper-muted,#746d61);--map-panel:rgba(250,247,240,.96);--map-panel-soft:rgba(255,252,247,.72);--map-stage:#d9d5ca;--map-line:rgba(62,56,48,.13);--map-pin-border:#fffaf3;background:#f5f1ea}
html[data-scheme="dark"] .sylva-map-view{--map-stage:color-mix(in srgb,var(--bg2) 88%,#090b09);--map-pin-border:var(--surface-strong)}
.sylva-map-sidebar{min-width:0;display:flex;flex-direction:column;border-right:1px solid var(--map-line);background:var(--map-panel);backdrop-filter:blur(18px);z-index:8}
.sylva-map-sidebar-head{padding:19px 17px 14px;border-bottom:1px solid var(--map-line)}
.sylva-map-kicker{font-size:9px;letter-spacing:.16em;font-weight:800;color:var(--map-muted);text-transform:uppercase}
.sylva-map-title-row{display:flex;gap:8px;align-items:center;margin-top:6px}.sylva-map-title-row select{min-width:0;flex:1;border:0;background:transparent;color:var(--map-text);font:650 17px/1.2 Inter,system-ui,sans-serif;outline:none;text-overflow:ellipsis}.sylva-map-title-row select option{background:var(--surface-strong);color:var(--text)}
.sylva-map-add{width:34px;height:34px;border:1px solid var(--map-line);border-radius:10px;background:var(--map-panel-soft);color:var(--map-text);font-size:20px;display:grid;place-items:center}
.sylva-map-add:hover{background:var(--accent-soft);border-color:color-mix(in srgb,var(--accent) 30%,var(--map-line))}
.sylva-map-storage{display:flex;align-items:center;gap:7px;margin-top:8px;color:var(--map-muted);font-size:9px}.sylva-map-storage i{width:6px;height:6px;border-radius:50%;background:var(--accent)}
.sylva-map-search{padding:11px 13px}.sylva-map-search input{width:100%;border:1px solid var(--map-line);background:var(--map-panel-soft);color:var(--map-text);border-radius:11px;padding:10px 11px;outline:none;font-size:11px}.sylva-map-search input::placeholder{color:var(--map-muted)}
.sylva-map-side-tabs{display:grid;grid-template-columns:1fr 1fr;padding:0 13px 9px;gap:5px}.sylva-map-side-tabs button{border:0;border-radius:9px;padding:8px;background:transparent;color:var(--map-muted);font-size:10px}.sylva-map-side-tabs button.active{background:var(--accent-soft);color:var(--map-text);font-weight:650}
.sylva-map-side-pane{min-height:0;overflow:auto;padding:3px 11px 14px;scrollbar-width:thin}.sylva-map-side-pane[hidden]{display:none}
.sylva-map-section-label{padding:9px 7px 6px;font-size:8px;letter-spacing:.14em;text-transform:uppercase;color:var(--map-muted);font-weight:800}
.sylva-map-list{display:flex;flex-direction:column;gap:5px}.sylva-map-list-item{width:100%;display:grid;grid-template-columns:31px minmax(0,1fr) auto;gap:8px;align-items:center;border:1px solid transparent;border-radius:12px;background:transparent;color:var(--map-text);padding:7px 8px;text-align:left}.sylva-map-list-item:hover,.sylva-map-list-item.active{background:var(--map-panel-soft);border-color:var(--map-line)}.sylva-map-list-icon{width:30px;height:30px;border-radius:9px;display:grid;place-items:center;background:color-mix(in srgb,var(--item-color,var(--accent)) 14%,var(--map-panel-soft));color:var(--item-color,var(--accent));overflow:hidden}.sylva-map-list-icon svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7}.sylva-map-list-icon img{width:100%;height:100%;object-fit:contain;padding:3px}.sylva-map-list-copy{min-width:0}.sylva-map-list-copy b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:10px;font-weight:650}.sylva-map-list-copy small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--map-muted);font-size:8px;margin-top:2px}.sylva-map-list-kind{font-size:8px;color:var(--map-muted)}
.sylva-map-empty-list{padding:20px 10px;color:var(--map-muted);font-size:10px;line-height:1.6;text-align:center}
.sylva-map-layer{display:flex;align-items:center;gap:9px;padding:8px;border-radius:11px;color:var(--map-text);font-size:10px}.sylva-map-layer:hover{background:var(--map-panel-soft)}.sylva-map-layer input{accent-color:var(--accent)}
.sylva-map-sidebar-foot{margin-top:auto;padding:11px 14px 14px;border-top:1px solid var(--map-line);font-size:8px;line-height:1.55;color:var(--map-muted)}.sylva-map-sidebar-foot b{color:var(--map-text)}
.sylva-map-main{position:relative;min-width:0;min-height:0;overflow:hidden;background:var(--map-stage)}
.sylva-map-stage{position:absolute;inset:0;overflow:hidden;touch-action:none;user-select:none;background:radial-gradient(circle at 25% 20%,color-mix(in srgb,var(--accent) 5%,transparent),transparent 38%),var(--map-stage)}
.sylva-map-stage.drag-over:after{content:'Rilascia qui l’immagine della mappa';position:absolute;inset:20px;border:1px dashed color-mix(in srgb,var(--accent) 55%,transparent);border-radius:24px;background:color-mix(in srgb,var(--map-panel) 86%,transparent);display:grid;place-items:center;z-index:40;font-weight:700;color:var(--map-text);pointer-events:none}
.sylva-map-grid{position:absolute;inset:0;pointer-events:none;opacity:.23;background-image:linear-gradient(var(--map-line) 1px,transparent 1px),linear-gradient(90deg,var(--map-line) 1px,transparent 1px);background-size:42px 42px}
.sylva-map-world{position:absolute;left:0;top:0;transform-origin:0 0;will-change:transform}.sylva-map-image{display:block;user-select:none;-webkit-user-drag:none;box-shadow:0 20px 62px rgba(0,0,0,.22);background:color-mix(in srgb,var(--map-stage) 80%,#b5ad9d);object-fit:contain}.sylva-map-area-svg,.sylva-map-path-svg,.sylva-map-draft-svg,.sylva-map-pin-layer{position:absolute;left:0;top:0;overflow:visible}.sylva-map-area-svg,.sylva-map-path-svg,.sylva-map-draft-svg{pointer-events:none}.sylva-map-pin-layer{pointer-events:none}
.sylva-map-path-visual{pointer-events:none;vector-effect:non-scaling-stroke;fill:none;stroke-linecap:round;stroke-linejoin:round}.sylva-map-path-hit{pointer-events:stroke;cursor:pointer;fill:none;stroke:transparent;stroke-width:24;vector-effect:non-scaling-stroke;touch-action:none}.sylva-map-path-selected{filter:drop-shadow(0 0 4px color-mix(in srgb,var(--accent) 70%,white))}
.sylva-map-pin{position:absolute;transform:translate(-50%,-100%);pointer-events:auto;border:0;background:transparent;padding:0;touch-action:none}.sylva-map-pin-mark{width:34px;height:34px;border-radius:12px 12px 12px 3px;transform:rotate(-45deg);display:grid;place-items:center;background:var(--pin-color,var(--accent));border:3px solid var(--map-pin-border);box-shadow:0 7px 19px rgba(0,0,0,.25);transition:transform .15s ease,box-shadow .15s ease;overflow:hidden}.sylva-map-pin-mark>span{transform:rotate(45deg);display:grid;place-items:center;width:20px;height:20px;color:#fff}.sylva-map-pin-mark svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.9}.sylva-map-pin-mark img{width:28px;height:28px;object-fit:contain;transform:rotate(45deg);background:rgba(255,255,255,.94);padding:2px;border-radius:6px}.sylva-map-pin:hover .sylva-map-pin-mark,.sylva-map-pin.active .sylva-map-pin-mark{transform:rotate(-45deg) scale(1.12);box-shadow:0 9px 24px rgba(0,0,0,.28),0 0 0 4px var(--accent-soft)}.sylva-map-pin-label{position:absolute;left:50%;bottom:43px;transform:translateX(-50%);white-space:nowrap;padding:5px 8px;border-radius:7px;background:rgba(25,26,23,.88);color:#fff;font-size:9px;font-weight:700;box-shadow:0 4px 15px rgba(0,0,0,.2);opacity:0;translate:0 3px;transition:.15s ease;pointer-events:none}.sylva-map-pin:hover .sylva-map-pin-label,.sylva-map-pin.active .sylva-map-pin-label,.sylva-map-pin-layer.show-labels .sylva-map-pin-label{opacity:1;translate:0 0}
.sylva-map-toolbar{position:absolute;left:50%;top:14px;transform:translateX(-50%);z-index:15;display:flex;align-items:center;gap:5px;padding:6px;border:1px solid var(--map-line);border-radius:15px;background:var(--map-panel);backdrop-filter:blur(20px);box-shadow:var(--shadow)}.sylva-map-tool{height:34px;min-width:34px;border:0;border-radius:9px;background:transparent;color:var(--map-muted);display:flex;align-items:center;justify-content:center;gap:6px;padding:0 9px;font-size:9px}.sylva-map-tool svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8}.sylva-map-tool:hover,.sylva-map-tool.active{background:var(--accent-soft);color:var(--map-text)}.sylva-map-tool.active{box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--accent) 28%,transparent)}.sylva-map-tool-sep{width:1px;height:21px;background:var(--map-line);margin:0 2px}.sylva-map-draw-actions{position:absolute;top:62px;left:50%;transform:translateX(-50%);z-index:15;display:none;gap:5px;padding:5px;border:1px solid var(--map-line);background:var(--map-panel);border-radius:12px;box-shadow:var(--shadow)}.sylva-map-draw-actions.open{display:flex}.sylva-map-draw-actions button{border:0;border-radius:8px;padding:8px 10px;background:transparent;color:var(--map-muted);font-size:9px}.sylva-map-draw-actions button.primary{background:var(--accent);color:#fff}.sylva-map-draw-actions span{display:flex;align-items:center;padding:0 6px;color:var(--map-muted);font-size:8px}
.sylva-map-top-actions{position:absolute;right:14px;top:14px;z-index:15;display:flex;gap:6px}.sylva-map-action{height:36px;border:1px solid var(--map-line);border-radius:11px;background:var(--map-panel);color:var(--map-text);padding:0 11px;font-size:9px;display:flex;align-items:center;gap:6px;backdrop-filter:blur(18px);box-shadow:0 8px 24px rgba(0,0,0,.08)}.sylva-map-action:hover{background:color-mix(in srgb,var(--map-panel) 86%,var(--accent-soft))}.sylva-map-action svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.8}.sylva-map-zoom{position:absolute;right:14px;bottom:14px;z-index:15;display:flex;align-items:center;padding:5px;border:1px solid var(--map-line);border-radius:12px;background:var(--map-panel);box-shadow:0 8px 24px rgba(0,0,0,.08)}.sylva-map-zoom button{width:31px;height:31px;border:0;border-radius:8px;background:transparent;color:var(--map-text)}.sylva-map-zoom button:hover{background:var(--accent-soft)}.sylva-map-zoom span{min-width:46px;text-align:center;color:var(--map-muted);font-size:8px}
.sylva-map-empty{position:absolute;inset:0;display:grid;place-items:center;padding:30px;z-index:5;background:var(--map-stage)}.sylva-map-empty[hidden]{display:none}.sylva-map-empty-card{width:min(520px,92%);padding:38px;border:1px solid var(--map-line);border-radius:25px;text-align:center;background:var(--map-panel);box-shadow:var(--shadow)}.sylva-map-empty-card img{width:62px;height:62px;object-fit:contain;opacity:.9}.sylva-map-empty-card h2{margin:15px 0 8px;font:600 27px/1.1 'Cormorant Garamond',Georgia,serif;color:var(--map-text)}.sylva-map-empty-card p{margin:0 auto 20px;max-width:390px;color:var(--map-muted);font-size:11px;line-height:1.65}.sylva-map-primary,.sylva-map-secondary,.sylva-map-danger{border:0;border-radius:10px;padding:10px 13px;font-size:10px}.sylva-map-primary{background:var(--accent);color:#fff}.sylva-map-secondary{background:var(--map-panel-soft);border:1px solid var(--map-line);color:var(--map-text)}.sylva-map-danger{background:var(--danger-soft);border:1px solid color-mix(in srgb,var(--danger) 28%,var(--map-line));color:var(--danger)}
.sylva-map-drawer{position:absolute;top:0;right:0;width:min(390px,92vw);height:100%;z-index:135;background:var(--map-panel);border-left:1px solid var(--map-line);box-shadow:-18px 0 52px rgba(0,0,0,.12);transform:translateX(104%);transition:transform .2s ease;display:flex;flex-direction:column;backdrop-filter:blur(22px)}.sylva-map-drawer.open{transform:none}.sylva-map-drawer-head{padding:17px 17px 13px;border-bottom:1px solid var(--map-line);display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.sylva-map-drawer-head h3{margin:4px 0 0;color:var(--map-text);font-size:17px}.sylva-map-drawer-close{width:31px;height:31px;border:1px solid var(--map-line);border-radius:9px;background:var(--map-panel-soft);color:var(--map-text)}.sylva-map-drawer-body{overflow:auto;min-height:0;padding:15px 17px max(88px,calc(env(safe-area-inset-bottom) + 72px))}.sylva-map-field{display:flex;flex-direction:column;gap:6px;margin-bottom:13px}.sylva-map-field>label,.sylva-map-field>.label{font-size:8px;letter-spacing:.08em;text-transform:uppercase;color:var(--map-muted);font-weight:750}.sylva-map-field input[type="text"],.sylva-map-field input[type="search"],.sylva-map-field textarea,.sylva-map-field select{width:100%;border:1px solid var(--map-line);border-radius:10px;background:var(--map-panel-soft);color:var(--map-text);padding:9px 10px;outline:none;font-size:10px}.sylva-map-field textarea{min-height:86px;resize:vertical;line-height:1.5}.sylva-map-field input[type="color"]{width:42px;height:34px;border:1px solid var(--map-line);border-radius:9px;background:var(--map-panel-soft);padding:3px}.sylva-map-field input[type="range"]{width:100%;accent-color:var(--accent)}.sylva-map-help{font-size:8px;line-height:1.5;color:var(--map-muted)}.sylva-map-row{display:flex;gap:9px;align-items:center}.sylva-map-row>*{min-width:0}.sylva-map-row .grow{flex:1}.sylva-map-source{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-bottom:14px}.sylva-map-source button{border:1px solid var(--map-line);border-radius:10px;background:var(--map-panel-soft);color:var(--map-muted);padding:9px;font-size:9px}.sylva-map-source button.active{background:var(--accent-soft);border-color:color-mix(in srgb,var(--accent) 28%,var(--map-line));color:var(--map-text);font-weight:700}
.sylva-map-codex-link{border:1px solid var(--map-line);border-radius:12px;background:var(--map-panel-soft);padding:10px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center}.sylva-map-codex-link b{display:block;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sylva-map-codex-link small{display:block;font-size:8px;color:var(--map-muted);margin-top:2px}.sylva-map-codex-link button{border:0;background:var(--accent-soft);color:var(--map-text);border-radius:8px;padding:7px 9px;font-size:8px}
.sylva-map-icon-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:5px}.sylva-map-icon-choice{aspect-ratio:1;border:1px solid var(--map-line);border-radius:9px;background:var(--map-panel-soft);color:var(--map-muted);display:grid;place-items:center}.sylva-map-icon-choice svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8}.sylva-map-icon-choice.active{color:var(--accent);border-color:color-mix(in srgb,var(--accent) 45%,var(--map-line));background:var(--accent-soft)}
.sylva-map-custom-icon-preview{width:40px;height:40px;border-radius:10px;border:1px solid var(--map-line);background:var(--map-panel-soft);display:grid;place-items:center;overflow:hidden}.sylva-map-custom-icon-preview img{width:100%;height:100%;object-fit:contain;padding:3px}.sylva-map-drawer-actions{display:flex;justify-content:space-between;gap:8px;padding-top:7px}.sylva-map-drawer-actions>div{display:flex;gap:6px}
.sylva-map-dialog-backdrop{position:absolute;inset:0;z-index:160;display:none;place-items:center;padding:22px;background:rgba(10,12,10,.38);backdrop-filter:blur(5px)}.sylva-map-dialog-backdrop.open{display:grid}.sylva-map-dialog{width:min(560px,96%);max-height:min(680px,90%);overflow:auto;border:1px solid var(--map-line);border-radius:20px;background:var(--map-panel);color:var(--map-text);box-shadow:0 28px 90px rgba(0,0,0,.25)}.sylva-map-dialog-head{display:flex;justify-content:space-between;gap:14px;padding:18px 19px 13px;border-bottom:1px solid var(--map-line)}.sylva-map-dialog-head h3{margin:4px 0 0;font-size:19px}.sylva-map-dialog-body{padding:16px 19px 19px}.sylva-map-dialog-actions{display:flex;justify-content:flex-end;gap:7px;margin-top:16px}.sylva-map-dropzone{display:grid;place-items:center;text-align:center;min-height:140px;padding:18px;border:1px dashed color-mix(in srgb,var(--accent) 40%,var(--map-line));border-radius:16px;background:var(--map-panel-soft);cursor:pointer}.sylva-map-dropzone b{font-size:11px}.sylva-map-dropzone small{color:var(--map-muted);font-size:8px;margin-top:4px}
.sylva-map-codex-results{display:flex;flex-direction:column;gap:5px;margin-top:9px;max-height:360px;overflow:auto}.sylva-map-codex-result{width:100%;border:1px solid var(--map-line);border-radius:11px;background:var(--map-panel-soft);color:var(--map-text);padding:9px 10px;text-align:left}.sylva-map-codex-result:hover{border-color:color-mix(in srgb,var(--accent) 32%,var(--map-line));background:var(--accent-soft)}.sylva-map-codex-result b{display:block;font-size:10px}.sylva-map-codex-result small{display:block;color:var(--map-muted);font-size:8px;margin-top:3px}.sylva-map-no-result{padding:18px;text-align:center;color:var(--map-muted);font-size:9px}
.sylva-map-toast{position:absolute;left:50%;bottom:17px;transform:translate(-50%,12px);z-index:70;opacity:0;pointer-events:none;background:var(--map-panel);border:1px solid var(--map-line);border-radius:11px;box-shadow:var(--shadow);padding:9px 12px;color:var(--map-text);font-size:9px;transition:.18s}.sylva-map-toast.show{opacity:1;transform:translate(-50%,0)}
@media(max-width:1050px){.sylva-map-view{grid-template-columns:248px minmax(0,1fr)}.sylva-map-toolbar{left:14px;transform:none}.sylva-map-tool span{display:none}.sylva-map-draw-actions{left:14px;transform:none}}
@media(max-width:820px){.sylva-map-view{display:block}.sylva-map-main{width:100%;height:100%;min-height:100%}.sylva-map-sidebar-head{padding-left:58px}.sylva-map-sidebar{position:absolute;left:0;top:0;bottom:0;width:min(310px,86vw);z-index:35;transform:translateX(-104%);transition:transform .2s ease;box-shadow:18px 0 50px rgba(0,0,0,.18)}.sylva-map-view.sidebar-open .sylva-map-sidebar{transform:none}.sylva-map-mobile-side{display:grid!important}.sylva-map-top-actions{right:9px;top:9px}.sylva-map-toolbar{left:9px;top:54px}.sylva-map-draw-actions{left:9px;top:116px}.sylva-map-zoom{right:9px;bottom:9px}.sylva-map-drawer{width:min(410px,96vw)} }
@media(pointer:coarse){.sylva-map-tool{min-width:42px;height:42px}.sylva-map-action{height:42px}.sylva-map-zoom button{width:38px;height:38px}.sylva-map-draw-actions{top:78px}.sylva-map-draw-actions button{padding:11px 13px}.sylva-map-pin-mark{width:38px;height:38px}.sylva-map-path-hit{stroke-width:30}.sylva-map-drawer-close{width:38px;height:38px}.sylva-map-mobile-side{width:42px;height:42px}}
@media(max-width:820px) and (pointer:coarse){.sylva-map-draw-actions{top:118px}}
.sylva-map-mobile-side{display:none;position:absolute;left:9px;top:9px;width:38px;height:38px;z-index:36;border:1px solid var(--map-line);border-radius:11px;background:var(--map-panel);color:var(--map-text);place-items:center}.sylva-map-mobile-side svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8}


/* Sylva Mappe v4 · leggibilità cartografica, regioni e touch QA */
.sylva-map-path-shadow,.sylva-map-path-casing,.sylva-map-path-visual{pointer-events:none;vector-effect:non-scaling-stroke;fill:none;stroke-linecap:round;stroke-linejoin:round}
.sylva-map-path-shadow{opacity:.72}.sylva-map-path-casing{opacity:.92}
.sylva-map-path-hit{stroke:transparent;pointer-events:stroke;cursor:pointer;fill:none;vector-effect:non-scaling-stroke;touch-action:none}
.sylva-map-path-selected{filter:drop-shadow(0 0 5px color-mix(in srgb,var(--accent) 80%,white))}
.sylva-map-area-visual{vector-effect:non-scaling-stroke;stroke-linejoin:round;pointer-events:none;transition:filter .15s ease,fill-opacity .15s ease}.sylva-map-area-selected{filter:drop-shadow(0 0 5px color-mix(in srgb,var(--accent) 70%,white))}.sylva-map-area-hit{fill:rgba(0,0,0,.001);stroke:transparent;stroke-width:18;vector-effect:non-scaling-stroke;pointer-events:all;cursor:pointer;touch-action:none}.sylva-map-area-draft-fill{fill:var(--accent);fill-opacity:.12;stroke:none;pointer-events:none}
.sylva-map-svg-label{pointer-events:none;text-anchor:middle;dominant-baseline:central;font-family:Inter,system-ui,sans-serif;font-weight:750;letter-spacing:.02em;fill:#fff;stroke:rgba(20,22,19,.82);stroke-width:3px;paint-order:stroke fill;stroke-linejoin:round}.sylva-map-area-label{font-family:'Cormorant Garamond',Georgia,serif;font-weight:700;letter-spacing:.06em;text-transform:uppercase}
.sylva-map-pin{--pin-scale:1;transform:translate(-50%,-100%) scale(var(--pin-scale));transform-origin:50% 100%}.sylva-map-pin-halo{position:absolute;left:50%;bottom:-4px;width:20px;height:8px;border-radius:50%;transform:translateX(-50%);background:rgba(0,0,0,.23);filter:blur(2px);opacity:.55}.sylva-map-pin-mark{width:40px;height:40px;border-width:3px;box-shadow:0 8px 20px rgba(0,0,0,.28),0 1px 0 rgba(255,255,255,.28) inset}.sylva-map-pin-mark>span{width:23px;height:23px}.sylva-map-pin-mark svg{width:19px;height:19px}.sylva-map-pin-mark img{width:32px;height:32px}.sylva-map-pin:hover,.sylva-map-pin.active{z-index:4}.sylva-map-pin:hover .sylva-map-pin-mark,.sylva-map-pin.active .sylva-map-pin-mark{box-shadow:0 10px 27px rgba(0,0,0,.32),0 0 0 4px var(--accent-soft)}
.sylva-map-pin.shape-circle{transform:translate(-50%,-50%) scale(var(--pin-scale));transform-origin:center}.sylva-map-pin.shape-circle .sylva-map-pin-mark{border-radius:50%;transform:none}.sylva-map-pin.shape-circle .sylva-map-pin-mark>span,.sylva-map-pin.shape-circle .sylva-map-pin-mark img{transform:none}.sylva-map-pin.shape-circle .sylva-map-pin-halo{bottom:-8px}.sylva-map-pin.shape-circle .sylva-map-pin-label{bottom:48px}.sylva-map-pin.shape-circle:hover .sylva-map-pin-mark,.sylva-map-pin.shape-circle.active .sylva-map-pin-mark{transform:scale(1.08)}
.sylva-map-pin.shape-diamond{transform:translate(-50%,-50%) scale(var(--pin-scale));transform-origin:center}.sylva-map-pin.shape-diamond .sylva-map-pin-mark{border-radius:10px;transform:rotate(45deg)}.sylva-map-pin.shape-diamond .sylva-map-pin-mark>span{transform:rotate(-45deg)}.sylva-map-pin.shape-diamond .sylva-map-pin-mark img{transform:rotate(-45deg)}.sylva-map-pin.shape-diamond .sylva-map-pin-label{bottom:50px}.sylva-map-pin.shape-diamond:hover .sylva-map-pin-mark,.sylva-map-pin.shape-diamond.active .sylva-map-pin-mark{transform:rotate(45deg) scale(1.08)}
.sylva-map-pin-link{position:absolute;right:-5px;top:-8px;width:16px;height:16px;border-radius:50%;display:grid;place-items:center;background:var(--map-panel);border:1px solid color-mix(in srgb,var(--accent) 45%,var(--map-line));color:var(--accent);font-size:9px;font-weight:900;box-shadow:0 3px 8px rgba(0,0,0,.16)}
.sylva-map-pin-label{bottom:49px;padding:6px 9px;font-size:9px}.sylva-map-pin-label[hidden]{display:none!important}
.sylva-map-list-line i{display:block;width:20px;height:5px;border-radius:5px;background:var(--item-color);box-shadow:0 0 0 2px color-mix(in srgb,var(--map-panel) 80%,white)}.sylva-map-list-area i{display:block;width:19px;height:16px;border:2px solid var(--item-color);background:color-mix(in srgb,var(--item-color) 24%,transparent);border-radius:5px}.sylva-map-layer span{display:flex;align-items:center;justify-content:space-between;gap:10px;flex:1}.sylva-map-layer b{font-size:8px;min-width:22px;padding:2px 6px;border-radius:999px;text-align:center;background:var(--map-panel-soft);color:var(--map-muted)}
.sylva-map-check{display:flex;align-items:center;gap:8px;min-height:38px;color:var(--map-text);font-size:9px;text-transform:none!important;letter-spacing:0!important;font-weight:600!important}.sylva-map-check input{accent-color:var(--accent);width:16px;height:16px}.sylva-map-inline-options{display:flex;gap:9px;align-items:center;justify-content:space-between;margin:-2px 0 5px}.sylva-map-secondary.compact{padding:7px 9px;font-size:8px}.path-visual-help{margin:0 0 14px}
.sylva-map-drawer-actions{position:sticky;bottom:-1px;z-index:6;margin:8px -4px -56px;padding:13px 4px calc(8px + env(safe-area-inset-bottom));background:linear-gradient(180deg,transparent 0,var(--map-panel) 25%,var(--map-panel) 100%);align-items:center}.sylva-map-drawer-actions>div:last-child{justify-content:flex-end;flex-wrap:wrap}.sylva-map-drawer-actions .sylva-map-primary{box-shadow:0 8px 22px color-mix(in srgb,var(--accent) 24%,transparent)}
html[data-route="maps"] .sylva-help-fab{z-index:110}
@media(max-width:820px){.sylva-map-drawer{z-index:145}.sylva-map-drawer-body{padding-bottom:max(96px,calc(env(safe-area-inset-bottom) + 82px))}.sylva-map-drawer-actions{margin-bottom:-63px}.sylva-map-tool{padding-inline:8px}.sylva-map-svg-label{font-weight:800}}
@media(pointer:coarse){.sylva-map-pin-mark{width:44px;height:44px}.sylva-map-pin-mark>span{width:25px;height:25px}.sylva-map-pin-mark svg{width:21px;height:21px}.sylva-map-pin-label{bottom:53px;font-size:10px}.sylva-map-path-hit{stroke-width:38}.sylva-map-area-hit{stroke-width:28}.sylva-map-drawer-actions button{min-height:42px}.sylva-map-check{min-height:44px}}

/* Sylva Mappe v5 · slot Cloud 1/1, palette colore e export */
.sylva-map-storage{flex-wrap:wrap}.sylva-map-storage span{min-width:0;flex:1}.sylva-map-cloud-pick{border:1px solid var(--map-line);border-radius:999px;background:var(--map-panel-soft);color:var(--map-text);padding:4px 8px;font-size:8px;font-weight:750;white-space:nowrap}.sylva-map-cloud-pick:hover,.sylva-map-cloud-pick.active{border-color:color-mix(in srgb,var(--accent) 46%,var(--map-line));background:var(--accent-soft);color:var(--map-text)}.sylva-map-cloud-pick:disabled{opacity:.42}
.sylva-map-cloud-card{border:1px solid var(--map-line);border-radius:15px;background:var(--map-panel-soft);padding:14px 15px}.sylva-map-cloud-card.active{border-color:color-mix(in srgb,var(--accent) 40%,var(--map-line));background:color-mix(in srgb,var(--accent-soft) 62%,var(--map-panel-soft))}.sylva-map-cloud-card b{display:block;font-size:11px}.sylva-map-cloud-card p{margin:6px 0;color:var(--map-muted);font-size:9px;line-height:1.6}.sylva-map-cloud-card small{display:block;color:var(--map-muted);font-size:8px;line-height:1.55}
.sylva-map-color-field{min-width:124px}.sylva-map-color-control{display:flex;align-items:center;gap:8px}.sylva-map-color-control>input[type="color"]{width:42px;height:38px;min-width:42px;padding:3px;border-radius:10px;cursor:pointer}.sylva-map-swatches{display:grid;grid-template-columns:repeat(5,18px);gap:4px}.sylva-map-swatches button{width:18px;height:18px;border-radius:50%;border:2px solid color-mix(in srgb,var(--map-panel) 84%,white);background:var(--swatch);box-shadow:0 0 0 1px var(--map-line);padding:0}.sylva-map-swatches button.active{box-shadow:0 0 0 2px var(--accent),0 0 0 4px var(--map-panel);transform:scale(.9)}
@media(max-width:820px){.sylva-map-storage{gap:6px}.sylva-map-cloud-pick{padding:5px 9px}.sylva-map-color-field{width:100%}.sylva-map-color-control{justify-content:space-between}.sylva-map-swatches{grid-template-columns:repeat(5,22px)}.sylva-map-swatches button{width:22px;height:22px}}
@media(pointer:coarse){.sylva-map-cloud-pick{min-height:30px}.sylva-map-color-control>input[type="color"]{width:48px;height:44px}.sylva-map-swatches{grid-template-columns:repeat(5,24px);gap:7px}.sylva-map-swatches button{width:24px;height:24px}}

@media(max-width:820px){
  .sylva-map-color-row{align-items:stretch;flex-wrap:wrap}
  .sylva-map-color-row>.grow,.sylva-map-color-row>.sylva-map-color-field{flex:1 1 100%;min-width:0}
}

.sylva-map-color-hex{width:78px!important;min-width:78px!important;height:38px!important;padding:7px 8px!important;font:700 10px/1 ui-monospace,SFMono-Regular,Consolas,monospace!important;letter-spacing:.03em;text-transform:uppercase}
@media(max-width:820px){.sylva-map-color-control{flex-wrap:wrap}.sylva-map-color-hex{flex:1 1 72px;width:auto!important}.sylva-map-swatches{flex:1 1 100%;display:flex;justify-content:flex-start;flex-wrap:wrap}}

/* Sylva Mappe v7 · sicurezza eliminazione, percorsi morbidi e responsive QA */
.sylva-map-option-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:2px 0 9px}.sylva-map-option-grid .sylva-map-check{min-height:42px;padding:7px 9px;border:1px solid var(--map-line);border-radius:10px;background:var(--map-panel-soft)}
.sylva-map-preset-wide{width:100%;margin:0 0 7px}
.sylva-map-area-options{align-items:flex-end}.sylva-map-area-options>.sylva-map-check{min-width:138px;margin-bottom:13px;padding:0 3px}
.sylva-map-delete-confirm{display:grid;gap:9px}.sylva-map-delete-confirm p{margin:0;color:var(--map-text);font-size:10px;line-height:1.6}.sylva-map-delete-confirm small{color:var(--map-muted);font-size:8px;line-height:1.55}.sylva-map-confirm-note{padding:9px 10px;border:1px solid color-mix(in srgb,var(--accent) 28%,var(--map-line));border-radius:10px;background:var(--accent-soft)}
.sylva-map-path-hit{stroke-width:40px}
@media(max-width:620px){.sylva-map-option-grid{grid-template-columns:1fr}.sylva-map-area-options{align-items:stretch;flex-direction:column}.sylva-map-area-options>.sylva-map-check{width:100%;margin:-5px 0 10px;padding:5px 2px}.sylva-map-drawer-actions{flex-direction:column;align-items:stretch;gap:7px}.sylva-map-drawer-actions>div{width:100%;display:flex;gap:7px}.sylva-map-drawer-actions>div:last-child{justify-content:stretch}.sylva-map-drawer-actions>div:last-child>*{flex:1 1 auto}.sylva-map-drawer-actions>div:first-child:empty{display:none}.sylva-map-drawer-actions .sylva-map-primary{flex:1 1 100%}}
@media(max-width:460px){.sylva-map-top-actions{gap:5px}.sylva-map-action{padding-inline:8px;font-size:8px}.sylva-map-toolbar{max-width:calc(100vw - 18px);overflow-x:auto;scrollbar-width:none}.sylva-map-toolbar::-webkit-scrollbar{display:none}.sylva-map-draw-actions{right:9px;max-width:calc(100vw - 18px);flex-wrap:wrap}.sylva-map-draw-actions .primary{margin-left:auto}}
@media(max-width:620px){.sylva-map-drawer-actions{margin:8px -4px 0}.sylva-map-drawer-body{padding-bottom:max(24px,env(safe-area-inset-bottom))}}
@media(pointer:coarse){.sylva-map-path-hit{stroke-width:48px}}

/* Sylva Mappe v8 · livelli narrativi, mappe collegate, scala e misurazione */
.sylva-map-pin-link.codex{top:-8px;right:-7px}
.sylva-map-pin-link.map{top:11px;right:-8px;background:color-mix(in srgb,var(--accent) 16%,var(--map-panel));font-size:10px}
.sylva-map-measure-card{position:absolute;left:50%;bottom:15px;transform:translateX(-50%);z-index:24;display:flex;align-items:center;gap:10px;max-width:min(640px,calc(100% - 150px));padding:9px 10px 9px 13px;border:1px solid var(--map-line);border-radius:13px;background:color-mix(in srgb,var(--map-panel) 96%,transparent);box-shadow:0 8px 30px rgba(0,0,0,.14);backdrop-filter:blur(16px);color:var(--map-text);font-size:10px;font-weight:650;line-height:1.35}
.sylva-map-measure-card[hidden]{display:none!important}.sylva-map-measure-card span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sylva-map-measure-card button{width:28px;height:28px;flex:0 0 28px;border:1px solid var(--map-line);border-radius:9px;background:var(--map-panel-soft);color:var(--map-muted);font-size:18px;line-height:1}
.sylva-map-layer-stack{display:grid;gap:4px}.sylva-map-layer-row{display:grid;grid-template-columns:minmax(0,1fr) 32px;gap:4px;align-items:center}.sylva-map-layer-row .sylva-map-layer{min-width:0}.sylva-map-layer-row .sylva-map-layer span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sylva-map-layer-row .sylva-map-layer b{margin-left:5px;color:var(--map-muted);font-size:8px;font-weight:700}.sylva-map-layer-edit{width:32px;height:32px;border:1px solid transparent;border-radius:9px;background:transparent;color:var(--map-muted);font-weight:900;letter-spacing:.08em}.sylva-map-layer-edit:hover{border-color:var(--map-line);background:var(--map-panel-soft);color:var(--map-text)}
.sylva-map-section-actions{display:flex;align-items:center;justify-content:space-between;gap:8px}.sylva-map-section-actions button{border:0;border-radius:8px;padding:5px 7px;background:var(--accent-soft);color:var(--map-text);font-size:8px;font-weight:750}
.sylva-map-scale-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px;align-items:center;margin:2px 4px 8px;padding:10px;border:1px solid var(--map-line);border-radius:12px;background:var(--map-panel-soft)}.sylva-map-scale-card.active{border-color:color-mix(in srgb,var(--accent) 32%,var(--map-line));background:color-mix(in srgb,var(--accent-soft) 58%,var(--map-panel-soft))}.sylva-map-scale-card b,.sylva-map-scale-card small{display:block}.sylva-map-scale-card b{font-size:9px}.sylva-map-scale-card small{margin-top:3px;color:var(--map-muted);font-size:8px;line-height:1.45}.sylva-map-scale-card button{border:1px solid var(--map-line);border-radius:9px;background:var(--map-panel);color:var(--map-text);padding:7px 8px;font-size:8px;font-weight:700}
.sylva-map-measure-summary,.sylva-map-route-card,.sylva-map-scale-nudge{border:1px solid var(--map-line);border-radius:12px;background:var(--map-panel-soft);padding:11px;margin:4px 0 11px}.sylva-map-measure-summary{display:flex;justify-content:space-between;gap:10px;align-items:center}.sylva-map-measure-summary b{font-size:9px}.sylva-map-measure-summary span{color:var(--map-muted);font-size:9px;text-align:right}.sylva-map-route-card{display:grid;gap:8px}.sylva-map-route-metric{display:flex;align-items:center;justify-content:space-between;gap:8px;padding-bottom:7px;border-bottom:1px solid var(--map-line)}.sylva-map-route-metric span{font-size:9px;color:var(--map-muted)}.sylva-map-route-metric b{font-size:13px}.sylva-map-route-card>small{display:block;color:var(--accent);font-size:9px;font-weight:700}.sylva-map-scale-nudge{display:flex;align-items:center;justify-content:space-between;gap:10px}.sylva-map-scale-nudge span b,.sylva-map-scale-nudge span small{display:block}.sylva-map-scale-nudge b{font-size:9px}.sylva-map-scale-nudge small{margin-top:2px;color:var(--map-muted);font-size:8px;line-height:1.4}.sylva-map-scale-nudge button{border:1px solid var(--map-line);border-radius:9px;background:var(--accent-soft);color:var(--map-text);padding:7px 9px;font-size:8px;font-weight:750}
.sylva-map-input-suffix{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;border:1px solid var(--map-line);border-radius:10px;overflow:hidden;background:var(--map-panel-soft)}.sylva-map-input-suffix input{border:0!important;border-radius:0!important;background:transparent!important}.sylva-map-input-suffix span{padding:0 9px;color:var(--map-muted);font-size:8px;white-space:nowrap}
.sylva-map-visibility-row{align-items:flex-start}.sylva-map-visibility-row .sylva-map-field{min-width:0}
.sylva-map-toolbar [data-map-mode="measure"].active svg{stroke:var(--accent)}
@media(max-width:1180px){.sylva-map-toolbar [data-map-mode] span,.sylva-map-toolbar #sylvaMapLabels span{display:none}.sylva-map-toolbar button{min-width:38px;padding-inline:8px}.sylva-map-toolbar{gap:3px}}
@media(max-width:820px){.sylva-map-measure-card{bottom:12px;max-width:calc(100% - 100px);font-size:9px}.sylva-map-scale-card{grid-template-columns:1fr}.sylva-map-scale-card button{width:100%}.sylva-map-measure-summary{align-items:flex-start;flex-direction:column}.sylva-map-measure-summary span{text-align:left}.sylva-map-visibility-row{flex-direction:column}.sylva-map-visibility-row>.sylva-map-field{width:100%}.sylva-map-route-card .sylva-map-row{flex-direction:column}.sylva-map-route-card .sylva-map-field{width:100%}}
@media(max-width:620px){.sylva-map-measure-card{left:9px;right:9px;bottom:9px;max-width:none;transform:none}.sylva-map-measure-card span{white-space:normal}.sylva-map-scale-nudge{align-items:stretch;flex-direction:column}.sylva-map-scale-nudge button{width:100%}}
@media(pointer:coarse){.sylva-map-layer-edit,.sylva-map-measure-card button{min-width:44px;min-height:44px}.sylva-map-layer-edit{width:44px;height:44px}.sylva-map-layer-row{grid-template-columns:minmax(0,1fr) 44px}.sylva-map-scale-card button,.sylva-map-section-actions button{min-height:40px}}
.sylva-map-back{width:32px;height:32px;flex:0 0 32px;border:1px solid var(--map-line);border-radius:10px;background:var(--map-panel-soft);color:var(--map-text);font-size:17px;display:grid;place-items:center}.sylva-map-back[hidden]{display:none!important}.sylva-map-back:hover{background:var(--accent-soft);border-color:color-mix(in srgb,var(--accent) 30%,var(--map-line))}
@media(pointer:coarse){.sylva-map-back{width:40px;height:40px;flex-basis:40px}}
@media(max-width:1180px){.sylva-map-toolbar .sylva-map-tool span{display:none}}
/* Drawer: i comandi non devono mai uscire dal pannello, anche con azioni aggiuntive. */
.sylva-map-drawer-actions{flex-wrap:wrap}.sylva-map-drawer-actions>div:first-child{flex:0 0 auto}.sylva-map-drawer-actions>div:last-child{min-width:0;flex:1 1 220px;justify-content:flex-end;flex-wrap:wrap}
.sylva-map-view.measure-active .sylva-map-toast{bottom:76px}
@media(max-width:620px){.sylva-map-measure-card{bottom:66px}.sylva-map-view.measure-active .sylva-map-toast{bottom:126px}}
.sylva-map-drawer-body{overflow-x:hidden}
.sylva-map-mobile-back{display:none;position:absolute;left:58px;top:9px;z-index:25;height:40px;padding:0 11px;border:1px solid var(--map-line);border-radius:11px;background:var(--map-panel);color:var(--map-text);box-shadow:0 7px 22px rgba(0,0,0,.1);align-items:center;gap:6px;font-size:9px;font-weight:750;backdrop-filter:blur(16px)}.sylva-map-mobile-back[hidden]{display:none!important}
@media(max-width:820px){.sylva-map-mobile-back:not([hidden]){display:flex}}
@media(max-width:460px){.sylva-map-mobile-back span{display:none}.sylva-map-mobile-back{width:40px;padding:0;justify-content:center}}

/* Sylva Mappe v9 · UI readability / touch consolidation */
.sylva-map-view{grid-template-columns:300px minmax(0,1fr)}
.sylva-map-sidebar-head{padding:20px 18px 15px}
.sylva-map-kicker{font-size:10px;line-height:1.25;letter-spacing:.14em}
.sylva-map-title-row{gap:9px;margin-top:8px}.sylva-map-title-row select{font-size:18px;line-height:1.25}
.sylva-map-add{width:38px;height:38px;flex:0 0 38px;font-size:21px}
.sylva-map-storage{margin-top:10px;gap:8px;font-size:10px;line-height:1.4}.sylva-map-cloud-pick{min-height:32px;padding:5px 10px;font-size:9px}
.sylva-map-search{padding:12px 14px}.sylva-map-search input{min-height:42px;padding:10px 12px;font-size:12px}
.sylva-map-side-tabs{padding:0 14px 10px;gap:6px}.sylva-map-side-tabs button{min-height:38px;padding:9px 10px;font-size:11px;font-weight:650}
.sylva-map-side-pane{padding:4px 12px 16px}.sylva-map-section-label{padding:11px 7px 7px;font-size:9px;line-height:1.3}
.sylva-map-list{gap:6px}.sylva-map-list-item{grid-template-columns:36px minmax(0,1fr) auto;gap:9px;min-height:50px;padding:8px 9px}.sylva-map-list-icon{width:34px;height:34px;border-radius:10px}.sylva-map-list-icon svg{width:18px;height:18px}.sylva-map-list-copy b{font-size:11px;line-height:1.3}.sylva-map-list-copy small{font-size:9px;line-height:1.35;margin-top:3px}.sylva-map-list-kind{font-size:9px}.sylva-map-empty-list{font-size:11px}
.sylva-map-layer{min-height:42px;padding:9px 8px;font-size:11px}.sylva-map-layer b{font-size:9px}.sylva-map-sidebar-foot{padding:13px 15px 16px;font-size:9px;line-height:1.6}
.sylva-map-toolbar{top:12px;gap:4px;padding:6px 7px}.sylva-map-tool{height:38px;min-width:38px;padding:0 10px;font-size:10.5px;font-weight:650}.sylva-map-tool svg{width:17px;height:17px}.sylva-map-tool-sep{height:24px}
.sylva-map-draw-actions{gap:6px;padding:6px}.sylva-map-draw-actions button{min-height:38px;padding:9px 11px;font-size:10px;font-weight:650}.sylva-map-draw-actions span{padding:0 7px;font-size:9px}
.sylva-map-action{height:40px;padding:0 12px;font-size:10.5px;font-weight:650}.sylva-map-action svg{width:16px;height:16px}
.sylva-map-zoom{padding:5px}.sylva-map-zoom button{width:36px;height:36px;font-size:16px}.sylva-map-zoom span{min-width:52px;font-size:10px;font-weight:650}
.sylva-map-empty-card p{font-size:12px}.sylva-map-primary,.sylva-map-secondary,.sylva-map-danger{min-height:40px;padding:10px 14px;font-size:11px;font-weight:650}
.sylva-map-drawer{width:min(430px,94vw)}.sylva-map-drawer-head{padding:19px 19px 14px}.sylva-map-drawer-head h3{font-size:19px;line-height:1.2}.sylva-map-drawer-close{width:38px;height:38px;font-size:18px}.sylva-map-drawer-body{padding:17px 19px max(96px,calc(env(safe-area-inset-bottom) + 78px))}
.sylva-map-field{gap:7px;margin-bottom:15px}.sylva-map-field>label,.sylva-map-field>.label{font-size:9.5px;line-height:1.25;letter-spacing:.075em}.sylva-map-field input[type="text"],.sylva-map-field input[type="search"],.sylva-map-field textarea,.sylva-map-field select{min-height:42px;padding:10px 11px;font-size:12px;line-height:1.35}.sylva-map-field textarea{min-height:104px}.sylva-map-help{font-size:9.5px;line-height:1.55}.sylva-map-row{gap:10px}.sylva-map-source{gap:7px;margin-bottom:16px}.sylva-map-source button{min-height:42px;padding:10px;font-size:10.5px;font-weight:650}
.sylva-map-codex-link{padding:11px 12px;gap:10px}.sylva-map-codex-link b{font-size:11.5px}.sylva-map-codex-link small{font-size:9.5px;line-height:1.4;margin-top:3px}.sylva-map-codex-link button{min-height:36px;padding:8px 10px;font-size:9.5px;font-weight:700}
.sylva-map-icon-grid{gap:7px}.sylva-map-icon-choice{min-height:42px;border-radius:10px}.sylva-map-icon-choice svg{width:19px;height:19px}.sylva-map-custom-icon-preview{width:44px;height:44px}
.sylva-map-dialog{width:min(600px,96%)}.sylva-map-dialog-head{padding:20px 21px 14px}.sylva-map-dialog-head h3{font-size:20px}.sylva-map-dialog-body{padding:18px 21px 21px}.sylva-map-dialog-actions{gap:8px;margin-top:18px}.sylva-map-dropzone b{font-size:12px}.sylva-map-dropzone small{font-size:9.5px}.sylva-map-codex-result{min-height:48px;padding:10px 11px}.sylva-map-codex-result b{font-size:11.5px}.sylva-map-codex-result small{font-size:9.5px;line-height:1.4}.sylva-map-no-result{font-size:10.5px}
.sylva-map-check{font-size:10.5px;line-height:1.35}.sylva-map-check input{width:18px;height:18px}.sylva-map-secondary.compact{min-height:36px;padding:8px 10px;font-size:9.5px}
.sylva-map-option-grid{gap:8px}.sylva-map-option-grid .sylva-map-check{min-height:48px;padding:9px 10px}
.sylva-map-delete-confirm p{font-size:11px}.sylva-map-delete-confirm small{font-size:9.5px}
.sylva-map-cloud-card b{font-size:12px}.sylva-map-cloud-card p{font-size:10.5px}.sylva-map-cloud-card small{font-size:9.5px}
.sylva-map-scale-card{padding:12px}.sylva-map-scale-card b{font-size:10.5px}.sylva-map-scale-card small{font-size:9.5px}.sylva-map-scale-card button{min-height:38px;font-size:9.5px}.sylva-map-section-actions button{min-height:34px;padding:7px 9px;font-size:9.5px}.sylva-map-measure-summary b,.sylva-map-route-metric span,.sylva-map-route-card>small,.sylva-map-scale-nudge b{font-size:10px}.sylva-map-measure-summary span,.sylva-map-scale-nudge small{font-size:9.5px}.sylva-map-route-metric b{font-size:14px}.sylva-map-scale-nudge button{min-height:38px;font-size:9.5px}.sylva-map-input-suffix span{font-size:9.5px}
.sylva-map-measure-card{min-height:42px;font-size:11px}.sylva-map-toast{padding:10px 13px;font-size:10.5px}
.sylva-map-pin-label{font-size:10px;line-height:1.25}
.sylva-map-mobile-back{font-size:10px}
.sylva-map-view button,.sylva-map-view input,.sylva-map-view select,.sylva-map-view textarea{font-family:Inter,system-ui,sans-serif}
.sylva-map-view button:focus-visible,.sylva-map-view input:focus-visible,.sylva-map-view select:focus-visible,.sylva-map-view textarea:focus-visible{outline:2px solid color-mix(in srgb,var(--accent) 70%,white);outline-offset:2px}

/* Mantiene i nomi degli strumenti visibili finché c'è spazio: meno memoria iconica, più chiarezza. */
@media(min-width:621px){.sylva-map-toolbar .sylva-map-tool span,.sylva-map-toolbar [data-map-mode] span,.sylva-map-toolbar #sylvaMapLabels span{display:inline!important}}
@media(max-width:1180px){.sylva-map-view{grid-template-columns:270px minmax(0,1fr)}.sylva-map-toolbar{gap:3px}.sylva-map-tool{padding-inline:8px;font-size:10px}}
@media(max-width:900px) and (min-width:821px){.sylva-map-toolbar .sylva-map-tool span{font-size:9.5px}.sylva-map-tool{padding-inline:7px}.sylva-map-toolbar{max-width:calc(100% - 28px)}}
@media(max-width:820px){
  .sylva-map-sidebar{width:min(336px,88vw)}
  .sylva-map-sidebar-head{padding-left:62px}
  .sylva-map-toolbar{top:58px;max-width:calc(100% - 18px);overflow-x:auto;scrollbar-width:none}
  .sylva-map-toolbar::-webkit-scrollbar{display:none}
  .sylva-map-draw-actions{top:112px;max-width:calc(100% - 18px);overflow-x:auto;scrollbar-width:none}
  .sylva-map-top-actions{gap:7px}
  .sylva-map-action{height:42px;padding-inline:11px;font-size:10px}
  .sylva-map-drawer{width:min(438px,97vw)}
  .sylva-map-drawer-head{padding:18px 18px 14px}.sylva-map-drawer-body{padding:16px 18px max(104px,calc(env(safe-area-inset-bottom) + 88px))}
  .sylva-map-measure-card{font-size:10.5px}
}
@media(max-width:620px){
  .sylva-map-toolbar .sylva-map-tool span,.sylva-map-toolbar [data-map-mode] span,.sylva-map-toolbar #sylvaMapLabels span{display:none!important}
  .sylva-map-tool{min-width:44px;height:44px;padding:0 10px}
  .sylva-map-top-actions .sylva-map-action{padding-inline:10px}
  .sylva-map-top-actions .sylva-map-action svg{width:17px;height:17px}
  .sylva-map-draw-actions{top:112px}
  .sylva-map-draw-actions button{min-height:44px}
  .sylva-map-dialog-backdrop{padding:10px}.sylva-map-dialog{max-height:94%}.sylva-map-dialog-actions{flex-wrap:wrap}.sylva-map-dialog-actions>*{flex:1 1 130px}
}
@media(max-width:460px){
  .sylva-map-top-actions .sylva-map-action{width:42px;padding:0;justify-content:center;font-size:0}.sylva-map-top-actions .sylva-map-action svg{margin:0}
  .sylva-map-toolbar{top:60px}.sylva-map-draw-actions{top:114px}
  .sylva-map-sidebar{width:min(350px,92vw)}
}
@media(pointer:coarse){
  .sylva-map-add,.sylva-map-cloud-pick,.sylva-map-side-tabs button,.sylva-map-list-item,.sylva-map-layer,.sylva-map-action,.sylva-map-drawer-close,.sylva-map-mobile-side,.sylva-map-back,.sylva-map-mobile-back{min-height:44px}
  .sylva-map-tool{min-width:44px;height:44px}.sylva-map-zoom button{width:44px;height:44px}.sylva-map-measure-card button{min-width:44px;min-height:44px}
  .sylva-map-field input[type="text"],.sylva-map-field input[type="search"],.sylva-map-field textarea,.sylva-map-field select{font-size:13px}
  .sylva-map-color-control>input[type="color"]{width:52px;height:46px}.sylva-map-swatches button{width:28px;height:28px}
}
@media(max-width:820px){
  .sylva-map-view.sidebar-open .sylva-map-toolbar,
  .sylva-map-view.sidebar-open .sylva-map-draw-actions{opacity:0;pointer-events:none;transition:opacity .12s ease}
}
/* Barra azioni editor: sticky ma mai sopra i campi. */
.sylva-map-drawer-actions{bottom:0;margin:16px -8px 0;padding:13px 8px calc(10px + env(safe-area-inset-bottom));background:linear-gradient(180deg,transparent 0,var(--map-panel) 20%,var(--map-panel) 100%)}
@media(max-width:820px){.sylva-map-drawer-actions{margin:16px -7px 0;padding:13px 7px calc(12px + env(safe-area-inset-bottom))}}
@media(max-width:620px){.sylva-map-drawer-actions{margin:14px -5px 0;padding-inline:5px}}

/* Gli editor usano l'attributo hidden per mostrare solo i controlli pertinenti.
   Alcune regole display dei field non devono mai prevalere su hidden. */
.sylva-map-view [hidden]{display:none!important}

/* v9 QA finale · niente testi microscopici e nessun footer che copra i campi. */
.sylva-map-section-label,
.sylva-map-list-copy small,
.sylva-map-list-kind,
.sylva-map-sidebar-foot,
.sylva-map-layer b{font-size:10px}
.sylva-map-field>label,.sylva-map-field>.label,
.sylva-map-help,
.sylva-map-codex-link small,
.sylva-map-dropzone small,
.sylva-map-codex-result small,
.sylva-map-delete-confirm small,
.sylva-map-cloud-card small,
.sylva-map-scale-card small,
.sylva-map-measure-summary span,
.sylva-map-scale-nudge small,
.sylva-map-input-suffix span{font-size:10.5px}
.sylva-map-secondary.compact,
.sylva-map-codex-link button,
.sylva-map-scale-card button,
.sylva-map-section-actions button,
.sylva-map-scale-nudge button{font-size:10px}
.sylva-map-drawer-actions{
  position:relative;
  bottom:auto;
  z-index:1;
  margin:18px 0 0;
  padding:14px 0 calc(6px + env(safe-area-inset-bottom));
  border-top:1px solid var(--map-line);
  background:transparent;
}
@media(max-width:820px){
  .sylva-map-drawer-actions{margin:18px 0 0;padding:14px 0 calc(8px + env(safe-area-inset-bottom))}
}
@media(pointer:coarse){
  .sylva-map-field>label,.sylva-map-field>.label,.sylva-map-help{font-size:11px}
  .sylva-map-list-copy small,.sylva-map-list-kind,.sylva-map-sidebar-foot{font-size:10.5px}
}

/* Evita sovrapposizioni tra strumenti centrali e azioni Gestisci/Importa/Esporta sui laptop. */
@media(max-width:1380px) and (min-width:821px){
  .sylva-map-toolbar,.sylva-map-draw-actions{left:14px;transform:none}
}
@media(max-width:1100px) and (min-width:821px){
  .sylva-map-toolbar{top:64px}
  .sylva-map-draw-actions{top:118px}
}
@media(max-width:1550px) and (min-width:821px){
  .sylva-map-toolbar,.sylva-map-draw-actions{left:14px;transform:none}
}

/* Su schermi stretti le azioni diventano una griglia compatta: niente pulsanti stirati o enormi. */
@media(max-width:620px){
  .sylva-map-drawer-actions>div{display:grid;width:100%;gap:7px;align-items:stretch}
  .sylva-map-drawer-actions>div:first-child{grid-template-columns:max-content}
  .sylva-map-drawer-actions>div:last-child{grid-template-columns:repeat(2,minmax(0,1fr));justify-content:stretch}
  .sylva-map-drawer-actions>div:last-child>*{width:100%;min-width:0;min-height:44px;height:auto;flex:none}
  .sylva-map-drawer-actions>div:last-child>.sylva-map-primary{grid-column:1/-1;min-height:46px;flex:none}
}
@media(pointer:coarse){.sylva-map-drawer-actions button{min-height:44px}}
@media(max-width:620px){
  .sylva-map-drawer-actions>div:first-child,
  .sylva-map-drawer-actions>div:last-child{flex:none;min-height:0}
}

/* ===== 0.964 narrative themes · Mappe ===== */
html[data-theme="modern"] .sylva-map-view{--map-text:#26313b;--map-muted:#6e7b87;--map-panel:rgba(255,255,255,.97);--map-panel-soft:#f3f6f8;--map-stage:#dce2e7;--map-line:rgba(37,55,71,.13);--map-pin-border:#fff;background:#edf1f5}
html[data-theme="fantasy"] .sylva-map-view{--map-text:#eee5d3;--map-muted:#b3a78f;--map-panel:rgba(42,40,29,.97);--map-panel-soft:#343225;--map-stage:#16170f;--map-line:rgba(226,205,164,.15);--map-pin-border:#f2e7d0;background:#151711}
html[data-theme="thriller"] .sylva-map-view{--map-text:#eef0f1;--map-muted:#9da3a8;--map-panel:rgba(28,31,34,.98);--map-panel-soft:#25292c;--map-stage:#111416;--map-line:rgba(236,239,240,.12);--map-pin-border:#f1f0ec;background:#101214}
html[data-theme="cyberpunk"] .sylva-map-view{--map-text:#ddf8fb;--map-muted:#83a6b0;--map-panel:rgba(9,19,28,.98);--map-panel-soft:#10202b;--map-stage:#050b11;--map-line:rgba(0,217,237,.20);--map-pin-border:#d9fbff;background:#060a10}
html[data-theme="fantasy"] .sylva-map-stage{background:radial-gradient(circle at 24% 18%,rgba(193,154,85,.07),transparent 34%),var(--map-stage)}
html[data-theme="thriller"] .sylva-map-stage{background:radial-gradient(circle at 78% 12%,rgba(198,75,80,.055),transparent 30%),var(--map-stage)}
html[data-theme="cyberpunk"] .sylva-map-stage{background:linear-gradient(rgba(0,217,237,.035) 1px,transparent 1px),linear-gradient(90deg,rgba(0,217,237,.035) 1px,transparent 1px),var(--map-stage);background-size:38px 38px}
html[data-theme="cyberpunk"] .sylva-map-toolbar,html[data-theme="cyberpunk"] .sylva-map-top-actions .sylva-map-action,html[data-theme="cyberpunk"] .sylva-map-draw-actions{box-shadow:0 0 0 1px rgba(243,79,201,.04),0 10px 34px rgba(0,0,0,.34)}
html[data-theme="fantasy"] .sylva-map-area-label{font-family:Cinzel,Georgia,serif}
html[data-theme="cyberpunk"] .sylva-map-area-label{font-family:Orbitron,Inter,sans-serif;letter-spacing:.09em}

/* ===== 0.975 narrative palette hardening · Mappe =====
   Arabesco / Mauve Orchid / Foresta reuse Fantasy/Thriller internally.
   This feature stylesheet is loaded after styles.css, so the independent
   palette must be restored here instead of inheriting those base colors. */
:is(html[data-palette="arabesque"],html[data-palette="orchidea"],html[data-palette="foresta"]) .sylva-map-view{
  --map-text:var(--text);
  --map-muted:var(--muted);
  --map-panel:color-mix(in srgb,var(--theme-chrome) 96%,transparent);
  --map-panel-soft:color-mix(in srgb,var(--theme-chrome-soft) 94%,transparent);
  --map-stage:var(--bg);
  --map-line:var(--line);
  --map-pin-border:color-mix(in srgb,var(--text) 80%,var(--theme-chrome));
  color:var(--text);
  background:var(--theme-stage-bg);
  font-family:var(--theme-ui);
}
:is(html[data-palette="arabesque"],html[data-palette="orchidea"],html[data-palette="foresta"]) .sylva-map-sidebar{
  background:color-mix(in srgb,var(--theme-chrome) 97%,transparent);
  border-right-color:var(--line);
}
:is(html[data-palette="arabesque"],html[data-palette="orchidea"],html[data-palette="foresta"]) :is(.sylva-map-main,.sylva-map-empty){
  background:var(--theme-stage-bg)!important;
}
:is(html[data-palette="arabesque"],html[data-palette="orchidea"],html[data-palette="foresta"]) .sylva-map-stage{
  background:
    radial-gradient(circle at 20% 16%,color-mix(in srgb,var(--accent) 7%,transparent),transparent 34%),
    radial-gradient(circle at 84% 12%,color-mix(in srgb,var(--accent-2) 4%,transparent),transparent 28%),
    var(--theme-stage-bg)!important;
}
:is(html[data-palette="arabesque"],html[data-palette="orchidea"],html[data-palette="foresta"]) :is(
  .sylva-map-toolbar,.sylva-map-draw-actions,.sylva-map-action,.sylva-map-zoom,
  .sylva-map-drawer,.sylva-map-dialog,.sylva-map-measure-card,.sylva-map-mobile-back,
  .sylva-map-empty-card
){
  background:color-mix(in srgb,var(--theme-chrome) 96%,transparent);
  border-color:var(--line);
  color:var(--text);
}
:is(html[data-palette="arabesque"],html[data-palette="orchidea"],html[data-palette="foresta"]) :is(
  .sylva-map-search input,.sylva-map-field input,.sylva-map-field textarea,.sylva-map-field select,
  .sylva-map-secondary,.sylva-map-codex-link,.sylva-map-scale-card,.sylva-map-option-grid .sylva-map-check
){
  background:var(--map-panel-soft);
  border-color:var(--line);
  color:var(--text);
}
:is(html[data-palette="arabesque"],html[data-palette="orchidea"],html[data-palette="foresta"]) :is(
  .sylva-map-title-row select,.sylva-map-view button,.sylva-map-view input,
  .sylva-map-view select,.sylva-map-view textarea
){font-family:var(--theme-ui)!important}
:is(html[data-palette="arabesque"],html[data-palette="orchidea"],html[data-palette="foresta"]) :is(
  .sylva-map-empty-card h2,.sylva-map-area-label
){font-family:var(--theme-display)!important}
:is(html[data-palette="arabesque"],html[data-palette="orchidea"],html[data-palette="foresta"]) .sylva-map-title-row select option{
  background:var(--theme-chrome);
  color:var(--text);
}
:is(html[data-palette="arabesque"],html[data-palette="orchidea"],html[data-palette="foresta"]) :is(
  .sylva-map-primary,.sylva-map-draw-actions button.primary
){background:var(--theme-primary)!important;color:var(--theme-primary-text)!important}
:is(html[data-palette="arabesque"],html[data-palette="orchidea"],html[data-palette="foresta"]) :is(
  .sylva-map-kicker,.sylva-map-section-label
){color:color-mix(in srgb,var(--accent-2) 72%,var(--muted))}
:is(html[data-palette="arabesque"],html[data-palette="orchidea"],html[data-palette="foresta"]) .sylva-map-side-tabs button.active{
  background:var(--accent-soft);
  color:var(--text);
}
html[data-palette="arabesque"] .sylva-map-empty-card img{content:url("assets/sylva-symbol-fantasy.png")}
:is(html[data-palette="orchidea"],html[data-palette="foresta"]) .sylva-map-empty-card img{content:url("assets/sylva-symbol-ivory.png")}
html[data-palette="foresta"] .sylva-map-stage{
  background:
    radial-gradient(circle at 18% 12%,rgba(120,180,169,.075),transparent 34%),
    radial-gradient(circle at 82% 9%,rgba(211,164,106,.035),transparent 27%),
    var(--theme-stage-bg)!important;
}
html[data-palette="arabesque"] .sylva-map-stage{
  background:
    radial-gradient(circle at 19% 13%,rgba(211,161,78,.075),transparent 34%),
    radial-gradient(circle at 84% 10%,rgba(79,154,145,.05),transparent 29%),
    var(--theme-stage-bg)!important;
}
html[data-palette="orchidea"] .sylva-map-stage{
  background:
    radial-gradient(circle at 82% 11%,rgba(182,130,153,.07),transparent 32%),
    radial-gradient(circle at 17% 82%,rgba(212,169,185,.035),transparent 28%),
    var(--theme-stage-bg)!important;
}


html[data-palette="orchidea"] .sylva-map-view{
  background:linear-gradient(145deg,#21161e 0%,#33222c 55%,#251a22 100%)!important;
}
html[data-palette="orchidea"] .sylva-map-sidebar{
  background:linear-gradient(180deg,color-mix(in srgb,var(--theme-chrome) 98%,transparent),color-mix(in srgb,var(--theme-chrome-soft) 92%,var(--theme-entry)) 100%)!important;
}
html[data-palette="orchidea"] :is(.sylva-map-main,.sylva-map-empty){
  background:linear-gradient(145deg,#21161e 0%,#33222c 55%,#251a22 100%)!important;
}
html[data-palette="orchidea"] .sylva-map-stage{
  background:
    radial-gradient(circle at 14% 8%,rgba(182,130,153,.17),transparent 27%),
    radial-gradient(circle at 87% 12%,rgba(212,169,185,.11),transparent 24%),
    radial-gradient(ellipse at 55% 2%,rgba(121,71,95,.15),transparent 42%),
    linear-gradient(145deg,#21161e 0%,#33222c 55%,#251a22 100%)!important;
}
html[data-palette="orchidea"] .sylva-map-empty-card{
  background:linear-gradient(180deg,color-mix(in srgb,var(--theme-chrome) 97%,transparent),color-mix(in srgb,var(--theme-chrome-soft) 95%,transparent))!important;
  box-shadow:0 18px 46px rgba(10,4,8,.28)!important;
}
html[data-palette="orchidea"] .sylva-map-side-tabs button.active{
  background:color-mix(in srgb,var(--accent) 18%,var(--theme-chrome-soft))!important;
  color:var(--text)!important;
  border-color:color-mix(in srgb,var(--accent) 34%,var(--line))!important;
}

/* 0.994 · map readability, save visibility, upload feedback */
.sylva-map-storage{font-size:10.5px;line-height:1.45;flex-wrap:wrap}
.sylva-map-search input{font-size:12px;min-height:42px}
.sylva-map-side-tabs button{font-size:11px;min-height:38px}
.sylva-map-section-label{font-size:10.5px;line-height:1.35}
.sylva-map-list-item{grid-template-columns:34px minmax(0,1fr) auto;align-items:start;padding:9px 10px}
.sylva-map-list-copy b{font-size:11.5px;line-height:1.35;white-space:normal}
.sylva-map-list-copy small{font-size:10.5px;line-height:1.45;white-space:normal;overflow:visible;text-overflow:clip}
.sylva-map-list-copy small.with-note{margin-top:5px;color:var(--map-text);opacity:.86}
.sylva-map-list-kind{font-size:9.5px;padding-top:2px}
.sylva-map-sidebar-foot{font-size:10px;line-height:1.6}
.sylva-map-tool{font-size:10.5px;min-height:36px}
.sylva-map-action{height:38px;padding-inline:12px;font-size:10.5px;font-weight:650}
.sylva-map-top-actions{flex-wrap:wrap;justify-content:flex-end;max-width:min(520px,calc(100% - 28px))}
.sylva-map-zoom{left:14px;right:auto;bottom:14px}
.sylva-map-upload-actions{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:8px}
.sylva-map-upload-status{display:flex;align-items:center;gap:8px;min-height:38px;padding:8px 10px;border:1px solid var(--map-line);border-radius:11px;background:var(--map-panel-soft);font-size:10.5px;line-height:1.45;color:var(--map-muted)}
.sylva-map-upload-status::before{content:'';width:8px;height:8px;border-radius:50%;background:color-mix(in srgb,var(--map-muted) 52%,transparent);flex:0 0 8px}
.sylva-map-upload-status.is-loaded{color:var(--map-text);border-color:color-mix(in srgb,var(--accent) 32%,var(--map-line));background:color-mix(in srgb,var(--accent-soft) 60%,var(--map-panel-soft))}
.sylva-map-upload-status.is-loaded::before{background:var(--accent)}
.sylva-map-field>label,.sylva-map-field>.label{font-size:10.5px;line-height:1.35}
.sylva-map-help{font-size:10.5px;line-height:1.6}
.sylva-map-cloud-card p,.sylva-map-cloud-card small,.sylva-map-scale-card small,.sylva-map-measure-summary span,.sylva-map-scale-nudge small{font-size:10.5px;line-height:1.5}
@media(max-width:1180px){
  .sylva-map-top-actions{max-width:calc(100% - 28px)}
  .sylva-map-top-actions .sylva-map-action{font-size:10px;padding-inline:10px}
}
@media(max-width:820px){
  .sylva-map-top-actions{left:62px;right:9px;justify-content:flex-end;max-width:none}
  .sylva-map-top-actions .sylva-map-action{height:40px;font-size:10px}
  .sylva-map-zoom{left:9px;right:auto;bottom:9px}
  .sylva-map-measure-card{max-width:calc(100% - 118px)}
}
@media(max-width:620px){
  .sylva-map-storage,.sylva-map-sidebar-foot,.sylva-map-list-copy small,.sylva-map-help,.sylva-map-field>label,.sylva-map-field>.label{font-size:11px}
  .sylva-map-top-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));left:9px;right:9px;top:9px;gap:7px}
  .sylva-map-top-actions .sylva-map-action{width:100%;min-width:0;justify-content:center;padding-inline:8px;font-size:10px}
  .sylva-map-toolbar{top:104px}
  .sylva-map-draw-actions{top:156px}
  .sylva-map-zoom{left:9px;right:auto;bottom:9px}
  .sylva-map-measure-card{left:9px;right:9px;bottom:66px;max-width:none;transform:none}
}
@media(max-width:460px){
  .sylva-map-top-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
  .sylva-map-top-actions .sylva-map-action{font-size:9.5px}
}

/* 0.996 · map drawer action stability */
.sylva-map-drawer-actions{
  display:grid;
  grid-template-columns:minmax(96px,auto) minmax(0,1fr);
  gap:10px;
  align-items:start;
}
.sylva-map-drawer-actions>div{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  min-width:0;
}
.sylva-map-drawer-actions>div:first-child{
  align-self:start;
}
.sylva-map-drawer-actions>div:last-child{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  justify-content:stretch;
}
.sylva-map-drawer-actions>div:last-child>*{
  width:100%;
  min-width:0;
  min-height:42px;
}
.sylva-map-drawer-actions>div:last-child>.sylva-map-primary{
  grid-column:auto;
}
@media(max-width:860px){
  .sylva-map-drawer-actions{grid-template-columns:1fr;gap:8px}
  .sylva-map-drawer-actions>div:first-child:empty{display:none}
  .sylva-map-drawer-actions>div:last-child{grid-template-columns:repeat(2,minmax(0,1fr))}
  .sylva-map-drawer-actions>div:last-child>.sylva-map-primary{grid-column:1/-1}
}
@media(max-width:520px){
  .sylva-map-drawer-actions>div:last-child{grid-template-columns:1fr}
  .sylva-map-drawer-actions>div:last-child>.sylva-map-primary{grid-column:auto}
}

/* 0.996 · map library / cloud slot management */
.sylva-map-dialog.map-manager-dialog{width:min(900px,94vw);max-height:min(86vh,820px)}
.sylva-map-manager-summary{display:grid;gap:8px;padding:13px 14px;margin-bottom:12px;border:1px solid var(--map-line);border-radius:14px;background:var(--map-panel-soft)}
.sylva-map-manager-summary>div{display:flex;align-items:center;justify-content:space-between;gap:14px}
.sylva-map-manager-summary b{font-size:13px;color:var(--map-text)}
.sylva-map-manager-summary span{font-size:10.5px;color:var(--accent);font-weight:700;text-align:right}
.sylva-map-manager-summary p{margin:0;font-size:10.5px;line-height:1.55;color:var(--map-muted)}
.sylva-map-manager-list{display:grid;gap:10px;max-height:58vh;overflow:auto;padding-right:2px}
.sylva-map-manager-row{display:grid;grid-template-columns:minmax(260px,1fr) minmax(360px,auto);gap:12px;align-items:center;padding:12px;border:1px solid var(--map-line);border-radius:15px;background:color-mix(in srgb,var(--map-panel-soft) 82%,transparent)}
.sylva-map-manager-row.is-open{border-color:color-mix(in srgb,var(--accent) 30%,var(--map-line))}
.sylva-map-manager-row.is-cloud{box-shadow:inset 4px 0 var(--accent)}
.sylva-map-manager-head{display:grid;gap:7px;min-width:0}
.sylva-map-manager-head>div{display:grid;grid-template-columns:auto minmax(0,1fr);gap:8px;align-items:center;min-width:0}
.sylva-map-manager-head input{width:100%;min-width:0;min-height:42px;border:1px solid var(--map-line);border-radius:10px;background:var(--map-panel);color:var(--map-text);padding:9px 10px;font:inherit;font-size:12px;outline:none}
.sylva-map-manager-head input:focus{border-color:color-mix(in srgb,var(--accent) 45%,var(--map-line));box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 12%,transparent)}
.sylva-map-manager-head>small{font-size:10px;line-height:1.4;color:var(--map-muted)}
.sylva-map-manager-badges{display:flex;flex-wrap:wrap;gap:5px;min-width:0}
.sylva-map-manager-badges:empty{display:none}
.sylva-map-manager-badges i{display:inline-flex;align-items:center;min-height:24px;padding:4px 7px;border-radius:999px;background:var(--map-panel);border:1px solid var(--map-line);color:var(--map-muted);font-style:normal;font-size:9px;font-weight:700;white-space:nowrap}
.sylva-map-manager-badges i.cloud{background:var(--accent-soft);border-color:color-mix(in srgb,var(--accent) 28%,var(--map-line));color:var(--map-text)}
.sylva-map-manager-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;min-width:0}
.sylva-map-manager-actions button{width:100%;min-width:0;min-height:39px;height:auto;padding:8px 9px;font-size:10px;line-height:1.25}
.sylva-map-manager-actions [data-map-cloud]{grid-column:span 2}
.sylva-map-manager-actions [data-map-cloud].active{background:var(--accent-soft);border-color:color-mix(in srgb,var(--accent) 30%,var(--map-line));color:var(--map-text)}
.sylva-map-manager-actions button:disabled{opacity:.48;cursor:not-allowed}
@media(max-width:900px){
  .sylva-map-dialog.map-manager-dialog{width:min(720px,95vw)}
  .sylva-map-manager-row{grid-template-columns:1fr;align-items:stretch}
  .sylva-map-manager-actions{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:620px){
  .sylva-map-dialog.map-manager-dialog{width:96vw;max-height:90vh}
  .sylva-map-manager-summary>div{align-items:flex-start;flex-direction:column;gap:4px}
  .sylva-map-manager-summary span{text-align:left}
  .sylva-map-manager-head>div{grid-template-columns:1fr}
  .sylva-map-manager-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
  .sylva-map-manager-actions [data-map-cloud]{grid-column:1/-1}
  .sylva-map-manager-actions [data-map-delete]{grid-column:1/-1}
  .sylva-map-manager-actions button{min-height:44px;font-size:10.5px}
}
