/* Layer library (layer_library.py): saved layers, many layers on one map, saved maps, groups. Map-first pop-out dialogs, S2 navy/copper. */
.ll-dialog{width:min(980px,96vw)}
.ll-small{width:min(560px,96vw)}
.ll-tabs{display:flex;gap:2px;padding:8px 12px 0;background:#f4f1ec;border-bottom:1px solid #e3ded6;overflow-x:auto;scrollbar-width:none}
.ll-tabs button{border:0;background:transparent;padding:9px 12px;font:600 13px Inter,system-ui,sans-serif;color:#1F2A44;border-bottom:3px solid transparent;cursor:pointer;white-space:nowrap;min-height:40px}
.ll-tabs button[aria-selected="true"]{border-bottom-color:#B87333;color:#B87333}
.ll-tabs .ll-n{display:inline-block;min-width:18px;padding:0 5px;margin-left:4px;border-radius:9px;background:#1F2A44;color:#fff;font-size:11px;line-height:18px}
.ll-body{padding:10px 16px 14px;overflow:auto;max-height:64vh}
.ll-bar{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin:0 0 10px}
.ll-bar input[type=search]{flex:1;min-width:160px;margin:0}
.ll-bar .ll-grow{flex:1}
.ll-list{list-style:none;margin:0;padding:0}
.ll-item{display:flex;gap:10px;align-items:center;border:1px solid #e3ded6;border-left:4px solid var(--c,#B87333);border-radius:9px;padding:8px 10px;margin:0 0 8px;background:#fff}
.ll-item.off{opacity:.6}
.ll-main{flex:1;min-width:0}
.ll-name{font-weight:700;color:#1F2A44;word-break:break-word}
.ll-meta{font-size:12px;color:#5b6170;margin-top:2px}
.ll-desc{font-size:12.5px;color:#333;margin-top:3px;white-space:pre-wrap;max-height:4.2em;overflow:hidden}
.ll-acts{display:flex;flex-wrap:wrap;gap:4px;justify-content:flex-end;align-items:center}
.ll-vis{display:inline-block;font:700 10.5px Inter,system-ui,sans-serif;letter-spacing:.03em;text-transform:uppercase;padding:2px 6px;border-radius:5px;margin-right:4px;vertical-align:1px}
.ll-vis-private{background:#ececf0;color:#4a4f5c}.ll-vis-group{background:#e7eefc;color:#1F2A44}.ll-vis-public{background:#f6e7da;color:#8a5220}
.ll-sw{flex:none;width:22px;height:22px;border-radius:5px;border:2px solid #fff;box-shadow:0 0 0 1px #c9ccd3}
.ll-toggle{flex:none;width:22px;height:22px;accent-color:#B87333;cursor:pointer;margin:0}
.ll-color{width:30px;height:30px;padding:0;border:0;background:none;cursor:pointer}
.ll-op{width:84px;accent-color:#B87333}
.ll-order{display:flex;flex-direction:column;gap:2px}
.ll-order button{min-width:30px;min-height:22px;padding:0 6px;line-height:1}
.ll-empty{padding:16px 4px;color:#444}
.ll-form label{display:block;margin:0 0 10px;font-weight:600;font-size:13px;color:#1F2A44}
.ll-form input[type=text],.ll-form textarea,.ll-form select,.ll-form input[type=search],.ll-form input[type=number]{width:100%;box-sizing:border-box;margin-top:4px}
.ll-form .ll-row{display:flex;gap:10px;flex-wrap:wrap}.ll-form .ll-row>*{flex:1;min-width:140px}
.ll-form fieldset{border:1px solid #e3ded6;border-radius:8px;padding:8px 10px;margin:0 0 10px}
.ll-form legend{font-weight:700;font-size:12.5px;color:#1F2A44;padding:0 4px}
.ll-radio{display:flex;gap:6px;align-items:flex-start;font-weight:500!important;margin:4px 0!important}
.ll-radio input{margin-top:3px}
.ll-groups{margin:4px 0 0 24px}
.ll-fields{display:flex;flex-wrap:wrap;gap:4px 12px;max-height:120px;overflow:auto;margin-top:6px}
.ll-fields label{font-weight:500;margin:0}
.ll-foot{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end;padding:10px 16px;border-top:1px solid #e3ded6;background:#faf8f5}
.ll-foot .ll-left{margin-right:auto}
.ll-msg{font-size:12.5px;color:#5b6170;min-height:1.2em;margin:4px 0}
.ll-msg.err{color:#a12a2a}
.ll-link{display:flex;gap:6px}.ll-link input{flex:1;font-family:ui-monospace,Menlo,monospace;font-size:12px}
.ll-dl{position:relative;display:inline-block}
.ll-dl-menu{position:absolute;right:0;top:100%;z-index:5;background:#fff;border:1px solid #c9ccd3;border-radius:8px;box-shadow:0 8px 24px #0003;padding:4px;min-width:150px}
.ll-dl-menu a{display:block;padding:7px 10px;color:#1F2A44;text-decoration:none;border-radius:6px;font-size:13px}.ll-dl-menu a:hover{background:#f4f1ec}
.ll-usage{font-size:12px;color:#5b6170}
.ll-legend{position:absolute;z-index:13;left:10px;bottom:34px;max-width:240px;max-height:40%;overflow:auto;background:#fffffff2;border:1px solid #c9ccd3;border-top:3px solid #B87333;border-radius:9px;box-shadow:0 4px 16px #0002;font:12.5px Inter,system-ui,sans-serif;color:#1b1b1b}
.ll-legend[hidden]{display:none}
.ll-legend header{display:flex;align-items:center;gap:6px;padding:5px 8px;background:#1F2A44;color:#fff;font-weight:700;cursor:pointer;position:sticky;top:0}
.ll-legend header span{flex:1}
.ll-legend header button{border:0;background:transparent;color:#fff;cursor:pointer;min-width:26px;min-height:26px;padding:0}
.ll-legend ul{list-style:none;margin:0;padding:4px 8px}
.ll-legend li{display:flex;align-items:center;gap:6px;padding:3px 0;cursor:pointer}
.ll-legend li.off{opacity:.45}
.ll-legend li input{accent-color:#B87333;margin:0}
.ll-legend .ll-key{flex:none;width:16px;height:12px;border-radius:3px}
.ll-legend .ll-key.pt{width:11px;height:11px;border-radius:50%;margin:0 2px}
.ll-legend .ll-key.ln{height:3px;border-radius:2px}
.ll-legend.min ul{display:none}
.ll-pop{font:12.5px Inter,system-ui,sans-serif;max-width:280px}
.ll-pop b{color:#1F2A44}
.ll-pop table{border-collapse:collapse;margin-top:4px}.ll-pop td{padding:2px 6px 2px 0;vertical-align:top;border-bottom:1px solid #eee}
.ll-pop td:first-child{color:#5b6170;white-space:nowrap}
body.ga-mobile .ll-legend{position:fixed;left:8px;bottom:calc(env(safe-area-inset-bottom,0px) + 132px);max-width:60vw;z-index:59}
@media (max-width:700px){
 .ll-dialog,.ll-small{width:100vw;max-width:100vw;max-height:100dvh;height:100dvh;border-radius:0;margin:0}
 .ll-body{max-height:none;flex:1}
 .ll-dialog[open],.ll-small[open]{display:flex;flex-direction:column}
 .ll-item{flex-wrap:wrap}
 .ll-acts{width:100%;justify-content:flex-start}
 .ll-acts button,.ll-acts .ps-mini{min-height:36px}
}
/* admin card */
#llAdmin table{width:100%;border-collapse:collapse;font-size:12.5px}
#llAdmin th{text-align:left;background:#1F2A44;color:#fff;padding:5px 6px;font-weight:600}
#llAdmin td{border-bottom:1px solid #e3ded6;padding:5px 6px;vertical-align:top}
#llAdmin .ll-g{border:1px solid rgba(184,115,51,.35);border-left:4px solid #B87333;border-radius:8px;padding:8px 10px;margin:8px 0}
#llAdmin .ll-g-head{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
#llAdmin .ll-g-head b{flex:1;font-size:14px}
#llAdmin .ll-inline{display:flex;gap:6px;flex-wrap:wrap;align-items:center;margin:6px 0}
#llAdmin .ll-inline input,#llAdmin .ll-inline select{width:auto;margin:0;flex:1;min-width:120px}
#llAdmin .ll-inline button{width:auto}
#llAdmin details{margin:10px 0}#llAdmin summary{cursor:pointer;font-weight:700;color:#1F2A44}
.ll-dialog [hidden],.ll-legend [hidden],#llAdmin [hidden]{display:none!important}
.ll-form textarea,.ll-form input,.ll-form select{font:inherit}
#llAdmin details>summary{color:#dbe6ef;cursor:pointer;font-weight:600;margin:10px 0 6px}
#llAdmin details>summary:hover{color:#B87333}
.ll-legend.ll-away{display:none!important}
/* desktop window manager: keep the legend clear of a window docked on the left ("Area & layers") */
body.st-wm:not(.ga-mobile) .ll-legend{left:calc(var(--stw-inset-l,0px) + 10px);transition:left .15s}
