/* ai-website CMS: Oberfläche im quik-OS-Stil (quik noir, nur Inter, Pill-Buttons), hell und dunkel.
   Tokens, Größen-Skala und Grundbausteine aus quik Sites übernommen; gilt auch für den Editor (public/editor.css baut darauf auf).
   Neue Regeln nutzen nur die Variablen unten, keine festen Farben. */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(fonts/inter/inter-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(fonts/inter/inter-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F, U+A720-A7FF; }
/* ---------- Darstellung: Farb-Tokens ----------
   :root = heller Modus (Standard), [data-theme="dark"] = dunkler Modus (quik noir). Gesetzt von public/js/theme.js.
   Neues App-CSS verwendet NUR diese Variablen, keine festen Farben (Ausnahme: Darstellungen der Kunden-Website).
   --fg = stärkste Schriftfarbe (Überschriften, aktive Elemente), --on-fg = Schrift auf --fg-Flächen (Primärbutton, aktive Chips),
   --*-ink = farbige Schrift, --on-green/--on-orange = Schrift auf farbigen Flächen, --shadow-c = Schattenfarbe. */
:root {
  --bg: #f5f6f8; --bg-2: #fbfbfc; --surface: #ffffff; --surface-2: #f1f3f6; --surface-3: #e5e8ee;
  --hover: rgba(15, 23, 41, .045); --line: rgba(15, 23, 41, .13); --line-soft: rgba(15, 23, 41, .08); --line-strong: rgba(15, 23, 41, .24);
  --ink: #18202e; --ink-soft: #434c5b; --ink-faint: #5a6372;
  --fg: #0f1729; --on-fg: #ffffff; --fg-hover: #28344c;
  --accent: #2459db; --accent-strong: #2459db; --accent-soft: rgba(36, 89, 219, .09); --accent-ink: #1d4bbd; --accent-hover: #1d4cc2;
  --red: #c8283d; --green: #066646; --orange: #8a4300;
  --red-ink: #b3243a; --green-ink: #066646; --orange-ink: #7a3b00; --on-green: #ffffff; --on-orange: #ffffff;
  --pop: #ffffff; --modal: #ffffff; --toast: rgba(255, 255, 255, .98); --panel: #ffffff;
  --seg-on: #ffffff; --rail: #eef0f4; --canvas-bg: #e4e7ec; --scrim: rgba(15, 23, 41, .38); --shadow-c: rgba(15, 23, 41, .5);
  --r-sm: 8px; --r: 12px; --r-lg: 20px;
  /* Größen-Skala (für hell und dunkel gleich): neue Regeln nutzen nur diese Werte.
     Schrift: 11 (Kleinstbeschriftung, Großbuchstaben) · 12 (Hinweise, Zähler) · 13 (Nebentext, kleine Buttons) · 14 (Grundschrift)
     · 15 (Kartentitel, Einleitung) · 16 · 18 · 20 (Dialogtitel) · 24; größere Überschriften nur als clamp() bzw. 28/32/40.
     Höhe der Bedienelemente: 24 (Zeilen-Symbole) · 32 (klein) · 36 (Werkzeugleisten) · 40 (Standard) · 48 (groß); Handy ≥ 36, Leisten 44. */
  --fs-2xs: 11px; --fs-xs: 12px; --fs-sm: 13px; --fs-base: 14px; --fs-md: 15px; --fs-lg: 16px; --fs-xl: 18px; --fs-2xl: 20px; --fs-3xl: 24px;
  --h-xs: 24px; --h-sm: 32px; --h-md: 36px; --h: 40px; --h-lg: 48px;
  --font: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --shadow-pop: 0 1px 2px rgba(15, 23, 41, .08), 0 20px 50px -18px rgba(15, 23, 41, .28);
  --sb-w: 248px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0a0c10; --bg-2: #0d1014; --surface: #13161c; --surface-2: #1a1d24; --surface-3: #232731;
  --hover: rgba(255, 255, 255, .045); --line: rgba(255, 255, 255, .11); --line-soft: rgba(255, 255, 255, .065); --line-strong: rgba(255, 255, 255, .2);
  --ink: rgba(255, 255, 255, .92); --ink-soft: rgba(255, 255, 255, .66); --ink-faint: rgba(255, 255, 255, .47);
  --fg: #ffffff; --on-fg: #0a0c10; --fg-hover: #e9edf5;
  --accent: #4a8cff; --accent-strong: #2f6bff; --accent-soft: rgba(74, 140, 255, .14); --accent-ink: #8fb6ff; --accent-hover: #2a60e8;
  --red: #f87171; --green: #34d399; --orange: #fbbf24;
  --red-ink: #ff8094; --green-ink: #a9edd2; --orange-ink: #fcd57a; --on-green: #06281b; --on-orange: #241a00;
  --pop: #181b22; --modal: #15181e; --toast: rgba(24, 27, 34, .97); --panel: #111419;
  --seg-on: #232731; --rail: #07080b; --canvas-bg: #1a1d23; --scrim: rgba(4, 5, 8, .6); --shadow-c: #000;
  --shadow-pop: 0 1px 2px rgba(0, 0, 0, .5), 0 24px 60px -18px rgba(0, 0, 0, .75);
  color-scheme: dark;
}
/* Umschalten der Darstellung: kurzer, ruhiger Farbübergang (theme.js setzt .theme-anim nur beim bewussten Wechsel) */
html.theme-anim, html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after { transition: background-color .32s ease, border-color .32s ease, color .32s ease, fill .32s ease, box-shadow .32s ease !important; }
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 14px/1.45 var(--font); letter-spacing: -.005em; -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01"; overflow: hidden; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { cursor: default; opacity: .4; }
input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; color: var(--fg); }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--accent) 35%, transparent); }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--fg) 12%, transparent); border-radius: 99px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }
.ic { flex: none; }
.muted { color: var(--ink-soft); }
.faint { color: var(--ink-faint); }
.sm { font-size: var(--fs-sm); }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 8px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-xs); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.lede { color: var(--ink-soft); font-size: var(--fs-md); line-height: 1.55; max-width: 70ch; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; border-radius: 999px; padding: .62em 1.15em; font-weight: 560; font-size: var(--fs-base); letter-spacing: -.01em; border: 1px solid transparent; white-space: nowrap; transition: transform .4s var(--ease), background .2s, border-color .2s, color .2s; }
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn { min-height: var(--h); }
.btn-sm { min-height: var(--h-sm); padding: .3em .95em; font-size: var(--fs-sm); }
.btn-lg { min-height: var(--h-lg); padding: .6em 1.5em; font-size: var(--fs-md); }
.btn-primary { background: var(--fg); color: var(--on-fg); }
.btn-primary:hover { background: var(--fg-hover); }
.btn-accent { background: var(--accent-strong); color: #fff; }
.btn-accent:hover { background: var(--accent-hover); }
.btn-ghost { border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--line-strong); background: var(--hover); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger-ghost { border-color: color-mix(in srgb, var(--red) 40%, transparent); color: var(--red-ink); }
.btn-danger-ghost:hover { background: color-mix(in srgb, var(--red) 10%, transparent); }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.icon-btn { display: inline-grid; place-items: center; width: var(--h-md); height: var(--h-md); border-radius: 10px; color: var(--ink-soft); flex: none; transition: background .15s, color .15s; position: relative; }
.icon-btn:hover { background: var(--hover); color: var(--fg); }
.icon-btn.on { background: var(--surface-3); color: var(--fg); }
.icon-btn.sm { width: var(--h-sm); height: var(--h-sm); border-radius: 8px; }
.icon-btn.xs { width: var(--h-xs); height: var(--h-xs); border-radius: 7px; }
.link-btn { color: var(--ink-soft); font-size: var(--fs-sm); text-decoration: underline; text-underline-offset: 3px; display: inline-flex; align-items: center; gap: 5px; }
.link-btn:hover { color: var(--fg); }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: var(--h-sm); padding: 4px 12px; border-radius: 999px; font-size: var(--fs-sm); font-weight: 500; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); white-space: nowrap; }
.chip.on { background: var(--fg); color: var(--on-fg); border-color: var(--fg); }
.chip:hover:not(.on) { border-color: var(--line-strong); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 99px; font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 99px; background: currentColor; }
.pill.live { background: color-mix(in srgb, var(--green) 14%, transparent); color: var(--green); }
.pill.stg { background: color-mix(in srgb, var(--orange) 14%, transparent); color: var(--orange); }
.pill.draft { background: var(--surface-3); color: var(--ink-soft); }
.pill.new { background: var(--accent-soft); color: var(--accent); }
.pill.plain::before { display: none; }
/* Badge (ui.js badge()): Status oder Zähler, gleiche Töne wie .pill, in Hell und Dunkel lesbar */
.bdg { display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 20px; padding: 0 8px; border-radius: 99px; font-size: var(--fs-2xs); font-weight: 600; line-height: 1; letter-spacing: 0; text-transform: none; white-space: nowrap; flex: none; background: var(--surface-3); color: var(--ink-soft); }
.bdg.ok { background: color-mix(in srgb, var(--green) 14%, transparent); color: var(--green-ink); }
.bdg.warn { background: color-mix(in srgb, var(--orange) 15%, transparent); color: var(--orange-ink); }
.bdg.info { background: var(--accent-soft); color: var(--accent-ink); }
.bdg.danger { background: color-mix(in srgb, var(--red) 12%, transparent); color: var(--red-ink); }
.bdg.dot::before { content: ""; width: 6px; height: 6px; border-radius: 99px; background: currentColor; }
.bdg.n { min-width: 20px; padding: 0 6px; font-variant-numeric: tabular-nums; }
.cnt { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--accent-strong); color: #fff; font-size: var(--fs-2xs); font-weight: 600; line-height: 1; }
/* ---------- Reiter und Segment-Schalter: EIN System für die ganze App ----------
   Segment-Schalter (Umschalten in einer Fläche): .seg (ui.js seg()), .pn-tabs (Seitenleisten im Editor), .ins-tabs (Inspektor),
   .ed-tabs (Seiten | Beiträge), .pe-tabs (Seitenleiste im Beitrags-Editor). Spur 36 px (= --h-md), Schalter 28 px, Handy 44/36 px.
   Volle Breite: .seg.block, .pn-tabs, .ins-tabs (Ecken --r / --r-sm statt Pille).
   Reiter einer Seite (Linie unter dem aktiven Reiter): .tabs > .tab (ui.js tabs(), Beiträge, Team, Verwaltung).
   Zähler in beiden: .tab-n (Badge, 18 px). Symbol 15 px, Text und Zähler stehen auf einer Mittellinie. */
.seg, .pn-tabs, .ins-tabs, .ed-tabs, .pe-tabs { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-soft); }
:is(.seg, .pn-tabs, .ins-tabs, .ed-tabs, .pe-tabs) > button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; min-height: 28px; padding: 4px 12px; border-radius: 999px; font-size: var(--fs-sm); font-weight: 550; line-height: 1.25; color: var(--ink-soft); white-space: nowrap; transition: color .15s, background .15s, box-shadow .15s; }
:is(.seg, .pn-tabs, .ins-tabs, .ed-tabs, .pe-tabs) > button > .ic { flex: none; }
:is(.seg, .pn-tabs, .ins-tabs, .ed-tabs, .pe-tabs) > button:hover { color: var(--fg); }
:is(.seg, .pn-tabs, .ins-tabs, .ed-tabs, .pe-tabs) > button.on { background: var(--seg-on); color: var(--fg); box-shadow: 0 1px 2px color-mix(in srgb, var(--shadow-c) 40%, transparent); }
:is(.seg, .pn-tabs, .ins-tabs, .ed-tabs, .pe-tabs) > button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.seg.block, .pn-tabs, .ins-tabs { display: flex; flex-wrap: nowrap; border-radius: var(--r); }
.seg.block > button, .pn-tabs > button, .ins-tabs > button { border-radius: var(--r-sm); padding-inline: 8px; }
.seg.block > button { flex: 1 1 0; white-space: normal; text-align: center; } /* lange Optionen dürfen in schmalen Seitenleisten umbrechen */
.pn-tabs > button, .ins-tabs > button { flex: 1 1 auto; }
.pn-tabs > button { display: block; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.tabs { display: flex; align-items: stretch; gap: 16px; margin-inline: -4px; overflow-x: auto; scrollbar-width: none; /* Text bündig mit dem Inhalt darüber; Linie nur so breit wie der Inhalt */
  background: linear-gradient(var(--line-soft), var(--line-soft)) no-repeat 4px 100% / calc(100% - 8px) 1px; }
.tabs::-webkit-scrollbar { display: none; }
.tab { position: relative; flex: none; display: inline-flex; align-items: center; gap: 8px; height: var(--h); padding: 0 4px; font-size: var(--fs-base); font-weight: 550; line-height: 1.25; color: var(--ink-soft); white-space: nowrap; transition: color .15s; }
.tab:hover { color: var(--fg); }
.tab.on { color: var(--fg); }
.tab::after { content: ""; position: absolute; left: 4px; right: 4px; bottom: 0; height: 2px; border-radius: 2px 2px 0 0; background: var(--fg); transform: scaleX(0); transition: transform .25s var(--ease); }
.tab.on::after { transform: none; }
.tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: var(--r-sm); }
.tab-n { display: inline-grid; place-items: center; flex: none; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--surface-3); color: var(--ink-soft); font-size: var(--fs-2xs); font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
:is(.on, [aria-selected="true"]) > .tab-n { background: var(--accent-soft); color: var(--accent-ink); }
@media (max-width: 640px) { :is(.seg, .pn-tabs, .ins-tabs, .ed-tabs, .pe-tabs) > button { min-height: 36px; } .tab { height: 44px; }
  .tabs { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); } } /* weitere Reiter: zum Wischen */
@media (prefers-reduced-motion: reduce) { .tab::after { transition: none; } }
.switch { width: 34px; height: 20px; border-radius: 99px; background: var(--surface-3); position: relative; flex: none; transition: background .2s; }
.switch span { position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 99px; background: #fff; transition: transform .25s var(--ease); }
.switch.on { background: var(--accent-strong); }
.switch.on span { transform: translateX(14px); }
kbd { font: 500 11px var(--font); padding: 2px 6px; border-radius: 5px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-soft); }

/* ---------- Formulare ---------- */
.input { width: 100%; min-height: var(--h); background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; outline: none; transition: border-color .15s, box-shadow .15s; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.input.sm { min-height: var(--h-sm); padding: 6px 10px; font-size: var(--fs-sm); border-radius: 8px; }
input.input, select.input { height: var(--h); } input.input.sm, select.input.sm { height: var(--h-sm); } /* feste Höhen statt Rundungsreste */
select.input.sm { padding-right: 28px; } /* Pfeil überdeckt sonst den Text */
.input.err { border-color: var(--red); }
.input:disabled { background: transparent; border-style: dashed; color: var(--ink-soft); cursor: not-allowed; }
.input.mono, pre.cmd, code, kbd { font-family: var(--font); font-variant-numeric: tabular-nums; }
.input.mono { font-size: var(--fs-sm); }
.input::placeholder, textarea::placeholder { color: var(--ink-faint); }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23a3a8b1' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-position: calc(100% - 11px) 50%; background-size: 10px 6px; background-repeat: no-repeat; padding-right: 28px; }
select.input option { background: var(--surface); }
textarea.input { resize: vertical; line-height: 1.5; min-height: 72px; }
.fld { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; position: relative; }
.fld > label, .fld-l { font-size: var(--fs-sm); font-weight: 500; color: var(--ink-soft); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fld-hint { font-size: var(--fs-xs); color: var(--ink-faint); line-height: 1.4; }
.fld-err { font-size: var(--fs-xs); color: var(--red-ink); }
.fld-cnt { font-size: var(--fs-2xs); color: var(--ink-faint); font-weight: 400; font-variant-numeric: tabular-nums; }
.fld-cnt.over { color: var(--orange); }
.fld-row { display: flex; gap: 10px; }
.fld-row > .fld { flex: 1; min-width: 0; }
.check { display: inline-flex; align-items: flex-start; gap: 9px; font-size: var(--fs-sm); color: var(--ink-soft); cursor: pointer; line-height: 1.45; }
.check input { accent-color: var(--accent); margin-top: 2px; }
.tg { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; cursor: pointer; font-size: var(--fs-sm); color: var(--ink); }
.tg small { display: block; color: var(--ink-faint); font-size: var(--fs-xs); margin-top: 2px; }
.note { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line-soft); font-size: var(--fs-sm); color: var(--ink-soft); line-height: 1.5; }
.note .ic { margin-top: 1px; color: var(--accent); }
.note.warn .ic { color: var(--orange); }
.note.ok .ic { color: var(--green); }
.note b { color: var(--fg); font-weight: 600; }
/* ---------- Popover, Menü, Modal, Toast ---------- */
#layer { position: relative; z-index: 100; }
.pop { position: fixed; z-index: 120; min-width: 200px; max-width: calc(100vw - 16px); max-height: calc(100vh - 16px); overflow: auto; background: var(--pop); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-pop); padding: 6px; animation: popIn .16s var(--ease); }
@keyframes popIn { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.menu-it { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 9px; border-radius: 8px; text-align: left; font-size: var(--fs-base); color: var(--ink); }
.menu-it:hover:not(:disabled) { background: var(--hover); }
.menu-it.danger { color: var(--red-ink); }
.menu-it .ic { color: var(--ink-soft); }
.menu-it.danger .ic { color: var(--red-ink); }
.menu-it small { margin-left: auto; color: var(--ink-faint); font-size: var(--fs-xs); }
.menu-sep { height: 1px; background: var(--line-soft); margin: 5px 4px; }
.menu-head { font-size: var(--fs-2xs); font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-faint); padding: 8px 9px 4px; }
/* Menüs per Tastatur, Untermenüs, nicht verfügbare Einträge (Grund als Tooltip), Kontextmenü */
.pop:focus { outline: none; }
.menu-it:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.menu-it[aria-disabled="true"] { opacity: .45; cursor: default; }
.menu-it[aria-disabled="true"]:hover { background: none; }
.menu-it.has-sub > .ic:last-child { margin-left: auto; color: var(--ink-faint); }
.menu-it.has-sub small + .ic:last-child { margin-left: 4px; }
.menu-it.has-sub[aria-expanded="true"] { background: var(--hover); }
.pop.ctx .menu-it > span:not(.sr), .pop-sub .menu-it > span:not(.sr) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pop.ctx { min-width: 228px; max-width: min(320px, calc(100vw - 16px)); }
.pop-sub { z-index: 121; min-width: 190px; max-width: min(300px, calc(100vw - 16px)); }
.pop-drill { max-width: min(320px, calc(100vw - 16px)); }
.pop-drill .menu-back { font-weight: 600; color: var(--fg); }
.ctx-press { transition: transform .38s var(--ease), box-shadow .38s var(--ease); transform: scale(.985); box-shadow: 0 0 0 2px var(--accent-soft), 0 0 0 4px color-mix(in srgb, var(--accent) 30%, transparent); border-radius: var(--r-sm); }
[data-ctx-zone] { -webkit-touch-callout: none; }
@media (prefers-reduced-motion: reduce) { .ctx-press { transition: none; transform: none; } }
.modal-wrap { position: fixed; inset: 0; z-index: 110; background: var(--scrim); backdrop-filter: blur(3px); display: grid; place-items: start center; padding: 7vh 16px 16px; overflow: auto; animation: fadeIn .2s; }
@keyframes fadeIn { from { opacity: 0; } }
.modal { width: min(560px, calc(100vw - 32px)); background: var(--modal); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); animation: modalIn .3s var(--ease); }
.modal.wide { width: min(980px, calc(100vw - 32px)); }
.modal.mid { width: min(720px, calc(100vw - 32px)); }
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(.985); } }
.modal-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 22px 24px 6px; }
.modal-h > .icon-btn { margin: -7px -8px 0 0; } /* Schließen-Kreuz mittig zur ersten Titelzeile, Symbol bündig mit dem Inhalt */
.modal-h h2 { font-size: var(--fs-2xl); }
.modal-sub { color: var(--ink-soft); font-size: var(--fs-base); margin-top: 6px; line-height: 1.5; }
.modal-b { padding: 14px 24px 8px; }
.modal-f { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 24px 22px; align-items: center; }
.modal-f .left { margin-right: auto; }
#toasts { position: fixed; top: 16px; right: 16px; z-index: 200; display: flex; flex-direction: column; gap: 8px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: flex-start; gap: 11px; padding: 12px 10px 12px 12px; border-radius: 14px; background: var(--toast); border: 1px solid var(--line); font-size: var(--fs-base); box-shadow: var(--shadow-pop); animation: toastIn .3s var(--ease); }
@keyframes toastIn { from { opacity: 0; transform: translateX(24px); } }
.toast-ic { --tc: var(--accent); flex: none; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; color: var(--tc); background: color-mix(in srgb, var(--tc) 16%, transparent); }
.toast.ok .toast-ic { --tc: var(--green); }
.toast.err .toast-ic { --tc: var(--red); }
.toast.warn .toast-ic { --tc: var(--orange); }
.toast-c { flex: 1; min-width: 0; padding-top: 4px; display: flex; flex-direction: column; gap: 6px; }
.toast-c b { color: var(--fg); }
.toast-acts { display: flex; gap: 6px; }
.toast-btn { height: 26px; padding: 0 10px; border-radius: 8px; background: var(--fg); color: var(--on-fg); font-size: var(--fs-sm); font-weight: 600; }
.toast.out { opacity: 0; transform: translateX(24px); transition: opacity .2s, transform .2s; }
/* ---------- Dialoge: Kopf und Fußzeile bleiben sichtbar, nur der Inhalt scrollt ---------- */
.modal { display: flex; flex-direction: column; max-height: calc(100vh - 7vh - 16px); max-height: calc(100dvh - 7vh - 16px); }
.modal-h, .modal-f { flex: none; }
.modal-h > div { min-width: 0; }
.modal-h h2 { overflow-wrap: anywhere; }
.modal-b { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.modal-f { flex-wrap: wrap; }
/* Menüs und Kontextmenüs: gleicher Rhythmus wie die Auswahl, klare Trenner, sichtbarer Tastenfokus */
.pop { border-radius: 12px; padding: 5px; transform-origin: top left; animation: popIn .14s var(--ease); }
@keyframes popIn { from { opacity: 0; transform: translateY(-3px) scale(.985); } }
.pop.up { transform-origin: bottom left; animation-name: popUp; }
@keyframes popUp { from { opacity: 0; transform: translateY(3px) scale(.985); } }
.pop-sub { animation-name: subIn; }
@keyframes subIn { from { opacity: 0; transform: translateX(-4px); } }
.menu-it { min-height: var(--h-sm); padding: 6px 10px; gap: 10px; border-radius: 7px; line-height: 1.3; transition: background-color .08s; }
.menu-it > .ic { flex: none; }
.menu-it > span:not(.sr) { flex: 1 1 auto; min-width: 0; }
.menu-it:hover:not(:disabled), .menu-it:focus { background: color-mix(in srgb, var(--fg) 6%, transparent); outline: none; }
.menu-it:focus-visible { outline: none; background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 55%, transparent); }
.menu-it.danger:hover:not([aria-disabled="true"]), .menu-it.danger:focus { background: color-mix(in srgb, var(--red) 10%, transparent); }
.menu-it[aria-disabled="true"]:hover, .menu-it[aria-disabled="true"]:focus:not(:focus-visible) { background: none; }
.menu-it small { padding-left: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.menu-sep { margin: 5px -5px; }
.menu-head { padding: 9px 10px 5px; letter-spacing: .06em; }
.menu-head:first-child { padding-top: 6px; }
.pop.ctx { min-width: 232px; }
/* Status und Zähler in Menüs als Badge, neuer Tab als kleines Symbol (statt grauem Erklärtext) */
.menu-it > .bdg, .pop .menu-it > .bdg { flex: none; margin-left: 10px; overflow: visible; }
.menu-it > .menu-ext, .pop .menu-it > .menu-ext { flex: none; display: inline-flex; margin-left: auto; padding-left: 8px; color: var(--ink-faint); }
.menu-it > .bdg + .menu-ext { margin-left: 0; }
.menu-it.has-sub > .bdg + .ic:last-child { margin-left: 4px; }
/* Menü-Köpfe: ruhig, ohne Versalien; Status (z. B. Rolle) als Badge daneben */
.pop .menu-head { text-transform: none; letter-spacing: 0; font-size: var(--fs-xs); font-weight: 600; color: var(--ink-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pop .menu-head.has-bdg { display: flex; align-items: center; gap: 8px; }
.pop .menu-head.has-bdg > span:first-child { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Auswahl (ersetzt <select>): Knopf wie ein Eingabefeld, Liste mit Häkchen, Suche ab 8 Einträgen, Handy: Blatt von unten */
.qsel { display: flex; align-items: center; gap: 8px; text-align: left; cursor: pointer; color: var(--ink); padding-right: 10px; font-size: var(--fs-base); }
button.qsel.input { height: var(--h); } button.qsel.input.sm { height: var(--h-sm); font-size: var(--fs-sm); }
.qsel:hover:not(:disabled) { border-color: var(--line-strong); }
.qsel.open, .qsel:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.qsel > .ic { flex: none; color: var(--ink-soft); }
.qsel > .ic:last-child { margin-left: auto; color: var(--ink-faint); transition: transform .18s var(--ease); }
.qsel.open > .ic:last-child { transform: rotate(180deg); }
.qsel-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qsel-t.ph { color: var(--ink-faint); }
.qsel:disabled { background: transparent; border-style: dashed; color: var(--ink-soft); cursor: not-allowed; opacity: 1; }
.qsel-sw { flex: none; width: 14px; height: 14px; border-radius: 4px; box-shadow: inset 0 0 0 1px var(--line); }
.pop.qsel-pop { padding: 0; display: flex; flex-direction: column; overflow: hidden; max-height: min(380px, calc(100vh - 16px)); }
.qsel-qw { flex: none; display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--line-soft); color: var(--ink-faint); }
.qsel-qw .qsel-q { flex: 1; border: 0; background: transparent; box-shadow: none; padding: 0; height: 28px; min-height: 0; font-size: var(--fs-base); }
.qsel-qw .qsel-q:focus { box-shadow: none; }
.qsel-q::-webkit-search-cancel-button { cursor: pointer; }
.qsel-list { flex: 1; min-height: 0; overflow-y: auto; padding: 5px; outline: none; overscroll-behavior: contain; }
.qsel-opt { display: flex; align-items: center; gap: 10px; min-height: var(--h-sm); padding: 6px 8px 6px 10px; border-radius: 7px; cursor: pointer; color: var(--ink); font-size: var(--fs-base); line-height: 1.3; }
.qsel-opt.act { background: color-mix(in srgb, var(--fg) 6%, transparent); }
.qsel-list:focus-visible .qsel-opt.act, .qsel-qw:focus-within ~ .qsel-list .qsel-opt.act { background: var(--accent-soft); }
.qsel-opt.on { font-weight: 560; color: var(--fg); }
.qsel-opt[aria-disabled="true"] { opacity: .45; cursor: default; }
.qsel-opt > .ic, .qsel-opt > .qsel-sw { flex: none; color: var(--ink-soft); }
.qsel-noic { flex: none; width: 16px; }
.qsel-l { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.qsel-l > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qsel-l > small { font-size: var(--fs-xs); color: var(--ink-faint); font-weight: 400; line-height: 1.35; }
.qsel-hint { flex: none; font-size: var(--fs-xs); color: var(--ink-faint); font-weight: 400; }
.qsel-ck { flex: none; width: 16px; display: grid; place-items: center; color: var(--accent-ink); }
.qsel-group { padding: 9px 10px 4px; font-size: var(--fs-2xs); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); }
.qsel-group:first-child { padding-top: 4px; }
.qsel-sep { height: 1px; background: var(--line-soft); margin: 5px -5px; }
.qsel-empty { padding: 14px 10px; color: var(--ink-faint); font-size: var(--fs-sm); text-align: center; }
.qsel-create, .qsel-create > .ic { color: var(--accent-ink); font-weight: 560; }
.qsel-scrim { position: fixed; inset: 0; z-index: 119; background: var(--scrim); animation: fadeIn .18s; }
.pop.qsel-pop.sheet { left: 0; right: 0; bottom: 0; top: auto; width: auto; max-width: none; max-height: 78vh; border-radius: 18px 18px 0 0; border-bottom: 0; padding-bottom: env(safe-area-inset-bottom, 0px); transform-origin: bottom center; animation: sheetUp .26s var(--ease); }
@keyframes sheetUp { from { opacity: .4; transform: translateY(48px); } }
.qsel-sh { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 16px 8px 6px 18px; position: relative; }
.qsel-sh::before { content: ""; position: absolute; top: 6px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 4px; background: var(--line-strong); }
.qsel-sh b { font-size: var(--fs-lg); color: var(--fg); }
.sheet .qsel-opt { min-height: 48px; font-size: var(--fs-lg); padding: 10px 12px; }
.sheet .qsel-list { padding: 4px 8px 14px; }
.sheet .qsel-qw { padding: 8px 16px; }
.sheet .qsel-q { font-size: var(--fs-lg); height: 36px; }
@media (max-width: 640px) { button.qsel.input { height: 44px; font-size: var(--fs-lg); } button.qsel.input.sm { height: var(--h-md); font-size: var(--fs-base); } }
@media (prefers-reduced-motion: reduce) { .pop, .pop-sub, .pop.qsel-pop.sheet, .qsel-scrim, .qsel > .ic:last-child { animation: none; transition: none; } }

/* Ziehen & Ablegen (dragSort): Griff, „angehoben“ nach langem Drücken, Zeiger beim Ziehen */
[data-dnd] .grip, .dnd-handle { touch-action: none; cursor: grab; }
.dnd-on, .dnd-on * { cursor: grabbing !important; }
.dnd-armed { transform: scale(.985); box-shadow: 0 0 0 2px var(--accent-soft), 0 0 0 4px color-mix(in srgb, var(--accent) 30%, transparent); border-radius: var(--r-sm); transition: transform .2s var(--ease), box-shadow .2s; }
.cms-ghost .acts, .cms-ghost .pt-acts { display: none !important; }
.cms-ghost { color: var(--fg); }
.lst-it .grip { cursor: grab; }
@media (prefers-reduced-motion: reduce) { .dnd-armed { transition: none; transform: none; } }

/* =====================================================================
   App-Rahmen ai-website CMS (public/js/main.js): Kopfleiste, Seiten, Karten
   ===================================================================== */
body { overflow: hidden; }
#app { height: 100vh; height: 100dvh; }
.boot { height: 100%; display: grid; place-items: center; }
.boot::after { content: ""; width: 22px; height: 22px; border-radius: 99px; border: 2px solid var(--line); border-top-color: var(--fg); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.app { display: grid; grid-template-rows: auto minmax(0, 1fr); height: 100%; }
.main { min-height: 0; overflow: auto; position: relative; scrollbar-gutter: stable; }
#main:focus, [tabindex="-1"]:focus { outline: none; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 300; padding: 8px 14px; border-radius: 99px; background: var(--fg); color: var(--on-fg); font-weight: 600; }
.skip:focus { top: 10px; }

/* Kopfleiste */
.top { display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 20px; border-bottom: 1px solid var(--line-soft); background: var(--bg); position: relative; z-index: 30; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); font-weight: 650; font-size: var(--fs-md); letter-spacing: -.015em; border-radius: 10px; padding: 4px 6px 4px 4px; margin-left: -4px; white-space: nowrap; }
.brand:hover { text-decoration: none; background: var(--hover); }
.brand img, .gate-brand img { width: 28px; height: 28px; border-radius: 8px; display: block; }
:root[data-theme="dark"] .brand img, :root[data-theme="dark"] .gate-brand img { box-shadow: 0 0 0 1px var(--line-strong); }
.brand span { color: var(--ink-faint); font-weight: 500; }
.top-sep { width: 1px; height: 22px; background: var(--line); flex: none; }
.top-acc { max-width: 280px; }
.top-acc.qsel.input { width: auto; }
.top-acc.qsel.input { background: transparent; border-color: transparent; font-weight: 560; }
.top-acc.qsel.input:hover { background: var(--hover); border-color: transparent; }
.top-r { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.top-link { display: inline-flex; align-items: center; gap: 7px; height: var(--h-sm); padding: 0 12px; border-radius: 99px; color: var(--ink-soft); font-size: var(--fs-sm); font-weight: 560; }
.top-link:hover { color: var(--fg); background: var(--hover); text-decoration: none; }
.top-link.on { color: var(--fg); background: var(--surface-2); }
.av { display: inline-grid; place-items: center; border-radius: 99px; font-weight: 600; flex: none; width: 30px; height: 30px; font-size: var(--fs-xs); background: var(--accent-soft); color: var(--accent-ink); }
.av.lg { width: 40px; height: 40px; font-size: var(--fs-sm); }
.av-btn { border-radius: 99px; padding: 3px; transition: box-shadow .2s; }
.av-btn:hover { box-shadow: 0 0 0 3px var(--hover); }

/* Seiten */
.page { padding: 40px 32px 96px; max-width: 1160px; margin: 0 auto; }
.page.narrow { max-width: 760px; }
.page.mid { max-width: 920px; }
.area-nav { margin-bottom: 20px; }
.seg.scroll { flex-wrap: nowrap; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg.scroll::-webkit-scrollbar { display: none; }
.page-h { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; margin-bottom: 28px; flex-wrap: wrap; min-height: 40px; }
.page-h h1 { font-size: clamp(24px, 2.4vw, 30px); letter-spacing: -.03em; display: flex; align-items: center; gap: 12px; min-width: 0; overflow-wrap: anywhere; }
.page-h .acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-soft); font-size: var(--fs-sm); font-weight: 550; margin-bottom: 10px; min-height: 28px; border-radius: 8px; }
.back:hover { color: var(--fg); text-decoration: none; }
.back .ic { transition: transform .25s var(--ease); }
.back:hover .ic { transform: translateX(-2px); }
.sub-h { margin-bottom: 24px; }
.sub-h .page-h { margin-bottom: 14px; }
.sub-h .tabs { margin-top: 4px; }
.card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 16px; padding: 20px 22px; }
.card + .card { margin-top: 16px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; min-height: 32px; }
.card-h h2 { font-size: var(--fs-lg); display: flex; align-items: center; gap: 8px; }
.card-f { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.copy-row { display: flex; gap: 8px; align-items: center; }
.copy-row .input, .copy-row .pw-wrap { flex: 1; min-width: 0; }
.ellip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mt { margin-top: 16px; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
.rise { animation: rise .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }

/* Website-Karten (Startseite) */
.sites { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 20px; }
.sc { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 16px; overflow: hidden; transition: border-color .2s, box-shadow .35s var(--ease), transform .35s var(--ease); }
.sc:hover { border-color: var(--line); box-shadow: 0 24px 44px -30px color-mix(in srgb, var(--shadow-c) 60%, transparent); transform: translateY(-2px); }
.sc:focus-within { border-color: var(--line-strong); }
.sc-open { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.sc-open:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.sc-thumb { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-bottom: 1px solid var(--line-soft); background: hsl(var(--hue, 220) 28% 92%); display: grid; place-items: center; }
:root[data-theme="dark"] .sc-thumb { background: hsl(var(--hue, 220) 18% 17%); }
.sc-ini { font-size: 40px; font-weight: 650; letter-spacing: -.04em; color: hsl(var(--hue, 220) 30% 38%); transition: transform .5s var(--ease); }
:root[data-theme="dark"] .sc-ini { color: hsl(var(--hue, 220) 40% 72%); }
.sc:hover .sc-ini { transform: scale(1.06); }
.sc-thumb iframe, .sc-thumb img { position: absolute; left: 0; top: 0; border: 0; pointer-events: none; }
.sc-thumb iframe { width: 1280px; height: 800px; transform: scale(var(--s, .25)); transform-origin: 0 0; opacity: 0; transition: opacity .5s var(--ease); background: #fff; }
.sc-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.sc-thumb.is-loaded iframe { opacity: 1; }
.sc-b { display: flex; flex-direction: column; gap: 8px; padding: 14px 10px 14px 16px; }
.sc-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sc-name { flex: 1; min-width: 0; font-size: var(--fs-md); font-weight: 600; color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-addr { font-size: var(--fs-xs); color: var(--ink-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-more { position: relative; z-index: 2; margin: -6px 0; }
.sc-bdgs { display: flex; flex-wrap: wrap; gap: 6px; min-height: 20px; }
.sc-acc { font-size: var(--fs-xs); color: var(--ink-faint); }
.sec-h { display: flex; align-items: center; gap: 8px; margin: 32px 0 14px; font-size: var(--fs-sm); font-weight: 600; color: var(--ink-soft); }
.sec-h:first-child { margin-top: 0; }

/* Skelett beim Laden */
.skel { position: relative; overflow: hidden; background: var(--surface-2); border-radius: 10px; }
.skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--surface) 70%, transparent), transparent); animation: shimmer 1.3s ease-in-out infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.skel-card { border-radius: 16px; border: 1px solid var(--line-soft); background: var(--surface); overflow: hidden; }
.skel-card .skel:first-child { aspect-ratio: 16 / 10; border-radius: 0; }
.skel-line { height: 14px; margin: 14px 16px 0; width: 60%; }
.skel-line.s { width: 34%; margin-bottom: 16px; height: 12px; }
.skel-row { height: 52px; margin-bottom: 8px; }

/* Leerer Zustand */
.empty { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 56px 24px; color: var(--ink-soft); }
.empty-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-soft); margin-bottom: 4px; animation: rise .5s var(--ease) both; }
.empty b { color: var(--fg); font-size: var(--fs-lg); font-weight: 600; }
.empty .btn { margin-top: 6px; }
.empty.sm { padding: 28px 16px; }
.empty.sm .empty-ic { width: 40px; height: 40px; border-radius: 12px; }
.empty.sm b { font-size: var(--fs-base); }

/* Zeilen-Listen (Anfragen, Team, Verwaltung, Versionen, Protokoll) */
.rows { display: flex; flex-direction: column; }
.card > .rows { margin: 0 -12px; }
.r { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 12px; border-radius: 10px; text-align: left; width: 100%; color: var(--ink); }
.r + .r { box-shadow: 0 -1px 0 var(--line-soft); }
.r:hover + .r, .r:hover { box-shadow: none; }
.r.click { cursor: pointer; }
.r.click:hover, button.r:hover { background: var(--hover); }
.r-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.r-t b { font-weight: 560; color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-t span { font-size: var(--fs-sm); color: var(--ink-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--ink-soft); }
.r-meta { flex: none; font-size: var(--fs-sm); color: var(--ink-faint); white-space: nowrap; font-variant-numeric: tabular-nums; }
.r .acts { display: flex; align-items: center; gap: 4px; flex: none; }
.r.new .r-t b::before { content: ""; display: inline-block; width: 7px; height: 7px; margin: 0 8px 1px 0; border-radius: 99px; background: var(--accent); vertical-align: middle; }
.r.is-leaving { opacity: 0; transform: translateX(10px); transition: opacity .2s, transform .2s var(--ease); }
.kv { display: grid; grid-template-columns: fit-content(180px) minmax(0, 1fr); gap: 10px 18px; margin: 0; font-size: var(--fs-base); }
.kv dt { color: var(--ink-faint); min-width: 90px; }
.kv dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .grow { flex: 1; }
.toolbar > div:first-child { min-width: 0; }

/* Formulare in Karten */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 44px; }
.pw-wrap .icon-btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }
.saved-tick { display: inline-flex; align-items: center; gap: 4px; color: var(--green-ink); font-size: var(--fs-sm); font-weight: 550; animation: rise .3s var(--ease) both; }

/* DNS-Einträge (eigene Domain) */
.dns { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.dns th { text-align: left; font-weight: 550; color: var(--ink-faint); padding: 6px 10px; font-size: var(--fs-xs); }
.dns td { padding: 8px 10px; border-top: 1px solid var(--line-soft); vertical-align: middle; }
.dns td.v { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.dns td.v span { display: inline-flex; align-items: center; gap: 4px; }
.dns-wrap { overflow-x: auto; margin: 0 -10px 12px; }
@media (max-width: 640px) {
  .dns thead { display: none; }
  .dns tr { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 2px 10px; padding: 10px; border-top: 1px solid var(--line-soft); }
  .dns td { border: 0; padding: 0; }
  .dns td.v { grid-column: 1 / -1; }
}

/* Zugang (Anmelden, Passwort, Einladung, KI-Zugang): schlicht und mittig */
.gate { height: 100%; overflow: auto; display: flex; flex-direction: column; align-items: center; padding: 28px 16px;
  background: radial-gradient(1200px 520px at 50% -10%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 70%), var(--bg); }
.gate-in { margin: auto 0; width: min(400px, 100%); display: flex; flex-direction: column; align-items: stretch; gap: 22px; padding: 24px 0; animation: rise .5s var(--ease) both; }
.gate-in.wide { width: min(480px, 100%); }
.gate-brand { display: inline-flex; align-items: center; justify-content: center; gap: 10px; color: var(--fg); font-weight: 650; font-size: var(--fs-md); letter-spacing: -.015em; align-self: center; }
.gate-brand:hover { text-decoration: none; }
.gate-brand img { width: 30px; height: 30px; border-radius: 9px; }
.gate-card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 20px; padding: 32px 30px 28px; box-shadow: 0 30px 60px -40px color-mix(in srgb, var(--shadow-c) 55%, transparent); }
.gate-card h1 { font-size: 24px; letter-spacing: -.025em; margin-bottom: 6px; overflow-wrap: anywhere; }
.gate-card .lede { color: var(--ink-soft); font-size: var(--fs-base); margin-bottom: 22px; line-height: 1.5; }
.gate-card .fld .input { height: 44px; font-size: var(--fs-md); }
.gate-card .btn-lg { width: 100%; margin-top: 6px; }
.gate-aside { display: flex; justify-content: flex-end; margin: -6px 0 14px; font-size: var(--fs-sm); }
.gate-aside a, .gate-alt a { color: var(--ink-soft); }
.gate-aside a:hover, .gate-alt a:hover { color: var(--fg); }
.gate-alt { display: flex; justify-content: center; gap: 6px; margin-top: 18px; font-size: var(--fs-sm); color: var(--ink-faint); text-align: center; }
.gate-alt a { display: inline-flex; align-items: center; gap: 6px; }
.gate-foot { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 16px; color: var(--ink-faint); font-size: var(--fs-xs); }
.gate-foot span { display: inline-flex; align-items: center; gap: 5px; }
.gate-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: -8px 0 20px; }
.gate-done { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; margin-bottom: 16px; background: color-mix(in srgb, var(--green) 14%, transparent); color: var(--green-ink); animation: pop .5s var(--ease) both; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
.terms { display: flex; align-items: flex-start; gap: 10px; font-size: var(--fs-sm); color: var(--ink-soft); margin: 2px 0 14px; cursor: pointer; line-height: 1.45; }
.terms input { margin-top: 2px; accent-color: var(--fg); width: 16px; height: 16px; flex: none; }
.form-err-slot .fld-err { display: block; margin: -4px 0 12px; font-size: var(--fs-sm); }

/* KI-Zugang bestätigen (#/verbinden/<id>) */
.cx-box { padding: 14px 16px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--surface-2); margin-bottom: 14px; }
.cx-k { font-size: var(--fs-xs); font-weight: 600; color: var(--ink-faint); margin: 0 0 8px; }
.cx-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.cx-list li { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 9px; font-size: var(--fs-sm); line-height: 1.45; }
.cx-list .ic { margin-top: 2px; color: var(--green); }
.cx-warn { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 10px; margin: 0 0 14px; padding: 12px 14px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--orange) 40%, transparent); background: color-mix(in srgb, var(--orange) 9%, transparent); font-size: var(--fs-sm); line-height: 1.5; }
.cx-warn .ic { color: var(--orange-ink); margin-top: 2px; }
.cx-warn b { color: var(--fg); }
.gate-card .btn + .btn { margin-top: 8px; }

/* Verwaltung */
.card.adm-acc { padding: 0; overflow: hidden; }
.adm-acc + .adm-acc { margin-top: 12px; }
.adm-acc > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 14px 16px 14px 18px; cursor: pointer; min-height: 64px; }
.adm-acc > summary::-webkit-details-marker { display: none; }
.adm-acc > summary:hover { background: var(--hover); }
.adm-acc > summary > .ic:first-child { color: var(--ink-faint); transition: transform .25s var(--ease); }
.adm-acc[open] > summary > .ic:first-child { transform: rotate(90deg); }
.adm-acc[open] > summary { border-bottom: 1px solid var(--line-soft); }
.adm-acc .r-t b { font-size: var(--fs-md); }
.adm-body { padding: 8px 16px 16px; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 8px 28px; animation: rise .3s var(--ease) both; }
.adm-col h3 { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: var(--fs-sm); font-weight: 600; color: var(--ink-soft); margin: 10px 0 4px; min-height: 32px; }
.adm-col .rows { margin: 0 -12px; }
.adm-col .r { min-height: 52px; }
.mcp-box { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.mcp-box .input { flex: 1 1 260px; }

/* Konto */
.theme-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.theme-opt { display: flex; flex-direction: column; gap: 8px; padding: 8px 8px 10px; border-radius: 14px; border: 1.5px solid var(--line-soft); background: var(--surface); font-size: var(--fs-sm); font-weight: 550; color: var(--ink-soft); transition: border-color .15s, color .15s; }
.theme-opt:hover { border-color: var(--line-strong); color: var(--fg); }
.theme-opt[aria-checked="true"] { border-color: var(--fg); color: var(--fg); }
.theme-opt i { display: block; height: 54px; border-radius: 9px; border: 1px solid var(--line-soft); background: linear-gradient(#f5f6f8 0 30%, #ffffff 30%); }
.theme-opt i.d { background: linear-gradient(#0a0c10 0 30%, #13161c 30%); }
.theme-opt i.s { background: linear-gradient(90deg, #f5f6f8 0 50%, #0a0c10 50%); }
.theme-opt span { display: flex; align-items: center; gap: 6px; padding-left: 2px; }

/* Anfragen: Detail */
.msg-body { white-space: pre-wrap; font-size: var(--fs-base); line-height: 1.6; padding: 14px 16px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line-soft); }

/* Editor fehlt noch */
.ed-missing { height: 100%; display: grid; place-items: center; }

/* Tablet und Handy */
@media (max-width: 900px) {
  .adm-body { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .page { padding: 24px 16px 80px; }
  .grid2, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 16px; border-radius: 14px; }
  .card > .rows { margin: 0 -8px; }
  .top { padding: 0 10px 0 14px; gap: 8px; height: 56px; }
  .brand b { display: none; }
  .top-sep { display: none; }
  .top-acc { max-width: 46vw; }
  .top-link span { display: none; }
  .top-link { width: var(--h-md); padding: 0; justify-content: center; }
}
@media (max-width: 640px) {
  .btn { min-height: 44px; }
  .btn-sm { min-height: 36px; }
  .icon-btn { width: 40px; height: 40px; }
  .icon-btn.sm { width: 36px; height: 36px; }
  .menu-it { min-height: 44px; font-size: var(--fs-md); }
  .input, input.input { min-height: 44px; height: auto; font-size: var(--fs-lg); }
  .gate-card { padding: 26px 20px 22px; border-radius: 18px; }
  .r { flex-wrap: wrap; }
  .r.has-sel, .r.r-inv { row-gap: 8px; }
  .r.r-inv > .r-t { flex: 1 1 calc(100% - 96px); }
  .r.r-inv > .bdg { order: 5; }
  .r.r-inv > .r-t + .bdg { margin-left: 46px; }
  .r.r-inv > .r-x { order: 2; }
  .r.has-sel > .r-t { flex: 1 1 calc(100% - 96px); }
  .r.has-sel > .qsel { order: 5; flex: 1 1 100%; width: auto !important; margin-left: 46px; }
  .r.has-sel > .r-ic:first-child + .r-t, .adm-col .r.has-sel > .qsel { margin-left: 0; }
  .r .r-meta { order: 3; }
  .r .acts { margin-left: auto; }
  .modal-wrap { padding: 16px 10px; place-items: end center; }
  .modal { width: 100%; border-radius: 18px; }
  .modal-h { padding: 18px 18px 4px; } .modal-b { padding: 12px 18px 6px; } .modal-f { padding: 10px 18px 18px; }
  .modal-f .btn { flex: 1 1 auto; }
  .theme-pick { gap: 8px; }
  .toolbar { flex-wrap: nowrap; }
  .toolbar .btn span { display: none; }
  #toasts { top: auto; bottom: 12px; right: 10px; left: 10px; width: auto; }
}
@media (max-width: 400px) {
  .sites { gap: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .rise, .gate-in, .empty-ic, .gate-done, .adm-body, .saved-tick { animation: none; }
  .sc, .sc-ini, .sc-thumb iframe, .back .ic { transition: none; }
  .sc:hover { transform: none; }
  .skel::after { animation: none; }
}
