/* Rechner „Was kostet eine Katze“ (/bevor/was-kostet-eine-katze). Eigene Datei, damit style.css unberührt bleibt. */
.kk-raster { display: grid; gap: 20px; align-items: start; margin-top: 6px; }
.kk-raster > * { min-width: 0; }
@media (min-width: 1100px) {
  .kk-raster { grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; }
  .kk-ergebnis { position: sticky; top: 92px; }
  .kk-ergebnis .kk-summen { grid-template-columns: 1fr; }
}
.kk-aufstellung { margin-top: 20px; }
.kk-aufstellung .h-karte { font-size: 1.2rem; }
.kk-aufstellung .tabelle-huelle { margin-top: 12px; }
/* Leiste und „Nach oben“ dürfen sich auf dem Handy nicht überdecken */
body:has(.kk-leiste:not([hidden])) .nach-oben { bottom: 84px; }
.kk-rechner .h-karte { font-size: 1.3rem; margin-bottom: 18px; }
.kk-gruppe { border: 0; margin: 26px 0 0; padding: 0; min-width: 0; }
.kk-gruppe legend { display: block; width: 100%; padding: 18px 0 0; border-top: 1px solid var(--linie); font-family: var(--titel); font-weight: 600; font-size: 1.15rem; }
.kk-feld { margin-top: 16px; }
.kk-gruppe .felder-2 { margin-top: 0; }
.kk-gruppe .felder-2 > .feld { margin-top: 16px; }
.kk-eingabe { position: relative; display: flex; gap: 8px; align-items: stretch; }
.kk-eingabe input { flex: 1 1 auto; min-width: 0; padding-left: 34px; font-variant-numeric: tabular-nums; }
.kk-euro { position: absolute; left: 14px; top: 0; bottom: 0; display: flex; align-items: center; color: var(--leise); pointer-events: none; }
.feld .kk-eingabe select { flex: 0 0 auto; width: 9.2em; }
.kk-feld-zahl input { max-width: 9em; }
.kk-gruppe .schalter { margin-top: 10px; }
.kk-feld .feld-hilfe { line-height: 1.45; margin: 0; }

.kk-test { margin-top: 16px; padding: 14px 16px; background: var(--papier); border-radius: var(--rund-klein); }
.kk-test-titel { margin: 0; line-height: 1.5; }
.kk-test-knoepfe { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.kk-test-info { margin: 10px 0 0; font-size: .95rem; line-height: 1.45; }
.kk-test-info[hidden], .kk-warnung[hidden] { display: none; }
.kk-warnung { margin: 12px 0 0; padding: 10px 12px; border-left: 4px solid var(--safran); background: var(--safran-hell); border-radius: 6px; font-size: .95rem; line-height: 1.45; }
.kk-summe b.kk-leer { font-size: 1rem; line-height: 1.35; }
.kk-summe-gross b.kk-leer { font-size: 1.2rem; }
.kk-leiste b.kk-leer { font-size: .95rem; white-space: normal; text-align: right; }

.kk-ergebnis .kapitel { margin-bottom: 10px; }
.kk-summen { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kk-summe { display: flex; flex-direction: column; gap: 2px; margin: 0 !important; padding: 12px 14px; background: var(--papier); border-radius: var(--rund-klein); }
.kk-summe span { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--leise); }
.kk-summe b { font-family: var(--titel); font-weight: 600; font-size: 1.12rem; line-height: 1.25; font-variant-numeric: tabular-nums; color: var(--tinte); }
.kk-summe-gross { grid-column: 1 / -1; background: var(--petrol-hell); }
.kk-summe-gross b { font-size: clamp(1.45rem, 1.1rem + 1.4vw, 1.9rem); }
.kk-offen { margin-top: 12px !important; padding: 10px 12px; border-left: 4px solid var(--safran); background: var(--safran-hell); border-radius: 6px; font-size: .95rem; line-height: 1.45; }
.kk-offen[hidden] { display: none; }
.kk-tabelle .kk-einmal th[colspan] { background: var(--papier); font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--leise); }
.kk-ergebnis .erg-plus li, .kk-ergebnis .erg-unter { font-size: .93rem; line-height: 1.5; }
.kk-handlung { margin-top: 18px; }

.kk-leiste { position: fixed; z-index: 25; left: 12px; right: 12px; bottom: 12px; display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 56px; padding: 10px 18px; background: var(--petrol); color: var(--karte); border-radius: 16px; box-shadow: var(--schatten); text-decoration: none; }
.kk-leiste[hidden] { display: none; }
.kk-leiste:hover { color: var(--karte); }
.kk-leiste span { font-size: .85rem; }
.kk-leiste b { font-family: var(--titel); font-size: 1.1rem; white-space: nowrap; }
@media (min-width: 1100px) { .kk-leiste { display: none !important; } }

@media print {
  .kk-leiste { display: none !important; }
  .kk-raster { display: block; }
  .kk-ergebnis { position: static; margin-top: 8mm; break-inside: avoid; }
  .kk-druck-fuss { margin-top: 4mm; font-size: 9pt; color: #555; }
  /* Knopf „Rechnung drucken“: nur Überschrift, Angaben und Ergebnis */
  .kk-druck-an .r-kopf, .kk-druck-an .r-seite, .kk-druck-an .abschnitt-band, .kk-druck-an .r-spalte > :not(#rechner),
  .kk-druck-an #rechner > p, .kk-druck-an .kk-feld .feld-hilfe, .kk-druck-an noscript, .kk-druck-an .kk-test-titel, .kk-druck-an .kk-test-knoepfe { display: none !important; }
  .kk-druck-an .kk-test { padding: 0; background: none; }
  .kk-druck-an .r-layout, .kk-druck-an .r-spalte { display: block; padding: 0; }
  .kk-druck-an #rechner h2 { font-size: 17pt; margin-bottom: 4mm; }
  .kk-druck-an .kk-rechner { padding: 0; border: 0; }
  .kk-druck-an .kk-gruppe { margin-top: 4mm; }
  .kk-druck-an .kk-feld { margin-top: 2mm; }
  .kk-druck-an .feld input, .kk-druck-an .feld select { min-height: 0; padding: 3px 8px; }
  .kk-druck-an .kk-eingabe input { padding-left: 24px; }
  .kk-druck-an .kk-euro { left: 9px; }
  .kk-druck-an .erg-details { display: block; }
}

/* Handy: Aufstellung als ruhige Zeilen, Betrag neben seiner Beschriftung statt rechtsbündig darunter */
@media (max-width: 640px) {
  .r-abschnitt .kk-tabelle td.zahl { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; text-align: right; }
  .r-abschnitt .kk-tabelle td[data-label]::before { display: inline; flex: 0 0 auto; }
  .r-abschnitt .kk-tabelle .kk-einmal th[colspan] { padding: 4px 8px; }
}
