/* Rahmen der Seite im Aufbau der Team-Demo: feste Kopfzeile, linke Navigation (weiß), Inhalt auf Hellgrau.
   Handy: Kopf oben, untere Leiste, Mehr-Blatt. Farben nur über die Tokens in grund.css. */
.sprung { position: fixed; top: .5rem; left: .5rem; z-index: 40; padding: .75rem 1rem; background: var(--hemd); transform: translateY(-200%); }
.sprung:focus { transform: none; }

.rahmen { min-height: 100dvh; }
.spalte { min-width: 0; display: flex; flex-direction: column; min-height: 100dvh; }
main { flex: 1; width: 100%; max-width: 78rem; margin: 0 auto; padding: 1.25rem 1rem 2rem; }

/* Wortmarke */
.wortmarke { display: block; min-height: var(--ziel); color: var(--auf-wand); text-decoration: none; line-height: 1.1; }
.wortmarke strong { display: block; font: 600 1.0625rem/1.15 var(--titel); letter-spacing: .02em; }
.wortmarke span { display: block; margin-top: .125rem; font-size: .875rem; color: var(--auf-wand-leise); }

/* Kopfzeile: dunkles Herrmann-Grün, fest oben */
.kopf {
  position: sticky; top: 0; z-index: 20;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .375rem .5rem;
  padding: .375rem .5rem .5rem 1rem;
  background: var(--bordeaux-tief); color: var(--auf-wand);
  border-bottom: 3px solid var(--eiche);
}
.kopf-rechts { display: flex; align-items: center; gap: .25rem; }
.stempeluhr:empty { display: none; }
.glocke {
  position: relative; display: grid; place-items: center;
  width: 3rem; height: 3rem; padding: 0;
  background: none; border: 0; color: inherit; border-radius: 50%;
}
.glocke:hover, .profil-knopf:hover { background: rgb(255 255 255 / .12); }
.glocke svg { width: 1.625rem; height: 1.625rem; }
.glocke-zahl {
  position: absolute; top: .125rem; right: .0625rem; min-width: 1.3125rem; height: 1.3125rem; padding: 0 .25rem;
  background: #9a4a00; color: #fff; border-radius: 1rem;
  font-size: .8125rem; font-weight: 700; line-height: 1.3125rem; text-align: center;
}
.gesicht {
  flex: none; display: grid; place-items: center;
  width: 2.5rem; height: 2.5rem; border-radius: 50%; object-fit: cover;
  background: var(--eiche-hell); color: var(--tinte);
  font: 600 1rem/1 var(--titel);
}

/* Profil mit Menü */
.profil { position: relative; }
.profil-knopf {
  display: flex; align-items: center; gap: .625rem; min-height: 3rem; padding: .25rem; border: 0; border-radius: 2rem;
  background: none; color: inherit; font-weight: 600;
}
.profil-name { display: none; }
.profil-menue {
  position: absolute; right: 0; top: calc(100% + .25rem); z-index: 30; width: 16rem; padding: .375rem;
  background: var(--hemd); color: var(--tinte); border: 1px solid var(--linie); box-shadow: 0 .5rem 1.5rem rgb(0 0 0 / .22);
}
.profil-kopf { padding: .5rem .625rem .625rem; border-bottom: 1px solid var(--linie); margin-bottom: .25rem; }
.profil-kopf strong, .profil-kopf small { display: block; line-height: 1.25; }
.profil-menue a, .profil-menue button {
  display: flex; align-items: center; gap: .625rem; width: 100%; min-height: var(--ziel); padding: .25rem .625rem;
  background: none; border: 0; color: var(--tinte); text-decoration: none; text-align: left; font-weight: 600; border-radius: 2px;
}
.profil-menue a:hover, .profil-menue button:hover { background: var(--rose-2); }
.profil-menue svg { width: 1.25rem; height: 1.25rem; flex: none; color: var(--bordeaux); }

/* Globale Suche: auf dem Handy eine eigene Zeile unter der Marke */
.suche { position: relative; order: 3; flex: 1 1 100%; }
.suche input {
  min-height: 2.75rem; padding-left: 2.5rem; background: #fff; color: var(--tinte); border: 1px solid transparent; border-radius: 2px;
}
.suche input::placeholder { color: var(--leise); opacity: 1; }
.suche-lupe {
  position: absolute; left: .75rem; top: 50%; width: 1.125rem; height: 1.125rem; margin-top: -.5625rem; pointer-events: none;
  border: 2px solid var(--leise); border-radius: 50%;
}
.suche-lupe::after { content: ""; position: absolute; width: 2px; height: .5rem; right: -.25rem; bottom: -.375rem; background: var(--leise); transform: rotate(-45deg); }
.suche-liste {
  position: absolute; left: 0; right: 0; top: calc(100% + .25rem); z-index: 30; max-height: min(26rem, 70dvh); overflow-y: auto;
  background: var(--hemd); color: var(--tinte); border: 1px solid var(--linie); box-shadow: 0 .5rem 1.5rem rgb(0 0 0 / .22);
}
.suche-gruppe { padding: .5rem .75rem .25rem; font-size: .875rem; font-weight: 700; color: var(--leise); text-transform: uppercase; letter-spacing: .06em; }
.suche-leer { padding: .875rem .75rem; color: var(--leise); }
.treffer {
  display: block; width: 100%; padding: .5rem .75rem; background: none; border: 0; color: var(--tinte); text-align: left; text-decoration: none; line-height: 1.25;
}
.treffer strong, .treffer small { display: block; }
.treffer:hover, .treffer[aria-selected="true"] { background: var(--rose-2); box-shadow: inset 3px 0 0 var(--bordeaux); }

/* Handy-Leiste: wenige Einträge, Schnelleingabe fest in der Mitte */
.leiste {
  position: fixed; inset: auto 0 0; z-index: 10;
  display: grid; grid-template-columns: 1fr 1fr 1.25fr 1fr 1fr;
  background: var(--bordeaux-tief); border-top: 3px solid var(--eiche);
  padding-bottom: env(safe-area-inset-bottom);
}
.leiste a, .leiste button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .125rem;
  min-width: 0; min-height: var(--leiste); padding: .25rem .125rem;
  background: none; border: 0; color: var(--auf-wand-leise);
  font-size: .8125rem; font-weight: 600; line-height: 1.1; text-decoration: none; text-align: center;
}
.leiste svg { width: 1.375rem; height: 1.375rem; }
.leiste [aria-current="page"] { color: #fff; box-shadow: inset 0 3px 0 var(--eiche-hell); }
.leiste .schnellknopf { color: #fff; }
/* Nur das Symbol ist gefüllt, damit der Knopf nicht wie die aktive Seite aussieht */
.leiste .schnellknopf svg { box-sizing: content-box; padding: .3125rem; border-radius: 50%; background: var(--bordeaux); }

/* Navigation links: nur auf großen Schirmen */
.wand { display: none; }
.wand-navi h2 { margin: 1.125rem 0 .25rem; padding: 0 .75rem; font: 600 .8125rem/1.3 var(--schrift); color: var(--leise); text-transform: uppercase; letter-spacing: .08em; }
.wand-navi h2:first-child { margin-top: .25rem; }
.wand-navi a {
  display: flex; align-items: center; gap: .875rem; min-height: 2.75rem; padding: .25rem .75rem;
  color: var(--tinte); text-decoration: none; border-radius: 2px; border-left: 3px solid transparent;
}
.wand-navi a:hover { background: var(--rose); }
.wand-navi a[aria-current="page"] { background: var(--rose-2); color: var(--bordeaux-tief); border-left-color: var(--bordeaux); font-weight: 600; }
.wand-navi svg { width: 1.375rem; height: 1.375rem; flex: none; color: var(--leise); }
.wand-navi a[aria-current="page"] svg { color: var(--bordeaux); }
.wand .schnellknopf {
  display: flex; align-items: center; justify-content: center; gap: .5rem; width: 100%; min-height: 2.875rem; margin-top: 1rem;
  background: var(--bordeaux); color: #fff; border: 0; border-radius: 2px; font-weight: 700;
}
.wand .schnellknopf svg { width: 1.125rem; height: 1.125rem; }
.wand .schnellknopf:hover { background: var(--bordeaux-tief); }
.wand-luft { flex: 1; min-height: 1.5rem; }
.wand-adresse { padding: .875rem .75rem 1rem; border-top: 1px solid var(--linie); color: var(--leise); font-size: .875rem; line-height: 1.4; }
.wand-adresse strong { font-weight: 600; }

/* Mehr-Blatt */
.mehr-liste { display: grid; gap: .25rem; margin-top: .75rem; }
.mehr-liste a, .mehr-liste button {
  display: flex; align-items: center; gap: .75rem; width: 100%; min-height: 3.25rem; padding: .25rem .75rem;
  background: var(--rose); border: 0; color: var(--tinte); border-radius: 3px;
  font-weight: 600; text-decoration: none; text-align: left;
}
.mehr-liste svg { width: 1.375rem; height: 1.375rem; flex: none; color: var(--bordeaux); }
.mehr-konto { display: flex; align-items: center; gap: .75rem; padding-right: 6rem; }
.mehr-konto h2 { margin: 0; padding: 0; font-size: 1.25rem; }
.mehr-konto small { display: block; }

/* Fuß: echte Agenturdaten */
.fuss { padding: 1.25rem 1rem calc(var(--leiste) + 1.5rem + env(safe-area-inset-bottom)); background: var(--wand); color: var(--auf-wand); }
.fuss-innen { display: grid; gap: 1rem; max-width: 70rem; margin: 0 auto; }
.fuss a { color: var(--auf-wand); display: inline-block; min-height: 2.75rem; line-height: 2.75rem; }
.fuss h2 { margin: 0 0 .25rem; color: var(--auf-wand); font-size: 1.1875rem; }
.fuss p, .fuss small { color: var(--auf-wand-leise); }
.fuss-bild { display: none; }
.fuss .textknopf { color: var(--auf-wand); padding: 0; }

/* Blatt: von unten auf dem Handy, mittig auf großen Schirmen */
dialog {
  width: 100%; max-width: 100%; max-height: 92dvh;
  margin: auto 0 0; padding: 1.25rem 1rem 1.5rem;
  border: 0; border-top: 4px solid var(--bordeaux); border-radius: 0;
  background: var(--hemd); color: var(--tinte);
}
dialog::backdrop { background: rgb(24 33 29 / .66); }
dialog h2 { margin: 0 0 .25rem; padding-right: 6.5rem; font-size: 1.5rem; }
dialog h3 { margin-top: 1.25rem; }
.blatt-zu {
  position: absolute; top: .75rem; right: .75rem; min-height: var(--ziel); padding: 0 .75rem;
  background: var(--hemd); border: 1px solid var(--rand); border-radius: 3px;
}
.blatt-form { display: grid; gap: .75rem; margin-top: .75rem; }
.zwei { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); }

/* Meldung */
#meldung {
  position: fixed; inset: auto 1rem calc(var(--leiste) + 1rem); margin: 0 auto; max-width: 28rem; width: fit-content;
  padding: .75rem 1rem; background: var(--wand); color: #fff; border: 0; border-left: 5px solid var(--eiche-hell);
  font-weight: 600;
}
#meldung[data-art="fehler"] { background: var(--beere); border-left-color: #fff; }

@media (min-width: 62rem) {
  /* Kopf über die ganze Breite, darunter Navigation und Inhalt; .spalte löst sich auf, damit der Kopf über der Navigation liegt */
  .rahmen { display: grid; grid-template-columns: 16rem minmax(0, 1fr); grid-template-rows: auto 1fr auto; }
  .spalte { display: contents; }
  .kopf { grid-column: 1 / -1; grid-row: 1; flex-wrap: nowrap; gap: 1.5rem; padding: 0 1rem 0 1.25rem; min-height: 4rem; }
  .kopf .wortmarke { flex: none; display: flex; flex-direction: row; align-items: baseline; gap: .625rem; min-height: 0; }
  .kopf .wortmarke strong { font-size: 1.1875rem; white-space: nowrap; }
  .kopf .wortmarke span::before { content: "· "; }
  .kopf .wortmarke span { margin: 0; font-size: 1rem; white-space: nowrap; }
  .suche { order: 0; flex: 1 1 auto; max-width: 40rem; margin: 0 auto; }
  .profil-name { display: block; }
  .profil-knopf { padding-right: .875rem; }
  .wand {
    grid-column: 1; grid-row: 2 / span 2; position: sticky; top: 4rem; align-self: start; height: calc(100dvh - 4rem); overflow-y: auto;
    display: flex; flex-direction: column; padding: 1rem .75rem 0;
    background: var(--hemd); border-right: 1px solid var(--linie);
  }
  .leiste { display: none; }
  main { grid-column: 2; grid-row: 2; padding: 1.75rem 2rem 3rem; }
  .fuss { grid-column: 2; grid-row: 3; padding: 0 2rem; }
  .fuss-innen { grid-template-columns: 1.1fr 1.1fr 1fr; align-items: stretch; padding: 1.5rem 0; }
  .fuss-bild { display: block; width: 100%; height: 100%; max-height: 9rem; object-fit: cover; object-position: 50% 18%; }
  dialog { width: min(38rem, 92vw); max-width: 38rem; margin: auto; padding: 1.5rem; }
  #meldung { bottom: 1.5rem; }
}

@media (prefers-reduced-motion: no-preference) {
  dialog[open] { animation: blatt .18s ease-out; }
  @keyframes blatt { from { transform: translateY(1rem); opacity: 0; } }
}
