:root {
  --bg: #f3f6fa;
  --surface: #ffffff;
  --surface-2: #eef2f7;
  --border: #d8e0ea;
  --text: #15202e;
  --text-2: #4a5a6e;
  --muted: #708096;
  --accent: #1f5fae;
  --accent-ink: #ffffff;
  --accent-soft: #e2edfa;
  --good: #1d7a46;
  --good-soft: #e3f4ea;
  --warn: #9a6200;
  --warn-soft: #fdf2dc;
  --bad: #b3261e;
  --bad-soft: #fbe6e4;
  --bar: #3d7cc9;
  --bar-over: #c2412d;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(20, 32, 46, .06), 0 2px 8px rgba(20, 32, 46, .05);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e141c;
    --surface: #161e29;
    --surface-2: #1d2734;
    --border: #2b3848;
    --text: #e6edf5;
    --text-2: #b3c0cf;
    --muted: #8796a8;
    --accent: #6ea8f0;
    --accent-ink: #0b1420;
    --accent-soft: #1c2c42;
    --good: #5cc98a;
    --good-soft: #15291f;
    --warn: #e7b04f;
    --warn-soft: #2d2412;
    --bad: #f08a80;
    --bad-soft: #321a19;
    --bar: #5f9ae3;
    --bar-over: #e86a55;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  padding-bottom: calc(76px + env(safe-area-inset-bottom));
}
a { color: var(--accent); }
h1 { font-size: 1.5rem; margin: .2rem 0 1rem; line-height: 1.25; }
h2 { font-size: 1.15rem; margin: 0 0 .75rem; }
h3 { font-size: 1rem; margin: 1rem 0 .5rem; }
p { margin: .4rem 0 .8rem; }
small, .muted { color: var(--muted); }
.text-2 { color: var(--text-2); }
hr { border: 0; border-top: 1px solid var(--border); margin: 1rem 0; }
code { background: var(--surface-2); padding: .1rem .35rem; border-radius: 6px; font-size: .9em; }

/* Kopf & Navigation */
.top {
  position: sticky; top: 0; z-index: 20;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top);
}
.top-inner { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; gap: 1rem; padding: .6rem 16px; }
.brand { font-weight: 700; text-decoration: none; color: var(--text); white-space: nowrap; display: flex; align-items: center; gap: .45rem; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.topnav { display: flex; gap: .15rem; flex-wrap: wrap; flex: 1; }
.topnav a { text-decoration: none; color: var(--text-2); padding: .35rem .6rem; border-radius: 8px; font-size: .95rem; }
.topnav a:hover { background: var(--surface-2); }
.topnav a.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.top-user { display: flex; align-items: center; gap: .5rem; font-size: .9rem; color: var(--muted); }
.top-user form { margin: 0; }
.linkbtn { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; padding: 0; }

.bottomnav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
  background: var(--surface); border-top: 1px solid var(--border);
  display: none; justify-content: space-around;
  padding: .3rem .25rem calc(.3rem + env(safe-area-inset-bottom));
}
.bottomnav a {
  flex: 1; text-align: center; text-decoration: none; color: var(--muted);
  font-size: .72rem; display: flex; flex-direction: column; align-items: center; gap: .1rem; padding: .25rem 0;
}
.bottomnav a .ico { font-size: 1.3rem; line-height: 1.2; }
.bottomnav a.on { color: var(--accent); font-weight: 600; }

@media (max-width: 860px) {
  .topnav { display: none; }
  .bottomnav { display: flex; }
}
@media (min-width: 861px) { body { padding-bottom: 2rem; } }

main { max-width: 1100px; margin: 0 auto; padding: 1rem 16px 2rem; }
.narrow { max-width: 640px; }

/* Karten & Raster */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem 1.1rem; margin-bottom: 1rem; box-shadow: var(--shadow);
}
.card > :last-child { margin-bottom: 0; }
.card.accent { border-color: var(--accent); }
.card.warn { background: var(--warn-soft); border-color: transparent; }
.card.good { background: var(--good-soft); border-color: transparent; }
.card.bad { background: var(--bad-soft); border-color: transparent; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-bottom: 1rem; }
.grid > .card { margin-bottom: 0; }
.grid-2 { display: grid; gap: .75rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 520px) { .grid-2 { grid-template-columns: 1fr; } }
.split { display: grid; gap: 1rem; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: minmax(0, 1fr); } }
.stack > * + * { margin-top: .5rem; }
.row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }

.tiles { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.tile {
  display: block; text-decoration: none; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow);
}
.tile .ico { font-size: 1.6rem; display: block; margin-bottom: .3rem; }
.tile strong { display: block; }
.tile small { display: block; }

.kpis { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin-bottom: 1rem; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .75rem .9rem; }
.kpi .v { font-size: 1.45rem; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.kpi .l { font-size: .82rem; color: var(--muted); }

.big { font-size: 2rem; font-weight: 750; line-height: 1.15; font-variant-numeric: tabular-nums; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.right { text-align: right; }

/* Badges */
.badge {
  display: inline-block; font-size: .75rem; font-weight: 600; padding: .1rem .5rem; border-radius: 999px;
  background: var(--surface-2); color: var(--text-2); white-space: nowrap; vertical-align: middle;
}
.badge.good { background: var(--good-soft); color: var(--good); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.accent { background: var(--accent-soft); color: var(--accent); }

/* Flash */
.flash { padding: .7rem .9rem; border-radius: 10px; margin-bottom: .75rem; background: var(--accent-soft); }
.flash.ok { background: var(--good-soft); color: var(--good); }
.flash.warn { background: var(--warn-soft); color: var(--warn); }
.flash.error { background: var(--bad-soft); color: var(--bad); }

/* Formulare */
label { display: block; font-weight: 600; font-size: .9rem; margin: .6rem 0 .25rem; }
label.check { display: flex; gap: .5rem; align-items: flex-start; font-weight: 400; font-size: 1rem; margin: .4rem 0; }
label.check input { margin-top: .3rem; }
.hint { font-size: .82rem; color: var(--muted); margin-top: .2rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date],
input[type=time], input[type=tel], input[type=file], input[type=search], select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px; padding: .6rem .7rem; min-height: 44px;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px;
}
input[type=checkbox], input[type=radio] { width: 1.15rem; height: 1.15rem; accent-color: var(--accent); }
fieldset { border: 1px solid var(--border); border-radius: 10px; padding: .4rem .8rem .6rem; margin: .6rem 0; }
legend { font-weight: 600; font-size: .9rem; padding: 0 .3rem; }
.choice { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.choice label {
  border: 1px solid var(--border); border-radius: 10px; padding: .7rem .8rem; margin: 0; font-weight: 500;
  display: flex; gap: .55rem; align-items: center; cursor: pointer; background: var(--surface);
}
.choice label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }

[hidden] { display: none !important; }  /* auch für Buttons mit eigenem display */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent);
  border-radius: 10px; padding: .55rem 1rem; min-height: 44px;
}
.btn.secondary { background: var(--surface); color: var(--accent); }
.btn.ghost { background: transparent; color: var(--text-2); border-color: var(--border); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.small { padding: .25rem .65rem; min-height: 34px; font-size: .88rem; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
form.inline { display: inline; margin: 0; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1rem; }

/* Tabellen */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -1.1rem; padding: 0 1.1rem; }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { text-align: left; padding: .5rem .5rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: .8rem; color: var(--muted); font-weight: 600; white-space: nowrap; }
tr.dim td { color: var(--muted); }
td.num, th.num { text-align: right; }
tfoot td { font-weight: 700; border-top: 2px solid var(--border); }

/* Listen */
.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: .6rem 0; border-bottom: 1px solid var(--border); display: flex; gap: .6rem; align-items: center; }
.list li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.done-item .grow { text-decoration: line-through; color: var(--muted); }

/* Belegung: Mini-Zeitleiste und Balken */
.timeline { display: grid; grid-template-columns: repeat(var(--n, 10), 1fr); gap: 2px; min-width: 120px; }
.timeline span { height: 10px; border-radius: 3px; background: var(--surface-2); }
.timeline span.on { background: var(--bar); }
.timeline span.over { background: var(--bar-over); }
.timeline-head { display: grid; grid-template-columns: repeat(var(--n, 10), 1fr); gap: 2px; font-size: .68rem; color: var(--muted); text-align: center; }

.occ { display: grid; grid-template-columns: repeat(var(--n, 10), 1fr); gap: 2px; align-items: end; height: 170px; position: relative; margin-top: .5rem; }
.occ .col { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.occ .bar { width: 100%; max-width: 42px; background: var(--bar); border-radius: 4px 4px 0 0; min-height: 2px; }
.occ .bar.over { background: var(--bar-over); }
.occ .col .tip {
  position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%);
  background: var(--text); color: var(--bg); font-size: .75rem; padding: .2rem .45rem; border-radius: 6px;
  white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .1s;
}
.occ .col:hover .tip, .occ .col:focus .tip { opacity: 1; }
.occ .cap { position: absolute; left: 0; right: 0; border-top: 2px dashed var(--muted); pointer-events: none; }
.occ .cap span { position: absolute; right: 0; top: -1.3rem; font-size: .72rem; color: var(--text-2); background: var(--surface); padding: 0 .25rem; }
.occ-axis { display: grid; grid-template-columns: repeat(var(--n, 10), 1fr); gap: 2px; font-size: .72rem; color: var(--muted); text-align: center; margin-top: .25rem; border-top: 1px solid var(--border); padding-top: .25rem; }
.occ-axis b { display: block; color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }

/* Zimmer */
.rooms { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.room { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .8rem .9rem; }
.room.mine { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.room.optional { border-style: dashed; }
.room.off { opacity: .6; }
.room h3 { margin: 0; font-size: 1rem; }
.room .people { list-style: none; padding: 0; margin: .5rem 0 0; }
.room .people li { display: grid; grid-template-columns: 1fr 110px; gap: .5rem; align-items: center; font-size: .9rem; padding: .2rem 0; }
.room .nightcount { display: grid; grid-template-columns: repeat(var(--n, 10), 1fr); gap: 2px; margin-top: .4rem; font-size: .66rem; text-align: center; color: var(--muted); }
.room .nightcount .over { color: var(--bad); font-weight: 700; }

/* QR */
.qr { background: #fff; padding: .4rem; border-radius: 10px; width: 170px; height: 170px; }
.bank { display: grid; grid-template-columns: auto 1fr; gap: .15rem .8rem; font-size: .95rem; }
.bank dt { color: var(--muted); }
.bank dd { margin: 0; font-variant-numeric: tabular-nums; word-break: break-all; }

/* Login */
.login { max-width: 400px; margin: 5vh auto 0; }
.login .card { overflow: hidden; }
.login-hero { display: block; width: calc(100% + 2.2rem); max-width: none; margin: -1rem -1.1rem 1rem; aspect-ratio: 4 / 3; object-fit: cover; }

/* Galerie */
.gallery { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); margin: 0; }
.gallery.chalet { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.gallery .ph { position: relative; margin: 0; display: block; color: inherit; text-decoration: none; }
.gallery .ph img {
  display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: var(--surface-2);
}
.gallery.chalet .ph img { aspect-ratio: 4 / 3; }
.gallery .cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 1.2rem .6rem .45rem; border-radius: 0 0 10px 10px;
  color: #fff; font-size: .85rem; font-weight: 600; background: linear-gradient(transparent, rgba(0, 0, 0, .6));
}
.gallery figcaption { display: flex; gap: .4rem; align-items: baseline; font-size: .8rem; padding: .25rem .1rem 0; }
.gallery figcaption .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gallery figcaption .linkbtn { font-size: .8rem; color: var(--muted); }
.gallery-day { font-size: 1rem; margin: 1.2rem 0 .5rem; color: var(--text-2); }
.gallery .video {
  display: grid; place-items: center; aspect-ratio: 1; border-radius: 10px; background: var(--surface-2);
  text-decoration: none; padding: .6rem; font-size: .85rem; text-align: center; overflow-wrap: anywhere;
}
@media (max-width: 600px) { .gallery.chalet { grid-template-columns: repeat(2, 1fr); } }

.lightbox {
  border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh;
}
.lightbox::backdrop { background: rgba(5, 8, 12, .92); }
.lightbox[open] { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.lightbox img { max-width: 96vw; max-height: 84vh; object-fit: contain; border-radius: 6px; }
.lb-cap { color: #e6edf5; margin: .6rem 1rem 0; text-align: center; min-height: 1.5em; }
.lb-btn {
  position: fixed; background: rgba(255, 255, 255, .12); color: #fff; border: 0; border-radius: 999px;
  width: 48px; height: 48px; font-size: 1.8rem; line-height: 1; cursor: pointer;
}
.lb-btn:hover { background: rgba(255, 255, 255, .25); }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
.lb-close { right: 12px; top: calc(12px + env(safe-area-inset-top)); }

.details summary { cursor: pointer; font-weight: 600; }
.pill-list { display: flex; flex-wrap: wrap; gap: .3rem; }
.pill-list span { background: var(--surface-2); padding: .1rem .55rem; border-radius: 999px; font-size: .85rem; }

@media print {
  .top, .bottomnav, .noprint { display: none !important; }
  body { background: #fff; padding: 0; }
  main { padding: 0; max-width: none; }
  .card { box-shadow: none; border: 0; }
}

/* Hinweise */
.callout { background: var(--accent-soft); border-radius: 10px; padding: .6rem .8rem; font-size: .92rem; }
.install-tip p { margin: .4rem 0; font-size: .92rem; }
.install-tip .x { float: right; margin: -.3rem -.4rem 0 .5rem; }

/* Dienste: Frühstück & Abendessen */
.meals { display: grid; gap: .5rem; }
.meal-day { display: grid; grid-template-columns: 3.4rem 1fr 1fr; gap: .5rem; align-items: stretch; scroll-margin-top: 4.5rem; }
.meal-date { display: flex; flex-direction: column; justify-content: center; line-height: 1.2; }
.meal-date small { color: var(--muted); font-size: .75rem; }
.meal { background: var(--surface-2); border-radius: 10px; padding: .45rem .55rem; display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.meal.staffed { background: var(--good-soft); }
.meal.empty { justify-content: center; background: transparent; border: 1px dashed var(--border); }
.meal-head { display: flex; justify-content: space-between; align-items: center; gap: .3rem; font-size: .88rem; }
.chips { display: flex; flex-wrap: wrap; gap: .25rem; align-items: center; }
.chip { background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: .05rem .5rem; font-size: .8rem; white-space: nowrap; }
.chip.me { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.dish { font-size: .88rem; overflow-wrap: anywhere; }
.dish-form { display: flex; gap: .3rem; }
.dish-form input { padding: .3rem .45rem; font-size: .85rem; min-width: 0; }
.plus { width: 2rem; height: 2rem; flex: none; border-radius: 50%; border: 1.5px solid var(--accent); background: var(--surface); color: var(--accent);
  font-size: 1.2rem; line-height: 1; font-weight: 700; cursor: pointer; display: inline-grid; place-items: center; padding: 0; }
.plus:hover { background: var(--accent-soft); }
.plus.on { background: var(--accent); color: var(--accent-ink); font-size: 1rem; }
@media (max-width: 600px) {
  .meal-day { grid-template-columns: 2.6rem 1fr 1fr; gap: .35rem; }
  .meal-date small { font-size: .68rem; }
  .meal { padding: .4rem .45rem; }
  .meal-head { font-size: .8rem; }
  .dish-form { flex-wrap: wrap; }
}

/* Diashow auf der Startseite */
.slideshow { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 21 / 8; margin-bottom: 1rem; background: #1c2633; }
.slideshow .slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity 1.2s ease; }
.slideshow .slide.on { opacity: 1; }
.slideshow img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slideshow figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.6rem .9rem .55rem; color: #fff; font-size: .85rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, .55)); }
.slideshow .dots { position: absolute; right: .7rem; bottom: .55rem; display: flex; gap: .1rem; }
.slideshow .dots button { width: 1.5rem; height: 1.5rem; border: 0; padding: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.slideshow .dots button::after { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: rgba(255, 255, 255, .55); }
.slideshow .dots button.on::after { background: #fff; }
@media (max-width: 600px) { .slideshow { aspect-ratio: 16 / 9; } .slideshow figcaption { padding-right: 7rem; } }
@media (prefers-reduced-motion: reduce) { .slideshow .slide { transition: none; } }

/* Gruppenfarben (Hauptanmelder + Begleitung) – immer mit Namen „Gruppe …“, nie Farbe allein */
.gc0 { --gc: #2a6fdb; } .gc1 { --gc: #d9730d; } .gc2 { --gc: #2e9e5b; } .gc3 { --gc: #8a4fd1; }
.gc4 { --gc: #d23f5b; } .gc5 { --gc: #13919a; } .gc6 { --gc: #b8860b; } .gc7 { --gc: #6b7c93; }
@media (prefers-color-scheme: dark) {
  .gc0 { --gc: #6ea8f0; } .gc1 { --gc: #f0a35e; } .gc2 { --gc: #5cc98a; } .gc3 { --gc: #b892f0; }
  .gc4 { --gc: #f07a90; } .gc5 { --gc: #4cc4cc; } .gc6 { --gc: #e0b84a; } .gc7 { --gc: #9aa9bd; }
}
.grp { border-left: 4px solid var(--gc, transparent); padding-left: .6rem !important; }
.gdot { display: inline-block; width: .65rem; height: .65rem; border-radius: 50%; background: var(--gc); margin-right: .25rem; vertical-align: baseline; }
.gtag { color: var(--gc); font-weight: 600; }

/* Chat */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.topics .topic-link { text-decoration: none; color: var(--text); min-width: 0; }
.topics .topic-link small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topic-meta { display: flex; flex-direction: column; align-items: flex-end; gap: .2rem; flex: none; }
.msgs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .45rem; }
.msg { display: flex; }
.msg.mine { justify-content: flex-end; }
.bubble { max-width: 85%; background: var(--surface-2); border-radius: 14px 14px 14px 4px; padding: .45rem .7rem; }
.msg.mine .bubble { background: var(--accent-soft); border-radius: 14px 14px 4px 14px; }
.bubble .who { display: block; font-size: .8rem; color: var(--accent); }
.bubble .body { white-space: pre-line; overflow-wrap: anywhere; }
.bubble .when { display: block; font-size: .72rem; color: var(--muted); margin-top: .15rem; }
.bubble .when .linkbtn { font-size: .72rem; color: var(--muted); margin-left: .4rem; }
.msg.new .bubble { animation: msg-in .4s ease; }
@keyframes msg-in { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .msg.new .bubble { animation: none; } }
.composer { display: flex; gap: .5rem; align-items: flex-end; margin-top: .9rem; border-top: 1px solid var(--border); padding-top: .8rem; }
.composer textarea { flex: 1; min-height: 2.6rem; resize: vertical; }
.navbadge { display: inline-block; min-width: 1.1rem; padding: 0 .3rem; border-radius: 999px; background: var(--bad, #c62828); color: #fff;
  font-size: .68rem; font-weight: 700; line-height: 1.1rem; text-align: center; margin-left: .2rem; vertical-align: top; }
.bottomnav a { position: relative; }
.bottomnav .navbadge { position: absolute; top: 0; left: 50%; margin-left: .35rem; }

/* Zimmerplan nach Grundriss */
/* alle Stockwerke im selben Maßstab; am Handy etwas kleiner, breite Pläne lassen sich wischen */
.floors { display: flex; flex-wrap: wrap; gap: 1rem 1.6rem; align-items: flex-start; }
.floor { margin: 0; width: calc(var(--w) * .85px); max-width: 100%; }
.floor figcaption { font-weight: 600; font-size: .9rem; margin-bottom: .3rem; color: var(--text-2); }
.floor-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.floor.scrolls figcaption::after { content: " · ↔ wischen"; font-weight: 400; color: var(--muted); }
.floor svg { display: block; width: 100%; min-width: calc(var(--w) * .7px); height: auto; }
.fp-area rect { fill: var(--surface-2); stroke: var(--border); stroke-width: 1.5; }
.fp-area text { fill: var(--muted); font-size: 14px; text-anchor: middle; }
.fp-room rect { fill: var(--good-soft); stroke: var(--text-2); stroke-width: 2.5; }
.fp-room text { text-anchor: middle; fill: var(--text); }
.fp-room .fp-code { font-size: 22px; font-weight: 700; }
.fp-room .fp-sub { font-size: 13px; font-weight: 400; fill: var(--text-2); }
.fp-room .fp-code.small { font-size: 16px; }
.fp-room .fp-name { font-weight: 600; }
.fp-room.used rect { fill: var(--warn-soft); }
.fp-room.full rect { fill: var(--surface); }
.fp-room.mine rect { fill: var(--accent); stroke: var(--accent); }
.fp-room.mine text { fill: var(--accent-ink); }
.fp-room.off rect { fill: transparent; stroke-dasharray: 6 5; stroke: var(--muted); }
.fp-room.off text { fill: var(--muted); }
.fp-room:hover rect, .fp-room:focus rect { stroke: var(--accent); stroke-width: 4; }
.fp-legend { list-style: none; padding: 0; margin: .7rem 0 0; display: flex; flex-wrap: wrap; gap: .3rem .9rem; font-size: .8rem; color: var(--text-2); }
.fp-legend .sw { display: inline-block; width: .9rem; height: .9rem; border-radius: 3px; vertical-align: -2px; margin-right: .3rem; border: 1.5px solid var(--text-2); }
.fp-legend .sw.free { background: var(--good-soft); }
.fp-legend .sw.used { background: var(--warn-soft); }
.fp-legend .sw.full { background: var(--surface); }
.fp-legend .sw.mine { background: var(--accent); border-color: var(--accent); }
.fp-legend .sw.off { background: transparent; border-style: dashed; border-color: var(--muted); }
.fp-legend .sw.area { background: var(--surface-2); border-color: var(--border); }
.room { scroll-margin-top: 4.5rem; }
.room:target { box-shadow: 0 0 0 3px var(--accent); }
.fp-dialog { border: 0; border-radius: var(--radius); padding: 1rem 1.1rem; width: min(26rem, calc(100vw - 2rem));
  background: var(--surface); color: var(--text); box-shadow: 0 10px 40px rgba(0, 0, 0, .3); }
.fp-dialog::backdrop { background: rgba(10, 16, 24, .5); }
.fp-dialog .actions { margin-top: .7rem; }

/* Feedback-Knopf unten rechts (über der Navigation am Handy) */
.fb { position: fixed; right: 1rem; bottom: 1rem; z-index: 35; }
.fb > summary {
  list-style: none; cursor: pointer; position: relative; display: flex; align-items: center; gap: .35rem;
  background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: .5rem .95rem;
  font-weight: 600; font-size: .9rem; box-shadow: 0 4px 14px rgba(0, 0, 0, .22);
}
.fb > summary::-webkit-details-marker { display: none; }
.fb > summary:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 2px; }
.fb-dot { position: absolute; top: -3px; right: -3px; width: .8rem; height: .8rem; border-radius: 50%;
  background: var(--bad); border: 2px solid var(--surface); }
.fb-panel {
  position: fixed; right: 1rem; bottom: 4.3rem; width: min(23rem, calc(100vw - 2rem));
  max-height: min(34rem, calc(100vh - 7rem)); display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .28);
}
.fb-head { display: flex; justify-content: space-between; align-items: center; padding: .6rem .85rem; border-bottom: 1px solid var(--border); }
.fb-thread { flex: 1; overflow-y: auto; padding: .75rem .85rem; }
.fb-form { display: flex; gap: .5rem; align-items: flex-end; padding: .6rem .85rem; border-top: 1px solid var(--border); }
.fb-form textarea { flex: 1; margin: 0; min-height: 2.7rem; resize: none; }
body:has(> .fb) { padding-bottom: 4.5rem; }
@media (max-width: 860px) {
  .fb { right: .75rem; bottom: calc(4.6rem + env(safe-area-inset-bottom)); }
  .fb > summary { padding: .6rem; font-size: 1.15rem; }
  .fb .fb-label { display: none; }
  .fb-panel { left: .5rem; right: .5rem; width: auto; bottom: calc(8rem + env(safe-area-inset-bottom));
    max-height: calc(100vh - 11rem); }
  body:has(> .fb) { padding-bottom: calc(130px + env(safe-area-inset-bottom)); }
}
