:root {
  --green: #1d5c4d;
  --green-dark: #134136;
  --sand: #f6f1e7;
  --card: #ffffff;
  --text: #22302b;
  --muted: #6b7a74;
  --accent: #e8a13c;
  --accent-soft: #fdf3e2;
  --blue: #2f7fb4;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(20, 40, 35, .08);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: var(--sand);
  color: var(--text);
  line-height: 1.5;
}

.app-header {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  color: #fff;
  padding: calc(env(safe-area-inset-top, 0px) + 14px) 16px 12px;
}
.header-inner { max-width: 900px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.app-header h1 { margin: 0; font-size: 1.25rem; }
.app-header h1 span { display: block; font-size: .8rem; font-weight: 400; opacity: .85; }
.offline-badge {
  background: var(--accent); color: #3a2a08; font-size: .75rem; font-weight: 600;
  padding: 3px 10px; border-radius: 999px; margin-left: auto;
}
.hidden { display: none !important; }

.tabs {
  position: sticky; top: 0; z-index: 1000;
  display: flex; overflow-x: auto;
  background: var(--green-dark);
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 1 0 auto;
  background: none; border: none; color: rgba(255,255,255,.75);
  font-size: .9rem; font-weight: 600; padding: 12px 14px; cursor: pointer;
  border-bottom: 3px solid transparent; white-space: nowrap;
}
.tab.active { color: #fff; border-bottom-color: var(--accent); }

main { max-width: 900px; margin: 0 auto; padding: 14px 12px calc(env(safe-area-inset-bottom, 0px) + 30px); }
.panel { display: none; }
.panel.active { display: block; }

.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 16px; margin-bottom: 12px;
}
.card h2 { margin: 0 0 8px; font-size: 1.05rem; color: var(--green-dark); }
.card h3 { margin: 0 0 4px; font-size: .98rem; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.intro { color: var(--muted); font-size: .88rem; margin: 2px 4px 12px; }

/* Wetterkarte heute */
.weather-card { background: linear-gradient(135deg, #eaf4ff, #ffffff); }
.weather-now { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.weather-now .wicon { font-size: 3rem; line-height: 1; }
.weather-now .wtemp { font-size: 2rem; font-weight: 700; }
.weather-now .wdetail { font-size: .85rem; color: var(--muted); }
.weather-meta { margin-top: 8px; font-size: .8rem; color: var(--muted); }

/* Vorschläge */
.suggestion {
  display: block; text-decoration: none; color: inherit;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 12px 14px; margin-bottom: 10px; border-left: 5px solid var(--green);
}
.suggestion.hot { border-left-color: #e2574c; }
.suggestion.rain { border-left-color: var(--blue); }
.suggestion.event { border-left-color: var(--accent); background: var(--accent-soft); }
.suggestion .why { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.suggestion p { margin: 4px 0 6px; font-size: .88rem; }
.maps-links { display: flex; gap: 10px; flex-wrap: wrap; }
.maps-links a, .poi-links a {
  font-size: .8rem; font-weight: 600; color: var(--blue); text-decoration: none;
  background: #eef5fa; border-radius: 8px; padding: 4px 10px;
}

/* Planer */
.day {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  margin-bottom: 10px; overflow: hidden;
}
.day-head {
  width: 100%; display: flex; align-items: center; gap: 10px;
  background: none; border: none; padding: 12px 14px; cursor: pointer;
  font: inherit; text-align: left; color: inherit;
}
.day-head .d-date { font-weight: 700; min-width: 88px; }
.day-head .d-date small { display: block; font-weight: 400; color: var(--muted); }
.day-head .d-w { margin-left: auto; display: flex; align-items: center; gap: 6px; font-size: .9rem; }
.day-head .d-w .ic { font-size: 1.4rem; }
.day.today-mark { outline: 2px solid var(--accent); }
.day-body { display: none; padding: 0 14px 12px; border-top: 1px solid #eee; }
.day.open .day-body { display: block; }
.day-note { background: var(--accent-soft); border-radius: 8px; padding: 8px 10px; font-size: .85rem; margin: 10px 0; }
.day-section { margin-top: 10px; }
.day-section h4 { margin: 0 0 6px; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }

/* Karte */
#map { height: 65vh; min-height: 380px; border-radius: var(--radius); box-shadow: var(--shadow); }
.chip-row { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; border: 1.5px solid var(--green); background: #fff; color: var(--green-dark);
  border-radius: 999px; padding: 5px 12px; font-size: .82rem; font-weight: 600; cursor: pointer;
}
.chip.on { background: var(--green); color: #fff; }
.leaflet-popup-content { font-size: .85rem; }
.leaflet-popup-content b { font-size: .92rem; }

/* Ortsliste */
#poi-search {
  width: 100%; padding: 10px 14px; border-radius: 10px; border: 1.5px solid #d8d2c4;
  font-size: .95rem; margin-bottom: 10px; background: #fff;
}
.poi-item {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 12px 14px; margin-bottom: 10px;
}
.poi-item .poi-top { display: flex; align-items: baseline; gap: 8px; }
.poi-item .dist { margin-left: auto; font-size: .78rem; color: var(--muted); white-space: nowrap; }
.poi-item .cat-badge { font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #e7efe9; color: var(--green-dark); white-space: nowrap; }
.poi-item p { margin: 6px 0; font-size: .87rem; }
.poi-item .info-line { font-size: .8rem; color: var(--muted); }
.poi-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }

/* Stundenwetter */
.hour-strip { display: flex; gap: 2px; overflow-x: auto; margin: 10px 0 4px; padding-bottom: 4px; scrollbar-width: none; }
.hour-strip::-webkit-scrollbar { display: none; }
.hour-cell { flex: 0 0 auto; min-width: 46px; text-align: center; background: rgba(255,255,255,.65); border-radius: 8px; padding: 5px 2px; }
.hour-cell .hh { font-size: .72rem; color: var(--muted); }
.hour-cell .hi { font-size: 1.1rem; line-height: 1.3; }
.hour-cell .ht { font-size: .8rem; font-weight: 700; }
.hour-cell .hp { font-size: .66rem; color: var(--blue); min-height: .9em; }

/* ZTL-Warnung */
.ztl { color: #c53030; font-size: .82rem; font-weight: 600; margin: 6px 0; }

/* Favoriten/Erledigt-Buttons */
.mini-btn { background: #f4f1e8; border: 1px solid #ddd6c4; border-radius: 8px; padding: 4px 10px; font-size: .8rem; font-weight: 600; cursor: pointer; color: var(--text); }
.mini-btn.on { background: var(--accent-soft); border-color: var(--accent); }
.mini-btn[data-act="done"].on { background: #e5f2e9; border-color: var(--green); color: var(--green-dark); }
.poi-item.poi-done { opacity: .62; }

/* Vokabeln */
.vocab-card { background: linear-gradient(135deg, #f0f9f4, #ffffff); }
.vocab-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed #dde7e0; }
.vocab-row:last-child { border-bottom: none; }
.vocab-it { font-weight: 700; color: var(--green-dark); }
.vocab-de { color: var(--muted); text-align: right; }

/* Listen */
.list-head { display: flex; align-items: baseline; gap: 10px; }
.list-head .list-count { margin-left: auto; }
.check-list { list-style: none; margin: 8px 0; padding: 0; }
.check-item { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid #f0ece2; }
.check-item label { display: flex; align-items: center; gap: 10px; flex: 1; cursor: pointer; }
.check-item input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--green); flex-shrink: 0; }
.check-item.done .check-text { text-decoration: line-through; color: var(--muted); }
.check-del { background: none; border: none; color: #c0b8a8; font-size: 1rem; cursor: pointer; padding: 4px 8px; }
.check-del:hover { color: #e2574c; }
.list-add { display: flex; gap: 8px; margin: 10px 0 8px; }
.list-add input { flex: 1; padding: 9px 12px; border-radius: 10px; border: 1.5px solid #d8d2c4; font-size: .95rem; }
.list-add button { background: var(--green); color: #fff; border: none; border-radius: 10px; width: 44px; font-size: 1.2rem; cursor: pointer; }
.list-uncheck { background: none; border: 1px solid #d8d2c4; border-radius: 8px; padding: 5px 10px; color: var(--muted); cursor: pointer; }

@media (min-width: 700px) {
  .app-header h1 { font-size: 1.5rem; }
  .app-header h1 span { display: inline; margin-left: 10px; }
}
