/* Notizen -- eigener Look "Papier & Tinte" (1.2.0): warmes Papier, Petrol als Tinte, Koralle für Termine,
   Titel in Fraunces, Text in Nunito (beide lokal, OFL). Kästchen eckig-rund statt Apple-Kreise.
   Am Rechner (ab 900 px) Spalten wie ein Schreibtisch: Ordner | Liste | Notiz bzw. Listen | Inhalt.
   Hell/Dunkel folgt dem Gerät (thema.js setzt data-bs-theme). */

@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url('../fonts/nunito-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
                 U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url('../fonts/nunito-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
                 U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 600 700; font-display: swap;
  src: url('../fonts/fraunces-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
                 U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 600 700; font-display: swap;
  src: url('../fonts/fraunces-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
                 U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --grund: #f3efe6; --flaeche: #fffcf6; --flaeche2: #faf6ee; --blatt: #fffdf8;
  --text: #28231c; --leise: #877e70; --linie: #e4dccd; --kreis: #b7ad9c;
  --akzent: #1f6f6a; --akzent-text: #ffffff; --akzent-weich: rgba(31, 111, 106, .11);
  --koralle: #d25c45; --gefahr: #c23f2c; --gruen: #2d8a57;
  --leiste: rgba(243, 239, 230, .92); --schatten: 0 8px 28px rgba(70, 52, 25, .12); --schatten-klein: 0 1px 3px rgba(70, 52, 25, .08);
  --schrift: 'Nunito', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --titel: 'Fraunces', Georgia, "Times New Roman", serif;
  --rund: 14px;
  color-scheme: light;
}
[data-bs-theme="dark"] {
  --grund: #15191a; --flaeche: #1f2426; --flaeche2: #1a1f20; --blatt: #191d1e;
  --text: #ece6da; --leise: #9d968a; --linie: #30373a; --kreis: #5d6464;
  --akzent: #5cb8ad; --akzent-text: #0f2523; --akzent-weich: rgba(92, 184, 173, .15);
  --koralle: #f08b72; --gefahr: #ff6b57; --gruen: #4cc38a;
  --leiste: rgba(21, 25, 26, .92); --schatten: 0 10px 32px rgba(0, 0, 0, .45); --schatten-klein: 0 1px 3px rgba(0, 0, 0, .4);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }      /* sonst gewinnt display:flex der Leisten gegen hidden */
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--grund); color: var(--text); font-family: var(--schrift); font-size: 17px;
       line-height: 1.4; -webkit-font-smoothing: antialiased; min-height: 100vh; }
body.notiz-seite { background: var(--blatt); }
a { color: var(--akzent); text-decoration: none; }
button { font: inherit; color: inherit; }
.seite { max-width: 760px; margin: 0 auto; padding: 0 16px calc(96px + env(safe-area-inset-bottom)); }
.leise { color: var(--leise); }
.gefahr { color: var(--gefahr); }
.ok-text { color: var(--gruen); }
.ok-text b { color: var(--text); }
.nur-desktop { display: none !important; }

/* --- Kopfleiste --- */
.leiste { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 4px;
          padding: calc(6px + env(safe-area-inset-top)) 8px 6px; background: var(--leiste);
          -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.notiz-seite .leiste { background: color-mix(in srgb, var(--blatt) 92%, transparent); }
.leiste-mitte { flex: 1; text-align: center; font-size: .8rem; color: var(--leise); white-space: nowrap; overflow: hidden;
                text-overflow: ellipsis; }
.leiste-titel { flex: 1; font-family: var(--titel); font-weight: 700; font-size: 1.15rem; padding-left: 8px;
                white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leiste-titel small { font-family: var(--schrift); font-weight: 600; font-size: .8rem; color: var(--leise); margin-left: 4px; }
.leiste-knopf { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; min-width: 44px; padding: 0 10px;
                justify-content: center; border: 0; background: none; color: var(--akzent); font-size: 1rem; font-weight: 600;
                cursor: pointer; border-radius: 12px; list-style: none; }
.leiste-knopf i { font-size: 1.3rem; }
.leiste-knopf.zurueck i { font-size: 1.35rem; margin-left: -6px; }
summary.leiste-knopf::-webkit-details-marker { display: none; }

/* --- Menü (⋮, Ordner) --- */
.menue { position: relative; }
.menue-inhalt { position: absolute; right: 0; top: 48px; min-width: 260px; max-width: 86vw; background: var(--flaeche);
                border: 1px solid var(--linie); border-radius: var(--rund); box-shadow: var(--schatten); padding: 6px; z-index: 30; }
.menue-inhalt > a, .menue-zeile, .ordner-liste > a { display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 12px; border-radius: 10px; color: var(--text); background: none; border: 0; text-align: left; cursor: pointer; }
.menue-inhalt > a span, .ordner-liste > a span { margin-left: auto; color: var(--leise); font-size: .9rem; }
.menue-inhalt > a.aktiv, .ordner-liste > a.aktiv { background: var(--akzent-weich); color: var(--akzent); font-weight: 700; }
.menue-inhalt > a.ebene-1, .ordner-liste > a.ebene-1 { padding-left: 30px; }
.menue-inhalt > a.ebene-2, .ordner-liste > a.ebene-2 { padding-left: 48px; }
.menue-inhalt i, .ordner-liste i { color: var(--akzent); width: 1.2em; }
.menue-zeile select { margin-left: auto; max-width: 45%; font: inherit; color: var(--text); background: var(--grund);
                      border: 1px solid var(--linie); border-radius: 8px; padding: 4px 6px; }
.menue-zeile.gefahr, .menue-zeile.gefahr i { color: var(--gefahr); }
.menue-zeile:disabled { opacity: .4; }
.menue-info { margin: 4px 12px 6px; font-size: .8rem; color: var(--leise); }
.ordner-neu { display: flex; gap: 4px; padding: 8px 4px 2px 8px; border-top: 1px solid var(--linie); margin-top: 6px; }
.ordner-neu input { flex: 1; min-width: 0; font: inherit; border: 1px solid var(--linie); background: var(--blatt);
                    color: var(--text); border-radius: 10px; padding: 6px 10px; }

/* --- Bereiche: Notizen | Erinnerungen (Reiter mit Unterstrich) --- */
.bereiche { display: flex; gap: 22px; margin: 4px 2px 14px; border-bottom: 1px solid var(--linie); }
.bereiche a { position: relative; padding: 8px 0 10px; color: var(--leise); font-weight: 700; font-size: .95rem; white-space: nowrap; }
.bereiche a i { margin-right: 3px; }
.bereiche a.aktiv { color: var(--text); }
.bereiche a.aktiv::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0;
                            background: var(--akzent); }

/* --- Notizliste --- */
.gross-titel { font-family: var(--titel); font-size: 2.1rem; font-weight: 700; margin: 2px 0 12px; letter-spacing: -.01em; }
.suche { display: flex; align-items: center; gap: 8px; background: var(--flaeche); border: 1px solid var(--linie);
         border-radius: 12px; padding: 0 12px; margin-bottom: 14px; }
.suche:focus-within { border-color: var(--akzent); box-shadow: 0 0 0 3px var(--akzent-weich); }
.suche i { color: var(--leise); }
.suche input { flex: 1; border: 0; background: none; font: inherit; color: var(--text); padding: 9px 0; outline: none; }
.abschnitt { font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--leise);
             margin: 20px 4px 8px; }
.gruppe { margin: 0; padding: 0; list-style: none; }
.notiz-liste { display: flex; flex-direction: column; gap: 8px; }
.notiz-liste li { position: relative; overflow: hidden; border-radius: var(--rund); }
.notiz-eintrag { position: relative; display: block; padding: 12px 14px 12px 16px; color: var(--text); background: var(--flaeche);
                 border: 1px solid var(--linie); border-radius: var(--rund); box-shadow: var(--schatten-klein);
                 transition: transform .2s ease, background .15s, border-color .15s; z-index: 1; touch-action: pan-y; }
.notiz-eintrag.aktiv { border-color: var(--akzent); background: color-mix(in srgb, var(--akzent) 6%, var(--flaeche)); }
.notiz-eintrag b { display: block; font-family: var(--titel); font-weight: 600; font-size: 1.05rem; white-space: nowrap;
                   overflow: hidden; text-overflow: ellipsis; }
.zweite-zeile { display: flex; gap: 8px; font-size: .88rem; color: var(--leise); white-space: nowrap; overflow: hidden; margin-top: 2px; }
.zweite-zeile .zeit { color: var(--text); opacity: .7; font-weight: 600; }
.zweite-zeile .vorschau { overflow: hidden; text-overflow: ellipsis; }
.zaehler { color: var(--akzent); font-weight: 700; }
.ordner-marke { display: inline-block; font-size: .78rem; color: var(--leise); margin-top: 4px; background: var(--grund);
                border-radius: 6px; padding: 1px 7px; }
.wisch-aktion { position: absolute; right: 0; top: 0; bottom: 0; width: 80px; border: 0; color: #fff; font-size: 1.3rem;
                background: var(--gefahr); cursor: pointer; border-radius: 0 var(--rund) var(--rund) 0; opacity: 0; }
.wisch-zeile.wischt .wisch-aktion { opacity: 1; }   /* erst beim Wischen, sonst blitzt es an den runden Ecken durch */
.papier-zeile { display: flex; align-items: center; gap: 8px; }
.papier-zeile .notiz-eintrag { flex: 1; min-width: 0; }
.hinweis { margin-top: -4px; }

/* --- Leisten unten (Handy) --- */
.werkzeug-leiste { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; align-items: center;
                   justify-content: space-between; padding: 4px 12px calc(4px + env(safe-area-inset-bottom));
                   background: var(--leiste); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
                   border-top: 1px solid var(--linie); }
.werkzeug-mitte { font-size: .8rem; color: var(--leise); font-weight: 600; }
.neu-knopf { background: var(--akzent); color: var(--akzent-text); border-radius: 50%; min-width: 48px; min-height: 48px;
             box-shadow: var(--schatten); margin: -18px 0 2px; }
.neu-knopf i { font-size: 1.35rem; }
/* Werkzeugleiste über der Tastatur: schwebende Pille */
.tasten-leiste { left: 50%; right: auto; transform: translateX(-50%); bottom: 8px; width: max-content; max-width: calc(100vw - 16px);
                 gap: 2px; padding: 4px 6px; border: 1px solid var(--linie); border-radius: 18px; background: var(--flaeche);
                 box-shadow: var(--schatten); margin-bottom: env(safe-area-inset-bottom); }
.tasten-leiste button { border: 0; background: none; color: var(--akzent); font-size: 1.3rem; min-width: 46px; min-height: 42px;
                        border-radius: 12px; cursor: pointer; }
.tasten-leiste button:active { background: var(--akzent-weich); }
.tasten-leiste button.an { background: var(--akzent); color: var(--akzent-text); }
.tasten-leiste button:disabled { opacity: .35; cursor: default; }

/* --- Notiz --- */
.notiz { padding-top: 6px; }
.titel { display: block; width: 100%; border: 0; outline: none; resize: none; background: none; color: var(--text);
         font: 700 1.9rem/1.2 var(--titel); letter-spacing: -.01em; padding: 6px 0 10px; overflow: hidden; }
.titel::placeholder { color: var(--leise); }
.zeilen { display: flex; flex-direction: column; }
.zeile { --ebene: 0; position: relative; display: flex; align-items: flex-start; gap: 10px;
         padding-left: calc(var(--ebene) * 28px); touch-action: pan-y; }
.zeile.bewegt { transition: none; }
.zeile.zurueck { transition: transform .18s ease; }
.zeile .eingabe { flex: 1; min-width: 0; border: 0; outline: none; resize: none; background: none; color: var(--text);
                  font: inherit; line-height: 1.4; padding: 7px 0; overflow: hidden; touch-action: pan-y; }
.zeile.typ-text .eingabe { padding: 3px 0; }
/* Kästchen: abgerundetes Quadrat, abgehakt in Tinte */
.kreis { flex: 0 0 auto; width: 22px; height: 22px; margin-top: 7px; border-radius: 7px; border: 2px solid var(--kreis);
         background: var(--flaeche); padding: 0; cursor: pointer; display: grid; place-items: center; color: transparent;
         transition: background .15s, border-color .15s, transform .1s; }
.kreis:active { transform: scale(.9); }
.kreis i { font-size: .95rem; line-height: 1; -webkit-text-stroke: .6px; }
.zeile.erledigt .kreis { background: var(--akzent); border-color: var(--akzent); color: var(--akzent-text); }
.zeile.erledigt .eingabe { color: var(--leise); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--leise) 60%, transparent); }
.punkt-zeichen { flex: 0 0 auto; width: 22px; text-align: center; margin-top: 7px; color: var(--akzent); font-weight: 800; }
.termin { flex: 0 0 auto; align-self: center; font-size: .78rem; font-weight: 700; color: var(--koralle);
          background: color-mix(in srgb, var(--koralle) 13%, transparent); border: 0; border-radius: 8px; padding: 3px 8px;
          cursor: pointer; white-space: nowrap; }
.termin.faellig { color: #fff; background: var(--gefahr); }
.zeile.erledigt .termin { color: var(--leise); background: color-mix(in srgb, var(--leise) 14%, transparent); }
.wisch-hinweis { position: absolute; top: 50%; transform: translateY(-50%); font-size: 1.3rem; opacity: 0;
                 pointer-events: none; color: var(--akzent); }
.wisch-hinweis.links { left: -34px; } .wisch-hinweis.rechts { right: -34px; }
.zeile.wackeln { animation: wackeln .25s; }
@keyframes wackeln { 25% { transform: translateX(6px); } 75% { transform: translateX(-6px); } }
.neue-zeile { display: block; width: 100%; min-height: 40vh; border: 0; background: none; cursor: text; }
.nur-lesen .neue-zeile { display: none; }
.speicher-stand { font-weight: 600; }
.speicher-stand.fehler { color: var(--gefahr); }

/* --- Blatt (Datum, Details, neue Liste) --- */
.blatt { border: 1px solid var(--linie); border-radius: 18px; padding: 0; width: min(420px, 92vw); background: var(--flaeche);
         color: var(--text); box-shadow: var(--schatten); }
.blatt::backdrop { background: rgba(30, 24, 15, .35); }
.blatt form { padding: 20px; }
.blatt h2 { margin: 0 0 4px; font-family: var(--titel); font-size: 1.3rem; }
.datum-felder { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; align-items: end; }
.feld-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feld-name .leise { font-weight: 500; }
.datum-felder label { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; font-weight: 600; }
.datum-felder input, .formular input:not([type=checkbox]):not([type=radio]) {
  font: inherit; color: var(--text); background: var(--blatt); border: 1px solid var(--linie); border-radius: 10px; padding: 9px 11px; width: 100%; }
.schnell-tage { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.schnell-tage button { border: 1px solid var(--linie); border-radius: 10px; padding: 6px 12px; background: var(--blatt);
                       color: var(--akzent); font-weight: 700; cursor: pointer; }
.blatt-knoepfe { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
.blatt-zeile { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 10px 0; font-weight: 600; }
.blatt-zeile select { font: inherit; color: var(--text); background: var(--blatt); border: 1px solid var(--linie); border-radius: 10px; padding: 6px 8px; }
.klein-text { font-size: .8rem; }

/* --- Knöpfe, Formulare, Meldungen --- */
.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 12px;
         padding: 10px 18px; background: var(--akzent); color: var(--akzent-text); font-weight: 700; cursor: pointer; }
.knopf:hover { filter: brightness(1.07); }
.knopf.zweit { background: var(--grund); color: var(--text); border: 1px solid var(--linie); font-weight: 600; }
.knopf.klein { padding: 6px 11px; font-size: .9rem; border-radius: 10px; }
.knopf.breit { width: 100%; }
.knopf-reihe { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.knopf-reihe input { max-width: 10rem; }
.formular { padding: 16px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--rund); }
.formular label { display: block; margin: 10px 0 4px; font-size: .9rem; font-weight: 600; }
.formular p { margin: 8px 0; }
.formular .leise { font-size: .85rem; }
.schalter-zeile { display: flex !important; align-items: center; justify-content: space-between; gap: 12px; margin: 0 !important;
                  font-size: 1rem !important; }
.schalter-zeile input { width: 44px; height: 26px; accent-color: var(--akzent); }
.auswahl-zeile { display: flex !important; gap: 10px; align-items: center; padding: 8px 0; font-size: 1rem !important; }
.auswahl-zeile input { accent-color: var(--akzent); width: 20px; height: 20px; }
.erinnerung { border-top: 1px solid var(--linie); margin-top: 14px; padding-top: 4px; }
.meldung { margin: 10px 0; padding: 10px 14px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--gruen) 35%, transparent);
           background: color-mix(in srgb, var(--gruen) 11%, var(--flaeche));
           display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.meldung.fehler { border-color: color-mix(in srgb, var(--gefahr) 35%, transparent); background: color-mix(in srgb, var(--gefahr) 11%, var(--flaeche)); }
.leer { text-align: center; color: var(--leise); padding: 48px 16px; }
.leer-symbol { font-size: 2.8rem; color: var(--akzent); display: block; margin-bottom: 8px; opacity: .8; }
.gross { font-family: var(--titel); font-size: 2.6rem; margin: 0; }
.fuss { text-align: center; font-size: .78rem; margin-top: 28px; }
.rueckgaengig { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 40;
                display: flex; gap: 14px; align-items: center; background: #26302f; color: #f4efe6; padding: 10px 16px;
                border-radius: 14px; box-shadow: var(--schatten); max-width: 92vw; font-size: .95rem; font-weight: 600; }
.rueckgaengig button { border: 0; background: none; color: #7fd6cb; font-weight: 800; cursor: pointer; }

/* --- Anmelden --- */
.mitte { min-height: 80vh; display: grid; place-items: center; }
.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 20px; padding: 26px; width: min(380px, 100%);
         text-align: center; box-shadow: var(--schatten); }
.anmelde-icon { width: 84px; height: 84px; display: block; margin: 4px auto 10px; }
.karte h1 { margin: 0 0 4px; font-family: var(--titel); font-size: 1.9rem; }
.anmelde-formular { text-align: left; margin-top: 8px; }
.anmelde-formular label { display: block; margin: 12px 0 4px; font-size: .9rem; font-weight: 600; }
.anmelde-formular input { width: 100%; font: inherit; border: 1px solid var(--linie); border-radius: 10px; padding: 10px 12px;
                          background: var(--blatt); color: var(--text); }
.anmelde-formular .knopf { margin-top: 16px; }
.trenner { margin: 16px 0 4px; color: var(--leise); font-size: .85rem; }

/* --- Erinnerungen --- */
.farbe-rot { --liste: #d8443a; } .farbe-orange { --liste: #e8871e; } .farbe-gelb { --liste: #d6a312; }
.farbe-gruen { --liste: #3a9a5b; } .farbe-blau { --liste: #2f6fd0; } .farbe-lila { --liste: #8a55c7; }
.farbe-pink { --liste: #d6457a; } .farbe-braun { --liste: #9a7351; } .farbe-grau { --liste: #7f8584; }
.kacheln { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 4px 0; }
.kachel { position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 6px 8px;
          padding: 11px 13px; border-radius: var(--rund); background: var(--flaeche); color: var(--text);
          border: 1px solid var(--linie); box-shadow: var(--schatten-klein); transition: border-color .15s; }
.kachel:last-child:nth-child(odd) { grid-column: span 2; }
.kachel.aktiv { border-color: var(--sicht); box-shadow: 0 0 0 2px color-mix(in srgb, var(--sicht) 25%, transparent); }
.kachel-symbol { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-size: 1rem;
                 background: var(--sicht); }
.kachel-zahl { justify-self: end; font-family: var(--titel); font-size: 1.6rem; line-height: 1.1; font-weight: 700; }
.kachel-name { grid-column: span 2; color: var(--leise); font-weight: 700; font-size: .92rem; }
.sicht-heute { --sicht: #1f6f6a; } .sicht-geplant { --sicht: #d25c45; } .sicht-alle { --sicht: #5b534a; }
.sicht-markiert { --sicht: #e0892a; } .sicht-erledigt { --sicht: #8f877a; }
[data-bs-theme="dark"] .sicht-heute { --sicht: #3fa399; } [data-bs-theme="dark"] .sicht-alle { --sicht: #8f877a; }
.sicht-titel { color: var(--sicht); }
.listen { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--rund); overflow: hidden; }
.listen-zeile { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 14px; color: var(--text);
                transition: background .15s; }
.listen li + li .listen-zeile::before { content: ""; position: absolute; top: 0; left: 58px; right: 0; border-top: 1px solid var(--linie); }
.listen-zeile.aktiv { background: color-mix(in srgb, var(--liste, var(--akzent)) 10%, var(--flaeche)); font-weight: 700; }
.listen-symbol { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: #fff;
                 background: var(--liste); font-size: 1rem; }
.listen-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.listen-zahl { color: var(--leise); font-weight: 700; }
.farbwahl { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 14px 0 4px; }
.farbwahl label { cursor: pointer; }
.farbwahl input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.farbwahl span { display: block; width: 32px; height: 32px; border-radius: 10px; background: var(--liste); }
.farbwahl input:checked + span { box-shadow: 0 0 0 3px var(--flaeche), 0 0 0 5px var(--text); }
.farbwahl input:focus-visible + span { outline: 2px solid var(--text); outline-offset: 4px; }
.farbwahl.klein { justify-content: flex-start; gap: 9px; margin: 0; padding: 10px 12px; }
.farbwahl.klein span { width: 24px; height: 24px; border-radius: 8px; }
.listen-name-feld { width: 100%; font: 700 1.25rem var(--titel); text-align: center; border: 1px solid var(--linie); border-radius: 12px;
                    padding: 12px; background: var(--blatt); color: var(--text); margin-top: 8px; }
.erinnerung-seite .titel { color: var(--liste, var(--text)); }
/* Listenfarbe nur für die Liste selbst -- die Seitenleiste daneben (Rechner) bleibt in Tinte */
.erinnerung-seite[class*="farbe-"] .hauptspalte .leiste-knopf, .erinnerung-seite[class*="farbe-"] .tasten-leiste button { color: var(--liste); }
.erinnerung-seite[class*="farbe-"] .tasten-leiste button.an { background: var(--liste); color: #fff; }
.erinnerung-seite .zeile { gap: 12px; }
.erinnerung-seite .zeile .inhalt { flex: 1; min-width: 0; display: flex; flex-direction: column;
                                   border-bottom: 1px dashed var(--linie); padding-bottom: 2px; color: var(--text); }
.erinnerung-seite .kreis { margin-top: 8px; border-color: color-mix(in srgb, var(--liste, var(--kreis)) 55%, var(--kreis)); }
.erinnerung-seite .zeile.erledigt .kreis { background: var(--liste, var(--akzent)); border-color: var(--liste, var(--akzent)); color: #fff; }
.text-reihe { display: flex; align-items: flex-start; gap: 5px; }
.prio { color: var(--liste, var(--koralle)); font-weight: 900; margin-top: 7px; letter-spacing: .1em; font-variant-ligatures: none;
        font-feature-settings: "liga" 0, "dlig" 0; }
.meta, .sammel .meta { display: flex; flex-wrap: wrap; gap: 0 10px; font-size: .84rem; font-weight: 600; color: var(--leise);
                       background: none; border: 0; padding: 0 0 7px; text-align: left; cursor: pointer; }
.meta.faellig, .meta .faellig { color: var(--gefahr); }
.fahne { color: #e0892a; margin-top: 10px; flex: 0 0 auto; }
/* ⓘ rechts in der Zeile: erscheint, sobald man die Erinnerung antippt (am Rechner auch beim Überfahren) */
.info-knopf { flex: 0 0 auto; align-self: flex-start; margin-top: 3px; width: 34px; height: 34px; border: 0; border-radius: 10px;
              background: none; color: var(--liste, var(--akzent)); font-size: 1.25rem; cursor: pointer; display: grid; place-items: center;
              opacity: 0; pointer-events: none; transition: opacity .12s; }
.zeile:focus-within .info-knopf, .info-knopf:focus-visible { opacity: 1; pointer-events: auto; }
.info-knopf:active { background: color-mix(in srgb, var(--liste, var(--akzent)) 14%, transparent); }
@media (hover: hover) { .erinnerung-seite .zeile:hover .info-knopf { opacity: .75; pointer-events: auto; } }
.erledigt-umschalten { display: inline-block; margin: 12px 0 0 34px; border: 1px solid var(--linie); background: var(--flaeche);
                       color: var(--liste, var(--akzent)); font-size: .85rem; font-weight: 700; padding: 4px 12px; border-radius: 20px; cursor: pointer; }
.neue-erinnerung { display: flex; align-items: center; gap: 10px; margin-top: 14px; border: 0; background: none; padding: 8px 0;
                   color: var(--liste, var(--akzent)); font-weight: 800; font-size: 1rem; cursor: pointer; }
.neue-erinnerung i { font-size: 1.4rem; }
.erinnerung-seite .neue-zeile { min-height: 30vh; }
.sammel { display: flex; flex-direction: column; }
.sammel .zeile { display: flex; align-items: flex-start; gap: 12px; transition: opacity .25s; }
.sammel .zeile.weg { opacity: 0; }
.sammel .inhalt .text { padding: 7px 0 2px; }
.sammel .zeile.erledigt .text { color: var(--leise); text-decoration: line-through; }
.abschnitt[class*="farbe-text-"] { color: var(--liste); }
.farbe-text-rot { --liste: #d8443a; } .farbe-text-orange { --liste: #e8871e; } .farbe-text-gelb { --liste: #b88a0c; }
.farbe-text-gruen { --liste: #3a9a5b; } .farbe-text-blau { --liste: #2f6fd0; } .farbe-text-lila { --liste: #8a55c7; }
.farbe-text-pink { --liste: #d6457a; } .farbe-text-braun { --liste: #9a7351; } .farbe-text-grau { --liste: #7f8584; }
.abschnitt.ueberfaellig { color: var(--gefahr); }

/* --- Rahmen: Handy (eine Spalte je Seite) --- */
.rahmen { display: block; }
.rahmen-meldungen { padding: 0 16px; }
.rahmen-meldungen:empty { display: none; }
.spalte { padding: 0 16px calc(100px + env(safe-area-inset-bottom)); }
.spalte > .leiste { margin: 0 -16px; }
.ansicht-liste .hauptspalte { display: none; }
.ansicht-inhalt .seitenleiste, .ansicht-inhalt .mittelspalte { display: none; }
.rahmen-notizen .seitenleiste { display: none; }
.rahmen-erinnerungen.ansicht-liste .seitenleiste { display: block; }
.platzhalter { display: none; }
.spalte > .tasten-leiste { margin-bottom: 0; }

/* --- Rahmen: Rechner --- */
@media (min-width: 900px) {
  .nur-mobil { display: none !important; }
  .nur-desktop { display: initial !important; }
  span.nur-desktop, .leiste-titel.nur-desktop { display: block !important; }
  body { font-size: 16px; }
  .rahmen { display: grid; height: 100vh; height: 100dvh; overflow: hidden; }
  /* 🔑 linke Spalte in beiden Bereichen gleich breit -- sonst springt die Seite beim Umschalten */
  .rahmen { --seitenleiste: 280px; }
  .rahmen-notizen { grid-template-columns: var(--seitenleiste) minmax(300px, 360px) 1fr; }
  .rahmen-erinnerungen { grid-template-columns: var(--seitenleiste) 1fr; }
  .spalte { display: block !important; height: 100%; overflow-y: auto; padding: 0 16px 40px; }
  .seitenleiste { background: var(--grund); border-right: 1px solid var(--linie); display: flex !important; flex-direction: column; }
  .seitenleiste-inhalt { flex: 1; }
  .mittelspalte { background: var(--flaeche2); border-right: 1px solid var(--linie); }
  .hauptspalte { background: var(--blatt); padding: 0 max(32px, calc((100% - 780px) / 2)) 60px; }
  .spalte > .leiste { margin: 0 -16px 6px; padding: 10px 12px 8px; backdrop-filter: none; }
  .seitenleiste > .leiste { background: var(--grund); }
  .mittelspalte > .leiste { background: var(--flaeche2); }
  .hauptspalte > .leiste { margin: 0 -32px; padding: 10px 16px 8px; background: var(--blatt); }
  .rahmen-meldungen { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 60; width: min(520px, 90vw);
                      padding: 0; }
  .rahmen-meldungen .meldung { box-shadow: var(--schatten); }
  .platzhalter { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; height: 80%;
                 color: var(--leise); text-align: center; }
  .platzhalter > i { font-size: 3.2rem; color: var(--akzent); opacity: .5; }
  .ordner-liste { display: flex; flex-direction: column; gap: 2px; }
  .ordner-liste > a:hover, .listen-zeile:hover, .notiz-eintrag:hover { background: color-mix(in srgb, var(--akzent) 5%, var(--flaeche)); }
  .notiz-eintrag.aktiv:hover { background: color-mix(in srgb, var(--akzent) 8%, var(--flaeche)); }
  .gross-titel { font-size: 2rem; }
  .seitenleiste .bereiche { gap: 16px; }
  .seitenleiste .bereiche a { font-size: .88rem; }
  .kacheln { gap: 8px; }
  .kachel { padding: 9px 11px; }
  .kachel-zahl { font-size: 1.35rem; }
  /* Löschen per Maus: Papierkorb erscheint beim Überfahren (Wischen gibt es mit der Maus nicht) */
  .wisch-aktion { width: 34px; height: 34px; top: 10px; right: 10px; bottom: auto; border-radius: 10px; font-size: 1rem;
                  z-index: 2; opacity: 0; background: var(--flaeche); color: var(--gefahr); border: 1px solid var(--linie);
                  transition: opacity .15s; }
  .notiz-liste li:hover .wisch-aktion, .wisch-aktion:focus-visible { opacity: 1; }
  .wisch-aktion:hover { background: var(--gefahr); color: #fff; }
  /* Werkzeugleiste: fest unter der Kopfzeile statt über der Tastatur */
  .tasten-leiste { position: sticky; top: 62px; left: auto; transform: none; margin: 0 auto 10px; bottom: auto; z-index: 15;
                   box-shadow: var(--schatten-klein); display: flex !important; justify-content: center; }
  .tasten-leiste button { font-size: 1.15rem; min-width: 42px; min-height: 36px; }
  .werkzeug-leiste.leisten-fuss { position: sticky; bottom: 0; margin: 12px -16px 0; padding: 8px 12px; background: var(--grund);
                                  border-top: 1px solid var(--linie); backdrop-filter: none; }
  .titel { font-size: 2.2rem; }
  .neue-zeile { min-height: 50vh; }
  .rueckgaengig { bottom: 24px; }
  .zeile .eingabe { padding: 6px 0; }
}
@media (prefers-reduced-motion: reduce) {
  .zeile.zurueck, .notiz-eintrag { transition: none; }
}
