/* Skilager Tschiertschen – hell, farbig, verspielt.
   Farben wie Skijacken im Schnee: Nachtblau, Himbeer, Senf, Gletscher. */
:root {
  --schnee: #F6FAFF;
  --himmel: #CFE6FF;
  --himmel-tief: #A9D1FB;
  --nacht: #1F2A5C;
  --nacht-soft: #4A5689;
  --himbeer: #E5466B;
  --himbeer-dunkel: #C42F55;
  --senf: #F2B33D;
  --senf-hell: #FFE3A3;
  --gletscher: #1FA39C;
  --gletscher-hell: #CDEFEA;
  --weiss: #FFFFFF;
  --linie: #DCE6F5;
  --radius-gross: 26px;
  --radius: 16px;
  --radius-klein: 10px;
  --schatten: 0 3px 0 #D3DEF0;
  --display: 'Fredoka', 'Arial Rounded MT Bold', ui-rounded, system-ui, sans-serif;
  --text: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--schnee);
  color: var(--nacht);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.5;
  padding-bottom: calc(84px + env(safe-area-inset-bottom));
}
body.ohne-nav { padding-bottom: 0; }

h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0; font-weight: 600; }
h1 { font-size: 2rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.12rem; }
p { margin: 0; }
a { color: var(--himbeer-dunkel); font-weight: 700; text-underline-offset: 3px; }
img { max-width: 100%; display: block; }

:focus-visible { outline: 3px solid var(--himbeer); outline-offset: 3px; border-radius: 6px; }

.seite { max-width: 640px; margin: 0 auto; padding: 0 16px; }
.abschnitt { margin-top: 28px; }
.abschnitt > h2 { margin-bottom: 12px; }
.leise { color: var(--nacht-soft); }
.klein { font-size: 0.9rem; }

/* ---------- Knöpfe & Formulare ---------- */
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 12px 22px;
  border: 0; border-radius: 999px;
  background: var(--himbeer); color: #fff;
  font: 700 1rem var(--text);
  box-shadow: 0 4px 0 var(--himbeer-dunkel);
  cursor: pointer; text-decoration: none;
  transition: transform .08s, box-shadow .08s;
}
.knopf:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--himbeer-dunkel); }
.knopf[disabled] { opacity: .5; cursor: default; }
.knopf.zwei { background: var(--weiss); color: var(--nacht); box-shadow: 0 4px 0 var(--linie); border: 2px solid var(--linie); }
.knopf.zwei:active { box-shadow: 0 1px 0 var(--linie); }
.knopf.breit { width: 100%; }
.knopf.klein { min-height: 40px; padding: 8px 16px; font-size: .92rem; }
.textknopf { background: none; border: 0; color: var(--himbeer-dunkel); font: 700 1rem var(--text); cursor: pointer; padding: 8px 4px; text-decoration: underline; text-underline-offset: 3px; }

label { display: block; font-weight: 700; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=number], input[type=url], input[type=date], input[type=time], textarea, select {
  width: 100%; min-height: 50px; padding: 12px 14px;
  border: 2px solid var(--linie); border-radius: var(--radius);
  background: var(--weiss); color: var(--nacht);
  font: 400 1rem var(--text);
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--gletscher); }
textarea { min-height: 90px; resize: vertical; }
.feld { margin-bottom: 16px; }
.fehler { background: #FFE6EC; color: var(--himbeer-dunkel); border-radius: var(--radius-klein); padding: 10px 14px; font-weight: 700; margin-bottom: 14px; }
.hinweis { background: var(--senf-hell); border-radius: var(--radius-klein); padding: 12px 14px; margin-bottom: 14px; }

/* Auswahl-Chips (Tage, Tageszeiten, Essgewohnheiten) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 44px; padding: 8px 16px;
  border: 2px solid var(--linie); border-radius: 999px;
  background: var(--weiss); color: var(--nacht);
  font: 700 .95rem var(--text); cursor: pointer;
}
.chip[aria-pressed=true] { background: var(--nacht); border-color: var(--nacht); color: #fff; }
.chip .tag { display: block; font-size: .78rem; font-weight: 600; opacity: .75; }
.chip.tagwahl { border-radius: 14px; min-width: 64px; line-height: 1.2; padding: 8px 10px; }

/* ---------- Kopfbereich mit Winterszene ---------- */
.szene {
  position: relative; overflow: hidden;
  background: linear-gradient(var(--himmel) 0%, #E9F4FF 100%);
  border-radius: 0 0 var(--radius-gross) var(--radius-gross);
  padding: 22px 16px 0;
  min-height: 300px;
}
.szene .inhalt { position: relative; z-index: 2; max-width: 640px; margin: 0 auto; }
.szene svg.berge { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 150px; z-index: 1; }
.szene .gruss { font-weight: 700; color: var(--nacht-soft); }
.countdown { font-family: var(--display); font-weight: 700; line-height: .95; margin-top: 6px; }
.countdown .zahl { font-size: 4.6rem; color: var(--himbeer); letter-spacing: -1px; }
.countdown .wort { font-size: 1.5rem; display: block; color: var(--nacht); }

/* Ein einziger bewegter Moment: Schnee fällt im Kopfbereich */
.flocken { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.flocken i {
  position: absolute; top: -10px; width: 7px; height: 7px; border-radius: 50%;
  background: #fff; opacity: .9;
  animation: fallen linear infinite;
}
@keyframes fallen { to { transform: translate3d(18px, 290px, 0); } }
@media (prefers-reduced-motion: reduce) { .flocken { display: none; } }

/* ---------- Lagerpass (persönliche Infos als Skiticket) ---------- */
.pass {
  position: relative; margin: -22px auto 0; z-index: 3;
  background: var(--senf); color: var(--nacht);
  border-radius: 20px; padding: 20px 18px 18px;
  box-shadow: 0 5px 0 #D69720;
  transform: rotate(-1.2deg);
}
.pass::before { /* Loch für die Halteschnur */
  content: ''; position: absolute; top: 12px; left: 50%; width: 38px; height: 9px; margin-left: -19px;
  background: var(--schnee); border-radius: 9px;
}
.pass .kopf { display: flex; gap: 14px; align-items: center; margin-top: 10px; }
.pass .titel { font-family: var(--display); font-size: .95rem; font-weight: 600; opacity: .8; }
.pass .name { font-family: var(--display); font-size: 1.55rem; font-weight: 700; line-height: 1.1; }
.pass dl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin: 16px 0 0; }
.pass dt { font-size: .8rem; font-weight: 800; opacity: .7; }
.pass dd { margin: 0; font-weight: 700; }
.pass .zacken { /* gestanzte Kante unten */
  position: absolute; left: 14px; right: 14px; bottom: -6px; height: 12px;
  background: radial-gradient(circle at 6px 0, var(--schnee) 5px, transparent 5.5px) 0 0 / 18px 12px repeat-x;
}

.avatar {
  flex: none; width: 64px; height: 64px; border-radius: 50%;
  background: var(--weiss); border: 3px solid var(--nacht);
  display: grid; place-items: center; overflow: hidden;
  font-family: var(--display); font-weight: 700; font-size: 1.4rem;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.mini { width: 34px; height: 34px; border-width: 2px; font-size: .85rem; }
.avatar.gross { width: 108px; height: 108px; font-size: 2.2rem; }

/* ---------- Infozeilen ---------- */
.liste { background: var(--weiss); border-radius: var(--radius); border: 2px solid var(--linie); overflow: hidden; }
.zeile { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-top: 2px solid var(--linie); }
.zeile:first-child { border-top: 0; }
.zeile .icon { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; }
.zeile .icon svg { width: 24px; height: 24px; }
.zeile .text { flex: 1; min-width: 0; }
.zeile .text strong { display: block; }
.zeile .text a { display: inline-block; margin-top: 4px; }
.i-himbeer { background: #FFE6EC; color: var(--himbeer-dunkel); }
.i-senf { background: var(--senf-hell); color: #9A6A00; }
.i-gletscher { background: var(--gletscher-hell); color: #0D6E69; }
.i-himmel { background: var(--himmel); color: var(--nacht); }

.hausbild { border-radius: var(--radius); overflow: hidden; border: 2px solid var(--linie); margin-bottom: 12px; aspect-ratio: 16 / 9; background: var(--himmel); }
.hausbild img { width: 100%; height: 100%; object-fit: cover; }
.pistenplan { border-radius: var(--radius); overflow: hidden; border: 2px solid var(--linie); background: var(--weiss); }
.pistenplan img { width: 100%; }

.bald { display: flex; flex-wrap: wrap; gap: 8px; }
.bald span { padding: 8px 14px; border-radius: 999px; background: var(--weiss); border: 2px dashed var(--himmel-tief); font-weight: 700; color: var(--nacht-soft); }

/* ---------- Zimmer ---------- */
.zimmer { background: var(--weiss); border: 2px solid var(--linie); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.zimmer.meins { border-color: var(--gletscher); box-shadow: 0 0 0 3px var(--gletscher-hell); }
.zimmer .oben { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.zimmer .frei { font-weight: 800; white-space: nowrap; }
.zimmer .frei.voll { color: var(--himbeer-dunkel); }
.betten { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.bett {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 12px 4px 4px; border-radius: 999px; background: var(--schnee); border: 2px solid var(--linie);
  font-weight: 700; font-size: .92rem;
}
.bett.leer { padding: 4px 12px; border-style: dashed; color: var(--nacht-soft); font-weight: 600; }
.bett.ich { background: var(--gletscher-hell); border-color: var(--gletscher); }

/* ---------- Teilnehmer:innen ---------- */
.person { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-top: 2px solid var(--linie); }
.person:first-child { border-top: 0; }
.person .text { flex: 1; min-width: 0; }
.marke { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--senf-hell); font-size: .78rem; font-weight: 800; margin-left: 6px; }

/* ---------- Assistent ---------- */
.schritte { display: flex; gap: 6px; margin: 18px 0 22px; }
.schritte span { flex: 1; height: 8px; border-radius: 8px; background: var(--linie); }
.schritte span.an { background: var(--gletscher); }
.karte { background: var(--weiss); border: 2px solid var(--linie); border-radius: var(--radius-gross); padding: 22px 18px; }
.karte h1 { font-size: 1.7rem; margin-bottom: 8px; }
.karte .frage { margin: 22px 0 10px; font-weight: 800; }
.wahl { display: grid; gap: 10px; }
.wahl button {
  display: flex; gap: 14px; align-items: center; text-align: left;
  padding: 14px 16px; border-radius: var(--radius); border: 2px solid var(--linie);
  background: var(--weiss); color: var(--nacht); font: 700 1rem var(--text); cursor: pointer;
}
.wahl button[aria-pressed=true] { border-color: var(--nacht); background: var(--himmel); }
.wahl button small { display: block; font-weight: 600; color: var(--nacht-soft); }
.wahl .emoji { font-size: 1.7rem; }
.zaehler { display: flex; align-items: center; gap: 14px; }
.zaehler button { width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--linie); background: var(--weiss); font: 700 1.4rem var(--text); color: var(--nacht); cursor: pointer; }
.zaehler output { font-family: var(--display); font-size: 2rem; min-width: 40px; text-align: center; }
.unten { display: flex; gap: 10px; margin-top: 26px; }
.unten .knopf { flex: 1; }

/* ---------- Einstieg (Login / Einladung) ---------- */
.einstieg { min-height: 100vh; display: flex; flex-direction: column; }
.einstieg .szene { min-height: 330px; border-radius: 0 0 40px 40px; }
.einstieg .szene h1 { font-size: 2.5rem; margin-top: 8px; max-width: 12ch; }
.einstieg .formular { margin-top: 24px; padding-bottom: 32px; }

/* ---------- Navigation unten ---------- */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; justify-content: space-around;
  background: var(--weiss); border-top: 2px solid var(--linie);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.nav a {
  flex: 1; max-width: 120px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 4px; border-radius: 14px; text-decoration: none; color: var(--nacht-soft);
  font-size: .78rem; font-weight: 800;
}
.nav a svg { width: 26px; height: 26px; }
.nav a[aria-current=page] { color: var(--nacht); background: var(--himmel); }

.toast {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--nacht); color: #fff; padding: 12px 20px; border-radius: 999px; font-weight: 700;
  z-index: 30; max-width: calc(100% - 32px); text-align: center;
}

.seitenkopf { padding-top: 22px; }
.seitenkopf p { margin-top: 6px; }

/* Admin */
details.admin { background: var(--weiss); border: 2px solid var(--linie); border-radius: var(--radius); padding: 0 16px; margin-bottom: 12px; }
details.admin summary { font-family: var(--display); font-size: 1.15rem; padding: 14px 0; cursor: pointer; }
details.admin[open] { padding-bottom: 16px; }
.code { font-family: ui-monospace, Menlo, monospace; background: var(--schnee); border: 2px solid var(--linie); border-radius: var(--radius-klein); padding: 10px 12px; word-break: break-all; }
.zweispaltig { display: grid; grid-template-columns: 1fr 110px; gap: 10px; }

/* ---------- Gemeinsame Bausteine der Bereiche ---------- */
.zeile-oben { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.zeile-oben .knopf { flex: none; margin-top: 6px; }
.leer { color: var(--nacht-soft); background: var(--weiss); border: 2px dashed var(--linie); border-radius: var(--radius); padding: 16px; }
.aktionen { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin-top: 12px; }
.textknopf.klein { font-size: .9rem; padding: 4px 2px; }
.marke.gruen { background: var(--gletscher-hell); color: #0D6E69; }
.zeile-link { color: inherit; text-decoration: none; font-weight: 400; }
.zeile-link:active { background: var(--schnee); }
.zeile .text span { display: block; }

/* Bottom Sheet für Formulare */
.sheet-hintergrund {
  position: fixed; inset: 0; z-index: 40; background: rgba(31, 42, 92, .45);
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet {
  width: 100%; max-width: 640px; max-height: 92vh; overflow-y: auto;
  background: var(--schnee); border-radius: var(--radius-gross) var(--radius-gross) 0 0;
  padding: 18px 16px calc(24px + env(safe-area-inset-bottom));
  animation: hoch .18s ease-out;
}
@keyframes hoch { from { transform: translateY(40px); opacity: .6; } }
@media (prefers-reduced-motion: reduce) { .sheet { animation: none; } }
.sheet-kopf { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.sheet-zu { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--linie); background: var(--weiss); font-size: 1.6rem; line-height: 1; color: var(--nacht); cursor: pointer; }
body.sheet-offen { overflow: hidden; }
@media (min-width: 700px) {
  .sheet-hintergrund { align-items: center; }
  .sheet { border-radius: var(--radius-gross); }
}

/* ---------- Aktivitäten ---------- */
.tagtitel { margin-bottom: 12px; }
.aktivitaet { background: var(--weiss); border: 2px solid var(--linie); border-left-width: 8px; border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; }
.aktivitaet.art-yoga { border-left-color: var(--gletscher); }
.aktivitaet.art-sauna { border-left-color: var(--himbeer); }
.aktivitaet.art-schlitteln { border-left-color: var(--himmel-tief); }
.aktivitaet.art-brettspiele { border-left-color: var(--senf); }
.aktivitaet.art-anderes { border-left-color: var(--nacht-soft); }
.aktivitaet.meins { box-shadow: 0 0 0 3px var(--gletscher-hell); }
.aktivitaet-kopf { display: flex; gap: 12px; align-items: flex-start; }
.aktivitaet-kopf .text { flex: 1; min-width: 0; }
.art-emoji { font-size: 1.8rem; line-height: 1; }
.plaetze { flex: none; font-weight: 800; font-size: .85rem; background: var(--schnee); border-radius: 999px; padding: 4px 10px; }
.plaetze.voll, .frei.voll { color: var(--himbeer-dunkel); font-weight: 800; }
.gesichter { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; }

/* ---------- Essen ---------- */
.tabs { display: flex; gap: 6px; background: var(--weiss); border: 2px solid var(--linie); border-radius: 999px; padding: 4px; margin-top: 16px; }
.tabs a { flex: 1; text-align: center; padding: 10px 8px; border-radius: 999px; text-decoration: none; color: var(--nacht-soft); font-weight: 800; }
.tabs a[aria-selected=true] { background: var(--nacht); color: #fff; }
.mahlzeit { margin-top: 26px; }
.mahlzeit-kopf { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 10px; }
.plan { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; background: var(--senf-hell); border-radius: var(--radius); padding: 12px 14px; }
.plan.offen { background: var(--weiss); border: 2px dashed var(--linie); }
.plan strong { font-family: var(--display); font-size: 1.15rem; font-weight: 600; flex: 1 1 60%; }
.plan-label { flex-basis: 100%; font-size: .8rem; font-weight: 800; color: var(--nacht-soft); }
.vorschlaege { list-style: none; margin: 10px 0 0; padding: 0; background: var(--weiss); border: 2px solid var(--linie); border-radius: var(--radius); }
.vorschlag { display: flex; gap: 12px; padding: 12px 14px; border-top: 2px solid var(--linie); }
.vorschlag:first-child { border-top: 0; }
.vorschlag.gewaehlt { background: #FFFBEF; }
.vorschlag .text { flex: 1; min-width: 0; }
.vorschlag .aktionen { margin-top: 2px; }
.stimmen { display: flex; flex-direction: column; align-items: center; gap: 2px; flex: none; }
.daumen { width: 40px; height: 34px; border-radius: 10px; border: 2px solid var(--linie); background: var(--weiss); color: var(--nacht-soft); font-size: .9rem; cursor: pointer; }
.daumen.an { background: var(--gletscher); border-color: var(--gletscher); color: #fff; }
.daumen.an.runter { background: var(--himbeer); border-color: var(--himbeer); }
.score { font-family: var(--display); font-weight: 700; font-size: 1.05rem; }

.einkauf-neu { display: grid; grid-template-columns: 1fr 90px 50px; gap: 8px; margin-top: 16px; }
.einkauf-neu .knopf { padding: 0; font-size: 1.5rem; min-height: 50px; }
.einkauf { list-style: none; margin: 12px 0 0; padding: 0; background: var(--weiss); border: 2px solid var(--linie); border-radius: var(--radius); }
.artikel { display: flex; gap: 12px; align-items: center; padding: 10px 14px; border-top: 2px solid var(--linie); }
.artikel:first-child { border-top: 0; }
.artikel .text { flex: 1; min-width: 0; }
.artikel.erledigt strong { text-decoration: line-through; color: var(--nacht-soft); }
.haken { flex: none; width: 34px; height: 34px; border-radius: 10px; border: 2px solid var(--nacht-soft); background: var(--weiss); color: #fff; font-weight: 800; cursor: pointer; }
.haken[aria-pressed=true] { background: var(--gletscher); border-color: var(--gletscher); }
.menge { display: inline-block; background: var(--himmel); border-radius: 999px; padding: 0 8px; font-size: .85rem; font-weight: 700; margin-left: 4px; }

/* ---------- Kosten ---------- */
.saldo { margin-top: 18px; background: var(--nacht); color: #fff; border-radius: var(--radius-gross); padding: 20px 18px; }
.saldo .titel { font-weight: 800; opacity: .8; }
.saldo .betrag { font-family: var(--display); font-weight: 700; font-size: 2.6rem; line-height: 1.1; margin-top: 4px; }
.saldo.minus .betrag { color: #FF9AB2; }
.saldo.plus .betrag { color: #8FE3D9; }
.saldo .unterzeile { font-weight: 700; }
.saldo dl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin: 16px 0 0; }
.saldo dt { font-size: .8rem; opacity: .75; font-weight: 700; }
.saldo dd { margin: 0; font-weight: 800; }
.ueberweisungen { list-style: none; padding: 12px 0 0; margin: 14px 0 0; border-top: 1px solid rgba(255, 255, 255, .25); }
.ueberweisungen li { padding: 4px 0; }
.betrag-rechts { flex: none; font-weight: 800; white-space: nowrap; }
.tabelle-scroll { overflow-x: auto; background: var(--weiss); border: 2px solid var(--linie); border-radius: var(--radius); }
.tabelle { width: 100%; border-collapse: collapse; font-size: .9rem; white-space: nowrap; }
.tabelle th, .tabelle td { padding: 10px 12px; text-align: right; border-top: 1px solid var(--linie); }
.tabelle th { border-top: 0; font-size: .8rem; color: var(--nacht-soft); }
.tabelle th:first-child, .tabelle td:first-child { text-align: left; position: sticky; left: 0; background: var(--weiss); font-weight: 700; }
.tabelle tr.ich td { background: var(--gletscher-hell); }
.tabelle td.minus { color: var(--himbeer-dunkel); font-weight: 800; }
.tabelle td.plus { color: #0D6E69; font-weight: 800; }

/* ---------- Mehr ---------- */
.mehr-link { display: flex; gap: 14px; align-items: center; padding: 16px; border-top: 2px solid var(--linie); text-decoration: none; color: var(--nacht); }
.mehr-link:first-child { border-top: 0; }
.mehr-link .icon { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; }
.mehr-link .icon svg { width: 24px; height: 24px; }
.mehr-link .text { display: flex; flex-direction: column; }

/* ---------- Skifahrerin und Skifahrer hinter dem Dashboard ---------- */
/* Über den Inhalten, unter Navigation, Meldungen und Formularen; Klicks gehen hindurch */
.piste { position: fixed; inset: 0; z-index: 15; pointer-events: none; overflow: hidden; }
.piste * { pointer-events: none; }
.spuren { position: absolute; inset: 0; width: 100%; height: 100%; }
.spur { fill: none; stroke: #8FB8E8; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 6; opacity: .8; }
.skier { position: absolute; left: 0; top: 0; width: 44px; height: 60px; transform-origin: 22px 30px; will-change: transform; }
.skier svg { display: block; filter: drop-shadow(0 3px 2px rgba(31, 42, 92, .28)); }
.gischt {
  position: absolute; left: 50%; bottom: -6px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%;
  background: #fff; opacity: 0; transition: opacity .25s;
  box-shadow: -10px 4px 0 1px #fff, 10px 4px 0 1px #fff, -5px 10px 0 0 #DCEBFC, 6px 11px 0 0 #DCEBFC, 0 14px 0 2px #fff;
}

@media (min-width: 700px) {
  .szene { padding-top: 34px; }
  .countdown .zahl { font-size: 5.6rem; }
}

/* ---------- Hausregeln im Abschnitt Lagerhaus ---------- */
.wichtig { margin-top: 14px; background: var(--senf-hell); border-radius: var(--radius); padding: 16px 16px 12px; }
.wichtig h3 { margin-bottom: 8px; }
.wichtig ul, .regel-inhalt ul, .regel-inhalt ol { margin: 0; padding-left: 20px; }
.wichtig li, .regel-inhalt li { margin-bottom: 6px; }
.regeln { margin-top: 12px; background: var(--weiss); border: 2px solid var(--linie); border-radius: var(--radius); overflow: hidden; }
.regel { border-top: 2px solid var(--linie); }
.regel:first-child { border-top: 0; }
.regel summary {
  list-style: none; cursor: pointer; padding: 14px 16px; font-weight: 800;
  display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 52px;
}
.regel summary::-webkit-details-marker { display: none; }
.regel summary::after { content: '+'; font-family: var(--display); font-size: 1.5rem; line-height: 1; color: var(--nacht-soft); }
.regel[open] summary::after { content: '−'; }
.regel[open] summary { background: var(--schnee); }
.regel-inhalt { padding: 4px 16px 14px; }
.regel-inhalt p { margin: 8px 0; }
.regel-inhalt h4 { font-family: var(--display); font-weight: 600; font-size: 1.02rem; margin: 14px 0 6px; }
.regel-inhalt ol li::marker { font-weight: 800; color: var(--gletscher); }
.regel-inhalt .hinweis { margin: 10px 0; }

/* ---------- Zimmer: Fotos, Galerie, Kommentare ---------- */
.zimmer-foto { display: block; position: relative; width: calc(100% + 32px); margin: -16px -16px 12px; padding: 0; border: 0; background: var(--himmel); cursor: pointer; border-radius: 14px 14px 0 0; overflow: hidden; aspect-ratio: 16 / 9; }
.zimmer-foto img { width: 100%; height: 100%; object-fit: cover; }
.foto-zahl { position: absolute; right: 10px; bottom: 10px; background: rgba(31, 42, 92, .82); color: #fff; font-weight: 800; font-size: .82rem; padding: 4px 10px; border-radius: 999px; }
.galerie { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: var(--radius); -webkit-overflow-scrolling: touch; }
.galerie img { flex: 0 0 100%; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; scroll-snap-align: center; border-radius: var(--radius); background: var(--himmel); }
.kommentare { list-style: none; margin: 0 0 10px; padding: 10px 12px; background: var(--schnee); border-radius: var(--radius-klein); font-size: .92rem; }
.kommentare li + li { margin-top: 6px; }
.kommentare.gross { background: var(--weiss); border: 2px solid var(--linie); margin-top: 8px; }
.kommentare.gross li { display: flex; gap: 10px; align-items: flex-start; }

/* ---------- Einkaufsliste: Gruppen und Einkaufsmodus ---------- */
.modus { display: flex; gap: 8px; margin-top: 12px; }
.modus a { flex: 1; text-align: center; padding: 9px 8px; border-radius: var(--radius-klein); border: 2px solid var(--linie); background: var(--weiss); color: var(--nacht-soft); font-weight: 800; font-size: .9rem; text-decoration: none; }
.modus a[aria-selected=true] { border-color: var(--gletscher); background: var(--gletscher-hell); color: #0D6E69; }
.einkauf-form { margin-top: 16px; }
.einkauf-form .einkauf-neu { margin-top: 0; }
.gruppe-kopf { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 10px; }
.abteilung { font-size: 1.15rem; margin-bottom: 8px; }
.fortschritt { margin-top: 16px; background: var(--gletscher-hell); color: #0D6E69; border-radius: var(--radius-klein); padding: 10px 14px; }
.haken.gross { width: 42px; height: 42px; border-radius: 12px; font-size: 1.1rem; }
.mengen { margin-top: 2px; }
.quelle { color: var(--nacht-soft); }
.imwagen summary { font-family: var(--display); font-size: 1.15rem; cursor: pointer; padding: 8px 0; }

/* ---------- Profilbild: Motive und Emojis ---------- */
.avatar.motiv { border-color: var(--nacht); padding: 4px; }
.avatar.motiv svg { width: 100%; height: 100%; display: block; }
.avatar.emoji { background: var(--schnee); line-height: 1; font-size: 2rem; }
.avatar.emoji.mini { font-size: 1.05rem; }
.avatar.emoji.gross { font-size: 3.6rem; }
.avatar.motiv.mini { padding: 2px; }
.bildwahl-reihe { display: flex; gap: 12px; align-items: center; margin-top: 8px; }
.bildwahl-gitter { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 8px; margin-top: 8px; }
.bildwahl { border: 3px solid transparent; background: none; border-radius: 50%; padding: 2px; cursor: pointer; display: grid; place-items: center; }
.bildwahl .avatar { width: 54px; height: 54px; }
.bildwahl.foto img { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; border: 3px solid var(--nacht); }
.bildwahl[aria-pressed=true] { border-color: var(--himbeer); }

.code-feld { font-family: var(--display); font-size: 1.8rem; letter-spacing: .3em; text-align: center; }

/* ---------- Admin: Freigaben und Gästeliste ---------- */
details.admin.wartet { border-color: var(--himbeer); box-shadow: 0 0 0 3px #FFE6EC; }
.gaeste { list-style: none; margin: 12px 0 0; padding: 0; font-size: .9rem; }
.gaeste li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--linie); }
.gaeste .ok { color: #0D6E69; font-weight: 800; }
.banner { display: block; margin-top: 16px; background: #FFE6EC; color: var(--himbeer-dunkel); border-radius: var(--radius); padding: 12px 16px; font-weight: 800; text-decoration: none; }

/* ---------- Gantt: wer ist wann da ---------- */
.gantt {
  --namen: 118px;
  display: grid; grid-template-columns: var(--namen) repeat(var(--spalten), minmax(0, 1fr));
  row-gap: 6px; align-items: center; position: relative;
  background: var(--weiss); border: 2px solid var(--linie); border-radius: var(--radius); padding: 10px 12px 12px;
}
.gantt::before { /* Tageslinien */
  content: ''; position: absolute; top: 10px; bottom: 12px; left: calc(12px + var(--namen)); right: 12px; pointer-events: none;
  background: repeating-linear-gradient(to right, var(--linie) 0 1.5px, transparent 1.5px calc(100% / var(--tage)));
}
.g-tag { font-size: .78rem; font-weight: 800; color: var(--nacht); text-align: center; line-height: 1.15; padding-bottom: 4px; }
.g-tag small { font-size: .7rem; font-weight: 700; color: var(--nacht-soft); }
.g-name { grid-column: 1; display: flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 700; min-width: 0; padding-right: 6px; }
.g-name > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-name .avatar { width: 22px; height: 22px; min-width: 22px; font-size: .55rem; border-width: 2px; }
.g-name.ich { color: var(--himbeer-dunkel); }
.g-balken {
  height: 24px; border-radius: 999px; background: var(--gletscher); color: #fff; position: relative; z-index: 1;
  font-size: .72rem; font-weight: 800; display: flex; align-items: center; justify-content: center; min-width: 0;
}
.g-balken.ich { background: var(--himbeer); }
.g-fuss { font-size: .72rem; color: var(--nacht-soft); margin-top: 4px; }
.g-nacht { text-align: center; font-size: .78rem; font-weight: 800; color: var(--nacht); background: var(--senf-hell); border-radius: 999px; margin: 4px 3px 0; position: relative; z-index: 1; }
.g-leer { grid-column: 1 / -1; color: var(--nacht-soft); padding: 8px 0; }

/* ---------- Spiele ---------- */
.zurueck { display: inline-block; font-weight: 800; text-decoration: none; margin-bottom: 6px; }
.zurueck::before { content: '‹ '; }
.spielkarte { display: flex; gap: 14px; align-items: center; padding: 14px; text-decoration: none; color: inherit; border-bottom: 2px solid var(--linie); }
.spielkarte:last-child { border-bottom: 0; }
.spielkarte .text { display: flex; flex-direction: column; gap: 2px; }
.spielkarte.spaeter { color: var(--nacht-soft); background: repeating-linear-gradient(-45deg, transparent 0 10px, #f3f7fd 10px 20px); }
.spielbild { flex: none; width: 64px; height: 64px; border-radius: 18px; background: linear-gradient(#bfe0ff, #f4f9ff); display: grid; place-items: center; }
.spielbild svg { width: 46px; height: 54px; }
.streckenwahl { display: grid; gap: 10px; margin-top: 12px; }
.strecke, .fahrer {
  font: inherit; color: inherit; text-align: left; cursor: pointer; background: var(--weiss);
  border: 2px solid var(--linie); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--schatten);
}
.strecke { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; }
.strecke strong { font-family: var(--display); font-size: 1.2rem; font-weight: 600; }
.strecke .ort { justify-self: end; font-weight: 800; color: var(--nacht-soft); font-size: .85rem; align-self: center; }
.strecke .leise, .strecke .bestzeit { grid-column: 1 / -1; }
.strecke .bestzeit { font-size: .8rem; font-weight: 800; color: var(--gletscher); margin-top: 4px; }
.strecke[aria-checked="true"], .fahrer[aria-checked="true"] { border-color: var(--himbeer); box-shadow: 0 3px 0 var(--himbeer-dunkel); background: #fff6f8; }
.fahrerwahl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.fahrer { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 10px 6px; gap: 2px; }
.fahrer svg { width: 54px; height: 64px; background: linear-gradient(#cfe6ff, #fff); border-radius: 14px; padding: 4px; }
.fahrer strong { font-size: .9rem; }
.steuerung { background: var(--senf-hell); border-radius: var(--radius); padding: 14px 16px; }
.steuerung ul { margin: 8px 0 8px; padding-left: 20px; }
.steuerung li { margin: 4px 0; }

/* Rangliste im Dashboard */
.rl-tabs { display: flex; gap: 6px; margin: 12px 0 10px; overflow-x: auto; }
.rl-tabs button { font: 800 .85rem var(--text); color: var(--nacht); background: var(--weiss); border: 2px solid var(--linie); border-radius: 999px; padding: 7px 14px; cursor: pointer; }
.rl-tabs button[aria-selected="true"] { background: var(--nacht); border-color: var(--nacht); color: #fff; }
.rl-liste { background: var(--weiss); border: 2px solid var(--linie); border-radius: var(--radius); overflow: hidden; }
.rl-liste ol { list-style: none; margin: 0; padding: 0; }
.rl-liste li { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-bottom: 2px solid var(--linie); }
.rl-liste li:last-child { border-bottom: 0; }
.rl-liste li.ich { background: #fff0f3; }
.rl-platz { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; font: 700 .85rem var(--display); background: var(--himmel); }
.rl-liste li:nth-child(1) .rl-platz { background: #FFD25C; }
.rl-liste li:nth-child(2) .rl-platz { background: #DDE3EC; }
.rl-liste li:nth-child(3) .rl-platz { background: #F0B98A; }
.rl-liste .avatar { width: 28px; height: 28px; min-width: 28px; font-size: .65rem; border-width: 2px; }
.rl-name { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rl-zeit { font-weight: 800; font-variant-numeric: tabular-nums; }
.rl-ich { padding: 8px 14px; border-top: 2px solid var(--linie); margin: 0; font-weight: 700; }

/* ---------- Rennen (Vollbild, Querformat) ---------- */
body.im-rennen { overflow: hidden; }
body.im-rennen #nav, body.im-rennen #app { display: none; }
.rennen { position: fixed; inset: 0; z-index: 1000; background: #9fd0ff; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; font-family: var(--text); }
.r-bild { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.r-hud { position: absolute; top: max(10px, env(safe-area-inset-top)); left: max(14px, env(safe-area-inset-left)); right: max(14px, env(safe-area-inset-right)); display: flex; align-items: flex-start; gap: 10px; pointer-events: none; }
.r-zeit, .r-tempo { background: rgba(16, 22, 58, .72); color: #fff; border-radius: 14px; padding: 6px 12px; display: flex; flex-direction: column; line-height: 1.1; }
.r-zeit strong { font: 700 1.6rem var(--display); font-variant-numeric: tabular-nums; }
.r-name { font-size: .72rem; font-weight: 800; opacity: .85; max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
[data-strafe] { color: #ffb4b4; font-weight: 800; font-size: .8rem; }
[data-strafe]:empty { display: none; }
.r-tempo { margin-left: auto; align-items: flex-end; }
.r-tempo strong { font: 700 1.6rem var(--display); font-variant-numeric: tabular-nums; }
.r-tempo span { font-size: .7rem; font-weight: 800; opacity: .8; }
.r-pause { pointer-events: auto; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(16, 22, 58, .72); color: #fff; font: 800 1rem var(--display); cursor: pointer; }
.r-meldung { position: absolute; top: 22%; left: 50%; transform: translate(-50%, -10px); opacity: 0; transition: opacity .25s, transform .25s; pointer-events: none;
  font: 700 clamp(1.3rem, 5vh, 2.2rem) var(--display); color: #fff; text-shadow: 0 2px 0 rgba(16,22,58,.55), 0 0 18px rgba(16,22,58,.35); white-space: nowrap; }
.r-meldung.zeigen { opacity: 1; transform: translate(-50%, 0); }
.r-meldung.warn { color: #ffd25c; }
.r-meldung.ziel { color: #fff; font-size: clamp(1.8rem, 8vh, 3rem); }
.r-zwischen { position: absolute; top: calc(22% + 3.2rem); left: 50%; transform: translateX(-50%); opacity: 0; transition: opacity .3s; pointer-events: none;
  background: rgba(16, 22, 58, .78); color: #fff; padding: 6px 14px; border-radius: 12px; font-weight: 700; white-space: nowrap; }
.r-zwischen.zeigen { opacity: 1; }
.r-zwischen .gut { color: #6ff0a0; font-weight: 800; } .r-zwischen .schlecht { color: #ff9b9b; font-weight: 800; }
.r-start { position: absolute; top: 38%; left: 50%; transform: translate(-50%, -50%); font: 700 clamp(3rem, 20vh, 7rem) var(--display); color: #fff; text-shadow: 0 4px 0 rgba(16,22,58,.5); pointer-events: none; }
.r-knopf {
  position: absolute; bottom: max(16px, env(safe-area-inset-bottom)); width: clamp(86px, 24vh, 120px); height: clamp(86px, 24vh, 120px); border-radius: 50%;
  border: 3px solid rgba(255,255,255,.85); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font: 700 1.05rem var(--display); cursor: pointer; touch-action: none; transition: transform .08s;
}
.r-knopf small { font: 700 .62rem var(--text); opacity: .85; }
.r-knopf.links { left: max(18px, env(safe-area-inset-left)); background: rgba(31, 163, 156, .62); }
.r-knopf.rechts { right: max(18px, env(safe-area-inset-right)); background: rgba(229, 70, 107, .66); }
.r-knopf.aktiv { transform: scale(.92); background-color: rgba(16, 22, 58, .55); }
.r-quer { position: absolute; inset: 0; background: var(--nacht); color: #fff; display: grid; place-items: center; text-align: center; padding: 24px; z-index: 5; }
.r-quer[hidden] { display: none; }
.r-quer strong { font: 700 1.6rem var(--display); display: block; margin-bottom: 6px; }
.r-quer div::before { content: ''; display: block; width: 46px; height: 76px; margin: 0 auto 18px; border: 4px solid #fff; border-radius: 10px; animation: drehen 2s ease-in-out infinite; }
@keyframes drehen { 0%, 25% { transform: rotate(0); } 60%, 100% { transform: rotate(-90deg); } }
@media (prefers-reduced-motion: reduce) { .r-quer div::before { animation: none; transform: rotate(-90deg); } }
.r-panel { position: absolute; inset: 0; background: rgba(16, 22, 58, .45); display: grid; place-items: center; padding: 12px; z-index: 4; overflow-y: auto; }
.r-panel[hidden] { display: none; }
.r-karte { background: var(--weiss); color: var(--nacht); border-radius: var(--radius-gross); padding: 18px 22px; width: min(440px, 100%); display: flex; flex-direction: column; gap: 10px; align-items: stretch; text-align: center; }
.r-karte h2 { font-size: 1.5rem; }
.r-schalter { display: flex; gap: 8px; align-items: center; justify-content: center; font-weight: 700; }
.r-ergebnis h2 { font-size: clamp(2.2rem, 11vh, 3.2rem); font-variant-numeric: tabular-nums; }
.r-klein { font-size: .85rem; color: var(--nacht-soft); font-weight: 700; margin: 0; }
.r-rang { font: 700 1.1rem var(--display); color: var(--himbeer-dunkel); margin: 0; }
.r-fehler { color: #b42318; font-weight: 700; margin: 0; }
.r-liste { list-style: none; margin: 0; padding: 0; text-align: left; border: 2px solid var(--linie); border-radius: var(--radius); overflow: hidden; }
.r-liste li { display: grid; grid-template-columns: 30px 1fr auto; gap: 8px; padding: 5px 12px; font-weight: 700; font-size: .9rem; border-bottom: 1px solid var(--linie); }
.r-liste li:last-child { border-bottom: 0; }
.r-liste li.ich { background: #fff0f3; color: var(--himbeer-dunkel); }
.r-knoepfe { display: flex; gap: 10px; justify-content: center; }
.r-knoepfe .knopf { flex: 1; }
.vollbild-tipp { margin-top: 12px; background: var(--himmel); border-radius: var(--radius); padding: 14px 16px; }
.vollbild-tipp p { margin: 6px 0; }
.vollbild-tipp ol { margin: 6px 0 0; padding-left: 20px; }
.vollbild-tipp li { margin: 3px 0; }
/* Rennen im Vollbild (Android) und als Home-Bildschirm-App: auch hinter die Notch */
.rennen { height: 100vh; height: 100dvh; }
.abzeichen { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--nacht); color: #fff; font: 800 .7rem var(--text); vertical-align: middle; }
.knopfzeile { display: flex; flex-wrap: wrap; gap: 4px 14px; }
