/* GPX library grouping; scoped to its panel and native dialogs. */
.ls-gpx-library{min-width:0}
.ls-gpx-library-toolbar,.ls-gpx-library-tools,.ls-gpx-file-heading{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.ls-gpx-library-toolbar{justify-content:space-between;margin-bottom:10px}
.ls-gpx-library-toolbar>strong{font-size:16px}
.ls-gpx-library-status,.ls-gpx-drag-hint{font-size:12px;line-height:1.5;color:var(--muted,#666);margin:8px 0 14px}
.ls-gpx-folder-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:9px;margin-bottom:18px}
.ls-gpx-folder{display:flex;min-width:0;border:1px solid var(--line,#ddd);border-radius:9px;background:var(--surface,#fff);transition:box-shadow .15s,border-color .15s}
.ls-gpx-folder.is-active{border-color:#009246;box-shadow:inset 0 0 0 1px #009246}
.ls-gpx-folder-open{display:flex;align-items:center;gap:8px;min-width:0;flex:1;min-height:54px;padding:10px;border:0;background:transparent;color:var(--ink,#111);font:inherit;text-align:left;cursor:pointer}
.ls-gpx-folder-open .ico{width:20px;height:20px;flex:0 0 20px;color:#009246}
.ls-gpx-folder-name{flex:1;min-width:0;overflow-wrap:anywhere;font-size:13px;font-weight:600;line-height:1.35}
.ls-gpx-folder-count{font-size:11px;color:var(--muted,#666)}
.ls-gpx-folder-more{flex:0 0 36px;border:0;border-left:1px solid var(--line,#ddd);border-radius:0 8px 8px 0;background:transparent;color:var(--ink,#111);font-size:25px;cursor:pointer}
.ls-gpx-library .is-drop-target{outline:3px dashed #009246;outline-offset:2px;box-shadow:0 0 0 5px #00924618}
.ls-gpx-file-heading{margin:10px 0}
.ls-gpx-file-heading h3{font-size:15px;font-weight:600;line-height:1.4;margin:0;overflow-wrap:anywhere;min-width:0}
.ls-gpx-file-heading>span{font-size:12px;color:var(--muted,#666)}
.ls-gpx-file-list{min-height:90px;border-radius:8px}
.ls-gpx-entry{display:grid;grid-template-columns:38px minmax(0,1fr);align-items:center;min-width:0}
.ls-gpx-select{width:20px;height:20px;margin:9px;accent-color:#009246;cursor:pointer}
.ls-gpx-entry .file-item{min-width:0}
.ls-gpx-entry.is-dragging{opacity:.5}
.ls-gpx-entry[draggable=true]{cursor:grab}
.ls-gpx-entry .file-main,.ls-gpx-entry .file-name{min-width:0}
.ls-gpx-folder-label{display:block;margin-top:3px;font-size:11px;font-weight:600;color:#007738;overflow-wrap:anywhere}
.ls-gpx-library button:disabled{opacity:.5;cursor:default}
.ls-gpx-library :focus-visible,.ls-gpx-dialog :focus-visible{outline:2px solid #009246;outline-offset:3px}
.ls-gpx-dialog{box-sizing:border-box;position:fixed;inset:0;margin:auto;width:min(460px,calc(100vw - 28px));max-width:none;max-height:calc(100dvh - 28px);padding:20px;border:1px solid var(--line,#ddd);border-radius:12px;background:var(--surface,#fff);color:var(--ink,#111);font:15px/1.5 system-ui,sans-serif;overflow:auto;box-shadow:0 14px 60px #0005}
.ls-gpx-dialog::backdrop{background:#0008}
.ls-gpx-dialog-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:16px}
.ls-gpx-dialog h2{font:700 21px/1.25 system-ui,sans-serif;margin:0;overflow-wrap:anywhere}
.ls-gpx-dialog-head>button{display:grid;place-items:center;min-width:40px;min-height:40px;padding:0;border:1px solid var(--line,#ddd);border-radius:7px;background:transparent;color:inherit;font-size:26px;cursor:pointer}
.ls-gpx-dialog label{display:block;font-weight:600}
.ls-gpx-dialog input{box-sizing:border-box;display:block;width:100%;min-height:44px;margin-top:8px;padding:10px;border:1px solid var(--line-strong,#aaa);border-radius:7px;background:var(--surface-2,#fafafa);color:inherit;font:16px/1.4 system-ui,sans-serif}
.ls-gpx-dialog p{font-size:13px;overflow-wrap:anywhere}
.ls-gpx-dialog [role=status]{min-height:20px;color:var(--muted,#666)}
.ls-gpx-target{display:flex;align-items:center;justify-content:space-between;gap:12px;box-sizing:border-box;width:100%;min-height:48px;margin:7px 0;padding:10px 12px;border:1px solid var(--line,#ddd);border-radius:8px;background:transparent;color:inherit;font:600 14px/1.4 system-ui,sans-serif;text-align:left;overflow-wrap:anywhere;cursor:pointer}
.ls-gpx-target small{font-weight:400;font-size:11px}
.ls-gpx-target:disabled{opacity:.45;cursor:default}
.ls-gpx-target-danger{color:#c8102e}
html[data-ls-theme=dark] .ls-gpx-dialog{background:#000;color:#fff;border-color:#444;color-scheme:dark}
html[data-ls-theme=dark] .ls-gpx-folder-label{color:#6dd99f}
@media(max-width:500px){.ls-gpx-folder-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.ls-gpx-folder-open{padding:9px 7px;gap:6px}.ls-gpx-folder-more{flex-basis:30px}.ls-gpx-entry{grid-template-columns:32px minmax(0,1fr)}.ls-gpx-select{margin:6px}.ls-gpx-dialog{padding:16px}.ls-gpx-drag-hint{display:none}}
