/* App-Ansichten */
body { padding-bottom: env(safe-area-inset-bottom, 0px); }
.ansicht { padding-bottom: 48px; }
.appkopf { position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; gap: 8px; padding: calc(env(safe-area-inset-top, 0px) + 10px) max(12px, env(safe-area-inset-right, 0px)) 10px max(12px, env(safe-area-inset-left, 0px)); background: var(--gruen); color: #fff; margin-bottom: 18px; }
.appkopf h1 { font-size: 1.15rem; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-stretch: 112%; }
.appkopf .marke { color: #fff; font-weight: 800; text-decoration: none; font-size: 0.9rem; letter-spacing: 0.04em; }
.zurueck { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgb(255 255 255 / 12%); color: #fff; font-size: 1.8rem; line-height: 1; cursor: pointer; }
.reihe.zwischen { justify-content: space-between; }

.fz { display: grid; grid-template-columns: 1fr auto; gap: 10px; text-align: left; cursor: pointer; width: 100%; color: var(--ink); }
.fz > :not(.fz-plakette) { grid-column: 1; }
.fz-plakette { grid-column: 2; grid-row: 1 / span 3; align-self: start; }
.fz-kopf { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.plakette { flex: none; filter: drop-shadow(0 4px 10px rgb(200 16 46 / 22%)); }
.marke-l { color: #ffb3c0; }
.fz strong { font-size: 1.1rem; }
.kennzeichen { justify-self: start; font-family: var(--mono); font-weight: 600; padding: 2px 10px; border: 2px solid var(--ink); border-radius: 6px; background: var(--panel); letter-spacing: 0.06em; }
.leer { text-align: left; }

.fortschritt { display: grid; gap: 6px; font-size: 0.92rem; }
.balken { height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; }
.balken i { display: block; height: 100%; background: var(--gruen-2); border-radius: 999px; }
.fortschritt.knapp .balken i { background: var(--amber); }
.fortschritt.voll .balken i { background: var(--rot); }
.fortschritt.voll strong { color: var(--rot); }

.kennzahlen { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.kennzahlen div { display: grid; padding: 10px 4px; border-radius: 12px; background: var(--bg); }
.kennzahlen strong { font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.kennzahlen span { font-size: 0.8rem; color: var(--muted); }

.losfahren { flex-direction: column; gap: 2px; min-height: 84px; }
.losfahren span { font-size: 1.3rem; }
.losfahren small { font-weight: 500; opacity: 0.85; }
.unterwegs { border-color: var(--amber); border-width: 2px; }
.verankert { text-align: center; }

.fahrtenliste { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.fahrt-zeile { width: 100%; display: grid; grid-template-columns: 2.4rem 1fr auto; gap: 10px; align-items: center; text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); cursor: pointer; color: var(--ink); }
.fahrt-zeile .nr { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--bg); font-weight: 700; font-variant-numeric: tabular-nums; }
.fahrt-zeile .was { display: grid; min-width: 0; }
.fahrt-zeile .was strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fahrt-zeile small { color: var(--muted); }
.fahrt-zeile .wieviel { display: grid; justify-items: end; gap: 4px; font-variant-numeric: tabular-nums; }
.werkzeuge .btn { flex: 1 1 160px; }

/* Erfassen */
.nur-sr { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.fotoknopf { display: grid; place-items: center; gap: 2px; min-height: 120px; border: 2px dashed var(--gruen-2); border-radius: 16px; background: var(--bg); color: var(--gruen-2); font-weight: 700; font-size: 1.1rem; cursor: pointer; text-align: center; padding: 12px; }
.fotoknopf small { font-weight: 500; color: var(--muted); font-size: 0.85rem; }
#foto:focus-visible + .fotoknopf { outline: 3px solid var(--amber); outline-offset: 2px; }
.vorschau, .foto { width: 100%; max-height: 360px; object-fit: contain; border-radius: 12px; background: #000; }
#km { font-family: var(--mono); font-size: 1.6rem; letter-spacing: 0.08em; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.95rem; }
.check input { width: 22px; height: 22px; margin-top: 1px; accent-color: var(--gruen-2); }
fieldset.art { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
fieldset.art legend { margin-bottom: 6px; }
.wahl { display: flex; gap: 10px; align-items: center; padding: 12px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; }
.wahl:has(input:checked) { border-color: var(--gruen-2); background: var(--ok-bg); }
.wahl span { display: grid; }
.wahl small { color: var(--muted); }
.gefahren { color: var(--gruen-2); }
.fingerabdruecke { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
details summary { cursor: pointer; font-weight: 700; }

.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 20; max-width: min(92vw, 480px); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 12px; box-shadow: 0 10px 30px rgb(0 0 0 / 25%); font-weight: 600; }

/* Druck: Bildschirmvorschau und Papier */
.druckansicht { background: var(--bg); }
.druckleiste { padding-block: 14px; position: sticky; top: 0; background: var(--bg); z-index: 3; }
.buch { max-width: 980px; margin: 0 auto; padding: 0 16px; color: #111; }
.seite { background: #fff; color: #111; padding: 28px; margin-bottom: 18px; border-radius: 8px; box-shadow: var(--schatten); overflow-x: auto; }
.seite h1 { font-size: 2rem; margin: 4px 0 18px; }
.seite h2 { font-size: 1.2rem; margin-bottom: 12px; }
.deckblatt dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 0 0 18px; font-size: 1.05rem; }
.deckblatt dt { color: #555; }
.deckblatt dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; min-width: 0; }
@media (max-width: 600px) { .deckblatt dl { grid-template-columns: 1fr; gap: 2px; } .deckblatt dd { margin-bottom: 10px; } .seite { padding: 18px; } }
.fahrten-tabelle { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.fahrten-tabelle th, .fahrten-tabelle td { border: 1px solid #bbb; padding: 5px 6px; text-align: left; vertical-align: top; }
.fahrten-tabelle th { background: #eef1ee; }
.fahrten-tabelle .zahl { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fahrten-tabelle tr.storniert td { color: #888; text-decoration: line-through; }
.fahrten-tabelle tr.vermerk td { font-size: 0.75rem; color: #444; background: #fafafa; border-top: 0; }
.fahrten-tabelle .mono { font-size: 0.72rem; }
.fotoraster { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.fotoraster figure { margin: 0; break-inside: avoid; }
.fotoraster .paar { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.fotoraster img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; border-radius: 4px; background: #000; }
.fotoraster figcaption { font-size: 0.72rem; color: #444; margin-top: 3px; }

@page { size: A4 landscape; margin: 14mm 12mm 16mm; @bottom-center { content: 'Seite ' counter(page) ' von ' counter(pages); font: 9pt 'Archivo', sans-serif; color: #444; } @bottom-right { content: 'Plakettl · digitales Fahrtenbuch'; font: 8pt 'Archivo', sans-serif; color: #888; } }
@media print {
	.druckansicht { background: #fff; }
	body { background: #fff; }
	.nicht-drucken, .toast, .appkopf { display: none !important; }
	.buch { max-width: none; padding: 0; }
	.seite { box-shadow: none; border-radius: 0; padding: 0; margin: 0; break-after: auto; margin-bottom: 7mm; overflow: visible; }
	.deckblatt { break-after: page; }
	.jahresabschnitt, .belege { break-before: page; }
	.vermerke, .pruefvermerk { break-inside: avoid; }
	.seite:last-child { break-after: auto; }
	.fahrten-tabelle tr { break-inside: avoid; }
	.fahrten-tabelle thead { display: table-header-group; }
}

.kontozeile { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; }
.anmelden { justify-items: start; }

.zusatz { margin-top: 16px; }
.tacho-stunden { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.tacho-stunden.tacho--gross { font-size: 2rem; }

.legal-links { padding-block: 24px; }
@media print { .legal-links { display: none; } }
