:root { --c: #008B29; --c2: #e7f5ea; --c3: #006b20; --ink: #23272a; --muted: #6b7075; --line: #e3e5e1; --bg: #f4f5f2; --warn: #c0392b; --amber: #e8a317; --r: 14px; }
[hidden] { display: none !important; }
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { background: var(--bg); color: var(--ink); font: 16px/1.4 'Barlow', system-ui, sans-serif; }
body { padding-bottom: calc(70px + env(safe-area-inset-bottom)); min-height: 100vh; }
a { color: var(--c3); text-decoration: none; }
#bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 8px; padding: calc(10px + env(safe-area-inset-top)) 12px 10px; background: var(--c); color: #fff; }
#bar h1 { flex: 1; font: 700 22px 'Barlow Condensed'; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#bar button { background: none; border: 0; color: #fff; font-size: 28px; width: 40px; height: 40px; border-radius: 10px; cursor: pointer; }
#bar button:active { background: rgba(255,255,255,.15); }
main { max-width: 760px; margin: 0 auto; padding: 14px 14px 30px; }
#nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 5; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: #fff; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
#nav a { display: flex; flex-direction: column; align-items: center; padding: 8px 0 7px; font-size: 12px; font-weight: 600; color: var(--muted); }
#nav a span { font-size: 20px; line-height: 1.2; }
#nav a.on { color: var(--c); }
h2 { font: 700 15px 'Barlow Condensed'; letter-spacing: .08em; text-transform: uppercase; color: var(--c); margin: 18px 2px 8px; display: flex; justify-content: space-between; align-items: baseline; }
h2 a, h2 button { font: 600 14px 'Barlow'; letter-spacing: 0; text-transform: none; }
a.card { color: var(--ink); }
.card { background: #fff; border-radius: var(--r); box-shadow: 0 1px 3px rgba(0,0,0,.06); padding: 14px; margin-bottom: 10px; }
.list .card { display: flex; gap: 12px; align-items: center; }
.list .card .grow { flex: 1; min-width: 0; }
.t { font-weight: 700; } .s { color: var(--muted); font-size: 14px; }
.ellip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 99px; background: var(--c2); color: var(--c3); margin: 2px 4px 2px 0; }
.pill.warn { background: #fdecea; color: var(--warn); } .pill.grey { background: #eef0ee; color: var(--muted); } .pill.amber { background: #fff4dc; color: #8a5d00; }
.av { width: 46px; height: 46px; border-radius: 50%; background: var(--c2); color: var(--c); display: flex; align-items: center; justify-content: center; font: 700 18px 'Barlow Condensed'; flex: none; overflow: hidden; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.when { text-align: center; min-width: 54px; flex: none; }
.when b { display: block; font: 700 22px 'Barlow Condensed'; color: var(--c); line-height: 1; }
.when small { color: var(--muted); font-size: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: 700 15px 'Barlow'; padding: 11px 16px; border-radius: 12px; border: 0; cursor: pointer; background: var(--c); color: #fff; }
.btn.sec { background: #fff; color: var(--c); box-shadow: inset 0 0 0 2px var(--c); } .btn.sm { padding: 7px 11px; font-size: 13px; border-radius: 9px; }
.btn.danger { background: #fff; color: var(--warn); box-shadow: inset 0 0 0 2px #f3c3bd; } .btn:disabled { opacity: .5; }
.row { display: flex; gap: 8px; flex-wrap: wrap; } .row.end { justify-content: flex-end; } .mt { margin-top: 10px; }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 6px; margin: 12px 0 2px; scrollbar-width: none; }
.tabs button { flex: none; border: 0; background: #fff; color: var(--muted); font: 600 14px 'Barlow'; padding: 8px 14px; border-radius: 99px; cursor: pointer; }
.tabs button.on { background: var(--c); color: #fff; }
.head { display: flex; gap: 14px; align-items: center; }
.head .av { width: 62px; height: 62px; font-size: 24px; }
.head h3 { font: 700 24px/1.05 'Barlow Condensed'; }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.quick a { background: #fff; border-radius: 12px; padding: 10px 4px; text-align: center; font-size: 12px; font-weight: 600; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.quick a span { display: block; font-size: 20px; color: var(--c); }
form .f { margin-bottom: 12px; }
label.l { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
input, select, textarea { width: 100%; font: 16px 'Barlow'; padding: 11px 12px; border: 1px solid #d3d6d1; border-radius: 10px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--c); border-color: transparent; }
textarea { min-height: 92px; resize: vertical; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips label { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 99px; background: #fff; border: 1px solid #d3d6d1; font-size: 14px; cursor: pointer; user-select: none; }
.chips input { display: none; }
.chips label:has(input:checked) { background: var(--c2); border-color: var(--c); color: var(--c3); font-weight: 600; }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; background: #fff; border: 1px solid #d3d6d1; border-radius: 10px; }
.check input { width: 22px; height: 22px; flex: none; accent-color: var(--c); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.text { white-space: pre-wrap; word-break: break-word; }
.gal { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.gal a { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #ddd; display: block; }
.gal img, .gal video { width: 100%; height: 100%; object-fit: cover; }
.gal .vid::after { content: '▶'; position: absolute; inset: auto 6px 6px auto; color: #fff; text-shadow: 0 0 4px #000; }
.prog { height: 8px; background: #e6e8e4; border-radius: 99px; overflow: hidden; margin-top: 6px; }
.prog i { display: block; height: 100%; background: var(--c); width: 0; transition: width .2s; }
.empty { text-align: center; color: var(--muted); padding: 22px 10px; }
.sum { display: flex; justify-content: space-between; font-weight: 700; }
.saldo { font: 700 20px 'Barlow Condensed'; } .saldo.neg { color: var(--warn); }
#toast { position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: #23272a; color: #fff; padding: 10px 16px; border-radius: 12px; font-weight: 600; z-index: 9; max-width: 90vw; }
.login { max-width: 400px; margin: 2vh auto 0; }
.login .hero { border-radius: 18px; overflow: hidden; box-shadow: 0 4px 18px rgba(0,0,0,.12); position: relative; }
.login .hero img { display: block; width: 100%; }
.login .hero b { position: absolute; left: 0; right: 0; top: 6%; text-align: center; font: 700 46px/1 'Barlow Condensed'; letter-spacing: .14em; color: var(--c); text-shadow: 0 1px 0 rgba(255,255,255,.6); }
.login .hero span { position: absolute; left: 0; right: 0; top: calc(6% + 50px); text-align: center; font: 600 13px 'Barlow'; letter-spacing: .08em; color: #555; }
.login form { margin-top: 14px; }
.login .brand { text-align: center; margin: 22px 0 10px; }
.login .brand img { width: 150px; }
.login .brand div { font-size: 12px; color: var(--muted); margin-top: 6px; }
body.out { padding-bottom: 20px; }
body.out #bar { display: none; }
.search { position: sticky; top: 60px; z-index: 3; padding: 0 0 8px; background: var(--bg); }

/* ---------- Barrierearm ---------- */
a:focus-visible, button:focus-visible, .chips label:has(input:focus-visible), .check:has(input:focus-visible) { outline: 3px solid #f2b632; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
.navbrand { display: none; }
#nav a { min-height: 52px; }

/* ---------- PC & Tablet ---------- */
@media (hover: hover) { a.card:hover { box-shadow: 0 3px 12px rgba(0,0,0,.1); } .btn:hover { filter: brightness(1.06); } .tabs button:hover:not(.on) { color: var(--ink); } #nav a:hover { color: var(--c); } }
@media (min-width: 900px) {
  body { padding-bottom: 0; padding-left: 230px; }
  body.out { padding-left: 0; }
  #nav { top: 0; right: auto; width: 230px; display: flex; flex-direction: column; gap: 4px; padding: 0 12px 16px; border-top: 0; border-right: 1px solid var(--line); }
  #nav[hidden] { display: none !important; }
  .navbrand { display: flex; align-items: center; gap: 10px; height: 60px; padding: 0 6px; margin-bottom: 10px; }
  .navbrand img { width: 34px; height: 34px; } .navbrand b { font: 700 24px 'Barlow Condensed'; letter-spacing: .1em; color: var(--c); }
  #nav a { flex-direction: row; justify-content: flex-start; gap: 12px; font-size: 16px; padding: 10px 14px; border-radius: 10px; min-height: 0; }
  #nav a span { width: 22px; text-align: center; }
  #nav a.on { background: var(--c2); }
  #bar { padding-left: 24px; }
  main { max-width: 1160px; padding: 22px 28px 40px; }
  .list { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 10px; }
  .list .card { margin-bottom: 0; }
  .list + .row { margin-top: 10px; }
  #fm { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; max-width: 860px; }
  #fm > .f.wide, #fm > .row, #fm > #up, #fm > datalist { grid-column: 1 / -1; }
  .quick { max-width: 560px; }
  .gal { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
  .login { margin-top: 6vh; }
  .search { top: 60px; max-width: 520px; }
}

/* ---------- Menü ---------- */
#sheet { position: fixed; top: calc(56px + env(safe-area-inset-top)); right: 10px; z-index: 20; background: #fff; border-radius: 14px; box-shadow: 0 10px 34px rgba(0,0,0,.2); min-width: 230px; padding: 6px; display: flex; flex-direction: column; }
#sheet .who { padding: 10px 12px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; } #sheet .who b { display: block; } #sheet .who span { font-size: 13px; color: var(--muted); }
#sheet a, #sheet button { text-align: left; background: none; border: 0; font: 600 15px 'Barlow'; color: var(--ink); padding: 12px; border-radius: 10px; cursor: pointer; }
#sheet a:hover, #sheet button:hover { background: var(--c2); }

/* ---------- Dashboard ---------- */
.dash { display: grid; gap: 12px; } .dash .col { display: flex; flex-direction: column; gap: 12px; min-width: 0; } .dash .col > * { margin: 0; }
.hero .date { color: var(--muted); font-weight: 600; } .hero .big { font: 700 28px 'Barlow Condensed'; color: var(--c); margin: 2px 0 8px; }
.next { background: var(--c2); border-radius: 12px; padding: 12px; } .next .t { font: 700 20px 'Barlow Condensed'; margin: 2px 0; }
.timeline { margin-top: 10px; display: flex; flex-direction: column; }
.timeline a { display: grid; grid-template-columns: 52px 1fr; column-gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--line); color: var(--ink); }
.timeline a b { color: var(--c); grid-row: span 2; } .timeline a i { font-style: normal; color: var(--muted); font-size: 13px; }
.timeline a.on { background: #fffbea; border-radius: 8px; } .timeline a.done { opacity: .55; }
#map { height: 260px; border-radius: 12px; z-index: 0; }
.pin { background: var(--c); color: #fff; border-radius: 50%; display: flex !important; align-items: center; justify-content: center; font: 700 14px 'Barlow'; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.pin.home { background: #333; font-size: 16px; }
.calhead { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; } .calhead b { font: 700 18px 'Barlow Condensed'; min-width: 120px; text-align: center; flex: 1; }
.seg { display: inline-flex; background: #eef0ee; border-radius: 10px; padding: 3px; } .seg button { border: 0; background: none; padding: 6px 10px; border-radius: 8px; font: 600 13px 'Barlow'; cursor: pointer; color: var(--muted); }
.seg button.on { background: #fff; color: var(--c); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.calgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.calgrid .wd { font-size: 12px; font-weight: 700; color: var(--muted); text-align: center; padding: 2px 0; }
.day { background: #f7f8f6; border-radius: 10px; padding: 4px; min-height: 64px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.calgrid.week .day { min-height: 140px; }
.day.out { opacity: .45; } .day.today { box-shadow: inset 0 0 0 2px var(--c); } .day.sel { background: var(--c2); }
.day .dn { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 13px; }
.day .add { width: 22px; height: 22px; border-radius: 6px; display: flex; align-items: center; justify-content: center; color: var(--c); font-weight: 700; }
.day .add:hover { background: var(--c); color: #fff; }
.ev { display: block; font-size: 11px; line-height: 1.3; background: var(--c); color: #fff; border-radius: 5px; padding: 1px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev.other { background: #e8a317; } .more { font-size: 11px; color: var(--muted); }
#daylist h2 a { font-size: 14px; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tiles div { background: #f7f8f6; border-radius: 10px; padding: 10px; } .tiles span { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.tiles b { font: 700 20px 'Barlow Condensed'; } .tiles b.neg { color: var(--warn); } .tiles small { display: block; font-size: 11px; color: var(--muted); }
.bars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; height: 140px; margin-top: 14px; align-items: end; }
.bar { display: flex; flex-direction: column; align-items: center; height: 100%; } .bar .cols { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
.bar i { width: 40%; background: var(--c); border-radius: 4px 4px 0 0; min-height: 2px; } .bar i.in { background: #7ee08f; } .bar span { font-size: 11px; color: var(--muted); margin-top: 4px; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin-top: 6px; } .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--c); margin-right: 5px; } .legend i.in { background: #7ee08f; }
@media (max-width: 560px) { .tiles { grid-template-columns: repeat(2, 1fr); } .calgrid.week { grid-template-columns: 1fr; } .calgrid.week .wd { display: none; } .calgrid.week .day { min-height: 0; } .calhead b { order: -1; flex-basis: 100%; } }
@media (min-width: 1100px) { .dash { grid-template-columns: 1fr 1.15fr; align-items: start; } }

/* ---------- Zahlen ---------- */
.zbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.zbar b { font: 700 18px 'Barlow Condensed'; min-width: 150px; text-align: center; }
.zgrid { display: grid; gap: 12px; margin-top: 12px; } .zgrid > section { margin: 0; }
.share { margin-bottom: 8px; } .share .prog { margin-top: 3px; height: 6px; }
.goal { margin-top: 12px; background: #f7f8f6; border-radius: 10px; padding: 10px; }
.goal input { width: 64px; padding: 4px 6px; font-size: 14px; display: inline-block; }
.prog.kl { height: 12px; } .prog i.warn { background: var(--amber); }
.bars.big { height: 180px; grid-template-columns: repeat(12, 1fr); gap: 5px; } .bars.wd { grid-template-columns: repeat(7, 1fr); height: 120px; } .bars.wd i { width: 60%; }
h2 span { font: 700 16px 'Barlow Condensed'; color: var(--warn); }
@media (min-width: 900px) { .zgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .zgrid > .wide { grid-column: 1 / -1; } }
@media (min-width: 1300px) { .zgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 420px) { #nav a { font-size: 11px; } }

/* ---------- Anfragen, Abschluss ---------- */
#nav a { position: relative; }
.badge { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--warn); color: #fff; font: 700 11px/18px 'Barlow'; font-style: normal; text-align: center; }
@media (min-width: 900px) { .badge { position: static; margin-left: auto; } }
.banner { display: block; background: #fff4dc; color: #6b4a00; margin-bottom: 12px; }
.todo { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; } .todo a { background: #fff4dc; color: #6b4a00; border-radius: 10px; padding: 9px 12px; font-weight: 600; }
fieldset { border: 0; min-width: 0; }
.seg.big { display: flex; flex-wrap: wrap; gap: 6px; background: none; padding: 0; }
.seg.big label { flex: 1 1 auto; text-align: center; padding: 10px 12px; border: 1.5px solid #d3d6d1; border-radius: 10px; cursor: pointer; font-weight: 600; background: #fff; }
.seg.big label:has(input:checked) { border-color: var(--c); background: var(--c2); color: var(--c3); }
.seg.big input { position: absolute; opacity: 0; pointer-events: none; }
.seg.big label:has(input:focus-visible) { outline: 3px solid #f2b632; outline-offset: 2px; }
#cal-url { font-size: 13px; }
