/* SPDX-FileCopyrightText: 2026 Kontrollfeld GmbH */
/* SPDX-License-Identifier: AGPL-3.0-or-later */
/* Self-hosted IBM Plex Sans (OFL) — no transfer to Google Fonts (privacy) */
@font-face{font-family:'IBM Plex Sans';font-style:normal;font-weight:400;font-display:swap;src:url('fonts/ibm-plex-sans-400.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+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
@font-face{font-family:'IBM Plex Sans';font-style:normal;font-weight:400;font-display:swap;src:url('fonts/ibm-plex-sans-ext-400.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-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;}
@font-face{font-family:'IBM Plex Sans';font-style:normal;font-weight:500;font-display:swap;src:url('fonts/ibm-plex-sans-500.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+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
@font-face{font-family:'IBM Plex Sans';font-style:normal;font-weight:500;font-display:swap;src:url('fonts/ibm-plex-sans-ext-500.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-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;}
@font-face{font-family:'IBM Plex Sans';font-style:normal;font-weight:600;font-display:swap;src:url('fonts/ibm-plex-sans-600.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+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
@font-face{font-family:'IBM Plex Sans';font-style:normal;font-weight:600;font-display:swap;src:url('fonts/ibm-plex-sans-ext-600.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-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;}
@font-face{font-family:'IBM Plex Sans';font-style:normal;font-weight:700;font-display:swap;src:url('fonts/ibm-plex-sans-700.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+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
@font-face{font-family:'IBM Plex Sans';font-style:normal;font-weight:700;font-display:swap;src:url('fonts/ibm-plex-sans-ext-700.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-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;}

:root {
  /* light "public service / eID" palette (slate base + blue primary + verified green) */
  color-scheme: light;
  --bg: #f5f8fc;
  --bg-tint: #eef3fa;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --border: #e3e9f2;
  --border-strong: #cfd8e6;

  --navy: #0f172a;
  --text: #1b2433;
  --text-muted: #5d6b85;
  --text-faint: #94a3b8;

  --accent: #0369a1;
  --accent-strong: #075e8c;
  --accent-soft: #e3f0f9;
  --on-accent: #ffffff;          /* text/icons ON an accent surface (dark mode flips it) */
  --accent-border: rgba(3, 105, 161, 0.4);
  --accent-ring: rgba(3, 105, 161, 0.16);

  --ok: #059669;
  --ok-strong: #047857;
  --ok-soft: #e2f5ee;
  --ok-border: rgba(5, 150, 105, 0.45);
  --ok-btn: #047857;

  /* Who is who: "Du" neutral, the other side violet — a hue nothing else in the UI uses, so it
     reads as a person, not as "tap here" (accent) or "verified" (ok). See .who below. */
  --self: #475569;
  --on-self: #ffffff;
  --self-line: #94a3b8;
  --peer: #7c3aed;
  --peer-strong: #6d28d9;
  --peer-soft: #f4effe;
  --peer-border: rgba(124, 58, 237, 0.35);
  --on-peer: #ffffff;

  --warn-soft: #fff7e6;
  --warn-border: #f0c36d;
  --warn-text: #7a5200;

  --danger: #dc2626;
  --danger-strong: #b91c1c;
  --danger-soft: #fdeaea;

  /* page-background signature glows — European blue tint */
  --glow-a: rgba(3, 105, 161, 0.1);
  --glow-b: rgba(0, 68, 148, 0.08);
  /* EU accent (sparing): the European gold, e.g. logo star, trust badges */
  --eu-gold: #FFCC00;
  --eu-blue: #004494;
  /* translucent surface for sticky glass bars (blur behind) */
  --veil: rgba(255, 255, 255, 0.93);

  --r-sm: 9px;
  --r: 13px;
  --r-lg: 18px;
  --r-pill: 999px;
  --shadow: 0 18px 40px -22px rgba(15, 23, 42, 0.28);
  --shadow-sm: 0 4px 14px -8px rgba(15, 23, 42, 0.22);
  --shadow-btn: 0 8px 18px -8px rgba(3, 105, 161, 0.5);
  --t: 180ms cubic-bezier(0.2, 0.7, 0.3, 1);

  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---- dark theme -----------------------------------------------------------
 * Same semantic tokens, desaturated dark values (never plain inversion).
 * Applies (a) automatically via OS preference unless the user forced light,
 * (b) when the user forced dark (html[data-theme] set by theme.js).
 * The video stage keeps its own always-dark literals: a bright stage would wash out the
 * video, so it does not follow the light theme. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1220;
  --bg-tint: #0d1626;
  --surface: #121d32;
  --surface-2: #1b2942;
  --border: #243450;
  --border-strong: #37496c;
  --navy: #ecf2fb;
  --text: #d7e1f0;
  --text-muted: #9db0cc;
  --text-faint: #66779a;
  --accent: #4aabe0;
  --accent-strong: #7cc4ec;
  --accent-soft: #14283f;
  --on-accent: #06111d;
  --accent-border: rgba(74, 171, 224, 0.45);
  --accent-ring: rgba(74, 171, 224, 0.2);
  --ok: #34d399;
  --ok-strong: #7fe7c3;
  --ok-soft: #0d2b23;
  --ok-border: rgba(52, 211, 153, 0.4); --ok-btn: #34d399;
  --self: #b4c3da; --on-self: #0b1220; --self-line: #5b6f93;
  --peer: #a78bfa; --peer-strong: #c4b5fd; --peer-soft: #1f1838;
  --peer-border: rgba(167, 139, 250, 0.4); --on-peer: #150c2c;
  --warn-soft: #2d2410;
  --warn-border: #6b5620;
  --warn-text: #ead9a0;
  --danger: #f87171;
  --danger-strong: #fca5a5;
  --danger-soft: #341520;
  --glow-a: rgba(74, 171, 224, 0.08);
  --glow-b: rgba(74, 130, 224, 0.06); --eu-gold: #FFD633; --eu-blue: #6f9be0;
  --veil: rgba(18, 29, 50, 0.92);
  --shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.75);
  --shadow-sm: 0 4px 14px -8px rgba(0, 0, 0, 0.65);
  --shadow-btn: 0 8px 18px -8px rgba(74, 171, 224, 0.35);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0b1220;
    --bg-tint: #0d1626;
    --surface: #121d32;
    --surface-2: #1b2942;
    --border: #243450;
    --border-strong: #37496c;
    --navy: #ecf2fb;
    --text: #d7e1f0;
    --text-muted: #9db0cc;
    --text-faint: #66779a;
    --accent: #4aabe0;
    --accent-strong: #7cc4ec;
    --accent-soft: #14283f;
    --on-accent: #06111d;
    --accent-border: rgba(74, 171, 224, 0.45);
    --accent-ring: rgba(74, 171, 224, 0.2);
    --ok: #34d399;
    --ok-strong: #7fe7c3;
    --ok-soft: #0d2b23;
    --ok-border: rgba(52, 211, 153, 0.4); --ok-btn: #34d399;
    --self: #b4c3da; --on-self: #0b1220; --self-line: #5b6f93;
    --peer: #a78bfa; --peer-strong: #c4b5fd; --peer-soft: #1f1838;
    --peer-border: rgba(167, 139, 250, 0.4); --on-peer: #150c2c;
    --warn-soft: #2d2410;
    --warn-border: #6b5620;
    --warn-text: #ead9a0;
    --danger: #f87171;
    --danger-strong: #fca5a5;
    --danger-soft: #341520;
    --glow-a: rgba(74, 171, 224, 0.08);
    --glow-b: rgba(74, 130, 224, 0.06); --eu-gold: #FFD633; --eu-blue: #6f9be0;
    --veil: rgba(18, 29, 50, 0.92);
    --shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.75);
    --shadow-sm: 0 4px 14px -8px rgba(0, 0, 0, 0.65);
    --shadow-btn: 0 8px 18px -8px rgba(74, 171, 224, 0.35);
  }
}

* { box-sizing: border-box; }

/* author `button{display:...}` would otherwise beat the UA [hidden] rule */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  color: var(--text);
  background:
    radial-gradient(820px 460px at 50% -6%, var(--glow-a), transparent 60%),
    radial-gradient(640px 460px at 100% 0%, var(--glow-b), transparent 55%),
    var(--bg);
  min-height: 100vh;
  line-height: 1.5;
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 40px) 18px 28px;
  /* native app (viewport-fit=cover): keep content clear of notch/rounded corners */
  padding-left: max(18px, env(safe-area-inset-left));
  padding-right: max(18px, env(safe-area-inset-right));
  padding-top: max(clamp(20px, 4vw, 40px), env(safe-area-inset-top));
}
/* Native app: the page scrolls, the status bar stays — without a backdrop, headings and rows ran
   under the clock. Zero height where there is no inset (browser, Android without edge-to-edge). */
html.native-app body:not(.in-call)::before {
  /* z-index: over the sticky bars, under sheets and dialogs (60+) */
  content: ''; position: fixed; z-index: 25; top: 0; left: 0; right: 0;
  height: env(safe-area-inset-top); background: var(--bg); pointer-events: none;
  /* Only once scrolled (html.scrolled, app.js): at the top it is a solid edge on the glow. */
  opacity: 0; transition: opacity 0.18s ease;
}
html.native-app.scrolled body:not(.in-call)::before { opacity: 1; }

/* ---- footer / version badge + language switcher ---- */
.app-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 0 18px 40px;
  padding-bottom: max(40px, calc(24px + env(safe-area-inset-bottom)));
}
.lang-switch {
  appearance: none;
  -webkit-appearance: none;
  padding: 4px 22px 4px 10px;
  border-radius: var(--r-pill);
  background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center / 10px;
  border: 1px solid var(--border);
  color: var(--text-faint);
  font: inherit;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: color var(--t), border-color var(--t);
}
.lang-switch:hover { color: var(--text-muted); border-color: var(--border-strong); }
.lang-switch:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.version-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  cursor: default;
  user-select: none;
  transition: color var(--t), border-color var(--t);
}
.version-badge::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px var(--ok-soft);
}
.version-badge:hover { color: var(--text-muted); border-color: var(--border-strong); }

/* Theme toggle: footer meta pill (auto/dark/light), same family as lang/version. */
.theme-toggle {
  min-height: 36px; width: 36px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  color: var(--text-faint);
  box-shadow: none;
  cursor: pointer;
}
.theme-toggle:hover:not(:disabled) { color: var(--text-muted); border-color: var(--border-strong); background: var(--surface-2); transform: none; filter: none; }
.theme-toggle:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.theme-toggle svg { width: 16px; height: 16px; }

/* ---- header / logo ---- */
header { margin-bottom: 22px; }
.logo { display: flex; align-items: center; gap: 13px; margin-bottom: 12px; }
/* The whosit mark: ring and bubble take their colours from here, so it follows the theme. */
.mark-ring { stroke: #1e7fd4; }
.mark-g1 { stop-color: #1e7fd4; }
.mark-g2 { stop-color: #003b8e; }
:root[data-theme="dark"] .mark-ring { stroke: #4aa3e8; }
:root[data-theme="dark"] .mark-g1 { stop-color: #4aa3e8; }
:root[data-theme="dark"] .mark-g2 { stop-color: #1565c0; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .mark-ring { stroke: #4aa3e8; }
  :root:not([data-theme="light"]) .mark-g1 { stop-color: #4aa3e8; }
  :root:not([data-theme="light"]) .mark-g2 { stop-color: #1565c0; }
}
/* 220 px wide; never below 160 px, the minimum for the logo with claim. */
.logo-lockup { display: block; width: 220px; height: auto; }
/* ---- the call's head (index.html #call-head, app.js initCallHead; since 2026-11-14) ----
   An island at the top, sticky from the first step of a call to its end. Light ground in both
   themes: the logo in it is the colour file with its ring. The
   logo is 220 px and shrinks to 160 px, its smallest width with claim, once the page has moved;
   in the app it is 160 px throughout. */
.call-head {
  position: sticky; top: max(8px, env(safe-area-inset-top)); z-index: 30;
  margin: 0 auto 16px; max-width: 760px;
  /* fixed light values, not the theme's tokens: the ground has to stay light for the colour logo */
  --ch-text: #1b2433; --ch-muted: #5d6b85; --ch-faint: #94a3b8; --ch-line: #e3e9f2;
  --ch-ok: #047857; --ch-ok-soft: #e2f5ee; --ch-accent: #0369a1; --ch-accent-soft: #e3f0f9;
}
.ch-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "logo main action" "notice notice notice";
  align-items: center; gap: 4px 16px; padding: 12px 18px;
  background: rgba(255, 255, 255, 0.96); color: var(--ch-text);
  border: 1px solid var(--ch-line); border-radius: 20px;
  box-shadow: 0 12px 30px -18px rgba(15, 23, 42, 0.4);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: padding var(--t);
}
.ch-logo { grid-area: logo; display: flex; align-items: center; gap: 6px; }
.ch-logo-btn { display: block; width: 220px; padding: 0; border: 0; background: none; box-shadow: none; line-height: 0; border-radius: 8px; transition: width var(--t); }
.ch-logo-btn:disabled { cursor: default; opacity: 1; }
/* The connection mode (app.js renderMode): top right of the head on a phone, next to the logo
   on a wide screen. */
.ch-mode {
  margin-left: auto; display: inline-flex; align-items: center; gap: 5px; flex: none;
  padding: 3px 10px 3px 8px; border-radius: 999px; background: var(--ch-accent-soft); color: var(--ch-accent);
  font-size: 0.78rem; font-weight: 600; line-height: 1.4; white-space: nowrap;
}
.ch-mode[hidden] { display: none; }
.ch-mode svg { width: 15px; height: 15px; flex: none; }
/* The logo keeps its smallest width (160 px); on the narrowest phones the mode shows as its icon
   alone (the word stays for screen readers in aria-label). */
.ch-logo-btn { flex: none; }
@media (max-width: 349px) { .ch-mode { padding: 5px 7px; } .ch-mode span { display: none; } }
.ch-logo-btn svg { display: block; width: 100%; height: auto; }
.call-head.ch-compact .ch-logo-btn { width: 160px; }
.call-head.ch-compact .ch-card { padding-block: 8px; }
/* The space the compact head gives up stays below it (app.js setCompact); ch-still is only for
   measuring. */
.call-head { transition: margin-bottom var(--t); }
.call-head.ch-still, .call-head.ch-still * { transition: none !important; }
/* In a call: the chevron after the name says that a tap shows the shared data. */
.ch-chev {
  flex: none; width: 16px; height: 16px; color: var(--ch-muted); background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform var(--t);
}
.ch-status[aria-expanded="true"] .ch-chev { transform: rotate(180deg); }
.ch-status:not(:disabled):hover .ch-chev { color: var(--ch-text); }
.ring-sound { flex: none; min-height: 30px; width: 30px; align-self: center; background: #f1f5f9; border-color: var(--ch-line); color: var(--ch-faint); }
.ring-sound:hover:not(:disabled) { background: #f1f5f9; color: var(--ch-muted); border-color: #cfd8e6; }
.ring-sound[aria-pressed="false"] { color: var(--ch-muted); }
.ch-main { grid-area: main; min-width: 0; display: grid; gap: 6px; justify-items: start; }
.ch-status {
  min-width: 0; max-width: 100%; display: grid; gap: 3px; justify-items: start; justify-content: start; align-content: center; text-align: left;
  padding: 0; border: 0; background: none; box-shadow: none; color: inherit; font: inherit; min-height: 0; white-space: normal;
}
.ch-status:disabled { cursor: default; opacity: 1; }
.ch-status:hover:not(:disabled) { background: none; transform: none; filter: none; }
.ch-status:focus-visible, .ch-logo-btn:focus-visible { outline: 2px solid var(--ch-accent); outline-offset: 3px; }
.ch-title { display: flex; align-items: center; gap: 7px; max-width: 100%; font-weight: 600; font-size: 0.95rem; color: var(--ch-text); }
.ch-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ch-ok { flex: none; width: 17px; height: 17px; border-radius: 50%; background: var(--ch-ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 11px no-repeat; }
/* a call where nobody is verified says so in the trust bar's warning colour */
.ch-title.unverified { color: #7a5200; }
.ch-warn { flex: none; width: 17px; height: 17px; border-radius: 50%; background: #f0c36d url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237a5200' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M12 7v6M12 17h.01'/%3E%3C/svg%3E") center / 12px no-repeat; }
.ch-sub:empty { display: none; }
.ch-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 0.8rem; color: var(--ch-muted); font-weight: 400; }
.ch-chip { display: inline-flex; padding: 1px 9px; border-radius: 999px; background: #f1f5f9; color: var(--ch-muted); font-size: 0.76rem; white-space: nowrap; }
.ch-chip.ok { background: var(--ch-ok-soft); color: var(--ch-ok); }
.ch-time { font-variant-numeric: tabular-nums; font-weight: 500; color: var(--ch-text); }
.ch-action { grid-area: action; display: flex; }
.ch-action button { white-space: nowrap; min-height: 40px; padding: 8px 16px; font-size: 0.9rem; }
.ch-action button.ch-go { background: var(--ch-ok); border-color: var(--ch-ok); color: #fff; box-shadow: 0 8px 18px -8px rgba(4, 120, 87, 0.6); }
.ch-action button.ch-soft { background: var(--ch-accent-soft); border-color: transparent; color: var(--ch-accent); box-shadow: none; }
.ch-notice {
  grid-area: notice; display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 8px 12px;
  border-radius: 11px; background: #eef5fb; color: var(--ch-text); font-size: 0.86rem;
  animation: ch-drop 0.22s ease-out;
}
.ch-notice[hidden] { display: none; }
.ch-notice-text { flex: 1; min-width: 0; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.ch-notice-btn { flex: none; min-height: 0; padding: 0; border: 0; background: none; box-shadow: none; color: var(--ch-accent); font-weight: 600; font-size: 0.84rem; }
.ch-notice-btn:hover:not(:disabled) { background: none; transform: none; filter: none; text-decoration: underline; }
@keyframes ch-drop { from { opacity: 0; transform: translateY(-6px); } }
/* Before the call (since 2026-11-15): the status line's first sentence under the step, the rest
   behind ⓘ; who is how far as pills — a tap lists the participants card's own lines. */
.ch-say { display: flex; align-items: flex-start; gap: 8px; font-size: 0.84rem; color: var(--ch-muted); }
.ch-say[hidden], .ch-more[hidden], .ch-people[hidden], .ch-who[hidden] { display: none; }
.ch-info {
  flex: none; width: 20px; height: 20px; min-height: 0; padding: 0; margin-top: 1px; border-radius: 50%;
  border: 1px solid var(--ch-line); background: #fff; color: var(--ch-muted); box-shadow: none;
  font: 600 0.7rem/1 Georgia, serif; font-style: italic; display: inline-grid; place-items: center;
}
.ch-info:hover:not(:disabled) { background: #f1f5f9; transform: none; filter: none; }
.ch-info[aria-expanded="true"] { background: var(--ch-accent-soft); border-color: transparent; color: var(--ch-accent); }
.ch-more { margin: 0; padding: 7px 10px; border-radius: 10px; background: #f1f5f9; color: var(--ch-muted); font-size: 0.82rem; }
.ch-people { display: flex; flex-wrap: wrap; gap: 6px; }
.ch-person {
  display: inline-flex; align-items: center; gap: 6px; min-height: 0; padding: 3px 10px 3px 4px;
  border-radius: 999px; border: 1px solid var(--ch-line); background: #f1f5f9; box-shadow: none;
  color: var(--ch-muted); font-size: 0.78rem; font-weight: 500; white-space: nowrap;
  max-width: 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis;
}
.ch-person:hover:not(:disabled) { background: #e9eef5; transform: none; filter: none; }
.ch-person:focus-visible { outline: 2px solid var(--ch-accent); outline-offset: 2px; }
.ch-av {
  flex: none; width: 19px; height: 19px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; border: 1.5px dashed var(--ch-faint); font-size: 0.62rem; font-weight: 700; color: var(--ch-muted);
}
.ch-pname { color: var(--ch-text); }
.ch-tag::before { content: "· "; }
.ch-tag { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ch-person.peer .ch-av { border-color: #b69cf0; color: #7c3aed; }
.ch-person.st-open .ch-av, .ch-person.is-turn .ch-av { border-style: solid; }
.ch-person.st-away { opacity: 0.7; }
.ch-person.st-anon { opacity: 0.8; }
.ch-person.st-done { background: var(--ch-ok-soft); border-color: #9fd9c3; }
.ch-person.st-done .ch-av {
  border: 0; background: var(--ch-ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 11px no-repeat;
}
.ch-person.peer.st-done { background: #f3edfe; border-color: #c9b5f5; }
.ch-person.peer.st-done .ch-av { background-color: #7c3aed; }
/* whose move it is: yours in blue, theirs in their violet — as the participants card's chips pulse */
.ch-person.is-turn { border-color: var(--ch-accent); background: var(--ch-accent-soft); }
.ch-person.is-turn .ch-av { border-color: var(--ch-accent); color: var(--ch-accent); animation: ch-turn 1.8s ease-in-out infinite; }
.ch-person.peer.is-turn { border-color: #c9b5f5; background: #f3edfe; }
.ch-person.peer.is-turn .ch-av { border-color: #7c3aed; color: #7c3aed; }
@keyframes ch-turn { 50% { box-shadow: 0 0 0 4px rgba(3, 105, 161, 0.16); } }
.ch-who { display: grid; gap: 3px; width: 100%; padding-top: 6px; border-top: 1px solid var(--ch-line); font-size: 0.8rem; color: var(--ch-muted); }
.ch-title .ch-chip { font-weight: 400; }
/* With the head, the page loses what it now says (since 2026-11-15): the participants card before
   the call (in the call it is what the names open), the status line unless it reports an error,
   and on the web the introduction above the call. */
body.has-head:not(.in-call) #identities,
body.has-head header .sub { display: none !important; }
/* The status line only out of sight: it stays the live region screen readers hear, with its whole
   text — the head shows its first sentence, and an error brings the band itself back. */
body.has-head:not(.in-call) #status-bar:not([data-state="error"]) {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
/* The device check as one line until it is wanted (app.js initCallHead → arrange). */
#media-check.mc-off { display: none !important; }
/* folded: the heading and its own button on one row */
#media-check.mc-fold { display: flex; align-items: center; gap: 12px; padding-block: 10px; }
#media-check.mc-fold > :not(h2):not(#mc-start) { display: none !important; }
#media-check.mc-fold h2 { flex: 1; min-width: 0; margin: 0; cursor: pointer; font-size: 0.95rem; }
#media-check.mc-fold #mc-start { flex: none; min-height: 36px; padding: 6px 14px; font-size: 0.86rem; }
/* In the app "Warum whosit?" is not part of the call: whoever has the app has chosen it. */
html.native-app body.has-head .app-strengths { display: none !important; }
/* With the head, the ring and the step name are up there: no second logo, no second stepper, and
   in the call no trust bar (the head's names open what it opened). */
body.has-head header .logo,
body.has-head #stepper,
body.has-head.in-call #trust-bar,
body.has-head.in-call #status-bar[data-state="ok"] { display: none !important; }
/* the app names the stage in the status card's kicker; the head names it now */
body.has-head .status-kicker { display: none !important; }
/* Phone: logo and switch on top, where the call stands below, the action in a row of its own at
   full width. Beside the text (until 2026-11-15) a long label ("Mit Wallet ausweisen") squeezed
   the sentence into a narrow column and lay over the pills. Like the button, the row is there only
   while the page's own button is out of sight. */
@media (max-width: 640px) {
  .call-head { margin-inline: -8px; }
  .ch-card { grid-template-columns: minmax(0, 1fr); grid-template-areas: "logo" "main" "action" "notice"; gap: 8px; padding: 10px 14px; }
  .ch-action:not(:has(> button:not([hidden]))) { display: none; }
  .ch-logo-btn, .call-head.ch-compact .ch-logo-btn { width: 160px; }
  .ch-action button { flex: 1; min-height: 38px; padding: 7px 13px; font-size: 0.86rem; }
}
@media (prefers-reduced-motion: reduce) {
  .ch-card, .ch-logo-btn { transition: none; }
  .ch-person.is-turn .ch-av { animation: none; }
  .ch-notice { animation: none; }
}
/* The whosit logo is the file from public/logo/, never rebuilt from mark plus text. The white
   version on dark ground, switched like the theme. On an instance with a name of its own
   (html.branded, set by the branding snippet in <head> before first paint) the operator's mark and
   name replace it. */
.logo-dunkel { display: none; }
:root[data-theme="dark"] .logo-hell { display: none; }
:root[data-theme="dark"] .logo-dunkel { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-hell { display: none; }
  :root:not([data-theme="light"]) .logo-dunkel { display: block; }
}
html:not(.branded) .brand-operator { display: none; }
html.branded .brand-official { display: none !important; }

/* A customer logo (branding.js): its own width at the mark's height, capped so a long wordmark
   leaves room for the name; on light ground in dark mode, where a dark logo on a transparent
   background would vanish. No drop shadow — that belongs to our mark. */
img.brand-logo-img { width: auto; max-width: min(200px, 42vw); object-fit: contain; filter: none; flex: none; }
:root[data-theme="dark"] img.brand-logo-img { background: #ffffff; padding: 4px 8px; border-radius: 8px; box-sizing: content-box; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) img.brand-logo-img { background: #ffffff; padding: 4px 8px; border-radius: 8px; box-sizing: content-box; }
}
/* The logo is a wordmark (EUDI_BRAND_NAME_IN_LOGO): the name beside it would say the same thing
   twice. Hidden from sight only — it stays the heading a screen reader announces. The logo may
   then take the room the name left. */
html.brand-name-in-logo .brand-operator [data-brand-name] {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
html.brand-name-in-logo img.brand-logo-img { max-width: min(260px, 62vw); }
.logo .brand-official { margin: 0; line-height: 0; }
.brand-operator { display: flex; align-items: center; gap: 13px; }
.logo-mark {
  width: 46px; height: 46px; flex: none;
  filter: drop-shadow(0 8px 16px rgba(3, 105, 161, 0.28));
}
.logo h1 {
  margin: 0;
  font-size: clamp(1.5rem, 4.6vw, 1.95rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--navy);
}
.brand-text { display: flex; flex-direction: column; gap: 3px; }
/* The claim under the product name. Small caps-like tracking, muted, so the name stays the
   brand and the claim reads as what it is: a description of the category. */
.brand-claim {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-muted); line-height: 1.1;
}
html.native-app .brand-claim { font-size: 0.62rem; }
.sub { color: var(--text-muted); margin: 0; font-size: 0.98rem; max-width: 54ch; }
.sub strong { color: var(--navy); font-weight: 600; }

.wallet-note { text-align: center; margin-top: 12px; font-size: 0.8rem; }

/* ---- status + restart ---- */
.status {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 12px 15px;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 18px 0 16px;
  box-shadow: var(--shadow-sm);
}
.status::before {
  content: "";
  width: 8px; height: 8px; flex: none;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.4; } }
.status-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
/* The stage name above the status text — app only, where the stepper is just dots (updateStepper). */
.status-kicker { display: none; }
html.native-app body:not(.in-call) .status-kicker:not(:empty) {
  display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--accent-strong);
}

/* ---- cards ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
  /* backwards, not both (2026-11-15): a fill that outlasts the animation keeps a transform on the
     card, which makes it the containing block of anything fixed inside it — the review's connect
     bar then hung at the card's foot instead of the screen's. */
  animation: rise var(--t) backwards;
}
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
.card h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 6px;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--navy);
}
.h-ic { width: 19px; height: 19px; flex: none; color: var(--accent); }
.h-ic.ok { color: var(--ok-strong); }
.card h2 .hint { margin-left: -3px; }
.hint { color: var(--text-muted); font-size: 0.86rem; font-weight: 400; line-height: 1.45; }

.row { display: flex; gap: 9px; margin-top: 14px; }

/* ---- inputs ---- */
input[type="text"] {
  flex: 1;
  min-width: 0;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  color: var(--text);
  border-radius: var(--r-sm);
  padding: 11px 13px;
  font: inherit;
  font-size: 0.9rem;
  transition: border-color var(--t), box-shadow var(--t);
}
input[type="text"]:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
input::placeholder { color: var(--text-faint); }
/* iOS zooms into a text field set below 16px as soon as it gets focus — in a call that shifts the
   whole layout while typing a chat message. Touch only; a mouse keeps the compact size. */
@media (pointer: coarse) { input[type="text"] { font-size: max(16px, 1rem); } }

/* ---- buttons ---- */
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  background: var(--accent);
  color: var(--on-accent);
  border: none;
  border-radius: var(--r-sm);
  padding: 11px 18px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform var(--t), filter var(--t), background var(--t), box-shadow var(--t);
  box-shadow: var(--shadow-btn);
}
button:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.06); }
button:active:not(:disabled) { transform: translateY(0); }
button:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-soft), 0 0 0 1px var(--accent); }
button:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
button svg { width: 18px; height: 18px; flex: none; }

button.ghost {
  background: var(--surface);
  color: var(--navy);
  border: 1px solid var(--border-strong);
  box-shadow: none;
}
button.ghost:hover:not(:disabled) { background: var(--surface-2); }

button.danger { background: var(--danger); box-shadow: 0 8px 18px -8px rgba(220, 38, 38, 0.5); }
button.danger:focus-visible { box-shadow: 0 0 0 3px var(--danger-soft), 0 0 0 1px var(--danger); }

.restart {
  background: var(--surface);
  color: var(--accent);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-sm);
  margin: -4px 0 16px;
}
.restart:hover:not(:disabled) { background: var(--accent-soft); transform: none; filter: none; }
.back-to-app { display: block; margin: -4px auto 16px; }
.back-to-app[hidden] { display: none; }

/* ---- QR / auth ---- */
.qr {
  display: flex;
  justify-content: center;
  padding: 16px;
  background: #fff; /* always white — QR contrast for wallet scanners (both themes) */
  border: 1px solid var(--border);
  border-radius: var(--r);
  width: fit-content;
  margin: 14px auto 4px;
  box-shadow: var(--shadow-sm);
}
.qr img, .qr canvas { display: block; border-radius: 4px; }

/* The invitation link as a QR code: large enough to scan from a few metres (a stand, a pitch). */
.invite-qr {
  width: min(92vw, 40rem); max-height: calc(100vh - 32px); padding: 28px 24px 20px;
  border: 0; border-radius: 20px; text-align: center;
  background: var(--surface); color: var(--text);
}
.invite-qr::backdrop { background: rgba(7, 11, 22, 0.6); }
.invite-qr h2 { margin: 0 0 12px; justify-content: center; font-size: 1.35rem; }
.invite-qr .wm-close { color: inherit; }
.iq-code { margin: 0 auto; padding: 14px; width: min(100%, calc(100vh - 200px)); box-sizing: border-box; }
.iq-code img, .iq-code canvas { width: 100%; height: auto; }
.iq-host { margin: 12px 0 0; font-size: 1rem; font-weight: 600; color: var(--text-muted); }

/* ---- participant chips ---- */
.ids { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
#peer-chips { display: contents; }
.id-chip {
  display: flex; align-items: center; gap: 9px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  padding: 9px 15px 9px 13px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  transition: border-color var(--t), background var(--t);
}
.id-chip .dot {
  width: 9px; height: 9px; flex: none;
  border-radius: 50%;
  background: var(--text-faint);
  transition: background var(--t), box-shadow var(--t);
}
/* Colour by PERSPECTIVE, like every other you/them pair: "Du" neutral, the other side violet
   (tokens --self / --peer). The role is in the words. The colour says whose chip it is; the
   state decides WHETHER it is filled. */
.id-chip.who-self { --chip: var(--self); --chip-soft: var(--surface-2); --chip-border: var(--self-line); --chip-strong: var(--navy); }
.id-chip.who-peer { --chip: var(--peer); --chip-soft: var(--peer-soft); --chip-border: var(--peer-border); --chip-strong: var(--peer-strong); }

/* Filled only from "verified" on. Someone who has just joined must not look as finished
   as someone who has already presented their ID — the dot already carries the role colour
   then, muted. */
.id-chip.is-identified { border-color: var(--chip-border); background: var(--chip-soft); color: var(--chip-strong); }
.id-chip.is-identified .dot { background: var(--chip); box-shadow: 0 0 0 4px var(--chip-soft); }
.id-chip:not(.is-identified) .dot { background: var(--chip, var(--text-faint)); opacity: 0.45; }

/* Pending OWN action — set in app.js only for the host not yet identified or the guest
 * not yet confirmed. An anonymous host or a finished participant has nothing to do and
 * stays calm.
 *
 * The chip breathes so that "your turn" is not only READ but SEEN: text alone is easily
 * overlooked, because the eye lands on the largest box.
 * Two restrained signals instead of one loud one — a fading ring on the chip and the
 * existing `pulse` on the dot (the same keyframe as the status line, one language). */
.id-chip.pending { animation: chip-attention 2.4s ease-in-out infinite; }
.id-chip.pending .dot { background: var(--accent); animation: pulse 2s ease-in-out infinite; }
@keyframes chip-attention {
  0%   { box-shadow: 0 0 0 0 var(--accent-ring); }
  70%  { box-shadow: 0 0 0 8px transparent; }
  /* at spread 0 the colour jump back to 0% is invisible -> seamless loop */
  100% { box-shadow: 0 0 0 0 transparent; }
}
/* Reduced motion: the signal STAYS, just without animation — a static ring instead of
 * no highlight at all. */
@media (prefers-reduced-motion: reduce) {
  .id-chip.pending,
  .id-chip.pending .dot { animation: none; }
  .id-chip.pending { box-shadow: 0 0 0 3px var(--accent-ring); }
}

/* ---- video tiles ---- */
.videos { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.tile {
  position: relative;
  background: #0b1220;
  border: 1px solid var(--border-strong);
  border-radius: var(--r);
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
.tile video { width: 100%; height: 100%; object-fit: cover; background: #0b1220; }
/* Spotlight / stage layout (Pro): click a tile to enlarge it; a screen-share auto-stages.
   Grid stays a grid; stage-mode switches to a big tile (full row) + a thumbnail strip. */
.videos.spotlightable .tile { cursor: pointer; }
.videos.stage-mode { display: flex; flex-wrap: wrap; align-items: flex-start; }
.videos.stage-mode .tile { flex: 0 0 128px; aspect-ratio: 16 / 10; order: 2; }
.videos.stage-mode .tile.on-stage { flex: 1 1 100%; aspect-ratio: 16 / 9; order: 1; }
/* Shared screens: letterbox (contain) so nothing is cropped — camera stays cover. */
.tile.is-screen video { object-fit: contain; }
/* Mirror only the OWN camera image — that is how people know themselves from a mirror,
   and how every video application does it. Unmirrored, the own preview looks reversed
   because the hand appears on the "wrong" side. The remote side stays unmirrored, otherwise
   any text there would be unreadable. A shared screen as well — it is not a mirror image but
   a document. */
.tile[data-peer="self"] video { transform: scaleX(-1); }
/* …except while a background with writing on it is on (logo, own picture): see renderBgPickers. */
body.bg-unmirror .tile[data-peer="self"] video, body.bg-unmirror #mc-video { transform: none; }
/* One-to-one (.duo, set in applyStage): the other person fills the stage, your own picture
   floats small in the top corner. A shared screen still gets the full stage via stage-mode. */
.videos.duo { display: block; position: relative; }
.videos.duo .tile:not([data-peer="self"]) { aspect-ratio: 16 / 10; max-height: 74vh; width: 100%; }
.videos.duo .tile[data-peer="self"] {
  position: absolute; top: 10px; right: 10px; z-index: 4;
  width: clamp(96px, 24%, 220px); aspect-ratio: 3 / 4;
  border: 2px solid rgba(255, 255, 255, 0.7); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}
/* No name on your own small picture: cut down to "Erika Musterm…" it said nothing you need. */
.videos.duo .tile[data-peer="self"] .name { display: none; }
.videos.duo .tile[data-peer="self"] .tile-fs { display: none; }
.videos.duo .tile[data-peer="self"] .tile-badges { transform: scale(0.8); transform-origin: top left; }
/* The other tile's top-right corner now belongs to your own picture: its fullscreen button moves
   left of it, the credential badge (Pro) down above the name. */
.videos.duo .tile:not([data-peer="self"]) .tile-fs { right: calc(clamp(96px, 24%, 220px) + 20px); }
.videos.duo .tile:not([data-peer="self"]) .cred-badge { top: auto; bottom: 46px; }
@media (max-width: 560px) {
  .videos.duo .tile:not([data-peer="self"]) { aspect-ratio: 3 / 4; max-height: 70vh; }
}
.tile[data-peer="self"].is-screen video { transform: none; }
/* Fluid stage: during a video call the section breaks out of the narrow reading column
   and grows with the viewport (centered on it), so the stage isn't capped at ~680px. */
#peers.fluid { width: min(96vw, 1500px); margin-left: 50%; transform: translateX(-50%); }
#peers.fluid .videos.stage-mode .tile.on-stage { max-height: 78vh; }
/* Per-tile fullscreen button (Pro spotlight): subtle, brightens on hover. */
.tile-fs {
  position: absolute; top: 8px; right: 8px; z-index: 3;
  display: none; width: 32px; height: 32px; padding: 0;
  align-items: center; justify-content: center;
  border-radius: 9px; border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(7, 11, 22, 0.62); color: #f1f5f9; cursor: pointer;
}
.tile-fs svg { width: 16px; height: 16px; }
.videos.spotlightable .tile-fs { display: inline-flex; opacity: 0.5; transition: opacity 0.15s; }
.videos.spotlightable .tile:hover .tile-fs { opacity: 1; }
/* Without hover (touch) the button would stay half-transparent for good, over moving video. */
@media (hover: none) { .videos.spotlightable .tile-fs { opacity: 1; } }
/* A tile in native fullscreen fills the screen; never crop its content there. */
.tile:fullscreen { aspect-ratio: auto; width: 100vw; height: 100vh; }
.tile:fullscreen video { object-fit: contain; background: #000; }
.tile .name {
  position: absolute; left: 9px; bottom: 9px; right: 9px;
  display: inline-flex; align-items: center; gap: 6px;
  max-width: calc(100% - 18px);
  background: rgba(7, 11, 22, 0.74);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #f1f5f9;
  padding: 5px 11px; border-radius: var(--r-pill);
  font-size: 0.82rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tile .name.verified::before {
  content: "✓";
  color: #34d399;
  font-weight: 800;
  text-shadow: 0 0 8px rgba(52, 211, 153, 0.6);
}
.compat-note { text-align: center; margin: 14px 0 0; }
/* After the call: the chips stay as the record of whom you spoke with, but greyed and without
   the progress dots, so nothing looks like it is still going on. */
body.call-ended .id-chip { opacity: 0.7; box-shadow: none; }
body.call-ended .id-chip .steps { display: none; }
/* Floating, always-reachable control bar: on a tall page (video + chat + shared
   document) the alternative is scrolling all the way down just to hang up. Sticks to
   the bottom of the viewport once scrolled to; a plain top border/shadow reads as a
   detached bar without needing a backdrop that would obscure content behind it. */
.call-controls {
  display: flex; justify-content: center; gap: 10px; flex-wrap: wrap;
  position: sticky; bottom: max(14px, calc(6px + env(safe-area-inset-bottom))); z-index: 20;
  margin: 16px auto 0; width: fit-content; max-width: 96vw;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-pill);
  padding: 10px 14px;
  box-shadow: var(--shadow);
}
#hangup-btn svg { transform: rotate(135deg); }
/* Apart from the rest: right next to "Bildschirm teilen", a slip of the thumb ended the call. */
.call-controls #hangup-btn { margin-left: 12px; }
/* Wide screens: one row. The reading column is narrower than six labelled buttons, so the bar
   wrapped into two rows and covered a third of the picture; it may grow past the column. */
@media (min-width: 900px) {
  .call-controls { flex-wrap: nowrap; width: max-content; max-width: 96vw; margin-left: 50%; transform: translateX(-50%); }
}
#screen-btn[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.call-controls .ghost.ctrl-off { background: var(--danger-soft); color: var(--danger); border-color: rgba(220, 38, 38, 0.4); }

/* ---- chat row: icon buttons, emoji picker, file transfer ---- */
.chat-row { align-items: center; }
.icon-btn {
  flex: none; min-height: 44px; width: 44px; padding: 0;
  background: var(--surface); color: var(--text-muted);
  border: 1px solid var(--border-strong); border-radius: var(--r-sm);
  box-shadow: none;
}
.icon-btn:hover:not(:disabled) { background: var(--surface-2); color: var(--accent); transform: none; filter: none; }
.icon-btn svg { width: 20px; height: 20px; }
.emoji-palette {
  display: flex; flex-wrap: wrap; gap: 2px;
  padding: 8px; margin-top: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r);
  box-shadow: var(--shadow-sm);
}
.emoji-palette .emoji {
  all: unset; cursor: pointer; font-size: 1.25rem; line-height: 1;
  padding: 6px; border-radius: var(--r-sm); min-width: 34px; text-align: center;
}
.emoji-palette .emoji:hover, .emoji-palette .emoji:focus-visible { background: var(--accent-soft); outline: none; }
.msg.file { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 8px 10px; margin: 4px 0; }
.file-label { font-size: 0.86rem; color: var(--text); word-break: break-all; }
.file-bar { height: 5px; margin-top: 6px; border-radius: 999px; background: var(--border); overflow: hidden; }
.file-bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width 120ms linear; }
.file-bar.done span { background: var(--ok); }
.file-dl { color: var(--accent); font-size: 0.86rem; font-weight: 600; text-decoration: none; word-break: break-all; }
.file-dl:hover { text-decoration: underline; }

/* ---- chat ---- */
.chat-log {
  height: 210px; overflow-y: auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 12px;
  margin-top: 10px;
  font-size: 0.9rem;
  display: flex; flex-direction: column; gap: 7px;
}
.chat-log::-webkit-scrollbar { width: 8px; }
.chat-log::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; }
.msg { line-height: 1.4; }
.msg .who { color: var(--accent); font-weight: 600; }
.msg.system .who { color: var(--text-faint); }

/* ---- request-config: presets + attribute checkboxes ---- */
.presets { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.chip-btn {
  min-height: 36px; padding: 7px 13px;
  background: var(--surface); color: var(--accent);
  border: 1px solid var(--border-strong); border-radius: var(--r-pill);
  font-size: 0.84rem; font-weight: 600; box-shadow: none;
}
.chip-btn:hover:not(:disabled) { background: var(--accent-soft); transform: none; filter: none; }
.attr-list { display: grid; gap: 3px; margin: 12px 0 6px; }
.attr-row {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: var(--r-sm);
  cursor: pointer; transition: background var(--t);
}
.attr-row:hover { background: var(--surface-2); }
.attr-row input { width: 19px; height: 19px; flex: none; accent-color: var(--accent); cursor: pointer; }
.attr-row .attr-ic { width: 17px; height: 17px; flex: none; color: var(--text-faint); }
.attr-label { font-size: 0.93rem; color: var(--navy); font-weight: 500; }
.attr-note { color: var(--text-faint); font-size: 0.8rem; font-weight: 400; }
.attr-row.locked { opacity: 0.55; cursor: default; }
.attr-row.locked input { cursor: default; }

/* WRP compliance note under every attribute group (and in the review). Unobtrusive but
 * permanently visible: the restriction is a commitment, not an error state — so no warning
 * yellow, but a calm side note with a straight accent edge. */
/* Guiding attention before the call (desktop/website only).
 * `body.wizard` means: small screen or app, where the step wizard already guides —
 * these rules deliberately do not apply there, otherwise two kinds of guidance would overlap.
 * Deliberately restrained: the other cards stay readable and usable, they only recede.
 * No `pointer-events: none` — the host may copy the link while still having to present
 * their ID. */
body:not(.wizard) .card.is-muted {
  opacity: 0.62;
  transition: opacity var(--t);
}
body:not(.wizard) .card.is-muted:hover,
body:not(.wizard) .card.is-muted:focus-within { opacity: 1; }
body:not(.wizard) .card.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
/* Users who prefer reduced motion get the state without a cross-fade. */
@media (prefers-reduced-motion: reduce) {
  body:not(.wizard) .card.is-muted { transition: none; }
}

.policy-note {
  margin: 6px 2px 0; padding: 6px 0 6px 10px;
  border-left: 2px solid var(--border-strong);
  color: var(--text-faint); font-size: 0.78rem; line-height: 1.45;
}
/* A plain question first; the plain answer and the official wording only on demand. The
   official sentence ("WRP-Zulassung", "Basis-Attribute") stays word for word — it is the
   policy's text — but no longer greets everyone who sets up a call. */
details.policy-note > summary { cursor: pointer; color: var(--text-muted); width: fit-content; }
details.policy-note > summary:hover { color: var(--text); }
details.policy-note > p { margin: 6px 0 0; }
details.policy-note .policy-official { font-style: italic; }
/* Purpose limitation in the privacy review — the one sentence the request is legally bound
 * to. More prominent than .hint, so it is not skimmed over when consenting. */
.purpose-binding {
  display: flex; align-items: flex-start; gap: 9px;
  margin: 12px 0 4px; padding: 10px 12px;
  background: var(--accent-soft); border-left: 3px solid var(--accent);
  color: var(--text); font-size: 0.86rem; line-height: 1.45;
}
.purpose-binding .icon { width: 16px; height: 16px; flex: none; margin-top: 1px; color: var(--accent); }
.purpose-binding .pb-label { font-weight: 600; color: var(--navy); }
.preview { margin: 8px 2px 0; font-size: 0.86rem; color: var(--text-muted); }
.preview strong { color: var(--navy); font-weight: 600; }

/* ---- consent list (guest) ---- */
.consent { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 8px; }
.consent li {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 13px; border-radius: var(--r-sm);
  background: var(--ok-soft); border: 1px solid var(--ok-border);
  font-size: 0.92rem; color: var(--navy); font-weight: 500;
}
.consent li::before { content: "✓"; color: var(--ok-strong); font-weight: 800; }

/* ---- result list (verifier) ---- */
.ok-check { color: var(--ok-strong); }
.result-list { display: grid; gap: 9px; margin-top: 8px; }
.result-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: var(--r-sm);
  background: var(--surface-2); border: 1px solid var(--border);
}
.result-row .r-label { display: inline-flex; align-items: center; gap: 8px; font-size: 0.84rem; color: var(--text-muted); }
.result-row .r-label .attr-ic { width: 16px; height: 16px; flex: none; color: var(--text-faint); }
.result-row .r-value { font-size: 0.95rem; font-weight: 600; color: var(--navy); text-align: right; }
.result-row .r-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 11px; border-radius: var(--r-pill);
  background: var(--ok-soft); color: var(--ok-strong);
  font-size: 0.86rem; font-weight: 700;
}
/* A claim the wallet did not confirm (an age of false): said plainly, without the green tick. */
.result-row .r-value.muted { color: var(--text-muted); font-weight: 500; }
/* masked field (pre-confirm review): name shown, value hidden until both agree */
.result-row.pending { border-style: dashed; background: var(--surface); }
.result-row .r-value.masked { display: inline-flex; align-items: center; gap: 5px; color: var(--text-faint); font-size: 0.78rem; font-weight: 500; }
.result-row .r-value.masked svg { width: 13px; height: 13px; flex: none; }
/* Guest's identification card: what the host gives in return — set apart from the own list. */
.auth-peer { margin-top: 10px; padding: 8px 12px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 2px; color: var(--text); }

/* ---- setup: mode segmented + field labels ---- */
.field-label {
  display: block;
  margin: 18px 0 9px;
  font-size: 0.8rem; font-weight: 650; letter-spacing: 0.02em;
  color: var(--navy); text-transform: uppercase;
}
.field-note { font-weight: 400; text-transform: none; color: var(--text-faint); letter-spacing: 0; }
.field-label .h-ic { width: 15px; height: 15px; vertical-align: -2px; margin-right: 6px; color: var(--accent); }

/* ---- schedule (calendar invite) ---- */
#cal-title { display: block; width: 100%; margin: 0 0 9px; }
.schedule-fields { display: flex; gap: 9px; }
.schedule-fields input[type="date"],
.schedule-fields input[type="time"],
.schedule-fields select {
  flex: 1; min-width: 0;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  color: var(--text);
  border-radius: var(--r-sm);
  padding: 11px 13px;
  font: inherit; font-size: 0.9rem;
  transition: border-color var(--t), box-shadow var(--t);
}
.schedule-fields select { cursor: pointer; appearance: none; -webkit-appearance: none; }
.schedule-fields input:focus-visible,
.schedule-fields select:focus-visible {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.schedule-actions { margin-top: 9px; }
.seg {
  display: flex; gap: 4px; padding: 4px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r);
}
.seg button {
  flex: 1; min-height: 38px; padding: 8px 10px;
  background: transparent; color: var(--text-muted);
  border: none; border-radius: var(--r-sm); box-shadow: none;
  font-size: 0.88rem; font-weight: 600;
}
.seg button svg { width: 17px; height: 17px; flex: none; }
.seg button:hover:not(:disabled) { transform: none; filter: none; color: var(--navy); }
.seg button.active { background: var(--surface); color: var(--accent); box-shadow: var(--shadow-sm); }
.seg button.active:disabled { color: var(--accent); opacity: 1; }

/* Four modes since "Vor Ort" (2026-11-19): on a narrow phone the icon goes above the word. */
@media (max-width: 440px) {
  #mode-seg button { flex-direction: column; gap: 3px; padding: 6px 2px; font-size: 0.8rem; line-height: 1.15; }
}

/* ---- "Vor Ort": the code in the card, and the end of the check ---- */
.share-qr { margin: 14px auto 2px; padding: 12px; }
.share-qr img, .share-qr canvas { width: min(240px, 62vw); height: auto; }
.inperson-done { text-align: center; padding: 6px 0 16px; margin-bottom: 14px; border-bottom: 1px solid var(--border); }
.ipd-mark {
  width: 64px; height: 64px; margin: 4px auto 10px; border-radius: 50%;
  background: var(--ok-strong) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.2 4.2L19 7'/%3E%3C/svg%3E") center / 34px no-repeat;
}
.ipd-title { margin: 0; font-size: 1.3rem; font-weight: 700; color: var(--text); }
.ipd-time { margin: 2px 0 10px; color: var(--text-muted); font-size: 0.92rem; }
.ipd-note { max-width: 30rem; margin: 0 auto 14px; }
#ipd-finish { min-width: 9rem; }
#ipd-finish[hidden] { display: none; }

/* ---- open-room toggle ---- */
.openroom { display: flex; align-items: flex-start; gap: 9px; margin-top: 14px; cursor: pointer; font-size: 0.9rem; }
.openroom input { margin-top: 2px; width: 17px; height: 17px; flex: none; accent-color: var(--accent); }

/* ---- review ---- */
.review-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 6px 0 10px; }
.review-col .field-label { margin-top: 0; }
.result-empty {
  padding: 12px 14px; border-radius: var(--r-sm);
  background: var(--surface-2); border: 1px dashed var(--border-strong);
  color: var(--text-muted); font-size: 0.88rem;
}
.review-wait { color: var(--ok-strong); font-weight: 600; }
.peer-block-head { font-size: 0.82rem; font-weight: 650; color: var(--navy); margin: 10px 0 4px; }
.peer-block-head:first-child { margin-top: 0; }

/* ---- info tooltip ---- */
.info-wrap { position: relative; display: inline-flex; vertical-align: -3px; margin-left: 4px; }
.info-btn {
  all: unset;
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; min-height: 0;
  color: var(--text-faint); cursor: pointer; border-radius: 50%;
}
.info-btn svg { width: 15px; height: 15px; }
.info-btn:hover, .info-btn:focus-visible { color: var(--accent); }
.info-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.tooltip {
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  width: min(290px, 74vw);
  background: var(--navy); color: #eef2f8;
  font-size: 0.8rem; font-weight: 400; line-height: 1.45;
  letter-spacing: 0; text-transform: none;
  padding: 10px 12px; border-radius: var(--r-sm);
  box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; z-index: 40;
  transition: opacity var(--t), visibility var(--t);
  pointer-events: none;
}
.tooltip::after {
  content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: var(--navy);
}
.info-wrap:hover .tooltip,
.info-btn:focus .tooltip,
.info-btn:focus-visible + .tooltip,
.info-wrap:focus-within .tooltip { opacity: 1; visibility: visible; }

/* ---- call banner (audio / chat) ---- */
.banner { display: flex; align-items: center; gap: 10px; font-size: 0.95rem; font-weight: 600; color: var(--navy); }
.banner-dot { width: 9px; height: 9px; flex: none; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); animation: pulse 2s ease-in-out infinite; }

/* ---- responsive ---- */
@media (max-width: 560px) {
  .videos { grid-template-columns: 1fr; }
  .review-grid { grid-template-columns: 1fr; }
  .row { flex-direction: column; }
  .row button { width: 100%; }
  /* The chat row does NOT stack like the other rows: stacked, emoji and attachment became two
     full-width bars above the input. One line — icons, input, send — as in any messenger. */
  .row.chat-row { flex-direction: row; flex-wrap: nowrap; }
  .row.chat-row button { width: auto; }
  .chat-row #chat-input { flex: 1 1 0; min-width: 0; }
  .chat-row #chat-send { padding-left: 14px; padding-right: 14px; }
  .schedule-fields { flex-wrap: wrap; }
  .schedule-fields select { flex-basis: 100%; }
}

/* Call controls: icon-only compact pill on narrow screens — 5-7 labelled buttons
   would either wrap into a blocky multi-row cluster or overflow; dropping the text
   label (icon meaning is already standard from every video-call app) keeps everything
   in one reachable row, consistent with the floating/sticky bar above. */
@media (max-width: 640px) {
  .call-controls { gap: 6px; padding: 8px 10px; }
  .call-controls button { padding: 10px; min-width: 44px; }
  /* Visually hide the label, NOT display:none — the button's accessible name comes
     from this text (no separate aria-label), so it must stay in the a11y tree. */
  .call-controls button span {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
  }
}

/* ---- embed mode: compact widget (loaded in a third-party iframe) ---- */
.embedded body { background: var(--surface); }
.embedded main { padding-top: 18px; padding-bottom: 18px; }
.embedded header .sub,
.embedded .app-footer { display: none; }
.embedded header .logo { transform: scale(0.9); transform-origin: left center; margin-bottom: 6px; }

/* ==== setup redesign: stepper · two-column setup zone · party colors · mobile auth ==== */

/* progress stepper (role-aware, filled by app.js) */
.stepper { list-style: none; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 22px; margin: 0 0 14px; padding: 0; }
.stepper li { display: inline-flex; align-items: center; gap: 8px; font-size: 0.85rem; font-weight: 600; color: var(--text-faint); }
.step-dot {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.74rem; font-weight: 700;
  background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--text-muted);
}
.stepper li.active { color: var(--accent-strong); }
.stepper li.active .step-dot { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.stepper li.done { color: var(--ok-strong); }
.stepper li.done .step-dot { background: var(--ok-soft); border-color: var(--ok-border); color: var(--ok-strong); }

/* participants: compact bar right under the status line */
.identities { padding: 12px 16px; }

/* setup-phase two-column layout: explainer text (logo/title/intro) sticks on the
   left, the actual forms/status/QR/review sit on the right — breaks out of the narrow
   reading column on wide screens, same technique as .setup-zone below. Fallback
   (narrow / no :has): plain single-column stack. */
.setup-columns { display: contents; }
@media (min-width: 1020px) {
  .setup-columns {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
    width: min(94vw, 1180px);
    margin-left: 50%;
    transform: translateX(-50%);
  }
  /* Explainer text top left, the arguments below — both belong to the text, not to the
     form. The right column spans both rows, otherwise the second row would only start
     below the entire form. */
  /* Not sticky: header and arguments card are two separate grid items, and sticky acts per
     element — the header would stay put while the card below scrolled up behind the text.
     A column that sticks as a whole would need both in ONE element, which would put the card
     above the form again on narrow screens. The column is long enough that sticking gains
     little anyway. */
  .setup-columns-left { grid-column: 1; grid-row: 1; }
  .setup-columns-right { min-width: 0; grid-column: 2; grid-row: 1 / 3; }
  .setup-columns > #app-strengths { grid-column: 1; grid-row: 2; margin-top: 0; }
  /* The inner setup-zone breakout below would otherwise re-center on the viewport,
     escaping the right column — keep it inline here instead. */
  body:not(.wizard) .setup-columns-right .setup-zone:has(> #setup:not([hidden])):has(> #auth:not([hidden])) {
    width: auto; margin-left: 0; transform: none;
  }
  /* With the call's head (2026-11-15): the head spans both columns, as wide as they are, and
     its own columns follow theirs — the logo above the side column, the step and its button
     above the form. Centred on its own, at reading width, it sat between the two. The side
     column's header is empty then (logo and lead are in the head or hidden), so the arguments
     move up to the top of the column. */
  body.has-head:not(.in-call):not(.call-ended) .call-head {
    max-width: none; width: min(94vw, 1180px); margin-left: 50%; transform: translateX(-50%);
  }
  body.has-head:not(.in-call):not(.call-ended) .ch-card {
    /* 320px side column + 28px gap, less the card's padding (18px) and its column gap (16px) */
    grid-template-columns: 314px minmax(0, 1fr) auto;
  }
  body.has-head:not(.in-call):not(.call-ended) .setup-columns-left { display: none; }
  body.has-head:not(.in-call):not(.call-ended) .setup-columns > #app-strengths { grid-row: 1; }
  body.has-head:not(.in-call):not(.call-ended) .setup-columns-right > #status-bar { margin-top: 0; }
  /* In a video call (2026-11-16): what sits above the stage is as wide as the stage (#peers.fluid)
     and starts at its left edge, so the logo stands above the picture's left side. Before, the
     head (760px), the header columns (1180px), the trust bar (reading width) and the stage
     (1500px) each had their own width, centred: a staircase. Margins, not a transform, for the
     head and the bar: the bar's hover rule resets transforms. */
  body.in-call:has(#peers.fluid:not([hidden])) .setup-columns { width: min(96vw, 1500px); }
  body.in-call:has(#peers.fluid:not([hidden])) .call-head,
  body.in-call:has(#peers.fluid:not([hidden])) #trust-bar {
    max-width: none; width: min(96vw, 1500px); margin-left: calc((100% - min(96vw, 1500px)) / 2);
  }
  /* With the head the header column is empty in a call; its margin and the grid's row gap left
     50px of nothing between the head and the stage. */
  body.has-head.in-call .setup-columns-left { display: none; }
  /* ... and what opens from the head (participants, shared data) starts at the stage's left edge,
     not beside an empty column. */
  body.has-head.in-call .setup-columns { row-gap: 0; grid-template-columns: minmax(0, 1fr); }
  body.has-head.in-call .setup-columns-right { grid-column: 1; }
  /* The steps start where the status line's text starts, not in the middle of the column. */
  body.in-call:has(#peers.fluid:not([hidden])) .stepper { justify-content: flex-start; padding-left: 14px; }
}

/* setup zone: on wide screens, when the host both configures AND identifies, the two
   cards sit side by side (cause → effect: pick "Daten teilen" → QR appears NEXT to it)
   and the zone breaks out of the narrow reading column. Fallback (no :has): stacked.
   NOT in guided mode: there the wizard hides #auth with `display: none` rather than
   `[hidden]`, so :has() would still match and hold a column open for a card nobody can
   see. */
.setup-zone { display: contents; }
@media (min-width: 1020px) {
  body:not(.wizard) .setup-zone:has(> #setup:not([hidden])):has(> #auth:not([hidden])) {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 16px;
    align-items: start;
    width: min(94vw, 1060px);
    margin-left: 50%;
    transform: translateX(-50%);
    margin-bottom: 16px;
  }
  body:not(.wizard) .setup-zone:has(> #setup:not([hidden])):has(> #auth:not([hidden])) > .card { margin-bottom: 0; }
  body:not(.wizard) .setup-zone:has(> #setup:not([hidden])):has(> #auth:not([hidden])) > #auth { position: sticky; top: 12px; }
}

/* chat + shared document: side by side on wide screens when BOTH are open (same
   breakout technique as .setup-zone above); a chat-only or doc-only call just stacks
   normally — no reason to force a half-width column when there's nothing beside it. */
.call-panels { display: contents; }
@media (min-width: 1200px) {
  .call-panels:has(> #chat:not([hidden])):has(> #qes-box:not([hidden])) {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: start;
    width: min(94vw, 1400px);
    margin-left: 50%;
    transform: translateX(-50%);
    margin-bottom: 16px;
  }
  .call-panels:has(> #chat:not([hidden])):has(> #qes-box:not([hidden])) > .card { margin-bottom: 0; }
}

/* who is who: self = blue (accent), guest/peers = green (ok) — used consistently on
   the setup panels, participant chips and the review/result columns */
.party { border-left: 3px solid var(--border-strong); border-radius: 2px; padding: 2px 0 4px 14px; margin-top: 16px; }
.party > .field-label:first-child { margin-top: 0; }
.party.you { border-left-color: var(--self-line); }
/* The other side is the one the call is about: its block is tinted, not just edged. */
.party.guest {
  border: 1px solid var(--peer-border); border-left: 3px solid var(--peer); border-radius: var(--r-sm);
  background: var(--peer-soft); padding: 12px 12px 6px 14px;
}
/* The two sides as questions, each with its own mark (.who): "Du" and a violet person. */
.party-q { display: flex; align-items: center; gap: 9px; font-size: 1rem; font-weight: 700; line-height: 1.3; }
.party.you .party-q { color: var(--navy); }
.party.guest .party-q { color: var(--peer-strong); }

/* Who a block, column or chip belongs to — never by colour alone (WCAG 1.4.1): "Du" as a word
   in a neutral pill, the other side as a violet circle with initials (once values may be shown)
   or a person. Decorative: the heading next to it says the same in words. */
.who {
  display: inline-grid; place-items: center; flex: none;
  min-width: 26px; height: 26px; padding: 0 7px; border-radius: var(--r-pill);
  font-size: 0.72rem; font-weight: 750; line-height: 1; letter-spacing: 0.02em; text-transform: none;
}
.who.self { background: var(--self); color: var(--on-self); }
.who.peer { background: var(--peer); color: var(--on-peer); padding: 0; width: 26px; }
.who.peer.has-initials { width: auto; padding: 0 6px; }
.who.peer svg { width: 15px; height: 15px; }
.party-q + .seg { margin-top: 10px; }
/* The pseudonym, folded under "Weitere Angaben" (buildChecklist) */
.attr-more > summary { cursor: pointer; padding: 10px 0; font-size: 0.86rem; color: var(--text-faint); }
.attr-more[open] > summary { margin-bottom: 3px; }
.presets-label { align-self: center; font-size: 0.8rem; color: var(--text-faint); }

/* "Du" left and neutral, the other side right and violet — the same rule as the chips and the
   setup (.who). */
.review-col { border-radius: var(--r-sm); padding: 10px; }
.review-col.you { border-top: 3px solid var(--self-line); padding-left: 0; padding-right: 0; border-radius: 2px; }
.review-col.guest { border: 1px solid var(--peer-border); border-top: 3px solid var(--peer); background: var(--peer-soft); }
.review-col > .field-label { display: flex; align-items: center; gap: 8px; }
.peer-block-head { display: flex; align-items: center; gap: 7px; }
.peer-block-head .who { min-width: 22px; height: 22px; font-size: 0.66rem; }
.peer-block-head .who.peer:not(.has-initials) { width: 22px; }
.peer-block-head .who svg { width: 13px; height: 13px; }

/* presets: highlighted only while the checked set matches the preset (app.js syncs) */
.chip-btn.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.chip-btn.active:hover:not(:disabled) { background: var(--accent-strong); }

/* the config summary: a highlighted footer line; on SMALL screens (long scroll through
   the attribute lists) it sticks to the viewport bottom so the outcome stays visible.
   Not sticky on desktop — there the tall card would keep it hovering over the rows. */
#setup .preview {
  margin-top: 16px; padding: 10px 14px;
  background: var(--veil);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-sm);
}
@media (max-width: 640px) {
  #setup .preview {
    position: sticky; bottom: 10px;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }
}

/* calendar invite: secondary → collapsed behind a disclosure */
.schedule-details > summary { cursor: pointer; list-style: none; }
.schedule-details > summary::-webkit-details-marker { display: none; }
.schedule-details > summary::after { content: "▸"; margin-left: 8px; color: var(--text-faint); }
.schedule-details[open] > summary::after { content: "▾"; }

/* identify CTA (Touchpoint Design Guide, d-you Wallet): who asks and what is shared above, then
   the unmodified d-you button. The QR code and the same-device button live in the wallet modal. */
.auth-cta { display: flex; flex-direction: column; align-items: flex-start; }
/* Who is asking. No warning banner — it is not a fault but information that belongs to the
   request. But not a footnote either: left edge marked, normal text colour instead of
   --text-faint, so it does not vanish among the hints. */
.rp-disclosure {
  color: var(--text);
  border-left: 3px solid var(--accent-border);
  padding-left: 10px;
  margin-bottom: 14px;
}
/* Pinned first, explicitly: it must stand before the wallet button on every screen width. */
.auth-cta .rp-disclosure { order: -1; }
.auth-cta .wallet-need { margin: 0 0 12px; }

/* Guest: what it takes, at the top of the identify card. */
.need-box {
  border: 1px solid var(--accent-border); border-radius: 12px;
  padding: 12px 14px; margin: 0 0 14px;
}
.need-box .need-title { margin: 0; font-weight: 400; color: var(--text); }
/* Folded to one line since 2026-11-15 (a <details>): the summary says what is needed, "Mehr" opens how. */
.need-box { padding-block: 10px; }
.need-box > summary { list-style: none; cursor: pointer; }
.need-box > summary::-webkit-details-marker { display: none; }
.need-box > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.need-box .need-more { color: var(--accent); font-weight: 600; white-space: nowrap; text-decoration: underline; text-underline-offset: 3px; }
.need-box[open] .need-more { display: none; }
.need-box[open] > summary { margin-bottom: 10px; }
.need-box .wallet-alt { margin: 10px 0 0; }
.need-box ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.need-box li { display: flex; gap: 10px; align-items: flex-start; color: var(--text); }
.need-box li[hidden] { display: none; }
.need-box .need-ic { flex: none; width: 20px; height: 20px; margin-top: 1px; color: var(--accent); }
.need-box li .need-ic-audio, .need-box li.is-audio .need-ic-video { display: none; }
.need-box li.is-audio .need-ic-audio { display: block; }
/* Wraps like the text around it: kept on one line, it ran out of the box on an iPhone SE. */
.need-box li > span { min-width: 0; }
.need-box a { color: var(--accent); }
.invite-wallet-note { display: flex; gap: 8px; align-items: flex-start; }
.invite-wallet-note[hidden] { display: none; }
.invite-wallet-note .h-ic { flex: none; margin-top: 2px; }
/* since 2026-11-15 on the first setup step, below the connection type */
#mode-block .invite-wallet-note { margin: 14px 0 0; }

/* The d-you button: the asset as it is — no background, border, shadow or filter of ours, and the
   operator's accent colour cannot reach it. Free space around it, as the guide asks. */
.dyou-btn {
  display: inline-block; padding: 0; margin: 4px 0; border: 0; border-radius: 28px;
  background: none; box-shadow: none; cursor: pointer; line-height: 0;
}
.dyou-btn:hover, .dyou-btn:active { background: none; transform: none; filter: none; box-shadow: none; }
.dyou-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.dyou-btn img { display: block; width: 202px; height: auto; }
.wallet-info-link { margin-top: 10px; font-size: 0.86rem; color: var(--accent); }

/* The wallet modal. Its colours are the guide's (#E8E8E8 ground, dark text) in both themes: the
   modal is the d-you touchpoint, not part of our theme. */
.wallet-modal {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  background: rgba(7, 11, 22, 0.55);
}
.wallet-modal[hidden] { display: none; }
body.wm-open { overflow: hidden; }
.wm-dialog {
  position: relative;
  width: 100%; max-width: 24rem; max-height: calc(100vh - 32px); overflow-y: auto;
  padding: 28px 24px 22px;
  background: #e8e8e8; color: #111;
  border-radius: 20px;
  text-align: center;
}
.wm-dialog h2 { margin: 0 0 14px; font-size: 1.35rem; color: #111; justify-content: center; }
.wm-dialog h2:focus { outline: none; }
.wm-dialog h2:focus-visible { outline: 2px solid #111; outline-offset: 4px; }
.wm-text { margin: 0 auto 10px; max-width: 19rem; font-size: 0.95rem; line-height: 1.45; color: #111; }
.wm-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wm-close {
  position: absolute; top: 10px; right: 10px;
  width: 40px; height: 40px; padding: 8px; border: 0; border-radius: 50%;
  background: transparent; color: #111; box-shadow: none; cursor: pointer;
}
.wm-close:hover { background: rgba(0, 0, 0, 0.07); transform: none; filter: none; }
.wm-close svg { width: 24px; height: 24px; display: block; }
.wm-qr { margin: 6px auto 4px; border: 0; border-radius: 16px; box-shadow: none; padding: 12px; }
.wm-copy {
  margin: 2px auto 0; padding: 4px 8px; border: 0; background: none; box-shadow: none;
  color: #111; font-size: 0.82rem; text-decoration: underline; cursor: pointer;
}
.wm-copy:hover { background: none; transform: none; filter: none; }
.wm-divider { display: flex; align-items: center; gap: 12px; margin: 16px 0 14px; color: #111; font-size: 0.9rem; }
.wm-divider::before, .wm-divider::after { content: ""; flex: 1; height: 1px; background: #9a9a9a; }
.wm-dialog .dyou-btn { margin: 2px auto 0; }
.wm-dialog .dyou-btn:focus-visible { outline-color: #111; }
.wm-dialog .wallet-info-link { display: block; margin: 14px auto 0; color: #111; text-decoration: underline; }
.wm-dialog .auth-renew { display: block; margin: 10px auto 0; color: #444; background: none; border: 0; box-shadow: none; font-size: 0.8rem; text-decoration: underline; }
.wm-dialog .auth-renew[hidden] { display: none; }
.wm-icon { width: 56px; height: 56px; margin: 6px auto 14px; border-radius: 50%; }
.wm-icon.wait { border: 4px solid #c4c4c4; border-top-color: #111; animation: wm-spin 0.9s linear infinite; }
.wm-icon.ok { background: #1f7a3d url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.2 4.2L19 7'/%3E%3C/svg%3E") center / 30px no-repeat; }
.wm-icon.err { background: #b42318 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M12 6v8M12 18v.01'/%3E%3C/svg%3E") center / 30px no-repeat; }
@keyframes wm-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .wm-icon.wait { animation: none; border-top-color: #c4c4c4; } }
#wm-retry { margin-top: 6px; }
.wm-hint { margin-top: 14px; padding-top: 12px; border-top: 1px solid #ddd; font-size: 0.9rem; color: #333; }
/* On a phone the modal fills the screen, with the same elements and texts (guide). It then
   reaches under the status bar and the notch (viewport-fit=cover, and always in the app): keep
   the close button and the content inside the safe area, or the button sits where iOS takes the
   touches and the modal cannot be closed. */
@media (max-width: 640px) {
  .wallet-modal { padding: 0; }
  .wm-dialog {
    max-width: none; max-height: none; height: 100%; border-radius: 0;
    padding-top: calc(56px + env(safe-area-inset-top));
    padding-bottom: calc(22px + env(safe-area-inset-bottom));
  }
  .wm-close { top: calc(10px + env(safe-area-inset-top)); right: max(10px, env(safe-area-inset-right)); }
}

/* ==== in-call identity banderole · raise hand · retractable files · collapsible result ==== */

/* click a tile's name badge → banderole with that person's verified claims */
.tile .name { cursor: pointer; }
.banderole {
  position: absolute; left: 8px; right: 8px; bottom: 48px; z-index: 2;
  background: rgba(7, 11, 22, 0.9);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--r-sm);
  padding: 8px 11px; color: #f1f5f9; font-size: 0.82rem;
  display: grid; gap: 2px;
  max-height: 62%; overflow-y: auto;
}
.banderole .result-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 3px 2px; background: none; border: 0; }
.banderole .r-label { color: #cbd5e1; display: inline-flex; align-items: center; gap: 6px; }
.banderole .r-label .attr-ic { color: #94a3b8; }
.banderole .r-value, .banderole .r-badge { color: #fff; font-weight: 600; }
.banderole .r-value.muted { color: rgba(255, 255, 255, 0.72); font-weight: 500; }
.banderole .result-empty { color: #cbd5e1; padding: 2px; }

/* unified status badges on a tile (mic/camera/hand/screen/document) — same icons as
   the matching control button, so the state is legible without reading the controls.
   Rendered by app.js (renderTileBadges); "off"/active states reuse the same red tint
   the buttons themselves use for their pressed/muted state. */
.tile-badges {
  position: absolute; top: 8px; left: 8px; z-index: 3;
  display: flex; flex-wrap: wrap; gap: 5px;
  max-width: calc(100% - 70px); /* leave room for .cred-badge at top-right */
}
.tile-badge {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(7, 11, 22, 0.74);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #f1f5f9;
  animation: hand-pop 200ms ease-out;
}
.tile-badge svg { width: 15px; height: 15px; }
.tile-badge.off { background: rgba(220, 38, 38, 0.82); border-color: rgba(255, 255, 255, 0.24); }
@keyframes hand-pop { from { transform: scale(0.4); opacity: 0; } }
#hand-btn[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }

/* sender-side "Löschen" on a shared file row */
.msg.file { position: relative; }
.file-del {
  min-height: 0; margin-top: 6px; padding: 3px 10px;
  background: none; border: 1px solid var(--border-strong); border-radius: var(--r-pill);
  color: var(--text-muted); font-size: 0.78rem; font-weight: 600; box-shadow: none;
}
.file-del:hover { color: var(--danger-strong); border-color: var(--danger-strong); background: none; transform: none; filter: none; }

/* collapsible "Geprüfte Angaben" card (video: starts collapsed — data lives on the tiles) */
#result h2 { display: flex; align-items: center; gap: 8px; }
.collapse-btn {
  margin-left: auto; min-height: 0; padding: 4px 12px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-pill);
  color: var(--text-muted); font-size: 0.78rem; font-weight: 600; box-shadow: none;
}
.collapse-btn:hover { background: var(--surface-2); color: var(--accent); transform: none; filter: none; }
#result.collapsed .review-grid, #result.collapsed > .hint { display: none; }
#result.collapsed { padding-bottom: 14px; }

/* ==== in-call credential requests (Pro): host panel · consent modal · tile badge ==== */

/* host: picker panel above the call controls */
.credreq-panel {
  display: grid; gap: 6px;
  max-width: 26rem; margin: 12px auto 0;
  padding: 10px;
}
.credreq-item {
  min-height: 0; padding: 9px 14px; text-align: left;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--r-sm);
  font-size: 0.9rem; font-weight: 600; box-shadow: none;
}
.credreq-item:hover:not(:disabled) { background: var(--surface-2); color: var(--accent); transform: none; filter: none; }
.credreq-item:disabled { opacity: 0.55; }

/* target: consent modal (fields first, wallet link/QR after accept) */
.cred-modal {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  background: rgba(7, 11, 22, 0.55);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.cred-modal[hidden] { display: none; }
.cred-dialog { max-width: 26rem; width: 100%; max-height: 90vh; overflow-y: auto; }
.cred-actions { margin-top: 14px; }
.cred-actions button { flex: 1; }

/* presented-credential badge on a tile (click → banderole with the values) */
.tile .cred-badge {
  position: absolute; top: 8px; right: 8px; z-index: 3;
  max-width: calc(100% - 16px);
  background: rgba(7, 11, 22, 0.74);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(52, 211, 153, 0.5);
  color: #d1fae5;
  padding: 4px 10px; border-radius: var(--r-pill);
  font-size: 0.76rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  cursor: pointer;
}

/* ---- QES in the call: share & review a document together (public/qes/) ---- */
.qes-progress { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 8px 10px; margin: 8px 0; }
.qes-verify { margin: 10px 0 4px; }
.qes-hash {
  display: block; margin: 6px 0 2px; padding: 8px 10px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem; letter-spacing: 0.03em; word-break: break-all; color: var(--text);
}
.qes-hash.ok { border-color: var(--ok); background: var(--ok-soft); color: var(--ok-strong); }
.qes-hash.bad { border-color: var(--danger); background: var(--danger-soft); color: var(--danger); }
.qes-sign { margin: 12px 0 6px; }
.qes-demo-banner {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--warn-soft); border: 1px solid var(--warn-border); border-radius: var(--r-sm);
  color: var(--warn-text); font-size: 0.86rem; line-height: 1.45;
  padding: 10px 12px;
}
.qes-demo-banner svg { width: 18px; height: 18px; flex: none; margin-top: 1px; color: #b7791f; }
.qes-demo-banner strong { color: #6b4700; }
.qes-sign-row { align-items: stretch; }
.qes-sign-row select {
  flex: 1; min-width: 0;
  background: var(--bg); border: 1px solid var(--border-strong); color: var(--text);
  border-radius: var(--r-sm); padding: 10px 12px; font: inherit; font-size: 0.9rem;
}
.qes-signatures { margin-top: 10px; display: grid; gap: 6px; }
.qes-sig-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 8px 10px; font-size: 0.88rem;
}
.qes-sig-demo {
  flex: none; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.02em;
  background: var(--warn-soft); border: 1px solid var(--warn-border); color: var(--warn-text);
  border-radius: var(--r-pill); padding: 3px 9px; text-transform: uppercase;
}
/* identity binding verdict on a signature row */
.qes-bind {
  flex: none; font-size: 0.78rem; font-weight: 600;
  border-radius: var(--r-pill); padding: 3px 9px;
}
.qes-bind-match { background: var(--ok-soft); border: 1px solid var(--ok); color: var(--ok-strong); }
.qes-bind-mismatch, .qes-bind-invalid { background: var(--danger-soft); border: 1px solid var(--danger); color: var(--danger); }
.qes-bind-unknown { background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--text-muted); }
.qes-mismatch {
  margin: 12px 0 6px; padding: 12px 14px;
  background: var(--danger-soft); border: 1px solid var(--danger); border-radius: var(--r-sm);
  color: var(--danger); font-size: 0.9rem; line-height: 1.5;
}
.qes-mismatch .row button:not(.ghost) { background: var(--danger); box-shadow: none; }
.qes-pager { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 0 8px; }
.qes-pgbtn { min-width: 38px; padding: 4px 10px; font-size: 1.05rem; line-height: 1; }
.qes-page-info { font-size: 0.86rem; color: var(--text-muted); min-width: 7.5em; text-align: center; }
.qes-follow { display: inline-flex; align-items: center; gap: 6px; font-size: 0.86rem; color: var(--text-muted); margin-left: auto; cursor: pointer; }
.qes-follow input { accent-color: var(--accent); }
.qes-canvas-wrap {
  border: 1px solid var(--border); border-radius: var(--r-sm); overflow: auto;
  max-height: min(72vh, 900px); background: var(--surface-2);
  /* flex-start: the default `stretch` would squash the canvas (and its text) vertically
     to the wrapper's capped height, distorting the page's aspect ratio. */
  display: flex; justify-content: center; align-items: flex-start;
}
.qes-canvas-wrap canvas { display: block; margin: 0 auto; }
.qes-validate { margin-top: 12px; }
.qes-validate-list { display: grid; gap: 8px; margin-top: 10px; }
.qes-val-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 10px 12px; }
.qes-val-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; font-size: 0.9rem; }
.qes-val-line { font-size: 0.84rem; color: var(--text-muted); line-height: 1.5; }

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

/* ---- native app shell (Capacitor) --------------------------------------
 * Active only when the bundled app runs (html.native-app, set in <head> from
 * EUDI_APP_CONFIG.native). The website never gets the class — zero impact.
 * Layout: compact header, marketing stripped, bottom tab bar (Anruf/Mehr). */
html.native-app .sub,
html.native-app .wallet-note { display: none; }
html.native-app .logo { margin-bottom: 0; gap: 10px; }
html.native-app .logo-mark { width: 34px; height: 34px; filter: none; }
html.native-app img.brand-logo-img { width: auto; }
html.native-app .logo-lockup { width: 160px; }
html.native-app .brand-operator { gap: 10px; }
html.native-app .logo h1 { font-size: 1.22rem; }
html.native-app main { padding-bottom: calc(78px + env(safe-area-inset-bottom)); }
/* footer meta pills live in the settings tab instead */
html.native-app .app-footer { display: none; }
/* keep the sticky call controls above the tab bar */
html.native-app .call-controls { bottom: calc(66px + env(safe-area-inset-bottom)); }
html.native-app body.in-call .call-controls { bottom: max(14px, calc(6px + env(safe-area-inset-bottom))); }
/* and what the page pins to the bottom before the call (2026-11-15): the review's connect bar and
   the setup's summary sat behind the tab bar, so the bar's "Verbinden" could not be seen or reached */
@media (max-width: 640px) {
  html.native-app #review:not([hidden]) .review-actions { bottom: calc(63px + env(safe-area-inset-bottom)); padding-bottom: 10px; }
  /* the bar's height (two rows of buttons) on top of the tab bar's, which main already leaves free */
  html.native-app #review:not([hidden]) { padding-bottom: 140px; }
  html.native-app #setup .preview { bottom: calc(73px + env(safe-area-inset-bottom)); }
}

/* tab switching: settings tab hides the call flow */
html.native-app body[data-tab="settings"] #setup-columns,
html.native-app body[data-tab="settings"] .call-controls { display: none; }

/* bottom tab bar */
.app-tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; align-items: stretch;
  background: var(--veil);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  padding: 6px max(10px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
}
.app-tabbar .tab {
  flex: 1; min-height: 50px; padding: 4px 8px;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  background: none; border: none; box-shadow: none; border-radius: var(--r-sm);
  color: var(--text-faint); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.01em;
}
.app-tabbar .tab:hover:not(:disabled) { transform: none; filter: none; background: none; }
.app-tabbar .tab svg { width: 22px; height: 22px; }
.app-tabbar .tab.active { color: var(--accent); }
.app-tabbar .tab:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
/* during a call the bar disappears — full focus, controls take the bottom */
body.in-call .app-tabbar { display: none; }

/* settings tab */
.app-settings .settings-title { margin: 0 0 14px; font-size: 1.05rem; color: var(--navy); }
.settings-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 2px; border-bottom: 1px solid var(--border);
}
.settings-row:last-of-type { border-bottom: none; }
.settings-label { font-size: 0.92rem; font-weight: 600; color: var(--navy); }
.settings-about { margin: 14px 2px 0; font-size: 0.8rem; color: var(--text-faint); }
/* the moved-in footer pills keep their look; version badge loses its hover cursor */
.settings-row .lang-switch, .settings-row .version-badge { font-size: 0.8rem; }
#settings-theme-slot, #settings-sound-slot { display: inline-flex; align-items: center; gap: 10px; }
.settings-state { font-size: 0.86rem; color: var(--text-muted); }

/* ---- in-call trust bar (app and website) ---------------------------------
 * During a call the pre-call blocks (participant chips, verified data) collapse into one slim
 * bar: shield + names. Tapping toggles body.trust-open which brings the
 * original cards back. Until 2026-10-28 only the app had it; on a phone browser those cards
 * pushed the video below the fold. The status line stays: it is where a failing connection
 * explains itself. */
.trust-bar { display: none; }
body.in-call .trust-bar {
  display: flex; align-items: center; gap: 10px;
  width: 100%; min-height: 48px; margin: 0 0 12px; padding: 10px 14px;
  background: var(--surface); color: var(--navy);
  border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  font-size: 0.9rem; font-weight: 600; text-align: left;
}
body.in-call .trust-bar:hover:not(:disabled) { transform: none; filter: none; background: var(--surface); }
.trust-bar .t-ic { width: 18px; height: 18px; flex: none; color: var(--ok); }
/* Nobody presented anything: a plain shield, no green, no tick. */
.trust-bar.unverified .t-ic { color: var(--text-muted); }
.trust-bar.unverified .t-ic path:last-child { display: none; }
/* The connection is stuttering (see onconnectionstatechange): no green while it recovers. */
body.link-shaky .trust-bar .t-ic { color: var(--warn-text); }
.trust-bar .trust-names { flex: 1 1 0; min-width: 3em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* --text-muted, not --text-faint: a control's icon needs 3:1 against its surface (WCAG 1.4.11). */
.trust-bar .trust-chev { width: 16px; height: 16px; flex: none; color: var(--text-muted); transition: transform var(--t); }
.trust-bar[aria-expanded="true"] .trust-chev { transform: rotate(180deg); }
/* Phone, in a call: the trust bar already says who and how; a status line repeating "Verbunden ✓"
   above it pushed the video down. It comes back for anything that needs attention. */
@media (max-width: 640px) {
  body.in-call #status-bar[data-state="ok"], body.in-call #status-bar[data-state="info"] { display: none; }
}
/* header + stepper are done once connected — collapsed in-call in the app and on phones */
html.native-app body.in-call header,
html.native-app body.in-call #stepper,
html.native-app body.has-head header { display: none; }
html.native-app .ch-logo-btn, html.native-app .call-head.ch-compact .ch-logo-btn { width: 160px; }
@media (max-width: 640px) {
  body.in-call header,
  body.in-call #stepper { display: none; }
}
/* the informational blocks collapse behind the bar; body.trust-open restores them */
body.in-call:not(.trust-open) #identities,
body.in-call:not(.trust-open) #call-banner,
body.in-call:not(.trust-open) #result { display: none; }

/* ---- setup wizard (mobile/app) ------------------------------------------
 * On small screens / in the native app the host setup becomes a 4-step flow:
 * 1 Verbindungsart · 2 Ich teile · 3 Gast teilt · 4 Einladen (summary+share).
 * Purely presentational: body.wizard + data-wkind gate which blocks show; the
 * app logic's own [hidden] attributes keep full authority. app.js activates
 * the mode and removes it for guests (callee) / embeds / desktop. */
#wiz-nav { display: none; }
body.wizard #wiz-nav {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 18px;
}
body.wizard #wiz-nav button { min-width: 108px; }
/* On a 320 px phone two 108 px buttons and the dots did not fit: "Suivant" stuck out of the card. */
@media (max-width: 359px) { body.wizard #wiz-nav { gap: 6px; } body.wizard #wiz-nav button { min-width: 0; flex: 0 1 auto; padding-left: 14px; padding-right: 14px; } }
.wiz-dots { display: inline-flex; gap: 7px; }
/* "Schritt 2 von 5" in words instead of five dots — the dots did not say what the step is. */
.wiz-dots.wiz-step { display: block; flex: 1 1 auto; text-align: center; font-size: 0.82rem; color: var(--text-muted); white-space: nowrap; }
/* Since 2026-11-15, beside the call's head ("1 von 3"): dots, the current one long, so there is one
   counter in words on screen. The words stay for screen readers (and are the live text). Without
   the head (operator-branded, embedded) the words stay as they were. */
.wiz-pips { display: none; gap: 6px; align-items: center; vertical-align: middle; }
body.has-head .wiz-pips { display: inline-flex; }
body.has-head .wiz-words {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
/* Large text (Dynamic Type): "Schritt 2 von 5" gets its own row above the buttons, which no longer fit beside it. */
html.dt-large body.wizard #wiz-nav { flex-wrap: wrap; }
html.dt-large .wiz-dots.wiz-step { order: -1; flex-basis: 100%; }
.wiz-dots .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--border-strong); transition: background var(--t), width var(--t);
}
.wiz-dots .dot.active { background: var(--accent); width: 20px; border-radius: 4px; }
.wiz-dots .dot.done { background: var(--ok); }
/* step gating — by step kind (data-wkind): mode · you · guest · invite · auth.
 * Each step hides the parts that do NOT belong to it (never force display, so the
 * natural rendering is preserved). */
body.wizard[data-wkind="mode"] #setup .party.you,
body.wizard[data-wkind="mode"] #setup .party.guest,
body.wizard[data-wkind="mode"] #openroom-row,
body.wizard[data-wkind="mode"] #setup .preview { display: none; }
body.wizard[data-wkind="you"] #mode-block,
body.wizard[data-wkind="you"] #setup .party.guest,
body.wizard[data-wkind="you"] #openroom-row { display: none; }
body.wizard[data-wkind="guest"] #mode-block,
body.wizard[data-wkind="guest"] #setup .party.you { display: none; }
body.wizard[data-wkind="invite"] #mode-block,
body.wizard[data-wkind="invite"] #setup .party.you,
body.wizard[data-wkind="invite"] #setup .party.guest,
body.wizard[data-wkind="invite"] #openroom-row { display: none; }
body.wizard[data-wkind="auth"] #mode-block,
body.wizard[data-wkind="auth"] #setup .party.you,
body.wizard[data-wkind="auth"] #setup .party.guest,
body.wizard[data-wkind="auth"] #openroom-row { display: none; }
/* Own identification only on the identify step */
body.wizard:not([data-wkind="auth"]) #auth { display: none; }
/* Invite box on its own step AND, folded to its heading, on the identify step: the link must stay
   within reach — it is usually sent ahead of the call, before the host identifies. */
body.wizard:not([data-wkind="invite"]):not([data-wkind="auth"]) #share { display: none; }
body.wizard[data-wkind="auth"] #share.wiz-collapsed > :not(h2) { display: none; }
body.wizard[data-wkind="auth"] #share > h2 { cursor: pointer; display: flex; align-items: center; }
body.wizard[data-wkind="auth"] #share > h2::after {
  content: ""; margin-left: auto; width: 9px; height: 9px;
  border-right: 2px solid var(--text-faint); border-bottom: 2px solid var(--text-faint);
  transform: rotate(-45deg); transition: transform var(--t);
}
body.wizard[data-wkind="auth"] #share:not(.wiz-collapsed) > h2::after { transform: rotate(45deg); }
/* The summary of the choices stays on the identify step too. */
body.wizard[data-wkind="auth"] .preview .prev-mode { display: block; }

/* invite card: "now vs. scheduled" segment sits directly under the heading */
.invite-when { margin-bottom: 12px; }

/* "Neuer Anruf" — primary action at the top of the settings tab (native app) */
.new-call-btn { width: 100%; margin: 4px 0 16px; }

/* Compact stepper on narrow screens: the three labelled steps wrap ugly at ~375px.
 * Keep the numbered circles in one non-wrapping row and show ONLY the active step's
 * label — the wizard dots carry the fine-grained setup progress separately. */
@media (max-width: 640px) {
  .stepper { flex-wrap: nowrap; justify-content: center; gap: 0; margin-bottom: 12px; }
  .stepper li { flex: 0 0 auto; gap: 0; }
  /* connector line between the circles */
  .stepper li + li::before {
    content: ""; width: 20px; height: 2px; margin: 0 6px;
    background: var(--border-strong); border-radius: 2px; align-self: center;
  }
  .stepper li.done + li::before,
  .stepper li.active::before { background: var(--accent); }
  /* hide every label except the active step's, which sits inline after its circle */
  .stepper li span:last-child { display: none; }
  .stepper li.active span:last-child { display: inline; margin-left: 8px; white-space: nowrap; }
}
/* Native app: ONE header row — logo left, stepper as bare dots right (moved into the header by
   app.js). Logo left and the stepper centred below it were two axes with empty space on the
   right; the stage name is in the status card's kicker instead. */
html.native-app header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
html.native-app header .stepper { margin: 0; flex: none; flex-wrap: nowrap; gap: 0; }
html.native-app header .stepper li { gap: 0; }
html.native-app header .stepper li + li::before {
  content: ""; width: 14px; height: 2px; margin: 0 5px;
  background: var(--border-strong); border-radius: 2px; align-self: center;
}
html.native-app header .stepper li.done + li::before,
html.native-app header .stepper li.active::before { background: var(--accent); }
html.native-app header .stepper li span:last-child,
html.native-app header .stepper li.active span:last-child { display: none; }

/* Logo: the gold ring of stars rotates very slowly (transform only, GPU). The shield
 * stays static. Respects prefers-reduced-motion (the ring then stands still). */

/* Imprint links: settings-tab link + web footer link */
.settings-row .settings-link { color: var(--accent); text-decoration: none; font-size: 0.92rem; font-weight: 600; }
.settings-row .settings-link:hover { text-decoration: underline; }
.app-footer .footer-links { display: inline-flex; gap: 10px; } /* wrap together, not one by one */
.app-footer .footer-link { color: var(--text-faint); text-decoration: none; font-size: 0.74rem; font-weight: 600; white-space: nowrap; }
.app-footer .footer-link:hover { color: var(--text-muted); }

/* ---- „Warum whosit?" ----
   Ersetzt seit 2026-09-23 die Häkchen-Liste im Kopf. Beide sagten dasselbe in zwei
   Formulierungen und standen auf dem Desktop nebeneinander; auf schmalen Screens war die Liste
   ohnehin schon ausgeblendet. Deshalb zeigt sich die Karte jetzt überall dort, wo die Liste
   stand — bis der Anruf läuft — und im geführten Modus weiterhin nur auf dem ersten Schritt,
   damit sie die Schritte danach nicht zustellt. */
.app-strengths {
  display: none;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
  padding: 20px 20px 6px; margin-top: 14px;
}
/* Since 2026-10-28 (the rule for "first step only" had been lost): on one-column screens only
   at the very start — the host's first wizard step, a guest before identifying (body.pre-start,
   set in renderStatus). After that it pushed the actual step down, on the review even below the
   connect button. Wide screens keep it in the side column, where it takes nothing away. */
body.pre-start:not(.wizard) .app-strengths,
body.pre-start.wizard[data-wkind="mode"] .app-strengths { display: block; }
@media (min-width: 1020px) {
  body:not(.in-call):not(.call-ended) .app-strengths { display: block; }
}
.app-strengths h2 { font-size: 0.95rem; margin: 0 0 14px; color: var(--navy); }
/* a <details> since 2026-11-15: folded, only its heading, as a row that opens */
.app-strengths > summary { list-style: none; cursor: pointer; display: flex; align-items: center; }
.app-strengths > summary::-webkit-details-marker { display: none; }
.app-strengths > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }
.app-strengths:not([open]) { padding-bottom: 0; }
.app-strengths:not([open]) > summary h2 { margin-bottom: 14px; }
.app-strengths > summary::after {
  content: ""; margin: 0 0 14px auto; width: 16px; height: 16px; flex: none; opacity: 0.6; transition: transform var(--t);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235d6b85' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.app-strengths[open] > summary::after { transform: rotate(180deg); }
@media (min-width: 1020px) { .app-strengths > summary { cursor: default; } .app-strengths > summary::after { display: none; } }
.strength { display: flex; gap: 13px; align-items: flex-start; margin-bottom: 16px; }
.strength .s-ic {
  flex: none; width: 38px; height: 38px; border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent);
}
.strength .s-ic svg { width: 20px; height: 20px; }
.strength h3 { font-size: 0.92rem; margin: 0 0 2px; color: var(--navy); font-weight: 650; }
.strength p { font-size: 0.86rem; margin: 0; color: var(--text-muted); line-height: 1.45; }

/* ---- Tooltip: always dark (--navy is light in the dark theme → white on white) ---- */
.tooltip { background: #0f172a; color: #eef2f8; border: 1px solid rgba(255, 255, 255, 0.12); }
.tooltip::after { border-top-color: #0f172a; }

/* ---- status line: signal colours per state (data-state) ---- */
.status[data-state="ok"]::before { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); animation: none; }
.status[data-state="ok"] { border-color: var(--ok-border); }
.status[data-state="wait"]::before { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); } /* pulse from the base rule stays = "actively waiting" */
.status[data-state="wait"] { border-color: var(--ok-border); }
.status[data-state="prompt"]::before { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.status[data-state="prompt"] { border-color: var(--accent-border); }
.status[data-state="error"]::before { background: var(--danger); box-shadow: 0 0 0 4px var(--danger-soft); animation: none; }
.status[data-state="error"] { border-color: var(--danger); color: var(--danger-strong); }

/* ---- connect button: green signal colour + waiting state ---- */
#confirm-btn { background: var(--ok-btn); box-shadow: 0 8px 18px -8px rgba(5, 150, 105, 0.5); }
#confirm-btn:focus-visible { box-shadow: 0 0 0 3px var(--ok-soft), 0 0 0 1px var(--ok); }
#confirm-btn.waiting, #confirm-btn.waiting:disabled {
  background: var(--ok-soft); color: var(--ok-strong); box-shadow: none;
  opacity: 1; cursor: default; animation: pulse 2s ease-in-out infinite;
}

/* Disconnected banner: on a connection drop the status line keeps showing the last state,
   so a frozen window looks like a working one. Hence a separate, clearly set-off element in
   warning colour — with a button, so nobody has to reload. */
.offline-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--warn-soft);
  border: 1px solid var(--warn-border);
  color: var(--warn-text);
  border-radius: var(--r);
  padding: 12px 15px;
  font-size: 0.9rem;
  margin-bottom: 12px;
}
.offline-bar svg { width: 18px; height: 18px; flex: none; }
.offline-bar span { flex: 1; }
/* Large text (Dynamic Type): the button wraps under the text rather than leaving the screen. */
html.dt-large .offline-bar { flex-wrap: wrap; }
html.dt-large .offline-bar span { flex: 1 1 9em; min-width: 0; }
.offline-bar button { flex: none; }
/* While disconnected: the rest of the UI is a still image and must not look current.
   Dimmed rather than locked — reading stays possible. Deliberately a list instead of
   :not() — an opacity on the banner's parent could not be undone on its children. */
body.link-down #status-bar,
body.link-down #stepper,
body.link-down .card,
body.link-down .schedule-actions { opacity: 0.55; }

/* Waiting screen for an appointment that is not open yet. Deliberately calm: the
   countdown should show that something will happen — not push. */
.invite-wait {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 14px 15px;
  margin-top: 12px;
}
.invite-countdown {
  font-variant-numeric: tabular-nums;
  font-size: 1.05rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* Network pre-flight. Two levels: yellow when the call runs through a relay server
   (works, just weaker) — red when nothing gets out at all. Built like .offline-bar so it
   does not feel out of place. */
.netcheck-bar {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--warn-soft);
  border: 1px solid var(--warn-border);
  color: var(--warn-text);
  border-radius: var(--r);
  padding: 12px 15px;
  font-size: 0.9rem;
  margin-bottom: 12px;
}
.netcheck-bar.is-blocked {
  background: var(--danger-soft);
  border-color: var(--danger);
  color: var(--danger-strong);
}
.netcheck-bar svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.netcheck-text { flex: 1; min-width: 0; }
.netcheck-bar details { margin-top: 6px; }
.netcheck-bar summary { cursor: pointer; opacity: 0.85; }
.netcheck-bar .hint { margin: 6px 0 0; color: inherit; opacity: 0.9; }

/* "Code erneuern" — unobtrusive but findable. It is only needed when the QR code leads
   nowhere, and should not overlay the normal case. */


/* ---- media permission: a standing notice instead of a swallowed error ----
   The status line is no good for this: it is overwritten two lines later during connection
   setup, so a denied camera access would vanish without trace — the call would report
   "Verbunden ✓" without picture and sound. This box stays until media are running. */
.media-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  border-radius: var(--r);
  padding: 12px 15px;
  margin-bottom: 12px;
  font-size: 0.9rem;
  line-height: 1.45;
  background: var(--warn-soft);
  border: 1px solid var(--warn-border);
  color: var(--warn-text);
}
.media-notice .icon { width: 20px; height: 20px; flex: none; }
.media-notice #media-notice-text, .media-notice #update-notice-text { flex: 1 1 14rem; }
.media-notice #media-retry-btn, .media-notice #update-reload-btn { flex: none; }
/* Waiting is not an error: while the browser dialog is open, everything is fine. */
.media-notice[data-state="wait"] {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent-strong);
}

/* ---- readiness per person: verified → confirmed → media → connected ----
   Four dots in the chip instead of another line of text. They answer the question a
   binary "bestätigt ✓" left open: what is it waiting on right now? */
.steps { display: inline-flex; align-items: center; gap: 3px; margin-left: 2px; flex: none; }
.steps i {
  width: 5px; height: 5px; border-radius: 50%;
  background: currentColor; opacity: 0.25;
  transition: opacity var(--t);
}
.steps i.on { opacity: 1; }

/* ---- connect: make "your turn" visible ----
   Signal colour and pulse only when the other side is done and really only this
   confirmation is missing. Otherwise something pulses all the time and nobody looks. */
#confirm-btn.urgent { animation: pulse 2s ease-in-out infinite; }
/* `.row` is a non-wrapping flex container — without wrapping here the readiness text
   would squeeze the two buttons together instead of taking its own line. */
.review-actions { flex-wrap: wrap; }
.review-ready {
  flex: 1 1 100%;
  order: -1;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ok-strong);
}

/* ---- keep connect reachable (narrow screens) ----
   The button sits at the foot of a long card and is regularly off-screen on a phone; when
   the other side confirms, nobody notices it is their turn.
   Deliberately NO modal (reasoning in the markup) and deliberately no IntersectionObserver:
   a bar that appears and disappears depending on scroll position changes the page height
   and can toggle itself. Always pinning it to the bottom is predictable. */
@media (max-width: 640px) {
  #review:not([hidden]) .review-actions {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 40;
    margin: 0;
    padding: 10px max(12px, env(safe-area-inset-left)) max(10px, env(safe-area-inset-bottom));
    background: var(--surface);
    border-top: 1px solid var(--border);
    box-shadow: 0 -6px 20px -12px rgba(0, 0, 0, 0.45);
  }
  #review:not([hidden]) .review-actions > button { flex: 1 1 0; }
  /* Room so the bar never covers the card content — constant, not state-dependent,
     otherwise the page jumps while scrolling. */
  #review:not([hidden]) { padding-bottom: 96px; }
}

@media (prefers-reduced-motion: reduce) {
  #confirm-btn.urgent { animation: none; box-shadow: 0 0 0 3px var(--ok-soft); }
}

/* ---- invite: state the consequence before it happens ----
   As soon as the guest joins, the setup is read-only (app.js, lockSetup). The card therefore
   deliberately sits BELOW the form — it gets a notice and is marked as the step due, instead
   of running along at the bottom as an equal. */
.invite-lock-note { color: var(--warn-text); }
#share.is-next { border-color: var(--accent-border); box-shadow: 0 0 0 3px var(--accent-ring); }

/* ---- "Schritt für Schritt einrichten" switch ----
   Sits in the card, not in a menu: whoever wants out should find the exit where they are
   being guided. Stays visible on every step — which is why `.wiz-switch` appears in none of
   the `data-wkind` hide rules. Set with restraint so it does not compete with the card's
   actual decisions. */
.wiz-switch {
  display: flex; align-items: center; gap: 8px;
  margin: 14px auto 0;
  cursor: pointer;
  font-size: 0.84rem;
  color: var(--text-muted);
}
.wiz-switch input { width: 15px; height: 15px; flex: none; accent-color: var(--accent); }
.wiz-switch:hover { color: var(--text); }
/* Since 2026-10-28 a link-like toggle whose text says what a click does ("Alles auf einer Seite
   zeigen" / "Schritt für Schritt einrichten"); the checkbox stays for keyboard and screen
   readers, out of sight. */
.wiz-switch { width: fit-content; text-decoration: underline; text-underline-offset: 3px; }
.wiz-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.wiz-switch:focus-within { outline: 2px solid var(--accent-ring); outline-offset: 2px; border-radius: 4px; }

/* ---- preview line: two lines, toggled separately ----
   In guided mode the guest half must disappear on the "Ich teile" step: what the guest
   shares is only chosen in the next step, and a summary that anticipates it reads like a
   choice already made. */
.preview > span { display: block; }
/* The connection type is only repeated in the wizard's closing summary — elsewhere it sits
   right above. */
.preview .prev-mode { display: none; }
body.wizard[data-wkind="invite"] .preview .prev-mode { display: block; }
body.wizard[data-wkind="you"] .preview .prev-guest { display: none; }

/* EUDI_VERIFIER=none — see #testmode-banner in index.html */
.testmode-banner {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--warn-soft); border: 1px solid var(--warn-border); border-radius: var(--r-sm);
  color: var(--warn-text); font-size: 0.86rem; line-height: 1.45;
  padding: 10px 12px; margin-bottom: 12px;
}
.testmode-banner svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.noverifier-hint {
  border-left: 3px solid var(--warn-border); padding: 4px 0 4px 12px; margin: 4px 0 8px;
  display: grid; gap: 6px; font-size: 0.88rem; line-height: 1.45;
}
.noverifier-hint p { margin: 0; }
.noverifier-hint a { color: var(--accent-strong, var(--accent)); font-weight: 600; text-decoration: none; }
.noverifier-hint a:hover { text-decoration: underline; }
.seg button[data-locked] { opacity: 0.45; cursor: not-allowed; }

/* ---- device check before the call ---- */
.media-check .mc-live { display: grid; gap: 12px; margin-top: 4px; }
.media-check .mc-live[hidden] { display: none; }
.media-check video {
  width: 100%; max-width: 360px; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--r-sm); background: #0b1220; transform: scaleX(-1);
}
.media-check video[hidden] { display: none; }
.mc-meter-row { display: flex; align-items: center; gap: 10px; max-width: 360px; }
.mc-meter-row svg { width: 18px; height: 18px; flex: none; color: var(--accent); }
.mc-meter { flex: 1; height: 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; }
.mc-meter span { display: block; height: 100%; width: 0; background: var(--ok-strong, #16a34a); transition: width 90ms linear; }
.media-check .mc-say { margin: -6px 0 0; }
.mc-fields { display: grid; gap: 9px; max-width: 360px; }
.mc-fields label { display: grid; gap: 4px; font-size: 0.86rem; color: var(--text-muted); }
.mc-fields label[hidden] { display: none; }
.mc-fields select {
  width: 100%; min-width: 0; background: var(--bg); border: 1px solid var(--border-strong); color: var(--text);
  border-radius: var(--r-sm); padding: 10px 12px; font: inherit; font-size: 0.9rem; cursor: pointer;
}
.mc-fields select:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.media-check .openroom { margin-top: 0; }
.media-check .openroom[hidden] { display: none; }
.media-check .mc-tone, .media-check .mc-stop, .media-check #mc-start { justify-self: start; }
.mc-tone svg { width: 18px; height: 18px; }
/* Step wizard: the check belongs to the end of the setup, next to inviting and identifying. */
body.wizard:not([data-wkind="invite"]):not([data-wkind="auth"]) #media-check { display: none; }

/* Host: notification when the guest arrives */
.notify-btn { margin-top: 12px; }
.notify-btn svg { width: 18px; height: 18px; }
.notify-btn:disabled { opacity: 1; color: var(--ok-strong, #16a34a); border-color: transparent; background: none; cursor: default; padding-left: 0; }

/* "You are muted" — a bubble above the call controls. --cc-h is the bar's measured height
   (app.js): one row on a phone, but two when the host also has the Pro actions. */
.muted-hint {
  position: fixed; z-index: 21; left: 50%; transform: translateX(-50%); max-width: calc(100vw - 32px);
  bottom: calc(max(14px, calc(6px + env(safe-area-inset-bottom))) + var(--cc-h, 62px) + 14px);
  display: flex; align-items: center; gap: 10px;
  background: var(--text); color: var(--bg); border-radius: var(--r-pill);
  padding: 8px 8px 8px 16px; box-shadow: var(--shadow); font-size: 0.9rem;
}
.muted-hint[hidden] { display: none; }
/* Large text (Dynamic Type, html.dt-large — see applyDynamicType): the button may wrap too, rather
   than push past the screen edge. max-content, because with left: 50% the shrink-to-fit width
   would stop at half the screen. */
html.dt-large .muted-hint { width: max-content; }
html.dt-large .muted-hint > span { min-width: 0; -webkit-hyphens: auto; hyphens: auto; }
html.dt-large .muted-hint button { white-space: normal; }

/* Background effects: the same tile picker in the device check and above the call controls. */
.bg-row { display: grid; gap: 6px; }
.bg-row[hidden] { display: none; }
.bg-row-label { font-size: 0.86rem; color: var(--text-muted); }
.bg-tiles { display: flex; flex-wrap: wrap; gap: 8px; }
.bg-tile {
  width: 56px; height: 40px; min-height: 0; padding: 0; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--surface-2, rgba(127, 127, 127, 0.12)) center / cover no-repeat;
  border: 2px solid var(--border); color: var(--text-muted); box-shadow: none;
}
.bg-tile svg { width: 20px; height: 20px; }
.bg-tile:hover { border-color: var(--accent); }
.bg-tile[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); color: var(--text); }
.bg-tile.is-busy { animation: bg-busy 1s ease-in-out infinite alternate; }
@keyframes bg-busy { to { opacity: 0.45; } }
@media (prefers-reduced-motion: reduce) { .bg-tile.is-busy { animation: none; opacity: 0.6; } }
.bg-status { margin: 6px 0 0; font-size: 0.82rem; }
.bg-status[hidden] { display: none; }
.bg-pop {
  position: fixed; z-index: 22; left: 50%; transform: translateX(-50%);
  width: max-content; max-width: calc(100vw - 32px);
  bottom: calc(max(14px, calc(6px + env(safe-area-inset-bottom))) + var(--cc-h, 62px) + 14px);
  padding: 12px; margin: 0; box-shadow: var(--shadow);
}
.bg-pop[hidden] { display: none; }
.muted-hint button { min-height: 34px; padding: 6px 14px; font-size: 0.85rem; }

/* ---- touch: hit areas of at least 44 × 44 pt (Apple HIG; WCAG 2.5.5) ----
 * Only for coarse pointers (phones, tablets, the app) — a mouse keeps the compact sizes. Where
 * the look should stay as it is, an invisible ::after grows the hit area around the control. */
@media (pointer: coarse) {
  .tile-fs::after,
  .muted-hint button::after,
  .collapse-btn::after,
  .file-del::after { content: ""; position: absolute; inset: -9px -6px; }
  .muted-hint button, .collapse-btn, .file-del { position: relative; }
  /* Name and credential badge on a tile clip their text (ellipsis), and that would clip an
     ::after too. A transparent 7px border grows them to 44px instead; the 1px rim moves into an
     inset shadow and the badge shifts outward by the difference, so it shows where it always
     did. No backdrop blur here: it would paint the transparent border as a halo, and it costs
     GPU time over the video. */
  .tile .name, .tile .cred-badge {
    border-width: 7px; border-color: transparent; background-clip: padding-box;
    -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  .tile .name { left: 2px; right: 2px; bottom: 2px; max-width: calc(100% - 4px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14); }
  /* smaller type than the name, so a wider border to reach 44px */
  .tile .cred-badge { border-width: 9px; top: 0; right: 0; max-width: 100%; box-shadow: inset 0 0 0 1px rgba(52, 211, 153, 0.5); }
  .videos.duo .tile:not([data-peer="self"]) .cred-badge { bottom: 38px; }
  /* No room for an ::after between neighbours: these simply get the full size. */
  .emoji-palette .emoji {
    box-sizing: border-box; min-width: 44px; min-height: 44px;
    display: inline-flex; align-items: center; justify-content: center;
  }
  .bg-tile { height: 44px; }
}

/* App intro (app.js playAppIntro): at app start a page of its own — the logo animation with the
   sound mark on a sky whose colours move with the sound, then the app fades in underneath. Shown
   from the first paint by the head script (html.ai-on). Times follow the sound mark like the
   logo animation (logo-animation.css): QRZ from 0.0 to 2.2 s, the star at 2.36 s. Nothing moves
   over the logo — no waves, no glow (removed 2026-11-05, Jakob: only the Morse signal should be
   seen). The colour logo needs light ground: in dark mode a light halo
   carries it, the sky around stays dark. Only the logo file and the approved animation are shown
   — no text added (public/logo/README.md). */
.app-intro { display: none; }
html.ai-on .app-intro {
  --ai-w: min(320px, 72vw);
  --ai-base: linear-gradient(165deg, #e4f0fc 0%, #f5f8fc 48%, #edf2fb 100%);
  --ai-halo: rgba(255, 255, 255, 0.75); --ai-halo-mid: rgba(255, 255, 255, 0.4);
  --ai-blob-a: 0.55;
  position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; overflow: hidden;
  background: var(--ai-base); cursor: pointer; -webkit-tap-highlight-color: transparent;
}
html.ai-on body { overflow: hidden; }
html[data-theme="dark"].ai-on .app-intro {
  --ai-base: linear-gradient(165deg, #0b1220 0%, #0d1830 55%, #0b1220 100%);
  --ai-halo: #f5f8fc; --ai-halo-mid: rgba(245, 248, 252, 0.55); --ai-blob-a: 0.8;
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]).ai-on .app-intro {
    --ai-base: linear-gradient(165deg, #0b1220 0%, #0d1830 55%, #0b1220 100%);
    --ai-halo: #f5f8fc; --ai-halo-mid: rgba(245, 248, 252, 0.55); --ai-blob-a: 0.8;
  }
}
.ai-sky { position: absolute; inset: 0; pointer-events: none; }
.ai-blob {
  position: absolute; width: 95vmax; height: 95vmax; left: 50%; top: 50%; margin: -47.5vmax 0 0 -47.5vmax;
  border-radius: 50%; opacity: 0; will-change: transform, opacity;
}
.ai-b1 { background: radial-gradient(closest-side, #4a9fe8, rgba(74, 159, 232, 0)); }
.ai-b2 { background: radial-gradient(closest-side, #1747b8, rgba(23, 71, 184, 0)); }
.ai-b3 { background: radial-gradient(closest-side, #3cc8e0, rgba(60, 200, 224, 0)); }
.ai-b4 { background: radial-gradient(closest-side, #ffcc00, rgba(255, 204, 0, 0)); }
.ai-halo {
  position: absolute; left: 50%; top: 50%; width: calc(var(--ai-w) * 1.9); height: calc(var(--ai-w) * 1.25);
  transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(closest-side, var(--ai-halo) 50%, var(--ai-halo-mid) 72%, rgba(245, 248, 252, 0) 100%);
}
.ai-stage { position: relative; width: var(--ai-w); will-change: transform, opacity; }
.ai-logo { position: relative; }
/* until it plays: the picture waits for its sound (startIntroSound), not shown at rest first */
.app-intro:not(.ai-run) .ai-logo { visibility: hidden; }
.ai-logo .la { display: block; width: 100%; height: auto; }
/* the colour journey: blue sweeps in, turquoise swells while the ring builds up, gold rises with
   the star (2.36 s = 84 %), then it settles into blue and a little gold */
.ai-run .ai-b1 { animation: ai-b1 2.8s cubic-bezier(0.3, 0.6, 0.3, 1) both; }
.ai-run .ai-b2 { animation: ai-b2 2.8s ease-in-out both; }
.ai-run .ai-b3 { animation: ai-b3 2.8s ease-in-out both; }
.ai-run .ai-b4 { animation: ai-b4 2.8s ease-out both; }
@keyframes ai-b1 {
  0% { opacity: 0; transform: translate(-40%, 35%) scale(0.7); }
  30% { opacity: var(--ai-blob-a); }
  100% { opacity: calc(var(--ai-blob-a) * 0.7); transform: translate(-28%, 30%) scale(1); }
}
@keyframes ai-b2 {
  0% { opacity: 0; transform: translate(45%, -45%) scale(0.8); }
  25% { opacity: calc(var(--ai-blob-a) * 0.45); }
  60% { opacity: calc(var(--ai-blob-a) * 0.6); transform: translate(30%, -38%) scale(1); }
  100% { opacity: calc(var(--ai-blob-a) * 0.5); transform: translate(26%, -36%) scale(1.05); }
}
@keyframes ai-b3 {
  0%, 30% { opacity: 0; transform: translate(-30%, -30%) scale(0.6); }
  48% { opacity: calc(var(--ai-blob-a) * 0.55); }
  62% { opacity: calc(var(--ai-blob-a) * 0.75); transform: translate(-20%, -26%) scale(0.95); }
  100% { opacity: calc(var(--ai-blob-a) * 0.25); transform: translate(-16%, -22%) scale(1.1); }
}
@keyframes ai-b4 {
  0%, 82% { opacity: 0; transform: translate(40%, 10%) scale(0.4); }
  94% { opacity: calc(var(--ai-blob-a) * 0.6); }
  100% { opacity: calc(var(--ai-blob-a) * 0.3); transform: translate(34%, 22%) scale(0.9); }
}

/* into the app: the logo comes a little closer and fades, the sky fades, the app rises */
.app-intro.ai-out { animation: ai-out 0.75s cubic-bezier(0.4, 0, 0.2, 1) forwards; pointer-events: none; }
.app-intro.ai-out .ai-stage { animation: ai-stage-out 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
.app-intro.ai-out .ai-sky { animation: ai-sky-out 0.75s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
html.ai-reveal body > :not(.app-intro) { animation: ai-app-in 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.15s both; }
@keyframes ai-out { 0%, 30% { opacity: 1; } 100% { opacity: 0; } }
@keyframes ai-stage-out { to { opacity: 0; transform: scale(1.12) translateY(-8px); } }
@keyframes ai-sky-out { to { transform: scale(1.1); } }
@keyframes ai-app-in { from { opacity: 0; transform: translateY(16px) scale(0.985); } to { opacity: 1; transform: none; } }

/* Actions in a call (app.js "Actions in a call"): the module's page in a panel over the call —
   a sheet on the right on wide screens, so the other person stays in view; full screen on a phone.
   Audio and video keep running underneath. */
.aktion-fenster {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); z-index: 70;
  display: flex; flex-direction: column; background: var(--surface);
  border-left: 1px solid var(--border); box-shadow: -24px 0 60px -30px rgba(15, 23, 42, 0.45);
}
.aktion-fenster[hidden] { display: none; }
.aktion-kopf {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px;
  padding-top: max(10px, env(safe-area-inset-top)); border-bottom: 1px solid var(--border); background: var(--surface-2);
}
.aktion-kopf strong { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--navy); }
.aktion-laeuft { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--ok-strong); font-weight: 600; flex-basis: 100%; }
.aktion-punkt { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); animation: pulse 1.6s ease infinite; }
.aktion-fenster iframe { flex: 1; width: 100%; border: 0; background: var(--bg); }
.aktion-gruppe { margin: 4px 4px 2px; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
@media (min-width: 900px) { body.aktion-offen main { margin-right: min(560px, 100vw); } }
