/* Seitenrahmen: Kopf, Seitenleiste (ab 900 px), Leiste unten (darunter) */
.kopf {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  min-height: 58px; padding: 8px var(--abstand);
  padding-top: max(8px, env(safe-area-inset-top));
  background: var(--flaeche); border-bottom: 1px solid var(--rand);
}
.marke { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em; color: var(--text); text-decoration: none; }
.marke svg {
  width: 34px; height: 34px; padding: 6px; border-radius: 10px;
  background: var(--akzent); color: var(--akzent-text);
}
.kopf-rechts { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.kopf-benutzer {
  display: inline-flex; align-items: center; min-height: 32px; padding: 4px 12px;
  border-radius: var(--radius-rund); background: var(--flaeche-2); color: var(--text-leise);
  font-size: 0.85rem; font-weight: 600;
}
.zaehler {
  display: inline-flex; align-items: center; min-height: 36px; padding: 4px 12px;
  border-radius: var(--radius-rund); background: var(--warnung-hg); color: var(--warnung);
  font-size: 0.875rem; font-weight: 650; text-decoration: none;
}

.rahmen { min-height: calc(100vh - 58px); }
.inhalt {
  width: 100%;
  max-width: 1100px; margin: 0 auto;
  padding: var(--abstand);
  padding-bottom: calc(var(--leiste-hoehe) + 32px + env(safe-area-inset-bottom));
}
.inhalt.offen { max-width: 440px; padding-top: 40px; }

.seitenleiste { display: none; }
.leiste {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--flaeche); border-top: 1px solid var(--rand);
  box-shadow: 0 -4px 16px rgb(16 24 40 / 0.05);
}
.leiste a {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: var(--leiste-hoehe); color: var(--text-leise); text-decoration: none; font-size: 0.75rem; font-weight: 500;
}
.leiste a svg { width: 24px; height: 24px; }
.leiste a[aria-current="page"] { color: var(--akzent); font-weight: 700; }
/* aktiver Bereich: kurzer Strich oben */
.leiste a[aria-current="page"]:not(.gross)::before {
  content: ""; position: absolute; top: 0; left: 50%; width: 32px; height: 3px; margin-left: -16px;
  border-radius: 0 0 3px 3px; background: var(--akzent);
}
.leiste a.gross span.kreis {
  display: flex; align-items: center; justify-content: center;
  width: 54px; height: 54px; margin-top: -24px; border-radius: 18px;
  background: var(--akzent); color: var(--akzent-text);
  box-shadow: 0 0 0 4px var(--flaeche), var(--schatten-hoch);
  transition: transform var(--dauer), background-color var(--dauer);
}
.leiste a.gross span.kreis svg { width: 28px; height: 28px; }
.leiste a.gross:active span.kreis { transform: scale(0.94); }
.leiste a.gross:hover span.kreis { background: var(--akzent-druck); }

@media (min-width: 900px) {
  .rahmen { display: grid; grid-template-columns: var(--seitenleiste) 1fr; }
  .leiste { display: none; }
  .seitenleiste {
    display: block; position: sticky; top: 58px; align-self: start;
    height: calc(100vh - 58px); overflow-y: auto;
    padding: 16px 12px; border-right: 1px solid var(--rand); background: var(--flaeche);
  }
  .seitenleiste a {
    display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 12px; margin-bottom: 2px;
    border-radius: var(--radius-klein); color: var(--text); text-decoration: none; font-weight: 500;
    transition: background-color var(--dauer), color var(--dauer);
  }
  .seitenleiste a svg { width: 20px; height: 20px; color: var(--text-leise); }
  .seitenleiste a:hover { background: var(--flaeche-2); }
  .seitenleiste a[aria-current="page"] { background: var(--akzent-hell); color: var(--akzent); font-weight: 700; box-shadow: inset 3px 0 0 var(--akzent); }
  .seitenleiste a[aria-current="page"] svg { color: var(--akzent); }
  .seitenleiste hr { border: 0; border-top: 1px solid var(--rand); margin: 10px 6px; }
  .inhalt { padding: 32px 40px 56px; }
}

.banner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  padding: 10px var(--abstand); background: var(--warnung-hg); color: var(--warnung); font-weight: 600;
}
