/* pets-de.org – Gestaltung „Sattelkammer“ (November 2026)
   Ruhig und linksbündig, aber warm: Papierton statt Weiß, Sattelleder als Akzentfarbe,
   Überschriften in einer Buchschrift, weiche Ecken, eine kleine Pfote in den Trennlinien.
   Alle Schriften kommen vom Gerät (keine Web-Fonts), nichts von fremden Servern.
   Farben und Maße stehen in :root. Das Museum behält sein altes Aussehen (museum.css).
   Vorschlag und Vergleich: _Plan/010_waerme.md

   Hinweis zu alten Inhalten: HTML-Attribute wie align, valign, width oder bgcolor
   wirken nur, solange keine CSS-Regel dieselbe Eigenschaft setzt. Deshalb gestaltet
   diese Datei Tabellen ohne Überschriftenzeile (alte Bild- und Layout-Tabellen) kaum. */

:root {
  --text: #2d2620;           /* warmes Dunkelbraun */
  --text-leise: #6b5f55;     /* Untertitel, Bildunterschriften, Fußzeile */
  --hg: #fbf7f1;             /* Papierton */
  --band: #f5eee3;           /* Kopf und Fuß */
  --flaeche: #f3ebdf;        /* Sand: Kästen, Inhaltsverzeichnis, Code, Menüfläche */
  --linie: #e6dccd;          /* Trennlinien */
  --feldrand: #cdbba5;       /* Rahmen von Eingabefeldern */
  --akzent: #8c4a2b;         /* Sattelleder: Links, Knöpfe */
  --akzent-dunkel: #6a3720;  /* Links beim Darüberfahren */
  --fehler: #a3160e;
  --schrift: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --buchschrift: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;   /* Überschriften, Name */
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --breite: 54rem;           /* Spalte: Kopf, Bilder, Tabellen */
  --textbreite: 42rem;       /* Fließtext: angenehme Zeilenlänge */
  --rand: 1.25rem;           /* Abstand zum Fensterrand */
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--hg);
  color: var(--text);
  font-family: var(--schrift);
  font-size: 1.0625rem;
  line-height: 1.6;
}

/* Eine Spalte, in der Fenstermitte; der Inhalt darin steht links */
.spalte {
  max-width: var(--breite);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--rand);
  padding-right: var(--rand);
}

/* ---------- Kopf: Name und Hauptmenü ---------- */

.sprunglink { position: absolute; left: -100vw; top: 0; }
.sprunglink:focus { left: 1rem; top: 1rem; z-index: 10; padding: .5rem 1rem; background: var(--hg); }

.kopf { background: var(--band); }
.kopf-innen {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem 1.75rem;
  padding-top: .8rem;
  padding-bottom: .8rem;
}
/* Name zwischen den beiden Pet-Logos */
.marke {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: var(--text);
  font-size: 1.125rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.marke img { width: auto; height: 2.5rem; }
.marke span { font-family: var(--buchschrift); font-size: 1.2rem; }
.marke:hover { color: var(--akzent); }

.menue ul {
  display: flex;
  flex-wrap: wrap;
  gap: .2rem .15rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
/* Menüpunkte als weiche Flächen statt Unterstreichung */
.menue a {
  display: inline-block;
  padding: .2rem .55rem;
  border-radius: 999px;
  color: var(--text-leise);
  text-decoration: none;
}
.menue a:hover { background: var(--flaeche); color: var(--text); }
.menue a.aktiv { background: var(--flaeche); color: var(--akzent-dunkel); }

/* ---------- Inhalt ---------- */

main { padding-top: 2.75rem; padding-bottom: 4rem; }

.seitenkopf { margin-bottom: 2.25rem; }

h1, h2, h3, h4, h5, h6 { line-height: 1.25; font-weight: 600; }
h1, h2, h3 { font-family: var(--buchschrift); }
h1 { font-size: 2.2rem; margin: 0; }
.untertitel { margin: .5rem 0 0; color: var(--text-leise); font-size: 1.125rem; }
h2 { font-size: 1.5rem; margin: 2.75rem 0 .75rem; }
h3 { font-size: 1.125rem; margin: 2rem 0 .5rem; }
h4, h5, h6 { font-size: 1rem; margin: 1.5rem 0 .4rem; }

p, ul, ol, dl, blockquote, pre, figure { margin-top: 0; margin-bottom: 1rem; }

/* Fließtext nicht über die ganze Spalte, damit die Zeilen lesbar bleiben */
main :is(p, ul, ol, dl, blockquote, h2, h3, h4, h5, h6, .untertitel) { max-width: var(--textbreite); }
main td :is(p, ul, ol, dl) { max-width: none; }

a { color: var(--akzent); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--akzent-dunkel); }
a:not([href]) { color: inherit; text-decoration: none; }   /* Sprungmarken wie <a id="…"> sind keine Links */
:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }

strong, b, dt, th { font-weight: 600; }

/* Trennlinie: kleine Pfote am Anfang, dann eine Haarlinie */
hr {
  height: 1.1rem;
  margin: 2.5rem 0;
  border: 0;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23c9a98a'%3E%3Cellipse cx='12' cy='16.3' rx='5.3' ry='4.4'/%3E%3Cellipse cx='5.3' cy='10.4' rx='2.1' ry='2.7' transform='rotate(-22 5.3 10.4)'/%3E%3Cellipse cx='9.5' cy='6' rx='2.2' ry='2.8' transform='rotate(-8 9.5 6)'/%3E%3Cellipse cx='14.5' cy='6' rx='2.2' ry='2.8' transform='rotate(8 14.5 6)'/%3E%3Cellipse cx='18.7' cy='10.4' rx='2.1' ry='2.7' transform='rotate(22 18.7 10.4)'/%3E%3C/svg%3E") left center / 1.1rem 1.1rem no-repeat,
    linear-gradient(var(--linie), var(--linie)) 1.8rem center / calc(100% - 1.8rem) 1px no-repeat;
}
blockquote hr { margin: 1.25rem 0; }

ul, ol { padding-left: 1.4rem; }
li { margin-bottom: .3rem; }
li > ul, li > ol { margin-top: .3rem; }
dd { margin: 0 0 .9rem 1.4rem; }

blockquote { margin-left: 0; padding-left: 1.1rem; border-left: 3px solid #dccab4; }

img { max-width: 100%; height: auto; border: 0; }
main img { border-radius: 6px; }   /* weiche Bildecken */
figure { margin-left: 0; margin-right: 0; }
figure img { display: block; }   /* kein Grundlinien-Abstand zwischen Bild und Bildunterschrift */
/* Bilder nebeneinander: <div class="bildreihe"><figure>…</figure><figure>…</figure></div> */
.bildreihe { display: flex; flex-wrap: wrap; gap: 1rem 1.25rem; align-items: flex-start; margin-bottom: 1rem; }
.bildreihe figure { margin: 0; }
figcaption, .bildtext { margin-top: .35rem; color: var(--text-leise); font-size: .9rem; }

code, kbd, tt, pre { font-family: var(--mono); font-size: .9em; }
pre {
  padding: .8rem 1rem;
  background: var(--flaeche);
  border-radius: 10px;
  white-space: pre-wrap;
  overflow-x: auto;
}

/* Inhaltsverzeichnis am Seitenanfang: <nav class="inhalt"> */
nav.inhalt {
  margin-bottom: 2rem;
  padding: .9rem 1.2rem;
  background: var(--flaeche);
  border-radius: 12px;
  font-size: .95rem;
}
nav.inhalt > p:first-child { margin-bottom: .25rem; color: var(--text-leise); }
nav.inhalt ul, nav.inhalt ol { margin-bottom: 0; padding-left: 1.1rem; }
nav.inhalt li { margin-bottom: .15rem; }
nav.inhalt + hr { display: none; }   /* die Trennlinie danach braucht es nicht mehr */

/* Tabellen: nur echte Datentabellen (mit Überschriftenzeile) bekommen Linien */
table { border-collapse: collapse; }
main > table { margin-bottom: 1rem; }
table:has(th) { margin-bottom: 1.25rem; }
main table:not(:has(th)) td { padding-right: .75rem; }   /* alte Bild-Text-Tabellen: etwas Luft zwischen den Spalten */
table:has(th) th, table:has(th) td {
  padding: .35rem 1rem .35rem 0;
  border-bottom: 1px solid var(--linie);
  text-align: left;
  vertical-align: top;
}
table:has(th) thead th { border-bottom-color: var(--text-leise); }
/* alte Tabellen mit border="1": feine Linien statt Rahmen im Stil der 90er */
table[border]:not([border="0"]) { border: 1px solid var(--linie); }
table[border]:not([border="0"]) :is(td, th) { border: 1px solid var(--linie); padding: .3rem .5rem; }

/* Alte Farben in Inhalten (bgcolor, Inline-Styles kopierter Fremdseiten) zurücknehmen:
   keine farbigen Hintergründe, Schrift in der normalen Textfarbe */
main [bgcolor] { background-color: transparent; }
main [background] { background-image: none; }
main [style*="color"] { color: inherit !important; background-color: transparent !important; }

/* Früher zentrierte Blöcke stehen jetzt links */
main center, main [align="center"]:not(td, th, tr, img) { text-align: left; }
main table[align="center"] { margin-left: 0; margin-right: auto; }

/* ---------- Formulare (Pet-Play-Code, Suche) ---------- */

input, select, textarea, button { font: inherit; color: inherit; }
input:not([type]), input[type=text], input[type=search], input[type=email], input[type=url], input[type=password], select, textarea {
  max-width: 100%;
  padding: .4rem .55rem;
  border: 1px solid var(--feldrand);
  border-radius: 6px;
  background: #fff;
  font-size: 1rem;
}
textarea { line-height: 1.45; }
input[type=checkbox], input[type=radio] { accent-color: var(--akzent); }
button, input[type=submit], input[type=reset], input[type=button] {
  padding: .45rem 1.3rem;
  border: 1px solid var(--akzent);
  border-radius: 999px;
  background: var(--akzent);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
}
input[type=reset], input[type=button] { background: var(--hg); color: var(--akzent); }
button:hover, input[type=submit]:hover { background: var(--akzent-dunkel); border-color: var(--akzent-dunkel); }

.formular td { padding: .3rem 1rem .3rem 0; vertical-align: top; }
.formular td:first-child { min-width: 10rem; }
.kasten { padding: 1rem 1.25rem; background: var(--flaeche); border-radius: 10px; }
.fehler, .hinweis { color: var(--fehler); font-weight: 600; }

.suche input { width: 100%; max-width: 32rem; }
.treffer { padding-left: 1.4rem; }
.treffer li { margin-bottom: 1rem; }
.treffer .auszug { display: block; color: var(--text-leise); font-size: .95rem; }

/* Verwaltung der Pet-Codes (petplaycode/verwaltung.php, nicht verlinkt) */
.verwaltung table { width: 100%; font-size: .9rem; }
.verwaltung td { overflow-wrap: anywhere; }
.verwaltung td.datum { white-space: nowrap; }
.verwaltung td button { padding: .2rem .6rem; font-size: .85rem; }
.verwaltung form { margin: 0; }
.verwaltung .nebeneinander { display: inline-block; margin: 0 .5rem 1rem 0; }
.verwaltung .filter input { width: 18rem; max-width: 100%; }
.verwaltung details summary { color: var(--text-leise); font-size: .85rem; cursor: pointer; }
.verwaltung details pre { margin: .3rem 0 0; font-size: .8rem; }
button.leise { background: var(--hg); color: var(--akzent); }
button.leise:hover { background: var(--flaeche); color: var(--akzent-dunkel); }
button.gefahr { background: var(--fehler); border-color: var(--fehler); }
button.gefahr:hover { background: #7d100a; border-color: #7d100a; }

/* Platzhalter, die noch ausgefüllt werden müssen (Impressum, Datenschutz).
   hochladen.sh lädt nichts hoch, solange es davon noch einen gibt. */
mark.platzhalter {
  padding: 0 .3em;
  border: 1px dashed #b38f00;
  border-radius: 3px;
  background: #fff6cc;
  color: #4d3d00;
}

/* ---------- Startseite ---------- */

.einleitung { font-size: 1.1875rem; line-height: 1.55; }
/* Titelbild rechts neben Titel und Willkommen (content/_index.md, [extra] titelbild), auf dem Handy darüber */
.titelbild { float: right; width: min(40%, 21rem); margin: .4rem 0 1rem 2rem; }
.titelbild img { border-radius: 10px; }
.banner textarea { width: 100%; max-width: var(--textbreite); font-family: var(--mono); font-size: .85rem; }

/* ---------- Fußzeile ---------- */

.fuss { background: var(--band); color: var(--text-leise); font-size: .9rem; }
.fuss-innen {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 2.5rem;
  padding-top: 1.25rem;
  padding-bottom: 2.5rem;
}
.fuss p { margin: 0; }
.fuss nav { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.fuss a { color: inherit; text-decoration: none; }
.fuss a:hover { color: var(--text); text-decoration: underline; }

/* ---------- Schmale Bildschirme ---------- */

@media (max-width: 40rem) {
  body { font-size: 1rem; }
  main { padding-top: 1.75rem; }
  h1 { font-size: 1.65rem; }
  h2 { font-size: 1.25rem; }
  .kopf-innen { gap: .4rem 1.5rem; }
  .marke img { height: 2.1rem; }
  .titelbild { float: none; width: auto; margin: 0 0 1.5rem; }
  /* breite (Bild-)Tabellen scrollen seitlich, statt die Seite zu verbreitern */
  main table { display: block; max-width: 100%; overflow-x: auto; }
}

/* ---------- Drucken ---------- */

@media print {
  .kopf nav, .fuss nav, .sprunglink { display: none; }
  body { font-size: 11pt; }
  a { color: inherit; }
}
