/* ali.as – gemeinsames Design-System (Light + Dark umschaltbar).
 * Theme via [data-theme="light"|"dark"] auf <html>; ohne Attribut folgt
 * das Theme prefers-color-scheme. Toggle setzt localStorage('alias_theme').
 * Umlaute in Kommentaren absichtlich (UTF-8). */

:root {
  --radius: 14px;
  --radius-sm: 9px;
  --maxw: 720px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --shield-grad: linear-gradient(160deg, #2ea043, #1a7f37);
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
  --transition: 0.2s ease;
}

/* Dark (Default) */
:root,
[data-theme="dark"] {
  --bg: #0d1117;
  --bg-soft: #11161f;
  --card: #161b22;
  --card-2: #1c2230;
  --border: #2a313c;
  --text: #d6deea;
  --muted: #8b97a8;
  --accent: #58a6ff;
  --accent-2: #3fb950;
  --danger: #f85149;
  --warn: #d29922;
  --on-accent: #ffffff;
  --hero-glow: radial-gradient(60% 80% at 50% 0%, rgba(46, 160, 67, 0.22), transparent 70%);
}

/* Light */
[data-theme="light"] {
  --bg: #f6f8fb;
  --bg-soft: #eef2f7;
  --card: #ffffff;
  --card-2: #f2f5f9;
  --border: #d9e0ea;
  --text: #1c2430;
  --muted: #5b6675;
  --accent: #1f6feb;
  --accent-2: #1a7f37;
  --danger: #cf222e;
  --warn: #9a6700;
  --on-accent: #ffffff;
  --hero-glow: radial-gradient(60% 80% at 50% 0%, rgba(46, 160, 67, 0.14), transparent 70%);
  --shadow: 0 6px 22px rgba(20, 40, 70, 0.10);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font: 16px/1.6 var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Header ---------- */
.site-header {
  width: 100%;
  border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: saturate(140%) blur(8px);
}
.site-header .bar {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.7rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.brand { display: flex; align-items: center; gap: 0.55rem; font-weight: 700; font-size: 1.15rem; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand .logo { width: 28px; height: 28px; flex-shrink: 0; }
.brand .wordmark { letter-spacing: 0.3px; }
.brand .wordmark b { color: var(--accent-2); }
.spacer { flex: 1; }

.theme-toggle {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text);
  transition: var(--transition);
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.theme-toggle .icon-moon, .theme-toggle .icon-sun { width: 20px; height: 20px; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }
[data-theme="light"] .theme-toggle .icon-sun { display: none; }
:root:not([data-theme="light"]) .theme-toggle .icon-moon,
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
:root:not([data-theme="light"]) .theme-toggle .icon-sun,
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

/* ---------- Layout ---------- */
.container { max-width: var(--maxw); width: 100%; margin: 0 auto; padding: 1rem; }
main { flex: 1; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  background: var(--card); border: 1px solid var(--border); color: var(--text);
  padding: 0.6rem 1rem; border-radius: var(--radius-sm); cursor: pointer;
  font: inherit; font-weight: 600; min-height: 44px; transition: var(--transition);
}
.btn:hover { border-color: var(--accent); }
.btn:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.btn:disabled { opacity: 0.5; cursor: wait; }
.btn-primary {
  background: var(--accent-2); border-color: var(--accent-2); color: var(--on-accent); font-size: 1.1rem; padding: 0.9rem 1.8rem;
}
.btn-primary:hover { filter: brightness(1.08); border-color: var(--accent-2); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-danger { color: var(--danger); border-color: var(--danger); background: transparent; }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-sm { font-size: 0.82rem; padding: 0.35rem 0.65rem; min-height: 32px; }
.btn-block { width: 100%; }

/* ---------- Cards / Sections ---------- */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow);
}
.card h3 { color: var(--text); margin-bottom: 0.4rem; font-size: 1.1rem; font-weight: 700; }
.card p { color: var(--muted); font-size: 0.94rem; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 540px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.card-action { display: flex; flex-direction: column; }
.card-action .card-btn-bottom { margin-top: auto; padding-top: 0.8rem; }
.card-action .card-btn-bottom .btn { min-width: 120px; }
.section { padding: 1.5rem 1rem; }
.section h2 { font-size: 1.35rem; margin-bottom: 1rem; text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

/* Trust-Badges */
.trust-bar {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem;
  padding: 0.6rem; color: var(--muted); font-size: 0.84rem; text-align: center;
}
@media (min-width: 680px) { .trust-bar { grid-template-columns: repeat(4, 1fr); gap: 0.5rem 1rem; } }
.trust-bar .badge { display: inline-flex; align-items: center; gap: 0.4rem; cursor: pointer; transition: color 0.15s; white-space: nowrap; }
.trust-bar .badge svg { width: 16px; height: 16px; color: var(--accent-2); }
.trust-bar .badge:hover { color: var(--text); }
.trust-bar .badge::after { content: " ▾"; font-size: 0.6rem; opacity: 0; transition: opacity 0.15s; }
.trust-bar .badge:hover::after { opacity: 0.5; }

/* Steps */
.steps { max-width: 560px; margin: 0 auto; }
.step { display: flex; align-items: flex-start; gap: 1rem; padding: 0.7rem 0; text-align: left; opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.step.step-visible { opacity: 1; transform: translateY(0); }
.step:nth-child(2) { transition-delay: 0.1s; }
.step:nth-child(3) { transition-delay: 0.2s; }
.step-icon {
  flex-shrink: 0; width: 42px; height: 42px; border-radius: 50%;
  background: var(--shield-grad); color: #fff; display: flex;
  align-items: center; justify-content: center;
}
.step-icon svg { width: 22px; height: 22px; }
/* Spec: Schloss schließt sich beim Ins-Bild-Scrollen */
.step-icon-lock svg { transition: transform 0.4s ease; transform-origin: center; }
.step:not(.step-visible) .step-icon-lock svg { transform: rotate(-25deg) scale(0.85); opacity: 0.6; }
.step.step-visible .step-icon-lock svg { transform: rotate(0) scale(1); opacity: 1; }
.step-num {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%;
  background: var(--shield-grad); color: #fff; font-weight: 700; font-size: 0.95rem;
  display: flex; align-items: center; justify-content: center;
}
.step p { color: var(--muted); font-size: 0.94rem; }
.step strong { color: var(--text); }
@media (prefers-reduced-motion: reduce) { .step { opacity: 1; transform: none; transition: none; } .step-icon-lock svg { transition: none; transform: none; } }

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 2rem 1rem 1.2rem; position: relative; }
.hero::before { content: ""; position: absolute; inset: 0; background: var(--hero-glow); pointer-events: none; }
.hero .shield-big { width: 72px; height: 72px; margin: 0 auto 0.7rem; position: relative; }
.hero-secondary { opacity: 0.65; }
.hero h1 { font-size: 2.2rem; letter-spacing: -0.5px; margin-bottom: 0.6rem; }
.hero h1 .accent { color: var(--accent-2); }
.hero p.lead { color: var(--muted); font-size: 1.08rem; max-width: 540px; margin: 0 auto 1.2rem; }
.hero .cta-row { display: flex; justify-content: center; }
/* Spec 7: Schild-Icon sanft einsetzen beim Laden */
@keyframes shieldEntrance { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.shield-entrance { animation: shieldEntrance 0.25s ease-out; }
@media (prefers-reduced-motion: reduce) { .shield-entrance { animation: none; } }
.notice { text-align: center; padding: 0.3rem; font-size: 0.92rem; min-height: 1.4em; }
.notice.err { color: var(--danger); }
.notice.ok { color: var(--accent-2); }
.returner-expired { text-align: center; margin-top: 0.8rem; padding: 0.6rem; }

/* ---------- Spec 5: Limit-Hinweis – neutrale Karte, kein Rot ---------- */
.quota-exhausted {
  max-width: 480px; margin: 1rem auto; padding: 1.2rem 1.4rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--card); text-align: center; box-shadow: var(--shadow);
}
.quota-exhausted p { color: var(--text); font-weight: 700; font-size: 1rem; }
.quota-exhausted .quota-exhausted-sub { color: var(--muted); font-weight: 400; font-size: 0.88rem; margin-top: 0.4rem; }
.quota-exhausted a { color: var(--accent-2); font-weight: 600; }

/* ---------- Mobile (Startseite) ---------- */
@media (max-width: 539px) {
  .hero h1 { font-size: 1.7rem; }
  .hero .cta-row .btn { width: 100%; min-height: 48px; }
  .hero p.lead { font-size: 1rem; }
}

/* ---------- Inbox ---------- */
.top-bar { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem; margin-bottom: 1rem; box-shadow: var(--shadow); }
.addr-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.8rem; flex-wrap: wrap; }
.addr { font-size: 1.25rem; font-weight: 700; color: var(--accent); word-break: break-all; flex: 1; font-family: var(--mono); }
.countdown { font-size: 0.95rem; color: var(--muted); margin-bottom: 0.5rem; }
.countdown-bar { height: 7px; background: var(--border); border-radius: 4px; overflow: hidden; margin-bottom: 0.6rem; }
.countdown-fill { height: 100%; background: var(--accent-2); border-radius: 4px; transition: width 1s linear, background 0.3s; }
.countdown-fill.urgent { background: var(--danger); animation: pulse 1s infinite; }
.countdown-fill.warning { background: var(--warn); }
.countdown.warning { color: var(--warn); }
.countdown.urgent { animation: redpulse 1s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes redpulse { 0%,100% { color: var(--danger); } 50% { color: #ff7a72; } }
@media (prefers-reduced-motion: reduce) { .countdown-fill.urgent, .countdown.urgent { animation: none; } * { transition-duration: 0.01ms !important; } }

.toggle-row { display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0; border-top: 1px solid var(--border); margin-top: 0.5rem; }
.toggle { position: relative; width: 46px; height: 26px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; cursor: pointer; inset: 0; background: var(--border); border-radius: 26px; transition: 0.3s; }
.toggle-slider:before { content: ""; position: absolute; height: 20px; width: 20px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: 0.3s; }
.toggle input:checked + .toggle-slider { background: var(--accent-2); }
.toggle input:checked + .toggle-slider:before { transform: translateX(20px); }
.toggle input:focus-visible + .toggle-slider { outline: 2px solid var(--accent); outline-offset: 2px; }
.toggle-label { font-size: 0.88rem; color: var(--muted); }
.toggle-help { display: none; margin-top: 0.3rem; padding: 0.6rem; background: var(--bg-soft); border-radius: var(--radius-sm); font-size: 0.82rem; color: var(--muted); line-height: 1.5; }
.toggle-help.open { display: block; }

.toolbar { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
@keyframes checkSpin { 0% { transform: rotate(0); } 100% { transform: rotate(360deg); } }
.btn.spinning { pointer-events: none; }
.btn.spinning svg { animation: checkSpin 0.6s ease-out; }

.mail-list { list-style: none; }
.mail-item { position: relative; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 0.4rem; transition: border-color 0.2s; }
.mail-item:hover { border-color: var(--accent); }
.mail-item.unread { border-left: 3px solid var(--accent-2); }
.mail-item.read .mail-head, .mail-item.read .mail-subject, .mail-item.read .mail-preview { opacity: 0.72; }
/* Swipe-Hintergrund (Mobil: Wischen links = Löschen) */
.swipe-bg { position: absolute; right: 0; top: 0; bottom: 0; width: 80px; display: flex; align-items: center; justify-content: center; font-size: 0.82rem; font-weight: 600; color: var(--muted); }
.mail-content { position: relative; background: var(--card); padding: 0.7rem 0.9rem; cursor: pointer; transition: transform 0.2s ease; }
.mail-item.unread .mail-content { padding-left: calc(0.9rem - 3px); }
.mail-item.swiping .mail-content { transition: none; }
/* Hover-Aktionen: dezente Icons rechts, nur Desktop */
.mail-content .quick-actions { position: absolute; right: 0.4rem; top: 50%; transform: translateY(-50%); display: flex; gap: 0.1rem; opacity: 0; transition: opacity 0.15s; background: linear-gradient(to left, var(--card) 65%, transparent); padding-left: 1.5rem; }
.mail-item:hover .quick-actions { opacity: 1; }
@media (hover: none) { .mail-content .quick-actions { display: none; } }
.quick-actions .qa-btn { background: none; border: none; cursor: pointer; color: var(--muted); padding: 0.35rem; border-radius: var(--radius-sm); display: inline-flex; align-items: center; justify-content: center; min-width: 32px; min-height: 32px; transition: color 0.15s, background 0.15s; }
.quick-actions .qa-btn:hover { color: var(--text); background: var(--bg-soft); }
.quick-actions .qa-btn.qa-delete:hover { color: var(--danger); }
.quick-actions .qa-btn svg { width: 16px; height: 16px; }
.mail-head { display: flex; align-items: baseline; gap: 0.5rem; }
.mail-from { font-weight: 700; font-size: 0.92rem; color: var(--text); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-time { font-size: 0.72rem; color: var(--muted); flex-shrink: 0; }
.mail-subject { font-size: 0.92rem; margin: 0.1rem 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-preview { font-size: 0.82rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.6rem; padding-top: 0.6rem; border-top: 1px solid var(--border); }

.mail-detail { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.3rem; margin-bottom: 1rem; box-shadow: var(--shadow); animation: panelSlideIn 0.3s ease-out; }
@keyframes panelSlideIn { 0% { opacity: 0; transform: translateY(20px); } 100% { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .mail-detail { animation: none; } }
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.empty .shield-dim { width: 56px; height: 56px; opacity: 0.4; margin: 0 auto 0.8rem; }
.empty p { margin: 0.4rem 0; }

/* ---------- Modal ---------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.55); display: none; align-items: center; justify-content: center; padding: 1rem; z-index: 50; }
.modal-overlay.open { display: flex; }
.modal { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem; max-width: 480px; width: 100%; box-shadow: var(--shadow); max-height: 90vh; overflow: auto; }
.modal h2 { font-size: 1.2rem; margin-bottom: 0.8rem; }
.modal .field { margin-bottom: 0.9rem; }
.modal label { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 0.3rem; }
.modal input[type=text], .modal input[type=email], .modal textarea, .modal select {
  width: 100%; background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); padding: 0.6rem; font: inherit;
}
.modal input:focus-visible, .modal textarea:focus-visible, .modal select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.modal textarea { resize: vertical; font-family: var(--mono); }
.modal .pay-box { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1rem; margin: 0.8rem 0; font-family: var(--mono); font-size: 0.9rem; word-break: break-all; }
.modal .modal-actions { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 0.4rem; }

/* ---------- Login-Formular ---------- */
.login-card { max-width: 480px; margin: 0 auto; }
.login-form .field { margin-bottom: 0.9rem; }
.login-form label { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 0.3rem; }
.login-form textarea {
  width: 100%; background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); padding: 0.6rem; font: inherit; font-family: var(--mono); resize: vertical; box-sizing: border-box;
}
.login-form textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.login-form .btn-primary { margin-top: 0.4rem; }

/* ---------- Toast ---------- */
.toast { position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%); background: var(--card); border: 1px solid var(--border); border-left: 3px solid var(--accent-2); border-radius: var(--radius-sm); padding: 0.7rem 1.1rem; box-shadow: var(--shadow); z-index: 60; opacity: 0; transition: opacity 0.25s, transform 0.25s; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-4px); pointer-events: auto; }
.toast.err { border-left-color: var(--danger); }

/* ---------- Statische Seiten ---------- */
.page { max-width: var(--maxw); margin: 0 auto; padding: 2.5rem 1rem; }
.page h1 { font-size: 1.8rem; margin-bottom: 1rem; }
.page h2 { font-size: 1.3rem; margin: 1.4rem 0 0.5rem; }
.page h3 { color: var(--accent); margin: 1.2rem 0 0.3rem; font-size: 1.05rem; }
.page p { color: var(--muted); margin: 0.5rem 0; }
.page strong { color: var(--text); }
.page ul { margin: 0.5rem 0 0.5rem 1.4rem; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { width: 100%; border-top: 1px solid var(--border); margin-top: 2rem; }
.site-footer .inner { max-width: var(--maxw); margin: 0 auto; padding: 1.6rem 1rem; display: flex; flex-wrap: wrap; gap: 0.5rem 1.2rem; justify-content: center; }
.site-footer a { color: var(--muted); font-size: 0.88rem; }
.site-footer a:hover { color: var(--accent); }
.site-footer .copy { width: 100%; text-align: center; color: var(--muted); font-size: 0.8rem; margin-top: 0.6rem; }

.hidden { display: none !important; }

/* ---------- Spec: Partikel-Löschung (Charme des Verschwindens) ---------- */
@keyframes dissolve { 0% { opacity: 1; transform: scale(1); } 40% { opacity: 0.6; transform: scale(0.98); } 100% { opacity: 0; transform: scale(0.9) translateY(-12px); filter: blur(4px); } }
.dissolving { animation: dissolve 0.6s ease-out forwards; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .dissolving { animation: none; opacity: 0; transition: opacity 0.2s; } }

/* ---------- Spec: Mail-Ankunft (Slide-in + Glow) ---------- */
@keyframes slideInGlow { 0% { opacity: 0; transform: translateY(-16px); } 60% { box-shadow: 0 0 16px rgba(63,185,80,0.4); } 100% { opacity: 1; transform: translateY(0); } }
.mail-item.newly-arrived { animation: slideInGlow 0.5s ease-out; }
@media (prefers-reduced-motion: reduce) { .mail-item.newly-arrived { animation: none; } }

/* ---------- Spec: Verifizierungscode-Detektor ---------- */
.code-detector { background: var(--card-2); border: 2px solid var(--accent-2); border-radius: var(--radius); padding: 1.2rem; margin-bottom: 1rem; text-align: center; }
.code-detector .code-big { font-size: 2rem; font-weight: 800; font-family: var(--mono); letter-spacing: 4px; color: var(--accent-2); margin: 0.4rem 0; }
.code-detector .code-label { font-size: 0.82rem; color: var(--muted); }
.link-detector { background: var(--card-2); border: 1px solid var(--accent-2); border-radius: var(--radius); padding: 1rem; margin-bottom: 1rem; }
.link-detector .link-url { font-size: 0.78rem; color: var(--muted); word-break: break-all; margin-top: 0.4rem; font-family: var(--mono); }

/* ---------- Spec: Trust-Section klickbar ---------- */
.trust-bar .badge { cursor: pointer; position: relative; }
.trust-explain { max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s; padding: 0 1rem; color: var(--muted); font-size: 0.84rem; text-align: center; }
.trust-explain.open { max-height: 120px; padding: 0.5rem 1rem; }

/* ---------- Spec: Schmiede-Moment (Schlüsselerzeugung) ---------- */
@keyframes forgeSpark { 0%,100% { opacity: 0.3; } 50% { opacity: 1; } }
.forge-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center; z-index: 70; }
.forge-box { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem 2.5rem; text-align: center; max-width: 380px; }
.forge-box .forge-icon { width: 48px; height: 48px; margin: 0 auto 0.8rem; animation: forgeSpark 0.8s infinite; }
.forge-box p { color: var(--muted); font-size: 0.92rem; line-height: 1.5; }
@media (prefers-reduced-motion: reduce) { .forge-box .forge-icon { animation: none; } }

/* ---------- Spec: Schild-Block-Animation ---------- */
@keyframes shieldDrop { 0% { opacity: 0; transform: scale(0.5) rotate(-10deg); } 60% { transform: scale(1.1); } 100% { opacity: 1; transform: scale(1) rotate(0); } }
.shield-success { text-align: center; padding: 1.5rem; }
.shield-success .shield-anim { width: 80px; height: 80px; margin: 0 auto 1rem; animation: shieldDrop 0.6s ease-out; }
@media (prefers-reduced-motion: reduce) { .shield-success .shield-anim { animation: none; } }

/* ---------- Weiterleitungs-Bestätigungsseite (DOI) ---------- */
.confirm-hero { max-width: 540px; margin: 0 auto; padding: 3rem 1rem 2.4rem; }
.confirm-hero .shield-big { width: 84px; height: 84px; margin: 0 auto 1rem; }
.confirm-hero.confirm-error::before { display: none; }
.confirm-hero.confirm-error .shield-big { animation: shieldDrop 0.6s ease-out; }
.confirm-hero h1 { font-size: 1.7rem; margin-bottom: 0.5rem; }
.confirm-hero.confirm-ok h1 .accent { color: var(--accent-2); }
.confirm-hero.confirm-error h1 { color: var(--danger); }
.confirm-hero p.lead { max-width: 460px; font-size: 1.02rem; }
.confirm-target { font-size: 0.92rem; color: var(--muted); margin: 0.5rem auto 1.4rem; }
.confirm-target .mono-pill {
  font-family: var(--mono); color: var(--accent-2); font-weight: 600;
  background: var(--card-2); border: 1px solid var(--border);
  padding: 0.22rem 0.7rem; border-radius: 999px; font-size: 0.86rem;
}
.confirm-hero.confirm-error .confirm-target .mono-pill { color: var(--danger); }
.confirm-hint { margin-top: 1rem; }
.shield-broken {
  display: flex; align-items: center; justify-content: center;
  color: var(--danger); background: var(--card); border: 2px solid var(--danger);
  border-radius: 50%; padding: 18px;
}
.shield-broken svg { width: 100%; height: 100%; display: block; }
@media (prefers-reduced-motion: reduce) { .confirm-hero .shield-big { animation: none; } }
@media (max-width: 539px) {
  .confirm-hero { padding-top: 2.2rem; }
  .confirm-hero h1 { font-size: 1.4rem; }
  .confirm-hero .shield-big { width: 72px; height: 72px; }
  .confirm-hero .cta-row .btn { width: 100%; min-height: 48px; }
}

/* ---------- Spec: Backup-Karte (einmalig) ---------- */
.backup-card { background: var(--card); border: 2px solid var(--warn); border-radius: var(--radius); padding: 1.4rem; margin-bottom: 1rem; }
.backup-card h3 { color: var(--warn); margin-bottom: 0.5rem; }
.backup-card p { color: var(--muted); font-size: 0.9rem; margin: 0.5rem 0; }
.backup-card .backup-actions { display: flex; gap: 0.6rem; margin-top: 0.8rem; flex-wrap: wrap; }

/* ---------- Spec: Willkommen-zurück-Karte ---------- */
.welcome-back { background: var(--card); border: 1px solid var(--accent-2); border-radius: var(--radius); padding: 1.2rem; margin: 1rem auto 0.5rem; max-width: 480px; text-align: center; box-shadow: var(--shadow); }
.welcome-back h2 { font-size: 1.3rem; margin-bottom: 0.5rem; }
.welcome-back .addr-preview { font-family: var(--mono); color: var(--accent-2); font-weight: 600; }
.welcome-back .time-left { color: var(--muted); font-size: 0.9rem; margin: 0.3rem 0 0.8rem; }

/* ---------- Spec: Tippen-zum-Kopieren ---------- */
.tap-hint { font-size: 0.75rem; color: var(--muted); text-align: center; margin-top: 0.2rem; opacity: 0.7; }

/* ---------- Spec: Unread Dot ---------- */
.unread-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); margin-right: 0.4rem; flex-shrink: 0; }
@keyframes dotFade { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(0); } }
.unread-dot.fading { animation: dotFade 0.3s forwards; }

/* ---------- Spec: Charakterzähler ---------- */
.char-count { font-size: 0.78rem; color: var(--muted); text-align: right; margin-top: 0.2rem; }

/* ---------- Spec: Offline-Status ---------- */
.offline-banner { background: var(--warn); color: #fff; text-align: center; padding: 0.5rem; font-size: 0.85rem; }

/* ---------- Spec: Ablauf-Animation ---------- */
@keyframes expiryDissolve { 0% { opacity: 1; } 50% { opacity: 0.4; filter: blur(3px); } 100% { opacity: 0; filter: blur(8px); transform: translateY(-30px); } }
.expiry-anim { animation: expiryDissolve 1.5s ease-out forwards; }
@media (prefers-reduced-motion: reduce) { .expiry-anim { animation: none; opacity: 0; } }
.expiry-message { text-align: center; padding: 3rem 1rem; }
.expiry-message h2 { font-size: 1.6rem; margin-bottom: 0.5rem; }
.expiry-message p { color: var(--muted); margin-bottom: 1.2rem; }

/* ---------- Spec: Export-Hinweis ---------- */
.export-hint { font-size: 0.8rem; color: var(--muted); margin-top: 0.5rem; text-align: center; }

/* ---------- Spec: Confirmation-Dialog (statt confirm()) ---------- */
.confirm-dialog { text-align: center; }
.confirm-dialog .confirm-msg { color: var(--muted); font-size: 0.94rem; margin-bottom: 1rem; line-height: 1.5; }
.confirm-dialog .confirm-actions { display: flex; gap: 0.6rem; justify-content: center; }

/* ---------- Spec: HTML-Ansicht Toggle (Text / HTML) ---------- */
.view-toggle { display: inline-flex; gap: 0; margin: 0.6rem 0; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.view-toggle .btn { border: none; border-radius: 0; min-height: 34px; padding: 0.3rem 0.9rem; background: transparent; color: var(--muted); }
.view-toggle .btn:hover { border: none; color: var(--text); background: var(--bg-soft); }
.view-toggle .btn.active { background: var(--accent); color: #fff; border: none; }
.view-toggle .btn.active:hover { background: var(--accent); color: #fff; }
#bodyHtml { width: 100%; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; margin-top: 0.6rem; }

/* ---------- Spec: Sperren-Symbol pro Mail ---------- */
.lock-indicator { display: inline-flex; align-items: center; gap: 0.2rem; color: var(--accent-2); font-size: 0.72rem; }
.lock-indicator svg { width: 12px; height: 12px; }
/* Spec 4.3: Schloss in der Mail-Liste */
.list-lock { display: inline-flex; align-items: center; color: var(--accent-2); flex-shrink: 0; margin-left: auto; }
.list-lock svg { width: 14px; height: 14px; }

/* ---------- Spec 3.3.1: Bilder-Blocking-Hinweis ---------- */
.img-block-hint { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.5rem 0.8rem; font-size: 0.82rem; color: var(--muted); margin: 0.5rem 0; display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.link-btn { background: none; border: none; cursor: pointer; color: var(--accent-2); font: inherit; font-size: 0.82rem; padding: 0; text-decoration: underline; }

/* ---------- Spec: Premium-Seite Vorschläge ---------- */
.name-suggestions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.6rem; }
.name-suggestions .suggestion { background: var(--card-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.3rem 0.8rem; cursor: pointer; font-size: 0.85rem; color: var(--accent); }
.name-suggestions .suggestion:hover { border-color: var(--accent); }

/* =========================================================================
   Inbox-Redesign – neue visuelle Hierarchie
   (Adress-Karte → Schutz-Panel → Mail-Liste → Export → Lösch-Link)
   ========================================================================= */

/* Schmalere Inbox (fokussiertes Ein-Spalten-Werkzeug, nur Inbox-Seite) */
.inbox-page .container { max-width: 640px; }

/* Outline-Button (sekundär, nicht dominant) */
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--accent-2); color: var(--accent-2); }

/* ---------- Zone 1: Adress-Karte ---------- */
.addr-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.6rem 1.2rem 1.2rem; margin-bottom: 0.7rem; box-shadow: var(--shadow); text-align: center; }
.addr-tap { cursor: pointer; display: block; border-radius: var(--radius-sm); padding: 0.3rem; transition: background 0.15s; }
.addr-tap:hover { background: var(--bg-soft); }
.addr-tap:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.addr-tap:active { background: var(--card-2); }
.addr-card .addr { font-size: 1.45rem; font-weight: 700; color: var(--accent-2); word-break: break-all; font-family: var(--mono); display: block; line-height: 1.3; transition: color 0.2s; }
.addr-card .addr.addr-copied { color: var(--accent-2); font-size: 1.05rem; }
.addr-card .tap-hint { font-size: 0.75rem; color: var(--muted); text-align: center; margin-top: 0.3rem; opacity: 0.65; }
.addr-card .countdown { font-size: 0.88rem; color: var(--muted); margin: 0.7rem 0 0.3rem; }
.addr-card .countdown-bar { height: 5px; background: var(--border); border-radius: 4px; overflow: hidden; margin-bottom: 0.9rem; }
.addr-card .countdown-fill { height: 100%; background: var(--accent-2); border-radius: 4px; transition: width 1s linear, background 0.3s; }
.addr-card .addr-actions { display: flex; gap: 0.5rem; justify-content: center; }
.addr-card .addr-actions .btn { flex: 1; }
.addr-card .ic { width: 15px; height: 15px; }

/* ---------- Sticky Mini-Timer ---------- */
.sticky-timer { position: fixed; top: 0; left: 0; right: 0; z-index: 30; background: var(--bg-soft); border-bottom: 1px solid var(--border); padding: 0.35rem 1rem; display: flex; align-items: center; gap: 0.6rem; transform: translateY(-100%); transition: transform 0.25s ease; box-shadow: 0 2px 8px rgba(0,0,0,0.12); }
.sticky-timer.show { transform: translateY(0); }
.sticky-timer-text { font-size: 0.78rem; color: var(--muted); white-space: nowrap; flex-shrink: 0; font-family: var(--mono); }
.sticky-timer-track { flex: 1; height: 4px; background: var(--border); border-radius: 3px; overflow: hidden; }
.sticky-timer-fill { height: 100%; background: var(--accent-2); border-radius: 3px; transition: width 1s linear, background 0.3s; }
.sticky-timer-fill.warning { background: var(--warn); }
.sticky-timer-fill.urgent { background: var(--danger); }

/* ---------- Zone 2: Schutz-Panel ---------- */
.shield-panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 0.7rem; overflow: hidden; }
.shield-summary { width: 100%; display: flex; align-items: center; gap: 0.5rem; padding: 0.7rem 0.9rem; background: none; border: none; cursor: pointer; color: var(--text); font: inherit; font-size: 0.88rem; text-align: left; transition: background 0.15s; }
.shield-summary:hover { background: var(--bg-soft); }
.shield-summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.shield-icon { width: 17px; height: 17px; color: var(--accent-2); flex-shrink: 0; }
.shield-status { flex: 1; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shield-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); flex-shrink: 0; box-shadow: 0 0 6px var(--warn); }
.shield-chevron { width: 16px; height: 16px; color: var(--muted); flex-shrink: 0; transition: transform 0.2s; }
.shield-panel.open .shield-chevron { transform: rotate(180deg); }
.shield-body { padding: 0 0.9rem 0.7rem; }
.shield-toggle-row { display: flex; align-items: center; gap: 0.7rem; padding: 0.7rem 0; border-top: 1px solid var(--border); min-height: 44px; cursor: pointer; }
.shield-toggle-row:hover { background: var(--bg-soft); }
.shield-toggle-info { flex: 1; }
.shield-toggle-title { font-size: 0.9rem; font-weight: 600; color: var(--text); }
.shield-help { color: var(--accent); font-size: 0.82rem; text-decoration: none; margin-left: 0.2rem; }
.shield-help:hover { text-decoration: underline; }
.shield-toggle-desc { font-size: 0.78rem; color: var(--muted); margin-top: 0.1rem; }
.shield-key-warning { padding: 0.7rem 0; border-top: 1px solid var(--border); font-size: 0.82rem; }
.shield-forward-body { padding: 0.6rem 0 0.3rem; border-top: 1px solid var(--border); }
.shield-forward-status { font-size: 0.82rem; color: var(--muted); margin-bottom: 0.5rem; }
.shield-forward-status.is-active { color: var(--accent-2); font-weight: 600; }
.shield-forward-body .field { margin-bottom: 0.6rem; }
.shield-forward-body label { display: block; font-weight: 600; font-size: 0.82rem; margin-bottom: 0.25rem; }
.shield-forward-body input[type=email] { width: 100%; background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); padding: 0.55rem; font: inherit; box-sizing: border-box; }
.shield-forward-body input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.shield-forward-actions { display: flex; gap: 0.5rem; align-items: center; margin-top: 0.3rem; }
.shield-panel.open .shield-body { animation: shieldExpand 0.2s ease-out; }
@keyframes shieldExpand { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .shield-panel.open .shield-body { animation: none; } .sticky-timer { transition: none; } }

/* ---------- Zone 3: Listen-Kopf ---------- */
.list-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.4rem; padding: 0 0.2rem; }
.list-title { font-size: 0.82rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.icon-btn { background: none; border: none; cursor: pointer; color: var(--muted); padding: 0.35rem; border-radius: var(--radius-sm); display: inline-flex; align-items: center; justify-content: center; transition: color 0.15s, background 0.15s; }
.icon-btn:hover { color: var(--text); background: var(--bg-soft); }
.icon-btn:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 1px; }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn.spinning svg { animation: checkSpin 0.8s linear infinite; }

/* ---------- Zone 4: Export (am Listenende) ---------- */
.export-section { margin-top: 0.8rem; text-align: center; }

/* ---------- Zone 5: Lösch-Link (ganz unten) ---------- */
.bottom-actions { margin-top: 1.5rem; padding-top: 1.2rem; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: center; gap: 1.2rem; }
.link-danger { background: none; border: none; cursor: pointer; color: var(--danger); font: inherit; font-size: 0.88rem; padding: 0.4rem; transition: opacity 0.15s; }
.link-danger:hover { opacity: 0.7; text-decoration: underline; }
.link-danger:focus-visible { outline: 2px solid var(--danger); outline-offset: 2px; border-radius: 3px; }

/* ---------- Swipe-Aktionen (Mobil: Wischen links = Löschen, rechts = Aktionen) ---------- */
/* .swipe-bg sitzt hinter .mail-content und wird beim Wischen sichtbar */
.swipe-bg { position: absolute; top: 0; bottom: 0; width: 80px; display: flex; align-items: center; justify-content: center; font-size: 0.82rem; font-weight: 600; color: var(--muted); }
.swipe-bg-left { right: 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.swipe-bg-right { left: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); }

/* ---------- Pull-to-Refresh ---------- */
.ptr-indicator { position: fixed; top: 60px; left: 50%; transform: translateX(-50%) translateY(-40px); z-index: 28; width: 36px; height: 36px; border-radius: 50%; background: var(--card); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--muted); box-shadow: var(--shadow); opacity: 0; transition: transform 0.2s, opacity 0.2s; pointer-events: none; }
.ptr-indicator svg { width: 18px; height: 18px; }
.ptr-indicator.ptr-active { opacity: 1; }
.ptr-indicator.ptr-spin svg { animation: checkSpin 0.8s linear infinite; }

/* ---------- Undo-Toast (Lösch-Poesie) ---------- */
.toast .undo-link { color: var(--accent-2); margin-left: 0.5rem; font-weight: 600; }

/* ---------- Mobile Optimierung ---------- */
@media (max-width: 540px) {
  .addr-card .addr { font-size: 1.2rem; }
  .addr-card .addr.addr-copied { font-size: 0.92rem; }
  .addr-card .addr-actions { flex-direction: column; }
  .addr-card .addr-actions .btn { width: 100%; min-height: 48px; }
  .shield-summary { font-size: 0.82rem; }
  .mail-item { padding: 0.6rem 0.8rem; }
}

/* Reduced-Motion: Sticky-Timer ohne Slide */
@media (prefers-reduced-motion: reduce) {
  .sticky-timer { transition: none; }
  .ptr-indicator { transition: none; }
}

/* =========================================================================
   Mail-Lese-Ansicht (alias-mailansicht.txt) – der Bildschirm gehoert der Mail
   ========================================================================= */

/* Kopfzeile des Mail-Panels: Zurueck-Icon links, "⋯"-Menue rechts */
.mail-detail-top { display: flex; align-items: center; gap: 0.4rem; margin: -0.35rem -0.4rem 0.25rem; }
.mail-detail-top .icon-btn { width: 44px; height: 44px; color: var(--text); flex-shrink: 0; }
.mail-detail-top .icon-btn svg { width: 20px; height: 20px; }

/* "⋯"-Menue (Ansicht-Wechsel, Teilen) */
.mail-menu-wrap { position: relative; }
.mail-menu { position: absolute; right: 0; top: calc(100% + 2px); min-width: 230px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow); z-index: 40; overflow: hidden; }
.mail-menu-item { display: block; width: 100%; text-align: left; background: none; border: none; color: var(--text); font: inherit; font-size: 0.88rem; padding: 0.65rem 0.9rem; cursor: pointer; min-height: 44px; }
.mail-menu-item:hover { background: var(--bg-soft); }

/* Mail-Kopf: Betreff gross, Absender fett, Zeit klein grau, Badges rechts */
.mail-detail-subject { font-size: 1.25rem; font-weight: 700; line-height: 1.35; margin: 0.15rem 0 0.3rem; word-break: break-word; }
.mail-detail-subject.no-subject { color: var(--muted); font-weight: 500; }
.mail-detail-meta { display: flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap; padding-bottom: 0.7rem; border-bottom: 1px solid var(--border); }
.mail-detail-from { font-weight: 700; color: var(--text); font-size: 0.95rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.mail-detail-time { font-size: 0.78rem; color: var(--muted); flex-shrink: 0; }
.mail-detail-badges { margin-left: auto; display: inline-flex; align-items: center; gap: 0.7rem; flex-shrink: 0; }
.tracker-badge { display: inline-flex; align-items: center; gap: 0.25rem; color: var(--accent-2); font-size: 0.78rem; }

/* Mail-Inhalt: Leseschrift statt Monospace, frei stehend (kein grauer
 * Kasten), max. ~70 Zeichen Zeilenlaenge. Monospace bleibt Codes/Adressen
 * vorbehalten. */
.mail-body-text { white-space: pre-wrap; word-wrap: break-word; font-size: 0.95rem; line-height: 1.65; margin-top: 0.7rem; max-width: 70ch; }
.mail-link { color: var(--accent-2); text-decoration: underline; word-break: break-all; }

/* Link-Detektor: "Link öffnen" + kleines "Erst ansehen" */
.link-detector-actions { display: flex; align-items: center; gap: 0.8rem; margin-top: 0.5rem; flex-wrap: wrap; }

/* Spam-Sektion: graue Textzeile + ruhiger roter Text-Link */
.spam-section { margin-top: 1.2rem; padding-top: 0.8rem; border-top: 1px solid var(--border); text-align: center; }
.spam-section .spam-link { font-size: 0.85rem; padding: 0.3rem; margin-top: 0.2rem; }

/* Aktionsleiste: sticky am unteren Rand des Mail-Panels.
 * Löschen = grüner Primaer-Button ganz links (Erfolgsritual), Rest neutral. */
.mail-detail .mail-actions { position: sticky; bottom: 0; z-index: 6; display: flex; gap: 0.5rem; margin: 1rem -1.3rem -1.3rem; padding: 0.7rem 1.3rem; background: var(--card); border-top: 1px solid var(--border); border-radius: 0 0 var(--radius) var(--radius); }
.mail-detail .mail-actions .btn { flex: 1 1 auto; }
.mail-detail .mail-actions .btn-delete { font-size: 0.95rem; min-height: 44px; }
.mail-detail .mail-actions .btn .ic { width: 14px; height: 14px; }
@media (max-width: 540px) {
  .mail-detail .mail-actions { flex-wrap: wrap; }
  .mail-detail .mail-actions .btn-delete { flex: 1 1 100%; min-height: 48px; }
}

/* ---------- Lese-Modus: alles über der Mail kollabiert zur schmalen
 * Sticky-Leiste (Adresse klein + Mini-Timer-Balken rechts, max. 48 px) */
.mail-reading .shield-panel,
.mail-reading .list-header,
.mail-reading .export-section,
.mail-reading .bottom-actions,
.mail-reading .empty,
.mail-reading .backup-card,
.mail-reading .sticky-timer,
.mail-reading #expiryHintHolder { display: none !important; }

.mail-reading .addr-card {
  position: sticky; top: var(--header-h, 56px); z-index: 25;
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.3rem 0.8rem; margin-bottom: 0.6rem;
  text-align: left; max-height: 48px; overflow: hidden;
}
.mail-reading .addr-card .addr-tap { flex: 1; min-width: 0; padding: 0.2rem 0.3rem; }
.mail-reading .addr-card .addr { font-size: 0.85rem; font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-reading .addr-card .addr.addr-copied { font-size: 0.8rem; }
.mail-reading .addr-card .tap-hint,
.mail-reading .addr-card .countdown,
.mail-reading .addr-card .addr-actions { display: none; }
.mail-reading .addr-card .countdown-bar { flex: 0 0 72px; height: 4px; margin: 0; }
@media (max-width: 540px) {
  .mail-reading .addr-card .countdown-bar { flex-basis: 48px; }
}

/* =========================================================================
   Subdomain-Verwaltung – Dashboard (alias-subdomainverwaltung.txt)
   ========================================================================= */
.dash-page .container { max-width: 680px; }

.dash-head { padding: 1.4rem; margin-bottom: 1rem; }
.dash-head-row { display: flex; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.dash-head-main { flex: 1; min-width: 200px; }
.dash-head-main h1 { font-size: 1.6rem; font-family: var(--mono); color: var(--accent-2); word-break: break-all; }
.dash-head-settings { margin-top: 1rem; display: flex; flex-direction: column; gap: 0.8rem; }
.dash-setting { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.dash-setting-label { font-size: 0.85rem; color: var(--muted); }
.dash-forward-status { font-size: 0.88rem; color: var(--text); flex: 1; min-width: 140px; }
.dash-forward-status.is-active { color: var(--accent-2); font-weight: 600; }
.dash-help { margin-top: 1rem; border-top: 1px solid var(--border); padding-top: 0.8rem; }
.dash-help summary { cursor: pointer; font-size: 0.85rem; color: var(--accent); font-weight: 600; }
.dash-help p { color: var(--muted); font-size: 0.85rem; margin-top: 0.5rem; line-height: 1.5; }

/* Segmented Toggle (Zustell-Schalter) */
.seg-toggle { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; flex-wrap: wrap; }
.seg-toggle .btn { border: none; border-radius: 0; min-height: 34px; padding: 0.3rem 0.8rem; background: transparent; color: var(--muted); font-size: 0.82rem; }
.seg-toggle .btn:hover { border: none; color: var(--text); background: var(--bg-soft); }
.seg-toggle .btn.active { background: var(--accent-2); color: var(--on-accent); border: none; }
.seg-toggle .btn.active:hover { background: var(--accent-2); color: var(--on-accent); }

.dash-expiry { border-color: var(--warn); margin-bottom: 1rem; }
.dash-hint { background: var(--bg-soft); border: 1px solid var(--accent); margin-bottom: 1rem; }
.dash-hint p { color: var(--text); font-size: 0.9rem; }

.dash-list-head { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; margin: 1.5rem 0 0.8rem; flex-wrap: wrap; }
.dash-list-head h2 { font-size: 1.2rem; }
.dash-search { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); padding: 0.5rem 0.7rem; font: inherit; font-size: 0.88rem; min-width: 160px; flex: 0 1 auto; }
.dash-search:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.dash-list { display: flex; flex-direction: column; gap: 0.5rem; }
.addr-row-item { display: flex; align-items: center; gap: 0.6rem; width: 100%; text-align: left; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.7rem 0.9rem; cursor: pointer; color: var(--text); font: inherit; transition: border-color 0.15s, background 0.15s; }
.addr-row-item:hover { border-color: var(--accent); background: var(--bg-soft); }
.addr-row-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.warn-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--warn); flex-shrink: 0; box-shadow: 0 0 6px var(--warn); animation: dotPulse 1.6s infinite; }
@keyframes dotPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }
@media (prefers-reduced-motion: reduce) { .warn-dot { animation: none; } }
.addr-row-name { flex: 1; min-width: 0; font-family: var(--mono); font-size: 0.95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.addr-local { font-weight: 700; color: var(--text); }
.addr-domain { color: var(--muted); }
.addr-row-meta { font-size: 0.78rem; color: var(--muted); flex-shrink: 0; white-space: nowrap; }
.deliv-icon { width: 18px; height: 18px; color: var(--muted); flex-shrink: 0; display: inline-flex; }
.deliv-icon svg { width: 18px; height: 18px; }

/* Adress-Detail */
.dash-detail { animation: panelSlideIn 0.3s ease-out; }
.dash-detail-addr { margin: 0.8rem 0; padding: 0.6rem; background: var(--bg-soft); border-radius: var(--radius-sm); cursor: pointer; }
.dash-detail-addr code { font-family: var(--mono); font-size: 1.1rem; color: var(--accent-2); word-break: break-all; }
.dash-detail-addr .addr-domain { color: var(--muted); }
.dash-detail-addr .tap-hint { display: block; margin-top: 0.2rem; }
.dash-state-tag { padding: 0.5rem 0.7rem; border-radius: var(--radius-sm); font-size: 0.85rem; margin-bottom: 0.6rem; }
.dash-state-tag.paused { background: var(--bg-soft); color: var(--muted); }
.dash-state-tag.closed { background: rgba(248,81,73,0.12); color: var(--danger); }
.dash-section { margin-top: 1rem; padding-top: 0.8rem; border-top: 1px solid var(--border); }
.dash-section h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.4rem; }
.dash-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* Leak-Warnung (Teil 5.2) */
.leak-warn { background: rgba(210,153,34,0.10); border: 1px solid var(--warn); border-radius: var(--radius-sm); padding: 0.9rem; margin: 0.8rem 0; }
.leak-warn-title { color: var(--warn); font-weight: 700; font-size: 0.95rem; }
.leak-warn-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.6rem; }

/* Schließ-Zeremonie (Teil 6.2) */
.close-facts { list-style: none; margin: 0.8rem 0; padding: 0; }
.close-facts li { color: var(--muted); font-size: 0.9rem; padding: 0.2rem 0 0.2rem 1.2rem; position: relative; }
.close-facts li::before { content: "•"; position: absolute; left: 0.2rem; color: var(--danger); }

/* Mails einer Adresse (Detail) */
.dash-mail-list { list-style: none; margin-top: 0.6rem; }
.dash-mail-list li { display: grid; grid-template-columns: 1fr auto; gap: 0.2rem 0.6rem; padding: 0.5rem 0; border-bottom: 1px solid var(--border); }
.dash-mail-from { font-weight: 600; font-size: 0.85rem; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-mail-time { font-size: 0.72rem; color: var(--muted); }
.dash-mail-subj { grid-column: 1 / -1; font-size: 0.82rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 539px) {
  .dash-head-main h1 { font-size: 1.3rem; }
  .addr-row-meta { display: none; }
  .seg-toggle { width: 100%; }
  .seg-toggle .btn { flex: 1; }
}
