/* ============================================================
   TIER-SOS DESIGNSYSTEM
   Tannengrün trägt die Marke. Signal-Koralle gehört AUSSCHLIESSLICH
   der SOS-Handlung – dem Anruf. Wird Koralle zur Dekoration, verliert
   sie im Ernstfall ihre Bedeutung. Das ist die einzige harte Regel.
   ============================================================ */

/* Schriften liegen auf DIESEM Server. Keine Anfrage an Google, kein DNS,
   kein Rendersperren. font-display: swap sorgt dafür, dass der Text sofort
   in der Systemschrift erscheint, falls die Webschrift noch unterwegs ist.
   Im Notfall zählt lesbarer Text, nicht die richtige Schrift. */
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/assets/fonts/barlow-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('/assets/fonts/barlow-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('/assets/fonts/barlow-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('/assets/fonts/barlow-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('/assets/fonts/barlow-condensed-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('/assets/fonts/barlow-condensed-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/assets/fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('/assets/fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2'); }

:root {
  --tanne:        #14524B;
  --tanne-tief:   #0C3A34;
  --tanne-hell:   #E4EDEB;

  --koralle:      #FF5A3C;   /* nur SOS */
  --koralle-tief: #DD3E20;   /* Kontrast auf Weiß */

  --sicher:       #14524B;
  --unterwegs:    #B8801F;
  --vermisst:     #DD3E20;
  --gefunden:     #1E7F5C;

  --tinte:        #131A19;
  --stahl:        #5E6B68;
  --linie:        #D4DBD9;
  --nebel:        #E7ECEA;
  --karte:        #FFFFFF;

  --radius:       3px;
  --schatten:     0 1px 0 rgba(19,26,25,.05), 0 10px 30px -16px rgba(19,26,25,.3);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Barlow', system-ui, -apple-system, sans-serif;
  background: var(--nebel);
  color: var(--tinte);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

.cond {
  font-family: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: .02em;
}
.mono { font-family: 'IBM Plex Mono', ui-monospace, monospace; }

.huelle { max-width: 460px; margin: 0 auto; background: var(--karte); min-height: 100vh; }

/* ---------- Kopf der Notfallseite ---------- */
.kopf { background: var(--tanne); color: #fff; padding: 15px 20px 18px; }
.kopf-zeile {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
}
.marke {
  font-family: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif; font-weight: 700; font-size: 13px;
  text-transform: uppercase; letter-spacing: .14em; opacity: .8;
}
.tag-id {
  font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 11px;
  letter-spacing: .06em; opacity: .65;
}
.kopf h1 {
  font-family: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif; font-weight: 700;
  font-size: clamp(28px, 8vw, 34px); line-height: 1.03;
  text-transform: uppercase; margin-top: 8px;
}
.kopf p { font-size: 15px; margin-top: 8px; opacity: .93; }

/* ---------- Tiere ---------- */
.tiere { display: flex; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--linie); }
.tier { flex: 1; display: flex; gap: 11px; align-items: center; min-width: 0; }
.avatar {
  width: 48px; height: 48px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 24px;
  background: var(--tanne-hell); border: 1px solid var(--linie);
  background-size: cover; background-position: center;
}
.tier-name { font-weight: 700; font-size: 17px; line-height: 1.15; }
.tier-sub { font-size: 12.5px; color: var(--stahl); }

/* Vier Zustände */
.zustand {
  display: inline-block; margin-top: 3px; padding: 2px 7px; border-radius: 2px;
  font-family: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif; font-weight: 700; font-size: 10.5px;
  text-transform: uppercase; letter-spacing: .09em; color: #fff;
}
.z-SICHER    { background: var(--sicher); }
.z-UNTERWEGS { background: var(--unterwegs); }
.z-VERMISST  { background: var(--vermisst); }
.z-GEFUNDEN  { background: var(--gefunden); }

/* Halsbandmarke: das Tier ist die Hauptperson */
.held { padding: 24px 20px; text-align: center; border-bottom: 1px solid var(--linie); }
.held .avatar { width: 96px; height: 96px; font-size: 46px; margin: 0 auto 12px; }
.held h2 {
  font-family: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif; font-weight: 700;
  font-size: 32px; text-transform: uppercase; line-height: 1;
}
.held .rasse { color: var(--stahl); font-size: 14.5px; margin-top: 3px; }

/* ---------- Eskalationsleiter ---------- */
.leiter { padding: 4px 20px 18px; }
.leiter-kopf {
  display: flex; align-items: center; gap: 9px; padding: 16px 0 10px;
  font-family: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif; font-weight: 700; font-size: 12px;
  text-transform: uppercase; letter-spacing: .12em; color: var(--stahl);
}
.leiter-kopf::after { content: ""; flex: 1; height: 1px; background: var(--linie); }

.sprosse { display: flex; gap: 13px; padding-bottom: 10px; }
.schiene { display: flex; flex-direction: column; align-items: center; flex: none; width: 26px; }
.stufe {
  width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 12px;
  background: var(--tanne); color: #fff;
}
.sprosse.wartend .stufe { background: #fff; color: var(--stahl); border: 1.5px solid var(--linie); }
.faden { width: 2px; flex: 1; background: var(--linie); margin-top: 4px; }
.sprosse:last-child .faden { display: none; }

.wer { font-weight: 700; font-size: 16.5px; line-height: 1.2; }
.bez { font-size: 13px; color: var(--stahl); margin-top: 1px; }

/* DER Button. Signal-Koralle, nichts sonst auf der Seite. */
.anruf {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; margin-top: 10px; padding: 16px; border: 0; border-radius: var(--radius);
  text-decoration: none; cursor: pointer;
  background: var(--koralle-tief); color: #fff;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.2);
  font-family: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif; font-weight: 700; font-size: 22px;
  text-transform: uppercase; letter-spacing: .02em;
  transition: background .15s, transform .06s;
}
.anruf:hover  { background: #C63316; }
.anruf:active { transform: translateY(1px); }
.anruf:focus-visible { outline: 3px solid var(--tanne); outline-offset: 2px; }
.anruf .nr {
  font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 13px;
  text-transform: none; letter-spacing: 0; opacity: .92;
}
.sprosse.wartend .anruf {
  background: #fff; color: var(--stahl);
  border: 1.5px solid var(--linie); box-shadow: none;
}
.hinweis { font-size: 12.5px; color: var(--stahl); margin-top: 7px; }

/* ---------- Pflichtfakten ---------- */
.fakten { border-top: 1px solid var(--linie); padding: 16px 20px 6px; }
.fakt { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid #EEF1F0; }
.fakt:last-child { border-bottom: 0; }
.balken { width: 4px; border-radius: 2px; flex: none; background: var(--linie); }
.fakt.warn .balken   { background: var(--unterwegs); }
.fakt.schl .balken   { background: var(--tanne); }
.fakt-l {
  font-family: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif; font-weight: 700; font-size: 11px;
  text-transform: uppercase; letter-spacing: .1em; color: var(--stahl);
}
.fakt-t { font-size: 14.5px; margin-top: 4px; }

.fuss {
  padding: 16px 20px 28px; border-top: 1px solid var(--linie); background: #F6F8F7;
  font-size: 12.5px; color: var(--stahl);
}
.fuss a { color: var(--tanne); font-weight: 600; }

/* ---------- Formulare / Halterbereich ---------- */
.block { padding: 22px 20px; }
.auge {
  font-family: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif; font-weight: 700; font-size: 11px;
  text-transform: uppercase; letter-spacing: .14em; color: var(--koralle-tief);
}
h2.titel {
  font-family: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif; font-weight: 700;
  font-size: 28px; text-transform: uppercase; margin-top: 7px; line-height: 1.05;
}
.hilfe { color: var(--stahl); font-size: 14.5px; margin-top: 7px; }

label { display: block; font-weight: 600; font-size: 13px; margin: 16px 0 6px; }
input, select, textarea {
  width: 100%; padding: 13px 12px; border: 1.5px solid var(--linie);
  border-radius: var(--radius); font: 500 16px/1.4 'Barlow', system-ui, sans-serif;
  background: #fff; color: var(--tinte);
}
textarea { min-height: 74px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: 0; border-color: var(--tanne);
  box-shadow: 0 0 0 3px rgba(20,82,75,.14);
}
.code-feld {
  font-family: 'IBM Plex Mono', ui-monospace, monospace; letter-spacing: .2em;
  text-align: center; font-size: 20px; text-transform: uppercase;
}

.knopf {
  width: 100%; margin-top: 20px; padding: 15px; border: 0; border-radius: var(--radius);
  cursor: pointer; background: var(--tanne); color: #fff;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.25);
  font-family: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif; font-weight: 700; font-size: 19px;
  text-transform: uppercase; letter-spacing: .03em;
}
.knopf:active { transform: translateY(1px); }
.knopf:focus-visible { outline: 3px solid var(--koralle-tief); outline-offset: 2px; }
.knopf.zweit { background: #fff; color: var(--tanne); border: 1.5px solid var(--linie); box-shadow: none; }

/* Fehler erklären, was schiefging – und wie man es behebt. */
.fehler {
  margin-top: 14px; padding: 12px 13px; border-left: 4px solid var(--koralle-tief);
  background: #FFF0EC; font-size: 13.5px;
}
.merk {
  margin-top: 16px; padding: 12px 13px; border-left: 4px solid var(--tanne);
  background: var(--tanne-hell); font-size: 13.5px;
}

/* ---------- Träger-Liste im Halterbereich ---------- */
.traeger {
  display: flex; align-items: center; gap: 12px; padding: 14px 0;
  border-bottom: 1px solid var(--linie);
}
.traeger .id { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 12px; color: var(--stahl); }
.traeger .rolle { font-weight: 600; font-size: 15px; }
.punkt { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--tanne); }
.punkt.leer { background: var(--linie); }

/* ---------- Shop-Verlinkung (NUR im Halterbereich) ---------- */
.shop { display: flex; gap: 12px; align-items: center; padding: 14px; border: 1.5px solid var(--linie);
  border-radius: var(--radius); margin-top: 10px; text-decoration: none; color: var(--tinte); }
.shop:hover { border-color: var(--tanne); }
.shop img { width: 52px; height: 52px; object-fit: cover; border-radius: 2px; flex: none; }
.shop .t { font-weight: 700; font-size: 15px; }
.shop .b { font-size: 13px; color: var(--stahl); margin-top: 2px; }
.shop .p { margin-left: auto; font-weight: 700; color: var(--tanne); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Ohne JavaScript bleiben Protokoll-Zeilen ausgeblendet, alle Nummern
   aber tippbar. Die Seite funktioniert vollständig ohne JS. */
[hidden] { display: none !important; }
