/* Producer-Cockpit – Designsprache Phuong (Mastermind, 04 Wissen/Designsprache Phuong.md):
   helle Flächen mit Pastell-Licht, Haarlinien statt Kästen, ein Tiefenmittel pro Element, Bernstein als Akzent. */

@font-face { font-family: "Jost"; src: url("fonts/jost.woff2") format("woff2"); font-weight: 300 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter.woff2") format("woff2"); font-weight: 400 500; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("fonts/cormorant-italic.woff") format("woff"); font-style: italic; font-weight: 400; font-display: swap; }

:root {
  --grund: #F7F7F5; --tinte: #1C1D1F; --text: #33373C; --leise: #4A4E54; --grau: #5F6368; --label: #62666C;
  --linie: rgba(20,22,26,.08); --linie-stark: rgba(20,22,26,.12);
  --bernstein: #f2a93b; --bernstein-dunkel: #8A5A0B; --rot: #B4534A; --rot-text: #8E3A33; --gruen: #2F7D5B; --gruen-text: #2F6B50;
  --reise: rgba(200,192,255,.30); --reise-leise: rgba(200,192,255,.10); --ferien: rgba(170,222,200,.25);
  --schatten: 0 40px 90px -44px rgba(24,26,30,.22);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--tinte); font: 14px/1.5 Inter, system-ui, sans-serif;
  background: radial-gradient(1400px 700px at 40% -200px, rgba(222,218,250,.45), rgba(222,218,250,0) 70%),
              radial-gradient(900px 500px at 90% 200px, rgba(253,232,214,.40), rgba(253,232,214,0) 70%), var(--grund);
  background-repeat: no-repeat; background-color: var(--grund); min-height: 100vh;
}
a { color: var(--tinte); }
a:hover { color: var(--grau); }
button { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }

.lbl { font-family: Jost, sans-serif; font-size: 11px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--label); }
.kicker { font-family: Jost, sans-serif; font-size: 11px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--label); margin-bottom: 5px; }
.rot { color: var(--rot-text); }
.h { font-size: 17px; font-weight: 500; line-height: 1.35; }
.p { font-size: 14px; line-height: 1.55; color: var(--leise); margin-top: 6px; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex-shrink: 0; background: var(--tinte); }
.dot.rot { background: var(--rot); } .dot.grau { background: #9AA0A6; } .dot.bernstein { background: var(--bernstein); } .dot.gruen { background: var(--gruen); }
.btn { font-size: 13px; font-weight: 500; padding: 10px 18px; min-height: 40px; border-radius: 999px; border: 1px solid rgba(20,22,26,.14); background: #fff; cursor: pointer; white-space: nowrap; }
.btn.primaer { background: var(--bernstein); border-color: var(--bernstein); }
.btn:focus-visible, a:focus-visible, .tag-knopf:focus-visible, .klapp-kopf:focus-visible { outline: 2px solid var(--tinte); outline-offset: 2px; }
.leer { color: var(--grau); font-size: 13px; padding: 10px 0; }
.kopfzeile { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.quelle { font-size: 12px; color: var(--label); }
.link-knopf { font: inherit; color: var(--tinte); background: none; border: none; padding: 6px 0 6px 10px; cursor: pointer; text-decoration: underline; text-decoration-color: var(--bernstein); text-underline-offset: 3px; }
.link-knopf:disabled { color: var(--label); text-decoration: none; cursor: default; }

/* --- Rahmen: 2/3 Hauptbereich, 1/3 Seitenleiste --- */
.seiten { max-width: 1360px; margin: 0 auto; padding: 40px 24px 112px; display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.haupt { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 40px; }
.leiste { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 36px; padding-top: 8px; }
.fuss { max-width: 1360px; margin: -80px auto 0; padding: 0 24px 40px; font-size: 12px; color: var(--label); display: flex; gap: 16px; flex-wrap: wrap; }

/* --- Bühne --- */
.buehne { position: relative; overflow: hidden; border-radius: 28px; padding: 30px 40px; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 32px 48px;
  background: radial-gradient(240px 240px at 84% 78%, rgba(255,214,170,.95), rgba(255,214,170,0) 70%),
              radial-gradient(900px 260px at 50% 100%, rgba(255,226,206,.85), rgba(255,226,206,0) 75%),
              linear-gradient(180deg, #E4E2FA 0%, #EEE9F6 45%, #FBEDE3 85%, #FDF3EA 100%); }
.buehne .links { flex: 999 1 380px; display: flex; flex-direction: column; gap: 12px; }
.buehne h1 { font-family: Jost, sans-serif; font-weight: 300; font-size: 40px; line-height: 1.06; letter-spacing: -.02em; }
.buehne .gruss { font-size: 16px; line-height: 1.55; color: var(--text); max-width: 560px; }
.buehne .gruss strong { font-weight: 500; color: var(--tinte); }
.buehne figure { flex: 1 1 260px; margin: 0; border-left: 1px solid rgba(20,22,26,.14); padding-left: 24px; }
.buehne blockquote { margin: 0; font-family: "Cormorant Garamond", Georgia, serif; font-style: italic; font-size: 23px; line-height: 1.3; color: #26292D; }
.buehne figcaption { margin-top: 8px; font-size: 12px; color: var(--text); }
.buehne .affirmation { margin-top: 14px; font-size: 14px; line-height: 1.5; color: var(--text); }

/* --- Wochenboard --- */
.woche-spalten { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.tag { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.tag.vorbei { opacity: .5; }
.ev + .karte, .tag-kopf + .karte { margin-top: 4px; }
.tag-kopf { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 8px; border-bottom: 1px solid var(--linie-stark); }
.tag.heute .tag-kopf { border-bottom: 2px solid var(--bernstein); }
.tag.heute .tag-kopf .lbl { color: var(--tinte); }
.tag-kopf .zahl { font-size: 12px; color: var(--label); }
.karte { background: rgba(255,255,255,.72); border: 1px solid var(--linie); border-radius: 12px; padding: 10px 12px; }
.karte .t { font-size: 13px; font-weight: 500; line-height: 1.35; overflow-wrap: anywhere; }
.karte .s { font-size: 12px; color: var(--grau); line-height: 1.4; margin-top: 2px; }
.karte.erledigt .t { text-decoration: line-through; color: var(--grau); }
.ev { font-size: 12px; line-height: 1.4; padding: 2px 0 2px 10px; margin-top: -2px; border-left: 2px solid var(--tinte); }
.ev.rot { border-left-color: var(--rot); color: var(--rot-text); }
.ev.bernstein { border-left-color: var(--bernstein); }
.tage-knoepfe { display: none; }

/* --- Zeitachse --- */
.achse-rahmen { overflow-x: auto; }
.achse { display: grid; grid-template-columns: 112px repeat(28, minmax(0, 1fr)); min-width: 820px; }
.achse .wk { border-left: 1px solid rgba(20,22,26,.10); }
.achse .linie { grid-column: 1 / -1; border-top: 1px solid rgba(20,22,26,.07); }
.achse .zeile { grid-column: 1; font-size: 13px; color: var(--tinte); font-weight: 500; align-self: center; padding-right: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.achse .band { background: var(--reise-leise); border-radius: 10px; }
.achse .heute-linie { justify-self: center; width: 2px; background: var(--bernstein); border-radius: 2px; position: relative; z-index: 5; }
.achse .m { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--tinte); white-space: nowrap; align-self: center; justify-self: start; padding: 2px 6px 2px 9px; background: var(--grund); position: relative; z-index: 2; }
.achse .m .dot { width: 8px; height: 8px; }
.achse .m.offen .dot { background: #fff; box-shadow: inset 0 0 0 1.5px var(--tinte); }
.achse .m.konflikt { color: var(--rot-text); }
.achse .m.konflikt .dot { background: var(--rot); }
.achse .bar { align-self: center; height: 24px; font-size: 13px; border-radius: 999px; display: flex; align-items: center; padding: 0 10px; font-size: 12px; white-space: nowrap; overflow: hidden;
  position: relative; z-index: 2; box-shadow: inset 0 0 0 1px rgba(20,22,26,.22); background: #fff; margin: 0 2px; }
.achse .bar.konflikt { box-shadow: inset 0 0 0 1px var(--rot); color: var(--rot-text); }
.achse-liste { display: none; }

/* --- Heute wichtig --- */
.heute-karte { background: #fff; border-radius: 24px; padding: 30px 36px 14px; box-shadow: var(--schatten); scroll-margin-top: 24px; }
.aufgabe { display: flex; gap: 20px; align-items: flex-start; padding: 22px 0; border-top: 1px solid var(--linie); }
.aufgabe:first-child { border-top: none; }
.aufgabe > .dot { margin-top: 30px; }
.aufgabe .btn { margin-top: 22px; }

/* --- Finanzen --- */
.finanzen { border-top: 1px solid var(--linie-stark); border-bottom: 1px solid var(--linie-stark); padding: 22px 0; }
.finanz-kopf { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.finanz-kopf .wer { flex: 1; min-width: 200px; }
.finanz-kopf .wer .p { font-size: 13px; margin-top: 3px; }
.finanz-einrichten { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-top: 16px; }
.finanz-einrichten[hidden] { display: none; }
.finanz-einrichten label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--leise); flex: 1 1 220px; }
.finanz-einrichten input { font: inherit; font-size: 16px; padding: 10px 14px; border-radius: 12px; border: 1px solid rgba(20,22,26,.18); }
.karte.frist { border-left: 2px solid var(--tinte); }
.summen { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-top: 24px; }
.summen > div { padding: 4px 20px; border-left: 1px solid var(--linie); }
.summen > div:first-child { padding-left: 0; border-left: none; }
.summen .zahl { font-family: Jost, sans-serif; font-weight: 300; font-size: 34px; margin-top: 8px; }
.summen .zahl span { font-size: 16px; color: var(--label); }
.finanz-gruppen { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 28px 44px; margin-top: 28px; }
.fr { display: flex; gap: 12px; align-items: baseline; padding: 11px 0; border-top: 1px solid var(--linie); font-size: 14px; }
.fr .x { flex: 1; min-width: 0; }
.fr .x span { display: block; font-size: 12px; color: var(--grau); margin-top: 2px; }
.n { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }

/* --- KI-Werkstatt --- */
.ki-spalten { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px 36px; }
.si { padding: 11px 0; border-top: 1px solid var(--linie); }
.si .h { font-size: 14px; }
.si .p { font-size: 13px; margin-top: 2px; line-height: 1.45; }
.si.mit-punkt { display: flex; gap: 10px; align-items: baseline; }

/* --- Seitenleiste --- */
.monat { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); row-gap: 4px; text-align: center; }
.monat .wd { font-size: 10px; padding-bottom: 6px; }
.monat .zelle { height: 38px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 13px; font-variant-numeric: tabular-nums; }
.monat .zelle.reise { background: var(--reise); } .monat .zelle.ferien { background: var(--ferien); }
.monat .zelle.anfang { border-radius: 10px 0 0 10px; } .monat .zelle.ende { border-radius: 0 10px 10px 0; } .monat .zelle.anfang.ende { border-radius: 10px; }
.monat .zahl { width: 26px; height: 26px; line-height: 26px; border-radius: 50%; }
.monat .zelle.aussen .zahl { color: #9A9EA3; }
.monat .zelle.heute .zahl { background: var(--bernstein); font-weight: 500; }
.monat .mark { width: 4px; height: 4px; border-radius: 50%; }
.legende { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 12px; font-size: 11px; color: var(--label); }
.legende span { display: flex; align-items: center; gap: 6px; }
.legende i { display: inline-block; }
.kurs { display: flex; align-items: baseline; gap: 10px; padding: 8px 0; border-top: 1px solid var(--linie); font-size: 13px; }
.kurs .sym { width: 44px; font-weight: 500; }
.kurs .name { flex: 1; color: var(--grau); }
.kurs .aend { width: 56px; text-align: right; font-size: 12px; color: var(--grau); font-variant-numeric: tabular-nums; }
.konflikt-zahl { font-family: Jost, sans-serif; font-size: 22px; line-height: 1; color: var(--rot-text); }

.klapp-kopf { display: none; }

/* --- iPhone: eigene Reihenfolge, Rest aufklappbar --- */
@media (max-width: 760px) {
  /* Abstände über margin statt gap, damit die Aufklapp-Zeilen bündig untereinander stehen */
  .seiten { padding: 16px 16px 64px; gap: 0; flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
  .buehne, .heute-karte, .woche { margin-bottom: 28px; }
  .konflikte { margin-bottom: 20px; }
  .haupt, .leiste { display: contents; }
  .buehne { order: 1; padding: 26px 22px 22px; border-radius: 24px; gap: 18px; }
  .buehne h1 { font-size: 32px; }
  .buehne .gruss { font-size: 15px; }
  .buehne figure { border-left: none; border-top: 1px solid rgba(20,22,26,.14); padding: 14px 0 0; }
  .buehne blockquote { font-size: 20px; }
  .heute-karte { order: 2; padding: 20px 20px 8px; border-radius: 22px; }
  .aufgabe { flex-direction: column; gap: 4px; padding: 16px 0; }
  .aufgabe > .dot { display: none; }
  .aufgabe .btn { margin-top: 10px; width: 100%; min-height: 44px; font-size: 14px; }
  .aufgabe:not(:first-child) .btn { display: none; }
  .woche { order: 3; }
  .konflikte { order: 4; }
  .klapp { order: 5; border-top: 1px solid rgba(20,22,26,.10); }
  .finanzen { order: 6; margin-top: 28px; border: 1px solid rgba(20,22,26,.10); border-radius: 18px; padding: 18px; }
  .fuss { margin-top: 0; }
  .klapp-kopf { display: flex; width: 100%; justify-content: space-between; align-items: center; min-height: 56px; background: none; border: 0; padding: 0; cursor: pointer; font-size: 15px; font-weight: 500; text-align: left; }
  .klapp-kopf .vorschau { font-size: 13px; color: var(--label); font-weight: 400; }
  .klapp.zu .klapp-inhalt { display: none; }
  .klapp .klapp-inhalt { padding-bottom: 16px; }
  .klapp .klapp-inhalt > .lbl:first-child, .klapp .kopfzeile .lbl { display: none; }
  .woche-spalten { display: block; }
  .tag { display: none; }
  .tag.gewaehlt { display: flex; opacity: 1; }
  .tag.gewaehlt .tag-kopf { display: none; }
  .tage-knoepfe { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-bottom: 12px; }
  .tag-knopf { min-height: 64px; border-radius: 14px; cursor: pointer; background: transparent; border: 1px solid var(--linie); padding: 6px 0; }
  .tag-knopf .w { display: block; font-family: Jost, sans-serif; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
  .tag-knopf .d { display: block; font-size: 17px; margin-top: 2px; }
  .tag-knopf .c { display: block; font-size: 11px; color: var(--label); }
  .tag-knopf.heute { border-bottom: 2px solid var(--bernstein); }
  .tag-knopf[aria-pressed="true"] { background: #fff; border-color: transparent; box-shadow: 0 12px 30px -16px rgba(24,26,30,.30); }
  .karte .t { font-size: 14px; } .karte .s { font-size: 13px; }
  .achse-rahmen { display: none; }
  .achse-liste { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
  .achse-liste div { display: flex; gap: 12px; } .achse-liste .n { width: 74px; text-align: left; color: var(--label); }
  .summen > div { border-left: none; padding: 4px 0; }
}

/* Anmeldung */
.anmelden { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.anmelden form { width: min(380px, 100%); background: #fff; border-radius: 24px; padding: 32px; box-shadow: var(--schatten); display: flex; flex-direction: column; gap: 16px; }
.anmelden h1 { font-family: Jost, sans-serif; font-weight: 300; font-size: 30px; }
.anmelden label { font-size: 13px; color: var(--leise); display: flex; flex-direction: column; gap: 6px; }
.anmelden input { font: inherit; font-size: 16px; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(20,22,26,.18); }
.anmelden .fehler { color: var(--rot-text); font-size: 13px; min-height: 18px; }

/* Finanzen beim Verlassen sofort verdecken (App-Umschalter, Vorschaubilder) */
body.verdeckt .finanz-inhalt { visibility: hidden; }
@media print { .finanzen { display: none; } }
