
:root{
  --bg:#f6f7fb; --panel:#ffffff; --text:#111827; --muted:#6b7280; --border:#e5e7eb;
  --accent:#eef2ff; --danger:#fee2e2; --shadow:0 10px 25px rgba(0,0,0,.06);
}
*{box-sizing:border-box} html,body{height:100%;margin:0;font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu}
.app{display:flex;height:100vh;background:var(--bg);color:var(--text)}
.sidebar{width:460px;background:var(--panel);box-shadow:var(--shadow);padding:16px;display:flex;flex-direction:column;gap:12px;z-index:10;position:relative;height:100vh;overflow:hidden}
.sidebar h2{margin:0 0 8px 0}
.m0{margin:0}
.muted{color:var(--muted)}
.section{border-top:1px solid var(--border);padding-top:12px;margin-top:8px}
.list{display:flex;flex-direction:column;gap:8px;margin-top:8px}
#categories{max-height:180px;overflow:auto;padding-right:4px}
.list-scroll{max-height:66vh;overflow:auto;padding-right:4px}
.cat{display:grid;grid-template-columns:2fr auto auto;align-items:center;gap:8px;padding:8px;border:1px solid var(--border);border-radius:10px}
.left{display:flex;align-items:center;gap:10px;min-width:0;flex:1}
.mid{display:flex;align-items:center;gap:8px}
.dot{width:16px;height:16px;border-radius:50%}
.actions{display:flex;gap:6px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
input[type=color]{width:30px;height:30px;border:none;background:transparent;padding:0;cursor:pointer}
.catname{flex:1;min-width:0;width:100%;padding:8px;border:1px solid var(--border);border-radius:8px;overflow:visible}
.new-cat{display:flex;gap:8px;margin-top:8px;border-top:1px solid var(--border);padding-top:8px}
.new-cat input[type=text]{flex:1;padding:8px;border:1px solid var(--border);border-radius:8px}
.btn{flex:0 0 auto;padding:8px 10px;border:1px solid var(--border);background:#f3f4f6;border-radius:10px;cursor:pointer;white-space:nowrap}
.btn:hover{filter:brightness(.98)}
.filelabel{display:inline-flex;justify-content:center;align-items:center;gap:8px;cursor:pointer}
.filelabel input{display:none}
.row{display:flex;gap:8px;align-items:center;margin-top:8px}
.space-between{justify-content:space-between}
.danger{background:var(--danger)}
.section.markers{flex:1;min-height:0;display:flex;flex-direction:column}
#markerList{flex:1;min-height:0;overflow:auto}
.mapwrap{position:relative;flex:1;margin:12px 12px 12px 0;border-radius:16px;overflow:hidden;box-shadow:var(--shadow);background:#ddd}
.map{height:100%;width:100%;position:relative;cursor:grab}
.map.grabbing{cursor:grabbing}
.tiles{position:absolute;left:0;top:0}
.marker{position:absolute;transform:translate(-50%,-100%);width:24px;height:24px;background-size:contain;background-repeat:no-repeat;background-position:center;pointer-events:auto;cursor:pointerbackground-size:100% 100%;background-repeat:no-repeat;background-position:center;clip-path:path('M12 2C8.14 2 5 5.14 5 9c0 4.97 7 13 7 13s7-8.03 7-13c0-3.86-3.14-7-7-7z');-webkit-clip-path:path('M12 2C8.14 2 5 5.14 5 9c0 4.97 7 13 7 13s7-8.03 7-13c0-3.86-3.14-7-7-7z');}
.editor{position:absolute;right:16px;top:16px;width:340px;background:#fff;border:1px solid var(--border);border-radius:14px;box-shadow:var(--shadow);padding:12px;z-index:5}
.editor.hidden{display:none}
.editor h4{margin:0 0 8px 0}
.editor .field{margin-bottom:8px}
.editor input, .editor textarea, .editor select{width:100%;padding:8px;border:1px solid var(--border);border-radius:8px}
.notice{position:absolute;left:16px;bottom:16px;background:#fff;border:1px solid var(--border);border-radius:10px;padding:10px 12px;box-shadow:var(--shadow);color:#111827;pointer-events:none;z-index:3}
/* Marker-Gruppierung */
.group{border:1px solid var(--border);border-radius:12px;padding:8px}
.group-header{display:flex;align-items:center;gap:8px;margin-bottom:6px}
.group-header .swatch{width:12px;height:12px;border-radius:50%}
.group .item{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px 8px;border:1px solid var(--border);border-radius:8px}
.group .muted{font-size:12px}

/* ===== Overlay (Export Auswahl) ===== */
.expSel-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.35);z-index:9998;display:none}
.expSel-modal{position:fixed;inset:0;display:none;align-items:flex-start;justify-content:center;z-index:9999}
.expSel-card{margin-top:8vh;background:#fff;border:1px solid var(--border);border-radius:14px;box-shadow:0 10px 25px rgba(0,0,0,.15);padding:16px;max-width:520px;width:92vw}
.expSel-title{margin:0 0 8px 0;font-size:18px;font-weight:600}
.expSel-list{max-height:40vh;overflow:auto;border:1px solid var(--border);border-radius:10px;padding:8px;margin-bottom:10px}
.expSel-row{display:flex;align-items:center;gap:8px;padding:6px 8px;border:1px solid var(--border);border-radius:8px;margin-bottom:6px}
.expSel-swatch{width:14px;height:14px;border-radius:50%}
.expSel-actions{display:flex;gap:8px;align-items:center;justify-content:flex-end}
.expSel-btn{padding:8px 10px;border:1px solid var(--border);background:#f3f4f6;border-radius:10px;cursor:pointer}
.expSel-btn:hover{filter:brightness(.98)}
.expSel-flex{flex:1}
.expSel-show{display:block}

.marker:hover{transform:translate(-50%,-100%) scale(1.1)}
