/*
 * Admin- und Setup-Oberfläche (abgenommener Entwurf „A+“, Projektpaket 11_easyws_Admin-Design_abgenommen.md).
 * Farben als Rollen (--a-*). White-Label: brand.css überschreibt Akzent und – ohne easy.ws-Branding –
 * Salbei hell (--a-surface-2), Graphitgrün (--a-ink) und Limette (--a-neon).
 * Hell/Dunkel: Systemeinstellung, per Umschalter überschreibbar (html[data-theme]).
 */

@font-face { font-family: "Karla"; src: url("fonts/karla-var.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Karla"; src: url("fonts/karla-italic-var.woff2") format("woff2"); font-weight: 200 800; font-style: italic; font-display: swap; }
@font-face { font-family: "Outfit"; src: url("fonts/outfit-var.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --a-bg: #ECEAE3;
  --a-surface: #FFFFFF;
  --a-surface-2: #DFE5DD;
  --a-text: #1E2420;
  --a-muted: #545B56;
  --a-line: #D6D3CA;
  --a-border: #7A817C;
  --a-accent: #4E6B58;
  --a-accent-text: #FFFFFF;
  --a-ink: #26302A;
  --a-ink-text: #FFFFFF;
  --a-ink-muted: #C9D3CC;
  --a-neon: #D4F046;
  --a-neon-text: #1E2420;
  --a-focus: #26302A;
  --a-frame: #4E6B58;
  --a-check: #4E6B58;
  --a-check-text: #FFFFFF;
  --a-bar: #B7C6BB;
  --a-bar-today: #26302A;
  --a-ok: #2E6B3E;
  --a-ok-bg: #E4EEE6;
  --a-warn: #7A5300;
  --a-warn-bg: #F8EFD9;
  --a-fail: #A3271F;
  --a-fail-bg: #F8E6E3;
  --a-shadow: 0 1px 2px rgba(30, 36, 32, 0.05);
  --a-radius: 0.8rem;
  --a-font: "Karla", system-ui, -apple-system, "Segoe UI", sans-serif;
  --a-font-head: "Outfit", "Karla", system-ui, sans-serif;
  --a-side: 16.5rem;
  --a-bar-h: 78px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --a-bg: #171B19; --a-surface: #212724; --a-surface-2: #2C3631; --a-text: #EEEDE7; --a-muted: #A9B1AB;
    --a-line: #333B37; --a-border: #7A847E; --a-accent: #9DBBA7; --a-accent-text: #14201A; --a-ink: #2C3631;
    --a-ink-muted: #C9D3CC; --a-neon-text: #14201A; --a-focus: #D4F046; --a-frame: #D4F046; --a-check: #9DBBA7;
    --a-check-text: #14201A; --a-bar: #4A5850; --a-bar-today: #9DBBA7; --a-ok: #8FD19E; --a-ok-bg: #1B2B20;
    --a-warn: #F0C766; --a-warn-bg: #2A2312; --a-fail: #F08A80; --a-fail-bg: #2E1714; --a-shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --a-bg: #171B19; --a-surface: #212724; --a-surface-2: #2C3631; --a-text: #EEEDE7; --a-muted: #A9B1AB;
  --a-line: #333B37; --a-border: #7A847E; --a-accent: #9DBBA7; --a-accent-text: #14201A; --a-ink: #2C3631;
  --a-ink-muted: #C9D3CC; --a-neon-text: #14201A; --a-focus: #D4F046; --a-frame: #D4F046; --a-check: #9DBBA7;
  --a-check-text: #14201A; --a-bar: #4A5850; --a-bar-today: #9DBBA7; --a-ok: #8FD19E; --a-ok-bg: #1B2B20;
  --a-warn: #F0C766; --a-warn-bg: #2A2312; --a-fail: #F08A80; --a-fail-bg: #2E1714; --a-shadow: none; color-scheme: dark;
}

/* Logo: helle und dunkle Fassung passend zum Design */
.logo--dark { display: none !important; }
:root[data-theme="dark"] .logo--light { display: none !important; }
:root[data-theme="dark"] .logo--dark { display: block !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo--light { display: none !important; }
  :root:not([data-theme="light"]) .logo--dark { display: block !important; }
}

/* ---------- Grundlagen ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.ews-admin { margin: 0; background: var(--a-bg); color: var(--a-text); font: 1rem/1.55 var(--a-font); -webkit-font-smoothing: antialiased; }
.ews-admin a { color: var(--a-accent); text-underline-offset: 0.15em; }
.ews-admin :focus-visible { outline: 2px solid var(--a-focus); outline-offset: 2px; border-radius: 4px; }
.ews-admin h1, .ews-admin h2, .ews-admin h3 { font-family: var(--a-font-head); font-weight: 500; letter-spacing: -0.02em; }
.ews-admin h1 { font-size: 2rem; line-height: 1.15; margin: 0 0 0.75rem; }
.ews-admin h2 { font-size: 1.25rem; line-height: 1.25; margin: 0 0 0.75rem; }
.eyebrow { margin: 0; font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--a-muted); }
.lead { color: var(--a-muted); margin: 0 0 1.5rem; }
.muted { color: var(--a-muted); }
.icon { flex: none; display: block; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 50; padding: 0.6rem 1rem; border-radius: var(--a-radius); background: var(--a-ink); color: var(--a-ink-text) !important; }
.skip-link:focus { top: 1rem; }
.show-phone { display: none; }

/* ---------- Rahmen: Desktop mit Seitenleiste ---------- */
body.ews-admin--admin {
  display: grid; grid-template-columns: var(--a-side) minmax(0, 1fr); column-gap: 24px; align-items: start;
  min-height: 100vh; padding: 24px;
}
.ews-admin--admin > :not(.side):not(.skip-link):not(script) { grid-column: 2; }
.side {
  grid-column: 1; grid-row: 1 / span 20; position: sticky; top: 24px; align-self: start;
  height: calc(100vh - 48px); min-height: 34rem; overflow-y: auto; overflow-x: hidden;
  display: flex; flex-direction: column; gap: 28px; padding: 24px 16px;
  background: var(--a-surface); border-radius: var(--a-radius); box-shadow: var(--a-shadow);
}
.side__brand { display: block; padding: 4px 12px; color: var(--a-text); text-decoration: none; font-family: var(--a-font-head); font-weight: 700; font-size: 1.25rem; }
.side__logo { display: block; height: 45px; width: auto; max-width: 100%; }
.side__nav { display: flex; flex-direction: column; gap: 4px; }
.side__link {
  display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 14px; border-radius: var(--a-radius);
  color: var(--a-text) !important; text-decoration: none;
}
.side__link:hover { background: color-mix(in srgb, var(--a-bg) 55%, transparent); }
.side__link[aria-current="page"] { background: var(--a-bg); font-weight: 700; }
.side__link-label { flex: 1; }
.count {
  min-width: 24px; height: 24px; padding: 0 8px; border-radius: var(--a-radius); display: inline-flex; align-items: center; justify-content: center;
  background: var(--a-neon); color: var(--a-neon-text); font-size: 0.8125rem; font-weight: 700; line-height: 1;
}
.side__foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; padding-top: 20px; border-top: 1px solid var(--a-line); }
.side__user { display: flex; align-items: center; gap: 12px; padding: 6px 8px; border-radius: var(--a-radius); color: var(--a-text) !important; text-decoration: none; }
.side__user:hover, .side__user[aria-current="page"] { background: var(--a-bg); }
.side__user-text { display: flex; flex-direction: column; min-width: 0; }
.side__user-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side__user-role { font-size: 0.8125rem; color: var(--a-muted); }
.side__row { display: flex; gap: 6px; }
.side__row .logout-form { flex: 1 1 auto; min-width: 0; margin: 0; }
.side__row .logout-form .button { min-width: 0; width: 100%; padding-left: 10px; padding-right: 10px; gap: 6px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.side__row .logout-form .button svg { flex: none; }
.side__row .icon-toggle { flex: none; }
.side__row .icon-toggle.lang-toggle { padding: 0 8px; gap: 4px; }
.lang-form { margin: 0; display: flex; }
.icon-toggle.lang-toggle { width: auto; padding: 0 10px; gap: 5px; font: inherit; font-size: 0.8125rem; font-weight: 700; }
.avatar {
  width: 40px; height: 40px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--a-surface-2); color: var(--a-text); font-family: var(--a-font-head); font-weight: 500; font-size: 0.9375rem;
}
.avatar--ink { background: var(--a-ink); color: var(--a-ink-text); }
.icon-toggle {
  width: 44px; height: 44px; flex: none; display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  border-radius: var(--a-radius); border: 1px solid var(--a-border); background: transparent; color: var(--a-text);
}
.icon-toggle[hidden], .theme-switch[hidden] { display: none !important; }
.theme-toggle__sun { display: none; }
:root[data-theme="dark"] .theme-toggle__sun { display: block; }
:root[data-theme="dark"] .theme-toggle__moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle__sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle__moon { display: none; }
}

.mtop, .mbar, .mmore { display: none; }

main.dashboard { min-width: 0; max-width: 64rem; padding: 8px 4px 24px; }
main.dashboard--wide, main.dash { max-width: none; }
.license-banner { margin: 0 0 16px; border-radius: var(--a-radius); }

/* ---------- Bausteine ---------- */
.panel, .card {
  background: var(--a-surface); border-radius: var(--a-radius); padding: 24px; box-shadow: var(--a-shadow); border: 0;
}
.dashboard .panel { margin-top: 1.5rem; }
.card--tone { background: var(--a-surface-2); box-shadow: none; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.card__head h2 { margin: 0; }
.card__link { font-weight: 700; }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0.5rem 1.15rem;
  font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; white-space: nowrap;
  color: var(--a-text); background: var(--a-surface); border: 1px solid var(--a-border); border-radius: var(--a-radius);
}
.ews-admin a.button { color: var(--a-text); }
.button--primary, .ews-admin a.button--primary { color: var(--a-accent-text); background: var(--a-accent); border-color: var(--a-accent); }
.button--ink, .ews-admin a.button--ink { min-height: 50px; padding: 0 22px; color: var(--a-ink-text); background: var(--a-ink); border-color: var(--a-ink); }
:root[data-theme="dark"] .button--ink, :root[data-theme="dark"] .ews-admin a.button--ink { color: var(--a-accent-text); background: var(--a-accent); border-color: var(--a-accent); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .button--ink, :root:not([data-theme="light"]) .ews-admin a.button--ink { color: var(--a-accent-text); background: var(--a-accent); border-color: var(--a-accent); }
}
.button--ink .caret { width: 3px; height: 20px; border-radius: 2px; background: var(--a-neon); }
:root[data-theme="dark"] .button--ink .caret { background: var(--a-accent-text); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .button--ink .caret { background: var(--a-accent-text); } }
.button--outline { background: transparent; font-weight: 400; }
.button--small { min-height: 40px; padding: 0 14px; }
.button--block { width: 100%; font-weight: 400; }
.button--wide { width: 100%; }
.button--danger, .ews-admin a.button--danger { color: #FFFFFF; background: var(--a-fail); border-color: var(--a-fail); }
.button--quiet { background: transparent; border-color: transparent; color: var(--a-muted); text-decoration: underline; font-weight: 400; }
.link-button { font: inherit; color: var(--a-accent); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; min-height: 1.5rem; }
.link-button--danger { color: var(--a-fail); }
.icon-button { min-width: 2.5rem; min-height: 2.5rem; font: inherit; background: var(--a-surface); color: var(--a-text); border: 1px solid var(--a-border); border-radius: var(--a-radius); cursor: pointer; }
.icon-button:disabled { opacity: 0.4; cursor: default; }
.is-busy { opacity: 0.7; cursor: progress; }
.actions { display: flex; gap: 0.75rem; justify-content: flex-end; margin-top: 1.5rem; flex-wrap: wrap; }
.actions--left { justify-content: flex-start; margin-top: 0.75rem; }

.pill { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: var(--a-radius); font-size: 0.8125rem; background: var(--a-bg); color: var(--a-text); white-space: nowrap; }
.pill--neon { background: var(--a-neon); color: var(--a-neon-text); font-weight: 700; }
.badge { display: inline-block; font-size: 0.8125rem; font-weight: 700; padding: 0.15rem 0.6rem; border-radius: var(--a-radius); background: var(--a-bg); color: var(--a-muted); }
.badge--ok { background: var(--a-ok-bg); color: var(--a-ok); }
.badge--draft { background: var(--a-warn-bg); color: var(--a-warn); }
.badge--fail { background: var(--a-fail-bg); color: var(--a-fail); }

.notice { border-radius: var(--a-radius); padding: 0.85rem 1.1rem; margin: 0 0 1.25rem; border: 1px solid; }
.notice p { margin: 0; }
.notice ul { margin: 0; padding-left: 1.25rem; }
.notice--error { background: var(--a-fail-bg); border-color: var(--a-fail); }
.notice--ok { background: var(--a-ok-bg); border-color: var(--a-ok); }
.notice--warn { background: var(--a-warn-bg); border-color: var(--a-warn); }
.notice:has(.notice__close) { position: relative; padding-right: 3.25rem; }
.notice__close { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); width: 40px; height: 40px; border: 0; border-radius: var(--a-radius); background: transparent; color: inherit; font-size: 1.375rem; line-height: 1; cursor: pointer; }
.notice__close:hover { background: color-mix(in srgb, currentColor 10%, transparent); }
.notice.is-leaving { opacity: 0; transition: opacity .35s ease; }

/* Rückfrage-Dialog */
.confirm { max-width: min(28rem, calc(100vw - 32px)); padding: 24px; border: 0; border-radius: var(--a-radius); background: var(--a-surface); color: var(--a-text); box-shadow: 0 16px 48px rgba(30, 36, 32, 0.24); }
.confirm::backdrop { background: rgba(23, 27, 25, 0.45); }
.confirm__text { margin: 0 0 20px; font-size: 1.0625rem; line-height: 1.5; }
.confirm__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.confirm__actions .button { min-height: 48px; }

/* Formulare */
.field { margin: 0 0 1.25rem; border: 0; padding: 0; min-width: 0; }
.field label, .field legend { display: block; font-weight: 700; margin-bottom: 0.35rem; }
.field input[type="text"], .field input[type="email"], .field input[type="password"], .field input[type="url"], .field input[type="tel"],
.field input[type="number"], .field input[type="date"], .field select, .field textarea, .table input[type="text"], .table select {
  width: 100%; min-height: 2.875rem; padding: 0.55rem 0.8rem; font: inherit; color: var(--a-text);
  background: var(--a-surface); border: 1px solid var(--a-border); border-radius: var(--a-radius);
}
.field textarea { resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--a-accent); }
.field__help { color: var(--a-muted); font-size: 0.875rem; margin: -0.15rem 0 0.4rem; }
.field__error { color: var(--a-fail); font-size: 0.875rem; font-weight: 700; margin: 0 0 0.4rem; }
.field--error input, .field--error select, .field--error textarea { border-color: var(--a-fail); border-width: 2px; }
.field--check .choice { font-weight: 700 !important; }
.field--check .field__help { margin: 0.1rem 0 0 1.6rem; }
.choice { display: flex; align-items: center; gap: 0.5rem; font-weight: 400 !important; min-height: 2rem; }
.choice input { width: 1.1rem; height: 1.1rem; accent-color: var(--a-accent); }
.form-grid { display: grid; gap: 0 1.5rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); align-items: start; }
.form-grid .actions { grid-column: 1 / -1; justify-content: flex-start; margin-top: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 0 1.25rem; }
.grid-3 { display: grid; grid-template-columns: 8rem 1fr; gap: 0 1rem; }
input[type="file"] { font: inherit; padding: 0.6rem; border: 1px dashed var(--a-border); border-radius: var(--a-radius); width: 100%; max-width: 36rem; background: var(--a-bg); color: var(--a-text); }

/* Tabellen (Seiten, Beiträge, Navigation, Benutzer) */
.table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 1.5rem 0; background: var(--a-surface); border-radius: var(--a-radius); box-shadow: var(--a-shadow); overflow: hidden; }
.table th, .table td { text-align: left; padding: 0.75rem 1rem; border-bottom: 1px solid var(--a-line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table th { font-size: 0.8125rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--a-muted); }
.table code { font-size: 0.875rem; color: var(--a-muted); }
.table input[type="text"], .table select { min-height: 2.5rem; padding: 0.35rem 0.6rem; }
.depth-1 { padding-left: 2rem !important; }
.depth-2 { padding-left: 3rem !important; }
.depth-3 { padding-left: 4rem !important; }
.actions-cell { white-space: nowrap; }
.actions-cell > * + * { margin-left: 0.9rem; }
.actions-cell .choice { display: inline-flex; }
.inline-form { display: inline; margin: 0; }
.actions-cell > .inline-form { margin-left: 0.9rem; }
.plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }

/* Reiter (Einstellungen) */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 1.25rem 0 1.5rem; padding: 4px; background: var(--a-surface); border-radius: var(--a-radius); box-shadow: var(--a-shadow); }
.tabs a { padding: 0.55rem 0.9rem; color: var(--a-text); text-decoration: none; border-radius: var(--a-radius); }
.tabs a:hover { background: color-mix(in srgb, var(--a-bg) 55%, transparent); }
.tabs a[aria-current="page"] { background: var(--a-bg); font-weight: 700; }
.settings .panel { margin: 0; }
.settings .panel h2 { margin-top: 0; }
.settings fieldset { border: 0; padding: 0; margin: 0 0 1.5rem; }
.settings legend { font-family: var(--a-font-head); font-size: 1.125rem; font-weight: 500; margin-bottom: 0.75rem; padding: 0; }
.more summary { cursor: pointer; font-weight: 700; }
.more[open] summary { margin-bottom: 0.75rem; }
.facts { display: grid; grid-template-columns: minmax(8rem, 14rem) 1fr; gap: 0.4rem 1rem; margin: 1rem 0; }
.facts dt { font-weight: 700; color: var(--a-muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.update__notes { margin-top: 0.5rem; }
.actions + .field__help, form.actions + .field__help { margin-top: 0.6rem; }
.image-setting { display: flex; gap: 1rem; align-items: flex-start; flex-wrap: wrap; margin-bottom: 1.25rem; }
.image-setting__preview { width: 9rem; height: 5rem; border: 1px solid var(--a-line); border-radius: var(--a-radius); display: flex; align-items: center; justify-content: center; background: repeating-conic-gradient(var(--a-bg) 0 25%, var(--a-surface) 0 50%) 0 0 / 14px 14px; color: var(--a-muted); font-size: 0.8125rem; text-align: center; overflow: hidden; }
.image-setting__preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.image-setting .field { flex: 1; min-width: 14rem; margin: 0; }
.image-setting .field--check { flex-basis: 100%; margin: -0.5rem 0 0 10rem; min-width: 0; }
.themes { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }
.theme-card { border: 1px solid var(--a-line); border-radius: var(--a-radius); background: var(--a-surface); overflow: hidden; display: flex; flex-direction: column; }
.theme-card.is-active { border: 2px solid var(--a-accent); }
.theme-card__shot { aspect-ratio: 16 / 10; background: var(--a-bg); display: flex; align-items: center; justify-content: center; color: var(--a-muted); border-bottom: 1px solid var(--a-line); }
.theme-card__shot img { width: 100%; height: 100%; object-fit: cover; }
.theme-card__body { padding: 0.9rem 1rem; display: grid; gap: 0.35rem; flex: 1; }
.theme-card__body p { margin: 0; color: var(--a-muted); font-size: 0.9375rem; }
.theme-card form { padding: 0 1rem 1rem; margin: 0; }
.theme-card__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.theme-card__delete { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; text-decoration: none; }
.theme-card__delete:hover { text-decoration: underline; }
.color-row { display: flex; gap: 0.75rem; align-items: center; }
.color-row input[type="color"] { width: 3.25rem; height: 2.875rem; padding: 0.2rem; border: 1px solid var(--a-border); border-radius: var(--a-radius); background: var(--a-surface); cursor: pointer; }
.color-row input[type="text"] { max-width: 9rem; font-family: ui-monospace, monospace; }
.invite-link { font-family: ui-monospace, monospace; font-size: 0.875rem; overflow-wrap: anywhere; user-select: all; background: var(--a-bg); padding: 0.6rem; border-radius: var(--a-radius); margin-top: 0.5rem; }

/* Server-Prüfungen (Setup, Hinweise) */
.checks { list-style: none; margin: 0 0 1.5rem; padding: 0; border-top: 1px solid var(--a-line); }
.check { display: grid; grid-template-columns: 7.5rem 1fr; gap: 0.25rem 1rem; padding: 0.6rem 0; border-bottom: 1px solid var(--a-line); }
.check__status { font-size: 0.8125rem; font-weight: 700; padding: 0.15rem 0.5rem; border-radius: var(--a-radius); align-self: start; text-align: center; }
.check--ok .check__status { color: var(--a-ok); background: var(--a-ok-bg); }
.check--warn .check__status { color: var(--a-warn); background: var(--a-warn-bg); }
.check--fail .check__status { color: var(--a-fail); background: var(--a-fail-bg); }
.check__hint { grid-column: 2; color: var(--a-muted); font-size: 0.875rem; overflow-wrap: anywhere; }

/* Mediathek */

/* Anfragen */

/* ---------- Übersicht ---------- */
.dash { display: flex; flex-direction: column; gap: 20px; }
.dash > .notice { margin: 0; }
.hero {
  display: flex; flex-wrap: wrap; align-items: center; gap: 36px; padding: 36px 40px;
  background: var(--a-surface-2); border: 1px solid var(--a-frame); border-radius: var(--a-radius);
}
.hero__text { flex: 1 1 320px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ews-admin .hero__title { margin: 0; font-size: 2.75rem; line-height: 1.08; }
.hero__lead { margin: 0; font-size: 1.0625rem; color: var(--a-muted); max-width: 28rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.hero__actions .button--outline { min-height: 50px; padding: 0 20px; }
.hero__preview { flex: 1 1 380px; background: var(--a-surface); border-radius: var(--a-radius); overflow: hidden; }
.mini__bar { height: 34px; display: flex; align-items: center; gap: 6px; padding: 0 14px; background: var(--a-bg); }
.mini__bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--a-line); }
.mini__body { padding: 52px 26px 22px; display: flex; flex-direction: column; gap: 12px; }
.mini__focus { position: relative; align-self: flex-start; padding: 6px 10px; border-radius: var(--a-radius); outline: 3px solid var(--a-neon); outline-offset: 2px; }
.mini__headline { font-family: var(--a-font-head); font-weight: 500; font-size: 1.625rem; letter-spacing: -0.02em; }
.mini__caret { display: inline-block; width: 2px; height: 24px; margin-left: 2px; vertical-align: -4px; background: var(--a-text); }
.mini__tools { position: absolute; left: 0; top: -44px; display: flex; gap: 2px; padding: 4px; border-radius: var(--a-radius); background: #26302A; color: #FFFFFF; font-size: 0.8125rem; }
.mini__tools > * { padding: 4px 8px; font-style: normal; }
.mini__tools i { font-style: italic; }
.mini__line { height: 9px; border-radius: 6px; background: var(--a-bg); }
.mini__line--86 { width: 86%; }
.mini__line--64 { width: 64%; }
.mini__saved { align-self: flex-end; display: inline-flex; align-items: center; gap: 4px; font-size: 0.8125rem; color: var(--a-muted); }

.kpis, .row2 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.tile {
  display: flex; flex-direction: column; gap: 6px; padding: 22px 24px; border-radius: var(--a-radius);
  background: var(--a-surface); color: var(--a-text); text-decoration: none; box-shadow: var(--a-shadow);
}
.tile p { margin: 0; }
.tile__number { font-family: var(--a-font-head); font-weight: 300; font-size: 3.25rem; line-height: 1; letter-spacing: -0.02em; }
.tile__note { font-size: 0.875rem; color: var(--a-muted); }
.tile--visits { grid-column: span 2; flex-direction: row; flex-wrap: wrap; align-items: stretch; justify-content: space-between; gap: 16px; }
.tile--visits .spark { align-self: flex-end; }
.tile__main { display: flex; flex-direction: column; gap: 6px; }
.spark { display: block; flex: none; }
.spark .bar { fill: var(--a-bar); }
.spark .bar--today { fill: var(--a-bar-today); }
.spark .bar--empty { fill: var(--a-line); }
.tile--content { gap: 0; }
.tile--content .eyebrow { margin-bottom: 6px; }
.stat { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 0; color: var(--a-text) !important; text-decoration: none; }
.stat + .stat { border-top: 1px solid var(--a-line); }
.stat:last-child { padding-bottom: 0; }
.stat__number { font-family: var(--a-font-head); font-weight: 300; font-size: 1.875rem; line-height: 1; }
.stat__label { font-size: 0.875rem; color: var(--a-muted); }
.stat:hover .stat__label { text-decoration: underline; }
.ews-admin a.tile--ink, .tile--ink { background: var(--a-ink); color: var(--a-ink-text); box-shadow: none; }
.tile--ink .eyebrow, .tile--ink .tile__note { color: var(--a-ink-muted); }
.tile__number--neon { color: var(--a-neon); }
.tile--ink .tile__note { margin-top: auto; }
.kpis--editor .tile--content { grid-column: span 2; }
.ews-admin a.tile--calm { color: var(--a-text); }
.tile--calm .tile__calm { display: flex; align-items: center; gap: 10px; margin-top: 6px; font-family: var(--a-font-head); font-weight: 500; font-size: 1.25rem; line-height: 1.25; }
.tile__calm .icon { flex: none; width: 26px; height: 26px; padding: 4px; box-sizing: border-box; border-radius: 50%; background: var(--a-check); color: var(--a-check-text); }
.tile--calm .tile__note { margin-top: auto; font-weight: 700; color: var(--a-text); }
.tile--calm:hover .tile__note { text-decoration: underline; }

.row2 .drafts { grid-column: span 2; }
.row2--editor .drafts { grid-column: span 3; }
.quick__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.quick__item {
  display: flex; flex-direction: column; justify-content: space-between; gap: 8px; min-height: 88px; padding: 14px;
  border-radius: var(--a-radius); background: var(--a-surface-2); color: var(--a-text) !important; text-decoration: none; font-weight: 700; font-size: 0.9375rem;
}
.quick__item:hover { background: color-mix(in srgb, var(--a-surface-2) 80%, var(--a-accent)); }
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--a-line); }
.row__icon { width: 36px; height: 36px; flex: none; border-radius: var(--a-radius); background: var(--a-surface-2); display: flex; align-items: center; justify-content: center; }
.row__text { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 10px; }
.row__text .muted { font-size: 0.875rem; }
.row__text--link { color: var(--a-text) !important; text-decoration: none; }
.row__text--link:hover strong { text-decoration: underline; }
.row__when { font-size: 0.875rem; white-space: nowrap; }
.empty { margin: 8px 0 0; }
.more-rows > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding-top: 10px; border-top: 1px solid var(--a-line); width: 100%; color: var(--a-accent); font-weight: 700; text-decoration: underline; text-underline-offset: 0.15em; }
.more-rows > summary::-webkit-details-marker { display: none; }
.more-rows[open] > summary { order: 2; }
.more-rows .more-rows__close, .more-rows[open] .more-rows__open { display: none; }
.more-rows[open] .more-rows__close { display: inline; }
.more-rows { display: flex; flex-direction: column; }
.health { display: flex; flex-direction: column; gap: 14px; }
.health h2 { margin: 0; }
.health__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; font-size: 0.9375rem; }
.health__list li { display: flex; gap: 10px; align-items: flex-start; }
.health__icon { width: 22px; height: 22px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--a-check); color: var(--a-check-text); margin-top: 1px; }
.is-warn .health__icon { background: var(--a-warn); color: var(--a-surface); }
.is-info .health__icon { background: transparent; color: var(--a-muted); box-shadow: inset 0 0 0 1px var(--a-border); }
.is-info { color: var(--a-muted); }
.health__hint { display: block; font-size: 0.8125rem; color: var(--a-muted); }
.health__more { margin-top: auto; font-weight: 700; }
.latest .row { padding: 12px 0; }

/* ---------- Listen: Seiten und Beiträge ---------- */
main.list-page { display: flex; flex-direction: column; gap: 20px; max-width: none; }
.list-page > .notice { margin: 0; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.ews-admin .page-head h1 { margin: 0; font-size: 2.25rem; }
.page-head__lead { margin: 6px 0 0; color: var(--a-muted); }
.page-head__new { min-height: 48px; padding: 0 20px; }
.list { padding: 8px 24px; }
.list__head, .item { display: grid; grid-template-columns: minmax(0, 1fr) 210px 176px; gap: 16px; align-items: center; }
.list__head--posts, .item--post { grid-template-columns: 64px minmax(0, 1fr) 210px 176px; }
.list__head { padding: 12px 0; border-bottom: 1px solid var(--a-line); font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--a-muted); }
.ews-admin .list__group { margin: 0; padding: 16px 0 8px; font-family: var(--a-font); font-weight: 400; font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--a-muted); border-bottom: 1px solid var(--a-line); }
.items { list-style: none; margin: 0; padding: 0; }
.item { padding: 12px 0; border-bottom: 1px solid var(--a-line); }
.item:last-child { border-bottom: 0; }
.item__main { display: flex; align-items: center; gap: 14px; min-width: 0; color: var(--a-text) !important; text-decoration: none; }
.item__main:hover .item__title { text-decoration: underline; text-underline-offset: 0.15em; }
.item--depth-1 .item__main { padding-left: 28px; }
.item--depth-2 .item__main { padding-left: 56px; }
.item--depth-3 .item__main { padding-left: 84px; }
.item__branch { color: var(--a-border); margin: 0 -6px 0 -24px; display: flex; }
.item__icon { width: 40px; height: 40px; flex: none; border-radius: var(--a-radius); background: var(--a-bg); display: flex; align-items: center; justify-content: center; }
.item__icon--tone { background: var(--a-surface-2); }
.item__text { display: flex; flex-direction: column; min-width: 0; }
.item__title { overflow-wrap: anywhere; }
.item__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 0.875rem; color: var(--a-muted); }
.item__status { justify-self: start; }
.item__actions { display: flex; gap: 8px; justify-content: flex-end; align-items: center; }
.status { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 12px; border-radius: var(--a-radius); font-size: 0.875rem; white-space: nowrap; border: 1px solid transparent; }
.status__dot { width: 8px; height: 8px; flex: none; border-radius: 50%; box-sizing: border-box; }
.status--published { background: var(--a-surface-2); }
.status--published .status__dot { background: var(--a-accent); }
.status--changed { border-color: var(--a-border); }
.status--changed .status__dot { border: 2px solid var(--a-accent); background: linear-gradient(90deg, var(--a-accent) 50%, transparent 50%); }
.status--new { border: 1px dashed var(--a-border); }
.status--new .status__dot { border: 2px solid var(--a-border); }
.status--scheduled { background: var(--a-bg); }
.status--scheduled .status__dot { width: 12px; height: 12px; border: 2px solid var(--a-text); position: relative; }
.status--scheduled .status__dot::after { content: ""; position: absolute; left: 3px; top: 1px; width: 2px; height: 4px; background: var(--a-text); border-radius: 1px; }
.cal { width: 56px; height: 56px; border-radius: var(--a-radius); background: var(--a-bg); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.cal--future { background: transparent; border: 1px dashed var(--a-border); }
.cal__day { font-family: var(--a-font-head); font-weight: 300; font-size: 1.5rem; }
.cal__month { font-size: 0.75rem; color: var(--a-muted); margin-top: 3px; }
.tabs--filter { align-self: flex-start; margin: 0; }
.tabs__count { color: var(--a-muted); font-weight: 400; margin-left: 4px; }

/* ⋯-Menü (details/summary, ohne JavaScript bedienbar) */
.rowmenu { position: relative; }
.rowmenu__toggle {
  list-style: none; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; cursor: pointer;
  border-radius: var(--a-radius); border: 1px solid var(--a-line); color: var(--a-text);
}
.rowmenu__toggle::-webkit-details-marker { display: none; }
.rowmenu__toggle:hover { border-color: var(--a-border); }
.rowmenu[open] .rowmenu__toggle { border-color: var(--a-text); background: var(--a-bg); }
.rowmenu__panel {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; width: 240px; padding: 6px; display: flex; flex-direction: column;
  background: var(--a-surface); border: 1px solid var(--a-line); border-radius: var(--a-radius); box-shadow: 0 8px 24px rgba(30, 36, 32, 0.14);
}
.rowmenu--up .rowmenu__panel { top: auto; bottom: calc(100% + 8px); }
.rowmenu__form { margin: 0; }
.rowmenu__item {
  width: 100%; min-height: 44px; padding: 0 12px; display: flex; align-items: center; gap: 10px; border: 0; border-radius: var(--a-radius);
  background: none; font: inherit; color: var(--a-text) !important; text-decoration: none; text-align: left; cursor: pointer;
}
.rowmenu__item:hover, .rowmenu__item:focus-visible { background: var(--a-bg); }
.rowmenu__item--danger { color: var(--a-fail) !important; }
.rowmenu__sep { height: 1px; margin: 4px 6px; background: var(--a-line); }

/* Formular „Neue Seite / Neuer Beitrag“: sichtbar über #new (ohne JS) oder .is-open */
.newform { display: none; border: 1px solid var(--a-accent); padding: 28px; }
.newform:target, .newform.is-open { display: block; }
.newform.is-closed { display: none; }
.ews-admin .newform h2 { margin: 0 0 4px; font-size: 1.375rem; }
.newform__lead { margin: 0 0 20px; color: var(--a-muted); }
.newform__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 20px; align-items: start; }
.newform__grid .field { margin-bottom: 0; }
.newform__actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.newform__actions .button { min-height: 48px; }
.field__help--below { margin: 6px 0 0; font-size: 0.8125rem; }
.affix { display: flex; align-items: center; min-height: 2.875rem; border: 1px solid var(--a-border); border-radius: var(--a-radius); background: var(--a-surface); overflow: hidden; }
.affix:focus-within { outline: 2px solid var(--a-focus); outline-offset: 2px; border-color: var(--a-accent); }
.affix__text { padding: 0 2px 0 0.8rem; color: var(--a-muted); white-space: nowrap; max-width: 55%; overflow: hidden; text-overflow: ellipsis; }
.ews-admin .affix input { flex: 1; min-width: 0; min-height: 0; height: 2.75rem; border: 0; padding: 0 0.8rem 0 0; background: transparent; font: inherit; color: var(--a-text); outline: none; }
.field--error .affix { border-color: var(--a-fail); border-width: 2px; }
.field input[type="date"] { max-width: 100%; }
.empty-card { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; padding: 28px; }
.empty-card__icon { width: 72px; height: 72px; border-radius: var(--a-radius); background: var(--a-surface-2); display: flex; align-items: center; justify-content: center; }
.empty-card__text { flex: 1 1 300px; }
.ews-admin .empty-card h2 { margin: 0 0 4px; }
.empty-card p { margin: 0; }

@media (max-width: 1180px) {
  .newform__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
}

/* ---------- Zentrierte Seiten: Login, Passwort, Setup ---------- */
.ews-admin--centered { display: grid; place-items: start center; min-height: 100vh; padding: 4rem 1rem; }
.ews-admin--centered .panel { width: 100%; padding: 32px; }
.setup { max-width: 40rem; }
.login { max-width: 25rem; position: relative; }
/* Sprachwahl DE/EN: rechtsbündig, auf Höhe des Logos (Panel-Innenabstand, Logohöhe 3.25rem) */
.login__lang { position: absolute; top: 32px; right: 32px; height: 3.25rem; display: flex; align-items: center; gap: 4px; font-size: 1rem; letter-spacing: 0.04em; }
.ews-admin .login__lang a { min-height: 44px; min-width: 44px; padding: 0 0 0 10px; display: inline-flex; align-items: center; justify-content: flex-end; border-radius: var(--a-radius); color: var(--a-muted); font-weight: 600; text-decoration: none; }
.login__logo { max-width: calc(100% - 4rem); }
.ews-admin .login__lang a:hover { color: var(--a-text); text-decoration: underline; text-underline-offset: 4px; }

.login__title { text-align: left; }
.login__title--logo, .login__brand { margin: 0 0 1.5rem; }
.ews-admin .login .login__title--logo { margin-bottom: calc(0.75rem + 20px); }
.login__logo { display: block; height: 3.25rem; width: auto; }
.login__forgot { margin: 1.25rem 0 0; font-size: 0.9375rem; text-align: center; }
.setup__header { margin-bottom: 1.5rem; }
.setup__brand { font-weight: 700; margin: 0 0 0.25rem; }
.setup__step { color: var(--a-muted); font-size: 0.875rem; margin: 0 0 0.5rem; }
.setup__progress { display: flex; gap: 0.25rem; list-style: none; margin: 0; padding: 0; }
.setup__progress li { flex: 1; height: 4px; background: var(--a-line); border-radius: 2px; }
.setup__progress li.is-done, .setup__progress li.is-current { background: var(--a-accent); }
.lang-switch { display: flex; gap: 1rem; justify-content: flex-end; margin-top: -3.25rem; margin-bottom: 1.5rem; font-size: 0.875rem; }
.lang-switch a[aria-current] { color: var(--a-text); font-weight: 700; text-decoration: none; }

/* ---------- Übersicht: Kacheln (Desktop per Ziehen anordnen) ---------- */
.dash-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; grid-auto-flow: row dense; }
.dash-cell { position: relative; display: flex; min-width: 0; }
.dash-cell > :not(.dash-grip) { flex: 1; min-width: 0; margin: 0; }
.dash-cell--visits, .dash-cell--drafts { grid-column: span 2; }
.dash-cell--latest { grid-column: 1 / -1; }
.dash-grid--editor .dash-cell--content { grid-column: span 2; }
.dash-grid--editor .dash-cell--drafts { grid-column: span 3; }
.dash-grip {
  /* Anfasser oben mittig im Innenabstand der Kachel: immer sichtbar, überdeckt keine Inhalte */
  position: absolute; top: 3px; left: 50%; transform: translateX(-50%); z-index: 2; width: 48px; height: 17px; padding: 0; display: none; align-items: center; justify-content: center;
  border: 0; border-radius: 0.5rem; background: transparent; color: var(--a-muted); cursor: grab;
}
.dash-cell--inbox .dash-grip { color: var(--a-ink-muted); }
.dash-grip:hover, .dash-grip:focus-visible { color: var(--a-text); background: var(--a-bg); }
.dash-cell--inbox .dash-grip:hover, .dash-cell--inbox .dash-grip:focus-visible { color: var(--a-ink-text); background: rgba(255, 255, 255, 0.2); }
@media (min-width: 761px) {
  .dash-js .dash-grip { display: inline-flex; opacity: 0.55; transition: opacity 120ms, background-color 120ms; }
  .dash-js .dash-cell:hover .dash-grip, .dash-js .dash-grip:focus-visible { opacity: 1; }
  .dash-grip:active { cursor: grabbing; }
}
/* Desktop: ganz leichter Schatten beim Darüberfahren (Begrüßung bleibt ruhig, sie gehört nicht zum Raster) */
@media (min-width: 761px) {
  .dash-cell > :not(.dash-grip) { transition: box-shadow 160ms ease; }
  .dash-cell:hover > :not(.dash-grip) { box-shadow: 0 6px 20px rgba(30, 36, 32, 0.08), 0 1px 3px rgba(30, 36, 32, 0.06); }
  :root[data-theme="dark"] .dash-cell:hover > :not(.dash-grip) { box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45); }
}
@media (min-width: 761px) and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .dash-cell:hover > :not(.dash-grip) { box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45); }
}
.dash-cell.is-dragging { opacity: 0.4; }
.dash-cell.is-drop-before::before, .dash-cell.is-drop-after::after {
  content: ""; position: absolute; top: 4px; bottom: 4px; width: 4px; border-radius: 2px; background: var(--a-accent); z-index: 3;
}
.dash-cell.is-drop-before::before { left: -10px; }
.dash-cell.is-drop-after::after { right: -10px; }
.dash-hint { margin: -4px 0 0; font-size: 0.8125rem; color: var(--a-muted); }
.dash-hint .link-button { font-size: 0.8125rem; }

/* ---------- Mittlere Breiten ---------- */
@media (max-width: 1180px) {
  .kpis, .row2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row2 .drafts, .row2--editor .drafts { grid-column: span 2; }
  .row2 .quick { order: 1; }
  .dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-cell--visits, .dash-cell--drafts, .dash-grid--editor .dash-cell--drafts { grid-column: span 2; }
}

/* ---------- Handy ---------- */
/* ---------- Medien ---------- */
.media-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.msearch { flex: 1 1 220px; max-width: 360px; position: relative; display: flex; align-items: center; margin: 0; }
.msearch .icon { position: absolute; left: 14px; color: var(--a-muted); pointer-events: none; }
.ews-admin .msearch input { width: 100%; min-height: 48px; padding: 0 14px 0 42px; border: 1px solid var(--a-border); border-radius: var(--a-radius); background: var(--a-surface); color: var(--a-text); font: inherit; box-sizing: border-box; }
.msearch input:focus { border-color: var(--a-accent); }
.media-layout { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.media-main { flex: 999 1 480px; min-width: 0; }
.mgrid { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.has-detail .mgrid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.mcard { display: flex; flex-direction: column; gap: 8px; color: var(--a-text) !important; text-decoration: none; border-radius: var(--a-radius); }
.mcard__img { position: relative; display: block; aspect-ratio: 1 / 1; border-radius: var(--a-radius); overflow: hidden; background: var(--a-surface-2); }
.mcard__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mcard__img--alpha { background: repeating-conic-gradient(var(--a-bg) 0 25%, var(--a-surface) 0 50%) 0 0 / 16px 16px; }
.mcard__img--alpha img { object-fit: contain; }
.mcard:hover .mcard__name { text-decoration: underline; }
.mcard.is-current .mcard__img { outline: 3px solid var(--a-text); outline-offset: 2px; }
.mcard__name { font-size: 0.875rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mcard__meta { font-size: 0.75rem; color: var(--a-muted); margin-top: -6px; }
.mbadge { position: absolute; display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px; border-radius: var(--a-radius); font-size: 0.75rem; box-sizing: border-box; }
.mbadge--alt { left: 8px; bottom: 8px; background: var(--a-surface); color: var(--a-fail); border: 1px dashed var(--a-fail); font-weight: 700; }
.mbadge--unused { right: 8px; top: 8px; background: color-mix(in srgb, var(--a-surface) 92%, transparent); color: var(--a-text); }
.mupload { height: 100%; position: relative; margin: 0; }
.mupload__input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.mupload__tile {
  aspect-ratio: 1 / 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 12px; box-sizing: border-box;
  border: 1px dashed var(--a-border); border-radius: var(--a-radius); background: color-mix(in srgb, var(--a-surface) 55%, var(--a-bg)); text-align: center; cursor: pointer; font-weight: 400;
}
.mupload__tile strong { font-size: 0.9375rem; }
.mupload__hint { font-size: 0.8125rem; color: var(--a-muted); }
.mupload__tile:hover, .mupload.is-over .mupload__tile { border-color: var(--a-accent); border-style: solid; background: var(--a-surface-2); }
.mupload__input:focus-visible + .mupload__tile { outline: 3px solid var(--a-focus, var(--a-accent)); outline-offset: 2px; }
.mupload__send { display: none; margin-top: 8px; width: 100%; }
.mupload:has(.mupload__input:valid) .mupload__send { display: inline-flex; justify-content: center; }
.mupload.is-js .mupload__send { display: none !important; }
.mupload__progress { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 16px; border-radius: var(--a-radius); background: var(--a-surface); font-size: 0.875rem; text-align: center; }
.mupload__progress[hidden] { display: none; }
.mupload__bar { display: block; height: 6px; border-radius: 3px; background: var(--a-surface-2); overflow: hidden; }
.mupload__bar span { display: block; height: 100%; width: 0; background: var(--a-accent); transition: width .2s; }
.media-empty { margin: 16px 0 0; max-width: 40rem; }
.mdetail { flex: 1 1 300px; max-width: 380px; position: sticky; top: 24px; }
.mdetail__card { display: flex; flex-direction: column; gap: 16px; }
.mdetail__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ews-admin .mdetail__head h2 { margin: 0; font-size: 1.25rem; }
.mdetail__close { width: 40px; height: 40px; margin: -8px -8px -8px 0; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--a-radius); color: var(--a-text) !important; }
.mdetail__close:hover { background: var(--a-bg); }
.mdetail__img { display: block; aspect-ratio: 3 / 2; border-radius: var(--a-radius); overflow: hidden; background: var(--a-surface-2); }
.mdetail__img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.mdetail__img.mcard__img--alpha { background: repeating-conic-gradient(var(--a-bg) 0 25%, var(--a-surface) 0 50%) 0 0 / 16px 16px; }
.mdetail__form .field { margin: 0 0 16px; }
.mdetail__form .field input, .mdetail__form .field textarea { width: 100%; box-sizing: border-box; }
.field--missing textarea { border-color: var(--a-fail); border-width: 2px; }
.mdetail__facts { margin: 0 0 16px; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 0.875rem; padding: 12px 0; border-top: 1px solid var(--a-line); border-bottom: 1px solid var(--a-line); }
.mdetail__facts dt { color: var(--a-muted); }
.mdetail__facts dd { margin: 0; }
.mdetail__uses { display: flex; flex-direction: column; gap: 2px; }
.mdetail__actions { display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
.mdetail__actions .button { min-height: 46px; padding: 0 22px; }
.mdetail__delete { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; text-decoration: none; }
.mdetail__delete:hover { text-decoration: underline; }
.mdetail__back { display: none; }

/* ---------- Anfragen ---------- */
.pill--small { height: 22px; padding: 0 8px; font-size: 0.75rem; }
.pill--fail { background: var(--a-fail-bg); color: var(--a-fail); font-weight: 700; }
.avatar--large { width: 48px; height: 48px; font-size: 1.0625rem; }
.show-phone-block { display: none; }
.inbox-tabs { align-self: flex-start; }
.inbox-layout { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 20px; align-items: start; }
.inbox-list { padding: 8px; }
.inbox-list__empty { margin: 12px; }
.mlist { list-style: none; margin: 0; padding: 0; }
.mlist li + li .mrow { border-top-color: var(--a-line); }
.mrow { display: flex; gap: 12px; padding: 12px; border-radius: var(--a-radius); border-top: 1px solid transparent; color: var(--a-text) !important; text-decoration: none; }
.mlist li + li .mrow.is-current, .mlist li:has(.is-current) + li .mrow, .mlist li + li .mrow:hover, .mlist li:has(.mrow:hover) + li .mrow { border-top-color: transparent; }
.mrow:hover { background: color-mix(in srgb, var(--a-bg) 55%, transparent); }
.mrow.is-current { background: var(--a-bg); }
.mrow__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mrow__line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mrow__name, .mrow__subject { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow__subject { font-size: 0.875rem; }
.mrow.is-new .mrow__name, .mrow.is-new .mrow__subject { font-weight: 700; }
.mrow__when { font-size: 0.8125rem; color: var(--a-muted); white-space: nowrap; }
.mrow__preview { font-size: 0.8125rem; color: var(--a-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg { padding: 24px 28px; display: flex; flex-direction: column; gap: 18px; }
.msg__head { display: flex; align-items: flex-start; gap: 14px; }
.msg__who { flex: 1; min-width: 0; }
.ews-admin .msg__who h2 { margin: 0; font-size: 1.5rem; overflow-wrap: anywhere; }
.msg__who p { margin: 4px 0 0; font-size: 0.875rem; overflow-wrap: anywhere; }
.msg__name { color: var(--a-text); font-weight: 400; }
.msg__body { font-size: 1rem; line-height: 1.6; padding: 16px 0; border-top: 1px solid var(--a-line); border-bottom: 1px solid var(--a-line); overflow-wrap: anywhere; }
.msg__fields { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; font-size: 0.9375rem; }
.msg__fields dt { color: var(--a-muted); }
.msg__fields dd { margin: 0; overflow-wrap: anywhere; }
.msg__failed { margin: 0; }
.msg__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0; }
.msg__actions .button { min-height: 48px; padding: 0 22px; }
.msg__delete { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; text-decoration: none; }
.msg__delete:hover { text-decoration: underline; }
.msg__expires { margin: 0; font-size: 0.8125rem; display: flex; align-items: center; gap: 6px; }
.inbox-pick { padding: 48px 24px; display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--a-muted); text-align: center; }
.inbox-pick p { margin: 0; }
.inbox-note { margin: 0; font-size: 0.8125rem; align-items: center; gap: 6px; }

/* ---------- Navigation ---------- */
.nav-form { display: flex; flex-direction: column; gap: 20px; margin: 0; }
.publishbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 16px; background: var(--a-surface); border: 1px solid var(--a-frame); border-radius: var(--a-radius); }
.publishbar__text { color: var(--a-muted); font-size: 0.875rem; }
.publishbar__actions { margin-left: auto; display: flex; gap: 8px; }
.publishbar__actions .button { min-height: 46px; padding: 0 20px; }
.nav-grid { columns: 2; column-gap: 20px; }
.ncard { break-inside: avoid; margin: 0 0 20px; padding: 20px 22px; display: block; }
.ncard__head { list-style: none; display: flex; align-items: flex-start; gap: 12px; margin-bottom: 10px; cursor: default; }
.ncard__head::-webkit-details-marker { display: none; }
.ncard__title { flex: 1; display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 2px 12px; }
.ncard__title h2 { margin: 0; font-size: 1.25rem; flex: 1 1 100%; }
.ncard__title .muted { font-size: 0.8125rem; display: flex; justify-content: space-between; flex: 1; gap: 12px; }
.ncard__chev { display: none; }
.nlist { list-style: none; margin: 0; padding: 0; }
.nrow { border-top: 1px solid var(--a-line); scroll-margin-top: 24px; }
.nrow--new { display: none; border-top: 0; }
.nrow__view { display: flex; align-items: center; gap: 10px; padding: 10px 0; }
.nrow__grip { color: var(--a-border); display: flex; cursor: grab; padding: 4px 2px; touch-action: none; }
.nrow.is-dragging { opacity: 0.5; }
.nrow.is-drop-before { box-shadow: inset 0 2px 0 var(--a-accent); }
.nrow__main { flex: 1; min-width: 0; display: flex; flex-direction: column; color: var(--a-text) !important; text-decoration: none; }
.nrow__main:hover .nrow__label { text-decoration: underline; }
.nrow__label { font-size: 0.9375rem; }
.nrow__target { display: flex; align-items: center; gap: 4px; font-size: 0.8125rem; color: var(--a-muted); min-width: 0; }
.nrow__target .icon { flex: none; }
.nrow__edit { display: none; margin: 4px 0 10px; padding: 14px; border: 1px solid var(--a-accent); border-radius: var(--a-radius); background: color-mix(in srgb, var(--a-surface) 70%, var(--a-bg)); }
.nrow:target .nrow__edit, .nrow.is-editing .nrow__edit { display: block; }
.nrow:target .nrow__view, .nrow.is-editing .nrow__view { display: none; }
.nrow--new:target, .nrow--new.is-editing { display: block; }
.nav-js .nrow:target:not(.is-editing) .nrow__edit { display: none; }
.nav-js .nrow:target:not(.is-editing) .nrow__view { display: flex; }
.nav-js .nrow--new:target:not(.is-editing) { display: none; }
.nrow__newtitle { margin: 0 0 10px; font-weight: 700; }
.nrow__fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.nrow__fields .field { margin: 0; }
.nrow__fields input, .nrow__fields select { width: 100%; box-sizing: border-box; }
.nrow__url { display: none; grid-column: 1 / -1; }
.nrow__edit:has(option[value="__url"]:checked) .nrow__url { display: block; }
.nrow__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.nrow__actions .button { min-height: 40px; }
.nrow__tools { margin-left: auto; display: flex; gap: 6px; }
.nrow__tools .icon-button { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-color: var(--a-line); }
.icon-button--danger { color: var(--a-fail); }
.nadd { margin-top: 12px; min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px dashed var(--a-border); border-radius: var(--a-radius); color: var(--a-text) !important; font-weight: 700; text-decoration: none; }
.nadd:hover { border-style: solid; border-color: var(--a-accent); }
.ncard:has(.nrow--new:target) .nadd, .ncard:has(.nrow--new.is-editing) .nadd { display: none; }
.nav-js .ncard:has(.nrow--new:target:not(.is-editing)) .nadd { display: flex; }
.nav-note { margin: 0; font-size: 0.875rem; }

/* ---------- Einstellungen und Konto ---------- */
main.account-page { max-width: 64rem; }
.settings-tabs { align-self: flex-start; margin: 0; }
.tab-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.tab-head__text { margin: 0; max-width: 46rem; font-size: 0.9375rem; }
.tab-head .page-head__new { flex: none; }
.item--user, .item--backup { display: flex; gap: 14px; align-items: center; }
.item--user .item__main, .item--backup .item__main { flex: 1; flex-direction: column; align-items: flex-start; gap: 2px; }
.item--user .item__meta, .item--backup .item__meta { display: block; }
.item--user .item__title { font-weight: 700; display: flex; align-items: center; gap: 8px; }
.backup-now { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; }
.backup-now__text { flex: 1 1 420px; }
.backup-now__text p { margin: 0.5rem 0 0; }
.backup-now__form { margin: 0; }
.backup-now__form .button { min-height: 48px; padding: 0 24px; }
.filepick { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.filepick__input { position: absolute; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.filepick__button, .field .filepick__button { cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; gap: 8px; margin-bottom: 0; }
.filepick__input:focus-visible + .filepick__button { outline: 3px solid var(--a-focus, var(--a-accent)); outline-offset: 2px; }
.filepick__name { font-size: 0.875rem; color: var(--a-muted); overflow-wrap: anywhere; }
.filepick.has-file .filepick__name { color: var(--a-text); }

@media (max-width: 760px) {
  body.ews-admin--admin {
    display: block; padding: 0;
    /* Regel: In Hell steht das Logo immer auf Weiß – oben Verlauf von Weiß in Sand */
    background: linear-gradient(180deg, var(--a-surface) 0, var(--a-bg) 270px) no-repeat, var(--a-bg);
  }
  .side { display: none; }
  .mtop { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; }
  .mtop__brand { color: var(--a-text); text-decoration: none; font-family: var(--a-font-head); font-weight: 700; font-size: 1.25rem; }
  .mtop__logo { display: block; height: 39px; width: auto; }
  .mtop__user {
    width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: var(--a-bg); color: var(--a-text) !important; text-decoration: none; font-family: var(--a-font-head); font-size: 0.9375rem;
  }
  main.dashboard { max-width: none; padding: 12px 16px calc(var(--a-bar-h) + 12px + env(safe-area-inset-bottom)); }
  .license-banner { margin: 0 16px 4px; }

  .mbar {
    display: flex; justify-content: space-around; align-items: flex-start; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    height: calc(var(--a-bar-h) + env(safe-area-inset-bottom)); padding: 6px 4px calc(16px + env(safe-area-inset-bottom));
    background: var(--a-surface); border-top: 1px solid var(--a-line);
  }
  .mbar__link {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 60px; height: 56px; padding-top: 4px;
    color: var(--a-text) !important; text-decoration: none; font-size: 0.75rem; line-height: 16px;
  }
  .mbar__link .icon { box-sizing: content-box; width: 20px; height: 20px; padding: 6px 18px; border-radius: var(--a-radius); }
  .mbar__link[aria-current="page"], .mbar__more[aria-expanded="true"], .mbar__more[data-current] { font-weight: 700; }
  .mbar__more[data-current] .icon { background: var(--a-bg); }
  .mbar__link[aria-current="page"] .icon, .mbar__more[aria-expanded="true"] .icon, .mmore:target ~ .mbar .mbar__more .icon { background: var(--a-bg); }
  .mbar__link .count { position: absolute; top: 0; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; font-size: 0.6875rem; }

  .mmore {
    position: fixed; left: 0; right: 0; bottom: calc(var(--a-bar-h) + env(safe-area-inset-bottom)); z-index: 19;
    flex-direction: column; padding: 8px 16px 4px; background: var(--a-surface); border-top: 1px solid var(--a-line);
    box-shadow: 0 -8px 24px rgba(30, 36, 32, 0.08);
  }
  .mmore:target, .mmore.is-open { display: flex; }
  .mmore.is-closed { display: none; }
  .mmore .logout-form, .mmore .lang-form { margin: 0; }
  .mmore__link {
    width: 100%; min-height: 52px; display: flex; align-items: center; gap: 14px; padding: 0; border: 0; border-bottom: 1px solid var(--a-line);
    background: none; font: inherit; color: var(--a-text) !important; text-decoration: none; text-align: left; cursor: pointer;
  }
  .mmore .logout-form .mmore__link { border-bottom: 0; }
  .mmore__link[aria-current="page"] { font-weight: 700; }
  .mmore__link-label { flex: 1; }
  .switch { width: 44px; height: 26px; flex: none; border-radius: var(--a-radius); background: var(--a-border); padding: 3px; display: flex; justify-content: flex-start; }
  .switch::after { content: ""; width: 20px; height: 20px; border-radius: 50%; background: #FFFFFF; }
  .theme-switch[aria-checked="true"] .switch { background: var(--a-accent); justify-content: flex-end; }
  .theme-switch[aria-checked="true"] .switch::after { background: var(--a-accent-text); }

  .hide-phone { display: none !important; }
  /* Bedienflächen mindestens 44 px */
  .button--small, .tabs a, .mtop__brand, .stat, .card__link, .health__more, .health__list a, .rowmenu__toggle, .mtop__user { min-height: 44px; }
  .button--small { padding: 0 16px; }
  .tabs a { display: flex; align-items: center; }
  .mtop__brand, .card__link, .health__more, .health__list a { display: inline-flex; align-items: center; }
  .stat { align-items: center; padding: 0; }
  .confirm__actions .button { flex: 1 1 auto; }
  .show-phone { display: inline; }
  .ews-admin h1 { font-size: 1.75rem; }
  .hero { padding: 18px 20px; gap: 0; }
  .hero__text { gap: 10px; }
  .ews-admin .hero__title { font-size: 1.75rem; }
  .hero__lead { font-size: 0.9375rem; }
  .hero__preview { display: none; }
  .button--ink, .ews-admin a.button--ink { min-height: 44px; }
  .dash { gap: 12px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .row2 { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .row2 .drafts, .row2--editor .drafts { grid-column: auto; }
  .row2 .quick { order: 0; }
  .tile--visits { grid-column: span 2; }
  .kpis--editor .tile--content { grid-column: span 2; }
  .panel, .card { padding: 20px; }
  .latest .row { flex-wrap: wrap; }
  .latest .row__text { flex: 1 1 200px; }

  .table thead { display: none; }
  .table tr { display: grid; padding: 0.5rem 0; border-bottom: 1px solid var(--a-line); }
  .table td { border: 0; padding: 0.25rem 1rem; }
  .facts { grid-template-columns: 1fr; }
  .facts dd { margin-bottom: 0.4rem; }
  .tabs a { padding: 0.5rem 0.7rem; }
  .check { grid-template-columns: 1fr; }
  .check__hint { grid-column: 1; }
  .check__status { justify-self: start; }
  .image-setting .field--check { margin-left: 0; }

  /* Listen am Handy: ganze Zeile antippen, Status klein unter dem Titel, rechts nur ⋯ */
  .list-page { gap: 12px; }
  .ews-admin .page-head h1 { font-size: 1.75rem; }
  .page-head { align-items: center; flex-wrap: nowrap; }
  .page-head__lead { margin-top: 2px; font-size: 0.875rem; }
  .page-head__new { min-height: 44px; padding: 0 16px; }
  .list { padding: 4px 16px; }
  .item, .item--post { display: flex; gap: 12px; }
  .item__main { flex: 1; gap: 12px; }
  .item--depth-1 .item__main { padding-left: 20px; }
  .item--depth-2 .item__main { padding-left: 40px; }
  .item--depth-3 .item__main { padding-left: 60px; }
  .item__branch { display: none; }
  .item__meta { display: block; font-size: 0.8125rem; line-height: 1.45; margin-top: 4px; }
  .item__meta > span { margin-right: 4px; }
  .item__state .status { display: inline-flex; vertical-align: baseline; height: auto; padding: 0; border: 0; background: none; font-size: 0.8125rem; color: var(--a-muted); gap: 6px; }
  .item__state ~ span:not(.hide-phone)::before { content: "· "; }
  .rowmenu__toggle { width: 44px; height: 44px; }
  .rowmenu__panel { width: min(260px, calc(100vw - 32px)); }
  .cal { width: 48px; height: 48px; flex: none; }
  .cal__day { font-size: 1.25rem; }
  .cal__month { font-size: 0.6875rem; margin-top: 2px; }
  .tabs--filter { align-self: stretch; flex-wrap: nowrap; overflow-x: auto; position: relative; scrollbar-width: none; }
  .tabs--filter a { flex: none; }
  .newform { padding: 20px; }
  .newform__grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .empty-card { padding: 20px; }
  /* Medien am Handy: zwei Spalten; geöffnetes Bild ersetzt das Raster */
  .media-tools { flex-direction: column; align-items: stretch; gap: 12px; }
  .media-tools .msearch { order: -1; max-width: none; flex: none; }
  .mgrid, .has-detail .mgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .mupload__tile { gap: 10px; }
  .has-detail .media-page__head, .has-detail .media-tools, .has-detail .media-main { display: none; }
  .mdetail { max-width: none; flex-basis: 100%; position: static; }
  .mdetail__back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-bottom: 8px; color: var(--a-text) !important; text-decoration: none; font-weight: 700; }
  .ews-admin .mdetail__head h2 { font-size: 1.5rem; }
  /* Anfragen am Handy: Liste, geöffnete Anfrage als eigene Ansicht */
  .show-phone-block { display: flex; }
  .inbox-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .inbox-tabs { align-self: stretch; }
  .inbox-tabs a { flex: 1; justify-content: center; }
  .inbox-list { padding: 6px; }
  .has-detail .inbox-page__head, .has-detail .inbox-tabs, .has-detail .inbox-list, .has-detail .inbox-note { display: none; }
  .inbox-detail .mdetail__back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-bottom: 8px; color: var(--a-text) !important; text-decoration: none; font-weight: 700; }
  .msg { padding: 18px; gap: 16px; }
  .ews-admin .msg__who h2 { font-size: 1.375rem; }
  .msg__actions { flex-direction: column; align-items: stretch; }
  .msg__delete { margin-left: 0; justify-content: center; }
  /* Navigation am Handy: Menüs aufklappbar, Statusleiste unten */
  .nav-grid { columns: 1; }
  .ncard { margin-bottom: 12px; padding: 16px 18px; }
  .ncard__head { cursor: pointer; margin-bottom: 0; align-items: center; }
  .ncard[open] .ncard__head { margin-bottom: 8px; }
  .ncard__title h2 { font-size: 1.125rem; }
  .ncard__title .muted { display: block; }
  .ncard__chev { display: flex; width: 44px; height: 44px; align-items: center; justify-content: center; flex: none; }
  .ncard[open] .ncard__chev { transform: rotate(180deg); }
  .nrow__fields { grid-template-columns: minmax(0, 1fr); }
  .nrow__fields input, .nrow__fields select { min-height: 46px; }
  .nrow__actions .button { flex: 1; min-height: 46px; }
  .nrow__tools { margin-left: 0; width: 100%; justify-content: space-between; }
  .nrow__tools .icon-button { flex: 1; height: 44px; }
  .publishbar { order: 2; flex-direction: column; align-items: stretch; padding: 14px; }
  .publishbar .status { align-self: flex-start; }
  .publishbar__actions { margin-left: 0; }
  .publishbar__actions .button { flex: 1; }
  .publishbar__actions .button--primary { flex: 2; }
  /* Einstellungen am Handy */
  .settings-tabs { align-self: stretch; }
  .tab-head { flex-direction: column; align-items: stretch; }
  .tab-head .page-head__new { justify-content: center; }
  .backup-now__form, .backup-now__form .button { width: 100%; }
  .dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .dash-cell--quick, .dash-cell--drafts, .dash-cell--health, .dash-cell--latest, .dash-grid--editor .dash-cell--drafts { grid-column: span 2; }
  .mdetail__actions .button { min-height: 48px; }
  .tile--calm .tile__calm { font-size: 1.0625rem; }
  .health__list li:has(> span > a) { align-items: center; }
}
:root[data-theme="dark"] body.ews-admin--admin { background: var(--a-bg); }
:root[data-theme="dark"] .mtop__user { background: var(--a-surface); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body.ews-admin--admin { background: var(--a-bg); }
  :root:not([data-theme="light"]) .mtop__user { background: var(--a-surface); }
}

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

/* ------------------------------------------------------------------ Shop-Modul (Projektpaket 13) */
.subnav { display: flex; gap: 24px; border-bottom: 1px solid var(--a-line); overflow-x: auto; scrollbar-width: none; }
.subnav a { flex: none; display: flex; align-items: center; min-height: 44px; padding: 0 2px; color: var(--a-muted) !important; text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.subnav a:hover { color: var(--a-text) !important; }
.subnav a[aria-current="page"] { color: var(--a-text) !important; font-weight: 700; border-bottom-color: var(--a-ink); }
:root[data-theme="dark"] .subnav a[aria-current="page"] { border-bottom-color: var(--a-accent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .subnav a[aria-current="page"] { border-bottom-color: var(--a-accent); } }
.shop-state { white-space: nowrap; }
.shop-state--open { color: var(--a-ok); font-weight: 700; }
.shop-sqlite p + p { margin-top: 0.4rem; }
.shop-sqlite__mail { font-style: italic; }
.shop-setup { padding: 28px; }
.ews-admin .shop-setup h2 { margin: 0 0 4px; }
.setup-steps { list-style: none; margin: 16px 0 0; padding: 0; }
.setup-step { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--a-line); }
.setup-step__mark { width: 26px; height: 26px; flex: none; border-radius: 50%; box-sizing: border-box; border: 2px solid var(--a-border); display: flex; align-items: center; justify-content: center; }
.setup-step.is-done .setup-step__mark { border: 0; background: var(--a-check); color: var(--a-check-text); }
.setup-step__text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.setup-step__text .muted { font-size: 0.875rem; }
.setup-step.is-done .setup-step__text strong { font-weight: 400; color: var(--a-muted); text-decoration: line-through; }
.shop-setup__foot { margin: 12px 0 0; font-size: 0.875rem; }
.shop-meter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
progress.meter { appearance: none; -webkit-appearance: none; width: 160px; height: 6px; border: 0; border-radius: 3px; background: var(--a-surface); overflow: hidden; }
progress.meter::-webkit-progress-bar { background: var(--a-surface); border-radius: 3px; }
progress.meter::-webkit-progress-value { background: var(--a-accent); border-radius: 3px; }
progress.meter::-moz-progress-bar { background: var(--a-accent); border-radius: 3px; }
progress.meter--full::-webkit-progress-value { background: var(--a-ink); }
progress.meter--full::-moz-progress-bar { background: var(--a-ink); }
.shop-meter__hint { font-size: 0.875rem; font-weight: 700; }
.list__head--products, .item--product { grid-template-columns: minmax(0, 1fr) 170px 120px 160px 176px; }
.item__price { white-space: nowrap; }
.status--hidden { border-color: var(--a-border); }
.status--hidden .status__dot { background: var(--a-border); }
.backlink { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--a-text) !important; text-decoration: none; font-weight: 700; }
.backlink:hover { text-decoration: underline; }
.pform { display: flex; flex-direction: column; gap: 20px; }
.pform__grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.pform__main, .pform__side { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.pform__side { position: sticky; top: 24px; }
.pform__card { margin: 0; padding: 24px 28px; border: 0; min-width: 0; }
.ews-admin .pform__card h2, .pform__legend { margin: 0 0 16px; padding: 0; font-family: var(--a-font-head); font-weight: 500; font-size: 1.25rem; letter-spacing: -0.02em; }
.pform__legend { float: left; width: 100%; }
.pform__legend + * { clear: both; }
.pform__card > .field:last-child { margin-bottom: 0; }
.pform__save { display: flex; flex-direction: column; gap: 10px; }
.pform__file { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 8px; }
.kinds { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 10px; }
.kind { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 14px 12px; border: 1px solid var(--a-line); border-radius: var(--a-radius); cursor: pointer; background: var(--a-surface); }
.kind input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.kind__title { font-weight: 700; }
.kind__hint { font-size: 0.8125rem; color: var(--a-muted); line-height: 1.35; }
.kind:hover { border-color: var(--a-border); }
.kind:has(input:checked) { border: 2px solid var(--a-accent); padding: 13px 11px; background: var(--a-surface-2); }
.kind:has(input:focus-visible) { outline: 2px solid var(--a-focus); outline-offset: 2px; }
.affix--end { max-width: 12rem; }
.ews-admin .affix--end input { padding: 0 0 0 0.8rem; }
.affix--end .affix__text { padding: 0 0.8rem 0 0.4rem; }
.seg { display: inline-flex; gap: 4px; padding: 4px; background: var(--a-bg); border-radius: var(--a-radius); }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: var(--a-radius); }
.seg input:checked + span { background: var(--a-surface); font-weight: 700; }
.seg input:focus-visible + span { outline: 2px solid var(--a-focus); outline-offset: 1px; }
.choice--block { align-items: flex-start; padding: 8px 0; }
.choice--block input { margin-top: 4px; }
.input--short { max-width: 9rem; }
.country-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: 0 16px; }
.shop-open { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.shop-open__mark { width: 36px; height: 36px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--a-bg); }
.shop-open__mark--on { background: var(--a-check); color: var(--a-check-text); }
.shop-open__text { flex: 1 1 240px; display: flex; flex-direction: column; }
.shop-page .panel h2 + .muted { margin-top: -0.25rem; }
/* Art-abhängige Felder (ohne JavaScript): nur wenn der Browser :has kann, sonst bleibt alles sichtbar */
@supports selector(:has(*)) {
  .pform .only-download, .pform .only-license, .pform .only-shipping, .pform .only-subscription { display: none; }
  .pform:has(#k-download:checked) .only-download, .pform:has(#k-license:checked) .only-license,
  .pform:has(#k-shipping:checked) .only-shipping, .pform:has(#k-subscription:checked) .only-subscription { display: block; }
  .pform:has(#k-subscription:checked) fieldset.only-subscription { display: block; }
  .pform:has(#k-shipping:checked) .not-shipping, .pform:has(#k-subscription:checked) .not-subscription { display: none; }
  .pform__stock { display: none; }
  .pform:has(#f-stock_on:checked) .pform__stock { display: block; }
}
@media (max-width: 1180px) {
  .list__head--products, .item--product { grid-template-columns: minmax(0, 1fr) 150px 110px 150px auto; }
}
@media (max-width: 960px) {
  .pform__grid { grid-template-columns: minmax(0, 1fr); }
  .pform__side { position: static; }
}
@media (max-width: 760px) {
  .item--product { display: flex; gap: 12px; }
  .kinds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pform__card { padding: 20px 16px; }
  .pform__top-actions { display: none; }
  .subnav { gap: 20px; }
  .setup-step { flex-wrap: wrap; }
  .setup-step .button { margin-left: 40px; }
}

/* ------------------------------------------------------------------ Onepager-Modus (dev20) */
/* Auswahlkarten „Eine Seite“ / „Mehrere Seiten“ (Setup, Einstellungen › Website) */
fieldset.field { border: 0; padding: 0; margin-left: 0; margin-right: 0; min-width: 0; }
.layout-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 4px; }
.layout-choice .layout-choice__card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 1px solid var(--a-border); border-radius: var(--a-radius); background: var(--a-surface); cursor: pointer; font-weight: 400 !important; margin: 0 !important; }
.layout-choice__card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.layout-choice__card:has(input:checked) { border: 2px solid var(--a-accent); padding: 15px; }
.layout-choice__card:has(input:focus-visible) { outline: 3px solid var(--a-focus); outline-offset: 2px; }
.layout-choice__card.is-disabled { cursor: not-allowed; opacity: .75; }
.layout-choice__pic { display: flex; justify-content: center; padding: 10px; background: var(--a-bg); border-radius: var(--a-radius); }
.layout-choice__scheme { width: 120px; height: 96px; display: block; }
.lc-paper { fill: var(--a-surface); stroke: var(--a-border); }
.lc-ink { fill: var(--a-text); }
.lc-mid { fill: var(--a-bar); }
.lc-tone { fill: var(--a-surface-2); }
.lc-sand { fill: var(--a-line); }
.lc-arrow { fill: none; stroke: var(--a-accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.layout-choice__body { display: flex; flex-direction: column; gap: 8px; }
.layout-choice__head { display: flex; align-items: center; gap: 10px; }
.layout-choice__head strong { display: block; font-size: 1.0625rem; }
.layout-choice__sub { display: block; color: var(--a-muted); font-size: 0.875rem; }
.layout-choice__radio { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--a-border); box-sizing: border-box; background: var(--a-surface); }
.layout-choice__card:has(input:checked) .layout-choice__radio { border: 6px solid var(--a-accent); }
.layout-choice__text { font-size: 0.9375rem; line-height: 1.45; }
.layout-choice__why { font-size: 0.875rem; color: var(--a-muted); }
.layout-choice--compact { grid-template-columns: 1fr; gap: 12px; }
.layout-choice.layout-choice--compact .layout-choice__card { flex-direction: row; align-items: flex-start; gap: 14px; }
.layout-choice--compact .layout-choice__pic { flex: none; padding: 6px; }
.layout-choice--compact .layout-choice__scheme { width: 72px; height: 58px; }
.layout-choice__note { display: flex; gap: 8px; }
/* Design-Auswahl im Setup (nur bei mehreren Designs mit Startvorlagen) */
.theme-choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 4px; }
.theme-choice .theme-choice__card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px solid var(--a-border); border-radius: var(--a-radius); background: var(--a-surface); cursor: pointer; font-weight: 400 !important; margin: 0 !important; }
.theme-choice__card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.theme-choice__card:has(input:checked) { border: 2px solid var(--a-accent); padding: 9px; }
.theme-choice__card:has(input:focus-visible) { outline: 3px solid var(--a-focus); outline-offset: 2px; }
.theme-choice__img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: calc(var(--a-radius) - 4px); background: var(--a-bg); }
.theme-choice__name { font-weight: 700; }
.theme-choice__desc { font-size: 0.8125rem; color: var(--a-muted); line-height: 1.4; }
.setup:has(.layout-choice) { max-width: 44rem; }
@media (max-width: 600px) {
  .layout-choice { grid-template-columns: 1fr; gap: 12px; }
  .layout-choice .layout-choice__card { flex-direction: row; align-items: flex-start; gap: 14px; }
  .layout-choice .layout-choice__pic { flex: none; padding: 6px; }
  .layout-choice .layout-choice__scheme { width: 72px; height: 58px; }
}
/* Seitenliste im Modus „Eine Seite“: Abschnitte unter der Startseite */
.secbox { margin: 0 0 12px 54px; padding: 6px; border: 1px solid var(--a-line); border-radius: var(--a-radius); }
.secbox__title { margin: 0; padding: 6px 12px 4px; font-size: 0.8125rem; text-transform: uppercase; letter-spacing: .06em; color: var(--a-muted); }
.secbox__empty { margin: 0; padding: 4px 12px 10px; color: var(--a-muted); font-size: 0.9375rem; }
.secbox__list { list-style: none; margin: 0; padding: 0; }
.secbox .secrow, .secrow { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: var(--a-radius); color: var(--a-text); text-decoration: none; }
.secrow:hover { background: var(--a-bg); }
.secrow:focus-visible { outline: 3px solid var(--a-focus); outline-offset: 0; }
.secrow > svg { flex: none; color: var(--a-muted); }
.secrow__text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.secrow__anchor { color: var(--a-muted); font-size: 0.875rem; }
.secrow__tag { flex: none; display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border: 1px solid var(--a-line); border-radius: var(--a-radius); font-size: 0.8125rem; color: var(--a-muted); }
/* „Neue Seite“ im Modus „Eine Seite“: Hinweis auf die Umstellung */
.convert-note { display: flex; gap: 12px; padding: 14px 16px; margin: 0 0 1rem; background: var(--a-bg); border-radius: var(--a-radius); }
.convert-note__icon { flex: none; color: var(--a-accent); margin-top: 2px; }
.convert-note strong { display: block; margin-bottom: 4px; }
.convert-note__text { display: block; color: var(--a-muted); font-size: 0.9375rem; line-height: 1.45; }
.newform__legal { grid-column: 1 / -1; }
.if-legal { display: none; }
.newform:has(input[name="legal"]:checked) .if-legal { display: inline; }
.newform:has(input[name="legal"]:checked) .if-not-legal { display: none; }
.newform:has(input[name="legal"]:checked) .convert-note { display: none; }
/* Einstellungen › Website › Aufbau */
.layout-panel { margin-bottom: 1.5rem !important; }
.layout-panel__lead { margin: 0 0 0.75rem; }
.layout-panel .layout-choice { max-width: 46rem; }
@media (max-width: 760px) {
  .secbox { margin-left: 0; }
  .secrow__anchor { display: none; }
}
/* Prüfmeldungen eines Designs (Einstellungen › Design) */
.notice__list, .theme-card__problems { margin: 0.5rem 0 0; padding-left: 1.2rem; font-size: 0.875rem; }
.theme-card__problems { color: var(--a-fail); }
.notice__list li + li, .theme-card__problems li + li { margin-top: 0.25rem; }

/* ------------------------------------------------------------------ Shop-Modul Etappe 2: Bestellungen */
.shop-orders-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.tabs__count--neon { background: var(--a-neon); color: var(--a-neon-text); font-weight: 700; border-radius: var(--a-radius); padding: 0 7px; }
.shop-search { flex: 1 1 240px; max-width: 360px; }
.shop-search__field { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border: 1px solid var(--a-border); border-radius: var(--a-radius); background: var(--a-surface); color: var(--a-muted); }
.shop-search__field:focus-within { outline: 2px solid var(--a-focus); outline-offset: 2px; }
.ews-admin .shop-search__field input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; color: var(--a-text); outline: none; min-height: 40px; }
.orow__code { width: 52px; height: 44px; font-size: 0.6875rem !important; flex: none; border-radius: var(--a-radius); background: var(--a-bg); display: flex; align-items: center; justify-content: center; font-family: var(--a-font-head); font-size: 0.75rem; letter-spacing: 0.02em; }
.mrow.is-current .orow__code { background: var(--a-surface); }
.orow__sum { white-space: nowrap; font-size: 0.875rem; }
.status--small { height: 22px; padding: 0 8px; font-size: 0.75rem; gap: 6px; }
.order__badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.order__todo { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 14px 16px; border: 1px solid var(--a-ink); border-radius: var(--a-radius); }
.order__todo-text { flex: 1 1 220px; display: flex; flex-direction: column; }
.ews-admin .order__h { margin: 0 0 6px; font-family: var(--a-font-head); font-weight: 500; font-size: 1rem; }
.order__lines { list-style: none; margin: 0; padding: 0; }
.order__lines li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--a-line); }
.order__lines li > :last-child { white-space: nowrap; }
.order__sum { font-weight: 700; border-top-color: var(--a-border) !important; }
.order__tax { margin: 0; font-size: 0.875rem; }
.order__log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 0.9375rem; }
.order__log li { display: flex; gap: 10px; align-items: baseline; }
.order__dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--a-accent); transform: translateY(-1px); }
.order code { font-size: 0.875rem; }
.dash-cell--shop:has(.tile--ink) .dash-grip { color: var(--a-ink-muted); }

/* Shop › Einstellungen › Rechtliches: Pflichtfelder rot, empfohlene bleiben grau */
.legal-pick--required .field__help { color: var(--a-fail); font-weight: 600; }

/* Shop Etappe 3: Lizenzen (Bestellung, Einstellungen › Lizenzen) */
.panel__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.panel__head h2 { margin: 0; }
.order__lic { background: var(--a-bg); border-radius: var(--a-radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.order__lic-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.order__lic-head .order__h { margin: 0; }
.order__lic-key { margin: 0; }
.order__lic-key code { font-size: 1rem; letter-spacing: 0.04em; user-select: all; overflow-wrap: anywhere; }
.order__lic .msg__fields { margin: 0; }
.order__lic-actions { margin: 0; }
.lic-effects { margin: 0 0 12px; display: grid; grid-template-columns: minmax(0, 14rem) minmax(0, 1fr); gap: 10px 18px; }
.lic-effects dt { font-weight: 700; }
.lic-effects dd { margin: 0; }
@media (max-width: 600px) { .lic-effects { grid-template-columns: 1fr; gap: 2px; } .lic-effects dd { margin-bottom: 10px; } }

/* Shop Etappe 4: Abo in der Bestellung */
.order__h--small { font-size: 0.9375rem; margin: 4px 0 0; }
.order__sub .order__lines { margin: 0; }
.order__sub-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.order__sub-cancel { margin-left: auto; }
.settings__sub { margin: 28px 0 4px; font-size: 1.125rem; }

/* Shop Etappe 5a: Blättern beim Bearbeiten, Angebot, Kennzeichen */
.pnav { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 8px; }
.pnav__pager { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.pnav__pos { min-width: 4.5rem; text-align: center; }
.pnav__next { max-width: 22rem; }
.pnav__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pnav__short { display: none; }
.pnav__arrow { font-size: 1.25rem; line-height: 1; }
.pnav__saved { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.pnav__saved p { flex: 1 1 12rem; margin: 0; }
.offer { margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--a-border); }
.offer__fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
.offer__note { grid-column: 1 / -1; margin-top: 0; }
@supports selector(:has(*)) {
  .offer__fields { display: none; }
  .offer:has(#f-offer_on:checked) .offer__fields { display: grid; }
  .badge__until { display: none; }
  .pform:has(#f-badge_new:checked) .badge__until { display: block; }
}
.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; vertical-align: 2px; white-space: nowrap; }
.badge--new { background: var(--a-neon); color: var(--a-neon-text); }
.badge--offer { background: var(--a-fail); color: #FFFFFF; }
.badge--own { background: var(--a-ink, #26302A); color: #FFFFFF; }
.badge--few { border: 1px solid var(--a-border); color: var(--a-text); }
@media (max-width: 720px) {
  .pnav { position: sticky; top: 0; z-index: 5; background: var(--a-bg); padding: 8px 0; }
  .pnav__back { flex: 1 1 100%; }
  .pnav__pager { margin-left: 0; width: 100%; }
  .pnav__next { flex: 1; justify-content: center; }
  .pnav__label { display: none; }
  .pnav__short { display: inline; }
  .offer__fields { grid-template-columns: 1fr 1fr; }
  .offer__fields > .field:first-child { grid-column: 1 / -1; }
}
.pnav__prev { width: 44px; padding: 0; justify-content: center; }

/* Shop › Einstellungen › Warenkorb und Versand (Etappe 5b) */
.ship__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 1rem; }
.ship__field input { max-width: 10rem; }
@media (max-width: 40rem) { .ship__grid { grid-template-columns: minmax(0, 1fr); } }

/* Einstellungen › Update (Etappe 5c): ruhiger Hinweis bei abgelaufenem Update-Zeitraum, Zeile „Updates bis …“ */
.notice--info { background: var(--a-surface-2); border-color: var(--a-accent); }
.notice--info p + p { margin-top: 4px; }
.update__meta { color: var(--a-muted); font-size: 0.9375rem; }

/* Bestellungen: volle Bestellnummer im Kürzel (z. B. B-8EQ88), wie sie der Kunde in Mails und Rechnungen sieht */
.orow__code { width: 68px; white-space: nowrap; letter-spacing: 0; }

/* Anfragen: Kündigung aus dem Shop einem laufenden Abo zuordnen */
.msg__subs { margin-top: 1.25rem; }
.msg__sublist { list-style: none; margin: 0.5rem 0 0; padding: 0; display: grid; gap: 0.75rem; }
.msg__sublist li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; padding: 0.75rem 1rem; border: 1px solid var(--a-line); border-radius: var(--a-radius); }
