/* Mitreden — Plattform für barrierefreie Videocalls */
/* Schriften: lokal gehostet (fonts/fonts.css, via index.html eingebunden) —
   kein Google-CDN, keine IP-Übertragung an Dritte. */

:root {
  /* Blues — enna-nah, warm */
  --blue-900: #142E73;
  --blue-800: #1A3A8C;
  --blue-700: #2456C7;
  --blue-600: #2E63DA;
  --blue-500: #3B72E0;
  --blue-200: #B6CBF1;
  --blue-100: #DCE7F8;
  --blue-50:  #EFF4FC;

  /* Warm neutrals — enna-Look */
  --cream:      #FBF7EE;
  --cream-warm: #F4ECDA;
  --paper:      #FFFFFF;

  /* Accents */
  --yellow:      #FFB547;
  --yellow-soft: #FFE4B5;
  --green:       #16A34A;
  --green-soft:  #DCFCE7;
  --red:         #D14343;
  --red-soft:    #FBE3E3;
  --pink-soft:   #F8D9D9;

  /* Text & lines */
  --ink:        #0F1B3D;
  --ink-2:      #2A355A;
  --ink-muted:  #5A6478;
  --line:       #E8E2D2;
  --line-soft:  #F0EADC;

  /* Radii */
  --r-sm: 14px;
  --r-md: 22px;
  --r-lg: 32px;
  --r-xl: 44px;
  --r-full: 999px;

  /* Shadows */
  --shadow-sm: 0 2px 6px rgba(20, 46, 115, 0.06);
  --shadow-md: 0 8px 24px rgba(20, 46, 115, 0.08);
  --shadow-lg: 0 20px 50px rgba(20, 46, 115, 0.12);

  /* Type */
  --font-body: 'Atkinson Hyperlegible', system-ui, -apple-system, sans-serif;
  --font-display: 'Bricolage Grotesque', 'Atkinson Hyperlegible', sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* ============ APP SHELL ============ */
.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(12px, 2vh, 20px) clamp(16px, 3vw, 40px);
  background: var(--cream);
  border-bottom: 1px solid var(--line-soft);
  gap: 24px;
  position: sticky;
  top: 0;
  z-index: 50;
}
@media (max-width: 720px) {
  .topbar { padding: 16px 20px; }
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  color: var(--ink);
}
.brand-mark {
  width: 44px; height: 44px;
  border-radius: 14px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  display: grid; place-items: center;
  color: white;
  position: relative;
  overflow: hidden;
}
.brand-mark svg,
.brand-mark img { display: block; }

/* Mode segmented control */
.mode-toggle {
  display: inline-flex;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--r-full);
  padding: 5px;
  gap: 4px;
}
.mode-toggle button {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 16px;
  padding: 12px 22px;
  border-radius: var(--r-full);
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background .2s, color .2s;
}
.mode-toggle button.active {
  background: var(--ink);
  color: white;
}
@media (max-width: 540px) {
  .mode-toggle button { padding: 10px 14px; font-size: 14px; }
  .mode-toggle button span.label-long { display: none; }
}

.topbar-right {
  display: flex; align-items: center; gap: 16px;
}
.avatar-chip {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 16px 6px 6px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--r-full);
  font-weight: 700;
  font-size: 15px;
}
.avatar-chip .av {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--yellow-soft);
  display: grid; place-items: center;
  font-size: 18px;
}
@media (max-width: 720px) { .avatar-chip .name { display: none; } .avatar-chip { padding: 4px; } }

/* ============ MAIN ============ */
.main {
  flex: 1;
  padding: clamp(16px, 3.2vh, 40px) clamp(16px, 3vw, 40px);
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}
/* Teilnehmer-Start füllt die verfügbare Höhe und zentriert den
   Inhalt vertikal — keine tote Fläche unten, kein Oben-Kleben.
   "safe center" verhindert Abschneiden oben auf kurzen Screens. */
.main--home {
  display: flex;
  flex-direction: column;
  justify-content: safe center;
  gap: clamp(20px, 4vh, 48px);
}
/* Konsistente Kartenhöhe: beide Zustände — Treffen läuft / kein
   Treffen — rendern exakt gleich große Karten an gleicher Position.
   Inhalt wird in der Karte zentriert. Gedeckelt auf ~560px, damit
   die Karte auf hohen Screens nicht balloniert; schrumpft auf
   kurzen Screens mit. */
.main--home .home-grid {
  flex: 0 0 auto;
  min-height: min(580px, calc(100dvh - 7rem));
}
@media (max-width: 720px) { .main { padding: 24px 20px; } }

.main.fluid { max-width: none; }

/* ============ CARDS ============ */
.card {
  background: var(--paper);
  border-radius: var(--r-lg);
  padding: 32px;
  border: 1px solid var(--line-soft);
}
.card-warm {
  background: var(--cream-warm);
  border-radius: var(--r-lg);
  padding: 32px;
}

/* ============ TYPE ============ */
.h-display {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
}
.h-1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
}
.h-2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  line-height: 1.2;
  color: var(--ink);
  margin: 0;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: var(--blue-100);
  color: var(--blue-800);
  border-radius: var(--r-full);
  font-size: 15px;
  font-weight: 700;
  text-transform: none;
}
.eyebrow.live {
  background: #FFE5E5;
  color: var(--red);
}
.eyebrow.live .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--red);
  animation: pulse 1.6s ease-in-out infinite;
}
.muted { color: var(--ink-muted); }

/* Easy-language type */
.ls-text {
  font-size: 24px;
  line-height: 1.5;
  font-weight: 400;
  color: var(--ink);
  max-width: 36ch;
}
.ls-text strong { font-weight: 700; }
.ls-line { display: block; margin-bottom: 8px; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px 28px;
  border-radius: var(--r-full);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 18px;
  line-height: 1;
  transition: transform .12s ease, background .2s, box-shadow .2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--blue-700);
  color: white;
}
.btn-primary:hover { background: var(--blue-800); }

.btn-secondary {
  background: var(--paper);
  color: var(--ink);
  border: 1.5px solid var(--line);
}
.btn-secondary:hover { background: var(--blue-50); }

.btn-ghost { color: var(--ink); }
.btn-ghost:hover { background: var(--blue-50); }

.btn-danger { background: var(--red); color: white; }
.btn-danger:hover { background: #B23838; }

.btn-huge {
  padding: clamp(14px, 2.4vh, 28px) clamp(24px, 4vw, 44px);
  font-size: clamp(18px, min(2.6vh, 5vw), 26px);
  border-radius: var(--r-full);
  gap: 16px;
}

.btn-block { width: 100%; }

/* ============ ICONS ============ */
.icon { width: 24px; height: 24px; flex-shrink: 0; }
.icon-lg { width: 32px; height: 32px; flex-shrink: 0; }

/* ============ PARTICIPANT HOME ============ */
.home-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: stretch;
}
@media (max-width: 900px) {
  .home-grid { grid-template-columns: 1fr; }
}

.home-hero {
  background: var(--paper);
  border-radius: var(--r-xl);
  /* Abstände skalieren mit der Breite (dynamisch), aber höhen-stabil —
     so ist die Inhaltshöhe in beiden Zuständen (läuft / kein Treffen)
     gleich und die Karten matchen exakt. */
  padding: clamp(28px, 2.6vw, 44px) clamp(22px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  justify-content: center;  /* Inhalt vertikal mittig in der Karte */
  gap: clamp(14px, 1.2vw, 20px);
  border: 1px solid var(--line-soft);
  position: relative;
  overflow: hidden;
}
/* Hero-Typo skaliert mit der Breite (höhen-stabil → Zustände matchen) */
.home-hero .h-display { font-size: clamp(30px, 2.4vw, 44px); }
.home-hero .ls-text { font-size: clamp(18px, 1.4vw, 22px); }
.home-hero .ls-line { margin-bottom: 6px; }
/* Innere "Nächstes Treffen"-Karte: fluide Höhe (überschreibt das
   Inline-padding aus der JSX, damit sie auf flachen Screens passt) */
.home-hero .card-warm { padding: clamp(16px, 2.6vh, 28px) !important; }
.home-hero.live {
  background: linear-gradient(135deg, #2456C7 0%, #1A3A8C 100%);
  color: white;
}
.home-hero.live .h-display, .home-hero.live .h-1 { color: white; }
.home-hero.live .muted { color: rgba(255,255,255,0.78); }

.home-illus {
  background: var(--cream-warm);
  border-radius: var(--r-xl);
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  min-height: 380px;
}

.next-meetings {
  margin-top: 32px;
}
/* Im zentrierten Home-Layout übernimmt der Flex-Gap den Abstand */
.main--home .next-meetings { margin-top: 0; }
.meeting-row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  margin-bottom: 12px;
}
.meeting-day {
  width: 76px;
  height: 76px;
  background: var(--blue-50);
  border-radius: var(--r-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.meeting-day .d { font-family: var(--font-display); font-size: 28px; font-weight: 700; color: var(--blue-800); line-height: 1; }
.meeting-day .m { font-size: 13px; font-weight: 700; color: var(--blue-700); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.05em; }
.meeting-info { flex: 1; min-width: 0; }
.meeting-info .title { font-family: var(--font-display); font-weight: 700; font-size: 20px; color: var(--ink); }
.meeting-info .time { font-size: 16px; color: var(--ink-muted); margin-top: 4px; display: flex; gap: 14px; flex-wrap: wrap; }

/* ============ VIDEO CALL ============ */
.call-shell {
  background: #0B1430;
  height: 100vh;
  height: 100dvh; /* mobile: berücksichtigt Safari-Address-Bar */
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: white;
}
.call-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  gap: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.call-topic {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
}
.call-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.1);
  padding: 8px 16px;
  border-radius: var(--r-full);
  font-size: 15px;
  font-weight: 700;
}
.call-pill.live { background: rgba(220,67,67,0.2); color: #FFB6B6; }
.call-pill .dot { width: 10px; height: 10px; border-radius: 50%; background: #FF7676; animation: pulse 1.6s ease-in-out infinite; }
.call-stage {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 0;
  min-height: 0;
  overflow-y: auto;   /* Tiles scrollen intern, Dock klebt am Boden */
}
.call-stage.no-side { grid-template-columns: 1fr; }
@media (max-width: 900px) {
  .call-stage { grid-template-columns: 1fr; }
  .call-side { display: none; }
}

.tiles {
  flex: 1;
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  align-content: safe center;   /* wenige Kacheln mittig; viele → oben + scroll */
  justify-items: center;
}
.tile {
  background: #182347;
  border-radius: var(--r-md);
  aspect-ratio: 4 / 3;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid transparent;
  transition: border-color .2s;
  width: 100%;
  /* Doppelter Deckel:
     1) nie höher als der sichtbare Stage (100dvh − Topbar/Dock/Padding
        ≈ 17rem) → kein Scrollen bei einem einzelnen Teilnehmer
     2) moderate Absolut-Obergrenze (540px hoch) → ein Solo-Preview
        füllt nicht den ganzen Bildschirm.
     max-width/max-height konsistent im 4:3-Verhältnis. */
  max-height: min(calc(100dvh - 17rem), 540px);
  max-width: min(calc((100dvh - 17rem) * 4 / 3), 720px);
}
.tile.speaking { border-color: var(--yellow); box-shadow: 0 0 0 4px rgba(255,181,71,0.25); }
.tile.me { border-color: rgba(255,255,255,0.18); }
.tile video {
  width: 100%; height: 100%; object-fit: cover;
  transform: scaleX(-1);
}
.tile-name {
  position: absolute;
  bottom: 12px; left: 12px;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  padding: 6px 14px;
  border-radius: var(--r-full);
  font-weight: 700;
  font-size: 15px;
  display: inline-flex; align-items: center; gap: 8px;
}
.tile-mic {
  position: absolute;
  top: 12px; right: 12px;
  background: rgba(0,0,0,0.55);
  width: 36px; height: 36px;
  border-radius: 50%;
  display: grid; place-items: center;
}
.tile-mic.muted { background: var(--red); }
.tile-hand {
  position: absolute;
  top: 12px; left: 12px;
  background: var(--yellow);
  color: var(--ink);
  width: 44px; height: 44px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 22px;
  animation: wave 1.4s ease-in-out infinite;
}
.tile-avatar {
  width: 96px; height: 96px;
  border-radius: 50%;
  background: var(--blue-100);
  color: var(--blue-800);
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 700;
}

/* Emoji-Reaktionen — pro Kachel, dem Sender zugeordnet.
   Steigen verspielt vom unteren Rand der Kachel nach oben auf. */
.tile-reactions {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 4;
}
.tile-emoji {
  position: absolute;
  bottom: 14%;
  font-size: clamp(32px, 3.6vw, 52px);
  line-height: 1;
  will-change: transform, opacity;
  animation: tileFly 2.4s cubic-bezier(.22,.7,.3,1) forwards;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.35));
}
@keyframes tileFly {
  0%   { transform: translateY(10px) scale(0.4) rotate(var(--tilt, 0deg)); opacity: 0; }
  18%  { transform: translateY(-6px) scale(1.15) rotate(var(--tilt, 0deg)); opacity: 1; }
  70%  { opacity: 1; }
  100% { transform: translateY(-150px) scale(0.85) rotate(calc(var(--tilt, 0deg) * -1)); opacity: 0; }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
@keyframes wave {
  0%, 100% { transform: rotate(-10deg); }
  50% { transform: rotate(10deg); }
}

/* Side panel */
.call-side {
  background: #0E1A3B;
  border-left: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
}
.side-tabs {
  display: flex;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.side-tabs button {
  flex: 1;
  padding: 16px;
  font-weight: 700;
  font-size: 15px;
  color: rgba(255,255,255,0.55);
  border-bottom: 3px solid transparent;
}
.side-tabs button.active {
  color: white;
  border-bottom-color: var(--yellow);
}
.side-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}
.hand-list-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.06);
  border-radius: var(--r-md);
  margin-bottom: 8px;
}
.hand-list-item .num {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--ink);
  display: grid; place-items: center;
  font-weight: 700;
}
.hand-list-item .nm { font-weight: 700; font-size: 16px; flex: 1; }

/* Bottom dock */
.call-dock {
  background: rgba(11, 20, 48, 0.96);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  flex-shrink: 0;   /* Dock behält Höhe, wird nie vom Stage gequetscht */
}
.dock-group {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}
.dock-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 64px;
  min-width: 64px;
  padding: 0 22px;
  background: rgba(255,255,255,0.1);
  color: white;
  border-radius: var(--r-md);
  font-weight: 700;
  font-size: 16px;
  transition: background .15s;
}
.dock-btn:hover { background: rgba(255,255,255,0.18); }
.dock-btn.icon-only { padding: 0; width: 64px; }
.dock-btn.toggled-off { background: rgba(220,67,67,0.85); }
.dock-btn.toggled-off:hover { background: rgba(220,67,67,1); }
.dock-btn.danger { background: var(--red); }
.dock-btn.danger:hover { background: #B23838; }

/* Emoji rail */
.emoji-rail {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: var(--r-full);
}
.emoji-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  font-size: 28px;
  display: grid;
  place-items: center;
  transition: transform .15s, background .15s;
  background: transparent;
}
.emoji-btn:hover { background: rgba(255,255,255,0.14); transform: scale(1.08); }
.emoji-btn:active { transform: scale(0.92); }

/* For participant emoji bar — extra large */
.emoji-rail.huge .emoji-btn {
  width: 72px;
  height: 72px;
  font-size: 36px;
}

/* ============ DASHBOARD ============ */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
@media (max-width: 1100px) { .dash-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .dash-grid { grid-template-columns: 1fr; } }

.stat-card {
  background: var(--paper);
  border-radius: var(--r-md);
  padding: 24px;
  border: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stat-card .label { font-size: 14px; color: var(--ink-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.stat-card .val { font-family: var(--font-display); font-size: 44px; font-weight: 700; color: var(--ink); line-height: 1; }
.stat-card .delta { font-size: 14px; font-weight: 700; color: var(--green); display: inline-flex; align-items: center; gap: 4px; }
.stat-card .delta.down { color: var(--red); }

.dash-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 20px;
  margin-top: 20px;
}
@media (max-width: 1000px) { .dash-row { grid-template-columns: 1fr; } }

.chart-card {
  background: var(--paper);
  border-radius: var(--r-md);
  padding: 28px;
  border: 1px solid var(--line-soft);
}
.chart-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

/* Tabs for moderator */
.mod-tabs {
  display: inline-flex;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--r-full);
  padding: 5px;
  gap: 4px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.mod-tabs button {
  padding: 12px 22px;
  font-weight: 700;
  font-size: 15px;
  border-radius: var(--r-full);
  color: var(--ink-muted);
  display: inline-flex; align-items: center; gap: 8px;
}
.mod-tabs button.active { background: var(--blue-700); color: white; }

/* Table */
.tbl {
  width: 100%;
  border-collapse: collapse;
}
.tbl th, .tbl td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 16px;
}
.tbl th {
  font-size: 13px;
  color: var(--ink-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.tbl tr:last-child td { border-bottom: none; }
.tbl td .row-name { display: inline-flex; align-items: center; gap: 12px; font-weight: 700; }
.bar {
  height: 8px;
  background: var(--blue-50);
  border-radius: var(--r-full);
  overflow: hidden;
  min-width: 100px;
}
.bar > div { height: 100%; background: var(--blue-700); border-radius: var(--r-full); }

/* ============ NEW MEETING FORM ============ */
.form-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
}
@media (max-width: 900px) { .form-grid { grid-template-columns: 1fr; } }

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 22px;
}
.field label {
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
}
.field .hint { font-size: 14px; color: var(--ink-muted); }
.field input[type="text"],
.field input[type="password"],
.field input[type="email"],
.field input[type="date"],
.field input[type="time"],
.field input[type="number"],
.field textarea,
.field select {
  font-family: var(--font-body);
  font-size: 17px;
  padding: 16px 18px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--blue-700);
  box-shadow: 0 0 0 4px var(--blue-100);
}
.field textarea { resize: vertical; min-height: 100px; line-height: 1.5; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.chip-pick {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.chip-pick button {
  padding: 10px 18px;
  border-radius: var(--r-full);
  border: 1.5px solid var(--line);
  background: var(--paper);
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  display: inline-flex; align-items: center; gap: 8px;
}
.chip-pick button.on {
  background: var(--blue-700);
  color: white;
  border-color: var(--blue-700);
}

/* ============ MODERATOR CALL ============ */
.mod-call-side {
  background: #0E1A3B;
  display: flex;
  flex-direction: column;
}
.mod-action {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  padding: 14px 16px;
  background: rgba(255,255,255,0.06);
  border-radius: var(--r-md);
  font-weight: 700;
  font-size: 15px;
  color: white;
  margin-bottom: 8px;
  text-align: left;
}
.mod-action:hover { background: rgba(255,255,255,0.12); }
.mod-action .ico {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(255,181,71,0.18);
  color: var(--yellow);
  display: grid; place-items: center;
}

/* ============ UTILS ============ */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.gap-24 { gap: 24px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.text-center { text-align: center; }

/* Screen-reader only — visually hidden, accessible to assistive tech */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* Skip-to-content link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  background: var(--blue-700);
  color: white;
  padding: 14px 28px;
  border-radius: var(--r-full);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
  box-shadow: var(--shadow-md);
  transition: top 0.2s ease;
  white-space: nowrap;
}
.skip-link:focus {
  top: 12px;
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
}

/* ============ SITE FOOTER ============ */
.site-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 24px 20px;
  font-size: 15px;
  color: var(--ink-muted);
  border-top: 1px solid var(--line-soft);
}
.site-footer a {
  color: var(--ink-muted);
  text-decoration: none;
  font-weight: 700;
  transition: color .15s;
}
.site-footer a:hover {
  color: var(--blue-700);
}
.site-footer-dot {
  color: var(--line);
}

/* ============ LEGAL PAGES (Impressum, Datenschutz) ============ */
.legal-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.legal-content {
  flex: 1;
  padding: clamp(20px, 3.2vh, 40px) clamp(16px, 3vw, 40px);
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.legal-content .card {
  padding: clamp(28px, 4vw, 48px);
}
.legal-section {
  margin-bottom: 36px;
}
.legal-section:last-child {
  margin-bottom: 0;
}
.legal-section .h-2 {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--blue-100);
}
.legal-back {
  font-size: 16px;
  padding: 14px 22px;
}
@media (max-width: 720px) {
  .legal-content { padding: 20px 16px; gap: 24px; }
  .legal-content .card { padding: 22px; border-radius: 24px; }
  .legal-section { margin-bottom: 28px; }
  .legal-back { font-size: 15px; padding: 12px 18px; }
}

/* ============================================================
   MOBILE — viewport ≤ 720px
   Reduziert Padding, stackt Spalten, verkleinert Topbar,
   macht Buttons & Touch-Ziele weich.
   ============================================================ */
@media (max-width: 720px) {
  html, body { font-size: 17px; }

  /* Topbar: kompakt, kein Wrap */
  .topbar {
    padding: 12px 14px;
    gap: 10px;
    flex-wrap: nowrap;
  }
  .brand {
    font-size: 0; /* Markenwort einklappen, nur Mark sichtbar */
    gap: 0;
    flex-shrink: 0;
  }
  .brand-mark { width: 40px; height: 40px; border-radius: 12px; }

  /* "Treffen läuft" Pill verschwindet aus dem Topbar — steht im Hero schon */
  .topbar .call-pill.live { display: none; }

  .topbar-right { gap: 8px; min-width: 0; }
  .avatar-chip { padding: 4px; flex-shrink: 0; }
  .avatar-chip .av { width: 32px; height: 32px; font-size: 16px; }

  .mode-toggle {
    padding: 4px;
    gap: 2px;
    flex-shrink: 1;
    min-width: 0;
  }
  .mode-toggle button {
    padding: 9px 14px;
    font-size: 14px;
    gap: 6px;
  }
  .mode-toggle button .icon { width: 18px; height: 18px; }

  /* Headlines (h-display/h-1 außerhalb des Heros — der Hero ist fluid) */
  .h-1 { font-size: clamp(24px, 7vw, 32px); }
  .h-2 { font-size: 20px; }

  /* Hero — Padding/Gap/Typo sind fluid (clamp) in der Basis,
     hier nur noch das was wirklich breitenabhängig ist */
  .home-grid { gap: 20px; }
  .home-hero { border-radius: 28px; }
  .home-illus {
    display: none; /* Auf Mobile: Illustration weglassen — Hero allein reicht */
  }
  .ls-text { max-width: 100%; }

  /* Buttons */
  .btn { white-space: normal; word-break: keep-all; }
  .btn-huge { line-height: 1.15; }

  /* Hero "Jetzt mit-machen" — Button darf Container ausfüllen */
  .home-hero .btn-huge { align-self: stretch !important; }
  .home-hero .btn-block { width: 100%; }

  /* Hero meta row (nur LiveHero) */
  .home-hero.live > div:last-child {
    flex-direction: column !important;
    gap: 10px !important;
    align-items: flex-start;
  }

  /* Eyebrow */
  .eyebrow { font-size: 13px; padding: 6px 12px; }

  /* Meeting rows */
  .meeting-row {
    flex-wrap: wrap;
    gap: 14px;
    padding: 16px;
    border-radius: 20px;
  }
  .meeting-day { width: 64px; height: 64px; border-radius: 12px; }
  .meeting-day .d { font-size: 22px; }
  .meeting-day .m { font-size: 11px; }
  .meeting-info {
    width: calc(100% - 78px);
    min-width: 0;
  }
  .meeting-info .title { font-size: 17px; line-height: 1.3; }
  .meeting-info .time { font-size: 14px; gap: 10px; margin-top: 6px; }
  .meeting-row > .btn,
  .meeting-row > .btn-secondary {
    width: 100%;
    padding: 14px 20px;
    font-size: 16px;
  }

  /* Mod tabs — horizontal scroll */
  .mod-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    margin-bottom: 20px;
    scrollbar-width: none;
  }
  .mod-tabs::-webkit-scrollbar { display: none; }
  .mod-tabs button {
    padding: 10px 16px;
    font-size: 14px;
    flex: 0 0 auto;
    white-space: nowrap;
  }

  /* Dashboard header actions */
  .dash-grid { gap: 12px; }
  .stat-card { padding: 18px 20px; }
  .stat-card .val { font-size: 36px; }
  .stat-card .label { font-size: 12px; }

  /* Dashboard rows — eine Spalte (Override gegen Inline-Style 1fr 1fr) */
  .dash-row { grid-template-columns: 1fr !important; gap: 12px; margin-top: 16px; }

  /* Chart cards */
  .chart-card { padding: 20px; overflow-x: auto; }
  .chart-card-header { margin-bottom: 16px; }
  .tbl th, .tbl td { padding: 12px 10px; font-size: 14px; }
  .tbl th { font-size: 11px; }
  .tbl .row-name { font-size: 14px; }
  .bar { min-width: 60px; }

  /* Live banner (dashboard) */
  .dash-grid + .dash-row,
  .stat-card { font-size: 14px; }

  /* Cards */
  .card, .card-warm { padding: 22px; border-radius: 24px; }

  /* Form */
  .form-grid { gap: 20px; grid-template-columns: 1fr !important; }
  .field { margin-bottom: 16px; }
  .field input, .field textarea, .field select {
    font-size: 16px; /* iOS zoom prevent */
    padding: 14px 16px;
  }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .chip-pick { gap: 6px; }
  .chip-pick button { padding: 9px 14px; font-size: 14px; }

  /* New-Meeting card padding */
  .form-grid .card { padding: 22px !important; }
}

/* ============================================================
   VIDEO CALL MOBILE — viewport ≤ 720px
   ============================================================ */
@media (max-width: 720px) {
  .call-topbar {
    padding: 12px 14px;
    flex-wrap: wrap;
    gap: 10px;
  }
  .call-topic {
    font-size: 17px;
    line-height: 1.2;
    width: 100%;
    gap: 10px;
  }
  .call-topic > svg { flex-shrink: 0; }
  .call-pill { font-size: 13px; padding: 6px 12px; gap: 6px; }
  .call-pill .dot { width: 8px; height: 8px; }

  .tiles {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 12px;
  }
  .tile { aspect-ratio: 1 / 1; border-radius: 18px; }
  .tile-name {
    font-size: 12px;
    padding: 4px 10px;
    bottom: 8px;
    left: 8px;
    max-width: calc(100% - 56px);
  }
  .tile-mic { width: 30px; height: 30px; top: 8px; right: 8px; }
  .tile-mic .icon { width: 14px; height: 14px; }

  .call-dock {
    padding: 10px 12px 14px;
    gap: 10px;
    flex-direction: column;
    align-items: stretch;
  }
  .dock-group { justify-content: center; gap: 10px; }
  .dock-btn {
    height: 52px;
    min-width: 52px;
    padding: 0 16px;
    font-size: 14px;
    border-radius: 14px;
  }
  .dock-btn.icon-only { width: 52px; }
  .dock-btn .icon { width: 22px; height: 22px; }

  /* Emoji-Rail wird scrollbar bei wenig Platz */
  .emoji-rail {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    flex-wrap: nowrap;
    justify-content: flex-start;
    scrollbar-width: none;
    padding: 6px 8px;
  }
  .emoji-rail::-webkit-scrollbar { display: none; }
  .emoji-rail.huge .emoji-btn {
    width: 52px;
    height: 52px;
    font-size: 28px;
    flex-shrink: 0;
  }
}

/* ============================================================
   ULTRA SMALL — viewport ≤ 380px (iPhone SE etc.)
   ============================================================ */
@media (max-width: 380px) {
  .topbar { gap: 8px; }
  .mode-toggle button { padding: 8px 12px; font-size: 13px; }
  .mode-toggle button .icon { width: 16px; height: 16px; }
  .meeting-info .time { flex-direction: column; gap: 4px; align-items: flex-start; }
  .tiles { gap: 8px; padding: 10px; }
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: calc(100vw - 32px);
  width: 480px;
}
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-radius: var(--r-md);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.35;
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: toastIn 0.3s ease-out;
}
.toast--error {
  background: var(--red);
  color: white;
}
.toast--success {
  background: var(--green);
  color: white;
}
.toast--info {
  background: var(--blue-700);
  color: white;
}
.toast-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.22);
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}
.toast-message {
  flex: 1;
  min-width: 0;
}
.toast-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  color: white;
  font-size: 16px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: background 0.15s;
}
.toast-close:hover {
  background: rgba(255,255,255,0.32);
}
@keyframes toastIn {
  from { transform: translateY(-16px); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}

/* ============================================================
   OFFLINE BANNER
   ============================================================ */
.offline-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  background: var(--red);
  color: white;
  text-align: center;
  padding: 14px 20px;
  font-weight: 700;
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  animation: toastIn 0.3s ease-out;
}
.offline-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.22);
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ============================================================
   CONFIRM / PROMPT DIALOGS
   ============================================================ */
.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(15, 27, 61, 0.55);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  padding: 20px;
  animation: toastIn 0.2s ease-out;
}
.confirm-box {
  background: var(--paper);
  border-radius: var(--r-lg);
  padding: 32px;
  max-width: 480px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}
.confirm-message {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink);
  margin: 0 0 24px 0;
}
.confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.call-shell .confirm-overlay {
  background: rgba(11, 20, 48, 0.75);
}

@media (max-width: 720px) {
  .toast-container {
    top: 12px;
    width: calc(100vw - 24px);
  }
  .toast {
    font-size: 15px;
    padding: 14px 16px;
    gap: 10px;
  }
  .confirm-box {
    padding: 24px;
  }
  .confirm-message {
    font-size: 18px;
  }
  .confirm-actions {
    flex-direction: column;
  }
  .confirm-actions .btn {
    width: 100%;
  }
}

