/* Taktbild – UI */
:root {
  --bg: #0a0a0f;
  --bg-2: #101018;
  --panel: #14141d;
  --panel-2: #1b1b27;
  --line: #262636;
  --line-2: #33334a;
  --text: #ececf4;
  --muted: #9393ab;
  --dim: #66667c;
  --accent: #ff3d6e;
  --accent-2: #a64dff;
  --accent-3: #2fd3ff;
  --ok: #3ddc97;
  --warn: #ffb347;
  --grad: linear-gradient(100deg, #ff3d6e 0%, #a64dff 52%, #2fd3ff 100%);
  --radius: 12px;
  --radius-s: 8px;
  --shadow: 0 10px 40px rgba(0, 0, 0, .45);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent-3); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 10px; }
::selection { background: rgba(166, 77, 255, .4); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #2a2a3b; border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- Buttons & Inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel-2); cursor: pointer; font-weight: 600; white-space: nowrap; transition: background .15s, border-color .15s, transform .05s; user-select: none; }
.btn:hover { background: #24243440; border-color: #45455f; background-color: #22222f; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { border: 0; background: var(--grad); color: #fff; box-shadow: 0 6px 22px rgba(255, 61, 110, .25); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--panel-2); }
.btn.danger { color: #ff7d97; }
.btn.small { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
.btn.icon { width: 36px; padding: 0; }
.btn.small.icon { width: 28px; }
.btn.active { border-color: var(--accent); color: #fff; background: rgba(255, 61, 110, .14); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.small svg { width: 15px; height: 15px; }

.input, select.input, textarea.input { width: 100%; height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg-2); outline: none; transition: border-color .15s, box-shadow .15s; }
textarea.input { height: auto; min-height: 90px; padding: 10px 12px; resize: vertical; }
.input:focus { border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(166, 77, 255, .18); }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
label.field > .input, label.field > select, label.field > textarea { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--text); font-size: 14px; }

/* Segment-Auswahl */
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; height: 28px; padding: 0 10px; border-radius: 7px; cursor: pointer; font-weight: 600; font-size: 12.5px; color: var(--muted); }
.seg button.on { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }

/* Schalter */
.switch { position: relative; width: 38px; height: 22px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: #2a2a3b; border-radius: 22px; cursor: pointer; transition: background .2s; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch input:checked + span { background: var(--grad); }
.switch input:checked + span::after { transform: translateX(16px); }

/* Slider */
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--accent) 0, var(--accent-2) var(--p, 50%), #2a2a3b var(--p, 50%)); }
input[type=range]::-moz-range-track { height: 4px; border-radius: 4px; background: #2a2a3b; }
input[type=range]::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--accent); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #fff; margin-top: -6px; box-shadow: 0 2px 6px rgba(0, 0, 0, .5); }
input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: #fff; }

/* ---------- Topbar */
.topbar { height: 56px; display: flex; align-items: center; gap: 12px; padding: 0 18px; border-bottom: 1px solid var(--line); background: rgba(10, 10, 15, .85); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 50; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; letter-spacing: -.02em; cursor: pointer; }
.brand img { width: 28px; height: 28px; }
.crumb { color: var(--muted); display: flex; align-items: center; gap: 8px; min-width: 0; }
.crumb svg { width: 18px; height: 18px; flex: none; }
.crumb:hover { color: var(--text); }
.crumb b { color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 32vw; }
.tabs-top { display: flex; gap: 4px; margin-left: 12px; }
.tabs-top a { padding: 7px 12px; border-radius: 8px; color: var(--muted); font-weight: 600; }
.tabs-top a.on { color: var(--text); background: var(--panel-2); }
.save-state { font-size: 12px; color: var(--dim); }

/* ---------- Login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(1000px 600px at 20% 0%, rgba(255, 61, 110, .14), transparent 60%), radial-gradient(900px 600px at 100% 100%, rgba(47, 211, 255, .12), transparent 60%); }
.login-card { width: min(400px, 100%); padding: 32px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); }
.login-card h1 { font-size: 28px; margin: 18px 0 6px; }
.login-card form { display: flex; flex-direction: column; gap: 14px; margin-top: 22px; }
.err { color: #ff7d97; font-size: 13px; min-height: 18px; }

/* ---------- Reiseliste */
.page { max-width: 1240px; margin: 0 auto; padding: 32px 24px 80px; }
.hero { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.hero h1 { font-size: 34px; letter-spacing: -.03em; }
.trip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.trip-card { position: relative; border-radius: 16px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); cursor: pointer; transition: transform .2s, border-color .2s, box-shadow .2s; aspect-ratio: 4 / 3.2; display: flex; flex-direction: column; justify-content: flex-end; }
.trip-card:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: var(--shadow); }
.trip-card .cover { position: absolute; inset: 0; background: #1a1a26 center / cover no-repeat; }
.trip-card .cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, .85)); }
.trip-card .info { position: relative; padding: 16px; }
.trip-card h3 { font-size: 19px; }
.trip-card .meta { color: #c9c9da; font-size: 12.5px; margin-top: 4px; }
.trip-card.new { align-items: center; justify-content: center; border-style: dashed; background: transparent; color: var(--muted); gap: 10px; }
.trip-card.new:hover { color: var(--text); border-color: var(--accent-2); }
.trip-card.new .plus { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; font-size: 30px; font-weight: 300; }
.empty { padding: 60px 20px; text-align: center; color: var(--muted); }

/* ---------- Editor */
.editor { display: grid; grid-template-columns: 380px 1fr; height: calc(100vh - 56px); }
.editor .side { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: var(--bg-2); }
.editor .side-head { padding: 18px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.title-input { font-size: 22px; font-weight: 800; letter-spacing: -.02em; background: transparent; border: 0; outline: none; width: 100%; padding: 0; }
.sub-input { background: transparent; border: 0; outline: none; width: 100%; padding: 0; color: var(--muted); }
.step-list { flex: 1; overflow-y: auto; padding: 10px 10px 30px; }
.step-item { position: relative; display: flex; gap: 12px; padding: 10px 10px 10px 34px; border-radius: 12px; cursor: pointer; }
.step-item::before { content: ''; position: absolute; left: 16px; top: 0; bottom: 0; width: 2px; background: var(--line-2); }
.step-item:first-child::before { top: 22px; }
.step-item:last-child::before { bottom: calc(100% - 22px); }
.step-item .dot { position: absolute; left: 10px; top: 16px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg-2); border: 3px solid var(--accent); }
.step-item:hover { background: var(--panel); }
.step-item.on { background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.step-item .thumb { width: 52px; height: 52px; border-radius: 10px; background: #222232 center / cover; flex: none; }
.step-item .t { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step-item .d { font-size: 12px; color: var(--muted); }
.step-item .warn { font-size: 11.5px; color: var(--warn); }
.side-foot { padding: 12px; border-top: 1px solid var(--line); display: flex; gap: 8px; flex-wrap: wrap; }

.map-area { position: relative; min-height: 0; }
#edit-map { position: absolute; inset: 0; background: #0d0d14; }
.step-panel { position: absolute; top: 16px; right: 16px; bottom: 16px; width: min(460px, calc(100% - 32px)); background: rgba(20, 20, 29, .97); border: 1px solid var(--line-2); border-radius: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; z-index: 500; backdrop-filter: blur(10px); }
.step-panel .sp-head { padding: 16px 18px 10px; display: flex; align-items: center; gap: 8px; }
.step-panel .sp-body { flex: 1; overflow-y: auto; padding: 4px 18px 18px; display: flex; flex-direction: column; gap: 14px; }
.geo-results { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.geo-results button { text-align: left; padding: 8px 12px; border: 0; background: var(--bg-2); cursor: pointer; border-bottom: 1px solid var(--line); }
.geo-results button:hover { background: var(--panel-2); }
.geo-results small { color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.photo { position: relative; aspect-ratio: 1; border-radius: 10px; background: #222232 center / cover; overflow: hidden; cursor: grab; border: 2px solid transparent; }
.photo.dragging { opacity: .4; }
.photo.drop { border-color: var(--accent-3); }
.photo .ph-actions { position: absolute; top: 4px; right: 4px; display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.photo:hover .ph-actions { opacity: 1; }
.photo .ph-actions button { width: 26px; height: 26px; border-radius: 8px; border: 0; background: rgba(0, 0, 0, .7); color: #fff; cursor: pointer; display: grid; place-items: center; }
.photo .ph-actions svg { width: 14px; height: 14px; }
.photo .badge { position: absolute; left: 4px; bottom: 4px; background: rgba(0, 0, 0, .7); padding: 1px 6px; border-radius: 6px; font-size: 10.5px; font-weight: 700; }
.photo.uploading::after { content: attr(data-p); position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .55); font-weight: 700; }
.dropzone { border: 2px dashed var(--line-2); border-radius: 12px; padding: 18px; text-align: center; color: var(--muted); cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--accent-2); background: rgba(166, 77, 255, .06); color: var(--text); }
.map-hint { position: absolute; left: 50%; top: 16px; transform: translateX(-50%); z-index: 600; background: rgba(20, 20, 29, .95); border: 1px solid var(--line-2); padding: 8px 14px; border-radius: 10px; font-weight: 600; }

/* Leaflet-Marker */
.pin { width: 44px; height: 44px; border-radius: 50%; border: 3px solid #fff; background: #333 center / cover; box-shadow: 0 4px 14px rgba(0, 0, 0, .5); transition: transform .15s; }
.pin.on { transform: scale(1.25); border-color: var(--accent); }
.pin .num { position: absolute; right: -6px; top: -6px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 800; min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px; }
.leaflet-container { font-family: var(--font); background: #0d0d14; }
.leaflet-bar a { background: var(--panel-2) !important; color: var(--text) !important; border-color: var(--line) !important; }
.leaflet-control-attribution { background: rgba(10, 10, 15, .7) !important; color: var(--muted) !important; }
.leaflet-control-attribution a { color: var(--muted) !important; }

/* ---------- Studio */
.studio { display: grid; grid-template-columns: 1fr 380px; grid-template-rows: 1fr auto; height: calc(100vh - 56px); }
.stage { position: relative; display: flex; flex-direction: column; min-height: 0; min-width: 0; background: radial-gradient(800px 500px at 50% 40%, #15151f, var(--bg)); }
.stage-inner { flex: 1; min-height: 0; display: grid; place-items: center; padding: 20px; }
.canvas-box { position: relative; box-shadow: 0 20px 70px rgba(0, 0, 0, .7); border-radius: 6px; overflow: hidden; background: #000; }
.canvas-box canvas { display: block; width: 100%; height: 100%; }
.canvas-box .overlay-msg { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .6); text-align: center; padding: 20px; }
.transport { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--line); background: var(--bg-2); }
.time { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 110px; }
.play-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--grad); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 6px 20px rgba(255, 61, 110, .3); }
.play-btn svg { width: 20px; height: 20px; }
.bpm-chip { padding: 4px 10px; border-radius: 20px; background: var(--panel-2); border: 1px solid var(--line-2); font-weight: 700; font-size: 12px; font-variant-numeric: tabular-nums; }
.beat-led { width: 12px; height: 12px; border-radius: 50%; background: #2a2a3b; transition: background .05s; }
.beat-led.on { background: var(--accent); box-shadow: 0 0 12px var(--accent); }

.panel { border-left: 1px solid var(--line); background: var(--bg-2); display: flex; flex-direction: column; min-height: 0; grid-row: 1 / span 2; grid-column: 2; }
.panel-tabs { display: flex; gap: 2px; padding: 10px 10px 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
.panel-tabs button { border: 0; background: transparent; padding: 9px 10px 11px; color: var(--muted); font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; font-size: 13px; }
.panel-tabs button.on { color: var(--text); border-bottom-color: var(--accent); }
.panel-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 18px; }
.group { display: flex; flex-direction: column; gap: 10px; }
.group > h4 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.ctl { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 10px; }
.ctl > .lbl { font-weight: 500; }
.ctl > .val { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ctl > input[type=range], .ctl > .seg, .ctl > select { grid-column: 1 / -1; }
.fx-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 10px; background: var(--panel); }
.fx-card.off > :not(.fx-head) { display: none; }
.fx-head { display: flex; align-items: center; gap: 10px; }
.fx-head .ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--panel-2); font-size: 15px; }
.fx-head b { flex: 1; }
.preset-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.preset { border: 1px solid var(--line); border-radius: 12px; padding: 10px; cursor: pointer; background: var(--panel); text-align: left; display: flex; flex-direction: column; gap: 6px; transition: border-color .15s; }
.preset:hover { border-color: var(--line-2); }
.preset.on { border-color: var(--accent); }
.preset .sw { height: 42px; border-radius: 8px; }
.preset b { font-size: 13px; }
.preset small { color: var(--muted); font-size: 11.5px; line-height: 1.3; }
.look-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.look { border: 2px solid transparent; border-radius: 10px; overflow: hidden; cursor: pointer; background: var(--panel); padding: 0; }
.look.on { border-color: var(--accent); }
.look canvas { display: block; width: 100%; aspect-ratio: 4/3; }
.look span { display: block; font-size: 11.5px; font-weight: 600; padding: 5px 4px; }
.info-box { padding: 12px; border-radius: 12px; background: rgba(47, 211, 255, .07); border: 1px solid rgba(47, 211, 255, .25); font-size: 13px; color: #cfeffa; }
.info-box.warn { background: rgba(255, 179, 71, .08); border-color: rgba(255, 179, 71, .3); color: #ffe3bd; }
.video-item { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); }
.video-item .vi { flex: 1; min-width: 0; }
.video-item .vi b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.progress { height: 8px; border-radius: 8px; background: #2a2a3b; overflow: hidden; }
.progress > div { height: 100%; width: 0; background: var(--grad); transition: width .2s; }
.music-card { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.music-card .disc { width: 44px; height: 44px; border-radius: 50%; background: conic-gradient(from 0deg, #ff3d6e, #a64dff, #2fd3ff, #ff3d6e); display: grid; place-items: center; flex: none; }
.music-card .disc::after { content: ''; width: 12px; height: 12px; background: var(--bg); border-radius: 50%; }

/* Zeitleiste */
.timeline { grid-column: 1; border-top: 1px solid var(--line); background: var(--bg-2); display: flex; flex-direction: column; }
.tl-tools { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tl-tools .sep { width: 1px; height: 20px; background: var(--line-2); margin: 0 4px; }
.tl-canvas-wrap { position: relative; height: 150px; }
.tl-canvas-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: pointer; }
.tl-help { font-size: 11.5px; color: var(--dim); }

/* ---------- Modal & Toast */
.modal-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); display: grid; place-items: center; z-index: 2000; padding: 20px; backdrop-filter: blur(4px); }
.modal { width: min(520px, 100%); max-height: 90vh; overflow-y: auto; background: var(--panel); border: 1px solid var(--line-2); border-radius: 18px; padding: 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px; }
.modal h3 { font-size: 20px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
#toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 3000; align-items: center; pointer-events: none; }
.toast { background: #1f1f2c; border: 1px solid var(--line-2); padding: 10px 16px; border-radius: 12px; box-shadow: var(--shadow); font-weight: 600; animation: tin .25s ease; pointer-events: auto; }
.toast.err { border-color: #ff3d6e; }
.toast.ok { border-color: var(--ok); }
@keyframes tin { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Share-Seite */
.share-page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 28px 16px 60px; gap: 22px; background: radial-gradient(1000px 600px at 50% -10%, rgba(166, 77, 255, .16), transparent 60%), var(--bg); }
.share-page header { text-align: center; }
.share-page h1 { font-size: clamp(26px, 5vw, 44px); letter-spacing: -.03em; }
.share-stage { width: min(1100px, 100%); position: relative; }
.share-stage .canvas-box { width: 100%; }
.share-play { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .35); cursor: pointer; border: 0; width: 100%; }
.share-play span { width: 86px; height: 86px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; box-shadow: 0 10px 40px rgba(255, 61, 110, .45); }
.share-play svg { width: 36px; height: 36px; margin-left: 4px; }

@media (max-width: 1000px) {
  .editor { grid-template-columns: 1fr; grid-template-rows: 45vh 1fr; height: auto; }
  .editor .side { order: 2; border-right: 0; }
  .map-area { height: 45vh; }
  .step-panel { position: fixed; inset: 10px; width: auto; }
  .studio { grid-template-columns: 1fr; grid-template-rows: auto auto auto; height: auto; }
  .panel { grid-row: auto; grid-column: 1; border-left: 0; }
  .stage-inner { height: 56vh; }
  .timeline { grid-column: 1; }
}

/* SYNVYRO: Versionsnummer und Warteschlangen-Zähler */
.brand .version { font-size: 11px; font-weight: 600; color: var(--muted, #8a8aa0); margin-left: 8px; letter-spacing: .02em; align-self: center; }
.queue-count { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 6px; border-radius: 9px; background: var(--grad); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.queue-count.hidden { display: none; }
.login-card .version { font-size: 11px; opacity: .55; text-align: center; }
.video-item > svg { width: 20px; height: 20px; flex: none; }
/* Veranstaltung: Editor ohne Karte */
#edit-map.no-map { display: grid; place-items: center; background: radial-gradient(ellipse at 30% 20%, #2a1035 0%, transparent 55%), radial-gradient(ellipse at 80% 90%, #10223a 0%, transparent 55%), #0d0d14; }
.no-map-hint { display: flex; flex-direction: column; gap: 6px; max-width: 320px; text-align: center; color: var(--muted); font-size: 13px; }
.no-map-hint b { color: var(--text); font-size: 15px; }

/* Statistik */
.stat-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat-tile { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; display: flex; flex-direction: column; gap: 2px; }
.stat-tile b { font-size: 34px; letter-spacing: -.03em; line-height: 1.1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.stat-tile span { font-weight: 600; }
.stat-tile small { color: var(--muted); font-size: 12px; }
.stat-countries { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.stat-countries .chip { padding: 3px 10px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font-size: 12.5px; color: #d5d5e4; }
.stat-head { margin: 30px 0 10px; font-size: 17px; }
.stat-table { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.stat-row { display: grid; grid-template-columns: minmax(0, 1fr) repeat(4, 96px); align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line); color: inherit; text-decoration: none; font-variant-numeric: tabular-nums; }
.stat-row > span:not(:first-child) { text-align: right; }
.stat-row.head { border-top: 0; background: var(--bg-2); color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
a.stat-row:hover { background: rgba(255, 255, 255, .03); }
.stat-row.sum { background: var(--bg-2); font-weight: 700; }
.stat-trip { display: flex; align-items: center; gap: 12px; min-width: 0; }
.stat-trip .thumb { width: 48px; height: 36px; border-radius: 8px; flex: none; background: linear-gradient(135deg, #2a1530, #10223a) center / cover no-repeat; }
.stat-trip .tt { display: flex; flex-direction: column; min-width: 0; }
.stat-trip .tt b, .stat-trip .tt small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 760px) {
  .stat-tiles { grid-template-columns: repeat(2, 1fr); }
  .stat-row { grid-template-columns: repeat(4, 1fr); }
  .stat-row > span:first-child { grid-column: 1 / -1; }
  .stat-row > span:not(:first-child) { text-align: left; }
  .stat-row > span[data-l]::before { content: attr(data-l); display: block; color: var(--muted); font-size: 11px; font-weight: 500; }
  .stat-row.head { display: none; }
}

.dropzone svg { width: 28px; height: 28px; display: block; margin: 0 auto 6px; }

/* schmale Bildschirme: Kopfzeile darf umbrechen statt die Seite zu verbreitern */
@media (max-width: 760px) {
  .topbar { height: auto; min-height: 56px; flex-wrap: wrap; row-gap: 6px; padding: 8px 16px; }
  .topbar .brand .version { display: none; }
  .tabs-top { margin-left: 0; }
  .page { padding: 24px 16px 64px; }
}

/* Sicherheitsbereich über der Vorschau */
.safe-zone { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.safe-zone.hidden { display: none; }
.safe-zone > div { position: absolute; background: rgba(255, 61, 110, .18); }
.safe-zone .sz-top { top: 0; left: 0; right: 0; }
.safe-zone .sz-bottom { bottom: 0; left: 0; right: 0; }
.safe-zone .sz-left { left: 0; }
.safe-zone .sz-right { right: 0; }
.safe-zone .sz-frame { background: none; border: 1px dashed rgba(255, 255, 255, .75); }
.safe-zone .sz-frame span { position: absolute; left: 6px; top: 4px; font-size: 10.5px; font-weight: 600; color: #fff; text-shadow: 0 1px 3px #000; }

/* Benutzerverwaltung */
.user-row { align-items: flex-start; flex-wrap: wrap; }
.user-row .chip { padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); }
.user-row .chip.on { background: var(--grad); color: #fff; border-color: transparent; }
.user-row .chip.warn { color: #ffb84d; border-color: rgba(255, 184, 77, .5); }
.user-actions { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 760px) { .user-actions { width: 100%; justify-content: flex-start; } }

/* Dialog „Ausschnitt“ */
.modal:has(.crop-dialog) { width: min(640px, calc(100vw - 24px)); }
.crop-stage { position: relative; overflow: hidden; border-radius: 8px; margin: 0 auto; touch-action: none; user-select: none; background: #000; }
.crop-rect { position: absolute; border: 2px solid #fff; border-radius: 2px; z-index: 1; }
.crop-shade { position: absolute; background: rgba(0, 0, 0, .6); pointer-events: none; }
.crop-rect.whole { border-style: dashed; }
.crop-face { position: absolute; border: 2px solid #4ade80; border-radius: 4px; pointer-events: none; }
.photo .badge.crop-badge { left: auto; right: 4px; }
