/* Layout: phone-first single column — sticky title bar, a scrolling feed, a fixed three-tab bar;
   sheets rise from the bottom, and the map fills the screen behind the bars. */
:root {
  --bg: #F2F3F0;          /* Grund, leicht grünlich-grau wie die Donau an einem trüben Tag */
  --surface: #FFFFFF;
  --surface-2: #F6F7F4;
  --ink: #17191B;
  --ink-2: #5F666B;
  --ink-3: #8E959A;
  --line: #E2E4DF;
  --tram: #FFD000;        /* Gelb der Budapester Straßenbahn – der einzige Akzent */
  --tram-ink: #1C1A0E;
  --tram-soft: #FFF6CF;
  --paprika: #D23F2A;     /* Warnungen, Badges */
  --focus: #2C6BD6;
  --raised: #FFFFFF;
  --stay-bg: #17191B;
  --stay-fg: #FFD000;
  --shadow-1: 0 1px 2px rgb(23 25 27 / .06), 0 0 0 1px rgb(23 25 27 / .03);
  --shadow-2: 0 10px 30px rgb(23 25 27 / .16), 0 2px 6px rgb(23 25 27 / .08);

  --c-essen: #E0512F;
  --c-bar: #7A4FD3;
  --c-kultur: #2C6BD6;
  --c-therme: #0E9AA0;    /* Zsolnay-Türkis der Bäder */
  --c-draussen: #3B9A4A;
  --c-event: #D2367A;
  --c-sonst: #6F767D;

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

  --top-h: 64px;
  --nav-total: calc(69px + env(safe-area-inset-bottom, 0px));
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --r-l: 20px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F1112;
    --surface: #181B1D;
    --surface-2: #202427;
    --ink: #EDEFEB;
    --ink-2: #A2A9AE;
    --ink-3: #737A80;
    --line: #2B3034;
    --tram-ink: #17150A;
    --tram-soft: #29250E;
    --paprika: #F2654F;
    --focus: #6EA0F5;
    --raised: #2A2F33;
    --stay-bg: #FFD000;
    --stay-fg: #17150A;
    --shadow-1: 0 1px 2px rgb(0 0 0 / .5), 0 0 0 1px rgb(255 255 255 / .03);
    --shadow-2: 0 12px 32px rgb(0 0 0 / .55), 0 2px 6px rgb(0 0 0 / .4);
    color-scheme: dark;
  }
}

@font-face {
  font-family: "Bricolage";
  src: url(/fonts/bricolage-latin.woff2) format("woff2");
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Bricolage";
  src: url(/fonts/bricolage-latin-ext.woff2) format("woff2");
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.4 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; margin: 0; }
button:disabled { cursor: default; }
a { color: inherit; }
[hidden] { display: none !important; }
.i { width: 20px; height: 20px; flex: none; display: block; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Kopfzeile ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(var(--safe-t) + 10px) 16px 10px;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  backdrop-filter: saturate(1.4) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
body.scrolled .top, body.on-map .top { border-bottom-color: var(--line); }
.top-txt { flex: 1; min-width: 0; max-width: 648px; margin: 0 auto; }
.brand {
  margin: 0;
  font: 760 28px/1.05 var(--font-display);
  letter-spacing: -0.025em;
  font-optical-sizing: auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.top-sub {
  margin: 4px 0 0;
  font-size: 13.5px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.top-sub b { color: var(--ink); font-weight: 650; }
.me { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex: none; }

/* ---------- Inhalt ---------- */
main {
  max-width: 680px;
  margin: 0 auto;
  padding: 4px 16px calc(var(--nav-total) + 100px);
}
body.on-map { overflow: hidden; }
body.on-map main { padding: 0; }

.eyebrow {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ink-2);
}

/* Info-Box */
.info {
  margin: 6px 0 16px;
  padding: 14px 16px 6px;
  border-radius: var(--r-l);
  background: var(--tram-soft);
}
.info-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 32px; }
.info .icon-btn { margin-right: -8px; }
.stay { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0 12px; }
.stay + .stay { border-top: 1px solid color-mix(in srgb, var(--ink) 10%, transparent); padding-top: 12px; }
.stay-ic {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  display: grid; place-items: center;
  background: var(--stay-bg); color: var(--stay-fg);
}
.stay-main { flex: 1; min-width: 0; }
.stay-name { font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.stay-addr { font-size: 14px; color: var(--ink-2); overflow-wrap: anywhere; }
.stay-note { font-size: 14px; margin-top: 4px; white-space: pre-line; overflow-wrap: anywhere; }
.stay-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.info-cta { display: grid; gap: 8px; padding: 6px 0 12px; }
.info-cta p { margin: 0; font-size: 15px; color: var(--ink-2); }
.info-fields {
  display: grid;
  gap: 14px;
  padding: 14px 0 10px;
  border-top: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
}
.info-f { display: grid; grid-template-columns: 22px 1fr; gap: 10px; min-width: 0; }
.info-f > .i { width: 18px; height: 18px; margin-top: 2px; color: var(--ink-2); }
.info-f b { display: block; font-size: 13px; font-weight: 650; color: var(--ink-2); }
.info-f p { margin: 2px 0 0; font-size: 15px; white-space: pre-line; overflow-wrap: anywhere; min-width: 0; }
.info-f a { text-decoration-thickness: 1px; text-underline-offset: 2px; }
.info-toggle {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; height: 40px; margin-top: 2px;
  border-top: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  font-size: 14px; font-weight: 650; color: var(--ink-2);
}
.info-toggle .i { width: 18px; height: 18px; transition: transform .2s; }
.info-toggle[aria-expanded="true"] .i { transform: rotate(180deg); }

.mini-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 12px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-1);
  font-size: 14px; font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}
.mini-btn .i { width: 16px; height: 16px; }

/* Umschalter Neu / Beliebt / Tagesplan */
.seg {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  padding: 3px;
  margin: 0 0 14px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--ink) 7%, transparent);
}
.seg button { height: 36px; border-radius: 9px; font-size: 14.5px; font-weight: 650; color: var(--ink-2); }
.seg button[aria-selected="true"] { background: var(--raised); color: var(--ink); box-shadow: var(--shadow-1); }

/* Listen */
.list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--surface);
  border-radius: var(--r-l);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}
.row { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px; cursor: pointer; }
.row + .row::before { content: ""; position: absolute; top: 0; left: 80px; right: 0; border-top: 1px solid var(--line); }
.plan .row + .row::before { left: 72px; }
.row:active { background: var(--surface-2); }
.thumb {
  position: relative;
  width: 56px; height: 56px; flex: none;
  border-radius: 14px;
  display: grid; place-items: center;
  background: var(--c); color: #fff;
  overflow: hidden;
}
.thumb > .i { width: 24px; height: 24px; }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb .tag {
  position: absolute; right: 3px; bottom: 3px;
  width: 20px; height: 20px; border-radius: 7px;
  display: grid; place-items: center;
  background: var(--c); color: #fff;
  box-shadow: 0 0 0 2px var(--surface);
}
.thumb .tag .i { width: 12px; height: 12px; stroke-width: 2.5; }
.row-main { flex: 1; min-width: 0; }
.row-title {
  font-weight: 650;
  line-height: 1.25;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.row-meta {
  margin-top: 2px;
  font-size: 13.5px;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}
.row-meta .when { color: var(--ink); font-weight: 600; }
.row-who { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 13px; color: var(--ink-2); }
.dot-new {
  display: inline-block;
  width: 9px; height: 9px;
  margin-right: 6px;
  vertical-align: 1px;
  border-radius: 50%;
  background: var(--tram);
  box-shadow: 0 0 0 1.5px var(--tram-ink);
}

.join {
  flex: none;
  display: inline-flex; align-items: center; gap: 5px;
  height: 36px; padding: 0 13px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  font-size: 14px; font-weight: 700;
  white-space: nowrap;
  transition: background .15s, border-color .15s, transform .1s;
}
.join .i { width: 16px; height: 16px; stroke-width: 2.6; }
.join.on { background: var(--tram); border-color: var(--tram); color: var(--tram-ink); }
.join:active { transform: scale(.95); }
.join.big { height: 48px; padding: 0 20px; font-size: 16px; }

/* Avatare */
.avs { display: inline-flex; align-items: center; }
.av {
  --size: 24px;
  width: var(--size); height: var(--size); flex: none;
  border-radius: 50%;
  display: inline-grid; place-items: center;
  background: var(--av, var(--ink-3)); color: #fff;
  font-size: calc(var(--size) * .42); font-weight: 700; line-height: 1;
  letter-spacing: -.02em;
  box-shadow: 0 0 0 2px var(--surface);
}
.avs .av + .av { margin-left: -6px; }
.av.more { background: var(--surface-2); color: var(--ink-2); }
.avs.xs .av { --size: 20px; }
.av.md { --size: 32px; }
.av.lg { --size: 42px; font-size: 16px; box-shadow: none; }

/* Tagesplan */
.day { margin: 0 0 20px; }
.day-h {
  display: flex; align-items: center; gap: 8px;
  margin: 0 4px 8px;
  font: 720 18px/1.2 var(--font-display);
  letter-spacing: -.01em;
}
.day-h small { font: 500 14px var(--font-ui); color: var(--ink-2); }
.pill {
  font: 750 11px/1 var(--font-ui);
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--tram); color: var(--tram-ink);
}
.plan .row { align-items: flex-start; }
.when-col { width: 56px; flex: none; padding-top: 1px; font-weight: 750; font-variant-numeric: tabular-nums; }
.when-col.none { color: var(--ink-3); font-weight: 500; font-size: 13px; padding-top: 2px; }
.plan-n { flex: none; display: flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 650; color: var(--ink-2); padding-top: 1px; }
.plan-n .i { width: 15px; height: 15px; }
.plan-n.on { color: var(--ink); }
.day-empty {
  margin: 0;
  padding: 14px 16px;
  border-radius: var(--r-l);
  border: 1.5px dashed var(--line);
  color: var(--ink-2);
  font-size: 14.5px;
}
.plan-tip { margin: 4px 4px 0; font-size: 13.5px; color: var(--ink-2); }

/* Umfragen */
.poll {
  margin: 0 0 14px;
  padding: 16px;
  border-radius: var(--r-l);
  background: var(--surface);
  box-shadow: var(--shadow-1);
  scroll-margin-top: calc(var(--top-h) + 12px);
}
.poll.flash { animation: flash 1.6s ease; }
@keyframes flash { 0%, 40% { box-shadow: 0 0 0 3px var(--tram); } 100% { box-shadow: var(--shadow-1); } }
.poll-h { display: flex; gap: 8px; align-items: flex-start; }
.poll-q { flex: 1; margin: 0; font: 720 20px/1.22 var(--font-display); letter-spacing: -.015em; text-wrap: balance; overflow-wrap: anywhere; }
.poll-h .icon-btn { margin: -4px -8px 0 0; }
.poll-meta { margin: 4px 0 12px; font-size: 13px; color: var(--ink-2); }
.opts { display: grid; gap: 8px; }
.opt {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  width: 100%; min-height: 50px;
  padding: 8px 12px;
  border-radius: 13px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  text-align: left;
  overflow: hidden;
}
.opt > :not(.opt-bar) { position: relative; }
.opt-bar {
  position: absolute; inset: 0 auto 0 0;
  background: color-mix(in srgb, var(--ink) 7%, transparent);
  transition: width .35s ease;
}
.opt.on { border-color: var(--ink); }
.opt.on .opt-bar { background: color-mix(in srgb, var(--tram) 60%, transparent); }
.opt-check {
  width: 22px; height: 22px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1.5px solid var(--ink-3);
}
.poll.multi .opt-check { border-radius: 7px; }
.opt.on .opt-check { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.opt-check .i { width: 14px; height: 14px; stroke-width: 3; }
.opt-label { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; line-height: 1.3; }
.opt-n { min-width: 2ch; text-align: right; font-weight: 750; font-variant-numeric: tabular-nums; }
.poll.closed .opt { cursor: default; }
.poll.closed .opt-check { display: none; }
.opt.win { border-color: var(--ink); }
.opt.win .opt-bar { background: color-mix(in srgb, var(--tram) 60%, transparent); }
.poll-f { margin: 12px 0 0; font-size: 13.5px; color: var(--ink-2); }
.poll-f .missing { display: block; margin-top: 2px; color: var(--ink); }
.link-btn {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 8px; padding: 6px 2px;
  font-size: 14.5px; font-weight: 650; color: var(--ink-2);
}
.link-btn .i { width: 18px; height: 18px; }
.section-h { margin: 26px 4px 10px; }

/* Leere Zustände, Lade-Platzhalter, Hinweise */
.empty { padding: 22px 20px; border-radius: var(--r-l); background: var(--surface); box-shadow: var(--shadow-1); }
.empty h3 { margin: 0 0 6px; font: 720 20px/1.25 var(--font-display); letter-spacing: -.01em; text-wrap: balance; }
.empty p { margin: 0 0 16px; color: var(--ink-2); }
.skel {
  height: 80px; margin-bottom: 10px; border-radius: var(--r-l);
  background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%);
  background-size: 200% 100%;
  animation: sk 1.3s infinite linear;
}
@keyframes sk { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.banner {
  display: flex; align-items: center; gap: 8px;
  margin: 4px 0 12px; padding: 9px 12px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--paprika) 12%, var(--surface));
  font-size: 13.5px; font-weight: 600;
}

/* Hinzufügen-Knopf und Tabs */
.fab {
  position: fixed;
  right: max(16px, calc(50% - 324px));
  bottom: calc(var(--nav-total) + 16px);
  z-index: 45;
  width: 60px; height: 60px;
  border-radius: 20px;
  display: grid; place-items: center;
  background: var(--tram); color: var(--tram-ink);
  box-shadow: var(--shadow-2);
  transition: transform .12s;
}
.fab .i { width: 28px; height: 28px; stroke-width: 2.5; }
.fab:active { transform: scale(.94); }

.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: grid; grid-template-columns: repeat(3, 1fr);
  padding: 6px max(8px, calc(50% - 300px)) calc(var(--safe-b) + 6px);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  backdrop-filter: saturate(1.4) blur(16px);
  border-top: 1px solid var(--line);
}
.tab { display: grid; justify-items: center; gap: 3px; padding: 3px 0; color: var(--ink-3); font-size: 12px; font-weight: 650; }
.tab-ic {
  position: relative;
  width: 58px; height: 30px;
  display: grid; place-items: center;
  border-radius: 999px;
  transition: background .2s, color .2s;
}
.tab-ic .i { width: 22px; height: 22px; }
.tab[aria-selected="true"] { color: var(--ink); }
.tab[aria-selected="true"] .tab-ic { background: var(--tram); color: var(--tram-ink); }
.badge {
  position: absolute; top: -3px; right: 5px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px;
  background: var(--paprika); color: #fff;
  font: 750 11px/18px var(--font-ui);
  font-style: normal;
  text-align: center;
  box-shadow: 0 0 0 2px var(--surface);
}
.badge.dot { min-width: 10px; width: 10px; height: 10px; padding: 0; top: 1px; right: 12px; }

/* ---------- Sheets ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 100; }
.sheet-backdrop { position: absolute; inset: 0; background: rgb(8 10 11 / .45); opacity: 0; transition: opacity .25s; }
.sheet {
  position: absolute;
  left: 0; right: 0;
  bottom: var(--kb, 0px);
  max-width: 640px;
  max-height: calc(100% - var(--safe-t) - 12px - var(--kb, 0px));
  margin: 0 auto;
  display: flex; flex-direction: column;
  background: var(--surface);
  border-radius: 24px 24px 0 0;
  box-shadow: var(--shadow-2);
  transform: translateY(105%);
  transition: transform .32s cubic-bezier(.2, .8, .2, 1);
}
.sheet-wrap.tall .sheet { top: calc(var(--safe-t) + 12px); }
.sheet-wrap.open .sheet-backdrop { opacity: 1; }
.sheet-wrap.open .sheet { transform: none; }
.sheet-grab { width: 40px; height: 5px; margin: 8px auto 0; border-radius: 3px; background: var(--line); flex: none; }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px 4px 20px; flex: none; }
.sheet-head h2 { flex: 1; min-width: 0; margin: 0; font: 730 22px/1.2 var(--font-display); letter-spacing: -.015em; }
.sheet-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 8px 20px 24px;
}
.sheet-foot {
  flex: none;
  padding: 12px 20px calc(var(--safe-b) + 12px);
  border-top: 1px solid var(--line);
  background: var(--surface);
  border-radius: 0;
}
body.kb .sheet-foot { padding-bottom: 12px; }

.icon-btn { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 50%; color: var(--ink-2); }
.icon-btn:active { background: var(--surface-2); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 20px;
  border-radius: 16px;
  background: var(--surface-2); color: var(--ink);
  font-size: 16px; font-weight: 700;
  text-decoration: none;
  transition: transform .1s, background .15s;
}
.btn:active { transform: scale(.98); }
.btn .i { width: 19px; height: 19px; }
.btn.primary { background: var(--tram); color: var(--tram-ink); }
.btn.dark { background: var(--ink); color: var(--bg); }
.btn.ghost { background: transparent; border: 1.5px solid var(--line); }
.btn.danger { color: var(--paprika); }
.btn.danger.armed { background: var(--paprika); color: #fff; }
.btn.small { height: 40px; padding: 0 14px; font-size: 15px; border-radius: 12px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; transform: none; }
.btn-row { display: flex; gap: 10px; }
.btn-row > * { flex: 1; min-width: 0; }

/* Formulare */
.form { display: grid; gap: 20px; }
.fld { display: grid; gap: 8px; min-width: 0; }
.fld-l { font-size: 13.5px; font-weight: 700; color: var(--ink-2); }
.fld-l em { font-style: normal; font-weight: 500; color: var(--ink-3); }
.inp,
.fld input[type="text"], .fld input[type="url"], .fld input[type="search"], .fld input[type="date"], .fld input[type="time"],
.fld textarea, .gate input {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: var(--surface-2);
  font-size: 16px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.fld input[type="date"], .fld input[type="time"] { display: flex; align-items: center; }
input:focus, textarea:focus { border-color: var(--ink) !important; background: var(--surface) !important; }
.fld textarea { min-height: 84px; resize: vertical; line-height: 1.4; }
.fld textarea.tall { min-height: 120px; }
input::placeholder, textarea::placeholder { color: var(--ink-3); }
.inp-row { display: flex; gap: 8px; align-items: center; min-width: 0; }
.inp-row > input { flex: 1; min-width: 0; }
.inp-wrap { position: relative; flex: 1; min-width: 0; }
.inp-wrap > .i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--ink-3); pointer-events: none; }
.inp-wrap > input { padding-left: 42px !important; }
.chip-btn {
  flex: none;
  display: inline-flex; align-items: center; gap: 6px;
  height: 50px; padding: 0 14px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  font-size: 14.5px; font-weight: 650;
  white-space: nowrap;
}
.chip-btn .i { width: 18px; height: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 40px; padding: 0 14px 0 11px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  font-size: 14.5px; font-weight: 650;
  white-space: nowrap;
}
.chip .i { width: 17px; height: 17px; color: var(--c, var(--ink-2)); }
.chip.plain { padding: 0 14px; }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip.on .i { color: inherit; }
.time-row { display: flex; gap: 8px; align-items: center; margin-top: 2px; }
.time-row input { max-width: 150px; }
.time-row span { font-size: 14px; color: var(--ink-2); }
.err { margin: 0; color: var(--paprika); font-size: 14.5px; font-weight: 650; }
.hint { margin: 0; font-size: 13.5px; color: var(--ink-2); }

.switch {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: var(--surface-2);
  font-weight: 650;
  cursor: pointer;
}
.switch input {
  position: relative;
  flex: none;
  width: 48px; height: 30px; margin: 0;
  border-radius: 999px;
  background: var(--line);
  -webkit-appearance: none;
  appearance: none;
  transition: background .2s;
  cursor: pointer;
}
.switch input::after {
  content: "";
  position: absolute; top: 3px; left: 3px;
  width: 24px; height: 24px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgb(0 0 0 / .3);
  transition: transform .2s;
}
.switch input:checked { background: var(--ink); }
.switch input:checked::after { transform: translateX(18px); }
.switch small { display: block; font-weight: 500; color: var(--ink-2); font-size: 13px; }

/* Link-Vorschau */
.prev { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); min-width: 0; }
.prev img { width: 60px; height: 60px; flex: none; border-radius: 11px; object-fit: cover; background: var(--line); }
.prev-txt { flex: 1; min-width: 0; }
.prev-t { font-weight: 650; line-height: 1.25; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prev-s { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.prev-load, .prev-msg { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); }
.spin { width: 18px; height: 18px; flex: none; border-radius: 50%; border: 2.5px solid var(--line); border-top-color: var(--ink); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Ort-Auswahl */
.loc-sel { display: flex; align-items: center; gap: 10px; padding: 8px 4px 8px 12px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface-2); min-width: 0; }
.loc-sel > .i { color: var(--paprika); }
.loc-txt { flex: 1; min-width: 0; }
.loc-txt b { display: block; font-weight: 650; overflow-wrap: anywhere; line-height: 1.3; }
.loc-txt span { display: block; font-size: 13px; color: var(--ink-2); }
.loc-res { list-style: none; margin: 8px 0 0; padding: 0; border-radius: 14px; border: 1px solid var(--line); overflow: hidden; background: var(--surface); }
.loc-res:empty { display: none; }
.loc-res li + li { border-top: 1px solid var(--line); }
.loc-res button { display: grid; gap: 1px; width: 100%; padding: 11px 14px; text-align: left; }
.loc-res button:active { background: var(--surface-2); }
.loc-res b { font-weight: 650; overflow-wrap: anywhere; }
.loc-res span { font-size: 13px; color: var(--ink-2); }
.loc-res .note { padding: 11px 14px; font-size: 14px; color: var(--ink-2); }

/* Detailansicht */
.det-img { margin: -8px -20px 16px; aspect-ratio: 16 / 9; max-height: 260px; width: calc(100% + 40px); overflow: hidden; background: var(--surface-2); }
.det-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.det-cat { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700; color: var(--c); }
.det-cat .i { width: 16px; height: 16px; }
.det-title { margin: 6px 0 0; font: 740 26px/1.15 var(--font-display); letter-spacing: -.02em; text-wrap: balance; overflow-wrap: anywhere; }
.det-note { margin: 10px 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.det-join { display: grid; gap: 10px; margin: 18px 0 8px; padding: 14px; border-radius: 18px; background: var(--surface-2); }
.det-join-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.det-names { font-size: 14px; color: var(--ink-2); }
.facts { display: grid; margin-top: 4px; }
.fact { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.fact:first-child { border-top: 0; }
.fact > .i { color: var(--ink-2); }
.fact-v b { display: block; font-weight: 650; overflow-wrap: anywhere; line-height: 1.3; }
.fact-v span { display: block; font-size: 13.5px; color: var(--ink-2); overflow-wrap: anywhere; }
.fact-v a { overflow-wrap: anywhere; }
.fact-acts { display: flex; gap: 6px; }
.fact-edit { display: grid; gap: 12px; padding: 4px 0 14px; }
.det-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--ink-2); }
.det-foot .btn-row { flex: none; }

/* Leute */
.people { list-style: none; margin: 0; padding: 0; }
.person { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.person:first-child { border-top: 0; }
.person-n { flex: 1; min-width: 0; font-weight: 650; overflow-wrap: anywhere; }
.person-n small { font-weight: 500; color: var(--ink-2); }
.me-card { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 18px; background: var(--surface-2); }
.me-card .person-n { font-size: 17px; }
.share-box { display: grid; gap: 10px; padding: 14px; border-radius: 18px; background: var(--tram-soft); }
.share-box p { margin: 0; font-size: 14.5px; }
.share-url { font-size: 13px; color: var(--ink-2); overflow-wrap: anywhere; user-select: all; -webkit-user-select: all; }

/* Aktionsliste (Menüs) */
.actions { display: grid; gap: 8px; }
.action {
  display: flex; align-items: center; gap: 12px;
  height: 54px; padding: 0 16px;
  border-radius: 16px;
  background: var(--surface-2);
  font-weight: 650; text-align: left;
}
.action .i { color: var(--ink-2); }
.action.danger, .action.danger .i { color: var(--paprika); }
.action.armed { background: var(--paprika); color: #fff; }
.action.armed .i { color: #fff; }

.opt-inputs { display: grid; gap: 8px; }
.opt-in { display: flex; gap: 6px; align-items: center; }
.opt-in input { flex: 1; min-width: 0; }

/* ---------- Karte ---------- */
.view-map { position: fixed; inset: 0; z-index: 1; }
.map { position: absolute; inset: 0; background: var(--surface-2); }
.pin-wrap { width: 34px; height: 34px; cursor: pointer; }
.pin {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 50% 50% 50% 5px;
  transform: rotate(-45deg);
  transform-origin: 0 100%;
  background: var(--c); color: #fff;
  border: 2px solid #fff;
  box-shadow: 0 3px 10px rgb(0 0 0 / .3);
  transition: transform .15s;
}
.pin .i { width: 17px; height: 17px; transform: rotate(45deg); }
.pin.sel { transform: rotate(-45deg) scale(1.28); }
.pin.stay { background: #17191B; color: var(--tram); border-color: var(--tram); }
.me-dot { width: 18px; height: 18px; border-radius: 50%; background: #2C6BD6; border: 3px solid #fff; box-shadow: 0 0 0 7px rgb(44 107 214 / .22), 0 2px 6px rgb(0 0 0 / .3); }
.map-tools { position: absolute; right: 12px; top: calc(var(--top-h) + 12px); z-index: 1000; display: grid; gap: 8px; }
.round-btn { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 15px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-2); }
.round-btn:active { transform: scale(.95); }
.map-hint {
  position: absolute; left: 12px; right: 70px; top: calc(var(--top-h) + 12px); z-index: 1000;
  width: fit-content; max-width: calc(100% - 82px);
  margin: 0; padding: 10px 14px;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-2);
  font-size: 14px; color: var(--ink-2);
}
.map-card {
  position: absolute;
  left: 12px; right: 12px;
  bottom: calc(var(--nav-total) + 12px);
  z-index: 1000;
  max-width: 560px;
  margin: 0 auto;
  padding: 12px;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-2);
}
.map-card .row { padding: 0; cursor: pointer; }
.map-card .row:active { background: none; }
.map-card-acts { display: flex; gap: 8px; margin-top: 12px; }
.map-card-acts > * { flex: 1; }

/* Ort auf der Karte wählen */
.picker { position: fixed; inset: 0; z-index: 200; display: grid; grid-template-rows: auto 1fr auto; background: var(--bg); }
.picker-top { display: flex; align-items: center; gap: 6px; padding: calc(var(--safe-t) + 8px) 12px 8px 6px; font-weight: 650; }
.picker-mapwrap { position: relative; }
.picker-map { position: absolute; inset: 0; }
.picker-pin { position: absolute; left: 50%; top: 50%; z-index: 1000; pointer-events: none; transform: translate(0, -34px); }
.picker-foot { display: grid; gap: 10px; padding: 12px 16px calc(var(--safe-b) + 12px); background: var(--surface); border-top: 1px solid var(--line); }
.picker-addr { min-height: 20px; font-size: 14.5px; color: var(--ink-2); }

/* ---------- Wer bist du? ---------- */
.gate {
  position: fixed; inset: 0; z-index: 150;
  overflow-y: auto;
  padding: calc(var(--safe-t) + 40px) 20px calc(var(--safe-b) + 32px);
  background: var(--bg);
}
.gate-in { max-width: 440px; margin: 0 auto; display: grid; gap: 22px; }
.gate-mark { width: 60px; height: 60px; border-radius: 16px; }
.gate h1 { margin: 0; font: 780 44px/1 var(--font-display); letter-spacing: -.035em; }
.gate-lead { margin: -8px 0 0; font-size: 17px; color: var(--ink-2); }
.gate-names { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.name-btn {
  display: flex; align-items: center; gap: 10px;
  min-width: 0; padding: 10px 12px;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-1);
  font-weight: 650; text-align: left;
}
.name-btn > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.name-btn:active { transform: scale(.98); }
.gate-new { display: grid; gap: 10px; }
.gate-msg { margin: 0; font-size: 15px; color: var(--ink-2); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%;
  bottom: calc(var(--nav-total) + 92px);
  z-index: 300;
  max-width: calc(100% - 32px);
  padding: 11px 18px;
  border-radius: 999px;
  background: var(--ink); color: var(--bg);
  font-size: 14.5px; font-weight: 650; text-align: center;
  opacity: 0;
  transform: translate(-50%, 16px);
  transition: opacity .25s, transform .25s;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

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

/* Nachträge */
body.sheet-open { overflow: hidden; }
.when-f { display: grid; gap: 10px; }
.when-f .link-btn { margin: 0; justify-self: start; }
.fact-edit .btn-row { margin-top: 12px; }
.stay-name { display: block; padding: 0; text-align: left; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.row { align-items: flex-start; }
.row-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; min-height: 34px; }
.row-foot .row-who { margin-top: 0; min-width: 0; }
.row-foot .join { height: 34px; padding: 0 12px; font-size: 13.5px; }
.map .maplibregl-ctrl-bottom-left { bottom: var(--nav-total); }
.maplibregl-ctrl-attrib { font: 11px/1.4 var(--font-ui); }
.maplibregl-ctrl-attrib a { color: inherit; }
.picker-map .maplibregl-ctrl-bottom-left { bottom: 0; }
.map .maplibregl-ctrl-attrib.maplibregl-compact-show { max-width: calc(100vw - 112px); }
.thumb .tag { color: #fff; }
.when-f input[type="date"], .when-f input[type="time"] {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: var(--surface-2);
  font-size: 16px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.when-f .time-row input { max-width: 150px; }

/* ---------- Bewertung 1–10 ---------- */
.score { color: var(--ink); font-weight: 650; }
.rate { display: grid; gap: 8px; margin: 10px 0 8px; padding: 14px; border-radius: 18px; background: var(--surface-2); }
.rate-h { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 10px; }
.rate-h b { font-weight: 700; }
.rate-h span { font-size: 13.5px; color: var(--ink-2); }
.rate-h strong { color: var(--ink); }
.rate-scale { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; }
.rate-scale button {
  height: 40px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 14.5px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  transition: background .12s, border-color .12s, transform .1s;
}
.rate-scale button:active { transform: scale(.94); }
.rate-scale button.fill { background: color-mix(in srgb, var(--tram) 42%, var(--surface)); border-color: transparent; color: var(--tram-ink); }
.rate-scale button.on { background: var(--tram); border-color: var(--tram); color: var(--tram-ink); }
.rate-ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-3); }

/* ---------- KI ---------- */
.ai-btn {
  width: 42px; height: 42px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--tram-soft); color: var(--ink);
}
.ai-btn .i { width: 21px; height: 21px; }
.ai-btn:active { transform: scale(.95); }
.ask-item { margin-top: 14px; }
.chat { display: grid; gap: 14px; padding-bottom: 6px; }
.chat-empty { display: grid; gap: 14px; }
.chat-intro { margin: 0; color: var(--ink-2); font-size: 15px; }
.suggest { display: flex; flex-wrap: wrap; gap: 8px; }
.suggest .chip { height: auto; min-height: 40px; padding: 8px 14px; white-space: normal; text-align: left; line-height: 1.3; }
.msg { min-width: 0; overflow-wrap: anywhere; }
.msg.user {
  justify-self: end;
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 18px 18px 5px 18px;
  background: var(--ink); color: var(--bg);
  font-weight: 500;
  white-space: pre-wrap;
}
.msg.ai { font-size: 15.5px; line-height: 1.5; }
.msg.ai p { margin: 0 0 8px; }
.msg.ai ul, .msg.ai ol { display: grid; gap: 5px; margin: 0 0 8px; padding-left: 20px; }
.msg.ai h4 { margin: 12px 0 6px; font: 720 16.5px/1.3 var(--font-display); }
.msg.ai a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.msg.ai code { padding: 1px 5px; border-radius: 6px; background: var(--surface-2); font-size: 14px; }
.msg-err { margin: 0; color: var(--paprika); font-weight: 650; }
.ai-status { display: flex; align-items: center; gap: 10px; font-size: 14.5px; color: var(--ink-2); }
.chat-clear { justify-self: center; margin-top: 0; }
.ask-bar { display: flex; align-items: flex-end; gap: 8px; }
.ask-bar textarea {
  flex: 1; min-width: 0;
  min-height: 48px; max-height: 120px;
  padding: 12px 16px;
  border-radius: 24px;
  border: 1.5px solid var(--line);
  background: var(--surface-2);
  font-size: 16px; line-height: 1.35;
  resize: none; outline: none;
}
.ask-send {
  width: 48px; height: 48px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--tram); color: var(--tram-ink);
}
.ask-send .i { width: 22px; height: 22px; }
.ask-send:disabled { opacity: .45; }
