/* tmail — Oberfläche. Tokens angelehnt an Wannja (Tinte #14213D, Grün #1A9A50, Inter, Radius 12 px), eigener Akzent Petrol.
   Kontraste (WCAG, gerechnet 2026-10-09):
   --accent #0B7F8A: 4.75:1 auf Weiss, Weiss darauf 4.75:1 — auf --bg nur 4.47:1, auf --accent-soft 4.19:1
     → kleiner Akzenttext auf --bg/--accent-soft nimmt --accent-strong (#08646D: 6.07:1 auf --accent-soft).
   --muted #505B6E: 6.44:1 auf --bg. Dunkel: --accent #4FC3CC 8.27:1 auf --surface, --muted 7.04:1.
   Grün #1A9A50 trägt keinen weissen Text (3.63:1), nur Punkte/Flächen. */

@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/inter-400.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/inter-500.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/inter-600.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/inter-700.woff2') format('woff2'); }

:root {
    --ink: #14213D;
    --ink-2: #22325A;
    --ok: #1A9A50;
    --bg: #F6F8FB;
    --surface: #FFFFFF;
    --surface-2: #F0F3F8;
    --line: #DCE2EA;
    --muted: #505B6E;
    --text: #14213D;
    --accent: #0B7F8A;
    --accent-strong: #08646D;
    --accent-soft: #E3F4F5;
    --on-accent: #FFFFFF;
    --danger: #B42318;
    --danger-soft: #FDECEA;
    --ok-text: #15803F;
    --ok-soft: #E7F5EC;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 2px rgba(20, 33, 61, .06), 0 6px 20px rgba(20, 33, 61, .06);
    --focus: 0 0 0 3px rgba(11, 127, 138, .35);
    color-scheme: light;
}

/* Dunkel: explizit gewählt … */
:root[data-theme="dark"] {
    --ink: #E6EBF2;
    --ink-2: #C9D3E1;
    --bg: #0B1220;
    --surface: #111A2E;
    --surface-2: #17223A;
    --line: #26324A;
    --muted: #9AA6B8;
    --text: #E6EBF2;
    --accent: #4FC3CC;
    --accent-strong: #7DD6DD;
    --accent-soft: #0F2A33;
    --on-accent: #0B1220;
    --danger: #F87171;
    --danger-soft: #2A1518;
    --ok-text: #6EE7A0;
    --ok-soft: #10261A;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    --focus: 0 0 0 3px rgba(79, 195, 204, .45);
    color-scheme: dark;
}
/* … oder Auto und das System will dunkel (gleiche Werte, bewusst doppelt: CSS kennt kein «oder» über Selektor + Media). */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --ink: #E6EBF2;
        --ink-2: #C9D3E1;
        --bg: #0B1220;
        --surface: #111A2E;
        --surface-2: #17223A;
        --line: #26324A;
        --muted: #9AA6B8;
        --text: #E6EBF2;
        --accent: #4FC3CC;
        --accent-strong: #7DD6DD;
        --accent-soft: #0F2A33;
        --on-accent: #0B1220;
        --danger: #F87171;
        --danger-soft: #2A1518;
        --ok-text: #6EE7A0;
        --ok-soft: #10261A;
        --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
        --focus: 0 0 0 3px rgba(79, 195, 204, .45);
        color-scheme: dark;
    }
}

/* Logo: zwei Bilder, sichtbar je nach Theme. */
.logo-dark { display: none; }
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .logo-light { display: none; }
    :root:not([data-theme="light"]) .logo-dark { display: block; }
}

/* ------------------------------------------------------------ Grundlage */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.55;
    color: var(--text);
    background: var(--bg);
    overflow-wrap: anywhere;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
h1, h2, h3 { color: var(--ink); line-height: 1.25; letter-spacing: -0.015em; margin: 0 0 .5em; }
h1 { font-size: 1.5rem; font-weight: 700; }
h2 { font-size: 1.15rem; font-weight: 650; }
h3 { font-size: 1rem; font-weight: 600; }
p { margin: 0 0 .9em; }
a { color: var(--accent-strong); text-underline-offset: 2px; }
.card a:not(.btn), .prose a:not(.btn) { color: var(--accent); }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 2px; }
img, svg { max-width: 100%; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--surface); color: var(--ink); padding: 10px 14px; border-radius: var(--radius-sm); z-index: 10; }
.skip:focus { top: 8px; }
.muted { color: var(--muted); }
.small, .hint { font-size: .875rem; }
.hint { color: var(--muted); margin: .5em 0 0; }
.center { text-align: center; }

.wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 16px; }
.main { flex: 1; padding-top: 16px; padding-bottom: 32px; display: flex; flex-direction: column; gap: 16px; }
.main > * { min-width: 0; } /* Flex-Kinder sonst so breit wie ihr breitester Inhalt → horizontales Scrollen */

/* ------------------------------------------------------------ Kopf und Fuss */
.top { background: var(--surface); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; min-height: 60px; gap: 12px; }
.brand { display: inline-flex; align-items: center; min-height: 44px; }
.logo { height: 38px; width: auto; }
.top-nav { display: flex; align-items: center; gap: 4px; }
.top-nav > a, .lang-switch {
    display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: 0 12px;
    color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; border-radius: var(--radius-sm);
    background: none; border: 0; font-family: inherit; cursor: pointer;
}
.top-nav > a:hover, .lang-switch:hover { background: var(--surface-2); color: var(--ink); }
.top-nav > a[aria-current] { color: var(--accent-strong); }
.lang-switch { border: 1px solid var(--line); }

.foot { border-top: 1px solid var(--line); background: var(--surface); padding: 20px 0 calc(20px + env(safe-area-inset-bottom)); }
.foot-in { display: flex; flex-direction: column; gap: 14px; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.foot-nav a { color: var(--ink-2); text-decoration: none; font-size: .9rem; padding: 8px 0; }
.foot-nav a:hover { text-decoration: underline; }
.foot-note { color: var(--muted); font-size: .85rem; margin: 0; }
.theme-switch { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.theme-label { color: var(--muted); font-size: .85rem; margin-right: 6px; }
.theme-switch button {
    min-height: 36px; padding: 0 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
    border-radius: 999px; font: inherit; font-size: .85rem; cursor: pointer;
}
.theme-switch button[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-strong); font-weight: 600; }

/* ------------------------------------------------------------ Bausteine */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 16px; }
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px;
    border-radius: var(--radius); border: 1px solid transparent; font: inherit; font-weight: 600; font-size: 1rem;
    text-decoration: none; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; white-space: nowrap;
}
.btn .ico { width: 20px; height: 20px; flex: none; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-strong); color: var(--on-accent); }
.btn-secondary { background: var(--accent-soft); color: var(--accent-strong); border-color: transparent; }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent-strong); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); color: var(--danger); }
.btn-lg { min-height: 56px; font-size: 1.05rem; padding: 0 26px; }
.btn-small { min-height: 40px; font-size: .9rem; padding: 0 14px; }
.inline-form { display: contents; }

.input {
    width: 100%; min-height: 48px; padding: 0 14px; font: inherit; font-size: 1rem; color: var(--text);
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.input:focus { border-color: var(--accent); }
.input:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 2px; }
.select { appearance: none; padding-right: 36px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; color: var(--ink); }

.alert { border-radius: var(--radius); padding: 14px 16px; font-weight: 500; border: 1px solid; }
.alert-error { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }
.alert-ok { background: var(--ok-soft); color: var(--ok-text); border-color: var(--ok); margin-bottom: 16px; }

/* ------------------------------------------------------------ Kopfleiste (alle öffentlichen Seiten) */
.bar { background: var(--surface); border-bottom: 1px solid var(--line); }
.bar-plain .bar-in { display: flex; align-items: center; justify-content: space-between; min-height: 60px; gap: 12px; }
.bar-nav { display: flex; align-items: center; gap: 4px; }
.bar-link {
    display: inline-flex; align-items: center; justify-content: center; min-height: 40px; min-width: 40px; padding: 0 10px;
    color: var(--ink); text-decoration: none; font-weight: 600; font-size: .92rem; border-radius: var(--radius-sm);
    background: none; border: 0; font-family: inherit; cursor: pointer;
}
.bar-link:hover { background: var(--surface-2); color: var(--ink); }
.bar-link[aria-current] { color: var(--accent-strong); }
.bar-link.lang-switch { border: 1px solid var(--line); }

/* Postfach: schmale Leiste wie in einem Mailprogramm. Schmal zwei Zeilen (Logo · Restzeit · Navigation, darunter die
   Adresse über die volle Breite), ab 768 px eine Zeile. */
.wrap-app { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 16px; }
.bar-app { position: sticky; top: 0; z-index: 30; }
.bar-app .bar-in {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "brand chip nav" "addr addr addr";
    align-items: center; gap: 4px 10px; padding-top: 6px; padding-bottom: 8px;
}
.bar-app .brand { grid-area: brand; min-height: 40px; }
.bar-app .logo { height: 34px; }
.bar-app .bar-nav { grid-area: nav; }
.bar-addr { grid-area: addr; display: flex; align-items: center; gap: 6px; min-width: 0; }
.addr-box {
    flex: 1; min-width: 0; display: flex; align-items: center; height: 40px; padding: 0 12px;
    background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.addr {
    display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; overflow-wrap: normal;
    font-size: .98rem; font-weight: 600; color: var(--ink); letter-spacing: 0; user-select: all; -webkit-user-select: all;
}
.timer-chip {
    grid-area: chip; justify-self: end; display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px;
    border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-size: .82rem; font-weight: 600;
    font-variant-numeric: tabular-nums; white-space: nowrap;
}
.timer-chip .ico { width: 15px; height: 15px; flex: none; }
.timer-chip.is-low { background: var(--danger-soft); color: var(--danger); }

/* Werkzeugknöpfe (Leiste, Lesebereich) */
.tbtn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; min-width: 40px; padding: 0 12px;
    border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink);
    font: inherit; font-weight: 600; font-size: .88rem; text-decoration: none; cursor: pointer; white-space: nowrap; flex: none;
}
.tbtn:hover { background: var(--surface-2); color: var(--ink); }
.tbtn .ico { width: 18px; height: 18px; flex: none; }
.tbtn.is-done { color: var(--ok-text); border-color: var(--ok); }
.tbtn-accent { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.tbtn-accent:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--on-accent); }
.tbtn-small { height: 34px; padding: 0 10px; font-size: .84rem; }
.tbtn-small .ico { width: 16px; height: 16px; }
.tbtn-danger { color: var(--danger); }
.tbtn-danger:hover { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }
.tbtn .ico-caret { width: 14px; height: 14px; margin-left: -2px; }

/* Menü «Neu ▾» */
.menu { position: relative; flex: none; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-panel {
    position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; width: min(360px, calc(100vw - 32px));
    max-height: calc(100vh - 140px); overflow-y: auto; padding: 14px; background: var(--surface);
    border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.menu-sec + .menu-sec { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 14px; }
.menu-title { font-weight: 600; font-size: .9rem; color: var(--ink); margin: 0 0 8px; }
.menu-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.menu-item {
    width: 100%; display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 10px; text-align: left;
    background: none; border: 0; border-radius: var(--radius-sm); color: var(--text); font: inherit; font-size: .9rem; cursor: pointer;
}
.menu-item:hover { background: var(--surface-2); }
.menu-item[aria-current] { font-weight: 600; }
.menu-addr { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; overflow-wrap: normal; }
.pill-mini { flex: none; font-size: .72rem; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-strong); }
.menu .btn { min-height: 44px; }

/* ------------------------------------------------------------ Startzustand (ohne Adresse) */
.start { display: grid; gap: 18px; }
.start-head { text-align: center; }
.start-title { font-size: 1.3rem; margin-bottom: 6px; }
.start .lead { margin: 0 auto; font-size: 1rem; }
.start-actions { display: grid; gap: 14px; }
.start-random .hint { margin-top: 8px; }
.start-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .85rem; }
.start-or::before, .start-or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.start-sub { font-size: 1rem; margin-bottom: 10px; }
.btn-block { width: 100%; }
.warn {
    display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 0; padding: 8px 10px; font-size: .85rem; line-height: 1.45;
    color: var(--ink-2); background: var(--surface-2); border-radius: var(--radius-sm);
}
.warn .ico { width: 18px; height: 18px; flex: none; color: var(--danger); margin-top: 1px; }
.custom-form .btn { margin-top: 12px; }
.custom-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; align-items: center; }
.custom-row .at { display: none; }
.alert-info { background: var(--accent-soft); color: var(--accent-strong); border-color: var(--accent); }

.facts { display: grid; grid-template-columns: 1fr; gap: 10px; }
.fact { padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.fact h3 { margin-bottom: 4px; font-size: .95rem; }
.fact h3::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); margin-right: 8px; vertical-align: middle; }
.fact p { color: var(--muted); font-size: .88rem; margin: 0; }
/* Erklärtext im Startzustand (auch für Suchmaschinen) */
.prose.start-about h2 { margin-top: 0; font-size: 1.1rem; } /* .prose h2 steht weiter unten */
.start-about p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------ Postfach: Liste + Lesebereich */
.main.main-app { width: 100%; max-width: 1320px; margin: 0 auto; padding: 12px 16px 16px; gap: 12px; }
.app { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; min-width: 0; }
.pane { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; overflow: hidden; }
.app.is-reading .pane-list, .app:not(.is-reading) .pane-read { display: none; }
.pane-list { display: flex; flex-direction: column; }
.pane-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.pane-title { margin: 0; font-size: 1rem; display: inline-flex; align-items: center; gap: 8px; }
.count { min-width: 24px; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-size: .78rem; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 600; color: var(--ok-text); text-transform: uppercase; letter-spacing: .06em; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: pulse 2s infinite; }
.live.is-off { color: var(--muted); }
.live.is-off .live-dot { background: var(--muted); animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(26, 154, 80, .5); } 70% { box-shadow: 0 0 0 8px rgba(26, 154, 80, 0); } 100% { box-shadow: 0 0 0 0 rgba(26, 154, 80, 0); } }

.msgs { list-style: none; margin: 0; padding: 0; }
.msgs li + li { border-top: 1px solid var(--line); }
.msg {
    display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 2px 12px; padding: 12px 16px 12px 13px; min-height: 64px;
    text-decoration: none; color: var(--text); border-left: 3px solid transparent;
}
.msg:hover { background: var(--surface-2); color: var(--text); }
.msg.is-active, .msg.is-active:hover { background: var(--accent-soft); border-left-color: var(--accent); }
.msg-from { font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; overflow-wrap: normal; }
.msg-time { color: var(--muted); font-size: .82rem; font-variant-numeric: tabular-nums; align-self: center; }
.msg-subj { grid-column: 2 / -1; font-size: .92rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; overflow-wrap: normal; }
.msg.is-read .msg-from, .msg.is-read .msg-subj { font-weight: 400; }
.msg.is-read .msg-from { color: var(--ink-2); }
.msg:not(.is-read) .msg-from::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: middle; }
.msg.is-new { animation: arrive .8s ease-out; }

/* Absender-Avatar: Initialen auf einer Farbe aus der Absender-Domain (Tmail\Avatar, app.js avatar()). Keine fremden Logos.
   Hell: weisse Schrift auf kräftigem Ton (alle ≥ 4.75:1). Dunkel: helle Töne mit dunkler Schrift (≥ 8:1). */
.av {
    --av: #475569; --av-ink: #FFFFFF;
    grid-row: 1 / span 2; align-self: center; flex: none;
    width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    background: var(--av); color: var(--av-ink); font-size: .85rem; font-weight: 600; line-height: 1; letter-spacing: .02em;
    user-select: none; overflow: hidden;
}
.av-lg { width: 44px; height: 44px; font-size: 1rem; }
.av-0 { --av: #0B7F8A; } .av-1 { --av: #1D4ED8; } .av-2 { --av: #6D28D9; } .av-3 { --av: #BE185D; }
.av-4 { --av: #B42318; } .av-5 { --av: #A84E07; } .av-6 { --av: #15803D; } .av-7 { --av: #475569; }
:root[data-theme="dark"] .av { --av-ink: #0B1220; }
:root[data-theme="dark"] .av-0 { --av: #7DD6DD; } :root[data-theme="dark"] .av-1 { --av: #93B4FF; }
:root[data-theme="dark"] .av-2 { --av: #C4A7FF; } :root[data-theme="dark"] .av-3 { --av: #F9A8D4; }
:root[data-theme="dark"] .av-4 { --av: #FCA5A5; } :root[data-theme="dark"] .av-5 { --av: #FDBA74; }
:root[data-theme="dark"] .av-6 { --av: #86EFAC; } :root[data-theme="dark"] .av-7 { --av: #CBD5E1; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .av { --av-ink: #0B1220; }
    :root:not([data-theme="light"]) .av-0 { --av: #7DD6DD; } :root:not([data-theme="light"]) .av-1 { --av: #93B4FF; }
    :root:not([data-theme="light"]) .av-2 { --av: #C4A7FF; } :root:not([data-theme="light"]) .av-3 { --av: #F9A8D4; }
    :root:not([data-theme="light"]) .av-4 { --av: #FCA5A5; } :root:not([data-theme="light"]) .av-5 { --av: #FDBA74; }
    :root:not([data-theme="light"]) .av-6 { --av: #86EFAC; } :root:not([data-theme="light"]) .av-7 { --av: #CBD5E1; }
}
.mail-from { display: flex; align-items: flex-start; gap: 12px; }
.mail-from .meta { flex: 1; min-width: 0; }
/* Kopf der Mailansicht: <details>, zu = eine Zeile, auf = Von/An/Datum darunter (eingerückt unter den Namen). */
.mail-meta { margin-bottom: 8px; }
.mail-sum { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; list-style: none; border-radius: var(--radius-sm); }
.mail-sum::-webkit-details-marker { display: none; }
.mail-sum::marker { content: ""; }
.mail-sum:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sum-from { flex: 1; min-width: 0; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sum-time { flex: none; color: var(--muted); font-size: .85rem; white-space: nowrap; }
.sum-more { flex: none; display: inline-flex; align-items: center; gap: 2px; color: var(--muted); font-size: .85rem; }
.sum-chev { width: 18px; height: 18px; transition: transform .15s; }
.mail-meta[open] .sum-chev { transform: rotate(180deg); }
.mail-meta .meta { margin: 6px 0 0 54px; }
@media (max-width: 479px) { .sum-more-text { display: none; } }
@keyframes arrive { from { background: var(--accent-soft); } to { background: transparent; } }
.badge { display: inline-block; margin-left: 6px; font-size: .7rem; font-weight: 600; text-transform: uppercase; color: var(--danger); }

.empty { text-align: center; padding: 32px 20px 36px; }
.empty-icon { display: inline-flex; width: 48px; height: 48px; color: var(--accent); margin-bottom: 8px; animation: float 3s ease-in-out infinite; }
.empty-icon svg { width: 100%; height: 100%; }
.empty-title { font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.empty-text { color: var(--muted); font-size: .9rem; max-width: 30em; margin: 0 auto; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }

.read-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 48px 24px; min-height: 100%; color: var(--muted); }
.read-empty-art { width: 120px; height: 90px; color: var(--accent); margin-bottom: 12px; }
.read-empty-title { font-weight: 600; color: var(--ink); font-size: 1.05rem; margin: 0; }
.read-status { padding: 16px; margin: 0; color: var(--muted); }
.solo-note { margin: 0; }
.app-alert { margin: 0; }

/* ------------------------------------------------------------ Mail (Lesebereich und Admin) */
.back { margin: 0; }
.back a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 600; text-decoration: none; color: var(--ink-2); }
.mail { padding: 0; overflow: hidden; }
.mail-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 8px 16px; border-bottom: 1px solid var(--line); }
.tools-gap { flex: 1; }
.mail-back { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding-right: 6px; font-weight: 600; text-decoration: none; color: var(--ink-2); }
.mail-head { padding: 14px 16px 12px; border-bottom: 1px solid var(--line); }
.mail-subj { font-size: 1.2rem; margin-bottom: 10px; }
.mail-meta ~ .mail-subj { margin-bottom: 0; }
.meta { margin: 0; display: grid; gap: 3px; font-size: .9rem; }
.meta div { display: grid; grid-template-columns: 4.5em minmax(0, 1fr); gap: 8px; }
.meta dt { color: var(--muted); }
.meta dd { margin: 0; color: var(--text); min-width: 0; }
.mail > .alert, .mail-alert { margin: 12px 16px 0; }
.mail-note { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 8px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.mail-note p { margin: 0; font-size: .875rem; color: var(--ink-2); flex: 1 1 14em; }
.mail-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 16px; }
.mail-bar:empty { display: none; }
.tabs { display: inline-flex; background: var(--surface-2); border-radius: 10px; padding: 3px; }
.tab { min-height: 32px; min-width: 56px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .86rem; }
.tab[aria-current] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.mail-hint { padding: 0 16px; margin: -4px 0 10px; }
/* Mail-HTML ist für helle Flächen gebaut — der Rahmen bleibt auch im Dunkelmodus weiss. */
.mail-frame { display: block; width: 100%; height: 70vh; min-height: 420px; border: 0; border-bottom: 1px solid var(--line); background: #FFFFFF; }
/* Höhe kommt aus der Meldung des iframes (app.js setupFrames, inline style): kein eigenes Scrollen, die Seite scrollt. */
.mail-frame.is-sized { min-height: 0; box-sizing: content-box; } /* Höhe = Inhalt, der Rand kommt dazu */
.mail-text { margin: 0; padding: 16px; white-space: pre-wrap; overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .9rem; line-height: 1.5; max-height: 75vh; overflow: auto; }
.mail-text-empty { padding: 16px; margin: 0; }
.mail .hint { padding: 0 16px; }
.mail-trunc { padding-bottom: 12px !important; }
.atts { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.atts-title { font-size: .9rem; margin-bottom: 8px; }
.atts ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.att { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); text-decoration: none; color: var(--text); }
.card .att { color: var(--text); }
.att:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.att .ico { width: 20px; height: 20px; color: var(--accent); flex: none; }
.att-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; overflow-wrap: normal; font-weight: 600; }
.att-size { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.atts .hint { padding: 0; }
.mail-actions { display: flex; gap: 10px; flex-wrap: wrap; padding: 16px; }
.mail-actions .btn { flex: 1 1 auto; }
.pane-solo { padding: 0; }

/* ------------------------------------------------------------ Bestätigungscode, Benachrichtigung, QR */
/* Code-Chip: Knopf neben dem Link im <li> (nie darin). Zeile als Flex, damit der Chip rechts eigenen Platz hat;
   Hover/aktiv färben die ganze Zeile (:has), ältere Browser färben nur den Link — harmlos. */
.msgs li.has-code { display: flex; align-items: center; }
.msgs li.has-code > .msg { flex: 1; min-width: 0; }
.msgs li.has-code:has(> .msg:hover) { background: var(--surface-2); }
.msgs li.has-code:has(> .msg.is-active) { background: var(--accent-soft); }
.code-chip {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: none; height: 38px; min-width: 44px; padding: 0 10px;
    border: 1px solid var(--accent); border-radius: 999px; background: var(--accent-soft); color: var(--accent-strong);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .98rem; font-weight: 700; letter-spacing: .06em;
    font-variant-numeric: tabular-nums; white-space: nowrap; cursor: pointer;
}
.code-chip:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.code-chip .ico { width: 16px; height: 16px; flex: none; }
.code-chip.is-done, .code-chip.is-done:hover { background: var(--ok-soft); border-color: var(--ok); color: var(--ok-text); }
.code-done, .code-copy-text { font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; letter-spacing: 0; font-size: .85rem; font-weight: 600; }
.code-chip.is-done .code-copy-text { display: none; }
.msgs li.has-code > .code-chip { margin-right: 12px; }
.code-bar {
    display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin: 0 0 12px; padding: 10px 12px;
    background: var(--accent-soft); border-radius: var(--radius-sm);
}
.code-label { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-strong); }
.code-chip-lg { height: 44px; padding: 0 14px; font-size: 1.3rem; background: var(--surface); gap: 8px; }
.code-chip-lg .ico { width: 18px; height: 18px; }

.pane-tools { display: flex; align-items: center; gap: 10px; flex: none; }
.notify-btn.is-on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-strong); }
.notify-hint { margin: 0; padding: 8px 16px; font-size: .85rem; color: var(--ink-2); background: var(--surface-2); border-bottom: 1px solid var(--line); }

/* QR: Panel hängt an der Adresszeile (nicht am Knopf), damit es auf dem Telefon nicht links aus dem Bild ragt. */
.bar-addr { position: relative; }
.menu.menu-qr { position: static; }
.menu-qr .menu-panel { width: min(300px, 100%); text-align: center; }
.qr-img { display: block; width: 200px; height: 200px; margin: 4px auto 10px; border-radius: 4px; background: #FFFFFF; }
.qr-panel .hint { text-align: left; }
.qr-url { margin: 0; font-size: .8rem; color: var(--muted); overflow-wrap: anywhere; text-align: left; }

.adopt { max-width: 480px; margin: 0 auto; text-align: center; display: grid; gap: 12px; }
.adopt-title { font-size: 1.3rem; margin: 0; }
.adopt-addr {
    margin: 0; padding: 10px 12px; font-size: 1.1rem; font-weight: 700; color: var(--ink); background: var(--surface-2);
    border: 1px solid var(--line); border-radius: var(--radius-sm); overflow-wrap: anywhere;
}
.adopt .lead { margin: 0; }
.adopt .hint { margin: 0; }

/* ------------------------------------------------------------ Textseiten */
.prose { padding: 22px 18px; }
.prose h1 { font-size: 1.5rem; margin-bottom: .8em; }
.prose h2 { margin-top: 1.4em; }
.prose ul { padding-left: 1.2em; margin: 0 0 1em; }
.prose li { margin-bottom: .35em; }
.prose address { font-style: normal; line-height: 1.7; margin-bottom: 1em; }
.summary { background: var(--accent-soft); border-radius: var(--radius); padding: 14px 16px 4px; margin-bottom: 20px; }
.summary h2 { margin-top: 0; }
.summary a { color: var(--accent-strong); }
.faq { border-top: 1px solid var(--line); }
.faq:last-of-type { border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.faq summary { cursor: pointer; padding: 14px 0; min-height: 48px; font-weight: 600; color: var(--ink); list-style-position: outside; }
.faq p { color: var(--text); margin: 0 0 16px; }
.contact-mail { margin: 8px 0 14px; }
.error-box { text-align: center; padding: 32px 18px; }

/* ------------------------------------------------------------ Breiter */
@media (min-width: 640px) {
    .main { padding-top: 28px; gap: 20px; }
    .card { padding: 24px; }
    .card.mail, .card.pane-solo { padding: 0; } /* Innenabstand tragen dort die Zeilen selbst */
    .start-title { font-size: 1.45rem; }
    .custom-row { grid-template-columns: minmax(0, 1fr) auto minmax(140px, 200px); }
    .custom-row .at { display: block; color: var(--muted); font-weight: 600; }
    .menu .custom-row { grid-template-columns: minmax(0, 1fr); }
    .menu .custom-row .at { display: none; }
    .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .mail-head, .mail-bar, .atts, .mail-actions, .mail-text, .mail-tools, .mail-note { padding-left: 24px; padding-right: 24px; }
    .mail .hint, .mail-hint { padding-left: 24px; padding-right: 24px; }
    .mail > .alert, .mail-alert { margin-left: 24px; margin-right: 24px; }
    .mail-subj { font-size: 1.35rem; }
    .mail-actions .btn { flex: 0 0 auto; }
    .prose { padding: 32px 36px; }
    .foot-in { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; }
    .foot-note { flex-basis: 100%; }
}

/* Ab 768 px Breite UND 600 px Höhe (Handy quer bleibt einspaltig, sonst fängt die feste Höhe das Wischen ab): Leiste einzeilig, Postfach zweispaltig wie ein Mailprogramm. Liste und Lesebereich scrollen je für sich;
   die Höhe hängt am Fenster (Leiste ≈ 57 px + Abstände). */
@media (min-width: 768px) and (min-height: 600px) {
    .bar-app .bar-in { grid-template-columns: auto minmax(0, 1fr) auto auto; grid-template-areas: "brand addr chip nav"; gap: 14px; padding-top: 8px; }
    .bar-addr { max-width: 640px; }
    .start-actions { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.25fr); align-items: start; gap: 24px; }
    .start-or { flex-direction: column; align-self: stretch; }
    .start-or::before, .start-or::after { border-top: 0; border-left: 1px solid var(--line); }
    .start-or span { padding: 6px 0; }
    .start .custom-row { grid-template-columns: minmax(0, 1fr); }
    .start .custom-row .at { display: none; }

    .main.main-app { padding-top: 12px; }
    .app { grid-template-columns: minmax(300px, 360px) minmax(0, 1fr); height: calc(100vh - 57px - 28px); height: calc(100dvh - 57px - 28px); min-height: 480px; }
    .app.is-reading .pane-list, .app:not(.is-reading) .pane-read { display: flex; }
    .app .pane-list .msgs { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
    .app .pane-read { display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; }
    .app .pane-read > .mail { display: flex; flex-direction: column; flex: 1 0 auto; }
    .app .pane-read .mail-body { flex: 1 0 auto; display: flex; flex-direction: column; }
    .app .pane-read .mail-frame { flex: 1 0 auto; height: auto; min-height: 380px; }
    .app .pane-read .mail-frame.is-sized { min-height: 0; } /* Lesebereich scrollt als Ganzes, Kopf + volle Mailhöhe */
    .app .pane-read .mail-text { max-height: none; }
    .read-empty { flex: 1; }
    .mail-back:not(.is-solo) { display: none; }
}
@media (min-width: 1100px) {
    .app { grid-template-columns: 380px minmax(0, 1fr); }
}

/* Telefon: Knopftexte nur für Screenreader, damit Adresse, Kopieren und «Neu» in eine Zeile passen. */
@media (max-width: 479px) {
    .bar-addr .tbtn-label, .bar-addr .tbtn-text {
        position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
    }
    .bar-addr .tbtn { padding: 0 10px; }
    .mail-tools .tbtn-small span { display: none; }
    .pane-tools .tbtn-label {
        position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
    }
    .code-copy-text { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ------------------------------------------------------------ Admin (gleiche Tokens, breiter, Tabellen) */
.wrap-wide { max-width: 1120px; }
.admin-badge {
    margin-left: 10px; padding: 3px 8px; border-radius: 6px; background: var(--ink); color: var(--bg);
    font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.logout-form { display: flex; align-items: center; gap: 10px; }
.admin-user { display: none; }
.admin-nav { border-top: 1px solid var(--line); background: var(--surface); }
.admin-nav-in { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.admin-nav-in::-webkit-scrollbar { display: none; }
.admin-nav a {
    flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; color: var(--ink-2);
    text-decoration: none; font-weight: 600; font-size: .92rem; border-bottom: 3px solid transparent;
}
.admin-nav a:hover { color: var(--ink); background: var(--surface-2); }
.admin-nav a[aria-current] { color: var(--accent-strong); border-bottom-color: var(--accent); }
.admin-title { margin: 0; font-size: 1.35rem; }
.admin-login { max-width: 420px; width: 100%; margin: 24px auto; }
.stack { display: grid; gap: 14px; }
.input-code { font-variant-numeric: tabular-nums; letter-spacing: .3em; font-size: 1.2rem; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .88em; }
.pad { padding: 16px; margin: 0; }
.card-flush { padding: 0 !important; overflow: hidden; }

.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; vertical-align: middle; }
.pill-ok { background: var(--ok-soft); color: var(--ok-text); }
.pill-bad { background: var(--danger-soft); color: var(--danger); }

.vm-status { border-left: 5px solid var(--ok); }
.vm-status.is-bad { border-left-color: var(--danger); }
.vm-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.vm-head h2 { margin: 0; }
.problems { margin: 0 0 12px; padding-left: 1.2em; color: var(--danger); font-weight: 500; }
.kv { margin: 0; display: grid; gap: 6px; font-size: .92rem; }
.kv div { display: grid; grid-template-columns: 9.5em 1fr; gap: 8px; align-items: baseline; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tile {
    display: flex; flex-direction: column; gap: 2px; padding: 16px; background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); box-shadow: var(--shadow); text-decoration: none; color: var(--text);
}
a.tile:hover { border-color: var(--accent); color: var(--text); }
.tile-n { font-size: 1.5rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.tile-l { color: var(--muted); font-size: .85rem; }
.tile-alert { border-color: var(--danger); background: var(--danger-soft); }
.tile-alert .tile-n { color: var(--danger); }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 16px; }
.grid-2 > * { min-width: 0; }

.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tbl th, .tbl td { text-align: left; padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: top; }
.tbl thead th { border-top: 0; color: var(--muted); font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; background: var(--surface-2); }
.tbl tbody th { font-weight: 500; color: var(--ink); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl tr.is-reported td, .tbl tr.is-reported th { background: var(--danger-soft); }
.card .tbl a { color: var(--accent); }
.tbl-compact th, .tbl-compact td { padding: 8px 6px; }
.tbl-headers th { width: 14em; color: var(--ink-2); font-weight: 600; }
.tbl-headers td { white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.rank { margin: 0; padding: 0; list-style: none; counter-reset: rank; }
.rank li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); counter-increment: rank; }
.rank li:first-child { border-top: 0; }
.rank li::before { content: counter(rank); width: 1.6em; color: var(--muted); font-variant-numeric: tabular-nums; font-size: .85rem; }
.rank a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-n { font-weight: 600; font-variant-numeric: tabular-nums; }

.filter { display: grid; gap: 12px; }
.filter-row { display: grid; grid-template-columns: 1fr; gap: 12px; }
.filter-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.check { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; font-weight: 500; margin-right: auto; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; }

.add-row { display: flex; gap: 8px; margin: 12px 0; }
.add-row .input { flex: 1; min-width: 0; }
.chips { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips .chip { display: inline-flex; align-items: center; gap: 2px; padding: 0 0 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); }
.chip-x { min-width: 40px; min-height: 40px; border: 0; background: none; color: var(--muted); font-size: 1.25rem; line-height: 1; cursor: pointer; border-radius: 999px; }
.chip-x:hover { color: var(--danger); background: var(--danger-soft); }

.mx-result { border-left: 5px solid var(--ok); }
.mx-result.is-bad { border-left-color: var(--danger); }
.mx-result h2 { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.settings { display: grid; gap: 4px; }
.setting { padding: 12px 0; border-top: 1px solid var(--line); }
.setting:first-of-type { border-top: 0; padding-top: 0; }
.setting-input { display: flex; align-items: center; gap: 10px; max-width: 360px; }
.setting-input .input { font-variant-numeric: tabular-nums; }
.unit { color: var(--muted); font-size: .85rem; white-space: nowrap; min-width: 5em; }
.setting .err { color: var(--danger); font-weight: 600; margin-right: 6px; }
.setting.has-error .input { border-color: var(--danger); }
.range { white-space: nowrap; }
.settings-actions { padding-top: 12px; }

.report-box { border: 2px solid var(--danger); background: var(--danger-soft); }
.report-box.is-done { border-color: var(--line); background: var(--surface); }
.report-box h2 { color: var(--danger); }
.report-box.is-done h2 { color: var(--ink); }
.report-box ul { margin: 0 0 10px; padding-left: 1.2em; }
.report-box li { margin-bottom: 4px; }
.admin-mail .facts-grid { display: grid; grid-template-columns: 1fr; gap: 16px; padding: 16px; border-bottom: 1px solid var(--line); }
.admin-mail .facts-grid h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; }
.admin-mail .kv div { grid-template-columns: 8em 1fr; }
.mail-raw { max-height: 70vh; font-size: .82rem; }
.headers > summary { list-style: none; cursor: pointer; padding: 14px 16px; }
.headers > summary::-webkit-details-marker { display: none; }
.headers > summary h2 { display: inline; margin: 0; }

/* Tabellen am Telefon: jede Zeile als Block, Spaltenname aus data-label */
@media (max-width: 719px) {
    .tbl:not(.tbl-compact):not(.tbl-headers) thead { display: none; }
    .tbl:not(.tbl-compact):not(.tbl-headers) tr { display: block; border-top: 1px solid var(--line); padding: 8px 0; }
    .tbl:not(.tbl-compact):not(.tbl-headers) tr:first-child { border-top: 0; }
    /* flex statt grid: Text, Links und Pillen fliessen nebeneinander, statt je eine eigene Zeile (und volle Breite) zu bekommen */
    .tbl:not(.tbl-compact):not(.tbl-headers) td { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; border: 0; padding: 4px 16px 4px calc(16px + 6.5rem + 8px); position: relative; }
    .tbl:not(.tbl-compact):not(.tbl-headers) td::before { content: attr(data-label); color: var(--muted); font-size: .8rem; position: absolute; left: 16px; top: 6px; width: 6.5rem; font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; }
    .tbl:not(.tbl-compact):not(.tbl-headers) td.num { text-align: left; }
    .tbl:not(.tbl-compact):not(.tbl-headers) td.row-actions { padding-left: 16px; padding-top: 8px; }
    .tbl:not(.tbl-compact):not(.tbl-headers) td.row-actions::before { display: none; }
    .tbl-headers th, .tbl-headers td { display: block; width: auto; border: 0; padding: 2px 16px; }
    .tbl-headers tr { display: block; border-top: 1px solid var(--line); padding: 8px 0; }
}
@media (min-width: 640px) {
    .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .admin-user { display: inline; }
    .filter-row { grid-template-columns: 1fr 1fr; }
    .admin-mail .facts-grid { grid-template-columns: 1fr 1fr; padding: 20px 24px; }
    .headers > summary { padding: 16px 24px; }
    .pad { padding: 20px 24px; }
}
@media (min-width: 960px) {
    .grid-2 { grid-template-columns: 1fr 1fr; }
}

/* Fester Werbeplatz (partials/ad.php) — nur auf Seiten mit Werbung. Klasse statt style-Attribut (CSP). */
.ad-slot { margin: 16px 0; }
.pane-list .ad-slot { margin: 12px 16px 16px; }
.ad-label { margin: 0 0 4px; font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.ad-slot ins.adsbygoogle { display: block; }
