/* Schriften wie auf der Vereinsseite, selbst ausgeliefert (OFL 1.1, fonts/LICENSE.txt), nur Teilmenge latin */
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url(fonts/figtree.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow Semi Condensed"; font-style: normal; font-weight: 500; font-display: swap;
  src: url(fonts/barlow-semi-condensed-500.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow Semi Condensed"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(fonts/barlow-semi-condensed-700.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Source Serif 4"; font-style: italic; font-weight: 200 900; font-display: swap;
  src: url(fonts/source-serif-4-italic.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  --tab-h: 62px;
  --f-body: "Figtree", "Avenir Next", "Avenir", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --f-cond: "Barlow Semi Condensed", "Avenir Next Condensed", "Arial Narrow", "Avenir Next", sans-serif;
  --f-serif: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --head-bg: var(--bg);
  --bg: #000;
  --surface: #120404;
  --surface-2: #1e0707;
  --line: #3a0d0d;
  --text: #e04a3a;
  --text-dim: #8a2b22;
  --accent: #ff3b2a;
  --accent-ink: #000;
  --active: #ff5a3c;
  --danger: #ff3b2a;
  --ring: #6b1a12;
  color-scheme: dark;
}
/* Hell (Standard): Papierton und Weiß der Vereinsseite, Grün nur für Hauptknöpfe, Messing als Akzent */
[data-theme="light"] {
  --bg: #f3f1ea;
  --surface: #ffffff;
  --surface-2: #ece8dc;
  --line: #e2ddcf;
  --text: #1b1e17;
  --text-dim: #6b6f63;
  --accent: #2e5719;
  --accent-ink: #ffffff;
  --active: #1f3513;
  --danger: #b3261e;
  --ring: #d9e3c9;
  --brass: #a9802f;
  --brass-soft: #f4ecd9;
  --shadow: 0 1px 2px rgba(27, 30, 23, .05), 0 8px 24px -12px rgba(27, 30, 23, .18);
  --glass: rgba(255, 255, 255, .82);
  --head-bg: url("contours-dark.svg") right -320px top -220px / 1000px auto no-repeat;
  color-scheme: light;
}
/* Grün: dunkle Variante im Vereinsgrün, ruhig gehalten */
[data-theme="gruen"] {
  --bg: #0e150b;
  --surface: #172212;
  --surface-2: #213019;
  --line: #2a3a21;
  --text: #f1eee4;
  --text-dim: #a3ad94;
  --accent: #c49a45;
  --accent-ink: #11180c;
  --active: #e0c487;
  --danger: #f08a7e;
  --ring: #2e4220;
  --brass: #c49a45;
  --brass-soft: #2a2c17;
  --shadow: 0 8px 24px -14px rgba(0, 0, 0, .7);
  --glass: rgba(14, 21, 11, .82);
  --head-bg: url("contours-light.svg") right -320px top -220px / 1000px auto no-repeat;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); }
body {
  font: 16px/1.4 var(--f-body);
  overscroll-behavior: none;
  -webkit-user-select: none; user-select: none;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input { font: inherit; }
[hidden] { display: none !important; }

/* ---------- Zählansicht ---------- */
#view-count {
  height: calc(100dvh - var(--tab-h) - env(safe-area-inset-bottom));
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  grid-template-columns: minmax(0, 1fr);
  padding: env(safe-area-inset-top) 0 0;
  overflow: hidden;
}
.topbar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
}
.session-info { flex: 1; font-size: 13px; color: var(--text-dim); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.session-info span { display: block; }
.gps-state { font-size: 11px; }
.gps-state.ok { color: var(--text-dim); }
.gps-state.bad { color: var(--danger); font-weight: 700; }
.count-btn.warn { border-style: dashed; border-color: var(--danger); box-shadow: none; }
.dup-warn {
  max-width: 340px; text-align: center; font-size: 14px; line-height: 1.3;
  padding: 8px 12px; border-radius: 12px; border: 2px dashed var(--danger);
  background: var(--surface);
}
.select {
  min-height: 44px; padding: 0 10px; border-radius: 10px; font: inherit;
  background: var(--surface); border: 1px solid var(--line); color: var(--text);
}
.icon-btn {
  width: 44px; height: 44px; border-radius: 12px;
  font-size: 22px; display: grid; place-items: center;
  background: var(--surface);
}
.chip.method {
  min-height: 44px; padding: 0 14px; border-radius: 22px;
  background: var(--surface-2); border: 1px solid var(--line);
  font-weight: 600; font-size: 14px;
}

.species-bar {
  display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity;
  padding: 6px 12px 10px; scrollbar-width: none;
}
.species-bar::-webkit-scrollbar { display: none; }
.sp-chip {
  flex: 0 0 auto; scroll-snap-align: center;
  min-height: 52px; padding: 6px 14px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-weight: 600; font-size: 15px; line-height: 1.1;
}
.sp-chip small { font-weight: 500; font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.sp-chip.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.sp-chip.active small { color: var(--accent-ink); opacity: .75; }
.sp-chip.more { border-style: dashed; }

.counter-area {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; padding: 0 16px; touch-action: pan-y;
}
.current-name { font-size: 26px; font-weight: 700; letter-spacing: .01em; text-align: center; }
.current-total { font-size: 14px; color: var(--text-dim); }
.count-btn {
  width: min(72vw, 46dvh, 340px); aspect-ratio: 1; border-radius: 50%;
  background: var(--surface-2);
  border: 6px solid var(--accent);
  box-shadow: 0 0 0 10px var(--ring) inset;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: transform .06s ease;
  touch-action: manipulation;
}
.count-btn:active, .count-btn.pulse { transform: scale(.96); background: var(--surface); }
.count-value { font-size: min(22vw, 120px); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.count-hint { font-size: 13px; color: var(--text-dim); margin-top: 6px; }

.bottom-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  padding: 10px 16px 14px;
}
.action-btn {
  min-height: 64px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-weight: 600; font-size: 17px;
}
.action-btn .ico { font-size: 24px; font-weight: 800; }
.action-btn:disabled { opacity: .35; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tab-h) + 96px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(10px);
  background: var(--surface-2); border: 1px solid var(--line);
  padding: 10px 16px; border-radius: 12px; font-size: 15px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Sheets ---------- */
.sheet {
  position: fixed; inset: 0; background: rgba(0,0,0,.6);
  display: flex; align-items: flex-end; z-index: 10;
}
.sheet-panel {
  width: 100%; max-height: 80dvh; background: var(--bg);
  border-top: 1px solid var(--line); border-radius: 20px 20px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 12px;
}
.sheet-panel.tall { height: 85dvh; }
.sheet-title { font-size: 18px; font-weight: 700; text-align: center; }
.sheet-close { min-height: 52px; border-radius: 14px; background: var(--surface); font-weight: 600; }
.group-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.group-grid button {
  min-height: 64px; border-radius: 14px; background: var(--surface-2);
  border: 1px solid var(--line); font-size: 24px; font-weight: 800;
}
.search {
  min-height: 48px; padding: 0 14px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text);
}
.all-list { overflow-y: auto; flex: 1; -webkit-user-select: none; }
.all-list h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-dim); margin: 14px 4px 6px; }
.all-row {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  min-height: 50px; padding: 0 12px; border-bottom: 1px solid var(--line); text-align: left;
}
.all-row .pin { font-size: 20px; color: var(--text-dim); padding: 8px; }
.all-row .pin.on { color: var(--accent); }
.all-row .cnt { color: var(--text-dim); font-size: 14px; margin-left: 8px; }

/* ---------- Seiten ---------- */
.page { min-height: 100dvh; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
.page.tabbed { padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 16px); }
.page-head, .page-body { max-width: 760px; margin: 0 auto; }
.page-head {
  position: sticky; top: 0; z-index: 2; background: var(--bg);
  display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 8px;
  padding: 8px 12px; border-bottom: 1px solid var(--line);
}
.page-head h1 { font-size: 18px; margin: 0; text-align: center; }
.page-body { padding: 12px 16px 40px; -webkit-user-select: text; user-select: text; }
.page-body h2 { font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-dim); margin: 24px 0 10px; }
.hint { font-size: 13px; color: var(--text-dim); }
.meta-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 640px) { .meta-grid { grid-template-columns: 1fr 1fr; } }
.meta-grid label, .field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text-dim); }
.meta-grid input, .field input {
  min-height: 44px; padding: 0 12px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text);
}
.stack { display: flex; flex-direction: column; gap: 10px; }
.pill {
  min-height: 48px; padding: 0 16px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
}
.pill[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.pill.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.pill.danger { color: var(--danger); }
.pill.file { cursor: pointer; }
.proto-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.toggle { display: flex; align-items: center; gap: 12px; min-height: 48px; }
.toggle input { width: 22px; height: 22px; accent-color: var(--accent); }
.seg { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.seg button { min-height: 46px; background: var(--surface); }
.seg button.on { background: var(--accent); color: var(--accent-ink); font-weight: 700; }

.session-list { margin-top: 10px; }
.session-row { display: flex; justify-content: space-between; gap: 8px; padding: 10px 2px; border-bottom: 1px solid var(--line); font-size: 14px; }
.session-row span:last-child { color: var(--text-dim); text-align: right; }

.info-box {
  margin: 16px 0 4px; padding: 12px 14px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); font-size: 14px;
}
.info-box p { margin: 0 0 6px; }
.info-box p:last-child { margin: 0; }
.page-body a { color: var(--accent); }
.page-body a.pill { color: var(--accent-ink); text-decoration: none; }
.page-body h3.sub { font-size: 15px; margin: 18px 0 8px; }
.completeness { margin: 12px 0 0; font-weight: 600; }
.completeness .bar { height: 6px; border-radius: 3px; background: var(--surface-2); margin-top: 6px; overflow: hidden; }
.completeness .bar span { display: block; height: 100%; background: var(--accent); }
.info-box.warn { border-color: var(--danger); }
.info-box ul { margin: 4px 0 0; padding-left: 18px; }
.transfer-list { font-size: 15px; -webkit-user-select: text; user-select: text; }
.transfer-list ol { margin: 0; padding-left: 28px; }
.transfer-list li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.transfer-list li b { display: inline-block; min-width: 9em; }
.transfer-list li.open { color: var(--danger); }

/* Protokollliste */
.proto-sec h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-dim); margin: 22px 0 6px; }
.proto-row { padding: 10px 0; border-bottom: 1px solid var(--line); }
.proto-row .name { display: flex; justify-content: space-between; font-weight: 600; margin-bottom: 8px; }
.proto-row .name span:last-child { color: var(--text-dim); font-weight: 500; font-variant-numeric: tabular-nums; }
.proto-opts { display: grid; grid-template-columns: repeat(4, 1fr) repeat(2, 1fr); gap: 6px; }
.opt {
  min-height: 40px; padding: 4px; border-radius: 10px; font-size: 12px; line-height: 1.1;
  background: var(--surface); border: 1px solid var(--line);
}
.opt.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 700; }
.opt.suggest { border: 2px dashed var(--accent); }
.opt.flag { border-radius: 10px; }
.opt:disabled { visibility: hidden; }

/* ---------- Reiter unten ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  display: grid; grid-template-columns: repeat(4, 1fr);
  height: calc(var(--tab-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: var(--bg); border-top: 1px solid var(--line);
}
.tabbar button {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: 13px; font-weight: 600; color: var(--text-dim);
}
.tabbar .ico { font-size: 20px; line-height: 1; }
.tabbar button.on { color: var(--accent); }
.tabbar .dot { position: absolute; top: 9px; left: calc(50% + 12px); width: 10px; height: 10px; border-radius: 50%; background: var(--danger); }

/* ---------- Karten, Teilen, Senden ---------- */
.lead { font-size: 15px; margin: 4px 0 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 14px 16px; margin: 0 0 14px; }
.card .field input, .card .meta-grid input { background: var(--bg); }
.card-title { display: flex; align-items: center; gap: 10px; font-size: 17px !important; text-transform: none !important; letter-spacing: 0 !important; color: var(--text) !important; margin: 0 0 12px !important; }
.step { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 15px; font-weight: 800; flex: none; }
.pill.big { min-height: 56px; font-size: 17px; width: 100%; margin: 10px 0 4px; }
.pill.small { min-height: 36px; padding: 0 12px; font-size: 13px; }
.card .stack .pill { text-align: center; }
details.help { margin: 8px 0; font-size: 14px; }
details.help summary { cursor: pointer; min-height: 36px; display: flex; align-items: center; color: var(--accent); }
details.help ol { margin: 4px 0 8px; padding-left: 22px; }
.session-row small { color: var(--text-dim); font-size: 12px; }
.session-row { align-items: center; }
.erh-list { display: flex; flex-direction: column; gap: 8px; }
.erh { text-align: left; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.erh small { color: var(--text-dim); font-size: 12px; }
.erh span { font-size: 13px; color: var(--text-dim); }
.erh.on { border: 2px solid var(--accent); }
.erh:disabled { opacity: .45; }
.storage-warn { position: sticky; top: 0; z-index: 20; padding: 12px 16px; background: var(--danger); color: #000; font-weight: 600; font-size: 14px; }
.drop-hint { position: fixed; inset: 12px; z-index: 30; border: 4px dashed var(--accent); border-radius: 24px; display: grid; place-items: center; font-size: 26px; font-weight: 700; background: rgba(0,0,0,.7); color: var(--accent); pointer-events: none; }
.import-body { overflow-y: auto; flex: 1; font-size: 15px; -webkit-user-select: text; user-select: text; }
.import-body h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-dim); margin: 16px 0 6px; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; }
.facts dt { color: var(--text-dim); }
.facts dd { margin: 0; }
.sums { display: flex; flex-wrap: wrap; gap: 6px; }
.sums span { padding: 6px 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.sheet-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sheet-close.primary { background: var(--accent); color: var(--accent-ink); }
.sheet-close:disabled { opacity: .4; }
.transfer-list h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-dim); margin: 18px 0 4px; }
.transfer-list li { cursor: pointer; display: flex; gap: 10px; }
.transfer-list li span { flex: 1; }
.transfer-list li.done { opacity: .35; text-decoration: line-through; }
.all-row .pick { flex: 1; text-align: left; min-height: 50px; }
.chip.method:disabled { opacity: .6; }
@media (min-width: 900px) {
  .tabbar { left: 50%; right: auto; width: 520px; transform: translateX(-50%); border: 1px solid var(--line); border-bottom: 0; border-radius: 16px 16px 0 0; }
}

/* Druck: nur das Protokoll im Stil des Papierbogens */
.print-area { display: none; }
@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff; color: #000; }
  .view, .sheet, .tabbar, .toast, .storage-warn { display: none !important; }
  #view-protocol { display: block !important; }
  #view-protocol > *:not(.print-area) { display: none !important; }
  .print-area { display: block; font-size: 10pt; color: #000; }
  .print-area h1 { font-size: 20pt; margin: 0 0 2mm; }
  .print-area .pmeta { display: grid; grid-template-columns: 1fr 1fr; gap: 2mm 8mm; margin: 4mm 0 6mm; }
  .print-area .pmeta div { border-top: 1px solid #777; padding-top: 1mm; }
  .print-area .pmeta b { display: block; font-weight: 400; font-size: 8pt; color: #555; }
  .print-area table { width: 100%; border-collapse: collapse; margin-bottom: 6mm; page-break-inside: auto; }
  .print-area th { background: #6e6e6e; color: #fff; font-weight: 400; padding: 1.5mm; font-size: 9pt; }
  .print-area th:first-child { background: none; color: #666; text-align: left; font-weight: 700; }
  .print-area td { border-bottom: 1px dotted #999; padding: 1.2mm 1.5mm; text-align: center; }
  .print-area td:first-child { text-align: left; }
  .print-area tr { page-break-inside: avoid; }
}

/* ---------- Übersicht (Start) ---------- */
.home-head { max-width: 760px; margin: 0 auto; padding: calc(28px + env(safe-area-inset-top)) 20px 6px; }
.home-head h1 { margin: 0 0 4px; font-size: 28px; letter-spacing: -.01em; }
.home-head p { margin: 0; color: var(--text-dim); font-size: 15px; }
.home-list { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.home-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px; }
.home-card.current { border-color: var(--accent); }
.home-card.soon { opacity: .6; }
.home-card-head { display: flex; align-items: center; gap: 12px; }
.home-card-head .sym { font-size: 30px; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: var(--surface-2); flex: none; }
.home-card h3 { margin: 0; font-size: 19px; }
.home-card small { color: var(--text-dim); font-size: 13px; }
.home-card p { margin: 10px 0 0; font-size: 14px; color: var(--text-dim); }
.home-card .facts-line { color: var(--text); font-weight: 600; }
.home-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.home-actions .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.home-actions .row2 .pill { text-align: center; font-size: 14px; }
.card.resume { display: flex; flex-direction: column; gap: 10px; border-color: var(--accent); }
.how { padding-left: 20px; margin: 0 0 12px; font-size: 15px; }
.how li { margin: 6px 0; }
.home-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }

/* ---------- Strich-Symbole ---------- */
.i { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.25em; flex: none; }
.icon-btn .i { width: 24px; height: 24px; }
.tabbar .ico .i { width: 24px; height: 24px; }
.action-btn .ico .i { width: 26px; height: 26px; }
.pill .i { margin-right: 8px; }
.home-card-head .sym .i { width: 30px; height: 30px; stroke-width: 1.4; }

/* ---------- Gestaltung wie die Vereinsseite, modern als App ---------- */
[data-theme="red"] { --brass: #ff3b2a; --brass-soft: #1e0707; --shadow: none; --glass: rgba(0, 0, 0, .9); }
h1, h2, h3, .card-title { font-weight: 800; letter-spacing: -.015em; line-height: 1.2; }
.eyebrow, .page-body h2 { font-family: var(--f-cond); font-weight: 700; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--brass); }
.serif { font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: 0; color: var(--brass); }

/* Karten: weiß, ohne Rahmen, weicher Schatten */
[data-theme="light"] .card, [data-theme="light"] .home-card, [data-theme="light"] .info-box,
[data-theme="gruen"] .card, [data-theme="gruen"] .home-card, [data-theme="gruen"] .info-box {
  border: 0; box-shadow: var(--shadow); border-radius: 20px;
}

[data-theme="light"] .info-box.warn, [data-theme="gruen"] .info-box.warn { box-shadow: var(--shadow), inset 0 0 0 1.5px var(--danger); }

/* Knöpfe: runde Ecken, Satzschreibung */
.pill { border-radius: 14px; }
.pill.primary { font-weight: 700; letter-spacing: 0; }
[data-theme="light"] .pill:not(.primary), [data-theme="gruen"] .pill:not(.primary) { background: var(--surface-2); border-color: transparent; }
.step { background: var(--brass-soft); color: var(--brass); }

/* Eingabefelder gefüllt statt umrandet */
[data-theme="light"] .meta-grid input, [data-theme="light"] .field input, [data-theme="light"] .select, [data-theme="light"] .search,
[data-theme="gruen"] .meta-grid input, [data-theme="gruen"] .field input, [data-theme="gruen"] .select, [data-theme="gruen"] .search {
  background: var(--surface-2); border-color: transparent; border-radius: 12px;
}
[data-theme="light"] .card .meta-grid input, [data-theme="light"] .card .field input,
[data-theme="gruen"] .card .meta-grid input, [data-theme="gruen"] .card .field input { background: var(--surface-2); }
.seg { border: 0; background: var(--surface-2); padding: 3px; gap: 3px; border-radius: 14px; grid-template-columns: repeat(3, 1fr); }
.seg button { background: transparent; border-radius: 11px; min-height: 40px; font-weight: 600; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* Kopfzeilen und Reiter: durchscheinend */
.page-head { background: var(--glass); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-bottom-color: transparent; }
.page-head h1 { font-size: 17px; letter-spacing: 0; }
.icon-btn { background: transparent; border-radius: 50%; color: var(--text); }
.tabbar { background: var(--glass); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-top-color: var(--line); }
.tabbar button { font-size: 11px; font-weight: 600; gap: 3px; }
.tabbar .ico { display: grid; place-items: center; width: 56px; height: 30px; border-radius: 15px; transition: background .2s; }
.tabbar button.on { color: var(--text); }
.tabbar button.on .ico { background: var(--brass-soft); color: var(--brass); }
[data-theme="red"] .tabbar button.on .ico { background: transparent; color: var(--accent); }

/* Zählansicht bei Tag */
[data-theme="light"] .count-btn, [data-theme="gruen"] .count-btn { background: var(--surface); box-shadow: var(--shadow), 0 0 0 12px var(--ring) inset; border-width: 5px; }
[data-theme="light"] .sp-chip, [data-theme="gruen"] .sp-chip, [data-theme="light"] .action-btn, [data-theme="gruen"] .action-btn { border-color: transparent; box-shadow: var(--shadow); }
[data-theme="light"] .chip.method, [data-theme="gruen"] .chip.method { border-color: transparent; }

/* ---------- Übersicht ---------- */
.home-head { position: relative; background: var(--head-bg); max-width: none; padding: calc(30px + env(safe-area-inset-top)) 20px 8px; }
[data-theme="red"] .home-head { background: none; }
.home-head > * { max-width: 728px; margin-left: auto; margin-right: auto; display: block; }
.home-head h1 { font-size: 34px; line-height: 1.04; margin: 8px auto 8px; letter-spacing: -.03em; }
.home-head h1 .serif { display: block; font-size: 23px; margin-top: 4px; }
.home-head p { color: var(--text-dim); }
.night-btn { position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 12px; margin: 0 !important; background: var(--surface) !important; box-shadow: var(--shadow); }
.home-card { padding: 18px; }
.home-card-head .sym { background: var(--brass-soft); color: var(--brass); border-radius: 14px; }
.home-card h3 { font-size: 20px; }
.home-card .facts-line { font-size: 13px; }
.home-actions .row2 .pill { font-weight: 600; }
.how { list-style: none; padding: 0; counter-reset: how; }
.how li { counter-increment: how; display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; margin: 10px 0; }
.how li::before { content: counter(how); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brass-soft); color: var(--brass); font-weight: 800; font-size: 14px; }
.card.resume { box-shadow: var(--shadow), inset 0 0 0 1.5px var(--accent) !important; }

.completeness p { margin: 0 0 4px; font-weight: 500; }
.completeness .counted { font-size: 16px; }
.completeness .hint { margin-top: 8px; font-weight: 400; }
.send-to { margin: 0 0 4px; font-size: 15px; }

.end-link { margin-top: 10px; background: none; border: 0; color: var(--text-dim); font: inherit; font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; min-height: 44px; padding: 0 12px; }
.sheet-text { margin: 0; color: var(--text-dim); text-align: center; }
.install-card { display: grid; gap: 8px; box-shadow: var(--shadow), inset 0 0 0 1.5px var(--brass) !important; }
.install-card .hint { margin: 0; }
.install-card .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.install-steps { overflow-y: auto; flex: 1; }
.install-steps h3 { font-size: 16px; margin: 12px 0 4px; }
.install-steps ol { margin: 0; padding-left: 22px; }
.install-steps li { margin: 8px 0; line-height: 1.4; }
.home-foot { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.home-foot .hint { margin-left: auto; }

/* ---------- Verlauf ---------- */
.tabbar, [data-theme] .tabbar { grid-template-columns: repeat(5, 1fr); }
.tabbar .ico { width: 48px; }
.seg.two { grid-template-columns: 1fr 1fr; margin-bottom: 12px; }
.hist-day { margin: 18px 0 8px; }
.hist-card { display: grid; gap: 8px; }
.hist-card.running { box-shadow: var(--shadow), inset 0 0 0 1.5px var(--accent) !important; }
.hist-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.hist-head b { font-size: 18px; }
.hist-meta { margin-left: auto; color: var(--text-dim); font-size: 14px; }
.hist-badge { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); }
.hist-sub { display: flex; gap: 8px; align-items: center; }
.hist-place { flex: 1; min-width: 0; font: inherit; font-size: 15px; padding: 8px 10px; border-radius: 10px; border: 1px solid transparent; background: var(--surface-2); color: var(--text); }
.hist-place-ro { flex: 1; color: var(--text-dim); }
.hist-who { font-size: 13px; font-weight: 700; padding: 3px 9px; border-radius: 10px; background: var(--brass-soft); color: var(--brass); white-space: nowrap; }
.hist-sps { display: flex; flex-wrap: wrap; gap: 6px; }
.hist-sp { padding: 4px 10px; border-radius: 12px; background: var(--surface-2); font-size: 14px; }
.hist-card details summary { cursor: pointer; color: var(--text-dim); font-size: 14px; padding: 6px 0; }
.hist-rows { list-style: none; margin: 4px 0 0; padding: 0; }
.hist-rows li { display: grid; grid-template-columns: 52px 1fr auto 52px; gap: 8px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 15px; }
.hist-rows .hist-time { color: var(--text-dim); font-variant-numeric: tabular-nums; }
.hist-rows small { color: var(--text-dim); text-align: right; }

/* ---------- Startseite mit Bereichen, Bereichsübersicht ---------- */
.tabbar.app-nav, [data-theme] .tabbar.app-nav { grid-template-columns: repeat(var(--n, 2), 1fr); }
.home-card.area-link { display: grid; gap: 10px; width: 100%; text-align: left; font: inherit; color: var(--text); cursor: pointer; }
.home-card.area-link:active { transform: scale(.99); }
.area-link .area-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.area-link .area-text small { line-height: 1.35; }
.area-link .chev { color: var(--text-dim); }
.area-link .chev .i { width: 22px; height: 22px; }
.area-link .facts-line { font-size: 13px; font-weight: 600; color: var(--text); }
.home-legal { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.home-legal .end-link { margin: 0; padding-left: 0; }
.impressum p { margin: 0 0 22px; line-height: 1.5; }
.impressum a { color: var(--brass); }
.area-head { padding-top: calc(64px + env(safe-area-inset-top)); }
.area-head .head-left, .area-head .head-right {
  position: absolute; top: calc(12px + env(safe-area-inset-top)); margin: 0 !important;
  background: var(--surface) !important; box-shadow: var(--shadow);
}
.area-head .head-left { left: 12px; }
.area-head .head-right { right: 12px; }
#area-card .home-card { margin-bottom: 8px; }
.area-link .area-name { font-size: 20px; font-weight: 800; letter-spacing: -.015em; line-height: 1.2; }

/* ---------- Feldhasen-Taxation ---------- */
.abschnitt-bar { display: grid; grid-template-columns: 64px 1fr 64px; align-items: center; gap: 8px; padding: 4px 12px 0; }
.ab-step { min-height: 56px; border-radius: 16px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); display: grid; place-items: center; }
.ab-step .i { width: 26px; height: 26px; }
.ab-step:disabled { opacity: .3; }
.ab-label { text-align: center; display: grid; }
.ab-label small { font-size: 12px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .12em; }
.ab-label b { font-size: 24px; font-weight: 800; }
.tax-row { display: grid; grid-template-columns: 28px 1fr 22px; gap: 8px; align-items: center; width: 100%; text-align: left;
  padding: 10px 0; border-top: 1px solid var(--line); font: inherit; color: var(--text); background: none; }
.tax-row .tax-nr { font-weight: 800; color: var(--brass); font-size: 18px; }
.tax-row small { display: block; color: var(--text-dim); font-size: 13px; margin-top: 2px; }
.tax-row em { color: var(--danger); font-style: normal; }
.tax-row .chev { color: var(--text-dim); }
.tax-eval { margin: 0 0 10px; font-size: 15px; }
.tax-eval ul { margin: 4px 0 0; padding-left: 18px; color: var(--text-dim); font-size: 14px; }
.tax-field { margin: 0 0 12px; }
.tax-label { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 4px; }
.tax-field .seg button { font-size: 13px; padding: 4px; line-height: 1.15; }
.tax-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; margin-bottom: 10px; }
.ab-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 8px; }
.ab-cell { background: var(--surface-2); border-radius: 10px; padding: 6px 4px; text-align: center; font-size: 12px; display: grid; }
.ab-cell small { color: var(--text-dim); }
.ab-cell.has { box-shadow: inset 0 0 0 1.5px var(--brass); }
.tax-field .seg button.on, [data-theme] .tax-field .seg button.on { background: var(--brass-soft); color: var(--brass); box-shadow: inset 0 0 0 1.5px var(--brass); }

/* Große Beutegreifer */
.bg-seg { grid-template-columns: repeat(4, 1fr); }
[data-k="hinweis"].bg-seg { grid-template-columns: repeat(4, 1fr); }
.bg-pos { margin: 0 0 10px; font-variant-numeric: tabular-nums; }
.bg-details { margin: 10px 0; }
.bg-details summary { cursor: pointer; color: var(--text-dim); font-size: 14px; min-height: 36px; display: flex; align-items: center; }
.bg-fotos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.bg-fotos:empty { display: none; }
.bg-fotos figure { position: relative; margin: 0; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.bg-fotos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bg-foto-weg { position: absolute; top: 4px; right: 4px; width: 30px; height: 30px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; font-size: 20px; line-height: 1; }
.bg-count { font-weight: 500; color: var(--text-dim); font-size: 13px; margin-left: auto; }
.file-pill { display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
#bg-edit .card .pill + .pill, #bg-edit .card .pill + .hint + .pill { margin-top: 8px; }
#bg-edit .card > .pill { width: 100%; }
#bg-edit textarea { font: inherit; width: 100%; }

/* Tierköpfe (icons/tiere/*.png, freigestellt aus _temp): Bild als Maske, Farbe = Textfarbe (auch im Nachtmodus rot) */
.i.tier { display: inline-block; background: currentColor; stroke: none;
  -webkit-mask: var(--tier) center / contain no-repeat; mask: var(--tier) center / contain no-repeat; }
.tier-reh { --tier: url(icons/tiere/reh.png); }
.tier-hase { --tier: url(icons/tiere/hase.png); }
.tier-wolf { --tier: url(icons/tiere/wolf.png); }
.tier-fuchs { --tier: url(icons/tiere/fuchs.png); }
.tier-waschbaer { --tier: url(icons/tiere/waschbaer.png); }
.tabbar .ico .i.tier { width: 26px; height: 26px; }
.home-card-head .sym .i.tier { width: 34px; height: 34px; }

/* Logo: Fuchs, Hase, Reh (Vektor-Symbol #logo-tiere), Seitenverhältnis 3078:962 */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.logo-tiere { display: block; fill: currentColor; color: var(--brass); aspect-ratio: 3078 / 962; }
.brand-h1 .logo-tiere { width: 176px; height: auto; margin: 12px 0 10px; }
.home-logo-btn { display: flex !important; align-items: center; width: auto !important; padding: 0 14px 0 11px; gap: 10px; border-radius: 22px !important; }
.home-logo-btn .logo-tiere { height: 22px; width: 70px; flex: none; }
