/* Steckbrief (steckbrief.php): helles Papier-Layout, A4. Bildschirm: zentrierte Vorschau; Druck: Leiste aus. */
*{box-sizing:border-box}
body{margin:0;background:#e9ece8;color:#111;font:16px/1.5 Georgia,"Times New Roman",serif}
.sb-bar{position:sticky;top:0;z-index:5;display:flex;flex-wrap:wrap;gap:10px;align-items:center;padding:10px 16px;background:#16301c;color:#fff;font-family:system-ui,Arial,sans-serif}
.sb-btn{display:inline-flex;align-items:center;min-height:40px;padding:0 16px;border:1px solid #8fd16a;border-radius:10px;background:transparent;color:#fff;font:600 15px system-ui,Arial,sans-serif;text-decoration:none;cursor:pointer}
.sb-main{background:#8fd16a;color:#0e1411}
.sb-hint{font-size:13px;opacity:.85}
.sb-sheet{width:100%;max-width:210mm;margin:18px auto;background:#fff;box-shadow:0 2px 14px rgba(0,0,0,.18);border-collapse:collapse} .sb-sheet>thead>tr>td,.sb-sheet>tbody>tr>td,.sb-sheet>tfoot>tr>td{padding:0}
.sb-page{padding:6mm 14mm 4mm}
.sb-rh,.sb-rf{margin:0 14mm;text-align:center;font:600 11px/1.3 system-ui,Arial,sans-serif;letter-spacing:.09em;text-transform:uppercase;color:#3b6b2a}
.sb-rh{padding:12mm 0 2.2mm;border-bottom:1px solid #9bb88e} .sb-rh i{font:italic 400 12px Georgia,serif;letter-spacing:0;text-transform:none;color:#444} .sb-wm{color:#2f5d20}
.sb-rf{padding:2.2mm 0 9mm;border-top:1px solid #9bb88e;font-weight:500;letter-spacing:.04em;text-transform:none;color:#555}
.sb-sep{margin:0 .7em;color:#9bb88e}
.sb-head h1{margin:2px 0 0;font-size:34px;line-height:1.15}
.sb-latin{margin:2px 0 10px;font-size:19px;color:#444}
.sb-head{border-bottom:2px solid #3b6b2a;margin-bottom:12px;padding-bottom:4px}
.sb-imgs{display:grid;gap:8px;margin:0 0 12px}
.sb-imgs figure{margin:0;break-inside:avoid;text-align:center}
.sb-imgs img{display:block;margin:0 auto;max-width:100%;height:auto;border:1px solid #ccc}
.sb-imgs figcaption{font-size:12px;line-height:1.3;color:#333;margin-top:3px;text-align:left}
.sb-cr{color:#666}
.sb-n1{grid-template-columns:1fr} .sb-n1 img{max-height:105mm;width:auto}
.sb-n2{grid-template-columns:1fr 1fr} .sb-n2 img{max-height:70mm;width:auto}
.sb-n3{grid-template-columns:1fr 1fr} .sb-n3 figure:first-child{grid-column:1/-1} .sb-n3 figure:first-child img{max-height:85mm;width:auto} .sb-n3 figure:not(:first-child) img{max-height:62mm;width:auto}
.sb-facts{display:grid;grid-template-columns:9em 1fr;gap:3px 12px;margin:0 0 12px;padding:8px 12px;border:1px solid #bbb;border-radius:6px;background:#f6f8f4;font-size:14.5px}
.sb-facts dt{color:#555;font-family:system-ui,Arial,sans-serif;font-size:13px} .sb-facts dd{margin:0}
.sb-text h2{margin:0 0 4px;font-size:19px}
.sb-text div{font-size:14.5px;line-height:1.5;text-align:left;hyphens:auto}
.sb-text h3{margin:10px 0 2px;font-size:15px;break-after:avoid}
.sb-foot{margin-top:14px;padding-top:8px;border-top:1px solid #aaa;font-size:11.5px;color:#444;break-inside:avoid}
.sb-foot p{margin:2px 0}
a{color:#1d4f10}
@media (max-width:600px){.sb-sheet{margin:0}.sb-rh,.sb-rf{margin:0 14px}.sb-page{padding:12px 14px}.sb-n2,.sb-n3{grid-template-columns:1fr}.sb-facts{grid-template-columns:1fr}.sb-imgs img{max-height:none!important;width:100%!important}}
@page{size:A4;margin:0}   /* Rand 0: der Browser druckt dann keine eigene Kopf-/Fusszeile; Rand und Kopf/Fuss kommen aus dem Layout */
@media print{
  body{background:#fff;font-size:11pt} .sb-bar{display:none}
  .sb-sheet{max-width:none;margin:0;box-shadow:none} .sb-page{padding:5mm 14mm 3mm}
  a{color:#000;text-decoration:none}
  .sb-imgs{grid-template-columns:revert} .sb-n2,.sb-n3{grid-template-columns:1fr 1fr} .sb-n1{grid-template-columns:1fr}
  .sb-facts{-webkit-print-color-adjust:exact;print-color-adjust:exact}
}

/* Seitenaufteilung: kurz = alles auf einer Seite; mittel = 2 Fotos, kompakter; lang = Text beginnt auf Seite 2 */
.sb-mittel .sb-text div,.sb-mittel .sb-facts{font-size:13.5px;line-height:1.42}
.sb-mittel .sb-n2 img{max-height:58mm}
.sb-mittel .sb-head h1{font-size:30px}
@media print{
  .sb-kurz .sb-text div{font-size:10.5pt}
  .sb-mittel .sb-text div,.sb-mittel .sb-facts{font-size:10pt;line-height:1.38}
  .sb-mittel .sb-n2 img{max-height:56mm} .sb-mittel .sb-head h1{font-size:24pt}
  .sb-lang .sb-text{break-before:page;page-break-before:always}
  .sb-lang .sb-head{break-after:avoid}
}

@media print{
  .sb-kurz .sb-n3 figure:first-child img{max-height:68mm} .sb-kurz .sb-n3 figure:not(:first-child) img{max-height:48mm}
  .sb-mittel .sb-n2 img{max-height:50mm}
  .sb-lang .sb-n3 figure:first-child img{max-height:90mm} .sb-lang .sb-n3 figure:not(:first-child) img{max-height:70mm}
  .sb-head{margin-bottom:8px} .sb-imgs{margin-bottom:8px} .sb-facts{margin-bottom:8px}
  .sb-foot{margin-top:8px}
}
@media print{.sb-lang .sb-text{padding-top:6mm}}

/* Familien-Steckbrief (steckbrief_familie.php): Artenliste mit kleinem Foto links */
.sb-count{margin:0 0 4px;font:600 13px system-ui,Arial,sans-serif;color:#3b6b2a}
.sb-list h2{margin:14px 0 6px;font-size:19px;border-bottom:1px solid #bbb;padding-bottom:2px}
.sf-art{display:grid;grid-template-columns:42mm 1fr;gap:4mm;padding:2.5mm 0;border-bottom:1px solid #ddd;break-inside:avoid;page-break-inside:avoid}
.sf-pic{width:42mm;height:28mm;background:#eef1ea;border:1px solid #ccc;display:flex;align-items:center;justify-content:center;overflow:hidden}
.sf-pic img{width:100%;height:100%;object-fit:cover;display:block} .sf-v img{object-fit:contain}
.sf-txt h3{margin:0;font-size:15px;line-height:1.2} .sf-txt p{margin:1px 0}
.sf-lat{font-size:12.5px;color:#444} .sf-f{font-size:12px} .sf-d{font-size:12px;color:#222;margin-top:2px!important;line-height:1.35}
.sb-faminfo{margin-bottom:4px}
@media (max-width:600px){.sf-art{grid-template-columns:1fr}.sf-pic{width:100%;height:50vw}}
@media print{.sf-art{grid-template-columns:42mm 1fr} .sf-pic{width:42mm;height:28mm} .sb-faminfo div{font-size:10.5pt}}
