/* Festes Dark Theme */
:root {
  --bg: #0f1519;
  --surface: #182128;
  --surface-2: #1e2932;
  --surface-3: #25323c;
  --text: #edf2f5;
  --muted: #9fb0bb;
  --line: #2e3d48;
  --sea: #8cc4e6;
  --sea-strong: #1d3a4f;
  --sea-soft: #1c3445;
  --red: #e5484d;
  --red-flag: #c8102e;
  --done: #4cc38a;
  --done-soft: #183526;
  --warn: #f2c94c;
  --warn-soft: #3a3218;
  /* Familienfarben in der Reihenfolge der Teams */
  --team-0: #f0954f; --team-0-soft: #3b2a1d;
  --team-1: #62a8dc; --team-1-soft: #1b3346;
  --team-2: #b48ce8; --team-2-soft: #2e2442;
  --team-3: #e87fb0; --team-3-soft: #40222f;
  --own: var(--sea); --own-soft: var(--sea-soft);
  --radius: 16px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35);
  --nav-h: 64px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding-bottom: env(safe-area-inset-bottom);
  -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
.muted { color: var(--muted); margin: 0; }
.error { color: var(--red); margin: 0; font-size: .95rem; }
.loading { padding: 12px 0; }
.loading::before { content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 8px; vertical-align: -2px; border: 2px solid var(--line); border-top-color: var(--sea); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.notice { margin: 0; padding: 8px 12px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); font-size: .9rem; font-weight: 600; }

/* Team-Farbklassen */
.t0 { --tc: var(--team-0); --tc-soft: var(--team-0-soft); }
.t1 { --tc: var(--team-1); --tc-soft: var(--team-1-soft); }
.t2 { --tc: var(--team-2); --tc-soft: var(--team-2-soft); }
.t3 { --tc: var(--team-3); --tc-soft: var(--team-3-soft); }

/* Danish flag */
.flag {
  width: 74px; height: 56px; border-radius: 8px; margin: 0 auto 16px;
  background:
    linear-gradient(90deg, transparent 37%, #fff 37%, #fff 49%, transparent 49%),
    linear-gradient(180deg, transparent 43%, #fff 43%, #fff 57%, transparent 57%),
    var(--red-flag);
  box-shadow: var(--shadow);
}
.flag.small { width: 26px; height: 20px; border-radius: 4px; margin: 0; display: inline-block; vertical-align: -4px; }

/* Buttons */
.btn {
  appearance: none; border: 1px solid transparent; border-radius: 999px;
  padding: 12px 20px; font: inherit; font-weight: 600; cursor: pointer; color: var(--text); background: var(--surface-3);
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: transform .1s, background .15s; min-height: 44px;
}
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--sea); color: #0b1720; }
.btn.ghost { background: transparent; color: var(--sea); border-color: var(--line); }
.btn.ghost:hover { background: var(--sea-soft); }
.btn.small { padding: 8px 14px; font-size: .9rem; min-height: 40px; }
.btn.danger { background: var(--red); color: #fff; }
.btn.danger-text { color: var(--red); }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* Login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login-card {
  width: 100%; max-width: 380px; background: var(--surface); border-radius: 24px;
  padding: 36px 28px; box-shadow: var(--shadow); text-align: center; border: 1px solid var(--line);
}
.login-card h1 { font-size: 1.8rem; }
.login-card form { margin-top: 28px; display: grid; gap: 12px; text-align: left; }
.login-card label { font-weight: 600; }
input[type="text"], input:not([type]), input[type="search"], select {
  width: 100%; font: inherit; font-size: 16px; padding: 11px 14px; border-radius: 12px; min-height: 44px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
}
input::placeholder { color: #7d8e99; }
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible {
  outline: 3px solid var(--sea); outline-offset: 2px;
}

/* Topbar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}
.topbar-inner {
  max-width: 1100px; margin: 0 auto; padding: 10px 16px;
  display: flex; align-items: center; gap: 12px;
}
.brand {
  font-weight: 700; display: flex; align-items: center; gap: 8px;
  appearance: none; border: 0; background: none; color: inherit; font: inherit; font-weight: 700; padding: 6px 0; cursor: pointer; text-align: left;
}
.tabs { display: flex; gap: 4px; background: var(--surface); padding: 4px; border-radius: 999px; border: 1px solid var(--line); margin-left: auto; }
.tab {
  appearance: none; border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 600;
  padding: 8px 14px; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; min-height: 40px;
}
.tab.active { background: var(--sea); color: #0b1720; }
.tab-icon { display: none; }
.tab-short { display: none; }
.me { display: flex; align-items: center; gap: 8px; }
.conn {
  display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 16px; background: var(--warn-soft); color: var(--warn); font-size: .9rem; font-weight: 600;
}

/* Mobil: Navigation als Bottom-Bar */
@media (max-width: 640px) {
  body { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); }
  /* backdrop-filter würde den Header zum Bezugsrahmen der fixierten Bottom-Bar machen */
  .topbar { backdrop-filter: none; background: var(--bg); }
  .brand { flex: 1; font-size: .95rem; }
  .me .btn { padding: 6px 12px; min-height: 36px; font-size: .85rem; }
  .tabs {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; margin: 0;
    border-radius: 0; border: 0; border-top: 1px solid var(--line); padding: 4px 6px calc(4px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(10px);
  }
  .tab { flex: 1 1 0; min-width: 0; flex-direction: column; gap: 2px; border-radius: 12px; padding: 6px 2px; font-size: .74rem; min-height: 54px; }
  .tab-long { display: none; }
  .tab-short { display: inline; }
  .tab-icon { display: block; font-size: 1.3rem; line-height: 1; }
  .tab.active { background: var(--sea-soft); color: var(--sea); }
}

.team-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font-size: .82rem; font-weight: 700; white-space: nowrap;
  background: var(--tc-soft, var(--surface-2)); color: var(--tc, var(--text));
}

/* Views */
.view { max-width: 1100px; margin: 0 auto; padding: 20px 16px 48px; }
.hello { font-size: 1.5rem; margin: 4px 0 18px; }
.view-head { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: flex-end; justify-content: space-between; margin-bottom: 14px; }
.view-head h2 { font-size: 1.5rem; }
.view-head .muted { font-size: .92rem; margin-top: 2px; }

.tiles { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 640px) { .tiles { grid-template-columns: 1fr; gap: 12px; } }
.tile {
  background: var(--surface); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 12px; min-width: 0;
}
@media (max-width: 640px) { .tile { padding: 16px; } }
.tile h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.tile > .btn, .tile > .btn-row { align-self: flex-start; margin-top: auto; }

.tile-countdown { background: var(--sea-strong); color: #fff; grid-column: 1 / -1; border-color: transparent; }
.tile-countdown h3, .tile-countdown .muted { color: rgba(255, 255, 255, .78); }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.countdown .unit { background: rgba(255, 255, 255, .1); border-radius: 12px; padding: 12px 6px; text-align: center; }
.countdown .num { display: block; font-size: clamp(1.8rem, 9vw, 3.2rem); font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.countdown .lbl { font-size: .8rem; opacity: .85; }
.countdown .done { grid-column: 1 / -1; font-size: 2rem; font-weight: 800; text-align: center; padding: 10px; }

address { font-style: normal; font-size: 1.2rem; font-weight: 600; line-height: 1.5; }
.tile-address { grid-column: 1 / -1; }
.map { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16 / 7; min-height: 220px; background: var(--surface-2); }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }
@media (max-width: 640px) { .map { aspect-ratio: 16 / 10; min-height: 0; } }

.progress-big { font-size: 2.6rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.progress-big small { font-size: 1.2rem; color: var(--muted); }
.bar { display: flex; height: 12px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bar span { transition: width .4s ease; background: var(--tc, var(--own)); }
.bar-own { background: var(--own); }
.legend { list-style: none; margin: 0; padding: 0; display: flex; gap: 16px; flex-wrap: wrap; font-size: .92rem; }
.legend li { display: flex; align-items: center; gap: 6px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--tc, var(--muted)); flex: none; }
.dot.unassigned { background: transparent; border: 2px dashed var(--muted); }

.team-items { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.team-items li { background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: .88rem; }
.team-items li.is-done { color: var(--done); border-color: var(--done-soft); }
.team-items .empty { border: 0; background: none; padding: 0; color: var(--muted); }
.pack-summary { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
/* Packliste und Mitbringliste stehen auf dem Desktop nebeneinander */

/* Listenkopf: Suche + Filter */
.list-head {
  position: sticky; top: var(--topbar-h, 58px); z-index: 10;
  display: grid; gap: 10px; margin: 0 -16px 14px; padding: 10px 16px;
  background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(8px);
}
@media (min-width: 641px) {
  .list-head { grid-template-columns: 1fr minmax(220px, 320px); align-items: center; }
  .list-head .filters { order: -1; }
}
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 640px) {
  .filters.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
  .filters.scroll::-webkit-scrollbar { display: none; }
}
.chip {
  appearance: none; border: 1px solid var(--line); background: var(--surface); color: var(--text); flex: none;
  font: inherit; font-size: .9rem; font-weight: 600; padding: 8px 14px; border-radius: 999px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; white-space: nowrap;
}
.chip.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.no-results { grid-column: 1 / -1; padding: 24px 0; text-align: center; }

/* Kategorien */
.cat-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); align-items: start; }
@media (max-width: 760px) { .cat-grid { grid-template-columns: 1fr; gap: 12px; } }
.cat { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); overflow: hidden; }
.cat > summary {
  list-style: none; cursor: pointer; padding: 14px 16px; display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 1.05rem; user-select: none; min-height: 52px;
}
.cat > summary::-webkit-details-marker { display: none; }
.cat > summary .icon { font-size: 1.3rem; }
.cat > summary .count { margin-left: auto; font-size: .82rem; color: var(--muted); font-weight: 600; white-space: nowrap; }
.cat > summary .chev { transition: transform .2s; color: var(--muted); }
.cat[open] > summary .chev { transform: rotate(90deg); }
.cat ul { list-style: none; margin: 0; padding: 0 6px 6px; }
.cat.shared { border-color: color-mix(in srgb, var(--own) 45%, var(--line)); }
.cat.shared > summary { background: var(--own-soft); }
.cat.orphans { border-color: var(--warn); }
.cat.orphans > summary { background: var(--warn-soft); color: var(--warn); }
.cat-note { margin: 0; padding: 10px 16px; font-size: .85rem; color: var(--muted); border-bottom: 1px solid var(--line); }

/* Listeneinträge */
.item {
  display: flex; align-items: center; gap: 4px; padding: 2px 4px; border-radius: 12px;
  min-height: 52px; transition: background .2s, opacity .2s;
}
.item + .item { border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.item-main {
  appearance: none; border: 0; background: transparent; color: inherit; font: inherit; text-align: left;
  flex: 1; min-width: 0; padding: 8px 6px; border-radius: 10px; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px;
}
.item-main:hover { background: var(--surface-2); }
.item-main.static { cursor: default; }
.item-main.static:hover { background: transparent; }
.item .name { overflow-wrap: break-word; hyphens: auto; font-size: 1rem; }
.item .meta { font-size: .8rem; color: var(--muted); overflow-wrap: break-word; }
.item.is-pending { opacity: .7; }

/* Checkbox mit 44px Touchfläche */
.check {
  appearance: none; border: 0; background: transparent; padding: 0; cursor: pointer; flex: none;
  width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px;
}
.check .box {
  width: 26px; height: 26px; border-radius: 8px; border: 2px solid #5b6d79; display: grid; place-items: center;
  transition: background .15s, border-color .15s, transform .15s;
}
.check .box::after {
  content: ""; width: 7px; height: 13px; border: solid #0b1720; border-width: 0 3px 3px 0;
  transform: rotate(45deg) translate(-1px, -1px); opacity: 0;
}
.check.on .box { transform: scale(1.05); }
.check.on .box::after { opacity: 1; }
.check:active .box { transform: scale(.9); }
/* Gemeinsam erledigt = grün */
.check.done.on .box { background: var(--done); border-color: var(--done); }
/* Privat eingepackt = eigene Familienfarbe, abgerundeter Koffer-Look */
.check.packed .box { border-radius: 50%; }
.check.packed.on .box { background: var(--own); border-color: var(--own); }
.check.pending .box { border-style: dashed; }
.check.pending .box::before {
  content: ""; position: absolute; width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid transparent; border-top-color: var(--sea); animation: spin .8s linear infinite;
}
.check .box { position: relative; }

.item.is-done .name { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--done); }
.item.is-done .meta { color: var(--done); }
.item.is-packed .name { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--own); }
.item.is-packed .meta { color: var(--own); }

/* Zuständigkeit: Auswahl als Badge */
.team-select {
  width: auto; flex: none; max-width: 42%; min-height: 40px; padding: 6px 28px 6px 12px; border-radius: 999px;
  font-size: .85rem; font-weight: 700; cursor: pointer; appearance: none;
  background: var(--tc-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%239fb0bb'/%3E%3C/svg%3E") no-repeat right 11px center;
  color: var(--tc); border: 2px solid transparent;
}
.team-select.unassigned { --tc-soft: transparent; --tc: var(--muted); border: 2px dashed #5b6d79; font-weight: 600; }

/* Bearbeiten */
.edit-row { background: var(--surface-2); padding: 10px; }
.edit-form { display: grid; gap: 8px; width: 100%; }
.edit-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.confirm-text { font-weight: 600; font-size: .9rem; margin-right: 4px; }

.orphan-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; padding: 6px 4px; }
.item.orphan { flex-wrap: wrap; padding: 6px 8px; }
.item.orphan .item-main { flex-basis: 100%; }
.item.orphan .orphan-actions { flex-basis: 100%; }

.add-form { display: flex; gap: 6px; padding: 6px 12px 14px; }
.add-form .btn { flex: none; width: 44px; padding: 0; font-size: 1.3rem; }
.empty-hint { padding: 8px 16px 4px; color: var(--muted); font-size: .9rem; margin: 0; }

.pack-head-progress { min-width: 220px; flex: 0 1 320px; display: grid; gap: 6px; font-weight: 600; font-size: .92rem; }
@media (max-width: 640px) { .pack-head-progress { flex: 1 1 100%; } }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--text); color: var(--bg); padding: 10px 10px 10px 18px; border-radius: 16px; font-weight: 600;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .5); z-index: 50; width: max-content; max-width: calc(100% - 32px);
  display: flex; align-items: center; gap: 12px;
}
.toast-action { appearance: none; border: 0; background: var(--sea-strong); color: #fff; font: inherit; font-weight: 700; padding: 8px 12px; border-radius: 10px; cursor: pointer; min-height: 40px; }
@media (max-width: 640px) { .toast { bottom: calc(var(--nav-h) + 12px + env(safe-area-inset-bottom)); } }

/* Ausflugstipps */
.tile-places { grid-column: 1 / -1; }
.places-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.places { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
@media (max-width: 400px) { .places { grid-template-columns: 1fr; } }
.place { display: flex; gap: 12px; padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.place-icon { font-size: 1.6rem; line-height: 1; flex: none; }
.place-body { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.place-name { font-weight: 700; color: var(--sea); text-decoration: none; }
.place-name:hover { text-decoration: underline; }
a.place-name::after { content: " ↗"; font-size: .8em; opacity: .6; }
.place p { margin: 0; font-size: .9rem; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: auto; }
.tag { font-size: .75rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); white-space: nowrap; }
.tag.kids { background: #1d3526; color: #7fd49a; border-color: transparent; }
.tag.rain { background: var(--team-1-soft); color: var(--team-1); border-color: transparent; }
.tag.sun { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.small-print { font-size: .8rem; }

/* Wetter */
.tile-weather { grid-column: 1 / -1; }
.weather { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.weather-now > div { min-width: 0; flex: 1 1 200px; }
.weather-now { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.weather-now .w-icon { font-size: 3.2rem; line-height: 1; }
.weather-now .w-temp { font-size: 2.8rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.weather-now .w-desc { font-weight: 600; font-size: 1.1rem; }
.weather-now .w-meta { color: var(--muted); font-size: .9rem; }
.weather-now .btn { margin-left: auto; }
@media (max-width: 640px) { .weather-now .btn { margin-left: 0; } .weather-now .w-icon { font-size: 2.6rem; } .weather-now .w-temp { font-size: 2.3rem; } }
.w-days { list-style: none; margin: 0; padding: 0 0 4px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(74px, 1fr); gap: 8px; overflow-x: auto; scrollbar-width: thin; overscroll-behavior-x: contain; }
.w-day { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 6px; text-align: center; display: grid; gap: 2px; font-size: .85rem; }
.w-day .d-name { font-weight: 700; }
.w-day .d-icon { font-size: 1.6rem; line-height: 1.3; }
.w-day .d-temp { font-weight: 700; font-variant-numeric: tabular-nums; }
.w-day .d-temp small { color: var(--muted); font-weight: 600; }
.w-day .d-rain { color: var(--team-1); font-size: .78rem; font-weight: 600; }
.w-day.trip { border: 2px solid var(--red); }
.w-sub { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; margin: 0 0 8px; }
.w-sub .trip-flag { color: var(--red); }

/* Sehr schmale Displays (≤ 400px) */
.logout-icon { display: none; }
@media (max-width: 400px) {
  .logout-text { display: none; }
  .logout-icon { display: block; }
  .me .btn { padding: 6px 10px; }
  .team-select { padding: 6px 22px 6px 9px; font-size: .8rem; background-position: right 8px center; max-width: 36%; }
  .check { width: 44px; }
}

/* ---------- P1 ---------- */
/* Als Nächstes */
.tile-next { grid-column: 1 / -1; }
.kpis { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
@media (max-width: 640px) { .kpis { grid-template-columns: 1fr 1fr; } }
.kpi {
  appearance: none; font: inherit; color: var(--text); text-align: left; cursor: pointer;
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center;
  padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); min-height: 64px;
}
.kpi:hover { background: var(--surface-3); }
.kpi-icon { grid-row: 1 / 3; font-size: 1.5rem; }
.kpi-value { font-size: 1.5rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-label { font-size: .82rem; color: var(--muted); line-height: 1.2; }
.kpi.zero .kpi-value { color: var(--done); }
.kpi.warn { border-color: var(--warn); background: var(--warn-soft); }
.kpi.warn .kpi-value, .kpi.warn .kpi-label { color: var(--warn); }

/* Karte aufklappbar */
.map-toggle > summary {
  list-style: none; cursor: pointer; color: var(--sea); font-weight: 600; padding: 8px 0; min-height: 40px;
}
.map-toggle > summary::-webkit-details-marker { display: none; }
.map-toggle[open] > summary { margin-bottom: 8px; }

/* Ausflüge: Favoriten */
.place-top { display: flex; align-items: flex-start; gap: 8px; justify-content: space-between; }
.star {
  appearance: none; border: 0; background: transparent; color: var(--muted); font-size: 1.35rem; line-height: 1;
  cursor: pointer; width: 40px; height: 40px; margin: -8px -8px 0 0; border-radius: 10px; flex: none;
}
.star[aria-pressed="true"] { color: var(--warn); }
.place.fav { border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); }
#places-more { align-self: flex-start; }

/* Mitbringliste: Filtergruppen + Einkaufen */
.chip-sep { flex: none; width: 1px; align-self: stretch; margin: 4px 4px; background: var(--line); }
.buy-flag {
  display: inline-block; margin-right: 6px; padding: 0 6px; border-radius: 6px;
  background: var(--warn-soft); color: var(--warn); font-weight: 700;
}
.item.is-done .meta .buy-flag { opacity: .8; }
.edit-check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; cursor: pointer; }
.edit-check input { width: 22px; height: 22px; accent-color: var(--warn); }

/* Packliste: Wetterhinweise */
.hint-card {
  background: var(--surface); border: 1px solid color-mix(in srgb, var(--team-1) 40%, var(--line)); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 14px; display: grid; gap: 10px;
}
.hint-card > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; justify-content: space-between;
  font-weight: 700; min-height: 40px;
}
.hint-card > summary::-webkit-details-marker { display: none; }
.hint-card:not([open]) { gap: 0; }
.hint-count { flex: none; font-size: .8rem; padding: 2px 8px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); }
.hint p { margin: 0 0 6px; font-weight: 600; }
.hint-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hint-chip {
  font: inherit; font-size: .85rem; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text);
}
.hint-chip.packed { color: var(--own); border-color: color-mix(in srgb, var(--own) 40%, var(--line)); }
.hint-chip.open { color: var(--warn); }
.hint-chip.shared { color: var(--muted); }
.hint-chip.missing { appearance: none; cursor: pointer; color: var(--sea); border-style: dashed; min-height: 36px; }
.w-hints ul { margin: 0 0 8px; padding-left: 0; list-style: none; display: grid; gap: 4px; }

/* Packvorschläge */
.suggest { margin-bottom: 14px; display: grid; gap: 10px; justify-items: start; }
.suggest-panel {
  width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 16px 16px; display: grid; gap: 10px;
}
.suggest-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.suggest-list label { display: flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; padding: 4px 6px; border-radius: 10px; }
.suggest-list label:hover { background: var(--surface-2); }
.suggest-list input { width: 22px; height: 22px; flex: none; accent-color: var(--own); }
.suggest-list small { color: var(--muted); }
.suggest-list .exists label { cursor: default; color: var(--muted); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- P2: Urlaubsplan ---------- */
.tile-plan { grid-column: 1 / -1; }
.plan-days { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
@media (max-width: 640px) { .plan-days { grid-template-columns: 1fr; } }
.plan-day { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 8px; align-content: start; }
.plan-day-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.plan-date { font-weight: 700; }
.plan-date small { color: var(--muted); font-weight: 600; }
.plan-weather { font-size: .9rem; color: var(--muted); white-space: nowrap; }
.plan-warn { margin: 0; font-size: .82rem; color: var(--warn); }
.plan-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.plan-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 4px 4px 10px; border-radius: 999px;
  font-size: .85rem; font-weight: 600; background: var(--tc-soft); color: var(--text); border: 1px solid transparent;
}
.plan-chip.other { background: transparent; border: 1px dashed var(--tc); color: var(--muted); padding-right: 10px; }
.plan-team { color: var(--tc); font-weight: 700; }
.plan-remove {
  appearance: none; border: 0; background: transparent; color: var(--muted); cursor: pointer;
  width: 32px; height: 32px; border-radius: 50%; font-size: .9rem;
}
.plan-remove:hover { background: var(--surface-3); color: var(--red); }
select.plan-add { min-height: 40px; padding: 6px 10px; font-size: .9rem; color: var(--sea); background: transparent; border-style: dashed; }
select.plan-add.small { width: auto; min-height: 34px; padding: 2px 8px; font-size: .8rem; border-radius: 999px; }
.place-plan { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.tag.plan { background: var(--tc-soft); color: var(--tc); border-color: transparent; }
.plan-day.empty { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px; }
.plan-day.empty .plan-day-head { flex-direction: column; gap: 0; }

/* Offline: nur lesen */
body.offline .check, body.offline .team-select, body.offline .add-form, body.offline .item-main:not(.static),
body.offline .plan-add, body.offline .plan-remove, body.offline .star, body.offline #suggest-toggle,
body.offline .orphan-actions, body.offline .hint-chip.missing {
  opacity: .45; pointer-events: none;
}

/* ---------- Interaktive Karte ---------- */
/* Eigener Stapelkontext: Leaflet-Controls (z-index 1000) und Vollbild-Button bleiben in der Karte
   und liegen nicht über Header/Bottom-Navigation */
.map-wrap { position: relative; z-index: 0; isolation: isolate; }
.map-wrap .map { position: relative; z-index: 0; }
.map .leaflet-container, .map.leaflet-container { background: #1b2730; font: inherit; }
/* OSM-Kacheln an das Dark Theme anpassen */
.map .leaflet-tile-pane { filter: invert(1) hue-rotate(185deg) brightness(.92) contrast(.88) saturate(.7); }
.leaflet-control-attribution { background: rgba(15, 21, 25, .75) !important; color: var(--muted) !important; font-size: 10px; }
.leaflet-control-attribution a { color: var(--sea) !important; }
.leaflet-bar a { background: var(--surface) !important; color: var(--text) !important; border-color: var(--line) !important; width: 36px !important; height: 36px !important; line-height: 36px !important; }

/* Marker (≥ 44px Touchfläche) – #map-Präfix, sonst überschreibt leaflet.css display:grid */
#map .mk { display: grid; place-items: center; border-radius: 50%; background: var(--surface); border: 2px solid var(--tc, var(--sea));
  color: var(--tc, var(--sea)); box-shadow: 0 2px 8px rgba(0, 0, 0, .55); line-height: 1; transition: transform .15s; }
#map .mk > svg { width: 22px; height: 22px; display: block; pointer-events: none; }
#map .mk > b { font-size: 16px; font-weight: 800; pointer-events: none; }
#map .mk-house { background: var(--red-flag); border: 3px solid #fff; color: #fff; }
#map .mk-house > svg { width: 26px; height: 26px; }
#map .mk-cluster { background: var(--sea-strong); border-color: var(--sea); color: #fff; }
/* Kategorie-Farben der Marker */
#map .mk-strand { --tc: #f2c94c; }
#map .mk-natur { --tc: #4cc38a; }
#map .mk-museum { --tc: #b48ce8; }
#map .mk-tierpark { --tc: #f0954f; }
#map .mk-freizeitpark { --tc: #e87fb0; }
#map .mk-stadt { --tc: #8cc4e6; }
#map .mk-aktivitaet { --tc: #9fb0bb; }
#map .mk-angeln { --tc: #62a8dc; }
#map .mk-active { transform: scale(1.25); border-color: var(--warn); box-shadow: 0 0 0 4px rgba(242, 201, 76, .35), 0 2px 8px rgba(0, 0, 0, .55); z-index: 999 !important; }

/* Popups im Dark Theme – #map-Präfix, weil leaflet.css erst später nachgeladen wird */
#map.leaflet-container { font: inherit; font-size: 14px; }
#map .leaflet-popup-content-wrapper, #map .leaflet-popup-tip { background: var(--surface); color: var(--text); box-shadow: 0 6px 24px rgba(0, 0, 0, .6); }
#map .leaflet-popup-content-wrapper { border-radius: 14px; border: 1px solid var(--line); }
#map .leaflet-popup-content { margin: 12px 14px; font-size: .9rem; line-height: 1.4; }
#map a.leaflet-popup-close-button { color: var(--muted); width: 32px; height: 32px; font-size: 22px; line-height: 30px; }
#map .pop { display: grid; gap: 6px; }
#map .pop p { margin: 0; color: var(--muted); }
#map .pop .pop-title { font-size: 1rem; padding-right: 20px; }
#map .pop .pop-meta { font-size: .8rem; color: var(--sea); }
#map .pop-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
#map .pop-actions .btn { min-height: 36px; padding: 6px 12px; font-size: .85rem; }
#map .pop-actions a.btn.primary { color: #0b1720; }
#map .pop-actions a.btn.ghost, #map .pop-actions button.btn.ghost { color: var(--sea); }
/* Kleine Karte auf dem Handy: Beschreibung kürzen, Details im Vollbild */
@media (max-width: 640px) {
  .map-wrap:not(.full) #map .pop p:not(.pop-meta) { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
}

/* Vollbild (mobil: hier ist Verschieben aktiv) */
.map-full-btn {
  position: absolute; top: 10px; right: 10px; z-index: 500; appearance: none; cursor: pointer;
  background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 10px;
  font: inherit; font-size: .85rem; font-weight: 700; padding: 8px 12px; min-height: 40px; box-shadow: var(--shadow);
}
.map-wrap.full { position: fixed; inset: 0; z-index: 70; background: var(--bg); padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
.map-wrap.full .map { height: 100%; aspect-ratio: auto; border-radius: 0; border: 0; min-height: 0; }
.map-wrap.full .map-full-btn { top: calc(10px + env(safe-area-inset-top)); }
body.map-open { overflow: hidden; }
.map-note { margin-top: 6px; }
.map-note.warn { color: var(--warn); }

/* Ausflugskarten ↔ Karte */
.place { cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.place.selected { border-color: var(--warn); box-shadow: 0 0 0 2px rgba(242, 201, 76, .25); }
.tag.map-btn { appearance: none; cursor: pointer; font: inherit; font-size: .75rem; font-weight: 600; color: var(--sea); min-height: 28px; }
.tag.map-btn:hover { background: var(--sea-soft); }
.tag.nomap { color: var(--muted); border-style: dashed; }

/* Hund (nur Familien mit Hund) */
.tag.dog-yes { background: var(--done-soft); color: var(--done); border-color: transparent; }
.tag.dog-outside { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.tag.dog-no { background: transparent; color: var(--muted); border-style: dashed; }
.plan-warn.dog { color: var(--team-0); }

/* Unterkunft */
.tile-house { grid-column: 1 / -1; }
.house { display: grid; gap: 10px; }
.house-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 12px; }
.house-head strong { font-size: 1.1rem; }
.house-link { color: var(--sea); font-weight: 600; text-decoration: none; }
.house-times { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 400px) { .house-times { grid-template-columns: 1fr; } }
.house-time { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.house-time .label { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.house-time strong { font-size: 1.05rem; }
.house-facts { margin: 0; font-weight: 700; }
.house-distances { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 4px 16px; font-size: .9rem; }
.house-distances li { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dashed var(--line); padding: 4px 0; }
.house-questions { display: grid; gap: 8px; justify-items: start; }
.house-questions:empty { display: none; }
.house-q { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-weight: 600; color: var(--warn); }
.house-q .is-done { color: var(--done); }

/* Grundriss-Infos & Galerie */
.house-rooms { margin: 0; padding-left: 18px; display: grid; gap: 2px; font-size: .9rem; color: var(--muted); }
.gallery-wrap { display: grid; gap: 8px; justify-items: start; }
.gallery { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
@media (max-width: 640px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
.gallery-item { appearance: none; border: 0; padding: 0; width: 100%; cursor: zoom-in; border-radius: 10px; overflow: hidden; background: var(--surface-2); display: block; aspect-ratio: 3 / 2; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.gallery-item:hover img { transform: scale(1.04); }

.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(5, 8, 10, .94); display: grid; place-items: center;
  padding: calc(56px + env(safe-area-inset-top)) 12px calc(16px + env(safe-area-inset-bottom)); }
.lightbox figure { margin: 0; display: grid; gap: 10px; justify-items: center; max-width: 100%; max-height: 100%; }
.lightbox img { max-width: min(100%, 1440px); max-height: calc(100vh - 140px); width: auto; height: auto; object-fit: contain; border-radius: 8px; background: #111; transition: opacity .2s; }
.lightbox img.loading { opacity: .4; }
.lightbox figcaption { color: var(--muted); font-size: .9rem; text-align: center; }
.lb-btn { position: absolute; appearance: none; border: 1px solid var(--line); background: rgba(24, 33, 40, .85); color: var(--text);
  width: 48px; height: 48px; border-radius: 50%; font-size: 1.6rem; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.lb-close { top: calc(8px + env(safe-area-inset-top)); right: 12px; font-size: 1.2rem; }
.lb-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 10px; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) { .lb-prev, .lb-next { top: auto; bottom: calc(14px + env(safe-area-inset-bottom)); transform: none; } }

/* ---------- Dashboard kompakt & „Vor Ort“ ---------- */
.weather-mini { display: grid; gap: 10px; }
.wm-now { display: flex; align-items: center; gap: 12px; }
.wm-icon { font-size: 2.4rem; line-height: 1; }
.wm-temp { font-size: 2.2rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.wm-hint { margin: 0; font-size: .88rem; color: var(--warn); font-weight: 600; }
.ort-teaser { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.ort-teaser li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: .92rem; }
.ort-teaser li span { color: var(--muted); white-space: nowrap; }
.ort-teaser li b { text-align: right; }
.tiles-ort > .tile { grid-column: 1 / -1; }
/* Sprungleiste: Abstand zur ersten Kachel (auch mobil, wo .filters.scroll den Rand überschreibt) */
.filters.ort-jump { margin-bottom: 16px; padding-bottom: 2px; }
@media (max-width: 640px) { .filters.scroll.ort-jump { margin: 0 -16px 16px; } }
.ort-jump .chip { text-decoration: none; }
/* Abschnitts-Überschriften nicht unter dem klebenden Header verstecken */
.tiles-ort > .tile { scroll-margin-top: calc(var(--topbar-h, 58px) + 8px); }

/* ---------- Ausflugskarten ---------- */
.places { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
@media (max-width: 640px) { .places { grid-template-columns: 1fr; } }
.place { flex-direction: column; padding: 0; gap: 0; overflow: hidden; }
.place-media {
  appearance: none; border: 0; padding: 0; cursor: pointer; display: block; width: 100%;
  aspect-ratio: 16 / 9; background: var(--surface-3); overflow: hidden;
}
.place-media img, .detail-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-icon { width: 100%; height: 100%; display: grid; place-items: center; color: var(--tc, var(--sea));
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--tc, var(--sea)) 22%, var(--surface-3)), var(--surface-3)); }
.media-icon > svg { width: 56px; height: 56px; }
.media-icon.mk-strand { --tc: #f2c94c; } .media-icon.mk-natur { --tc: #4cc38a; } .media-icon.mk-museum { --tc: #b48ce8; }
.media-icon.mk-tierpark { --tc: #f0954f; } .media-icon.mk-freizeitpark { --tc: #e87fb0; } .media-icon.mk-stadt { --tc: #8cc4e6; }
.media-icon.mk-aktivitaet { --tc: #9fb0bb; } .media-icon.mk-angeln { --tc: #62a8dc; }
.place .place-body { padding: 12px 14px 14px; gap: 8px; flex: 1; }
.place-title { min-width: 0; }
.place-name { margin: 0; font-size: 1.05rem; line-height: 1.25; }
.place-sub { margin: 2px 0 0; font-size: .8rem; color: var(--muted); }
.place-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .88rem; font-weight: 600; }
.facts .price.free { color: var(--done); }
.facts .price.unknown { color: var(--muted); font-weight: 500; }
.tag.closed { background: rgba(229, 72, 77, .15); color: #ff8a8e; border-color: transparent; }
.place-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 2px; }
.place.selected { border-color: var(--warn); }

/* ---------- Detailansicht ---------- */
.sheet { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(5, 8, 10, .7); }
.sheet-panel {
  position: relative; width: 100%; max-width: 720px; max-height: calc(100dvh - 24px - env(safe-area-inset-top));
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px 20px 0 0;
  display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 -8px 40px rgba(0, 0, 0, .5);
}
@media (min-width: 761px) { .sheet { align-items: center; padding: 24px; } .sheet-panel { border-radius: 20px; max-height: calc(100dvh - 48px); } }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.sheet-title { flex: 1; min-width: 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-head .star { margin: 0; }
.sheet-body { overflow-y: auto; overscroll-behavior: contain; padding: 0 16px calc(20px + env(safe-area-inset-bottom)); display: grid; gap: 12px; align-content: start;
  grid-auto-rows: max-content; /* sonst schrumpfen Reihen mit overflow:hidden in der höhenbegrenzten Ansicht auf 0 */ }
.detail-media { margin: 0 -16px; aspect-ratio: 16 / 9; background: var(--surface-3); position: relative; }
.detail-media figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 4px 10px; font-size: .7rem; color: #dfe7ec; background: linear-gradient(transparent, rgba(0,0,0,.7)); }
.detail-media figcaption a { color: #fff; }
.detail-head h2 { font-size: 1.35rem; }
.detail-head .tags { margin-top: 6px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.detail-text { margin: 0; color: var(--text); }
.detail-h { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 6px 0 -4px; }
.facts-grid { margin: 0; display: grid; gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.fact { display: grid; grid-template-columns: 120px 1fr; gap: 10px; padding: 9px 12px; }
.fact + .fact { border-top: 1px solid var(--line); }
.fact dt { color: var(--muted); font-size: .85rem; font-weight: 600; }
.fact dd { margin: 0; font-size: .92rem; }
@media (max-width: 400px) { .fact { grid-template-columns: 1fr; gap: 2px; } }
.block { display: block; margin-top: 2px; }
small.ok { color: var(--done); } small.warn { color: var(--warn); }
.price-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.price-table th { text-align: left; font-weight: 600; color: var(--muted); padding: 5px 0; width: 45%; }
.price-table td { padding: 5px 0; font-weight: 700; }
.price-table tr + tr { border-top: 1px dashed var(--line); }
.price-block { display: grid; gap: 8px; justify-items: start; }
.family-cost { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--done-soft); width: 100%; }
.family-cost.unknown { background: var(--surface-2); color: var(--muted); }
.src-line { margin: 0; font-size: .78rem; color: var(--muted); }
a.src { color: var(--sea); }
.highlights { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: .92rem; }
.notice.closed { background: rgba(229, 72, 77, .15); color: #ff8a8e; }
.plan-block { display: grid; gap: 8px; }
.plan-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.plan-rows li { display: flex; align-items: center; gap: 8px; }
.plan-rows li.closed select { border-color: var(--red); }
.plan-rows select { flex: 1; min-width: 0; }
.plan-warn.closed { color: #ff8a8e; }
.plan-open { appearance: none; border: 0; background: none; color: inherit; font: inherit; padding: 0; cursor: pointer; text-align: left; }

/* ---------- P2: Notizen, Besuch, Heute ---------- */
.tag.visited { background: var(--done-soft); color: var(--done); border-color: transparent; }
.tag.note { background: var(--surface-3); }
.family-block { display: grid; gap: 8px; justify-items: start; }
.family-block .btn.visited-on { background: var(--done-soft); color: var(--done); border-color: transparent; }
textarea.note {
  width: 100%; font: inherit; font-size: 16px; padding: 10px 12px; border-radius: 12px; resize: vertical; min-height: 84px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
}
textarea.note:focus-visible { outline: 3px solid var(--sea); outline-offset: 2px; }
.plan-day.today { border: 2px solid var(--sea); }
.today-badge { color: var(--sea); }
#plan-ics { justify-self: start; align-self: flex-start; }
