/* sunnyChat – Oberfläche. Farben kommen aus theme.css (Hell/Dunkel). */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: Manrope, "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
#app { min-height: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent-text); }
h1, h2, h3 { margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
[hidden] { display: none !important; }
.icon { display: inline-flex; flex: none; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.spacer { flex: 1; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.grow { flex: 1; min-width: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Marke ---------- */
.logo { display: block; flex: none; border-radius: 22%; }
.wordmark { font-size: 22px; letter-spacing: -0.03em; line-height: 1; white-space: nowrap; }
.wm-a { font-weight: 600; }
.wm-b { font-weight: 800; color: var(--accent-text); }
.brand-row { display: flex; align-items: center; gap: 10px; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); display: inline-block; flex: none; }

/* ---------- Knöpfe ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent;
  background: var(--panel-2); color: var(--text); font-weight: 700; cursor: pointer; text-decoration: none;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn.accent { background: var(--accent); color: var(--accent-ink); font-weight: 800; }
.btn.accent:hover { filter: brightness(1.05); }
.btn.ghost { background: transparent; border-color: var(--line-strong); }
.btn.ghost:hover { background: var(--panel-2); }
.btn.outline { background: transparent; border-color: var(--accent-text); color: var(--accent-text); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.big { min-height: 52px; font-size: 16px; }
.btn.small { min-height: 40px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.icon-btn {
  width: 44px; height: 44px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  border: none; border-radius: 10px; background: transparent; color: var(--text); cursor: pointer;
}
.icon-btn:hover { background: var(--panel-2); }
.icon-btn.soft { background: var(--panel-2); }
.icon-btn.accent { background: var(--accent); color: var(--accent-ink); }
.icon-btn.active { background: var(--accent); color: var(--accent-ink); }
.gif-btn { font-size: 12px; font-weight: 800; }

/* ---------- Splash ---------- */
.splash { min-height: 100vh; display: flex; flex-direction: column; padding: 28px 32px; }
.splash-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; text-align: center; }
.splash-word .wordmark { font-size: 44px; }
.progress { width: 220px; height: 6px; border-radius: 999px; background: var(--panel-2); overflow: hidden; margin-top: 10px; }
.progress span { display: block; width: 40%; height: 100%; border-radius: 999px; background: var(--accent); animation: slide 1.1s ease-in-out infinite; }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }
.splash-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 13px; }
.splash-foot b { color: var(--text); }

/* ---------- Anmelden ---------- */
.auth { min-height: 100vh; display: flex; flex-wrap: wrap; }
.auth-brand { flex: 1 1 400px; padding: 48px 56px; background: var(--panel); display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.brand-copy { display: flex; flex-direction: column; gap: 18px; }
.brand-copy h1 { font-size: clamp(32px, 4vw, 44px); line-height: 1.1; font-weight: 800; letter-spacing: -0.02em; }
.brand-copy p { color: var(--muted); font-size: 17px; max-width: 440px; }
.hero-art svg { max-width: 100%; height: auto; }
.auth-main { flex: 999 1 520px; padding: 24px; display: flex; flex-direction: column; }
.auth-top { display: flex; justify-content: flex-end; }
.auth-card { width: 100%; max-width: 440px; margin: auto; display: flex; flex-direction: column; gap: 20px; padding: 24px 0; }
.server-pill { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); font-size: 14px; }
.test-flag { padding: 10px 14px; border-radius: 12px; background: var(--warn-soft); color: var(--warn-text); font-size: 13px; font-weight: 700; }
.test-flag.wide { margin-bottom: 4px; }
.tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--line); }
.tabs button { flex: 1; min-height: 48px; background: none; border: none; border-bottom: 3px solid transparent; color: var(--muted); font-size: 16px; font-weight: 700; cursor: pointer; }
.tabs button.active { border-bottom-color: var(--accent); color: var(--text); }
.form { display: flex; flex-direction: column; gap: 16px; margin: 0; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 700; }
.field small { font-weight: 400; color: var(--muted); }
input[type="text"], input[type="password"], input[type="search"], input[type="number"], input:not([type]), select {
  min-height: 46px; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: var(--input); color: var(--text); font-size: 15px; width: 100%; min-width: 0;
}
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.form-status { color: var(--danger-text); font-size: 14px; min-height: 1em; }
.test-box { padding: 16px; border-radius: 14px; border: 1px dashed var(--line-strong); display: flex; flex-direction: column; gap: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--panel-2); color: var(--text); font-size: 14px; font-weight: 600; cursor: pointer; }
.chip small { color: var(--muted); font-weight: 500; }
.chip-x { width: 28px; height: 28px; border: none; border-radius: 50%; background: none; color: var(--muted); cursor: pointer; font-size: 16px; }

/* ---------- Warten / Hinweise ---------- */
.center-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px 16px; }
.card { position: relative; width: 100%; max-width: 520px; padding: 44px 36px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); }
.card.waiting { display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; }
.card-top { position: absolute; top: 12px; right: 12px; }
.card h1 { font-size: 28px; font-weight: 800; }
.steps { list-style: none; margin: 0; padding: 0; width: 100%; display: flex; flex-direction: column; gap: 10px; text-align: left; }
.steps li { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 12px; background: var(--bg); font-weight: 600; color: var(--muted); }
.steps li.done, .steps li.active { color: var(--text); }
.steps li.active { border: 1px solid var(--accent); }
.steps li small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; }
.step-dot { width: 28px; height: 28px; flex: none; border-radius: 50%; border: 2px solid var(--line-strong); display: flex; align-items: center; justify-content: center; }
.done .step-dot { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.step-dot.spin { border: 3px solid var(--accent); border-right-color: var(--line); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.conn-banner { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 60; padding: 10px 18px; border-radius: 999px; background: var(--warn-soft); color: var(--warn-text); font-weight: 700; font-size: 14px; box-shadow: var(--shadow); }

/* ---------- Startseite ---------- */
.main-layout { min-height: 100vh; display: flex; flex-wrap: wrap; }
.sidebar { flex: 1 1 280px; max-width: 100%; padding: 20px 16px; background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 20px; }
@media (min-width: 900px) { .sidebar { flex: 0 0 300px; min-height: 100vh; } }
.me-card { display: flex; align-items: center; gap: 12px; padding: 10px 8px 10px 12px; border-radius: 12px; background: var(--bg); }
.me-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.me-text span { font-size: 13px; color: var(--muted); }
.avatar { position: relative; width: 38px; height: 38px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; font-weight: 800; }
.avatar .dot { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--panel); }
.dot.online { background: var(--accent); }
.dot.busy, .dot.insession { background: #F2A93B; }
.dot.offline { background: #6B7A96; }
.side-section { display: flex; flex-direction: column; gap: 8px; }
.side-section h2, .side-label { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.request { padding: 14px; border-radius: 12px; border: 1px solid var(--accent); display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.contact-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.contact { width: 100%; display: flex; align-items: center; gap: 12px; padding: 8px; border: none; border-radius: 10px; background: none; color: inherit; text-align: left; cursor: pointer; min-height: 52px; }
.contact:hover, .contact.open { background: var(--panel-2); }
.contact-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.contact-text span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.add-contact { display: flex; flex-direction: column; gap: 8px; }
.add-contact .row { flex-wrap: nowrap; }
.side-foot { margin-top: auto; line-height: 1.6; }
.content { flex: 999 1 520px; min-width: 0; padding: 32px; display: flex; flex-direction: column; gap: 20px; }
.content-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.content-head h1 { font-size: 30px; font-weight: 800; }
.invite { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 18px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line-strong); }
.invite .icon { color: var(--accent-text); }
.invite span:not(.icon) { flex: 1; min-width: 200px; }
.session-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.session-card { padding: 20px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.session-card.idle { border-style: dashed; border-color: var(--line-strong); }
.session-card h2 { font-size: 19px; font-weight: 800; }
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; }
.pill.ok { background: var(--accent-soft); color: var(--accent-soft-text); }
.pill.warn { background: var(--warn-soft); color: var(--warn-text); }
.pill.tiny { font-size: 11px; padding: 2px 8px; margin-left: 8px; }
.stack { display: inline-flex; align-items: center; }
.stack .avatar { width: 30px; height: 30px; font-size: 11px; border: 2px solid var(--panel); }
.stack .avatar + .avatar { margin-left: -8px; }
.stack .muted { margin-left: 10px; }
.empty-state { padding: 48px 24px; border-radius: 16px; border: 1px dashed var(--line-strong); text-align: center; display: flex; flex-direction: column; gap: 6px; }
.dm-col { flex: 1 1 340px; max-width: 100%; border-left: 1px solid var(--line); background: var(--panel); display: flex; }
@media (min-width: 1100px) { .dm-col { flex: 0 0 380px; height: 100vh; position: sticky; top: 0; } }
.dm-col .chat { flex: 1; min-height: 480px; }

/* ---------- Chat ---------- */
.chat { position: relative; display: flex; flex-direction: column; min-height: 0; height: 100%; background: var(--panel); }
.chat-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 12px 18px; border-bottom: 1px solid var(--line); }
.chat-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chat-title h2 { font-size: 16px; font-weight: 800; }
.chat-title span { font-size: 13px; color: var(--muted); }
.messages { flex: 1; min-height: 0; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; background: var(--bg); }
:root[data-theme="dark"] .messages { background: var(--panel); }
.messages .empty { color: var(--muted); text-align: center; margin: auto; font-size: 14px; }
.day { align-self: center; padding: 3px 12px; border-radius: 999px; background: var(--panel-2); font-size: 12px; font-weight: 700; color: var(--muted); }
.msg { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; max-width: 100%; }
.msg.mine { align-items: flex-end; }
.meta { font-size: 12px; font-weight: 700; color: var(--muted); }
.bubble { max-width: 85%; padding: 10px 12px; border-radius: 14px 14px 14px 4px; background: var(--bubble); border: 1px solid var(--bubble-line); font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.mine .bubble { border-radius: 14px 14px 4px 14px; background: var(--me-bg); color: var(--me-text); border-color: transparent; }
.gif { margin: 0; display: flex; flex-direction: column; gap: 2px; }
.gif img { max-width: 220px; height: auto; border-radius: 12px; display: block; background: var(--panel-2); }
.gif figcaption { font-size: 11px; color: var(--muted); }
.mine .gif { align-items: flex-end; }
.chat-popover { margin: 0 12px; padding: 12px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line-strong); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; max-height: 340px; overflow: auto; }
.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 4px; }
.emoji { height: 40px; border: none; border-radius: 8px; background: none; font-size: 22px; cursor: pointer; }
.emoji:hover { background: var(--panel-2); }
.gif-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.gif-pick { height: 80px; padding: 0; border: none; border-radius: 8px; overflow: hidden; background: var(--panel-2); cursor: pointer; }
.gif-pick img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gif-status { font-size: 13px; color: var(--muted); }
.giphy-credit { font-size: 11px; color: var(--muted); }
.chat-form { display: flex; align-items: center; gap: 8px; margin: 0; padding: 12px; border-top: 1px solid var(--line); background: var(--panel); }
.chat-input { flex: 1; }

/* ---------- Dialoge & Hinweise ---------- */
.backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(4, 9, 18, 0.62); display: flex; align-items: center; justify-content: center; padding: 16px; overflow-y: auto; }
.dialog { width: 100%; max-width: 540px; max-height: calc(100vh - 32px); overflow-y: auto; padding: 24px 28px 28px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 16px; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dialog-head h2 { font-size: 22px; font-weight: 800; }
fieldset { margin: 0; padding: 0; border: none; display: flex; flex-direction: column; gap: 10px; }
legend { padding: 0; margin-bottom: 8px; font-size: 14px; font-weight: 700; }
.segmented { display: flex; gap: 6px; padding: 4px; border-radius: 12px; background: var(--input); border: 1px solid var(--line); }
.segmented button { flex: 1; min-height: 42px; border: none; border-radius: 9px; background: none; color: var(--muted); font-weight: 800; cursor: pointer; }
.segmented button.on { background: var(--accent); color: var(--accent-ink); }
.note { padding: 12px 14px; border-radius: 12px; background: var(--panel-2); font-size: 14px; }
.ids-box { display: flex; flex-direction: column; gap: 8px; }
.chip-input { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--input); }
.chip-input .chip { cursor: default; padding-right: 4px; }
.chip-input input { flex: 1; min-width: 140px; border: none; background: none; min-height: 36px; padding: 0 6px; }
.chip-input input:focus { outline: none; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; cursor: pointer; }
.switch { appearance: none; width: 50px; height: 30px; flex: none; border-radius: 999px; background: var(--line-strong); position: relative; cursor: pointer; transition: background 0.15s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform 0.15s; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); }
.switch:checked { background: var(--accent); }
.switch:checked::after { transform: translateX(20px); }
.people { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.people li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.toasts { position: fixed; z-index: 70; bottom: 96px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; width: min(92vw, 520px); }
.toast { padding: 12px 18px; border-radius: 14px; background: var(--panel); color: var(--text); border: 1px solid var(--line-strong); box-shadow: var(--shadow); font-size: 14px; font-weight: 600; text-align: center; transition: opacity 0.35s, transform 0.35s; }
.toast.error { border-color: var(--danger); }
.toast.accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 800; }
.toast.out { opacity: 0; transform: translateY(8px); }

/* ---------- Gespräch ---------- */
.call-layout { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.call-head { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--panel); border-bottom: 1px solid var(--line); }
.call-title { display: flex; flex-direction: column; min-width: 0; }
.call-title b { font-size: 17px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.call-title span { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.secure { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
@media (max-width: 640px) { .secure { display: none; } }
.call-body { flex: 1; min-height: 0; display: flex; position: relative; }
.stage-wrap { flex: 1; min-width: 0; display: flex; background: var(--stage); }
.call-chat { width: 0; overflow: hidden; border-left: 1px solid var(--line); transition: width 0.2s; display: flex; }
.call-chat > .chat { width: 360px; flex: none; }
.chat-open .call-chat { width: 360px; }
@media (max-width: 900px) {
  .call-chat { position: absolute; right: 0; top: 0; bottom: 0; z-index: 20; box-shadow: var(--shadow); }
  .chat-open .call-chat { width: min(100vw, 380px); }
  .call-chat > .chat { width: min(100vw, 380px); }
}
.call-controls { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--panel); border-top: 1px solid var(--line); }
.ctrl { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--panel-2); color: var(--text); font-weight: 700; font-size: 14px; cursor: pointer; }
.ctrl.off { background: transparent; color: var(--danger-text); border-color: var(--danger); }
.ctrl.on { background: var(--accent-soft); color: var(--accent-soft-text); border-color: var(--accent-text); }
.ctrl.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 800; }
.ctrl.busy { background: transparent; border-style: dashed; color: var(--muted); cursor: not-allowed; }
.ctrl.danger { background: var(--danger); border-color: var(--danger); color: #fff; font-weight: 800; }
.ctrl .badge { position: absolute; top: -6px; right: -6px; }
@media (max-width: 640px) {
  .ctrl { padding: 0; width: 52px; justify-content: center; border-radius: 50%; }
  .ctrl > span:not(.icon):not(.badge) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}
.media-sink { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }

/* Bühne */
.stage { flex: 1; min-width: 0; position: relative; display: flex; overflow: hidden; }
.group { flex: 1; display: flex; align-items: flex-end; justify-content: center; padding: 16px 16px 8px; }
.stage.sharing .group { display: none; }
.share-layout { display: none; flex: 1; min-width: 0; align-items: center; justify-content: center; gap: 20px; padding: 20px; }
.stage.sharing .share-layout { display: flex; }
.side { display: flex; flex-direction: column; align-items: center; gap: 18px; flex: none; }
.screen-box { position: relative; flex: 1; min-width: 0; max-width: 1200px; align-self: stretch; display: flex; align-items: center; justify-content: center; padding: 0 64px 48px 0; }
.screen-video { width: 100%; max-height: 100%; aspect-ratio: 16 / 10; object-fit: contain; border-radius: 14px; background: var(--screen-bg); border: 1px solid var(--line-strong); }
.screen-label { position: absolute; inset: 0 64px 48px 0; display: flex; align-items: center; justify-content: center; color: var(--muted); font-weight: 700; pointer-events: none; }
.sharer-slot { position: absolute; right: 0; bottom: 0; z-index: 3; }
.stage.sharing.narrow .share-layout { flex-direction: column; align-items: stretch; gap: 12px; padding: 12px; }
.stage.sharing.narrow .side-a { flex-direction: row; justify-content: center; flex-wrap: nowrap; }
.stage.sharing.narrow .side-b { display: none; }
.stage.sharing.narrow .screen-box { padding: 0 24px 40px 0; }
.stage.sharing.narrow .screen-label { inset: 0 24px 40px 0; }
.tile { position: relative; display: flex; flex-direction: column; align-items: center; transition: transform 0.25s; flex: none; }
.tile.speaking { z-index: 5; transform: translateY(-6px) scale(1.04); }
.cut { width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.cutout { width: 100%; height: 100%; display: block; object-fit: contain; }
.tile.self .cutout { transform: scaleX(-1); }
.tile.speaking .cutout { filter: drop-shadow(0 0 2px var(--accent)) drop-shadow(0 0 7px var(--accent)); }
.placeholder { width: 70%; height: 80%; margin: auto auto 0; border-radius: 50% 50% 10% 10%; background: var(--panel-2); opacity: 0.7; }
.label { display: flex; align-items: center; gap: 4px; margin-top: 6px; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--text); background: var(--panel); border: 1px solid var(--line); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.tile.speaking .label { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.mic-off { color: var(--danger-text); display: inline-flex; }
.tile.speaking .mic-off { color: var(--accent-ink); }
.sharer-slot .label { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* ---------- Konto, Gruppen, Termine, Gäste, App (ab 0.2) ---------- */
input[type="email"], input[type="date"], input[type="time"], textarea {
  min-height: 46px; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: var(--input); color: var(--text); font-size: 15px; width: 100%; min-width: 0; font: inherit;
}
textarea { resize: vertical; line-height: 1.4; }
.block { display: block; font-weight: 400; }
.center { text-align: center; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); gap: 12px; }
.avatar { overflow: hidden; }
.avatar .avatar-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar .dot { z-index: 1; }
.group-av { border-radius: 12px; }
.sidebar { min-width: 0; }
.side-nav { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--bg); }
.side-nav button span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-nav button { flex: 1 1 0; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; border: none; border-radius: 9px; background: none; color: var(--muted); font-weight: 700; font-size: 13px; cursor: pointer; padding: 0 6px; }
.side-nav button.active { background: var(--panel-2); color: var(--text); }
.pending-note { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--warn-soft); color: var(--warn-text); font-weight: 700; font-size: 13px; text-decoration: none; }
.small-icon { width: 34px; height: 34px; }
.note.warn-note { background: var(--warn-soft); color: var(--warn-text); display: flex; gap: 10px; align-items: center; }
.note.ok-note { background: var(--accent-soft); color: var(--accent-soft-text); display: flex; gap: 10px; align-items: center; }

/* Chat */
.msg { flex-direction: row; align-items: flex-end; gap: 8px; }
.msg.mine { flex-direction: row-reverse; }
.msg .avatar { width: 28px; height: 28px; font-size: 10px; }
.msg-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; max-width: 85%; align-items: flex-start; }
.mine .msg-body { align-items: flex-end; }
.msg-body .bubble { max-width: 100%; }
.bubble.mention { box-shadow: 0 0 0 2px var(--accent); }
.guest-tag { margin-left: 6px; padding: 0 6px; border-radius: 999px; background: var(--warn-soft); color: var(--warn-text); font-size: 11px; }
.mention-box { margin: 0 12px; padding: 6px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line-strong); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; }
.mention-opt { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 8px; border: none; border-radius: 8px; background: none; color: var(--text); font-weight: 600; text-align: left; cursor: pointer; }
.mention-opt:hover { background: var(--panel-2); }
.mention-opt .avatar { width: 26px; height: 26px; font-size: 10px; }
.chat-head .icon-btn { width: 40px; height: 40px; }
.chat-title h2 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
@media (max-width: 899px) {
  .dm-col:not([hidden]) { position: fixed; inset: 0; z-index: 40; border-left: none; }
  .dm-col .chat { min-height: 0; height: 100dvh; }
  body.chat-open-mobile { overflow: hidden; }
}

/* Auswahl-Listen */
.picker { display: flex; flex-direction: column; gap: 8px; }
.pick-list { display: flex; flex-direction: column; gap: 2px; max-height: 240px; overflow-y: auto; padding: 4px; border-radius: 12px; border: 1px solid var(--line); background: var(--input); }
.pick { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 4px 8px; border-radius: 10px; cursor: pointer; }
.pick:hover { background: var(--panel-2); }
.pick input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.pick > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.pick small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.plain-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.plain-list li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--line); }
.plain-list li .grow { min-width: 180px; overflow-wrap: anywhere; }
.radio-row { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.radio-row input { width: 18px; height: 18px; accent-color: var(--accent); }
.guest-form { padding: 14px; border-radius: 14px; border: 1px dashed var(--line-strong); }
.dialog h3 { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-top: 6px; }
details summary { cursor: pointer; font-weight: 700; min-height: 40px; display: flex; align-items: center; }
details[open] summary { margin-bottom: 8px; }

/* Gespräch: Warteraum */
.waiting-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 16px; background: var(--warn-soft); color: var(--warn-text); font-weight: 700; }
.big-spin { width: 44px; height: 44px; }

/* Gäste */
.time-badge { white-space: nowrap; }
.guest-page { height: 100vh; height: 100dvh; display: flex; flex-direction: column; }
.guest-brand { display: flex; align-items: center; gap: 8px; padding: 8px 16px; background: var(--panel); border-bottom: 1px solid var(--line); }
.guest-brand .wordmark { font-size: 18px; }
.guest-page .chat { flex: 1; min-height: 0; }
.guest-join { min-height: 100vh; display: flex; flex-direction: column; align-items: center; gap: 20px; padding: 16px 16px 32px; }
.guest-join-top { width: 100%; max-width: 520px; display: flex; justify-content: space-between; align-items: center; }
.guest-card { display: flex; flex-direction: column; gap: 14px; padding: 28px; }
.guest-card h1 { font-size: 26px; }
.guest-when { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.code-input { font-family: Consolas, ui-monospace, monospace; font-size: 20px !important; letter-spacing: 0.15em; text-transform: uppercase; }
@media (max-width: 520px) { .guest-card { padding: 20px 16px; } }

/* Kalender */
.cal-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.cal-title { font-size: 20px; font-weight: 800; flex: 1; text-align: center; min-width: 140px; }
.small-seg { padding: 3px; }
.small-seg button { min-height: 36px; padding: 0 12px; }
.cal-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-wd { font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; text-align: center; padding: 4px 0; }
.cal-cell { min-height: 96px; padding: 6px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; cursor: pointer; min-width: 0; overflow: hidden; }
.cal-cell.other { opacity: 0.5; }
.cal-cell.today { border-color: var(--accent-text); box-shadow: inset 0 0 0 1px var(--accent-text); }
.cal-day { font-size: 13px; font-weight: 800; }
.today .cal-day { color: var(--accent-text); }
.ev-chip { display: block; width: 100%; padding: 2px 6px; border: none; border-radius: 6px; background: var(--accent-soft); color: var(--accent-soft-text); font-size: 12px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.ev-chip.st-past { background: var(--panel-2); color: var(--muted); }
.ev-chip.st-cancelled { background: var(--panel-2); color: var(--muted); text-decoration: line-through; }
.ev-chip.st-running { background: var(--accent); color: var(--accent-ink); }
.more { font-size: 11px; color: var(--muted); font-weight: 700; }
@media (max-width: 640px) {
  .cal-cell { min-height: 64px; padding: 4px; }
  .ev-chip { font-size: 0; padding: 0; height: 6px; border-radius: 3px; }
}
.cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 900px) { .cal-week { grid-template-columns: 1fr; } }
.cal-col { display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); min-width: 0; min-height: 120px; }
@media (max-width: 900px) { .cal-col { min-height: 0; } }
.cal-col.today { border-color: var(--accent-text); }
.cal-col-head { font-size: 13px; color: var(--muted); }
.cal-col-head b { color: var(--text); }
.ev-card { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px; border: 1px solid var(--line); border-left: 4px solid var(--accent-text); border-radius: 10px; background: var(--bg); color: var(--text); text-align: left; cursor: pointer; min-width: 0; }
.ev-card b { overflow-wrap: anywhere; }
.ev-card.st-past, .ev-card.st-cancelled { opacity: 0.6; border-left-color: var(--line-strong); }
.ev-time { font-size: 12px; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.cal-free { padding: 6px; }
.agenda { display: flex; flex-direction: column; gap: 18px; }
.agenda-day { display: flex; flex-direction: column; gap: 8px; }
.agenda-day h3 { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.ev-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); border-left: 5px solid var(--accent-text); background: var(--panel); color: var(--text); text-align: left; cursor: pointer; width: 100%; }
.ev-row .grow { display: flex; flex-direction: column; min-width: 160px; }
.ev-row small { color: var(--muted); font-size: 12px; }
.ev-row.st-past, .ev-row.st-cancelled { opacity: 0.6; border-left-color: var(--line-strong); }
.ev-row.st-running { border-left-color: var(--accent); }
.pill.st-upcoming { background: var(--panel-2); color: var(--text); }
.pill.st-running { background: var(--accent); color: var(--accent-ink); }
.pill.st-past { background: var(--panel-2); color: var(--muted); }
.pill.st-cancelled { background: var(--danger); color: #fff; }
.mt-when { display: flex; align-items: center; gap: 8px; font-weight: 700; flex-wrap: wrap; }
.mt-desc { white-space: pre-wrap; padding: 12px; border-radius: 12px; background: var(--panel-2); }

/* Einstellungen */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 20px; align-items: start; }
.settings-card { padding: 22px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.settings-card h2 { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 800; }
.settings-card h3 { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.settings-card fieldset:disabled { opacity: 0.5; }
.ios-steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.update-banner { position: fixed; z-index: 65; top: 12px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px; border-radius: 999px; background: var(--panel); border: 1px solid var(--accent-text); box-shadow: var(--shadow); font-weight: 700; white-space: nowrap; }
.content-head .row { flex-wrap: wrap; }
@media (max-width: 520px) { .content { padding: 20px 14px; } .content-head h1 { font-size: 26px; } }
