/* Písmo Manrope (SIL OFL 1.1, licencia v /static/fonts/OFL.txt) — latinka aj stredoeurópske znaky. */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/static/fonts/manrope-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/static/fonts/manrope-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;
}

/* Vzhľad „Atlas“: teplé neutrálne pozadie, čierne (v tmavom režime svetlé) tlačidlá v tvare piluliek. */
:root {
  --bg: #f5f4f1;
  --panel: #ffffff;
  --panel-2: #faf9f7;
  --hover: #efede8;
  --border: #e7e5df;
  --border-strong: #d6d3cb;
  --text: #121212;
  --muted: #5f5e5a;
  --faint: #7a7974;
  --accent: #121212;
  --accent-hover: #34332f;
  --accent-soft: #ebe9e3;
  --accent-text: #121212;
  --on-accent: #ffffff;
  --tag: #ebe9e3;
  --tag-hover: #e0ddd5;
  --danger: #c0362c;
  --danger-soft: #fbeceb;
  --ok: #2f8a55;
  --ok-soft: #e5f2ea;
  --publish: #1f8a4c;
  --publish-hover: #19733f;
  --warn: #b45309;
  --live: #3b5bdb;
  --idle: #b5b2a8;
  --canvas: #ebe9e4;
  --canvas-dot: #d9d6ce;
  --auth-glow-1: rgb(214 196 160 / 0.38);
  --auth-glow-2: rgb(160 186 176 / 0.30);
  --auth-dot: rgb(18 18 18 / 0.13);
  --auth-art: rgb(18 18 18 / 0.06);
  --auth-grain: 0.05;
  --user-bubble: #efede8;
  --code-bg: #f0eee9;
  --tint-k: 100%;
  --cover-text: #121212;
  --cover-pill: rgb(255 255 255 / 0.72);
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.05);
  --shadow: 0 1px 2px rgb(0 0 0 / 0.05), 0 10px 30px rgb(0 0 0 / 0.08);
  --shadow-lg: 0 2px 6px rgb(0 0 0 / 0.06), 0 24px 64px rgb(0 0 0 / 0.16);
  --thumb-shadow: 0 1px 2px rgb(0 0 0 / 0.06), 0 10px 30px rgb(0 0 0 / 0.08);
  --thumb-shadow-hover: 0 2px 4px rgb(0 0 0 / 0.06), 0 18px 44px rgb(0 0 0 / 0.13);
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --bar-h: 52px;
  --chat-w: 420px;
  --font: "Manrope", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}

/* Tmavý režim: podľa systému, alebo natvrdo cez prepínač (data-theme na <html>). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131312;
    --auth-glow-1: rgb(196 160 104 / 0.22);
    --auth-glow-2: rgb(92 150 140 / 0.18);
    --auth-dot: rgb(255 255 255 / 0.09);
    --auth-art: rgb(255 255 255 / 0.05);
    --auth-grain: 0.07;
    --panel: #1c1b19;
    --panel-2: #21201e;
    --hover: #2a2926;
    --border: #2e2d2a;
    --border-strong: #3e3c38;
    --text: #f2f1ed;
    --muted: #b3b1aa;
    --faint: #8e8c85;
    --accent: #f2f1ed;
    --credit-star: #c98a00;
    --accent-hover: #ffffff;
    --accent-soft: #2c2b28;
    --accent-text: #f2f1ed;
    --on-accent: #121212;
    --tag: #2a2926;
    --tag-hover: #353430;
    --danger: #ff7b6b;
    --danger-soft: #3a1a16;
    --ok: #5cc98a;
    --ok-soft: #15291d;
    --warn: #f0a04b;
    --live: #8fa4ff;
    --idle: #77756f;
    --canvas: #0e0e0d;
    --canvas-dot: #23221f;
    --user-bubble: #2a2926;
    --code-bg: #262522;
    --tint-k: 16%;
    --cover-text: #f2f1ed;
    --cover-pill: rgb(255 255 255 / 0.08);
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 10px 30px rgb(0 0 0 / 0.35);
    --shadow-lg: 0 2px 6px rgb(0 0 0 / 0.4), 0 24px 64px rgb(0 0 0 / 0.5);
    --thumb-shadow: 0 0 0 1px rgb(255 255 255 / 0.06), 0 10px 30px rgb(0 0 0 / 0.4);
    --thumb-shadow-hover: 0 0 0 1px rgb(255 255 255 / 0.1), 0 18px 44px rgb(0 0 0 / 0.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #131312;
  --auth-glow-1: rgb(196 160 104 / 0.22);
  --auth-glow-2: rgb(92 150 140 / 0.18);
  --auth-dot: rgb(255 255 255 / 0.09);
  --auth-art: rgb(255 255 255 / 0.05);
  --auth-grain: 0.07;
  --panel: #1c1b19;
  --panel-2: #21201e;
  --hover: #2a2926;
  --border: #2e2d2a;
  --border-strong: #3e3c38;
  --text: #f2f1ed;
  --muted: #b3b1aa;
  --faint: #8e8c85;
  --accent: #f2f1ed;
  --credit-star: #c98a00;
  --accent-hover: #ffffff;
  --accent-soft: #2c2b28;
  --accent-text: #f2f1ed;
  --on-accent: #121212;
  --tag: #2a2926;
  --tag-hover: #353430;
  --danger: #ff7b6b;
  --danger-soft: #3a1a16;
  --ok: #5cc98a;
  --ok-soft: #15291d;
  --warn: #f0a04b;
  --live: #8fa4ff;
  --idle: #77756f;
  --canvas: #0e0e0d;
  --canvas-dot: #23221f;
  --user-bubble: #2a2926;
  --code-bg: #262522;
  --tint-k: 16%;
  --cover-text: #f2f1ed;
  --cover-pill: rgb(255 255 255 / 0.08);
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 10px 30px rgb(0 0 0 / 0.35);
  --shadow-lg: 0 2px 6px rgb(0 0 0 / 0.4), 0 24px 64px rgb(0 0 0 / 0.5);
  --thumb-shadow: 0 0 0 1px rgb(255 255 255 / 0.06), 0 10px 30px rgb(0 0 0 / 0.4);
  --thumb-shadow-hover: 0 0 0 1px rgb(255 255 255 / 0.1), 0 18px 44px rgb(0 0 0 / 0.5);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { height: 100%; }
body {
  margin: 0;
  font: 14px/1.5 var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-text); text-underline-offset: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
code, pre { font-family: var(--mono); }
svg.i { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* --- Tlačidlá a polia ------------------------------------------------------ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 14px;
  border: 1px solid var(--border-strong); border-radius: 999px;
  background: var(--panel); color: var(--text);
  font-weight: 650; text-decoration: none; white-space: nowrap;
  cursor: pointer; transition: background .12s, border-color .12s, color .12s;
}
.btn:hover { background: var(--hover); border-color: var(--border-strong); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--hover); color: var(--text); }
.btn.danger { color: var(--danger); }
.btn.sm { height: 30px; padding: 0 11px; font-size: 13px; }
.btn.lg { height: 44px; padding: 0 20px; font-size: 14px; }
.btn.block { width: 100%; height: 50px; font-size: 15px; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; padding: 0;
  border: 0; border-radius: 999px;
  background: transparent; color: var(--muted); cursor: pointer;
  text-decoration: none;
}
.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn:disabled { opacity: .4; cursor: default; background: transparent; }

.form { display: grid; gap: 16px; }
.field { display: grid; gap: 7px; }
.field > span { font-size: 13px; font-weight: 700; color: var(--text); }
.field small { color: var(--faint); font-size: 12.5px; }
.field input:not([type="checkbox"]):not([type="radio"]), .field textarea, .field select {
  width: 100%; padding: 11px 14px;
  border: 1px solid var(--border-strong); border-radius: 12px;
  background: var(--panel); outline: none;
  transition: border-color .12s, box-shadow .12s;
}
.field textarea { resize: vertical; min-height: 96px; }
.field input:not([type="checkbox"]):not([type="radio"]):focus, .field textarea:focus, .field select:focus {
  border-color: var(--text); box-shadow: 0 0 0 3px var(--accent-soft);
}
.field input:disabled { color: var(--muted); background: var(--panel-2); }
.field .prefixed { display: flex; align-items: center; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--panel); overflow: hidden; }
.field .prefixed:focus-within { border-color: var(--text); box-shadow: 0 0 0 3px var(--accent-soft); }
.field .prefixed span { padding: 0 0 0 14px; color: var(--faint); font-size: 13px; white-space: nowrap; }
.field .prefixed input:not([type="checkbox"]):not([type="radio"]) { border: 0; box-shadow: none; padding-left: 2px; background: transparent; }
.form-error { margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--danger-soft); color: var(--danger); font-size: 13px; }

/* --- Značka --------------------------------------------------------------- */

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; color: var(--text); text-decoration: none; letter-spacing: -0.01em; }
.brand .mark { flex: none; width: 30px; height: 30px; }
/* logo: a speech bubble with B (public/logo.svg), colours from the theme so it works in dark mode too */
.mark { fill: var(--accent); }
.mark .mark-b { fill: none; stroke: var(--on-accent); stroke-width: 5; stroke-linecap: square; stroke-linejoin: miter; }

/* --- Prihlásenie --------------------------------------------------------- */

.login-shell {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; gap: 32px; padding: 28px 40px 32px;
}
.login-main {
  flex: 1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 48px 64px;
  width: 100%; max-width: 1180px; margin: 0 auto;
}
.login-hero { flex: 1 1 460px; min-width: 0; max-width: 620px; }
.login-hero h1 { margin: 0; font-size: clamp(40px, 5.2vw, 64px); line-height: 1.02; font-weight: 800; letter-spacing: -0.045em; }
.login-hero p { margin: 24px 0 0; max-width: 480px; font-size: 18px; line-height: 1.55; color: var(--muted); }
.login-points { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 14px; }
.login-points li { display: flex; gap: 12px; align-items: baseline; font-size: 15px; font-weight: 650; }
.login-points li::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--text); transform: translateY(-2px); }
.login-card {
  flex: 0 1 440px; width: 100%; padding: 36px;
  background: var(--panel); border-radius: 24px; box-shadow: 0 1px 2px rgb(0 0 0 / .05), 0 20px 50px rgb(0 0 0 / .08);
}
.login-card h2 { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -0.03em; }
.login-sub { margin: 6px 0 26px; color: var(--muted); font-size: 15px; }
.login-card .field input:not([type="checkbox"]) { height: 52px; padding: 0 16px; font-size: 16px; }
.login-card .btn.block { margin-top: 4px; height: 52px; }
.login-note { margin: 20px 0 0; font-size: 13px; line-height: 1.5; color: var(--faint); }
.login-foot { width: 100%; max-width: 1180px; margin: 0 auto; font-size: 13px; color: var(--faint); }
/* Sign-in pages appear only when translated, with their font and options — no flash of English text or jumping
   buttons (the script removes .booting; after 2 s they appear anyway, so a failed script never hides the page). */
.booting .login-shell { opacity: 0; animation: boot-reveal 0s 2s forwards; }
.login-shell { transition: opacity .12s ease-out; }
@keyframes boot-reveal { to { opacity: 1; } }

/* Background of the sign-in pages: soft glows, a dot grid fading out, grain and a large outline of the logo bubble */
.login-shell::before {
  content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(55% 60% at 88% 12%, var(--auth-glow-1), transparent 70%),
    radial-gradient(50% 55% at 6% 96%, var(--auth-glow-2), transparent 70%);
}
.login-shell::after {
  content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background: radial-gradient(circle at 1px 1px, var(--auth-dot) 1px, transparent 1.5px) 0 0 / 24px 24px;
  -webkit-mask-image: radial-gradient(70% 70% at 30% 45%, #000 0%, transparent 75%);
  mask-image: radial-gradient(70% 70% at 30% 45%, #000 0%, transparent 75%);
}
.auth-art { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.auth-art::before { content: ""; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); opacity: var(--auth-grain); mix-blend-mode: overlay; }
.auth-art svg { position: absolute; right: -14vmin; bottom: -22vmin; width: 78vmin; height: 78vmin; fill: none; stroke: var(--auth-art); stroke-width: .6; }
@media (max-width: 760px) { .auth-art svg { right: -30vmin; bottom: -10vmin; width: 110vmin; height: 110vmin; } }

/* Registrácia a prihlásenie cez Google */
.auth-step { margin: 0 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); }
.auth-choice { display: grid; gap: 12px; }
.auth-org { margin-bottom: 16px; }
.auth-choice button {
  display: grid; gap: 4px; padding: 18px 20px; text-align: left;
  border: 1.5px solid var(--border); border-radius: 16px; background: var(--panel); color: var(--text);
  font: inherit; cursor: pointer; transition: border-color .12s, background .12s;
}
.auth-choice button:hover, .auth-choice button:focus-visible { border-color: var(--text); background: var(--panel-2); }
.auth-choice b { font-size: 16px; }
.auth-choice small { font-size: 14px; line-height: 1.45; color: var(--muted); }
.btn.btn-google { width: 100%; height: 52px; gap: 10px; font-size: 15px; }
.btn-google svg { flex: none; }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 18px 0; font-size: 13px; color: var(--faint); }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.auth-back { margin: 0 0 14px; padding: 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; }
.auth-back:hover { color: var(--text); }
.auth-switch { margin: 18px 0 0; font-size: 14px; color: var(--muted); }
.auth-switch a { color: var(--text); font-weight: 700; }
.auth-done { margin: 0; font-size: 15px; line-height: 1.55; color: var(--muted); }
.auth-done b { color: var(--text); }
@media (max-width: 760px) {
  .login-shell { padding: 20px 16px 24px; gap: 28px; }
  .login-main { flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 24px; }
  .login-hero { flex: none; }
  .login-hero h1 { font-size: 36px; }
  .login-hero p, .login-points { display: none; }
  .login-card { flex: none; padding: 26px 22px; border-radius: 20px; }
}

/* --- Horná lišta ------------------------------------------------------------ */

.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 8px;
  height: 68px; padding: 0 32px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.3) blur(12px);
}
.spacer { flex: 1; }
.topbar .icon-btn { width: 40px; height: 40px; border: 1px solid var(--border-strong); }
.tfa-strip {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 0 32px 12px; padding: 10px 14px; border-radius: 12px;
  background: var(--danger-soft); border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent);
  color: var(--text); font-size: 14px;
}
.tfa-strip > svg { width: 18px; height: 18px; flex: none; color: var(--danger); }
.tfa-strip > span { flex: 1; min-width: 200px; }
.tfa-strip > span b { color: var(--danger); }
.tfa-strip .btn { background: var(--danger); border-color: var(--danger); color: #fff; }
.tfa-later { background: none; border: 0; color: inherit; opacity: .75; text-decoration: underline; cursor: pointer; font: inherit; padding: 4px; }
@media (max-width: 640px) { .tfa-strip { margin: 8px 16px 12px; } }
.topbar .icon-btn.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.avatar {
  display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: var(--av, var(--accent-soft)); color: #121212; font-weight: 800; font-size: 11.5px; letter-spacing: .02em; text-transform: uppercase;
}

/* --- Stránky prehľadu (weby, CRM, používatelia…) ------------------------------ */

.dash-main { max-width: 1320px; margin: 0 auto; padding: 24px 32px 80px; }
.dash-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-bottom: 28px; }
.dash-head h1 { margin: 0; font-size: 44px; line-height: 1.05; font-weight: 800; letter-spacing: -0.04em; }
.dash-head p { margin: 8px 0 0; max-width: 660px; color: var(--muted); font-size: 16px; line-height: 1.5; }
.dash-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.dash-actions .btn { height: 44px; padding: 0 20px; font-size: 14px; }
select.pill-select {
  height: 44px; min-width: 200px; padding: 0 38px 0 16px;
  border: 1px solid var(--border-strong); border-radius: 999px; background-color: var(--panel); color: var(--text);
  font-weight: 650; cursor: pointer; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237a7974' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 15px center;
}

.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 28px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 15px;
  border: 1px solid var(--border-strong); border-radius: 999px; background: var(--panel); color: var(--muted);
  font-size: 13.5px; font-weight: 700; white-space: nowrap; text-decoration: none; cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
}
.pill:hover { color: var(--text); }
.pill[aria-pressed="true"], .pill[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.sys-groups { margin: 0 0 18px; }
.sys-groups .n.warn { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 11.5px; }
.pill .n { opacity: .6; font-variant-numeric: tabular-nums; }
.search-pill {
  margin-left: auto; flex: 0 1 300px; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px;
  border: 1px solid var(--border-strong); border-radius: 999px; background: var(--panel); color: var(--faint);
}
.search-pill:focus-within { border-color: var(--text); }
.search-pill input { flex: 1; min-width: 0; border: 0; padding: 0; background: transparent; outline: none; font-size: 14px; color: var(--text); }
.search-pill input::-webkit-search-cancel-button { cursor: pointer; }

.site-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 34px 24px; }
.site-card { position: relative; display: flex; flex-direction: column; gap: 13px; min-width: 0; }
.thumb {
  position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden;
  border-radius: var(--radius); background: var(--panel); box-shadow: var(--thumb-shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
.site-card:hover .thumb, .site-card:hover .crm-cover { transform: translateY(-2px); box-shadow: var(--thumb-shadow-hover); }
.thumb img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: top; background: #fff;
  pointer-events: none;
}
.thumb::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .05); }
.status {
  position: absolute; z-index: 2; left: 10px; bottom: 10px; max-width: calc(100% - 20px);
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px 5px 9px; border-radius: 999px;
  background: #fff; color: #121212; box-shadow: 0 1px 3px rgb(0 0 0 / .14);
  font-size: 12px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none;
}
.status .dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--c, #b5b2a8); }
.status.run .dot { --c: #3b5bdb; animation: dot-pulse 1.6s ease-in-out infinite; }
.status .dot + .dot { margin-left: -3px; box-shadow: 0 0 0 2px #fff; }
@keyframes dot-pulse { 50% { box-shadow: 0 0 0 4px rgb(59 91 219 / .22); } }
.site-meta { min-width: 0; padding: 0 2px; }
.meta-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.site-meta h3 { margin: 0; min-width: 0; font-size: 16px; font-weight: 800; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-meta h3 a { display: block; overflow: hidden; text-overflow: ellipsis; color: inherit; text-decoration: none; }
.site-meta h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.when { flex: none; font-size: 12.5px; color: var(--faint); white-space: nowrap; }
.site-meta p { margin: 2px 0 0; color: var(--faint); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-meta .dom { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.site-meta .dom span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ext { flex: none; display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12.5px; font-weight: 700; text-decoration: none; }
.ext:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.ext svg { width: 12px; height: 12px; }
.site-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 11px; }
.tag {
  display: inline-flex; align-items: center; gap: 5px; max-width: 100%; height: 26px; padding: 0 10px;
  border: 0; border-radius: 999px; background: var(--tag); color: var(--muted);
  font-size: 12.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none;
}
button.tag, a.tag { cursor: pointer; transition: background .12s, color .12s; }
button.tag:hover, a.tag:hover { background: var(--tag-hover); color: var(--text); }
.tag svg { width: 13px; height: 13px; flex: none; }
.tag.dark { background: var(--accent); color: var(--on-accent); }
.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 8px; border-radius: 999px;
  background: var(--tag); color: var(--text); font-size: 11.5px; font-weight: 700;
}
.empty { grid-column: 1 / -1; padding: 56px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); }
.empty h3 { margin: 0 0 8px; color: var(--text); font-size: 18px; font-weight: 800; }
.empty p { max-width: 520px; margin: 0 auto 18px; line-height: 1.55; }

.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin: 0 0 18px; }
.section-head h2 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.section-head p { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.section-head > a { font-size: 14px; font-weight: 700; color: var(--muted); text-decoration: none; }
.section-head > a:hover { color: var(--text); }
.section { margin-top: 52px; }

/* --- Editor -------------------------------------------------------------- */

.editor { display: grid; grid-template-rows: var(--bar-h) 1fr; height: 100vh; height: 100dvh; height: var(--vvh, 100dvh); overflow: hidden; }

.ed-bar {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(min-content, 1fr); align-items: center; gap: 12px;
  padding: 0 10px; background: var(--panel); border-bottom: 1px solid var(--border);
}
.bar-left, .bar-right { display: flex; align-items: center; gap: 6px; min-width: 0; }
.bar-right { justify-content: flex-end; }
.site-title { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; margin-right: 4px; }
.site-title strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-title span { font-size: 11.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vsep { width: 1px; height: 22px; background: var(--border); margin: 0 4px; flex: none; }

.page-picker { position: relative; display: flex; align-items: center; min-width: 0; }
.page-picker svg { position: absolute; left: 9px; color: var(--muted); pointer-events: none; }
.page-picker select {
  appearance: none; -webkit-appearance: none;
  height: 34px; max-width: 240px; padding: 0 30px 0 31px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--panel-2);
  font-size: 13px; cursor: pointer; text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a8a96' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.page-picker select:hover { border-color: var(--border-strong); }

.bar-center { display: flex; align-items: center; gap: 8px; }
.mode-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 11px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--panel-2); color: var(--muted);
  font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s, color .12s;
}
.mode-btn:hover { color: var(--text); border-color: var(--border-strong); }
.mode-btn[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-text); }
.foot-ctrls { display: flex; align-items: center; gap: 6px; }
.seg-ctrl { display: inline-flex; padding: 3px; gap: 2px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; }
.seg-ctrl button {
  display: inline-grid; place-items: center; width: 34px; height: 28px; border: 0; border-radius: 7px;
  background: transparent; color: var(--muted); cursor: pointer;
}
.seg-ctrl button:hover { color: var(--text); }
.seg-ctrl button[aria-pressed="true"] { background: var(--panel); color: var(--text); box-shadow: var(--shadow-sm); }

.ed-body { display: grid; grid-template-columns: minmax(0, 1fr) 6px var(--chat-w); min-height: 0; }

/* Náhľad */
.preview-pane { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--canvas); }
.stage {
  position: relative; flex: 1; min-height: 0; overflow: hidden;
  background-color: var(--canvas);
  background-image: radial-gradient(var(--canvas-dot) 1px, transparent 1px);
  background-size: 16px 16px;
}
.device {
  position: absolute; top: 0; left: 0;
  transform-origin: 0 0; background: #fff; overflow: hidden;
  transition: box-shadow .2s;
}
.device.framed { border-radius: 14px; box-shadow: var(--shadow-lg); outline: 1px solid rgb(0 0 0 / 0.06); }
.device iframe { display: block; width: 100%; height: 100%; border: 0; background: #fff; }
.preview-foot {
  display: flex; align-items: center; justify-content: center; gap: 8px; height: 26px; flex: none;
  font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums;
}
.stage-loading {
  position: absolute; top: 10px; right: 12px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 999px;
  background: var(--panel); box-shadow: var(--shadow); font-size: 12px; color: var(--muted);
}

/* Posuvník medzi náhľadom a chatom */
.resizer { position: relative; cursor: col-resize; background: var(--panel); border-left: 1px solid var(--border); }
.resizer::after { content: ""; position: absolute; top: 50%; left: 1px; width: 3px; height: 32px; margin-top: -16px; border-radius: 2px; background: var(--border-strong); opacity: 0; transition: opacity .15s; }
.resizer:hover::after, .resizing .resizer::after { opacity: 1; }
.resizing { cursor: col-resize; user-select: none; }
.resizing iframe { pointer-events: none; }

/* Chat */
.chat-pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--panel); }
.chat-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  height: 44px; padding: 0 10px 0 16px; border-bottom: 1px solid var(--border); flex: none;
}
.chat-head strong { font-size: 13.5px; }
.chat-log { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 16px 8px; scroll-behavior: auto; }
.chat-empty { margin: 24px 4px; color: var(--muted); font-size: 13.5px; }
.chat-empty h3 { margin: 0 0 6px; color: var(--text); font-size: 15px; }
.chat-empty ul { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.chat-empty li button {
  width: 100%; text-align: left; padding: 9px 11px; border: 1px solid color-mix(in srgb, var(--text) 22%, #121212); border-radius: var(--radius-sm);
  background: #121212; cursor: pointer; color: #fff; font-size: 13px;
}
.chat-empty li button:hover { background: #34332f; }

.msg-user { display: flex; flex-direction: column; align-items: flex-end; margin: 18px 0 12px; }
.msg-user:first-child { margin-top: 0; }
.bubble {
  max-width: 92%; padding: 9px 13px; border-radius: 14px 14px 4px 14px;
  background: var(--user-bubble); white-space: pre-wrap; overflow-wrap: anywhere;
}
.msg-meta { margin-top: 4px; font-size: 11.5px; color: var(--faint); }
.att-thumbs { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; margin-bottom: 6px; }
.att-thumbs img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); background: var(--panel-2); }

.msg-run { margin: 0 0 6px; }
.md { overflow-wrap: anywhere; }
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md p, .md ul, .md ol { margin: 0 0 8px; }
.md ul, .md ol { padding-left: 20px; }
.md li { margin: 2px 0; }
.md h1, .md h2, .md h3, .md h4 { margin: 12px 0 6px; font-size: 14px; }
.md code { padding: 1px 5px; border-radius: 5px; background: var(--code-bg); font-size: 12.5px; }
.md pre { margin: 0 0 8px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--code-bg); overflow-x: auto; font-size: 12.5px; }
.md pre code { padding: 0; background: none; }
.md blockquote { margin: 0 0 8px; padding-left: 10px; border-left: 3px solid var(--border-strong); color: var(--muted); }
.md table { border-collapse: collapse; margin: 0 0 8px; font-size: 13px; }
.md th, .md td { border: 1px solid var(--border); padding: 4px 8px; }
.seg-text { margin: 6px 0 10px; }

.thinking { margin: 4px 0 8px; color: var(--muted); font-size: 13px; }
.thinking summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; list-style: none; user-select: none; color: var(--faint); }
.thinking summary::-webkit-details-marker { display: none; }
.thinking summary:hover { color: var(--muted); }
.thinking summary svg { transition: transform .15s; }
.thinking[open] summary svg.chev { transform: rotate(90deg); }
.thinking-text { margin: 6px 0 0; padding: 2px 0 2px 12px; border-left: 2px solid var(--border); white-space: pre-wrap; font-size: 12.5px; }

.tools { margin: 6px 0 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel-2); overflow: hidden; }
.tool { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 2px 8px; align-items: start; padding: 7px 10px; font-size: 12.5px; }
.tool + .tool { border-top: 1px solid var(--border); }
.tool .ti { display: grid; place-items: center; height: 19px; color: var(--muted); }
.tool .ti svg { width: 14px; height: 14px; }
.tool .tl { display: flex; align-items: baseline; gap: 6px; min-width: 0; color: var(--muted); line-height: 19px; }
.tool .tl code { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-size: 12px; }
.tool .tl .verb { white-space: nowrap; }
.tool .tl .tsteps { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: 12px; }
.tool[data-status="ok"] .ti { color: var(--ok); }
.tool[data-status="error"] .ti { color: var(--danger); }
.tool[data-status="running"] .tl { color: var(--text); }
.tool .terr { grid-column: 2; color: var(--danger); font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }

.working { display: flex; align-items: center; gap: 8px; margin: 6px 0 4px; color: var(--muted); font-size: 12.5px; }
.run-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 6px 0 4px; font-size: 12px; color: var(--faint); }
.run-foot .st { display: inline-flex; align-items: center; gap: 4px; }
.run-foot .st.ok { color: var(--ok); }
.run-foot .st.err { color: var(--danger); }
.run-foot .run-credits { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.run-foot .run-credits svg { width: 13px; height: 13px; color: var(--credit-star, #e0a800); fill: currentColor; }
.ed-bar .credit-chip { height: 36px; padding: 0 13px 0 11px; font-size: 13px; }
.ed-bar .credit-chip b { font-size: 14.5px; }
@media (max-width: 1100px) { .ed-bar .credit-chip small { display: none; } }
.run-foot button.link {
  border: 0; padding: 0; background: none; color: var(--muted); cursor: pointer; font-size: 12px;
  display: inline-flex; align-items: center; gap: 4px;
}
.run-foot button.link:hover { color: var(--text); text-decoration: underline; }
.changed-list { margin: 2px 0 8px; padding: 6px 10px; border-radius: var(--radius-sm); background: var(--panel-2); border: 1px solid var(--border); font-size: 12px; font-family: var(--mono); list-style: none; }
.changed-list li { display: flex; gap: 8px; color: var(--muted); }
.changed-list b { width: 12px; font-weight: 600; }
.changed-list .A { color: var(--ok); }
.changed-list .D { color: var(--danger); }
.run-error { margin: 6px 0 8px; padding: 9px 11px; border-radius: var(--radius-sm); background: var(--danger-soft); color: var(--danger); font-size: 13px; white-space: pre-wrap; }

.divider { display: flex; align-items: center; gap: 10px; margin: 22px 0; color: var(--faint); font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.chat-older { display: block; margin: 6px auto 14px; font-size: 12.5px; }

/* Spinner */
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; flex: none; opacity: .8; }
@keyframes spin { to { transform: rotate(360deg); } }
.dots::after { content: "…"; display: inline-block; width: 1.2em; animation: dots 1.2s steps(4) infinite; overflow: hidden; vertical-align: bottom; }
@keyframes dots { from { width: 0; } to { width: 1.2em; } }

/* Písanie správy */
/* Requests waiting for the agent (queue above the composer) */
.chat-queue { flex: none; margin: 0 12px; padding: 8px 10px; border: 1px dashed var(--border-strong); border-radius: 12px; background: var(--bg); max-height: 30vh; overflow-y: auto; }
.chat-queue .q-head { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.chat-queue .q-head svg { width: 15px; height: 15px; }
.chat-queue .q-head small { color: var(--muted); }
.chat-queue .q-paused { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; padding: 6px 8px; border-radius: 8px; background: color-mix(in srgb, var(--warn, #c77700) 12%, transparent); font-size: 13px; }
.chat-queue .q-paused span { flex: 1; min-width: 160px; }
.chat-queue ol { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; counter-reset: q; }
.chat-queue li { display: flex; align-items: flex-start; gap: 4px; padding: 6px 4px 6px 8px; border-radius: 8px; background: var(--panel); counter-increment: q; }
.chat-queue li::before { content: counter(q) "."; color: var(--muted); font-size: 13px; padding-top: 1px; }
.chat-queue li > div { flex: 1; min-width: 0; }
.chat-queue .q-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13.5px; white-space: pre-line; }
.chat-queue li small { display: block; color: var(--muted); font-size: 12px; }
.chat-queue .icon-btn { width: 28px; height: 28px; flex: none; }
.composer { flex: none; margin: 8px 12px 12px; padding: 8px; border: 1px solid var(--border-strong); border-radius: 14px; background: var(--panel); box-shadow: var(--shadow-sm); transition: border-color .12s, box-shadow .12s; }
.composer:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.composer.drag { border-color: var(--accent); border-style: dashed; background: var(--accent-soft); }
.composer textarea {
  display: block; width: 100%; min-height: 44px; max-height: 240px; padding: 4px 6px;
  border: 0; outline: none; resize: none; background: transparent; line-height: 1.45;
}
.composer-row { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.ctx { flex: 1; min-width: 0; font-size: 11.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.send {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 50%;
  background: var(--accent); color: var(--on-accent); cursor: pointer; flex: none; transition: background .12s, opacity .12s;
}
.send:hover { background: var(--accent-hover); }
.send:disabled { opacity: .35; cursor: default; background: var(--accent); }
.send.stop { background: var(--text); color: var(--panel); }
.att-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px; }
.att-row:empty { display: none; }
.att-chip { position: relative; width: 52px; height: 52px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); background: var(--panel-2); display: grid; place-items: center; }
.att-chip img { width: 100%; height: 100%; object-fit: cover; }
.att-chip button { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border: 0; border-radius: 50%; background: rgb(0 0 0 / .65); color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; }
.att-chip button svg { width: 11px; height: 11px; }

/* Popover (história) */
.popover {
  position: fixed; z-index: 40; top: calc(var(--bar-h) + 6px); right: 10px;
  width: min(400px, calc(100vw - 20px)); max-height: min(70vh, 560px);
  display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg);
}
.popover-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 10px 10px 14px; border-bottom: 1px solid var(--border); }
.popover-head strong { font-size: 13.5px; }
.popover-body { overflow-y: auto; padding: 6px; }
.ver { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--radius-sm); }
.ver:hover { background: var(--hover); }
.ver-main { flex: 1; min-width: 0; }
.ver-main div { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ver-main span { font-size: 11.5px; color: var(--faint); }
.ver .badge { flex: none; }
.ver .btn, .ver .ver-dl { flex: none; opacity: 0; }
.ver:hover .btn, .ver .btn:focus-visible, .ver:hover .ver-dl, .ver .ver-dl:focus-visible { opacity: 1; }

/* Modálne okno */
/* Posúva sa celé pozadie s oknom (nie okno vo vnútri) a okno je centrované cez margin: auto —
   vysoké okno sa tak dá na mobile prejsť od vrchu po spodok. Výška = viditeľná časť obrazovky
   (--vvh/--vvt z visualViewport: na iPhone bez líšt Safari a klávesnice). */
.modal-backdrop {
  position: fixed; left: 0; right: 0; top: var(--vvt, 0px); height: var(--vvh, 100%); z-index: 50;
  display: flex; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  box-sizing: border-box; padding: 16px; background: rgb(18 18 18 / .42); backdrop-filter: blur(3px); animation: fade .12s ease-out;
}
.modal { flex: none; margin: auto; width: min(540px, 100%); background: var(--panel); border: 0; border-radius: 24px; box-shadow: var(--shadow-lg); animation: pop .16s ease-out; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 22px 18px 4px 26px; }
.modal-head h2 { margin: 0; font-size: 21px; font-weight: 800; letter-spacing: -0.02em; }
.modal-body { padding: 10px 26px 4px; }
.modal-body > p { margin: 0 0 16px; color: var(--muted); font-size: 14px; line-height: 1.55; }
/* a dialog without a footer: room under the last element */
.modal-body:last-child { padding-bottom: 26px; }
.modal-foot { position: sticky; bottom: 0; z-index: 1; display: flex; justify-content: flex-end; gap: 8px; padding: 18px 26px 24px; background: var(--panel); border-top: 1px solid transparent; border-radius: 0 0 24px 24px; }
.modal-foot .btn { height: 42px; padding: 0 18px; }
.modal-foot .foot-left { margin-right: auto; color: var(--danger); }
/* Studio's confirm/prompt dialog (askConfirm/askText in app.js) */
.ask-backdrop { z-index: 1200; }
.ask-modal { width: min(440px, 100%); }
.ask-modal .modal-body { padding-top: 26px; }
.ask-modal .ask-msg { margin: 0 0 14px; color: var(--text); font-size: 15px; line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; }
/* loader while a modal loads its data (opening() in app.js) */
.modal-loader { position: fixed; inset: 0; z-index: 1150; display: grid; place-items: center; background: rgba(15, 23, 42, .12); cursor: progress; animation: fade .2s ease-out; }
.modal-loader-spin { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 18px; background: var(--panel); box-shadow: var(--shadow-lg); animation: pop .16s ease-out; }
.modal-loader-spin::after { content: ''; width: 24px; height: 24px; border-radius: 50%; border: 2.5px solid var(--text); border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.98); } }

/* Notifikácie */
.toasts { position: fixed; z-index: 60; left: 16px; bottom: 16px; display: grid; gap: 8px; pointer-events: none; }
.toast { max-width: 380px; padding: 11px 16px; border-radius: 14px; font-weight: 600; background: var(--text); color: var(--panel); box-shadow: var(--shadow-lg); font-size: 13px; animation: pop .16s ease-out; pointer-events: auto; }
.toast.err { background: var(--danger); color: #fff; }
.toast.has-action { display: flex; align-items: center; gap: 12px; max-width: 460px; }
.toast-action { flex: none; padding: 6px 12px; border: 0; border-radius: 999px; background: var(--panel); color: var(--text); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.toast-action:hover { background: var(--panel-2); }

.mobile-only { display: none !important; }

/* --- Úzke obrazovky: náhľad a chat sa prepínajú ------------------------------ */
@media (max-width: 900px) {
  .ed-bar { grid-template-columns: minmax(0, 1fr) auto; }
  .bar-center { display: none !important; }
  .hide-narrow { display: none !important; }
  .mobile-only { display: inline-flex !important; }
  .ed-body { grid-template-columns: minmax(0, 1fr); }
  .resizer { display: none; }
  .editor[data-pane="chat"] .preview-pane { display: none; }
  .editor[data-pane="preview"] .chat-pane { display: none; }
  .page-picker select { max-width: 150px; }
  .site-title span { display: none; }
  .preview-foot { height: 46px; justify-content: space-between; padding: 0 12px; border-top: 1px solid var(--border); background: var(--panel); }
}
@media (max-width: 560px) {
  .hide-xs { display: none !important; }
  .ed-bar { gap: 4px; padding: 0 6px; }
  .bar-left, .bar-right { gap: 2px; }
  .page-picker select { max-width: 116px; }
  #pane-toggle { padding: 0 9px; }
  .dash-main { padding: 20px 16px 48px; }
  .dash-head { flex-wrap: wrap; }
  .site-title { display: none; }
}

/* --- Úpravy kliknutím v náhľade ------------------------------------------- */

.sel-bar {
  position: absolute; z-index: 5; left: 50%; bottom: 40px; transform: translateX(-50%);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px;
  width: max-content; max-width: calc(100% - 24px); padding: 8px 8px 8px 14px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
  /* farebný obrys + výrazný tieň: lišta je vidieť na svetlom aj tmavom webe */
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 70%, transparent), 0 14px 40px rgb(0 0 0 / .35), 0 2px 8px rgb(0 0 0 / .2);
  font-size: 13.5px;
}
.sel-bar .btn.sm { height: 34px; padding: 0 12px; font-size: 13px; }
.sel-bar .icon-btn.sm { width: 34px; height: 34px; }
/* Pod lištou je tmavý web → lišta svetlá (bez ohľadu na tému Studia). */
.sel-bar.on-dark {
  --panel: #fff; --panel-2: #f4f4f5; --text: #18181b; --muted: #52525b; --faint: #71717a;
  --border: #e4e4e7; --border-strong: #d4d4d8; --hover: #f1f1f3;
  --accent: #121212; --accent-hover: #34332f; --accent-soft: #ebe9e3; --accent-text: #121212; --on-accent: #fff;
  --danger: #c0362c; --tag: #ebe9e3; --tag-hover: #e0ddd5;
  color: var(--text); color-scheme: light;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgb(0 0 0 / .25), 0 14px 40px rgb(0 0 0 / .55);
}
.sel-label { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 240px; color: var(--muted); font-weight: 500; }
.sel-label code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--accent-text); font-size: 12px; }
.sel-hint { color: var(--faint); font-size: 12px; margin-right: 4px; }
.icon-btn.sm { width: 28px; height: 28px; }
.icon-btn.sm svg { width: 15px; height: 15px; }
.btn.sm svg { width: 14px; height: 14px; }

.sel-chip-row:empty { display: none; }
.sel-chip {
  display: flex; align-items: center; gap: 6px; margin: 0 0 6px; padding: 4px 4px 4px 8px;
  border-radius: 8px; background: var(--accent-soft); color: var(--accent-text); font-size: 12px;
}
.sel-chip svg { width: 14px; height: 14px; }
.sel-chip code { flex: none; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; }
.sel-chip span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.sel-chip button { display: grid; place-items: center; padding: 3px; border: 0; border-radius: 5px; background: none; color: inherit; cursor: pointer; }
.sel-chip button:hover { background: rgb(0 0 0 / .06); }

.bubble-el { display: inline-flex; align-items: center; gap: 5px; margin-bottom: 4px; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); font-size: 11.5px; }
.bubble-el svg { width: 12px; height: 12px; }
.bubble-el code { font-size: 11px; }
.bubble-el span { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }

.edit-note {
  display: flex; align-items: flex-start; gap: 10px; margin: 12px 0; padding: 8px 8px 8px 10px;
  border: 1px dashed var(--border-strong); border-radius: 10px; font-size: 12.5px; color: var(--muted);
}
.edit-note b { color: var(--text); font-weight: 600; }
.edit-note code { color: var(--text); font-size: 12px; }
.en-ic { display: grid; place-items: center; height: 19px; color: var(--accent-text); }
.en-ic svg { width: 14px; height: 14px; }
.en-main { flex: 1; min-width: 0; line-height: 19px; }
.en-page { color: var(--faint); }
.en-text { color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.edit-note button.link { display: grid; place-items: center; padding: 3px; border: 0; border-radius: 5px; background: none; color: var(--muted); cursor: pointer; }
.edit-note button.link:hover { background: var(--hover); color: var(--text); }

@media (max-width: 900px) {
  .sel-bar { bottom: 58px; }
  #preview-info { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mode-btn { height: 30px; padding: 0 9px; }
}

/* --- Záložky v pravom paneli ------------------------------------------------ */

.tabs { display: inline-flex; gap: 2px; padding: 3px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 9px; }
.tabs button {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border: 0; border-radius: 6px;
  background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 500; cursor: pointer;
}
.tabs button svg { width: 14px; height: 14px; }
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { background: var(--panel); color: var(--text); box-shadow: var(--shadow-sm); }

.inspector { display: none; flex: 1; min-height: 0; overflow-y: auto; font-size: 12.5px; }
.chat-pane[data-view="inspect"] .inspector { display: block; }
.chat-pane[data-view="inspect"] .chat-log,
.chat-pane[data-view="inspect"] .composer,
.chat-pane[data-view="inspect"] #reset-chat { display: none; }

/* --- Inšpektor ------------------------------------------------------------- */

.insp-empty { margin: 40px 24px; text-align: center; color: var(--muted); font-size: 13px; }
.insp-empty > svg { width: 28px; height: 28px; color: var(--accent-text); }
.insp-empty h3 { margin: 10px 0 6px; color: var(--text); font-size: 15px; }
.insp-empty p { margin: 0 0 16px; line-height: 1.55; }
.insp-tidy { margin: 0 16px 20px; padding: 14px 16px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--border); font-size: 12.5px; line-height: 1.5; }
.insp-tidy b { display: block; font-size: 13px; }
.insp-tidy p { margin: 4px 0 10px; color: var(--muted); }
.insp-tidy code { font-size: 11.5px; }
.insp-empty.small { margin: 20px 16px; text-align: left; font-size: 12.5px; }

.insp-head { position: sticky; top: 0; z-index: 2; display: flex; flex-direction: column; gap: 6px; padding: 10px 12px 8px 14px; background: var(--panel); border-bottom: 1px solid var(--border); }
.crumbs { display: flex; align-items: center; gap: 2px; min-width: 0; overflow-x: auto; white-space: nowrap; scrollbar-width: none; font-family: var(--mono); font-size: 11.5px; }
.crumbs::-webkit-scrollbar { display: none; }
.crumbs button { padding: 2px 4px; border: 0; border-radius: 4px; background: none; color: var(--faint); font: inherit; cursor: pointer; }
.crumbs button:hover { background: var(--hover); color: var(--text); }
.crumbs .sep { color: var(--faint); opacity: .6; }
.crumbs b { padding: 2px 6px; border-radius: 4px; background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.insp-actions { display: flex; gap: 2px; }
.insp-actions .icon-btn.danger:not(:disabled) { color: var(--danger); }

.insp-scope { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px 4px 14px; color: var(--muted); font-weight: 500; }
.seg-ctrl.sm button { width: auto; min-width: 32px; height: 24px; padding: 0 8px; font-size: 12px; position: relative; }
.seg-ctrl.sm button svg { width: 14px; height: 14px; }
.seg-ctrl button.has::after { content: ""; position: absolute; top: 3px; right: 3px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.seg-ctrl button[aria-pressed="true"] { background: var(--panel); color: var(--text); box-shadow: var(--shadow-sm); }
.insp-all { display: flex; align-items: flex-start; gap: 10px; margin: 8px 12px 0 14px; padding: 9px 11px; border: 1px solid var(--border-strong); border-radius: 10px; cursor: pointer; font-size: 12.5px; }
.insp-all:has(input:checked) { border-color: var(--text); background: var(--accent-soft); }
.insp-all input { margin: 2px 0 0; accent-color: var(--accent); }
.insp-all b { display: block; font-weight: 700; }
.insp-all small { display: block; color: var(--muted); font-size: 11.5px; }
.insp-note { margin: 6px 12px 0 14px; padding: 7px 10px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-text); font-size: 12px; line-height: 1.45; }
.insp-note.warn { background: var(--danger-soft); color: var(--danger); }
.insp-note button.link { border: 0; padding: 0; background: none; color: inherit; font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }

.insp-body { padding: 4px 0 24px; }
.sec { border-bottom: 1px solid var(--border); }
.sec > summary {
  display: flex; align-items: center; gap: 6px; padding: 11px 14px; cursor: pointer; list-style: none; user-select: none;
  font-weight: 600; font-size: 12.5px; color: var(--text);
}
.sec > summary::-webkit-details-marker { display: none; }
.sec > summary svg { width: 14px; height: 14px; color: var(--muted); }
.sec > summary svg.chev { transition: transform .15s; }
.sec[open] > summary svg.chev { transform: rotate(90deg); }
.sec > summary:hover { background: var(--panel-2); }
.sec-body { display: grid; gap: 10px; padding: 2px 14px 14px; }
.row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }

.f { display: grid; gap: 4px; min-width: 0; }
.fl { display: flex; align-items: center; justify-content: space-between; gap: 4px; min-height: 18px; color: var(--muted); font-size: 11.5px; font-weight: 500; }
.f.set > .fl span { color: var(--accent-text); }
.f.set > .fl span::before { content: "● "; font-size: 9px; vertical-align: 1px; }
.fx { display: none; place-items: center; width: 18px; height: 18px; padding: 0; border: 0; border-radius: 4px; background: none; color: var(--faint); cursor: pointer; }
.fx svg { width: 12px; height: 12px; }
.fx:hover { background: var(--hover); color: var(--text); }
.f.set > .fl .fx { display: grid; }

.in {
  width: 100%; height: 30px; min-width: 0; padding: 0 8px;
  border: 1px solid var(--border); border-radius: 7px; background: var(--panel-2); color: var(--text);
  font-size: 12.5px; outline: none; transition: border-color .12s, box-shadow .12s;
}
.in::placeholder { color: var(--faint); }
.in:hover { border-color: var(--border-strong); }
.in:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--panel); }
.in.set { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); color: var(--accent-text); font-weight: 600; }
select.in { padding-right: 4px; cursor: pointer; }

.seg { display: flex; padding: 2px; gap: 2px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; }
.seg button {
  flex: 1; display: inline-grid; place-items: center; min-width: 0; height: 24px; padding: 0 6px;
  border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 12px; cursor: pointer; white-space: nowrap;
}
.seg button svg { width: 14px; height: 14px; }
.seg button:hover { color: var(--text); background: var(--hover); }
.seg button.cur { color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong); }
.seg button.on { background: var(--accent); color: var(--on-accent); }

.color-in { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 6px; }
.color-in input[type="color"] { width: 34px; height: 30px; padding: 2px; border: 1px solid var(--border); border-radius: 7px; background: var(--panel-2); cursor: pointer; }
.color-in input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.color-in input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 5px; }
.swatches { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.sw { width: 18px; height: 18px; padding: 0; border: 1px solid rgb(0 0 0 / .12); border-radius: 5px; background: var(--c); cursor: pointer; transition: transform .1s; }
.sw:hover { transform: scale(1.15); }

.bg-row { display: flex; align-items: center; gap: 6px; }
.bg-thumb { flex: none; width: 46px; height: 30px; border: 1px solid var(--border); border-radius: 6px; background: var(--panel-2) center / cover no-repeat; }
.bg-thumb.no-image { background-image: linear-gradient(45deg, transparent 46%, var(--border-strong) 47%, var(--border-strong) 53%, transparent 54%); }
.block-btn { width: 100%; }

.range-row { display: flex; align-items: center; gap: 10px; }
.range-row input[type="range"] { flex: 1; accent-color: var(--accent); }
.range-val { width: 44px; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }

.chk { display: flex; align-items: center; gap: 8px; color: var(--text); cursor: pointer; }
.chk input { accent-color: var(--accent); }
.hint { margin: 0; color: var(--faint); font-size: 11.5px; }

/* Box model (margin / padding) */
.boxm {
  position: relative; display: grid; grid-template-columns: 54px minmax(0, 1fr) 54px; grid-template-areas: ". t ." "l c r" ". b .";
  gap: 6px; align-items: center; justify-items: center; padding: 20px 8px 8px;
  border: 1px dashed var(--border-strong); border-radius: 10px; background: color-mix(in srgb, var(--warn) 6%, transparent);
}
.bp {
  grid-area: c; position: relative; width: 100%; display: grid; grid-template-columns: 54px minmax(0, 1fr) 54px;
  grid-template-areas: ". t ." "l c r" ". b ."; gap: 6px; align-items: center; justify-items: center; padding: 20px 8px 8px;
  border: 1px solid var(--border-strong); border-radius: 8px; background: color-mix(in srgb, var(--ok) 7%, var(--panel));
}
.bc { grid-area: c; width: 100%; height: 22px; border-radius: 4px; background: color-mix(in srgb, var(--accent) 12%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.bm-tag { position: absolute; top: 4px; left: 8px; color: var(--faint); font-size: 10.5px; }
.in.bm { width: 54px; height: 26px; padding: 0 4px; text-align: center; font-size: 12px; }
.boxm > .t, .bp > .t { grid-area: t; }
.boxm > .l, .bp > .l { grid-area: l; }
.boxm > .r, .bp > .r { grid-area: r; }
.boxm > .b, .bp > .b { grid-area: b; }

.inspector .flex-only, .inspector .grid-only { display: none; }
.inspector.is-flex .flex-only, .inspector.is-grid .grid-only { display: grid; gap: 10px; }

/* --- Získať web ------------------------------------------------------------- */

.modal-wide { width: min(620px, 100%); }
.xp-body { padding-bottom: 20px; }
.xp { display: grid; gap: 10px; padding: 16px 0; border-top: 1px solid var(--border); }
.xp:first-child { border-top: 0; padding-top: 4px; }
.xp h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; }
.xp h3 svg { color: var(--accent-text); }
.xp-lead { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.xp-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.xp .hint { margin: 2px 0 0; line-height: 1.45; }
.xp code { font-size: 12px; padding: 1px 4px; border-radius: 4px; background: var(--code-bg); }
.xp .in { height: 34px; font-size: 13px; }
.xp textarea.in.key { height: auto; padding: 8px; font-family: var(--mono); font-size: 11.5px; line-height: 1.4; resize: none; word-break: break-all; }
.repo-card { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel-2); }
.repo-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-text); flex: none; }
.repo-main { min-width: 0; }
.repo-main div { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.repo-main a { color: var(--text); }
.repo-main span { color: var(--muted); font-size: 12px; }
.copy-row { display: flex; gap: 8px; }
.copy-row .in { flex: 1; }
.edit-note.publish { border-style: solid; background: var(--panel-2); }
.edit-note a.en-text { display: inline-block; color: var(--accent-text); text-decoration: none; }
.edit-note a.en-text:hover { text-decoration: underline; }
.xp, .xp > *, .repo-card { min-width: 0; }
.repo-card { overflow: hidden; }
.repo-main code { font-size: 12px; }

/* --- Diktovanie ------------------------------------------------------------ */

.icon-btn.mic.on { background: var(--danger); color: #fff; animation: mic-pulse 1.4s ease-out infinite; }
.icon-btn.mic.on:hover { background: var(--danger); color: #fff; }
@keyframes mic-pulse {
  0% { box-shadow: 0 0 0 0 rgb(217 45 32 / .45); }
  70% { box-shadow: 0 0 0 9px rgb(217 45 32 / 0); }
  100% { box-shadow: 0 0 0 0 rgb(217 45 32 / 0); }
}
.dict-lang {
  height: 22px; padding: 0 6px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--panel-2); color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .03em; cursor: pointer;
}
.dict-lang:hover { color: var(--text); border-color: var(--border-strong); }

/* --- Navigácia, konto, tabuľky ------------------------------------------------- */

.topnav { display: flex; gap: 4px; margin-left: 20px; }
.topnav a {
  flex: none; padding: 8px 15px; border-radius: 999px; color: var(--muted);
  font-weight: 650; font-size: 14px; text-decoration: none; transition: background .12s, color .12s;
}
.topnav a:hover { background: var(--hover); color: var(--text); }
.topnav a.on { background: var(--accent); color: var(--on-accent); }

.user-menu { position: relative; }
.user-menu .user-chip { display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.user-menu .user-chip .avatar { width: 40px; height: 40px; font-size: 13px; transition: box-shadow .12s; }
.user-menu .user-chip:hover .avatar, .user-menu .user-chip[aria-expanded="true"] .avatar { box-shadow: 0 0 0 3px var(--border-strong); }
.user-menu .menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; min-width: 250px; padding: 8px; background: var(--panel); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); }
.menu-head { display: flex; align-items: center; gap: 12px; padding: 8px 10px 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.menu-head .avatar { width: 38px; height: 38px; font-size: 13px; }
.menu-head div { display: grid; gap: 1px; min-width: 0; }
.menu-head b { font-weight: 800; }
.menu-head span { color: var(--faint); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu .menu > button, .user-menu .menu > a { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 10px; background: none; color: var(--text); font: inherit; font-size: 13.5px; font-weight: 600; text-align: left; text-decoration: none; cursor: pointer; }
.user-menu .menu > button:hover, .user-menu .menu > a:hover { background: var(--hover); }
.user-menu .menu svg { color: var(--muted); }

.warn-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin: 0 32px; padding: 10px 16px; border-radius: 14px; background: var(--danger-soft); color: var(--danger); font-size: 13.5px; font-weight: 600; }
.warn-bar button.link { border: 0; background: none; padding: 0; color: inherit; font: inherit; font-weight: 800; text-decoration: underline; cursor: pointer; }

.table-wrap { overflow-x: auto; background: var(--panel); border-radius: var(--radius-lg); }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { padding: 16px 18px 12px; text-align: left; color: var(--faint); font-weight: 700; font-size: 12.5px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl td { padding: 14px 18px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: var(--panel-2); }
.tbl tr.dim td { opacity: .55; }
.tbl .muted, .muted { color: var(--faint); }
.u-name { display: flex; align-items: center; gap: 12px; }
.u-name .avatar { width: 36px; height: 36px; font-size: 12px; }
.u-name b { font-weight: 750; }
.u-name small { display: block; color: var(--faint); font-size: 12.5px; }
.u-name .state { display: inline-block; margin-top: 4px; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.state.off { background: var(--danger-soft); color: var(--danger); }
.state.wait { background: var(--tag); color: var(--muted); }
.role { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--tag); color: var(--muted); }
.role.superadmin { background: var(--accent); color: var(--on-accent); }
.role.admin { background: var(--panel); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong); }
.chip { display: inline-block; max-width: 170px; margin: 2px 4px 2px 0; padding: 2px 9px; border-radius: 999px; background: var(--tag); font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.row-actions { white-space: nowrap; text-align: right; }
.row-actions .icon-btn.danger { color: var(--danger); }
.check-list { display: grid; gap: 6px; max-height: 260px; overflow-y: auto; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--panel-2); }
.check-list, .role-pick { display: grid; gap: 8px; }
.check-list .chk, .role-pick .chk { display: flex; align-items: flex-start; gap: 10px; line-height: 1.4; cursor: pointer; }
.check-list .chk input, .role-pick .chk input { flex: none; width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--accent); }
.chk-text { min-width: 0; overflow-wrap: anywhere; }
.chk-text small { display: block; color: var(--faint); font-size: 12px; }
.consent-pick { margin-top: 14px; gap: 14px; }
.consent-pick .chk-text { font-size: 14.5px; }
.consent-pick .chk-text small { margin-top: 2px; font-size: 12.5px; }
.legal-links { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 10px 0 0; font-size: 14px; }
.legal-links svg { width: 15px; height: 15px; color: var(--muted); }
.legal-links a { color: inherit; font-weight: 650; }
.role-pick .chk { padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: 14px; }
.role-pick .chk:has(input:checked) { border-color: var(--text); background: var(--accent-soft); }
pre.cred { margin: 0; padding: 14px; border-radius: 12px; background: var(--code-bg); font-size: 13px; white-space: pre-wrap; user-select: all; }

/* --- Mobil a tablet: horná lišta, tabuľky ako karty ----------------------------- */

@media (max-width: 900px) {
  .topbar { flex-wrap: wrap; height: auto; padding: 12px 16px 0; row-gap: 8px; }
  .topnav { order: 10; flex: 0 0 calc(100% + 32px); margin: 0 -16px; padding: 0 16px 10px; overflow-x: auto; scrollbar-width: none; }
  .topnav::-webkit-scrollbar { display: none; }
  .warn-bar { margin: 0 16px; }
  .dash-main { padding: 18px 16px 64px; }
  .dash-head h1 { font-size: 34px; }
  .dash-head p { font-size: 15px; }
}
@media (max-width: 640px) {
  .topbar .icon-btn { width: 38px; height: 38px; }
  .user-menu .user-chip .avatar { width: 38px; height: 38px; }
  .user-menu .menu { right: -4px; }
  .dash-actions { width: 100%; }
  .dash-actions .btn, .dash-actions select.pill-select { flex: 1 1 auto; }
  .search-pill { margin-left: 0; flex: 1 1 100%; order: -1; }

  .table-wrap { overflow: visible; background: transparent; border-radius: 0; }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl thead { display: none; }
  .tbl tr { margin-bottom: 12px; padding: 14px 16px; background: var(--panel); border-radius: 18px; }
  .tbl tbody tr:hover td { background: transparent; }
  .tbl td { padding: 3px 0; border: 0; text-align: left; }
  .tbl td:first-child { padding-bottom: 8px; }
  .tbl td[data-label]::before { content: attr(data-label); display: inline-block; min-width: 118px; color: var(--faint); font-size: 12px; }
  .tbl td.row-actions { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 10px; margin-top: 6px; border-top: 1px solid var(--border); text-align: left; }
  .tbl td.row-actions:empty { display: none; }
  .tbl .sites-cell .chip { max-width: 100%; }

  .modal-backdrop { padding: 10px; }
  .modal { border-radius: 20px; }
  .modal-head { padding: 18px 12px 4px 18px; }
  .modal-body { padding: 8px 18px 4px; }
  .modal-body:last-child { padding-bottom: 18px; }
  .modal-foot { padding: 14px 18px 18px; border-radius: 0 0 20px 20px; }
}
.field select.in { height: auto; padding: 11px 14px; font-size: inherit; background: var(--panel); border-radius: 12px; }

/* --- Súbežná práca: kto je v editore ------------------------------------------ */

.peers { display: flex; align-items: center; margin-right: 4px; }
.peers[hidden] { display: none; }
.peer {
  display: inline-grid; place-items: center; width: 26px; height: 26px; margin-left: -6px; border-radius: 50%;
  background: var(--c, var(--faint)); color: #fff; font-size: 11.5px; font-weight: 700; text-transform: uppercase;
  border: 2px solid var(--panel); cursor: default;
}
.peer:first-child { margin-left: 0; }
.peer.more { background: var(--panel-2); color: var(--muted); font-size: 10.5px; }
.peer.typing { box-shadow: 0 0 0 2px var(--c); animation: peer-pulse 1.4s ease-in-out infinite; }
@keyframes peer-pulse { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--c) 30%, transparent); } }
.peer-note { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--c) 15%, transparent); color: var(--text); font-size: 11.5px; font-weight: 500; }
.peer-note::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.insp-peer { display: grid; gap: 4px; }
.insp-peer span { display: flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 6px; background: color-mix(in srgb, var(--c) 12%, transparent); font-size: 12px; }
.insp-peer i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }

/* --- CRM: zoznam a šablóny ---------------------------------------------------- */

.crm-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.crm-cover {
  position: relative; display: flex; flex-direction: column; gap: 14px; aspect-ratio: 16 / 10; padding: 22px 22px 52px;
  border-radius: 16px; overflow: hidden; text-decoration: none;
  background: color-mix(in srgb, var(--tint, #e4ebe1) var(--tint-k), var(--panel-2)); color: var(--cover-text);
  box-shadow: var(--thumb-shadow); transition: transform .18s ease, box-shadow .18s ease;
}
/* V tmavom režime pastelové odtiene stmavené, s výraznejšou farbou (bez podpory ostane zmes s panelom). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) :is(.crm-cover, .tpl-card:not(.blank)) { background: oklch(from var(--tint, #888888) 0.31 calc(c * 2.4) h); }
}
:root[data-theme="dark"] :is(.crm-cover, .tpl-card:not(.blank)) { background: oklch(from var(--tint, #888888) 0.31 calc(c * 2.4) h); }
.crm-cover .ini { font-size: 34px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.crm-cover .tables { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 6px; min-height: 0; overflow: hidden; }
.crm-cover .tables span { padding: 4px 10px; border-radius: 999px; background: var(--cover-pill); font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.crm-cover .status { left: 12px; bottom: 12px; }

.tpl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.tpl-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-height: 196px; padding: 22px;
  border: 0; border-radius: var(--radius-lg); text-align: left; cursor: pointer;
  background: color-mix(in srgb, var(--tint, #ffffff) var(--tint-k), var(--panel-2)); color: var(--cover-text);
  transition: transform .15s ease, box-shadow .15s ease;
}
.tpl-card:hover { transform: translateY(-2px); box-shadow: var(--thumb-shadow); }
.tpl-card:disabled { opacity: .5; cursor: default; transform: none; box-shadow: none; }
.tpl-card.blank { background: var(--panel); box-shadow: inset 0 0 0 1px var(--border-strong); }
.tpl-card .mk { font-size: 28px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.tpl-card b { font-size: 17px; font-weight: 800; letter-spacing: -0.01em; }
.tpl-card small { font-size: 13.5px; line-height: 1.5; opacity: .78; }
.tpl-card .go { margin-top: auto; font-size: 13px; font-weight: 800; }
.tpl-pick { display: grid; gap: 8px; }
.tpl { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: 14px; cursor: pointer; }
.tpl input { margin-top: 3px; accent-color: var(--accent); }
.tpl small { display: block; color: var(--muted); font-weight: 400; }
.tpl:has(input:checked) { border-color: var(--text); background: var(--accent-soft); }

/* --- Prehľad (domov) ------------------------------------------------------------ */

.stats { margin: 4px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; }
.stat { min-width: 0; padding-top: 16px; border-top: 2px solid var(--text); }
.stat dt { font-size: 13px; font-weight: 700; color: var(--muted); }
.stat dd { margin: 0; }
.stat .v { margin-top: 6px; font-size: 40px; line-height: 1.1; font-weight: 800; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.stat .note { margin-top: 3px; font-size: 13px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.home-cols { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.card { min-width: 0; padding: 22px 24px 10px; border-radius: var(--radius-lg); background: var(--panel); }
.card > h2 { margin: 0 0 10px; font-size: 18px; font-weight: 800; letter-spacing: -0.01em; }
.card-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 14px 0; border-top: 1px solid var(--border); }
.card-row .main { flex: 1 1 200px; min-width: 0; }
.card-row .main b { display: block; font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-row .main small { display: block; margin-top: 1px; font-size: 13px; color: var(--faint); }
.card-row .avatar { width: 32px; height: 32px; }
.card .none { margin: 0; padding: 14px 0 18px; border-top: 1px solid var(--border); color: var(--faint); font-size: 14px; }
.live-ic { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--tag); color: var(--live); }
.live-ic svg { width: 15px; height: 15px; }
@media (max-width: 900px) {
  .home-cols { grid-template-columns: minmax(0, 1fr); }
  .stat .v { font-size: 34px; }
  .section { margin-top: 40px; }
}

/* --- Nastavenia ------------------------------------------------------------------- */

.settings { display: grid; gap: 22px; max-width: 880px; }
.set-card { min-width: 0; padding: 4px 28px 22px; border-radius: var(--radius-lg); background: var(--panel); }
.set-card > h2 { margin: 20px 0 4px; font-size: 18px; font-weight: 800; letter-spacing: -0.01em; }
.set-card > p { margin: 0 0 16px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.set-card .form { padding-top: 18px; border-top: 1px solid var(--border); }
.set-card .form > * { max-width: 480px; }
.set-card .form .btn { justify-self: start; height: 42px; padding: 0 18px; }
.set-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 16px 0; border-top: 1px solid var(--border); }
.set-row .lbl { flex: 1 1 280px; min-width: 0; }
.set-row .lbl b { display: block; font-weight: 750; }
.set-row .lbl small { display: block; margin-top: 2px; font-size: 13.5px; color: var(--faint); line-height: 1.45; }
.kv { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 12px 16px; margin: 0; padding: 18px 0 4px; border-top: 1px solid var(--border); font-size: 14px; }
.kv dt { color: var(--faint); }
.kv dd { margin: 0; min-width: 0; font-weight: 650; overflow-wrap: anywhere; }
.theme-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; padding-top: 18px; border-top: 1px solid var(--border); }
.theme-opt { position: relative; display: grid; gap: 10px; padding: 12px; border: 1px solid var(--border-strong); border-radius: 16px; font-weight: 700; cursor: pointer; }
.theme-opt:has(input:checked) { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.theme-opt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-opt input { position: absolute; opacity: 0; pointer-events: none; }
.theme-sw { height: 66px; border-radius: 10px; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .08); }
.theme-sw.light { background: linear-gradient(#f5f4f1 0 34%, #ffffff 34%); }
.theme-sw.dark { background: linear-gradient(#131312 0 34%, #1c1b19 34%); }
.theme-sw.auto { background: linear-gradient(90deg, #f5f4f1 0 50%, #131312 50%); }
.ok-dot, .bad-dot { display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: var(--ok); vertical-align: 1px; }
.bad-dot { background: var(--danger); }
.all-ok { margin: 0; padding: 16px 0 4px; border-top: 1px solid var(--border); font-weight: 650; }
.warn-list { list-style: none; margin: 0; padding: 16px 0 4px; border-top: 1px solid var(--border); display: grid; gap: 10px; }
.warn-list li { display: flex; gap: 10px; align-items: flex-start; color: var(--danger); font-weight: 650; }
.warn-list svg { margin-top: 2px; }
/* AI actions (identifiers keep "credit") */
.billing-form h3 { margin: 10px 0 0; font-size: 15px; font-weight: 800; }
.billing-form > .table-wrap { max-width: none !important; }
.billing-grid { display: grid; align-items: start; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; max-width: none !important; }
.billing-tbl th, .billing-tbl td { padding: 8px 6px; }
.billing-tbl .in { width: 100%; min-width: 64px; height: 36px; }
.billing-tbl td:nth-child(2) .in { min-width: 110px; }
.cr-mini { padding-top: 6px; padding-bottom: 6px; }
.cr-mini .set-row { border-top: 0; }
.cr-balance { display: flex; align-items: baseline; gap: 10px; padding: 6px 0 18px; }
.cr-balance .v { font-size: 44px; font-weight: 850; letter-spacing: -0.03em; line-height: 1; }
.cr-balance span:last-child { color: var(--muted); font-weight: 650; }
.cr-balance.low .v, .cr-balance.low span:last-child { color: var(--danger); }
.cr-packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; padding-top: 18px; border-top: 1px solid var(--border); }
.cr-pack { display: grid; gap: 4px; padding: 16px; border: 1px solid var(--border-strong); border-radius: 16px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.cr-pack:hover:not(:disabled) { border-color: var(--text); }
.cr-pack:disabled { cursor: default; opacity: .75; }
.cr-pack b { font-size: 16px; font-weight: 800; }
.cr-pack span { font-size: 22px; font-weight: 850; letter-spacing: -0.02em; }
.cr-pack small { color: var(--faint); font-size: 12.5px; }
.err-text { color: var(--danger); }
.inv-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.cr-plan .btn { justify-self: start; margin-top: 6px; }
.cr-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; padding-top: 18px; border-top: 1px solid var(--border); }
.cr-plan { display: grid; align-content: start; gap: 6px; padding: 16px; border: 1px solid var(--border); border-radius: 16px; }
.cr-plan.on { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.cr-plan b { font-weight: 800; }
.cr-plan .price { font-size: 20px; font-weight: 850; letter-spacing: -0.02em; }
.cr-plan .price small { font-size: 12.5px; font-weight: 650; color: var(--faint); }
.cr-plan ul { margin: 4px 0 0; padding: 0; list-style: none; display: grid; gap: 3px; font-size: 13.5px; color: var(--muted); }
.cr-plan em { font-style: normal; font-size: 12.5px; font-weight: 750; }
.cr-h { margin: 4px 0 8px; font-size: 15px; font-weight: 800; }
.ai-export { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; padding: 14px 0; border-top: 1px solid var(--border); }
.ai-export .field { flex: 0 1 180px; }
.cr-list { list-style: none; margin: 0 0 12px; padding: 0; border-top: 1px solid var(--border); }
.cr-packages .cr-n { font-weight: 800; font-variant-numeric: tabular-nums; }
.cr-row { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.cr-what { min-width: 0; }
.cr-what b { display: block; font-weight: 700; }
.cr-what small { display: block; color: var(--faint); font-size: 13px; overflow-wrap: anywhere; }
.cr-n { flex: none; display: grid; justify-items: end; font-weight: 800; font-variant-numeric: tabular-nums; }
.cr-n.plus { color: var(--ok); }
.cr-n small { color: var(--faint); font-weight: 600; font-size: 12px; }
.none-row { margin: 0; padding: 16px 0 4px; border-top: 1px solid var(--border); color: var(--faint); }
.kv code, .set-card > p code { font-size: 12.5px; padding: 1px 6px; border-radius: 6px; background: var(--code-bg); }
.sys-warn { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px 14px; margin: 0 0 28px; padding: 16px 18px; border-radius: var(--radius-lg); background: var(--danger-soft); color: var(--danger); }
.sys-warn > svg { width: 20px; height: 20px; margin-top: 1px; }
.sys-warn > div { flex: 1 1 260px; min-width: 0; }
.sys-warn b { display: block; font-weight: 800; }
.sys-warn ul { margin: 4px 0 0; padding-left: 18px; font-size: 14px; }
@media (max-width: 640px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; }
  .stat .v { font-size: 30px; }
  .set-card { padding: 2px 18px 18px; }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .kv dd { margin-bottom: 10px; }
}

/* staviteľ */
.as-role {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 4px 0 10px;
  border: 1px solid var(--border); border-radius: 8px; color: var(--muted); font-size: 12.5px; white-space: nowrap;
}
.as-role select { border: 0; background: transparent; color: var(--text); font: inherit; font-weight: 600; max-width: 170px; cursor: pointer; }
.as-role svg { width: 15px; height: 15px; flex: none; }
#forms-btn .count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 800; }
/* State of publishing next to the Publish button: a status line with a pulsing dot (not a button look), so unpublished
   changes are hard to miss — red while visitors see an older version (or nothing), green when everything is live. */
.pub-state {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 4px; border: 0; background: none;
  color: var(--danger); font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.pub-state::before {
  content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); flex: none;
  animation: pub-pulse-red 1.8s ease-out infinite;
}
.pub-state.ok { color: var(--ok); }
.pub-state.ok::before { background: var(--ok); animation-name: pub-pulse-green; }
.pub-state:hover .pub-state-lbl { text-decoration: underline; text-underline-offset: 3px; }
@keyframes pub-pulse-red { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--danger) 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 8px transparent; } }
@keyframes pub-pulse-green { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 8px transparent; } }
@media (prefers-reduced-motion: reduce) { .pub-state::before { animation: none; } }
@media (max-width: 1100px) { .pub-state .pub-state-lbl { display: none; } }
/* Publish button: green, so it stands out from the other actions. */
#publish-btn.primary { background: var(--publish); border-color: var(--publish); color: #fff; }
#publish-btn.primary:hover { background: var(--publish-hover); border-color: var(--publish-hover); }
/* Push notifications in the settings */
.push-acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.push-devs { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 13px; }
.push-devs > b { display: block; margin-bottom: 6px; }
.push-dev { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; }
.push-dev small { display: block; color: var(--muted); font-size: 12px; }
.pub-pending { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; font-size: 13px;
  background: color-mix(in srgb, var(--warn) 10%, transparent); color: var(--text); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); }
.pub-pending svg { width: 16px; height: 16px; flex: none; margin-top: 1px; color: var(--warn); }
.pub-pending.ok { background: var(--ok-soft); border-color: transparent; }
.pub-pending.ok svg { color: var(--ok); }
.tag.warn { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); }
#publish-btn .count {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 2px;
  border-radius: 999px; background: rgb(255 255 255 / 24%); font-size: 11px; font-weight: 700;
}
.draft-banner {
  display: flex; align-items: center; gap: 8px; padding: 6px 14px; flex: none;
  background: var(--accent-soft); color: var(--accent-text); font-size: 12.5px; border-bottom: 1px solid var(--border);
}
.draft-banner svg { width: 14px; height: 14px; flex: none; }
.crm-builder .preview-pane { display: flex; flex-direction: column; }
.crm-builder .stage { flex: 1; }

.structure { display: none; flex: 1; min-height: 0; overflow-y: auto; padding: 14px 16px 20px; font-size: 13px; }
.chat-pane[data-view="structure"] #structure { display: block; }
.chat-pane[data-view="structure"] .chat-log,
.chat-pane[data-view="structure"] .composer,
.chat-pane[data-view="structure"] #reset-chat { display: none; }
.chat-pane[data-view="look"] .structure#look { display: block; }
.chat-pane[data-view="loyalty"] .structure#loyalty { display: block; }
.chat-pane[data-view="look"] .chat-log,
.chat-pane[data-view="look"] .composer,
.chat-pane[data-view="look"] #reset-chat,
.chat-pane[data-view="loyalty"] .chat-log,
.chat-pane[data-view="loyalty"] .composer,
.chat-pane[data-view="loyalty"] #reset-chat { display: none; }
.chat-pane[data-view="access"] .structure#access { display: block; }
/* publish dialog: carry over data from the draft */
.pub-data { margin: 12px 0 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; }
.pub-data summary { cursor: pointer; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.pub-data summary svg { width: 15px; height: 15px; }
.pub-data .hint { margin: 8px 0; }
.pub-data-list { display: grid; gap: 4px; max-height: 320px; overflow: auto; }
.chat-pane[data-view="access"] .chat-log,
.chat-pane[data-view="access"] .composer,
.chat-pane[data-view="access"] #reset-chat { display: none; }
/* CRM → Access: sign-ins of the live CRM */
.acc-addr { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 6px; }
.acc-addr code { overflow-wrap: anywhere; }
.acc-list { list-style: none; margin: 8px 0 12px; padding: 0; display: grid; gap: 6px; }
.acc-user { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; padding: 9px 10px; border: 1px solid var(--border); border-radius: 10px; }
.acc-user.off { opacity: .6; }
.acc-name { display: flex; flex-direction: column; min-width: 0; }
.acc-name b, .acc-name small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-name small { color: var(--muted); }
.acc-meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 10px; color: var(--muted); font-size: 12px; }
.acc-tag { display: inline-flex; align-items: center; gap: 4px; padding: 0 7px; border-radius: 999px; background: var(--surface-2, rgba(0,0,0,.05)); font-size: 11.5px; font-weight: 600; color: var(--text); }
.acc-tag.warn { background: color-mix(in srgb, #d97706 16%, transparent); color: #92400e; }
.acc-tag.ok { background: color-mix(in srgb, #16a34a 14%, transparent); color: #166534; }
.acc-acts { display: flex; gap: 2px; }
.acc-sub { margin: 4px 0 10px; }
.acc-sub-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.acc-sub-row input { flex: 1 1 140px; min-width: 0; height: 32px; padding: 0 9px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); color: var(--text); font: inherit; }
.acc-pre, .acc-suf { color: var(--muted); font-size: 12.5px; }
/* CRM → Access → own domain: one card per domain with the DNS instructions */
.cdom-card { margin: 10px 0; padding: 12px 14px; border: 1px solid var(--border); border-left: 4px solid #d97706; border-radius: 12px; background: color-mix(in srgb, #d97706 5%, var(--panel)); }
.cdom-card.cert { border-left-color: #2563eb; background: color-mix(in srgb, #2563eb 5%, var(--panel)); }
.cdom-card.ok { border-left-color: #16a34a; background: color-mix(in srgb, #16a34a 5%, var(--panel)); }
.cdom-head { display: flex; align-items: flex-start; gap: 8px; }
.cdom-title { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; flex: 1; min-width: 0; }
.cdom-head b { font-size: 14px; overflow-wrap: anywhere; }
.cdom-head .icon-btn { flex: none; margin-top: -4px; }
.cdom-card > .btn { display: inline-flex; width: auto; }
.cdom-badge { padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; background: color-mix(in srgb, #d97706 18%, transparent); color: #92400e; }
.cdom-badge.cert { background: color-mix(in srgb, #2563eb 16%, transparent); color: #1e40af; }
.cdom-badge.ok { background: color-mix(in srgb, #16a34a 16%, transparent); color: #166534; }
.cdom-steps { margin: 10px 0 10px; padding-left: 20px; display: grid; gap: 8px; font-size: 13px; }
.cdom-steps li::marker { font-weight: 700; color: var(--muted); }
.dns-rec { width: 100%; margin: 6px 0 4px; border-collapse: separate; border-spacing: 0; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; background: var(--panel); font-size: 12.5px; }
.dns-rec th { white-space: nowrap; padding: 6px 8px; text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--hover); }
.dns-rec td { padding: 6px 8px; border-top: 1px solid var(--border); vertical-align: middle; }
.dns-rec code { font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.dns-rec td:first-child { width: 1%; }
.dns-val { display: inline-flex; align-items: center; gap: 2px; }
.dns-copy { width: 26px; height: 26px; }
.cdom-warn { color: #92400e; font-weight: 600; }
.cdom-good, .cdom-live { color: #166534; font-weight: 600; }
.cdom-warn svg, .cdom-good svg, .cdom-live svg { width: 14px; height: 14px; vertical-align: -2px; }
.cdom-live, .cdom-main { margin: 8px 0 0; }
.cdom-add { margin-top: 12px; }
:root[data-theme="dark"] .cdom-badge, :root[data-theme="dark"] .cdom-warn { color: #fbbf24; }
:root[data-theme="dark"] .cdom-badge.cert { color: #93c5fd; }
:root[data-theme="dark"] .cdom-badge.ok, :root[data-theme="dark"] .cdom-good, :root[data-theme="dark"] .cdom-live { color: #4ade80; }
.acc-role { max-width: 150px; height: 30px; padding: 0 6px; font-size: 12.5px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); color: var(--text); }
.acc-pop { min-width: 250px; padding: 6px; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); }
.acc-pop > button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 9px; background: none; color: var(--text); font: inherit; font-size: 13px; font-weight: 600; text-align: left; cursor: pointer; }
.acc-pop > button:hover, .acc-pop > button:focus-visible { background: var(--hover); }
.acc-pop svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.look .field { display: grid; gap: 5px; margin: 0 0 10px; }
.look .field > span { font-size: 12.5px; color: var(--muted); }
.look input[type="range"] { width: 100%; accent-color: var(--accent); }
.look .chk { display: inline-flex; margin: 2px 14px 6px 0; font-size: 12.5px; }
.lk-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 0 0 10px; }
.lk-row > span { font-size: 12.5px; color: var(--muted); }
.lk-seg { flex-wrap: wrap; }
.lk-color { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 8px; font-size: 12.5px; }
.lk-cin { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.lk-cin input[type="color"] { width: 30px; height: 30px; padding: 0; border: 1px solid var(--border-strong); border-radius: 8px; background: none; cursor: pointer; }
.lk-cin input[type="color"]::-webkit-color-swatch-wrapper { padding: 2px; }
.lk-cin input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 5px; }
.lk-cin .in { width: 92px; height: 30px; font: 12px var(--mono, ui-monospace, monospace); }
.lk-img { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 12px; }
.lk-img b { font-size: 13px; }
.lk-img .xp-actions { margin: 6px 0 4px; display: flex; gap: 6px; flex-wrap: wrap; }
.lk-img .hint { margin: 0; }
.lk-thumb { flex: none; width: 64px; height: 64px; display: grid; place-items: center; border: 1px dashed var(--border-strong); border-radius: 10px; background: var(--panel-2) center / contain no-repeat; font-size: 11px; color: var(--faint); }
.lk-dark { margin: 4px 0 6px; }
.lk-dark summary { cursor: pointer; font-size: 12.5px; color: var(--muted); margin: 0 0 8px; }
.lk-icons { display: grid; gap: 6px; }
.lk-icon { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; }
.lk-icon > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lk-icon select { width: 150px; flex: none; height: 30px; }
.lk-actions { position: sticky; bottom: -20px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 18px -16px 0; padding: 12px 16px; background: var(--panel); border-top: 1px solid var(--border); }
.lk-warnings { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--warn, #d97706); border-radius: 10px; font-size: 12.5px; }
.lk-warnings p { display: flex; gap: 6px; margin: 0 0 4px; }
.lk-warnings svg { flex: none; width: 14px; height: 14px; margin-top: 2px; }
.structure h4 { margin: 18px 0 8px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.structure .hint { font-size: 12.5px; }
.st-entity { padding: 10px 12px; margin-bottom: 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--panel-2); }
.st-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.st-fields { display: flex; flex-wrap: wrap; gap: 5px; }
.st-field { display: inline-flex; align-items: baseline; gap: 5px; padding: 2px 8px; border-radius: 6px; background: var(--panel); border: 1px solid var(--border); font-size: 12px; }
.st-field small { color: var(--faint); font-size: 11px; }
.st-retention { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; }
.st-retention svg { width: 14px; height: 14px; }
.st-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.st-list li { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.st-list li span { font-weight: 600; }
.st-list li small { flex: 1; min-width: 0; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.structure button.link, .st-head button.link {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 6px; border: 0; border-radius: 5px; background: none;
  color: var(--accent-text); font: inherit; font-size: 12px; cursor: pointer; white-space: nowrap;
}
.structure button.link:hover { background: var(--accent-soft); }
.structure button.link svg { width: 13px; height: 13px; }
.st-logo { display: flex; align-items: flex-start; gap: 14px; }
.st-logo img { width: 56px; height: 56px; object-fit: contain; border-radius: 12px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--border); }
.st-logo-empty { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 12px; background: var(--panel-2); color: var(--faint); font-size: 10.5px; text-align: center; line-height: 1.2; padding: 4px; }
.auto-log li { align-items: flex-start; flex-wrap: wrap; }
.auto-log li small { white-space: normal; flex-basis: 100%; }
.auto-log li.err small { color: var(--danger); }
.st-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

.plan-list { list-style: none; margin: 8px 0 14px; padding: 0; display: grid; gap: 4px; max-height: 300px; overflow-y: auto; }
.plan-list li { display: flex; align-items: flex-start; gap: 8px; padding: 7px 10px; border-radius: var(--radius-sm); background: var(--panel-2); font-size: 13px; }
.plan-list li svg { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--accent-text); }
.plan-list li.danger { background: var(--danger-soft); color: var(--danger); }
.plan-list li.danger svg { color: var(--danger); }
.chk.confirm { padding: 10px 12px; border: 1px solid var(--danger); border-radius: var(--radius-sm); align-items: flex-start; }
.secret-row { display: flex; align-items: center; gap: 8px; }
.secret { flex: 1; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--code-bg); font-family: var(--mono); font-size: 16px; letter-spacing: .04em; user-select: all; }
.modal-head h2 svg { width: 18px; height: 18px; color: var(--ok); vertical-align: -3px; }
@media (max-width: 900px) {
  .as-role { height: 30px; }
  .as-role select { max-width: 110px; }
}

/* iPhone priblíži stránku, keď ťukneš do poľa s písmom menším ako 16 px — na dotykových
   zariadeniach majú preto všetky polia 16 px. */
@media (pointer: coarse) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]), select, textarea { font-size: 16px !important; }
}

/* --- Formuláre webu (plugin): schránka a nastavenia ------------------------------ */

.forms-modal { width: min(720px, 100%); }
.forms-modal .modal-body { padding-bottom: 24px; }
.fm-tabs { margin-bottom: 18px; }
.fm-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.fm-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.fm-msg { border-bottom: 1px solid var(--border); }
.fm-head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 4px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.fm-head:hover { background: var(--panel-2); }
.fm-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: transparent; }
.fm-msg.unread .fm-dot { background: var(--live); }
.fm-msg.unread .fm-main b { font-weight: 800; }
.fm-main { flex: 1; min-width: 0; }
.fm-main b { display: block; font-weight: 650; }
.fm-main small { display: block; color: var(--faint); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-detail { padding: 0 4px 16px 24px; }
.fm-files { display: flex; flex-wrap: wrap; gap: 6px; }
.fm-files .btn { font-weight: 500; max-width: 100%; height: auto; min-height: 30px; white-space: normal; overflow-wrap: anywhere; text-align: left; } /* long file names wrap instead of leaving the dialog on phones */
.fm-detail .kv { border-top: 0; padding-top: 4px; grid-template-columns: 130px minmax(0, 1fr); }
.fm-detail .kv dd.bad { color: var(--danger); }
.fm-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.fm-form { padding: 18px 0 22px; border-top: 1px solid var(--border); }
.fm-form:first-child { border-top: 0; padding-top: 4px; }
.fm-form-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.fm-form-head h3 { margin: 0; font-size: 17px; font-weight: 800; }
.fm-form-head small { color: var(--faint); font-size: 13px; }
.fm-form .form .btn.primary { justify-self: start; }
.fm-crm { display: flex; flex-wrap: wrap; gap: 8px; }
.fm-crm select { flex: 1 1 200px; width: auto; height: 40px; border-radius: 12px; }
.fm-map { display: grid; gap: 8px; margin-top: 10px; padding: 12px 14px; border-radius: 12px; background: var(--panel-2); }
.fm-map small { color: var(--muted); }
.fm-map-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: center; gap: 10px; font-size: 13.5px; }
.fm-map-row select { height: 36px; border-radius: 10px; }
@media (max-width: 640px) {
  .fm-detail { padding-left: 4px; }
  .fm-detail .kv { grid-template-columns: minmax(0, 1fr); }
  .fm-map-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}

/* --- Záznam aktivity ---------------------------------------------------------- */
.audit-row .avatar { width: 30px; height: 30px; font-size: 11px; }
.audit-text { display: block; line-height: 1.45; overflow-wrap: anywhere; }
.audit-row .main b { display: inline; }
.audit-row.fail .audit-text { color: var(--danger); }
.act-day { margin: 18px 0 2px; font-size: 12.5px; font-weight: 800; color: var(--muted); }
.act-filter { margin: 4px 0 6px; }
#act-more { margin-top: 14px; }
.act-sub { margin: 14px 0 2px; font-size: 13px; font-weight: 700; color: var(--muted); }

/* --- Dvojfaktorové overenie ---------------------------------------------------- */
.tfa-steps { margin: 0 0 14px; padding-left: 20px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.tfa-qr { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin: 0 0 16px; }
.tfa-qr img { flex: none; width: 190px; height: 190px; padding: 8px; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1px var(--border); }
.tfa-qr div { flex: 1 1 180px; display: grid; gap: 6px; }
.tfa-qr small { color: var(--faint); }
.tfa-secret { padding: 8px 10px; border-radius: 10px; background: var(--code-bg); font-size: 13px; letter-spacing: .04em; overflow-wrap: anywhere; user-select: all; }
.tfa-codes { font-size: 15px; letter-spacing: .06em; line-height: 1.8; }
.state.ok { background: var(--ok-soft); color: var(--ok); }
.switch { flex: none; width: 50px; height: 30px; padding: 4px; border: 0; border-radius: 999px; background: var(--border-strong); cursor: pointer; display: flex; transition: background .15s; }
.switch span { width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .2); transition: transform .15s; }
.switch[aria-checked="true"] { background: var(--accent); }
.switch[aria-checked="true"] span { transform: translateX(20px); background: var(--on-accent); }

/* Staviteľ štruktúry CRM */
.st-tools { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
button.st-field { cursor: pointer; font: inherit; font-size: 12px; color: var(--text); }
button.st-field:hover { border-color: var(--border-strong); background: var(--hover); }
.st-field.is-title { border-color: var(--text); }
.st-field.dragging { opacity: .45; }
#st-new-entity { margin: 2px 0 6px; }
.st-del { margin-right: auto; }
.fe-sect { display: grid; gap: 8px; }
.fe-label { font-size: 13px; font-weight: 700; }
.fe-flags { display: grid; gap: 8px; }
.opt-list { display: grid; gap: 6px; }
.opt-row { display: flex; align-items: center; gap: 6px; }
.opt-row .opt-label { flex: 1; min-width: 0; padding: 7px 10px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--panel); color: var(--text); font: inherit; }
.opt-row .opt-color { padding: 6px 8px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--panel); color: var(--text); font: inherit; font-size: 13px; }
.opt-row .chk { font-size: 12.5px; white-space: nowrap; }
.st-impact { padding: 10px 12px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--border); font-size: 13px; }
.st-impact ul { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 3px; }
.st-impact p { margin: 0; }
.st-impact li.warn { color: var(--danger); }
.st-impact.err { border-color: color-mix(in srgb, var(--danger) 40%, transparent); color: var(--danger); }

/* Nový web: odkiaľ začať */
.src-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.src-pick label {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 10px;
  padding: 11px 12px; border: 1px solid var(--border-strong); border-radius: 14px; background: var(--panel); cursor: pointer;
  transition: border-color .12s, background .12s, box-shadow .12s;
}
.src-pick label:hover { border-color: var(--text); }
.src-pick input { position: absolute; opacity: 0; pointer-events: none; }
.src-pick .sp-ic { grid-row: span 2; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--panel-2); color: var(--muted); }
.src-pick .sp-ic svg { width: 17px; height: 17px; }
.src-pick .sp-t { font-size: 13.5px; font-weight: 700; color: var(--text); line-height: 1.25; }
.src-pick .sp-d { font-size: 12px; color: var(--faint); line-height: 1.3; }
.src-pick label:has(input:checked) { border-color: var(--text); box-shadow: 0 0 0 1px var(--text) inset; background: var(--accent-soft); }
.src-pick label:has(input:checked) .sp-ic { background: var(--accent); color: var(--on-accent); }
.src-pick label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 560px) { .src-pick { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Menu karty webu */
.site-card { position: relative; }
.card-more { margin-left: auto; width: 28px; height: 28px; flex: none; }
.card-more svg { width: 15px; height: 15px; }
.card-menu { position: absolute; right: 12px; bottom: 58px; z-index: 20; display: grid; min-width: 190px; padding: 6px; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg, 0 12px 32px rgb(0 0 0 / 16%)); }
.card-menu button { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border: 0; border-radius: 9px; background: none; color: var(--text); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; }
.card-menu button:hover { background: var(--hover); }
.card-menu button.danger { color: var(--danger); }
.card-menu svg { width: 15px; height: 15px; }
.trash-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.trash-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; }
.trash-list small { display: block; color: var(--faint); font-size: 12px; }

/* Poznámky webu */
.modal:has(.notes-view) { width: min(860px, calc(100vw - 32px)); }
.notes-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 10px; }
.notes-tabs button { padding: 6px 12px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--panel); color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.notes-tabs button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.notes-view { max-height: 55vh; overflow-y: auto; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--panel-2); font-size: 14px; line-height: 1.55; }
.notes-view pre { white-space: pre-wrap; margin: 0; font: inherit; }
.notes-view h1, .notes-view h2, .notes-view h3 { margin: 14px 0 6px; font-size: 15px; }
.notes-view input[type="checkbox"] { margin-right: 6px; }
.notes-edit { width: 100%; min-height: 50vh; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--panel); color: var(--text); font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; resize: vertical; }
.notes-actions { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.notes-view li:has(> input[type="checkbox"]) { list-style: none; margin-left: -18px; }

/* Pripomienky klienta */
.modal:has(.rv-links) { width: min(860px, calc(100vw - 32px)); }
.rv-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0 4px; }
.rv-head h3 { margin: 0; font-size: 15px; }
.rv-comments { margin-top: 18px; }
.rv-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; max-height: 42vh; overflow-y: auto; }
.rv-list li { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; }
.rv-list li.off { opacity: .6; }
.rv-list li.empty { color: var(--faint); font-size: 13.5px; border-style: dashed; }
.rv-main { min-width: 0; display: grid; gap: 4px; }
.rv-main small { color: var(--faint); font-size: 12px; }
.rv-main code { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.rv-main p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.rv-main q { display: block; padding: 3px 8px; border-left: 3px solid var(--border-strong); color: var(--muted); font-size: 12.5px; quotes: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-meta { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.rv-reply { padding: 6px 10px; border-radius: 10px; background: var(--panel-2); font-size: 13px; }
.rv-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; flex: none; max-width: 52%; }
/* private zone (zoneModal) */
.zn-sec { margin-top: 14px; }
.zn-rule { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.zn-path { flex: 1 1 200px; min-width: 0; padding: 7px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); color: var(--text); font: inherit; font-size: 14px; }
.zn-chips { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13.5px; }
.zn-groups { margin-top: 10px; }
.zn-save { display: flex; justify-content: flex-end; margin-top: 8px; }
.rv-new.zn-new { grid-template-columns: 1fr 1fr; }
.zn-new .chk, .zn-new > .field:nth-child(3), .zn-new > .hint { grid-column: 1 / -1; }
.zn-new #zn-create { justify-self: start; }
.zn-edit { display: grid; gap: 8px; flex: 1; }
#zn-live .insp-note { margin: 8px 0 0; padding: 10px 12px; border-radius: 10px; font-size: 13.5px; }
.rv-new { display: grid; grid-template-columns: 1fr 1fr 140px auto; gap: 10px; align-items: end; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--panel-2); margin: 8px 0; }
@media (max-width: 700px) { .rv-new { grid-template-columns: 1fr; } .rv-list li { flex-direction: column; } .rv-acts { max-width: none; justify-content: flex-start; } }

/* Šablóny zadaní */
.composer { position: relative; }

/* Audit webu */
.modal:has(#au-body) { width: min(820px, calc(100vw - 32px)); }
.au-spin { width: 28px; height: 28px; margin: 18px auto; border: 3px solid var(--border); border-top-color: var(--text); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.au-scores { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 8px; }
.au-score { display: grid; gap: 2px; justify-items: center; padding: 12px 8px; border: 1px solid var(--border); border-radius: 14px; background: var(--panel-2); color: var(--text); font: inherit; cursor: pointer; }
.au-score b { font-size: 26px; line-height: 1; letter-spacing: -.02em; }
.au-score span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.au-score.ok b { color: var(--ok, #1a7f37); }
.au-score.mid b { color: #b45309; }
.au-score.bad b { color: var(--danger); }
.au-score.on { border-color: var(--text); box-shadow: 0 0 0 1px var(--text); }
.au-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; max-height: 50vh; overflow-y: auto; }
.au-list li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px; border: 1px solid var(--border); border-radius: 12px; font-size: 13.5px; }
.au-list li > div { display: grid; gap: 2px; min-width: 0; }
.au-list li small { color: var(--faint); font-size: 12px; overflow-wrap: anywhere; }
.au-list .au-fix { color: var(--muted); }
.au-sev { flex: none; min-width: 84px; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; text-align: center; background: var(--panel-2); color: var(--muted); }
.au-list li.err .au-sev { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.au-list li.warn .au-sev { background: color-mix(in srgb, #b45309 14%, transparent); color: #b45309; }
.au-list li.empty { color: var(--faint); border-style: dashed; }
@media (max-width: 600px) { .au-scores { grid-template-columns: repeat(2, 1fr); } }
.flip-x svg { transform: scaleX(-1); }

/* Popisy tlačidiel v lište editora len na širokých obrazovkách (inak ikona + title) */
@media (max-width: 1379px) { .ed-bar .lbl-wide { display: none; } }
@media (max-width: 1180px) { .ed-bar > .bar-right > [data-action="theme"] { display: none; } }
@media (max-width: 1240px) {
  .ed-bar .mode-btn span { display: none; }
  .ed-bar .page-picker select { max-width: 160px; }
  .ed-bar .site-title { max-width: 140px; }
}
.bar-left { overflow: hidden; }

/* Mobil: inšpektor ako spodný panel nad náhľadom */
.sheet-close { display: none; margin-left: auto; }
@media (max-width: 900px) {
  .editor[data-sheet="open"][data-pane="preview"] .preview-pane { padding-bottom: 58dvh; }
  .editor[data-sheet="open"][data-pane="preview"] .preview-foot { display: none; }
  .editor[data-sheet="open"][data-pane="preview"] .chat-pane {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; height: 58dvh;
    border-top: 1px solid var(--border); border-radius: 20px 20px 0 0; box-shadow: 0 -14px 36px rgb(0 0 0 / 18%);
    animation: sheet-up .18s ease-out;
  }
  .editor[data-sheet="open"][data-pane="preview"] .chat-head { position: relative; padding-top: 14px; }
  .editor[data-sheet="open"][data-pane="preview"] .chat-head::before { content: ''; position: absolute; top: 6px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: var(--border-strong); }
  .editor[data-sheet="open"][data-pane="preview"] .chat-head .tabs,
  .editor[data-sheet="open"][data-pane="preview"] #audit-btn,
  .editor[data-sheet="open"][data-pane="preview"] #reset-chat { display: none; }
  .editor[data-sheet="open"][data-pane="preview"] .sheet-close { display: inline-grid; }
  .editor[data-sheet="open"][data-pane="preview"] .sel-bar { bottom: calc(58dvh + 8px); }
}
@keyframes sheet-up { from { transform: translateY(40%); opacity: .4; } }

/* Porovnanie verzií */
.modal:has(.cmp-view) { width: min(1200px, calc(100vw - 32px)); }
.cmp-tabs { display: flex; gap: 6px; align-items: center; margin: 4px 0 10px; }
.cmp-tabs button { padding: 6px 12px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--panel); color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.cmp-tabs button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.cmp-tabs select { margin-left: auto; padding: 6px 10px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--panel); color: var(--text); font: inherit; font-size: 13px; }
.cmp-view { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cmp-view figure { margin: 0; display: grid; gap: 6px; }
.cmp-view figcaption { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.cmp-view iframe { width: 100%; height: 58vh; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.cmp-code { max-height: 62vh; overflow-y: auto; display: grid; gap: 8px; }
.cmp-code details { border: 1px solid var(--border); border-radius: 12px; padding: 8px 12px; }
.cmp-code summary { cursor: pointer; font-size: 13.5px; }
.cmp-code summary small { color: var(--faint); margin-left: 6px; }
.cmp-code pre { margin: 8px 0 0; padding: 10px; border-radius: 8px; background: var(--panel-2); font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 50vh; overflow-y: auto; }
.cmp-code .add { color: #1a7f37; } .cmp-code pre .add { display: block; background: color-mix(in srgb, #1a7f37 10%, transparent); }
.cmp-code .del { color: var(--danger); } .cmp-code pre .del { display: block; background: color-mix(in srgb, var(--danger) 10%, transparent); }
.cmp-code pre .hunk { display: block; color: var(--faint); }
@media (max-width: 800px) { .cmp-view { grid-template-columns: 1fr; } .cmp-view iframe { height: 40vh; } }
.cmp-code pre span { display: block; min-height: 1.5em; }
.insp-state { margin-top: -4px; }

/* Nasadenie na hosting */
.xp-dep { margin: 8px 0; border: 1px solid var(--border); border-radius: 12px; padding: 8px 12px; }
.xp-dep summary { cursor: pointer; font-weight: 600; font-size: 13.5px; }
.xp-grid { display: grid; grid-template-columns: 140px 1fr 90px; gap: 8px 10px; margin: 10px 0; }
.xp-grid .field:nth-child(4), .xp-grid .field:nth-child(5) { grid-column: span 1; }
.xp-grid .field:nth-child(6) { grid-column: 1 / -1; }
.in-inline { display: inline-block; width: 200px; padding: 4px 8px; margin-left: 4px; }
@media (max-width: 600px) { .xp-grid { grid-template-columns: 1fr; } }

/* Zbierky */
.modal:has(.coll-list) { width: min(760px, calc(100vw - 32px)); }
.coll-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.coll-tabs button { padding: 6px 12px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--panel); color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.coll-tabs button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.coll-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; max-height: 56vh; overflow-y: auto; }
.coll-list li { border: 1px solid var(--border); border-radius: 12px; }
.coll-list li.off { opacity: .6; }
.coll-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; }
.coll-row img { width: 40px; height: 40px; object-fit: cover; border-radius: 8px; flex: none; }
.coll-row b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.coll-row small { color: var(--faint); font-size: 12px; }
.coll-acts { display: flex; gap: 2px; flex: none; }
.coll-form { display: grid; gap: 10px; padding: 4px 12px 12px; }
.coll-img { display: flex; gap: 6px; }
.coll-img .in { flex: 1; }
.flip-y svg { transform: scaleY(-1); }
#st-integrations .st-list { margin-bottom: 6px; }
#st-integrations .st-list li { flex-wrap: wrap; align-items: flex-start; }
#st-integrations .st-list li span { display: inline-flex; align-items: center; gap: 6px; }
#st-integrations .st-list li span svg { width: 14px; height: 14px; flex: none; color: var(--muted); }
#st-integrations .st-list li small { white-space: normal; flex-basis: 100%; overflow-wrap: anywhere; }
#st-integrations .st-list li.err small { color: var(--danger); }
#st-integrations button.link svg { width: 12px; height: 12px; }
.st-warn { display: flex; gap: 6px; align-items: flex-start; color: var(--danger); }
.st-warn svg { flex: none; width: 14px; height: 14px; margin-top: 2px; }

/* Plynulé obnovenie náhľadu: nový iframe sa prelne cez starý, loader len keď to trvá. */
.device iframe.frame-next { position: absolute; inset: 0; opacity: 0; transition: opacity .2s ease; }
.device iframe.frame-next.in { opacity: 1; }
.frame-loader {
  position: absolute; left: 50%; bottom: 18px; z-index: 5; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 10px;
  border-radius: 999px; background: color-mix(in srgb, var(--panel) 92%, transparent); color: var(--muted);
  font-size: 12.5px; box-shadow: var(--shadow-sm); border: 1px solid var(--border);
  backdrop-filter: blur(6px); pointer-events: none; animation: fade .2s ease;
}
.frame-loader[hidden] { display: none; }
.frame-spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--accent) 25%, transparent); border-top-color: var(--accent); animation: spin .7s linear infinite; }
@media (prefers-reduced-motion: reduce) {
  .device iframe.frame-next { transition: none; }
  .frame-spin { animation-duration: 2s; }
}

/* A website being drawn while the agent builds a new one (buildAnim in app.js). Sizes inside the window are in
   cqw of the window, so the sketch scales as one picture from a phone to a wide screen. */
.build-anim {
  position: absolute; inset: 0; z-index: 4; container-type: size;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 20px 16px;
  background-color: var(--canvas);
  background-image: radial-gradient(var(--canvas-dot) 1px, transparent 1px);
  background-size: 16px 16px;
  transition: opacity .35s ease; animation: fade .3s ease;
}
.build-anim[hidden] { display: none; }
.build-anim.out { opacity: 0; pointer-events: none; }
.stage.building .frame-loader { display: none; }
.ba-win {
  position: relative; container-type: inline-size; flex: none;
  width: min(560px, 100cqw - 32px, (100cqh - 110px) * 1.28);
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg);
}
.ba-chrome { display: flex; align-items: center; gap: 1.3cqw; height: 7cqw; padding: 0 2.6cqw; background: var(--panel-2); border-bottom: 1px solid var(--border); }
.ba-chrome > span { width: 1.7cqw; height: 1.7cqw; border-radius: 50%; background: var(--border-strong); }
.ba-page { display: flex; flex-direction: column; gap: 4.4cqw; padding: 4.4cqw 5cqw 5cqw; }
.ba-nav { display: flex; align-items: center; gap: 3cqw; }
.ba-links { display: flex; gap: 2.4cqw; margin-left: auto; }
.ba-hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 4.4cqw; align-items: center; }
.ba-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 1.9cqw; }
.ba-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3cqw; }
.ba-text { display: flex; flex-direction: column; gap: 1.7cqw; }

/* each part: a faint dashed guide, then the pencil inks it in from the left */
.ba-el {
  --fill: var(--border-strong); --ink: color-mix(in srgb, var(--text) 55%, transparent);
  position: relative; display: block; border-radius: 999px;
  outline: 1px dashed color-mix(in srgb, var(--border-strong) 80%, transparent); outline-offset: -1px;
}
.ba-el::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: var(--fill); box-shadow: inset 0 0 0 1.5px var(--ink);
  clip-path: inset(0 100% 0 0);
}
.ba-el.on::before { animation: ba-draw var(--d, .5s) cubic-bezier(.45,.05,.35,1) forwards, ba-ink .8s ease var(--d, .5s) forwards; }
@keyframes ba-draw { to { clip-path: inset(0); } }
@keyframes ba-ink { to { box-shadow: inset 0 0 0 1.5px transparent; } }
.ba-win.reset .ba-el::before { opacity: 0; transition: opacity .45s ease; }

.ba-url { flex: 1; height: 3.2cqw; margin-left: 2.4cqw; --fill: var(--hover); }
.ba-logo { width: 10cqw; height: 3.6cqw; border-radius: 1cqw; --fill: var(--accent); }
.ba-link { width: 7cqw; height: 1.6cqw; }
.ba-pill { width: 12cqw; height: 4.4cqw; --fill: var(--accent); }
.ba-h1 { width: 100%; height: 3.8cqw; border-radius: .9cqw; --fill: color-mix(in srgb, var(--text) 80%, transparent); }
.ba-h1.short { width: 72%; }
.ba-line { width: 100%; height: 1.6cqw; }
.ba-line.short { width: 62%; }
.ba-btn { width: 17cqw; height: 4.8cqw; margin-top: 1.2cqw; --fill: var(--accent); }
.ba-img {
  height: 25cqw; border-radius: 1.8cqw; display: grid; place-items: center;
  --fill: linear-gradient(135deg, var(--auth-glow-1), var(--auth-glow-2)), var(--accent-soft);
}
.ba-img svg { position: relative; width: 42%; fill: none; stroke: var(--faint); stroke-width: 1.6; stroke-linejoin: round; opacity: 0; }
.ba-img.on svg { animation: ba-show .5s ease var(--d, .5s) forwards; }
.ba-win.reset .ba-img svg { opacity: 0; animation: none; }
@keyframes ba-show { to { opacity: 1; } }

/* the cards are not drawn, they drop into place like bricks */
.ba-card { height: 14cqw; border-radius: 1.6cqw; --fill: var(--panel-2); --ink: var(--border-strong); }
.ba-card::before { clip-path: none; opacity: 0; }
.ba-card.on::before { opacity: 1; animation: ba-drop .55s cubic-bezier(.3,1.45,.5,1) both; }
@keyframes ba-drop { from { opacity: 0; transform: translateY(-55%); } }

.ba-pencil {
  position: absolute; left: 0; top: 0; z-index: 1; width: 22px; height: 22px; margin: -21px 0 0 -2px;
  fill: var(--panel); stroke: var(--text); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 2px 3px rgb(0 0 0 / .18)); opacity: 0; transition: opacity .3s ease; pointer-events: none;
}
.ba-pencil.on { opacity: 1; }

.ba-caption { display: flex; flex-direction: column; align-items: center; gap: 4px; max-width: min(560px, 100%); text-align: center; }
.ba-caption b { font-size: 14.5px; font-weight: 700; color: var(--text); }
.ba-step { max-width: 100%; min-height: 1.4em; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12.5px; color: var(--muted); transition: opacity .18s ease; }
.ba-step.swap { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .build-anim { transition: none; animation: none; }
  .ba-el::before, .ba-card::before { clip-path: none; opacity: 1; box-shadow: none; animation: none !important; }
  .ba-img svg { opacity: 1; animation: none !important; }
  .ba-pencil { display: none; }
  .ba-step { transition: none; }
}
.fm-protect .fm-form-head h3 { display: flex; align-items: center; gap: 8px; }
.fm-protect .fm-form-head h3 svg { width: 18px; height: 18px; }
.fm-checks { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 4px; font-size: 13.5px; }
.fm-checks li { display: flex; gap: 8px; align-items: flex-start; }
.fm-checks svg { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--accent); }
.fm-keys { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fm-protect-actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 640px) { .fm-keys { grid-template-columns: 1fr; } }
.usage-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 16px; }
.usage-tile { display: grid; gap: 4px; padding: 16px 18px; background: var(--panel); border-radius: var(--radius-lg); }
.usage-tile span { color: var(--faint); font-size: 12.5px; font-weight: 700; }
.usage-tile b { font-size: 24px; font-weight: 800; }
.usage-tile small { color: var(--muted); font-size: 12.5px; }
.usage-tbl td.usage-text { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.usage-tbl tr.err td { color: var(--danger); }
@media (max-width: 760px) { .usage-tiles { grid-template-columns: 1fr; } }
.usage-tbl td:nth-child(1), .usage-tbl td:nth-child(n+5) { white-space: nowrap; }
.err-filter { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 10px; }
.err-filter .in { width: auto; min-width: 180px; }
.err-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.err-list li { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.err-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; width: 100%; padding: 9px 12px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.err-head:hover { background: var(--panel-2); }
.err-head small { grid-column: 2; color: var(--faint); font-size: 12px; }
.err-lvl { grid-row: span 2; align-self: start; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: var(--danger-soft); color: var(--danger); }
.err-list li.warn .err-lvl { background: color-mix(in srgb, #d97706 14%, transparent); color: #b45309; }
.err-msg { font-size: 13.5px; overflow-wrap: anywhere; }
.err-detail { padding: 0 12px 12px; }
.err-stack { margin: 8px 0 0; padding: 10px; border-radius: 8px; background: var(--panel-2); font: 11.5px/1.5 ui-monospace, monospace; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 260px; overflow: auto; }
.sentry-form { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.sentry-form .in { flex: 1; min-width: 240px; }
.agent-keys { margin: 8px 0; }
.agent-keys .set-row { padding: 10px 0; }
.agent-keys .lbl b { overflow-wrap: anywhere; }
.agent-keys .row-actions { display: flex; flex-wrap: wrap; gap: 4px; }
/* Dáta z API */
.data-modal .modal-body { display: grid; gap: 16px; }
.data-modal .in, .data-modal .field input:not([type="checkbox"]), .data-modal .field select, .data-modal .field textarea {
  height: 40px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--panel); font-size: 14px;
}
.data-modal textarea.in, .data-modal .field textarea { height: auto; min-height: 96px; padding: 10px 12px; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.data-modal .in:focus, .data-modal .field input:focus, .data-modal .field select:focus { border-color: var(--text); box-shadow: 0 0 0 3px var(--accent-soft); }
.data-modal .field { gap: 6px; margin: 0; }
.data-modal .field > span { font-size: 13px; font-weight: 650; }
.data-modal .field small, .data-modal .hint { font-size: 12.5px; color: var(--faint); }
.dm-list { display: grid; gap: 8px; }
.dm-src { display: grid; gap: 3px; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--panel); color: inherit; font: inherit; text-align: left; cursor: pointer; transition: border-color .12s; }
.dm-src:hover { border-color: var(--text); }
.dm-src b { font-size: 14px; }
.dm-src small { color: var(--muted); overflow-wrap: anywhere; }
.dm-src .bad { color: var(--danger); }
.dm-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.dm-secrets { border-top: 1px solid var(--border); padding-top: 16px; display: grid; gap: 10px; }
.dm-secrets h3, .dm-views h3, .dm-sec h3 { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 15px; font-weight: 750; }
.dm-secrets h3 svg { width: 16px; height: 16px; }
.dm-secret-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.dm-secret-list li { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border: 1px solid var(--border); border-radius: 10px; }
.dm-secret-list code { flex: 1; font-size: 13px; }
/* data plugins (Google reviews, Instagram): the downloaded items with Hide / Show */
.dm-plugin-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.dm-pi { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; }
.dm-pi > div { flex: 1; min-width: 0; }
.dm-pi p { margin: 4px 0 0; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.dm-pi img { flex: none; width: 56px; height: 56px; border-radius: 8px; object-fit: cover; }
.dm-pi-stars { flex: none; color: #e8a400; letter-spacing: 1px; }
.dm-pi.is-hidden { opacity: .5; }
.rv-links { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 8px; }
.rv-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; }
.rv-link > div { flex: 1; min-width: 0; }
.rv-link small { display: block; color: var(--faint); margin-top: 2px; }
.realvia-form textarea[name=publicKey] { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.dm-secret-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; }
.dm-back { justify-self: start; }
.dm-form { display: grid; gap: 14px; }
.dm-sec { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--panel); }
.dm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dm-grid.dm-url { grid-template-columns: 130px 1fr; }
.dm-grid.dm-3 { grid-template-columns: 2fr 1fr 1fr; }
.dm-row { display: grid; grid-template-columns: 1fr 2fr 32px; gap: 8px; align-items: center; margin-bottom: 8px; }
.dm-row.dm-p { grid-template-columns: 1fr 1fr 1fr 32px; }
.dm-row .icon-btn.sm { width: 32px; height: 32px; }
.dm-body { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; align-items: start; }
.dm-body[hidden] { display: none; }
.dm-test { display: grid; gap: 8px; }
.dm-test .hint, .dm-test p { margin: 0; }
.dm-fields { display: flex; flex-wrap: wrap; gap: 6px; }
.dm-fields code { padding: 3px 8px; border-radius: 6px; background: var(--panel-2); font-size: 12px; }
.dm-pre { margin: 0; padding: 12px; border-radius: 10px; background: var(--panel-2); font: 11.5px/1.5 ui-monospace, monospace; max-height: 260px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.dm-views { display: grid; gap: 8px; padding: 16px; border: 1px solid var(--border); border-radius: 14px; }
.dm-views ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.dm-views .btn { justify-self: start; }
@media (max-width: 640px) {
  .dm-grid, .dm-grid.dm-url, .dm-grid.dm-3, .dm-body, .dm-secret-form { grid-template-columns: 1fr; }
  .dm-row, .dm-row.dm-p { grid-template-columns: 1fr 1fr 32px; }
  .dm-row.dm-p input[data-pd] { grid-column: 1 / 3; }
  .dm-sec { padding: 12px; }
}
.usage-note { display: grid; gap: 8px; padding: 14px 18px 18px; font-size: 13px; color: var(--muted); line-height: 1.55; border-top: 1px solid var(--border); }
.usage-note p { margin: 0; }
.usage-note b { color: var(--text); }
.peer.idle { opacity: .45; filter: grayscale(.6); }
.status.idle { color: var(--faint); }
.notify-sel { width: auto; min-width: 200px; height: 36px; font-size: 13.5px; }
.mail-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.mail-form .dash-actions { grid-column: 1 / -1; }
@media (max-width: 640px) { .mail-form { grid-template-columns: 1fr; } }

/* Formulár ↔ CRM naživo */
.fm-live { display: grid; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); }
.fm-live .sf-row { display: flex; gap: 10px; align-items: flex-start; }
.fm-live .sf-row b { display: block; font-weight: 700; }
.fm-live .sf-row small { display: block; color: var(--faint); }
.fm-quote { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.fm-quote label { display: flex; gap: 6px; align-items: center; font-size: 13.5px; }

.xp-auto { margin: 6px 0; font-size: 13.5px; }
.xp-auto summary { cursor: pointer; color: var(--muted); }
.xp-auto ul { margin: 6px 0 0; padding-left: 18px; max-height: 200px; overflow: auto; }

.xp-seo .xp-row2 { display: grid; grid-template-columns: 1fr 110px; gap: 8px; }
.xp-warn { margin: 8px 0 0; padding: 8px 12px 8px 28px; border-radius: 8px; background: color-mix(in srgb, #f0b429 14%, transparent); font-size: 13px; line-height: 1.5; }
#xp-gdpr .hint svg { width: 14px; height: 14px; vertical-align: -2px; }

/* --- Sprievodca nového webu ------------------------------------------------ */
.wiz { max-width: 880px; }
.wiz-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; color: var(--muted); font-size: 13.5px; }
.wiz-top .link { display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; font: inherit; text-decoration: none; }
.wiz-top .link:hover { color: var(--text); }
.wiz-top .link svg { width: 15px; height: 15px; }
.wiz-progress { height: 6px; border-radius: 99px; background: var(--accent-soft); overflow: hidden; margin-bottom: 20px; }
.wiz-progress i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .25s; }
.wiz-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-sm); display: grid; gap: 18px; }
.wiz-card h2 { margin: 0; font-size: 28px; letter-spacing: -0.03em; line-height: 1.15; }
.wiz-sub { margin: -10px 0 0; color: var(--muted); font-size: 15px; }
.wiz-nav { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding-top: 18px; border-top: 1px solid var(--border); }
.wiz-nav .btn.lg { height: 50px; padding: 0 24px; font-size: 15.5px; font-weight: 700; border-radius: 12px; }
.wiz-nav #w-back:not(:disabled) { border: 1.5px solid var(--text); color: var(--text); background: var(--panel); }
.wiz-nav #w-back:not(:disabled):hover { background: var(--hover); }
.wiz-nav #w-next { min-width: 170px; justify-content: center; box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 28%, transparent); }
.wiz-nav #w-next svg, .wiz-nav #w-back svg { width: 18px; height: 18px; }
.wiz-nav .spacer { flex: 1; }
.wiz-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.wiz-tile {
  display: grid; justify-items: center; align-content: center; gap: 10px; min-height: 104px; padding: 14px 10px; text-align: center;
  border: 1px solid var(--border-strong); border-radius: 16px; background: var(--panel); color: var(--text); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer;
  transition: border-color .12s, background .12s, box-shadow .12s;
}
.wiz-tile svg { width: 26px; height: 26px; color: var(--muted); }
.wiz-tile:hover { border-color: var(--text); }
.wiz-tile[aria-pressed="true"], .wiz-src label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 2px var(--accent); }
.wiz-tile[aria-pressed="true"] svg { color: var(--text); }
.wiz-src { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wiz-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.wiz-drops { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.wiz-drop {
  display: grid; justify-items: center; gap: 4px; padding: 20px 12px; text-align: center; cursor: pointer;
  border: 2px dashed var(--border-strong); border-radius: 16px; background: var(--panel-2); color: var(--muted); transition: border-color .12s, background .12s;
}
.wiz-drop svg { width: 24px; height: 24px; }
.wiz-drop b { color: var(--text); font-size: 14px; }
.wiz-drop:hover, .wiz-drop.over, .wiz-drop:focus-visible { border-color: var(--accent); background: var(--accent-soft); outline: none; }
.wiz-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.wiz-thumbs:empty { display: none; }
.wiz-thumb { position: relative; width: 72px; height: 72px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: var(--panel-2); }
.wiz-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wiz-thumb .icon-btn { position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; background: rgb(0 0 0 / .6); color: #fff; }
.wiz-thumb .icon-btn svg { width: 12px; height: 12px; }
.wiz-feats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.wiz-feat { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border: 1px solid var(--border-strong); border-radius: 14px; cursor: pointer; }
.wiz-feat input { margin-top: 3px; accent-color: var(--accent); width: 18px; height: 18px; flex: none; }
.wiz-feat span { display: grid; gap: 2px; }
.wiz-feat small { color: var(--faint); font-size: 12.5px; }
.wiz-feat:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.wiz-sum { display: grid; gap: 2px; }
.wiz-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.wiz-row span { color: var(--muted); }
.wiz-row b { font-weight: 600; overflow-wrap: anywhere; }
.wiz-row .link { background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; font: inherit; font-size: 13px; text-decoration: underline; }
.wiz-brief { margin-top: 10px; font-size: 13px; }
.wiz-brief summary { cursor: pointer; color: var(--muted); }
.wiz-brief pre { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px; max-height: 320px; overflow: auto; font: 12px/1.5 ui-monospace, monospace; }
.wiz-prog { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.wiz-prog li { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--muted); }
.wiz-prog li.ok { color: var(--text); }
.wiz-prog li.ok svg { color: var(--ok); }
.wiz-prog li.err svg { color: var(--danger); }
.wiz-prog svg { width: 18px; height: 18px; flex: none; }
.wiz-prog .dot { width: 8px; height: 8px; margin: 5px; border-radius: 50%; background: var(--border-strong); flex: none; }

/* wizard banner in the editor (progress, then publish confirmation) */
.chat-pane .wiz-bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--accent-soft); border-bottom: 1px solid var(--border); }
.chat-pane .wiz-bar[hidden] { display: none; }
.chat-pane .wiz-bar > div:not(.wiz-acts):not(.wiz-ic) { display: grid; gap: 1px; font-size: 13px; flex: 1; min-width: 0; }
.chat-pane .wiz-bar b { font-size: 14px; }
.chat-pane .wiz-bar span:not(.spin) { color: var(--muted); }
.chat-pane .wiz-bar svg { width: 18px; height: 18px; }
.wiz-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

@media (max-width: 720px) {
  .wiz-card { padding: 20px 16px; gap: 16px; }
  .wiz-card h2 { font-size: 23px; }
  .wiz-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wiz-grid, .wiz-drops, .wiz-feats, .wiz-src { grid-template-columns: 1fr; }
  .wiz-row { grid-template-columns: 1fr auto; }
  .wiz-row span { grid-column: 1 / -1; font-size: 12.5px; }
  .wiz-top { font-size: 12.5px; }
}

/* Marketing: vlastné kódy, SEO údaje, UTM generátor, sledovanie */
.mk { display: grid; gap: 22px; max-width: 1040px; }
.mk-sec { min-width: 0; padding: 20px 24px 24px; border-radius: var(--radius-lg); background: var(--panel); display: grid; gap: 14px; }
.mk-sec h2 { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -0.01em; }
.mk-sec h3 { margin: 6px 0 0; font-size: 14px; }
.mk-sec p { margin: 4px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.mk-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 20px; }
.mk-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.mk-tbl small, .mk-bar small, .mk-checks small { display: block; margin-top: 2px; color: var(--faint); font-size: 12px; font-weight: 400; }
.mk-warn { color: var(--danger) !important; }
.mk-warn .i { width: 13px; height: 13px; vertical-align: -2px; }
.mk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 16px; border-radius: 14px; background: var(--tag); font-size: 14px; }
.mk-bar > div { flex: 1 1 260px; }
.mk-bar.kill { background: var(--danger-soft); color: var(--danger); }
.mk-bar.kill small { color: inherit; opacity: .8; }
.btn.danger-o { color: var(--danger); border-color: var(--danger); background: transparent; }
.btn.danger-o:hover { background: var(--danger-soft); }
.mk-form { max-width: 620px; }
.mk-form > * { max-width: 620px; }
.mk-code { font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.mk-pre { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--panel-2); overflow-x: auto; font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; word-break: break-all; }
.mk-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mk-checks li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.mk-checks li.error { color: var(--danger); }
.mk-checks .i { flex: none; width: 16px; height: 16px; margin-top: 2px; }
.mk-sites { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.mk-site { display: grid; gap: 4px; padding: 18px 20px; border-radius: var(--radius-lg); background: var(--panel); color: var(--text); text-decoration: none; }
.mk-site:hover { background: var(--hover); }
.mk-site small { color: var(--faint); }
.mk-pub { font-size: 14px; }
@media (max-width: 720px) { .mk-sec { padding: 16px; } .mk-tbl .row-actions { flex-wrap: wrap; } }


/* --- UX pass: lišta editora, menu, záložky panela (22. 10. 2026) ------------------------ */

.xs-only { display: none !important; }
.bar-group { display: inline-flex; align-items: center; gap: 2px; padding: 2px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--border); }
.bar-group .icon-btn { width: 30px; height: 30px; }
.ed-bar .btn { height: 34px; }
.ed-bar .btn.primary { padding: 0 16px; }
.ed-bar .count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 800; }
.more-menu .icon-btn { position: relative; }
.more-menu .dot { position: absolute; top: 5px; right: 5px; width: 9px; height: 9px; border-radius: 50%; background: var(--danger); border: 2px solid var(--panel); }
.more-menu .menu { min-width: 280px; }
.menu-label { padding: 8px 10px 4px; font-size: 11.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); }
.menu-sep { height: 1px; margin: 6px 4px; background: var(--border); }
.user-menu .menu > .menu-item .count { margin-left: auto; }
.menu-item kbd, .kbd { margin-left: auto; padding: 1px 6px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 6px; background: var(--panel-2); color: var(--muted); font: 600 11px var(--font); white-space: nowrap; }
.user-menu .menu > .menu-item:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; background: var(--hover); }
@media (max-width: 560px) {
  .xs-only { display: flex !important; }
  .more-menu .menu { right: -6px; min-width: min(280px, calc(100vw - 20px)); }
}

/* Záhlavie pravého panela: záložky + ikonové akcie, nič sa neorezáva */
.chat-head { padding: 0 8px 0 10px; gap: 6px; container-type: inline-size; }
/* Tools of the website above the chat tabs: forms, images and video, the public website */
.site-tools { display: flex; align-items: center; gap: 2px; flex: none; height: 44px; padding: 0 6px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; container-type: inline-size; }
/* full labels when the panel is wide enough, short ones in the default 420 px panel (the full name is the tooltip) */
.st-full { display: none; }
@container (min-width: 620px) { .st-btn .st-full { display: inline; } .st-btn .st-short { display: none; } }
.site-tools::-webkit-scrollbar { display: none; }
.st-btn { display: inline-flex; align-items: center; gap: 6px; flex: none; height: 32px; padding: 0 9px; border: 0; border-radius: 999px; background: none; color: var(--text); font: inherit; font-size: 13px; font-weight: 650; white-space: nowrap; text-decoration: none; cursor: pointer; }
.st-btn:hover { background: var(--hover); }
.st-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.st-btn svg { width: 16px; height: 16px; color: var(--muted); }
.st-btn .count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 800; }
@media (max-width: 900px) { .st-btn { min-height: 40px; } .site-tools { height: 48px; } }
.chat-head .tabs { flex: 0 1 auto; min-width: 0; overflow: hidden; }
.chat-head .tabs button { flex: none; }
.chat-head .tabs .tab-action { margin-left: 2px; border-left: 1px solid var(--border); border-radius: 0 6px 6px 0; padding-left: 12px; }
.chat-head .tabs .tab-action:hover { background: var(--hover); }
.chat-head #reset-chat { margin-left: auto; flex: none; }
@container (max-width: 359px) { .chat-head .tabs .tab-action span { display: none; } .chat-head .tabs button { padding: 0 8px; } }
@media (max-width: 900px) { .chat-head .tabs button { height: 34px; } .chat-head .icon-btn { width: 40px; height: 40px; } }

/* Prepínač priestorov (človek vo viacerých organizáciách) */
.ws-switch { margin: 0; flex: none; }
.topbar:has(.ws-switch) .brand-name { white-space: nowrap; }
@media (max-width: 1180px) { .topbar:has(.ws-switch) .brand-name { display: none; } }
.ws-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; max-width: 220px; padding: 0 10px 0 12px; border: 1px solid var(--border-strong);
  border-radius: 999px; background: var(--panel); color: var(--text); font: inherit; font-size: 13.5px; font-weight: 650; cursor: pointer;
}
.ws-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-btn svg { width: 15px; height: 15px; flex: none; color: var(--muted); }
.ws-btn:hover, .ws-btn[aria-expanded="true"] { background: var(--hover); }
.ws-switch .menu { left: 0; right: auto; }
.ws-switch .menu-label { padding: 6px 10px 8px; color: var(--faint); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.ws-switch .menu > button span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-switch .menu > button small { color: var(--faint); font-size: 12px; font-weight: 600; }
.ws-switch .menu > button.on { background: var(--accent-soft); font-weight: 750; }
.ws-switch .menu > button.on svg { color: var(--accent); }
.ws-switch .menu-sep { height: 1px; margin: 6px 4px; background: var(--border); }
.ws-switch .menu > [data-leave-workspace] { color: var(--muted); font-weight: 600; }
.ws-none { max-width: 520px; margin: 12vh auto 0; text-align: center; }
.ws-none p { color: var(--muted); margin: 10px 0 22px; }
.ws-acts { display: flex; gap: 6px; flex: none; }
#ws-card .cr-list { margin-bottom: 14px; }
.ws-switch .menu > [data-ws-delete] { color: var(--danger, #c0392b); font-weight: 600; }
.ho-list { margin: 4px 0 14px; padding-left: 20px; color: var(--muted); font-size: 13.5px; display: grid; gap: 4px; }
@media (max-width: 640px) {
  /* on a phone the switcher takes the place of the brand name, its menu spans the screen */
  .topbar:has(.ws-switch) .brand-name { display: none; }
  .ws-btn { max-width: 160px; height: 38px; }
  .ws-btn > svg:first-child { display: none; }
  .ws-switch { position: static; }
  .ws-switch .menu { position: fixed; left: 12px; right: 12px; top: 64px; min-width: 0; }
}

/* Horná navigácia: skupina „Správa“, tlačidlo hľadania */
.user-menu .menu > a.on { background: var(--accent-soft); font-weight: 750; }
.palette-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 10px 0 13px; border: 1px solid var(--border-strong); border-radius: 999px;
  background: var(--panel); color: var(--muted); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer;
}
.palette-btn:hover { background: var(--hover); color: var(--text); }
.credit-chip {
  display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 16px 0 13px; border: 0; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); font-size: 14px; text-decoration: none; white-space: nowrap;
  box-shadow: 0 2px 10px color-mix(in srgb, var(--accent) 22%, transparent); transition: transform .15s ease, box-shadow .15s ease;
}
.credit-chip:hover { transform: translateY(-1px); box-shadow: 0 4px 16px color-mix(in srgb, var(--accent) 30%, transparent); }
.credit-chip svg { width: 17px; height: 17px; color: var(--credit-star, #f5c542); fill: currentColor; }
.credit-chip b { font-size: 15.5px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.credit-chip small { font-size: 12.5px; font-weight: 600; opacity: .75; }
.credit-chip.low { background: var(--warn); color: var(--on-accent); box-shadow: 0 2px 12px color-mix(in srgb, var(--warn) 40%, transparent); animation: credit-low 2.4s ease-in-out infinite; }
.credit-chip.low svg { color: currentColor; }
@keyframes credit-low { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--warn) 18%, transparent); } }
@media (prefers-reduced-motion: reduce) { .credit-chip, .credit-chip.low { animation: none; transition: none; } }
.palette-btn svg { width: 16px; height: 16px; }
@media (max-width: 900px) {
  .topnav a { min-height: 44px; display: inline-flex; align-items: center; }
}
@media (max-width: 640px) { .palette-btn span, .palette-btn kbd { display: none; } .palette-btn { width: 38px; height: 38px; padding: 0; justify-content: center; } .credit-chip { height: 38px; padding: 0 13px 0 11px; } .credit-chip small { display: none; } }

/* --- Top bar: + New ▾, the bell, the account menu (Home · Sites · CRM navigation) ----------------------- */
/* black is for the main button only: the credit in the top bar is a quiet chip */
.topbar .credit-chip:not(.low) { background: var(--panel); color: var(--text); border: 1px solid var(--border-strong); box-shadow: none; }
.topbar .credit-chip:not(.low):hover { background: var(--hover); box-shadow: none; }
.new-btn { height: 40px; gap: 6px; padding: 0 12px 0 14px; white-space: nowrap; }
/* as tall as the round buttons next to it (the 44 px touch rule for .btn below 900 px would make it taller) */
.topbar .new-btn { min-height: 40px; }
.new-btn svg { width: 16px; height: 16px; }
.new-btn svg:last-child { width: 14px; height: 14px; opacity: .8; }
.new-menu .menu { min-width: 220px; }
.bell-btn { position: relative; }
.bell-dot {
  position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px;
  background: var(--danger); color: #fff; box-shadow: 0 0 0 2px var(--bg); font: 800 11px/19px var(--font); text-align: center;
}
.bell-list { width: 380px; max-width: calc(100vw - 24px); }
.bell-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; }
.bell-row + .bell-row { border-top: 1px solid var(--border); border-radius: 0; }
.bell-row .main { min-width: 0; }
.bell-row b { display: block; font-size: 13.5px; font-weight: 700; line-height: 1.3; }
.bell-row small { display: block; overflow: hidden; color: var(--faint); font-size: 12.5px; white-space: nowrap; text-overflow: ellipsis; }
.bell-none { margin: 0; padding: 10px 10px 12px; color: var(--faint); font-size: 13.5px; }
.user-menu .menu > div > .bell-all, .bell-all { display: block; padding: 10px 10px 6px; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; font-weight: 700; text-decoration: none; }
.bell-all:hover { color: var(--text); }
/* icon of an item that waits for you (Home and the bell) */
.ri { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 10px; background: var(--tag); color: var(--muted); }
.ri svg { width: 16px; height: 16px; }
.ri.msg { background: color-mix(in srgb, var(--live) 14%, transparent); color: var(--live); }
.ri.pub { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
.ri.crm { background: var(--ok-soft); color: var(--ok); }
.ri.sec { background: var(--danger-soft); color: var(--danger); }
.account-menu .menu { min-width: 280px; }
.account-menu .menu-langs { display: flex; }
.account-menu .menu > a.admin-link { font-weight: 700; }
.adv-switch .switch { position: relative; flex: none; width: 34px; height: 20px; margin-left: auto; border-radius: 999px; background: var(--border-strong); transition: background .15s; }
.adv-switch .switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .25); transition: transform .15s; }
.adv-switch[aria-checked="true"] .switch { background: var(--accent); }
.adv-switch[aria-checked="true"] .switch::after { transform: translateX(14px); background: var(--on-accent); }
@media (prefers-reduced-motion: reduce) { .adv-switch .switch, .adv-switch .switch::after { transition: none; } }
@media (max-width: 640px) {
  .new-btn { width: 40px; height: 40px; min-height: 40px; padding: 0; justify-content: center; }
  /* a circle the size of the search and the bell next to it */
  .topbar .new-btn { width: 40px; height: 40px; min-height: 40px; min-width: 40px; flex: none; border-radius: 50%; }
  .new-btn span, .new-btn svg:last-child { display: none; }
  .topbar .bell-btn { width: 38px; height: 38px; }
  .topbar .new-menu .menu, .topbar .bell-menu .menu { position: fixed; left: 12px; right: 12px; top: 60px; width: auto; min-width: 0; max-width: none; }
}

/* --- Status words (websites and CRM): Draft · Live · Changes waiting · n ------------------------------ */
.st-pill { display: inline-flex; align-items: center; flex: none; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; white-space: nowrap; background: var(--tag); color: var(--muted); }
.st-pill.live { background: var(--ok-soft); color: var(--ok); }
.st-pill.chg { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
.st-pill.draft { background: color-mix(in srgb, var(--live) 11%, transparent); color: var(--live); }

/* --- Website cards, Home and the list of websites ---------------------------------------------------------- */
.site-meta .meta-top { align-items: flex-start; }
.site-meta h3 { white-space: normal; line-height: 1.3; }
.site-meta h3 a { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.site-meta .card-more { flex: none; width: 30px; height: 30px; margin: -4px -4px 0 0; }
.meta-st { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 8px; }
.msg-badge {
  position: absolute; z-index: 3; top: 10px; right: 10px; display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px;
  border-radius: 999px; background: #fff; color: #121212; box-shadow: 0 1px 3px rgb(0 0 0 / .16); font-size: 12.5px; font-weight: 800; text-decoration: none;
}
.msg-badge svg { width: 13px; height: 13px; color: var(--live); }
.card > h2 .cnt { display: inline-grid; place-items: center; min-width: 22px; height: 22px; margin-left: 6px; padding: 0 7px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 12px; vertical-align: 2px; }
.wait-row .main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) { .wait-row > .btn { margin-left: 44px; } }
.card-foot { display: block; padding: 12px 0 14px; border-top: 1px solid var(--border); color: var(--muted); font-size: 13.5px; font-weight: 700; text-decoration: none; }
.card-foot:hover { color: var(--text); }
.home .section { margin-top: 40px; }
/* skeleton while Home and the list of websites load */
.skel .sk-line, .skel .ri, .site-card.skel .thumb { background: linear-gradient(90deg, var(--tag) 0%, var(--panel-2) 50%, var(--tag) 100%); background-size: 200% 100%; animation: sk-move 1.4s ease-in-out infinite; }
.skel .sk-line { display: block; height: 12px; margin: 4px 0; border-radius: 6px; width: 70%; }
.skel .sk-line.short { width: 40%; }
.site-card.skel .thumb { box-shadow: none; }
@keyframes sk-move { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .skel .sk-line, .skel .ri, .site-card.skel .thumb { animation: none; } }

.sites-bar .search-pill { margin-left: 0; flex: 0 1 300px; order: 0; }
.st-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.sites-bar .spacer { min-width: 0; }
.view-seg { display: flex; gap: 2px; padding: 2px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--panel); }
.view-seg .icon-btn { width: 34px; height: 34px; border: 0; border-radius: 999px; }
.view-seg .icon-btn[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.sites-more .icon-btn { width: 40px; height: 40px; border: 1px solid var(--border-strong); background: var(--panel); }
.sites-more .menu { min-width: 230px; }
.sites-tbl th[data-sort] button { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.sites-tbl th[data-sort] button:hover { color: var(--text); }
.sites-tbl th svg { width: 13px; height: 13px; }
.sites-tbl .st-name { color: var(--text); font-weight: 750; text-decoration: none; }
.sites-tbl .st-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.sites-tbl td small { display: block; margin-top: 2px; font-size: 12.5px; }
.sites-tbl td.num { font-variant-numeric: tabular-nums; }
.sites-tbl td { position: relative; }
.card-menu .menu-sep { height: 1px; margin: 5px 4px; background: var(--border); }
.card-menu.in-row { top: calc(100% - 6px); bottom: auto; right: 12px; text-align: left; }
.card-menu.in-row.up { top: auto; bottom: calc(100% - 6px); }
.site-card .card-menu { bottom: auto; top: calc(100% - 4px); }
@media (max-width: 640px) {
  .sites-bar .search-pill { flex: 1 1 100%; order: -1; }
  .sites-bar .spacer { display: none; }
  .view-seg { display: none; } /* phones: cards only */
  .st-filter { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; flex: 1 1 100%; }
  .st-filter::-webkit-scrollbar { display: none; }
}

/* --- New site: one window, three starts, more options folded ------------------------------------------ */
.ns-form { gap: 14px; }
.ns-choices { display: grid; gap: 8px; }
.ns-choice { position: relative; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: 14px; cursor: pointer; }
.ns-choice:hover { background: var(--hover); }
.ns-choice.on { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.ns-choice input, .ns-small input { position: absolute; opacity: 0; pointer-events: none; }
.ns-choice:has(input:focus-visible), .ns-small:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.ns-ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--accent-soft); color: var(--text); }
.ns-ic svg { width: 18px; height: 18px; }
.ns-t { min-width: 0; }
.ns-t b { display: block; font-size: 14.5px; font-weight: 750; }
.ns-t small { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; line-height: 1.4; }
.ns-more summary { display: flex; align-items: center; gap: 6px; padding: 2px 4px; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; list-style: none; }
.ns-more summary::-webkit-details-marker { display: none; }
.ns-more summary svg { flex: none; width: 15px; height: 15px; transition: transform .15s; }
.ns-more:not([open]) summary svg { transform: rotate(-90deg); }
.ns-smalls { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ns-small { position: relative; display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: 999px; color: var(--muted); font-size: 13.5px; font-weight: 650; cursor: pointer; }
.ns-small svg { width: 15px; height: 15px; }
.ns-small.on { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.ns-names .field { min-width: 0; }
.ns-names:has(> [data-src][hidden]) { grid-template-columns: minmax(0, 1fr); }
.ns-org { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; color: var(--faint); font-size: 13px; }
.ns-org svg { width: 14px; height: 14px; }
.ns-org select.in { flex: 1 1 200px; height: 34px; font-size: 13px; }
.ns-resume { display: flex; align-items: center; gap: 6px; margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--panel-2); font-size: 13.5px; }
.ns-resume svg { width: 15px; height: 15px; color: var(--muted); }
.ns-resume .link, .ns-org .link { padding: 0; border: 0; background: none; color: var(--text); font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
@media (max-width: 560px) { .ns-choice { grid-template-columns: 34px minmax(0, 1fr); } .ns-rec { grid-column: 2; justify-self: start; } .ns-ic { width: 34px; height: 34px; } }

/* Paleta príkazov (Ctrl/Cmd+K) */
.palette-backdrop {
  position: fixed; inset: 0; z-index: 90; display: flex; align-items: flex-start; justify-content: center; padding: 12vh 16px 16px;
  background: rgb(18 18 18 / .42); backdrop-filter: blur(3px); animation: fade .12s ease-out;
}
.palette { display: flex; flex-direction: column; width: min(640px, 100%); max-height: min(560px, 76vh); background: var(--panel); border-radius: 20px; box-shadow: var(--shadow-lg); overflow: hidden; animation: pop .16s ease-out; }
.palette-input { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--border); color: var(--muted); }
.palette-input svg { width: 18px; height: 18px; flex: none; }
.palette-input input { flex: 1; min-width: 0; height: 56px; border: 0; background: none; color: var(--text); font: inherit; font-size: 16px; outline: none; }
.palette-list { flex: 1; min-height: 0; overflow-y: auto; padding: 6px; }
.palette-group { padding: 10px 12px 4px; font-size: 11.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); }
.palette-item { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 12px; color: var(--text); font-size: 14px; font-weight: 600; cursor: pointer; }
.palette-item svg { width: 17px; height: 17px; flex: none; color: var(--muted); }
.palette-item .pl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-item small { color: var(--faint); font-weight: 500; font-size: 12.5px; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-item[aria-selected="true"] { background: var(--accent); color: var(--on-accent); }
.palette-item[aria-selected="true"] svg, .palette-item[aria-selected="true"] small { color: inherit; opacity: .8; }
.palette-empty { padding: 28px 16px; text-align: center; color: var(--muted); font-size: 14px; }
.palette-foot { display: flex; gap: 16px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--border); background: var(--panel-2); color: var(--faint); font-size: 12px; }
.palette-status { margin-left: auto; }
@media (max-width: 640px) { .palette-backdrop { padding-top: 8vh; } .palette-foot span:not(.palette-status) { display: none; } }
@media (max-width: 900px) { .topnav { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); } }

/* Nastavenia konta: ľavá navigácia sekcií, nadpis sekcie, lepkavá lišta uloženia */
.set-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; align-items: start; }
.set-nav { position: sticky; top: 84px; display: grid; gap: 2px; }
.set-nav a {
  display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 14px; border-radius: 12px; color: var(--muted);
  font-weight: 650; font-size: 14px; text-decoration: none; transition: background .12s, color .12s;
}
.set-nav a svg { width: 17px; height: 17px; flex: none; }
.set-nav a:hover { background: var(--hover); color: var(--text); }
.set-nav a[aria-current="page"] { background: var(--accent); color: var(--on-accent); }
.set-main { min-width: 0; }
.set-title { margin: 0 0 18px; }
.set-title h2 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.set-title p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.save-bar {
  position: sticky; bottom: 16px; z-index: 5; display: flex; align-items: center; gap: 10px; margin: 22px 0 0; padding: 10px 10px 10px 18px;
  max-width: 880px; border-radius: 999px; background: var(--text); color: var(--panel); box-shadow: var(--shadow-lg);
}
.save-bar[hidden] { display: none; }
.save-bar > span { display: inline-flex; align-items: center; gap: 8px; flex: 1; min-width: 0; font-size: 13.5px; font-weight: 650; }
.save-bar > span svg { width: 15px; height: 15px; flex: none; }
.save-bar .btn { height: 38px; }
.save-bar .btn.ghost { color: inherit; opacity: .8; }
.save-bar .btn.ghost:hover { background: rgb(128 128 128 / .25); opacity: 1; }
.save-bar .btn.primary { background: var(--panel); border-color: var(--panel); color: var(--text); }
@media (max-width: 900px) {
  .set-layout { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .set-nav { position: static; display: flex; gap: 8px; margin: 0 -16px; padding: 0 16px 6px; overflow-x: auto; scrollbar-width: none; }
  .set-nav::-webkit-scrollbar { display: none; }
  .set-nav a { flex: none; min-height: 44px; border: 1px solid var(--border-strong); background: var(--panel); border-radius: 999px; }
  .set-nav a[aria-current="page"] { border-color: var(--accent); }
  .set-title h2 { font-size: 21px; }
  .save-bar { bottom: 10px; }
}

/* Administration (/admin): side menu grouped by task, tables with one ⋯ menu per row */
.adm-layout { grid-template-columns: 228px minmax(0, 1fr); }
.adm-nav .adm-title { margin: 6px 14px 10px; font-size: 13px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; color: var(--faint); }
.adm-nav .adm-gl { margin: 16px 14px 4px; font-size: 12px; font-weight: 700; color: var(--faint); }
.adm-nav a > span:not(.n) { flex: 1; min-width: 0; }
.adm-nav .n.warn { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 11.5px; font-weight: 700; }
.adm-nav .n[hidden] { display: none; }
.adm-main .dash-head { margin-top: 0; }
.row-menu { position: fixed; right: auto; bottom: auto; z-index: 60; }
.row-more[aria-expanded="true"] { background: var(--hover); }
.tbl td.row-actions { width: 1%; }
.tbl th.num, .tbl td.num { text-align: right; font-variant-numeric: tabular-nums; }
.org-tbl td:nth-child(n+2):not(:last-child) { white-space: nowrap; }
.org-tbl td:first-child { min-width: 200px; }
.org-id { padding: 1px 6px; border-radius: 6px; background: var(--tag); color: var(--muted); font-size: 11.5px; font-weight: 600; }
.stat.bad .v, .stat.bad .note { color: var(--danger); }
.plat-stats { margin-bottom: 24px; }
.warn-list li > span { flex: 1; min-width: 0; }
.warn-list .btn { margin-left: 6px; vertical-align: middle; }
@media (max-width: 900px) {
  .adm-layout { grid-template-columns: minmax(0, 1fr); }
  .adm-nav .adm-title, .adm-nav .adm-gl { display: none; }
}
@media (max-width: 640px) {
  .tbl td.row-actions:has(> .row-more:only-child) { width: auto; position: absolute; top: 10px; right: 10px; padding: 0; margin: 0; border: 0; }
  .tbl tr:has(> td > .row-more:only-child) { position: relative; }
  .tbl tr:has(> td > .row-more:only-child) td:first-child { padding-right: 40px; }
  .org-tbl td:nth-child(n+2):not(:last-child) { white-space: normal; }
  .tbl th.num, .tbl td.num { text-align: left; }
}

/* Nastavenia webu: dialóg s ľavou navigáciou sekcií */
.xp[hidden] { display: none; }
.xp[data-sec] { border-top: 0; padding-top: 4px; }
.modal.set-dialog { width: min(1060px, 100%); }
.set-dialog .modal-head h2 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
.xp .chk { overflow-wrap: anywhere; }
.set-dialog .modal-head h2 small { margin-left: 8px; color: var(--faint); font-size: 13px; font-weight: 600; }
.set-dialog .sd-back { display: none; margin-right: 4px; }
.sd-layout { display: grid; grid-template-columns: 292px minmax(0, 1fr); height: min(640px, calc(100vh - 150px)); border-top: 1px solid var(--border); }
.sd-nav { overflow-y: auto; padding: 12px 10px 16px; border-right: 1px solid var(--border); background: var(--panel-2); border-radius: 0 0 0 24px; }
.sd-search { position: relative; display: flex; align-items: center; margin: 0 2px 8px; }
.sd-search svg { position: absolute; left: 11px; width: 15px; height: 15px; color: var(--faint); pointer-events: none; }
.sd-search input { width: 100%; height: 38px; padding: 0 12px 0 34px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--panel); color: var(--text); font: inherit; font-size: 13.5px; }
.sd-gl { padding: 12px 10px 4px; font-size: 11.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); }
.sd-item { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 38px; padding: 0 10px; border: 0; border-radius: 10px; background: none; color: var(--muted); font: inherit; font-size: 13.5px; font-weight: 600; text-align: left; cursor: pointer; }
.sd-item svg { width: 16px; height: 16px; flex: none; }
.sd-item .sd-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sd-item:hover { background: var(--hover); color: var(--text); }
.sd-item[aria-current="true"] { background: var(--accent); color: var(--on-accent); }
.sd-item[hidden], .sd-group[hidden] { display: none; }
.sd-ext { color: var(--faint); font-size: 12px; }
.sd-badge { flex: none; padding: 1px 8px; border-radius: 999px; background: var(--tag); color: var(--text); font-size: 11px; font-weight: 750; }
.sd-badge[data-kind="ok"] { background: var(--ok-soft); color: var(--ok); }
.sd-badge[data-kind="warn"] { background: var(--danger-soft); color: var(--danger); }
.sd-item[aria-current="true"] .sd-badge { background: rgb(255 255 255 / .22); color: inherit; }
.sd-none { padding: 14px 10px; color: var(--muted); font-size: 13.5px; }
.sd-main { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.sd-main .xp-body { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 26px 20px; }
.sd-main .save-bar { margin: 0 16px 14px; }
@media (max-width: 760px) {
  .sd-layout { grid-template-columns: minmax(0, 1fr); height: calc(100dvh - 130px); }
  .set-dialog .modal-head h2 small { display: none; }
  .set-dialog[data-view="sec"] .sd-nav, .set-dialog[data-view="nav"] .sd-main { display: none; }
  .set-dialog[data-view="sec"] .sd-back { display: inline-grid; }
  .sd-nav { border-right: 0; border-radius: 0 0 20px 20px; }
  .sd-item { min-height: 46px; }
  .sd-main .xp-body { padding: 14px 16px 16px; }
}
.set-dialog .xp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.set-dialog .xp-grid .field:nth-child(n) { grid-column: auto; }
.set-dialog .xp-grid .field:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (max-width: 760px) { .set-dialog .xp-grid { grid-template-columns: 1fr; } }

/* Konzistencia: chybové stavy, fokus, dotykové plochy na mobile, hierarchia tlačidiel */
.empty.err { border-color: color-mix(in srgb, var(--danger) 40%, transparent); color: var(--danger); }
.empty.err p { margin-bottom: 14px; }
.btn.danger-o, .btn.danger { color: var(--danger); }
.btn.primary:focus-visible, .btn:focus-visible, .icon-btn:focus-visible, .pill:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 900px) {
  .btn, .pill { min-height: 44px; }
  .btn.sm { min-height: 40px; }
  .icon-btn { min-width: 40px; min-height: 40px; }
  .ed-bar .icon-btn, .ed-bar .btn { min-height: 40px; }
  .menu-item, .user-menu .menu > button, .user-menu .menu > a { min-height: 44px; }
  .field input:not([type="checkbox"]):not([type="radio"]), .field select { min-height: 44px; }
}

/* --- Language switcher (top bar, login page) --------------------------------- */
.topbar .icon-btn.lang-btn { display: inline-flex; align-items: center; justify-content: center; width: auto; min-width: 40px; padding: 0 11px; gap: 6px; font-size: 12px; font-weight: 800; letter-spacing: .03em; }
.topbar .icon-btn.lang-btn svg { width: 16px; height: 16px; }
.lang-menu .menu { min-width: 190px; }
.lang-menu .menu button[aria-current="true"] { background: var(--hover); }
.ic-gap { display: inline-block; width: 24px; flex: none; }
.login-shell > header { display: flex; align-items: center; gap: 12px; }
select.pill-select.lang-select { min-width: 150px; height: 38px; font-size: 13.5px; }
.login-shell > header .theme-toggle { width: 38px; height: 38px; border: 1px solid var(--border-strong); background: var(--panel); color: var(--text); }
.login-shell > header .theme-toggle:hover { background: var(--hover); }
/* long words (German, Hungarian) must wrap instead of overflowing cards and buttons */
.stat dt, .stat .note, .set-card h2, .set-card p, .dash-head h1, .login-hero h1, .login-hero p, .login-points li, .login-card h2, .login-note, .login-sub, .field > span, .field small { overflow-wrap: anywhere; hyphens: auto; }
.dash-head h1, .login-hero h1 { overflow-wrap: break-word; }
/* Custom domains (website settings) */
.dm-list { display: grid; gap: 8px; margin: 10px 0; }
.dm-row { display: grid; grid-template-columns: minmax(140px, 1fr) minmax(150px, auto) minmax(140px, 1fr) auto; gap: 8px; align-items: center; }
.dm-row [name=to][hidden] { display: none; }
@media (max-width: 640px) { .dm-row { grid-template-columns: 1fr auto; } .dm-row select, .dm-row [name=to] { grid-column: 1 / -1; } }
.dm-dns ul, .dm-status { margin: 6px 0; padding-left: 18px; font-size: 13.5px; }
.dm-status:empty { display: none; }
.dm-status svg { width: 14px; height: 14px; vertical-align: -2px; }
/* Error log: compact list, selection, bulk delete, pager */
.err-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 8px; }
.err-tools .chk { margin: 0; font-size: 13.5px; }
.err-count { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.err-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
#err-card .btn.err-danger { color: var(--danger); }
#err-card .btn.err-danger:disabled { color: var(--faint); }
#err-card .err-list { gap: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
#err-card .err-list li { border: 0; border-radius: 0; border-bottom: 1px solid var(--border); }
#err-card .err-list li:last-child { border-bottom: 0; }
.err-row { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; }
.err-row .err-pick { margin: 11px 0 0 12px; }
#err-card .err-head { padding: 8px 12px 8px 10px; }
#err-card .err-lvl { min-width: 64px; text-align: center; box-sizing: border-box; }
.err-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.err-pager { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.err-pg { min-width: 32px; height: 32px; padding: 0 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); color: inherit; font: inherit; font-size: 13px; font-variant-numeric: tabular-nums; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.err-pg:hover:not(:disabled):not([aria-current]) { background: var(--panel-2); }
.err-pg[aria-current="page"] { background: var(--text); border-color: var(--text); color: var(--panel); font-weight: 600; cursor: default; }
.err-pg:disabled { opacity: .4; cursor: default; }
.err-pg svg { width: 16px; height: 16px; }
.err-gap { color: var(--faint); padding: 0 2px; }
.err-per { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.err-per .in { width: auto; min-width: 0; height: 32px; }
@media (max-width: 640px) {
  .err-actions { margin-left: 0; width: 100%; }
  .err-actions .btn { flex: 1; justify-content: center; }
  .err-foot { justify-content: center; }
}

/* Publishing on Cloudflare (website settings) and the Cloudflare card (system) */
.pb-now p { margin: 0 0 4px; }
.pb-target { display: grid; gap: 10px; max-width: 560px; }
.pb-sub { display: flex; align-items: center; gap: 6px; }
.pb-sub .in { flex: 1; min-width: 0; }
.pb-versions { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.pb-versions li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; font-size: 13px; }
.pb-versions li + li { border-top: 1px solid var(--border); }
.pb-cur { font-size: 12px; color: var(--ok); }
.cf-steps { list-style: none; margin: 0 0 12px; padding: 0; font-size: 13px; }
.cf-steps li { display: flex; align-items: center; gap: 6px; padding: 2px 0; }
.cf-steps svg { width: 14px; height: 14px; }
@media (max-width: 640px) { .pb-versions li { flex-direction: column; align-items: flex-start; } }

/* Publish dialog */
.pub-modal .modal-body { display: grid; gap: 14px; }
.pub-steps { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.pub-steps li { display: inline-flex; align-items: center; gap: 6px; }
.pub-steps li + li::before { content: ""; width: 18px; height: 1px; background: var(--border-strong); margin-right: 2px; }
.pub-steps span { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--border-strong); font-size: 12px; }
.pub-steps span svg { width: 12px; height: 12px; }
.pub-steps li.on { color: var(--text); font-weight: 600; }
.pub-steps li.on span { background: var(--text); border-color: var(--text); color: var(--bg); }
.pub-steps li.done span { background: var(--ok); border-color: var(--ok); color: #fff; }
.pub-modal h3 { margin: 4px 0 0; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.pub-checks { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.pub-checks li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.pub-checks li + li { border-top: 1px solid var(--border); }
.pub-checks li > svg { width: 18px; height: 18px; flex: none; }
.pub-checks li.ok > svg { color: var(--ok); }
.pub-checks li.warn > svg { color: #b45309; }
.pub-checks li div { flex: 1; min-width: 0; display: grid; gap: 2px; }
.pub-checks small { color: var(--muted); }
.pub-checks .btn { flex: none; }
.pub-modal .modal-foot { position: static; padding: 0; border: 0; margin-top: 4px; background: none; }
.pub-progress { display: flex; align-items: center; gap: 12px; padding: 24px 0; }
.pub-progress div { display: grid; gap: 2px; }
.pub-done { display: flex; gap: 20px; align-items: center; }
.pub-live { flex: 1; min-width: 0; display: grid; gap: 8px; }
.pub-url { font-size: 20px; font-weight: 600; word-break: break-all; }
.pub-qr { flex: none; background: #fff; border-radius: var(--radius-sm); padding: 6px; }
.xp-lock { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); }
.xp-lock > svg { width: 20px; height: 20px; flex: none; margin-top: 2px; }
.xp-lock div { display: grid; gap: 4px; }
.xp-lock span { color: var(--muted); font-size: 14px; }
@media (max-width: 640px) {
  .pub-checks li { flex-wrap: wrap; }
  .pub-checks li div { flex: 1 1 calc(100% - 28px); }
  .pub-checks .btn { margin-left: 28px; }
  .pub-done { flex-direction: column; align-items: flex-start; }
}

/* Onboarding v2: chips, goals, sliders, inspirations, direction cards */
.wiz-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.wiz-chip { border: 1px solid var(--border-strong); border-radius: 99px; background: var(--panel); color: var(--text); font: inherit; font-size: 13.5px; padding: 6px 12px; cursor: pointer; }
.wiz-chip:hover { border-color: var(--text); }
.wiz-chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
.wiz-inline { display: flex; gap: 8px; }
.wiz-inline .in { flex: 1; min-width: 0; height: auto; font-size: inherit; } /* same height as the other fields */
.wiz-goals { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.wiz-goal { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: 14px; cursor: pointer; font-weight: 600; }
.wiz-goal input { accent-color: var(--accent); }
.wiz-goal:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.wiz-colors { display: flex; gap: 10px; margin-top: 8px; }
.wiz-colors input { width: 52px; height: 40px; padding: 2px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--panel); cursor: pointer; }
.wiz-sliders { display: grid; gap: 14px; }
.wiz-slider { display: grid; grid-template-columns: 110px minmax(0, 1fr) 110px; align-items: center; gap: 12px; font-size: 14px; }
.wiz-slider span:last-child { text-align: right; }
.wiz-slider input { width: 100%; accent-color: var(--accent); }
.wiz-insp { display: grid; gap: 12px; margin-bottom: 8px; }
.wiz-insp-row { display: grid; gap: 4px; padding: 12px; border: 1px solid var(--border); border-radius: 14px; }
.wiz-insp-row .wiz-chips { margin: 2px 0; }
.wiz-dirs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.wiz-dirs > .empty, .wiz-dirs > .err { grid-column: 1 / -1; }
.wiz-dir { display: grid; gap: 8px; padding: 8px; border: 1px solid var(--border-strong); border-radius: 18px; background: var(--panel); color: var(--text); font: inherit; text-align: left; cursor: pointer; min-width: 0; }
.wiz-dir img { width: 100%; height: auto; aspect-ratio: 8 / 5; border-radius: 12px; display: block; background: var(--panel-2); }
.wiz-dir:hover { border-color: var(--text); }
.wiz-dir[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.wd-t { display: grid; gap: 2px; padding: 0 4px 4px; }
.wd-t small { color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.wd-t .wd-meta { color: var(--faint); }
.wiz-dir-acts { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.wiz-sum-card { width: 100%; max-width: 420px; height: auto; border-radius: 14px; border: 1px solid var(--border); display: block; margin-bottom: 6px; }
.wiz-tune { border: 1px solid var(--border); border-radius: 14px; background: var(--panel); }
.wiz-tune > summary { display: flex; align-items: center; gap: 8px; padding: 12px 16px; cursor: pointer; font-weight: 600; font-size: 14.5px; list-style: none; }
.wiz-tune > summary::-webkit-details-marker { display: none; }
.wiz-tune > summary svg { width: 16px; height: 16px; color: var(--muted); }
.wiz-tune[open] > summary { border-bottom: 1px solid var(--border); }
.wiz-tune-body { display: grid; gap: 18px; padding: 16px; }
.wiz-tune-body .wiz-styles { margin: 0; }
@media (min-width: 641px) { .wiz-tune-body .wiz-styles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.wiz-refs { display: grid; gap: 12px; min-width: 0; }
.wiz-refs > *, .wiz-tune, .wiz-tune-body > * { min-width: 0; }
.wiz-ref .in { width: 100%; min-width: 0; box-sizing: border-box; }
.wiz-ref { display: grid; gap: 8px; padding: 14px; border: 1px solid var(--border-strong); border-radius: 16px; }
.wiz-ref-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wiz-ref-head > b { font-size: 14px; }
.wiz-ref-head .icon-btn { margin-left: auto; }
.wiz-kinds { display: inline-flex; gap: 4px; padding: 3px; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--border); }
.wiz-kind { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 99px; background: none; color: var(--muted); font: inherit; font-size: 13px; padding: 5px 11px; cursor: pointer; }
.wiz-kind svg { width: 14px; height: 14px; }
.wiz-kind[aria-pressed="true"] { background: var(--panel); color: var(--text); box-shadow: var(--shadow-sm); font-weight: 600; }
.wiz-ref-q { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.wiz-ref .wiz-chips { margin: 0; }
.wiz-ref-check:empty { display: none; }
.wiz-ref-check { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.wiz-ref-check img { width: 144px; height: 90px; object-fit: cover; object-position: top; border-radius: 8px; border: 1px solid var(--border); }
.wiz-ref-check > span:not(.spin) { flex: 1; min-width: 180px; }
.wiz-ref-check[data-state="bad"] { padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); color: var(--text); }
.wiz-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.wiz-gal { display: grid; gap: 6px; padding: 6px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--panel); color: var(--text); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.wiz-gal img { width: 100%; aspect-ratio: 8 / 5; object-fit: cover; border-radius: 8px; display: block; background: var(--panel-2); }
.wiz-gal[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.wiz-file { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 6px 6px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel-2); font-size: 13px; }
.wiz-file > svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.wiz-file span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wiz-file small { color: var(--faint); }
.wiz-file .icon-btn { width: 24px; height: 24px; }
.wiz-file .icon-btn svg { width: 12px; height: 12px; }
@media (max-width: 760px) {
  .wiz-dirs { grid-template-columns: minmax(0, 1fr); }
  .wiz-kind span { display: none; }
  .wiz-nav { gap: 8px; }
  .wiz-nav .btn.lg { padding: 0 16px; }
  .wiz-nav #w-next { min-width: 0; }
  .wiz-tune-body { padding: 14px 12px; }
  .wiz-slider { grid-template-columns: 76px minmax(0, 1fr) 76px; font-size: 13px; }
  .wiz-inline { flex-direction: column; }
}

/* Suggested next steps under the agent's reply */
.sugg-row { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 0 8px; }
.sugg { display: inline-flex; align-items: center; gap: 6px; border: 1px solid color-mix(in srgb, var(--text) 22%, #121212); border-radius: 99px; background: #121212; color: #fff; font: inherit; font-size: 13.5px; padding: 7px 12px; cursor: pointer; text-align: left; }
.sugg svg { width: 14px; height: 14px; color: currentColor; flex: none; }
.sugg:hover { background: #34332f; }

/* Path to publishing */
.guide-modal .modal-body { display: grid; gap: 14px; }
.guide-progress { display: grid; gap: 6px; }
.guide-progress span { height: 6px; border-radius: 99px; background: var(--accent-soft); overflow: hidden; }
.guide-progress i { display: block; height: 100%; background: var(--ok); border-radius: 99px; }
.guide-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.guide-steps li { display: flex; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.guide-steps li.done { opacity: .75; }
.gs-ic { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--border-strong); margin-top: 1px; }
.guide-steps li.done .gs-ic { background: var(--ok); border-color: var(--ok); color: #fff; }
.gs-ic svg { width: 13px; height: 13px; }
.gs-main { flex: 1; min-width: 0; display: grid; gap: 6px; justify-items: start; }
.gs-main > small { color: var(--muted); }
.gs-main b small { color: var(--faint); font-weight: 400; }
.guide-facts { display: grid; gap: 10px; width: 100%; margin-top: 4px; }

/* Own domain */
.dom-modal .modal-body { display: grid; gap: 14px; }
.dom-card { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.dom-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.dom-head b { font-size: 16px; }
.dom-wait { color: #b45309; font-size: 13px; }
.dom-rec { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.dom-rec th { text-align: left; color: var(--muted); font-weight: 500; padding: 4px 6px; }
.dom-rec td { padding: 6px; border-top: 1px solid var(--border); vertical-align: middle; word-break: break-all; }
.dom-rec td:last-child { text-align: right; white-space: nowrap; }
.dom-status { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.dom-status li { display: flex; align-items: center; gap: 8px; }
.dom-mark { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--border-strong); color: var(--muted); }
.dom-mark svg { width: 12px; height: 12px; }
.dom-mark.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.dom-checked { color: var(--muted); font-size: 12.5px; }

/* Libraries for the agent (Settings → System) */
.lib-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.lib-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px 4px; border-radius: 8px; cursor: pointer; }
.lib-row:hover { background: var(--hover, rgba(127,127,127,.08)); }
.lib-row input { margin-top: 3px; }
.lib-main { display: grid; gap: 2px; }
.lib-main small { color: var(--muted); }

/* Forms: choice of captcha */
.fm-cap { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 2px 0 6px; }
.fm-cap label { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.fm-keys[hidden], [data-cap-hint][hidden] { display: none; }
.fm-keys { margin-top: 6px; }

/* Chat: attached videos and documents */
.att-chip.att-file { flex-direction: column; gap: 2px; color: var(--muted); }
.att-chip.att-file svg { width: 18px; height: 18px; }
.att-chip.att-file small { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.att-file-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 220px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel-2); font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att-file-chip svg { width: 14px; height: 14px; flex: none; }

/* Wizard: style of the website */
.wiz-styles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 4px 0 22px; }
.wiz-style { display: grid; align-content: start; gap: 6px; padding: 16px 18px; border: 1.5px solid var(--border); border-radius: 14px; cursor: pointer; background: var(--panel); }
.wiz-style input { position: absolute; opacity: 0; pointer-events: none; }
.wiz-style b { font-size: 15.5px; }
.wiz-style small { color: var(--muted); font-size: 13px; line-height: 1.45; }
.wiz-style:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink) inset; }
.wiz-style:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (max-width: 640px) { .wiz-styles { grid-template-columns: 1fr; } }

/* Show / hide password (public/password-reveal.js) */
.pw-wrap { position: relative; display: block; }
.field > .pw-wrap { font-size: inherit; font-weight: inherit; color: inherit; }
.pw-wrap > input { width: 100%; padding-right: 46px !important; }
.sentry-form > .pw-wrap { flex: 1; min-width: 240px; }
.pw-toggle {
  position: absolute; top: 50%; right: 6px; transform: translateY(-50%); display: grid; place-items: center;
  width: 36px; height: 36px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer;
}
.pw-toggle:hover { color: var(--text); }
.pw-toggle:focus-visible { outline: 2px solid var(--accent, currentColor); outline-offset: -2px; }
.pw-toggle[aria-pressed="true"] { color: var(--text); }

/* --- Phones: the top bar fits one row, theme and language move to the account menu; compact editor bar --- */
.chat-pane .wiz-bar > .wiz-ic { flex: none; display: grid; place-items: center; }
.user-menu .menu .tb-narrow { display: none; }
.menu-langs { align-items: center; gap: 4px; padding: 6px 10px; color: var(--muted); }
.menu-langs svg { flex: none; width: 16px; height: 16px; margin-right: 6px; }
.menu-langs button { flex: 1; min-width: 0; height: 34px; padding: 0; border: 1px solid var(--border); border-radius: 8px; background: none; color: var(--text); font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.menu-langs button:hover { background: var(--hover); }
.menu-langs button[aria-current="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
@media (max-width: 640px) {
  .topbar .tb-wide { display: none !important; }
  .user-menu .menu .tb-narrow { display: flex; }
  .topbar .brand { min-width: 0; }
  .topbar .brand-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .user-menu .menu { max-width: calc(100vw - 24px); }
}
@media (max-width: 360px) { .topbar .brand-name { display: none; } }
@media (max-width: 560px) {
  .ed-bar .credit-chip { height: 36px; gap: 5px; padding: 0 10px 0 8px; }
  .ed-bar .credit-chip svg { width: 15px; height: 15px; }
  .ed-bar .btn.primary { padding: 0 12px; }
  #pane-toggle { width: 40px; padding: 0; justify-content: center; }
  #pane-toggle .pt-lbl { display: none; }
  .chat-pane .wiz-bar { flex-wrap: wrap; row-gap: 10px; }
  .chat-pane .wiz-bar > div:not(.wiz-acts):not(.wiz-ic) { flex-basis: calc(100% - 40px); }
  .chat-pane .wiz-bar .wiz-acts { flex: 1 1 100%; }
  .chat-pane .wiz-bar .wiz-acts .btn { flex: 1; }
}

/* --- Image and video creator (openCreator in app.js) ---
   Wide screens: the chat with the director | the steps, the plan (the progress, the result) and the next step.
   Narrow screens: only the chat; the plan is a card at its end, the steps and the next step sit above the composer,
   shot details are a bottom sheet. The list of creations is a drawer everywhere. */
.creator { display: grid; grid-template-rows: var(--bar-h) 1fr; height: 100vh; height: 100dvh; overflow: hidden; }
.mc-bar { grid-template-columns: minmax(0, 1fr) auto; }
.mc-bar .site-title { min-width: 0; }
.mc-rename { display: block; max-width: 100%; padding: 0; border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-rename:hover strong { text-decoration: underline; }
.mc-list-btn { flex: none; margin-left: 4px; }
.mc-count { color: var(--faint); font-weight: 700; }
.mc-count:empty { display: none; }
.mc-state-pill { flex: none; padding: 3px 10px; border-radius: 999px; background: var(--tag); color: var(--muted); font-size: 12px; font-weight: 700; white-space: nowrap; }
.mc-state-pill[data-tone="warn"], .mc-tone[data-tone="warn"] { color: var(--warn); }
.mc-state-pill[data-tone="warn"] { background: color-mix(in srgb, var(--warn) 14%, var(--panel)); }
.mc-state-pill[data-tone="ok"], .mc-tone[data-tone="ok"] { color: var(--ok); }
.mc-state-pill[data-tone="ok"] { background: var(--ok-soft); }
.mc-state-pill[data-tone="run"] { background: var(--accent-soft); color: var(--text); }
.mc-body { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, 460px); min-height: 0; }
.mc-starting .mc-body, .mc-no-side .mc-body { grid-template-columns: minmax(0, 1fr); }
.mc-starting .mc-side, .mc-no-side .mc-side { display: none; }
.list-open .mc-body::after { content: ''; position: absolute; inset: 0; z-index: 4; background: rgb(0 0 0 / 0.14); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.mc-list { display: none; position: absolute; inset: 0 auto 0 0; z-index: 5; width: min(320px, 86vw); box-sizing: border-box; flex-direction: column; gap: 4px; padding: 12px; overflow-y: auto; border-right: 1px solid var(--border); background: var(--panel-2); box-shadow: var(--shadow-lg); }
.list-open .mc-list { display: flex; }
.mc-list-h { display: flex; align-items: center; justify-content: space-between; padding: 0 0 6px 8px; font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.mc-list-empty { padding: 12px 6px; }
.mc-item { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; padding: 6px; border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.mc-item:hover { background: var(--hover); }
.mc-item.on { background: var(--panel); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.mc-thumb { display: grid; place-items: center; width: 48px; height: 34px; border-radius: 7px; overflow: hidden; background: var(--tag); color: var(--muted); }
.mc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mc-thumb svg { width: 16px; height: 16px; }
.mc-item-t { display: grid; min-width: 0; line-height: 1.3; }
.mc-item-t b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-item-t small { font-size: 11.5px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* the chat column */
.mc-chat { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--panel); }
.mc-thread { flex: 1; min-height: 0; overflow-y: auto; }
.mc-msgs { display: flex; flex-direction: column; gap: 18px; max-width: 760px; margin: 0 auto; padding: 28px 32px 16px; }
.mc-msg { display: flex; flex-direction: column; gap: 8px; max-width: 100%; line-height: 1.55; }
.mc-msg.me { align-self: flex-end; align-items: flex-end; max-width: 82%; }
.mc-bubble { padding: 10px 14px; border-radius: 18px 18px 4px 18px; background: var(--user-bubble); white-space: pre-wrap; overflow-wrap: anywhere; }
.mc-refs-row { display: flex; flex-wrap: wrap; gap: 6px; }
.mc-refs-row img { width: 88px; height: 62px; object-fit: cover; border-radius: 10px; background: var(--tag); }
.mc-msg.agent { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; align-items: start; }
.mc-av { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--on-accent); }
.mc-av svg { width: 14px; height: 14px; }
.mc-msg-body { display: grid; gap: 10px; min-width: 0; }
.mc-msg-body p { margin: 0; overflow-wrap: anywhere; }
.mc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mc-sugg { height: 32px; padding: 0 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--panel); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.mc-sugg:hover { border-color: var(--border-strong); background: var(--hover); }
.mc-change { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); font-size: 12px; font-weight: 700; }
.mc-change svg { width: 12px; height: 12px; }
.mc-event { align-self: center; display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--bg); color: var(--muted); font-size: 12.5px; text-align: center; }
.mc-event svg { flex: none; width: 14px; height: 14px; color: var(--ok); }
.mc-event.err svg { color: var(--danger); }
.mc-note { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; padding: 12px 14px; border-radius: var(--radius); background: var(--accent-soft); font-size: 13.5px; line-height: 1.5; }
.mc-note > svg { width: 18px; height: 18px; margin-top: 2px; }
.mc-note > div { display: grid; gap: 4px; }
.mc-note span { color: var(--muted); }
.mc-empty-chat { text-align: center; margin: 40px 0 0; }
.mc-typing { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.mc-typing span { display: inline-flex; gap: 3px; }
.mc-typing i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; animation: mc-dot 1.2s infinite ease-in-out; }
.mc-typing i:nth-child(2) { animation-delay: .15s; }
.mc-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes mc-dot { 0%, 60%, 100% { opacity: .25; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .mc-typing i { animation: none; opacity: .6; } }
.mc-error { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--danger-soft); color: var(--danger); font-size: 13.5px; line-height: 1.45; }
.mc-error svg { flex: none; width: 16px; height: 16px; margin-top: 2px; }

/* what is being generated, as a line of the chat */
.mc-working { align-self: center; display: inline-flex; align-items: center; gap: 10px; margin: 0; padding: 7px 14px; border-radius: 999px; background: var(--accent-soft); font-size: 13px; font-weight: 600; text-align: center; }
.mc-working .spin { flex: none; width: 14px; height: 14px; }
.mc-keep { font-size: 13px; color: var(--muted); }
.mc-tick { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--on-accent); }
.mc-tick svg { width: 13px; height: 13px; }

/* the composer */
.mc-compose { display: grid; gap: 8px; width: calc(100% - 32px); max-width: 760px; margin: 0 auto 16px; padding: 10px 10px 10px 14px; box-sizing: border-box; border: 1px solid var(--border-strong); border-radius: 20px; background: var(--panel); box-shadow: var(--shadow); }
.mc-compose.big { width: 100%; padding: 14px 14px 12px 18px; border-radius: 22px; box-shadow: var(--shadow-lg); margin: 0; }
.mc-compose.off { border-color: var(--border); background: var(--panel-2); box-shadow: none; }
.mc-compose.off textarea { cursor: not-allowed; }
.mc-compose textarea { width: 100%; min-height: 24px; padding: 4px 0; border: 0; outline: none; resize: none; background: transparent; color: var(--text); font: inherit; font-size: 15px; line-height: 1.5; }
.mc-pending { display: flex; flex-wrap: wrap; gap: 8px; }
.mc-pending:empty { display: none; }
.mc-pend { position: relative; margin: 0; }
.mc-pend img { display: block; width: 72px; height: 52px; object-fit: cover; border-radius: 10px; background: var(--tag); }
.mc-pend .icon-btn { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; min-width: 0; padding: 0; border-radius: 50%; background: var(--panel); box-shadow: var(--shadow-sm); }
.mc-pend .icon-btn svg { width: 12px; height: 12px; }
.mc-compose-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mc-grow { flex: 1; }
.mc-attach { cursor: pointer; }
.mc-attach.off { opacity: .45; cursor: default; }
.mc-seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--bg); }
.mc-seg button, .mc-seg label span { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
.mc-seg button[aria-pressed="true"], .mc-seg button[aria-selected="true"], .mc-seg input:checked + span { background: var(--panel); color: var(--text); font-weight: 700; box-shadow: var(--shadow-sm); }
.mc-seg input { position: absolute; opacity: 0; pointer-events: none; }
.mc-seg input:focus-visible + span { outline: 2px solid var(--accent); }
.mc-chip-sel select { height: 32px; padding: 0 10px; border: 0; border-radius: 999px; background: var(--bg); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.mc-send { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--on-accent); }
.mc-send:hover:not(:disabled) { background: var(--accent-hover); color: var(--on-accent); }

/* the start: a new creation */
.mc-start { width: 100%; max-width: 760px; margin: 0 auto; padding: 56px 24px 32px; box-sizing: border-box; display: grid; gap: 18px; overflow-y: auto; }
.mc-chat:has(.mc-start) { overflow-y: auto; }
.mc-start h1 { margin: 0; font-size: 34px; font-weight: 800; letter-spacing: -0.02em; text-align: center; }
.mc-start > p { margin: 0 auto; max-width: 600px; color: var(--muted); line-height: 1.55; text-align: center; font-size: 15px; }
.mc-start-price { text-align: center; margin: 0; }
.mc-quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.mc-quick-card { display: grid; gap: 6px; align-content: start; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel-2); color: var(--text); text-align: left; font: inherit; cursor: pointer; }
.mc-quick-card:hover { border-color: var(--border-strong); background: var(--panel); }
.mc-quick-card span { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.mc-recent { margin: 0; text-align: center; font-size: 13px; color: var(--muted); }
.mc-link { padding: 0; border: 0; background: none; color: var(--text); font: inherit; text-decoration: underline; cursor: pointer; }

/* the side panel: plan, progress, result */
.mc-side { display: flex; flex-direction: column; gap: 12px; min-height: 0; overflow-y: auto; padding: 16px; border-left: 1px solid var(--border); background: var(--panel-2); }
.mc-state { display: grid; gap: 12px; }
.mc-side-empty { display: grid; place-items: center; align-content: center; gap: 10px; height: 100%; color: var(--muted); text-align: center; padding: 24px; }
.mc-side-empty svg { width: 28px; height: 28px; }
.mc-card { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--panel); }
.mc-skel i { display: block; height: 58px; border-radius: 10px; background: var(--tag); animation: mc-pulse 1.4s infinite ease-in-out; }
@keyframes mc-pulse { 50% { opacity: .5; } }
.mc-plan-h { display: flex; align-items: baseline; gap: 8px; }
.mc-plan-h h2 { flex: 1; margin: 0; font-size: 16px; font-weight: 800; }
.mc-plan-h span { font-size: 12px; color: var(--muted); }
.mc-plan-text { margin: 0; line-height: 1.55; }
.mc-pill { padding: 3px 9px; border-radius: 999px; background: var(--tag); font-size: 12px; }
.mc-tabs { align-self: flex-start; }
/* the steps: Script → Pictures → Video (an image: Proposal → Images) */
.mc-steps { display: flex; align-items: center; gap: 8px; flex: none; margin: 0; padding: 0; list-style: none; font-size: 12.5px; font-weight: 700; color: var(--faint); white-space: nowrap; }
.mc-steps li { display: inline-flex; align-items: center; gap: 5px; }
.mc-steps li.mc-step-line { flex: 1; min-width: 10px; height: 1px; background: var(--border-strong); }
.mc-steps li span { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid currentColor; font-size: 10.5px; box-sizing: border-box; }
.mc-steps li svg { width: 14px; height: 14px; }
.mc-steps li.done { color: var(--ok); }
.mc-steps li.on { padding: 3px 10px 3px 4px; border-radius: 999px; background: var(--text); color: var(--panel); }
.mc-steps li.on span { border-color: transparent; background: var(--panel); color: var(--text); }
.mc-shots { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.mc-shot-row { display: grid; gap: 8px; min-width: 0; }
.mc-shot-row.vars { padding: 8px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); }
.mc-shot-row.pick { padding: 7px; border: 2px solid var(--warn); background: color-mix(in srgb, var(--warn) 7%, var(--panel)); }
.mc-shot-row.vars .mc-shot { padding: 0; border: 0; background: none; }
.mc-shot-row.vars .mc-shot:hover:not(:disabled) { background: none; }
.mc-shot { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; width: 100%; padding: 8px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); color: var(--text); text-align: left; font: inherit; cursor: pointer; }
.mc-shot.nothumb { grid-template-columns: minmax(0, 1fr); }
.mc-shot:hover:not(:disabled) { border-color: var(--border-strong); background: var(--hover); }
.mc-shot.changed { border: 2px solid var(--ok); padding: 7px; }
.mc-shot-t .mc-warn { color: var(--warn); }
.mc-var { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mc-variant { position: relative; flex: 0 1 132px; min-width: 96px; padding: 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--tag); cursor: pointer; aspect-ratio: 16 / 10; }
.mc-variant img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mc-variant[aria-pressed="true"] { outline: 3px solid var(--accent); outline-offset: -3px; }
.mc-var .mc-sugg { height: 30px; font-size: 12.5px; font-weight: 700; }
.mc-shot-img { position: relative; display: block; width: 96px; aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; background: var(--tag); }
.mc-shot-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mc-noimg { display: grid; place-items: center; align-content: center; gap: 2px; width: 100%; height: 100%; box-sizing: border-box; border: 1.5px dashed var(--idle); border-radius: inherit; background: var(--panel-2); color: var(--muted); font-size: 10.5px; text-align: center; padding: 4px; }
.mc-noimg svg { width: 16px; height: 16px; }
.mc-shot-t { display: grid; gap: 3px; align-content: start; min-width: 0; font-size: 13px; line-height: 1.4; }
.mc-shot-t small { color: var(--muted); font-size: 12px; }
.mc-shot-t small b { color: var(--text); }
.mc-shot-t em { color: var(--ok); font-style: normal; font-weight: 700; }
.mc-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mc-inline { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.mc-inline select { height: 32px; padding: 0 8px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--panel); color: var(--text); font: inherit; }
.mc-approve { display: grid; gap: 8px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--panel); }
.mc-side .mc-approve { position: sticky; bottom: -16px; margin: auto -16px -16px; border-width: 1px 0 0; border-radius: 0; box-shadow: 0 -6px 20px rgb(0 0 0 / 0.04); }
.mc-approve-line { font-size: 13px; color: var(--muted); }
.mc-approve-line .err { color: var(--danger); font-weight: 700; }
.mc-approve .btn.lg { width: 100%; justify-content: center; }
.mc-approve .hint { text-align: center; }
.mc-topup { font-weight: 700; color: var(--text); }
.btn.mc-publish { background: var(--publish); border-color: var(--publish); color: #fff; }
.btn.mc-publish:hover { background: var(--publish-hover); border-color: var(--publish-hover); color: #fff; }
.mc-where { margin: 0; }
.mc-progress .mc-prog-h { display: flex; align-items: center; gap: 10px; }
.mc-progress .spin { width: 18px; height: 18px; }
.mc-bar-track { height: 6px; border-radius: 99px; background: var(--tag); overflow: hidden; }
.mc-bar-track span { display: block; height: 100%; min-width: 6%; background: var(--accent); border-radius: inherit; transition: width .4s; }
.mc-prog-shots { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 10px 8px; }
.mc-prog-shot { display: grid; gap: 4px; min-width: 0; font-size: 12px; color: var(--muted); }
.mc-prog-shot .mc-shot-img { width: 100%; }
.mc-prog-shot small b { color: var(--text); }
.mc-prog-shot.done small { color: var(--ok); }
.mc-prog-shot.run small { color: var(--text); font-weight: 700; }
.mc-prog-shot.run .mc-shot-img { opacity: .6; }
.mc-prog-shot.wait .mc-shot-img { opacity: .4; }
.mc-result video { display: block; width: 100%; max-height: 60vh; border-radius: 12px; background: #000; }
.mc-res-shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; }
.mc-res-shots button { display: grid; gap: 3px; padding: 0; border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.mc-res-shots .mc-shot-img { width: 100%; }
.mc-res-shots small { font-size: 11px; }
.mc-older summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.mc-older a { display: block; padding: 4px 0; font-size: 13px; color: var(--text); }
.mc-used { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--ok); }
.mc-used svg { width: 13px; height: 13px; }
.mc-variants-res { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.mc-variants-res figure { display: grid; gap: 6px; align-content: start; margin: 0; }
.mc-res-pick { position: relative; display: block; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: var(--tag); cursor: pointer; }
.mc-res-pick img { display: block; width: 100%; }
.mc-variants-res figure.on .mc-res-pick { outline: 3px solid var(--accent); outline-offset: -3px; }
.mc-variants-res figcaption { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.mc-open { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12px; text-decoration: none; }
.mc-open:hover { color: var(--text); text-decoration: underline; }
.mc-open svg { width: 13px; height: 13px; }

/* the picker of the website's images and the shot editor (modals) */
.mc-pick-count { margin: 0 0 10px; }
.mc-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; max-height: 56vh; overflow-y: auto; padding: 2px; }
.mc-pick-item { position: relative; display: grid; gap: 4px; cursor: pointer; }
.mc-pick-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; background: var(--tag); border: 2px solid transparent; }
.mc-pick-item input { position: absolute; top: 7px; left: 7px; width: 18px; height: 18px; }
.mc-pick-item input:checked + img { border-color: var(--accent); }
.mc-pick-item span { font-size: 11.5px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-shot-edit { display: grid; gap: 14px; }
.mc-imgfield { display: grid; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.mc-imgfield legend { padding: 0 0 6px; font-size: 13px; font-weight: 700; }
.mc-imgpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.mc-imgpick-site { display: grid; gap: 6px; }
.mc-imgpick-site small { color: var(--muted); font-size: 12px; font-weight: 700; }
.mc-imgopt { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 9px; overflow: hidden; background: var(--tag); cursor: pointer; }
.mc-imgopt input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.mc-imgopt img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mc-imgopt::after { content: ''; position: absolute; inset: 0; border: 2px solid transparent; border-radius: inherit; pointer-events: none; }
.mc-imgopt:has(input:checked)::after { border: 3px solid var(--accent); }
.mc-imgopt:has(input:focus-visible)::after { border-color: var(--accent); box-shadow: inset 0 0 0 5px var(--accent-soft); }
.mc-imgopt.up { display: grid; place-items: center; align-content: center; gap: 2px; border: 1.5px dashed var(--idle); background: var(--panel-2); color: var(--muted); font-size: 11.5px; }
.mc-imgopt.up svg { width: 16px; height: 16px; }
.mc-shot-big .mc-noimg, .mc-shot-big img { display: grid; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); background: var(--tag); font-size: 13px; }
.mc-shot-edit textarea, .mc-prompt textarea { width: 100%; padding: 9px 11px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--panel); color: var(--text); font: inherit; font-size: 14px; line-height: 1.45; resize: vertical; box-sizing: border-box; }
.mc-prompt summary { cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 700; padding: 2px 0; }
.mc-prompt textarea { margin-top: 6px; font-family: var(--mono); font-size: 12.5px; }
.mc-prompt .field { margin-top: 10px; }
.mc-shot-acts .btn { flex: 1; justify-content: center; }
.mc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.mc-refs-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.mc-refs-pick label { position: relative; cursor: pointer; }
.mc-refs-pick img { display: block; width: 96px; height: 64px; object-fit: cover; border-radius: 8px; }
.mc-refs-pick input { position: absolute; top: 5px; left: 5px; width: 18px; height: 18px; }
.tool .tool-cta { grid-column: 2; justify-self: start; margin: 4px 0 2px; }

/* below 1100 px the steps and the next step stay above the composer */
.mc-dock { display: grid; gap: 8px; width: calc(100% - 32px); max-width: 760px; margin: 0 auto 8px; box-sizing: border-box; }
.mc-dock:empty { display: none; }
.mc-dock .mc-approve { padding: 10px 12px; gap: 6px; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.mc-dock .mc-approve .btn.lg { height: 42px; }
.mc-dock .mc-where input { height: 36px; }
@media (max-width: 900px) {
  .mc-state-pill { display: none; }
  .mc-msgs { padding: 16px 16px 12px; gap: 14px; }
  .mc-compose { width: calc(100% - 24px); margin-bottom: 12px; }
  .mc-start { padding: 28px 16px 20px; }
  .mc-start h1 { font-size: 26px; }
  .mc-quick { grid-template-columns: 1fr; }
  .mc-dock { width: calc(100% - 24px); }
  .mc-msg.me { max-width: 90%; }
}
@media (max-width: 640px) {
  .mc-bar .site-title { display: flex; max-width: none; }
  .mc-send, .mc-attach { width: 44px; height: 44px; }
  .mc-dock .mc-approve .hint, .mc-dock [data-save] { display: none; }
  .mc-shot { grid-template-columns: 76px minmax(0, 1fr); }
  .mc-shot-img { width: 76px; }
  .mc-variant { flex-basis: calc(50% - 4px); }
  .mc-steps { font-size: 12px; gap: 6px; }
  .mc-compose-row .btn.ghost span { display: none; }
  .modal-backdrop:has(.mc-sheet) { padding: 0; }
  .modal.mc-sheet { margin: auto 0 0; width: 100%; border-radius: 22px 22px 0 0; max-height: 92%; overflow-y: auto; }
}

/* Background agents */
.ag-list { display: grid; gap: 10px; }
.ag-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; color: inherit; text-decoration: none; }
.ag-main { display: grid; gap: 2px; min-width: 0; }
.ag-main small, .ag-proposal header small, .ag-proposal time { color: var(--muted); }
.ag-side { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; flex: none; max-width: 60%; }
.ag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.ag-tpl { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 18px 20px; }
.ag-tpl p { margin: 0; flex: 1; color: var(--muted); line-height: 1.5; }
.ag-when { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 0 12px; }
.ag-back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 12px; color: var(--muted); font-weight: 600; text-decoration: none; }
.ag-back:hover { color: var(--text); }
.ag-back svg { width: 16px; height: 16px; }
.ag-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
/* states are colour and word: active green, waiting / no credit amber, failed / critical red, working blue */
.ag-st.is-ok { background: var(--ok-soft); color: var(--ok); }
.ag-st.is-warn { background: rgb(240 140 0 / .15); color: var(--warn); }
.ag-st.is-bad { background: var(--danger-soft); color: var(--danger); }
.ag-st.is-run { background: rgb(59 91 219 / .14); color: #3b5bdb; }
.ag-more .menu { min-width: 200px; }
.ag-more .menu > button.danger, .ag-more .menu > button.danger svg { color: var(--danger); }
.ag-more #ag-more { width: 44px; height: 44px; border: 1px solid var(--border-strong); background: var(--panel); }
.ag-proposal { margin-bottom: 14px; padding: 18px 22px; }
.ag-proposal header { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ag-proposal h3 { margin: 16px 0 8px; font-size: 15px; }
.ag-proposal footer { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.ag-summary { margin: 12px 0; line-height: 1.55; }
.ag-findings, .ag-actions { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.ag-text { margin-top: 4px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; color: var(--muted); }
.ag-action { padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius); }
.ag-action-head { display: flex; align-items: center; gap: 8px; }
.ag-values { display: grid; grid-template-columns: minmax(80px, max-content) 1fr; gap: 2px 12px; margin: 8px 0 0; }
.ag-values dt { color: var(--muted); }
.ag-values dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 640px) { .ag-row { flex-direction: column; align-items: flex-start; } .ag-side { justify-content: flex-start; max-width: 100%; } }

/* Features in testing (Organizations) */
.feat-plans { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 2px; }

/* Plan editor (public/plan-editor.js): areas of buildings, floors and units on the plan images, step by step */
.pe-backdrop { padding: 16px; }
.pe-modal { width: min(1480px, 100%); height: min(940px, calc(100vh - 32px)); display: flex; flex-direction: column; overflow: hidden; }
.pe-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.pe-head h2 { margin-right: 10px; }
.pe-head-gap { flex: 1; }
.pe-steps { display: flex; align-items: center; gap: 4px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.pe-step { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px 0 6px; border: 1px solid transparent; border-radius: 99px; background: none; color: var(--muted); font: inherit; font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.pe-step:hover { background: var(--hover); color: var(--text); }
.pe-step.is-on { border-color: var(--border-strong); background: var(--panel-2); color: var(--text); }
.pe-step-n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--hover); color: var(--text); font-size: 13px; font-weight: 800; }
.pe-step.is-on .pe-step-n { background: var(--accent); color: var(--on-accent); }
.pe-step.is-done .pe-step-n { background: var(--ok); color: #fff; }
.pe-step-n svg { width: 15px; height: 15px; }
.pe-step small, .pe-chip small { color: var(--muted); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pe-step-line { flex: none; width: 18px; height: 2px; border-radius: 2px; background: var(--border-strong); }
.pe-saved { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.pe-saved svg { width: 15px; height: 15px; }
.pe-saved.is-saved svg { color: var(--ok); }
.pe-saved.is-error { color: var(--danger); }
.pe-saved .spin { width: 12px; height: 12px; }
.pe-saved button.link { padding: 0; border: 0; background: none; color: inherit; font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
.pe-parents { display: flex; align-items: center; gap: 6px; padding: 8px 16px; border-top: 1px solid var(--border); overflow-x: auto; scrollbar-width: thin; }
.pe-parents[hidden] { display: none; }
.pe-parents-label { flex: none; margin-right: 4px; color: var(--muted); font-size: 13px; font-weight: 600; }
.pe-chip { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--border); border-radius: 99px; background: var(--panel); color: var(--text); font: inherit; font-size: 13.5px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.pe-chip:hover { background: var(--hover); }
.pe-chip.is-on { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.pe-chip.is-on small { color: inherit; opacity: .8; }
.pe-chip svg { width: 14px; height: 14px; color: var(--ok); }
.pe-chip.is-on svg { color: inherit; }
.pe-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 340px; border-top: 1px solid var(--border); }
.pe-main { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.pe-canvas { flex: 1; min-height: 0; overflow: auto; background: var(--canvas); background-image: radial-gradient(var(--canvas-dot) 1px, transparent 1px); background-size: 16px 16px; padding: 20px 20px 64px; outline: none; }
.pe-empty { max-width: 520px; margin: 48px auto; color: var(--muted); text-align: center; }
.pe-float { position: absolute; right: 14px; bottom: 14px; display: flex; gap: 2px; padding: 3px; border: 1px solid var(--border); border-radius: 12px; background: var(--panel); box-shadow: var(--shadow); }
.pe-float button { min-width: 32px; height: 30px; padding: 0 8px; border: 0; border-radius: 9px; background: none; color: var(--text); font: inherit; font-weight: 700; cursor: pointer; }
.pe-float button:hover { background: var(--hover); }
.pe-float .pe-zoomval { min-width: 58px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pe-float [data-help] { border-left: 1px solid var(--border); border-radius: 0 9px 9px 0; }
.pe-keys { position: absolute; right: 14px; bottom: 58px; z-index: 4; max-width: 420px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--panel); box-shadow: var(--shadow); font-size: 13px; color: var(--muted); }
.pe-keys[hidden] { display: none; }
.pe-keys ul { margin: 0; padding-left: 18px; line-height: 1.7; }
.pe-keys kbd { padding: 0 5px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 5px; background: var(--panel); font: 600 11px/1.6 inherit; color: var(--text); }
.pe-stage { position: relative; margin: 0 auto; user-select: none; touch-action: none; box-shadow: var(--shadow); background: #fff; }
.pe-stage.is-pan, .pe-stage.is-pan * { cursor: grab !important; }
.pe-stage.is-panning, .pe-stage.is-panning * { cursor: grabbing !important; }
.pe-stage > img { display: block; width: 100%; height: auto; pointer-events: none; }
.pe-stage > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.pe-stage.is-waiting > svg, .pe-stage.is-waiting [data-areas] polygon { cursor: crosshair; }
.pe-stage polygon, .pe-stage polyline, .pe-stage line { vector-effect: non-scaling-stroke; }
.pe-stage [data-areas] polygon, .pe-stage [data-areas] polyline { stroke: #fff; stroke-width: 1.5; fill: rgb(46 160 67 / .32); cursor: pointer; transition: fill .2s, opacity .12s; }
.pe-stage [data-areas] .is-hover { stroke: #3b5bdb; stroke-width: 2.5; fill: rgb(59 91 219 / .22); }
.pe-stage [data-areas] .is-done { fill: rgb(46 160 67 / .6); stroke: #2b8a3e; stroke-width: 3; }
.pe-stage [data-areas] polygon.is-sel { fill: rgb(59 91 219 / .28); stroke: #3b5bdb; stroke-width: 2.5; }
.pe-stage [data-areas] polyline.is-sel { fill: rgb(59 91 219 / .12); stroke: #3b5bdb; stroke-width: 2.5; }
.pe-preview { fill: rgb(59 91 219 / .1); stroke: none; pointer-events: none; }
.pe-preview.is-rect { fill: rgb(59 91 219 / .2); stroke: #3b5bdb; stroke-width: 2; stroke-dasharray: 6 4; }
.pe-rubber { stroke: #3b5bdb; stroke-width: 2; stroke-dasharray: 6 4; pointer-events: none; }
.pe-closing { stroke: #3b5bdb; stroke-width: 1; stroke-dasharray: 2 4; opacity: .7; pointer-events: none; }
.pe-layer { position: absolute; inset: 0; pointer-events: none; }
.pe-label { position: absolute; transform: translate(-50%, -50%); padding: 2px 7px; border-radius: 7px; background: rgb(255 255 255 / .9); color: #121212; font-size: 12px; font-weight: 700; white-space: nowrap; box-shadow: 0 1px 3px rgb(0 0 0 / .15); }
.pe-label.is-sel { background: #3b5bdb; color: #fff; }
.pe-pt, .pe-mid { position: absolute; transform: translate(-50%, -50%); padding: 0; border-radius: 50%; pointer-events: auto; cursor: grab; }
.pe-pt { width: 14px; height: 14px; background: #fff; border: 2px solid #3b5bdb; box-shadow: 0 0 0 1px rgb(255 255 255 / .8); }
.pe-pt:hover { width: 18px; height: 18px; background: #3b5bdb; }
.pe-pt.is-first { width: 18px; height: 18px; background: #3b5bdb; cursor: pointer; animation: pe-pulse 1.4s ease-in-out infinite; }
@keyframes pe-pulse { 50% { box-shadow: 0 0 0 7px rgb(59 91 219 / .25); } }
.pe-mid { width: 9px; height: 9px; background: rgb(59 91 219 / .5); border: 1px solid #fff; cursor: copy; }
.pe-mid:hover { width: 13px; height: 13px; background: #3b5bdb; }
.pe-guides { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.pe-guides[hidden] { display: none; }
.pe-hline, .pe-vline { position: absolute; background: rgb(59 91 219 / .45); }
.pe-hline { left: 0; right: 0; height: 1px; }
.pe-vline { top: 0; bottom: 0; width: 1px; }
.pe-snapring { position: absolute; width: 18px; height: 18px; transform: translate(-50%, -50%); border: 2px solid #f08c00; border-radius: 50%; background: rgb(240 140 0 / .2); }
.pe-snapring.is-edge { border-radius: 3px; transform: translate(-50%, -50%) rotate(45deg); width: 14px; height: 14px; }
.pe-snapring[hidden] { display: none; }
.pe-loupe { position: absolute; width: 170px; height: 170px; border-radius: 50%; overflow: hidden; border: 3px solid #fff; box-shadow: 0 0 0 1px rgb(0 0 0 / .25), 0 10px 30px rgb(0 0 0 / .3); background: #fff; pointer-events: none; z-index: 3; }
.pe-loupe[hidden] { display: none; }
.pe-loupe.is-snap { border-color: #f08c00; }
.pe-loupe-in { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.pe-loupe-in img { display: block; width: 100%; height: 100%; }
.pe-loupe-in svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.pe-loupe-in polygon, .pe-loupe-in polyline, .pe-loupe-in line { vector-effect: non-scaling-stroke; }
.pe-loupe-in polygon:not(.pe-preview), .pe-loupe-in polyline { fill: rgb(59 91 219 / .14); stroke: #3b5bdb; stroke-width: 2; }
.pe-loupe-in .pe-preview { fill: rgb(59 91 219 / .1); }
.pe-loupe-in .pe-rubber, .pe-loupe-in .pe-closing { stroke: #3b5bdb; stroke-width: 2; stroke-dasharray: 6 4; }
.pe-lpt { fill: #3b5bdb; }
.pe-loupe::before, .pe-loupe::after { content: ""; position: absolute; z-index: 1; background: rgb(201 42 42 / .8); }
.pe-loupe::before { left: 50%; top: 35%; bottom: 35%; width: 1px; }
.pe-loupe::after { top: 50%; left: 35%; right: 35%; height: 1px; }
.pe-side { display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--border); background: var(--panel); }
/* the guide: what to do now */
.pe-coach { padding: 18px 18px 16px; border-bottom: 1px solid var(--border); font-size: 14px; line-height: 1.5; }
.pe-coach:empty { display: none; }
.pe-ctx { margin: 0 0 6px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.pe-coach h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 19px; line-height: 1.3; }
.pe-coach h3 svg { flex: none; width: 20px; height: 20px; color: var(--ok); }
.pe-coach p { margin: 0 0 10px; }
.pe-coach .pe-sub { color: var(--muted); font-size: 13px; }
.pe-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.pe-acts:empty { display: none; }
.pe-acts + .pe-acts { margin-top: 10px; }
.pe-acts .btn svg { width: 15px; height: 15px; }
.pe-copy { margin-top: 14px; padding: 12px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--border); }
.pe-copy p { margin: 0 0 8px; font-weight: 600; }
/* a tiny picture of dragging a rectangle */
.pe-how { position: relative; height: 64px; margin: 4px 0 12px; border-radius: 10px; background: var(--panel-2); border: 1px dashed var(--border-strong); overflow: hidden; }
.pe-how-box { position: absolute; left: 22%; top: 18px; width: 0; height: 0; border: 2px dashed #3b5bdb; border-radius: 3px; background: rgb(59 91 219 / .15); animation: pe-how-box 2.6s ease-in-out infinite; }
.pe-how-cursor { position: absolute; left: 22%; top: 18px; width: 14px; height: 14px; margin: -2px 0 0 -2px; border-radius: 50%; background: #3b5bdb; box-shadow: 0 0 0 4px rgb(59 91 219 / .25); animation: pe-how-cursor 2.6s ease-in-out infinite; }
@keyframes pe-how-box { 0%, 12% { width: 0; height: 0; opacity: 1; } 62%, 86% { width: 56%; height: 28px; opacity: 1; } 100% { width: 56%; height: 28px; opacity: 0; } }
@keyframes pe-how-cursor { 0%, 12% { transform: translate(0, 0); } 62%, 86% { transform: translate(170px, 28px); opacity: 1; } 100% { transform: translate(170px, 28px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .pe-how-box, .pe-how-cursor { animation: none; } .pe-how-box { width: 56%; height: 28px; } .pe-how-cursor { display: none; } }
.pe-list-head { display: grid; gap: 6px; padding: 12px 14px 6px; font-size: 13px; }
.pe-list-head:has([data-count]:empty):has([data-search][hidden]) { display: none; }
.pe-bar { display: block; height: 6px; border-radius: 6px; background: var(--hover); overflow: hidden; }
.pe-bar span { display: block; height: 100%; border-radius: 6px; background: var(--ok); transition: width .2s; }
.pe-search { height: 34px; }
.pe-list { flex: 1; min-height: 0; overflow: auto; margin: 0; padding: 4px 6px 10px; list-style: none; }
.pe-list li { margin: 0; padding: 0; }
.pe-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border: 0; border-radius: 10px; background: none; color: inherit; font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.pe-row:hover, .pe-row.is-hover { background: var(--hover); }
.pe-row.is-drawn .pe-name { color: var(--muted); }
.pe-row.is-sel { background: rgb(59 91 219 / .14); font-weight: 700; box-shadow: inset 3px 0 0 #3b5bdb; }
.pe-row.is-sel .pe-name { color: var(--text); }
.pe-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pe-now { flex: none; padding: 1px 8px; border-radius: 99px; background: #3b5bdb; color: #fff; font-size: 11px; font-weight: 700; }
.pe-ok { display: inline-grid; place-items: center; }
.pe-ok svg { width: 16px; height: 16px; color: var(--ok); }
.pe-miss { flex: none; width: 14px; height: 14px; border: 1.5px dashed var(--idle); border-radius: 4px; }
.pe-none { padding: 14px; color: var(--muted); font-size: 13px; }
.pe-error { margin: 0; padding: 10px 16px; }
@media (max-width: 960px) {
  .pe-body { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .pe-side { max-height: 46vh; border-left: 0; border-top: 1px solid var(--border); }
  .pe-steps { order: 5; flex: 1 1 100%; }
  .pe-how { display: none; }
}
@media (max-width: 640px) {
  .pe-backdrop { padding: 0; }
  .pe-modal { height: 100dvh; border-radius: 0; }
  .pe-head h2 { flex: 1; min-width: 0; font-size: 17px; }
  .pe-head .pe-head-gap { display: none; }
  .pe-step { padding-right: 10px; }
  .pe-saved span:not(.spin) { display: none; }
  .pe-coach { padding: 12px 14px; }
  .pe-coach h3 { font-size: 16px; }
}

/* --- Editor bar (UX redesign 11/2026): name and page left, preview tools in the centre, one Publish on the right --- */
.ed-bar .bar-ic { position: relative; width: 34px; height: 34px; }
.ed-bar .bar-ic .count { position: absolute; top: -3px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px; font-size: 10.5px; border: 2px solid var(--panel); box-sizing: content-box; }
.ed-bar .bar-center .bar-group { margin-left: 2px; }
.pub-wrap { display: inline-flex; flex: none; }
#publish-btn.pub-btn { gap: 7px; padding: 0 6px 0 14px; white-space: nowrap; }
#publish-btn .pub-step { align-self: stretch; display: inline-flex; align-items: center; margin-left: 4px; padding: 0 4px 0 10px; border-left: 1px solid rgb(255 255 255 / 35%); font-weight: 600; font-size: 12.5px; font-variant-numeric: tabular-nums; }
#publish-btn.pub-btn:not(.primary) { padding: 0 14px; border-color: var(--border); background: var(--panel); color: var(--ok); }
#publish-btn.pub-btn:not(.primary) .pub-step { border-left-color: var(--border); }
#publish-btn[aria-expanded="true"] { box-shadow: 0 0 0 3px color-mix(in srgb, var(--publish, var(--ok)) 25%, transparent); }
.narrow-only { display: none !important; }
@media (max-width: 900px) { .narrow-only { display: flex !important; } }
@media (max-width: 560px) {
  #publish-btn.pub-btn { padding: 0 4px 0 10px; }
  #publish-btn .pub-lbl { display: none; }
  #publish-btn .pub-step { margin-left: 0; padding-left: 7px; }
}
.more-menu .menu-pro { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--border); }

/* Path to publishing (popover under the Publish button) */
.pub-pop { width: min(390px, calc(100vw - 20px)); max-height: min(80vh, 640px); }
.pub-pop .popover-head { border-bottom: 0; padding-bottom: 6px; }
.pp-count { font-size: 12.5px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.pp-progress { display: block; height: 5px; margin: 0 14px 4px; border-radius: 99px; background: var(--panel-2); overflow: hidden; flex: none; }
.pp-progress i, .pp-bar i { display: block; height: 100%; border-radius: 99px; background: var(--publish, var(--ok)); transition: width .3s; }
.pub-pop .popover-body { padding: 8px 10px 12px; }
.pp-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pp-steps li { display: flex; align-items: flex-start; gap: 10px; padding: 10px 10px 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.pp-steps li.done .gs-ic { background: var(--publish, var(--ok)); border-color: var(--publish, var(--ok)); color: #fff; }
.pp-main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.pp-main b { font-size: 13.5px; }
.pp-main > small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.pp-act { flex: none; display: flex; align-items: center; gap: 4px; align-self: center; }
.pp-act .btn { height: 30px; white-space: nowrap; }
.pp-bar { display: block; height: 4px; margin-top: 4px; border-radius: 99px; background: var(--panel-2); overflow: hidden; }
.pp-facts { display: grid; gap: 8px; margin-top: 6px; }
.pp-facts .field span { font-size: 12.5px; }
.pp-foot { display: grid; gap: 6px; margin-top: 12px; }
.pp-foot .pp-go { width: 100%; justify-content: center; height: 40px; background: var(--publish, var(--ok)); border-color: var(--publish, var(--ok)); color: #fff; }
.pp-foot .pp-go:hover:not(:disabled) { background: var(--publish-hover, var(--publish)); }
.pp-foot .pp-go:disabled { background: var(--panel-2); border-color: var(--border); color: var(--muted); opacity: 1; }
.pp-foot .hint { margin: 0; text-align: center; font-size: 12px; overflow-wrap: anywhere; }

/* Agent progress: a finished task is one line, Details unfold the steps */
.msg-run.folded .run-body > .tools, .msg-run.folded .run-body > .thinking { display: none; }
.run-foot .run-details { display: inline-flex; align-items: center; gap: 2px; }
.run-foot .run-details .chev { width: 13px; height: 13px; transition: transform .15s; }
.run-foot .run-details[aria-expanded="true"] .chev { transform: rotate(90deg); }

/* Website settings: six groups, embedded forms / marketing / data (nothing leaves the dialog) */
.sd-group[data-group] { display: grid; gap: 2px; }
.sd-pro { flex: none; padding: 1px 7px; border-radius: 999px; background: color-mix(in srgb, #4f46e5 14%, transparent); color: #4f46e5; font-size: 11px; font-weight: 750; }
.sd-item[aria-current="true"] .sd-pro { background: rgb(255 255 255 / .22); color: inherit; }
.xp-body > .xp:first-of-type, .xp-body > .xp:not([hidden]):first-child { border-top: 0; }
.xp h4 { margin: 10px 0 0; font-size: 13.5px; }
.xp h3 .sd-badge { font-weight: 700; }
.modal-embed > .modal { width: auto; margin: 0; border-radius: 0; box-shadow: none; animation: none; background: none; }
.modal-embed .modal-head { display: none; }
.modal-embed .modal-body { padding: 0; }
.xp-embed { gap: 12px; }
.mk-embed { display: grid; gap: 12px; min-width: 0; }
.mk-embed .mk { display: grid; gap: 12px; }
.mk-embed .mk-sec { padding: 0; border-radius: 0; background: none; }
.mk-embed .mk-sec + .mk-sec { padding-top: 14px; border-top: 1px solid var(--border); }
.mk-embed .mk-sec h2 { font-size: 15px; }
.mk-embed .mk-sec p { font-size: 13px; }
.row-more { position: relative; display: inline-flex; }
.row-more .menu { min-width: 200px; }
.user-menu .menu > .menu-item.danger { color: var(--danger); }
.user-menu .menu > .menu-item.danger svg { color: currentColor; }

/* CRM builder: progress while the preview signs in and loads */
.crm-wait {
  position: absolute; inset: 0; z-index: 6; display: flex; align-items: center; justify-content: center; gap: 10px;
  background: color-mix(in srgb, var(--bg, var(--panel)) 88%, transparent); color: var(--muted); font-size: 13.5px; font-weight: 600;
  animation: fade .2s ease;
}
.crm-builder .bar-left .as-role { flex: none; margin-left: 6px; }
@media (max-width: 900px) { .crm-builder .bar-left .as-role { display: none; } }

/* Plugins section */
.pl-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 18px; padding: 12px 16px; border-radius: var(--radius-lg); background: var(--panel); color: var(--text); font-size: 14.5px; }
.pl-note > svg { flex: none; color: var(--muted); }
.pl-note > span { flex: 1 1 240px; }
.pl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.pl-card { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px 16px; cursor: pointer; border: 1px solid transparent; transition: border-color .15s, box-shadow .15s; }
.pl-card:hover, .pl-card:focus-visible { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.pl-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pl-card h3 { margin: 6px 0 0; font-size: 16.5px; font-weight: 750; letter-spacing: -0.01em; }
.pl-card p { margin: 0; flex: 1; color: var(--muted); font-size: 14px; line-height: 1.5; }
.pl-card.is-soon { cursor: default; background: transparent; border: 1px dashed var(--border-strong); }
.pl-card.is-soon:hover { box-shadow: none; }
.pl-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pl-ic { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--accent-soft); color: var(--accent-text); }
.pl-ic svg { width: 20px; height: 20px; }
.is-soon .pl-ic { background: var(--tag); color: var(--muted); }
.pl-new { background: var(--accent-soft); color: var(--accent-text); }
.pl-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 32px; margin-top: 8px; }
.pl-used { display: inline-flex; align-items: center; gap: 5px; color: var(--ok); font-size: 13px; font-weight: 700; }
.pl-used svg { width: 15px; height: 15px; }
.pl-price { color: var(--muted); font-size: 13px; font-weight: 600; }
.pl-detail > p { margin: 0 0 10px; line-height: 1.55; }
.pl-detail h3 { margin: 18px 0 8px; font-size: 14px; font-weight: 750; }
.pl-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 14px 0 0; font-size: 14px; }
.pl-facts dt { color: var(--muted); font-weight: 600; }
.pl-facts dd { margin: 0; }
.pl-sites { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; max-height: 260px; overflow: auto; overscroll-behavior: contain; }
.pl-site-row { padding: 6px 10px; border-radius: 8px; background: var(--hover); font-size: 14px; }
.pl-detail h3 small { color: var(--muted); font-weight: 600; }
.pl-detail .field { margin-top: 16px; }
.pl-site-row a { font-weight: 700; color: var(--text); }
.pl-items { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 13.5px; }
.pl-items li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 10px; }
.pl-items small { color: var(--muted); }
.pl-items .is-bad { background: var(--danger-soft); color: var(--danger); }
.pl-items .is-warn { background: rgb(240 140 0 / .15); color: var(--warn); }

/* CRM overview: list for hundreds of CRMs */
.crml-bar { flex-wrap: wrap; gap: 8px; }
.crml-org { width: auto; max-width: 220px; height: 34px; border-radius: 999px; padding: 0 12px; }
.crml-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.crml-name > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.crml-name small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 340px; }
.crml-ini { display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 10px; font-weight: 800; font-size: 13px; background: var(--tint, var(--hover)); color: var(--text); }
.crml-tbl .row-actions { white-space: nowrap; text-align: right; }
.crml-tbl .row-actions .icon-btn { display: inline-grid; }
.pill-st { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 650; white-space: nowrap; background: var(--hover); color: var(--muted); }
.pill-st .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .8; }
.pill-st.live { background: color-mix(in srgb, #2f8a55 13%, transparent); color: #2f7a4d; }
.pill-st.chg { background: color-mix(in srgb, #d97706 15%, transparent); color: #92400e; }
.pill-st.run { background: color-mix(in srgb, #2563eb 13%, transparent); color: #1e40af; }
:root[data-theme="dark"] .pill-st.live { color: #4ade80; }
:root[data-theme="dark"] .pill-st.chg { color: #fbbf24; }
:root[data-theme="dark"] .pill-st.run { color: #93c5fd; }
.crml-more { display: flex; justify-content: center; margin: 14px 0; }
.crml-more:empty { display: none; }
.crml-tpl { margin-top: 28px; }
.crml-tpl > summary { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--muted); }
.crml-tpl > summary svg { width: 15px; height: 15px; }
.crml-tpl[open] > summary { margin-bottom: 8px; }


/* What a credit buys: popover on the credit badge, first-run card in the editor */
.credit-pop { width: min(380px, calc(100vw - 20px)); }
.credit-pop .popover-body { padding: 14px 16px 16px; }
.cg-balance { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.cg-balance b { font-size: 30px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.cg-balance span { font-weight: 600; color: var(--muted); }
.cg-balance small { flex-basis: 100%; font-size: 13.5px; color: var(--text); }
.cg-expire { display: flex; gap: 8px; margin: 12px 0 0; padding: 9px 11px; border-radius: var(--radius-sm); background: var(--panel-2); font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.cg-expire svg { flex: none; width: 15px; height: 15px; margin-top: 1px; }
.cg-h { margin: 16px 0 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--faint); }
.cg-list { list-style: none; margin: 0; padding: 0; }
.cg-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--border); }
.cg-list li:last-child { border-bottom: 0; }
.cg-list span { display: flex; flex-direction: column; min-width: 0; }
.cg-list b { font-size: 13.5px; font-weight: 600; }
.cg-list small { font-size: 12px; color: var(--faint); }
.cg-list em { flex: none; font-style: normal; font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cg-note { margin: 12px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.cg-foot { display: flex; justify-content: flex-end; margin-top: 14px; }
.run-left { font-weight: 500; opacity: .8; }
.credit-intro { margin: 0 12px 10px; padding: 12px 14px 14px; border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border)); border-radius: var(--radius); background: color-mix(in srgb, var(--accent) 6%, var(--panel)); font-size: 13px; line-height: 1.5; }
.credit-intro[hidden] { display: none; }
.ci-head { display: flex; align-items: center; gap: 8px; margin: -4px -6px 4px 0; }
.ci-head > svg { width: 17px; height: 17px; color: var(--credit-star, #f5c542); fill: currentColor; }
.ci-head b { flex: 1; font-size: 14px; }
.credit-intro p { margin: 0 0 6px; }
.credit-intro .cg-list li { padding: 5px 0; }
.credit-intro .ci-tip { margin: 8px 0 10px; color: var(--muted); font-size: 12.5px; }

/* Plugins picker in the editor (the Plugins button above the chat) */
.modal.pp-modal { width: min(620px, 100%); }
.pp-modal .modal-body { max-height: min(70vh, 640px); overflow-y: auto; }
.pp-modal .hint { margin: 0 0 10px; }
.pp-search { margin-bottom: 10px; }
.pp-cats { flex-wrap: nowrap; gap: 6px; margin: 0 -26px 12px; padding: 0 26px; overflow-x: auto; scrollbar-width: none; }
.pp-cats::-webkit-scrollbar { display: none; }
.pp-cats .pill { flex: none; }
.pp-cats .pill { padding: 5px 11px; font-size: 13px; }
.pp-grid { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.pp-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 10px; border: 0; border-radius: 14px; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.pp-item:hover, .pp-item:focus-visible { background: var(--hover); }
.pp-item:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.pp-item > svg { flex: none; width: 16px; height: 16px; color: var(--muted); }
.pp-item .pl-ic { flex: none; width: 34px; height: 34px; border-radius: 10px; }
.pp-txt { display: grid; gap: 2px; flex: 1; min-width: 0; }
.pp-txt b { font-size: 14.5px; font-weight: 700; }
.pp-txt small { color: var(--muted); font-size: 13px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pp-on { margin-left: 4px; vertical-align: 1px; }
.pp-modal button.link, .pp-modal a.link { display: inline-flex; align-items: center; gap: 4px; border: 0; padding: 0; background: none; color: var(--muted); font: inherit; font-size: 13.5px; font-weight: 650; text-decoration: none; cursor: pointer; }
.pp-modal .link:hover { color: var(--text); }
.pp-modal .link svg { width: 15px; height: 15px; }
.pp-all { margin: 12px 0 6px; }
.pp-back { margin-bottom: 12px; }
.pp-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.pp-head h3 { margin: 0; font-size: 18px; font-weight: 750; }
.pp-detail > p { margin: 0 0 8px; }
.pp-detail .field { margin-top: 12px; }
.pp-detail textarea { width: 100%; resize: vertical; }

/* Patterns: the gallery (a modal in the editor, the Patterns page) */
.modal.pt-modal { width: min(880px, 100%); }
.pt-modal .modal-body { max-height: min(76vh, 760px); overflow-y: auto; padding-bottom: 20px; }
.pt-modal h2 small { margin-left: 6px; color: var(--muted); font-size: 14px; font-weight: 600; }
.pt-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 10px; }
.pt-kinds button { display: inline-flex; align-items: center; gap: 6px; }
.pt-kinds button[aria-selected="true"] { background: var(--text); color: var(--bg); }
.pt-kinds svg { width: 15px; height: 15px; }
.pt-search { flex: 1; min-width: 200px; }
.pt-cats { flex-wrap: nowrap; gap: 6px; margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.pt-cats::-webkit-scrollbar { display: none; }
.pt-cats .pill { flex: none; padding: 5px 11px; font-size: 13px; }
.pt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.pt-grid > .empty { grid-column: 1 / -1; }
.pt-card { display: flex; flex-direction: column; gap: 8px; width: 100%; height: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 16px; background: var(--panel); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.pt-card:hover, .pt-card:focus-visible { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.pt-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pt-thumb { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 8; border-radius: 11px; background: var(--accent-soft); color: var(--accent-text); overflow: hidden; }
.pt-thumb svg { width: 30px; height: 30px; opacity: .85; }
.pt-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pt-thumb em { position: absolute; right: 8px; bottom: 8px; padding: 2px 7px; border-radius: 999px; background: var(--panel); color: var(--text); font-size: 11px; font-style: normal; font-weight: 750; }
.pt-txt { display: grid; gap: 3px; flex: 1; }
.pt-txt b { font-size: 15px; font-weight: 750; line-height: 1.3; }
.pt-txt small { color: var(--muted); font-size: 13px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pt-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; color: var(--muted); font-size: 12px; }
.pt-cost { display: inline-flex; align-items: center; gap: 3px; margin-left: auto; font-weight: 650; }
.pt-cost svg { width: 12px; height: 12px; }
.pt-src.is-community { background: var(--accent-soft); color: var(--accent-text); }
.pt-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.pt-foot .hint { flex: 1; min-width: 220px; margin: 0; }
.pt-detail .pp-head .badge { margin-top: 4px; }
.pt-detail textarea { width: 100%; resize: vertical; }
.pt-detail .field { margin-top: 12px; }
.pt-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.pt-wrap button.link, .pt-wrap a.link { display: inline-flex; align-items: center; gap: 4px; border: 0; padding: 0; background: none; color: var(--muted); font: inherit; font-size: 13.5px; font-weight: 650; cursor: pointer; }
.pt-wrap .link svg { width: 15px; height: 15px; }
.pt-wrap .pp-back { margin-bottom: 12px; }
.chat-empty .pt-more { margin-top: 12px; }
@media (max-width: 600px) {
  .pt-grid { grid-template-columns: 1fr; }
  .pt-thumb { aspect-ratio: 16 / 6; }
  .pt-actions .mc-grow { display: none; }
  .pt-actions .btn.primary { width: 100%; justify-content: center; }
}
.pt-thumb:not(.has-img) { aspect-ratio: auto; height: 64px; }
.pt-detail textarea { min-height: 150px; }

/* Creator: videos for social networks */
.mc-cap { display: flex; align-items: center; gap: 5px; margin-top: 4px; color: var(--accent-text); font-size: 12.5px; font-style: normal; font-weight: 650; }
.mc-cap svg { width: 13px; height: 13px; flex: none; }
.mc-social { margin-top: 14px; padding: 14px; border-radius: 14px; background: var(--bg); }
.mc-social dl { display: grid; gap: 4px 0; margin: 0 0 10px; }
.mc-social dt { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12.5px; font-weight: 750; color: var(--muted); }
.mc-social dt svg { width: 14px; height: 14px; }
.mc-social dd { margin: 0; font-size: 14px; line-height: 1.5; white-space: pre-line; }
.mc-post { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--bg); }
.mc-post p { margin: 6px 0 0; font-size: 14px; line-height: 1.5; white-space: pre-line; }
.mc-result video.mc-reel { max-height: 70vh; width: auto; max-width: 100%; margin: 0 auto; display: block; aspect-ratio: 9 / 16; background: #000; }

/* AI chat on the website: conversations in the website settings */
.ch-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.ch-item { width: 100%; display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; align-items: center; padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel, transparent); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.ch-item:hover { border-color: var(--accent, currentColor); }
.ch-when { color: var(--muted); font-size: 13px; white-space: nowrap; }
.ch-first { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-transcript { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-height: 60vh; overflow-y: auto; }
.ch-transcript li { padding: 8px 12px; border-radius: 12px; max-width: 85%; }
.ch-transcript li small { display: block; color: var(--muted); font-size: 12px; margin-bottom: 2px; }
.ch-transcript li div { white-space: pre-wrap; }
.ch-transcript .ch-v { justify-self: end; background: var(--accent-soft, rgba(0, 0, 0, .06)); }
.ch-transcript .ch-a { justify-self: start; border: 1px solid var(--border); }
.ch-transcript .ch-sys { justify-self: center; color: var(--muted); font-size: 13px; }
@media (max-width: 560px) { .ch-item { grid-template-columns: 1fr auto; } .ch-when, .ch-item .hint { display: none; } }
.xp-chat fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
.xp-chat legend { padding: 0; margin-bottom: 4px; font-weight: 600; font-size: 14px; }

/* Forms and messages: the forms on the left, the messages / settings of the picked one on the right. Colours come
   only from the theme tokens, so the dark mode needs no rules of its own. */
.fx-modal { width: min(1240px, 100%); height: min(860px, calc(100dvh - 48px)); display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.fx-modal .modal-head { padding: 14px 16px 14px 22px; border-bottom: 1px solid var(--border); margin: 0; flex: none; }
.fx-modal .modal-head h2 { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-crumb { font-size: 14px; font-weight: 500; color: var(--muted); margin-left: 6px; }
.fx-back { display: none; }
.fx-wrap { flex: 1; min-height: 0; display: grid; grid-template-columns: 272px minmax(0, 1fr); }
.fx-side { overflow-y: auto; border-right: 1px solid var(--border); background: var(--panel-2); padding: 14px 10px; }
.fx-main { overflow-y: auto; padding: 18px 22px 24px; min-width: 0; }
.fx-search { display: flex; align-items: center; gap: 8px; margin: 0 2px 12px; padding: 0 10px; height: 36px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--panel); color: var(--faint); }
.fx-search:focus-within { border-color: var(--border-strong); }
.fx-search input { flex: 1; min-width: 0; border: 0; background: none; color: var(--text); font: inherit; outline: none; }
.fx-it { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; margin-bottom: 1px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--muted); font: inherit; text-align: left; cursor: pointer; }
.fx-it:hover { background: var(--hover); }
.fx-it[aria-current="page"] { background: var(--accent-soft); }
.fx-it > .i { width: 16px; height: 16px; color: var(--faint); flex: none; }
.fx-it[aria-current="page"] > .i { color: var(--text); }
.fx-it.two { align-items: flex-start; }
.fx-it.two > .i { margin-top: 2px; }
.fx-t { flex: 1; min-width: 0; }
.fx-t b { display: block; font-weight: 650; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-t small { display: block; font-size: 12px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-n { flex: none; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.fx-end { flex: none; font-size: 12px; color: var(--faint); }
.fx-grp { display: flex; justify-content: space-between; margin: 16px 10px 6px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); }
.fx-sep { height: 1px; background: var(--border); margin: 12px 8px; }

.fx-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.fx-toolbar .sp { flex: 1; }
.fx-seg { display: inline-flex; padding: 3px; border-radius: var(--radius-sm); background: var(--hover); }
.fx-seg button { border: 0; background: none; padding: 5px 12px; border-radius: 8px; color: var(--muted); font: inherit; font-size: 13px; font-weight: 650; cursor: pointer; }
.fx-seg button[aria-pressed="true"] { background: var(--panel); color: var(--text); box-shadow: var(--shadow-sm); }
.fx-seg em, .fx-tabs em { font-style: normal; font-size: 11px; font-weight: 800; background: var(--accent); color: var(--on-accent); border-radius: 9px; padding: 1px 6px; margin-left: 4px; }
.fx-formsel { width: auto; max-width: 240px; height: 34px; font-size: 13px; font-weight: 600; }
.fx-hint { margin: 0 0 12px; }

.fx-split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.fx-list { border-top: 1px solid var(--border); min-width: 0; }
.fx-row { display: grid; grid-template-columns: 8px minmax(0, 1fr) 150px 116px 92px; gap: 12px; align-items: start; width: 100%; padding: 11px 10px; border: 0; border-bottom: 1px solid var(--border); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.fx-row:hover { background: var(--panel-2); }
.fx-row.on { background: var(--accent-soft); border-radius: var(--radius-sm); border-bottom-color: transparent; }
.fx-dot { width: 7px; height: 7px; border-radius: 50%; margin-top: 7px; }
.fx-row.unread .fx-dot { background: var(--live); }
.fx-who { min-width: 0; }
.fx-who b { display: block; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-row:not(.unread) .fx-who b { font-weight: 550; color: var(--muted); }
.fx-who small { display: block; color: var(--faint); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-tags { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.fx-tag { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 2px 8px 2px 6px; border-radius: 7px; background: var(--tag); color: var(--muted); font-size: 12px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-tag .i { width: 13px; height: 13px; flex: none; }
.fx-tag.ghost { background: none; border: 1px solid var(--border); font-weight: 500; }
.fx-st { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--faint); min-width: 0; }
.fx-st > span { display: inline-flex; align-items: center; gap: 5px; }
.fx-st .i, .fx-deliv .i { width: 13px; height: 13px; stroke-width: 2.2; flex: none; }
.fx-st .ok .i, .fx-deliv .ok .i { color: var(--ok); }
.fx-st .bad, .fx-deliv .bad { color: var(--danger); }
.fx-st .bad { white-space: normal; }
.fx-when { text-align: right; font-size: 12px; color: var(--faint); }

.fx-detail { position: sticky; top: 0; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; background: var(--panel-2); min-width: 0; }
.fx-pick { display: grid; justify-items: center; gap: 8px; padding: 36px 10px; color: var(--faint); font-size: 13px; text-align: center; }
.fx-pick .i { width: 22px; height: 22px; }
.fx-dh { display: flex; align-items: flex-start; gap: 6px; }
.fx-dt { flex: 1; min-width: 0; }
.fx-dt h4 { margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.fx-dt small { color: var(--faint); font-size: 12px; }
.fx-dback { display: none; }
.fx-detail .kv { grid-template-columns: 84px minmax(0, 1fr); gap: 6px 10px; padding: 14px 0 12px; border-top: 0; font-size: 13px; }
.fx-detail .kv dd { font-weight: 550; }
.fx-detail .kv dd.bad { color: var(--danger); }
.fx-kicker { margin: 2px 0 6px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); }
.fx-deliv { list-style: none; margin: 0 0 14px; padding: 0; font-size: 13px; }
.fx-deliv li { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.fx-deliv li span { flex: 1; }
.fx-deliv small { color: var(--faint); font-size: 12px; text-align: right; overflow-wrap: anywhere; }
.fx-deliv .wait .i { color: var(--faint); }
.fx-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.fx-acts:empty { display: none; }

.fx-fhead { display: flex; align-items: center; gap: 12px; }
.fx-fhead > div { min-width: 0; }
.fx-fic { width: 40px; height: 40px; flex: none; border-radius: 12px; background: var(--accent-soft); display: grid; place-items: center; }
.fx-fic .i { width: 20px; height: 20px; }
.fx-fhead h3 { margin: 0; font-size: 18px; font-weight: 800; }
.fx-fhead small { color: var(--faint); font-size: 12.5px; }
.fx-flow { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 16px 0 4px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel-2); }
.fx-node { display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 220px; padding: 6px 12px 6px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--panel); }
.fx-node > span:last-child { min-width: 0; }
.fx-node b { display: block; font-size: 13px; font-weight: 650; }
.fx-node small { display: block; font-size: 11.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-node.off { background: none; border-style: dashed; }
.fx-node.off b { color: var(--faint); }
.fx-nd { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--ok); }
.fx-node.off .fx-nd { background: none; border: 1.5px solid var(--faint); }
.fx-ar { width: 14px; height: 14px; color: var(--faint); flex: none; }
.fx-tabs { display: flex; gap: 4px; margin: 16px 0 14px; border-bottom: 1px solid var(--border); }
.fx-tabs button { margin-bottom: -1px; padding: 9px 12px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font: inherit; font-weight: 650; cursor: pointer; }
.fx-tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--text); }
.fx-fbody .fm-form { padding: 0; border: 0; }

.fx-acc { margin-bottom: 8px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); }
.fx-acc[open] { border-color: var(--border-strong); }
.fx-acc > summary { display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; list-style: none; }
.fx-acc > summary::-webkit-details-marker { display: none; }
.fx-acc > summary > .i:first-child { width: 16px; height: 16px; color: var(--muted); flex: none; }
.fx-acc > summary b { flex: none; font-weight: 750; }
.fx-sum { flex: 1; min-width: 0; color: var(--faint); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-cv { width: 16px; height: 16px; color: var(--faint); flex: none; transform: rotate(-90deg); transition: transform .15s; }
.fx-acc[open] .fx-cv { transform: none; }
.fx-pill { flex: none; padding: 2px 8px; border-radius: 7px; font-size: 11.5px; font-weight: 750; }
.fx-pill.ok { background: var(--ok-soft); color: var(--ok); }
.fx-pill.off { background: var(--tag); color: var(--faint); }
.fx-ab { display: grid; gap: 14px; padding: 4px 14px 16px 40px; }
.fx-foot { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.fx-foot .sp { flex: 1; }
.fx-sform { display: block; }
.fx-main > .fm-protect { padding-top: 0; }
.fx-chat { border-top: 0; padding-top: 0; }

@media (max-width: 1080px) {
  .fx-split { grid-template-columns: minmax(0, 1fr); }
  .fx-split:not(.has-sel) .fx-detail { display: none; }
  .fx-split.has-sel .fx-list { display: none; }
  .fx-split.has-sel .fx-dback { display: grid; }
  .fx-detail { position: static; }
}
@media (max-width: 760px) {
  .fx-modal { height: 100dvh; border-radius: 0; }
  .fx-wrap { grid-template-columns: minmax(0, 1fr); }
  .fx-main { display: none; }
  .fx-in .fx-side { display: none; }
  .fx-in .fx-main { display: block; }
  .fx-in .fx-back { display: grid; }
  .fx-side { border-right: 0; }
  .fx-main { padding: 14px 16px 20px; }
  .fx-row { grid-template-columns: 8px minmax(0, 1fr) auto; }
  .fx-row .fx-tags, .fx-row .fx-st { grid-column: 2; }
  .fx-row .fx-when { grid-row: 1; grid-column: 3; }
  .fx-ab { padding-left: 14px; }
  .fx-flow { gap: 4px; }
}

/* Home → What's new */
.home-side { display: grid; gap: 22px; min-width: 0; align-content: start; }
.news-card h2 { display: flex; align-items: center; gap: 8px; }
.news-n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 800; display: inline-grid; place-items: center; }
.news-item { display: flex; gap: 10px; width: 100%; padding: 12px 0; border: 0; border-top: 1px solid var(--border); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.news-item:hover b { text-decoration: underline; text-underline-offset: 3px; }
.news-dot { flex: none; width: 7px; height: 7px; margin-top: 7px; border-radius: 50%; }
.news-item.unread .news-dot { background: var(--live); }
.news-main { min-width: 0; }
.news-main b { display: block; font-weight: 750; }
.news-item:not(.unread) .news-main b { font-weight: 600; color: var(--muted); }
.news-main small { display: block; color: var(--muted); font-size: 13px; line-height: 1.45; }
.news-date { display: block; margin-top: 2px; color: var(--faint); font-size: 12px; }
.news-all { width: 100%; border: 0; border-top: 1px solid var(--border); background: none; text-align: left; font: inherit; cursor: pointer; font-size: 13.5px; font-weight: 700; }
.news-pop { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.news-list { list-style: none; margin: 0; padding: 0; max-height: 60vh; overflow-y: auto; }
.news-list li { padding: 12px 0; border-top: 1px solid var(--border); }
.news-list li:first-child { border-top: 0; }
.news-list small { color: var(--faint); font-size: 12px; }
.news-list b { display: block; font-size: 15px; }
.news-list p { margin: 2px 0 4px; color: var(--muted); }
.news-list a { font-weight: 700; font-size: 13px; color: var(--text); }

/* Administration → News */
.nw-tabs { margin-top: 0; }
.nw-note { display: flex; gap: 10px; align-items: center; padding: 10px 14px; margin-bottom: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--panel-2); color: var(--muted); font-size: 13px; }
.nw-note > .i { flex: none; }
.nw-note span { flex: 1; }
.nw-card { margin-bottom: 10px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); }
.nw-top { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.nw-top .sp, .nw-act .sp { flex: 1; }
.nw-pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 7px; background: var(--tag); color: var(--muted); font-size: 11.5px; font-weight: 750; }
.nw-pill .i { width: 12px; height: 12px; }
.nw-pill.new { background: var(--accent-soft); color: var(--text); }
.nw-pill.ok { background: var(--ok-soft); color: var(--ok); }
.nw-commits { display: inline-flex; align-items: center; gap: 5px; color: var(--faint); font-size: 12px; font-family: var(--mono); }
.nw-commits .i { width: 13px; height: 13px; }
.nw-card h3 { margin: 10px 0 4px; font-size: 15.5px; }
.nw-card > p { margin: 0 0 10px; color: var(--muted); }
.nw-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.nw-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border: 1px solid var(--border); border-radius: 8px; color: var(--muted); font-size: 12px; }
.nw-chip .i { width: 13px; height: 13px; }
.nw-act { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.nw-edit { display: grid; gap: 10px; }
.nw-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.nw-empty { color: var(--faint); padding: 8px 2px 14px; margin: 0; }
.nw-internal { margin-top: 6px; padding: 0 16px; border: 1px dashed var(--border-strong); border-radius: var(--radius); }
.nw-internal summary { display: flex; align-items: center; gap: 10px; padding: 12px 0; cursor: pointer; }
.nw-internal summary small { color: var(--faint); }
.nw-internal ul { list-style: none; margin: 0 0 12px; padding: 0; font-size: 13px; color: var(--muted); }
.nw-internal li { display: flex; gap: 10px; padding: 4px 0; }
.nw-internal li span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.nw-internal li small { color: var(--faint); font-size: 11.5px; }
.nw-internal code { color: var(--faint); font-size: 12px; }
.nw-digest .kv { border-top: 0; padding-top: 4px; font-size: 13.5px; }
.nw-digest .kv dd { font-weight: 550; }
.nw-digest .bad { color: var(--danger); }
.nw-digest .hint { margin: 6px 0 12px; }
@media (max-width: 640px) { .nw-grid { grid-template-columns: 1fr; } .nw-note { flex-wrap: wrap; } }
