/* Revier – Oberfläche. Hell/Dunkel folgt dem iPhone. */
:root {
  --bg: #eef1ea;
  --panel: #ffffff;
  --panel-2: #f6f8f3;
  --text: #1b2218;
  --muted: #5f6b58;
  --line: #d9dfd2;
  --accent: #3d6b35;
  --accent-text: #ffffff;
  --accent-soft: #e3eedd;
  --ok: #2e7d32;
  --bad: #c62828;
  --warn: #b26a00;
  --kill: #c62828;
  --sight: #1e88e5;
  --fall: #757575;
  --shadow: 0 2px 10px rgba(0, 0, 0, .18);
  --radius: 14px;
  --top-h: 52px;
  --tabs-h: 58px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f130d;
    --panel: #181e15;
    --panel-2: #1f2719;
    --text: #e6ebdd;
    --muted: #9aa68f;
    --line: #2c3627;
    --accent: #7fb069;
    --accent-text: #0f130d;
    --accent-soft: #24331f;
    --ok: #66bb6a;
    --bad: #ef5350;
    --warn: #ffb74d;
    --shadow: 0 2px 12px rgba(0, 0, 0, .55);
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  overscroll-behavior: none;
}
.hidden { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
h2 { font-size: 1.25rem; margin: 0 0 .6rem; }
h3 { font-size: 1.02rem; margin: 1.2rem 0 .5rem; }
small, .muted { color: var(--muted); }

/* --- Grundgerüst --------------------------------------------------------- */
#app {
  position: fixed; inset: 0;
  display: grid;
  grid-template-rows: calc(var(--top-h) + env(safe-area-inset-top)) 1fr calc(var(--tabs-h) + env(safe-area-inset-bottom));
}
#top {
  display: flex; align-items: center; gap: 8px;
  padding: env(safe-area-inset-top) 12px 0;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  z-index: 1100;
}
#btn-district {
  flex: 1; min-width: 0; text-align: left;
  background: none; border: 0; padding: 6px 0;
  font-size: 1.12rem; font-weight: 650;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#btn-district::after { content: " ▾"; color: var(--muted); font-weight: 400; }
#net { font-size: .8rem; color: var(--muted); white-space: nowrap; }
#net.off { color: var(--bad); font-weight: 600; }
#main { position: relative; overflow: hidden; }
#map { position: absolute; inset: 0; background: #2b3326; }

#tabs {
  display: flex; background: var(--panel);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 1100;
}
#tabs button {
  flex: 1; border: 0; background: none; padding: 6px 0 4px;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  font-size: .72rem; color: var(--muted); position: relative;
}
#tabs button .ico { font-size: 1.35rem; line-height: 1.2; filter: grayscale(.6); }
#tabs button.on { color: var(--accent); font-weight: 600; }
#tabs button.on .ico { filter: none; }
#tabs .badge {
  position: absolute; top: 3px; left: 54%;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--bad); color: #fff; font-size: .7rem; line-height: 18px; font-weight: 700;
}

/* --- Panels (Strecke, Wetter, Team, Mehr) -------------------------------- */
.panel {
  position: absolute; inset: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: var(--bg); padding: 14px 14px 40px; z-index: 1000;
}
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; margin-bottom: 12px;
}
.card h3:first-child { margin-top: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.right { margin-left: auto; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: 10px 0; border-top: 1px solid var(--line); }
.list > li:first-child { border-top: 0; }
.tap { cursor: pointer; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.big { font-size: 2rem; font-weight: 650; line-height: 1.1; }
.center { text-align: center; }
.sep { height: 1px; background: var(--line); margin: 10px 0; }

/* --- Bedienelemente ------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line); background: var(--panel-2);
  border-radius: 11px; padding: 10px 14px; min-height: 44px; font-weight: 550;
  text-decoration: none; color: var(--text);
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn.danger { color: var(--bad); }
.btn.small { min-height: 34px; padding: 6px 10px; font-size: .9rem; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.btns .btn { flex: 1 1 auto; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  border: 1px solid var(--line); background: var(--panel); border-radius: 999px;
  padding: 6px 12px; font-size: .9rem; min-height: 34px;
}
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
label.f { display: block; margin: 10px 0 0; font-size: .85rem; color: var(--muted); }
label.f > input, label.f > select, label.f > textarea, .f-in {
  display: block; width: 100%; margin-top: 4px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2);
  padding: 10px 11px; min-height: 44px; font-size: 16px; color: var(--text);
}
label.f > textarea { min-height: 70px; resize: vertical; }
div.f { display: block; margin: 10px 0 0; font-size: .85rem; color: var(--muted); }
.picker { margin-top: 4px; }
.picker .picker-btn { display: flex; align-items: center; gap: 8px; text-align: left; margin-top: 0; }
.picker .picker-btn::after { content: "▾"; margin-left: auto; color: var(--muted); font-size: .8rem; }
.picker-list { margin-top: 4px; border: 1px solid var(--line); border-radius: 10px; max-height: 280px; overflow-y: auto; background: var(--panel); }
.picker-list button {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; border: 0; border-top: 1px solid var(--line);
  background: none; padding: 9px 11px; min-height: 44px; font-size: 16px; color: var(--text);
}
.picker-list button:first-child { border-top: 0; }
.picker-list button.on { background: var(--accent-soft); font-weight: 600; }
.picker-btn .mini-b, .picker-list .mini-b { flex: none; }
.swatch { display: inline-block; flex: none; width: 1.5em; border-radius: 3px; }
.swatch.line { height: .35em; }
.swatch.area { height: 1em; opacity: .8; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 10px; }
label.check { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
label.check input { width: 22px; height: 22px; }
.seg { display: flex; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.seg button { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 0; background: var(--panel-2); padding: 10px 6px; min-height: 42px; font-weight: 550; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--accent); color: var(--accent-text); }
.winds { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; margin-top: 4px; }
.winds button { border: 1px solid var(--line); background: var(--panel-2); border-radius: 8px; padding: 8px 0; font-size: .8rem; }
.winds button.on { background: var(--ok); color: #fff; border-color: var(--ok); }
.note { font-size: .88rem; padding: 8px 10px; border-radius: 10px; margin-top: 10px; background: var(--accent-soft); }
.note.bad { background: rgba(198, 40, 40, .13); color: var(--bad); }
.note.warn { background: rgba(178, 106, 0, .13); color: var(--warn); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); vertical-align: middle; }
.dot.ok { background: var(--ok); }
.dot.bad { background: var(--bad); }
.ok-t { color: var(--ok); }
.bad-t { color: var(--bad); }
.warn-t { color: var(--warn); }

/* --- Karte: Bedienelemente ---------------------------------------------- */
.map-tl { position: absolute; top: 10px; left: 10px; z-index: 900; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.map-tr { position: absolute; top: 10px; right: 10px; z-index: 900; display: flex; flex-direction: column; gap: 8px; }
.round {
  width: 44px; height: 44px; border-radius: 12px; border: 0;
  background: var(--panel); box-shadow: var(--shadow); font-size: 1.2rem;
}
.round.on { background: var(--accent); color: var(--accent-text); }
/* Standort-Knopf: blauer Pfeil, umrandet = aus, gefüllt = Standort läuft */
#btn-locate svg { width: 24px; height: 24px; display: block; margin: auto; }
#btn-locate path { fill: none; stroke: #1e88e5; stroke-width: 2.4; stroke-linejoin: round; }
#btn-locate.on { background: var(--panel); }
#btn-locate.on path { fill: #1e88e5; }
.wind-chip {
  border: 0; border-radius: 12px; background: var(--panel); box-shadow: var(--shadow);
  padding: 7px 11px; font-size: .9rem; font-weight: 600; display: flex; align-items: center; gap: 6px;
}
.wind-chip .arr { display: inline-block; font-size: 1.1rem; }
.wind-chip.on { background: var(--accent); color: var(--accent-text); }
.wind-canvas { pointer-events: none; }
.wind-bar {
  position: absolute; left: 10px; right: 88px; bottom: 18px; z-index: 900;
  background: rgba(20, 24, 20, .84); color: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 8px 10px;
}
.wb-head { display: flex; align-items: center; gap: 10px; }
.wb-btn {
  flex: none; width: 36px; height: 36px; border-radius: 50%; padding: 0;
  border: 1px solid rgba(255, 255, 255, .55); background: none; color: #fff; font-size: .95rem;
}
.wb-fold { border: 0; font-size: 1.25rem; }
.wb-info { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.wb-info b { font-size: .92rem; }
.wb-info span { font-size: .8rem; color: rgba(255, 255, 255, .8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wind-bar.folded .wb-body { display: none; }
#wb-range { width: 100%; margin: 10px 0 2px; accent-color: #8ee08e; }
.wb-ticks { display: flex; justify-content: space-between; font-size: .7rem; color: rgba(255, 255, 255, .75); }
.wb-leg { display: flex; gap: 2px; margin-top: 6px; font-size: .7rem; color: rgba(255, 255, 255, .8); }
.wb-leg span { flex: 1; padding-top: 3px; border-top: 4px solid; }
.wb-leg em { flex: 0 0 42px; font-style: normal; align-self: center; }
.wb-src { margin-top: 5px; font-size: .7rem; color: rgba(255, 255, 255, .7); }
.fab {
  position: absolute; right: 16px; bottom: 18px; z-index: 900;
  width: 60px; height: 60px; border-radius: 50%; border: 0;
  background: var(--accent); color: var(--accent-text); font-size: 2rem; line-height: 1;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
}
.editbar {
  position: absolute; left: 10px; right: 10px; bottom: 16px; z-index: 950;
  background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.editbar span { flex: 1 1 100%; font-size: .92rem; }
.editbar .btn { flex: 1; }

/* Marker */
.poi { background: none; border: 0; }
.poi-b {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; border: 2px solid #fff; box-shadow: 0 1px 5px rgba(0, 0, 0, .5);
}
.ico-svg { width: 1.3em; height: 1.3em; display: block; }
.poi-b .ico-svg { width: 24px; height: 24px; }
.mini-b { display: inline-flex; align-items: center; justify-content: center; width: 1.5em; height: 1.5em; border-radius: 50%; vertical-align: -0.35em; }
.emo { display: inline-block; width: 1.5em; text-align: center; flex: none; }
.mini-b .ico-svg { width: 1.15em; height: 1.15em; }
.poi-b.busy { border-color: #ff1744; box-shadow: 0 0 0 4px rgba(255, 23, 68, .45); }
.poi-b.booked { border-color: #ffab00; box-shadow: 0 0 0 4px rgba(255, 171, 0, .45); }
.poi-b.plan { border-style: dashed; border-width: 2.5px; }
.poi-b.warn { border-color: #ff9100; box-shadow: 0 0 0 4px rgba(255, 145, 0, .5); }
.poi-n {
  position: absolute; top: -7px; right: -9px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: #e53935; color: #fff; border: 2px solid #fff;
  font-size: 10px; font-weight: 700; line-height: 14px; text-align: center; pointer-events: none;
}
.poi-l {
  position: absolute; top: 36px; left: 50%; transform: translateX(-50%);
  white-space: nowrap; font-size: 11px; font-weight: 600; color: #fff;
  text-shadow: 0 0 3px #000, 0 0 3px #000; pointer-events: none;
}
.poi-l.who { color: #ffeb3b; }
.leaflet-tooltip.lbl {
  background: rgba(0, 0, 0, .6); color: #fff; border: 0; box-shadow: none;
  font-size: 11px; padding: 1px 6px; border-radius: 6px;
}
.leaflet-tooltip.lbl::before { display: none; }
.dist-l { background: none; border: 0; }
.dist-l span {
  position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); white-space: nowrap;
  background: rgba(0, 0, 0, .65); color: #fff; border-radius: 6px;
  font-size: 11px; font-weight: 600; padding: 1px 6px; pointer-events: none;
}
.e-dot {
  width: 20px; height: 20px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .55);
  color: #fff; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center;
}
.me-dot { width: 18px; height: 18px; border-radius: 50%; background: #1e88e5; border: 3px solid #fff; box-shadow: 0 0 0 2px rgba(30, 136, 229, .5); }
.me-dot.stale { background: #9e9e9e; box-shadow: 0 0 0 2px rgba(158, 158, 158, .5); }
.me-arrow { width: 32px; height: 32px; transition: transform .2s linear; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .55)); }
.me-arrow svg { display: block; width: 100%; height: 100%; }
.me-arrow path { fill: #1e88e5; stroke: #fff; stroke-width: 2.6; stroke-linejoin: round; }
.me-arrow.stale path { fill: #9e9e9e; }
.mate-dot { width: 16px; height: 16px; border-radius: 50%; background: #ff9100; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .6); }
.leaflet-container { font: inherit; }
.leaflet-control-attribution { font-size: 9px; }

/* --- Bottom-Sheet -------------------------------------------------------- */
#sheet-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 2000; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 2001;
  max-height: 88vh; max-height: 88dvh; overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: var(--panel); border-radius: 18px 18px 0 0;
  padding: 6px 16px calc(18px + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 20px rgba(0, 0, 0, .3);
}
@media (min-width: 700px) {
  .sheet { left: 50%; width: 560px; transform: translateX(-50%); }
}
.sheet-grip { width: 42px; height: 5px; border-radius: 3px; background: var(--line); margin: 4px auto 10px; }
.sheet-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.sheet-head h2 { margin: 0; flex: 1; }
.sheet-head .x { border: 0; background: var(--panel-2); width: 34px; height: 34px; border-radius: 50%; font-size: 1.1rem; }
.menu { list-style: none; margin: 0; padding: 0; }
.menu li button {
  width: 100%; text-align: left; border: 0; background: none;
  padding: 13px 4px; font-size: 1.02rem; border-top: 1px solid var(--line);
  display: flex; gap: 12px; align-items: center;
}
.menu li:first-child button { border-top: 0; }
.menu .ico { width: 28px; text-align: center; font-size: 1.25rem; }

/* Fotos */
.thumbs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.thumbs .th { position: relative; }
.thumbs img { width: 84px; height: 84px; object-fit: cover; border-radius: 9px; display: block; background: var(--panel-2); }
.thumbs .del {
  position: absolute; top: -6px; right: -6px; width: 24px; height: 24px; border-radius: 50%;
  border: 0; background: var(--bad); color: #fff; font-size: .8rem;
}
.photo-full { width: 100%; border-radius: 10px; display: block; background: #000; }
.thumbs [data-photo] { cursor: zoom-in; }

/* Vollbild-Ansicht (Fotos, Wildkamera) */
.viewer { position: fixed; inset: 0; z-index: 2500; background: #000; color: #fff; display: flex; flex-direction: column; }
.vw-bar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 2; display: flex; align-items: center; gap: 6px;
  padding: calc(6px + env(safe-area-inset-top)) calc(8px + env(safe-area-inset-right)) 6px calc(8px + env(safe-area-inset-left));
  background: linear-gradient(rgba(0, 0, 0, .75), rgba(0, 0, 0, .35)); transition: opacity .2s;
}
.viewer.bare .vw-bar, .viewer.bare .vw-nav { opacity: 0; pointer-events: none; }
.vw-bar button { background: transparent; border: 0; color: #fff; font: inherit; padding: 8px 10px; }
.vw-x { font-size: 1.25rem !important; }
.vw-cap { flex: 1; min-width: 0; font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vw-n { font-size: .78rem; color: #b8bcc4; white-space: nowrap; }
.vw-act button { font-size: .85rem; border: 1px solid rgba(255, 255, 255, .4); border-radius: 8px; padding: 6px 10px; white-space: nowrap; }
.vw-stage { flex: 1; min-height: 0; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; touch-action: none; }
.vw-stage img, .vw-stage video { max-width: 100%; max-height: 100%; object-fit: contain; }
.vw-stage img { transform-origin: 0 0; will-change: transform; -webkit-user-select: none; user-select: none; -webkit-touch-callout: default; }
.vw-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 1; width: 46px; height: 70px; border: 0; border-radius: 10px;
  background: rgba(0, 0, 0, .45); color: #fff; font-size: 2.2rem; line-height: 1; transition: opacity .2s;
}
.vw-nav.prev { left: 10px; }
.vw-nav.next { right: 10px; }
.vw-nav:disabled { opacity: 0; pointer-events: none; }
@media (hover: none) { .vw-nav { display: none; } }
.vw-bump-l { animation: vw-bump-l .28s ease-out; }
.vw-bump-r { animation: vw-bump-r .28s ease-out; }
@keyframes vw-bump-l { 35% { transform: translateX(-26px); } 100% { transform: none; } }
@keyframes vw-bump-r { 35% { transform: translateX(26px); } 100% { transform: none; } }
.thumbs .th.wc { cursor: pointer; }
.thumbs .th.wc.new img { box-shadow: 0 0 0 2px #7fb069; }
.wc-new {
  display: inline-block; background: #7fb069; color: #0e1207; border-radius: 5px;
  font-size: 10px; font-weight: 700; letter-spacing: .4px; padding: 1px 5px; line-height: 14px;
}
.th.wc .wc-new { position: absolute; top: 4px; left: 4px; box-shadow: 0 1px 4px rgba(0, 0, 0, .4); }
.thumbs .th.wc img { width: 104px; height: 78px; }
.wc-t {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 2px 4px; border-radius: 0 0 9px 9px;
  background: rgba(0, 0, 0, .55); color: #fff; font-size: 10px; text-align: center; white-space: nowrap;
}
.wc-v {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -60%);
  width: 30px; height: 30px; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff;
  font-size: 14px; line-height: 30px; text-align: center; pointer-events: none;
}

/* Strecke */
.entry { display: flex; gap: 10px; align-items: center; }
.entry img { width: 52px; height: 52px; object-fit: cover; border-radius: 9px; flex: none; }
.entry .kind { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.k-kill { background: var(--kill); }
.k-sighting { background: var(--sight); }
.k-fallwild { background: var(--fall); }
table.t { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.t th, table.t td { text-align: left; padding: 6px 4px; border-top: 1px solid var(--line); vertical-align: top; }
table.t th { color: var(--muted); font-weight: 550; border-top: 0; }
table.t td.n, table.t th.n { text-align: right; font-variant-numeric: tabular-nums; }

/* Wetter */
.hours { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -14px; padding: 0 14px; }
.hours table { border-collapse: collapse; font-size: .85rem; }
.hours td, .hours th { padding: 5px 7px; text-align: center; white-space: nowrap; border-top: 1px solid var(--line); }
.hours th { position: sticky; left: 0; background: var(--panel); text-align: left; color: var(--muted); font-weight: 550; }
.hours td.sel { background: var(--accent-soft); }
.arrow { display: inline-block; transition: transform .2s; }
.timeline { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 1px; height: 16px; border-radius: 4px; overflow: hidden; margin-top: 4px; }
.timeline i { display: block; background: var(--line); }
.timeline i.ok { background: var(--ok); }
.timeline i.bad { background: var(--bad); opacity: .65; }
.timeline-l { display: flex; justify-content: space-between; font-size: .72rem; color: var(--muted); }

/* Team / Chat */
.chat { max-height: 320px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 4px 0; }
.msg { max-width: 82%; padding: 7px 11px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line); }
.msg.me { align-self: flex-end; background: var(--accent-soft); }
.msg small { display: block; font-size: .72rem; }
.switch { position: relative; width: 52px; height: 32px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 16px; background: var(--line); transition: .2s; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::after { transform: translateX(20px); }

/* Anmeldung */
.auth { min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 24px 18px; }
.auth .card { width: 100%; max-width: 400px; padding: 22px 20px; }
.auth .logo { width: 72px; height: 72px; border-radius: 18px; display: block; margin: 0 auto 10px; }
.auth h1 { text-align: center; margin: 0 0 4px; font-size: 1.5rem; }

/* Hinweis-Toast */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom) + 14px);
  z-index: 3000; max-width: 92vw;
  background: #222; color: #fff; padding: 10px 16px; border-radius: 12px; box-shadow: var(--shadow);
  font-size: .95rem;
}
.toast.bad { background: var(--bad); }
.toast.ok { background: #2e7d32; }

/* Druck (Streckenliste) */
.print-only { display: none; }
@media print {
  body { background: #fff; color: #000; }
  #app, #auth, #sheet, #sheet-backdrop, #toast { display: none !important; }
  .print-only { display: block; font-size: 11pt; padding: 0; }
  .print-only h1 { font-size: 16pt; margin: 0 0 4pt; }
  .print-only table { width: 100%; border-collapse: collapse; margin: 8pt 0 14pt; }
  .print-only th, .print-only td { border: 1px solid #999; padding: 3pt 5pt; text-align: left; font-size: 9.5pt; }
  .print-only td.n, .print-only th.n { text-align: right; }
}
