:root {
  --brand: #009688;
  --bg: #f4f7f7;
  --card: #ffffff;
  --text: #172326;
  --muted: #5e6b70;
  --border: #d8e2e2;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  padding-bottom: 76px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 14px 16px;
}

.topbar div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.topbar span {
  color: var(--muted);
  font-size: 0.86rem;
}

.page {
  padding: 16px;
  max-width: 900px;
  margin: 0 auto;
}

.hero {
  margin-bottom: 18px;
}

.hero h1 {
  margin: 0 0 6px;
  font-size: 1.6rem;
}

.hero p {
  margin: 0;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 18px;
}

.tile,
.card,
.result-card,
.searchbox {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
}

.tile {
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tile span,
.card p,
.result-card p,
.result-card small {
  color: var(--muted);
}

.button,
.searchbox button {
  display: inline-block;
  border: 0;
  border-radius: 14px;
  padding: 12px 16px;
  background: var(--brand);
  color: white;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
}

.searchbox {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.searchbox input,
.searchbox select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  font-size: 1rem;
  background: white;
}

.results {
  display: grid;
  gap: 12px;
}

.result-card h2 {
  margin: 0 0 8px;
  font-size: 1.2rem;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.badge {
  border-radius: 999px;
  background: #eaf4f3;
  color: #0b6760;
  padding: 5px 9px;
  font-size: 0.8rem;
  font-weight: 700;
}

.warning {
  background: #fff7e6;
  border-color: #ffe0a3;
}

.bottomnav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--card);
  border-top: 1px solid var(--border);
}

.bottomnav a {
  text-align: center;
  padding: 16px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
}

@media (min-width: 700px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.bottomnav-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.manual-group {
  margin-bottom: 24px;
}

.manual-group h2 {
  margin: 22px 0 10px;
}

.section-list {
  display: grid;
  gap: 12px;
}

.section-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  text-decoration: none;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
}

.section-card strong {
  display: block;
  margin-bottom: 6px;
}

.section-card p {
  margin: 0;
  color: var(--muted);
}

.section-card span {
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.85rem;
}

.backlink {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--brand);
  text-decoration: none;
  font-weight: 700;
}

.manual-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.button-light {
  background: #eaf4f3;
  color: #0b6760;
}

.manual-pages {
  display: grid;
  gap: 18px;
}

.page-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
}

.page-card-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.page-card-header a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 700;
}

.manual-image {
  display: block;
  width: 100%;
  height: auto;
  background: white;
}

@media (min-width: 900px) {
  .section-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

.source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 12px 0;
}

.source-links strong {
  margin-right: 2px;
}

.source-link {
  display: inline-block;
  border-radius: 999px;
  padding: 7px 10px;
  background: #f0f6f6;
  color: #0b6760;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.86rem;
  border: 1px solid var(--border);
}

.bottomnav-4 {
  grid-template-columns: repeat(4, 1fr);
}

.hidden {
  display: none !important;
}

.branch-grid {
  display: grid;
  gap: 10px;
}

.branch-grid label {
  display: grid;
  gap: 6px;
}

.warning-box {
  background: #fff7e6;
  border: 1px solid #ffe0a3;
  border-radius: 14px;
  padding: 12px;
  margin: 12px 0;
}

.warning-box ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

@media (min-width: 700px) {
  .branch-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.bottomnav-5 {
  grid-template-columns: repeat(5, 1fr);
}

.option-list {
  margin: 10px 0 12px;
  padding-left: 20px;
  color: var(--muted);
}

.option-list li {
  margin-bottom: 5px;
}
/* Mobile Navigation Optimierung */
body {
  padding-bottom: calc(74px + env(safe-area-inset-bottom));
}

.topbar {
  padding-top: calc(14px + env(safe-area-inset-top));
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.topbar-title {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.home-link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 9px 13px;
  background: #eaf4f3;
  color: #0b6760;
  text-decoration: none;
  font-weight: 800;
  border: 1px solid var(--border);
}

.bottomnav-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.bottomnav {
  padding-bottom: env(safe-area-inset-bottom);
}

.bottomnav a {
  min-width: 0;
  padding: 13px 4px;
  font-size: clamp(0.76rem, 3.3vw, 0.98rem);
  line-height: 1.15;
  white-space: nowrap;
  letter-spacing: -0.02em;
}

@media (max-width: 360px) {
  .bottomnav a {
    font-size: 0.72rem;
  }
}
