/* GLX Mail - Aussehen
   Alle Farben kommen aus den Designs unten (data-design am <html>). */

:root {
  --schrift: "Segoe UI", system-ui, -apple-system, "SF Pro Text", Roboto, sans-serif;
  --radius: 10px;
  --kopfhoehe: 54px;
  --breite-ordner: 230px;
  --breite-liste: 400px;
  --zeile-pad: 10px;
  --sicher-oben: env(safe-area-inset-top, 0px);
  --sicher-unten: env(safe-area-inset-bottom, 0px);
  --sicher-links: env(safe-area-inset-left, 0px);
  --sicher-rechts: env(safe-area-inset-right, 0px);
}

/* ---------- Designs ---------- */
[data-design="glx"]      { --hg:#070d16; --flaeche:#0c1624; --flaeche2:#12203a; --text:#e6f3ff; --text2:#8fa7c2; --akzent:#18c8ff; --akzent-text:#04121c; --linie:#1b2d47; --auswahl:#0f3554; --ungelesen:#18c8ff; --gefahr:#ff5d6c; --leuchten:0 0 14px rgba(24,200,255,.35); color-scheme:dark; }
[data-design="dunkel"]   { --hg:#151618; --flaeche:#1d1f22; --flaeche2:#26292d; --text:#ececec; --text2:#9a9ea5; --akzent:#5aa9ff; --akzent-text:#08121e; --linie:#30343a; --auswahl:#2b3a4f; --ungelesen:#5aa9ff; --gefahr:#ff6b6b; --leuchten:none; color-scheme:dark; }
[data-design="hell"]     { --hg:#eef2f7; --flaeche:#ffffff; --flaeche2:#f3f6fa; --text:#16202c; --text2:#5d6b7c; --akzent:#0a72d6; --akzent-text:#ffffff; --linie:#dde3ea; --auswahl:#dcebfb; --ungelesen:#0a72d6; --gefahr:#d42a3b; --leuchten:none; color-scheme:light; }
[data-design="oled"]     { --hg:#000; --flaeche:#000; --flaeche2:#0d0d0d; --text:#f2f2f2; --text2:#8a8a8a; --akzent:#18c8ff; --akzent-text:#000; --linie:#1c1c1c; --auswahl:#0b2533; --ungelesen:#18c8ff; --gefahr:#ff5d6c; --leuchten:none; color-scheme:dark; }
[data-design="ozean"]    { --hg:#06191d; --flaeche:#0a242a; --flaeche2:#0f3139; --text:#ddf6f4; --text2:#86b3b0; --akzent:#2fe0c4; --akzent-text:#03201b; --linie:#164149; --auswahl:#0f4a4b; --ungelesen:#2fe0c4; --gefahr:#ff7a6b; --leuchten:0 0 12px rgba(47,224,196,.3); color-scheme:dark; }
[data-design="wald"]     { --hg:#0d1510; --flaeche:#131f17; --flaeche2:#1a2a1f; --text:#e5f1e6; --text2:#93ab97; --akzent:#6fdc7d; --akzent-text:#0b1d0e; --linie:#25392b; --auswahl:#21422a; --ungelesen:#6fdc7d; --gefahr:#ff7b6b; --leuchten:none; color-scheme:dark; }
[data-design="abend"]    { --hg:#170f1c; --flaeche:#21152a; --flaeche2:#2c1c37; --text:#f6e9f2; --text2:#b39bb0; --akzent:#ff8a3d; --akzent-text:#1e0d02; --linie:#3a2747; --auswahl:#46284a; --ungelesen:#ff8a3d; --gefahr:#ff5b7a; --leuchten:0 0 12px rgba(255,138,61,.3); color-scheme:dark; }
[data-design="rubin"]    { --hg:#140a0d; --flaeche:#1e0f14; --flaeche2:#2a151c; --text:#f7e7ea; --text2:#b8949b; --akzent:#ff4d6d; --akzent-text:#22030a; --linie:#3a1d26; --auswahl:#4a1a27; --ungelesen:#ff4d6d; --gefahr:#ffb03b; --leuchten:none; color-scheme:dark; }
[data-design="sand"]     { --hg:#f3ede2; --flaeche:#fbf7f0; --flaeche2:#f1e9dc; --text:#2b241a; --text2:#7a6b55; --akzent:#b5651d; --akzent-text:#fff; --linie:#e2d6c3; --auswahl:#f0dcc0; --ungelesen:#b5651d; --gefahr:#c0392b; --leuchten:none; color-scheme:light; }
[data-design="lavendel"] { --hg:#f1eef9; --flaeche:#ffffff; --flaeche2:#f6f3fd; --text:#231d33; --text2:#6c6487; --akzent:#7b4fe0; --akzent-text:#fff; --linie:#e3ddf3; --auswahl:#e8defc; --ungelesen:#7b4fe0; --gefahr:#d42a5b; --leuchten:none; color-scheme:light; }
[data-design="stahl"]    { --hg:#e4e7eb; --flaeche:#f6f7f9; --flaeche2:#eceff2; --text:#1c2128; --text2:#5f6874; --akzent:#3d5a80; --akzent-text:#fff; --linie:#d3d8de; --auswahl:#d5dfeb; --ungelesen:#3d5a80; --gefahr:#c0392b; --leuchten:none; color-scheme:light; }
[data-design="kontrast"] { --hg:#000; --flaeche:#000; --flaeche2:#111; --text:#fff; --text2:#ffe500; --akzent:#ffe500; --akzent-text:#000; --linie:#fff; --auswahl:#333; --ungelesen:#ffe500; --gefahr:#ff4040; --leuchten:none; color-scheme:dark; }

[data-dichte="kompakt"] { --zeile-pad: 5px; }
[data-dichte="luftig"]  { --zeile-pad: 15px; }

/* ---------- Grundlagen ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--hg); color: var(--text); font-family: var(--schrift); font-size: 15px; -webkit-text-size-adjust: 100%; }
body { overflow: hidden; overscroll-behavior: none; -webkit-tap-highlight-color: transparent; }
button, input, textarea, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
svg { width: 22px; height: 22px; flex: none; }

/* Gordon: keine sichtbaren Rollbalken - Rollen geht trotzdem */
* { scrollbar-width: none; }
*::-webkit-scrollbar { display: none; }
.rollbar { overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }

.symbolknopf { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 9px; background: transparent; color: var(--text2); cursor: pointer; }
.symbolknopf:hover { background: var(--flaeche2); color: var(--text); }
.symbolknopf.aktiv { color: var(--akzent); }
.symbolknopf.gefahr:hover { color: var(--gefahr); }
.symbolknopf.klein { width: 30px; height: 30px; }
.symbolknopf.klein svg { width: 18px; height: 18px; }
.textknopf { border: 0; background: none; color: var(--akzent); cursor: pointer; padding: 6px 8px; border-radius: 6px; font-weight: 600; }
.textknopf:hover { background: var(--flaeche2); }
.knopf { border: 1px solid var(--linie); background: var(--flaeche2); padding: 10px 16px; border-radius: var(--radius); cursor: pointer; font-weight: 600; }
.knopf:hover { border-color: var(--akzent); }
.knopf.haupt { background: var(--akzent); color: var(--akzent-text); border-color: var(--akzent); box-shadow: var(--leuchten); }
.knopf.gefahr { color: var(--gefahr); }
.knopf.haupt.gefahr { background: var(--gefahr); border-color: var(--gefahr); color: #fff; box-shadow: none; }
.knopf:disabled { opacity: .5; cursor: default; }
.klein { font-size: 12.5px; color: var(--text2); }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], input[type=time], textarea, select {
  background: var(--flaeche2); border: 1px solid var(--linie); border-radius: 8px; padding: 9px 11px; outline: none; width: 100%;
}
input:focus, textarea:focus, select:focus { border-color: var(--akzent); }
.leer { color: var(--text2); text-align: center; padding: 40px 16px; }
.leer.gross { display: grid; place-items: center; align-content: center; gap: 12px; height: 100%; }
.leer.gross img { width: 120px; opacity: .35; }

/* ---------- Anmeldung ---------- */
#anmeldung { position: fixed; inset: 0; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle at 50% 30%, var(--flaeche2), var(--hg) 70%); }
.anmeldekarte { width: min(380px, 100%); background: var(--flaeche); border: 1px solid var(--linie); border-radius: 18px; padding: 28px 24px; display: grid; gap: 14px; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.anmeldelogo { width: 112px; height: 112px; margin: 0 auto; filter: drop-shadow(0 0 18px rgba(24,200,255,.35)); }
.anmeldekarte h1 { margin: 0 0 6px; font-size: 26px; letter-spacing: .5px; }
.anmeldekarte label { display: grid; gap: 6px; text-align: left; font-size: 13px; color: var(--text2); }
.hinweis { color: var(--gefahr); min-height: 1em; margin: 0; font-size: 14px; }

/* ---------- Programmrahmen ---------- */
/* Safari (iPhone): eine feste Spalte, nichts darf die Seite breiter machen als den Bildschirm */
#programm { position: fixed; inset: 0; display: grid; grid-template-columns: minmax(0, 1fr); width: 100%; max-width: 100vw; overflow: hidden; grid-template-rows: calc(var(--kopfhoehe) + var(--sicher-oben)) auto 1fr auto auto auto; }
#kopf { grid-row: 1; } #sicherungsBand { grid-row: 2; } #spalten { grid-row: 3; } #updateLeiste { grid-row: 4; } #lizenzLeiste { grid-row: 5; } #statuszeile { grid-row: 6; }
#kopf { display: flex; align-items: center; gap: 4px; min-width: 0; overflow: hidden; padding: var(--sicher-oben) calc(10px + var(--sicher-rechts)) 0 calc(10px + var(--sicher-links)); background: var(--flaeche); border-bottom: 1px solid var(--linie); }
.kopflogo { width: 32px; height: 32px; margin: 0 6px 0 2px; }
.kopflink { display: flex; align-items: center; min-width: 0; color: inherit; text-decoration: none; cursor: pointer; }
#kopf h1 { font-size: 17px; margin: 0 12px 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
#kopf > button, #kopf .symbolknopf { flex: none; }
.suche { flex: 1; max-width: 520px; position: relative; margin-right: auto; }
.suche svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text2); }
.suche input { padding-left: 36px; border-radius: 20px; }
#knopfSuche { display: none; }
.nur-mobil { display: none !important; }

#spalten { display: grid; grid-template-columns: var(--breite-ordner) 6px var(--breite-liste) 6px minmax(0, 1fr); min-height: 0; padding-left: var(--sicher-links); padding-right: var(--sicher-rechts); }
#ordnerSpalte, #listenSpalte, #leseSpalte { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--flaeche); }
#ordnerSpalte { background: var(--hg); }
.trenner { cursor: col-resize; background: var(--linie); position: relative; touch-action: none; }
.trenner::after { content: ""; position: absolute; inset: 0 -4px; }
.trenner:hover, .trenner.aktiv { background: var(--akzent); }
.spaltenkopf { display: flex; align-items: center; gap: 8px; padding: 10px 12px 8px 14px; min-height: 46px; }
.spaltenkopf h2 { margin: 0; font-size: 14px; text-transform: uppercase; letter-spacing: .8px; color: var(--text2); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: default; }
#listenSpalte .spaltenkopf h2 { text-transform: none; letter-spacing: 0; font-size: 18px; color: var(--text); }
.zahl { color: var(--text2); font-size: 13px; }

#statusText { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#statusUngelesen { flex: 1; white-space: nowrap; color: var(--text); }
#statusVersion { flex: none; white-space: nowrap; opacity: .8; }
@media (max-width: 820px) { #statusVersion .lang { display: none; } }
#statuszeile { display: flex; align-items: center; gap: 8px; padding: 4px 14px calc(4px + var(--sicher-unten)); font-size: 12.5px; color: var(--text2); background: var(--flaeche); border-top: 1px solid var(--linie); }
#statusPunkt { width: 8px; height: 8px; border-radius: 50%; background: #3ccf6e; flex: none; }
#statuszeile.offline #statusPunkt { background: #f0a020; }
#statuszeile.arbeitet #statusPunkt { background: var(--akzent); animation: pulsieren 1s infinite; }
#statuszeile.fehler #statusPunkt { background: var(--gefahr); }
@keyframes pulsieren { 50% { opacity: .3; } }

/* ---------- Ordner ---------- */
#ordnerListe { list-style: none; margin: 0; padding: 0 8px 10px; flex: 1; }
.ordner { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; cursor: pointer; user-select: none; -webkit-user-select: none; color: var(--text); position: relative; }
.ordner svg { width: 19px; height: 19px; color: var(--text2); }
.ordner .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ordner .anzahl { font-size: 12px; font-weight: 700; color: var(--akzent); }
.ordner:hover { background: var(--flaeche2); }
.ordner.aktiv { background: var(--auswahl); box-shadow: inset 0 0 0 1.5px var(--akzent); color: var(--text); font-weight: 600; }
.ordner.aktiv svg { color: var(--akzent); }
.ordner.ziel { outline: 2px solid var(--akzent); background: var(--auswahl); box-shadow: var(--leuchten); }
.ordnerknopf { display: flex; align-items: center; gap: 10px; margin: 6px 8px 0; padding: 9px 10px; border: 0; border-radius: 10px; background: none; color: var(--text2); font: inherit; font-size: 14px; cursor: pointer; text-align: left; }
.ordnerknopf:hover { background: var(--flaeche2); color: var(--text); }
.ordnerknopf svg { width: 19px; height: 19px; flex: none; }
[data-sicherung] .ordnerknopf { color: var(--akzent); }
#sicherungsBand { display: flex; align-items: center; gap: 10px; padding: 8px 14px; background: color-mix(in srgb, var(--akzent) 16%, var(--flaeche)); border-bottom: 1px solid var(--akzent); color: var(--text); font-size: 14px; }
#sicherungsBand[hidden] { display: none; }
#sicherungsBand svg { width: 19px; height: 19px; color: var(--akzent); flex: none; }
#sicherungsBand span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#sicherungsBand .knopf { flex: none; padding: 6px 12px; }
.nur-sicherung { display: none !important; }
[data-sicherung] .nur-sicherung { display: inline-grid !important; }
[data-sicherung] .nur-normal { display: none !important; }
.sicherungsliste .zeile .zinfo b { font-weight: 600; }
.konto { padding: 10px 16px calc(10px + var(--sicher-unten)); font-size: 12.5px; color: var(--text2); border-top: 1px solid var(--linie); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Mailliste ---------- */
#mailListe { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 0; overflow-x: hidden; outline: none; touch-action: pan-y; }
.mail { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; min-width: 0; gap: 2px 10px; padding: var(--zeile-pad) 12px var(--zeile-pad) 16px; border-bottom: 1px solid var(--linie); cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; background: var(--flaeche); transition: transform .18s; }
.mail:hover { background: var(--flaeche2); }
.mail.gewaehlt { background: var(--auswahl); }
.mail.offen { box-shadow: inset 3px 0 0 var(--akzent); }
.mail .bild { grid-row: span 3; }
.mail .von { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail .zeit { font-size: 12.5px; color: var(--text2); white-space: nowrap; }
.mail .betreff { grid-column: 2 / 4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; display: flex; gap: 6px; align-items: center; }
.mail .betreff span { overflow: hidden; text-overflow: ellipsis; }
.mail .vorschau { grid-column: 2 / 4; color: var(--text2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
[data-dichte="kompakt"] .mail .vorschau { display: none; }
[data-dichte="kompakt"] .mail .bild { width: 28px; height: 28px; font-size: 12px; grid-row: span 2; }
.mail.ungelesen .von, .mail.ungelesen .betreff { font-weight: 700; color: var(--text); }
.mail.ungelesen::before { content: ""; position: absolute; left: 5px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--ungelesen); box-shadow: var(--leuchten); }
.mail .zeichen { display: inline-flex; gap: 3px; margin-left: auto; color: var(--text2); }
.mail .zeichen svg { width: 15px; height: 15px; }
.mail .zeichen .stern { color: #ffc531; }
.mail .wartet { color: #f0a020; }
.mail .haken { display: none; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--text2); background: var(--flaeche); }
.waehlmodus .mail .haken { display: grid; place-items: center; }
.waehlmodus .mail .bild { visibility: hidden; }
.waehlmodus .mail.gewaehlt .haken { background: var(--akzent); border-color: var(--akzent); color: var(--akzent-text); }
.mail .haken svg { width: 15px; height: 15px; }
.bild { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 15px; flex: none; }
.wischhinweis { position: absolute; inset: 0; display: flex; align-items: center; padding: 0 22px; color: #fff; font-weight: 700; z-index: -1; }
.mail.wischt { transition: none; }
.mail .schnell { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); display: none; gap: 2px; padding: 3px; border-radius: 10px; background: var(--flaeche2); border: 1px solid var(--linie); box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.mail .schnell button { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 7px; background: none; color: var(--text2); cursor: pointer; }
.mail .schnell button:hover { background: var(--auswahl); color: var(--text); }
.mail .schnell button.gefahr:hover { color: #ff5a5a; }
.mail .schnell svg { width: 17px; height: 17px; }
@media (hover: hover) and (pointer: fine) { .mail:hover .schnell { display: flex; } #mailListe.waehlmodus .mail .schnell { display: none; } }
.wischgrund { position: relative; overflow: hidden; }
.wischhinweis { gap: 8px; }
.wischhinweis svg { width: 22px; height: 22px; }
.wischwahl { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.wischwahl select { width: 100%; }
#auswahlLeiste { display: flex; align-items: center; gap: 4px; padding: 4px 10px; background: var(--auswahl); border-bottom: 1px solid var(--linie); }
#auswahlZahl { flex: 1; font-weight: 600; }

/* ---------- Lesen ---------- */
#leseSpalte { background: var(--flaeche); }
#leser { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.leseleiste { display: flex; align-items: center; gap: 2px; padding: 6px 10px; border-bottom: 1px solid var(--linie); }
.luecke { flex: 1; }
.leseinhalt { flex: 1; padding: 16px 22px 30px; }
#leseBetreff { margin: 0 0 14px; font-size: 21px; line-height: 1.3; word-break: break-word; }
.lesekopf { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.lesekopfText { flex: 1; min-width: 0; }
#leseVon { font-weight: 600; word-break: break-word; }
#leseAn { word-break: break-word; }
.anhaenge { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.anhang { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 8px 12px; border: 1px solid var(--linie); border-radius: 9px; background: var(--flaeche2); cursor: pointer; text-decoration: none; color: var(--text); }
.anhang:hover { border-color: var(--akzent); }
.anhang .aname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.anhang .klein { white-space: nowrap; }
.anhang.offline-ok svg { color: var(--akzent); }
.bilderhinweis { padding: 8px 12px; border-radius: 9px; background: var(--flaeche2); font-size: 13px; color: var(--text2); margin-bottom: 12px; }
#leseKoerper iframe { width: 100%; border: 0; background: #fff; border-radius: 8px; display: block; min-height: 120px; }
.textmail { white-space: pre-wrap; word-break: break-word; line-height: 1.55; font-size: 15px; }
.textmail a { color: var(--akzent); }
.textmail .zitat { color: var(--text2); border-left: 3px solid var(--linie); padding-left: 10px; display: block; }
.ladehinweis { color: var(--text2); padding: 20px 0; }

/* ---------- Kontextmenü ---------- */
#kontextmenue { position: fixed; z-index: 50; min-width: 220px; max-width: 320px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 12px; padding: 6px; box-shadow: 0 14px 40px rgba(0,0,0,.4); }
#kontextmenue .eintrag { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 12px; border: 0; background: none; border-radius: 8px; text-align: left; cursor: pointer; }
#kontextmenue .eintrag svg { width: 18px; height: 18px; color: var(--text2); }
#kontextmenue .eintrag:hover, #kontextmenue .eintrag:focus { background: var(--auswahl); outline: none; }
#kontextmenue .eintrag.gefahr { color: var(--gefahr); }
#kontextmenue .eintrag.gefahr svg { color: var(--gefahr); }
#kontextmenue .strich { height: 1px; background: var(--linie); margin: 5px 4px; }
#kontextmenue .titel { padding: 6px 12px 4px; font-size: 12px; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Ziehen ---------- */
#ziehBild { position: fixed; z-index: 60; pointer-events: none; padding: 8px 14px; border-radius: 20px; background: var(--akzent); color: var(--akzent-text); font-weight: 700; box-shadow: 0 8px 24px rgba(0,0,0,.35); transform: translate(12px, 12px); white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Dialoge ---------- */
.dialogebene { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.5); display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; padding: 16px; }
.dialog { width: min(560px, 100%); max-height: calc(100% - 20px); display: flex; flex-direction: column; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.45); }
.dialog.breit { width: min(820px, 100%); height: min(720px, 100%); }
.dialogkopf { display: flex; align-items: center; gap: 8px; padding: 12px 12px 10px 18px; border-bottom: 1px solid var(--linie); }
.dialogkopf h2 { flex: 1; margin: 0; font-size: 17px; }
.dialoginhalt { padding: 16px 18px; overflow-y: auto; min-height: 0; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; touch-action: pan-y; display: grid; gap: 14px; align-content: start; }
.dialogfuss { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 18px 16px; border-top: 1px solid var(--linie); }
.feld { display: grid; gap: 6px; }
.feld > span { font-size: 13px; color: var(--text2); }
.feldzeile { display: grid; grid-template-columns: 70px 1fr; align-items: center; gap: 8px; }
.feldzeile > span { color: var(--text2); font-size: 13.5px; }
.abschnitt h3 { margin: 4px 0 8px; font-size: 14px; cursor: default; }
.designs { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.designkarte { border: 2px solid var(--linie); border-radius: 12px; overflow: hidden; cursor: pointer; background: none; padding: 0; text-align: left; }
.designkarte.aktiv { border-color: var(--akzent); box-shadow: var(--leuchten); }
.designkarte .muster { height: 52px; display: grid; grid-template-columns: 1fr 2fr; }
.designkarte .muster i { display: block; }
.designkarte .muster b { display: block; margin: 12px 10px; height: 6px; border-radius: 3px; }
.designkarte .dname { display: block; padding: 6px 9px; font-size: 13px; }
.wahl { display: flex; flex-wrap: wrap; gap: 8px; }
.wahl button { border: 1px solid var(--linie); background: var(--flaeche2); padding: 7px 13px; border-radius: 18px; cursor: pointer; }
.wahl button.aktiv { background: var(--akzent); color: var(--akzent-text); border-color: var(--akzent); }
.schalter { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.schalter input { width: 44px; height: 26px; appearance: none; -webkit-appearance: none; border-radius: 13px; background: var(--linie); position: relative; cursor: pointer; flex: none; transition: background .15s; }
.schalter input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .15s; }
.schalter input:checked { background: var(--akzent); }
.schalter input:checked::after { left: 21px; }
.ordnerwahl { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.anleitung ol { margin: 0; padding-left: 22px; line-height: 1.8; }
.anleitung svg { width: 18px; height: 18px; vertical-align: -3px; color: var(--akzent); }
#schreibText { min-height: 260px; flex: 1; resize: none; line-height: 1.5; }
.schreibfeld { display: flex; flex-direction: column; gap: 8px; flex: 1; min-height: 0; }
.dialog.breit .dialoginhalt { flex: 1; display: flex; flex-direction: column; }
.anhangliste { display: flex; flex-wrap: wrap; gap: 6px; }
.anhangliste .anhang { padding: 5px 10px; }

#meldung { position: fixed; z-index: 70; left: 50%; bottom: calc(46px + var(--sicher-unten)); transform: translateX(-50%); background: var(--text); color: var(--hg); padding: 10px 16px; border-radius: 22px; font-size: 14px; display: flex; gap: 12px; align-items: center; max-width: calc(100% - 32px); box-shadow: 0 10px 30px rgba(0,0,0,.35); }
#meldung button { border: 0; background: none; color: var(--akzent); font-weight: 700; cursor: pointer; filter: brightness(.8); }

/* ---------- Handy ---------- */
@media (max-width: 820px) {
  :root { --kopfhoehe: 52px; }
  .nur-mobil { display: inline-grid !important; }
  #spalten { display: block; position: relative; overflow: hidden; }
  .trenner { display: none; }
  #listenSpalte, #leseSpalte { position: absolute; inset: 0; transition: transform .22s ease; }
  #leseSpalte { transform: translateX(100%); z-index: 3; }
  [data-ansicht="lesen"] #leseSpalte { transform: none; }
  [data-ansicht="lesen"] #listenSpalte { transform: translateX(-25%); }
  #ordnerSpalte { position: absolute; z-index: 5; top: 0; bottom: 0; left: 0; width: min(310px, 84%); transform: translateX(-102%); transition: transform .22s ease; box-shadow: 8px 0 30px rgba(0,0,0,.4); }
  [data-ordner-offen] #ordnerSpalte { transform: none; }
  [data-ordner-offen] #spalten::after { content: ""; position: absolute; inset: 0; z-index: 4; background: rgba(0,0,0,.4); }
  .suche { display: none; }
  .suche.offen { display: block; position: absolute; left: 8px; right: 8px; top: calc(var(--sicher-oben) + 8px); z-index: 6; max-width: none; }
  #knopfSuche { display: inline-grid; margin-left: auto; }
  #kopf h1 { flex: 1; margin-right: 0; } .kopflink { flex: 1; }
  [data-ansicht="lesen"] #knopfOrdnerAuf, [data-ansicht="lesen"] .kopflogo { display: none; }
  [data-ansicht="liste"] #knopfZurueck { display: none !important; }
  .leseinhalt { padding: 14px 16px 30px; }
  .leseleiste { overflow-x: auto; }
  .mail .zeichen svg { width: 14px; height: 14px; }
  .dialog, .dialog.breit { width: 100%; height: 100%; max-height: none; border-radius: 0; border: 0; padding-top: var(--sicher-oben); padding-bottom: var(--sicher-unten); }
  .dialogebene { padding: 0; }
  #kontextmenue { left: 8px !important; right: 8px; bottom: calc(8px + var(--sicher-unten)); top: auto !important; max-width: none; border-radius: 16px; padding: 8px; }
  #kontextmenue .eintrag { padding: 12px 14px; }
  #statuszeile { font-size: 12px; }
}

/* ---------- Anmeldung: Erweitert, Sprache ---------- */
.erweitert { text-align: left; border: 1px solid var(--linie); border-radius: var(--radius); padding: 8px 12px; }
.erweitert summary { cursor: pointer; color: var(--text2); font-size: 13.5px; }
.erweitert[open] { display: grid; gap: 8px; }
.erweitert[open] summary { margin-bottom: 4px; }
.erweitert .klein { margin: 0; }
.servergitter { display: grid; grid-template-columns: 1fr 76px 104px; gap: 6px; align-items: center; }
.servergitter b { grid-column: 1 / -1; font-size: 12.5px; color: var(--text2); font-weight: 600; margin-top: 4px; }
.servergitter select, .servergitter input { padding: 7px 8px; font-size: 13.5px; }
.mittig { justify-content: center; }
.wahl.klein button { padding: 4px 11px; font-size: 12.5px; }

/* ---------- QR-Code ---------- */
.qrbereich { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.qr { position: relative; width: 168px; height: 168px; background: #fff; border-radius: 12px; padding: 6px; flex: none; }
.qr svg { width: 100%; height: 100%; display: block; }
.qr img { position: absolute; left: 50%; top: 50%; width: 38px; height: 38px; transform: translate(-50%, -50%); background: #fff; border-radius: 50%; padding: 2px; }
.qrtext { flex: 1; min-width: 200px; display: grid; gap: 12px; }
.qrlink { color: var(--akzent); word-break: break-all; font-size: 14px; }
.qrknoepfe { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Anmeldung: Reiter ---------- */
.reiter { display: grid; grid-template-columns: 1fr 1fr; background: var(--flaeche2); border-radius: 10px; padding: 3px; gap: 3px; }
.reiter button { border: 0; background: none; padding: 8px; border-radius: 8px; cursor: pointer; color: var(--text2); font-weight: 600; }
.reiter button.aktiv { background: var(--flaeche); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.feldhinweis { font-size: 12.5px; text-align: left; margin-top: -8px; min-height: 0; }
.feldhinweis.gut { color: #3ccf6e; }
.feldhinweis.schlecht { color: var(--gefahr); }

/* ---------- Kontenköpfe in der Ordnerliste ---------- */
.kontokopf { display: flex; align-items: center; gap: 8px; padding: 12px 10px 4px; font-size: 12px; font-weight: 700; color: var(--text2); text-transform: none; letter-spacing: .2px; cursor: pointer; user-select: none; }
.kontokopf .kname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kontokopf .warn { color: var(--gefahr); }
.kontokopf svg { width: 14px; height: 14px; transition: transform .15s; }
.kontokopf.zu svg { transform: rotate(-90deg); }
/* Aktives Konto: wie ein Knopf mit Rahmen, Farben aus dem Design (lesbar in jedem Design) */
.kontokopf { border: 1.5px solid transparent; border-radius: 9px; margin: 8px 0 2px; padding: 7px 10px; font-size: inherit; color: var(--text); letter-spacing: 0; }
.kontokopf:hover { background: var(--flaeche2); }
.kontokopf.aktiv { border-color: var(--akzent); color: var(--text); }
.kontokopf.aktiv svg { color: var(--akzent); }

/* ---------- Lizenz ---------- */
#lizenzLeiste { display: flex; align-items: center; gap: 12px; padding: 6px 14px; background: var(--auswahl); color: var(--text); font-size: 13px; border-top: 1px solid var(--linie); }
#updateLeiste { min-width: 0; overflow: hidden; display: flex; align-items: center; gap: 10px; padding: 6px 14px; background: color-mix(in srgb, var(--akzent) 16%, var(--flaeche)); border-top: 1px solid var(--akzent); color: var(--text); font-size: 13px; }
#updateLeiste[hidden], #lizenzLeiste[hidden] { display: none; }
#updateLeiste span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#updateLeiste .knopf { flex: none; padding: 5px 12px; }
#lizenzLeiste.abgelaufen { background: var(--gefahr); color: #fff; }
#lizenzLeiste button { margin-left: auto; }

/* ---------- Listen in den Einstellungen ---------- */
.zeilenliste { display: grid; gap: 8px; }
.zeile { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--linie); border-radius: 10px; background: var(--flaeche2); flex-wrap: wrap; }
.zeile .zinfo { flex: 1; min-width: 160px; }
.zeile .zinfo b { display: block; word-break: break-all; }
.zeile .knoepfe { display: flex; gap: 6px; flex-wrap: wrap; }
.zeile .knopf { padding: 6px 10px; font-size: 13px; }
.marke { display: inline-block; font-size: 11px; padding: 2px 7px; border-radius: 10px; background: var(--akzent); color: var(--akzent-text); margin-left: 6px; vertical-align: 1px; }
.marke.grau { background: var(--linie); color: var(--text2); }
.marke.rot { background: var(--gefahr); color: #fff; }
.kontoform { display: grid; gap: 10px; }

/* ---------- Anmeldung: weitere Wege ---------- */
.anmweitere { display: grid; gap: 4px; justify-items: center; }
.anmweitere .textknopf { font-size: 13.5px; }
.geraetecode { font: 700 30px/1.2 ui-monospace, Consolas, monospace; letter-spacing: 3px; color: var(--akzent); margin: 4px 0; }
.geraetecode.alt { opacity: .35; text-decoration: line-through; }
.warteuhr { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--linie); border-top-color: var(--akzent); animation: dreh 1s linear infinite; margin: 8px auto; }
@keyframes dreh { to { transform: rotate(360deg); } }

/* ---------- Einstellungen mit Seiten ---------- */
.einstellungen { display: grid; grid-template-columns: 210px 1fr; gap: 20px; min-height: 60vh; align-items: start; align-content: start; }
.seitenwahl { display: grid; align-content: start; gap: 2px; }
.seitenauswahl { display: none; }
.seitenwahl button { display: flex; align-items: center; gap: 10px; border: 0; background: none; color: var(--text2); padding: 9px 10px; border-radius: 8px; cursor: pointer; text-align: left; font-size: 14px; }
.seitenwahl button svg { width: 18px; height: 18px; flex: none; }
.seitenwahl button:hover { background: var(--flaeche2); }
.seitenwahl button.aktiv { background: var(--auswahl); color: var(--text); font-weight: 600; }
.seite { display: grid; gap: 22px; align-content: start; min-width: 0; }
.serverzeile { display: grid; grid-template-columns: 1fr 90px 120px; gap: 8px; }
.serverzeile select, .kontoform select { width: 100%; }
.ueber { display: flex; gap: 14px; align-items: center; }
.ueber img { width: 56px; height: 56px; }
@media (max-width: 820px) {
  .einstellungen { grid-template-columns: 1fr; gap: 14px; }
  /* Gordon 30.10.: am Handy eine Auswahlliste statt Reiter zum Wischen */
  .seitenwahl { display: none; }
  .seitenauswahl { display: block; width: 100%; font-weight: 600; }
  /* Hauptseite der Einstellungen am Handy: alle Bereiche als Liste; X auf einer Unterseite führt hierher zurück */
  .einstellungen[data-ansicht="menue"] .seitenwahl { display: grid; gap: 6px; }
  .einstellungen[data-ansicht="menue"] .seitenwahl button { font-size: 16px; padding: 13px 12px; border: 1px solid var(--linie); border-radius: 12px; color: var(--text); background: var(--flaeche2); }
  .einstellungen[data-ansicht="menue"] .seitenwahl button.aktiv { font-weight: 400; }
  .einstellungen[data-ansicht="menue"] .seitenwahl button svg { width: 20px; height: 20px; color: var(--akzent); }
  .einstellungen[data-ansicht="menue"] .seite, .einstellungen[data-ansicht="menue"] .seitenauswahl { display: none; }
  .serverzeile { grid-template-columns: 1fr 1fr; }
  .serverzeile .feld:first-child { grid-column: 1 / -1; }
}

/* ---------- Speicher je Konto ---------- */
.speicherzeile { flex-basis: 100%; display: grid; gap: 3px; }
.balken { height: 6px; border-radius: 3px; background: var(--linie); overflow: hidden; }
.balken i { display: block; height: 100%; background: var(--akzent); }
.balken.voll i { background: var(--gefahr); }

/* Sicherung (0.1.2) */
.feldreihe { display: flex; flex-wrap: wrap; gap: 12px; }
.feldreihe .feld { flex: 1 1 160px; }
.feldreihe[hidden], .feldreihe .feld[hidden] { display: none; }
code.befehl { display: block; padding: 10px 12px; border-radius: 10px; background: var(--hg); border: 1px solid var(--linie); font: 13px/1.4 ui-monospace, Consolas, monospace; overflow-wrap: anywhere; user-select: all; }
#sicherungsBand .kurz { display: none; }
@media (max-width: 820px) { #sicherungsBand .lang { display: none; } #sicherungsBand .kurz { display: inline; } }
/* iPhone/Safari: Eingabefelder unter 16px lassen die Seite beim Antippen hineinzoomen
   und sie bleibt danach zu groß. Auf Touch-Geräten deshalb immer 16px. */
@media (pointer: coarse) {
  input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], input[type=time], textarea, select,
  .servergitter select, .servergitter input { font-size: 16px; }
}
html, body { overflow-x: hidden; max-width: 100%; }
#knopfAbruf.aktiv svg, #knopfAbruf.dreht svg { animation: dreh .9s linear infinite; color: var(--akzent); }

/* Lizenz: ganzer Token mit Kopieren (0.2.8) */
.tokenzeile { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 12px; }
.tokenzeile code { flex: 1 1 220px; min-width: 0; padding: 9px 12px; border: 1px solid var(--linie); border-radius: 9px; background: var(--flaeche2); color: var(--text); font: 600 15px/1.3 ui-monospace, Consolas, monospace; letter-spacing: .5px; overflow-wrap: anywhere; user-select: all; -webkit-user-select: all; }
#knopfSpamCheck.dreht svg { animation: puls 1s ease-in-out infinite; color: var(--akzent); }
@keyframes puls { 50% { transform: scale(.82); opacity: .6; } }
