/* Farben: hell als Standard, dunkel automatisch (Systemeinstellung) oder per Schalter im Menü (data-theme) */
:root {
  color-scheme: light;
  --bg: #f4f7f1; --panel: #ffffff; --line: #dde4d6; --text: #181d16; --muted: #5a6654;
  --accent: #2e7d32; --accent-bg: #d6eed1; --on-accent: #ffffff; --danger: #b3261e;
  --shadow: 0 1px 2px rgba(20,30,15,.08), 0 2px 8px rgba(20,30,15,.06);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0f130e; --panel: #1a1f18; --line: #2b3427; --text: #e4e9dd; --muted: #9ba796;
    --accent: #8fd18a; --accent-bg: #264a29; --on-accent: #0a2a0c; --danger: #e0725a;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 2px 10px rgba(0,0,0,.3);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f130e; --panel: #1a1f18; --line: #2b3427; --text: #e4e9dd; --muted: #9ba796;
  --accent: #8fd18a; --accent-bg: #264a29; --on-accent: #0a2a0c; --danger: #e0725a;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 2px 10px rgba(0,0,0,.3);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.45 system-ui, sans-serif; }
a { color: var(--accent); }
main { max-width: 1200px; margin: 0 auto; padding: 16px; }
h1 { font-size: 1.3rem; margin: 0 0 12px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-bottom: 16px; }
input, select, button { font: inherit; padding: 9px 11px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
button, .btn { background: var(--accent); color: var(--on-accent); border: 0; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-block; padding: 9px 14px; border-radius: 8px; }
button.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); font-weight: 400; }
button.danger { background: var(--danger); color: #fff; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.filters label { display: flex; flex-direction: column; font-size: .8rem; color: var(--muted); gap: 3px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.tile { position: relative; display: block; border-radius: 8px; overflow: hidden; background: #000; aspect-ratio: 1; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 6px 5px; font-size: .72rem; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.8)); }
.pager { display: flex; gap: 10px; align-items: center; justify-content: center; margin: 18px 0; color: var(--muted); }
.big img { width: 100%; height: auto; border-radius: 10px; display: block; }
.meta { color: var(--muted); font-size: .9rem; margin: 10px 0; }
.nav { display: flex; justify-content: space-between; margin: 10px 0; }
table { width: 100%; border-collapse: collapse; }
td, th { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
td form { display: inline-flex; gap: 6px; margin: 0; }
.error { color: var(--danger); margin: 0 0 10px; }
.msg { background: var(--panel); border-left: 4px solid var(--accent); padding: 10px 12px; margin-bottom: 14px; border-radius: 6px; }
.login { max-width: 360px; margin: 12vh auto 0; }
.login input { width: 100%; margin-bottom: 10px; }
.login button { width: 100%; }
.tile.empty img { opacity: .4; filter: grayscale(1); }
.badge { position: absolute; top: 6px; left: 6px; z-index: 1; padding: 2px 8px; border-radius: 999px; font-size: .72rem; font-weight: 700; background: rgba(0,0,0,.7); color: #fff; border: 1px solid rgba(255,255,255,.35); }
.badge.warn { background: var(--danger); border-color: transparent; }
[hidden] { display: none !important; }
.opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 12px; margin: 12px 0; }
.opt { display: flex; align-items: center; gap: 8px; padding: 6px 4px; }
.opt input { width: 18px; height: 18px; padding: 0; }
.help h1 { font-size: 1.4rem; } .help h2 { font-size: 1.15rem; margin-top: 1.6em; border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.help h3 { font-size: 1rem; margin-top: 1.2em; } .help blockquote { margin: 10px 0; padding: 6px 14px; border-left: 4px solid var(--accent); color: var(--muted); }
.help ol, .help ul { padding-left: 1.4em; } .help li { margin: 4px 0; } .help table { font-size: .9rem; }
.bars { display: grid; gap: 3px; }
.bar { display: grid; grid-template-columns: minmax(96px, 150px) 1fr minmax(84px, 110px); align-items: center; gap: 8px; font-size: .85rem; }
.bar .bt { background: var(--bg); border-radius: 4px; height: 14px; overflow: hidden; }
.bar .bf { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.bar.thin .bf { opacity: .35; }
.bar.best .bl, .bar.best .bv { font-weight: 700; }
.bar .bv { text-align: right; white-space: nowrap; } .bar .bv small { color: var(--muted); font-size: .72rem; }
ul.best { margin: 6px 0; padding-left: 1.2em; }
.tile a.tl { display: block; width: 100%; height: 100%; }
.tile .fav { position: absolute; top: 4px; right: 4px; z-index: 2; background: rgba(0,0,0,.55); color: #fff; border: 0; border-radius: 999px; width: 34px; height: 34px; padding: 0; font-size: 1.1rem; line-height: 1; }
.tile .fav.on { color: #ffd24a; }
.tile .selmark { display: none; position: absolute; top: 4px; left: 4px; z-index: 2; width: 28px; height: 28px; border-radius: 999px; border: 2px solid #fff; background: rgba(0,0,0,.45); color: transparent; text-align: center; line-height: 24px; font-weight: 700; }
.grid.selecting .tile .selmark { display: block; }
.grid.selecting .tile .badge { left: 40px; }
.tile.selected .selmark { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.tile.selected { outline: 3px solid var(--accent); outline-offset: -3px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; margin: 6px 0 10px; gap: 8px; }
.selbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; position: sticky; top: 64px; z-index: 4; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
button:disabled { opacity: .5; cursor: not-allowed; }

.card { overflow-x: auto; }

/* Revierkarte */
.revmap { height: 68vh; min-height: 420px; border: 1px solid var(--line); border-radius: 10px; z-index: 0; }
.revmap.placing, .revmap.placing .leaflet-interactive { cursor: crosshair; }
.maptools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.maptools .inline { display: inline-flex; gap: 4px; }
.maptools button.active { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.filelabel { cursor: pointer; background: transparent; color: var(--text); border: 1px solid var(--line); font-weight: 400; }
.msg.bad { border-left-color: var(--danger); }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.pin-wrap { background: none; border: 0; }
.pin { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 2px solid #fff; color: #fff; font: 700 14px/1 system-ui, sans-serif; box-shadow: 0 1px 4px rgba(0,0,0,.55); }
.pin.sm { display: inline-flex; width: 20px; height: 20px; font-size: 11px; vertical-align: middle; }
.pin.stand { background: #b4691f; border-radius: 4px; }
.pin.feeding { background: #3d8b37; border-radius: 50%; }
.pin.camera { background: #2f6fb5; border-radius: 50% 50% 50% 4px; }
.pin-badge { position: absolute; top: -6px; right: -6px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--danger); color: #fff; font: 700 11px/17px system-ui, sans-serif; text-align: center; border: 1px solid #fff; }
.vertex { display: block; width: 18px; height: 18px; margin: 2px; border-radius: 50%; background: #fff; border: 3px solid #f0c030; box-shadow: 0 1px 3px rgba(0,0,0,.6); }
.leaflet-popup-content { color: #1e2418; margin: 12px 14px; }
.leaflet-popup-content a { color: #2f5d12; }
.pop p { margin: 6px 0; }
.pop-sub { color: #5d6652; font-size: .85rem; }
.pop-img { width: 100%; border-radius: 6px; display: block; margin: 6px 0; }
.pop-form label { display: block; font-size: .8rem; color: #5d6652; margin-top: 6px; }
.pop-form input, .pop-form select, .pop-form textarea { width: 100%; background: #fff; color: #1e2418; border: 1px solid #c9cfbd; border-radius: 6px; padding: 6px 8px; font: inherit; }
.pop-actions { display: flex; gap: 6px; margin-top: 8px; }
.pop button.ghost { color: #1e2418; border-color: #c9cfbd; margin-top: 4px; }

/* Aufgaben */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tabs .btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); font-weight: 400; }
.taskform { display: grid; gap: 10px; margin-top: 12px; }
.taskform label { display: flex; flex-direction: column; font-size: .8rem; color: var(--muted); gap: 3px; }
.taskform textarea { font: inherit; padding: 9px 11px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
fieldset { border: 1px solid var(--line); border-radius: 8px; margin: 0; }
legend { color: var(--muted); font-size: .8rem; padding: 0 6px; }
.task-head { display: flex; gap: 12px; align-items: flex-start; }
.task-head form { margin: 0; }
.task-main { flex: 1; min-width: 0; }
.task-title { overflow-wrap: anywhere; }
.task-desc { margin: 6px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.meta.small { font-size: .8rem; margin: 4px 0 0; }
button.check { width: 40px; height: 40px; padding: 0; border-radius: 50%; font-size: 1.3rem; line-height: 1; background: transparent; color: var(--text); border: 2px solid var(--accent); }
button.check.on { background: var(--accent); color: var(--on-accent); }
.task.done .task-title { text-decoration: line-through; opacity: .65; }
.task-edit { margin-top: 10px; }
.task-edit summary { cursor: pointer; }

.vertex.mid { width: 14px; height: 14px; margin: 4px; border-width: 2px; background: rgba(255,255,255,.85); color: #6b5200;
  font: 700 12px/10px sans-serif; text-align: center; opacity: .9; }

.pin.sighting { background: #7a4fb5; border-radius: 50%; }
.pin.shot { background: #c0392b; border-radius: 50% 4px 50% 4px; }
.flight-arrow { display: block; width: 20px; height: 20px; color: #c0392b; font-size: 20px; line-height: 20px; text-align: center;
  text-shadow: 0 0 3px #fff, 0 0 3px #fff; }
.usertools { margin-bottom: 8px; }
.maptools label.inline { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; color: var(--muted); }
.pop-meta { font-size: .85rem; color: var(--muted); margin: 2px 0; }
.pop-form input[type=number], .pop-form input[type=datetime-local] { width: 100%; }

form.stack { display: flex; flex-direction: column; gap: 10px; max-width: 420px; }
form.stack label { display: flex; flex-direction: column; gap: 4px; }

/* Strecke */
.entry { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.entry:first-of-type { border-top: 0; }
.entry details { min-width: 220px; }
label.block { display: block; margin-top: 8px; font-size: .8rem; color: var(--muted); }
progress { width: 100px; vertical-align: middle; }

/* Serien */
.badge.serie { left: auto; right: 44px; top: 6px; background: rgba(47,74,36,.9); }
.grid.selecting .tile .badge.serie { left: auto; }
.series-strip { display: flex; gap: 6px; align-items: center; overflow-x: auto; margin: 8px 0; }
.series-strip img { height: 56px; width: 76px; object-fit: cover; border-radius: 6px; border: 2px solid transparent; display: block; }
.series-strip a.on img { border-color: var(--accent); }

/* Karte: Zusatzfunktionen */
.pin.stand.wind-ok { background: #2e9d3a; }
.pin.stand.wind-bad { background: #c0392b; }
.pin.sit { box-shadow: 0 0 0 3px #19b5d6, 0 1px 4px rgba(0,0,0,.55); }
.pin.camera.st-ok { background: #2f6fb5; }
.pin.camera.st-warn { background: #e08a00; }
.pin.camera.st-alert { background: #c0392b; }
.pin.camera.st-none { background: #7d8791; }
.pin.pending { opacity: .6; outline: 2px dashed #fff; }
.pop-sit { font-weight: 600; margin: 6px 0; }
.pop-warn { color: #a23100; font-size: .85rem; margin: 2px 0; }
.pop-check { display: inline-flex !important; align-items: center; gap: 4px; margin-right: 8px; }
.pop-check input { width: auto !important; }
.wind-opts { display: flex; flex-wrap: wrap; }
.pop-photos { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.pop-photo { position: relative; display: inline-block; }
.pop-photo img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; display: block; }
.photo-del { position: absolute; top: -4px; right: -4px; width: 20px; height: 20px; padding: 0; border-radius: 50%; background: #c0392b; color: #fff; font-size: 11px; line-height: 20px; }
.photo-add { color: #1e2418; border-color: #c9cfbd; }
.pop-sitform { margin: 6px 0; }
.pop-sitform select { width: auto; }
.infopanel summary { cursor: pointer; }
.panel-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 10px; }
.panel-grid h3 { margin: 0 0 6px; font-size: 1rem; }
label.check { flex-direction: row !important; align-items: center; gap: 6px; font-size: .9rem; color: var(--text); }
.act-label { background: transparent; border: 0; box-shadow: none; color: #fff; font-weight: 700; text-shadow: 0 0 3px #000; }
.act-label::before { display: none; }

/* Hilfe: Themen zum Aufklappen */
.help-tools { display: flex; gap: 8px; flex-wrap: wrap; }
details.topic { border: 1px solid var(--line); border-radius: 10px; margin: 10px 0; background: var(--bg); }
details.topic > summary { cursor: pointer; padding: 12px 14px; font-weight: 700; font-size: 1.05rem; }
details.topic > .topic-body { padding: 0 14px 12px; }
details.topic[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: 8px; }
details.faq { border-top: 1px solid var(--line); padding: 6px 0; }
details.faq > summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
details.faq > p { margin: 6px 0 4px 12px; }
.help h3 { margin: 16px 0 6px; font-size: 1rem; }
a.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); font-weight: 400; }

/* Markierung erkannter Tiere: Pin in Tropfenform, Farbe und weißes Symbol je Wildart; die Spitze zeigt auf das Tier */
.imgwrap { position: relative; display: block; }
.bmark { position: absolute; transform: translate(-50%, -100%); pointer-events: none; filter: drop-shadow(0 2px 3px rgba(0,0,0,.6)); }
.pinsvg { display: block; width: 36px; height: auto; }
.bmark-label { position: absolute; left: 100%; top: 8px; margin-left: 2px; background: rgba(0,0,0,.65); color: #fff; font: 700 .72rem/1.2 system-ui, sans-serif;
  padding: 2px 6px; border-radius: 4px; white-space: nowrap; }
.imgwrap.nobox .bmark { display: none; }

/* ===== Oberfläche v2: Material-Stil – Kopfzeile, untere Leiste, Sheet, Chips, Buttons ===== */
body { padding-bottom: env(safe-area-inset-bottom); -webkit-tap-highlight-color: transparent; }
a { text-decoration-thickness: 1px; text-underline-offset: 2px; }
.ic { width: 24px; height: 24px; fill: currentColor; flex: none; display: block; }
.testbanner { background: #b00020; color: #fff; text-align: center; padding: 6px; font-weight: 700; letter-spacing: .05em; font-size: .85rem; }

header.top { position: sticky; top: 0; z-index: 1500; display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 6px 14px; background: var(--bg); }
header.top .brand { display: flex; align-items: center; gap: 10px; font-size: 1.25rem; font-weight: 600; color: var(--text); text-decoration: none; margin-right: auto; }
header.top .brand .ic { color: var(--accent); }
.toplinks { display: none; }
.more-btn { display: inline-flex; align-items: center; gap: 6px; background: transparent; color: var(--text); border: 0; padding: 8px 10px; border-radius: 999px; font-weight: 500; }
.more-btn:hover { background: var(--accent-bg); }
.count { display: inline-block; min-width: 18px; padding: 0 6px; border-radius: 999px; background: var(--danger); color: #fff; font-size: .72rem; font-weight: 700; line-height: 18px; text-align: center; }

main { padding: 8px 14px 24px; }
body.has-nav main { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
h1 { font-size: 1.4rem; font-weight: 600; margin: 4px 0 14px; }

.card { border-radius: 16px; box-shadow: var(--shadow); border-color: var(--line); padding: 16px; }
input, select, textarea { border-radius: 12px; padding: 10px 12px; min-height: 42px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
button, .btn { border-radius: 999px; padding: 10px 20px; min-height: 42px; font-size: .95rem; transition: filter .12s, background .12s; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
button:hover, .btn:hover { filter: brightness(1.07); }
button:active, .btn:active { filter: brightness(.93); }
button:focus-visible, .btn:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button.ghost, a.btn.ghost, .tabs .btn.ghost, .filelabel { background: transparent; color: var(--text); border: 1px solid var(--line); font-weight: 500; }
button.ghost:hover, a.btn.ghost:hover, .filelabel:hover { background: var(--accent-bg); filter: none; }
button.danger { background: var(--danger); color: #fff; }
button.check { padding: 0; }
.tile .fav, .photo-del, .pin-badge { min-height: 0; }
.tile .fav { backdrop-filter: blur(6px); }
.tabs .btn:not(.ghost) { background: var(--accent-bg); color: var(--text); font-weight: 600; }
.maptools button, .maptools .filelabel { padding: 8px 14px; min-height: 38px; }

/* Kacheln */
.grid { gap: 6px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.tile { border-radius: 12px; }
.badge { backdrop-filter: blur(6px); }
.toolbar { margin: 4px 0 10px; }

/* Chips und Kamerastatus */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; margin: 0 -14px; padding-left: 14px; padding-right: 14px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 7px; flex: none; padding: 7px 14px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--text);
  font-size: .88rem; text-decoration: none; white-space: nowrap; min-height: 34px; }
.chip:hover { background: var(--accent-bg); }
.chip.on { background: var(--accent-bg); border-color: transparent; font-weight: 600; }
.chip small { color: var(--muted); font-size: .75rem; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #9aa39a; flex: none; }
.dot.ok { background: #3da44a; } .dot.warn { background: #e08a00; } .dot.alert { background: #d33a2c; }
.filterbox { margin-bottom: 12px; }
.filterbox > summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: .9rem; }
.filterbox > summary::-webkit-details-marker { display: none; }
.filterbox[open] > summary { background: var(--accent-bg); border-color: transparent; }
.filterbox .filters { margin-top: 12px; }

/* Untere Leiste (Handy) */
nav.bottom { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1500; display: flex; justify-content: space-around; align-items: stretch;
  padding: 8px 4px calc(8px + env(safe-area-inset-bottom)); background: var(--panel); border-top: 1px solid var(--line); }
nav.bottom a, nav.bottom button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 0; min-height: 0; background: none; border: 0;
  border-radius: 0; color: var(--muted); font-size: .72rem; font-weight: 500; text-decoration: none; filter: none; }
nav.bottom i { position: relative; width: 58px; height: 30px; border-radius: 999px; display: grid; place-items: center; font-style: normal; transition: background .15s; }
nav.bottom .on { color: var(--text); font-weight: 700; }
nav.bottom .on i { background: var(--accent-bg); }
nav.bottom .count { position: absolute; top: -3px; right: 6px; min-width: 16px; line-height: 16px; font-size: .66rem; padding: 0 4px; }

/* Menü-Sheet "Mehr" */
#sheet-scrim { position: fixed; inset: 0; z-index: 1900; background: rgba(0,0,0,.5); }
#more-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 2000; max-width: 560px; margin: 0 auto; padding: 10px 10px calc(14px + env(safe-area-inset-bottom));
  background: var(--panel); color: var(--text); border-radius: 26px 26px 0 0; box-shadow: 0 -10px 40px rgba(0,0,0,.35); max-height: 88vh; overflow-y: auto; }
#more-sheet .grab { width: 38px; height: 4px; border-radius: 9px; background: var(--line); margin: 0 auto 8px; }
#more-sheet .who { margin: 4px 14px 8px; color: var(--muted); font-size: .85rem; }
#more-sheet a, #more-sheet form button, #more-sheet > button { display: flex; align-items: center; justify-content: flex-start; gap: 16px; width: 100%; padding: 13px 14px; border-radius: 14px;
  color: var(--text); background: none; border: 0; font: inherit; font-weight: 500; text-decoration: none; text-align: left; cursor: pointer; min-height: 48px; }
#more-sheet a .ic, #more-sheet form button .ic { color: var(--muted); }
#more-sheet a:hover, #more-sheet form button:hover, #more-sheet > button:hover { background: var(--accent-bg); filter: none; }
#more-sheet form { margin: 0; }
.themeset { display: flex; align-items: center; gap: 6px; margin: 8px 6px; padding: 6px 8px; border-radius: 14px; background: var(--bg); flex-wrap: wrap; }
.themeset span { flex-basis: 100%; font-size: .78rem; color: var(--muted); padding: 2px 6px; }
#more-sheet .themeset button { color: var(--text); flex: 1; width: auto; justify-content: center; padding: 9px 6px; min-height: 40px; border-radius: 999px; background: transparent; border: 1px solid var(--line); font-size: .85rem; }
#more-sheet .themeset button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: 700; }
body.sheet-open { overflow: hidden; }

/* Große Bildschirme: Navigation oben, keine untere Leiste */
@media (min-width: 860px) {
  .toplinks { display: flex; gap: 4px; margin-right: 8px; }
  .toplinks a { padding: 8px 16px; border-radius: 999px; color: var(--text); text-decoration: none; font-weight: 500; }
  .toplinks a:hover { background: var(--accent-bg); }
  .toplinks a.on { background: var(--accent-bg); font-weight: 700; }
  nav.bottom { display: none; }
  body.has-nav main { padding-bottom: 32px; }
  header.top { padding: 6px max(14px, calc((100vw - 1200px) / 2 + 14px)); }
  #more-sheet { left: auto; right: 16px; bottom: auto; top: 60px; border-radius: 18px; width: 340px; max-height: calc(100vh - 80px); }
  #more-sheet .grab { display: none; }
  #sheet-scrim { background: transparent; }
}
@media (max-width: 859px) { .more-btn { display: none; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
.nav .btn { background: var(--accent-bg); color: var(--text); font-weight: 600; }
.nav .btn:hover { filter: brightness(.97); }

/* Bildansicht: Zoom und Wischen */
.big { position: relative; overflow: hidden; border-radius: 16px; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.big.zoomed { touch-action: none; }
.big .imgwrap { transform-origin: 50% 50%; will-change: transform; --z: 1; }
.big .bmark { scale: calc(1 / var(--z, 1)); transform-origin: 50% 100%; }
.big img { -webkit-touch-callout: none; }
.zoomreset { position: absolute; right: 10px; bottom: 10px; min-height: 0; padding: 6px 12px; font-size: .8rem; background: rgba(0,0,0,.6); color: #fff; backdrop-filter: blur(6px); }
.swipehint { text-align: center; font-size: .78rem; margin: 6px 0; }
@media (hover: hover) { .swipehint { display: none; } }

/* Statistik: Heute im Vergleich */
ul.cmp { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 8px; }
ul.cmp li { padding: 10px 12px; border-radius: 12px; background: var(--bg); border-left: 5px solid var(--line); }
ul.cmp li.lvl1 { border-left-color: #3da44a; } ul.cmp li.lvl-1 { border-left-color: #e08a00; }
ul.cmp span { color: var(--muted); font-size: .9rem; } ul.cmp em { color: var(--text); font-style: normal; font-weight: 600; }

/* Jagdjahr-Bericht (Bildschirm und Druck) */
.report h2 { font-size: 1.1rem; margin: 1.4em 0 .4em; border-bottom: 1px solid var(--line); padding-bottom: 3px; }
.report table { font-size: .9rem; } .report td.num, .report th.num { text-align: right; white-space: nowrap; }
.report tr.sum td { font-weight: 700; background: var(--bg); }
@media print {
  header.top, nav.bottom, #more-sheet, #sheet-scrim, .noprint, .testbanner, #push-info { display: none !important; }
  body, main { background: #fff !important; color: #000 !important; padding: 0 !important; }
  .report { color: #000; } .report .meta { color: #333; }
  .report table { page-break-inside: auto; } .report tr { page-break-inside: avoid; }
  .report td, .report th { border-bottom: 1px solid #999; }
  .report tr.sum td { background: #eee !important; }
}
.bmark.flip .bmark-label { left: auto; right: 100%; margin-left: 0; margin-right: 2px; }

/* Erkennungen prüfen */
.chip.warnchip { border-color: #e08a00; color: var(--text); background: color-mix(in srgb, #e08a00 14%, transparent); font-weight: 600; }
.review { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.rcard { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; transition: opacity .25s, transform .25s; }
.rcard.gone { opacity: 0; transform: scale(.96); }
.rcard.busy { opacity: .5; pointer-events: none; }
.rimg { position: relative; display: block; background: #000; }
.rimg img { width: 100%; height: auto; max-height: 280px; object-fit: cover; display: block; }
.rbody { padding: 12px 14px 14px; display: grid; gap: 8px; }
.rguess { font-size: .95rem; }
.rbtns { display: flex; flex-wrap: wrap; gap: 8px; }
.rbtn { padding: 8px 14px; min-height: 40px; background: var(--accent-bg); color: var(--text); font-weight: 600; }
.rbtn.ok { background: var(--accent); color: var(--on-accent); }
.rsel { min-height: 40px; border-radius: 999px; padding: 6px 12px; }

/* Rechte pro Benutzer (Verwaltung) */
details.rights { margin: .4rem 0; }
details.rights summary { cursor: pointer; color: var(--accent, #2e7d32); font-weight: 600; }
details.rights form { display: grid; gap: .35rem; padding: .5rem 0; }
label.check { display: flex; gap: .5rem; align-items: center; }
label.check input { width: auto; }
