/* VenueHub – nüchternes Technik-Design */
:root {
  --bg: #111214;
  --bg2: #0c0d0e;
  --surface: #17181b;
  --surface2: #1e2023;
  --surface3: #26282c;
  --border: #2a2c30;
  --border2: #383b40;
  --text: #e4e2dd;
  --muted: #8d8b86;
  --faint: #5f5e5a;
  --gold: #cf9f33;
  --gold-hover: #ddb04a;
  --gold-light: #e2bb5e;
  --gold-dark: #8a6a20;
  --gold-bg: rgba(207, 159, 51, .1);
  --ink: #15110a;
  --danger: #d9584d;
  --video: #7aa7d9;
  --audio: #8fbf7a;
  --radius: 4px;
  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--gold-light); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .5em; font-weight: 600; letter-spacing: 0; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.1rem; }
h3 { font-size: 1rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.mono { font-family: var(--mono); }
.hidden { display: none !important; }

/* Kleine Großbuchstaben-Labels (Datenblatt-Stil) */
.label, label.field > span, .kv dt, .item-card .props dt, .tbl th, .calc-box .lbl, .quick-stat .l {
  font-size: .7rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted);
}

/* ---------- Header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 16px;
  height: 56px; padding: 0 20px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-size: 1.12rem; font-weight: 700; letter-spacing: -.01em; }
.brand-name span { color: inherit; }
.brand-by { white-space: nowrap; font-family: var(--mono); font-size: .66rem; color: var(--gold); letter-spacing: .02em; }
.topbar .spacer { flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: 4px; }
.lang-switch { display: flex; border: 1px solid var(--border2); border-radius: var(--radius); overflow: hidden; }
.lang-switch button { background: none; border: 0; color: var(--muted); padding: 4px 9px; cursor: pointer; font: 600 .74rem var(--mono); }
.lang-switch button + button { border-left: 1px solid var(--border2); }
.lang-switch button.active { background: var(--surface3); color: var(--text); }

/* ---------- Layout ---------- */
main { max-width: 1240px; margin: 0 auto; padding: 22px 20px 80px; }
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { margin: 0; }
.page-head .spacer { flex: 1; }
.breadcrumb { font-size: .85rem; margin-bottom: 10px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--text); }

/* ---------- Buttons / Inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 13px; border-radius: var(--radius);
  border: 1px solid var(--border2);
  background: var(--surface2); color: var(--text);
  font: inherit; font-size: .88rem; font-weight: 500;
  cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--surface3); text-decoration: none; }
.btn.primary { background: var(--gold); border-color: var(--gold); color: var(--ink); font-weight: 600; }
.btn.primary:hover { background: var(--gold-hover); border-color: var(--gold-hover); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--surface2); color: var(--text); }
.btn.danger { color: var(--danger); }
.btn.danger:hover { border-color: var(--danger); }
.btn.sm { padding: 4px 9px; font-size: .8rem; }
.btn.icon { padding: 6px; width: 32px; height: 32px; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

input, select, textarea {
  width: 100%;
  background: var(--bg2); color: var(--text);
  border: 1px solid var(--border2); border-radius: var(--radius);
  padding: 8px 10px; font: inherit; font-size: .92rem;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); }
textarea { min-height: 90px; resize: vertical; }
input[type="checkbox"] { width: auto; accent-color: var(--gold); }
input.pin { font-family: var(--mono); font-size: 1.15rem; letter-spacing: .5em; max-width: 9.5em; }
label.field { display: block; }
label.field > span { display: block; margin-bottom: 5px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.card + .card { margin-top: 14px; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-head h2, .card-head h3 { margin: 0; white-space: nowrap; }
.card-head .spacer { flex: 1; }

/* ---------- Badges (eckige Tags) ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 1px 6px; border-radius: 2px;
  font: 600 .68rem/1.5 var(--mono); letter-spacing: .03em; text-transform: uppercase;
  background: var(--surface3); color: var(--text); border: 0;
}
.badge.plain { background: var(--surface2); color: var(--muted); }
.badge.video { background: transparent; color: var(--video); padding: 0; }
.badge.audio { background: transparent; color: var(--audio); padding: 0; }

/* ---------- Venue-Liste ---------- */
.filters { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 8px; margin-bottom: 18px; }
.search-wrap { position: relative; }
.search-wrap svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--faint); }
.search-wrap input { padding-left: 32px; }
.venue-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.venue-card {
  display: block; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.venue-card:hover { border-color: var(--border2); text-decoration: none; }
.venue-card:hover h3 { color: var(--gold-light); }
.venue-card .cover { aspect-ratio: 16/8; background: var(--surface2) center/cover no-repeat; position: relative; border-bottom: 1px solid var(--border); }
.venue-card .cover.empty svg { display: none; }
.venue-card .badge-type { position: absolute; left: 8px; top: 8px; background: rgba(12,13,14,.85); }
.venue-card .body { padding: 11px 13px 12px; }
.venue-card h3 { margin: 0 0 1px; }
.venue-card .stats { display: flex; gap: 14px; margin-top: 9px; color: var(--muted); font: .76rem var(--mono); }
.venue-card .stats span { display: inline-flex; align-items: center; gap: 5px; }
.venue-card .stats svg { width: 13px; height: 13px; }
.empty-state { padding: 40px 0; color: var(--muted); }
.empty-state svg { display: none; }
.empty-state p { margin: 0 0 12px; }

/* ---------- Venue-Detail ---------- */
.venue-hero { display: grid; grid-template-columns: 240px 1fr; gap: 20px; align-items: start; margin-bottom: 16px; }
.venue-hero .cover { aspect-ratio: 16/10; border-radius: var(--radius); background: var(--surface2) center/cover no-repeat; border: 1px solid var(--border); }
.venue-hero h1 { margin-bottom: 2px; }
.venue-hero .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.venue-hero .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.tabs {
  display: flex; overflow-x: auto; scrollbar-width: none;
  border-bottom: 1px solid var(--border); margin-bottom: 18px;
  position: sticky; top: 56px; z-index: 20; background: var(--bg);
}
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px;
  color: var(--muted); padding: 11px 12px; font: inherit; font-size: .87rem; font-weight: 500;
  cursor: pointer; white-space: nowrap;
}
.tabs button svg { display: none; }
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--text); border-bottom-color: var(--gold); }
.tabs .count { font: .72rem var(--mono); color: var(--faint); }
.tabs button.active .count { color: var(--gold); }

.section-intro { color: var(--muted); margin: -4px 0 14px; font-size: .88rem; }
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.item-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; }
.item-card .head { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--border); }
.item-card .num {
  flex: none; padding: 2px 7px; border-radius: 2px;
  background: var(--gold); color: var(--ink);
  font: 700 .74rem/1.5 var(--mono); text-transform: uppercase; letter-spacing: .02em;
}
.item-card .num svg { width: 14px; height: 14px; display: block; margin: 1px -2px; }
.item-card .num:has(svg) { background: var(--surface3); color: var(--muted); }
.item-card .head h3 { margin: 0; flex: 1; font-size: .98rem; line-height: 1.3; }
.item-card .props { padding: 10px 14px 4px; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 9px 16px; font-size: .9rem; }
.item-card .props .prop { min-width: 0; }
.item-card .props dt { margin-bottom: 1px; }
.item-card .props dd { margin: 0; white-space: pre-wrap; word-break: break-word; }
.item-card .notes { padding: 8px 14px 4px; font-size: .88rem; white-space: pre-wrap; }
.item-card .notes .muted.small { font-size: .7rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; }
.item-card .foot { margin-top: auto; padding: 8px 14px; display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--border); font-size: .74rem; color: var(--faint); }
.item-card .foot .spacer { flex: 1; }
.item-card .props + .thumbs, .item-card .notes + .thumbs { padding-top: 8px; }

.secret { display: inline-flex; align-items: center; gap: 8px; }
.secret .val { font-family: var(--mono); background: var(--bg2); border: 1px solid var(--border2); padding: 0 7px; border-radius: 2px; letter-spacing: .08em; }
.secret button { background: none; border: 0; color: var(--gold); cursor: pointer; font: inherit; font-size: .78rem; padding: 0; }

/* ---------- Fotos ---------- */
.thumbs { display: flex; gap: 6px; padding: 6px 14px 12px; flex-wrap: wrap; }
.thumbs img, .thumb-btn { width: 60px; height: 60px; object-fit: cover; border-radius: 2px; border: 1px solid var(--border2); cursor: zoom-in; background: var(--surface2); font: .8rem var(--mono); color: var(--muted); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.photo-tile { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--surface2); }
.photo-tile img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; cursor: zoom-in; }
.photo-tile .cap { padding: 5px 8px; font-size: .78rem; color: var(--muted); min-height: 28px; }
.photo-tile .step { position: absolute; left: 0; top: 0; background: var(--gold); color: var(--ink); font: 700 .78rem/1 var(--mono); padding: 5px 7px; }
.photo-tile .tools { position: absolute; right: 4px; top: 4px; display: flex; gap: 3px; opacity: 0; }
.photo-tile:hover .tools, .photo-tile:focus-within .tools { opacity: 1; }
.photo-tile .tools button { background: rgba(12,13,14,.88); border: 1px solid var(--border2); color: var(--text); border-radius: 2px; width: 28px; height: 28px; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.photo-tile .tools button svg { width: 14px; height: 14px; }
.photo-tile .cover-flag { position: absolute; left: 0; bottom: 28px; border-radius: 0; background: var(--gold); color: var(--ink); }
.dropzone {
  display: block; border: 1px dashed var(--border2); border-radius: var(--radius); padding: 14px; text-align: center; color: var(--muted);
  cursor: pointer; font-size: .86rem;
}
.dropzone:hover, .dropzone.over { border-color: var(--gold); color: var(--text); }
.dropzone svg { width: 18px; height: 18px; vertical-align: -4px; margin-right: 6px; }
.upload-progress { font: .8rem var(--mono); color: var(--gold); margin-top: 6px; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; background: #000; z-index: 200; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 110px); object-fit: contain; }
.lightbox .cap { color: var(--text); margin-top: 12px; text-align: center; max-width: 800px; font-size: .9rem; }
.lightbox .nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(30,30,30,.8); border: 1px solid var(--border2); color: #fff; width: 44px; height: 44px; border-radius: var(--radius); cursor: pointer; font-size: 22px; }
.lightbox .prev { left: 16px; }
.lightbox .next { right: 16px; }
.lightbox .close { position: absolute; top: 12px; right: 14px; background: none; border: 0; color: #fff; font-size: 26px; cursor: pointer; }

/* ---------- Modal ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; }
.modal { background: var(--surface); border: 1px solid var(--border2); border-radius: var(--radius); width: 100%; max-width: 700px; }
.modal.sm { max-width: 430px; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.modal-head h2 { margin: 0; font-size: 1rem; flex: 1; }
.modal-body { padding: 18px; }
.modal-body h3 { font-size: .7rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 18px; border-top: 1px solid var(--border); }
.modal-foot .left { margin-right: auto; }

/* ---------- Tabellen ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: .88rem; }
.tbl th { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--border2); }
.tbl td { padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl .num { text-align: right; font-family: var(--mono); }
.tbl tfoot td { font-weight: 600; border-bottom: 0; border-top: 1px solid var(--border2); }

/* ---------- Kabel-Rechner ---------- */
.calc-summary { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1px; margin-top: 14px; background: var(--border); border: 1px solid var(--border); }
.calc-box { background: var(--surface); padding: 9px 12px; }
.calc-box .val { font: 600 1.2rem var(--mono); color: var(--text); }
.calc-box.total { background: var(--surface2); }
.calc-box.total .val { color: var(--gold); }
.inline-input { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.inline-input input { width: 70px; font-family: var(--mono); }

/* ---------- Dokumente ---------- */
.doc-list { display: flex; flex-direction: column; }
.doc-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.doc-row:first-child { border-top: 0; padding-top: 0; }
.doc-ic { flex: none; width: 44px; height: 28px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border2); border-radius: 2px; }
.doc-ic svg { display: none; }
.doc-ic span { font: 700 .66rem var(--mono); color: var(--gold); }
.doc-main { flex: 1; min-width: 0; }
.doc-name { font-weight: 500; word-break: break-word; }
.doc-act { display: flex; gap: 6px; flex: none; }

/* ---------- Kommentare ---------- */
.comment-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.comment-col { border-top: 2px solid var(--border2); }
.comment-col.video { border-top-color: var(--video); }
.comment-col.audio { border-top-color: var(--audio); }
.comment-col h3 { display: flex; align-items: center; gap: 8px; }
.comment-col h3 svg { width: 17px; height: 17px; }
.comment-col.video h3 svg { color: var(--video); }
.comment-col.audio h3 svg { color: var(--audio); }
.comment-col h3 .badge { font-size: .75rem; color: var(--muted); }
.comment-form textarea { min-height: 64px; }
.comment-form .row { display: flex; justify-content: flex-end; margin-top: 8px; }
.comment-list { margin-top: 12px; display: flex; flex-direction: column; }
.comment { padding: 10px 0; border-top: 1px solid var(--border); }
.comment .meta { display: flex; align-items: center; gap: 8px; font-size: .76rem; color: var(--muted); margin-bottom: 3px; }
.comment .meta strong { color: var(--text); font-weight: 600; }
.comment .meta .spacer { flex: 1; }
.comment .meta .btn { padding: 2px; min-height: 0; }
.comment .text { white-space: pre-wrap; word-break: break-word; font-size: .92rem; }

/* ---------- Übersicht ---------- */
/* Infos-Feld und Karte nebeneinander, gleich hoch */
.overview-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 14px; align-items: stretch; }
.overview-grid.no-map { grid-template-columns: 1fr; }
.overview-grid > .card { margin-top: 0; min-width: 0; display: flex; flex-direction: column; }
.overview-grid + .card { margin-top: 14px; }
.ov-map .map { flex: 1; min-height: 280px; height: auto; }
.ov-contacts { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.ov-contacts .card-head { margin-bottom: 8px; }
.updated-note { margin-top: auto; padding-top: 14px; font-size: .7rem; color: var(--faint); }
.contact-list { display: flex; flex-direction: column; }
.contact-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); }
.contact-row:first-child { border-top: 0; padding-top: 0; }
.contact-main { flex: 1; min-width: 0; }
.contact-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.contact-links .btn { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 8px 14px; font-size: .92rem; margin: 0; }
.kv dt { padding-top: 3px; }
.kv dd { margin: 0; word-break: break-word; white-space: pre-wrap; }
.map { width: 100%; height: 280px; border: 0; border-radius: 2px; background: var(--surface2); filter: grayscale(.6) invert(.9) hue-rotate(180deg) brightness(.9) contrast(.9); }
.quick-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); }
.quick-stat { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; background: var(--surface); border: 0; padding: 9px 12px; cursor: pointer; text-align: left; color: var(--text); font: inherit; }
.quick-stat:hover { background: var(--surface2); }
.quick-stat .n { order: 2; font: 600 .9rem var(--mono); color: var(--muted); }
.quick-stat .l { order: 1; font-size: .86rem; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--text); }
.overview-stats.card { padding: 0; border: 0; background: none; }

/* ---------- Karten ---------- */
.map, .mini-map, .map-canvas, .map-full, .r-map { background: var(--surface2); border-radius: 2px; position: relative; z-index: 0; }
.map { height: 280px; cursor: zoom-in; filter: none; }
.mini-map { height: 180px; margin: 12px 14px 0; cursor: zoom-in; border: 1px solid var(--border); }
.map-canvas { height: 380px; border: 1px solid var(--border2); }
.map-canvas.drawing, .map-canvas.drawing .leaflet-interactive { cursor: crosshair; }
.map-full { height: 70vh; }
.r-map { height: 220px; margin: 6px 0; border: 1px solid #ddd; }
.map-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.map-tools .label { margin-right: 2px; }
.map-hint { margin-top: 6px; min-height: 1.2em; }
.map-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.item-card .map-links { padding: 0 14px; }
.leaflet-container { font: inherit; font-size: .8rem; background: #222; }
.leaflet-control-layers input { width: auto; }
.leaflet-bar a, .leaflet-control-layers { background: var(--surface2) !important; color: var(--text) !important; border-color: var(--border2) !important; }
.leaflet-control-layers-expanded { padding: 6px 10px; }
.leaflet-control-layers label { color: var(--text); }
.leaflet-control-attribution { background: rgba(12,13,14,.7) !important; color: #aaa !important; font-size: 9px; }
.leaflet-control-attribution a { color: #ccc !important; }
.vh-arrow { width: 0; height: 0; margin: 4px; border-top: 8px solid transparent; border-bottom: 8px solid transparent; border-left: 16px solid #f2c14e; filter: drop-shadow(0 0 2px #000); transform-origin: 8px 8px; }
.vh-pin div { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 4px solid var(--gold); box-shadow: 0 0 0 2px #000; }
.vh-label span, .vh-veh { display: inline-block; white-space: nowrap; background: rgba(12,13,14,.88); color: #fff; font: 600 11px/1.3 var(--mono); padding: 2px 6px; border-left: 3px solid #f2c14e; }
.vh-veh { transform: translate(-50%, -50%); background: #f2c14e; color: #15110a; border: 1px solid #000; text-transform: uppercase; padding: 4px 7px; box-shadow: 0 1px 4px rgba(0,0,0,.6); cursor: grab; }
.veh-tools .btn.primary { color: var(--ink); }

/* ---------- Titelbild im Venue-Formular ---------- */
.cover-pick { display: flex; gap: 14px; align-items: center; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.cover-prev { flex: none; width: 150px; aspect-ratio: 16/10; border-radius: 2px; border: 1px solid var(--border2); background: var(--surface2) center/cover no-repeat; display: flex; align-items: center; justify-content: center; color: var(--faint); }
.cover-prev svg { width: 28px; height: 28px; }
.cover-side { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.cover-btns { display: flex; flex-wrap: wrap; gap: 6px; }
#coverInfo { word-break: break-word; }

/* ---------- Foto-Vorschläge ---------- */
.img-cands { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.img-cand { display: flex; flex-direction: column; gap: 4px; padding: 0 0 10px; text-align: left; background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); font: inherit; cursor: pointer; overflow: hidden; }
.img-cand:hover { border-color: var(--gold); }
.img-cand:disabled { opacity: .5; cursor: wait; }
.img-cand.busy { opacity: 1; border-color: var(--gold); }
.img-cand img { width: 100%; aspect-ratio: 4/3; object-fit: cover; background: var(--surface3); }
.img-cand .t { padding: 2px 10px 0; font-weight: 600; font-size: .88rem; }
.img-cand .c { padding: 0 10px; font-size: .74rem; color: var(--muted); }
.img-cand .btn { margin: 4px 10px 0; align-self: flex-start; }

/* ---------- Login ---------- */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.auth-card { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 24px; }
.auth-card .brand { margin-bottom: 26px; }
.auth-card .brand img { width: 38px; height: 38px; }
.auth-card .brand-name { font-size: 1.4rem; }
.auth-card form { display: flex; flex-direction: column; gap: 14px; }
.auth-card form .btn { margin-top: 4px; padding: 10px; }
.auth-card .lang-switch { margin: 20px 0 0; width: max-content; }
.error-msg { background: rgba(217,88,77,.1); border-left: 2px solid var(--danger); color: #eea69f; padding: 8px 12px; font-size: .86rem; }

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; right: 16px; bottom: 16px; z-index: 300; display: flex; flex-direction: column; gap: 6px; }
.toast { background: var(--surface3); border: 1px solid var(--border2); border-left: 2px solid var(--gold); padding: 9px 14px; border-radius: 2px; font-size: .87rem; max-width: 340px; }
.toast.error { border-left-color: var(--danger); }

.loading { display: flex; justify-content: center; padding: 60px; }
.spinner { width: 22px; height: 22px; border: 2px solid var(--border2); border-top-color: var(--gold); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Report (PDF) ---------- */
.report { background: #fff; color: #1b1b1b; max-width: 900px; margin: 0 auto; padding: 36px 40px; font-size: 13px; }
.report a { color: #6b5212; }
.report h1 { font-size: 22px; margin: 0; }
.report h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; border-bottom: 1px solid #1b1b1b; padding-bottom: 3px; margin: 24px 0 10px; page-break-after: avoid; }
.report .r-head { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid #ccc; padding-bottom: 12px; margin-bottom: 14px; }
.report .r-head img { width: 28px; height: 28px; }
.report .r-head .spacer { flex: 1; }
.report .r-brand { font-weight: 700; font-size: 15px; line-height: 1.1; }
.report .r-brand small { display: block; font: 500 9px var(--mono); color: #8a6a20; }
.report .r-item { border-top: 1px solid #e2e2e2; padding: 8px 0; page-break-inside: avoid; }
.report .r-item h3 { font-size: 13px; margin: 0 0 4px; }
.report .r-item dl { display: grid; grid-template-columns: 160px 1fr; gap: 2px 10px; margin: 0; }
.report .r-item dt { color: #666; }
.report .r-item dd { margin: 0; white-space: pre-wrap; }
.report .r-photos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.report .r-photos figure { margin: 0; width: 150px; }
.report .r-photos img { width: 150px; height: 112px; object-fit: cover; border: 1px solid #ddd; }
.report .r-photos figcaption { font-size: 10px; color: #555; }
.report table { width: 100%; border-collapse: collapse; }
.report th, .report td { border-bottom: 1px solid #e3e3e3; padding: 4px 6px; text-align: left; }
.report-toolbar { display: flex; gap: 12px; align-items: center; justify-content: center; margin-bottom: 16px; flex-wrap: wrap; }
.report-toolbar label { display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; color: var(--muted); }

@media print {
  body { background: #fff !important; }
  .topbar, .report-toolbar, .toast-wrap, .no-print { display: none !important; }
  main { padding: 0; max-width: none; }
  .report { padding: 0; max-width: none; }
  @page { margin: 14mm; }
}

/* ---------- Tablet ---------- */
@media (max-width: 860px) {
  .filters { grid-template-columns: 1fr 1fr 1fr; }
  .filters .search-wrap { grid-column: 1 / -1; }
  .venue-hero { grid-template-columns: 1fr; }
  .overview-grid, .overview-grid.no-map, .comment-cols { grid-template-columns: 1fr; }
  .item-grid { grid-template-columns: 1fr; }
}

/* Schwebender Hinzufügen-Button (nur Handy) */
.fab { display: none; }

/* ---------- Touch ---------- */
@media (max-width: 600px), (pointer: coarse) {
  input, select, textarea { font-size: 16px; padding: 10px 11px; }
  .btn { min-height: 42px; padding: 9px 14px; }
  .btn.sm { min-height: 36px; padding: 6px 11px; }
  .btn.icon { width: 42px; height: 42px; }
  .tabs button { padding: 13px 12px; }
  .secret button { padding: 6px 4px; font-size: .85rem; }
  .thumbs img, .thumb-btn { width: 68px; height: 68px; }
  .lightbox .nav { width: 52px; height: 52px; }
  .photo-tile .tools { opacity: 1; }
}

/* ---------- Handy ---------- */
@media (max-width: 600px) {
  body { font-size: 15.5px; }
  main { padding: 14px 12px calc(92px + env(safe-area-inset-bottom)); }
  .topbar { padding: 0 8px 0 12px; gap: 8px; height: 52px; }
  .tabs { top: 52px; margin-left: -12px; margin-right: -12px; padding: 0 4px; }
  .topbar .user-name { display: none; }
  .hide-mobile { display: none !important; }
  .page-head { margin-bottom: 12px; }
  .page-head .btn.add-desktop { display: none; }
  .page-head h1 { font-size: 1.3rem; }
  .fab {
    display: flex; align-items: center; justify-content: center;
    position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 60;
    width: 54px; height: 54px; border-radius: 6px; border: 0;
    background: var(--gold); color: var(--ink);
    box-shadow: 0 2px 10px rgba(0,0,0,.5); cursor: pointer;
  }
  .fab svg { width: 24px; height: 24px; stroke-width: 2.2; }
  .card { padding: 13px; }
  .form-grid { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
  .venue-hero { gap: 12px; margin-bottom: 10px; }
  .venue-hero .cover { aspect-ratio: 16/7; }
  .venue-hero h1 { font-size: 1.3rem; }
  .venue-hero .actions { flex-wrap: nowrap; }
  .venue-hero .actions .btn { flex: 1; padding-left: 8px; padding-right: 8px; }
  .venue-hero .actions .btn-edit { flex: 0 0 44px; }
  .item-card .props { gap: 8px 12px; }
  .tbl { font-size: .85rem; }
  .tbl td, .tbl th { padding: 8px 6px; }
  .modal-back { padding: 0; }
  .modal { border-radius: 0; border: 0; min-height: 100vh; }
  .modal-foot { position: sticky; bottom: 0; background: var(--surface); padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .modal-foot .btn { flex: 1; }
  .modal-foot .left { flex: 0 0 auto; }
  .toast-wrap { left: 12px; right: 12px; bottom: calc(82px + env(safe-area-inset-bottom)); }
  .toast { max-width: none; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
  .dropzone { padding: 18px 12px; }
  .lightbox { padding: 8px; }
  .lightbox .nav { top: auto; bottom: 16px; transform: none; }
  .map-canvas { height: 55vh; }
  .map-full { height: calc(100vh - 170px); }
  .img-cands { grid-template-columns: 1fr 1fr; }
  .cover-pick { flex-direction: column; align-items: stretch; }
  .cover-prev { width: 100%; aspect-ratio: 16/8; }
  .cover-btns .btn { flex: 1; }
  .report { padding: 18px 14px; }
  .report .r-item dl { grid-template-columns: 110px 1fr; }
}
