:root {
  --plum: #64223C;
  --plum-2: #7E3A55;
  --plum-soft: #F2EAE7;
  --cream: #F8F4EE;
  --sand: #E7DDD2;
  --sage: #A8B59D;
  --sage-light: #DDE4D6;
  --sage-dark: #6F7D64;
  --ink: #2E1E25;
  --muted: #74656B;
  --card: #FFFFFF;
  --danger: #A23B3B;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(100, 34, 60, .06), 0 6px 18px rgba(100, 34, 60, .06);
  --font: 'Wix Madefor Text', 'Segoe UI', system-ui, sans-serif;
  --font-display: 'Wix Madefor Display', 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  accent-color: var(--plum);
}
#app { max-width: 640px; margin: 0 auto; padding: 20px 16px 110px; }
h1, h2, h3 { font-family: var(--font-display); color: var(--plum); margin: 0; line-height: 1.2; }
h1 { font-size: 28px; }
h2 { font-size: 19px; margin-bottom: 10px; }
h3 { font-size: 16px; }
p { margin: 0 0 10px; }
a { color: var(--plum); }
small, .muted { color: var(--muted); }
[hidden] { display: none !important; }

/* Kopf */
.top { display: flex; justify-content: space-between; align-items: flex-end; margin: 4px 0 18px; gap: 12px; }
.top .date { color: var(--sage-dark); font-weight: 600; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.brand { font-family: var(--font-display); font-weight: 700; color: var(--plum); }

/* Karten */
.card { background: var(--card); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin-bottom: 14px; }
.card.soft { background: var(--plum-soft); box-shadow: none; }
.card.sage { background: var(--sage-light); box-shadow: none; }
.card.plum { background: var(--plum); color: var(--cream); }
.card.plum h2, .card.plum h3 { color: var(--cream); }
.card-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.kicker { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--sage-dark); margin-bottom: 4px; }
.card.plum .kicker { color: var(--sand); }

/* Listen */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-top: 1px solid var(--sand); }
.list li:first-child { border-top: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .title { font-weight: 500; overflow-wrap: break-word; hyphens: auto; }
.list li.done .title { text-decoration: line-through; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.chip { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--cream); color: var(--muted); border: 1px solid var(--sand); }
.chip.arbeit { background: #EEE6F0; border-color: #DCCBE0; color: #5A3B66; }
.chip.familie { background: #F6E9E1; border-color: #EBD3C3; color: #7A4A2E; }
.chip.ich { background: var(--sage-light); border-color: #C8D2BF; color: #4C5944; }
.chip.warn { background: #F7E3E3; border-color: #EBC5C5; color: var(--danger); }
.chip.prio { background: var(--plum); border-color: var(--plum); color: var(--cream); }

.check { appearance: none; width: 22px; height: 22px; border: 2px solid var(--sage); border-radius: 50%; margin: 2px 0 0; cursor: pointer; flex: none; background: #fff; }
.check:checked { background: var(--sage) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12l4 4 8-8' fill='none' stroke='white' stroke-width='3'/%3E%3C/svg%3E") center/16px no-repeat; }

/* Buttons und Formulare */
.btn { font: inherit; font-weight: 600; border: 0; border-radius: 999px; padding: 11px 18px; cursor: pointer; background: var(--plum); color: var(--cream); }
.btn:hover { background: var(--plum-2); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.small { padding: 6px 12px; font-size: 14px; }
.btn.ghost { background: transparent; color: var(--plum); border: 1.5px solid var(--plum); }
.btn.ghost:hover { background: var(--plum-soft); }
.btn.sage { background: var(--sage-dark); }
.btn.light { background: var(--cream); color: var(--plum); }
.btn.block { width: 100%; }
.btn.danger { background: var(--danger); }
.icon-btn { font: inherit; background: none; border: 0; color: var(--muted); cursor: pointer; padding: 4px 6px; border-radius: 8px; }
.icon-btn:hover { background: var(--cream); color: var(--plum); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.center { justify-content: center; }
.row.end { justify-content: flex-end; }
.stack > * + * { margin-top: 10px; }
label { display: block; font-size: 14px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
input, select, textarea {
  font: inherit; width: 100%; padding: 11px 12px; border: 1.5px solid var(--sand); border-radius: 12px; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus, .btn:focus-visible, .check:focus-visible { outline: 2px solid var(--sage-dark); outline-offset: 2px; }
textarea { resize: vertical; min-height: 140px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Fotos von pranaloha-yoga.ch */
.photo-card { overflow: hidden; }
.photo-card > img { display: block; width: calc(100% + 32px); margin: -16px -16px 14px; height: auto; aspect-ratio: auto; object-fit: cover; }
.empty-img { display: block; width: 100%; max-width: 360px; height: auto; margin: 0 auto 12px; border-radius: 12px; opacity: .9; }

/* Anmeldung */
.auth { min-height: 85vh; display: flex; flex-direction: column; justify-content: center; }
.auth .hero { width: 100%; height: auto; max-height: 260px; object-fit: cover; border-radius: var(--radius); margin-bottom: 20px; box-shadow: var(--shadow); }
.auth h1 { font-size: 34px; margin-bottom: 6px; }
.auth .claim { color: var(--plum-2); font-size: 18px; margin-bottom: 24px; }
.error { color: var(--danger); font-size: 14px; min-height: 20px; }

/* Woche */
.day { display: grid; grid-template-columns: 92px 1fr; gap: 10px; padding: 12px 0; border-top: 1px solid var(--sand); }
.day:first-of-type { border-top: 0; }
.day .wd { font-weight: 600; }
.day.today .wd { color: var(--plum); }
.load { height: 6px; border-radius: 3px; background: var(--sand); overflow: hidden; margin-top: 6px; }
.load > span { display: block; height: 100%; background: var(--sage); }
.load.voll > span { background: var(--plum); }
.day .ev { font-size: 14px; color: var(--muted); }
.day .note { font-size: 14px; color: var(--plum-2); font-style: italic; margin-top: 4px; }
.prio-item { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid rgba(248, 244, 238, .2); }
.prio-item:first-child { border-top: 0; }
.prio-num { font-family: var(--font-display); font-weight: 700; font-size: 22px; color: var(--sand); width: 22px; flex: none; }

/* Inbox */
.mic { width: 48px; height: 48px; border-radius: 50%; padding: 0; font-size: 20px; }
.mic.on { background: var(--danger); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 10px rgba(162, 59, 59, .15); } }

/* Navigation */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around; align-items: center;
  background: #fff; border-top: 1px solid var(--sand); padding: 6px 8px calc(8px + env(safe-area-inset-bottom)); z-index: 10;
}
.nav a { display: flex; flex-direction: column; align-items: center; font-size: 12px; color: var(--muted); text-decoration: none; padding: 4px 10px; border-radius: 12px; min-width: 56px; }
.nav a .ico { font-size: 20px; line-height: 1.2; }
.nav a.active { color: var(--plum); font-weight: 600; }
.nav a.nav-main { background: var(--plum); color: var(--cream); width: 54px; height: 54px; border-radius: 50%; justify-content: center; margin-top: -26px; box-shadow: 0 6px 16px rgba(100, 34, 60, .3); min-width: 0; }
.nav a.nav-main .ico { font-size: 28px; }

/* Atempause */
.breath { position: fixed; inset: 0; background: linear-gradient(160deg, rgba(100, 34, 60, .82), rgba(62, 20, 38, .92)), url('/img/breath.webp') center / cover no-repeat, var(--plum); z-index: 50; display: flex; align-items: center; justify-content: center; color: var(--cream); }
.breath-inner { text-align: center; padding: 24px; max-width: 420px; }
.breath-kicker { letter-spacing: .12em; text-transform: uppercase; font-size: 13px; color: var(--sage); }
.breath-circle {
  width: 200px; height: 200px; margin: 28px auto; border-radius: 50%; background: rgba(168, 181, 157, .25); border: 2px solid var(--sage);
  display: flex; align-items: center; justify-content: center; transform: scale(.7); transition: transform 4s ease-in-out;
}
.breath-circle.big { transform: scale(1); }
.breath-circle span { font-family: var(--font-display); font-size: 22px; }
.breath-hint { color: var(--sand); min-height: 48px; }
.ghost-light { background: transparent; border: 1.5px solid var(--sand); color: var(--cream); }
.ghost-light:hover { background: rgba(255, 255, 255, .08); }
.link-light { background: none; border: 0; color: var(--sand); margin-top: 22px; font: inherit; text-decoration: underline; cursor: pointer; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%); background: var(--ink); color: var(--cream); padding: 10px 16px; border-radius: 999px; font-size: 14px; z-index: 60; max-width: calc(100% - 32px); }

.empty { text-align: center; color: var(--muted); padding: 18px 8px; }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }
details summary { cursor: pointer; color: var(--plum); font-weight: 600; }
.badge { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--sage-light); color: var(--sage-dark); }

@media (prefers-reduced-motion: reduce) {
  .breath-circle { transition: none; }
  .mic.on, .spinner { animation: none; }
}

/* Rechtliche Links */
.legal { gap: 18px; margin-top: 8px; font-size: 13px; }
.legal a { color: var(--muted); }
.legal-page { padding-bottom: 40px; }
.legal-page h1 { margin: 10px 0 16px; }
.legal-page h2 { margin-top: 22px; }
.legal-page ul { padding-left: 20px; }
