/* Bienen-App – Gestaltung nach dem Design-Entwurf "Bienen-App Entwurf" */
/* Immer hell: Browser dürfen die App nicht automatisch abdunkeln (Dunkelmodus des Handys) */
:root { color-scheme: only light; }
:root {
  --bg: #F3F4EF;
  --card: #FFFFFF;
  --ink: #1B1F1A;
  --muted: #5A6157;
  --faint: #9AA393;
  --line: #ECEEE7;
  --border: #D6D9D0;
  --chip: #ECEEE7;
  --accent: #F2B705;
  --accent-ink: #1F1700;
  --accent-soft: #FCEBB6;
  --accent-soft-ink: #3D2E00;
  --green: #2F5D3A;
  --green-dark: #1F4028;
  --green-soft: #E3EFE2;
  --danger: #B3261E;
  --radius-card: 20px;
  --font-body: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-head: 'Space Grotesk', var(--font-body);

  /* Königinnen-Farbcode – reserviert, nur für Königinnen */
  --q-weiss: #FFFFFF;
  --q-gelb: #F5D000;
  --q-rot: #D32F2F;
  --q-gruen: #2E7D32;
  --q-blau: #1E5BB8;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font-family: var(--font-body); font-size: 15px; line-height: 1.35; -webkit-font-smoothing: antialiased; }
a { color: var(--green); }
a:hover { color: var(--green-dark); }
h1, h2, h3 { font-family: var(--font-head); margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- Grundlayout: ein Screen = Kopf, scrollender Inhalt, Fussleiste ---------- */
.app { max-width: 560px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; }
.screen { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.screen__head { padding: 20px 20px 0; display: flex; flex-direction: column; gap: 12px; }
.screen__body { flex: 1; padding: 14px 20px 20px; display: flex; flex-direction: column; gap: 14px; }
.screen__foot {
  position: sticky; bottom: 0; background: var(--bg);
  padding: 12px 20px calc(18px + env(safe-area-inset-bottom));
  display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 10px;
}
.row { display: flex; align-items: center; gap: 12px; }
.row--between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.grow { flex: 1; min-width: 0; }
.title { font-size: 28px; font-weight: 700; letter-spacing: -0.5px; white-space: nowrap; }
.title--sm { font-size: 22px; letter-spacing: 0; white-space: normal; }
.h2 { font-size: 17px; font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.label { font-size: 15px; font-weight: 600; }

/* ---------- Knöpfe ---------- */
.iconbtn {
  width: 44px; height: 44px; border-radius: 22px; flex-shrink: 0;
  background: var(--card); border: 1px solid var(--border); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; text-decoration: none;
}
.iconbtn svg { width: 20px; height: 20px; }
.iconbtn[aria-disabled="true"], .btn[aria-disabled="true"], .tile[aria-disabled="true"] { opacity: .42; cursor: not-allowed; }
.pillbtn {
  height: 44px; padding: 0 16px; border-radius: 22px; background: var(--card); border: 1px solid var(--border);
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink);
  font-size: 14px; font-weight: 600; cursor: pointer;
}
.btn {
  height: 54px; border-radius: 27px; border: 1px solid var(--ink); background: var(--card); color: var(--ink);
  display: flex; align-items: center; justify-content: center; text-decoration: none;
  font-weight: 600; font-size: 15px; cursor: pointer; padding: 0 16px; text-align: center;
}
.btn--primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 700; font-size: 16px; }
.btn--small { height: 44px; border-radius: 22px; font-size: 14px; }
.linkbtn {
  min-height: 44px; display: inline-flex; align-items: center; padding: 0 4px; border: none; background: none;
  font-size: 14px; font-weight: 600; color: var(--green); cursor: pointer; text-decoration: none;
}

/* Chips (Auswahl) */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips--wrap { flex-wrap: wrap; overflow: visible; gap: 6px; }
.chip {
  flex-shrink: 0; height: 44px; padding: 0 14px; border-radius: 22px; border: 1px solid var(--border);
  background: var(--card); color: var(--ink); font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
/* ja / nein / nicht erfasst */
.chip--tri[data-state="ja"] { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
.chip--tri[data-state="nein"] { background: var(--card); border: 2px dashed var(--ink); }

/* Grosse Wahlkacheln (Volktyp, Beute) */
.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.choices--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
@media (min-width: 420px) { .choices--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.choice {
  min-height: 52px; border-radius: 14px; border: 2px solid #E3E5DD; background: var(--card); color: var(--ink);
  font-size: 15px; font-weight: 600; cursor: pointer; padding: 6px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
}
.choice small { font-size: 12px; font-weight: 400; color: var(--muted); }
.choice[aria-pressed="true"] { border-color: var(--ink); background: var(--accent-soft); }
.choices--4 .choice { min-height: 44px; font-size: 13px; border-width: 1px; border-color: var(--border); border-radius: 12px; }
.choices--4 .choice[aria-pressed="true"] { background: var(--ink); color: #FFFFFF; border-color: var(--ink); }

/* ---------- Karten ---------- */
.card { background: var(--card); border-radius: var(--radius-card); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.card--flush { padding: 0; gap: 0; overflow: hidden; }
.card__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.note { font-size: 13px; color: #3A4038; background: var(--green-soft); border-radius: 14px; padding: 12px 14px; }
.note--warn { background: var(--accent-soft); color: var(--accent-soft-ink); }
.note--danger { background: #F9DEDC; color: #601410; }
.badge { font-size: 12px; font-weight: 600; background: var(--green-soft); color: var(--green-dark); padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.badge--grey { background: var(--chip); color: var(--muted); }
.badge--warn { background: var(--accent-soft); color: var(--accent-soft-ink); }
.badge--danger { background: #F9DEDC; color: #601410; }
.boxtag {
  font-size: 12px; font-weight: 700; letter-spacing: .3px; border: 1.5px solid var(--ink); border-radius: 6px;
  padding: 1px 6px; white-space: nowrap; line-height: 1.3;
}
.racetag {
  font-size: 11px; font-weight: 700; letter-spacing: .4px; background: var(--chip); color: #3A4038;
  border-radius: 999px; padding: 2px 7px; line-height: 1.3; white-space: nowrap;
}
.boxtag--lg { font-size: 13px; padding: 1px 7px; }
.boxtag--none { border-style: dashed; border-color: var(--faint); color: var(--muted); }

/* ---------- Völkerliste ---------- */
.colony {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px; min-height: 56px;
  border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink);
}
.colony:last-child { border-bottom: none; }
.colony--pick { width: 100%; border: none; border-bottom: 1px solid var(--line); background: var(--card); text-align: left; cursor: pointer; font: inherit; }
.colony--pick[aria-pressed="true"] { background: var(--accent-soft); }
.tick {
  width: 30px; height: 30px; border-radius: 8px; border: 2px solid var(--border); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; color: transparent; background: var(--card);
}
.colony--pick[aria-pressed="true"] .tick { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
.colony:hover { background: #FAFBF7; color: var(--ink); }
.colony__name { font-size: 16px; font-weight: 600; }
.colony__line { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chev { color: var(--faint); font-size: 20px; }
.frames { font-size: 14px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.frames strong { font-family: var(--font-head); font-size: 18px; color: var(--ink); }
.frames--unknown strong { color: var(--faint); }
.empty { padding: 22px 14px; text-align: center; color: var(--muted); font-size: 14px; }

/* ---------- Königinnen-Kreis ---------- */
.qc {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; border: 2px solid transparent; line-height: 1;
}
.qc--lg { width: 56px; height: 56px; font-family: var(--font-head); font-size: 20px; }
.qc--sm { width: 14px; height: 14px; border-width: 1px; }
.qc--weiss { background: var(--q-weiss); color: var(--ink); border-color: #767676; }
.qc--gelb { background: var(--q-gelb); color: var(--ink); border-color: #C9AB00; }
.qc--rot { background: var(--q-rot); color: #FFFFFF; border-color: var(--q-rot); }
.qc--gruen { background: var(--q-gruen); color: #FFFFFF; border-color: var(--q-gruen); }
.qc--blau { background: var(--q-blau); color: #FFFFFF; border-color: var(--q-blau); }
/* ungezeichnet: grau gefüllt, gestrichelt – nie mit Weiss verwechselbar */
.qc--ungezeichnet { background: #D9DCD3; color: var(--ink); border: 2px dashed var(--muted); }
.qc--unbekannt { background: var(--bg); color: var(--muted); border: 2px dashed var(--faint); }
.qc--keine { background: transparent; color: var(--faint); border: 2px dashed var(--border); }
.legend { display: flex; gap: 4px; align-items: center; }

/* Fortschrittsbalken Einwinterung (honig-orange wie im Entwurf) */
.bar { height: 14px; background: #F3EBE4; border-radius: 7px; overflow: hidden; }
.bar__fill { height: 100%; background: #D08A1E; border-radius: 7px; }

/* ---------- Behandlung: Mittel aus dem Lager ---------- */
.med {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; border-radius: 16px;
  border: 2px solid #E3E5DD; background: var(--card); color: var(--ink); cursor: pointer;
}
.med[aria-pressed="true"] { border-color: var(--ink); }
.med:disabled { color: var(--faint); cursor: not-allowed; }
.med__stock { font-family: var(--font-head); font-size: 16px; font-weight: 700; white-space: nowrap; }

/* ---------- Aufgaben ---------- */
.task {
  display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 0; width: 100%;
  border: none; border-top: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; color: var(--ink);
}
.task:first-of-type { border-top: none; }
.task__tick {
  width: 28px; height: 28px; border-radius: 14px; border: 2px solid var(--faint); background: var(--card);
  display: flex; align-items: center; justify-content: center; color: transparent; flex-shrink: 0;
}
.task__text { font-size: 15px; font-weight: 600; }
.task__when { font-size: 13px; color: var(--muted); }
.task.is-overdue .task__tick { border-color: var(--danger); }
.task.is-overdue .task__when { color: var(--danger); }
.task.is-done .task__tick { background: var(--green); border-color: var(--green); color: #FFFFFF; }
.task.is-done .task__text { text-decoration: line-through; color: #6B7268; }
.task.is-done .task__when { color: var(--green); }
.chip--suggest { height: 40px; border-style: dashed; border-color: var(--faint); background: transparent; font-weight: 500; font-size: 13px; }
.taskcount {
  min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px; background: var(--ink); color: #FFFFFF;
  font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
}
.taskcount--overdue { background: var(--danger); }

/* ---------- Schnellaktionen ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tile {
  background: var(--card); border-radius: 16px; height: 72px; border: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  text-decoration: none; color: var(--ink); font-size: 13px; font-weight: 600; cursor: pointer;
}
.tile:hover { color: var(--ink); }
.dot { width: 10px; height: 10px; border-radius: 5px; flex-shrink: 0; }

/* ---------- Verlauf ---------- */
.timeline { display: flex; flex-direction: column; gap: 10px; }
.tl { display: flex; gap: 12px; align-items: flex-start; }
.tl__date { width: 84px; flex-shrink: 0; font-size: 13px; color: var(--muted); padding-top: 2px; }
.tl .dot { margin-top: 6px; }
.tl__title { font-size: 15px; font-weight: 600; }

.chron-year { font-size: 14px; font-weight: 600; color: var(--muted); padding-top: 6px; border-top: 1px solid var(--border); }
.chron-year:first-child { border-top: none; padding-top: 0; }
.tl__date { width: 52px; }

/* Hinweisband (wie "Aufgaben fällig" im Entwurf) */
.banner {
  text-decoration: none; background: var(--accent-soft); color: var(--accent-soft-ink); border-radius: 16px;
  padding: 12px 14px; display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; font-weight: 600;
}
.banner:hover { color: var(--accent-soft-ink); }
.banner--alarm { background: #F9DEDC; color: #601410; }
.alarm {
  display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 700; white-space: nowrap;
  color: #FFFFFF; background: var(--danger); border-radius: 999px; padding: 2px 7px 2px 5px; line-height: 1.3;
}

/* ---------- Formulare ---------- */
.fields { background: var(--card); border-radius: var(--radius-card); padding: 6px 14px; }
.field { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.field:last-child { border-bottom: none; }
.field > span { font-size: 12px; color: var(--muted); font-weight: 500; }
.field.is-missing > span { color: var(--danger); }
.field input, .field select, .field textarea {
  height: 34px; border: none; padding: 0; font-size: 16px; background: transparent; min-width: 0; width: 100%;
}
.field textarea { height: auto; min-height: 60px; resize: vertical; }
.input-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.box-input { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.box-input input, .box-input select, .select {
  height: 48px; border-radius: 12px; border: 1px solid var(--border); background: var(--card);
  padding: 0 12px; font-size: 16px; color: var(--ink); min-width: 0; width: 100%;
}
.box-input.is-invalid input { border-color: var(--danger); }
.toggle {
  background: var(--card); border-radius: 16px; padding: 0 14px; min-height: 56px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 15px; font-weight: 600;
}
.toggle input { width: 24px; height: 24px; margin: 0; accent-color: var(--ink); flex-shrink: 0; }
.stepper { background: var(--card); border-radius: 14px; padding: 6px 6px 6px 14px; display: flex; align-items: center; justify-content: space-between; }
.stepper button { width: 44px; height: 44px; border-radius: 10px; border: none; background: var(--chip); font-size: 20px; cursor: pointer; }
.stepper--changed { background: var(--accent-soft); }
.stepper output { width: 36px; text-align: center; font-family: var(--font-head); font-size: 20px; font-weight: 700; }
.tabs { background: var(--card); border-radius: 16px; padding: 4px; display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 4px; }
.tab { height: 44px; border-radius: 12px; border: none; background: transparent; font-size: 14px; font-weight: 600; cursor: pointer; }
.tab[aria-selected="true"] { background: var(--ink); color: #FFFFFF; }
.namerow { display: grid; grid-template-columns: minmax(0, 1fr) 112px; gap: 8px; }
.boxnr {
  display: flex; align-items: center; height: 48px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--card); overflow: hidden; min-width: 0;
}
.boxnr.is-invalid { border-color: var(--danger); }
.boxnr__prefix {
  align-self: stretch; display: flex; align-items: center; padding: 0 10px; background: var(--chip);
  font-family: var(--font-head); font-weight: 700; font-size: 18px;
}
.boxnr input {
  flex: 1; min-width: 0; height: 100%; border: none; padding: 0 10px; background: transparent;
  font-family: var(--font-head); font-weight: 700; font-size: 18px;
}
.namerow input { font-family: var(--font-head); font-weight: 700; font-size: 18px; }

/* ---------- Meldung ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--ink); color: #FFFFFF; padding: 12px 18px; border-radius: 14px; font-size: 14px; font-weight: 500;
  max-width: calc(100% - 32px); box-shadow: 0 6px 24px rgba(0,0,0,.18); z-index: 10;
}
.toast--danger { background: var(--danger); }

.offline {
  position: sticky; top: 0; z-index: 5; background: var(--ink); color: #FFFFFF; text-align: center;
  font-size: 13px; font-weight: 600; padding: 6px 12px;
}

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

/* Offizielle Dokumente (Behandlungsjournal, Bestandeskontrolle): am Bildschirm als A4-Blatt, Druck = PDF */
.app--wide { max-width: 1120px; }
.doc-scroll { overflow-x: auto; margin: 0 -20px; padding: 0 20px 8px; }
.doc {
  background: #FFFFFF; color: #000000; font-family: var(--font-body); font-size: 10.5px; line-height: 1.3;
  padding: 14mm 12mm; box-shadow: 0 2px 12px rgba(0,0,0,.12); border-radius: 4px;
}
.doc--quer { width: 297mm; min-height: 210mm; }
.doc--hoch { width: 210mm; min-height: 297mm; }
.doc h1 { font-family: var(--font-head); font-size: 18px; margin: 0 0 2px; }
.doc .doc__sub { color: #444444; margin: 0 0 10px; }
.doc__kopf { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px 14px; border: 1px solid #000000; padding: 6px 8px; margin-bottom: 10px; }
.doc__kopf dt { font-weight: 700; font-size: 9px; text-transform: uppercase; letter-spacing: .03em; color: #444444; }
.doc__kopf dd { margin: 0; white-space: pre-line; }
.doc table { width: 100%; border-collapse: collapse; }
.doc th, .doc td { border: 1px solid #000000; padding: 3px 4px; text-align: left; vertical-align: top; }
.doc th { background: #EEEEEE; font-size: 9.5px; }
.doc td.num, .doc th.num { text-align: right; white-space: nowrap; }
.doc .doc__leer { color: #666666; font-style: italic; text-align: center; padding: 10px; }
.doc .doc__fuss { margin-top: 10px; font-size: 9px; color: #333333; }
.doc h2 { font-size: 12px; margin: 12px 0 4px; }

@media print {
  body { background: #FFFFFF; }
  #offline, #toast, .no-print { display: none !important; }
  .app, .app--wide { max-width: none; margin: 0; }
  .screen__body { padding: 0; gap: 0; }
  .doc-scroll { overflow: visible; margin: 0; padding: 0; }
  .doc { box-shadow: none; border-radius: 0; padding: 0; width: auto; min-height: 0; }
  .doc tr { break-inside: avoid; }
  .doc thead { display: table-header-group; }
}

/* Stockkarte (A4 hoch, nach Design-Entwurf) */
.sk { width: 794px; display: flex; flex-direction: column; gap: 16px; color: #1B1F1A; font-family: var(--font-body); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.sk-page { background: #FFFFFF; box-shadow: 0 2px 12px rgba(0,0,0,.12); border-radius: 4px; padding: 44px 48px 36px; display: flex; flex-direction: column; gap: 18px; }
.sk-chronik { display: flex; flex-direction: column; }
.sk-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sk-table th { text-align: left; font-weight: 600; padding: 6px 0; border-top: 1px solid #1B1F1A; border-bottom: 1px solid #1B1F1A; }
.sk-table td { padding: 5px 0; border-bottom: 1px solid #D6D9D0; }
.sk-fuss { font-size: 12px; color: #5A6157; padding: 0 4px; }
@media print {
  .sk { width: auto; gap: 0; }
  .sk-page { box-shadow: none; border-radius: 0; padding: 0; }
  .sk-page--neu { break-before: page; }
  .sk-chronik { break-before: auto; }
  .sk-fuss { position: fixed; bottom: -10mm; left: 0; right: 0; border-top: 1px solid #D6D9D0; padding-top: 2mm; }
}

/* Walliser Briefkopf, Jahr im Titel, Unterschrift */
.doc__wallis { display: grid; grid-template-columns: auto 1fr; gap: 8mm; align-items: start; margin-bottom: 6mm; }
.doc-jahr { font: inherit; width: 3.2em; border: none; border-bottom: 2px dotted #999; background: #FFF8DC; padding: 0 2px; color: inherit; -moz-appearance: textfield; }
.doc-jahr::-webkit-inner-spin-button, .doc-jahr::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.doc__unterschrift { margin-top: 8mm; font-size: 10px; break-inside: avoid; }
.doc__linie { border-bottom: 1px solid #000; height: 10mm; margin-bottom: 2px; }
@media print {
  .doc-jahr { border: none; background: none; }
}

/* Antwortfelder im Erfassungsblatt (am Bildschirm Eingabe, im Druck Text) */
.doc-feld { font: inherit; width: 100%; border: none; border-bottom: 1px dotted #999; background: #FFF8DC; padding: 1px 2px; color: inherit; }
@media print { .doc-feld { border: none; background: none; -webkit-appearance: none; appearance: none; } }

/* Zuchtvolk: Stern (bewusst schwarz/weiss – Farben gehören den Königinnen) */
.zuchttag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 11px; background: var(--ink); color: #FFFFFF; font-size: 12px; font-weight: 700; white-space: nowrap; }
.zuchttag--btn { height: 32px; padding: 0 12px; border: 1.5px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer; font-size: 13px; }
.zuchttag--btn[aria-pressed="true"] { background: var(--ink); color: #FFFFFF; }

/* Abgeschwärmt (braun – Ausschluss für die Zucht) */
.schwarmtag { display: inline-flex; align-items: center; height: 22px; padding: 0 6px; border-radius: 11px; background: #7A4E2D; color: #FFFFFF; font-size: 12px; font-weight: 700; white-space: nowrap; }
.schwarmtag--btn { height: 32px; padding: 0 12px; border: 1.5px solid #7A4E2D; background: transparent; color: #7A4E2D; cursor: pointer; font-size: 13px; }
.schwarmtag--btn[aria-pressed="true"] { background: #7A4E2D; color: #FFFFFF; }

/* Honigverkauf: Abhaken in der Liste, Druckansicht nur im PDF */
.verkauf-toggle { height: 34px; padding: 0 10px; border-radius: 17px; border: 1.5px solid var(--border); background: var(--card); color: var(--danger); font-size: 12px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.verkauf-toggle[aria-pressed="true"] { border-color: #3F8F47; background: #3F8F47; color: #FFFFFF; }
.print-only { display: none; }
@media print { .print-only { display: block; } }

/* Kopfzeile der Übersicht: Knöpfe unter dem Titel (App ist auch am PC höchstens 560 px breit) */
.head-wrap { flex-wrap: wrap; row-gap: 10px; }
.head-tools { width: 100%; justify-content: space-between; }

/* Stände-Auswahl: untereinander statt seitlich abgeschnitten */
.chips.staende { flex-direction: column; align-items: stretch; overflow: visible; }
.chips.staende .chip { width: 100%; }

/* Wetter am Stand */
.wetter { display: flex; flex-direction: column; gap: 8px; }
.wetter__tage { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.wetter__tag { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 10px; background: var(--bg, #F3F4EF); }
.wetter__tag--gut { background: #E3F1E0; outline: 1px solid #3F8F47; }

/* Sehr schmale Handys (oder grosse Schrift): Knöpfe der Kopfzeile etwas kleiner, notfalls umbrechen */
.head-tools { flex-wrap: wrap; gap: 6px !important; }
@media (max-width: 400px) {
  .screen__head, .screen__body { padding-left: 14px; padding-right: 14px; }
  .head-tools .iconbtn { width: 40px; height: 40px; }
  .head-tools .pillbtn { height: 40px; padding: 0 12px; }
}
/* Kopfzeilen allgemein: Titel und Knöpfe dürfen umbrechen statt rechts hinauszuragen */
.screen__head .row--between { flex-wrap: wrap; row-gap: 8px; }
.screen__head .row { min-width: 0; }
/* Lange Produktnamen in Auswahl-Chips umbrechen */
.chips--wrap .chip { max-width: 100%; white-space: normal; text-align: left; height: auto; min-height: 36px; }
/* Honigverkauf: auf schmalen Handys die Knöpfe unter den Namen */
@media (max-width: 400px) {
  .verkauf-zeile { flex-wrap: wrap; }
  .verkauf-zeile > button.row { flex-basis: 100%; }
  .verkauf-zeile .verkauf-toggle { flex: 1; }
}
.tabs .tab { min-width: 0; }

/* QR-Etiketten für die Beuten */
.qr-bogen { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.qr-bogen--einzeln { grid-template-columns: minmax(0, 320px); justify-content: center; }
.qr-etikett { margin: 0; padding: 10px; background: #FFFFFF; border: 1px solid var(--border); border-radius: 12px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; break-inside: avoid; }
.qr-etikett__code { width: 100%; max-width: 140px; aspect-ratio: 1; }
.qr-etikett--gross .qr-etikett__code { max-width: 280px; }
.qr-etikett__code svg { width: 100%; height: 100%; display: block; }
.qr-etikett figcaption { display: flex; flex-direction: column; gap: 2px; font-size: 15px; }
@media print {
  .qr-bogen { grid-template-columns: repeat(4, 45mm); gap: 4mm; }
  .qr-bogen--einzeln { grid-template-columns: 80mm; }
  .qr-etikett { border: 1px dashed #999; border-radius: 0; padding: 3mm; }
}

/* Schnellaktionen im Stammblatt: grössere Kacheln mit Symbol in Farbe der Eintragsart */
.tiles { gap: 10px; }
.tile {
  height: auto; min-height: 96px; padding: 12px 6px; border: 1px solid var(--border);
  font-size: 14px; gap: 8px; position: relative; overflow: hidden;
  transition: transform .12s ease, box-shadow .12s ease;
}
.tile::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--tc, var(--ink)); }
.tile:hover, .tile:focus-visible { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.tile:active { transform: scale(.98); }
.tile__sym {
  width: 46px; height: 46px; border-radius: 23px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 24px; line-height: 1; background: color-mix(in srgb, var(--tc, #1B1F1A) 14%, #FFFFFF);
}
.tile__label { text-align: center; line-height: 1.2; }
.tile--haupt { min-height: 108px; background: color-mix(in srgb, var(--tc) 8%, var(--card)); border-color: color-mix(in srgb, var(--tc) 35%, var(--border)); }
.tile--haupt .tile__sym { width: 52px; height: 52px; border-radius: 26px; font-size: 27px; background: color-mix(in srgb, var(--tc) 22%, #FFFFFF); }
.tile--haupt .tile__label { font-size: 15px; font-weight: 700; }
@media (max-width: 360px) { .tile { min-height: 88px; font-size: 13px; } .tile__sym { width: 40px; height: 40px; font-size: 21px; } }

/* Karte der Stände (swisstopo) */
.karte { position: relative; height: min(65vh, 560px); border-radius: 16px; overflow: hidden; background: #E8EAE3; border: 1px solid var(--border); touch-action: none; user-select: none; cursor: grab; }
.karte:active { cursor: grabbing; }
.karte__kacheln, .karte__marker-ebene { position: absolute; inset: 0; }
.karte__marker-ebene { pointer-events: none; }
.karte__kachel { position: absolute; width: 256px; height: 256px; }
.karte__marker { position: absolute; transform: translate(-50%, -100%); display: flex; flex-direction: column; align-items: center; text-decoration: none; pointer-events: auto; }
.karte__pin { width: 34px; height: 34px; border-radius: 17px 17px 17px 0; transform: rotate(-45deg); background: #F2B705; border: 2px solid #1B1F1A; display: flex; align-items: center; justify-content: center; font-size: 16px; color: #1B1F1A; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.karte__pin { line-height: 1; }
.karte__marker--aktiv .karte__pin { background: #C0392B; color: #FFFFFF; }
.karte__name { margin-top: 4px; background: rgba(255,255,255,.92); color: #1B1F1A; font-size: 12px; font-weight: 700; padding: 2px 6px; border-radius: 8px; white-space: nowrap; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.karte__zoom { position: absolute; right: 10px; top: 10px; display: flex; flex-direction: column; gap: 6px; }
.karte__zoom button { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border); background: #FFFFFF; font-size: 20px; font-weight: 700; cursor: pointer; color: #1B1F1A; }
.karte__quelle { position: absolute; left: 8px; bottom: 6px; font-size: 11px; background: rgba(255,255,255,.8); padding: 1px 5px; border-radius: 4px; color: #1B1F1A; }

/* Startbildschirm: je ein Einstieg für Honig (braun) und Königinnenzucht (schwarz/weiss) */
.honigbtn {
  display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 16px; border-radius: 14px;
  background: #8A5A2B; color: #FFFFFF; text-decoration: none; font-weight: 700; font-size: 16px; flex-wrap: wrap;
}
.honigbtn:hover { color: #FFFFFF; filter: brightness(1.06); }
.honigbtn > span:first-child { font-size: 22px; }
.honigbtn--zucht { background: #1B1F1A; }

/* Zuchtserie */
.zuchtschritt { gap: 8px; border-left: 4px solid #C9CDC3; }
.zuchtschritt--fertig { border-left-color: #1B1F1A; }
.honigbtn--buchhaltung { background: #5A6157; }

/* Honig-Banner (Direktverkauf) oben auf der Honig-Seite */
.honig-banner { width: 100%; height: auto; border-radius: 14px; display: block; box-shadow: 0 2px 10px rgba(0,0,0,.12); }

/* Logo Imkerei Eschigrund neben dem Titel der Übersicht */
.kopf-logo { width: 48px; height: 48px; object-fit: contain; flex-shrink: 0; }

/* Draussen-Modus (Sonne): maximaler Kontrast – reines Weiss, tiefschwarze Schrift, kräftige Ränder, grössere Schrift */
html.draussen {
  --bg: #FFFFFF; --card: #FFFFFF; --ink: #000000; --muted: #2B2B2B; --faint: #4A4A4A;
  --line: #9A9A9A; --border: #6E6E6E; --chip: #E6E6E6;
}
html.draussen body { font-size: 17px; font-weight: 500; -webkit-font-smoothing: auto; }
html.draussen .small { font-size: 14px; }
html.draussen .muted, html.draussen .small.muted { color: var(--muted) !important; }
html.draussen .card, html.draussen .chip, html.draussen .iconbtn, html.draussen .pillbtn,
html.draussen .tile, html.draussen .colony, html.draussen .box-input input { border-color: var(--border); border-width: 2px; }
html.draussen .chip[aria-pressed="true"], html.draussen .tab[aria-selected="true"] { outline: 2px solid #000; }
.iconbtn--an { background: #000; color: #FFF; border-color: #000; }

/* Chronik: Eintrag bearbeiten / löschen */
.tl__edit { flex-shrink: 0; width: 36px; height: 36px; border-radius: 18px; display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; color: var(--muted); border: 1px solid var(--border); background: var(--card); font-size: 16px; }
.tl__edit:hover { color: var(--ink); border-color: var(--ink); }

/* Beurteilung: Schieberegler 1–6 */
.regler { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); }
.regler__name { font-weight: 600; }
.regler__wert { font-family: var(--font-head); font-size: 20px; font-weight: 700; min-width: 2.2em; text-align: right; }
.regler__leer { width: 30px; height: 30px; border-radius: 15px; border: 1px solid var(--border); background: var(--card); cursor: pointer; color: var(--muted); }
.regler__band { width: 100%; height: 32px; accent-color: #6B4FA0; margin: 0; cursor: pointer; }
.regler--leer .regler__band { opacity: .35; }
.regler--leer .regler__wert { color: var(--faint); }
.regler__skala { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); padding: 0 6px; margin-top: -4px; }

/* PDF per E-Mail: Darstellung der Kopie wie beim Drucken, Auswahl-Blatt */
.pdf-modus { background: #FFFFFF; }
.pdf-modus.doc, .pdf-modus .doc { box-shadow: none; border-radius: 0; padding: 0; width: auto; min-height: 0; }
.pdf-modus.print-only, .pdf-modus .print-only { display: block; }
.pdf-modus .no-print { display: none !important; }
.pdf-modus.sk { width: auto; gap: 0; }
.pdf-modus .sk-page { box-shadow: none; border-radius: 0; padding: 0; }
.pdf-modus .sk-fuss { margin-top: 6mm; border-top: 1px solid #D6D9D0; padding-top: 2mm; }
.pdf-sheet { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.35); display: flex; align-items: flex-end; justify-content: center; padding: 16px; }
.pdf-sheet__karte { background: var(--card, #FFFFFF); color: var(--ink, #1B1F1A); border-radius: 16px; padding: 18px; width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 8px 30px rgba(0,0,0,.25); }
@media (min-width: 700px) { .pdf-sheet { align-items: center; } }

/* Übersicht: Reihenfolge der Völker ändern */
.colony--ordnen { cursor: default; }
.ordnen-btns { display: flex; flex-direction: column; gap: 4px; margin-left: 4px; }
.ordnen-btn { width: 44px; height: 32px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--ink); font-size: 15px; cursor: pointer; }
.ordnen-btn:disabled { opacity: .3; cursor: default; }

/* Waage-Abzeichen auf der Volksseite: springt zur Waagen-Karte */
.badge--btn { cursor: pointer; font: inherit; font-size: 12px; font-weight: 600; border: 1px solid transparent; }
.badge--btn:hover { border-color: currentColor; }
@keyframes card-blink { 0%, 100% { box-shadow: 0 0 0 0 transparent; } 30% { box-shadow: 0 0 0 3px #6B4FA0; } }
.card--blink { animation: card-blink 1.6s ease; }

/* Zuchtauswahl: Vergleichstabelle */
.zt { width: 100%; border-collapse: collapse; font-size: 13px; }
.zt th { text-align: left; font-size: 11px; font-weight: 600; color: var(--muted); padding: 6px 6px; border-bottom: 2px solid var(--border); white-space: nowrap; }
.zt td { padding: 7px 6px; border-bottom: 1px solid var(--border); vertical-align: top; }
.zt__zahl { text-align: right !important; font-weight: 700; white-space: nowrap; }
.zt__nr { width: 1.5em; color: var(--muted); font-weight: 600; }
.zt__schnitt { font-size: 15px; background: rgba(107, 79, 160, .07); }

/* Honigverkauf: Bestellungen grösser und gut lesbar */
.verkauf-zeile { padding-top: 14px; padding-bottom: 14px; }
.verkauf-datum { width: 54px; font-size: 15px; font-weight: 600; color: var(--muted); }
.verkauf-name { font-size: 18px; font-weight: 700; line-height: 1.25; }
.verkauf-info { font-size: 15px; }
.verkauf-zeile .verkauf-toggle { height: 42px; padding: 0 14px; font-size: 14px; border-radius: 21px; }

/* Honigverkauf: markanter Knopf «+ Bestellung» */
.bestellbtn { height: 48px; padding: 0 20px; border-radius: 24px; border: 2px solid #8A5A2B; background: #F2B705; color: #1B1F1A;
  font: inherit; font-size: 17px; font-weight: 800; white-space: nowrap; cursor: pointer; box-shadow: 0 3px 10px rgba(138, 90, 43, .35); }
.bestellbtn:active { transform: translateY(1px); box-shadow: 0 1px 4px rgba(138, 90, 43, .35); }
.bestellbtn--start { display: flex; align-items: center; justify-content: center; text-decoration: none; width: 100%; height: 52px; }
