/* MeineMappe.de: öffentliche Seiten (Start, Preise, Anmeldung, Konto, Rechtstexte). Farben wie im Studio. */
:root {
  --hg: #f6f7f9; --flaeche: #ffffff; --flaeche-2: #f1f3f6; --rand: #e3e6eb;
  --text: #1b1f24; --text-2: #5b6470; --text-3: #8a929d;
  --akzent: #0f766e; --akzent-2: #0d9488; --akzent-hell: #e6f4f2; --akzent-text: #ffffff;
  --gut: #1a7f37; --gut-hell: #e7f6ec; --warn: #9a6700; --warn-hell: #fff6dc; --fehler: #cf222e; --fehler-hell: #ffebe9;
  --radius: 14px; --schatten: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --schrift: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --hg: #0f1115; --flaeche: #171a20; --flaeche-2: #1f232b; --rand: #2b313b;
    --text: #e8eaee; --text-2: #a7aeb9; --text-3: #7c8491;
    --akzent: #2dd4bf; --akzent-2: #14b8a6; --akzent-hell: #12332f; --akzent-text: #06201d;
    --gut: #3fb950; --gut-hell: #12261a; --warn: #d29922; --warn-hell: #2b2210; --fehler: #f85149; --fehler-hell: #2d1214;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--hg); color: var(--text); font: 16px/1.6 var(--schrift); -webkit-font-smoothing: antialiased; }
a { color: var(--akzent); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; }
.huelle { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.schmal { max-width: 560px; }

/* Kopf und Fuß */
.seitenkopf { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--hg) 85%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--rand); padding-top: env(safe-area-inset-top); }
.seitenkopf .huelle { display: flex; align-items: center; gap: 16px; height: 60px; }
.marke { display: flex; align-items: center; gap: 10px; font-weight: 750; font-size: 18px; color: var(--text); text-decoration: none; }
.marke img { width: 32px; height: 32px; }
.seitenkopf nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.seitenkopf nav a:not(.knopf) { color: var(--text-2); text-decoration: none; padding: 8px 10px; border-radius: 8px; }
@media (hover: hover) { .seitenkopf nav a:not(.knopf):hover { background: var(--flaeche-2); color: var(--text); } }
.seitenkopf form { margin: 0; }
.seitenfuss { border-top: 1px solid var(--rand); margin-top: 64px; padding: 28px 0 calc(28px + env(safe-area-inset-bottom)); color: var(--text-3); font-size: 14px; }
.seitenfuss .huelle { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.seitenfuss a { color: var(--text-2); text-decoration: none; }
.seitenfuss .abstand { flex: 1; }

/* Knöpfe und Formulare */
.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px;
  border-radius: 10px; border: 1px solid var(--rand); background: var(--flaeche); color: var(--text); font: inherit;
  font-weight: 600; text-decoration: none; cursor: pointer; }
@media (hover: hover) { .knopf:hover { border-color: var(--text-3); } }
.knopf.klein { min-height: 34px; padding: 0 12px; font-size: 14px; }
.knopf.primaer { background: var(--akzent); border-color: var(--akzent); color: var(--akzent-text); }
@media (hover: hover) { .knopf.primaer:hover { background: var(--akzent-2); } }
.knopf.gross { min-height: 52px; padding: 0 26px; font-size: 17px; }
.knopf.gefahr { color: var(--fehler); }
.knopf.leise { background: transparent; border-color: transparent; color: var(--text-2); }
.knopf:disabled { opacity: .5; cursor: not-allowed; }
label { display: block; font-weight: 600; margin: 0 0 6px; }
input[type=email], input[type=text], input[type=password] { width: 100%; min-height: 46px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--rand);
  background: var(--flaeche); color: var(--text); font: inherit; font-size: 16px; }
input:focus-visible, .knopf:focus-visible, a:focus-visible { outline: 3px solid color-mix(in srgb, var(--akzent) 45%, transparent); outline-offset: 2px; }
.formular { display: grid; gap: 14px; }
.zeile { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* Karten, Hinweise */
.karte { background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius); padding: 22px; box-shadow: var(--schatten); }
.karte h2 { margin: 0 0 6px; font-size: 20px; }
.karten { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.meldung { border-radius: 10px; padding: 12px 14px; margin: 16px 0; border: 1px solid; }
.meldung.gut { background: var(--gut-hell); border-color: color-mix(in srgb, var(--gut) 35%, transparent); }
.meldung.warn { background: var(--warn-hell); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.meldung.fehler { background: var(--fehler-hell); border-color: color-mix(in srgb, var(--fehler) 35%, transparent); }
.blass { color: var(--text-2); }
.klein { font-size: 14px; }
.pille { display: inline-block; padding: 2px 10px; border-radius: 99px; background: var(--flaeche-2); font-size: 13px; font-weight: 600; }
.pille.gut { background: var(--gut-hell); color: var(--gut); }

/* Startseite */
.held { padding: 72px 0 40px; text-align: center; }
.held h1 { font-size: clamp(34px, 6vw, 56px); margin: 0 auto 16px; max-width: 820px; letter-spacing: -0.025em; }
.held h1 em { font-style: normal; color: var(--akzent); }
.held p { font-size: clamp(17px, 2.2vw, 20px); color: var(--text-2); max-width: 680px; margin: 0 auto 28px; }
.held .zeile { justify-content: center; }
.held .unter { margin-top: 14px; font-size: 14px; color: var(--text-3); }
.abschnitt { padding: 40px 0; }
.abschnitt h2.mitte, .abschnitt .huelle > h2 { font-size: clamp(26px, 4vw, 34px); text-align: center; margin: 0 0 8px; }
.abschnitt p.einleitung { text-align: center; color: var(--text-2); max-width: 640px; margin: 0 auto 28px; }
.merkmal .symbol { width: 40px; height: 40px; border-radius: 10px; background: var(--akzent-hell); color: var(--akzent);
  display: grid; place-items: center; font-size: 20px; margin-bottom: 12px; }
.merkmal h3 { margin: 0 0 6px; font-size: 18px; }
.merkmal p { margin: 0; color: var(--text-2); }
.versprechen { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); list-style: none; padding: 0; margin: 0; }
.versprechen li { background: var(--flaeche); border: 1px solid var(--rand); border-radius: 12px; padding: 14px 16px; }
.versprechen li::before { content: "✓ "; color: var(--akzent); font-weight: 800; }

/* Preise */
.preise { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: stretch; }
.preis { display: flex; flex-direction: column; }
.preis.hervor { border: 2px solid var(--akzent); }
.preis .betrag { font-size: 40px; font-weight: 800; letter-spacing: -0.02em; margin: 6px 0 0; }
.preis .betrag small { font-size: 16px; font-weight: 500; color: var(--text-2); }
.preis ul { padding-left: 20px; margin: 14px 0 20px; flex: 1; }
.preis li { margin: 4px 0; }
details.faq { background: var(--flaeche); border: 1px solid var(--rand); border-radius: 12px; padding: 14px 18px; margin: 10px 0; }
details.faq summary { cursor: pointer; font-weight: 600; }

/* Konto */
.konto { display: grid; gap: 16px; margin-top: 24px; }
.konto table { width: 100%; border-collapse: collapse; font-size: 14px; }
.konto td, .konto th { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--rand); vertical-align: top; }
.gefahrenzone { border-color: color-mix(in srgb, var(--fehler) 40%, var(--rand)); }

/* Rechtstexte */
.rechtstext { margin-top: 24px; }
.rechtstext h1 { font-size: 30px; }
.rechtstext h2 { font-size: 21px; margin-top: 28px; }

@media (max-width: 640px) {
  .seitenkopf nav a.nur-breit { display: none; }
  .held { padding: 44px 0 24px; }
  .karte { padding: 18px; }
}

/* Testbetrieb */
.testleiste { background: var(--warn-hell); color: var(--text); text-align: center; font-size: 14px; padding: 6px 12px;
  border-bottom: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); }
.einwilligung { min-width: 0; overflow-wrap: anywhere; background: var(--flaeche-2); border: 1px solid var(--rand); border-radius: 12px; padding: 4px 16px 14px; }
.einwilligung ul { padding-left: 20px; margin: 6px 0 12px; }
.haken { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.haken > span { min-width: 0; }
.haken input { width: 20px; height: 20px; margin-top: 3px; flex: none; accent-color: var(--akzent); }

/* Feedback-Link (/f/<token>): Seiten als Bilder, Kommentare je Seite */
.mittel { max-width: 860px; }
.feedback h1 { font-size: clamp(26px, 5vw, 34px); margin: 0 0 4px; }
.fb-titel { margin: 0 0 8px; }
.fb-leiste { margin: 8px 0 20px; }
.fb-seiten { list-style: none; padding: 0; margin: 0; display: grid; gap: 28px; }
.fb-seite h2 { font-size: 18px; margin: 0 0 10px; }
.fb-seite, .fb-bereich { scroll-margin-top: 76px; }
.fb-seite img { display: block; width: 100%; height: auto; background: #fff; border: 1px solid var(--rand);
  border-radius: 6px; box-shadow: var(--schatten); }
.fb-seite .meldung { margin: 12px 0 0; }
.fb-eigene { margin-top: 12px; }
.fb-eigene h3 { font-size: 15px; margin: 0 0 6px; }
.fb-kommentar { background: var(--flaeche); border: 1px solid var(--rand); border-radius: 10px; padding: 10px 14px; margin: 0 0 8px; }
.fb-kommentar p { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.fb-schreiben { margin-top: 12px; background: var(--flaeche); border: 1px solid var(--rand); border-radius: 12px; padding: 12px 16px; }
.fb-schreiben summary { cursor: pointer; font-weight: 600; min-height: 28px; }
.fb-schreiben form { margin-top: 12px; }
.fb-schreiben small { display: block; margin-top: 4px; }
textarea { width: 100%; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--rand); background: var(--flaeche);
  color: var(--text); font: inherit; font-size: 16px; resize: vertical; }
textarea:focus-visible, summary:focus-visible { outline: 3px solid color-mix(in srgb, var(--akzent) 45%, transparent); outline-offset: 2px; }
@media (max-width: 640px) { .fb-schreiben { padding: 10px 12px; } .fb-seiten { gap: 22px; } }

/* Coach: Einladung, Coach-Bereich, Verbindungen im Konto */
.pille.info { background: var(--akzent-hell); color: var(--akzent); }
.pille.warn { background: var(--warn-hell); color: var(--warn); }
.coach-einladung h1 { font-size: clamp(24px, 5vw, 30px); margin: 4px 0 12px; }
.schritte { padding-left: 22px; }
.schritte li { margin: 6px 0; }
fieldset.umfang { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; min-width: 0; }
fieldset.umfang legend { font-weight: 600; margin-bottom: 8px; padding: 0; }
.wahl { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; margin: 0; padding: 12px 14px;
  border: 1px solid var(--rand); border-radius: 12px; background: var(--flaeche); cursor: pointer; }
.wahl:has(input:checked) { border-color: var(--akzent); background: var(--akzent-hell); }
.wahl input { width: 20px; height: 20px; margin-top: 3px; flex: none; accent-color: var(--akzent); }
.wahl > span { min-width: 0; overflow-wrap: anywhere; }
.coach-person, .coach-verbindung { border-top: 1px solid var(--rand); padding: 14px 0; }
.coach-person:first-of-type, .coach-verbindung:first-of-type { border-top: 0; padding-top: 4px; }
.coach-name { font-weight: 700; font-size: 18px; text-decoration: none; overflow-wrap: anywhere; }
.coach-beenden summary { list-style: none; }
.coach-beenden summary::-webkit-details-marker { display: none; }
.coach-beenden[open] { flex-basis: 100%; }
.coach-link input { font-family: ui-monospace, monospace; font-size: 14px; }
a.coach-bewerbung { display: block; color: var(--text); text-decoration: none; }
@media (hover: hover) { a.coach-bewerbung:hover { border-color: var(--akzent); } }
.fortschritt { height: 6px; border-radius: 99px; background: var(--flaeche-2); overflow: hidden; margin: 10px 0 6px; }
.fortschritt span { display: block; height: 100%; background: var(--akzent); }
.protokoll { margin-top: 10px; }
.protokoll summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.coach .fb-kommentar form { margin: 0 0 0 auto; }
.coach-hervor { color: var(--akzent); }

/* Schmale Handys: Kopf ohne waagerechtes Scrollen (Marke kleiner; statt „Anmelden“ + „Kostenlos starten“ – beide
   führen zu /anmelden – nur ein Knopf) */
@media (max-width: 480px) {
  .huelle { padding: 0 16px; }
  .seitenkopf .huelle { gap: 8px; }
  .marke { font-size: 16px; gap: 8px; min-width: 0; }
  .marke img { width: 28px; height: 28px; }
  .seitenkopf nav .start-knopf { display: none; }
  .seitenkopf nav a.anmelden-link { background: var(--akzent); color: var(--akzent-text); border-radius: 10px;
    padding: 8px 14px; font-weight: 600; }
  .seitenkopf nav .knopf { min-height: 38px; padding: 0 14px; }
  .held h1 { font-size: 28px; }
}
h1, h2 { overflow-wrap: break-word; hyphens: auto; }
/* Rechtstexte: breite Tabellen scrollen in sich, die Seite nicht */
.rechtstext { overflow-wrap: break-word; }
.rechtstext table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 14px; }
.rechtstext th, .rechtstext td { border: 1px solid var(--rand); padding: 6px 8px; vertical-align: top; min-width: 170px;
  hyphens: auto; }

/* ---------- Verwaltung (/admin) ---------- */
.admin .karte { margin-top: 16px; }
.admin-zahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-top: 16px; }
.admin-zahlen .karte { margin: 0; padding: 14px 16px; display: grid; gap: 2px; }
.admin-zahlen b { font-size: 24px; }
.admin-zahlen span { font-size: 13px; color: var(--text-2, #5b6470); }
.admin-funktion { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--rand); }
.admin-funktion .knopf { min-width: 118px; }
.admin td { overflow-wrap: anywhere; }
.admin-funktion:first-of-type { border-top: 0; }
.admin-einladen { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; margin-bottom: 16px; }
.admin table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin td, .admin th { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--rand); vertical-align: top; }
.admin-knoepfe { display: flex; gap: 6px; justify-content: flex-end; }
.admin-knoepfe form { margin: 0; }
.admin-qr { width: 220px; max-width: 100%; background: #fff; padding: 12px; border-radius: 10px; margin: 8px 0 14px; }
.admin-qr svg { width: 100%; height: auto; display: block; }
.admin-neu input { width: 100%; }
@media (max-width: 640px) {
  .admin-einladen { grid-template-columns: 1fr; }
  .admin-funktion .knopf { min-width: 0; padding: 0 12px; }
  /* Tabellen als untereinanderliegende Einträge – sonst wird die Seite am Handy breiter als der Bildschirm */
  .admin-liste thead { display: none; }
  .admin-liste, .admin-liste tbody, .admin-liste tr, .admin-liste td { display: block; width: 100%; }
  .admin-liste tr { padding: 10px 0; border-bottom: 1px solid var(--rand); }
  .admin-liste td { border: 0; padding: 2px 0; }
  .admin-liste td.admin-knoepfe { display: flex; justify-content: flex-start; margin-top: 6px; }
}

/* ---------- App-Navigation auf Konto, Verwaltung, Coach: dieselbe wie im Studio (leiste.py) ----------
   PC: Seitenleiste links (264 px, wie studio.css .seitenleiste), Kopfzeile entfällt. Handy: Leiste unten. */
.app-seite { display: none; }
@media (min-width: 761px) {
  body.mit-leiste { padding-left: 264px; }
  body.mit-leiste .seitenkopf { display: none; }
  .app-seite { position: fixed; z-index: 20; top: 0; bottom: 0; left: 0; width: 264px; display: flex; flex-direction: column;
    background: var(--flaeche); border-right: 1px solid var(--rand); }
  .app-marke { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; color: var(--text); text-decoration: none; min-width: 0; }
  .app-marke .logo { flex: none; width: 32px; height: 32px; border-radius: 9px; background: linear-gradient(135deg, var(--akzent), var(--akzent-2));
    display: grid; place-items: center; color: var(--akzent-text); font-weight: 800; }
  .app-marke b { display: block; font-size: 15px; line-height: 1.3; }
  .app-marke span span { display: block; font-size: 11px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 190px; }
  .app-leiste { padding: 4px 10px; display: grid; gap: 2px; align-content: start; }
  .app-leiste a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--text-2);
    text-decoration: none; font-size: 15px; line-height: 1.4; }
  .app-leiste a.aktiv { background: var(--akzent-hell); color: var(--text); font-weight: 600; }
  .app-leiste svg { width: 18px; height: 18px; flex: none; }
  .app-seite-fuss { margin-top: auto; padding: 12px; border-top: 1px solid var(--rand); font-size: 11px; color: var(--text-3); text-align: center; }
}
@media (min-width: 761px) and (hover: hover) { .app-leiste a:hover { background: var(--flaeche-2); color: var(--text); } }
@media (max-width: 760px) {
  .app-seite { display: block; }
  .app-marke, .app-seite-fuss { display: none; }
  .app-leiste { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; display: grid; grid-auto-flow: column;
    grid-auto-columns: 1fr; padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--flaeche) 92%, transparent); backdrop-filter: blur(14px); border-top: 1px solid var(--rand); }
  .app-leiste a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; font-size: 10.5px;
    color: var(--text-2); text-decoration: none; min-width: 0; }
  .app-leiste a span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .app-leiste a.aktiv { color: var(--akzent); }
  .app-leiste svg { width: 22px; height: 22px; }
  body.mit-leiste .seitenfuss { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
}


/* Testbetrieb: Startseite = Anmeldefenster (app.py start) */
.test-willkommen { text-align: center; margin: 40px 0 20px; }
.test-willkommen img { display: block; margin: 0 auto 10px; border-radius: 14px; }
.test-willkommen h1 { margin: 0 0 6px; font-size: 28px; }
.test-willkommen p { margin: 0; }
