:root {
  /* Hüttenfarben: Papier, Tannengrün, Holz */
  --bg: #f5f3ec;
  --bg-2: #ebe7dc;
  --card: #ffffff;
  --text: #1f2a24;
  --muted: #697366;
  --line: #e2ded1;
  --accent: #2f6b4f;
  --accent-ink: #ffffff;
  --accent-soft: #dcebe1;
  --wood: #94643a;
  --wood-soft: #f2e6d6;
  --ok: #2f7d4f;
  --ok-soft: #dcefe2;
  --wait: #b67b0c;
  --wait-soft: #f8ecd0;
  --obj: #b5562f;
  --obj-soft: #f7e1d6;
  --danger: #b0392b;
  --danger-soft: #f8e3df;
  --school: #d9e8f6;
  --school-ink: #2d5f8f;
  --holiday: #c0392b;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(30, 45, 35, .05), 0 3px 12px rgba(30, 45, 35, .07);
  --topbar: rgba(245, 243, 236, .88);
  --tabbar-h: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131915; --bg-2: #1c241f; --card: #1b221e; --text: #e7ede8; --muted: #9caa9f; --line: #2d3832;
    --accent: #7cc49b; --accent-ink: #0d1f15; --accent-soft: #213a2c; --wood: #d4a273; --wood-soft: #3a2c1e;
    --ok: #86cf9f; --ok-soft: #1f3a29; --wait: #e8b54d; --wait-soft: #3a3019; --obj: #f0a07c; --obj-soft: #40271c;
    --danger: #f0998b; --danger-soft: #3d221d; --school: #1d3045; --school-ink: #9cc6ef; --holiday: #ff8a7a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4); --topbar: rgba(19, 25, 21, .88);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; overscroll-behavior-y: none; }
a { color: var(--accent); }
h1 { font-size: 1.6rem; line-height: 1.2; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 1.2rem; margin: 0; }
h3 { font-size: 1rem; margin: 0; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.pre { white-space: pre-line; }
[hidden] { display: none !important; }

/* ---------- Kopf- und Tab-Leiste ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--topbar); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
.topbar-inner { max-width: 1000px; margin: 0 auto; display: flex; align-items: center; gap: 10px; padding: 9px 16px; min-height: 52px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 750; font-size: 1.05rem; margin-right: auto; min-width: 0; }
.brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logo { width: 32px; height: 32px; border-radius: 9px; flex: none; }
.top-avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); color: var(--accent);
  font-size: .8rem; font-weight: 800; text-decoration: none; flex: none; }
.top-help { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--bg-2); color: var(--muted); font-weight: 800; text-decoration: none; flex: none; }
body.bare .tabbar, body.bare .top-avatar, body.bare .top-help { display: none; }

.tabbar { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around; align-items: stretch;
  background: var(--topbar); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom); }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; height: var(--tabbar-h);
  text-decoration: none; color: var(--muted); font-size: .72rem; font-weight: 650; min-width: 0; }
.tabbar .ti { font-size: 1.35rem; line-height: 1.2; filter: grayscale(1); opacity: .75; }
.tabbar a.active { color: var(--accent); }
.tabbar a.active .ti { filter: none; opacity: 1; }
.tabbar .tab-new .ti { filter: none; opacity: 1; background: var(--accent); color: var(--accent-ink); width: 44px; height: 32px; border-radius: 12px;
  display: grid; place-items: center; font-size: 1.4rem; font-weight: 700; }
.badge { position: absolute; margin: -4px 0 0 22px; background: var(--obj); color: #fff; font-size: .65rem; font-weight: 800; border-radius: 999px; min-width: 17px; height: 17px;
  display: grid; place-items: center; padding: 0 4px; }

main { max-width: 1000px; margin: 0 auto; padding: 14px 16px calc(var(--tabbar-h) + 28px + env(safe-area-inset-bottom)); }
body.bare main { padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
body.form-open main { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
body.form-open .tabbar { display: none; }

/* ---------- Bausteine ---------- */
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.card.tight { padding: 12px 14px; }
.card-link { display: block; text-decoration: none; color: inherit; }
.btn { font: inherit; font-weight: 700; font-size: 1rem; border: 0; border-radius: 14px; padding: 12px 18px; min-height: 48px; background: var(--accent); color: var(--accent-ink);
  cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-align: center; }
.btn.ghost { background: var(--accent-soft); color: var(--accent); }
.btn.plain { background: var(--bg-2); color: var(--text); }
.btn.danger { background: var(--danger-soft); color: var(--danger); }
.btn.ok { background: var(--ok); color: #fff; }
.btn.obj { background: var(--obj-soft); color: var(--obj); }
.btn.small { min-height: 38px; padding: 7px 13px; font-size: .92rem; border-radius: 11px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; }
.icon-btn { border: 0; background: var(--bg-2); color: var(--text); width: 44px; height: 44px; border-radius: 50%; font-size: 1.15rem; display: inline-grid; place-items: center; cursor: pointer; text-decoration: none; flex: none; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--bg-2); color: var(--text); white-space: nowrap; text-decoration: none; }
.chip.bestaetigt, .chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.offen { background: var(--wait-soft); color: var(--wait); }
.chip.einwand { background: var(--obj-soft); color: var(--obj); }
.chip.storniert { background: var(--bg-2); color: var(--muted); text-decoration: line-through; }
.chip.school { background: var(--school); color: var(--school-ink); }
.chip.holiday { background: var(--danger-soft); color: var(--holiday); }
.chip.wood { background: var(--wood-soft); color: var(--wood); }
.error { color: var(--danger); font-weight: 650; }
.notice { background: var(--wait-soft); border-radius: 14px; padding: 12px 14px; }
.notice.green { background: var(--accent-soft); }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty .big { font-size: 3rem; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 22px 0 10px; }
.section-title h2 { font-size: 1.1rem; }
.section-title a { font-size: .9rem; font-weight: 650; text-decoration: none; }
.avatar { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 800; flex: none; }
.avatar.sm { width: 30px; height: 30px; font-size: .75rem; }

input, select, textarea { font: inherit; font-size: 16px; color: var(--text); background: var(--card); border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 13px; width: 100%; }
input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--accent); flex: none; }
input[type=date], input[type=time] { min-height: 50px; -webkit-appearance: none; appearance: none; }
textarea { resize: vertical; min-height: 110px; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
.field { display: flex; flex-direction: column; gap: 5px; font-size: .9rem; font-weight: 700; color: var(--muted); min-width: 0; }
.field .hint { font-weight: 400; font-size: .82rem; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 600; cursor: pointer; }
.form { display: flex; flex-direction: column; gap: 14px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; }
.stepper { display: inline-flex; align-items: center; gap: 4px; background: var(--card); border: 1.5px solid var(--line); border-radius: 999px; padding: 3px; font-weight: 700; color: var(--text); }
.stepper button { border: 0; width: 40px; height: 40px; border-radius: 50%; background: var(--bg-2); color: var(--text); font-size: 1.2rem; font-weight: 700; cursor: pointer; }
.stepper span { min-width: 100px; text-align: center; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--bg-2); border-radius: 12px; padding: 3px; gap: 3px; }
.seg a, .seg button { text-align: center; padding: 9px 4px; border-radius: 10px; font: inherit; font-weight: 650; color: var(--text); font-size: .92rem; text-decoration: none; border: 0; background: none; cursor: pointer; }
.seg .on { background: var(--card); box-shadow: var(--shadow); color: var(--accent); }
.savebar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: var(--topbar); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
.savebar .inner { max-width: 1000px; margin: 0 auto; display: flex; gap: 10px; }
.savebar .btn { flex: 1; }

/* ---------- Übersicht ---------- */
.hero { border-radius: 22px; padding: 18px; color: #fff; background: linear-gradient(135deg, #2f6b4f, #24533d 60%, #6b4a2b); position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -10px; bottom: -14px; width: 150px; height: 110px; opacity: .17;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 90'%3E%3Cpath fill='%23fff' d='M10 90 35 40l10 18 20-38 45 70z'/%3E%3C/svg%3E"); }
.hero h1 { font-size: 1.45rem; }
.hero .addr { opacity: .85; font-size: .9rem; }
.hero .state { margin-top: 12px; background: rgba(255, 255, 255, .14); border-radius: 14px; padding: 10px 12px; font-weight: 600; position: relative; z-index: 1; }
.hero .state small { display: block; font-weight: 400; opacity: .85; }
.todo { border-left: 5px solid var(--wait); }
.todo.einwand { border-left-color: var(--obj); }
.blist { display: flex; flex-direction: column; gap: 10px; }
.bitem { display: flex; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 11px 13px; text-decoration: none; color: var(--text); box-shadow: var(--shadow); }
.bitem .date { flex: none; width: 54px; text-align: center; border-radius: 12px; background: var(--accent-soft); color: var(--accent); padding: 5px 0; line-height: 1.1; }
.bitem .date b { display: block; font-size: 1.25rem; }
.bitem .date span { font-size: .72rem; font-weight: 700; text-transform: uppercase; }
.bitem.offen .date { background: var(--wait-soft); color: var(--wait); }
.bitem.einwand .date { background: var(--obj-soft); color: var(--obj); }
.bitem.storniert { opacity: .6; }
.bitem .t { font-weight: 700; }
.bitem .m { font-size: .84rem; color: var(--muted); }
.quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.photo-strip { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.photo-strip::-webkit-scrollbar { display: none; }
.photo-strip a { flex: none; width: 120px; aspect-ratio: 1; border-radius: 14px; background: var(--bg-2) center / cover no-repeat; display: grid; place-items: center; font-size: 2rem; text-decoration: none; }

/* ---------- Wetter ---------- */
.weather { display: flex; flex-direction: column; gap: 10px; }
.wnow { display: flex; align-items: center; gap: 12px; }
.wnow .wi { font-size: 2.6rem; line-height: 1; }
.wnow .temp { font-size: 2rem; font-weight: 800; line-height: 1; }
.wdays { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 4px; }
.wdays::-webkit-scrollbar { display: none; }
.wday { flex: none; width: 74px; text-align: center; background: var(--bg-2); border-radius: 14px; padding: 8px 4px; font-size: .8rem; }
.wday b { display: block; font-size: .85rem; }
.wday .wi { font-size: 1.6rem; line-height: 1.4; }
.wday .mx { font-weight: 800; font-size: .95rem; }
.wday .mn { color: var(--muted); }
.wday .rn { color: var(--school-ink); font-size: .72rem; }
.wday.we { background: var(--wood-soft); }

/* ---------- Kalender ---------- */
.calhead { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.calhead h1 { flex: 1; text-align: center; font-size: 1.3rem; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; user-select: none; }
.cal .wd { text-align: center; font-size: .72rem; font-weight: 800; color: var(--muted); padding: 2px 0 4px; text-transform: uppercase; }
.cal .wd.we { color: var(--wood); }
.day { position: relative; min-height: 74px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); padding: 3px 4px; cursor: pointer; overflow: hidden;
  display: flex; flex-direction: column; font: inherit; color: inherit; text-align: left; }
.day.out { opacity: .38; }
.day.past { background: var(--bg-2); }
.day.school { background: var(--school); }
.day .n { font-weight: 750; font-size: .9rem; line-height: 1.3; }
.day.we .n { color: var(--wood); }
.day.hol .n { color: var(--holiday); }
.day.today { border: 2px solid var(--accent); }
.day.sel { outline: 3px solid var(--accent); outline-offset: -3px; }
.day .hn { font-size: .58rem; line-height: 1.15; color: var(--holiday); font-weight: 700; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.day .w { position: absolute; top: 2px; right: 3px; font-size: .68rem; text-align: right; line-height: 1.1; }
.day .w i { font-style: normal; display: block; font-size: .9rem; }
.day .bar { position: absolute; left: 0; right: 0; bottom: 5px; height: 20px; }
.day .bar i { position: absolute; top: 0; bottom: 0; }
.day .bar .l { left: -1px; right: calc(50% + 2px); border-radius: 0 6px 6px 0; }
.day .bar .r { left: calc(50% + 2px); right: -1px; border-radius: 6px 0 0 6px; }
.day .bar .l.cont { right: -1px; border-radius: 0; }
.day .bar .r.cont { left: -1px; border-radius: 0; }
.day .bar .bestaetigt { background: var(--ok); }
.day .bar .offen { background: repeating-linear-gradient(-45deg, var(--wait), var(--wait) 5px, #d8a33d 5px, #d8a33d 10px); }
.day .bar .einwand { background: repeating-linear-gradient(-45deg, var(--obj), var(--obj) 5px, #d07c55 5px, #d07c55 10px); }
.day .bar .lbl { position: absolute; left: 52%; top: 1px; font-size: .64rem; font-weight: 800; color: #fff; white-space: nowrap; z-index: 2; text-shadow: 0 1px 1px rgba(0, 0, 0, .3); }
.day .bar .lbl.from-left { left: 4px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .8rem; color: var(--muted); margin: 12px 0 4px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 16px; height: 11px; border-radius: 3px; display: inline-block; }
.pickbar { position: sticky; top: calc(56px + env(safe-area-inset-top)); z-index: 9; background: var(--accent); color: var(--accent-ink); border-radius: 14px; padding: 10px 12px;
  display: flex; align-items: center; gap: 10px; font-weight: 650; margin-bottom: 10px; box-shadow: var(--shadow); }
.pickbar button { margin-left: auto; }
.daylist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.daylist li { display: flex; gap: 10px; align-items: baseline; }
.daylist .d { flex: none; width: 108px; font-weight: 700; font-size: .9rem; }

/* ---------- Buchung ---------- */
.status-head { border-radius: 18px; padding: 14px 16px; display: flex; gap: 12px; align-items: center; }
.status-head .si { font-size: 1.9rem; }
.status-head b { display: block; font-size: 1.1rem; }
.status-head.bestaetigt { background: var(--ok-soft); color: var(--ok); }
.status-head.offen { background: var(--wait-soft); color: var(--wait); }
.status-head.einwand { background: var(--obj-soft); color: var(--obj); }
.status-head.storniert { background: var(--bg-2); color: var(--muted); }
.status-head span { color: var(--text); font-size: .9rem; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.fact { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 9px 6px; text-align: center; }
.fact b { display: block; font-size: 1.05rem; }
.fact span { font-size: .75rem; color: var(--muted); font-weight: 600; }
.votes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.votes li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid var(--line); }
.votes li:last-child { border-bottom: 0; }
.votes .vi { font-size: 1.2rem; width: 26px; text-align: center; }
.votes .c { font-size: .88rem; color: var(--muted); }
.vote-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.thread { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.thread li.msg { background: var(--card); border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; padding: 9px 13px; max-width: 88%; align-self: flex-start; }
.thread li.msg.me { background: var(--accent-soft); border-color: transparent; border-radius: 16px 16px 4px 16px; align-self: flex-end; }
.thread li.sys { font-size: .82rem; color: var(--muted); text-align: center; padding: 2px 10px; }
.thread .who { font-size: .78rem; color: var(--muted); font-weight: 650; }
.thread p { white-space: pre-line; }
.countdown { font-variant-numeric: tabular-nums; }

/* ---------- Infos ---------- */
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.cat { display: flex; flex-direction: column; gap: 3px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; text-decoration: none; color: var(--text); box-shadow: var(--shadow); min-height: 118px; }
.cat .ci { font-size: 1.9rem; line-height: 1.2; }
.cat b { line-height: 1.25; }
.cat span { font-size: .8rem; color: var(--muted); }
.cat .cnt { margin-top: auto; font-weight: 700; color: var(--accent); }
.glist { display: flex; flex-direction: column; gap: 10px; }
.gitem { display: flex; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 10px; text-decoration: none; color: var(--text); box-shadow: var(--shadow); }
.gitem .th { flex: none; width: 64px; height: 64px; border-radius: 12px; background: var(--bg-2) center / cover no-repeat; display: grid; place-items: center; font-size: 1.6rem; }
.gitem .t { font-weight: 700; }
.gitem .p { font-size: .84rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.guide-body { display: flex; flex-direction: column; gap: 10px; }
.guide-body h3 { font-size: 1.08rem; margin-top: 8px; color: var(--accent); }
.guide-body ul { margin: 0; padding-left: 22px; }
.guide-body ol { list-style: none; margin: 0; padding: 0; counter-reset: st; display: flex; flex-direction: column; gap: 8px; }
.guide-body ol li { counter-increment: st; display: flex; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 11px 13px; }
.guide-body ol li::before { content: counter(st); flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 800; display: grid; place-items: center; font-size: .88rem; }
.guide-body .todo-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; }
.guide-body .todo-list label { display: flex; gap: 12px; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.guide-body .todo-list input:checked + span { text-decoration: line-through; opacity: .5; }
.guide-body .warn { background: var(--obj-soft); border-radius: 14px; padding: 11px 13px; }
.guide-body .tip { background: var(--wait-soft); border-radius: 14px; padding: 11px 13px; }
.gphotos { display: flex; flex-direction: column; gap: 14px; }
.gphoto { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.gphoto img { display: block; width: 100%; max-height: 70vh; object-fit: cover; cursor: zoom-in; background: var(--bg-2); }
.gphoto .cap { padding: 10px 13px; white-space: pre-line; }
.gphoto .tools { display: flex; gap: 6px; padding: 0 10px 10px; flex-wrap: wrap; }
.fmt-help { font-size: .8rem; color: var(--muted); background: var(--bg-2); border-radius: 12px; padding: 9px 12px; line-height: 1.6; }
.fmt-help code { background: var(--card); padding: 1px 5px; border-radius: 5px; }

/* ---------- Hüttenbuch ---------- */
.feed { display: flex; flex-direction: column; gap: 14px; }
.post { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); text-decoration: none; color: var(--text); display: block; }
.mosaic { display: grid; gap: 2px; grid-template-columns: 1fr 1fr; background: var(--line); }
.mosaic div { background: var(--bg-2) center / cover no-repeat; aspect-ratio: 4 / 3; position: relative; }
.mosaic.n1 { grid-template-columns: 1fr; }
.mosaic.n1 div { aspect-ratio: 16 / 10; }
.mosaic.n3 div:first-child { grid-column: span 2; aspect-ratio: 16 / 9; }
.mosaic .more { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .45); color: #fff; font-size: 1.5rem; font-weight: 800; }
.post .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 5px; }
.post .t { font-weight: 750; font-size: 1.08rem; }
.post .ex { color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.post .meta { display: flex; gap: 12px; font-size: .84rem; color: var(--muted); align-items: center; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; margin: 0 -16px; }
.gallery button { aspect-ratio: 1; border: 0; padding: 0; background: var(--bg-2) center / cover no-repeat; cursor: zoom-in; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px; }
.pgrid .ph { position: relative; aspect-ratio: 1; border-radius: 12px; background: var(--bg-2) center / cover no-repeat; border: 0; cursor: zoom-in; padding: 0; }
.pgrid .ph .x { position: absolute; top: 4px; right: 4px; width: 30px; height: 30px; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; border: 0; font-size: .9rem; cursor: pointer; }
.book-entry { background: var(--wood-soft); border-radius: 20px; padding: 18px; font-family: Georgia, "Times New Roman", serif; font-size: 1.08rem; line-height: 1.6; white-space: pre-line; position: relative; }
.book-entry::before { content: "❝"; position: absolute; top: -6px; left: 10px; font-size: 2.6rem; color: var(--wood); opacity: .4; }
.likes { display: flex; align-items: center; gap: 10px; }
.like-btn { border: 1.5px solid var(--line); background: var(--card); border-radius: 999px; padding: 8px 15px; font: inherit; font-weight: 700; cursor: pointer; color: var(--text); min-height: 44px; }
.like-btn.on { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
.comments { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.comments li { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 10px 13px; }
.comments .who { font-size: .82rem; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.comments .who button { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: .82rem; padding: 4px; }
.comments p { margin: 2px 0 0; white-space: pre-line; }
.upload { position: relative; border: 2px dashed var(--line); border-radius: var(--radius); padding: 18px; text-align: center; color: var(--muted); font-weight: 650; cursor: pointer; background: var(--card); }
.upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.upload span { display: block; font-size: 2rem; }
.progress { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .2s; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(0, 0, 0, .94); display: flex; flex-direction: column; color: #fff; touch-action: pan-y; }
.lightbox .lb-top { display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 12px 8px; }
.lightbox .lb-top span { flex: 1; font-size: .9rem; opacity: .8; }
.lightbox .icon-btn { background: rgba(255, 255, 255, .15); color: #fff; }
.lightbox .lb-img { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; position: relative; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox .nav { position: absolute; top: 50%; transform: translateY(-50%); }
.lightbox .nav.prev { left: 10px; }
.lightbox .nav.next { right: 10px; }
.lightbox .lb-cap { padding: 10px 16px calc(14px + env(safe-area-inset-bottom)); text-align: center; white-space: pre-line; }
.lightbox .lb-cap a { color: #9fe0bb; }

/* ---------- Dialog, Toast, Menü ---------- */
dialog { border: 0; border-radius: 22px; padding: 0; width: min(520px, calc(100vw - 24px)); max-height: calc(100dvh - 40px); background: var(--card); color: var(--text); box-shadow: 0 24px 60px rgba(0, 0, 0, .3); }
dialog::backdrop { background: rgba(10, 20, 14, .5); }
dialog .content { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
dialog footer { display: flex; gap: 8px; justify-content: flex-end; padding: 0 18px 18px; flex-wrap: wrap; }
dialog footer .btn { flex: 1; }
dialog.sheet { margin: auto auto 0; width: 100%; max-width: 640px; border-radius: 22px 22px 0 0; padding-bottom: env(safe-area-inset-bottom); }
#toast { position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 18px + env(safe-area-inset-bottom)); transform: translate(-50%, 200px); background: var(--text); color: var(--bg);
  padding: 11px 18px; border-radius: 999px; font-weight: 650; transition: transform .25s, opacity .25s; z-index: 100; max-width: calc(100vw - 32px); text-align: center; opacity: 0; }
#toast.show { transform: translate(-50%, 0); opacity: 1; }
#toast.err { background: var(--danger); color: #fff; }
.menu { list-style: none; margin: 0; padding: 0; }
.menu a, .menu button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 4px; border: 0; border-bottom: 1px solid var(--line); background: none;
  color: var(--text); font: inherit; text-decoration: none; text-align: left; cursor: pointer; }
.menu li:last-child a, .menu li:last-child button { border-bottom: 0; }
.menu .mi { font-size: 1.3rem; width: 30px; text-align: center; flex: none; }
.results { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.results button { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; padding: 11px 13px; cursor: pointer; }
.results li:last-child button { border-bottom: 0; }
.copyrow { display: flex; gap: 8px; }
.copyrow input { flex: 1; min-width: 0; font-size: 16px; }

/* ---------- Hilfe ---------- */
.help-nav { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.help-nav a { display: flex; gap: 8px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 11px 12px; text-decoration: none; color: var(--text); font-weight: 650; font-size: .92rem; }
.help-nav a.on { border-color: var(--accent); color: var(--accent); }
.help { display: flex; flex-direction: column; gap: 12px; }
.help h2 { margin-top: 6px; }
.help p { line-height: 1.6; }
.help ol.hsteps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.help ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 4px; }
.help-tip { background: var(--wait-soft); border-radius: 14px; padding: 11px 13px; }
.help-note { background: var(--obj-soft); border-radius: 14px; padding: 11px 13px; }
.help-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.help-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.help-card .n { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; }
.help-link { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--bg-2); color: var(--muted); font-size: .85rem; font-weight: 800; text-decoration: none; vertical-align: middle; }

@media (min-width: 760px) {
  .day { min-height: 96px; padding: 5px 7px; }
  .day .hn { font-size: .68rem; }
  .day .bar .lbl { font-size: .72rem; }
  .gallery { grid-template-columns: repeat(5, 1fr); margin: 0; gap: 6px; }
  .gallery button { border-radius: 10px; }
  .feed { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
  .layout-2 { display: grid; grid-template-columns: 3fr 2fr; gap: 20px; align-items: start; }
}
@media (max-width: 380px) {
  .day { min-height: 64px; padding: 2px 3px; }
  .day .hn { display: none; }
  .facts .fact b { font-size: .95rem; }
}

/* ---------- Auswertung ---------- */
/* Arten der Nächte: eine Farbe (Tannengrün), hell = normal → dunkel = sehr begehrt */
:root { --k-normal: #c9e0d1; --k-we: #86bf9c; --k-lwe: #3f8a60; --k-ferien: #1f4a35; --k-share: #2f6b4f; }
@media (prefers-color-scheme: dark) { :root { --k-normal: #2b4637; --k-we: #3f7556; --k-lwe: #66a883; --k-ferien: #a9dcbd; --k-share: #7cc49b; } }
.k-normal { background: var(--k-normal); } .k-we { background: var(--k-we); } .k-lwe { background: var(--k-lwe); } .k-ferien { background: var(--k-ferien); } .k-share { background: var(--k-share); }
.filters { display: flex; flex-direction: column; gap: 8px; }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.tile span { font-size: .8rem; color: var(--muted); font-weight: 650; }
.tile b { font-size: 1.7rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.tile small { font-size: .78rem; color: var(--muted); }
.hbars { display: flex; flex-direction: column; gap: 12px; }
.hrow { display: grid; grid-template-columns: 1fr; gap: 4px; }
.hname { font-weight: 650; font-size: .92rem; }
.hbar { position: relative; display: flex; gap: 2px; align-items: center; height: 22px; padding-right: 46px; }
.hbar i { display: block; height: 100%; min-width: 3px; cursor: pointer; }
.hbar i:last-of-type { border-radius: 0 4px 4px 0; }
.hbar .hval { position: absolute; right: 0; font-size: .85rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.hbar .fair { position: absolute; top: -3px; bottom: -3px; width: 0; border-left: 2px dashed var(--text); opacity: .6; cursor: pointer; padding-left: 6px; margin-left: -1px; }
.htag { min-height: 0; }
.tablewrap { overflow-x: auto; margin: 0 -16px; padding: 0 16px; }
.tbl { border-collapse: collapse; width: 100%; font-size: .86rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl th, .tbl td { padding: 7px 8px; text-align: right; border-bottom: 1px solid var(--line); }
.tbl th:first-child, .tbl td:first-child { text-align: left; white-space: normal; min-width: 120px; }
.tbl th { color: var(--muted); font-size: .76rem; font-weight: 750; }
.tbl tfoot td { font-weight: 800; border-bottom: 0; }
.plist { list-style: none; margin: 0; padding: 0; }
.plist li { padding: 9px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.plist li:last-child { border-bottom: 0; }
.plist li.past { opacity: .7; }
.plist .top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.plist .occ { font-size: .82rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tip { position: fixed; z-index: 90; display: none; background: var(--text); color: var(--bg); font-size: .82rem; font-weight: 650; padding: 6px 10px; border-radius: 9px; pointer-events: none; max-width: 260px; box-shadow: var(--shadow); }
@media (min-width: 760px) {
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .hrow { grid-template-columns: 220px 1fr 120px; align-items: center; gap: 12px; }
  .filters { flex-direction: row; justify-content: space-between; }
  .filters .seg { min-width: 360px; }
}

/* Easter Egg: leise Spruchzeile ganz oben */
.spruch { max-width: 1000px; margin: 0 auto; padding: 3px 16px 0; font-size: .72rem; line-height: 1.35; color: var(--muted); font-style: italic; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; opacity: .85; user-select: none; }
.spruch::before { content: "😄 "; font-style: normal; }
.spruch.open { white-space: normal; }
body.bare .spruch { display: none; }
