/* WuNo – App-Oberfläche (PWA, iOS, Android), Rechtstexte und Basis für den Admin.
   Version 1 ist bewusst dark-only (Nachtleben-Kontext). Ein Akzent (Pink) für
   Handlung und "jetzt", Mint nur für Live-Zustände, alles andere neutral. */

/* ----------------------------------------------------------------- Tokens */

:root {
  color-scheme: dark;

  --bg: #0b0b12;
  --surface: #14141e;
  --surface-2: #1c1c28;
  --surface-3: #262634;
  --line: rgba(255, 255, 255, .075);
  --line-2: rgba(255, 255, 255, .12);
  --line-3: rgba(255, 255, 255, .2);

  --txt: #f4f4f8;
  --txt-2: #a4a4b6;
  --txt-3: #7c7c8d;

  --accent: #ff2e88;
  --accent-txt: #ff5ca3;           /* Pink für Text auf dunklem Grund (Kontrast) */
  --accent-soft: rgba(255, 46, 136, .13);
  --accent-line: rgba(255, 46, 136, .36);
  --live: #2ee6a8;
  --live-soft: rgba(46, 230, 168, .12);
  --violet: #8b7bff;
  --danger: #ff6b6b;
  --warn: #ffb020;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  --shadow-card: inset 0 1px 0 rgba(255, 255, 255, .035), 0 12px 32px -16px rgba(0, 0, 0, .7);
  --shadow-pop: 0 30px 80px -24px rgba(0, 0, 0, .85), 0 0 0 1px rgba(255, 255, 255, .06);
  --glass: rgba(11, 11, 18, .74);

  --ease: cubic-bezier(.22, 1, .36, 1);
  --spring: cubic-bezier(.34, 1.36, .64, 1);

  --font: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --gutter: 16px;

  /* Alte Namen: admin.css baut noch darauf auf. */
  --bg-soft: var(--surface-2);
  --card: var(--surface);
  --dim: var(--txt-2);
  --accent2: #6c5ce7;
  --ok: var(--live);
  --radius: 16px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html {
  width: 100%; height: 100%; background: var(--bg); overflow: hidden;
  overscroll-behavior: none; -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
}

/* Muss vor allen display-Regeln gewinnen: sonst hebt z. B. `.drop img{display:block}`
   das hidden-Attribut wieder auf und die Vorschau bleibt nach dem Absenden stehen. */
[hidden] { display: none !important; }
.hidden { display: none !important; }

body {
  position: fixed; inset: 0; width: 100%; height: 100%; margin: 0; overflow: hidden;
  background: var(--bg); color: var(--txt);
  font: 400 15px/1.45 var(--font);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overscroll-behavior: none;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { -webkit-appearance: none; appearance: none; }
a { color: inherit; }
::selection { background: rgba(255, 46, 136, .35); color: #fff; }
:focus:not(:focus-visible) { outline: none; }
:focus-visible { outline: 2px solid var(--accent-txt); outline-offset: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* Linien-Icons: ein Raster (24), eine Strichstärke, überall gleich. */
.btn svg, .icon-btn svg, .pin svg, .badge svg, .chip svg, .event-action svg,
.trust svg, .drop-ico svg, .fineprint svg, .legal-back svg {
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; flex: none;
}

/* ---------------------------------------------------------------- Screens */

.screen {
  position: relative; width: 100%; height: 100%; max-width: 600px; margin: 0 auto;
  padding: 0 var(--gutter); overflow: hidden; display: flex; flex-direction: column;
  animation: screen-in .5s var(--ease) both;
}
@keyframes screen-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.screen-scroll, .setup-inner {
  min-height: 0; overflow-x: hidden; overflow-y: auto;
  overscroll-behavior: contain; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.screen-scroll::-webkit-scrollbar, .setup-inner::-webkit-scrollbar { display: none; }

/* Der Inhalt läuft unter der Glas-Kopfleiste durch. Ihre Höhe setzt app.js
   (gemessen); die Werte hier gelten nur bis dahin. */
#stream { --bar-h: calc(max(10px, var(--safe-t)) + 114px); }
#upload { --bar-h: calc(max(10px, var(--safe-t)) + 64px); }
.screen-scroll {
  flex: 1; margin: 0 calc(-1 * var(--gutter));
  padding: calc(var(--bar-h) + 12px) var(--gutter) calc(32px + var(--safe-b));
}

/* ---------------------------------------------------------------- Buttons */

.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%; min-height: 48px; padding: 0 18px; border-radius: var(--r-md);
  border: 1px solid var(--line-2); background: var(--surface-2); color: var(--txt);
  font-size: 16px; font-weight: 600; letter-spacing: -.01em; line-height: 1.2; text-decoration: none;
  cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: manipulation;
  transition: transform .2s var(--ease), background-color .2s, border-color .2s, opacity .2s, box-shadow .2s;
}
.btn svg { width: 20px; height: 20px; }
.btn:active:not(:disabled) { transform: scale(.975); }
.btn:disabled { opacity: .45; cursor: default; }
@media (hover: hover) {
  .btn:hover:not(:disabled) { background: var(--surface-3); border-color: var(--line-3); }
}

.btn.primary {
  border: 0; color: #fff;
  background: linear-gradient(180deg, #ff4f9c 0%, #ee1d78 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), inset 0 -1px 0 rgba(0, 0, 0, .14),
              0 12px 30px -12px rgba(255, 46, 136, .75);
}
@media (hover: hover) {
  .btn.primary:hover:not(:disabled) { background: linear-gradient(180deg, #ff62a8 0%, #f52a83 100%); }
}
.btn.primary:disabled { opacity: .32; box-shadow: none; }

.btn.small { width: auto; min-height: 38px; padding: 0 14px; font-size: 14px; border-radius: 12px; }
.btn.tiny {
  width: auto; flex: none; min-height: 36px; padding: 0 13px 0 11px; gap: 6px;
  border-radius: 999px; font-size: 13px; background: rgba(255, 255, 255, .06);
}
.btn.tiny svg { width: 15px; height: 15px; }
.btn.tiny:disabled { opacity: .75; }
/* Während der Ortung dreht sich ein Kreis statt des Pfeils. */
#gps:disabled svg { display: none; }
#gps:disabled::before {
  content: ''; width: 13px; height: 13px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .22); border-top-color: var(--txt);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(1turn); } }

.icon-btn {
  width: 42px; height: 42px; flex: none; display: grid; place-items: center; padding: 0;
  border-radius: 50%; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .06);
  color: var(--txt); font-size: 18px; cursor: pointer; touch-action: manipulation;
  transition: transform .2s var(--ease), background-color .2s, border-color .2s;
}
.icon-btn svg { width: 21px; height: 21px; stroke-width: 2.1; }
.icon-btn:active { transform: scale(.92); background: rgba(255, 255, 255, .1); }
@media (hover: hover) { .icon-btn:hover { background: rgba(255, 255, 255, .1); border-color: var(--line-3); } }

/* ------------------------------------------------------- Karten, Formulare */

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 18px; box-shadow: var(--shadow-card);
}
.card h2 {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin: 0 0 12px; font-size: 15px; font-weight: 650; letter-spacing: -.01em; color: var(--txt);
}
.card h2 output { color: var(--accent-txt); font-weight: 700; }
.opt { color: var(--txt-3); font-size: 13px; font-weight: 500; letter-spacing: 0; }

.hint { margin: 10px 2px 0; color: var(--txt-2); font-size: 13px; line-height: 1.45; }
.hint:empty { display: none; }
.hint.center { text-align: center; }

textarea, select {
  display: block; width: 100%; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--line-2); background: rgba(0, 0, 0, .28); color: var(--txt);
  /* 16 px: darunter zoomt iOS beim Antippen ins Feld. */
  font-size: 16px; line-height: 1.5;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
textarea { resize: vertical; min-height: 104px; }
textarea::placeholder { color: var(--txt-3); }
textarea:focus, select:focus {
  outline: none; border-color: var(--accent-line); background: rgba(0, 0, 0, .38);
  box-shadow: 0 0 0 4px rgba(255, 46, 136, .12);
}
select {
  -webkit-appearance: none; appearance: none; padding-right: 42px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a4a4b6' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 17px;
}
select option { background: var(--surface-2); color: var(--txt); }

/* Schieberegler wie auf dem iPhone: dünne Spur, gefüllter Anteil, weißer Knopf.
   --fill setzt app.js, weil WebKit den gefüllten Anteil nicht selbst zeichnet. */
input[type=range] {
  --fill: 34%;
  -webkit-appearance: none; appearance: none; display: block;
  width: 100%; height: 30px; margin: 0; background: none; cursor: pointer; touch-action: pan-y;
}
input[type=range]::-webkit-slider-runnable-track {
  height: 6px; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent) 0 var(--fill), rgba(255, 255, 255, .12) var(--fill) 100%);
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 26px; height: 26px; margin-top: -10px; border-radius: 50%;
  background: #fff; border: 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .45), 0 0 0 .5px rgba(0, 0, 0, .1);
  transition: transform .2s var(--ease);
}
input[type=range]:active::-webkit-slider-thumb { transform: scale(1.1); }
input[type=range]::-moz-range-track { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .12); }
input[type=range]::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--accent); }
input[type=range]::-moz-range-thumb {
  width: 26px; height: 26px; border: 0; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .45);
}
input[type=range]:focus-visible { outline: none; }
input[type=range]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(255, 92, 163, .45), 0 2px 10px rgba(0, 0, 0, .45); }

/* ------------------------------------------------------------------ Setup */

.setup-inner {
  position: relative; isolation: isolate; flex: 1; display: flex; flex-direction: column;
  margin: 0 calc(-1 * var(--gutter));
  padding: max(22px, calc(var(--safe-t) + 10px)) calc(var(--gutter) + 4px) calc(20px + var(--safe-b));
}

.hero-art {
  position: absolute; z-index: -1; top: -180px; right: -205px; width: 480px; aspect-ratio: 1;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(closest-side, #000 35%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 35%, transparent 100%);
}
.hero-art::before {
  content: ''; position: absolute; inset: 18%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 46, 136, .16), rgba(108, 92, 231, .08) 55%, transparent);
}
.hero-art svg { position: relative; display: block; width: 100%; height: 100%; overflow: visible; }
.hero-art .ring { fill: none; stroke: rgba(255, 255, 255, .07); stroke-width: 1; }
.hero-art .core { fill: var(--accent); }
.hero-art .core-halo { fill: rgba(255, 46, 136, .14); }

.brand { position: relative; display: flex; align-items: center; gap: 10px; margin: 0 0 clamp(36px, 8vh, 64px); }
.logo { display: block; width: 34px; height: 34px; flex: none; }
.logo svg { display: block; width: 100%; height: 100%; }
.wordmark { font-size: 21px; font-weight: 750; letter-spacing: -.035em; }
/* Anmeldung im Admin: noch die alte Überschrift aus h1 und Unterzeile. */
.brand:has(> h1) { flex-direction: column; align-items: center; text-align: center; gap: 0; margin: 40px 0 28px; }
.brand h1 { margin: 0; font-size: 44px; line-height: 1; font-weight: 750; letter-spacing: -.04em; }
.brand h1 span { color: var(--accent-txt); }
.brand p { margin: 10px 0 0; color: var(--txt-2); }

.setup-grid { position: relative; display: flex; flex-direction: column; gap: 30px; }

.setup-intro h1 {
  margin: 0; max-width: 12em; font-size: clamp(34px, 9.6vw, 42px); line-height: 1.04;
  font-weight: 750; letter-spacing: -.038em; text-wrap: balance;
}
.setup-intro h1 em { font-style: normal; color: var(--accent-txt); }
.lede { margin: 14px 0 0; max-width: 34ch; color: var(--txt-2); font-size: 16px; line-height: 1.5; }

.trust { display: none; margin: 28px 0 0; padding: 0; list-style: none; flex-direction: column; gap: 10px; }
.trust li { display: flex; align-items: center; gap: 10px; color: var(--txt-2); font-size: 15px; }
.trust svg { width: 16px; height: 16px; color: var(--txt-3); stroke-width: 2.4; }

.setup-panel { display: flex; flex-direction: column; gap: 14px; }

.place-label { margin: 0 0 14px; color: var(--txt-3); font-size: 12.5px; font-weight: 600; letter-spacing: .01em; }
.place-head { display: flex; align-items: center; gap: 12px; }
.pin {
  width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 14px;
  color: var(--live); background: var(--live-soft); box-shadow: inset 0 0 0 1px rgba(46, 230, 168, .16);
}
.pin svg { width: 22px; height: 22px; stroke-width: 1.9; }
.place-txt { flex: 1; min-width: 0; }
.place-txt strong { display: block; font-size: 19px; font-weight: 700; line-height: 1.2; letter-spacing: -.025em; }
#place-sub { display: block; margin-top: 2px; color: var(--txt-2); font-size: 13px; line-height: 1.35; }

.radius { display: block; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); cursor: pointer; }
.radius-head {
  display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px;
  color: var(--txt-2); font-size: 14px; font-weight: 600;
}
.radius output { color: var(--txt); font-size: 16px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }

.setup-actions { display: flex; flex-direction: column; gap: 10px; }
.btn.setup-primary {
  min-height: 58px; justify-content: space-between; padding: 0 20px 0 22px;
  border-radius: 17px; font-size: 17px;
}
.btn.setup-primary svg { width: 22px; height: 22px; transition: transform .3s var(--ease); }
@media (hover: hover) { .btn.setup-primary:hover svg { transform: translateX(3px); } }
.btn.setup-secondary { min-height: 54px; border-radius: 17px; }
.btn.setup-secondary svg { color: var(--accent-txt); }

.setup-footer { position: relative; margin-top: auto; padding-top: 36px; }

.legal-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 22px; }
.legal-links a {
  color: var(--txt-3); font-size: 12.5px; font-weight: 500; text-decoration: none;
  transition: color .2s;
}
.legal-links a:hover, .legal-links a:focus-visible { color: var(--txt); }

@media (max-height: 700px) {
  .brand { margin-bottom: 26px; }
  .setup-grid { gap: 22px; }
  .setup-intro h1 { font-size: 31px; }
  .lede { font-size: 15px; }
  .setup-footer { padding-top: 22px; }
}

/* ---------------------------------------------------------- Kopfleiste */

.topbar {
  position: absolute; z-index: 20; top: 0; left: 0; right: 0;
  padding: max(10px, var(--safe-t)) var(--gutter) 10px;
  background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(22px); backdrop-filter: saturate(180%) blur(22px);
  box-shadow: 0 1px 0 var(--line);
}
.topbar-row { display: flex; align-items: center; gap: 10px; min-height: 44px; }

.where { flex: 1; min-width: 0; padding-left: 2px; }
.where strong {
  display: block; font-size: 17px; font-weight: 650; line-height: 1.2; letter-spacing: -.02em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.where span {
  display: block; margin-top: 2px; color: var(--txt-2); font-size: 13px; line-height: 1.2;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Nur Punkt und Wort, kein eigenes Kästchen: ein Status, keine Schaltfläche. */
.live {
  display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 0 6px;
  color: var(--txt-3); font-size: 12.5px; font-weight: 600; letter-spacing: .01em;
  transition: color .3s;
}
.live i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.live.on { color: var(--live); }
.live.on i { animation: live-ping 2s var(--ease) infinite; }
@keyframes live-ping {
  0% { box-shadow: 0 0 0 0 rgba(46, 230, 168, .6); }
  70%, 100% { box-shadow: 0 0 0 7px rgba(46, 230, 168, 0); }
}

/* Zeitraum: Segment-Umschalter mit gleitendem Knopf. Gleich breite Segmente,
   solange die Beschriftung passt; sonst wächst das längste. Lage und Breite
   des Knopfs misst app.js (--seg-x, --seg-w). */
.filters { margin-top: 10px; }
.seg {
  position: relative; display: flex; height: 40px; padding: 3px; border-radius: 13px;
  background: rgba(255, 255, 255, .055); box-shadow: inset 0 0 0 1px var(--line);
}
.seg-thumb {
  position: absolute; top: 3px; bottom: 3px; left: 0; width: var(--seg-w, calc((100% - 6px) / 4));
  border-radius: 10px; background: #30303e;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .09), 0 2px 8px -1px rgba(0, 0, 0, .5);
  transform: translateX(var(--seg-x, 3px));
}
.seg.ready .seg-thumb { transition: transform .42s var(--spring), width .42s var(--spring); }
.seg button {
  position: relative; z-index: 1; flex: 1 1 0; min-width: max-content; padding: 0 8px;
  border: 0; border-radius: 10px; background: none; color: var(--txt-2);
  font-size: 13.5px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; cursor: pointer;
  transition: color .2s;
}
.seg button.active { color: var(--txt); }
@media (hover: hover) { .seg button:not(.active):hover { color: var(--txt); } }

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.filters #cat-chips:not(:empty) { margin: 10px calc(-1 * var(--gutter)) 0; padding: 0 var(--gutter); }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .04);
  color: var(--txt-2); font-size: 13.5px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background-color .2s, color .2s, border-color .2s;
}
.chip svg { width: 16px; height: 16px; stroke-width: 1.9; }
.chip-count { color: var(--txt-3); font-variant-numeric: tabular-nums; }
.chip.active { background: var(--txt); border-color: var(--txt); color: var(--bg); }
.chip.active .chip-count { color: rgba(11, 11, 18, .55); }
.chips.secondary { margin-top: 7px; }
.chips.secondary .chip.active { background: transparent; color: var(--accent-txt); border-color: var(--accent-line); }

/* ------------------------------------------------------------ Radar */

.radar-wrap {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 18px;
  margin: 0 0 16px; padding: 16px 18px 16px 16px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-card);
}
.radar-box { position: relative; width: 108px; height: 108px; flex: none; }
#radar { position: relative; display: block; width: 100%; height: 100%; overflow: visible; }
#radar .ring { fill: none; stroke: rgba(255, 255, 255, .09); stroke-width: 1; vector-effect: non-scaling-stroke; }
#radar .ring.edge { stroke: rgba(255, 255, 255, .2); stroke-dasharray: 2 4; }
#radar .ring-label {
  fill: var(--txt-3); font-size: 9px; font-weight: 600; text-anchor: middle;
  font-family: var(--font); pointer-events: none;
}
#radar .me { fill: var(--live); }
#radar .pulse {
  fill: none; stroke: var(--live); stroke-width: 1; vector-effect: non-scaling-stroke;
  transform-origin: 100px 100px; animation: pulse 2.8s var(--ease) infinite;
}
@keyframes pulse { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(10); opacity: 0; } }
#radar .dot { fill: var(--accent); }
#radar .dot.new { fill: var(--live); }
/* Gebündelte Radarpunkte: Anzahl statt Stapel. */
#radar .dot-count {
  fill: #fff; font-size: 8px; font-weight: 750; text-anchor: middle;
  font-family: var(--font); pointer-events: none;
}

.radar-meta { position: relative; flex: 1; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; margin: 0; }
.radar-meta > div {
  display: flex; flex-direction: column; align-items: center; min-width: 0;
  border-left: 1px solid var(--line);
}
.radar-meta > div:first-child { border-left: 0; }
.radar-meta dd {
  order: -1; margin: 0; font-size: 26px; font-weight: 700; line-height: 1.05;
  letter-spacing: -.035em; font-variant-numeric: tabular-nums;
}
.radar-meta dt { margin-top: 5px; color: var(--txt-2); font-size: 12px; font-weight: 500; }

.side-links { display: none; }

/* Auf dem kleinen Radar wären Beschriftungen unter 6 px -- der Umkreis steht
   ohnehin in der Kopfleiste. Ab Desktop-Größe sind sie lesbar. */
@media (max-width: 959px) {
  #radar .ring-label, #radar .dot-count { display: none; }
}

@media (max-width: 360px) {
  .radar-box { width: 88px; height: 88px; }
  .radar-wrap { gap: 12px; }
  .radar-meta dd { font-size: 22px; }
}

/* --------------------------------------------------------- Feed: Orte */

.list { display: flex; flex-direction: column; gap: 12px; }

.venue {
  position: relative; padding: 14px 16px 0; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-card);
  animation: rise .5s var(--ease) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.venue.fresh {
  border-color: rgba(46, 230, 168, .42);
  box-shadow: 0 0 0 3px rgba(46, 230, 168, .09), var(--shadow-card);
}

.venue-head { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; }
/* Bewusst einfarbig: Die Form des Icons sagt die Kategorie, Farbe bleibt dem
   Status vorbehalten (läuft, gleich). */
.badge {
  width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 12px;
  color: var(--txt-2); background: var(--surface-2);
}
.badge svg { width: 21px; height: 21px; stroke-width: 1.8; }

.venue-txt { flex: 1; min-width: 0; }
.venue-txt b {
  display: block; font-size: 16px; font-weight: 650; line-height: 1.25; letter-spacing: -.018em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.venue-txt .count { display: block; margin-top: 2px; color: var(--txt-2); font-size: 13px; }
.venue-head .dist {
  flex: none; align-self: flex-start; margin-top: 3px;
  color: var(--txt-2); font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums;
}

.venue-rows { margin: 0 -16px; border-top: 1px solid var(--line); }

.ev-row { position: relative; }
.ev-row + .ev-row::before {
  content: ''; position: absolute; top: 0; left: 16px; right: 0; height: 1px; background: var(--line);
}
.r-top {
  display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 12px 16px;
  border: 0; background: none; color: inherit; text-align: left; cursor: pointer;
  transition: background-color .15s;
}
.r-top:active { background: rgba(255, 255, 255, .035); }
@media (hover: hover) { .r-top:hover { background: rgba(255, 255, 255, .025); } }
.r-top:focus-visible { outline-offset: -2px; }

/* Zweizeilig wie im Kalender: Tag bzw. "in 20 Min" oben, Uhrzeit darunter. */
.r-when { flex: none; width: 60px; display: flex; flex-direction: column; gap: 1px; padding-top: 1px; }
.r-day {
  color: var(--txt-3); font-size: 11.5px; font-weight: 650; line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.r-time {
  color: var(--txt); font-size: 15px; font-weight: 650; line-height: 1.25;
  letter-spacing: -.01em; font-variant-numeric: tabular-nums;
}
.r-when.soon .r-day { color: var(--accent-txt); }
.r-when.now .r-day { display: flex; align-items: center; gap: 5px; color: var(--live); }
.r-when.now .r-day::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.r-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.r-title {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
  color: var(--txt); font-size: 15px; font-weight: 500; line-height: 1.38; overflow-wrap: anywhere;
}
.ev-row.open .r-title { display: block; -webkit-line-clamp: unset; }
.r-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.r-price { color: var(--txt-2); font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }

.new {
  display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 6px;
  background: var(--live-soft); color: var(--live);
  font-size: 10.5px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase;
}

/* Aktionen erst nach dem Antippen -- sonst trägt jede Zeile drei Knöpfe. */
.r-actions { display: none; flex-wrap: wrap; gap: 8px; padding: 0 16px 14px 88px; }
.ev-row.open .r-actions { display: flex; animation: fade-down .3s var(--ease) both; }
@keyframes fade-down { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (max-width: 380px) { .r-actions { padding-left: 16px; } }

.event-action {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px 0 11px;
  border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .045);
  color: var(--txt); font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap;
  cursor: pointer; touch-action: manipulation; transition: background-color .2s, border-color .2s, transform .15s;
}
.event-action svg { width: 15px; height: 15px; }
.event-action:active { transform: scale(.96); }
@media (hover: hover) { .event-action:hover { background: rgba(255, 255, 255, .09); border-color: var(--line-3); } }
.event-action.primary { color: var(--accent-txt); background: var(--accent-soft); border-color: var(--accent-line); }
@media (hover: hover) { .event-action.primary:hover { background: rgba(255, 46, 136, .2); border-color: rgba(255, 46, 136, .5); } }
.event-action.subtle { color: var(--txt-2); }
.event-action.danger { color: var(--danger); }

.venue-more {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: calc(100% + 32px); margin: 0 -16px; padding: 12px 16px 13px;
  border: 0; border-top: 1px solid var(--line); background: none;
  color: var(--txt-2); font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background-color .15s, color .15s;
}
@media (hover: hover) { .venue-more:hover { color: var(--txt); } }
.venue-more::after {
  content: ''; width: 14px; height: 14px; background: currentColor; transition: transform .35s var(--ease);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.venue.open .venue-more::after { transform: rotate(180deg); }
.venue-more:active { background: rgba(255, 255, 255, .03); }
.venue-more:last-child { border-radius: 0 0 var(--r-lg) var(--r-lg); }

/* Pflichtangabe offener Datenlizenzen (CC BY): unaufdringlich, aber immer
   sichtbar am Datensatz -- die Auflage gilt je Event, nicht pauschal. */
.venue .credit {
  margin: 0 -16px; padding: 10px 16px 12px; border-top: 1px solid var(--line);
  color: var(--txt-3); font-size: 11px; line-height: 1.4;
}

/* ------------------------------------------- Ein hervorgehobener Platz */
/* Bewusst zurückhaltend: dieselbe Karte, nur ein Akzentrahmen und ein kleines
   Label darüber. Kein größeres Format, kein Bild, keine eigene Sektion --
   sonst wirkt der Platz wie ein Banner und wird überblättert. */

.featured { margin-bottom: 12px; }
.featured-label {
  display: block; margin: 0 2px 8px; color: var(--accent-txt);
  font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.venue.promo, .ev.promo {
  border-color: var(--accent-line);
  background: linear-gradient(180deg, rgba(255, 46, 136, .07), transparent 60%), var(--surface);
}

/* ------------------------------------------------- Laden, leer, Hinweise */

.loading { display: flex; flex-direction: column; gap: 12px; }
.skel {
  padding: 14px 16px 16px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line);
}
.skel-head { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.skel-lines { flex: 1; display: flex; flex-direction: column; gap: 7px; }
.skel-row { display: flex; align-items: center; gap: 16px; padding: 10px 0 4px; }
.sk {
  display: block; height: 12px; border-radius: 6px;
  background: linear-gradient(90deg, rgba(255, 255, 255, .045) 25%, rgba(255, 255, 255, .09) 50%, rgba(255, 255, 255, .045) 75%);
  background-size: 300% 100%; animation: shimmer 1.6s linear infinite;
}
.sk.thin { height: 9px; }
.sk-badge { width: 40px; height: 40px; border-radius: 12px; flex: none; }
.sk-pill { width: 58px; height: 24px; border-radius: 999px; flex: none; }
.sk-time { width: 44px; height: 14px; flex: none; }
.w25 { width: 25%; } .w30 { width: 30%; } .w45 { width: 45%; } .w55 { width: 55%; }
.w60 { width: 60%; } .w70 { width: 70%; } .w75 { width: 75%; } .w80 { width: 80%; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

.empty { margin: 0; padding: 40px 24px; text-align: center; color: var(--txt-2); line-height: 1.55; }
#empty {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  padding: 44px 28px; border: 1px dashed var(--line-2); border-radius: var(--r-lg);
  font-size: 15px; text-wrap: balance;
}
#empty::before {
  content: ''; width: 52px; height: 52px; border-radius: 16px; background: var(--surface-2)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a4a4b6' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4.5' width='18' height='16.5' rx='3'/%3E%3Cpath d='M3 9.5h18M8 2.5v4M16 2.5v4'/%3E%3C/svg%3E")
    center / 24px no-repeat;
}

.toast {
  position: fixed; z-index: 100; left: 50%; bottom: calc(24px + var(--safe-b));
  max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 14px;
  background: rgba(38, 38, 52, .92); color: var(--txt); font-size: 14px; font-weight: 550;
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  box-shadow: var(--shadow-pop); pointer-events: none;
  opacity: 0; transform: translate(-50%, 16px) scale(.98);
  transition: opacity .25s, transform .4s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }

/* ----------------------------------------------------------- Event-Upload */

.upload-body { display: flex; flex-direction: column; gap: 14px; }

.drop {
  position: relative; display: grid; place-items: center; width: 100%; min-height: 230px;
  padding: 0; color: inherit; cursor: pointer; overflow: hidden; touch-action: manipulation;
  border-radius: 16px; border: 1.5px dashed rgba(255, 255, 255, .15);
  background: radial-gradient(120% 90% at 50% 0%, rgba(255, 46, 136, .08), transparent 65%), rgba(255, 255, 255, .02);
  transition: border-color .2s, background-color .2s;
}
@media (hover: hover) { .drop:hover { border-color: var(--accent-line); } }
.drop:active { background-color: rgba(255, 255, 255, .04); }
.drop.has-preview {
  height: min(52dvh, 440px); min-height: 260px;
  border-style: solid; border-color: var(--line); background: #07070b;
}
.drop img {
  width: 100%; height: 100%; object-fit: contain; object-position: center;
  display: block; pointer-events: none; user-select: none; -webkit-user-drag: none;
}
#drop-hint { display: flex; flex-direction: column; align-items: center; padding: 28px 20px; text-align: center; }
.drop-ico {
  width: 62px; height: 62px; display: grid; place-items: center; margin-bottom: 16px;
  border-radius: 20px; color: #fff; background: linear-gradient(180deg, #ff4f9c, #ee1d78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 14px 32px -12px rgba(255, 46, 136, .8);
}
.drop-ico svg { width: 28px; height: 28px; stroke-width: 1.8; }
#drop-hint b { font-size: 17px; font-weight: 650; letter-spacing: -.015em; }
#drop-hint small { display: block; max-width: 28ch; margin-top: 6px; color: var(--txt-2); font-size: 14px; line-height: 1.45; }

#choose-photo { margin-top: 12px; }
#choose-photo svg { color: var(--txt-2); }
.btn.send { min-height: 56px; border-radius: 17px; font-size: 17px; }

.fineprint {
  display: flex; align-items: flex-start; justify-content: center; gap: 8px;
  margin: 0 8px; color: var(--txt-3); font-size: 12.5px; line-height: 1.5; text-align: left;
}
.fineprint svg { width: 16px; height: 16px; margin-top: 1px; stroke-width: 1.9; }
.fineprint a { color: var(--txt-2); text-underline-offset: 2px; }

.my-upload { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 0; }
.my-upload + .my-upload { border-top: 1px solid var(--line); }
.my-upload span { color: var(--txt-2); font-size: 14px; }

/* -------------------------------------------------- Dialog als Bottom-Sheet */

.modal {
  width: 100%; max-width: 560px; max-height: calc(100% - 24px); margin: auto auto 0; padding: 0;
  border: 0; border-radius: 26px 26px 0 0; background: var(--surface); color: var(--txt);
  box-shadow: 0 -24px 70px rgba(0, 0, 0, .6), 0 0 0 1px var(--line);
}
.modal[open] { animation: sheet-in .42s var(--ease); }
@keyframes sheet-in { from { transform: translateY(100%); } to { transform: none; } }
.modal::backdrop {
  background: rgba(4, 4, 8, .62);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.modal form { padding: 10px 20px calc(20px + var(--safe-b)); }
.sheet-grabber { width: 38px; height: 5px; margin: 0 auto 16px; border-radius: 3px; background: rgba(255, 255, 255, .2); }
.modal h2 { margin: 0 0 4px; font-size: 21px; font-weight: 700; letter-spacing: -.025em; }
.modal-event { margin: 0 0 16px; color: var(--txt-2); font-size: 14px; line-height: 1.4; }
.modal label { display: block; margin-top: 14px; color: var(--txt-2); font-size: 13px; font-weight: 600; }
.modal select, .modal textarea { margin-top: 8px; }
.modal textarea { min-height: 88px; }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.modal-actions .btn { flex: 1; margin: 0; }
@media (min-width: 640px) {
  .modal { max-width: 460px; margin: auto; border-radius: 24px; box-shadow: var(--shadow-pop); }
  .modal[open] { animation: pop-in .32s var(--ease); }
  .modal form { padding: 24px; }
  .sheet-grabber { display: none; }
}
@keyframes pop-in { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------ Desktop */

@media (min-width: 960px) {
  :root { --gutter: 40px; }
  .screen { max-width: 1200px; }
  #upload.screen { max-width: 720px; }

  .setup-inner { padding-top: 28px; padding-bottom: 28px; }
  .brand { margin-bottom: 0; }
  .setup-grid {
    flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 420px;
    align-items: center; gap: 72px; padding: 48px 0;
  }
  .setup-intro h1 { font-size: clamp(50px, 5.2vw, 66px); line-height: 1.02; letter-spacing: -.045em; }
  .lede { margin-top: 22px; font-size: 19px; }
  .trust { display: flex; }
  .setup-panel {
    padding: 22px; border-radius: var(--r-xl);
    background: rgba(20, 20, 30, .72); border: 1px solid var(--line-2); box-shadow: var(--shadow-pop);
    -webkit-backdrop-filter: blur(24px) saturate(140%); backdrop-filter: blur(24px) saturate(140%);
  }
  .setup-panel .card.place { padding: 4px 4px 20px; background: none; border: 0; box-shadow: none; }
  .setup-footer { padding-top: 0; }
  .setup-footer .legal-links { justify-content: flex-start; }
  .hero-art { top: 50%; right: -60px; width: 900px; transform: translateY(-50%); opacity: .9; }

  /* Die Eventliste nutzt die volle Fensterbreite für Glasleiste und Scrollbereich;
     der Inhalt bleibt über --inline auf 1200 px zentriert. */
  #stream.screen {
    max-width: none; padding: 0;
    --inline: max(var(--gutter), calc((100% - 1200px) / 2 + var(--gutter)));
  }
  #stream .stream-scroll { margin: 0; padding-left: var(--inline); padding-right: var(--inline); }

  /* Kopfleiste: Ort links, Zeitraum mittig, Status und Einreichen rechts. */
  #stream .topbar {
    display: grid; align-items: center; column-gap: 12px;
    padding-left: var(--inline); padding-right: var(--inline);
    grid-template-columns: auto minmax(0, 1fr) minmax(340px, 460px) minmax(0, 1fr) auto auto;
  }
  #stream .topbar-row { display: contents; }
  /* Ohne feste Zeile rutscht der Filter (Spalte 3, im DOM nach Spalte 6) in Zeile 2. */
  #stream .topbar-row > *, #stream .filters { grid-row: 1; }
  #back { grid-column: 1; }
  #stream .where { grid-column: 2; }
  #stream .filters { grid-column: 3; margin: 0; }
  #live { grid-column: 5; }
  #to-upload { grid-column: 6; }

  .stream-scroll {
    display: grid; grid-template-columns: 320px minmax(0, 1fr); align-items: start; column-gap: 28px;
  }
  /* top: 0 genügt: Sticky rechnet ab dem Innenabstand des Scroll-Containers,
     und der hält die Kopfleiste schon frei. */
  .stream-side { position: sticky; top: 0; display: flex; flex-direction: column; gap: 18px; }
  .radar-wrap { flex-direction: column; align-items: stretch; gap: 0; margin: 0; padding: 22px 20px 20px; }
  .radar-box { width: 100%; max-width: 236px; height: auto; aspect-ratio: 1; margin: 4px auto 22px; }
  .radar-meta { padding-top: 18px; border-top: 1px solid var(--line); }
  .side-links { display: flex; justify-content: flex-start; padding: 0 6px; }
  .venue { padding-left: 20px; padding-right: 20px; }
  .venue-rows, .venue .credit { margin: 0 -20px; }
  .venue-more { width: calc(100% + 40px); margin: 0 -20px; }
  .r-top { padding-left: 20px; padding-right: 20px; }
  .ev-row + .ev-row::before { left: 20px; }
  .r-actions { padding-left: 92px; padding-right: 20px; }
  .r-when { width: 60px; }
}

/* ---------------------------------------------------- Rechtstexte, Admin */

/* Rechtstexte sind Dokumente, keine App-Hülle. Ohne diese Ausnahme greift die
   Vollbild-Regel oben (body{position:fixed;overflow:hidden}) und schneidet alles
   unterhalb der ersten Bildschirmhöhe ab -- bei der Datenschutzerklärung wäre
   der größere Teil schlicht nicht lesbar. Der Admin ist ebenso eine lange Seite. */
html:has(body.doc), html:has(body.admin) { overflow: auto; height: auto; }
body.doc, body.admin { position: static; inset: auto; height: auto; overflow: visible; }
body.admin .screen { max-width: 520px; }

body.doc {
  background: radial-gradient(70% 420px at 50% -120px, rgba(255, 46, 136, .12), transparent 70%) no-repeat, var(--bg);
}
.legal-page {
  max-width: 740px; margin: 0 auto;
  padding: max(20px, var(--safe-t)) 22px calc(88px + var(--safe-b));
}
.legal-page a { color: var(--accent-txt); }
.legal-header {
  display: flex; flex-direction: column; align-items: flex-start; gap: 28px;
  margin: 4px 0 36px; padding-bottom: 30px; border-bottom: 1px solid var(--line);
}
.legal-back {
  width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--line-2); background: rgba(255, 255, 255, .06);
  color: var(--txt) !important; text-decoration: none;
  transition: background-color .2s, transform .2s var(--ease);
}
.legal-back:hover { background: rgba(255, 255, 255, .1); }
.legal-back:active { transform: scale(.92); }
.legal-back svg { width: 21px; height: 21px; stroke-width: 2.1; }
.legal-heading { min-width: 0; }
.legal-kicker {
  display: block; margin-bottom: 8px; color: var(--accent-txt);
  font-size: 13px; font-weight: 700; letter-spacing: .02em;
}
.legal-page h1 {
  margin: 0; font-size: clamp(34px, 8.5vw, 52px); line-height: 1.02;
  font-weight: 750; letter-spacing: -.042em; text-wrap: balance;
}

.legal-content { color: #cacad6; font-size: 16px; line-height: 1.72; }
.legal-content > :first-child { margin-top: 0; }
.legal-content h2 {
  margin: 44px 0 14px; color: var(--txt); font-size: 20px; font-weight: 700;
  line-height: 1.3; letter-spacing: -.02em; text-wrap: balance;
}
.legal-content h3 { margin: 28px 0 10px; color: var(--txt); font-size: 17px; font-weight: 650; }
.legal-content p, .legal-content ul, .legal-content ol, .legal-content address, .legal-content table { margin: 0 0 18px; }
.legal-content address {
  font-style: normal; padding: 16px 18px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--line); line-height: 1.7;
}
.legal-content ul, .legal-content ol { padding-left: 22px; }
.legal-content li + li { margin-top: 8px; }
.legal-content li::marker { color: var(--txt-3); }
.legal-content strong { color: var(--txt); font-weight: 650; }
.legal-content a {
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
  text-decoration-color: rgba(255, 92, 163, .45); overflow-wrap: anywhere;
}
.legal-content a:hover { text-decoration-color: currentColor; }
.legal-content table {
  width: 100%; border-collapse: separate; border-spacing: 0; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--r-md); font-size: 14.5px; line-height: 1.5;
}
/* Lange Komposita ("Missbrauchsbegrenzung") dürfen umbrechen, sonst drückt die
   Tabelle auf schmalen Geräten über den Rand. */
.legal-content th, .legal-content td {
  padding: 12px 14px; text-align: left; vertical-align: top;
  hyphens: auto; -webkit-hyphens: auto; overflow-wrap: anywhere;
}
.legal-content thead th {
  background: var(--surface-2); color: var(--txt); font-size: 13px; font-weight: 650;
}
.legal-content tbody td { border-top: 1px solid var(--line); }
.legal-content tbody td:first-child { color: var(--txt); }
.legal-page .placeholder {
  padding: 16px 18px; margin-bottom: 30px; border: 1px solid rgba(255, 176, 32, .5);
  border-radius: var(--r-md); color: #ffd27b; background: rgba(255, 176, 32, .07);
}

/* ------------------------------------------------------ Weniger Bewegung */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
